reacthub-pixitweenjs 0.2.103 → 0.2.105-alpha.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.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(re,mt){typeof exports=="object"&&typeof module<"u"?mt(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap","@pixi/sound"],mt):(re=typeof globalThis<"u"?globalThis:re||self,mt(re["reacthub-pixitweenjs"]={},re.React,re.PIXIReact,re.PIXI,re.reacthubReactBindings,re.gsap,re.PIXI.sound))})(this,function(re,mt,le,oy,ay,_e,ly){"use strict";function uc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Et=uc(mt),zr=uc(oy);var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function uy(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var fc={exports:{}},Gs={};/**
1
+ (function(Ht,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap","@pixi/sound"],W):(Ht=typeof globalThis<"u"?globalThis:Ht||self,W(Ht["reacthub-pixitweenjs"]={},Ht.React,Ht.PIXIReact,Ht.PIXI,Ht.reacthubReactBindings,Ht.gsap,Ht.PIXI.sound))})(this,function(Ht,W,Yt,rv,nv,oe,iv){"use strict";function ac(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const st=ac(W),Fr=ac(rv);var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sv(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var oc={exports:{}},Ls={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,24 +6,24 @@
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 fy=mt,cy=Symbol.for("react.element"),hy=Symbol.for("react.fragment"),dy=Object.prototype.hasOwnProperty,py=fy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,vy={key:!0,ref:!0,__self:!0,__source:!0};function cc(e,t,r){var n,i={},o=null,a=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)dy.call(t,n)&&!vy.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:cy,type:e,key:o,ref:a,props:i,_owner:py.current}}Gs.Fragment=hy,Gs.jsx=cc,Gs.jsxs=cc,fc.exports=Gs;var Vt=fc.exports,Sn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Sn||{});let hc;function dc(){return hc=document.body,hc}function Ze(e,t,r){let n;return mt.useEffect(()=>{n=n||dc();const i=o=>{const a=o.detail;t(a)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function ti(e,t){const r=dc(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function gy(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const An=Et.createContext({}),Oe={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",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},my=({children:e})=>{const[t,r]=mt.useState(0),n=mt.useRef(),i=mt.useRef(),o=mt.useRef(.001),a=mt.useRef(!1),u=mt.useRef(!1);mt.useLayoutEffect(()=>(i.current=_e.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&_e.killTweensOf(n.current),n.current=_e.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),_e.killTweensOf(n.current)),i.current.revert()}),[]);const f=mt.useCallback(()=>{if(n.current){let w=n.current.time();w<o.current?a.current=!0:a.current=!1,o.current=w}},[]);mt.useEffect(()=>{if(n.current){const m=n.current;m.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){m.pause(),f()}).eventCallback("onUpdate",function(){f()}).eventCallback("onComplete",function(){m.pause(),m.revert(),ti(Oe.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),f()})}},[]);const h=mt.useCallback(()=>{n.current&&n.current.revert()},[]),d=mt.useCallback(()=>{n.current&&n.current.restart()},[]),p=mt.useCallback(()=>{if(n.current){const m=n.current;m.repeat(1),m.restart()}},[]),c=mt.useCallback(m=>{n.current&&n.current.seek(m)},[]),v=mt.useCallback(()=>{n.current&&n.current.seek(4)},[]),y=mt.useCallback(()=>{const m=n.current;return m?m.totalDuration():0},[]),_=()=>{n.current&&(n.current.pause(),ti(Oe.PAUSE))},b=()=>{n.current&&(n.current.resume(),ti(Oe.RESUME))};return Ze(Oe.SEEK_START,()=>{u.current=!0}),Ze(Oe.SCRUBBER_PLAY,()=>{b()}),Ze(Oe.SCRUBBER_PAUSE,()=>{_()}),Ze(Oe.SCRUBBER_SEEK,m=>{c(m)}),Ze(Oe.SEEK_END,()=>{u.current=!1}),Ze(Oe.REVERSE_MODE_START,()=>{a.current=!0}),Ze(Oe.REVERSE_MODE_END,()=>{a.current=!1}),Ze(Oe.SCRUBBER_PROGRESS_UPDATE,m=>{}),Vt.jsx(An.Provider,{value:{gsapCtx:i,tl:n,handlePlay:b,handlePause:_,handleReset:h,handleSeek:c,handleSeekTest:v,handleRestart:d,handleRepeat:p,playerTimeRef:o,getTimelineDuration:y,totalDuration:t,setTotalDuration:r,reverseModeRef:a,dragModeRef:u},children:e})},yy=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:o,onDoubleClick:a,uniqueId:u="",isText:f=!1})=>{const h=zr.utils.string2hex("#F3C409"),d=zr.utils.string2hex("#F3C409"),p=Et.useRef({isDragging:!1}),c=300,v=Et.useRef(0),y=Et.useCallback(()=>{o&&!p.current.isDragging&&o(!0)},[o]),_=Et.useCallback(()=>{o&&!p.current.isDragging&&o(!1)},[o]),b=Et.useCallback(()=>{p.current.isDragging=!0;const T=new Date().getTime();T-v.current<c&&a&&a(),v.current=T},[]),m=Et.useCallback(T=>{p.current.isDragging=!0,i&&i(T),ti(Oe.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),w=Et.useCallback(()=>{if(t.current===null)return;const T=t.current.x,x=t.current.y,E=t.current.width,I=t.current.height,O=t.current.rotation,A=[t.current.scale.x,t.current.scale.y],L=A[0]<0?-1:1,R=A[1]<0?-1:1;n&&(n({uniqueId:u,transformation:{x:Math.round(T),y:Math.round(x),width:Math.round(Math.max(5,E)),height:Math.round(Math.max(5,I)),rotation:O,scale:f?A:[L,R]}}),ti(Oe.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),p.current.isDragging=!1},[n]);return Et.useEffect(()=>(e.current&&(e.current.on("mouseover",y),e.current.on("mouseout",_),e.current.on("mousedown",b)),()=>{e.current&&(e.current.off("mouseover",y),e.current.off("mouseout",_),e.current.off("mousedown",b))}),[]),Vt.jsx(ay.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:d},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:h,shape:"circle",radius:10},transformchange:m,transformcommit:w})};var _y=Object.prototype;function by(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||_y;return e===r}var pc=by;function xy(e,t){return function(r){return e(t(r))}}var wy=xy,Ty=wy,Ey=Ty(Object.keys,Object),Sy=Ey,Ay=pc,Oy=Sy,Cy=Object.prototype,Ry=Cy.hasOwnProperty;function Iy(e){if(!Ay(e))return Oy(e);var t=[];for(var r in Object(e))Ry.call(e,r)&&r!="constructor"&&t.push(r);return t}var vc=Iy,Py=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,gc=Py,Ny=gc,My=typeof self=="object"&&self&&self.Object===Object&&self,ky=Ny||My||Function("return this")(),Mr=ky,Ly=Mr,Fy=Ly.Symbol,js=Fy,mc=js,yc=Object.prototype,By=yc.hasOwnProperty,Dy=yc.toString,Ki=mc?mc.toStringTag:void 0;function Uy(e){var t=By.call(e,Ki),r=e[Ki];try{e[Ki]=void 0;var n=!0}catch{}var i=Dy.call(e);return n&&(t?e[Ki]=r:delete e[Ki]),i}var $y=Uy,Gy=Object.prototype,jy=Gy.toString;function qy(e){return jy.call(e)}var zy=qy,_c=js,Hy=$y,Vy=zy,Wy="[object Null]",Xy="[object Undefined]",bc=_c?_c.toStringTag:void 0;function Ky(e){return e==null?e===void 0?Xy:Wy:bc&&bc in Object(e)?Hy(e):Vy(e)}var Yi=Ky;function Yy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zi=Yy,Zy=Yi,Qy=Zi,Jy="[object AsyncFunction]",t0="[object Function]",e0="[object GeneratorFunction]",r0="[object Proxy]";function n0(e){if(!Qy(e))return!1;var t=Zy(e);return t==t0||t==e0||t==Jy||t==r0}var xc=n0,i0=Mr,s0=i0["__core-js_shared__"],o0=s0,Ha=o0,wc=function(){var e=/[^.]+$/.exec(Ha&&Ha.keys&&Ha.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function a0(e){return!!wc&&wc in e}var l0=a0,u0=Function.prototype,f0=u0.toString;function c0(e){if(e!=null){try{return f0.call(e)}catch{}try{return e+""}catch{}}return""}var Tc=c0,h0=xc,d0=l0,p0=Zi,v0=Tc,g0=/[\\^$.*+?()[\]{}|]/g,m0=/^\[object .+?Constructor\]$/,y0=Function.prototype,_0=Object.prototype,b0=y0.toString,x0=_0.hasOwnProperty,w0=RegExp("^"+b0.call(x0).replace(g0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function T0(e){if(!p0(e)||d0(e))return!1;var t=h0(e)?w0:m0;return t.test(v0(e))}var E0=T0;function S0(e,t){return e==null?void 0:e[t]}var A0=S0,O0=E0,C0=A0;function R0(e,t){var r=C0(e,t);return O0(r)?r:void 0}var ei=R0,I0=ei,P0=Mr,N0=I0(P0,"DataView"),M0=N0,k0=ei,L0=Mr,F0=k0(L0,"Map"),Va=F0,B0=ei,D0=Mr,U0=B0(D0,"Promise"),$0=U0,G0=ei,j0=Mr,q0=G0(j0,"Set"),z0=q0,H0=ei,V0=Mr,W0=H0(V0,"WeakMap"),X0=W0,Wa=M0,Xa=Va,Ka=$0,Ya=z0,Za=X0,Ec=Yi,ri=Tc,Sc="[object Map]",K0="[object Object]",Ac="[object Promise]",Oc="[object Set]",Cc="[object WeakMap]",Rc="[object DataView]",Y0=ri(Wa),Z0=ri(Xa),Q0=ri(Ka),J0=ri(Ya),t1=ri(Za),On=Ec;(Wa&&On(new Wa(new ArrayBuffer(1)))!=Rc||Xa&&On(new Xa)!=Sc||Ka&&On(Ka.resolve())!=Ac||Ya&&On(new Ya)!=Oc||Za&&On(new Za)!=Cc)&&(On=function(e){var t=Ec(e),r=t==K0?e.constructor:void 0,n=r?ri(r):"";if(n)switch(n){case Y0:return Rc;case Z0:return Sc;case Q0:return Ac;case J0:return Oc;case t1:return Cc}return t});var Ic=On;function e1(e){return e!=null&&typeof e=="object"}var Qi=e1,r1=Yi,n1=Qi,i1="[object Arguments]";function s1(e){return n1(e)&&r1(e)==i1}var o1=s1,Pc=o1,a1=Qi,Nc=Object.prototype,l1=Nc.hasOwnProperty,u1=Nc.propertyIsEnumerable,f1=Pc(function(){return arguments}())?Pc:function(e){return a1(e)&&l1.call(e,"callee")&&!u1.call(e,"callee")},Qa=f1,c1=Array.isArray,kr=c1,h1=9007199254740991;function d1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=h1}var Ja=d1,p1=xc,v1=Ja;function g1(e){return e!=null&&v1(e.length)&&!p1(e)}var qs=g1,zs={exports:{}};function m1(){return!1}var y1=m1;zs.exports,function(e,t){var r=Mr,n=y1,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,u=a?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(zs,zs.exports);var tl=zs.exports,_1=Yi,b1=Ja,x1=Qi,w1="[object Arguments]",T1="[object Array]",E1="[object Boolean]",S1="[object Date]",A1="[object Error]",O1="[object Function]",C1="[object Map]",R1="[object Number]",I1="[object Object]",P1="[object RegExp]",N1="[object Set]",M1="[object String]",k1="[object WeakMap]",L1="[object ArrayBuffer]",F1="[object DataView]",B1="[object Float32Array]",D1="[object Float64Array]",U1="[object Int8Array]",$1="[object Int16Array]",G1="[object Int32Array]",j1="[object Uint8Array]",q1="[object Uint8ClampedArray]",z1="[object Uint16Array]",H1="[object Uint32Array]",ue={};ue[B1]=ue[D1]=ue[U1]=ue[$1]=ue[G1]=ue[j1]=ue[q1]=ue[z1]=ue[H1]=!0,ue[w1]=ue[T1]=ue[L1]=ue[E1]=ue[F1]=ue[S1]=ue[A1]=ue[O1]=ue[C1]=ue[R1]=ue[I1]=ue[P1]=ue[N1]=ue[M1]=ue[k1]=!1;function V1(e){return x1(e)&&b1(e.length)&&!!ue[_1(e)]}var W1=V1;function X1(e){return function(t){return e(t)}}var K1=X1,Hs={exports:{}};Hs.exports,function(e,t){var r=gc,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,a=o&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||a&&a.binding&&a.binding("util")}catch{}}();e.exports=u}(Hs,Hs.exports);var Y1=Hs.exports,Z1=W1,Q1=K1,Mc=Y1,kc=Mc&&Mc.isTypedArray,J1=kc?Q1(kc):Z1,el=J1,t_=vc,e_=Ic,r_=Qa,n_=kr,i_=qs,s_=tl,o_=pc,a_=el,l_="[object Map]",u_="[object Set]",f_=Object.prototype,c_=f_.hasOwnProperty;function h_(e){if(e==null)return!0;if(i_(e)&&(n_(e)||typeof e=="string"||typeof e.splice=="function"||s_(e)||a_(e)||r_(e)))return!e.length;var t=e_(e);if(t==l_||t==u_)return!e.size;if(o_(e))return!t_(e).length;for(var r in e)if(c_.call(e,r))return!1;return!0}var d_=h_;const rl=En(d_);var nl=(e=>(e.NONE="none",e.NORMAL="normal",e.LENSFLARE="lensflare",e.FILMSTRIP="filmstrip",e.GRUNGE="grunge",e.BRICKS="bricks",e))(nl||{});const Lc={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}},p_=e=>{const{overlay:t,width:r,height:n,x:i,y:o}=e,{src:a,blendmode:u}=Lc[t]||Lc.normal;return Vt.jsx(le.TilingSprite,{image:a,width:r,height:n,x:i,y:o,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},v_=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],ni=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(!1),[i,o]=mt.useState(!1),[a,u]=mt.useState(!1),f=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(null),p=mt.useRef(null),{uniqueId:c,visible:v,transformation:{x:y,y:_,width:b,height:m,scale:w=[1,1],rotation:T=0,effect:x,overlay:E},applyTransformer:I,disabled:O,pointerdown:A,pointerout:L,pointerover:R,isText:C,isDragging:P,isGif:M,onDoubleClick:F,isTextEditMode:q}=e;Ze(Oe.COMPLETE,()=>{f.current}),Et.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>a}),[i,a]),Et.useEffect(()=>{f.current&&n(!0)},[]);const Z=Et.useCallback(()=>{u(!0),R&&R()},[]),z=Et.useCallback(()=>{o(!0)},[]),nt=Et.useCallback(D=>{e.onAnchorTransformationEnd&&e.onAnchorTransformationEnd(D),o(!1)},[]),V=le.withFilters(le.Container,{matrix:zr.filters.ColorMatrixFilter});return Vt.jsxs(le.Container,{ref:h,children:[Vt.jsxs(le.Container,{ref:f,position:[y,_],pivot:[y,_],width:b,height:m,scale:w,rotation:T,...!O&&v&&!i&&!P&&{interactive:!0,buttonMode:!0,pointerdown:A,pointerover:R,pointerout:L},children:[!M&&Vt.jsx(V,{scale:1,apply:({matrix:D})=>{x===Sn.BlackAndWhite?D.desaturate():x===Sn.Sepia?D.sepia():x===Sn.RetroVintage||x===Sn.NightVision?D.negative():x===Sn.Normal&&D.reset()},matrix:{enabled:!0,matrix:v_},children:Vt.jsx(le.Container,{ref:d,children:e.children})}),M&&Vt.jsx(le.Container,{ref:d,children:e.children}),!rl(E)&&E!==nl.NONE&&E!==nl.NORMAL&&Vt.jsx(p_,{overlay:E,width:b,height:m,x:y,y:_})]}),I&&v&&!q&&Vt.jsx(yy,{pixiTransformerRef:p,imageRef:f,isMounted:r,transformCommit:nt,transformChange:z,mouseoverEvent:Z,uniqueId:c,isText:C,onDoubleClick:F})]})});ni.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var Cn=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(Cn||{}),Fc=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Fc||{}),il=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(il||{}),Pt=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(Pt||{}),an=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(an||{}),bt=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(bt||{}),ii=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(ii||{}),Xt=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(Xt||{}),sl=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(sl||{}),Lr=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Lr||{}),Ji=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(Ji||{}),Rn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Rn||{}),ln=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(ln||{}),In=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(In||{}),ol=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(ol||{}),ar=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(ar||{}),Ee=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(Ee||{}),Te=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(Te||{}),Fr=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Fr||{});const Dt={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var al=/iPhone/i,Bc=/iPod/i,Dc=/iPad/i,Uc=/\biOS-universal(?:.+)Mac\b/i,ll=/\bAndroid(?:.+)Mobile\b/i,$c=/Android/i,si=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Vs=/Silk/i,Hr=/Windows Phone/i,Gc=/\bWindows(?:.+)ARM\b/i,jc=/BlackBerry/i,qc=/BB10/i,zc=/Opera Mini/i,Hc=/\b(CriOS|Chrome)(?:.+)Mobile/i,Vc=/Mobile(?:.+)Firefox\b/i,Wc=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function g_(e){return function(t){return t.test(e)}}function Xc(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var i=g_(r),o={apple:{phone:i(al)&&!i(Hr),ipod:i(Bc),tablet:!i(al)&&(i(Dc)||Wc(t))&&!i(Hr),universal:i(Uc),device:(i(al)||i(Bc)||i(Dc)||i(Uc)||Wc(t))&&!i(Hr)},amazon:{phone:i(si),tablet:!i(si)&&i(Vs),device:i(si)||i(Vs)},android:{phone:!i(Hr)&&i(si)||!i(Hr)&&i(ll),tablet:!i(Hr)&&!i(si)&&!i(ll)&&(i(Vs)||i($c)),device:!i(Hr)&&(i(si)||i(Vs)||i(ll)||i($c))||i(/\bokhttp\b/i)},windows:{phone:i(Hr),tablet:i(Gc),device:i(Hr)||i(Gc)},other:{blackberry:i(jc),blackberry10:i(qc),opera:i(zc),firefox:i(Vc),chrome:i(Hc),device:i(jc)||i(qc)||i(zc)||i(Vc)||i(Hc)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}const oi=(Xc.default??Xc)(globalThis.navigator);Dt.RETINA_PREFIX=/@([0-9\.]+)x/,Dt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Kc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,d){this.fn=f,this.context=h,this.once=d||!1}function o(f,h,d,p,c){if(typeof d!="function")throw new TypeError("The listener must be a function");var v=new i(d,p||f,c),y=r?r+h:h;return f._events[y]?f._events[y].fn?f._events[y]=[f._events[y],v]:f._events[y].push(v):(f._events[y]=v,f._eventsCount++),f}function a(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var h=[],d,p;if(this._eventsCount===0)return h;for(p in d=this._events)t.call(d,p)&&h.push(r?p.slice(1):p);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(d)):h},u.prototype.listeners=function(h){var d=r?r+h:h,p=this._events[d];if(!p)return[];if(p.fn)return[p.fn];for(var c=0,v=p.length,y=new Array(v);c<v;c++)y[c]=p[c].fn;return y},u.prototype.listenerCount=function(h){var d=r?r+h:h,p=this._events[d];return p?p.fn?1:p.length:0},u.prototype.emit=function(h,d,p,c,v,y){var _=r?r+h:h;if(!this._events[_])return!1;var b=this._events[_],m=arguments.length,w,T;if(b.fn){switch(b.once&&this.removeListener(h,b.fn,void 0,!0),m){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,p),!0;case 4:return b.fn.call(b.context,d,p,c),!0;case 5:return b.fn.call(b.context,d,p,c,v),!0;case 6:return b.fn.call(b.context,d,p,c,v,y),!0}for(T=1,w=new Array(m-1);T<m;T++)w[T-1]=arguments[T];b.fn.apply(b.context,w)}else{var x=b.length,E;for(T=0;T<x;T++)switch(b[T].once&&this.removeListener(h,b[T].fn,void 0,!0),m){case 1:b[T].fn.call(b[T].context);break;case 2:b[T].fn.call(b[T].context,d);break;case 3:b[T].fn.call(b[T].context,d,p);break;case 4:b[T].fn.call(b[T].context,d,p,c);break;default:if(!w)for(E=1,w=new Array(m-1);E<m;E++)w[E-1]=arguments[E];b[T].fn.apply(b[T].context,w)}}return!0},u.prototype.on=function(h,d,p){return o(this,h,d,p,!1)},u.prototype.once=function(h,d,p){return o(this,h,d,p,!0)},u.prototype.removeListener=function(h,d,p,c){var v=r?r+h:h;if(!this._events[v])return this;if(!d)return a(this,v),this;var y=this._events[v];if(y.fn)y.fn===d&&(!c||y.once)&&(!p||y.context===p)&&a(this,v);else{for(var _=0,b=[],m=y.length;_<m;_++)(y[_].fn!==d||c&&!y[_].once||p&&y[_].context!==p)&&b.push(y[_]);b.length?this._events[v]=b.length===1?b[0]:b:a(this,v)}return this},u.prototype.removeAllListeners=function(h){var d;return h?(d=r?r+h:h,this._events[d]&&a(this,d)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,e.exports=u})(Kc);var m_=Kc.exports;const Ws=En(m_);var ul={exports:{}};ul.exports=Xs,ul.exports.default=Xs;function Xs(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Yc(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;var u,f,h,d,p,c,v;if(n&&(o=w_(e,t,o,r)),e.length>80*r){u=h=e[0],f=d=e[1];for(var y=r;y<i;y+=r)p=e[y],c=e[y+1],p<u&&(u=p),c<f&&(f=c),p>h&&(h=p),c>d&&(d=c);v=Math.max(h-u,d-f),v=v!==0?32767/v:0}return ts(o,a,r,u,f,v,0),a}function Yc(e,t,r,n,i){var o,a;if(i===hl(e,t,r,n)>0)for(o=t;o<r;o+=n)a=Jc(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=Jc(o,e[o],e[o+1],a);return a&&Ks(a,a.next)&&(rs(a),a=a.next),a}function Pn(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Ks(r,r.next)||pe(r.prev,r,r.next)===0)){if(rs(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function ts(e,t,r,n,i,o,a){if(e){!a&&o&&O_(e,n,i,o);for(var u=e,f,h;e.prev!==e.next;){if(f=e.prev,h=e.next,o?__(e,n,i,o):y_(e)){t.push(f.i/r|0),t.push(e.i/r|0),t.push(h.i/r|0),rs(e),e=h.next,u=h.next;continue}if(e=h,e===u){a?a===1?(e=b_(Pn(e),t,r),ts(e,t,r,n,i,o,2)):a===2&&x_(e,t,r,n,i,o):ts(Pn(e),t,r,n,i,o,1);break}}}}function y_(e){var t=e.prev,r=e,n=e.next;if(pe(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,a=n.x,u=t.y,f=r.y,h=n.y,d=i<o?i<a?i:a:o<a?o:a,p=u<f?u<h?u:h:f<h?f:h,c=i>o?i>a?i:a:o>a?o:a,v=u>f?u>h?u:h:f>h?f:h,y=n.next;y!==t;){if(y.x>=d&&y.x<=c&&y.y>=p&&y.y<=v&&ai(i,u,o,f,a,h,y.x,y.y)&&pe(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function __(e,t,r,n){var i=e.prev,o=e,a=e.next;if(pe(i,o,a)>=0)return!1;for(var u=i.x,f=o.x,h=a.x,d=i.y,p=o.y,c=a.y,v=u<f?u<h?u:h:f<h?f:h,y=d<p?d<c?d:c:p<c?p:c,_=u>f?u>h?u:h:f>h?f:h,b=d>p?d>c?d:c:p>c?p:c,m=fl(v,y,t,r,n),w=fl(_,b,t,r,n),T=e.prevZ,x=e.nextZ;T&&T.z>=m&&x&&x.z<=w;){if(T.x>=v&&T.x<=_&&T.y>=y&&T.y<=b&&T!==i&&T!==a&&ai(u,d,f,p,h,c,T.x,T.y)&&pe(T.prev,T,T.next)>=0||(T=T.prevZ,x.x>=v&&x.x<=_&&x.y>=y&&x.y<=b&&x!==i&&x!==a&&ai(u,d,f,p,h,c,x.x,x.y)&&pe(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;T&&T.z>=m;){if(T.x>=v&&T.x<=_&&T.y>=y&&T.y<=b&&T!==i&&T!==a&&ai(u,d,f,p,h,c,T.x,T.y)&&pe(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;x&&x.z<=w;){if(x.x>=v&&x.x<=_&&x.y>=y&&x.y<=b&&x!==i&&x!==a&&ai(u,d,f,p,h,c,x.x,x.y)&&pe(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function b_(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Ks(i,o)&&Zc(i,n,n.next,o)&&es(i,o)&&es(o,i)&&(t.push(i.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),rs(n),rs(n.next),n=e=o),n=n.next}while(n!==e);return Pn(n)}function x_(e,t,r,n,i,o){var a=e;do{for(var u=a.next.next;u!==a.prev;){if(a.i!==u.i&&I_(a,u)){var f=Qc(a,u);a=Pn(a,a.next),f=Pn(f,f.next),ts(a,t,r,n,i,o,0),ts(f,t,r,n,i,o,0);return}u=u.next}a=a.next}while(a!==e)}function w_(e,t,r,n){var i=[],o,a,u,f,h;for(o=0,a=t.length;o<a;o++)u=t[o]*n,f=o<a-1?t[o+1]*n:e.length,h=Yc(e,u,f,n,!1),h===h.next&&(h.steiner=!0),i.push(R_(h));for(i.sort(T_),o=0;o<i.length;o++)r=E_(i[o],r);return r}function T_(e,t){return e.x-t.x}function E_(e,t){var r=S_(e,t);if(!r)return t;var n=Qc(r,e);return Pn(n,n.next),Pn(r,r.next)}function S_(e,t){var r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var u=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(u<=n&&u>o&&(o=u,a=r.x<r.next.x?r:r.next,u===n))return a}r=r.next}while(r!==t);if(!a)return null;var f=a,h=a.x,d=a.y,p=1/0,c;r=a;do n>=r.x&&r.x>=h&&n!==r.x&&ai(i<d?n:o,i,h,d,i<d?o:n,i,r.x,r.y)&&(c=Math.abs(i-r.y)/(n-r.x),es(r,e)&&(c<p||c===p&&(r.x>a.x||r.x===a.x&&A_(a,r)))&&(a=r,p=c)),r=r.next;while(r!==f);return a}function A_(e,t){return pe(e.prev,e,t.prev)<0&&pe(t.next,e,e.next)<0}function O_(e,t,r,n){var i=e;do i.z===0&&(i.z=fl(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,C_(i)}function C_(e){var t,r,n,i,o,a,u,f,h=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,u=0,t=0;t<h&&(u++,n=n.nextZ,!!n);t++);for(f=h;u>0||f>0&&n;)u!==0&&(f===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,u--):(i=n,n=n.nextZ,f--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,h*=2}while(a>1);return e}function fl(e,t,r,n,i){return e=(e-r)*i|0,t=(t-n)*i|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function R_(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function ai(e,t,r,n,i,o,a,u){return(i-a)*(t-u)>=(e-a)*(o-u)&&(e-a)*(n-u)>=(r-a)*(t-u)&&(r-a)*(o-u)>=(i-a)*(n-u)}function I_(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!P_(e,t)&&(es(e,t)&&es(t,e)&&N_(e,t)&&(pe(e.prev,e,t.prev)||pe(e,t.prev,t))||Ks(e,t)&&pe(e.prev,e,e.next)>0&&pe(t.prev,t,t.next)>0)}function pe(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Ks(e,t){return e.x===t.x&&e.y===t.y}function Zc(e,t,r,n){var i=Zs(pe(e,t,r)),o=Zs(pe(e,t,n)),a=Zs(pe(r,n,e)),u=Zs(pe(r,n,t));return!!(i!==o&&a!==u||i===0&&Ys(e,r,t)||o===0&&Ys(e,n,t)||a===0&&Ys(r,e,n)||u===0&&Ys(r,t,n))}function Ys(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function Zs(e){return e>0?1:e<0?-1:0}function P_(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&Zc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function es(e,t){return pe(e.prev,e,e.next)<0?pe(e,t,e.next)>=0&&pe(e,e.prev,t)>=0:pe(e,t,e.prev)<0||pe(e,e.next,t)<0}function N_(e,t){var r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Qc(e,t){var r=new cl(e.i,e.x,e.y),n=new cl(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function Jc(e,t,r,n){var i=new cl(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function rs(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function cl(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Xs.deviation=function(e,t,r,n){var i=t&&t.length,o=i?t[0]*r:e.length,a=Math.abs(hl(e,0,o,r));if(i)for(var u=0,f=t.length;u<f;u++){var h=t[u]*r,d=u<f-1?t[u+1]*r:e.length;a-=Math.abs(hl(e,h,d,r))}var p=0;for(u=0;u<n.length;u+=3){var c=n[u]*r,v=n[u+1]*r,y=n[u+2]*r;p+=Math.abs((e[c]-e[y])*(e[v+1]-e[c+1])-(e[c]-e[v])*(e[y+1]-e[c+1]))}return a===0&&p===0?0:Math.abs((p-a)/a)};function hl(e,t,r,n){for(var i=0,o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}Xs.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)r.vertices.push(e[i][o][a]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var M_=ul.exports;const k_=En(M_);var Qs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Qs.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,o=typeof Ye=="object"&&Ye;(o.global===o||o.window===o||o.self===o)&&(r=o);var a,u=2147483647,f=36,h=1,d=26,p=38,c=700,v=72,y=128,_="-",b=/^xn--/,m=/[^\x20-\x7E]/,w=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},x=f-h,E=Math.floor,I=String.fromCharCode,O;function A(D){throw new RangeError(T[D])}function L(D,k){for(var G=D.length,j=[];G--;)j[G]=k(D[G]);return j}function R(D,k){var G=D.split("@"),j="";G.length>1&&(j=G[0]+"@",D=G[1]),D=D.replace(w,".");var Q=D.split("."),K=L(Q,k).join(".");return j+K}function C(D){for(var k=[],G=0,j=D.length,Q,K;G<j;)Q=D.charCodeAt(G++),Q>=55296&&Q<=56319&&G<j?(K=D.charCodeAt(G++),(K&64512)==56320?k.push(((Q&1023)<<10)+(K&1023)+65536):(k.push(Q),G--)):k.push(Q);return k}function P(D){return L(D,function(k){var G="";return k>65535&&(k-=65536,G+=I(k>>>10&1023|55296),k=56320|k&1023),G+=I(k),G}).join("")}function M(D){return D-48<10?D-22:D-65<26?D-65:D-97<26?D-97:f}function F(D,k){return D+22+75*(D<26)-((k!=0)<<5)}function q(D,k,G){var j=0;for(D=G?E(D/c):D>>1,D+=E(D/k);D>x*d>>1;j+=f)D=E(D/x);return E(j+(x+1)*D/(D+p))}function Z(D){var k=[],G=D.length,j,Q=0,K=y,$=v,W,et,Y,rt,ot,pt,vt,_t,At;for(W=D.lastIndexOf(_),W<0&&(W=0),et=0;et<W;++et)D.charCodeAt(et)>=128&&A("not-basic"),k.push(D.charCodeAt(et));for(Y=W>0?W+1:0;Y<G;){for(rt=Q,ot=1,pt=f;Y>=G&&A("invalid-input"),vt=M(D.charCodeAt(Y++)),(vt>=f||vt>E((u-Q)/ot))&&A("overflow"),Q+=vt*ot,_t=pt<=$?h:pt>=$+d?d:pt-$,!(vt<_t);pt+=f)At=f-_t,ot>E(u/At)&&A("overflow"),ot*=At;j=k.length+1,$=q(Q-rt,j,rt==0),E(Q/j)>u-K&&A("overflow"),K+=E(Q/j),Q%=j,k.splice(Q++,0,K)}return P(k)}function z(D){var k,G,j,Q,K,$,W,et,Y,rt,ot,pt=[],vt,_t,At,ne;for(D=C(D),vt=D.length,k=y,G=0,K=v,$=0;$<vt;++$)ot=D[$],ot<128&&pt.push(I(ot));for(j=Q=pt.length,Q&&pt.push(_);j<vt;){for(W=u,$=0;$<vt;++$)ot=D[$],ot>=k&&ot<W&&(W=ot);for(_t=j+1,W-k>E((u-G)/_t)&&A("overflow"),G+=(W-k)*_t,k=W,$=0;$<vt;++$)if(ot=D[$],ot<k&&++G>u&&A("overflow"),ot==k){for(et=G,Y=f;rt=Y<=K?h:Y>=K+d?d:Y-K,!(et<rt);Y+=f)ne=et-rt,At=f-rt,pt.push(I(F(rt+ne%At,0))),et=E(ne/At);pt.push(I(F(et,0))),K=q(G,_t,j==Q),G=0,++j}++G,++k}return pt.join("")}function nt(D){return R(D,function(k){return b.test(k)?Z(k.slice(4).toLowerCase()):k})}function V(D){return R(D,function(k){return m.test(k)?"xn--"+z(k):k})}if(a={version:"1.4.1",ucs2:{decode:C,encode:P},decode:Z,encode:z,toASCII:V,toUnicode:nt},n&&i)if(e.exports==n)i.exports=a;else for(O in a)a.hasOwnProperty(O)&&(n[O]=a[O]);else r.punycode=a})(Ye)}(Qs,Qs.exports);var L_=Qs.exports,F_=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==i||a.enumerable!==!0)return!1}return!0},th=typeof Symbol<"u"&&Symbol,B_=F_,D_=function(){return typeof th!="function"||typeof Symbol!="function"||typeof th("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:B_()},eh={foo:{}},U_=Object,$_=function(){return{__proto__:eh}.foo===eh.foo&&!({__proto__:null}instanceof U_)},G_="Function.prototype.bind called on incompatible ",dl=Array.prototype.slice,j_=Object.prototype.toString,q_="[object Function]",z_=function(t){var r=this;if(typeof r!="function"||j_.call(r)!==q_)throw new TypeError(G_+r);for(var n=dl.call(arguments,1),i,o=function(){if(this instanceof i){var d=r.apply(this,n.concat(dl.call(arguments)));return Object(d)===d?d:this}else return r.apply(t,n.concat(dl.call(arguments)))},a=Math.max(0,r.length-n.length),u=[],f=0;f<a;f++)u.push("$"+f);if(i=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(o),r.prototype){var h=function(){};h.prototype=r.prototype,i.prototype=new h,h.prototype=null}return i},H_=z_,pl=Function.prototype.bind||H_,V_=pl,W_=V_.call(Function.call,Object.prototype.hasOwnProperty),Gt,li=SyntaxError,rh=Function,ui=TypeError,vl=function(e){try{return rh('"use strict"; return ('+e+").constructor;")()}catch{}},Nn=Object.getOwnPropertyDescriptor;if(Nn)try{Nn({},"")}catch{Nn=null}var gl=function(){throw new ui},X_=Nn?function(){try{return arguments.callee,gl}catch{try{return Nn(arguments,"callee").get}catch{return gl}}}():gl,fi=D_(),K_=$_(),Ce=Object.getPrototypeOf||(K_?function(e){return e.__proto__}:null),ci={},Y_=typeof Uint8Array>"u"||!Ce?Gt:Ce(Uint8Array),Mn={"%AggregateError%":typeof AggregateError>"u"?Gt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Gt:ArrayBuffer,"%ArrayIteratorPrototype%":fi&&Ce?Ce([][Symbol.iterator]()):Gt,"%AsyncFromSyncIteratorPrototype%":Gt,"%AsyncFunction%":ci,"%AsyncGenerator%":ci,"%AsyncGeneratorFunction%":ci,"%AsyncIteratorPrototype%":ci,"%Atomics%":typeof Atomics>"u"?Gt:Atomics,"%BigInt%":typeof BigInt>"u"?Gt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Gt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Gt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Gt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Gt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Gt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Gt:FinalizationRegistry,"%Function%":rh,"%GeneratorFunction%":ci,"%Int8Array%":typeof Int8Array>"u"?Gt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Gt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Gt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":fi&&Ce?Ce(Ce([][Symbol.iterator]())):Gt,"%JSON%":typeof JSON=="object"?JSON:Gt,"%Map%":typeof Map>"u"?Gt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!fi||!Ce?Gt:Ce(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Gt:Promise,"%Proxy%":typeof Proxy>"u"?Gt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Gt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Gt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!fi||!Ce?Gt:Ce(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Gt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fi&&Ce?Ce(""[Symbol.iterator]()):Gt,"%Symbol%":fi?Symbol:Gt,"%SyntaxError%":li,"%ThrowTypeError%":X_,"%TypedArray%":Y_,"%TypeError%":ui,"%Uint8Array%":typeof Uint8Array>"u"?Gt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Gt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Gt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Gt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Gt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Gt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Gt:WeakSet};if(Ce)try{null.error}catch(e){var Z_=Ce(Ce(e));Mn["%Error.prototype%"]=Z_}var Q_=function e(t){var r;if(t==="%AsyncFunction%")r=vl("async function () {}");else if(t==="%GeneratorFunction%")r=vl("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=vl("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Ce&&(r=Ce(i.prototype))}return Mn[t]=r,r},nh={"%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"]},ns=pl,Js=W_,J_=ns.call(Function.call,Array.prototype.concat),tb=ns.call(Function.apply,Array.prototype.splice),ih=ns.call(Function.call,String.prototype.replace),to=ns.call(Function.call,String.prototype.slice),eb=ns.call(Function.call,RegExp.prototype.exec),rb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,nb=/\\(\\)?/g,ib=function(t){var r=to(t,0,1),n=to(t,-1);if(r==="%"&&n!=="%")throw new li("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new li("invalid intrinsic syntax, expected opening `%`");var i=[];return ih(t,rb,function(o,a,u,f){i[i.length]=u?ih(f,nb,"$1"):a||o}),i},sb=function(t,r){var n=t,i;if(Js(nh,n)&&(i=nh[n],n="%"+i[0]+"%"),Js(Mn,n)){var o=Mn[n];if(o===ci&&(o=Q_(n)),typeof o>"u"&&!r)throw new ui("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new li("intrinsic "+t+" does not exist!")},ml=function(t,r){if(typeof t!="string"||t.length===0)throw new ui("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ui('"allowMissing" argument must be a boolean');if(eb(/^%?[^%]*%?$/,t)===null)throw new li("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ib(t),i=n.length>0?n[0]:"",o=sb("%"+i+"%",r),a=o.name,u=o.value,f=!1,h=o.alias;h&&(i=h[0],tb(n,J_([0,1],h)));for(var d=1,p=!0;d<n.length;d+=1){var c=n[d],v=to(c,0,1),y=to(c,-1);if((v==='"'||v==="'"||v==="`"||y==='"'||y==="'"||y==="`")&&v!==y)throw new li("property names with quotes must have matching quotes");if((c==="constructor"||!p)&&(f=!0),i+="."+c,a="%"+i+"%",Js(Mn,a))u=Mn[a];else if(u!=null){if(!(c in u)){if(!r)throw new ui("base intrinsic for "+t+" exists, but the property is not available.");return}if(Nn&&d+1>=n.length){var _=Nn(u,c);p=!!_,p&&"get"in _&&!("originalValue"in _.get)?u=_.get:u=u[c]}else p=Js(u,c),u=u[c];p&&!f&&(Mn[a]=u)}}return u},sh={exports:{}};(function(e){var t=pl,r=ml,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||t.call(i,n),a=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),f=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}e.exports=function(p){var c=o(t,i,arguments);if(a&&u){var v=a(c,"length");v.configurable&&u(c,"length",{value:1+f(0,p.length-(arguments.length-1))})}return c};var h=function(){return o(t,n,arguments)};u?u(e.exports,"apply",{value:h}):e.exports.apply=h})(sh);var ob=sh.exports,oh=ml,ah=ob,ab=ah(oh("String.prototype.indexOf")),lb=function(t,r){var n=oh(t,!!r);return typeof n=="function"&&ab(t,".prototype.")>-1?ah(n):n};const ub=uy(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var yl=typeof Map=="function"&&Map.prototype,_l=Object.getOwnPropertyDescriptor&&yl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,eo=yl&&_l&&typeof _l.get=="function"?_l.get:null,lh=yl&&Map.prototype.forEach,bl=typeof Set=="function"&&Set.prototype,xl=Object.getOwnPropertyDescriptor&&bl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ro=bl&&xl&&typeof xl.get=="function"?xl.get:null,uh=bl&&Set.prototype.forEach,fb=typeof WeakMap=="function"&&WeakMap.prototype,is=fb?WeakMap.prototype.has:null,cb=typeof WeakSet=="function"&&WeakSet.prototype,ss=cb?WeakSet.prototype.has:null,hb=typeof WeakRef=="function"&&WeakRef.prototype,fh=hb?WeakRef.prototype.deref:null,db=Boolean.prototype.valueOf,pb=Object.prototype.toString,vb=Function.prototype.toString,gb=String.prototype.match,wl=String.prototype.slice,un=String.prototype.replace,mb=String.prototype.toUpperCase,ch=String.prototype.toLowerCase,hh=RegExp.prototype.test,dh=Array.prototype.concat,Br=Array.prototype.join,yb=Array.prototype.slice,ph=Math.floor,Tl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,El=Object.getOwnPropertySymbols,Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,hi=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Le=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hi||"symbol")?Symbol.toStringTag:null,vh=Object.prototype.propertyIsEnumerable,gh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function mh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||hh.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ph(-e):ph(e);if(n!==e){var i=String(n),o=wl.call(t,i.length+1);return un.call(i,r,"$&_")+"."+un.call(un.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return un.call(t,r,"$&_")}var Al=ub,yh=Al.custom,_h=wh(yh)?yh:null,_b=function e(t,r,n,i){var o=r||{};if(fn(o,"quoteStyle")&&o.quoteStyle!=="single"&&o.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fn(o,"maxStringLength")&&(typeof o.maxStringLength=="number"?o.maxStringLength<0&&o.maxStringLength!==1/0:o.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=fn(o,"customInspect")?o.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fn(o,"indent")&&o.indent!==null&&o.indent!==" "&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fn(o,"numericSeparator")&&typeof o.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=o.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Eh(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var f=String(t);return u?mh(t,f):f}if(typeof t=="bigint"){var h=String(t)+"n";return u?mh(t,h):h}var d=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=d&&d>0&&typeof t=="object")return Ol(t)?"[Array]":"[Object]";var p=Bb(o,n);if(typeof i>"u")i=[];else if(Th(i,t)>=0)return"[Circular]";function c(M,F,q){if(F&&(i=yb.call(i),i.push(F)),q){var Z={depth:o.depth};return fn(o,"quoteStyle")&&(Z.quoteStyle=o.quoteStyle),e(M,Z,n+1,i)}return e(M,o,n+1,i)}if(typeof t=="function"&&!xh(t)){var v=Cb(t),y=no(t,c);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(y.length>0?" { "+Br.call(y,", ")+" }":"")}if(wh(t)){var _=hi?un.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Sl.call(t);return typeof t=="object"&&!hi?os(_):_}if(kb(t)){for(var b="<"+ch.call(String(t.nodeName)),m=t.attributes||[],w=0;w<m.length;w++)b+=" "+m[w].name+"="+bh(bb(m[w].value),"double",o);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+ch.call(String(t.nodeName))+">",b}if(Ol(t)){if(t.length===0)return"[]";var T=no(t,c);return p&&!Fb(T)?"["+Rl(T,p)+"]":"[ "+Br.call(T,", ")+" ]"}if(wb(t)){var x=no(t,c);return!("cause"in Error.prototype)&&"cause"in t&&!vh.call(t,"cause")?"{ ["+String(t)+"] "+Br.call(dh.call("[cause]: "+c(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Br.call(x,", ")+" }"}if(typeof t=="object"&&a){if(_h&&typeof t[_h]=="function"&&Al)return Al(t,{depth:d-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Rb(t)){var E=[];return lh&&lh.call(t,function(M,F){E.push(c(F,t,!0)+" => "+c(M,t))}),Sh("Map",eo.call(t),E,p)}if(Nb(t)){var I=[];return uh&&uh.call(t,function(M){I.push(c(M,t))}),Sh("Set",ro.call(t),I,p)}if(Ib(t))return Cl("WeakMap");if(Mb(t))return Cl("WeakSet");if(Pb(t))return Cl("WeakRef");if(Eb(t))return os(c(Number(t)));if(Ab(t))return os(c(Tl.call(t)));if(Sb(t))return os(db.call(t));if(Tb(t))return os(c(String(t)));if(!xb(t)&&!xh(t)){var O=no(t,c),A=gh?gh(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",R=!A&&Le&&Object(t)===t&&Le in t?wl.call(cn(t),8,-1):L?"Object":"",C=A||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",P=C+(R||L?"["+Br.call(dh.call([],R||[],L||[]),": ")+"] ":"");return O.length===0?P+"{}":p?P+"{"+Rl(O,p)+"}":P+"{ "+Br.call(O,", ")+" }"}return String(t)};function bh(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function bb(e){return un.call(String(e),/"/g,"&quot;")}function Ol(e){return cn(e)==="[object Array]"&&(!Le||!(typeof e=="object"&&Le in e))}function xb(e){return cn(e)==="[object Date]"&&(!Le||!(typeof e=="object"&&Le in e))}function xh(e){return cn(e)==="[object RegExp]"&&(!Le||!(typeof e=="object"&&Le in e))}function wb(e){return cn(e)==="[object Error]"&&(!Le||!(typeof e=="object"&&Le in e))}function Tb(e){return cn(e)==="[object String]"&&(!Le||!(typeof e=="object"&&Le in e))}function Eb(e){return cn(e)==="[object Number]"&&(!Le||!(typeof e=="object"&&Le in e))}function Sb(e){return cn(e)==="[object Boolean]"&&(!Le||!(typeof e=="object"&&Le in e))}function wh(e){if(hi)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Sl)return!1;try{return Sl.call(e),!0}catch{}return!1}function Ab(e){if(!e||typeof e!="object"||!Tl)return!1;try{return Tl.call(e),!0}catch{}return!1}var Ob=Object.prototype.hasOwnProperty||function(e){return e in this};function fn(e,t){return Ob.call(e,t)}function cn(e){return pb.call(e)}function Cb(e){if(e.name)return e.name;var t=gb.call(vb.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Th(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Rb(e){if(!eo||!e||typeof e!="object")return!1;try{eo.call(e);try{ro.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Ib(e){if(!is||!e||typeof e!="object")return!1;try{is.call(e,is);try{ss.call(e,ss)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function Pb(e){if(!fh||!e||typeof e!="object")return!1;try{return fh.call(e),!0}catch{}return!1}function Nb(e){if(!ro||!e||typeof e!="object")return!1;try{ro.call(e);try{eo.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Mb(e){if(!ss||!e||typeof e!="object")return!1;try{ss.call(e,ss);try{is.call(e,is)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function kb(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Eh(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Eh(wl.call(e,0,t.maxStringLength),t)+n}var i=un.call(un.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Lb);return bh(i,"single",t)}function Lb(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+mb.call(t.toString(16))}function os(e){return"Object("+e+")"}function Cl(e){return e+" { ? }"}function Sh(e,t,r,n){var i=n?Rl(r,n):Br.call(r,", ");return e+" ("+t+") {"+i+"}"}function Fb(e){for(var t=0;t<e.length;t++)if(Th(e[t],`
10
- `)>=0)return!1;return!0}function Bb(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Br.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Br.call(Array(t+1),r)}}function Rl(e,t){if(e.length===0)return"";var r=`
11
- `+t.prev+t.base;return r+Br.call(e,","+r)+`
12
- `+t.prev}function no(e,t){var r=Ol(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=fn(e,i)?t(e[i],e):""}var o=typeof El=="function"?El(e):[],a;if(hi){a={};for(var u=0;u<o.length;u++)a["$"+o[u]]=o[u]}for(var f in e)fn(e,f)&&(r&&String(Number(f))===f&&f<e.length||hi&&a["$"+f]instanceof Symbol||(hh.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if(typeof El=="function")for(var h=0;h<o.length;h++)vh.call(e,o[h])&&n.push("["+t(o[h])+"]: "+t(e[o[h]],e));return n}var Il=ml,di=lb,Db=_b,Ub=Il("%TypeError%"),io=Il("%WeakMap%",!0),so=Il("%Map%",!0),$b=di("WeakMap.prototype.get",!0),Gb=di("WeakMap.prototype.set",!0),jb=di("WeakMap.prototype.has",!0),qb=di("Map.prototype.get",!0),zb=di("Map.prototype.set",!0),Hb=di("Map.prototype.has",!0),Pl=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},Vb=function(e,t){var r=Pl(e,t);return r&&r.value},Wb=function(e,t,r){var n=Pl(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Xb=function(e,t){return!!Pl(e,t)},Kb=function(){var t,r,n,i={assert:function(o){if(!i.has(o))throw new Ub("Side channel does not contain "+Db(o))},get:function(o){if(io&&o&&(typeof o=="object"||typeof o=="function")){if(t)return $b(t,o)}else if(so){if(r)return qb(r,o)}else if(n)return Vb(n,o)},has:function(o){if(io&&o&&(typeof o=="object"||typeof o=="function")){if(t)return jb(t,o)}else if(so){if(r)return Hb(r,o)}else if(n)return Xb(n,o);return!1},set:function(o,a){io&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new io),Gb(t,o,a)):so?(r||(r=new so),zb(r,o,a)):(n||(n={key:{},next:null}),Wb(n,o,a))}};return i},Yb=String.prototype.replace,Zb=/%20/g,Nl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ml={default:Nl.RFC3986,formatters:{RFC1738:function(e){return Yb.call(e,Zb,"+")},RFC3986:function(e){return String(e)}},RFC1738:Nl.RFC1738,RFC3986:Nl.RFC3986},Qb=Ml,kl=Object.prototype.hasOwnProperty,kn=Array.isArray,Dr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Jb=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(kn(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]<"u"&&i.push(n[o]);r.obj[r.prop]=i}}},Ah=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},tx=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(kn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!kl.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return kn(t)&&!kn(r)&&(i=Ah(t,n)),kn(t)&&kn(r)?(r.forEach(function(o,a){if(kl.call(t,a)){var u=t[a];u&&typeof u=="object"&&o&&typeof o=="object"?t[a]=e(u,o,n):t.push(o)}else t[a]=o}),t):Object.keys(r).reduce(function(o,a){var u=r[a];return kl.call(o,a)?o[a]=e(o[a],u,n):o[a]=u,o},i)},ex=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},rx=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},nx=function(t,r,n,i,o){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),n==="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 u="",f=0;f<a.length;++f){var h=a.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||o===Qb.RFC1738&&(h===40||h===41)){u+=a.charAt(f);continue}if(h<128){u=u+Dr[h];continue}if(h<2048){u=u+(Dr[192|h>>6]+Dr[128|h&63]);continue}if(h<55296||h>=57344){u=u+(Dr[224|h>>12]+Dr[128|h>>6&63]+Dr[128|h&63]);continue}f+=1,h=65536+((h&1023)<<10|a.charCodeAt(f)&1023),u+=Dr[240|h>>18]+Dr[128|h>>12&63]+Dr[128|h>>6&63]+Dr[128|h&63]}return u},ix=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],a=o.obj[o.prop],u=Object.keys(a),f=0;f<u.length;++f){var h=u[f],d=a[h];typeof d=="object"&&d!==null&&n.indexOf(d)===-1&&(r.push({obj:a,prop:h}),n.push(d))}return Jb(r),t},sx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ox=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},ax=function(t,r){return[].concat(t,r)},lx=function(t,r){if(kn(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Oh={arrayToObject:Ah,assign:ex,combine:ax,compact:ix,decode:rx,encode:nx,isBuffer:ox,isRegExp:sx,maybeMap:lx,merge:tx},Ch=Kb,oo=Oh,as=Ml,ux=Object.prototype.hasOwnProperty,Rh={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Vr=Array.isArray,fx=Array.prototype.push,Ih=function(e,t){fx.apply(e,Vr(t)?t:[t])},cx=Date.prototype.toISOString,Ph=as.default,Fe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:oo.encode,encodeValuesOnly:!1,format:Ph,formatter:as.formatters[Ph],indices:!1,serializeDate:function(t){return cx.call(t)},skipNulls:!1,strictNullHandling:!1},hx=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ll={},dx=function e(t,r,n,i,o,a,u,f,h,d,p,c,v,y,_,b){for(var m=t,w=b,T=0,x=!1;(w=w.get(Ll))!==void 0&&!x;){var E=w.get(t);if(T+=1,typeof E<"u"){if(E===T)throw new RangeError("Cyclic object value");x=!0}typeof w.get(Ll)>"u"&&(T=0)}if(typeof f=="function"?m=f(r,m):m instanceof Date?m=p(m):n==="comma"&&Vr(m)&&(m=oo.maybeMap(m,function(Z){return Z instanceof Date?p(Z):Z})),m===null){if(o)return u&&!y?u(r,Fe.encoder,_,"key",c):r;m=""}if(hx(m)||oo.isBuffer(m)){if(u){var I=y?r:u(r,Fe.encoder,_,"key",c);return[v(I)+"="+v(u(m,Fe.encoder,_,"value",c))]}return[v(r)+"="+v(String(m))]}var O=[];if(typeof m>"u")return O;var A;if(n==="comma"&&Vr(m))y&&u&&(m=oo.maybeMap(m,u)),A=[{value:m.length>0?m.join(",")||null:void 0}];else if(Vr(f))A=f;else{var L=Object.keys(m);A=h?L.sort(h):L}for(var R=i&&Vr(m)&&m.length===1?r+"[]":r,C=0;C<A.length;++C){var P=A[C],M=typeof P=="object"&&typeof P.value<"u"?P.value:m[P];if(!(a&&M===null)){var F=Vr(m)?typeof n=="function"?n(R,P):R:R+(d?"."+P:"["+P+"]");b.set(t,T);var q=Ch();q.set(Ll,b),Ih(O,e(M,F,n,i,o,a,n==="comma"&&y&&Vr(m)?null:u,f,h,d,p,c,v,y,_,q))}}return O},px=function(t){if(!t)return Fe;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Fe.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=as.default;if(typeof t.format<"u"){if(!ux.call(as.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=as.formatters[n],o=Fe.filter;return(typeof t.filter=="function"||Vr(t.filter))&&(o=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Fe.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Fe.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Fe.charsetSentinel,delimiter:typeof t.delimiter>"u"?Fe.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Fe.encode,encoder:typeof t.encoder=="function"?t.encoder:Fe.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Fe.encodeValuesOnly,filter:o,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Fe.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Fe.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Fe.strictNullHandling}},vx=function(e,t){var r=e,n=px(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):Vr(n.filter)&&(o=n.filter,i=o);var a=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in Rh?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var f=Rh[u];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var h=f==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var d=Ch(),p=0;p<i.length;++p){var c=i[p];n.skipNulls&&r[c]===null||Ih(a,dx(r[c],c,f,h,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,d))}var v=a.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""},pi=Oh,Fl=Object.prototype.hasOwnProperty,gx=Array.isArray,Re={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:pi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},mx=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Nh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},yx="utf8=%26%2310003%3B",_x="utf8=%E2%9C%93",bx=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,a=i.split(r.delimiter,o),u=-1,f,h=r.charset;if(r.charsetSentinel)for(f=0;f<a.length;++f)a[f].indexOf("utf8=")===0&&(a[f]===_x?h="utf-8":a[f]===yx&&(h="iso-8859-1"),u=f,f=a.length);for(f=0;f<a.length;++f)if(f!==u){var d=a[f],p=d.indexOf("]="),c=p===-1?d.indexOf("="):p+1,v,y;c===-1?(v=r.decoder(d,Re.decoder,h,"key"),y=r.strictNullHandling?null:""):(v=r.decoder(d.slice(0,c),Re.decoder,h,"key"),y=pi.maybeMap(Nh(d.slice(c+1),r),function(_){return r.decoder(_,Re.decoder,h,"value")})),y&&r.interpretNumericEntities&&h==="iso-8859-1"&&(y=mx(y)),d.indexOf("[]=")>-1&&(y=gx(y)?[y]:y),Fl.call(n,v)?n[v]=pi.combine(n[v],y):n[v]=y}return n},xx=function(e,t,r,n){for(var i=n?t:Nh(t,r),o=e.length-1;o>=0;--o){var a,u=e[o];if(u==="[]"&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var f=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,h=parseInt(f,10);!r.parseArrays&&f===""?a={0:i}:!isNaN(h)&&u!==f&&String(h)===f&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(a=[],a[h]=i):f!=="__proto__"&&(a[f]=i)}i=a}return i},wx=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,f=n.depth>0&&a.exec(o),h=f?o.slice(0,f.index):o,d=[];if(h){if(!n.plainObjects&&Fl.call(Object.prototype,h)&&!n.allowPrototypes)return;d.push(h)}for(var p=0;n.depth>0&&(f=u.exec(o))!==null&&p<n.depth;){if(p+=1,!n.plainObjects&&Fl.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;d.push(f[1])}return f&&d.push("["+o.slice(f.index)+"]"),xx(d,r,n,i)}},Tx=function(t){if(!t)return Re;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Re.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Re.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Re.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Re.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Re.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Re.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Re.comma,decoder:typeof t.decoder=="function"?t.decoder:Re.decoder,delimiter:typeof t.delimiter=="string"||pi.isRegExp(t.delimiter)?t.delimiter:Re.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Re.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Re.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Re.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Re.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Re.strictNullHandling}},Ex=function(e,t){var r=Tx(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?bx(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),a=0;a<o.length;++a){var u=o[a],f=wx(u,n[u],r,typeof e=="string");i=pi.merge(i,f,r)}return r.allowSparse===!0?i:pi.compact(i)},Sx=vx,Ax=Ex,Ox=Ml,Cx={formats:Ox,parse:Ax,stringify:Sx},Rx=L_;function yr(){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 Ix=/^([a-z0-9.+-]+:)/i,Px=/:[0-9]*$/,Nx=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Mx=["<",">",'"',"`"," ","\r",`
13
- `," "],kx=["{","}","|","\\","^","`"].concat(Mx),Bl=["'"].concat(kx),Mh=["%","/","?",";","#"].concat(Bl),kh=["/","?","#"],Lx=255,Lh=/^[+a-z0-9A-Z_-]{0,63}$/,Fx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Bx={javascript:!0,"javascript:":!0},Dl={javascript:!0,"javascript:":!0},vi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Ul=Cx;function ao(e,t,r){if(e&&typeof e=="object"&&e instanceof yr)return e;var n=new yr;return n.parse(e,t,r),n}yr.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n<e.indexOf("#")?"?":"#",o=e.split(i),a=/\\/g;o[0]=o[0].replace(a,"/"),e=o.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=Nx.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=Ul.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=Ix.exec(u);if(h){h=h[0];var d=h.toLowerCase();this.protocol=d,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var p=u.substr(0,2)==="//";p&&!(h&&Dl[h])&&(u=u.substr(2),this.slashes=!0)}if(!Dl[h]&&(p||h&&!vi[h])){for(var c=-1,v=0;v<kh.length;v++){var y=u.indexOf(kh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}var _,b;c===-1?b=u.lastIndexOf("@"):b=u.lastIndexOf("@",c),b!==-1&&(_=u.slice(0,b),u=u.slice(b+1),this.auth=decodeURIComponent(_)),c=-1;for(var v=0;v<Mh.length;v++){var y=u.indexOf(Mh[v]);y!==-1&&(c===-1||y<c)&&(c=y)}c===-1&&(c=u.length),this.host=u.slice(0,c),u=u.slice(c),this.parseHost(),this.hostname=this.hostname||"";var m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m)for(var w=this.hostname.split(/\./),v=0,T=w.length;v<T;v++){var x=w[v];if(x&&!x.match(Lh)){for(var E="",I=0,O=x.length;I<O;I++)x.charCodeAt(I)>127?E+="x":E+=x[I];if(!E.match(Lh)){var A=w.slice(0,v),L=w.slice(v+1),R=x.match(Fx);R&&(A.push(R[1]),L.unshift(R[2])),L.length&&(u="/"+L.join(".")+u),this.hostname=A.join(".");break}}}this.hostname.length>Lx?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=Rx.toASCII(this.hostname));var C=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+C,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!Bx[d])for(var v=0,T=Bl.length;v<T;v++){var M=Bl[v];if(u.indexOf(M)!==-1){var F=encodeURIComponent(M);F===M&&(F=escape(M)),u=u.split(M).join(F)}}var q=u.indexOf("#");q!==-1&&(this.hash=u.substr(q),u=u.slice(0,q));var Z=u.indexOf("?");if(Z!==-1?(this.search=u.substr(Z),this.query=u.substr(Z+1),t&&(this.query=Ul.parse(this.query)),u=u.slice(0,Z)):t&&(this.search="",this.query={}),u&&(this.pathname=u),vi[d]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var C=this.pathname||"",z=this.search||"";this.path=C+z}return this.href=this.format(),this};function Dx(e){return typeof e=="string"&&(e=ao(e)),e instanceof yr?e.format():yr.prototype.format.call(e)}yr.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(o=Ul.stringify(this.query));var a=this.search||o&&"?"+o||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||vi[t])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),a&&a.charAt(0)!=="?"&&(a="?"+a),r=r.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),a=a.replace("#","%23"),t+i+r+a+n};function Ux(e,t){return ao(e,!1,!0).resolve(t)}yr.prototype.resolve=function(e){return this.resolveObject(ao(e,!1,!0)).format()},yr.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new yr;t.parse(e,!1,!0),e=t}for(var r=new yr,n=Object.keys(this),i=0;i<n.length;i++){var o=n[i];r[o]=this[o]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),u=0;u<a.length;u++){var f=a[u];f!=="protocol"&&(r[f]=e[f])}return vi[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!vi[e.protocol]){for(var h=Object.keys(e),d=0;d<h.length;d++){var p=h[d];r[p]=e[p]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Dl[e.protocol]){for(var T=(e.pathname||"").split("/");T.length&&!(e.host=T.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),T[0]!==""&&T.unshift(""),T.length<2&&T.unshift(""),r.pathname=T.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var c=r.pathname||"",v=r.search||"";r.path=c+v}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",_=e.host||e.pathname&&e.pathname.charAt(0)==="/",b=_||y||r.host&&e.pathname,m=b,w=r.pathname&&r.pathname.split("/")||[],T=e.pathname&&e.pathname.split("/")||[],x=r.protocol&&!vi[r.protocol];if(x&&(r.hostname="",r.port=null,r.host&&(w[0]===""?w[0]=r.host:w.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(T[0]===""?T[0]=e.host:T.unshift(e.host)),e.host=null),b=b&&(T[0]===""||w[0]==="")),_)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,w=T;else if(T.length)w||(w=[]),w.pop(),w=w.concat(T),r.search=e.search,r.query=e.query;else if(e.search!=null){if(x){r.host=w.shift(),r.hostname=r.host;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=w.slice(-1)[0],O=(r.host||e.host||w.length>1)&&(I==="."||I==="..")||I==="",A=0,L=w.length;L>=0;L--)I=w[L],I==="."?w.splice(L,1):I===".."?(w.splice(L,1),A++):A&&(w.splice(L,1),A--);if(!b&&!m)for(;A--;A)w.unshift("..");b&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),O&&w.join("/").substr(-1)!=="/"&&w.push("");var R=w[0]===""||w[0]&&w[0].charAt(0)==="/";if(x){r.hostname=R?"":w.length?w.shift():"",r.host=r.hostname;var E=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;E&&(r.auth=E.shift(),r.hostname=E.shift(),r.host=r.hostname)}return b=b||r.host&&w.length,b&&!R&&w.unshift(""),w.length>0?r.pathname=w.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=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},yr.prototype.parseHost=function(){var e=this.host,t=Px.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var $x=ao,Gx=Ux,jx=Dx;const qx={parse:$x,format:jx,resolve:Gx},Fh={};function Ht(e,t,r=3){if(Fh[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
9
+ */var av=W,ov=Symbol.for("react.element"),uv=Symbol.for("react.fragment"),lv=Object.prototype.hasOwnProperty,hv=av.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cv={key:!0,ref:!0,__self:!0,__source:!0};function uc(e,t,r){var n,s={},a=null,u=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(u=t.ref);for(n in t)lv.call(t,n)&&!cv.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:ov,type:e,key:a,ref:u,props:s,_owner:hv.current}}Ls.Fragment=uv,Ls.jsx=uc,Ls.jsxs=uc,oc.exports=Ls;var Mt=oc.exports,pn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(pn||{});let lc;function hc(){return lc=document.body,lc}function we(e,t,r){let n;return W.useEffect(()=>{n=n||hc();const s=a=>{const u=a.detail;t(u)};return n.addEventListener(e,s,!1),()=>{n==null||n.removeEventListener(e,s,!1)}},r),s=>{n=s}}function Vn(e,t){const r=hc(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function fv(){let e;function t(r){e=r}return t.emit=function(r,n){const s=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(s)},t}const gn=st.createContext({}),ue={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"},dv=({children:e})=>{const[t,r]=W.useState(0),n=W.useRef(),s=W.useRef(),a=W.useRef(.001),u=W.useRef(!1),l=W.useRef(!1);W.useLayoutEffect(()=>(s.current=oe.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&oe.killTweensOf(n.current),n.current=oe.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),oe.killTweensOf(n.current)),s.current.revert()}),[]);const c=W.useCallback(()=>{if(n.current){let I=n.current.time();I<a.current?u.current=!0:u.current=!1,a.current=I}},[]);W.useEffect(()=>{if(n.current){const w=n.current;w.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){w.pause(),c()}).eventCallback("onUpdate",function(){c()}).eventCallback("onComplete",function(){w.pause(),w.revert(),Vn(ue.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),c()})}},[]);const f=W.useCallback(()=>{n.current&&n.current.revert()},[]),p=W.useCallback(()=>{n.current&&n.current.restart()},[]),m=W.useCallback(()=>{if(n.current){const w=n.current;w.repeat(1),w.restart()}},[]),g=W.useCallback(w=>{n.current&&n.current.seek(w)},[]),x=W.useCallback(()=>{n.current&&n.current.seek(4)},[]),y=W.useCallback(()=>{const w=n.current;return w?w.totalDuration():0},[]),S=()=>{n.current&&(n.current.pause(),Vn(ue.PAUSE))},T=()=>{n.current&&(n.current.resume(),Vn(ue.RESUME))};return we(ue.SEEK_START,()=>{l.current=!0}),we(ue.SCRUBBER_PLAY,()=>{T()}),we(ue.SCRUBBER_PAUSE,()=>{S()}),we(ue.SCRUBBER_SEEK,w=>{g(w)}),we(ue.SEEK_END,()=>{l.current=!1}),we(ue.REVERSE_MODE_START,()=>{u.current=!0}),we(ue.REVERSE_MODE_END,()=>{u.current=!1}),we(ue.SCRUBBER_PROGRESS_UPDATE,w=>{}),Mt.jsx(gn.Provider,{value:{gsapCtx:s,tl:n,handlePlay:T,handlePause:S,handleReset:f,handleSeek:g,handleSeekTest:x,handleRestart:p,handleRepeat:m,playerTimeRef:a,getTimelineDuration:y,totalDuration:t,setTotalDuration:r,reverseModeRef:u,dragModeRef:l},children:e})},pv=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:s,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:c=!1})=>{const f=Fr.utils.string2hex("#F3C409"),p=Fr.utils.string2hex("#F3C409"),m=st.useRef({isDragging:!1}),g=300,x=st.useRef(0),y=st.useCallback(()=>{a&&!m.current.isDragging&&a(!0)},[a]),S=st.useCallback(()=>{a&&!m.current.isDragging&&a(!1)},[a]),T=st.useCallback(()=>{m.current.isDragging=!0;const A=new Date().getTime();A-x.current<g&&u&&u(),x.current=A},[]),w=st.useCallback(A=>{m.current.isDragging=!0,s&&s(A),Vn(ue.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[s]),I=st.useCallback(()=>{if(t.current===null)return;const A=t.current.x,R=t.current.y,N=t.current.width,B=t.current.height,L=t.current.rotation,O=[t.current.scale.x,t.current.scale.y],z=O[0]<0?-1:1,X=O[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(A),y:Math.round(R),width:Math.round(Math.max(5,N)),height:Math.round(Math.max(5,B)),rotation:L,scale:c?O:[z,X]}}),Vn(ue.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),m.current.isDragging=!1},[n]);return st.useEffect(()=>(e.current&&(e.current.on("mouseover",y),e.current.on("mouseout",S),e.current.on("mousedown",T)),()=>{e.current&&(e.current.off("mouseover",y),e.current.off("mouseout",S),e.current.off("mousedown",T))}),[]),Mt.jsx(nv.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:p},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:f,shape:"circle",radius:10},transformchange:w,transformcommit:I})};var gv=Object.prototype;function mv(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gv;return e===r}var cc=mv;function vv(e,t){return function(r){return e(t(r))}}var yv=vv,_v=yv,xv=_v(Object.keys,Object),bv=xv,Tv=cc,wv=bv,Sv=Object.prototype,Av=Sv.hasOwnProperty;function Cv(e){if(!Tv(e))return wv(e);var t=[];for(var r in Object(e))Av.call(e,r)&&r!="constructor"&&t.push(r);return t}var fc=Cv,Ev=typeof We=="object"&&We&&We.Object===Object&&We,dc=Ev,Iv=dc,Rv=typeof self=="object"&&self&&self.Object===Object&&self,Pv=Iv||Rv||Function("return this")(),Tr=Pv,Mv=Tr,Ov=Mv.Symbol,ks=Ov,pc=ks,gc=Object.prototype,Fv=gc.hasOwnProperty,Nv=gc.toString,Gi=pc?pc.toStringTag:void 0;function Lv(e){var t=Fv.call(e,Gi),r=e[Gi];try{e[Gi]=void 0;var n=!0}catch{}var s=Nv.call(e);return n&&(t?e[Gi]=r:delete e[Gi]),s}var kv=Lv,Bv=Object.prototype,Dv=Bv.toString;function Uv(e){return Dv.call(e)}var $v=Uv,mc=ks,Gv=kv,zv=$v,Hv="[object Null]",Vv="[object Undefined]",vc=mc?mc.toStringTag:void 0;function jv(e){return e==null?e===void 0?Vv:Hv:vc&&vc in Object(e)?Gv(e):zv(e)}var zi=jv;function Xv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hi=Xv,Wv=zi,qv=Hi,Yv="[object AsyncFunction]",Kv="[object Function]",Zv="[object GeneratorFunction]",Jv="[object Proxy]";function Qv(e){if(!qv(e))return!1;var t=Wv(e);return t==Kv||t==Zv||t==Yv||t==Jv}var yc=Qv,ty=Tr,ey=ty["__core-js_shared__"],ry=ey,$o=ry,_c=function(){var e=/[^.]+$/.exec($o&&$o.keys&&$o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ny(e){return!!_c&&_c in e}var iy=ny,sy=Function.prototype,ay=sy.toString;function oy(e){if(e!=null){try{return ay.call(e)}catch{}try{return e+""}catch{}}return""}var xc=oy,uy=yc,ly=iy,hy=Hi,cy=xc,fy=/[\\^$.*+?()[\]{}|]/g,dy=/^\[object .+?Constructor\]$/,py=Function.prototype,gy=Object.prototype,my=py.toString,vy=gy.hasOwnProperty,yy=RegExp("^"+my.call(vy).replace(fy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _y(e){if(!hy(e)||ly(e))return!1;var t=uy(e)?yy:dy;return t.test(cy(e))}var xy=_y;function by(e,t){return e==null?void 0:e[t]}var Ty=by,wy=xy,Sy=Ty;function Ay(e,t){var r=Sy(e,t);return wy(r)?r:void 0}var jn=Ay,Cy=jn,Ey=Tr,Iy=Cy(Ey,"DataView"),Ry=Iy,Py=jn,My=Tr,Oy=Py(My,"Map"),Go=Oy,Fy=jn,Ny=Tr,Ly=Fy(Ny,"Promise"),ky=Ly,By=jn,Dy=Tr,Uy=By(Dy,"Set"),$y=Uy,Gy=jn,zy=Tr,Hy=Gy(zy,"WeakMap"),Vy=Hy,zo=Ry,Ho=Go,Vo=ky,jo=$y,Xo=Vy,bc=zi,Xn=xc,Tc="[object Map]",jy="[object Object]",wc="[object Promise]",Sc="[object Set]",Ac="[object WeakMap]",Cc="[object DataView]",Xy=Xn(zo),Wy=Xn(Ho),qy=Xn(Vo),Yy=Xn(jo),Ky=Xn(Xo),mn=bc;(zo&&mn(new zo(new ArrayBuffer(1)))!=Cc||Ho&&mn(new Ho)!=Tc||Vo&&mn(Vo.resolve())!=wc||jo&&mn(new jo)!=Sc||Xo&&mn(new Xo)!=Ac)&&(mn=function(e){var t=bc(e),r=t==jy?e.constructor:void 0,n=r?Xn(r):"";if(n)switch(n){case Xy:return Cc;case Wy:return Tc;case qy:return wc;case Yy:return Sc;case Ky:return Ac}return t});var Ec=mn;function Zy(e){return e!=null&&typeof e=="object"}var Vi=Zy,Jy=zi,Qy=Vi,t_="[object Arguments]";function e_(e){return Qy(e)&&Jy(e)==t_}var r_=e_,Ic=r_,n_=Vi,Rc=Object.prototype,i_=Rc.hasOwnProperty,s_=Rc.propertyIsEnumerable,a_=Ic(function(){return arguments}())?Ic:function(e){return n_(e)&&i_.call(e,"callee")&&!s_.call(e,"callee")},Wo=a_,o_=Array.isArray,wr=o_,u_=9007199254740991;function l_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u_}var qo=l_,h_=yc,c_=qo;function f_(e){return e!=null&&c_(e.length)&&!h_(e)}var Bs=f_,Ds={exports:{}};function d_(){return!1}var p_=d_;Ds.exports,function(e,t){var r=Tr,n=p_,s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,u=a&&a.exports===s,l=u?r.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||n;e.exports=f}(Ds,Ds.exports);var Yo=Ds.exports,g_=zi,m_=qo,v_=Vi,y_="[object Arguments]",__="[object Array]",x_="[object Boolean]",b_="[object Date]",T_="[object Error]",w_="[object Function]",S_="[object Map]",A_="[object Number]",C_="[object Object]",E_="[object RegExp]",I_="[object Set]",R_="[object String]",P_="[object WeakMap]",M_="[object ArrayBuffer]",O_="[object DataView]",F_="[object Float32Array]",N_="[object Float64Array]",L_="[object Int8Array]",k_="[object Int16Array]",B_="[object Int32Array]",D_="[object Uint8Array]",U_="[object Uint8ClampedArray]",$_="[object Uint16Array]",G_="[object Uint32Array]",Kt={};Kt[F_]=Kt[N_]=Kt[L_]=Kt[k_]=Kt[B_]=Kt[D_]=Kt[U_]=Kt[$_]=Kt[G_]=!0,Kt[y_]=Kt[__]=Kt[M_]=Kt[x_]=Kt[O_]=Kt[b_]=Kt[T_]=Kt[w_]=Kt[S_]=Kt[A_]=Kt[C_]=Kt[E_]=Kt[I_]=Kt[R_]=Kt[P_]=!1;function z_(e){return v_(e)&&m_(e.length)&&!!Kt[g_(e)]}var H_=z_;function V_(e){return function(t){return e(t)}}var j_=V_,Us={exports:{}};Us.exports,function(e,t){var r=dc,n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===n,u=a&&r.process,l=function(){try{var c=s&&s.require&&s.require("util").types;return c||u&&u.binding&&u.binding("util")}catch{}}();e.exports=l}(Us,Us.exports);var X_=Us.exports,W_=H_,q_=j_,Pc=X_,Mc=Pc&&Pc.isTypedArray,Y_=Mc?q_(Mc):W_,Ko=Y_,K_=fc,Z_=Ec,J_=Wo,Q_=wr,tx=Bs,ex=Yo,rx=cc,nx=Ko,ix="[object Map]",sx="[object Set]",ax=Object.prototype,ox=ax.hasOwnProperty;function ux(e){if(e==null)return!0;if(tx(e)&&(Q_(e)||typeof e=="string"||typeof e.splice=="function"||ex(e)||nx(e)||J_(e)))return!e.length;var t=Z_(e);if(t==ix||t==sx)return!e.size;if(rx(e))return!K_(e).length;for(var r in e)if(ox.call(e,r))return!1;return!0}var lx=ux;const Zo=Hn(lx);var Jo=(e=>(e.NONE="none",e.NORMAL="normal",e.LENSFLARE="lensflare",e.FILMSTRIP="filmstrip",e.GRUNGE="grunge",e.BRICKS="bricks",e))(Jo||{});const Oc={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}},hx=e=>{const{overlay:t,width:r,height:n,x:s,y:a}=e,{src:u,blendmode:l}=Oc[t]||Oc.normal;return Mt.jsx(Yt.TilingSprite,{image:u,width:r,height:n,x:s,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},cx=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Wn=st.forwardRef((e,t)=>{const[r,n]=st.useState(!1),[s,a]=W.useState(!1),[u,l]=W.useState(!1),c=W.useRef(null),f=W.useRef(null),p=W.useRef(null),m=W.useRef(null),{uniqueId:g,visible:x,transformation:{x:y,y:S,width:T,height:w,scale:I=[1,1],rotation:A=0,effect:R,overlay:N},applyTransformer:B,disabled:L,pointerdown:O,pointerout:z,pointerover:X,isText:tt,isDragging:it,isGif:V,onDoubleClick:j,isTextEditMode:xt}=e;we(ue.COMPLETE,()=>{c.current}),st.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>s,getIsMouseOverTransformer:()=>u}),[s,u]),st.useEffect(()=>{c.current&&n(!0)},[]);const kt=st.useCallback(()=>{l(!0),X&&X()},[]),G=st.useCallback(()=>{a(!0)},[]),rt=st.useCallback(H=>{e.onAnchorTransformationEnd&&e.onAnchorTransformationEnd(H),a(!1)},[]),gt=Yt.withFilters(Yt.Container,{matrix:Fr.filters.ColorMatrixFilter});return Mt.jsxs(Yt.Container,{ref:f,children:[Mt.jsxs(Yt.Container,{ref:c,position:[y,S],pivot:[y,S],width:T,height:w,scale:I,rotation:A,...!L&&x&&!s&&!it&&{interactive:!0,buttonMode:!0,pointerdown:O,pointerover:X,pointerout:z},children:[!V&&Mt.jsx(gt,{scale:1,apply:({matrix:H})=>{R===pn.BlackAndWhite?H.desaturate():R===pn.Sepia?H.sepia():R===pn.RetroVintage||R===pn.NightVision?H.negative():R===pn.Normal&&H.reset()},matrix:{enabled:!0,matrix:cx},children:Mt.jsx(Yt.Container,{ref:p,children:e.children})}),V&&Mt.jsx(Yt.Container,{ref:p,children:e.children}),!Zo(N)&&N!==Jo.NONE&&N!==Jo.NORMAL&&Mt.jsx(hx,{overlay:N,width:T,height:w,x:y,y:S})]}),B&&x&&!xt&&Mt.jsx(pv,{pixiTransformerRef:m,imageRef:c,isMounted:r,transformCommit:rt,transformChange:G,mouseoverEvent:kt,uniqueId:g,isText:tt,onDoubleClick:j})]})});Wn.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var vn=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(vn||{}),Fc=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Fc||{}),Qo=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Qo||{}),ht=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(ht||{}),Kr=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Kr||{}),Z=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Z||{}),qn=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(qn||{}),Nt=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(Nt||{}),tu=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(tu||{}),Sr=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Sr||{}),ji=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(ji||{}),yn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(yn||{}),Zr=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(Zr||{}),_n=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(_n||{}),eu=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(eu||{}),qe=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(qe||{}),de=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(de||{}),fe=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(fe||{}),Ar=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Ar||{});const _t={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var ru=/iPhone/i,Nc=/iPod/i,Lc=/iPad/i,kc=/\biOS-universal(?:.+)Mac\b/i,nu=/\bAndroid(?:.+)Mobile\b/i,Bc=/Android/i,Yn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,$s=/Silk/i,Nr=/Windows Phone/i,Dc=/\bWindows(?:.+)ARM\b/i,Uc=/BlackBerry/i,$c=/BB10/i,Gc=/Opera Mini/i,zc=/\b(CriOS|Chrome)(?:.+)Mobile/i,Hc=/Mobile(?:.+)Firefox\b/i,Vc=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function fx(e){return function(t){return t.test(e)}}function jc(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var s=fx(r),a={apple:{phone:s(ru)&&!s(Nr),ipod:s(Nc),tablet:!s(ru)&&(s(Lc)||Vc(t))&&!s(Nr),universal:s(kc),device:(s(ru)||s(Nc)||s(Lc)||s(kc)||Vc(t))&&!s(Nr)},amazon:{phone:s(Yn),tablet:!s(Yn)&&s($s),device:s(Yn)||s($s)},android:{phone:!s(Nr)&&s(Yn)||!s(Nr)&&s(nu),tablet:!s(Nr)&&!s(Yn)&&!s(nu)&&(s($s)||s(Bc)),device:!s(Nr)&&(s(Yn)||s($s)||s(nu)||s(Bc))||s(/\bokhttp\b/i)},windows:{phone:s(Nr),tablet:s(Dc),device:s(Nr)||s(Dc)},other:{blackberry:s(Uc),blackberry10:s($c),opera:s(Gc),firefox:s(Hc),chrome:s(zc),device:s(Uc)||s($c)||s(Gc)||s(Hc)||s(zc)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}const Kn=(jc.default??jc)(globalThis.navigator);_t.RETINA_PREFIX=/@([0-9\.]+)x/,_t.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Xc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(c,f,p){this.fn=c,this.context=f,this.once=p||!1}function a(c,f,p,m,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new s(p,m||c,g),y=r?r+f:f;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],x]:c._events[y].push(x):(c._events[y]=x,c._eventsCount++),c}function u(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],p,m;if(this._eventsCount===0)return f;for(m in p=this._events)t.call(p,m)&&f.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},l.prototype.listeners=function(f){var p=r?r+f:f,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,x=m.length,y=new Array(x);g<x;g++)y[g]=m[g].fn;return y},l.prototype.listenerCount=function(f){var p=r?r+f:f,m=this._events[p];return m?m.fn?1:m.length:0},l.prototype.emit=function(f,p,m,g,x,y){var S=r?r+f:f;if(!this._events[S])return!1;var T=this._events[S],w=arguments.length,I,A;if(T.fn){switch(T.once&&this.removeListener(f,T.fn,void 0,!0),w){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,p),!0;case 3:return T.fn.call(T.context,p,m),!0;case 4:return T.fn.call(T.context,p,m,g),!0;case 5:return T.fn.call(T.context,p,m,g,x),!0;case 6:return T.fn.call(T.context,p,m,g,x,y),!0}for(A=1,I=new Array(w-1);A<w;A++)I[A-1]=arguments[A];T.fn.apply(T.context,I)}else{var R=T.length,N;for(A=0;A<R;A++)switch(T[A].once&&this.removeListener(f,T[A].fn,void 0,!0),w){case 1:T[A].fn.call(T[A].context);break;case 2:T[A].fn.call(T[A].context,p);break;case 3:T[A].fn.call(T[A].context,p,m);break;case 4:T[A].fn.call(T[A].context,p,m,g);break;default:if(!I)for(N=1,I=new Array(w-1);N<w;N++)I[N-1]=arguments[N];T[A].fn.apply(T[A].context,I)}}return!0},l.prototype.on=function(f,p,m){return a(this,f,p,m,!1)},l.prototype.once=function(f,p,m){return a(this,f,p,m,!0)},l.prototype.removeListener=function(f,p,m,g){var x=r?r+f:f;if(!this._events[x])return this;if(!p)return u(this,x),this;var y=this._events[x];if(y.fn)y.fn===p&&(!g||y.once)&&(!m||y.context===m)&&u(this,x);else{for(var S=0,T=[],w=y.length;S<w;S++)(y[S].fn!==p||g&&!y[S].once||m&&y[S].context!==m)&&T.push(y[S]);T.length?this._events[x]=T.length===1?T[0]:T:u(this,x)}return this},l.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,this._events[p]&&u(this,p)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(Xc);var dx=Xc.exports;const Gs=Hn(dx);var iu={exports:{}};iu.exports=zs,iu.exports.default=zs;function zs(e,t,r){r=r||2;var n=t&&t.length,s=n?t[0]*r:e.length,a=Wc(e,0,s,r,!0),u=[];if(!a||a.next===a.prev)return u;var l,c,f,p,m,g,x;if(n&&(a=yx(e,t,a,r)),e.length>80*r){l=f=e[0],c=p=e[1];for(var y=r;y<s;y+=r)m=e[y],g=e[y+1],m<l&&(l=m),g<c&&(c=g),m>f&&(f=m),g>p&&(p=g);x=Math.max(f-l,p-c),x=x!==0?32767/x:0}return Xi(a,u,r,l,c,x,0),u}function Wc(e,t,r,n,s){var a,u;if(s===ou(e,t,r,n)>0)for(a=t;a<r;a+=n)u=Kc(a,e[a],e[a+1],u);else for(a=r-n;a>=t;a-=n)u=Kc(a,e[a],e[a+1],u);return u&&Hs(u,u.next)&&(qi(u),u=u.next),u}function xn(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Hs(r,r.next)||re(r.prev,r,r.next)===0)){if(qi(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function Xi(e,t,r,n,s,a,u){if(e){!u&&a&&wx(e,n,s,a);for(var l=e,c,f;e.prev!==e.next;){if(c=e.prev,f=e.next,a?gx(e,n,s,a):px(e)){t.push(c.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),qi(e),e=f.next,l=f.next;continue}if(e=f,e===l){u?u===1?(e=mx(xn(e),t,r),Xi(e,t,r,n,s,a,2)):u===2&&vx(e,t,r,n,s,a):Xi(xn(e),t,r,n,s,a,1);break}}}}function px(e){var t=e.prev,r=e,n=e.next;if(re(t,r,n)>=0)return!1;for(var s=t.x,a=r.x,u=n.x,l=t.y,c=r.y,f=n.y,p=s<a?s<u?s:u:a<u?a:u,m=l<c?l<f?l:f:c<f?c:f,g=s>a?s>u?s:u:a>u?a:u,x=l>c?l>f?l:f:c>f?c:f,y=n.next;y!==t;){if(y.x>=p&&y.x<=g&&y.y>=m&&y.y<=x&&Zn(s,l,a,c,u,f,y.x,y.y)&&re(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function gx(e,t,r,n){var s=e.prev,a=e,u=e.next;if(re(s,a,u)>=0)return!1;for(var l=s.x,c=a.x,f=u.x,p=s.y,m=a.y,g=u.y,x=l<c?l<f?l:f:c<f?c:f,y=p<m?p<g?p:g:m<g?m:g,S=l>c?l>f?l:f:c>f?c:f,T=p>m?p>g?p:g:m>g?m:g,w=su(x,y,t,r,n),I=su(S,T,t,r,n),A=e.prevZ,R=e.nextZ;A&&A.z>=w&&R&&R.z<=I;){if(A.x>=x&&A.x<=S&&A.y>=y&&A.y<=T&&A!==s&&A!==u&&Zn(l,p,c,m,f,g,A.x,A.y)&&re(A.prev,A,A.next)>=0||(A=A.prevZ,R.x>=x&&R.x<=S&&R.y>=y&&R.y<=T&&R!==s&&R!==u&&Zn(l,p,c,m,f,g,R.x,R.y)&&re(R.prev,R,R.next)>=0))return!1;R=R.nextZ}for(;A&&A.z>=w;){if(A.x>=x&&A.x<=S&&A.y>=y&&A.y<=T&&A!==s&&A!==u&&Zn(l,p,c,m,f,g,A.x,A.y)&&re(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;R&&R.z<=I;){if(R.x>=x&&R.x<=S&&R.y>=y&&R.y<=T&&R!==s&&R!==u&&Zn(l,p,c,m,f,g,R.x,R.y)&&re(R.prev,R,R.next)>=0)return!1;R=R.nextZ}return!0}function mx(e,t,r){var n=e;do{var s=n.prev,a=n.next.next;!Hs(s,a)&&qc(s,n,n.next,a)&&Wi(s,a)&&Wi(a,s)&&(t.push(s.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),qi(n),qi(n.next),n=e=a),n=n.next}while(n!==e);return xn(n)}function vx(e,t,r,n,s,a){var u=e;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&Cx(u,l)){var c=Yc(u,l);u=xn(u,u.next),c=xn(c,c.next),Xi(u,t,r,n,s,a,0),Xi(c,t,r,n,s,a,0);return}l=l.next}u=u.next}while(u!==e)}function yx(e,t,r,n){var s=[],a,u,l,c,f;for(a=0,u=t.length;a<u;a++)l=t[a]*n,c=a<u-1?t[a+1]*n:e.length,f=Wc(e,l,c,n,!1),f===f.next&&(f.steiner=!0),s.push(Ax(f));for(s.sort(_x),a=0;a<s.length;a++)r=xx(s[a],r);return r}function _x(e,t){return e.x-t.x}function xx(e,t){var r=bx(e,t);if(!r)return t;var n=Yc(r,e);return xn(n,n.next),xn(r,r.next)}function bx(e,t){var r=t,n=e.x,s=e.y,a=-1/0,u;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){var l=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=n&&l>a&&(a=l,u=r.x<r.next.x?r:r.next,l===n))return u}r=r.next}while(r!==t);if(!u)return null;var c=u,f=u.x,p=u.y,m=1/0,g;r=u;do n>=r.x&&r.x>=f&&n!==r.x&&Zn(s<p?n:a,s,f,p,s<p?a:n,s,r.x,r.y)&&(g=Math.abs(s-r.y)/(n-r.x),Wi(r,e)&&(g<m||g===m&&(r.x>u.x||r.x===u.x&&Tx(u,r)))&&(u=r,m=g)),r=r.next;while(r!==c);return u}function Tx(e,t){return re(e.prev,e,t.prev)<0&&re(t.next,e,e.next)<0}function wx(e,t,r,n){var s=e;do s.z===0&&(s.z=su(s.x,s.y,t,r,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==e);s.prevZ.nextZ=null,s.prevZ=null,Sx(s)}function Sx(e){var t,r,n,s,a,u,l,c,f=1;do{for(r=e,e=null,a=null,u=0;r;){for(u++,n=r,l=0,t=0;t<f&&(l++,n=n.nextZ,!!n);t++);for(c=f;l>0||c>0&&n;)l!==0&&(c===0||!n||r.z<=n.z)?(s=r,r=r.nextZ,l--):(s=n,n=n.nextZ,c--),a?a.nextZ=s:e=s,s.prevZ=a,a=s;r=n}a.nextZ=null,f*=2}while(u>1);return e}function su(e,t,r,n,s){return e=(e-r)*s|0,t=(t-n)*s|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Ax(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function Zn(e,t,r,n,s,a,u,l){return(s-u)*(t-l)>=(e-u)*(a-l)&&(e-u)*(n-l)>=(r-u)*(t-l)&&(r-u)*(a-l)>=(s-u)*(n-l)}function Cx(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Ex(e,t)&&(Wi(e,t)&&Wi(t,e)&&Ix(e,t)&&(re(e.prev,e,t.prev)||re(e,t.prev,t))||Hs(e,t)&&re(e.prev,e,e.next)>0&&re(t.prev,t,t.next)>0)}function re(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Hs(e,t){return e.x===t.x&&e.y===t.y}function qc(e,t,r,n){var s=js(re(e,t,r)),a=js(re(e,t,n)),u=js(re(r,n,e)),l=js(re(r,n,t));return!!(s!==a&&u!==l||s===0&&Vs(e,r,t)||a===0&&Vs(e,n,t)||u===0&&Vs(r,e,n)||l===0&&Vs(r,t,n))}function Vs(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function js(e){return e>0?1:e<0?-1:0}function Ex(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&qc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Wi(e,t){return re(e.prev,e,e.next)<0?re(e,t,e.next)>=0&&re(e,e.prev,t)>=0:re(e,t,e.prev)<0||re(e,e.next,t)<0}function Ix(e,t){var r=e,n=!1,s=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&s<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Yc(e,t){var r=new au(e.i,e.x,e.y),n=new au(t.i,t.x,t.y),s=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=s,s.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Kc(e,t,r,n){var s=new au(e,t,r);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function qi(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function au(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}zs.deviation=function(e,t,r,n){var s=t&&t.length,a=s?t[0]*r:e.length,u=Math.abs(ou(e,0,a,r));if(s)for(var l=0,c=t.length;l<c;l++){var f=t[l]*r,p=l<c-1?t[l+1]*r:e.length;u-=Math.abs(ou(e,f,p,r))}var m=0;for(l=0;l<n.length;l+=3){var g=n[l]*r,x=n[l+1]*r,y=n[l+2]*r;m+=Math.abs((e[g]-e[y])*(e[x+1]-e[g+1])-(e[g]-e[x])*(e[y+1]-e[g+1]))}return u===0&&m===0?0:Math.abs((m-u)/u)};function ou(e,t,r,n){for(var s=0,a=t,u=r-n;a<r;a+=n)s+=(e[u]-e[a])*(e[a+1]+e[u+1]),u=a;return s}zs.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,s=0;s<e.length;s++){for(var a=0;a<e[s].length;a++)for(var u=0;u<t;u++)r.vertices.push(e[s][a][u]);s>0&&(n+=e[s-1].length,r.holes.push(n))}return r};var Rx=iu.exports;const Px=Hn(Rx);var Xs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Xs.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,s=e&&!e.nodeType&&e,a=typeof We=="object"&&We;(a.global===a||a.window===a||a.self===a)&&(r=a);var u,l=2147483647,c=36,f=1,p=26,m=38,g=700,x=72,y=128,S="-",T=/^xn--/,w=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=c-f,N=Math.floor,B=String.fromCharCode,L;function O(H){throw new RangeError(A[H])}function z(H,K){for(var ct=H.length,yt=[];ct--;)yt[ct]=K(H[ct]);return yt}function X(H,K){var ct=H.split("@"),yt="";ct.length>1&&(yt=ct[0]+"@",H=ct[1]),H=H.replace(I,".");var wt=H.split("."),Pt=z(wt,K).join(".");return yt+Pt}function tt(H){for(var K=[],ct=0,yt=H.length,wt,Pt;ct<yt;)wt=H.charCodeAt(ct++),wt>=55296&&wt<=56319&&ct<yt?(Pt=H.charCodeAt(ct++),(Pt&64512)==56320?K.push(((wt&1023)<<10)+(Pt&1023)+65536):(K.push(wt),ct--)):K.push(wt);return K}function it(H){return z(H,function(K){var ct="";return K>65535&&(K-=65536,ct+=B(K>>>10&1023|55296),K=56320|K&1023),ct+=B(K),ct}).join("")}function V(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:c}function j(H,K){return H+22+75*(H<26)-((K!=0)<<5)}function xt(H,K,ct){var yt=0;for(H=ct?N(H/g):H>>1,H+=N(H/K);H>R*p>>1;yt+=c)H=N(H/R);return N(yt+(R+1)*H/(H+m))}function kt(H){var K=[],ct=H.length,yt,wt=0,Pt=y,Ft=x,Vt,Ut,Zt,J,q,at,St,Et,Jt;for(Vt=H.lastIndexOf(S),Vt<0&&(Vt=0),Ut=0;Ut<Vt;++Ut)H.charCodeAt(Ut)>=128&&O("not-basic"),K.push(H.charCodeAt(Ut));for(Zt=Vt>0?Vt+1:0;Zt<ct;){for(J=wt,q=1,at=c;Zt>=ct&&O("invalid-input"),St=V(H.charCodeAt(Zt++)),(St>=c||St>N((l-wt)/q))&&O("overflow"),wt+=St*q,Et=at<=Ft?f:at>=Ft+p?p:at-Ft,!(St<Et);at+=c)Jt=c-Et,q>N(l/Jt)&&O("overflow"),q*=Jt;yt=K.length+1,Ft=xt(wt-J,yt,J==0),N(wt/yt)>l-Pt&&O("overflow"),Pt+=N(wt/yt),wt%=yt,K.splice(wt++,0,Pt)}return it(K)}function G(H){var K,ct,yt,wt,Pt,Ft,Vt,Ut,Zt,J,q,at=[],St,Et,Jt,gr;for(H=tt(H),St=H.length,K=y,ct=0,Pt=x,Ft=0;Ft<St;++Ft)q=H[Ft],q<128&&at.push(B(q));for(yt=wt=at.length,wt&&at.push(S);yt<St;){for(Vt=l,Ft=0;Ft<St;++Ft)q=H[Ft],q>=K&&q<Vt&&(Vt=q);for(Et=yt+1,Vt-K>N((l-ct)/Et)&&O("overflow"),ct+=(Vt-K)*Et,K=Vt,Ft=0;Ft<St;++Ft)if(q=H[Ft],q<K&&++ct>l&&O("overflow"),q==K){for(Ut=ct,Zt=c;J=Zt<=Pt?f:Zt>=Pt+p?p:Zt-Pt,!(Ut<J);Zt+=c)gr=Ut-J,Jt=c-J,at.push(B(j(J+gr%Jt,0))),Ut=N(gr/Jt);at.push(B(j(Ut,0))),Pt=xt(ct,Et,yt==wt),ct=0,++yt}++ct,++K}return at.join("")}function rt(H){return X(H,function(K){return T.test(K)?kt(K.slice(4).toLowerCase()):K})}function gt(H){return X(H,function(K){return w.test(K)?"xn--"+G(K):K})}if(u={version:"1.4.1",ucs2:{decode:tt,encode:it},decode:kt,encode:G,toASCII:gt,toUnicode:rt},n&&s)if(e.exports==n)s.exports=u;else for(L in u)u.hasOwnProperty(L)&&(n[L]=u[L]);else r.punycode=u})(We)}(Xs,Xs.exports);var Mx=Xs.exports,Ox=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;t[r]=s;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==s||u.enumerable!==!0)return!1}return!0},Zc=typeof Symbol<"u"&&Symbol,Fx=Ox,Nx=function(){return typeof Zc!="function"||typeof Symbol!="function"||typeof Zc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fx()},Jc={foo:{}},Lx=Object,kx=function(){return{__proto__:Jc}.foo===Jc.foo&&!({__proto__:null}instanceof Lx)},Bx="Function.prototype.bind called on incompatible ",uu=Array.prototype.slice,Dx=Object.prototype.toString,Ux="[object Function]",$x=function(t){var r=this;if(typeof r!="function"||Dx.call(r)!==Ux)throw new TypeError(Bx+r);for(var n=uu.call(arguments,1),s,a=function(){if(this instanceof s){var p=r.apply(this,n.concat(uu.call(arguments)));return Object(p)===p?p:this}else return r.apply(t,n.concat(uu.call(arguments)))},u=Math.max(0,r.length-n.length),l=[],c=0;c<u;c++)l.push("$"+c);if(s=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var f=function(){};f.prototype=r.prototype,s.prototype=new f,f.prototype=null}return s},Gx=$x,lu=Function.prototype.bind||Gx,zx=lu,Hx=zx.call(Function.call,Object.prototype.hasOwnProperty),Tt,Jn=SyntaxError,Qc=Function,Qn=TypeError,hu=function(e){try{return Qc('"use strict"; return ('+e+").constructor;")()}catch{}},bn=Object.getOwnPropertyDescriptor;if(bn)try{bn({},"")}catch{bn=null}var cu=function(){throw new Qn},Vx=bn?function(){try{return arguments.callee,cu}catch{try{return bn(arguments,"callee").get}catch{return cu}}}():cu,ti=Nx(),jx=kx(),me=Object.getPrototypeOf||(jx?function(e){return e.__proto__}:null),ei={},Xx=typeof Uint8Array>"u"||!me?Tt:me(Uint8Array),Tn={"%AggregateError%":typeof AggregateError>"u"?Tt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Tt:ArrayBuffer,"%ArrayIteratorPrototype%":ti&&me?me([][Symbol.iterator]()):Tt,"%AsyncFromSyncIteratorPrototype%":Tt,"%AsyncFunction%":ei,"%AsyncGenerator%":ei,"%AsyncGeneratorFunction%":ei,"%AsyncIteratorPrototype%":ei,"%Atomics%":typeof Atomics>"u"?Tt:Atomics,"%BigInt%":typeof BigInt>"u"?Tt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Tt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Tt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Tt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Tt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Tt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Tt:FinalizationRegistry,"%Function%":Qc,"%GeneratorFunction%":ei,"%Int8Array%":typeof Int8Array>"u"?Tt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Tt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Tt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ti&&me?me(me([][Symbol.iterator]())):Tt,"%JSON%":typeof JSON=="object"?JSON:Tt,"%Map%":typeof Map>"u"?Tt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ti||!me?Tt:me(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Tt:Promise,"%Proxy%":typeof Proxy>"u"?Tt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Tt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Tt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ti||!me?Tt:me(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Tt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ti&&me?me(""[Symbol.iterator]()):Tt,"%Symbol%":ti?Symbol:Tt,"%SyntaxError%":Jn,"%ThrowTypeError%":Vx,"%TypedArray%":Xx,"%TypeError%":Qn,"%Uint8Array%":typeof Uint8Array>"u"?Tt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Tt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Tt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Tt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Tt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Tt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Tt:WeakSet};if(me)try{null.error}catch(e){var Wx=me(me(e));Tn["%Error.prototype%"]=Wx}var qx=function e(t){var r;if(t==="%AsyncFunction%")r=hu("async function () {}");else if(t==="%GeneratorFunction%")r=hu("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=hu("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&me&&(r=me(s.prototype))}return Tn[t]=r,r},tf={"%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"]},Yi=lu,Ws=Hx,Yx=Yi.call(Function.call,Array.prototype.concat),Kx=Yi.call(Function.apply,Array.prototype.splice),ef=Yi.call(Function.call,String.prototype.replace),qs=Yi.call(Function.call,String.prototype.slice),Zx=Yi.call(Function.call,RegExp.prototype.exec),Jx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Qx=/\\(\\)?/g,t1=function(t){var r=qs(t,0,1),n=qs(t,-1);if(r==="%"&&n!=="%")throw new Jn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Jn("invalid intrinsic syntax, expected opening `%`");var s=[];return ef(t,Jx,function(a,u,l,c){s[s.length]=l?ef(c,Qx,"$1"):u||a}),s},e1=function(t,r){var n=t,s;if(Ws(tf,n)&&(s=tf[n],n="%"+s[0]+"%"),Ws(Tn,n)){var a=Tn[n];if(a===ei&&(a=qx(n)),typeof a>"u"&&!r)throw new Qn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:a}}throw new Jn("intrinsic "+t+" does not exist!")},fu=function(t,r){if(typeof t!="string"||t.length===0)throw new Qn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Qn('"allowMissing" argument must be a boolean');if(Zx(/^%?[^%]*%?$/,t)===null)throw new Jn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=t1(t),s=n.length>0?n[0]:"",a=e1("%"+s+"%",r),u=a.name,l=a.value,c=!1,f=a.alias;f&&(s=f[0],Kx(n,Yx([0,1],f)));for(var p=1,m=!0;p<n.length;p+=1){var g=n[p],x=qs(g,0,1),y=qs(g,-1);if((x==='"'||x==="'"||x==="`"||y==='"'||y==="'"||y==="`")&&x!==y)throw new Jn("property names with quotes must have matching quotes");if((g==="constructor"||!m)&&(c=!0),s+="."+g,u="%"+s+"%",Ws(Tn,u))l=Tn[u];else if(l!=null){if(!(g in l)){if(!r)throw new Qn("base intrinsic for "+t+" exists, but the property is not available.");return}if(bn&&p+1>=n.length){var S=bn(l,g);m=!!S,m&&"get"in S&&!("originalValue"in S.get)?l=S.get:l=l[g]}else m=Ws(l,g),l=l[g];m&&!c&&(Tn[u]=l)}}return l},rf={exports:{}};(function(e){var t=lu,r=fu,n=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(s,n),u=r("%Object.getOwnPropertyDescriptor%",!0),l=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(m){var g=a(t,s,arguments);if(u&&l){var x=u(g,"length");x.configurable&&l(g,"length",{value:1+c(0,m.length-(arguments.length-1))})}return g};var f=function(){return a(t,n,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f})(rf);var r1=rf.exports,nf=fu,sf=r1,n1=sf(nf("String.prototype.indexOf")),i1=function(t,r){var n=nf(t,!!r);return typeof n=="function"&&n1(t,".prototype.")>-1?sf(n):n};const s1=sv(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var du=typeof Map=="function"&&Map.prototype,pu=Object.getOwnPropertyDescriptor&&du?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ys=du&&pu&&typeof pu.get=="function"?pu.get:null,af=du&&Map.prototype.forEach,gu=typeof Set=="function"&&Set.prototype,mu=Object.getOwnPropertyDescriptor&&gu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ks=gu&&mu&&typeof mu.get=="function"?mu.get:null,of=gu&&Set.prototype.forEach,a1=typeof WeakMap=="function"&&WeakMap.prototype,Ki=a1?WeakMap.prototype.has:null,o1=typeof WeakSet=="function"&&WeakSet.prototype,Zi=o1?WeakSet.prototype.has:null,u1=typeof WeakRef=="function"&&WeakRef.prototype,uf=u1?WeakRef.prototype.deref:null,l1=Boolean.prototype.valueOf,h1=Object.prototype.toString,c1=Function.prototype.toString,f1=String.prototype.match,vu=String.prototype.slice,Jr=String.prototype.replace,d1=String.prototype.toUpperCase,lf=String.prototype.toLowerCase,hf=RegExp.prototype.test,cf=Array.prototype.concat,Cr=Array.prototype.join,p1=Array.prototype.slice,ff=Math.floor,yu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_u=Object.getOwnPropertySymbols,xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ri=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Se=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ri||"symbol")?Symbol.toStringTag:null,df=Object.prototype.propertyIsEnumerable,pf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function gf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||hf.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ff(-e):ff(e);if(n!==e){var s=String(n),a=vu.call(t,s.length+1);return Jr.call(s,r,"$&_")+"."+Jr.call(Jr.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Jr.call(t,r,"$&_")}var bu=s1,mf=bu.custom,vf=xf(mf)?mf:null,g1=function e(t,r,n,s){var a=r||{};if(Qr(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qr(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Qr(a,"customInspect")?a.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qr(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qr(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Tf(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?gf(t,c):c}if(typeof t=="bigint"){var f=String(t)+"n";return l?gf(t,f):f}var p=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof t=="object")return Tu(t)?"[Array]":"[Object]";var m=F1(a,n);if(typeof s>"u")s=[];else if(bf(s,t)>=0)return"[Circular]";function g(V,j,xt){if(j&&(s=p1.call(s),s.push(j)),xt){var kt={depth:a.depth};return Qr(a,"quoteStyle")&&(kt.quoteStyle=a.quoteStyle),e(V,kt,n+1,s)}return e(V,a,n+1,s)}if(typeof t=="function"&&!_f(t)){var x=S1(t),y=Zs(t,g);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(y.length>0?" { "+Cr.call(y,", ")+" }":"")}if(xf(t)){var S=ri?Jr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):xu.call(t);return typeof t=="object"&&!ri?Ji(S):S}if(P1(t)){for(var T="<"+lf.call(String(t.nodeName)),w=t.attributes||[],I=0;I<w.length;I++)T+=" "+w[I].name+"="+yf(m1(w[I].value),"double",a);return T+=">",t.childNodes&&t.childNodes.length&&(T+="..."),T+="</"+lf.call(String(t.nodeName))+">",T}if(Tu(t)){if(t.length===0)return"[]";var A=Zs(t,g);return m&&!O1(A)?"["+Su(A,m)+"]":"[ "+Cr.call(A,", ")+" ]"}if(y1(t)){var R=Zs(t,g);return!("cause"in Error.prototype)&&"cause"in t&&!df.call(t,"cause")?"{ ["+String(t)+"] "+Cr.call(cf.call("[cause]: "+g(t.cause),R),", ")+" }":R.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Cr.call(R,", ")+" }"}if(typeof t=="object"&&u){if(vf&&typeof t[vf]=="function"&&bu)return bu(t,{depth:p-n});if(u!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(A1(t)){var N=[];return af&&af.call(t,function(V,j){N.push(g(j,t,!0)+" => "+g(V,t))}),wf("Map",Ys.call(t),N,m)}if(I1(t)){var B=[];return of&&of.call(t,function(V){B.push(g(V,t))}),wf("Set",Ks.call(t),B,m)}if(C1(t))return wu("WeakMap");if(R1(t))return wu("WeakSet");if(E1(t))return wu("WeakRef");if(x1(t))return Ji(g(Number(t)));if(T1(t))return Ji(g(yu.call(t)));if(b1(t))return Ji(l1.call(t));if(_1(t))return Ji(g(String(t)));if(!v1(t)&&!_f(t)){var L=Zs(t,g),O=pf?pf(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",X=!O&&Se&&Object(t)===t&&Se in t?vu.call(tn(t),8,-1):z?"Object":"",tt=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",it=tt+(X||z?"["+Cr.call(cf.call([],X||[],z||[]),": ")+"] ":"");return L.length===0?it+"{}":m?it+"{"+Su(L,m)+"}":it+"{ "+Cr.call(L,", ")+" }"}return String(t)};function yf(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function m1(e){return Jr.call(String(e),/"/g,"&quot;")}function Tu(e){return tn(e)==="[object Array]"&&(!Se||!(typeof e=="object"&&Se in e))}function v1(e){return tn(e)==="[object Date]"&&(!Se||!(typeof e=="object"&&Se in e))}function _f(e){return tn(e)==="[object RegExp]"&&(!Se||!(typeof e=="object"&&Se in e))}function y1(e){return tn(e)==="[object Error]"&&(!Se||!(typeof e=="object"&&Se in e))}function _1(e){return tn(e)==="[object String]"&&(!Se||!(typeof e=="object"&&Se in e))}function x1(e){return tn(e)==="[object Number]"&&(!Se||!(typeof e=="object"&&Se in e))}function b1(e){return tn(e)==="[object Boolean]"&&(!Se||!(typeof e=="object"&&Se in e))}function xf(e){if(ri)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!xu)return!1;try{return xu.call(e),!0}catch{}return!1}function T1(e){if(!e||typeof e!="object"||!yu)return!1;try{return yu.call(e),!0}catch{}return!1}var w1=Object.prototype.hasOwnProperty||function(e){return e in this};function Qr(e,t){return w1.call(e,t)}function tn(e){return h1.call(e)}function S1(e){if(e.name)return e.name;var t=f1.call(c1.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function bf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function A1(e){if(!Ys||!e||typeof e!="object")return!1;try{Ys.call(e);try{Ks.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function C1(e){if(!Ki||!e||typeof e!="object")return!1;try{Ki.call(e,Ki);try{Zi.call(e,Zi)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function E1(e){if(!uf||!e||typeof e!="object")return!1;try{return uf.call(e),!0}catch{}return!1}function I1(e){if(!Ks||!e||typeof e!="object")return!1;try{Ks.call(e);try{Ys.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function R1(e){if(!Zi||!e||typeof e!="object")return!1;try{Zi.call(e,Zi);try{Ki.call(e,Ki)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function P1(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Tf(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Tf(vu.call(e,0,t.maxStringLength),t)+n}var s=Jr.call(Jr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,M1);return yf(s,"single",t)}function M1(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+d1.call(t.toString(16))}function Ji(e){return"Object("+e+")"}function wu(e){return e+" { ? }"}function wf(e,t,r,n){var s=n?Su(r,n):Cr.call(r,", ");return e+" ("+t+") {"+s+"}"}function O1(e){for(var t=0;t<e.length;t++)if(bf(e[t],`
10
+ `)>=0)return!1;return!0}function F1(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Cr.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Cr.call(Array(t+1),r)}}function Su(e,t){if(e.length===0)return"";var r=`
11
+ `+t.prev+t.base;return r+Cr.call(e,","+r)+`
12
+ `+t.prev}function Zs(e,t){var r=Tu(e),n=[];if(r){n.length=e.length;for(var s=0;s<e.length;s++)n[s]=Qr(e,s)?t(e[s],e):""}var a=typeof _u=="function"?_u(e):[],u;if(ri){u={};for(var l=0;l<a.length;l++)u["$"+a[l]]=a[l]}for(var c in e)Qr(e,c)&&(r&&String(Number(c))===c&&c<e.length||ri&&u["$"+c]instanceof Symbol||(hf.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof _u=="function")for(var f=0;f<a.length;f++)df.call(e,a[f])&&n.push("["+t(a[f])+"]: "+t(e[a[f]],e));return n}var Au=fu,ni=i1,N1=g1,L1=Au("%TypeError%"),Js=Au("%WeakMap%",!0),Qs=Au("%Map%",!0),k1=ni("WeakMap.prototype.get",!0),B1=ni("WeakMap.prototype.set",!0),D1=ni("WeakMap.prototype.has",!0),U1=ni("Map.prototype.get",!0),$1=ni("Map.prototype.set",!0),G1=ni("Map.prototype.has",!0),Cu=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},z1=function(e,t){var r=Cu(e,t);return r&&r.value},H1=function(e,t,r){var n=Cu(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},V1=function(e,t){return!!Cu(e,t)},j1=function(){var t,r,n,s={assert:function(a){if(!s.has(a))throw new L1("Side channel does not contain "+N1(a))},get:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(t)return k1(t,a)}else if(Qs){if(r)return U1(r,a)}else if(n)return z1(n,a)},has:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(t)return D1(t,a)}else if(Qs){if(r)return G1(r,a)}else if(n)return V1(n,a);return!1},set:function(a,u){Js&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Js),B1(t,a,u)):Qs?(r||(r=new Qs),$1(r,a,u)):(n||(n={key:{},next:null}),H1(n,a,u))}};return s},X1=String.prototype.replace,W1=/%20/g,Eu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Iu={default:Eu.RFC3986,formatters:{RFC1738:function(e){return X1.call(e,W1,"+")},RFC3986:function(e){return String(e)}},RFC1738:Eu.RFC1738,RFC3986:Eu.RFC3986},q1=Iu,Ru=Object.prototype.hasOwnProperty,wn=Array.isArray,Er=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Y1=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(wn(n)){for(var s=[],a=0;a<n.length;++a)typeof n[a]<"u"&&s.push(n[a]);r.obj[r.prop]=s}}},Sf=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},s=0;s<t.length;++s)typeof t[s]<"u"&&(n[s]=t[s]);return n},K1=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(wn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ru.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var s=t;return wn(t)&&!wn(r)&&(s=Sf(t,n)),wn(t)&&wn(r)?(r.forEach(function(a,u){if(Ru.call(t,u)){var l=t[u];l&&typeof l=="object"&&a&&typeof a=="object"?t[u]=e(l,a,n):t.push(a)}else t[u]=a}),t):Object.keys(r).reduce(function(a,u){var l=r[u];return Ru.call(a,u)?a[u]=e(a[u],l,n):a[u]=l,a},s)},Z1=function(t,r){return Object.keys(r).reduce(function(n,s){return n[s]=r[s],n},t)},J1=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Q1=function(t,r,n,s,a){if(t.length===0)return t;var u=t;if(typeof t=="symbol"?u=Symbol.prototype.toString.call(t):typeof t!="string"&&(u=String(t)),n==="iso-8859-1")return escape(u).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var l="",c=0;c<u.length;++c){var f=u.charCodeAt(c);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===q1.RFC1738&&(f===40||f===41)){l+=u.charAt(c);continue}if(f<128){l=l+Er[f];continue}if(f<2048){l=l+(Er[192|f>>6]+Er[128|f&63]);continue}if(f<55296||f>=57344){l=l+(Er[224|f>>12]+Er[128|f>>6&63]+Er[128|f&63]);continue}c+=1,f=65536+((f&1023)<<10|u.charCodeAt(c)&1023),l+=Er[240|f>>18]+Er[128|f>>12&63]+Er[128|f>>6&63]+Er[128|f&63]}return l},tb=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],s=0;s<r.length;++s)for(var a=r[s],u=a.obj[a.prop],l=Object.keys(u),c=0;c<l.length;++c){var f=l[c],p=u[f];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(r.push({obj:u,prop:f}),n.push(p))}return Y1(r),t},eb=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},rb=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},nb=function(t,r){return[].concat(t,r)},ib=function(t,r){if(wn(t)){for(var n=[],s=0;s<t.length;s+=1)n.push(r(t[s]));return n}return r(t)},Af={arrayToObject:Sf,assign:Z1,combine:nb,compact:tb,decode:J1,encode:Q1,isBuffer:rb,isRegExp:eb,maybeMap:ib,merge:K1},Cf=j1,ta=Af,Qi=Iu,sb=Object.prototype.hasOwnProperty,Ef={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Lr=Array.isArray,ab=Array.prototype.push,If=function(e,t){ab.apply(e,Lr(t)?t:[t])},ob=Date.prototype.toISOString,Rf=Qi.default,Ae={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ta.encode,encodeValuesOnly:!1,format:Rf,formatter:Qi.formatters[Rf],indices:!1,serializeDate:function(t){return ob.call(t)},skipNulls:!1,strictNullHandling:!1},ub=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Pu={},lb=function e(t,r,n,s,a,u,l,c,f,p,m,g,x,y,S,T){for(var w=t,I=T,A=0,R=!1;(I=I.get(Pu))!==void 0&&!R;){var N=I.get(t);if(A+=1,typeof N<"u"){if(N===A)throw new RangeError("Cyclic object value");R=!0}typeof I.get(Pu)>"u"&&(A=0)}if(typeof c=="function"?w=c(r,w):w instanceof Date?w=m(w):n==="comma"&&Lr(w)&&(w=ta.maybeMap(w,function(kt){return kt instanceof Date?m(kt):kt})),w===null){if(a)return l&&!y?l(r,Ae.encoder,S,"key",g):r;w=""}if(ub(w)||ta.isBuffer(w)){if(l){var B=y?r:l(r,Ae.encoder,S,"key",g);return[x(B)+"="+x(l(w,Ae.encoder,S,"value",g))]}return[x(r)+"="+x(String(w))]}var L=[];if(typeof w>"u")return L;var O;if(n==="comma"&&Lr(w))y&&l&&(w=ta.maybeMap(w,l)),O=[{value:w.length>0?w.join(",")||null:void 0}];else if(Lr(c))O=c;else{var z=Object.keys(w);O=f?z.sort(f):z}for(var X=s&&Lr(w)&&w.length===1?r+"[]":r,tt=0;tt<O.length;++tt){var it=O[tt],V=typeof it=="object"&&typeof it.value<"u"?it.value:w[it];if(!(u&&V===null)){var j=Lr(w)?typeof n=="function"?n(X,it):X:X+(p?"."+it:"["+it+"]");T.set(t,A);var xt=Cf();xt.set(Pu,T),If(L,e(V,j,n,s,a,u,n==="comma"&&y&&Lr(w)?null:l,c,f,p,m,g,x,y,S,xt))}}return L},hb=function(t){if(!t)return Ae;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Ae.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Qi.default;if(typeof t.format<"u"){if(!sb.call(Qi.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var s=Qi.formatters[n],a=Ae.filter;return(typeof t.filter=="function"||Lr(t.filter))&&(a=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ae.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Ae.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ae.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ae.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ae.encode,encoder:typeof t.encoder=="function"?t.encoder:Ae.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ae.encodeValuesOnly,filter:a,format:n,formatter:s,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ae.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ae.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ae.strictNullHandling}},cb=function(e,t){var r=e,n=hb(t),s,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Lr(n.filter)&&(a=n.filter,s=a);var u=[];if(typeof r!="object"||r===null)return"";var l;t&&t.arrayFormat in Ef?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=Ef[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=c==="comma"&&t&&t.commaRoundTrip;s||(s=Object.keys(r)),n.sort&&s.sort(n.sort);for(var p=Cf(),m=0;m<s.length;++m){var g=s[m];n.skipNulls&&r[g]===null||If(u,lb(r[g],g,c,f,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var x=u.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),x.length>0?y+x:""},ii=Af,Mu=Object.prototype.hasOwnProperty,fb=Array.isArray,ve={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ii.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},db=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Pf=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},pb="utf8=%26%2310003%3B",gb="utf8=%E2%9C%93",mb=function(t,r){var n={__proto__:null},s=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=r.parameterLimit===1/0?void 0:r.parameterLimit,u=s.split(r.delimiter,a),l=-1,c,f=r.charset;if(r.charsetSentinel)for(c=0;c<u.length;++c)u[c].indexOf("utf8=")===0&&(u[c]===gb?f="utf-8":u[c]===pb&&(f="iso-8859-1"),l=c,c=u.length);for(c=0;c<u.length;++c)if(c!==l){var p=u[c],m=p.indexOf("]="),g=m===-1?p.indexOf("="):m+1,x,y;g===-1?(x=r.decoder(p,ve.decoder,f,"key"),y=r.strictNullHandling?null:""):(x=r.decoder(p.slice(0,g),ve.decoder,f,"key"),y=ii.maybeMap(Pf(p.slice(g+1),r),function(S){return r.decoder(S,ve.decoder,f,"value")})),y&&r.interpretNumericEntities&&f==="iso-8859-1"&&(y=db(y)),p.indexOf("[]=")>-1&&(y=fb(y)?[y]:y),Mu.call(n,x)?n[x]=ii.combine(n[x],y):n[x]=y}return n},vb=function(e,t,r,n){for(var s=n?t:Pf(t,r),a=e.length-1;a>=0;--a){var u,l=e[a];if(l==="[]"&&r.parseArrays)u=[].concat(s);else{u=r.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,f=parseInt(c,10);!r.parseArrays&&c===""?u={0:s}:!isNaN(f)&&l!==c&&String(f)===c&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(u=[],u[f]=s):c!=="__proto__"&&(u[c]=s)}s=u}return s},yb=function(t,r,n,s){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,u=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=n.depth>0&&u.exec(a),f=c?a.slice(0,c.index):a,p=[];if(f){if(!n.plainObjects&&Mu.call(Object.prototype,f)&&!n.allowPrototypes)return;p.push(f)}for(var m=0;n.depth>0&&(c=l.exec(a))!==null&&m<n.depth;){if(m+=1,!n.plainObjects&&Mu.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;p.push(c[1])}return c&&p.push("["+a.slice(c.index)+"]"),vb(p,r,n,s)}},_b=function(t){if(!t)return ve;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?ve.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?ve.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ve.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ve.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ve.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ve.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ve.comma,decoder:typeof t.decoder=="function"?t.decoder:ve.decoder,delimiter:typeof t.delimiter=="string"||ii.isRegExp(t.delimiter)?t.delimiter:ve.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ve.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ve.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ve.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ve.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ve.strictNullHandling}},xb=function(e,t){var r=_b(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?mb(e,r):e,s=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],c=yb(l,n[l],r,typeof e=="string");s=ii.merge(s,c,r)}return r.allowSparse===!0?s:ii.compact(s)},bb=cb,Tb=xb,wb=Iu,Sb={formats:wb,parse:Tb,stringify:bb},Ab=Mx;function ir(){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 Cb=/^([a-z0-9.+-]+:)/i,Eb=/:[0-9]*$/,Ib=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Rb=["<",">",'"',"`"," ","\r",`
13
+ `," "],Pb=["{","}","|","\\","^","`"].concat(Rb),Ou=["'"].concat(Pb),Mf=["%","/","?",";","#"].concat(Ou),Of=["/","?","#"],Mb=255,Ff=/^[+a-z0-9A-Z_-]{0,63}$/,Ob=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Fb={javascript:!0,"javascript:":!0},Fu={javascript:!0,"javascript:":!0},si={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Nu=Sb;function ea(e,t,r){if(e&&typeof e=="object"&&e instanceof ir)return e;var n=new ir;return n.parse(e,t,r),n}ir.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),s=n!==-1&&n<e.indexOf("#")?"?":"#",a=e.split(s),u=/\\/g;a[0]=a[0].replace(u,"/"),e=a.join(s);var l=e;if(l=l.trim(),!r&&e.split("#").length===1){var c=Ib.exec(l);if(c)return this.path=l,this.href=l,this.pathname=c[1],c[2]?(this.search=c[2],t?this.query=Nu.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=Cb.exec(l);if(f){f=f[0];var p=f.toLowerCase();this.protocol=p,l=l.substr(f.length)}if(r||f||l.match(/^\/\/[^@/]+@[^@/]+/)){var m=l.substr(0,2)==="//";m&&!(f&&Fu[f])&&(l=l.substr(2),this.slashes=!0)}if(!Fu[f]&&(m||f&&!si[f])){for(var g=-1,x=0;x<Of.length;x++){var y=l.indexOf(Of[x]);y!==-1&&(g===-1||y<g)&&(g=y)}var S,T;g===-1?T=l.lastIndexOf("@"):T=l.lastIndexOf("@",g),T!==-1&&(S=l.slice(0,T),l=l.slice(T+1),this.auth=decodeURIComponent(S)),g=-1;for(var x=0;x<Mf.length;x++){var y=l.indexOf(Mf[x]);y!==-1&&(g===-1||y<g)&&(g=y)}g===-1&&(g=l.length),this.host=l.slice(0,g),l=l.slice(g),this.parseHost(),this.hostname=this.hostname||"";var w=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!w)for(var I=this.hostname.split(/\./),x=0,A=I.length;x<A;x++){var R=I[x];if(R&&!R.match(Ff)){for(var N="",B=0,L=R.length;B<L;B++)R.charCodeAt(B)>127?N+="x":N+=R[B];if(!N.match(Ff)){var O=I.slice(0,x),z=I.slice(x+1),X=R.match(Ob);X&&(O.push(X[1]),z.unshift(X[2])),z.length&&(l="/"+z.join(".")+l),this.hostname=O.join(".");break}}}this.hostname.length>Mb?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=Ab.toASCII(this.hostname));var tt=this.port?":"+this.port:"",it=this.hostname||"";this.host=it+tt,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!Fb[p])for(var x=0,A=Ou.length;x<A;x++){var V=Ou[x];if(l.indexOf(V)!==-1){var j=encodeURIComponent(V);j===V&&(j=escape(V)),l=l.split(V).join(j)}}var xt=l.indexOf("#");xt!==-1&&(this.hash=l.substr(xt),l=l.slice(0,xt));var kt=l.indexOf("?");if(kt!==-1?(this.search=l.substr(kt),this.query=l.substr(kt+1),t&&(this.query=Nu.parse(this.query)),l=l.slice(0,kt)):t&&(this.search="",this.query={}),l&&(this.pathname=l),si[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var tt=this.pathname||"",G=this.search||"";this.path=tt+G}return this.href=this.format(),this};function Nb(e){return typeof e=="string"&&(e=ea(e)),e instanceof ir?e.format():ir.prototype.format.call(e)}ir.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",s=!1,a="";this.host?s=e+this.host:this.hostname&&(s=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=Nu.stringify(this.query));var u=this.search||a&&"?"+a||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||si[t])&&s!==!1?(s="//"+(s||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):s||(s=""),n&&n.charAt(0)!=="#"&&(n="#"+n),u&&u.charAt(0)!=="?"&&(u="?"+u),r=r.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),u=u.replace("#","%23"),t+s+r+u+n};function Lb(e,t){return ea(e,!1,!0).resolve(t)}ir.prototype.resolve=function(e){return this.resolveObject(ea(e,!1,!0)).format()},ir.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new ir;t.parse(e,!1,!0),e=t}for(var r=new ir,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),l=0;l<u.length;l++){var c=u[l];c!=="protocol"&&(r[c]=e[c])}return si[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!si[e.protocol]){for(var f=Object.keys(e),p=0;p<f.length;p++){var m=f[p];r[m]=e[m]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Fu[e.protocol]){for(var A=(e.pathname||"").split("/");A.length&&!(e.host=A.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),A[0]!==""&&A.unshift(""),A.length<2&&A.unshift(""),r.pathname=A.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var g=r.pathname||"",x=r.search||"";r.path=g+x}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",S=e.host||e.pathname&&e.pathname.charAt(0)==="/",T=S||y||r.host&&e.pathname,w=T,I=r.pathname&&r.pathname.split("/")||[],A=e.pathname&&e.pathname.split("/")||[],R=r.protocol&&!si[r.protocol];if(R&&(r.hostname="",r.port=null,r.host&&(I[0]===""?I[0]=r.host:I.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(A[0]===""?A[0]=e.host:A.unshift(e.host)),e.host=null),T=T&&(A[0]===""||I[0]==="")),S)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,I=A;else if(A.length)I||(I=[]),I.pop(),I=I.concat(A),r.search=e.search,r.query=e.query;else if(e.search!=null){if(R){r.host=I.shift(),r.hostname=r.host;var N=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;N&&(r.auth=N.shift(),r.hostname=N.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!I.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var B=I.slice(-1)[0],L=(r.host||e.host||I.length>1)&&(B==="."||B==="..")||B==="",O=0,z=I.length;z>=0;z--)B=I[z],B==="."?I.splice(z,1):B===".."?(I.splice(z,1),O++):O&&(I.splice(z,1),O--);if(!T&&!w)for(;O--;O)I.unshift("..");T&&I[0]!==""&&(!I[0]||I[0].charAt(0)!=="/")&&I.unshift(""),L&&I.join("/").substr(-1)!=="/"&&I.push("");var X=I[0]===""||I[0]&&I[0].charAt(0)==="/";if(R){r.hostname=X?"":I.length?I.shift():"",r.host=r.hostname;var N=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;N&&(r.auth=N.shift(),r.hostname=N.shift(),r.host=r.hostname)}return T=T||r.host&&I.length,T&&!X&&I.unshift(""),I.length>0?r.pathname=I.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=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},ir.prototype.parseHost=function(){var e=this.host,t=Eb.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var kb=ea,Bb=Lb,Db=Nb;const Ub={parse:kb,format:Db,resolve:Bb},Nf={};function Rt(e,t,r=3){if(Nf[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
14
14
  Deprecated since v${e}`):(n=n.split(`
15
15
  `).splice(r).join(`
16
16
  `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}
17
17
  Deprecated since v${e}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}
18
- Deprecated since v${e}`),console.warn(n))),Fh[t]=!0}let $l;function zx(){return typeof $l>"u"&&($l=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:Dt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Dt.ADAPTER.getWebGLRenderingContext())return!1;const n=Dt.ADAPTER.createCanvas();let i=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const o=!!((r=i==null?void 0:i.getContextAttributes())!=null&&r.stencil);if(i){const a=i.getExtension("WEBGL_lose_context");a&&a.loseContext()}return i=null,o}catch{return!1}}()),$l}var Hx={grad:.9,turn:360,rad:360/(2*Math.PI)},Wr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Ie=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},lr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Bh=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Dh=function(e){return{r:lr(e.r,0,255),g:lr(e.g,0,255),b:lr(e.b,0,255),a:lr(e.a)}},Gl=function(e){return{r:Ie(e.r),g:Ie(e.g),b:Ie(e.b),a:Ie(e.a,3)}},Vx=/^#([0-9a-f]{3,8})$/i,lo=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Uh=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),a=o-Math.min(t,r,n),u=a?o===t?(r-n)/a:o===r?2+(n-t)/a:4+(t-r)/a:0;return{h:60*(u<0?u+6:u),s:o?a/o*100:0,v:o/255*100,a:i}},$h=function(e){var t=e.h,r=e.s,n=e.v,i=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),a=n*(1-r),u=n*(1-(t-o)*r),f=n*(1-(1-t+o)*r),h=o%6;return{r:255*[n,u,a,a,f,n][h],g:255*[f,n,n,u,a,a][h],b:255*[a,a,f,n,n,u][h],a:i}},Gh=function(e){return{h:Bh(e.h),s:lr(e.s,0,100),l:lr(e.l,0,100),a:lr(e.a)}},jh=function(e){return{h:Ie(e.h),s:Ie(e.s),l:Ie(e.l),a:Ie(e.a,3)}},qh=function(e){return $h((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},ls=function(e){return{h:(t=Uh(e)).h,s:(i=(200-(r=t.s))*(n=t.v)/100)>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,r,n,i},Wx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Yx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jl={string:[[function(e){var t=Vx.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Ie(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?Ie(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Kx.exec(e)||Yx.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Dh({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Wx.exec(e)||Xx.exec(e);if(!t)return null;var r,n,i=Gh({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Hx[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return qh(i)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=i===void 0?1:i;return Wr(t)&&Wr(r)&&Wr(n)?Dh({r:Number(t),g:Number(r),b:Number(n),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=Gh({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return qh(a)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Wr(t)||!Wr(r)||!Wr(n))return null;var a=function(u){return{h:Bh(u.h),s:lr(u.s,0,100),v:lr(u.v,0,100),a:lr(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return $h(a)},"hsv"]]},zh=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Zx=function(e){return typeof e=="string"?zh(e.trim(),jl.string):typeof e=="object"&&e!==null?zh(e,jl.object):[null,void 0]},ql=function(e,t){var r=ls(e);return{h:r.h,s:lr(r.s+100*t,0,100),l:r.l,a:r.a}},zl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hh=function(e,t){var r=ls(e);return{h:r.h,s:r.s,l:lr(r.l+100*t,0,100),a:r.a}},Hl=function(){function e(t){this.parsed=Zx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return Ie(zl(this.rgba),2)},e.prototype.isDark=function(){return zl(this.rgba)<.5},e.prototype.isLight=function(){return zl(this.rgba)>=.5},e.prototype.toHex=function(){return t=Gl(this.rgba),r=t.r,n=t.g,i=t.b,a=(o=t.a)<1?lo(Ie(255*o)):"","#"+lo(r)+lo(n)+lo(i)+a;var t,r,n,i,o,a},e.prototype.toRgb=function(){return Gl(this.rgba)},e.prototype.toRgbString=function(){return t=Gl(this.rgba),r=t.r,n=t.g,i=t.b,(o=t.a)<1?"rgba("+r+", "+n+", "+i+", "+o+")":"rgb("+r+", "+n+", "+i+")";var t,r,n,i,o},e.prototype.toHsl=function(){return jh(ls(this.rgba))},e.prototype.toHslString=function(){return t=jh(ls(this.rgba)),r=t.h,n=t.s,i=t.l,(o=t.a)<1?"hsla("+r+", "+n+"%, "+i+"%, "+o+")":"hsl("+r+", "+n+"%, "+i+"%)";var t,r,n,i,o},e.prototype.toHsv=function(){return t=Uh(this.rgba),{h:Ie(t.h),s:Ie(t.s),v:Ie(t.v),a:Ie(t.a,3)};var t},e.prototype.invert=function(){return Ur({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ur(ql(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ur(ql(this.rgba,-t))},e.prototype.grayscale=function(){return Ur(ql(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ur(Hh(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ur({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):Ie(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=ls(this.rgba);return typeof t=="number"?Ur({h:t,s:r.s,l:r.l,a:r.a}):Ie(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ur(t).toHex()},e}(),Ur=function(e){return e instanceof Hl?e:new Hl(e)},Vh=[],Qx=function(e){e.forEach(function(t){Vh.indexOf(t)<0&&(t(Hl,jl),Vh.push(t))})};function Jx(e,t){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"},n={};for(var i in r)n[r[i]]=i;var o={};e.prototype.toName=function(a){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var u,f,h=n[this.toHex()];if(h)return h;if(a!=null&&a.closest){var d=this.toRgb(),p=1/0,c="black";if(!o.length)for(var v in r)o[v]=new e(r[v]).toRgb();for(var y in r){var _=(u=d,f=o[y],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));_<p&&(p=_,c=y)}return c}},t.string.push([function(a){var u=a.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}Qx([Jx]);const gi=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}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(e){return this.value=e,this}set value(e){if(e instanceof gi)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((i,o)=>i===t[o]);if(e!==null&&t!==null){const i=Object.keys(e),o=Object.keys(t);return i.length!==o.length?!1:i.every(a=>e[a]===t[a])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,i]=gi.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=i,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,i]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,i,o=1]=e;t=[r,n,i,o]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,i,o=255]=e;t=[r/255,n/255,i/255,o/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=gi.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ur(e);if(r.isValid()){const{r:n,g:i,b:o,a}=r.rgba;t=[n/255,i/255,o/255,a]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,i)=>{e[i]=Math.min(Math.max(n,t),r)}),e)}};let Be=gi;Be.shared=new gi,Be.temp=new gi,Be.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function uo(e,t=[]){return Ht("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Be.shared.setValue(e).toRgbArray(t)}function Vl(e){return Ht("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Be.shared.setValue(e).toNumber()}function tw(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[Pt.NORMAL_NPM]=Pt.NORMAL,e[Pt.ADD_NPM]=Pt.ADD,e[Pt.SCREEN_NPM]=Pt.SCREEN,t[Pt.NORMAL]=Pt.NORMAL_NPM,t[Pt.ADD]=Pt.ADD_NPM,t[Pt.SCREEN]=Pt.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const ew=tw();function Wh(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function fo(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Xh(e){return!(e&e-1)&&!!e}function Kh(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function co(e,t,r){const n=e.length;let i;if(t>=n||r===0)return;r=t+r>n?n-t:r;const o=n-r;for(i=t;i<o;++i)e[i]=e[i+r];e.length=o}let rw=0;function us(){return++rw}const Yh={},$r=Object.create(null),hn=Object.create(null);let ho;function nw(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,ho||(ho=document.createElement("a")),ho.href=e;const r=qx.parse(ho.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Zh(e,t=1){var n;const r=(n=Dt.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var qt=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(qt||{});const Wl=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Qh=(e,t)=>Wl(e).priority??t,te={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Wl).forEach(t=>{t.type.forEach(r=>{var n,i;return(i=(n=this._removeHandlers)[r])==null?void 0:i.call(n,t)})}),this},add(...e){return e.map(Wl).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,i=this._queue;n[r]?n[r](t):(i[r]=i[r]||[],i[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,i=this._removeHandlers;if(n[e]||i[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,i[e]=r;const o=this._queue;return o[e]&&(o[e].forEach(a=>t(a)),delete o[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((i,o)=>Qh(o,r)-Qh(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class iw{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,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(t){return this[`${t}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(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const sw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
- `);function ow(e){let t="";for(let r=0;r<e;++r)r>0&&(t+=`
20
- else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function aw(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=sw.replace(/%forloop%/gi,ow(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Xl=0,Kl=1,Yl=2,Zl=3,Ql=4,Jl=5;let po=class ny{constructor(){this.data=0,this.blendMode=Pt.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Xl)}set blend(t){!!(this.data&1<<Xl)!==t&&(this.data^=1<<Xl)}get offsets(){return!!(this.data&1<<Kl)}set offsets(t){!!(this.data&1<<Kl)!==t&&(this.data^=1<<Kl)}get culling(){return!!(this.data&1<<Yl)}set culling(t){!!(this.data&1<<Yl)!==t&&(this.data^=1<<Yl)}get depthTest(){return!!(this.data&1<<Zl)}set depthTest(t){!!(this.data&1<<Zl)!==t&&(this.data^=1<<Zl)}get depthMask(){return!!(this.data&1<<Jl)}set depthMask(t){!!(this.data&1<<Jl)!==t&&(this.data^=1<<Jl)}get clockwiseFrontFace(){return!!(this.data&1<<Ql)}set clockwiseFrontFace(t){!!(this.data&1<<Ql)!==t&&(this.data^=1<<Ql)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==Pt.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new ny;return t.depthTest=!1,t.blend=!0,t}};const tu=[];function Jh(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=tu.length-1;n>=0;--n){const i=tu[n];if(i.test&&i.test(e,r))return new i(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class _r{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,i,o,a,u,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:d}=this;this._aliasCount++;for(let p=0,c=d.length;p<c;p++)d[p][h](t,r,n,i,o,a,u,f);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(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}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(_r.prototype,{dispatch:{value:_r.prototype.emit},run:{value:_r.prototype.emit}});class fs{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new _r("setRealSize"),this.onUpdate=new _r("update"),this.onError=new _r("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,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(t,r,n){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(t,r){return!1}}class eu extends fs{constructor(t,r){const{width:n,height:i}=r||{};if(!n||!i)throw new Error("BufferResource width or height invalid");super(n,i),this.data=t}upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,a=r.realHeight;return n.width===o&&n.height===a?i.texSubImage2D(r.target,0,0,0,o,a,r.format,n.type,this.data):(n.width=o,n.height=a,i.texImage2D(r.target,0,n.internalFormat,o,a,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const lw={scaleMode:Lr.NEAREST,format:bt.RGBA,alphaMode:ln.NPM},mi=class extends Ws{constructor(e=null,t=null){super(),t=Object.assign({},mi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:o,width:a,height:u,wrapMode:f,format:h,type:d,target:p,resolution:c,resourceOptions:v}=t;e&&!(e instanceof fs)&&(e=Jh(e,v),e.internal=!0),this.resolution=c||Dt.RESOLUTION,this.width=Math.round((a||0)*this.resolution)/this.resolution,this.height=Math.round((u||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=i,this._wrapMode=f,this._scaleMode=o,this.format=h,this.type=d,this.target=p,this.alphaMode=r,this.uid=us(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=a>0&&u>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}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(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Xh(this.realWidth)&&Xh(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,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(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete hn[this.cacheId],delete $r[this.cacheId],this.cacheId=null),this.dispose(),mi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=Dt.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let i=null;if(n)i=e;else{if(!e._pixiId){const a=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${a}_${us()}`}i=e._pixiId}let o=hn[i];if(n&&r&&!o)throw new Error(`The cacheId "${i}" does not exist in BaseTextureCache.`);return o||(o=new mi(e,t),o.cacheId=i,mi.addToCache(o,i)),o}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const i=new eu(e,{width:t,height:r}),o=e instanceof Float32Array?Xt.FLOAT:Xt.UNSIGNED_BYTE;return new mi(i,Object.assign({},lw,n||{width:t,height:r,type:o}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),hn[t]&&hn[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),hn[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=hn[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete hn[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete hn[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let Kt=mi;Kt.defaultOptions={mipmap:Rn.POW2,anisotropicLevel:0,scaleMode:Lr.LINEAR,wrapMode:Ji.CLAMP,alphaMode:ln.UNPACK,target:ii.TEXTURE_2D,format:bt.RGBA,type:Xt.UNSIGNED_BYTE},Kt._globalBatch=0;class ru{constructor(){this.texArray=null,this.blend=0,this.type=an.TRIANGLES,this.start=0,this.size=0,this.data=null}}let uw=0,Qe=class iy{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=uw++,this.disposeRunner=new _r("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Fr.ELEMENT_ARRAY_BUFFER:Fr.ARRAY_BUFFER}get index(){return this.type===Fr.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new iy(t)}};class vo{constructor(t,r=0,n=!1,i=Xt.FLOAT,o,a,u,f=1){this.buffer=t,this.size=r,this.normalized=n,this.type=i,this.stride=o,this.start=a,this.instance=u,this.divisor=f}destroy(){this.buffer=null}static from(t,r,n,i,o){return new vo(t,r,n,i,o)}}const fw={Float32Array,Uint32Array,Int32Array,Uint8Array};function cw(e,t){let r=0,n=0;const i={};for(let f=0;f<e.length;f++)n+=t[f],r+=e[f].length;const o=new ArrayBuffer(r*4);let a=null,u=0;for(let f=0;f<e.length;f++){const h=t[f],d=e[f],p=Wh(d);i[p]||(i[p]=new fw[p](o)),a=i[p];for(let c=0;c<d.length;c++){const v=(c/h|0)*n+u,y=c%h;a[v+y]=d[c]}u+=h}return new Float32Array(o)}const td={5126:4,5123:2,5121:1};let hw=0;const dw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class yi{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=hw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new _r("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,i=!1,o,a,u,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Qe||(r instanceof Array&&(r=new Float32Array(r)),r=new Qe(r));const h=t.split("|");if(h.length>1){for(let p=0;p<h.length;p++)this.addAttribute(h[p],r,n,i,o);return this}let d=this.buffers.indexOf(r);return d===-1&&(this.buffers.push(r),d=this.buffers.length-1),this.attributes[t]=new vo(d,n,i,o,a,u,f),this.instanced=this.instanced||f,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Qe||(t instanceof Array&&(t=new Uint16Array(t)),t=new Qe(t)),t.type=Fr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Qe;let i;for(i in this.attributes){const o=this.attributes[i],a=this.buffers[o.buffer];t.push(a.data),r.push(o.size*td[o.type]/4),o.buffer=0}for(n.data=cw(t,r),i=0;i<this.buffers.length;i++)this.buffers[i]!==this.indexBuffer&&this.buffers[i].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];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 t=new yi;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Qe(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new vo(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new yi,n=[],i=[],o=[];let a;for(let u=0;u<t.length;u++){a=t[u];for(let f=0;f<a.buffers.length;f++)i[f]=i[f]||0,i[f]+=a.buffers[f].data.length,o[f]=0}for(let u=0;u<a.buffers.length;u++)n[u]=new dw[Wh(a.buffers[u].data)](i[u]),r.buffers[u]=new Qe(n[u]);for(let u=0;u<t.length;u++){a=t[u];for(let f=0;f<a.buffers.length;f++)n[f].set(a.buffers[f].data,o[f]),o[f]+=a.buffers[f].data.length}if(r.attributes=a.attributes,a.indexBuffer){r.indexBuffer=r.buffers[a.buffers.indexOf(a.indexBuffer)],r.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER;let u=0,f=0,h=0,d=0;for(let p=0;p<a.buffers.length;p++)if(a.buffers[p]!==a.indexBuffer){d=p;break}for(const p in a.attributes){const c=a.attributes[p];(c.buffer|0)===d&&(f+=c.size*td[c.type]/4)}for(let p=0;p<t.length;p++){const c=t[p].indexBuffer.data;for(let v=0;v<c.length;v++)r.indexBuffer.data[v+h]+=u;u+=t[p].buffers[d].data.length/f,h+=c.length}}return r}}class ed extends yi{constructor(t=!1){super(),this._buffer=new Qe(null,t,!1),this._indexBuffer=new Qe(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Xt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Xt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Xt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Xt.FLOAT).addIndex(this._indexBuffer)}}const go=Math.PI*2,pw=180/Math.PI,cs=Math.PI/180;var Ne=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(Ne||{});class oe{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new oe(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const mo=[new oe,new oe,new oe,new oe];class ie{constructor(t=0,r=0,n=0,i=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(i),this.type=Ne.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 ie(0,0,0,0)}clone(){return new ie(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const A=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=A)return!1;const R=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>R}const n=this.left,i=this.right,o=this.top,a=this.bottom;if(i<=n||a<=o)return!1;const u=mo[0].set(t.left,t.top),f=mo[1].set(t.left,t.bottom),h=mo[2].set(t.right,t.top),d=mo[3].set(t.right,t.bottom);if(h.x<=u.x||f.y<=u.y)return!1;const p=Math.sign(r.a*r.d-r.b*r.c);if(p===0||(r.apply(u,u),r.apply(f,f),r.apply(h,h),r.apply(d,d),Math.max(u.x,f.x,h.x,d.x)<=n||Math.min(u.x,f.x,h.x,d.x)>=i||Math.max(u.y,f.y,h.y,d.y)<=o||Math.min(u.y,f.y,h.y,d.y)>=a))return!1;const c=p*(f.y-u.y),v=p*(u.x-f.x),y=c*n+v*o,_=c*i+v*o,b=c*n+v*a,m=c*i+v*a;if(Math.max(y,_,b,m)<=c*u.x+v*u.y||Math.min(y,_,b,m)>=c*d.x+v*d.y)return!1;const w=p*(u.y-h.y),T=p*(h.x-u.x),x=w*n+T*o,E=w*i+T*o,I=w*n+T*a,O=w*i+T*a;return!(Math.max(x,E,I,O)<=w*u.x+T*u.y||Math.min(x,E,I,O)>=w*d.x+T*d.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(o-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=o-i,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class nu{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=Ne.CIRC}clone(){return new nu(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let i=this.x-t,o=this.y-r;return i*=i,o*=o,i+o<=n}getBounds(){return new ie(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 vw=class sy{constructor(t=0,r=0,n=0,i=0){this.x=t,this.y=r,this.width=n,this.height=i,this.type=Ne.ELIP}clone(){return new sy(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,i=(r-this.y)/this.height;return n*=n,i*=i,n+i<=1}getBounds(){return new ie(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 hs{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let i=0,o=r.length;i<o;i++)n.push(r[i].x,r[i].y);r=n}this.points=r,this.type=Ne.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new hs(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const i=this.points.length/2;for(let o=0,a=i-1;o<i;a=o++){const u=this.points[o*2],f=this.points[o*2+1],h=this.points[a*2],d=this.points[a*2+1];f>r!=d>r&&t<(h-u)*((r-f)/(d-f))+u&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class iu{constructor(t=0,r=0,n=0,i=0,o=20){this.x=t,this.y=r,this.width=n,this.height=i,this.radius=o,this.type=Ne.RREC}clone(){return new iu(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let i=t-(this.x+n),o=r-(this.y+n);const a=n*n;if(i*i+o*o<=a||(i=t-(this.x+this.width-n),i*i+o*o<=a)||(o=r-(this.y+this.height-n),i*i+o*o<=a)||(i=t-(this.x+n),i*i+o*o<=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 $e=class za{constructor(t=1,r=0,n=0,i=1,o=0,a=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,r,n,i,o,a){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=a,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new oe;const n=t.x,i=t.y;return r.x=this.a*n+this.c*i+this.tx,r.y=this.b*n+this.d*i+this.ty,r}applyInverse(t,r){r=r||new oe;const n=1/(this.a*this.d+this.c*-this.b),i=t.x,o=t.y;return r.x=this.d*n*i+-this.c*n*o+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*o+-this.b*n*i+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),i=this.a,o=this.c,a=this.tx;return this.a=i*r-this.b*n,this.b=i*n+this.b*r,this.c=o*r-this.d*n,this.d=o*n+this.d*r,this.tx=a*r-this.ty*n,this.ty=a*n+this.ty*r,this}append(t){const r=this.a,n=this.b,i=this.c,o=this.d;return this.a=t.a*r+t.b*i,this.b=t.a*n+t.b*o,this.c=t.c*r+t.d*i,this.d=t.c*n+t.d*o,this.tx=t.tx*r+t.ty*i+this.tx,this.ty=t.tx*n+t.ty*o+this.ty,this}setTransform(t,r,n,i,o,a,u,f,h){return this.a=Math.cos(u+h)*o,this.b=Math.sin(u+h)*o,this.c=-Math.sin(u-f)*a,this.d=Math.cos(u-f)*a,this.tx=t-(n*this.a+i*this.c),this.ty=r-(n*this.b+i*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,i=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,i=this.c,o=this.d,a=t.pivot,u=-Math.atan2(-i,o),f=Math.atan2(n,r),h=Math.abs(u+f);return h<1e-5||Math.abs(go-h)<1e-5?(t.rotation=f,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=u,t.skew.y=f),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(a.x*r+a.y*i),t.position.y=this.ty+(a.x*n+a.y*o),t}invert(){const t=this.a,r=this.b,n=this.c,i=this.d,o=this.tx,a=t*i-r*n;return this.a=i/a,this.b=-r/a,this.c=-n/a,this.d=t/a,this.tx=(n*this.ty-i*o)/a,this.ty=-(t*this.ty-r*o)/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 t=new za;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.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 za}static get TEMP_MATRIX(){return new za}};const Ln=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Fn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Bn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Dn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],su=[],rd=[],yo=Math.sign;function gw(){for(let e=0;e<16;e++){const t=[];su.push(t);for(let r=0;r<16;r++){const n=yo(Ln[e]*Ln[r]+Bn[e]*Fn[r]),i=yo(Fn[e]*Ln[r]+Dn[e]*Fn[r]),o=yo(Ln[e]*Bn[r]+Bn[e]*Dn[r]),a=yo(Fn[e]*Bn[r]+Dn[e]*Dn[r]);for(let u=0;u<16;u++)if(Ln[u]===n&&Fn[u]===i&&Bn[u]===o&&Dn[u]===a){t.push(u);break}}}for(let e=0;e<16;e++){const t=new $e;t.set(Ln[e],Fn[e],Bn[e],Dn[e],0,0),rd.push(t)}}gw();const ve={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:e=>Ln[e],uY:e=>Fn[e],vX:e=>Bn[e],vY:e=>Dn[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>su[e][t],sub:(e,t)=>su[e][ve.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?ve.S:ve.N:Math.abs(t)*2<=Math.abs(e)?e>0?ve.E:ve.W:t>0?e>0?ve.SE:ve.SW:e>0?ve.NE:ve.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const i=rd[ve.inv(t)];i.tx=r,i.ty=n,e.append(i)}};class Un{constructor(t,r,n=0,i=0){this._x=n,this._y=i,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new Un(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const nd=class{constructor(){this.worldTransform=new $e,this.localTransform=new $e,this.position=new Un(this.onChange,this,0,0),this.scale=new Un(this.onChange,this,1,1),this.pivot=new Un(this.onChange,this,0,0),this.skew=new Un(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 e=this.localTransform;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)}updateTransform(e){const t=this.localTransform;if(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),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let ou=nd;ou.IDENTITY=new nd;var mw=`varying vec2 vTextureCoord;
18
+ Deprecated since v${e}`),console.warn(n))),Nf[t]=!0}let Lu;function $b(){return typeof Lu>"u"&&(Lu=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:_t.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!_t.ADAPTER.getWebGLRenderingContext())return!1;const n=_t.ADAPTER.createCanvas();let s=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const a=!!((r=s==null?void 0:s.getContextAttributes())!=null&&r.stencil);if(s){const u=s.getExtension("WEBGL_lose_context");u&&u.loseContext()}return s=null,a}catch{return!1}}()),Lu}var Gb={grad:.9,turn:360,rad:360/(2*Math.PI)},kr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},ye=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Ye=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Lf=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},kf=function(e){return{r:Ye(e.r,0,255),g:Ye(e.g,0,255),b:Ye(e.b,0,255),a:Ye(e.a)}},ku=function(e){return{r:ye(e.r),g:ye(e.g),b:ye(e.b),a:ye(e.a,3)}},zb=/^#([0-9a-f]{3,8})$/i,ra=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Bf=function(e){var t=e.r,r=e.g,n=e.b,s=e.a,a=Math.max(t,r,n),u=a-Math.min(t,r,n),l=u?a===t?(r-n)/u:a===r?2+(n-t)/u:4+(t-r)/u:0;return{h:60*(l<0?l+6:l),s:a?u/a*100:0,v:a/255*100,a:s}},Df=function(e){var t=e.h,r=e.s,n=e.v,s=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),u=n*(1-r),l=n*(1-(t-a)*r),c=n*(1-(1-t+a)*r),f=a%6;return{r:255*[n,l,u,u,c,n][f],g:255*[c,n,n,l,u,u][f],b:255*[u,u,c,n,n,l][f],a:s}},Uf=function(e){return{h:Lf(e.h),s:Ye(e.s,0,100),l:Ye(e.l,0,100),a:Ye(e.a)}},$f=function(e){return{h:ye(e.h),s:ye(e.s),l:ye(e.l),a:ye(e.a,3)}},Gf=function(e){return Df((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},ts=function(e){return{h:(t=Bf(e)).h,s:(s=(200-(r=t.s))*(n=t.v)/100)>0&&s<200?r*n/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,r,n,s},Hb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bu={string:[[function(e){var t=zb.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ye(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?ye(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=jb.exec(e)||Xb.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:kf({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=Hb.exec(e)||Vb.exec(e);if(!t)return null;var r,n,s=Uf({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Gb[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Gf(s)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,s=e.a,a=s===void 0?1:s;return kr(t)&&kr(r)&&kr(n)?kf({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,s=e.a,a=s===void 0?1:s;if(!kr(t)||!kr(r)||!kr(n))return null;var u=Uf({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return Gf(u)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,s=e.a,a=s===void 0?1:s;if(!kr(t)||!kr(r)||!kr(n))return null;var u=function(l){return{h:Lf(l.h),s:Ye(l.s,0,100),v:Ye(l.v,0,100),a:Ye(l.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return Df(u)},"hsv"]]},zf=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Wb=function(e){return typeof e=="string"?zf(e.trim(),Bu.string):typeof e=="object"&&e!==null?zf(e,Bu.object):[null,void 0]},Du=function(e,t){var r=ts(e);return{h:r.h,s:Ye(r.s+100*t,0,100),l:r.l,a:r.a}},Uu=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hf=function(e,t){var r=ts(e);return{h:r.h,s:r.s,l:Ye(r.l+100*t,0,100),a:r.a}},$u=function(){function e(t){this.parsed=Wb(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return ye(Uu(this.rgba),2)},e.prototype.isDark=function(){return Uu(this.rgba)<.5},e.prototype.isLight=function(){return Uu(this.rgba)>=.5},e.prototype.toHex=function(){return t=ku(this.rgba),r=t.r,n=t.g,s=t.b,u=(a=t.a)<1?ra(ye(255*a)):"","#"+ra(r)+ra(n)+ra(s)+u;var t,r,n,s,a,u},e.prototype.toRgb=function(){return ku(this.rgba)},e.prototype.toRgbString=function(){return t=ku(this.rgba),r=t.r,n=t.g,s=t.b,(a=t.a)<1?"rgba("+r+", "+n+", "+s+", "+a+")":"rgb("+r+", "+n+", "+s+")";var t,r,n,s,a},e.prototype.toHsl=function(){return $f(ts(this.rgba))},e.prototype.toHslString=function(){return t=$f(ts(this.rgba)),r=t.h,n=t.s,s=t.l,(a=t.a)<1?"hsla("+r+", "+n+"%, "+s+"%, "+a+")":"hsl("+r+", "+n+"%, "+s+"%)";var t,r,n,s,a},e.prototype.toHsv=function(){return t=Bf(this.rgba),{h:ye(t.h),s:ye(t.s),v:ye(t.v),a:ye(t.a,3)};var t},e.prototype.invert=function(){return Ir({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ir(Du(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ir(Du(this.rgba,-t))},e.prototype.grayscale=function(){return Ir(Du(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ir(Hf(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ir(Hf(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ir({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):ye(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=ts(this.rgba);return typeof t=="number"?Ir({h:t,s:r.s,l:r.l,a:r.a}):ye(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ir(t).toHex()},e}(),Ir=function(e){return e instanceof $u?e:new $u(e)},Vf=[],qb=function(e){e.forEach(function(t){Vf.indexOf(t)<0&&(t($u,Bu),Vf.push(t))})};function Yb(e,t){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"},n={};for(var s in r)n[r[s]]=s;var a={};e.prototype.toName=function(u){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,f=n[this.toHex()];if(f)return f;if(u!=null&&u.closest){var p=this.toRgb(),m=1/0,g="black";if(!a.length)for(var x in r)a[x]=new e(r[x]).toRgb();for(var y in r){var S=(l=p,c=a[y],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));S<m&&(m=S,g=y)}return g}},t.string.push([function(u){var l=u.toLowerCase(),c=l==="transparent"?"#0000":r[l];return c?new e(c).toRgb():null},"name"])}qb([Yb]);const ai=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}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(e){return this.value=e,this}set value(e){if(e instanceof ai)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((s,a)=>s===t[a]);if(e!==null&&t!==null){const s=Object.keys(e),a=Object.keys(t);return s.length!==a.length?!1:s.every(u=>e[u]===t[u])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,s]=ai.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=s,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,s]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=s,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,s,a=1]=e;t=[r,n,s,a]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,s,a=255]=e;t=[r/255,n/255,s/255,a/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=ai.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ir(e);if(r.isValid()){const{r:n,g:s,b:a,a:u}=r.rgba;t=[n/255,s/255,a/255,u]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,s)=>{e[s]=Math.min(Math.max(n,t),r)}),e)}};let Ce=ai;Ce.shared=new ai,Ce.temp=new ai,Ce.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function na(e,t=[]){return Rt("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Ce.shared.setValue(e).toRgbArray(t)}function Gu(e){return Rt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Ce.shared.setValue(e).toNumber()}function Kb(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[ht.NORMAL_NPM]=ht.NORMAL,e[ht.ADD_NPM]=ht.ADD,e[ht.SCREEN_NPM]=ht.SCREEN,t[ht.NORMAL]=ht.NORMAL_NPM,t[ht.ADD]=ht.ADD_NPM,t[ht.SCREEN]=ht.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const Zb=Kb();function jf(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function ia(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Xf(e){return!(e&e-1)&&!!e}function Wf(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function sa(e,t,r){const n=e.length;let s;if(t>=n||r===0)return;r=t+r>n?n-t:r;const a=n-r;for(s=t;s<a;++s)e[s]=e[s+r];e.length=a}let Jb=0;function es(){return++Jb}const qf={},Rr=Object.create(null),en=Object.create(null);let aa;function Qb(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,aa||(aa=document.createElement("a")),aa.href=e;const r=Ub.parse(aa.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Yf(e,t=1){var n;const r=(n=_t.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var Ct=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(Ct||{});const zu=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Kf=(e,t)=>zu(e).priority??t,Gt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(zu).forEach(t=>{t.type.forEach(r=>{var n,s;return(s=(n=this._removeHandlers)[r])==null?void 0:s.call(n,t)})}),this},add(...e){return e.map(zu).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,s=this._queue;n[r]?n[r](t):(s[r]=s[r]||[],s[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,s=this._removeHandlers;if(n[e]||s[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,s[e]=r;const a=this._queue;return a[e]&&(a[e].forEach(u=>t(u)),delete a[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((s,a)=>Kf(a,r)-Kf(s,r)))},n=>{const s=t.indexOf(n.ref);s!==-1&&t.splice(s,1)})}};class tT{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,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(t){return this[`${t}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(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const eT=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
+ `);function rT(e){let t="";for(let r=0;r<e;++r)r>0&&(t+=`
20
+ else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function nT(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=eT.replace(/%forloop%/gi,rT(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Hu=0,Vu=1,ju=2,Xu=3,Wu=4,qu=5;let oa=class tv{constructor(){this.data=0,this.blendMode=ht.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Hu)}set blend(t){!!(this.data&1<<Hu)!==t&&(this.data^=1<<Hu)}get offsets(){return!!(this.data&1<<Vu)}set offsets(t){!!(this.data&1<<Vu)!==t&&(this.data^=1<<Vu)}get culling(){return!!(this.data&1<<ju)}set culling(t){!!(this.data&1<<ju)!==t&&(this.data^=1<<ju)}get depthTest(){return!!(this.data&1<<Xu)}set depthTest(t){!!(this.data&1<<Xu)!==t&&(this.data^=1<<Xu)}get depthMask(){return!!(this.data&1<<qu)}set depthMask(t){!!(this.data&1<<qu)!==t&&(this.data^=1<<qu)}get clockwiseFrontFace(){return!!(this.data&1<<Wu)}set clockwiseFrontFace(t){!!(this.data&1<<Wu)!==t&&(this.data^=1<<Wu)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==ht.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new tv;return t.depthTest=!1,t.blend=!0,t}};const Yu=[];function Zf(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=Yu.length-1;n>=0;--n){const s=Yu[n];if(s.test&&s.test(e,r))return new s(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class sr{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,s,a,u,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:f,items:p}=this;this._aliasCount++;for(let m=0,g=p.length;m<g;m++)p[m][f](t,r,n,s,a,u,l,c);return p===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}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(sr.prototype,{dispatch:{value:sr.prototype.emit},run:{value:sr.prototype.emit}});class rs{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new sr("setRealSize"),this.onUpdate=new sr("update"),this.onError=new sr("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,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(t,r,n){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(t,r){return!1}}class Ku extends rs{constructor(t,r){const{width:n,height:s}=r||{};if(!n||!s)throw new Error("BufferResource width or height invalid");super(n,s),this.data=t}upload(t,r,n){const s=t.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?s.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,s.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const iT={scaleMode:Sr.NEAREST,format:Z.RGBA,alphaMode:Zr.NPM},oi=class extends Gs{constructor(e=null,t=null){super(),t=Object.assign({},oi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:s,scaleMode:a,width:u,height:l,wrapMode:c,format:f,type:p,target:m,resolution:g,resourceOptions:x}=t;e&&!(e instanceof rs)&&(e=Zf(e,x),e.internal=!0),this.resolution=g||_t.RESOLUTION,this.width=Math.round((u||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=s,this._wrapMode=c,this._scaleMode=a,this.format=f,this.type=p,this.target=m,this.alphaMode=r,this.uid=es(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=u>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}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(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Xf(this.realWidth)&&Xf(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,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(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete en[this.cacheId],delete Rr[this.cacheId],this.cacheId=null),this.dispose(),oi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=_t.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let s=null;if(n)s=e;else{if(!e._pixiId){const u=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${u}_${es()}`}s=e._pixiId}let a=en[s];if(n&&r&&!a)throw new Error(`The cacheId "${s}" does not exist in BaseTextureCache.`);return a||(a=new oi(e,t),a.cacheId=s,oi.addToCache(a,s)),a}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const s=new Ku(e,{width:t,height:r}),a=e instanceof Float32Array?Nt.FLOAT:Nt.UNSIGNED_BYTE;return new oi(s,Object.assign({},iT,n||{width:t,height:r,type:a}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),en[t]&&en[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),en[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=en[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete en[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete en[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let Lt=oi;Lt.defaultOptions={mipmap:yn.POW2,anisotropicLevel:0,scaleMode:Sr.LINEAR,wrapMode:ji.CLAMP,alphaMode:Zr.UNPACK,target:qn.TEXTURE_2D,format:Z.RGBA,type:Nt.UNSIGNED_BYTE},Lt._globalBatch=0;class Zu{constructor(){this.texArray=null,this.blend=0,this.type=Kr.TRIANGLES,this.start=0,this.size=0,this.data=null}}let sT=0;class Re{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=sT++,this.disposeRunner=new sr("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Ar.ELEMENT_ARRAY_BUFFER:Ar.ARRAY_BUFFER}get index(){return this.type===Ar.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new Re(t)}}class ua{constructor(t,r=0,n=!1,s=Nt.FLOAT,a,u,l,c=1){this.buffer=t,this.size=r,this.normalized=n,this.type=s,this.stride=a,this.start=u,this.instance=l,this.divisor=c}destroy(){this.buffer=null}static from(t,r,n,s,a){return new ua(t,r,n,s,a)}}const aT={Float32Array,Uint32Array,Int32Array,Uint8Array};function oT(e,t){let r=0,n=0;const s={};for(let c=0;c<e.length;c++)n+=t[c],r+=e[c].length;const a=new ArrayBuffer(r*4);let u=null,l=0;for(let c=0;c<e.length;c++){const f=t[c],p=e[c],m=jf(p);s[m]||(s[m]=new aT[m](a)),u=s[m];for(let g=0;g<p.length;g++){const x=(g/f|0)*n+l,y=g%f;u[x+y]=p[g]}l+=f}return new Float32Array(a)}const Jf={5126:4,5123:2,5121:1};let uT=0;const lT={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class ui{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=uT++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new sr("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,s=!1,a,u,l,c=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Re||(r instanceof Array&&(r=new Float32Array(r)),r=new Re(r));const f=t.split("|");if(f.length>1){for(let m=0;m<f.length;m++)this.addAttribute(f[m],r,n,s,a);return this}let p=this.buffers.indexOf(r);return p===-1&&(this.buffers.push(r),p=this.buffers.length-1),this.attributes[t]=new ua(p,n,s,a,u,l,c),this.instanced=this.instanced||c,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Re||(t instanceof Array&&(t=new Uint16Array(t)),t=new Re(t)),t.type=Ar.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Re;let s;for(s in this.attributes){const a=this.attributes[s],u=this.buffers[a.buffer];t.push(u.data),r.push(a.size*Jf[a.type]/4),a.buffer=0}for(n.data=oT(t,r),s=0;s<this.buffers.length;s++)this.buffers[s]!==this.indexBuffer&&this.buffers[s].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];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 t=new ui;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Re(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new ua(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Ar.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new ui,n=[],s=[],a=[];let u;for(let l=0;l<t.length;l++){u=t[l];for(let c=0;c<u.buffers.length;c++)s[c]=s[c]||0,s[c]+=u.buffers[c].data.length,a[c]=0}for(let l=0;l<u.buffers.length;l++)n[l]=new lT[jf(u.buffers[l].data)](s[l]),r.buffers[l]=new Re(n[l]);for(let l=0;l<t.length;l++){u=t[l];for(let c=0;c<u.buffers.length;c++)n[c].set(u.buffers[c].data,a[c]),a[c]+=u.buffers[c].data.length}if(r.attributes=u.attributes,u.indexBuffer){r.indexBuffer=r.buffers[u.buffers.indexOf(u.indexBuffer)],r.indexBuffer.type=Ar.ELEMENT_ARRAY_BUFFER;let l=0,c=0,f=0,p=0;for(let m=0;m<u.buffers.length;m++)if(u.buffers[m]!==u.indexBuffer){p=m;break}for(const m in u.attributes){const g=u.attributes[m];(g.buffer|0)===p&&(c+=g.size*Jf[g.type]/4)}for(let m=0;m<t.length;m++){const g=t[m].indexBuffer.data;for(let x=0;x<g.length;x++)r.indexBuffer.data[x+f]+=l;l+=t[m].buffers[p].data.length/c,f+=g.length}}return r}}class Qf extends ui{constructor(t=!1){super(),this._buffer=new Re(null,t,!1),this._indexBuffer=new Re(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Nt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Nt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Nt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Nt.FLOAT).addIndex(this._indexBuffer)}}const la=Math.PI*2,hT=180/Math.PI,ns=Math.PI/180;var xe=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(xe||{});class Wt{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new Wt(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const ha=[new Wt,new Wt,new Wt,new Wt];class jt{constructor(t=0,r=0,n=0,s=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(s),this.type=xe.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 jt(0,0,0,0)}clone(){return new jt(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const O=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=O)return!1;const X=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>X}const n=this.left,s=this.right,a=this.top,u=this.bottom;if(s<=n||u<=a)return!1;const l=ha[0].set(t.left,t.top),c=ha[1].set(t.left,t.bottom),f=ha[2].set(t.right,t.top),p=ha[3].set(t.right,t.bottom);if(f.x<=l.x||c.y<=l.y)return!1;const m=Math.sign(r.a*r.d-r.b*r.c);if(m===0||(r.apply(l,l),r.apply(c,c),r.apply(f,f),r.apply(p,p),Math.max(l.x,c.x,f.x,p.x)<=n||Math.min(l.x,c.x,f.x,p.x)>=s||Math.max(l.y,c.y,f.y,p.y)<=a||Math.min(l.y,c.y,f.y,p.y)>=u))return!1;const g=m*(c.y-l.y),x=m*(l.x-c.x),y=g*n+x*a,S=g*s+x*a,T=g*n+x*u,w=g*s+x*u;if(Math.max(y,S,T,w)<=g*l.x+x*l.y||Math.min(y,S,T,w)>=g*p.x+x*p.y)return!1;const I=m*(l.y-f.y),A=m*(f.x-l.x),R=I*n+A*a,N=I*s+A*a,B=I*n+A*u,L=I*s+A*u;return!(Math.max(R,N,B,L)<=I*l.x+A*l.y||Math.min(R,N,B,L)>=I*p.x+A*p.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),s=Math.max(this.y,t.y),a=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=s,this.height=Math.max(a-s,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,s=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=s-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),s=Math.min(this.y,t.y),a=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=s,this.height=a-s,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Ju{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=xe.CIRC}clone(){return new Ju(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let s=this.x-t,a=this.y-r;return s*=s,a*=a,s+a<=n}getBounds(){return new jt(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 cT=class ev{constructor(t=0,r=0,n=0,s=0){this.x=t,this.y=r,this.width=n,this.height=s,this.type=xe.ELIP}clone(){return new ev(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,s=(r-this.y)/this.height;return n*=n,s*=s,n+s<=1}getBounds(){return new jt(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 is{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let s=0,a=r.length;s<a;s++)n.push(r[s].x,r[s].y);r=n}this.points=r,this.type=xe.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new is(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const s=this.points.length/2;for(let a=0,u=s-1;a<s;u=a++){const l=this.points[a*2],c=this.points[a*2+1],f=this.points[u*2],p=this.points[u*2+1];c>r!=p>r&&t<(f-l)*((r-c)/(p-c))+l&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class Qu{constructor(t=0,r=0,n=0,s=0,a=20){this.x=t,this.y=r,this.width=n,this.height=s,this.radius=a,this.type=xe.RREC}clone(){return new Qu(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let s=t-(this.x+n),a=r-(this.y+n);const u=n*n;if(s*s+a*a<=u||(s=t-(this.x+this.width-n),s*s+a*a<=u)||(a=r-(this.y+this.height-n),s*s+a*a<=u)||(s=t-(this.x+n),s*s+a*a<=u))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 Pe=class Uo{constructor(t=1,r=0,n=0,s=1,a=0,u=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=s,this.tx=a,this.ty=u}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,r,n,s,a,u){return this.a=t,this.b=r,this.c=n,this.d=s,this.tx=a,this.ty=u,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new Wt;const n=t.x,s=t.y;return r.x=this.a*n+this.c*s+this.tx,r.y=this.b*n+this.d*s+this.ty,r}applyInverse(t,r){r=r||new Wt;const n=1/(this.a*this.d+this.c*-this.b),s=t.x,a=t.y;return r.x=this.d*n*s+-this.c*n*a+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*a+-this.b*n*s+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),s=this.a,a=this.c,u=this.tx;return this.a=s*r-this.b*n,this.b=s*n+this.b*r,this.c=a*r-this.d*n,this.d=a*n+this.d*r,this.tx=u*r-this.ty*n,this.ty=u*n+this.ty*r,this}append(t){const r=this.a,n=this.b,s=this.c,a=this.d;return this.a=t.a*r+t.b*s,this.b=t.a*n+t.b*a,this.c=t.c*r+t.d*s,this.d=t.c*n+t.d*a,this.tx=t.tx*r+t.ty*s+this.tx,this.ty=t.tx*n+t.ty*a+this.ty,this}setTransform(t,r,n,s,a,u,l,c,f){return this.a=Math.cos(l+f)*a,this.b=Math.sin(l+f)*a,this.c=-Math.sin(l-c)*u,this.d=Math.cos(l-c)*u,this.tx=t-(n*this.a+s*this.c),this.ty=r-(n*this.b+s*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,s=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=s*t.a+this.d*t.c,this.d=s*t.b+this.d*t.d}return this.tx=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,s=this.c,a=this.d,u=t.pivot,l=-Math.atan2(-s,a),c=Math.atan2(n,r),f=Math.abs(l+c);return f<1e-5||Math.abs(la-f)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(s*s+a*a),t.position.x=this.tx+(u.x*r+u.y*s),t.position.y=this.ty+(u.x*n+u.y*a),t}invert(){const t=this.a,r=this.b,n=this.c,s=this.d,a=this.tx,u=t*s-r*n;return this.a=s/u,this.b=-r/u,this.c=-n/u,this.d=t/u,this.tx=(n*this.ty-s*a)/u,this.ty=-(t*this.ty-r*a)/u,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new Uo;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.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 Uo}static get TEMP_MATRIX(){return new Uo}};const Sn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],An=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Cn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],En=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],tl=[],td=[],ca=Math.sign;function fT(){for(let e=0;e<16;e++){const t=[];tl.push(t);for(let r=0;r<16;r++){const n=ca(Sn[e]*Sn[r]+Cn[e]*An[r]),s=ca(An[e]*Sn[r]+En[e]*An[r]),a=ca(Sn[e]*Cn[r]+Cn[e]*En[r]),u=ca(An[e]*Cn[r]+En[e]*En[r]);for(let l=0;l<16;l++)if(Sn[l]===n&&An[l]===s&&Cn[l]===a&&En[l]===u){t.push(l);break}}}for(let e=0;e<16;e++){const t=new Pe;t.set(Sn[e],An[e],Cn[e],En[e],0,0),td.push(t)}}fT();const ne={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:e=>Sn[e],uY:e=>An[e],vX:e=>Cn[e],vY:e=>En[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>tl[e][t],sub:(e,t)=>tl[e][ne.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?ne.S:ne.N:Math.abs(t)*2<=Math.abs(e)?e>0?ne.E:ne.W:t>0?e>0?ne.SE:ne.SW:e>0?ne.NE:ne.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const s=td[ne.inv(t)];s.tx=r,s.ty=n,e.append(s)}};class In{constructor(t,r,n=0,s=0){this._x=n,this._y=s,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new In(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const ed=class{constructor(){this.worldTransform=new Pe,this.localTransform=new Pe,this.position=new In(this.onChange,this,0,0),this.scale=new In(this.onChange,this,1,1),this.pivot=new In(this.onChange,this,0,0),this.skew=new In(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 e=this.localTransform;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)}updateTransform(e){const t=this.localTransform;if(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),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let el=ed;el.IDENTITY=new ed;var dT=`varying vec2 vTextureCoord;
21
21
 
22
22
  uniform sampler2D uSampler;
23
23
 
24
24
  void main(void){
25
25
  gl_FragColor *= texture2D(uSampler, vTextureCoord);
26
- }`,yw=`attribute vec2 aVertexPosition;
26
+ }`,pT=`attribute vec2 aVertexPosition;
27
27
  attribute vec2 aTextureCoord;
28
28
 
29
29
  uniform mat3 projectionMatrix;
@@ -34,7 +34,7 @@ void main(void){
34
34
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
35
35
  vTextureCoord = aTextureCoord;
36
36
  }
37
- `;function id(e,t,r){const n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}function au(e){const t=new Array(e);for(let r=0;r<t.length;r++)t[r]=!1;return t}function sd(e,t){switch(e){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return au(2*t);case"bvec3":return au(3*t);case"bvec4":return au(4*t);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 _i=[{test:e=>e.type==="float"&&e.size===1&&!e.isArray,code:e=>`
37
+ `;function rd(e,t,r){const n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}function rl(e){const t=new Array(e);for(let r=0;r<t.length;r++)t[r]=!1;return t}function nd(e,t){switch(e){case"float":return 0;case"vec2":return new Float32Array(2*t);case"vec3":return new Float32Array(3*t);case"vec4":return new Float32Array(4*t);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*t);case"ivec3":return new Int32Array(3*t);case"ivec4":return new Int32Array(4*t);case"uvec2":return new Uint32Array(2*t);case"uvec3":return new Uint32Array(3*t);case"uvec4":return new Uint32Array(4*t);case"bool":return!1;case"bvec2":return rl(2*t);case"bvec3":return rl(3*t);case"bvec4":return rl(4*t);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 li=[{test:e=>e.type==="float"&&e.size===1&&!e.isArray,code:e=>`
38
38
  if(uv["${e}"] !== ud["${e}"].value)
39
39
  {
40
40
  ud["${e}"].value = uv["${e}"]
@@ -154,7 +154,7 @@ void main(void){
154
154
  cv[3] = v[3];
155
155
 
156
156
  gl.uniform4f(ud["${e}"].location, v[0], v[1], v[2], v[3])
157
- }`}],_w={float:`
157
+ }`}],gT={float:`
158
158
  if (cv !== v)
159
159
  {
160
160
  cu.value = v;
@@ -290,28 +290,28 @@ void main(void){
290
290
  cu.value = v;
291
291
 
292
292
  gl.uniform1i(location, v);
293
- }`},bw={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 xw(e,t){var n;const r=[`
293
+ }`},mT={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 vT(e,t){var n;const r=[`
294
294
  var v = null;
295
295
  var cv = null;
296
296
  var cu = null;
297
297
  var t = 0;
298
298
  var gl = renderer.gl;
299
- `];for(const i in e.uniforms){const o=t[i];if(!o){(n=e.uniforms[i])!=null&&n.group&&(e.uniforms[i].ubo?r.push(`
300
- renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}');
299
+ `];for(const s in e.uniforms){const a=t[s];if(!a){(n=e.uniforms[s])!=null&&n.group&&(e.uniforms[s].ubo?r.push(`
300
+ renderer.shader.syncUniformBufferGroup(uv.${s}, '${s}');
301
301
  `):r.push(`
302
- renderer.shader.syncUniformGroup(uv.${i}, syncData);
303
- `));continue}const a=e.uniforms[i];let u=!1;for(let f=0;f<_i.length;f++)if(_i[f].test(o,a)){r.push(_i[f].code(i,a)),u=!0;break}if(!u){const h=(o.size===1&&!o.isArray?_w:bw)[o.type].replace("location",`ud["${i}"].location`);r.push(`
304
- cu = ud["${i}"];
302
+ renderer.shader.syncUniformGroup(uv.${s}, syncData);
303
+ `));continue}const u=e.uniforms[s];let l=!1;for(let c=0;c<li.length;c++)if(li[c].test(a,u)){r.push(li[c].code(s,u)),l=!0;break}if(!l){const f=(a.size===1&&!a.isArray?gT:mT)[a.type].replace("location",`ud["${s}"].location`);r.push(`
304
+ cu = ud["${s}"];
305
305
  cv = cu.value;
306
- v = uv["${i}"];
307
- ${h};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
308
- `))}const od={};let bi=od;function ww(){if(bi===od||bi!=null&&bi.isContextLost()){const e=Dt.ADAPTER.createCanvas();let t;Dt.PREFER_ENV>=Cn.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),bi=t}return bi}let _o;function Tw(){if(!_o){_o=ar.MEDIUM;const e=ww();e&&e.getShaderPrecisionFormat&&(_o=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?ar.HIGH:ar.MEDIUM)}return _o}function ad(e,t){const r=e.getShaderSource(t).split(`
309
- `).map((h,d)=>`${d}: ${h}`),n=e.getShaderInfoLog(t),i=n.split(`
310
- `),o={},a=i.map(h=>parseFloat(h.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(h=>h&&!o[h]?(o[h]=!0,!0):!1),u=[""];a.forEach(h=>{r[h-1]=`%c${r[h-1]}%c`,u.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const f=r.join(`
311
- `);u[0]=f,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...u),console.groupEnd()}function Ew(e,t,r,n){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(r,e.COMPILE_STATUS)||ad(e,r),e.getShaderParameter(n,e.COMPILE_STATUS)||ad(e,n),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const Sw={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 ld(e){return Sw[e]}let bo=null;const ud={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 fd(e,t){if(!bo){const r=Object.keys(ud);bo={};for(let n=0;n<r.length;++n){const i=r[n];bo[e[i]]=ud[i]}}return bo[t]}function cd(e,t,r){if(e.substring(0,9)!=="precision"){let n=t;return t===ar.HIGH&&r!==ar.HIGH&&(n=ar.MEDIUM),`precision ${n} float;
312
- ${e}`}else if(r!==ar.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}let ds;function Aw(){if(typeof ds=="boolean")return ds;try{ds=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{ds=!1}return ds}let Ow=0;const xo={},xi=class{constructor(e,t,r="pixi-shader",n={}){this.extra={},this.id=Ow++,this.vertexSrc=e||xi.defaultVertexSrc,this.fragmentSrc=t||xi.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),xo[r]?(xo[r]++,r+=`-${xo[r]}`):xo[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
306
+ v = uv["${s}"];
307
+ ${f};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
308
+ `))}const id={};let hi=id;function yT(){if(hi===id||hi!=null&&hi.isContextLost()){const e=_t.ADAPTER.createCanvas();let t;_t.PREFER_ENV>=vn.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),hi=t}return hi}let fa;function _T(){if(!fa){fa=qe.MEDIUM;const e=yT();e&&e.getShaderPrecisionFormat&&(fa=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?qe.HIGH:qe.MEDIUM)}return fa}function sd(e,t){const r=e.getShaderSource(t).split(`
309
+ `).map((f,p)=>`${p}: ${f}`),n=e.getShaderInfoLog(t),s=n.split(`
310
+ `),a={},u=s.map(f=>parseFloat(f.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(f=>f&&!a[f]?(a[f]=!0,!0):!1),l=[""];u.forEach(f=>{r[f-1]=`%c${r[f-1]}%c`,l.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=r.join(`
311
+ `);l[0]=c,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function xT(e,t,r,n){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(r,e.COMPILE_STATUS)||sd(e,r),e.getShaderParameter(n,e.COMPILE_STATUS)||sd(e,n),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const bT={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 ad(e){return bT[e]}let da=null;const od={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 ud(e,t){if(!da){const r=Object.keys(od);da={};for(let n=0;n<r.length;++n){const s=r[n];da[e[s]]=od[s]}}return da[t]}function ld(e,t,r){if(e.substring(0,9)!=="precision"){let n=t;return t===qe.HIGH&&r!==qe.HIGH&&(n=qe.MEDIUM),`precision ${n} float;
312
+ ${e}`}else if(r!==qe.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}let ss;function TT(){if(typeof ss=="boolean")return ss;try{ss=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{ss=!1}return ss}let wT=0;const pa={},ci=class{constructor(e,t,r="pixi-shader",n={}){this.extra={},this.id=wT++,this.vertexSrc=e||ci.defaultVertexSrc,this.fragmentSrc=t||ci.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=n,this.vertexSrc.substring(0,8)!=="#version"&&(r=r.replace(/\s+/g,"-"),pa[r]?(pa[r]++,r+=`-${pa[r]}`):pa[r]=1,this.vertexSrc=`#define SHADER_NAME ${r}
313
313
  ${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${r}
314
- ${this.fragmentSrc}`,this.vertexSrc=cd(this.vertexSrc,xi.defaultVertexPrecision,ar.HIGH),this.fragmentSrc=cd(this.fragmentSrc,xi.defaultFragmentPrecision,Tw())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return yw}static get defaultFragmentSrc(){return mw}static from(e,t,r){const n=e+t;let i=Yh[n];return i||(Yh[n]=i=new xi(e,t,r)),i}};let Xr=xi;Xr.defaultVertexPrecision=ar.HIGH,Xr.defaultFragmentPrecision=oi.apple.device?ar.HIGH:ar.MEDIUM;let Cw=0;class br{constructor(t,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Cw++,this.static=!!r,this.ubo=!!n,t instanceof Qe?(this.buffer=t,this.buffer.type=Fr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new Qe(new Float32Array(1)),this.buffer.type=Fr.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(t,r,n){if(!this.ubo)this.uniforms[t]=new br(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(t,r,n){return new br(t,r,n)}static uboFrom(t,r){return new br(t,r??!0,!0)}}class ps{constructor(t,r){this.uniformBindCount=0,this.program=t,r?r instanceof br?this.uniformGroup=r:this.uniformGroup=new br(r):this.uniformGroup=new br({}),this.disposeRunner=new _r("disposeShader")}checkUniformExists(t,r){if(r.uniforms[t])return!0;for(const n in r.uniforms){const i=r.uniforms[n];if(i.group&&this.checkUniformExists(t,i))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(t,r,n){const i=Xr.from(t,r);return new ps(i,n)}}class Rw{constructor(t,r){if(this.vertexSrc=t,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(t){if(!this.programCache[t]){const n=new Int32Array(t);for(let o=0;o<t;o++)n[o]=o;this.defaultGroupCache[t]=br.from({uSamplers:n},!0);let i=this.fragTemplate;i=i.replace(/%count%/gi,`${t}`),i=i.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Xr(this.vertexSrc,i)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:this.defaultGroupCache[t]};return new ps(this.programCache[t],r)}generateSampleSrc(t){let r="";r+=`
314
+ ${this.fragmentSrc}`,this.vertexSrc=ld(this.vertexSrc,ci.defaultVertexPrecision,qe.HIGH),this.fragmentSrc=ld(this.fragmentSrc,ci.defaultFragmentPrecision,_T())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return pT}static get defaultFragmentSrc(){return dT}static from(e,t,r){const n=e+t;let s=qf[n];return s||(qf[n]=s=new ci(e,t,r)),s}};let Br=ci;Br.defaultVertexPrecision=qe.HIGH,Br.defaultFragmentPrecision=Kn.apple.device?qe.HIGH:qe.MEDIUM;let ST=0;class ar{constructor(t,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=ST++,this.static=!!r,this.ubo=!!n,t instanceof Re?(this.buffer=t,this.buffer.type=Ar.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new Re(new Float32Array(1)),this.buffer.type=Ar.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(t,r,n){if(!this.ubo)this.uniforms[t]=new ar(r,n);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(t,r,n){return new ar(t,r,n)}static uboFrom(t,r){return new ar(t,r??!0,!0)}}class as{constructor(t,r){this.uniformBindCount=0,this.program=t,r?r instanceof ar?this.uniformGroup=r:this.uniformGroup=new ar(r):this.uniformGroup=new ar({}),this.disposeRunner=new sr("disposeShader")}checkUniformExists(t,r){if(r.uniforms[t])return!0;for(const n in r.uniforms){const s=r.uniforms[n];if(s.group&&this.checkUniformExists(t,s))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(t,r,n){const s=Br.from(t,r);return new as(s,n)}}class AT{constructor(t,r){if(this.vertexSrc=t,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(t){if(!this.programCache[t]){const n=new Int32Array(t);for(let a=0;a<t;a++)n[a]=a;this.defaultGroupCache[t]=ar.from({uSamplers:n},!0);let s=this.fragTemplate;s=s.replace(/%count%/gi,`${t}`),s=s.replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Br(this.vertexSrc,s)}const r={tint:new Float32Array([1,1,1,1]),translationMatrix:new Pe,default:this.defaultGroupCache[t]};return new as(this.programCache[t],r)}generateSampleSrc(t){let r="";r+=`
315
315
  `,r+=`
316
316
  `;for(let n=0;n<t;n++)n>0&&(r+=`
317
317
  else `),n<t-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
@@ -319,7 +319,7 @@ else `),n<t-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
319
319
  color = texture2D(uSamplers[${n}], vTextureCoord);`,r+=`
320
320
  }`;return r+=`
321
321
  `,r+=`
322
- `,r}}class lu{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function Iw(){return!oi.apple.device}function Pw(e){let t=!0;const r=Dt.ADAPTER.getNavigator();if(oi.tablet||oi.phone){if(oi.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(t=!1)}if(oi.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(t=!1)}}return t?e:4}class hd{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var Nw=`varying vec2 vTextureCoord;
322
+ `,r}}class nl{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function CT(){return!Kn.apple.device}function ET(e){let t=!0;const r=_t.ADAPTER.getNavigator();if(Kn.tablet||Kn.phone){if(Kn.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(t=!1)}if(Kn.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(t=!1)}}return t?e:4}class hd{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var IT=`varying vec2 vTextureCoord;
323
323
  varying vec4 vColor;
324
324
  varying float vTextureId;
325
325
  uniform sampler2D uSamplers[%count%];
@@ -329,7 +329,7 @@ void main(void){
329
329
  %forloop%
330
330
  gl_FragColor = color * vColor;
331
331
  }
332
- `,Mw=`precision highp float;
332
+ `,RT=`precision highp float;
333
333
  attribute vec2 aVertexPosition;
334
334
  attribute vec2 aTextureCoord;
335
335
  attribute vec4 aColor;
@@ -350,14 +350,14 @@ void main(void){
350
350
  vTextureId = aTextureId;
351
351
  vColor = aColor * tint;
352
352
  }
353
- `;const xr=class extends hd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=ed,this.vertexSize=6,this.state=po.for2d(),this.size=xr.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),e.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??Pw(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Iw(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Ht("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return Mw}static get defaultFragmentTemplate(){return Nw}setShaderGenerator({vertex:e=xr.defaultVertexSrc,fragment:t=xr.defaultFragmentTemplate}={}){this.shaderGenerator=new Rw(e,t)}contextChange(){const e=this.renderer.gl;Dt.PREFER_ENV===Cn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),xr.defaultMaxTextures),this.maxTextures=aw(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=xr,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new ru);for(;t.length<n;)t.push(new lu);for(let i=0;i<this.maxTextures;i++)this._tempBoundTextures[i]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=xr._textureArrayPool,n=this.renderer.batch,i=this._tempBoundTextures,o=this.renderer.textureGC.count;let a=++Kt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let d=0;d<this._bufferSize;++d){const p=e[d];e[d]=null,p._batchEnabled!==a&&(f.count>=t&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,d),h=d,f=r[++u],++a),p._batchEnabled=a,p.touched=o,f.elements[f.count++]=p)}f.count>0&&(n.boundArray(f,i,a,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++a);for(let d=0;d<i.length;d++)i[d]=null;Kt._globalBatch=a}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:o,vertexSize:a}=this,u=xr._drawCallPool;let f=this._dcIndex,h=this._aIndex,d=this._iIndex,p=u[f];p.start=this._iIndex,p.texArray=e;for(let c=t;c<r;++c){const v=n[c],y=v._texture.baseTexture,_=ew[y.alphaMode?1:0][v.blendMode];n[c]=null,t<c&&p.blend!==_&&(p.size=d-p.start,t=c,p=u[++f],p.texArray=e,p.start=d),this.packInterleavedGeometry(v,i,o,h,d),h+=v.vertexData.length/2*a,d+=v.indices.length,p.blend=_}t<r&&(p.size=d-p.start,++f),this._dcIndex=f,this._aIndex=h,this._iIndex=d}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;xr.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=xr._drawCallPool;let i=null;for(let o=0;o<e;o++){const{texArray:a,type:u,size:f,start:h,blend:d}=n[o];i!==a&&(i=a,this.bindAndClearTexArray(a)),this.state.blendMode=d,r.set(this.state),t.drawElements(u,f,t.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),xr.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].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(e){const t=fo(Math.ceil(e/8)),r=Kh(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._aBuffers[n];return i||(this._aBuffers[n]=i=new iw(n*this.vertexSize*4)),i}getIndexBuffer(e){const t=fo(Math.ceil(e/12)),r=Kh(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let i=this._iBuffers[r];return i||(this._iBuffers[r]=i=new Uint16Array(n)),i}packInterleavedGeometry(e,t,r,n,i){const{uint32View:o,float32View:a}=t,u=n/this.vertexSize,f=e.uvs,h=e.indices,d=e.vertexData,p=e._texture.baseTexture._batchLocation,c=Math.min(e.worldAlpha,1),v=Be.shared.setValue(e._tintRGB).toPremultiplied(c);for(let y=0;y<d.length;y+=2)a[n++]=d[y],a[n++]=d[y+1],a[n++]=f[y],a[n++]=f[y+1],o[n++]=v,a[n++]=p;for(let y=0;y<h.length;y++)r[i++]=u+h[y]}};let wr=xr;wr.defaultBatchSize=4096,wr.extension={name:"batch",type:qt.RendererPlugin},wr._drawCallPool=[],wr._textureArrayPool=[],te.add(wr);var kw=`varying vec2 vTextureCoord;
353
+ `;const or=class extends hd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=Qf,this.vertexSize=6,this.state=oa.for2d(),this.size=or.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),e.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??ET(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??CT(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Rt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return RT}static get defaultFragmentTemplate(){return IT}setShaderGenerator({vertex:e=or.defaultVertexSrc,fragment:t=or.defaultFragmentTemplate}={}){this.shaderGenerator=new AT(e,t)}contextChange(){const e=this.renderer.gl;_t.PREFER_ENV===vn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),or.defaultMaxTextures),this.maxTextures=nT(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=or,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new Zu);for(;t.length<n;)t.push(new nl);for(let s=0;s<this.maxTextures;s++)this._tempBoundTextures[s]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=or._textureArrayPool,n=this.renderer.batch,s=this._tempBoundTextures,a=this.renderer.textureGC.count;let u=++Lt._globalBatch,l=0,c=r[0],f=0;n.copyBoundTextures(s,t);for(let p=0;p<this._bufferSize;++p){const m=e[p];e[p]=null,m._batchEnabled!==u&&(c.count>=t&&(n.boundArray(c,s,u,t),this.buildDrawCalls(c,f,p),f=p,c=r[++l],++u),m._batchEnabled=u,m.touched=a,c.elements[c.count++]=m)}c.count>0&&(n.boundArray(c,s,u,t),this.buildDrawCalls(c,f,this._bufferSize),++l,++u);for(let p=0;p<s.length;p++)s[p]=null;Lt._globalBatch=u}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:s,_indexBuffer:a,vertexSize:u}=this,l=or._drawCallPool;let c=this._dcIndex,f=this._aIndex,p=this._iIndex,m=l[c];m.start=this._iIndex,m.texArray=e;for(let g=t;g<r;++g){const x=n[g],y=x._texture.baseTexture,S=Zb[y.alphaMode?1:0][x.blendMode];n[g]=null,t<g&&m.blend!==S&&(m.size=p-m.start,t=g,m=l[++c],m.texArray=e,m.start=p),this.packInterleavedGeometry(x,s,a,f,p),f+=x.vertexData.length/2*u,p+=x.indices.length,m.blend=S}t<r&&(m.size=p-m.start,++c),this._dcIndex=c,this._aIndex=f,this._iIndex=p}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;or.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=or._drawCallPool;let s=null;for(let a=0;a<e;a++){const{texArray:u,type:l,size:c,start:f,blend:p}=n[a];s!==u&&(s=u,this.bindAndClearTexArray(u)),this.state.blendMode=p,r.set(this.state),t.drawElements(l,c,t.UNSIGNED_SHORT,f*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),or.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].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(e){const t=ia(Math.ceil(e/8)),r=Wf(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let s=this._aBuffers[n];return s||(this._aBuffers[n]=s=new tT(n*this.vertexSize*4)),s}getIndexBuffer(e){const t=ia(Math.ceil(e/12)),r=Wf(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let s=this._iBuffers[r];return s||(this._iBuffers[r]=s=new Uint16Array(n)),s}packInterleavedGeometry(e,t,r,n,s){const{uint32View:a,float32View:u}=t,l=n/this.vertexSize,c=e.uvs,f=e.indices,p=e.vertexData,m=e._texture.baseTexture._batchLocation,g=Math.min(e.worldAlpha,1),x=Ce.shared.setValue(e._tintRGB).toPremultiplied(g);for(let y=0;y<p.length;y+=2)u[n++]=p[y],u[n++]=p[y+1],u[n++]=c[y],u[n++]=c[y+1],a[n++]=x,u[n++]=m;for(let y=0;y<f.length;y++)r[s++]=l+f[y]}};let ur=or;ur.defaultBatchSize=4096,ur.extension={name:"batch",type:Ct.RendererPlugin},ur._drawCallPool=[],ur._textureArrayPool=[],Gt.add(ur);var PT=`varying vec2 vTextureCoord;
354
354
 
355
355
  uniform sampler2D uSampler;
356
356
 
357
357
  void main(void){
358
358
  gl_FragColor = texture2D(uSampler, vTextureCoord);
359
359
  }
360
- `,Lw=`attribute vec2 aVertexPosition;
360
+ `,MT=`attribute vec2 aVertexPosition;
361
361
 
362
362
  uniform mat3 projectionMatrix;
363
363
 
@@ -383,7 +383,7 @@ void main(void)
383
383
  gl_Position = filterVertexPosition();
384
384
  vTextureCoord = filterTextureCoord();
385
385
  }
386
- `;const vs=class extends ps{constructor(e,t,r){const n=Xr.from(e||vs.defaultVertexSrc,t||vs.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=vs.defaultResolution,this.multisample=vs.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new po}apply(e,t,r,n,i){e.applyFilter(this,t,r,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return Lw}static get defaultFragmentSrc(){return kw}};let Zt=vs;Zt.defaultResolution=1,Zt.defaultMultisample=Te.NONE;class wo{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Be(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:i}=t,o=n??r;o!==void 0&&(this.color=o),this.alpha=i}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}wo.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},wo.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"background"},te.add(wo);class dd{constructor(t){this.renderer=t,this.emptyRenderer=new hd(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,r){const{boundTextures:n}=this.renderer.texture;for(let i=r-1;i>=0;--i)t[i]=n[i]||null,t[i]&&(t[i]._batchLocation=i)}boundArray(t,r,n,i){const{elements:o,ids:a,count:u}=t;let f=0;for(let h=0;h<u;h++){const d=o[h],p=d._batchLocation;if(p>=0&&p<i&&r[p]===d){a[h]=p;continue}for(;f<i;){const c=r[f];if(c&&c._batchEnabled===n&&c._batchLocation===f){f++;continue}a[h]=f,d._batchLocation=f,r[f]=d;break}}}destroy(){this.renderer=null}}dd.extension={type:qt.RendererSystem,name:"batch"},te.add(dd);let pd=0;class To{constructor(t){this.renderer=t,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(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=pd++}init(t){if(t.context)this.initFromContext(t.context);else{const r=this.renderer.background.alpha<1,n=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=pd++,this.renderer.runners.contextChange.emit(t);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const r=this.createContext(this.renderer.view,t);this.initFromContext(r)}createContext(t,r){let n;if(Dt.PREFER_ENV>=Cn.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const i=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=i,i||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}To.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},To.extension={type:qt.RendererSystem,name:"context"},te.add(To);class Fw extends eu{upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,a=r.realHeight;return n.width===o&&n.height===a?i.texSubImage2D(r.target,0,0,0,o,a,r.format,n.type,this.data):(n.width=o,n.height=a,i.texImage2D(r.target,0,n.internalFormat,o,a,0,r.format,n.type,this.data)),!0}}class uu{constructor(t,r){this.width=Math.round(t||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 _r("disposeFramebuffer"),this.multisample=Te.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new Kt(null,{scaleMode:Lr.NEAREST,resolution:1,mipmap:Rn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Kt(new Fw(null,{width:this.width,height:this.height}),{scaleMode:Lr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Rn.OFF,format:bt.DEPTH_COMPONENT,type:Xt.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(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const i=this.colorTextures[n],o=i.resolution;i.setSize(t/o,r/o)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class vd extends Kt{constructor(t={}){if(typeof t=="number"){const r=arguments[0],n=arguments[1],i=arguments[2],o=arguments[3];t={width:r,height:n,scaleMode:i,resolution:o}}t.width=t.width||100,t.height=t.height||100,t.multisample??(t.multisample=Te.NONE),super(null,t),this.mipmap=Rn.OFF,this.valid=!0,this._clear=new Be([0,0,0,0]),this.framebuffer=new uu(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,r){this.framebuffer.resize(t*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 dn extends fs{constructor(t){const r=t,n=r.naturalWidth||r.videoWidth||r.width,i=r.naturalHeight||r.videoHeight||r.height;super(n,i),this.source=t,this.noSubImage=!1}static crossOrigin(t,r,n){n===void 0&&!r.startsWith("data:")?t.crossOrigin=nw(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,i){const o=t.gl,a=r.realWidth,u=r.realHeight;if(i=i||this.source,typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement){if(!i.complete||i.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&i instanceof HTMLVideoElement&&i.readyState<=1&&i.buffered.length===0)return!1;return o.pixelStorei(o.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK),!this.noSubImage&&r.target===o.TEXTURE_2D&&n.width===a&&n.height===u?o.texSubImage2D(o.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=a,n.height=u,o.texImage2D(r.target,0,n.internalFormat,r.format,n.type,i)),!0}update(){if(this.destroyed)return;const t=this.source,r=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class gd extends dn{constructor(t,r){if(r=r||{},typeof t=="string"){const n=new Image;dn.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}super(t),!t.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??Dt.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(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((r,n)=>{const i=this.source;this.url=i.src;const o=()=>{this.destroyed||(i.onload=null,i.onerror=null,this.resize(i.width,i.height),this._load=null,this.createBitmap?r(this.process()):r(this))};i.complete&&i.src?o():(i.onload=o,i.onerror=a=>{n(a),this.onError.emit(a)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:n?"cors":"no-cors"}).then(i=>i.blob()).then(i=>r(i,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ln.UNPACK?"premultiply":"none"})).then(i=>this.destroyed?Promise.reject():(this.bitmap=i,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,r,n,this.bitmap),!this.preserveBitmap){let i=!0;const o=r._glTextures;for(const a in o){const u=o[a];if(u!==n&&u.dirtyId!==r.dirtyId){i=!1;break}}i&&(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(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class md{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(t,r,n){const i=r.width,o=r.height;if(n){const a=t.width/2/i,u=t.height/2/o,f=t.x/i+a,h=t.y/o+u;n=ve.add(n,ve.NW),this.x0=f+a*ve.uX(n),this.y0=h+u*ve.uY(n),n=ve.add(n,2),this.x1=f+a*ve.uX(n),this.y1=h+u*ve.uY(n),n=ve.add(n,2),this.x2=f+a*ve.uX(n),this.y2=h+u*ve.uY(n),n=ve.add(n,2),this.x3=f+a*ve.uX(n),this.y3=h+u*ve.uY(n)}else this.x0=t.x/i,this.y0=t.y/o,this.x1=(t.x+t.width)/i,this.y1=t.y/o,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/o,this.x3=t.x/i,this.y3=(t.y+t.height)/o;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 yd=new md;function Eo(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Wt extends Ws{constructor(t,r,n,i,o,a,u){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new ie(0,0,1,1)),t instanceof Wt&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=i,this.valid=!1,this._uvs=yd,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(o||0),o===!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 oe(a.x,a.y):new oe(0,0),this.defaultBorders=u,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=r:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:r}=this.baseTexture;r!=null&&r.url&&$r[r.url]&&Wt.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,Wt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Wt(this.baseTexture,!this.noFrame&&t,r,(i=this.trim)==null?void 0:i.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=t),n}updateUvs(){this._uvs===yd&&(this._uvs=new md),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=Dt.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Kt){if(!t.cacheId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${u}-${us()}`,Kt.addToCache(t,t.cacheId)}o=t.cacheId}else{if(!t._pixiId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t._pixiId=`${u}_${us()}`}o=t._pixiId}let a=$r[o];if(i&&n&&!a)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!a&&!(t instanceof Kt)?(r.resolution||(r.resolution=Zh(t)),a=new Wt(new Kt(t,r)),a.baseTexture.cacheId=o,Kt.addToCache(a.baseTexture,o),Wt.addToCache(a,o)):!a&&t instanceof Kt&&(a=new Wt(t),Wt.addToCache(a,o)),a}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Wt.from(t,Object.assign({resourceOptions:n},r),!1),o=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):o.load().then(()=>Promise.resolve(i))}static fromBuffer(t,r,n,i){return new Wt(Kt.fromBuffer(t,r,n,i))}static fromLoader(t,r,n,i){const o=new Kt(t,Object.assign({scaleMode:Kt.defaultOptions.scaleMode,resolution:Zh(r)},i)),{resource:a}=o;a instanceof gd&&(a.url=r);const u=new Wt(o);return n||(n=r),Kt.addToCache(u.baseTexture,n),Wt.addToCache(u,n),n!==r&&(Kt.addToCache(u.baseTexture,r),Wt.addToCache(u,r)),u.baseTexture.valid?Promise.resolve(u):new Promise(f=>{u.baseTexture.once("loaded",()=>f(u))})}static addToCache(t,r){r&&(t.textureCacheIds.includes(r)||t.textureCacheIds.push(r),$r[r]&&$r[r]!==t&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),$r[r]=t)}static removeFromCache(t){if(typeof t=="string"){const r=$r[t];if(r){const n=r.textureCacheIds.indexOf(t);return n>-1&&r.textureCacheIds.splice(n,1),delete $r[t],r}}else if(t!=null&&t.textureCacheIds){for(let r=0;r<t.textureCacheIds.length;++r)$r[t.textureCacheIds[r]]===t&&delete $r[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:r,y:n,width:i,height:o}=t,a=r+i>this.baseTexture.width,u=n+o>this.baseTexture.height;if(a||u){const f=a&&u?"and":"or",h=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,d=`Y: ${n} + ${o} = ${n+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${f} ${d}`)}this.valid=i&&o&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Wt._EMPTY||(Wt._EMPTY=new Wt(new Kt),Eo(Wt._EMPTY),Eo(Wt._EMPTY.baseTexture)),Wt._EMPTY}static get WHITE(){if(!Wt._WHITE){const t=Dt.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Wt._WHITE=new Wt(Kt.from(t)),Eo(Wt._WHITE),Eo(Wt._WHITE.baseTexture)}return Wt._WHITE}}class So extends Wt{constructor(t,r){super(t,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(t){this.framebuffer.multisample=t}resize(t,r,n=!0){const i=this.baseTexture.resolution,o=Math.round(t*i)/i,a=Math.round(r*i)/i;this.valid=o>0&&a>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=a,n&&this.baseTexture.resize(o,a),this.updateUvs()}setResolution(t){const{baseTexture:r}=this;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))}static create(t){return new So(new vd(t))}}class _d{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=Te.NONE){const i=new vd(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new So(i)}getOptimalTexture(t,r,n=1,i=Te.NONE){let o;t=Math.ceil(t*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||r!==this._pixelsHeight?(t=fo(t),r=fo(r),o=((t&65535)<<16|r&65535)>>>0,i>1&&(o+=i*4294967296)):o=i>1?-i:-1,this.texturePool[o]||(this.texturePool[o]=[]);let a=this.texturePool[o].pop();return a||(a=this.createTexture(t,r,i)),a.filterPoolKey=o,a.setResolution(n),a}getFilterTexture(t,r,n){const i=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||Te.NONE);return i.filterFrame=t.filterFrame,i}returnTexture(t){const r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let i=0;i<n.length;i++)n[i].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}_d.SCREEN_KEY=-1;class Bw extends yi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Dw extends yi{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 Qe(this.vertices),this.uvBuffer=new Qe(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,r){let n=0,i=0;return this.uvs[0]=n,this.uvs[1]=i,this.uvs[2]=n+r.width/t.width,this.uvs[3]=i,this.uvs[4]=n+r.width/t.width,this.uvs[5]=i+r.height/t.height,this.uvs[6]=n,this.uvs[7]=i+r.height/t.height,n=r.x,i=r.y,this.vertices[0]=n,this.vertices[1]=i,this.vertices[2]=n+r.width,this.vertices[3]=i,this.vertices[4]=n+r.width,this.vertices[5]=i+r.height,this.vertices[6]=n,this.vertices[7]=i+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class Uw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=Te.NONE,this.sourceFrame=new ie,this.destinationFrame=new ie,this.bindingSourceFrame=new ie,this.bindingDestinationFrame=new ie,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const Ao=[new oe,new oe,new oe,new oe],fu=new $e;class bd{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new _d,this.statePool=[],this.quad=new Bw,this.quadUv=new Dw,this.tempRect=new ie,this.activeState={},this.globalUniforms=new br({outputFrame:new ie,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(t,r){const n=this.renderer,i=this.defaultFilterStack,o=this.statePool.pop()||new Uw,a=this.renderer.renderTexture;let u=r[0].resolution,f=r[0].multisample,h=r[0].padding,d=r[0].autoFit,p=r[0].legacy??!0;for(let y=1;y<r.length;y++){const _=r[y];u=Math.min(u,_.resolution),f=Math.min(f,_.multisample),h=this.useMaxPadding?Math.max(h,_.padding):h+_.padding,d=d&&_.autoFit,p=p||(_.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=a.current),i.push(o),o.resolution=u,o.multisample=f,o.legacy=p,o.target=t,o.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),o.sourceFrame.pad(h);const c=this.tempRect.copyFrom(a.sourceFrame);n.projection.transform&&this.transformAABB(fu.copyFrom(n.projection.transform).invert(),c),d?(o.sourceFrame.fit(c),(o.sourceFrame.width<=0||o.sourceFrame.height<=0)&&(o.sourceFrame.width=0,o.sourceFrame.height=0)):o.sourceFrame.intersects(c)||(o.sourceFrame.width=0,o.sourceFrame.height=0),this.roundFrame(o.sourceFrame,a.current?a.current.resolution:n.resolution,a.sourceFrame,a.destinationFrame,n.projection.transform),o.renderTexture=this.getOptimalFilterTexture(o.sourceFrame.width,o.sourceFrame.height,u,f),o.filters=r,o.destinationFrame.width=o.renderTexture.width,o.destinationFrame.height=o.renderTexture.height;const v=this.tempRect;v.x=0,v.y=0,v.width=o.sourceFrame.width,v.height=o.sourceFrame.height,o.renderTexture.filterFrame=o.sourceFrame,o.bindingSourceFrame.copyFrom(a.sourceFrame),o.bindingDestinationFrame.copyFrom(a.destinationFrame),o.transform=n.projection.transform,n.projection.transform=null,a.bind(o.renderTexture,o.sourceFrame,v),n.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,r=t.pop(),n=r.filters;this.activeState=r;const i=this.globalUniforms.uniforms;i.outputFrame=r.sourceFrame,i.resolution=r.resolution;const o=i.inputSize,a=i.inputPixel,u=i.inputClamp;if(o[0]=r.destinationFrame.width,o[1]=r.destinationFrame.height,o[2]=1/o[0],o[3]=1/o[1],a[0]=Math.round(o[0]*r.resolution),a[1]=Math.round(o[1]*r.resolution),a[2]=1/a[0],a[3]=1/a[1],u[0]=.5*a[2],u[1]=.5*a[3],u[2]=r.sourceFrame.width*o[2]-.5*a[2],u[3]=r.sourceFrame.height*o[3]-.5*a[3],r.legacy){const h=i.filterArea;h[0]=r.destinationFrame.width,h[1]=r.destinationFrame.height,h[2]=r.sourceFrame.x,h[3]=r.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();const f=t[t.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,f.renderTexture,In.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 p=0;for(p=0;p<n.length-1;++p){p===1&&r.multisample>1&&(d=this.getOptimalFilterTexture(h.width,h.height,r.resolution),d.filterFrame=h.filterFrame),n[p].apply(this,h,d,In.CLEAR,r);const c=h;h=d,d=c}n[p].apply(this,h,f.renderTexture,In.BLEND,r),p>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(h),this.returnFilterTexture(d)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=In.CLEAR){const{renderTexture:n,state:i}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const a=this.tempRect;a.x=0,a.y=0,a.width=t.filterFrame.width,a.height=t.filterFrame.height,n.bind(t,t.filterFrame,a)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const o=i.stateId&1||this.forceClear;(r===In.CLEAR||r===In.BLIT&&o)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,r,n,i){const o=this.renderer;o.state.set(t.state),this.bindAndClear(n,i),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,o.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),o.geometry.bind(this.quadUv),o.geometry.draw(an.TRIANGLES)):(o.geometry.bind(this.quad),o.geometry.draw(an.TRIANGLE_STRIP))}calculateSpriteMatrix(t,r){const{sourceFrame:n,destinationFrame:i}=this.activeState,{orig:o}=r._texture,a=t.set(i.width,0,0,i.height,n.x,n.y),u=r.worldTransform.copyTo($e.TEMP_MATRIX);return u.invert(),a.prepend(u),a.scale(1/o.width,1/o.height),a.translate(r.anchor.x,r.anchor.y),a}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,i=Te.NONE){return this.texturePool.getOptimalTexture(t,r,n,i)}getFilterTexture(t,r,n){if(typeof t=="number"){const o=t;t=r,r=o}t=t||this.activeState.renderTexture;const i=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||Te.NONE);return i.filterFrame=t.filterFrame,i}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,r){const n=Ao[0],i=Ao[1],o=Ao[2],a=Ao[3];n.set(r.left,r.top),i.set(r.left,r.bottom),o.set(r.right,r.top),a.set(r.right,r.bottom),t.apply(n,n),t.apply(i,i),t.apply(o,o),t.apply(a,a);const u=Math.min(n.x,i.x,o.x,a.x),f=Math.min(n.y,i.y,o.y,a.y),h=Math.max(n.x,i.x,o.x,a.x),d=Math.max(n.y,i.y,o.y,a.y);r.x=u,r.y=f,r.width=h-u,r.height=d-f}roundFrame(t,r,n,i,o){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(o){const{a,b:u,c:f,d:h}=o;if((Math.abs(u)>1e-4||Math.abs(f)>1e-4)&&(Math.abs(a)>1e-4||Math.abs(h)>1e-4))return}o=o?fu.copyFrom(o):fu.identity(),o.translate(-n.x,-n.y).scale(i.width/n.width,i.height/n.height).translate(i.x,i.y),this.transformAABB(o,t),t.ceil(r),this.transformAABB(o.invert(),t)}}}bd.extension={type:qt.RendererSystem,name:"filter"},te.add(bd);class $w{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=Te.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Gw=new ie;class xd{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new uu(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ie,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Dt.PREFER_ENV===Cn.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=i=>r.drawBuffersWEBGL(i):(this.hasMRT=!1,t.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,r,n=0){const{gl:i}=this;if(t){const o=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,o.framebuffer)),o.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,o.mipLevel=n),o.dirtyId!==t.dirtyId&&(o.dirtyId=t.dirtyId,o.dirtyFormat!==t.dirtyFormat?(o.dirtyFormat=t.dirtyFormat,o.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):o.dirtySize!==t.dirtySize&&(o.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let a=0;a<t.colorTextures.length;a++){const u=t.colorTextures[a];this.renderer.texture.unbind(u.parentTextureArray||u)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const a=r.width>>n,u=r.height>>n,f=a/r.width;this.setViewport(r.x*f,r.y*f,a,u)}else{const a=t.width>>n,u=t.height>>n;this.setViewport(0,0,a,u)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,r,n,i){const o=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i),(o.width!==n||o.height!==i||o.x!==t||o.y!==r)&&(o.x=t,o.y=r,o.width=n,o.height=i,this.gl.viewport(t,r,n,i))}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(t,r,n,i,o=il.COLOR|il.DEPTH){const{gl:a}=this;a.clearColor(t,r,n,i),a.clear(o)}initFramebuffer(t){const{gl:r}=this,n=new $w(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n}resizeFramebuffer(t){const{gl:r}=this,n=t.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));const i=t.colorTextures;let o=i.length;r.drawBuffers||(o=Math.min(o,1));for(let a=0;a<o;a++){const u=i[a],f=u.parentTextureArray||u;this.renderer.texture.bind(f,0),a===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,f._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,r){const{gl:n}=this,i=t.glFramebuffers[this.CONTEXT_UID],o=t.colorTextures;let a=o.length;n.drawBuffers||(a=Math.min(a,1)),i.multisample>1&&this.canMultisampleFramebuffer(t)?i.msaaBuffer=i.msaaBuffer||n.createRenderbuffer():i.msaaBuffer&&(n.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));const u=[];for(let f=0;f<a;f++){const h=o[f],d=h.parentTextureArray||h;this.renderer.texture.bind(d,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,d._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,i.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+f,h.target,d._glTextures[this.CONTEXT_UID].texture,r),u.push(n.COLOR_ATTACHMENT0+f))}if(u.length>1&&n.drawBuffers(u),t.depthTexture&&this.writeDepthTexture){const h=t.depthTexture;this.renderer.texture.bind(h,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,h._glTextures[this.CONTEXT_UID].texture,r)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(i.stencil=i.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,i.stencil),i.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,i.stencil)):i.stencil&&(n.deleteRenderbuffer(i.stencil),i.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:r}=this;let n=Te.NONE;if(t<=1||r===null)return n;for(let i=0;i<r.length;i++)if(r[i]<=t){n=r[i];break}return n===1&&(n=Te.NONE),n}blit(t,r,n){const{current:i,renderer:o,gl:a,CONTEXT_UID:u}=this;if(o.context.webGLVersion!==2||!i)return;const f=i.glFramebuffers[u];if(!f)return;if(!t){if(!f.msaaBuffer)return;const d=i.colorTextures[0];if(!d)return;f.blitFramebuffer||(f.blitFramebuffer=new uu(i.width,i.height),f.blitFramebuffer.addColorTexture(0,d)),t=f.blitFramebuffer,t.colorTextures[0]!==d&&(t.colorTextures[0]=d,t.dirtyId++,t.dirtyFormat++),(t.width!==i.width||t.height!==i.height)&&(t.width=i.width,t.height=i.height,t.dirtyId++,t.dirtySize++)}r||(r=Gw,r.width=i.width,r.height=i.height),n||(n=r);const h=r.width===n.width&&r.height===n.height;this.bind(t),a.bindFramebuffer(a.READ_FRAMEBUFFER,f.framebuffer),a.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,a.COLOR_BUFFER_BIT,h?a.NEAREST:a.LINEAR)}disposeFramebuffer(t,r){const n=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(!n)return;delete t.glFramebuffers[this.CONTEXT_UID];const o=this.managedFramebuffers.indexOf(t);o>=0&&this.managedFramebuffers.splice(o,1),t.disposeRunner.remove(this),r||(i.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&i.deleteRenderbuffer(n.msaaBuffer),n.stencil&&i.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(t){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],t)}forceStencil(){const t=this.current;if(!t)return;const r=t.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;t.stencil=!0;const n=t.width,i=t.height,o=this.gl,a=o.createRenderbuffer();o.bindRenderbuffer(o.RENDERBUFFER,a),r.msaaBuffer?o.renderbufferStorageMultisample(o.RENDERBUFFER,r.multisample,o.DEPTH24_STENCIL8,n,i):o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,n,i),r.stencil=a,o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.RENDERBUFFER,a)}reset(){this.current=this.unknownFramebuffer,this.viewport=new ie}destroy(){this.renderer=null}}xd.extension={type:qt.RendererSystem,name:"framebuffer"},te.add(xd);const cu={5126:4,5123:2,5121:1};class wd{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;Dt.PREFER_ENV===Cn.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=()=>n.createVertexArrayOES(),t.bindVertexArray=i=>n.bindVertexArrayOES(i),t.deleteVertexArray=i=>n.deleteVertexArrayOES(i)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=t.getExtension("ANGLE_instanced_arrays");n?(t.vertexAttribDivisor=(i,o)=>n.vertexAttribDivisorANGLE(i,o),t.drawElementsInstanced=(i,o,a,u,f)=>n.drawElementsInstancedANGLE(i,o,a,u,f),t.drawArraysInstanced=(i,o,a,u)=>n.drawArraysInstancedANGLE(i,o,a,u)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(t,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let i=t.glVertexArrayObjects[this.CONTEXT_UID],o=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},o=!0);const a=i[r.program.id]||this.initGeometryVao(t,r,o);this._activeGeometry=t,this._activeVao!==a&&(this._activeVao=a,this.hasVao?n.bindVertexArray(a):this.activateVao(t,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<t.buffers.length;n++){const i=t.buffers[n];r.update(i)}}checkCompatibility(t,r){const n=t.attributes,i=r.attributeData;for(const o in i)if(!n[o])throw new Error(`shader and geometry incompatible, geometry missing the "${o}" attribute`)}getSignature(t,r){const n=t.attributes,i=r.attributeData,o=["g",t.id];for(const a in n)i[a]&&o.push(a,i[a].location);return o.join("-")}initGeometryVao(t,r,n=!0){const i=this.gl,o=this.CONTEXT_UID,a=this.renderer.buffer,u=r.program;u.glPrograms[o]||this.renderer.shader.generateProgram(r),this.checkCompatibility(t,u);const f=this.getSignature(t,u),h=t.glVertexArrayObjects[this.CONTEXT_UID];let d=h[f];if(d)return h[u.id]=d,d;const p=t.buffers,c=t.attributes,v={},y={};for(const _ in p)v[_]=0,y[_]=0;for(const _ in c)!c[_].size&&u.attributeData[_]?c[_].size=u.attributeData[_].size:c[_].size||console.warn(`PIXI Geometry attribute '${_}' size cannot be determined (likely the bound shader does not have the attribute)`),v[c[_].buffer]+=c[_].size*cu[c[_].type];for(const _ in c){const b=c[_],m=b.size;b.stride===void 0&&(v[b.buffer]===m*cu[b.type]?b.stride=0:b.stride=v[b.buffer]),b.start===void 0&&(b.start=y[b.buffer],y[b.buffer]+=m*cu[b.type])}d=i.createVertexArray(),i.bindVertexArray(d);for(let _=0;_<p.length;_++){const b=p[_];a.bind(b),n&&b._glBuffers[o].refCount++}return this.activateVao(t,u),h[u.id]=d,h[f]=d,i.bindVertexArray(null),a.unbind(Fr.ARRAY_BUFFER),d}disposeGeometry(t,r){var u;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const n=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,o=t.buffers,a=(u=this.renderer)==null?void 0:u.buffer;if(t.disposeRunner.remove(this),!!n){if(a)for(let f=0;f<o.length;f++){const h=o[f]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&a.dispose(o[f],r))}if(!r){for(const f in n)if(f[0]==="g"){const h=n[f];this._activeVao===h&&this.unbind(),i.deleteVertexArray(h)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],t)}activateVao(t,r){const n=this.gl,i=this.CONTEXT_UID,o=this.renderer.buffer,a=t.buffers,u=t.attributes;t.indexBuffer&&o.bind(t.indexBuffer);let f=null;for(const h in u){const d=u[h],p=a[d.buffer],c=p._glBuffers[i];if(r.attributeData[h]){f!==c&&(o.bind(p),f=c);const v=r.attributeData[h].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,d.size,d.type||n.FLOAT,d.normalized,d.stride,d.start),d.instance)if(this.hasInstance)n.vertexAttribDivisor(v,d.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,i){const{gl:o}=this,a=this._activeGeometry;if(a.indexBuffer){const u=a.indexBuffer.data.BYTES_PER_ELEMENT,f=u===2?o.UNSIGNED_SHORT:o.UNSIGNED_INT;u===2||u===4&&this.canUseUInt32ElementIndex?a.instanced?o.drawElementsInstanced(t,r||a.indexBuffer.data.length,f,(n||0)*u,i||1):o.drawElements(t,r||a.indexBuffer.data.length,f,(n||0)*u):console.warn("unsupported index buffer type: uint32")}else a.instanced?o.drawArraysInstanced(t,n,r||a.getSize(),i||1):o.drawArrays(t,n,r||a.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}wd.extension={type:qt.RendererSystem,name:"geometry"},te.add(wd);const Td=new $e;class jw{constructor(t,r){this._texture=t,this.mapCoord=new $e,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(t){this._texture=t,this._textureID=-1}multiplyUvs(t,r){r===void 0&&(r=t);const n=this.mapCoord;for(let i=0;i<t.length;i+=2){const o=t[i],a=t[i+1];r[i]=o*n.a+a*n.c+n.tx,r[i+1]=o*n.b+a*n.d+n.ty}return r}update(t){const r=this._texture;if(!r||!r.valid||!t&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const i=r.orig,o=r.trim;o&&(Td.set(i.width/o.width,0,0,i.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(Td));const a=r.baseTexture,u=this.uClampFrame,f=this.clampMargin/a.resolution,h=this.clampOffset;return u[0]=(r._frame.x+f+h)/a.width,u[1]=(r._frame.y+f+h)/a.height,u[2]=(r._frame.x+r._frame.width-f+h)/a.width,u[3]=(r._frame.y+r._frame.height-f+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 qw=`varying vec2 vMaskCoord;
386
+ `;const os=class extends as{constructor(e,t,r){const n=Br.from(e||os.defaultVertexSrc,t||os.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=os.defaultResolution,this.multisample=os.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new oa}apply(e,t,r,n,s){e.applyFilter(this,t,r,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return MT}static get defaultFragmentSrc(){return PT}};let Dt=os;Dt.defaultResolution=1,Dt.defaultMultisample=fe.NONE;class ga{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Ce(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:s}=t,a=n??r;a!==void 0&&(this.color=a),this.alpha=s}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}ga.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},ga.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"background"},Gt.add(ga);class cd{constructor(t){this.renderer=t,this.emptyRenderer=new hd(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,r){const{boundTextures:n}=this.renderer.texture;for(let s=r-1;s>=0;--s)t[s]=n[s]||null,t[s]&&(t[s]._batchLocation=s)}boundArray(t,r,n,s){const{elements:a,ids:u,count:l}=t;let c=0;for(let f=0;f<l;f++){const p=a[f],m=p._batchLocation;if(m>=0&&m<s&&r[m]===p){u[f]=m;continue}for(;c<s;){const g=r[c];if(g&&g._batchEnabled===n&&g._batchLocation===c){c++;continue}u[f]=c,p._batchLocation=c,r[c]=p;break}}}destroy(){this.renderer=null}}cd.extension={type:Ct.RendererSystem,name:"batch"},Gt.add(cd);let fd=0;class ma{constructor(t){this.renderer=t,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(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=fd++}init(t){if(t.context)this.initFromContext(t.context);else{const r=this.renderer.background.alpha<1,n=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=fd++,this.renderer.runners.contextChange.emit(t);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const r=this.createContext(this.renderer.view,t);this.initFromContext(r)}createContext(t,r){let n;if(_t.PREFER_ENV>=vn.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}ma.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ma.extension={type:Ct.RendererSystem,name:"context"},Gt.add(ma);class OT extends Ku{upload(t,r,n){const s=t.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?s.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,s.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}}class il{constructor(t,r){this.width=Math.round(t||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 sr("disposeFramebuffer"),this.multisample=fe.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new Lt(null,{scaleMode:Sr.NEAREST,resolution:1,mipmap:yn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Lt(new OT(null,{width:this.width,height:this.height}),{scaleMode:Sr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:yn.OFF,format:Z.DEPTH_COMPONENT,type:Nt.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(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const s=this.colorTextures[n],a=s.resolution;s.setSize(t/a,r/a)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class dd extends Lt{constructor(t={}){if(typeof t=="number"){const r=arguments[0],n=arguments[1],s=arguments[2],a=arguments[3];t={width:r,height:n,scaleMode:s,resolution:a}}t.width=t.width||100,t.height=t.height||100,t.multisample??(t.multisample=fe.NONE),super(null,t),this.mipmap=yn.OFF,this.valid=!0,this._clear=new Ce([0,0,0,0]),this.framebuffer=new il(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,r){this.framebuffer.resize(t*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 rn extends rs{constructor(t){const r=t,n=r.naturalWidth||r.videoWidth||r.width,s=r.naturalHeight||r.videoHeight||r.height;super(n,s),this.source=t,this.noSubImage=!1}static crossOrigin(t,r,n){n===void 0&&!r.startsWith("data:")?t.crossOrigin=Qb(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,s){const a=t.gl,u=r.realWidth,l=r.realHeight;if(s=s||this.source,typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement){if(!s.complete||s.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&s instanceof HTMLVideoElement&&s.readyState<=1&&s.buffered.length===0)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK),!this.noSubImage&&r.target===a.TEXTURE_2D&&n.width===u&&n.height===l?a.texSubImage2D(a.TEXTURE_2D,0,0,0,r.format,n.type,s):(n.width=u,n.height=l,a.texImage2D(r.target,0,n.internalFormat,r.format,n.type,s)),!0}update(){if(this.destroyed)return;const t=this.source,r=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class pd extends rn{constructor(t,r){if(r=r||{},typeof t=="string"){const n=new Image;rn.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}super(t),!t.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??_t.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(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((r,n)=>{const s=this.source;this.url=s.src;const a=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.resize(s.width,s.height),this._load=null,this.createBitmap?r(this.process()):r(this))};s.complete&&s.src?a():(s.onload=a,s.onerror=u=>{n(u),this.onError.emit(u)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:n?"cors":"no-cors"}).then(s=>s.blob()).then(s=>r(s,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Zr.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,r,n,this.bitmap),!this.preserveBitmap){let s=!0;const a=r._glTextures;for(const u in a){const l=a[u];if(l!==n&&l.dirtyId!==r.dirtyId){s=!1;break}}s&&(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(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class gd{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(t,r,n){const s=r.width,a=r.height;if(n){const u=t.width/2/s,l=t.height/2/a,c=t.x/s+u,f=t.y/a+l;n=ne.add(n,ne.NW),this.x0=c+u*ne.uX(n),this.y0=f+l*ne.uY(n),n=ne.add(n,2),this.x1=c+u*ne.uX(n),this.y1=f+l*ne.uY(n),n=ne.add(n,2),this.x2=c+u*ne.uX(n),this.y2=f+l*ne.uY(n),n=ne.add(n,2),this.x3=c+u*ne.uX(n),this.y3=f+l*ne.uY(n)}else this.x0=t.x/s,this.y0=t.y/a,this.x1=(t.x+t.width)/s,this.y1=t.y/a,this.x2=(t.x+t.width)/s,this.y2=(t.y+t.height)/a,this.x3=t.x/s,this.y3=(t.y+t.height)/a;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 md=new gd;function va(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Ot extends Gs{constructor(t,r,n,s,a,u,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new jt(0,0,1,1)),t instanceof Ot&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=s,this.valid=!1,this._uvs=md,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(a||0),a===!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=u?new Wt(u.x,u.y):new Wt(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=r:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:r}=this.baseTexture;r!=null&&r.url&&Rr[r.url]&&Ot.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,Ot.removeFromCache(this),this.textureCacheIds=null}clone(){var s;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Ot(this.baseTexture,!this.noFrame&&t,r,(s=this.trim)==null?void 0:s.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=t),n}updateUvs(){this._uvs===md&&(this._uvs=new gd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=_t.STRICT_TEXTURE_CACHE){const s=typeof t=="string";let a=null;if(s)a=t;else if(t instanceof Lt){if(!t.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${es()}`,Lt.addToCache(t,t.cacheId)}a=t.cacheId}else{if(!t._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${es()}`}a=t._pixiId}let u=Rr[a];if(s&&n&&!u)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!u&&!(t instanceof Lt)?(r.resolution||(r.resolution=Yf(t)),u=new Ot(new Lt(t,r)),u.baseTexture.cacheId=a,Lt.addToCache(u.baseTexture,a),Ot.addToCache(u,a)):!u&&t instanceof Lt&&(u=new Ot(t),Ot.addToCache(u,a)),u}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),s=Ot.from(t,Object.assign({resourceOptions:n},r),!1),a=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):a.load().then(()=>Promise.resolve(s))}static fromBuffer(t,r,n,s){return new Ot(Lt.fromBuffer(t,r,n,s))}static fromLoader(t,r,n,s){const a=new Lt(t,Object.assign({scaleMode:Lt.defaultOptions.scaleMode,resolution:Yf(r)},s)),{resource:u}=a;u instanceof pd&&(u.url=r);const l=new Ot(a);return n||(n=r),Lt.addToCache(l.baseTexture,n),Ot.addToCache(l,n),n!==r&&(Lt.addToCache(l.baseTexture,r),Ot.addToCache(l,r)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,r){r&&(t.textureCacheIds.includes(r)||t.textureCacheIds.push(r),Rr[r]&&Rr[r]!==t&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Rr[r]=t)}static removeFromCache(t){if(typeof t=="string"){const r=Rr[t];if(r){const n=r.textureCacheIds.indexOf(t);return n>-1&&r.textureCacheIds.splice(n,1),delete Rr[t],r}}else if(t!=null&&t.textureCacheIds){for(let r=0;r<t.textureCacheIds.length;++r)Rr[t.textureCacheIds[r]]===t&&delete Rr[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:r,y:n,width:s,height:a}=t,u=r+s>this.baseTexture.width,l=n+a>this.baseTexture.height;if(u||l){const c=u&&l?"and":"or",f=`X: ${r} + ${s} = ${r+s} > ${this.baseTexture.width}`,p=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${f} ${c} ${p}`)}this.valid=s&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Ot._EMPTY||(Ot._EMPTY=new Ot(new Lt),va(Ot._EMPTY),va(Ot._EMPTY.baseTexture)),Ot._EMPTY}static get WHITE(){if(!Ot._WHITE){const t=_t.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Ot._WHITE=new Ot(Lt.from(t)),va(Ot._WHITE),va(Ot._WHITE.baseTexture)}return Ot._WHITE}}class ya extends Ot{constructor(t,r){super(t,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(t){this.framebuffer.multisample=t}resize(t,r,n=!0){const s=this.baseTexture.resolution,a=Math.round(t*s)/s,u=Math.round(r*s)/s;this.valid=a>0&&u>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=u,n&&this.baseTexture.resize(a,u),this.updateUvs()}setResolution(t){const{baseTexture:r}=this;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))}static create(t){return new ya(new dd(t))}}class vd{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=fe.NONE){const s=new dd(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new ya(s)}getOptimalTexture(t,r,n=1,s=fe.NONE){let a;t=Math.ceil(t*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||r!==this._pixelsHeight?(t=ia(t),r=ia(r),a=((t&65535)<<16|r&65535)>>>0,s>1&&(a+=s*4294967296)):a=s>1?-s:-1,this.texturePool[a]||(this.texturePool[a]=[]);let u=this.texturePool[a].pop();return u||(u=this.createTexture(t,r,s)),u.filterPoolKey=a,u.setResolution(n),u}getFilterTexture(t,r,n){const s=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||fe.NONE);return s.filterFrame=t.filterFrame,s}returnTexture(t){const r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let s=0;s<n.length;s++)n[s].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let s=0;s<n.length;s++)n[s].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}vd.SCREEN_KEY=-1;class FT extends ui{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class NT extends ui{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 Re(this.vertices),this.uvBuffer=new Re(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,r){let n=0,s=0;return this.uvs[0]=n,this.uvs[1]=s,this.uvs[2]=n+r.width/t.width,this.uvs[3]=s,this.uvs[4]=n+r.width/t.width,this.uvs[5]=s+r.height/t.height,this.uvs[6]=n,this.uvs[7]=s+r.height/t.height,n=r.x,s=r.y,this.vertices[0]=n,this.vertices[1]=s,this.vertices[2]=n+r.width,this.vertices[3]=s,this.vertices[4]=n+r.width,this.vertices[5]=s+r.height,this.vertices[6]=n,this.vertices[7]=s+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class LT{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=fe.NONE,this.sourceFrame=new jt,this.destinationFrame=new jt,this.bindingSourceFrame=new jt,this.bindingDestinationFrame=new jt,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const _a=[new Wt,new Wt,new Wt,new Wt],sl=new Pe;class yd{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new vd,this.statePool=[],this.quad=new FT,this.quadUv=new NT,this.tempRect=new jt,this.activeState={},this.globalUniforms=new ar({outputFrame:new jt,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(t,r){const n=this.renderer,s=this.defaultFilterStack,a=this.statePool.pop()||new LT,u=this.renderer.renderTexture;let l=r[0].resolution,c=r[0].multisample,f=r[0].padding,p=r[0].autoFit,m=r[0].legacy??!0;for(let y=1;y<r.length;y++){const S=r[y];l=Math.min(l,S.resolution),c=Math.min(c,S.multisample),f=this.useMaxPadding?Math.max(f,S.padding):f+S.padding,p=p&&S.autoFit,m=m||(S.legacy??!0)}s.length===1&&(this.defaultFilterStack[0].renderTexture=u.current),s.push(a),a.resolution=l,a.multisample=c,a.legacy=m,a.target=t,a.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),a.sourceFrame.pad(f);const g=this.tempRect.copyFrom(u.sourceFrame);n.projection.transform&&this.transformAABB(sl.copyFrom(n.projection.transform).invert(),g),p?(a.sourceFrame.fit(g),(a.sourceFrame.width<=0||a.sourceFrame.height<=0)&&(a.sourceFrame.width=0,a.sourceFrame.height=0)):a.sourceFrame.intersects(g)||(a.sourceFrame.width=0,a.sourceFrame.height=0),this.roundFrame(a.sourceFrame,u.current?u.current.resolution:n.resolution,u.sourceFrame,u.destinationFrame,n.projection.transform),a.renderTexture=this.getOptimalFilterTexture(a.sourceFrame.width,a.sourceFrame.height,l,c),a.filters=r,a.destinationFrame.width=a.renderTexture.width,a.destinationFrame.height=a.renderTexture.height;const x=this.tempRect;x.x=0,x.y=0,x.width=a.sourceFrame.width,x.height=a.sourceFrame.height,a.renderTexture.filterFrame=a.sourceFrame,a.bindingSourceFrame.copyFrom(u.sourceFrame),a.bindingDestinationFrame.copyFrom(u.destinationFrame),a.transform=n.projection.transform,n.projection.transform=null,u.bind(a.renderTexture,a.sourceFrame,x),n.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,r=t.pop(),n=r.filters;this.activeState=r;const s=this.globalUniforms.uniforms;s.outputFrame=r.sourceFrame,s.resolution=r.resolution;const a=s.inputSize,u=s.inputPixel,l=s.inputClamp;if(a[0]=r.destinationFrame.width,a[1]=r.destinationFrame.height,a[2]=1/a[0],a[3]=1/a[1],u[0]=Math.round(a[0]*r.resolution),u[1]=Math.round(a[1]*r.resolution),u[2]=1/u[0],u[3]=1/u[1],l[0]=.5*u[2],l[1]=.5*u[3],l[2]=r.sourceFrame.width*a[2]-.5*u[2],l[3]=r.sourceFrame.height*a[3]-.5*u[3],r.legacy){const f=s.filterArea;f[0]=r.destinationFrame.width,f[1]=r.destinationFrame.height,f[2]=r.sourceFrame.x,f[3]=r.sourceFrame.y,s.filterClamp=s.inputClamp}this.globalUniforms.update();const c=t[t.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,c.renderTexture,_n.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let f=r.renderTexture,p=this.getOptimalFilterTexture(f.width,f.height,r.resolution);p.filterFrame=f.filterFrame;let m=0;for(m=0;m<n.length-1;++m){m===1&&r.multisample>1&&(p=this.getOptimalFilterTexture(f.width,f.height,r.resolution),p.filterFrame=f.filterFrame),n[m].apply(this,f,p,_n.CLEAR,r);const g=f;f=p,p=g}n[m].apply(this,f,c.renderTexture,_n.BLEND,r),m>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(f),this.returnFilterTexture(p)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=_n.CLEAR){const{renderTexture:n,state:s}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const u=this.tempRect;u.x=0,u.y=0,u.width=t.filterFrame.width,u.height=t.filterFrame.height,n.bind(t,t.filterFrame,u)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const a=s.stateId&1||this.forceClear;(r===_n.CLEAR||r===_n.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,r,n,s){const a=this.renderer;a.state.set(t.state),this.bindAndClear(n,s),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(Kr.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Kr.TRIANGLE_STRIP))}calculateSpriteMatrix(t,r){const{sourceFrame:n,destinationFrame:s}=this.activeState,{orig:a}=r._texture,u=t.set(s.width,0,0,s.height,n.x,n.y),l=r.worldTransform.copyTo(Pe.TEMP_MATRIX);return l.invert(),u.prepend(l),u.scale(1/a.width,1/a.height),u.translate(r.anchor.x,r.anchor.y),u}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,s=fe.NONE){return this.texturePool.getOptimalTexture(t,r,n,s)}getFilterTexture(t,r,n){if(typeof t=="number"){const a=t;t=r,r=a}t=t||this.activeState.renderTexture;const s=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||fe.NONE);return s.filterFrame=t.filterFrame,s}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,r){const n=_a[0],s=_a[1],a=_a[2],u=_a[3];n.set(r.left,r.top),s.set(r.left,r.bottom),a.set(r.right,r.top),u.set(r.right,r.bottom),t.apply(n,n),t.apply(s,s),t.apply(a,a),t.apply(u,u);const l=Math.min(n.x,s.x,a.x,u.x),c=Math.min(n.y,s.y,a.y,u.y),f=Math.max(n.x,s.x,a.x,u.x),p=Math.max(n.y,s.y,a.y,u.y);r.x=l,r.y=c,r.width=f-l,r.height=p-c}roundFrame(t,r,n,s,a){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(a){const{a:u,b:l,c,d:f}=a;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(u)>1e-4||Math.abs(f)>1e-4))return}a=a?sl.copyFrom(a):sl.identity(),a.translate(-n.x,-n.y).scale(s.width/n.width,s.height/n.height).translate(s.x,s.y),this.transformAABB(a,t),t.ceil(r),this.transformAABB(a.invert(),t)}}}yd.extension={type:Ct.RendererSystem,name:"filter"},Gt.add(yd);class kT{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=fe.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const BT=new jt;class _d{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new il(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new jt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;_t.PREFER_ENV===vn.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=s=>r.drawBuffersWEBGL(s):(this.hasMRT=!1,t.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,r,n=0){const{gl:s}=this;if(t){const a=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,s.bindFramebuffer(s.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,a.mipLevel=n),a.dirtyId!==t.dirtyId&&(a.dirtyId=t.dirtyId,a.dirtyFormat!==t.dirtyFormat?(a.dirtyFormat=t.dirtyFormat,a.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):a.dirtySize!==t.dirtySize&&(a.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let u=0;u<t.colorTextures.length;u++){const l=t.colorTextures[u];this.renderer.texture.unbind(l.parentTextureArray||l)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const u=r.width>>n,l=r.height>>n,c=u/r.width;this.setViewport(r.x*c,r.y*c,u,l)}else{const u=t.width>>n,l=t.height>>n;this.setViewport(0,0,u,l)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,r,n,s){const a=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),s=Math.round(s),(a.width!==n||a.height!==s||a.x!==t||a.y!==r)&&(a.x=t,a.y=r,a.width=n,a.height=s,this.gl.viewport(t,r,n,s))}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(t,r,n,s,a=Qo.COLOR|Qo.DEPTH){const{gl:u}=this;u.clearColor(t,r,n,s),u.clear(a)}initFramebuffer(t){const{gl:r}=this,n=new kT(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n}resizeFramebuffer(t){const{gl:r}=this,n=t.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));const s=t.colorTextures;let a=s.length;r.drawBuffers||(a=Math.min(a,1));for(let u=0;u<a;u++){const l=s[u],c=l.parentTextureArray||l;this.renderer.texture.bind(c,0),u===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,c._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,r){const{gl:n}=this,s=t.glFramebuffers[this.CONTEXT_UID],a=t.colorTextures;let u=a.length;n.drawBuffers||(u=Math.min(u,1)),s.multisample>1&&this.canMultisampleFramebuffer(t)?s.msaaBuffer=s.msaaBuffer||n.createRenderbuffer():s.msaaBuffer&&(n.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));const l=[];for(let c=0;c<u;c++){const f=a[c],p=f.parentTextureArray||f;this.renderer.texture.bind(p,0),c===0&&s.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,s.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,s.multisample,p._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,s.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+c,f.target,p._glTextures[this.CONTEXT_UID].texture,r),l.push(n.COLOR_ATTACHMENT0+c))}if(l.length>1&&n.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const f=t.depthTexture;this.renderer.texture.bind(f,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,f._glTextures[this.CONTEXT_UID].texture,r)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(s.stencil=s.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,s.stencil),s.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,s.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,s.stencil)):s.stencil&&(n.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:r}=this;let n=fe.NONE;if(t<=1||r===null)return n;for(let s=0;s<r.length;s++)if(r[s]<=t){n=r[s];break}return n===1&&(n=fe.NONE),n}blit(t,r,n){const{current:s,renderer:a,gl:u,CONTEXT_UID:l}=this;if(a.context.webGLVersion!==2||!s)return;const c=s.glFramebuffers[l];if(!c)return;if(!t){if(!c.msaaBuffer)return;const p=s.colorTextures[0];if(!p)return;c.blitFramebuffer||(c.blitFramebuffer=new il(s.width,s.height),c.blitFramebuffer.addColorTexture(0,p)),t=c.blitFramebuffer,t.colorTextures[0]!==p&&(t.colorTextures[0]=p,t.dirtyId++,t.dirtyFormat++),(t.width!==s.width||t.height!==s.height)&&(t.width=s.width,t.height=s.height,t.dirtyId++,t.dirtySize++)}r||(r=BT,r.width=s.width,r.height=s.height),n||(n=r);const f=r.width===n.width&&r.height===n.height;this.bind(t),u.bindFramebuffer(u.READ_FRAMEBUFFER,c.framebuffer),u.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,u.COLOR_BUFFER_BIT,f?u.NEAREST:u.LINEAR)}disposeFramebuffer(t,r){const n=t.glFramebuffers[this.CONTEXT_UID],s=this.gl;if(!n)return;delete t.glFramebuffers[this.CONTEXT_UID];const a=this.managedFramebuffers.indexOf(t);a>=0&&this.managedFramebuffers.splice(a,1),t.disposeRunner.remove(this),r||(s.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&s.deleteRenderbuffer(n.msaaBuffer),n.stencil&&s.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(t){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],t)}forceStencil(){const t=this.current;if(!t)return;const r=t.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;t.stencil=!0;const n=t.width,s=t.height,a=this.gl,u=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,u),r.msaaBuffer?a.renderbufferStorageMultisample(a.RENDERBUFFER,r.multisample,a.DEPTH24_STENCIL8,n,s):a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,n,s),r.stencil=u,a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,u)}reset(){this.current=this.unknownFramebuffer,this.viewport=new jt}destroy(){this.renderer=null}}_d.extension={type:Ct.RendererSystem,name:"framebuffer"},Gt.add(_d);const al={5126:4,5123:2,5121:1};class xd{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;_t.PREFER_ENV===vn.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=()=>n.createVertexArrayOES(),t.bindVertexArray=s=>n.bindVertexArrayOES(s),t.deleteVertexArray=s=>n.deleteVertexArrayOES(s)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=t.getExtension("ANGLE_instanced_arrays");n?(t.vertexAttribDivisor=(s,a)=>n.vertexAttribDivisorANGLE(s,a),t.drawElementsInstanced=(s,a,u,l,c)=>n.drawElementsInstancedANGLE(s,a,u,l,c),t.drawArraysInstanced=(s,a,u,l)=>n.drawArraysInstancedANGLE(s,a,u,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(t,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let s=t.glVertexArrayObjects[this.CONTEXT_UID],a=!1;s||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=s={},a=!0);const u=s[r.program.id]||this.initGeometryVao(t,r,a);this._activeGeometry=t,this._activeVao!==u&&(this._activeVao=u,this.hasVao?n.bindVertexArray(u):this.activateVao(t,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<t.buffers.length;n++){const s=t.buffers[n];r.update(s)}}checkCompatibility(t,r){const n=t.attributes,s=r.attributeData;for(const a in s)if(!n[a])throw new Error(`shader and geometry incompatible, geometry missing the "${a}" attribute`)}getSignature(t,r){const n=t.attributes,s=r.attributeData,a=["g",t.id];for(const u in n)s[u]&&a.push(u,s[u].location);return a.join("-")}initGeometryVao(t,r,n=!0){const s=this.gl,a=this.CONTEXT_UID,u=this.renderer.buffer,l=r.program;l.glPrograms[a]||this.renderer.shader.generateProgram(r),this.checkCompatibility(t,l);const c=this.getSignature(t,l),f=t.glVertexArrayObjects[this.CONTEXT_UID];let p=f[c];if(p)return f[l.id]=p,p;const m=t.buffers,g=t.attributes,x={},y={};for(const S in m)x[S]=0,y[S]=0;for(const S in g)!g[S].size&&l.attributeData[S]?g[S].size=l.attributeData[S].size:g[S].size||console.warn(`PIXI Geometry attribute '${S}' size cannot be determined (likely the bound shader does not have the attribute)`),x[g[S].buffer]+=g[S].size*al[g[S].type];for(const S in g){const T=g[S],w=T.size;T.stride===void 0&&(x[T.buffer]===w*al[T.type]?T.stride=0:T.stride=x[T.buffer]),T.start===void 0&&(T.start=y[T.buffer],y[T.buffer]+=w*al[T.type])}p=s.createVertexArray(),s.bindVertexArray(p);for(let S=0;S<m.length;S++){const T=m[S];u.bind(T),n&&T._glBuffers[a].refCount++}return this.activateVao(t,l),f[l.id]=p,f[c]=p,s.bindVertexArray(null),u.unbind(Ar.ARRAY_BUFFER),p}disposeGeometry(t,r){var l;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const n=t.glVertexArrayObjects[this.CONTEXT_UID],s=this.gl,a=t.buffers,u=(l=this.renderer)==null?void 0:l.buffer;if(t.disposeRunner.remove(this),!!n){if(u)for(let c=0;c<a.length;c++){const f=a[c]._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&u.dispose(a[c],r))}if(!r){for(const c in n)if(c[0]==="g"){const f=n[c];this._activeVao===f&&this.unbind(),s.deleteVertexArray(f)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],t)}activateVao(t,r){const n=this.gl,s=this.CONTEXT_UID,a=this.renderer.buffer,u=t.buffers,l=t.attributes;t.indexBuffer&&a.bind(t.indexBuffer);let c=null;for(const f in l){const p=l[f],m=u[p.buffer],g=m._glBuffers[s];if(r.attributeData[f]){c!==g&&(a.bind(m),c=g);const x=r.attributeData[f].location;if(n.enableVertexAttribArray(x),n.vertexAttribPointer(x,p.size,p.type||n.FLOAT,p.normalized,p.stride,p.start),p.instance)if(this.hasInstance)n.vertexAttribDivisor(x,p.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,s){const{gl:a}=this,u=this._activeGeometry;if(u.indexBuffer){const l=u.indexBuffer.data.BYTES_PER_ELEMENT,c=l===2?a.UNSIGNED_SHORT:a.UNSIGNED_INT;l===2||l===4&&this.canUseUInt32ElementIndex?u.instanced?a.drawElementsInstanced(t,r||u.indexBuffer.data.length,c,(n||0)*l,s||1):a.drawElements(t,r||u.indexBuffer.data.length,c,(n||0)*l):console.warn("unsupported index buffer type: uint32")}else u.instanced?a.drawArraysInstanced(t,n,r||u.getSize(),s||1):a.drawArrays(t,n,r||u.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}xd.extension={type:Ct.RendererSystem,name:"geometry"},Gt.add(xd);const bd=new Pe;class DT{constructor(t,r){this._texture=t,this.mapCoord=new Pe,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(t){this._texture=t,this._textureID=-1}multiplyUvs(t,r){r===void 0&&(r=t);const n=this.mapCoord;for(let s=0;s<t.length;s+=2){const a=t[s],u=t[s+1];r[s]=a*n.a+u*n.c+n.tx,r[s+1]=a*n.b+u*n.d+n.ty}return r}update(t){const r=this._texture;if(!r||!r.valid||!t&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const s=r.orig,a=r.trim;a&&(bd.set(s.width/a.width,0,0,s.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(bd));const u=r.baseTexture,l=this.uClampFrame,c=this.clampMargin/u.resolution,f=this.clampOffset;return l[0]=(r._frame.x+c+f)/u.width,l[1]=(r._frame.y+c+f)/u.height,l[2]=(r._frame.x+r._frame.width-c+f)/u.width,l[3]=(r._frame.y+r._frame.height-c+f)/u.height,this.uClampOffset[0]=f/u.realWidth,this.uClampOffset[1]=f/u.realHeight,this.isSimple=r._frame.width===u.width&&r._frame.height===u.height&&r.rotate===0,!0}}var UT=`varying vec2 vMaskCoord;
387
387
  varying vec2 vTextureCoord;
388
388
 
389
389
  uniform sampler2D uSampler;
@@ -408,7 +408,7 @@ void main(void)
408
408
 
409
409
  gl_FragColor = original;
410
410
  }
411
- `,zw=`attribute vec2 aVertexPosition;
411
+ `,$T=`attribute vec2 aVertexPosition;
412
412
  attribute vec2 aTextureCoord;
413
413
 
414
414
  uniform mat3 projectionMatrix;
@@ -424,7 +424,7 @@ void main(void)
424
424
  vTextureCoord = aTextureCoord;
425
425
  vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
426
426
  }
427
- `;class Hw extends Zt{constructor(t,r,n){let i=null;typeof t!="string"&&r===void 0&&n===void 0&&(i=t,t=void 0,r=void 0,n=void 0),super(t||zw,r||qw,n),this.maskSprite=i,this.maskMatrix=new $e}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,r,n,i){const o=this._maskSprite,a=o._texture;a.valid&&(a.uvMatrix||(a.uvMatrix=new jw(a,0)),a.uvMatrix.update(),this.uniforms.npmAlpha=a.baseTexture.alphaMode?0:1,this.uniforms.mask=a,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,o).prepend(a.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=a.uvMatrix.uClampFrame,t.applyFilter(this,r,n,i))}}class Vw{constructor(t=null){this.type=Ee.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Zt.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(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Ee.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Ed{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,r){let n=r;if(!n.isMaskData){const o=this.maskDataPool.pop()||new Vw;o.pooled=!0,o.maskObject=r,n=o}const i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(i),n._colorMask=i?i._colorMask:15,n.autoDetect&&this.detect(n),n._target=t,n.type!==Ee.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case Ee.SCISSOR:this.renderer.scissor.push(n);break;case Ee.STENCIL:this.renderer.stencil.push(n);break;case Ee.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case Ee.COLOR:this.pushColorMask(n);break}n.type===Ee.SPRITE&&this.maskStack.push(n)}pop(t){const r=this.maskStack.pop();if(!(!r||r._target!==t)){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 n=this.maskStack[this.maskStack.length-1];n.type===Ee.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(t){const r=t.maskObject;r?r.isSprite?t.type=Ee.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=Ee.SCISSOR:t.type=Ee.STENCIL:t.type=Ee.COLOR}pushSpriteMask(t){const{maskObject:r}=t,n=t._target;let i=t._filters;i||(i=this.alphaMaskPool[this.alphaMaskIndex],i||(i=this.alphaMaskPool[this.alphaMaskIndex]=[new Hw]));const o=this.renderer,a=o.renderTexture;let u,f;if(a.current){const d=a.current;u=t.resolution||d.resolution,f=t.multisample??d.multisample}else u=t.resolution||o.resolution,f=t.multisample??o.multisample;i[0].resolution=u,i[0].multisample=f,i[0].maskSprite=r;const h=n.filterArea;n.filterArea=r.getBounds(!0),o.filter.push(n,i),n.filterArea=h,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const r=t._colorMask,n=t._colorMask=r&t.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(t){const r=t._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Ed.extension={type:qt.RendererSystem,name:"mask"},te.add(Ed);class Sd{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=t;const i=this.getStackLength();i!==n&&(i===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Ad=new $e,Od=[],Oo=class extends Sd{constructor(e){super(e),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:r}=e,{renderer:n}=this,i=n.renderTexture,o=r.getBounds(!0,Od.pop()??new ie);this.roundFrameToPixels(o,i.current?i.current.resolution:n.resolution,i.sourceFrame,i.destinationFrame,n.projection.transform),t&&o.fit(t),e._scissorRectLocal=o}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:r,c:n,d:i}=e;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(i)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||Oo.isMatrixRotated(t.worldTransform)||Oo.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const r=e._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(e,t,r,n,i){Oo.isMatrixRotated(i)||(i=i?Ad.copyFrom(i):Ad.identity(),i.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(i,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Od.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Cd=Oo;Cd.extension={type:qt.RendererSystem,name:"scissor"},te.add(Cd);class Rd extends Sd{constructor(t){super(t),this.glConst=Dt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const r=t.maskObject,{gl:n}=this.renderer,i=t._stencilCounter;i===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;const o=t._colorMask;o!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,i,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,o!==0&&(t._colorMask=o,n.colorMask((o&1)!==0,(o&2)!==0,(o&4)!==0,(o&8)!==0)),this._useCurrent()}pop(t){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,i=n?n._colorMask:15;i!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,i!==0&&(n._colorMask=i,r.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Rd.extension={type:qt.RendererSystem,name:"stencil"},te.add(Rd);class Id{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return Ht("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const r in t)this.plugins[r]=new t[r](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Id.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"_plugin"},te.add(Id);class Pd{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new $e,this.transform=null}update(t,r,n,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,i),this.transform&&this.projectionMatrix.append(this.transform);const o=this.renderer;o.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,o.globalUniforms.update(),o.shader.shader&&o.shader.syncUniformGroup(o.shader.shader.uniforms.globals)}calculateProjection(t,r,n,i){const o=this.projectionMatrix,a=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=a*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-a-r.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Pd.extension={type:qt.RendererSystem,name:"projection"},te.add(Pd);const Ww=new ou;class Nd{constructor(t){this.renderer=t,this._tempMatrix=new $e}generateTexture(t,r){const{region:n,...i}=r||{},o=n||t.getLocalBounds(null,!0);o.width===0&&(o.width=1),o.height===0&&(o.height=1);const a=So.create({width:o.width,height:o.height,...i});this._tempMatrix.tx=-o.x,this._tempMatrix.ty=-o.y;const u=t.transform;return t.transform=Ww,this.renderer.render(t,{renderTexture:a,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=u,a}destroy(){}}Nd.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"textureGenerator"},te.add(Nd);const $n=new ie,gs=new ie;class Md{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ie,this.destinationFrame=new ie,this.viewportFrame=new ie}bind(t=null,r,n){const i=this.renderer;this.current=t;let o,a,u;t?(o=t.baseTexture,u=o.resolution,r||($n.width=t.frame.width,$n.height=t.frame.height,r=$n),n||(gs.x=t.frame.x,gs.y=t.frame.y,gs.width=r.width,gs.height=r.height,n=gs),a=o.framebuffer):(u=i.resolution,r||($n.width=i._view.screen.width,$n.height=i._view.screen.height,r=$n),n||(n=$n,n.width=r.width,n.height=r.height));const f=this.viewportFrame;f.x=n.x*u,f.y=n.y*u,f.width=n.width*u,f.height=n.height*u,t||(f.y=i.view.height-(f.y+f.height)),f.ceil(),this.renderer.framebuffer.bind(a,f),this.renderer.projection.update(n,r,u,!a),t?this.renderer.mask.setMaskStack(o.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(t,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,i=t?Be.shared.setValue(t):n,o=this.destinationFrame,a=this.current?this.current.baseTexture:this.renderer._view.screen,u=o.width!==a.width||o.height!==a.height;if(u){let{x:f,y:h,width:d,height:p}=this.viewportFrame;f=Math.round(f),h=Math.round(h),d=Math.round(d),p=Math.round(p),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,h,d,p)}this.renderer.framebuffer.clear(i.red,i.green,i.blue,i.alpha,r),u&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:qt.RendererSystem,name:"renderTexture"},te.add(Md);class Xw{constructor(t,r){this.program=t,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 Kw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const o=t.getActiveAttrib(e,i);if(o.name.startsWith("gl_"))continue;const a=fd(t,o.type),u={type:a,name:o.name,size:ld(a),location:t.getAttribLocation(e,o.name)};r[o.name]=u}return r}function Yw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const o=t.getActiveUniform(e,i),a=o.name.replace(/\[.*?\]$/,""),u=!!o.name.match(/\[.*?\]$/),f=fd(t,o.type);r[a]={name:a,index:i,type:f,size:o.size,isArray:u,value:sd(f,o.size)}}return r}function Zw(e,t){var f;const r=id(e,e.VERTEX_SHADER,t.vertexSrc),n=id(e,e.FRAGMENT_SHADER,t.fragmentSrc),i=e.createProgram();e.attachShader(i,r),e.attachShader(i,n);const o=(f=t.extra)==null?void 0:f.transformFeedbackVaryings;if(o&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(i,o.names,o.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(i),e.getProgramParameter(i,e.LINK_STATUS)||Ew(e,i,r,n),t.attributeData=Kw(i,e),t.uniformData=Yw(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const h=Object.keys(t.attributeData);h.sort((d,p)=>d>p?1:-1);for(let d=0;d<h.length;d++)t.attributeData[h[d]].location=d,e.bindAttribLocation(i,d,h[d]);e.linkProgram(i)}e.deleteShader(r),e.deleteShader(n);const a={};for(const h in t.uniformData){const d=t.uniformData[h];a[h]={location:e.getUniformLocation(i,h),value:sd(d.type,d.size)}}return new Xw(i,a)}function Qw(e,t,r,n,i){r.buffer.update(i)}const Jw={float:`
427
+ `;class GT extends Dt{constructor(t,r,n){let s=null;typeof t!="string"&&r===void 0&&n===void 0&&(s=t,t=void 0,r=void 0,n=void 0),super(t||$T,r||UT,n),this.maskSprite=s,this.maskMatrix=new Pe}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,r,n,s){const a=this._maskSprite,u=a._texture;u.valid&&(u.uvMatrix||(u.uvMatrix=new DT(u,0)),u.uvMatrix.update(),this.uniforms.npmAlpha=u.baseTexture.alphaMode?0:1,this.uniforms.mask=u,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,a).prepend(u.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=u.uvMatrix.uClampFrame,t.applyFilter(this,r,n,s))}}class zT{constructor(t=null){this.type=de.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Dt.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(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=de.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Td{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,r){let n=r;if(!n.isMaskData){const a=this.maskDataPool.pop()||new zT;a.pooled=!0,a.maskObject=r,n=a}const s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(s),n._colorMask=s?s._colorMask:15,n.autoDetect&&this.detect(n),n._target=t,n.type!==de.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case de.SCISSOR:this.renderer.scissor.push(n);break;case de.STENCIL:this.renderer.stencil.push(n);break;case de.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case de.COLOR:this.pushColorMask(n);break}n.type===de.SPRITE&&this.maskStack.push(n)}pop(t){const r=this.maskStack.pop();if(!(!r||r._target!==t)){if(r.enabled)switch(r.type){case de.SCISSOR:this.renderer.scissor.pop(r);break;case de.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case de.SPRITE:this.popSpriteMask(r);break;case de.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===de.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(t){const r=t.maskObject;r?r.isSprite?t.type=de.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=de.SCISSOR:t.type=de.STENCIL:t.type=de.COLOR}pushSpriteMask(t){const{maskObject:r}=t,n=t._target;let s=t._filters;s||(s=this.alphaMaskPool[this.alphaMaskIndex],s||(s=this.alphaMaskPool[this.alphaMaskIndex]=[new GT]));const a=this.renderer,u=a.renderTexture;let l,c;if(u.current){const p=u.current;l=t.resolution||p.resolution,c=t.multisample??p.multisample}else l=t.resolution||a.resolution,c=t.multisample??a.multisample;s[0].resolution=l,s[0].multisample=c,s[0].maskSprite=r;const f=n.filterArea;n.filterArea=r.getBounds(!0),a.filter.push(n,s),n.filterArea=f,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const r=t._colorMask,n=t._colorMask=r&t.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(t){const r=t._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Td.extension={type:Ct.RendererSystem,name:"mask"},Gt.add(Td);class wd{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=t;const s=this.getStackLength();s!==n&&(s===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Sd=new Pe,Ad=[],xa=class extends wd{constructor(e){super(e),this.glConst=_t.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:r}=e,{renderer:n}=this,s=n.renderTexture,a=r.getBounds(!0,Ad.pop()??new jt);this.roundFrameToPixels(a,s.current?s.current.resolution:n.resolution,s.sourceFrame,s.destinationFrame,n.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:r,c:n,d:s}=e;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(s)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||xa.isMatrixRotated(t.worldTransform)||xa.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const r=e._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(e,t,r,n,s){xa.isMatrixRotated(s)||(s=s?Sd.copyFrom(s):Sd.identity(),s.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(s,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Ad.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Cd=xa;Cd.extension={type:Ct.RendererSystem,name:"scissor"},Gt.add(Cd);class Ed extends wd{constructor(t){super(t),this.glConst=_t.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const r=t.maskObject,{gl:n}=this.renderer,s=t._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;const a=t._colorMask;a!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,s,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(t._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}pop(t){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=n?n._colorMask:15;s!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,s!==0&&(n._colorMask=s,r.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Ed.extension={type:Ct.RendererSystem,name:"stencil"},Gt.add(Ed);class Id{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const r in t)this.plugins[r]=new t[r](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Id.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"_plugin"},Gt.add(Id);class Rd{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Pe,this.transform=null}update(t,r,n,s){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,s),this.transform&&this.projectionMatrix.append(this.transform);const a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)}calculateProjection(t,r,n,s){const a=this.projectionMatrix,u=s?-1:1;a.identity(),a.a=1/r.width*2,a.d=u*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-u-r.y*a.d}setTransform(t){}destroy(){this.renderer=null}}Rd.extension={type:Ct.RendererSystem,name:"projection"},Gt.add(Rd);const HT=new el;class Pd{constructor(t){this.renderer=t,this._tempMatrix=new Pe}generateTexture(t,r){const{region:n,...s}=r||{},a=n||t.getLocalBounds(null,!0);a.width===0&&(a.width=1),a.height===0&&(a.height=1);const u=ya.create({width:a.width,height:a.height,...s});this._tempMatrix.tx=-a.x,this._tempMatrix.ty=-a.y;const l=t.transform;return t.transform=HT,this.renderer.render(t,{renderTexture:u,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,u}destroy(){}}Pd.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"textureGenerator"},Gt.add(Pd);const Rn=new jt,us=new jt;class Md{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new jt,this.destinationFrame=new jt,this.viewportFrame=new jt}bind(t=null,r,n){const s=this.renderer;this.current=t;let a,u,l;t?(a=t.baseTexture,l=a.resolution,r||(Rn.width=t.frame.width,Rn.height=t.frame.height,r=Rn),n||(us.x=t.frame.x,us.y=t.frame.y,us.width=r.width,us.height=r.height,n=us),u=a.framebuffer):(l=s.resolution,r||(Rn.width=s._view.screen.width,Rn.height=s._view.screen.height,r=Rn),n||(n=Rn,n.width=r.width,n.height=r.height));const c=this.viewportFrame;c.x=n.x*l,c.y=n.y*l,c.width=n.width*l,c.height=n.height*l,t||(c.y=s.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(u,c),this.renderer.projection.update(n,r,l,!u),t?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(t,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=t?Ce.shared.setValue(t):n,a=this.destinationFrame,u=this.current?this.current.baseTexture:this.renderer._view.screen,l=a.width!==u.width||a.height!==u.height;if(l){let{x:c,y:f,width:p,height:m}=this.viewportFrame;c=Math.round(c),f=Math.round(f),p=Math.round(p),m=Math.round(m),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,f,p,m)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,r),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:Ct.RendererSystem,name:"renderTexture"},Gt.add(Md);class VT{constructor(t,r){this.program=t,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 jT(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let s=0;s<n;s++){const a=t.getActiveAttrib(e,s);if(a.name.startsWith("gl_"))continue;const u=ud(t,a.type),l={type:u,name:a.name,size:ad(u),location:t.getAttribLocation(e,a.name)};r[a.name]=l}return r}function XT(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let s=0;s<n;s++){const a=t.getActiveUniform(e,s),u=a.name.replace(/\[.*?\]$/,""),l=!!a.name.match(/\[.*?\]$/),c=ud(t,a.type);r[u]={name:u,index:s,type:c,size:a.size,isArray:l,value:nd(c,a.size)}}return r}function WT(e,t){var c;const r=rd(e,e.VERTEX_SHADER,t.vertexSrc),n=rd(e,e.FRAGMENT_SHADER,t.fragmentSrc),s=e.createProgram();e.attachShader(s,r),e.attachShader(s,n);const a=(c=t.extra)==null?void 0:c.transformFeedbackVaryings;if(a&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(s,a.names,a.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS)||xT(e,s,r,n),t.attributeData=jT(s,e),t.uniformData=XT(s,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const f=Object.keys(t.attributeData);f.sort((p,m)=>p>m?1:-1);for(let p=0;p<f.length;p++)t.attributeData[f[p]].location=p,e.bindAttribLocation(s,p,f[p]);e.linkProgram(s)}e.deleteShader(r),e.deleteShader(n);const u={};for(const f in t.uniformData){const p=t.uniformData[f];u[f]={location:e.getUniformLocation(s,f),value:nd(p.type,p.size)}}return new VT(s,u)}function qT(e,t,r,n,s){r.buffer.update(s)}const YT={float:`
428
428
  data[offset] = v;
429
429
  `,vec2:`
430
430
  data[offset] = v[0];
@@ -462,7 +462,7 @@ void main(void)
462
462
  {
463
463
  data[offset + i] = v[i];
464
464
  }
465
- `},kd={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 tT(e){const t=e.map(o=>({data:o,offset:0,dataLen:0,dirty:0}));let r=0,n=0,i=0;for(let o=0;o<t.length;o++){const a=t[o];if(r=kd[a.data.type],a.data.size>1&&(r=Math.max(r,16)*a.data.size),a.dataLen=r,n%r!==0&&n<16){const u=n%r%16;n+=u,i+=u}n+r>16?(i=Math.ceil(i/16)*16,a.offset=i,i+=r,n=r):(a.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function eT(e,t){const r=[];for(const n in e)t[n]&&r.push(t[n]);return r.sort((n,i)=>n.index-i.index),r}function rT(e,t){if(!e.autoManage)return{size:0,syncFunc:Qw};const r=eT(e.uniforms,t),{uboElements:n,size:i}=tT(r),o=[`
465
+ `},Od={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 KT(e){const t=e.map(a=>({data:a,offset:0,dataLen:0,dirty:0}));let r=0,n=0,s=0;for(let a=0;a<t.length;a++){const u=t[a];if(r=Od[u.data.type],u.data.size>1&&(r=Math.max(r,16)*u.data.size),u.dataLen=r,n%r!==0&&n<16){const l=n%r%16;n+=l,s+=l}n+r>16?(s=Math.ceil(s/16)*16,u.offset=s,s+=r,n=r):(u.offset=s,n+=r,s+=r)}return s=Math.ceil(s/16)*16,{uboElements:t,size:s}}function ZT(e,t){const r=[];for(const n in e)t[n]&&r.push(t[n]);return r.sort((n,s)=>n.index-s.index),r}function JT(e,t){if(!e.autoManage)return{size:0,syncFunc:qT};const r=ZT(e.uniforms,t),{uboElements:n,size:s}=KT(r),a=[`
466
466
  var v = null;
467
467
  var v2 = null;
468
468
  var cv = null;
@@ -470,31 +470,31 @@ void main(void)
470
470
  var gl = renderer.gl
471
471
  var index = 0;
472
472
  var data = buffer.data;
473
- `];for(let a=0;a<n.length;a++){const u=n[a],f=e.uniforms[u.data.name],h=u.data.name;let d=!1;for(let p=0;p<_i.length;p++){const c=_i[p];if(c.codeUbo&&c.test(u.data,f)){o.push(`offset = ${u.offset/4};`,_i[p].codeUbo(u.data.name,f)),d=!0;break}}if(!d)if(u.data.size>1){const p=ld(u.data.type),c=Math.max(kd[u.data.type]/16,1),v=p/c,y=(4-v%4)%4;o.push(`
474
- cv = ud.${h}.value;
475
- v = uv.${h};
476
- offset = ${u.offset/4};
473
+ `];for(let u=0;u<n.length;u++){const l=n[u],c=e.uniforms[l.data.name],f=l.data.name;let p=!1;for(let m=0;m<li.length;m++){const g=li[m];if(g.codeUbo&&g.test(l.data,c)){a.push(`offset = ${l.offset/4};`,li[m].codeUbo(l.data.name,c)),p=!0;break}}if(!p)if(l.data.size>1){const m=ad(l.data.type),g=Math.max(Od[l.data.type]/16,1),x=m/g,y=(4-x%4)%4;a.push(`
474
+ cv = ud.${f}.value;
475
+ v = uv.${f};
476
+ offset = ${l.offset/4};
477
477
 
478
478
  t = 0;
479
479
 
480
- for(var i=0; i < ${u.data.size*c}; i++)
480
+ for(var i=0; i < ${l.data.size*g}; i++)
481
481
  {
482
- for(var j = 0; j < ${v}; j++)
482
+ for(var j = 0; j < ${x}; j++)
483
483
  {
484
484
  data[offset++] = v[t++];
485
485
  }
486
486
  offset += ${y};
487
487
  }
488
488
 
489
- `)}else{const p=Jw[u.data.type];o.push(`
490
- cv = ud.${h}.value;
491
- v = uv.${h};
492
- offset = ${u.offset/4};
493
- ${p};
494
- `)}}return o.push(`
489
+ `)}else{const m=YT[l.data.type];a.push(`
490
+ cv = ud.${f}.value;
491
+ v = uv.${f};
492
+ offset = ${l.offset/4};
493
+ ${m};
494
+ `)}}return a.push(`
495
495
  renderer.buffer.update(buffer);
496
- `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(`
497
- `))}}let nT=0;const Co={textureCount:0,uboCount:0};class Ld{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=nT++}systemCheck(){if(!Aw())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,i=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(i.program)),r||(Co.textureCount=0,Co.uboCount=0,this.syncUniformGroup(t.uniformGroup,Co)),i}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=xw(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const i=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),i(n.uniformData,t.uniforms,this.renderer,Co,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:i}=this.renderer;this.renderer.buffer.bind(t.buffer);const o=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,i.uniformBlockBinding(r.program,o,this.shader.uniformBindCount),this.shader.uniformBindCount++;const a=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[a];if(u||(u=this._uboCache[a]=rT(t,this.shader.program.uniformData)),t.autoManage){const f=new Float32Array(u.size/4);t.buffer.update(f)}return r.uniformGroups[t.id]=u.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const i=t.uniforms,o=[`${n}-`];for(const a in i)o.push(a),r[a]&&o.push(r[a].type);return o.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,i=Zw(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=i,i}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Ld.extension={type:qt.RendererSystem,name:"shader"},te.add(Ld);class Ro{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Ro.defaultOptions={hello:!1},Ro.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"startup"},te.add(Ro);function iT(e,t=[]){return t[Pt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.ADD]=[e.ONE,e.ONE],t[Pt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.NONE]=[0,0],t[Pt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Pt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Pt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Pt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Pt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Pt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Pt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Pt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Pt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Pt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Pt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const sT=0,oT=1,aT=2,lT=3,uT=4,fT=5,hu=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Pt.NONE,this._blendEq=!1,this.map=[],this.map[sT]=this.setBlend,this.map[oT]=this.setOffset,this.map[aT]=this.setCullFace,this.map[lT]=this.setDepthTest,this.map[uT]=this.setFrontFace,this.map[fT]=this.setDepthMask,this.checks=[],this.defaultState=new po,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=iT(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(hu.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(hu.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}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(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Fd=hu;Fd.extension={type:qt.RendererSystem,name:"state"},te.add(Fd);class cT extends Ws{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(i=>t.systems[i]),n=[...r,...Object.keys(t.systems).filter(i=>!r.includes(i))];for(const i of n)this.addSystem(t.systems[i],i)}addRunners(...t){t.forEach(r=>{this.runners[r]=new _r(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const i in this.runners)this.runners[i].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(i=>{const o=n.find(a=>this._systemsHash[a]===i);i[t.name](r[o])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const Io=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=Io.defaultMaxIdle,this.checkCountMax=Io.defaultCheckCountMax,this.mode=Io.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==ol.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const i=t[n];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(e.destroyTexture(i,!0),t[n]=null,r=!0)}if(r){let n=0;for(let i=0;i<t.length;i++)t[i]!==null&&(t[n++]=t[i]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let Tr=Io;Tr.defaultMode=ol.AUTO,Tr.defaultMaxIdle=60*60,Tr.defaultCheckCountMax=60*10,Tr.extension={type:qt.RendererSystem,name:"textureGC"},te.add(Tr);class du{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Xt.UNSIGNED_BYTE,this.internalFormat=bt.RGBA,this.samplerType=0}}function hT(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Xt.UNSIGNED_BYTE]:{[bt.RGBA]:e.RGBA8,[bt.RGB]:e.RGB8,[bt.RG]:e.RG8,[bt.RED]:e.R8,[bt.RGBA_INTEGER]:e.RGBA8UI,[bt.RGB_INTEGER]:e.RGB8UI,[bt.RG_INTEGER]:e.RG8UI,[bt.RED_INTEGER]:e.R8UI,[bt.ALPHA]:e.ALPHA,[bt.LUMINANCE]:e.LUMINANCE,[bt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.BYTE]:{[bt.RGBA]:e.RGBA8_SNORM,[bt.RGB]:e.RGB8_SNORM,[bt.RG]:e.RG8_SNORM,[bt.RED]:e.R8_SNORM,[bt.RGBA_INTEGER]:e.RGBA8I,[bt.RGB_INTEGER]:e.RGB8I,[bt.RG_INTEGER]:e.RG8I,[bt.RED_INTEGER]:e.R8I},[Xt.UNSIGNED_SHORT]:{[bt.RGBA_INTEGER]:e.RGBA16UI,[bt.RGB_INTEGER]:e.RGB16UI,[bt.RG_INTEGER]:e.RG16UI,[bt.RED_INTEGER]:e.R16UI,[bt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Xt.SHORT]:{[bt.RGBA_INTEGER]:e.RGBA16I,[bt.RGB_INTEGER]:e.RGB16I,[bt.RG_INTEGER]:e.RG16I,[bt.RED_INTEGER]:e.R16I},[Xt.UNSIGNED_INT]:{[bt.RGBA_INTEGER]:e.RGBA32UI,[bt.RGB_INTEGER]:e.RGB32UI,[bt.RG_INTEGER]:e.RG32UI,[bt.RED_INTEGER]:e.R32UI,[bt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Xt.INT]:{[bt.RGBA_INTEGER]:e.RGBA32I,[bt.RGB_INTEGER]:e.RGB32I,[bt.RG_INTEGER]:e.RG32I,[bt.RED_INTEGER]:e.R32I},[Xt.FLOAT]:{[bt.RGBA]:e.RGBA32F,[bt.RGB]:e.RGB32F,[bt.RG]:e.RG32F,[bt.RED]:e.R32F,[bt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Xt.HALF_FLOAT]:{[bt.RGBA]:e.RGBA16F,[bt.RGB]:e.RGB16F,[bt.RG]:e.RG16F,[bt.RED]:e.R16F},[Xt.UNSIGNED_SHORT_5_6_5]:{[bt.RGB]:e.RGB565},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[bt.RGBA]:e.RGBA4},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[bt.RGBA]:e.RGB5_A1},[Xt.UNSIGNED_INT_2_10_10_10_REV]:{[bt.RGBA]:e.RGB10_A2,[bt.RGBA_INTEGER]:e.RGB10_A2UI},[Xt.UNSIGNED_INT_10F_11F_11F_REV]:{[bt.RGB]:e.R11F_G11F_B10F},[Xt.UNSIGNED_INT_5_9_9_9_REV]:{[bt.RGB]:e.RGB9_E5},[Xt.UNSIGNED_INT_24_8]:{[bt.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Xt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[bt.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Xt.UNSIGNED_BYTE]:{[bt.RGBA]:e.RGBA,[bt.RGB]:e.RGB,[bt.ALPHA]:e.ALPHA,[bt.LUMINANCE]:e.LUMINANCE,[bt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Xt.UNSIGNED_SHORT_5_6_5]:{[bt.RGB]:e.RGB},[Xt.UNSIGNED_SHORT_4_4_4_4]:{[bt.RGBA]:e.RGBA},[Xt.UNSIGNED_SHORT_5_5_5_1]:{[bt.RGBA]:e.RGBA}},t}class Bd{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Kt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=hT(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let i=0;i<r;i++)this.boundTextures[i]=null;this.emptyTextures={};const n=new du(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new du(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let i=0;i<6;i++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+i,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let i=0;i<this.boundTextures.length;i++)this.bind(null,i)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):i.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let i=0;i<n.length;i++)n[i]===this.unknownTexture&&this.bind(null,i)}for(let i=0;i<n.length;i++)n[i]===t&&(this.currentLocation!==i&&(r.activeTexture(r.TEXTURE0+i),this.currentLocation=i),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[i]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:i}=this;if(n)for(let o=t-1;o>=0;--o){const a=r[o];a&&a._glTextures[i].samplerType!==sl.FLOAT&&this.renderer.texture.unbind(a)}}initTexture(t){const r=new du(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Xt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var i;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(i=t.resource)!=null&&i.upload(n,t,r))r.samplerType!==sl.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,a=t.realHeight,u=n.gl;(r.width!==o||r.height!==a||r.dirtyId<0)&&(r.width=o,r.height=a,u.texImage2D(t.target,0,r.internalFormat,o,a,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const i=this.managedTextures.indexOf(t);i!==-1&&co(this.managedTextures,i,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===Rn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=Ji.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==Rn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===Lr.LINEAR){const o=Math.min(t.anisotropicLevel,n.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Lr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Bd.extension={type:qt.RendererSystem,name:"texture"},te.add(Bd);class Dd{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,i)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:i}=this;r&&i.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:i}=this,o=r.createTransformFeedback();t._glTransformFeedbacks[i]=o,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,o);for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,a,u._glBuffers[i].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),o}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this);const o=this.renderer.buffer;if(o)for(let a=0;a<t.buffers.length;a++){const u=t.buffers[a];if(!u)continue;const f=u._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&o.dispose(u,r))}n&&(r||i.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}Dd.extension={type:qt.RendererSystem,name:"transformFeedback"},te.add(Dd);class Po{constructor(t){this.renderer=t}init(t){this.screen=new ie(0,0,t.width,t.height),this.element=t.view||Dt.ADAPTER.createCanvas(),this.resolution=t.resolution||Dt.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,i=this.element.height/this.resolution;this.screen.width=n,this.screen.height=i,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${i}px`),this.renderer.emit("resize",n,i),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Po.defaultOptions={width:800,height:600,resolution:Dt.RESOLUTION,autoDensity:!1},Po.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"_view"},te.add(Po),Dt.PREFER_ENV=Cn.WEBGL2,Dt.STRICT_TEXTURE_CACHE=!1,Dt.RENDER_OPTIONS={...To.defaultOptions,...wo.defaultOptions,...Po.defaultOptions,...Ro.defaultOptions},Object.defineProperties(Dt,{WRAP_MODE:{get(){return Kt.defaultOptions.wrapMode},set(e){Ht("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Kt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Kt.defaultOptions.scaleMode},set(e){Ht("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Kt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Kt.defaultOptions.mipmap},set(e){Ht("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Kt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Kt.defaultOptions.anisotropicLevel},set(e){Ht("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Kt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Ht("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Zt.defaultResolution},set(e){Zt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Ht("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Zt.defaultMultisample},set(e){Zt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return wr.defaultMaxTextures},set(e){Ht("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),wr.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return wr.defaultBatchSize},set(e){Ht("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),wr.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return wr.canUploadSameBuffer},set(e){Ht("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),wr.canUploadSameBuffer=e}},GC_MODE:{get(){return Tr.defaultMode},set(e){Ht("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),Tr.defaultMode=e}},GC_MAX_IDLE:{get(){return Tr.defaultMaxIdle},set(e){Ht("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),Tr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return Tr.defaultCheckCountMax},set(e){Ht("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),Tr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Xr.defaultVertexPrecision},set(e){Ht("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Xr.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Xr.defaultFragmentPrecision},set(e){Ht("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Xr.defaultFragmentPrecision=e}}});var No=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(No||{});class pu{constructor(t,r=null,n=0,i=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=i}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!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=t?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 pu(null,null,1/0),this.deltaMS=1/Je.targetFPMS,this.elapsedMS=1/Je.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),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(e,t,r=No.NORMAL){return this._addListener(new pu(e,t,r))}addOnce(e,t,r=No.NORMAL){return this._addListener(new pu(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const i=e-this._lastFrame|0;if(i<this._minElapsedMS)return;this._lastFrame=e-i%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Je.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Je.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Je._shared){const e=Je._shared=new Je;e.autoStart=!0,e._protected=!0}return Je._shared}static get system(){if(!Je._system){const e=Je._system=new Je;e.autoStart=!0,e._protected=!0}return Je._system}};let Er=Je;Er.targetFPMS=.06,Object.defineProperties(Dt,{TARGET_FPMS:{get(){return Er.targetFPMS},set(e){Ht("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Er.targetFPMS=e}}});class Ud{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,No.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Er.shared:new Er,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Ud.extension=qt.Application,te.add(Ud);const dT=[];te.handleByList(qt.Renderer,dT);class $d{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=Te.HIGH?this.multisample=Te.HIGH:r>=Te.MEDIUM?this.multisample=Te.MEDIUM:r>=Te.LOW?this.multisample=Te.LOW:this.multisample=Te.NONE}destroy(){}}$d.extension={type:qt.RendererSystem,name:"_multisample"},te.add($d);class pT{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Gd{constructor(t){this.renderer=t,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(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,i.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:i}=this;if(this.boundBufferBases[r]!==t){const o=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,o.buffer)}}bindBufferRange(t,r,n){const{gl:i,CONTEXT_UID:o}=this;n=n||0;const a=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,a.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,i=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==i.updateID)if(i.updateID=t._updateID,r.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const o=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,o)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),n&&(r||i.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new pT(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Gd.extension={type:qt.RendererSystem,name:"buffer"},te.add(Gd);class jd{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,o,a,u;if(r&&(i=r.renderTexture,o=r.clear,a=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=a,!n.context.isLost){if(i||(this.lastObjectRendered=t),!u){const f=t.enableTempParent();t.updateTransform(),t.disableTempParent(f)}n.renderTexture.bind(i),n.batch.currentRenderer.start(),(o??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),i&&(r.blit&&n.framebuffer.blit(),i.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}jd.extension={type:qt.RendererSystem,name:"objectRenderer"},te.add(jd);const vu=class extends cT{constructor(e){super(),this.type=Fc.WEBGL,e=Object.assign({},Dt.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new br({projectionMatrix:new $e},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:vu.__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(t),"useContextAlpha"in e&&(Ht("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=vu.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:zx()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),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(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}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 Ht("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Ht("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Ht("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Ht("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Ht("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Ht("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Ht("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Ht("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let wi=vu;wi.extension={type:qt.Renderer,priority:1},wi.__plugins={},wi.__systems={},te.handleByMap(qt.RendererPlugin,wi.__plugins),te.handleByMap(qt.RendererSystem,wi.__systems),te.add(wi);class qd extends fs{constructor(t,r){const{width:n,height:i}=r||{};super(n,i),this.items=[],this.itemDirtyIds=[];for(let o=0;o<t;o++){const a=new Kt;this.items.push(a),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof fs?this.addResourceAt(t[n],n):this.addResourceAt(Jh(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:i}=this.items[0];return this.resize(n,i),Promise.resolve(this)}),this._load}}class vT extends qd{constructor(t,r){const{width:n,height:i}=r||{};let o,a;Array.isArray(t)?(o=t,a=t.length):a=t,super(a,{width:n,height:i}),o&&this.initFromArray(o,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=ii.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:i,itemDirtyIds:o,items:a}=this,{gl:u}=t;n.dirtyId<0&&u.texImage3D(u.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,i,0,r.format,n.type,null);for(let f=0;f<i;f++){const h=a[f];o[f]<h.dirtyId&&(o[f]=h.dirtyId,h.valid&&u.texSubImage3D(u.TEXTURE_2D_ARRAY,0,0,0,f,h.resource.width,h.resource.height,1,r.format,n.type,h.resource.source))}return!0}}class gT extends dn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const ms=class extends qd{constructor(e,t){const{width:r,height:n,autoLoad:i,linkBaseTexture:o}=t||{};if(e&&e.length!==ms.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let a=0;a<ms.SIDES;a++)this.items[a].target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+a;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,t),i!==!1&&this.load()}bind(e){super.bind(e),e.target=ii.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let i=0;i<ms.SIDES;i++){const o=this.items[i];(n[i]<o.dirtyId||r.dirtyId<t.dirtyId)&&(o.valid&&o.resource?(o.resource.upload(e,o,r),n[i]=o.dirtyId):n[i]<-1&&(e.gl.texImage2D(o.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[i]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===ms.SIDES}};let zd=ms;zd.SIDES=6;class Ti extends dn{constructor(t,r){r=r||{};let n,i;typeof t=="string"?(n=Ti.EMPTY,i=t):(n=t,i=null),super(n),this.url=i,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(t,r)=>{if(this.url===null){t(this);return}try{const n=await Dt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const i=await n.blob();if(this.destroyed)return;const o=await createImageBitmap(i,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===ln.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=o,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return Ti._EMPTY=Ti._EMPTY??Dt.ADAPTER.createCanvas(0,0),Ti._EMPTY}}const Mo=class extends dn{constructor(e,t){t=t||{},super(Dt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},Mo.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 e=new Image;dn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,i=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,i=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),i=Math.round(i);const o=this.source;o.width=n,o.height=i,o._pixiId=`canvas_${us()}`,o.getContext("2d").drawImage(e,0,0,t,r,0,0,n,i),this._resolve(),this._resolve=null}}static getSize(e){const t=Mo.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Mo.SVG_XML.test(e)}};let gu=Mo;gu.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,gu.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const mu=class extends dn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];dn.crossOrigin(r,n,t.crossorigin);for(let i=0;i<e.length;++i){const o=document.createElement("source");let{src:a,mime:u}=e[i];a=a||e[i];const f=a.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||mu.MIME_TYPES[h]||`video/${h}`,o.src=a,o.type=u,r.appendChild(o)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=Er.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!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 e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(Er.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Er.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||mu.TYPES.includes(t)}};let yu=mu;yu.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],yu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},tu.push(Ti,gd,gT,yu,gu,eu,zd,vT);var mT=`attribute vec2 aVertexPosition;
496
+ `),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(`
497
+ `))}}let QT=0;const ba={textureCount:0,uboCount:0};class Fd{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=QT++}systemCheck(){if(!TT())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,s=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(s.program)),r||(ba.textureCount=0,ba.uboCount=0,this.syncUniformGroup(t.uniformGroup,ba)),s}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=vT(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const s=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),s(n.uniformData,t.uniforms,this.renderer,ba,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:s}=this.renderer;this.renderer.buffer.bind(t.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,s.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const u=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[u];if(l||(l=this._uboCache[u]=JT(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return r.uniformGroups[t.id]=l.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const s=t.uniforms,a=[`${n}-`];for(const u in s)a.push(u),r[u]&&a.push(r[u].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,s=WT(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Fd.extension={type:Ct.RendererSystem,name:"shader"},Gt.add(Fd);class Ta{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Ta.defaultOptions={hello:!1},Ta.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"startup"},Gt.add(Ta);function tw(e,t=[]){return t[ht.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.ADD]=[e.ONE,e.ONE],t[ht.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.NONE]=[0,0],t[ht.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[ht.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[ht.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[ht.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[ht.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[ht.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[ht.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[ht.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[ht.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[ht.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const ew=0,rw=1,nw=2,iw=3,sw=4,aw=5,ol=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=ht.NONE,this._blendEq=!1,this.map=[],this.map[ew]=this.setBlend,this.map[rw]=this.setOffset,this.map[nw]=this.setCullFace,this.map[iw]=this.setDepthTest,this.map[sw]=this.setFrontFace,this.map[aw]=this.setDepthMask,this.checks=[],this.defaultState=new oa,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=tw(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(ol.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(ol.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}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(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Nd=ol;Nd.extension={type:Ct.RendererSystem,name:"state"},Gt.add(Nd);class ow extends Gs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(s=>t.systems[s]),n=[...r,...Object.keys(t.systems).filter(s=>!r.includes(s))];for(const s of n)this.addSystem(t.systems[s],s)}addRunners(...t){t.forEach(r=>{this.runners[r]=new sr(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const s in this.runners)this.runners[s].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(s=>{const a=n.find(u=>this._systemsHash[u]===s);s[t.name](r[a])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const wa=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=wa.defaultMaxIdle,this.checkCountMax=wa.defaultCheckCountMax,this.mode=wa.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==eu.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const s=t[n];!s.framebuffer&&this.count-s.touched>this.maxIdle&&(e.destroyTexture(s,!0),t[n]=null,r=!0)}if(r){let n=0;for(let s=0;s<t.length;s++)t[s]!==null&&(t[n++]=t[s]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let lr=wa;lr.defaultMode=eu.AUTO,lr.defaultMaxIdle=60*60,lr.defaultCheckCountMax=60*10,lr.extension={type:Ct.RendererSystem,name:"textureGC"},Gt.add(lr);class ul{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Nt.UNSIGNED_BYTE,this.internalFormat=Z.RGBA,this.samplerType=0}}function uw(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Nt.UNSIGNED_BYTE]:{[Z.RGBA]:e.RGBA8,[Z.RGB]:e.RGB8,[Z.RG]:e.RG8,[Z.RED]:e.R8,[Z.RGBA_INTEGER]:e.RGBA8UI,[Z.RGB_INTEGER]:e.RGB8UI,[Z.RG_INTEGER]:e.RG8UI,[Z.RED_INTEGER]:e.R8UI,[Z.ALPHA]:e.ALPHA,[Z.LUMINANCE]:e.LUMINANCE,[Z.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Nt.BYTE]:{[Z.RGBA]:e.RGBA8_SNORM,[Z.RGB]:e.RGB8_SNORM,[Z.RG]:e.RG8_SNORM,[Z.RED]:e.R8_SNORM,[Z.RGBA_INTEGER]:e.RGBA8I,[Z.RGB_INTEGER]:e.RGB8I,[Z.RG_INTEGER]:e.RG8I,[Z.RED_INTEGER]:e.R8I},[Nt.UNSIGNED_SHORT]:{[Z.RGBA_INTEGER]:e.RGBA16UI,[Z.RGB_INTEGER]:e.RGB16UI,[Z.RG_INTEGER]:e.RG16UI,[Z.RED_INTEGER]:e.R16UI,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Nt.SHORT]:{[Z.RGBA_INTEGER]:e.RGBA16I,[Z.RGB_INTEGER]:e.RGB16I,[Z.RG_INTEGER]:e.RG16I,[Z.RED_INTEGER]:e.R16I},[Nt.UNSIGNED_INT]:{[Z.RGBA_INTEGER]:e.RGBA32UI,[Z.RGB_INTEGER]:e.RGB32UI,[Z.RG_INTEGER]:e.RG32UI,[Z.RED_INTEGER]:e.R32UI,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Nt.INT]:{[Z.RGBA_INTEGER]:e.RGBA32I,[Z.RGB_INTEGER]:e.RGB32I,[Z.RG_INTEGER]:e.RG32I,[Z.RED_INTEGER]:e.R32I},[Nt.FLOAT]:{[Z.RGBA]:e.RGBA32F,[Z.RGB]:e.RGB32F,[Z.RG]:e.RG32F,[Z.RED]:e.R32F,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Nt.HALF_FLOAT]:{[Z.RGBA]:e.RGBA16F,[Z.RGB]:e.RGB16F,[Z.RG]:e.RG16F,[Z.RED]:e.R16F},[Nt.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:e.RGB565},[Nt.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:e.RGBA4},[Nt.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:e.RGB5_A1},[Nt.UNSIGNED_INT_2_10_10_10_REV]:{[Z.RGBA]:e.RGB10_A2,[Z.RGBA_INTEGER]:e.RGB10_A2UI},[Nt.UNSIGNED_INT_10F_11F_11F_REV]:{[Z.RGB]:e.R11F_G11F_B10F},[Nt.UNSIGNED_INT_5_9_9_9_REV]:{[Z.RGB]:e.RGB9_E5},[Nt.UNSIGNED_INT_24_8]:{[Z.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Nt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Z.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Nt.UNSIGNED_BYTE]:{[Z.RGBA]:e.RGBA,[Z.RGB]:e.RGB,[Z.ALPHA]:e.ALPHA,[Z.LUMINANCE]:e.LUMINANCE,[Z.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Nt.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:e.RGB},[Nt.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:e.RGBA},[Nt.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:e.RGBA}},t}class Ld{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Lt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=uw(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let s=0;s<r;s++)this.boundTextures[s]=null;this.emptyTextures={};const n=new ul(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new ul(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let s=0;s<6;s++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let s=0;s<this.boundTextures.length;s++)this.bind(null,s)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const s=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,s.texture)),s.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):s.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let s=0;s<n.length;s++)n[s]===this.unknownTexture&&this.bind(null,s)}for(let s=0;s<n.length;s++)n[s]===t&&(this.currentLocation!==s&&(r.activeTexture(r.TEXTURE0+s),this.currentLocation=s),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[s]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:s}=this;if(n)for(let a=t-1;a>=0;--a){const u=r[a];u&&u._glTextures[s].samplerType!==tu.FLOAT&&this.renderer.texture.unbind(u)}}initTexture(t){const r=new ul(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Nt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var s;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(s=t.resource)!=null&&s.upload(n,t,r))r.samplerType!==tu.FLOAT&&(this.hasIntegerTextures=!0);else{const a=t.realWidth,u=t.realHeight,l=n.gl;(r.width!==a||r.height!==u||r.dirtyId<0)&&(r.width=a,r.height=u,l.texImage2D(t.target,0,r.internalFormat,a,u,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const s=this.managedTextures.indexOf(t);s!==-1&&sa(this.managedTextures,s,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===yn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=ji.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==yn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const s=this.renderer.context.extensions.anisotropicFiltering;if(s&&t.anisotropicLevel>0&&t.scaleMode===Sr.LINEAR){const a=Math.min(t.anisotropicLevel,n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,s.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Ld.extension={type:Ct.RendererSystem,name:"texture"},Gt.add(Ld);class kd{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,s)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:s}=this;r&&s.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:s}=this,a=r.createTransformFeedback();t._glTransformFeedbacks[s]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let u=0;u<t.buffers.length;u++){const l=t.buffers[u];l&&(n.buffer.update(l),l._glBuffers[s].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,u,l._glBuffers[s].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),a}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],s=this.gl;t.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let u=0;u<t.buffers.length;u++){const l=t.buffers[u];if(!l)continue;const c=l._glBuffers[this.CONTEXT_UID];c&&(c.refCount--,c.refCount===0&&!r&&a.dispose(l,r))}n&&(r||s.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}kd.extension={type:Ct.RendererSystem,name:"transformFeedback"},Gt.add(kd);class Sa{constructor(t){this.renderer=t}init(t){this.screen=new jt(0,0,t.width,t.height),this.element=t.view||_t.ADAPTER.createCanvas(),this.resolution=t.resolution||_t.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,s=this.element.height/this.resolution;this.screen.width=n,this.screen.height=s,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${s}px`),this.renderer.emit("resize",n,s),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Sa.defaultOptions={width:800,height:600,resolution:_t.RESOLUTION,autoDensity:!1},Sa.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"_view"},Gt.add(Sa),_t.PREFER_ENV=vn.WEBGL2,_t.STRICT_TEXTURE_CACHE=!1,_t.RENDER_OPTIONS={...ma.defaultOptions,...ga.defaultOptions,...Sa.defaultOptions,...Ta.defaultOptions},Object.defineProperties(_t,{WRAP_MODE:{get(){return Lt.defaultOptions.wrapMode},set(e){Rt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Lt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Lt.defaultOptions.scaleMode},set(e){Rt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Lt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Lt.defaultOptions.mipmap},set(e){Rt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Lt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Lt.defaultOptions.anisotropicLevel},set(e){Rt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Lt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Rt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Dt.defaultResolution},set(e){Dt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Rt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Dt.defaultMultisample},set(e){Dt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return ur.defaultMaxTextures},set(e){Rt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),ur.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return ur.defaultBatchSize},set(e){Rt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),ur.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return ur.canUploadSameBuffer},set(e){Rt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),ur.canUploadSameBuffer=e}},GC_MODE:{get(){return lr.defaultMode},set(e){Rt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),lr.defaultMode=e}},GC_MAX_IDLE:{get(){return lr.defaultMaxIdle},set(e){Rt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),lr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return lr.defaultCheckCountMax},set(e){Rt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),lr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Br.defaultVertexPrecision},set(e){Rt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Br.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Br.defaultFragmentPrecision},set(e){Rt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Br.defaultFragmentPrecision=e}}});var Aa=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(Aa||{});class ll{constructor(t,r=null,n=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=s}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!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=t?null:r,this.previous=null,r}}const Ue=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 ll(null,null,1/0),this.deltaMS=1/Ue.targetFPMS,this.elapsedMS=1/Ue.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),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(e,t,r=Aa.NORMAL){return this._addListener(new ll(e,t,r))}addOnce(e,t,r=Aa.NORMAL){return this._addListener(new ll(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const s=e-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=e-s%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Ue.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Ue.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Ue._shared){const e=Ue._shared=new Ue;e.autoStart=!0,e._protected=!0}return Ue._shared}static get system(){if(!Ue._system){const e=Ue._system=new Ue;e.autoStart=!0,e._protected=!0}return Ue._system}};let hr=Ue;hr.targetFPMS=.06,Object.defineProperties(_t,{TARGET_FPMS:{get(){return hr.targetFPMS},set(e){Rt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),hr.targetFPMS=e}}});class Bd{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Aa.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?hr.shared:new hr,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Bd.extension=Ct.Application,Gt.add(Bd);const lw=[];Gt.handleByList(Ct.Renderer,lw);class Dd{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=fe.HIGH?this.multisample=fe.HIGH:r>=fe.MEDIUM?this.multisample=fe.MEDIUM:r>=fe.LOW?this.multisample=fe.LOW:this.multisample=fe.NONE}destroy(){}}Dd.extension={type:Ct.RendererSystem,name:"_multisample"},Gt.add(Dd);class hw{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Ud{constructor(t){this.renderer=t,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(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,s.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:s}=this;if(this.boundBufferBases[r]!==t){const a=t._glBuffers[s]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(t,r,n){const{gl:s,CONTEXT_UID:a}=this;n=n||0;const u=t._glBuffers[a]||this.createGLBuffer(t);s.bindBufferRange(s.UNIFORM_BUFFER,r||0,u.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==s.updateID)if(s.updateID=t._updateID,r.bindBuffer(t.type,s.buffer),s.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const a=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;s.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,a)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],s=this.gl;t.disposeRunner.remove(this),n&&(r||s.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new hw(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Ud.extension={type:Ct.RendererSystem,name:"buffer"},Gt.add(Ud);class $d{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let s,a,u,l;if(r&&(s=r.renderTexture,a=r.clear,u=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!s,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=u,!n.context.isLost){if(s||(this.lastObjectRendered=t),!l){const c=t.enableTempParent();t.updateTransform(),t.disableTempParent(c)}n.renderTexture.bind(s),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),s&&(r.blit&&n.framebuffer.blit(),s.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}$d.extension={type:Ct.RendererSystem,name:"objectRenderer"},Gt.add($d);const hl=class extends ow{constructor(e){super(),this.type=Fc.WEBGL,e=Object.assign({},_t.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new ar({projectionMatrix:new Pe},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:hl.__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(t),"useContextAlpha"in e&&(Rt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=hl.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:$b()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),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(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}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 Rt("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Rt("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Rt("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Rt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Rt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Rt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Rt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Rt("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let fi=hl;fi.extension={type:Ct.Renderer,priority:1},fi.__plugins={},fi.__systems={},Gt.handleByMap(Ct.RendererPlugin,fi.__plugins),Gt.handleByMap(Ct.RendererSystem,fi.__systems),Gt.add(fi);class Gd extends rs{constructor(t,r){const{width:n,height:s}=r||{};super(n,s),this.items=[],this.itemDirtyIds=[];for(let a=0;a<t;a++){const u=new Lt;this.items.push(u),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof rs?this.addResourceAt(t[n],n):this.addResourceAt(Zf(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:s}=this.items[0];return this.resize(n,s),Promise.resolve(this)}),this._load}}class cw extends Gd{constructor(t,r){const{width:n,height:s}=r||{};let a,u;Array.isArray(t)?(a=t,u=t.length):u=t,super(u,{width:n,height:s}),a&&this.initFromArray(a,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=qn.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:s,itemDirtyIds:a,items:u}=this,{gl:l}=t;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,s,0,r.format,n.type,null);for(let c=0;c<s;c++){const f=u[c];a[c]<f.dirtyId&&(a[c]=f.dirtyId,f.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,c,f.resource.width,f.resource.height,1,r.format,n.type,f.resource.source))}return!0}}class fw extends rn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const ls=class extends Gd{constructor(e,t){const{width:r,height:n,autoLoad:s,linkBaseTexture:a}=t||{};if(e&&e.length!==ls.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let u=0;u<ls.SIDES;u++)this.items[u].target=qn.TEXTURE_CUBE_MAP_POSITIVE_X+u;this.linkBaseTexture=a!==!1,e&&this.initFromArray(e,t),s!==!1&&this.load()}bind(e){super.bind(e),e.target=qn.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=qn.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let s=0;s<ls.SIDES;s++){const a=this.items[s];(n[s]<a.dirtyId||r.dirtyId<t.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(e,a,r),n[s]=a.dirtyId):n[s]<-1&&(e.gl.texImage2D(a.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[s]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===ls.SIDES}};let zd=ls;zd.SIDES=6;class di extends rn{constructor(t,r){r=r||{};let n,s;typeof t=="string"?(n=di.EMPTY,s=t):(n=t,s=null),super(n),this.url=s,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(t,r)=>{if(this.url===null){t(this);return}try{const n=await _t.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const s=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Zr.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return di._EMPTY=di._EMPTY??_t.ADAPTER.createCanvas(0,0),di._EMPTY}}const Ca=class extends rn{constructor(e,t){t=t||{},super(_t.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},Ca.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 e=new Image;rn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,s=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,s=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),s=Math.round(s);const a=this.source;a.width=n,a.height=s,a._pixiId=`canvas_${es()}`,a.getContext("2d").drawImage(e,0,0,t,r,0,0,n,s),this._resolve(),this._resolve=null}}static getSize(e){const t=Ca.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Ca.SVG_XML.test(e)}};let cl=Ca;cl.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,cl.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const fl=class extends rn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];rn.crossOrigin(r,n,t.crossorigin);for(let s=0;s<e.length;++s){const a=document.createElement("source");let{src:u,mime:l}=e[s];u=u||e[s];const c=u.split("?").shift().toLowerCase(),f=c.slice(c.lastIndexOf(".")+1);l=l||fl.MIME_TYPES[f]||`video/${f}`,a.src=u,a.type=l,r.appendChild(a)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=hr.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!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 e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(hr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(hr.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||fl.TYPES.includes(t)}};let dl=fl;dl.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],dl.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Yu.push(di,pd,fw,dl,cl,Ku,zd,cw);var dw=`attribute vec2 aVertexPosition;
498
498
  attribute vec2 aTextureCoord;
499
499
 
500
500
  uniform mat3 projectionMatrix;
@@ -505,7 +505,7 @@ void main(void)
505
505
  {
506
506
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
507
507
  vTextureCoord = aTextureCoord;
508
- }`,yT=`varying vec2 vTextureCoord;
508
+ }`,pw=`varying vec2 vTextureCoord;
509
509
  uniform sampler2D uSampler;
510
510
 
511
511
  uniform float gamma;
@@ -536,7 +536,7 @@ void main(void)
536
536
 
537
537
  gl_FragColor = c * alpha;
538
538
  }
539
- `;let _T=class extends Zt{constructor(t){super(mT,yT),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,t)}apply(t,r,n,i){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,t.applyFilter(this,r,n,i)}};var bT=`attribute vec2 aVertexPosition;
539
+ `;let gw=class extends Dt{constructor(t){super(dw,pw),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,t)}apply(t,r,n,s){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,t.applyFilter(this,r,n,s)}};var mw=`attribute vec2 aVertexPosition;
540
540
  attribute vec2 aTextureCoord;
541
541
 
542
542
  uniform mat3 projectionMatrix;
@@ -547,7 +547,7 @@ void main(void)
547
547
  {
548
548
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
549
549
  vTextureCoord = aTextureCoord;
550
- }`,xT=`
550
+ }`,vw=`
551
551
  varying vec2 vTextureCoord;
552
552
  uniform sampler2D uSampler;
553
553
 
@@ -573,7 +573,7 @@ void main(void)
573
573
  color *= 0.25;
574
574
 
575
575
  gl_FragColor = color;
576
- }`,wT=`
576
+ }`,yw=`
577
577
  varying vec2 vTextureCoord;
578
578
  uniform sampler2D uSampler;
579
579
 
@@ -601,7 +601,7 @@ void main(void)
601
601
 
602
602
  gl_FragColor = color;
603
603
  }
604
- `;let ys=class extends Zt{constructor(t=4,r=3,n=!1){super(bT,n?wT:xT),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new oe,this.pixelSize=1,this._clamp=n,Array.isArray(t)?this.kernels=t:(this._blur=t,this.quality=r)}apply(t,r,n,i){const o=this._pixelSize.x/r._frame.width,a=this._pixelSize.y/r._frame.height;let u;if(this._quality===1||this._blur===0)u=this._kernels[0]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,r,n,i);else{const f=t.getFilterTexture();let h=r,d=f,p;const c=this._quality-1;for(let v=0;v<c;v++)u=this._kernels[v]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,h,d,1),p=h,h=d,d=p;u=this._kernels[c]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*a,t.applyFilter(this,h,n,i),t.returnFilterTexture(f)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((t,r)=>t+r+.5,0))}_generateKernels(){const t=this._blur,r=this._quality,n=[t];if(t>0){let i=t;const o=t/r;for(let a=1;a<r;a++)i-=o,n.push(i)}this._kernels=n,this._updatePadding()}get kernels(){return this._kernels}set kernels(t){Array.isArray(t)&&t.length>0?(this._kernels=t,this._quality=t.length,this._blur=Math.max(...t)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(t){typeof t=="number"?(this._pixelSize.x=t,this._pixelSize.y=t):Array.isArray(t)?(this._pixelSize.x=t[0],this._pixelSize.y=t[1]):t instanceof oe?(this._pixelSize.x=t.x,this._pixelSize.y=t.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(t){this._quality=Math.max(1,Math.round(t)),this._generateKernels()}get blur(){return this._blur}set blur(t){this._blur=t,this._generateKernels()}};var Hd=`attribute vec2 aVertexPosition;
604
+ `;let hs=class extends Dt{constructor(t=4,r=3,n=!1){super(mw,n?yw:vw),this._kernels=[],this._blur=4,this._quality=3,this.uniforms.uOffset=new Float32Array(2),this._pixelSize=new Wt,this.pixelSize=1,this._clamp=n,Array.isArray(t)?this.kernels=t:(this._blur=t,this.quality=r)}apply(t,r,n,s){const a=this._pixelSize.x/r._frame.width,u=this._pixelSize.y/r._frame.height;let l;if(this._quality===1||this._blur===0)l=this._kernels[0]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,t.applyFilter(this,r,n,s);else{const c=t.getFilterTexture();let f=r,p=c,m;const g=this._quality-1;for(let x=0;x<g;x++)l=this._kernels[x]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,t.applyFilter(this,f,p,1),m=f,f=p,p=m;l=this._kernels[g]+.5,this.uniforms.uOffset[0]=l*a,this.uniforms.uOffset[1]=l*u,t.applyFilter(this,f,n,s),t.returnFilterTexture(c)}}_updatePadding(){this.padding=Math.ceil(this._kernels.reduce((t,r)=>t+r+.5,0))}_generateKernels(){const t=this._blur,r=this._quality,n=[t];if(t>0){let s=t;const a=t/r;for(let u=1;u<r;u++)s-=a,n.push(s)}this._kernels=n,this._updatePadding()}get kernels(){return this._kernels}set kernels(t){Array.isArray(t)&&t.length>0?(this._kernels=t,this._quality=t.length,this._blur=Math.max(...t)):(this._kernels=[0],this._quality=1)}get clamp(){return this._clamp}set pixelSize(t){typeof t=="number"?(this._pixelSize.x=t,this._pixelSize.y=t):Array.isArray(t)?(this._pixelSize.x=t[0],this._pixelSize.y=t[1]):t instanceof Wt?(this._pixelSize.x=t.x,this._pixelSize.y=t.y):(this._pixelSize.x=1,this._pixelSize.y=1)}get pixelSize(){return this._pixelSize}get quality(){return this._quality}set quality(t){this._quality=Math.max(1,Math.round(t)),this._generateKernels()}get blur(){return this._blur}set blur(t){this._blur=t,this._generateKernels()}};var Hd=`attribute vec2 aVertexPosition;
605
605
  attribute vec2 aTextureCoord;
606
606
 
607
607
  uniform mat3 projectionMatrix;
@@ -612,7 +612,7 @@ void main(void)
612
612
  {
613
613
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
614
614
  vTextureCoord = aTextureCoord;
615
- }`,TT=`
615
+ }`,_w=`
616
616
  uniform sampler2D uSampler;
617
617
  varying vec2 vTextureCoord;
618
618
 
@@ -633,7 +633,7 @@ void main() {
633
633
  gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
634
634
  }
635
635
  }
636
- `;let ET=class extends Zt{constructor(t=.5){super(Hd,TT),this.threshold=t}get threshold(){return this.uniforms.threshold}set threshold(t){this.uniforms.threshold=t}};var ST=`uniform sampler2D uSampler;
636
+ `;let xw=class extends Dt{constructor(t=.5){super(Hd,_w),this.threshold=t}get threshold(){return this.uniforms.threshold}set threshold(t){this.uniforms.threshold=t}};var bw=`uniform sampler2D uSampler;
637
637
  varying vec2 vTextureCoord;
638
638
 
639
639
  uniform sampler2D bloomTexture;
@@ -647,7 +647,7 @@ void main() {
647
647
  bloomColor.rgb *= bloomScale;
648
648
  gl_FragColor = color + bloomColor;
649
649
  }
650
- `;const Vd=class extends Zt{constructor(t){super(Hd,ST),this.bloomScale=1,this.brightness=1,this._resolution=Dt.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const r=Object.assign(Vd.defaults,t);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:i,quality:o,pixelSize:a,resolution:u}=r;this._extractFilter=new ET(r.threshold),this._extractFilter.resolution=u,this._blurFilter=n?new ys(n):new ys(i,o),this.pixelSize=a,this.resolution=u}apply(t,r,n,i,o){const a=t.getFilterTexture();this._extractFilter.apply(t,r,a,1,o);const u=t.getFilterTexture();this._blurFilter.apply(t,a,u,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=u,t.applyFilter(this,r,n,i),t.returnFilterTexture(u),t.returnFilterTexture(a)}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get threshold(){return this._extractFilter.threshold}set threshold(t){this._extractFilter.threshold=t}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let AT=Vd;AT.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var OT=`attribute vec2 aVertexPosition;
650
+ `;const Vd=class extends Dt{constructor(t){super(Hd,bw),this.bloomScale=1,this.brightness=1,this._resolution=_t.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const r=Object.assign(Vd.defaults,t);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:s,quality:a,pixelSize:u,resolution:l}=r;this._extractFilter=new xw(r.threshold),this._extractFilter.resolution=l,this._blurFilter=n?new hs(n):new hs(s,a),this.pixelSize=u,this.resolution=l}apply(t,r,n,s,a){const u=t.getFilterTexture();this._extractFilter.apply(t,r,u,1,a);const l=t.getFilterTexture();this._blurFilter.apply(t,u,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,t.applyFilter(this,r,n,s),t.returnFilterTexture(l),t.returnFilterTexture(u)}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get threshold(){return this._extractFilter.threshold}set threshold(t){this._extractFilter.threshold=t}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let Tw=Vd;Tw.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:_t.FILTER_RESOLUTION};var ww=`attribute vec2 aVertexPosition;
651
651
  attribute vec2 aTextureCoord;
652
652
 
653
653
  uniform mat3 projectionMatrix;
@@ -658,7 +658,7 @@ void main(void)
658
658
  {
659
659
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
660
660
  vTextureCoord = aTextureCoord;
661
- }`,CT=`uniform float radius;
661
+ }`,Sw=`uniform float radius;
662
662
  uniform float strength;
663
663
  uniform vec2 center;
664
664
  uniform sampler2D uSampler;
@@ -691,7 +691,7 @@ void main()
691
691
 
692
692
  gl_FragColor = color;
693
693
  }
694
- `;const Wd=class extends Zt{constructor(t){super(OT,CT),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Wd.defaults,t)}apply(t,r,n,i){const{width:o,height:a}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,t.applyFilter(this,r,n,i)}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}get strength(){return this.uniforms.strength}set strength(t){this.uniforms.strength=t}get center(){return this.uniforms.center}set center(t){this.uniforms.center=t}};let RT=Wd;RT.defaults={center:[.5,.5],radius:100,strength:1};var IT=`const float PI = 3.1415926538;
694
+ `;const jd=class extends Dt{constructor(t){super(ww,Sw),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,jd.defaults,t)}apply(t,r,n,s){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,t.applyFilter(this,r,n,s)}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}get strength(){return this.uniforms.strength}set strength(t){this.uniforms.strength=t}get center(){return this.uniforms.center}set center(t){this.uniforms.center=t}};let Aw=jd;Aw.defaults={center:[.5,.5],radius:100,strength:1};var Cw=`const float PI = 3.1415926538;
695
695
  const float PI_2 = PI*2.;
696
696
 
697
697
  varying vec2 vTextureCoord;
@@ -818,7 +818,7 @@ void main(void) {
818
818
  // mix resulting color with current color
819
819
  gl_FragColor = gradientColor + currentColor*(1.-gradientColor.a);
820
820
  }
821
- `,PT=`attribute vec2 aVertexPosition;
821
+ `,Ew=`attribute vec2 aVertexPosition;
822
822
  attribute vec2 aTextureCoord;
823
823
 
824
824
  uniform mat3 projectionMatrix;
@@ -834,7 +834,7 @@ void main(void)
834
834
  vTextureCoord = aTextureCoord;
835
835
  vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw;
836
836
  }
837
- `,Gn=Gn||{};Gn.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var r=e.visit(t.orientation);return r&&(r+=", "),t.type+"("+r+e.visit(t.colorStops)+")"},visit_shape:function(t){var r=t.value,n=e.visit(t.at),i=e.visit(t.style);return i&&(r+=" "+i),n&&(r+=" at "+n),r},"visit_default-radial":function(t){var r="",n=e.visit(t.at);return n&&(r+=n),r},"visit_extent-keyword":function(t){var r=t.value,n=e.visit(t.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,r){var n=t,i=e.visit(r.length);return i&&(n+=" "+i),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var r="",n=t.length;return t.forEach(function(i,o){r+=e.visit(i),o<n-1&&(r+=", ")}),r},visit:function(t){if(!t)return"";var r="";if(t instanceof Array)return e.visit_array(t,r);if(t.type){var n=e["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}}();var Gn=Gn||{};Gn.parse=function(){var e={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]+\.?))/},t="";function r(z){var nt=new Error(t+": "+z);throw nt.source=t,nt}function n(){var z=i();return t.length>0&&r("Invalid input not EOF"),z}function i(){return T(o)}function o(){return a("linear-gradient",e.linearGradient,f)||a("repeating-linear-gradient",e.repeatingLinearGradient,f)||a("radial-gradient",e.radialGradient,p)||a("repeating-radial-gradient",e.repeatingRadialGradient,p)}function a(z,nt,V){return u(nt,function(D){var k=V();return k&&(q(e.comma)||r("Missing comma before color stops")),{type:z,orientation:k,colorStops:T(x)}})}function u(z,nt){var V=q(z);if(V){q(e.startCall)||r("Missing (");var D=nt(V);return q(e.endCall)||r("Missing )"),D}}function f(){return h()||d()}function h(){return F("directional",e.sideOrCorner,1)}function d(){return F("angular",e.angleValue,1)}function p(){var z,nt=c(),V;return nt&&(z=[],z.push(nt),V=t,q(e.comma)&&(nt=c(),nt?z.push(nt):t=V)),z}function c(){var z=v()||y();if(z)z.at=b();else{var nt=_();if(nt){z=nt;var V=b();V&&(z.at=V)}else{var D=m();D&&(z={type:"default-radial",at:D})}}return z}function v(){var z=F("shape",/^(circle)/i,0);return z&&(z.style=M()||_()),z}function y(){var z=F("shape",/^(ellipse)/i,0);return z&&(z.style=C()||_()),z}function _(){return F("extent-keyword",e.extentKeywords,1)}function b(){if(F("position",/^at/,0)){var z=m();return z||r("Missing positioning value"),z}}function m(){var z=w();if(z.x||z.y)return{type:"position",value:z}}function w(){return{x:C(),y:C()}}function T(z){var nt=z(),V=[];if(nt)for(V.push(nt);q(e.comma);)nt=z(),nt?V.push(nt):r("One extra comma");return V}function x(){var z=E();return z||r("Expected color definition"),z.length=C(),z}function E(){return O()||L()||A()||I()}function I(){return F("literal",e.literalColor,0)}function O(){return F("hex",e.hexColor,1)}function A(){return u(e.rgbColor,function(){return{type:"rgb",value:T(R)}})}function L(){return u(e.rgbaColor,function(){return{type:"rgba",value:T(R)}})}function R(){return q(e.number)[1]}function C(){return F("%",e.percentageValue,1)||P()||M()}function P(){return F("position-keyword",e.positionKeywords,1)}function M(){return F("px",e.pixelValue,1)||F("em",e.emValue,1)}function F(z,nt,V){var D=q(nt);if(D)return{type:z,value:D[V]}}function q(z){var nt,V;return V=/^[\n\r\t\s]+/.exec(t),V&&Z(V[0].length),nt=z.exec(t),nt&&Z(nt[0].length),nt}function Z(z){t=t.substr(z)}return function(z){return t=z.toString(),n()}}();var NT=Gn.parse;Gn.stringify;var Xd={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]},Kd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function MT(e){var t,r=[],n=1,i;if(typeof e=="string")if(Xd[e])r=Xd[e].slice(),i="rgb";else if(e==="transparent")n=0,i="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var o=e.slice(1),a=o.length,u=a<=4;n=1,u?(r=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],a===4&&(n=parseInt(o[3]+o[3],16)/255)):(r=[parseInt(o[0]+o[1],16),parseInt(o[2]+o[3],16),parseInt(o[4]+o[5],16)],a===8&&(n=parseInt(o[6]+o[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var f=t[1],h=f==="rgb",o=f.replace(/a$/,"");i=o;var a=o==="cmyk"?4:o==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,v){if(/%$/.test(c))return v===a?parseFloat(c)/100:o==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(o[v]==="h"){if(/deg$/.test(c))return parseFloat(c);if(Kd[c]!==void 0)return Kd[c]}return parseFloat(c)}),f===o&&r.push(1),n=h||r[a]===void 0?1:r[a],r=r.slice(0,a)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(d){return parseFloat(d)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],i="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(i="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(i="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:i,values:r,alpha:n}}var _u={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},bu={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,i,o,a,u,f;if(r===0)return f=n*255,[f,f,f];n<.5?o=n*(1+r):o=n+r-n*r,i=2*n-o,u=[0,0,0];for(var h=0;h<3;h++)a=t+1/3*-(h-1),a<0?a++:a>1&&a--,6*a<1?f=i+(o-i)*6*a:2*a<1?f=o:3*a<2?f=i+(o-i)*(2/3-a)*6:f=i,u[h]=f*255;return u}};_u.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=o-i,u,f,h;return o===i?u=0:t===o?u=(r-n)/a:r===o?u=2+(n-t)/a:n===o&&(u=4+(t-r)/a),u=Math.min(u*60,360),u<0&&(u+=360),h=(i+o)/2,o===i?f=0:h<=.5?f=a/(o+i):f=a/(2-o-i),[u,f*100,h*100]};function kT(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments));var t,r=MT(e);if(!r.space)return[];const n=r.space[0]==="h"?bu.min:_u.min,i=r.space[0]==="h"?bu.max:_u.max;return t=Array(3),t[0]=Math.min(Math.max(r.values[0],n[0]),i[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),i[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),i[2]),r.space[0]==="h"&&(t=bu.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}function Yd(e){switch(typeof e){case"string":return LT(e);case"number":return uo(e);default:return e}}function LT(e){const t=kT(e);if(!t)throw new Error(`Unable to parse color "${e}" as RGBA.`);return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function FT(e){const t=NT(HT(e));if(t.length===0)throw new Error("Invalid CSS gradient.");if(t.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=t[0],n=BT(r.type),i=DT(r.colorStops),o=qT(r.orientation);return{type:n,stops:i,angle:o}}function BT(e){const t={"linear-gradient":0,"radial-gradient":1};if(!(e in t))throw new Error(`Unsupported gradient type "${e}"`);return t[e]}function DT(e){const t=GT(e),r=[];for(let n=0;n<e.length;n++){const i=UT(e[n]);r.push({offset:t[n],color:i.slice(0,3),alpha:i[3]})}return r}function UT(e){return Yd($T(e))}function $T(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;default:return`${e.type}(${e.value.join(",")})`}}function GT(e){const t=[];for(let i=0;i<e.length;i++){const o=e[i];let a=-1;o.type==="literal"&&o.length&&"type"in o.length&&o.length.type==="%"&&"value"in o.length&&(a=parseFloat(o.length.value)/100),t.push(a)}const r=i=>{for(let o=i;o<t.length;o++)if(t[o]!==-1)return{indexDelta:o-i,offset:t[o]};return{indexDelta:t.length-1-i,offset:1}};let n=0;for(let i=0;i<t.length;i++){const o=t[i];if(o!==-1)n=o;else if(i===0)t[i]=0;else if(i+1===t.length)t[i]=1;else{const a=r(i),u=(a.offset-n)/(1+a.indexDelta);for(let f=0;f<=a.indexDelta;f++)t[i+f]=n+(f+1)*u;i+=a.indexDelta,n=t[i]}}return t.map(jT)}function jT(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function qT(e){if(typeof e>"u")return 0;if("type"in e&&"value"in e)switch(e.type){case"angular":return parseFloat(e.value);case"directional":return zT(e.value)}return 0}function zT(e){const t={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(!(e in t))throw new Error(`Unsupported directional value "${e}"`);return t[e]}function HT(e){let t=e.replace(/\s{2,}/gu," ");return t=t.replace(/;/g,""),t=t.replace(/ ,/g,","),t=t.replace(/\( /g,"("),t=t.replace(/ \)/g,")"),t.trim()}var VT=Object.defineProperty,WT=Object.defineProperties,XT=Object.getOwnPropertyDescriptors,Zd=Object.getOwnPropertySymbols,KT=Object.prototype.hasOwnProperty,YT=Object.prototype.propertyIsEnumerable,Qd=(e,t,r)=>t in e?VT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,xu=(e,t)=>{for(var r in t||(t={}))KT.call(t,r)&&Qd(e,r,t[r]);if(Zd)for(var r of Zd(t))YT.call(t,r)&&Qd(e,r,t[r]);return e},ZT=(e,t)=>WT(e,XT(t));const Jd=90;function QT(e){return[...e].sort((t,r)=>t.offset-r.offset)}const wu=class extends Zt{constructor(t){t&&"css"in t&&(t=ZT(xu({},FT(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const r=xu(xu({},wu.defaults),t);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(PT,IT),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(t){const r=QT(t),n=new Float32Array(r.length*3),i=0,o=1,a=2;for(let u=0;u<r.length;u++){const f=Yd(r[u].color),h=u*3;n[h+i]=f[i],n[h+o]=f[o],n[h+a]=f[a]}this.uniforms.uColors=n,this.uniforms.uOffsets=r.map(u=>u.offset),this.uniforms.uAlphas=r.map(u=>u.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(t){this.uniforms.uType=t}get type(){return this.uniforms.uType}set angle(t){this.uniforms.uAngle=t-Jd}get angle(){return this.uniforms.uAngle+Jd}set alpha(t){this.uniforms.uAlpha=t}get alpha(){return this.uniforms.uAlpha}set maxColors(t){this.uniforms.uMaxColors=t}get maxColors(){return this.uniforms.uMaxColors}};let ko=wu;ko.LINEAR=0,ko.RADIAL=1,ko.CONIC=2,ko.defaults={type:wu.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var JT=`attribute vec2 aVertexPosition;
837
+ `,Pn=Pn||{};Pn.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var r=e.visit(t.orientation);return r&&(r+=", "),t.type+"("+r+e.visit(t.colorStops)+")"},visit_shape:function(t){var r=t.value,n=e.visit(t.at),s=e.visit(t.style);return s&&(r+=" "+s),n&&(r+=" at "+n),r},"visit_default-radial":function(t){var r="",n=e.visit(t.at);return n&&(r+=n),r},"visit_extent-keyword":function(t){var r=t.value,n=e.visit(t.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,r){var n=t,s=e.visit(r.length);return s&&(n+=" "+s),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var r="",n=t.length;return t.forEach(function(s,a){r+=e.visit(s),a<n-1&&(r+=", ")}),r},visit:function(t){if(!t)return"";var r="";if(t instanceof Array)return e.visit_array(t,r);if(t.type){var n=e["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}}();var Pn=Pn||{};Pn.parse=function(){var e={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]+\.?))/},t="";function r(G){var rt=new Error(t+": "+G);throw rt.source=t,rt}function n(){var G=s();return t.length>0&&r("Invalid input not EOF"),G}function s(){return A(a)}function a(){return u("linear-gradient",e.linearGradient,c)||u("repeating-linear-gradient",e.repeatingLinearGradient,c)||u("radial-gradient",e.radialGradient,m)||u("repeating-radial-gradient",e.repeatingRadialGradient,m)}function u(G,rt,gt){return l(rt,function(H){var K=gt();return K&&(xt(e.comma)||r("Missing comma before color stops")),{type:G,orientation:K,colorStops:A(R)}})}function l(G,rt){var gt=xt(G);if(gt){xt(e.startCall)||r("Missing (");var H=rt(gt);return xt(e.endCall)||r("Missing )"),H}}function c(){return f()||p()}function f(){return j("directional",e.sideOrCorner,1)}function p(){return j("angular",e.angleValue,1)}function m(){var G,rt=g(),gt;return rt&&(G=[],G.push(rt),gt=t,xt(e.comma)&&(rt=g(),rt?G.push(rt):t=gt)),G}function g(){var G=x()||y();if(G)G.at=T();else{var rt=S();if(rt){G=rt;var gt=T();gt&&(G.at=gt)}else{var H=w();H&&(G={type:"default-radial",at:H})}}return G}function x(){var G=j("shape",/^(circle)/i,0);return G&&(G.style=V()||S()),G}function y(){var G=j("shape",/^(ellipse)/i,0);return G&&(G.style=tt()||S()),G}function S(){return j("extent-keyword",e.extentKeywords,1)}function T(){if(j("position",/^at/,0)){var G=w();return G||r("Missing positioning value"),G}}function w(){var G=I();if(G.x||G.y)return{type:"position",value:G}}function I(){return{x:tt(),y:tt()}}function A(G){var rt=G(),gt=[];if(rt)for(gt.push(rt);xt(e.comma);)rt=G(),rt?gt.push(rt):r("One extra comma");return gt}function R(){var G=N();return G||r("Expected color definition"),G.length=tt(),G}function N(){return L()||z()||O()||B()}function B(){return j("literal",e.literalColor,0)}function L(){return j("hex",e.hexColor,1)}function O(){return l(e.rgbColor,function(){return{type:"rgb",value:A(X)}})}function z(){return l(e.rgbaColor,function(){return{type:"rgba",value:A(X)}})}function X(){return xt(e.number)[1]}function tt(){return j("%",e.percentageValue,1)||it()||V()}function it(){return j("position-keyword",e.positionKeywords,1)}function V(){return j("px",e.pixelValue,1)||j("em",e.emValue,1)}function j(G,rt,gt){var H=xt(rt);if(H)return{type:G,value:H[gt]}}function xt(G){var rt,gt;return gt=/^[\n\r\t\s]+/.exec(t),gt&&kt(gt[0].length),rt=G.exec(t),rt&&kt(rt[0].length),rt}function kt(G){t=t.substr(G)}return function(G){return t=G.toString(),n()}}();var Iw=Pn.parse;Pn.stringify;var Xd={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]},Wd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Rw(e){var t,r=[],n=1,s;if(typeof e=="string")if(Xd[e])r=Xd[e].slice(),s="rgb";else if(e==="transparent")n=0,s="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),u=a.length,l=u<=4;n=1,l?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],u===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],u===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),s="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var c=t[1],f=c==="rgb",a=c.replace(/a$/,"");s=a;var u=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(g,x){if(/%$/.test(g))return x===u?parseFloat(g)/100:a==="rgb"?parseFloat(g)*255/100:parseFloat(g);if(a[x]==="h"){if(/deg$/.test(g))return parseFloat(g);if(Wd[g]!==void 0)return Wd[g]}return parseFloat(g)}),c===a&&r.push(1),n=f||r[u]===void 0?1:r[u],r=r.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),s=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],s="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(s="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(s="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(s="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:s,values:r,alpha:n}}var pl={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},gl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,s,a,u,l,c;if(r===0)return c=n*255,[c,c,c];n<.5?a=n*(1+r):a=n+r-n*r,s=2*n-a,l=[0,0,0];for(var f=0;f<3;f++)u=t+1/3*-(f-1),u<0?u++:u>1&&u--,6*u<1?c=s+(a-s)*6*u:2*u<1?c=a:3*u<2?c=s+(a-s)*(2/3-u)*6:c=s,l[f]=c*255;return l}};pl.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),a=Math.max(t,r,n),u=a-s,l,c,f;return a===s?l=0:t===a?l=(r-n)/u:r===a?l=2+(n-t)/u:n===a&&(l=4+(t-r)/u),l=Math.min(l*60,360),l<0&&(l+=360),f=(s+a)/2,a===s?c=0:f<=.5?c=u/(a+s):c=u/(2-a-s),[l,c*100,f*100]};function Pw(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments));var t,r=Rw(e);if(!r.space)return[];const n=r.space[0]==="h"?gl.min:pl.min,s=r.space[0]==="h"?gl.max:pl.max;return t=Array(3),t[0]=Math.min(Math.max(r.values[0],n[0]),s[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),s[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),s[2]),r.space[0]==="h"&&(t=gl.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}function qd(e){switch(typeof e){case"string":return Mw(e);case"number":return na(e);default:return e}}function Mw(e){const t=Pw(e);if(!t)throw new Error(`Unable to parse color "${e}" as RGBA.`);return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function Ow(e){const t=Iw(Gw(e));if(t.length===0)throw new Error("Invalid CSS gradient.");if(t.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=t[0],n=Fw(r.type),s=Nw(r.colorStops),a=Uw(r.orientation);return{type:n,stops:s,angle:a}}function Fw(e){const t={"linear-gradient":0,"radial-gradient":1};if(!(e in t))throw new Error(`Unsupported gradient type "${e}"`);return t[e]}function Nw(e){const t=Bw(e),r=[];for(let n=0;n<e.length;n++){const s=Lw(e[n]);r.push({offset:t[n],color:s.slice(0,3),alpha:s[3]})}return r}function Lw(e){return qd(kw(e))}function kw(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;default:return`${e.type}(${e.value.join(",")})`}}function Bw(e){const t=[];for(let s=0;s<e.length;s++){const a=e[s];let u=-1;a.type==="literal"&&a.length&&"type"in a.length&&a.length.type==="%"&&"value"in a.length&&(u=parseFloat(a.length.value)/100),t.push(u)}const r=s=>{for(let a=s;a<t.length;a++)if(t[a]!==-1)return{indexDelta:a-s,offset:t[a]};return{indexDelta:t.length-1-s,offset:1}};let n=0;for(let s=0;s<t.length;s++){const a=t[s];if(a!==-1)n=a;else if(s===0)t[s]=0;else if(s+1===t.length)t[s]=1;else{const u=r(s),l=(u.offset-n)/(1+u.indexDelta);for(let c=0;c<=u.indexDelta;c++)t[s+c]=n+(c+1)*l;s+=u.indexDelta,n=t[s]}}return t.map(Dw)}function Dw(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function Uw(e){if(typeof e>"u")return 0;if("type"in e&&"value"in e)switch(e.type){case"angular":return parseFloat(e.value);case"directional":return $w(e.value)}return 0}function $w(e){const t={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(!(e in t))throw new Error(`Unsupported directional value "${e}"`);return t[e]}function Gw(e){let t=e.replace(/\s{2,}/gu," ");return t=t.replace(/;/g,""),t=t.replace(/ ,/g,","),t=t.replace(/\( /g,"("),t=t.replace(/ \)/g,")"),t.trim()}var zw=Object.defineProperty,Hw=Object.defineProperties,Vw=Object.getOwnPropertyDescriptors,Yd=Object.getOwnPropertySymbols,jw=Object.prototype.hasOwnProperty,Xw=Object.prototype.propertyIsEnumerable,Kd=(e,t,r)=>t in e?zw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ml=(e,t)=>{for(var r in t||(t={}))jw.call(t,r)&&Kd(e,r,t[r]);if(Yd)for(var r of Yd(t))Xw.call(t,r)&&Kd(e,r,t[r]);return e},Ww=(e,t)=>Hw(e,Vw(t));const Zd=90;function qw(e){return[...e].sort((t,r)=>t.offset-r.offset)}const vl=class extends Dt{constructor(t){t&&"css"in t&&(t=Ww(ml({},Ow(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const r=ml(ml({},vl.defaults),t);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(Ew,Cw),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(t){const r=qw(t),n=new Float32Array(r.length*3),s=0,a=1,u=2;for(let l=0;l<r.length;l++){const c=qd(r[l].color),f=l*3;n[f+s]=c[s],n[f+a]=c[a],n[f+u]=c[u]}this.uniforms.uColors=n,this.uniforms.uOffsets=r.map(l=>l.offset),this.uniforms.uAlphas=r.map(l=>l.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(t){this.uniforms.uType=t}get type(){return this.uniforms.uType}set angle(t){this.uniforms.uAngle=t-Zd}get angle(){return this.uniforms.uAngle+Zd}set alpha(t){this.uniforms.uAlpha=t}get alpha(){return this.uniforms.uAlpha}set maxColors(t){this.uniforms.uMaxColors=t}get maxColors(){return this.uniforms.uMaxColors}};let Ea=vl;Ea.LINEAR=0,Ea.RADIAL=1,Ea.CONIC=2,Ea.defaults={type:vl.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var Yw=`attribute vec2 aVertexPosition;
838
838
  attribute vec2 aTextureCoord;
839
839
 
840
840
  uniform mat3 projectionMatrix;
@@ -845,7 +845,7 @@ void main(void)
845
845
  {
846
846
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
847
847
  vTextureCoord = aTextureCoord;
848
- }`,tE=`precision mediump float;
848
+ }`,Kw=`precision mediump float;
849
849
 
850
850
  varying mediump vec2 vTextureCoord;
851
851
 
@@ -874,7 +874,7 @@ void main(void)
874
874
 
875
875
  gl_FragColor.a = c22.a;
876
876
  }
877
- `;let eE=class extends Zt{constructor(t,r=200,n=200){super(JT,tE),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),t!==void 0&&(this.matrix=t),this.width=r,this.height=n}get matrix(){return this.uniforms.matrix}set matrix(t){t.forEach((r,n)=>{this.uniforms.matrix[n]=r})}get width(){return 1/this.uniforms.texelSize[0]}set width(t){this.uniforms.texelSize[0]=1/t}get height(){return 1/this.uniforms.texelSize[1]}set height(t){this.uniforms.texelSize[1]=1/t}};var rE=`attribute vec2 aVertexPosition;
877
+ `;let Zw=class extends Dt{constructor(t,r=200,n=200){super(Yw,Kw),this.uniforms.texelSize=new Float32Array(2),this.uniforms.matrix=new Float32Array(9),t!==void 0&&(this.matrix=t),this.width=r,this.height=n}get matrix(){return this.uniforms.matrix}set matrix(t){t.forEach((r,n)=>{this.uniforms.matrix[n]=r})}get width(){return 1/this.uniforms.texelSize[0]}set width(t){this.uniforms.texelSize[0]=1/t}get height(){return 1/this.uniforms.texelSize[1]}set height(t){this.uniforms.texelSize[1]=1/t}};var Jw=`attribute vec2 aVertexPosition;
878
878
  attribute vec2 aTextureCoord;
879
879
 
880
880
  uniform mat3 projectionMatrix;
@@ -885,7 +885,7 @@ void main(void)
885
885
  {
886
886
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
887
887
  vTextureCoord = aTextureCoord;
888
- }`,nE=`varying vec2 vTextureCoord;
888
+ }`,Qw=`varying vec2 vTextureCoord;
889
889
  uniform sampler2D uSampler;
890
890
 
891
891
  uniform vec4 filterArea;
@@ -951,7 +951,7 @@ void main(void)
951
951
 
952
952
  gl_FragColor.rgb = rgb;
953
953
  }
954
- `;const tp=class extends Zt{constructor(t){super(rE,nE),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,tp.defaults,t)}apply(t,r,n,i){const{width:o,height:a}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.seed=this.seed,this.uniforms.time=this.time,t.applyFilter(this,r,n,i)}set curvature(t){this.uniforms.curvature=t}get curvature(){return this.uniforms.curvature}set lineWidth(t){this.uniforms.lineWidth=t}get lineWidth(){return this.uniforms.lineWidth}set lineContrast(t){this.uniforms.lineContrast=t}get lineContrast(){return this.uniforms.lineContrast}set verticalLine(t){this.uniforms.verticalLine=t}get verticalLine(){return this.uniforms.verticalLine}set noise(t){this.uniforms.noise=t}get noise(){return this.uniforms.noise}set noiseSize(t){this.uniforms.noiseSize=t}get noiseSize(){return this.uniforms.noiseSize}set vignetting(t){this.uniforms.vignetting=t}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(t){this.uniforms.vignettingAlpha=t}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(t){this.uniforms.vignettingBlur=t}get vignettingBlur(){return this.uniforms.vignettingBlur}};let iE=tp;iE.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var sE=`attribute vec2 aVertexPosition;
954
+ `;const Jd=class extends Dt{constructor(t){super(Jw,Qw),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Jd.defaults,t)}apply(t,r,n,s){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.seed=this.seed,this.uniforms.time=this.time,t.applyFilter(this,r,n,s)}set curvature(t){this.uniforms.curvature=t}get curvature(){return this.uniforms.curvature}set lineWidth(t){this.uniforms.lineWidth=t}get lineWidth(){return this.uniforms.lineWidth}set lineContrast(t){this.uniforms.lineContrast=t}get lineContrast(){return this.uniforms.lineContrast}set verticalLine(t){this.uniforms.verticalLine=t}get verticalLine(){return this.uniforms.verticalLine}set noise(t){this.uniforms.noise=t}get noise(){return this.uniforms.noise}set noiseSize(t){this.uniforms.noiseSize=t}get noiseSize(){return this.uniforms.noiseSize}set vignetting(t){this.uniforms.vignetting=t}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(t){this.uniforms.vignettingAlpha=t}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(t){this.uniforms.vignettingBlur=t}get vignettingBlur(){return this.uniforms.vignettingBlur}};let tS=Jd;tS.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var eS=`attribute vec2 aVertexPosition;
955
955
  attribute vec2 aTextureCoord;
956
956
 
957
957
  uniform mat3 projectionMatrix;
@@ -962,7 +962,7 @@ void main(void)
962
962
  {
963
963
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
964
964
  vTextureCoord = aTextureCoord;
965
- }`,oE=`varying vec2 vTextureCoord;
965
+ }`,rS=`varying vec2 vTextureCoord;
966
966
  uniform sampler2D uSampler;
967
967
  uniform float alpha;
968
968
  uniform vec3 color;
@@ -980,7 +980,7 @@ void main(void){
980
980
  sample *= alpha;
981
981
 
982
982
  gl_FragColor = sample;
983
- }`,aE=Object.defineProperty,ep=Object.getOwnPropertySymbols,lE=Object.prototype.hasOwnProperty,uE=Object.prototype.propertyIsEnumerable,rp=(e,t,r)=>t in e?aE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,np=(e,t)=>{for(var r in t||(t={}))lE.call(t,r)&&rp(e,r,t[r]);if(ep)for(var r of ep(t))uE.call(t,r)&&rp(e,r,t[r]);return e};const Tu=class extends Zt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=Dt.FILTER_RESOLUTION;const r=t?np(np({},Tu.defaults),t):Tu.defaults,{kernels:n,blur:i,quality:o,pixelSize:a,resolution:u}=r;this._offset=new Un(this._updatePadding,this),this._tintFilter=new Zt(sE,oE),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=u,this._blurFilter=n?new ys(n):new ys(i,o),this.pixelSize=a,this.resolution=u;const{shadowOnly:f,rotation:h,distance:d,offset:p,alpha:c,color:v}=r;this.shadowOnly=f,h!==void 0&&d!==void 0?(this.rotation=h,this.distance=d):this.offset=p,this.alpha=c,this.color=v}apply(t,r,n,i){const o=t.getFilterTexture();this._tintFilter.apply(t,r,o,1),this._blurFilter.apply(t,o,n,i),this.shadowOnly!==!0&&t.applyFilter(this,r,n,0),t.returnFilterTexture(o)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){Ht("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/cs}set rotation(t){Ht("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*cs,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return Vl(this._tintFilter.uniforms.color)}set color(t){uo(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let fE=Tu;fE.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var cE=`attribute vec2 aVertexPosition;
983
+ }`,nS=Object.defineProperty,Qd=Object.getOwnPropertySymbols,iS=Object.prototype.hasOwnProperty,sS=Object.prototype.propertyIsEnumerable,tp=(e,t,r)=>t in e?nS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ep=(e,t)=>{for(var r in t||(t={}))iS.call(t,r)&&tp(e,r,t[r]);if(Qd)for(var r of Qd(t))sS.call(t,r)&&tp(e,r,t[r]);return e};const yl=class extends Dt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=_t.FILTER_RESOLUTION;const r=t?ep(ep({},yl.defaults),t):yl.defaults,{kernels:n,blur:s,quality:a,pixelSize:u,resolution:l}=r;this._offset=new In(this._updatePadding,this),this._tintFilter=new Dt(eS,rS),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=l,this._blurFilter=n?new hs(n):new hs(s,a),this.pixelSize=u,this.resolution=l;const{shadowOnly:c,rotation:f,distance:p,offset:m,alpha:g,color:x}=r;this.shadowOnly=c,f!==void 0&&p!==void 0?(this.rotation=f,this.distance=p):this.offset=m,this.alpha=g,this.color=x}apply(t,r,n,s){const a=t.getFilterTexture();this._tintFilter.apply(t,r,a,1),this._blurFilter.apply(t,a,n,s),this.shadowOnly!==!0&&t.applyFilter(this,r,n,0),t.returnFilterTexture(a)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){Rt("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/ns}set rotation(t){Rt("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*ns,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return Gu(this._tintFilter.uniforms.color)}set color(t){na(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let aS=yl;aS.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:_t.FILTER_RESOLUTION};var oS=`attribute vec2 aVertexPosition;
984
984
  attribute vec2 aTextureCoord;
985
985
 
986
986
  uniform mat3 projectionMatrix;
@@ -991,7 +991,7 @@ void main(void)
991
991
  {
992
992
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
993
993
  vTextureCoord = aTextureCoord;
994
- }`,hE=`// precision highp float;
994
+ }`,uS=`// precision highp float;
995
995
 
996
996
  varying vec2 vTextureCoord;
997
997
  uniform sampler2D uSampler;
@@ -1087,7 +1087,7 @@ void main(void)
1087
1087
  gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;
1088
1088
  gl_FragColor.a = texture2D(uSampler, coord).a;
1089
1089
  }
1090
- `;const Eu=class extends Zt{constructor(t){super(cE,hE),this.offset=100,this.fillMode=Eu.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=Wt.from(this._canvas,{scaleMode:Lr.NEAREST}),Object.assign(this,Eu.defaults,t)}apply(t,r,n,i){const{width:o,height:a}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/o,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,t.applyFilter(this,r,n,i)}_randomizeSizes(){const t=this._sizes,r=this._slices-1,n=this.sampleSize,i=Math.min(this.minSize/n,.9/this._slices);if(this.average){const o=this._slices;let a=1;for(let u=0;u<r;u++){const f=a/(o-u),h=Math.max(f*(1-Math.random()*.6),i);t[u]=h,a-=h}t[r]=a}else{let o=1;const a=Math.sqrt(1/this._slices);for(let u=0;u<r;u++){const f=Math.max(a*o*Math.random(),i);t[u]=f,o-=f}t[r]=o}this.shuffle()}shuffle(){const t=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const i=Math.random()*n>>0,o=t[n];t[n]=t[i],t[i]=o}}_randomizeOffsets(){for(let t=0;t<this._slices;t++)this._offsets[t]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const t=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,t);let i,o=0;for(let a=0;a<this._slices;a++){i=Math.floor(this._offsets[a]*256);const u=this._sizes[a]*t,f=i>0?i:0,h=i<0?-i:0;n.fillStyle=`rgba(${f}, ${h}, 0, 1)`,n.fillRect(0,o>>0,t,u+1>>0),o+=u}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._sizes[n]=t[n]}get sizes(){return this._sizes}set offsets(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._offsets[n]=t[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(t){this._slices!==t&&(this._slices=t,this.uniforms.slices=t,this._sizes=this.uniforms.slicesWidth=new Float32Array(t),this._offsets=this.uniforms.slicesOffset=new Float32Array(t),this.refresh())}get direction(){return this._direction}set direction(t){if(this._direction===t)return;this._direction=t;const r=t*cs;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(t){this.uniforms.red=t}get green(){return this.uniforms.green}set green(t){this.uniforms.green=t}get blue(){return this.uniforms.blue}set blue(t){this.uniforms.blue=t}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let Ei=Eu;Ei.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},Ei.TRANSPARENT=0,Ei.ORIGINAL=1,Ei.LOOP=2,Ei.CLAMP=3,Ei.MIRROR=4;var dE=`attribute vec2 aVertexPosition;
1090
+ `;const _l=class extends Dt{constructor(t){super(oS,uS),this.offset=100,this.fillMode=_l.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=Ot.from(this._canvas,{scaleMode:Sr.NEAREST}),Object.assign(this,_l.defaults,t)}apply(t,r,n,s){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,t.applyFilter(this,r,n,s)}_randomizeSizes(){const t=this._sizes,r=this._slices-1,n=this.sampleSize,s=Math.min(this.minSize/n,.9/this._slices);if(this.average){const a=this._slices;let u=1;for(let l=0;l<r;l++){const c=u/(a-l),f=Math.max(c*(1-Math.random()*.6),s);t[l]=f,u-=f}t[r]=u}else{let a=1;const u=Math.sqrt(1/this._slices);for(let l=0;l<r;l++){const c=Math.max(u*a*Math.random(),s);t[l]=c,a-=c}t[r]=a}this.shuffle()}shuffle(){const t=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const s=Math.random()*n>>0,a=t[n];t[n]=t[s],t[s]=a}}_randomizeOffsets(){for(let t=0;t<this._slices;t++)this._offsets[t]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const t=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,t);let s,a=0;for(let u=0;u<this._slices;u++){s=Math.floor(this._offsets[u]*256);const l=this._sizes[u]*t,c=s>0?s:0,f=s<0?-s:0;n.fillStyle=`rgba(${c}, ${f}, 0, 1)`,n.fillRect(0,a>>0,t,l+1>>0),a+=l}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._sizes[n]=t[n]}get sizes(){return this._sizes}set offsets(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._offsets[n]=t[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(t){this._slices!==t&&(this._slices=t,this.uniforms.slices=t,this._sizes=this.uniforms.slicesWidth=new Float32Array(t),this._offsets=this.uniforms.slicesOffset=new Float32Array(t),this.refresh())}get direction(){return this._direction}set direction(t){if(this._direction===t)return;this._direction=t;const r=t*ns;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(t){this.uniforms.red=t}get green(){return this.uniforms.green}set green(t){this.uniforms.green=t}get blue(){return this.uniforms.blue}set blue(t){this.uniforms.blue=t}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let pi=_l;pi.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},pi.TRANSPARENT=0,pi.ORIGINAL=1,pi.LOOP=2,pi.CLAMP=3,pi.MIRROR=4;var lS=`attribute vec2 aVertexPosition;
1091
1091
  attribute vec2 aTextureCoord;
1092
1092
 
1093
1093
  uniform mat3 projectionMatrix;
@@ -1098,7 +1098,7 @@ void main(void)
1098
1098
  {
1099
1099
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1100
1100
  vTextureCoord = aTextureCoord;
1101
- }`,pE=`varying vec2 vTextureCoord;
1101
+ }`,hS=`varying vec2 vTextureCoord;
1102
1102
  varying vec4 vColor;
1103
1103
 
1104
1104
  uniform sampler2D uSampler;
@@ -1164,7 +1164,7 @@ void main(void) {
1164
1164
  gl_FragColor = innerColor + outerGlowColor;
1165
1165
  }
1166
1166
  }
1167
- `;const ip=class extends Zt{constructor(e){const t=Object.assign({},ip.defaults,e),{outerStrength:r,innerStrength:n,color:i,knockout:o,quality:a,alpha:u}=t,f=Math.round(t.distance);super(dE,pE.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/a/f).toFixed(7)}`).replace(/__DIST__/gi,`${f.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:i,outerStrength:r,innerStrength:n,padding:f,knockout:o,alpha:u})}get color(){return Vl(this.uniforms.glowColor)}set color(e){uo(e,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(e){this.uniforms.outerStrength=e}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(e){this.uniforms.innerStrength=e}get knockout(){return this.uniforms.knockout}set knockout(e){this.uniforms.knockout=e}get alpha(){return this.uniforms.alpha}set alpha(e){this.uniforms.alpha=e}};let vE=ip;vE.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var gE=`attribute vec2 aVertexPosition;
1167
+ `;const rp=class extends Dt{constructor(e){const t=Object.assign({},rp.defaults,e),{outerStrength:r,innerStrength:n,color:s,knockout:a,quality:u,alpha:l}=t,c=Math.round(t.distance);super(lS,hS.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/u/c).toFixed(7)}`).replace(/__DIST__/gi,`${c.toFixed(0)}.0`)),this.uniforms.glowColor=new Float32Array([0,0,0,1]),this.uniforms.alpha=1,Object.assign(this,{color:s,outerStrength:r,innerStrength:n,padding:c,knockout:a,alpha:l})}get color(){return Gu(this.uniforms.glowColor)}set color(e){na(e,this.uniforms.glowColor)}get outerStrength(){return this.uniforms.outerStrength}set outerStrength(e){this.uniforms.outerStrength=e}get innerStrength(){return this.uniforms.innerStrength}set innerStrength(e){this.uniforms.innerStrength=e}get knockout(){return this.uniforms.knockout}set knockout(e){this.uniforms.knockout=e}get alpha(){return this.uniforms.alpha}set alpha(e){this.uniforms.alpha=e}};let cS=rp;cS.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var fS=`attribute vec2 aVertexPosition;
1168
1168
  attribute vec2 aTextureCoord;
1169
1169
 
1170
1170
  uniform mat3 projectionMatrix;
@@ -1175,7 +1175,7 @@ void main(void)
1175
1175
  {
1176
1176
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1177
1177
  vTextureCoord = aTextureCoord;
1178
- }`,mE=`vec3 mod289(vec3 x)
1178
+ }`,dS=`vec3 mod289(vec3 x)
1179
1179
  {
1180
1180
  return x - floor(x * (1.0 / 289.0)) * 289.0;
1181
1181
  }
@@ -1270,7 +1270,7 @@ float turb(vec3 P, vec3 rep, float lacunarity, float gain)
1270
1270
  }
1271
1271
  return abs(sum);
1272
1272
  }
1273
- `,yE=`varying vec2 vTextureCoord;
1273
+ `,pS=`varying vec2 vTextureCoord;
1274
1274
  uniform sampler2D uSampler;
1275
1275
  uniform vec4 filterArea;
1276
1276
  uniform vec2 dimensions;
@@ -1315,7 +1315,7 @@ void main(void) {
1315
1315
  gl_FragColor = texture2D(uSampler, vTextureCoord) + mist;
1316
1316
 
1317
1317
  }
1318
- `;const sp=class extends Zt{constructor(t){super(gE,yE.replace("${perlin}",mE)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(sp.defaults,t);this._angleLight=new oe,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(t,r,n,i){const{width:o,height:a}=r.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=a,this.uniforms.aspect=a/o,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}get angle(){return this._angle}set angle(t){this._angle=t;const r=t*cs;this._angleLight.x=Math.cos(r),this._angleLight.y=Math.sin(r)}get gain(){return this.uniforms.gain}set gain(t){this.uniforms.gain=t}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(t){this.uniforms.lacunarity=t}get alpha(){return this.uniforms.alpha}set alpha(t){this.uniforms.alpha=t}};let _E=sp;_E.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var bE=`attribute vec2 aVertexPosition;
1318
+ `;const np=class extends Dt{constructor(t){super(fS,pS.replace("${perlin}",dS)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(np.defaults,t);this._angleLight=new Wt,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(t,r,n,s){const{width:a,height:u}=r.filterFrame;this.uniforms.light=this.parallel?this._angleLight:this.center,this.uniforms.parallel=this.parallel,this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.time=this.time,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,s)}get angle(){return this._angle}set angle(t){this._angle=t;const r=t*ns;this._angleLight.x=Math.cos(r),this._angleLight.y=Math.sin(r)}get gain(){return this.uniforms.gain}set gain(t){this.uniforms.gain=t}get lacunarity(){return this.uniforms.lacunarity}set lacunarity(t){this.uniforms.lacunarity=t}get alpha(){return this.uniforms.alpha}set alpha(t){this.uniforms.alpha=t}};let gS=np;gS.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var mS=`attribute vec2 aVertexPosition;
1319
1319
  attribute vec2 aTextureCoord;
1320
1320
 
1321
1321
  uniform mat3 projectionMatrix;
@@ -1326,7 +1326,7 @@ void main(void)
1326
1326
  {
1327
1327
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1328
1328
  vTextureCoord = aTextureCoord;
1329
- }`,xE=`precision mediump float;
1329
+ }`,vS=`precision mediump float;
1330
1330
 
1331
1331
  varying vec2 vTextureCoord;
1332
1332
  uniform sampler2D uSampler;
@@ -1384,7 +1384,7 @@ void main()
1384
1384
  // alpha
1385
1385
  gl_FragColor = mix(color, result, uAlpha);
1386
1386
  }
1387
- `;const op=class extends Zt{constructor(e){super(bE,xE),this._hue=0;const t=Object.assign({},op.defaults,e);Object.assign(this,t)}get hue(){return this._hue}set hue(e){this._hue=e,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}get colorize(){return this.uniforms.uColorize}set colorize(e){this.uniforms.uColorize=e}get lightness(){return this.uniforms.uLightness}set lightness(e){this.uniforms.uLightness=e}get saturation(){return this.uniforms.uSaturation}set saturation(e){this.uniforms.uSaturation=e}};let wE=op;wE.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var TE=`attribute vec2 aVertexPosition;
1387
+ `;const ip=class extends Dt{constructor(e){super(mS,vS),this._hue=0;const t=Object.assign({},ip.defaults,e);Object.assign(this,t)}get hue(){return this._hue}set hue(e){this._hue=e,this.uniforms.uHue=this._hue*(Math.PI/180)}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}get colorize(){return this.uniforms.uColorize}set colorize(e){this.uniforms.uColorize=e}get lightness(){return this.uniforms.uLightness}set lightness(e){this.uniforms.uLightness=e}get saturation(){return this.uniforms.uSaturation}set saturation(e){this.uniforms.uSaturation=e}};let yS=ip;yS.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var _S=`attribute vec2 aVertexPosition;
1388
1388
  attribute vec2 aTextureCoord;
1389
1389
 
1390
1390
  uniform mat3 projectionMatrix;
@@ -1395,7 +1395,7 @@ void main(void)
1395
1395
  {
1396
1396
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1397
1397
  vTextureCoord = aTextureCoord;
1398
- }`,EE=`varying vec2 vTextureCoord;
1398
+ }`,xS=`varying vec2 vTextureCoord;
1399
1399
  uniform sampler2D uSampler;
1400
1400
  uniform vec4 filterArea;
1401
1401
  uniform vec2 dimensions;
@@ -1499,7 +1499,7 @@ void main()
1499
1499
 
1500
1500
  gl_FragColor.rgb = color;
1501
1501
  }
1502
- `;const ap=class extends Zt{constructor(t,r=0){super(TE,EE),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof t=="number"?(this.seed=t,t=void 0):this.seed=r,Object.assign(this,ap.defaults,t)}apply(t,r,n,i){var o,a;this.uniforms.dimensions[0]=(o=r.filterFrame)==null?void 0:o.width,this.uniforms.dimensions[1]=(a=r.filterFrame)==null?void 0:a.height,this.uniforms.seed=this.seed,t.applyFilter(this,r,n,i)}set sepia(t){this.uniforms.sepia=t}get sepia(){return this.uniforms.sepia}set noise(t){this.uniforms.noise=t}get noise(){return this.uniforms.noise}set noiseSize(t){this.uniforms.noiseSize=t}get noiseSize(){return this.uniforms.noiseSize}set scratch(t){this.uniforms.scratch=t}get scratch(){return this.uniforms.scratch}set scratchDensity(t){this.uniforms.scratchDensity=t}get scratchDensity(){return this.uniforms.scratchDensity}set scratchWidth(t){this.uniforms.scratchWidth=t}get scratchWidth(){return this.uniforms.scratchWidth}set vignetting(t){this.uniforms.vignetting=t}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(t){this.uniforms.vignettingAlpha=t}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(t){this.uniforms.vignettingBlur=t}get vignettingBlur(){return this.uniforms.vignettingBlur}};let SE=ap;SE.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var AE=`attribute vec2 aVertexPosition;
1502
+ `;const sp=class extends Dt{constructor(t,r=0){super(_S,xS),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof t=="number"?(this.seed=t,t=void 0):this.seed=r,Object.assign(this,sp.defaults,t)}apply(t,r,n,s){var a,u;this.uniforms.dimensions[0]=(a=r.filterFrame)==null?void 0:a.width,this.uniforms.dimensions[1]=(u=r.filterFrame)==null?void 0:u.height,this.uniforms.seed=this.seed,t.applyFilter(this,r,n,s)}set sepia(t){this.uniforms.sepia=t}get sepia(){return this.uniforms.sepia}set noise(t){this.uniforms.noise=t}get noise(){return this.uniforms.noise}set noiseSize(t){this.uniforms.noiseSize=t}get noiseSize(){return this.uniforms.noiseSize}set scratch(t){this.uniforms.scratch=t}get scratch(){return this.uniforms.scratch}set scratchDensity(t){this.uniforms.scratchDensity=t}get scratchDensity(){return this.uniforms.scratchDensity}set scratchWidth(t){this.uniforms.scratchWidth=t}get scratchWidth(){return this.uniforms.scratchWidth}set vignetting(t){this.uniforms.vignetting=t}get vignetting(){return this.uniforms.vignetting}set vignettingAlpha(t){this.uniforms.vignettingAlpha=t}get vignettingAlpha(){return this.uniforms.vignettingAlpha}set vignettingBlur(t){this.uniforms.vignettingBlur=t}get vignettingBlur(){return this.uniforms.vignettingBlur}};let bS=sp;bS.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var TS=`attribute vec2 aVertexPosition;
1503
1503
  attribute vec2 aTextureCoord;
1504
1504
 
1505
1505
  uniform mat3 projectionMatrix;
@@ -1510,7 +1510,7 @@ void main(void)
1510
1510
  {
1511
1511
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1512
1512
  vTextureCoord = aTextureCoord;
1513
- }`,OE=`varying vec2 vTextureCoord;
1513
+ }`,wS=`varying vec2 vTextureCoord;
1514
1514
  uniform sampler2D uSampler;
1515
1515
  uniform vec4 filterClamp;
1516
1516
 
@@ -1548,7 +1548,7 @@ void main(void) {
1548
1548
  vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
1549
1549
  gl_FragColor = contentColor + outlineColor;
1550
1550
  }
1551
- `;const Lo=class extends Zt{constructor(t=1,r=0,n=.1,i=1,o=!1){super(AE,OE.replace(/\$\{angleStep\}/,Lo.getAngleStep(n))),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=i,this.uniforms.uKnockout=o,Object.assign(this,{thickness:t,color:r,quality:n,alpha:i,knockout:o})}static getAngleStep(t){const r=Math.max(t*Lo.MAX_SAMPLES,Lo.MIN_SAMPLES);return(Math.PI*2/r).toFixed(7)}apply(t,r,n,i){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,t.applyFilter(this,r,n,i)}get alpha(){return this._alpha}set alpha(t){this._alpha=t}get color(){return Vl(this.uniforms.uColor)}set color(t){uo(t,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(t){this._knockout=t}get thickness(){return this._thickness}set thickness(t){this._thickness=t,this.padding=t}};let lp=Lo;lp.MIN_SAMPLES=1,lp.MAX_SAMPLES=100;var CE=`attribute vec2 aVertexPosition;
1551
+ `;const Ia=class extends Dt{constructor(t=1,r=0,n=.1,s=1,a=!1){super(TS,wS.replace(/\$\{angleStep\}/,Ia.getAngleStep(n))),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=s,this.uniforms.uKnockout=a,Object.assign(this,{thickness:t,color:r,quality:n,alpha:s,knockout:a})}static getAngleStep(t){const r=Math.max(t*Ia.MAX_SAMPLES,Ia.MIN_SAMPLES);return(Math.PI*2/r).toFixed(7)}apply(t,r,n,s){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,t.applyFilter(this,r,n,s)}get alpha(){return this._alpha}set alpha(t){this._alpha=t}get color(){return Gu(this.uniforms.uColor)}set color(t){na(t,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(t){this._knockout=t}get thickness(){return this._thickness}set thickness(t){this._thickness=t,this.padding=t}};let ap=Ia;ap.MIN_SAMPLES=1,ap.MAX_SAMPLES=100;var SS=`attribute vec2 aVertexPosition;
1552
1552
  attribute vec2 aTextureCoord;
1553
1553
 
1554
1554
  uniform mat3 projectionMatrix;
@@ -1559,7 +1559,7 @@ void main(void)
1559
1559
  {
1560
1560
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1561
1561
  vTextureCoord = aTextureCoord;
1562
- }`,RE=`varying vec2 vTextureCoord;
1562
+ }`,AS=`varying vec2 vTextureCoord;
1563
1563
  uniform sampler2D uSampler;
1564
1564
 
1565
1565
  uniform vec4 filterArea;
@@ -1603,7 +1603,7 @@ void main(void)
1603
1603
 
1604
1604
  gl_FragColor = color * _alpha;
1605
1605
  }
1606
- `;const up=class extends Zt{constructor(t){super(CE,RE),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,up.defaults,t)}apply(t,r,n,i){var o,a;this.uniforms.dimensions[0]=(o=r.filterFrame)==null?void 0:o.width,this.uniforms.dimensions[1]=(a=r.filterFrame)==null?void 0:a.height,this.uniforms.time=this.time,t.applyFilter(this,r,n,i)}set mirror(t){this.uniforms.mirror=t}get mirror(){return this.uniforms.mirror}set boundary(t){this.uniforms.boundary=t}get boundary(){return this.uniforms.boundary}set amplitude(t){this.uniforms.amplitude[0]=t[0],this.uniforms.amplitude[1]=t[1]}get amplitude(){return this.uniforms.amplitude}set waveLength(t){this.uniforms.waveLength[0]=t[0],this.uniforms.waveLength[1]=t[1]}get waveLength(){return this.uniforms.waveLength}set alpha(t){this.uniforms.alpha[0]=t[0],this.uniforms.alpha[1]=t[1]}get alpha(){return this.uniforms.alpha}};let IE=up;IE.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var PE=`attribute vec2 aVertexPosition;
1606
+ `;const op=class extends Dt{constructor(t){super(SS,AS),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,op.defaults,t)}apply(t,r,n,s){var a,u;this.uniforms.dimensions[0]=(a=r.filterFrame)==null?void 0:a.width,this.uniforms.dimensions[1]=(u=r.filterFrame)==null?void 0:u.height,this.uniforms.time=this.time,t.applyFilter(this,r,n,s)}set mirror(t){this.uniforms.mirror=t}get mirror(){return this.uniforms.mirror}set boundary(t){this.uniforms.boundary=t}get boundary(){return this.uniforms.boundary}set amplitude(t){this.uniforms.amplitude[0]=t[0],this.uniforms.amplitude[1]=t[1]}get amplitude(){return this.uniforms.amplitude}set waveLength(t){this.uniforms.waveLength[0]=t[0],this.uniforms.waveLength[1]=t[1]}get waveLength(){return this.uniforms.waveLength}set alpha(t){this.uniforms.alpha[0]=t[0],this.uniforms.alpha[1]=t[1]}get alpha(){return this.uniforms.alpha}};let CS=op;CS.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var ES=`attribute vec2 aVertexPosition;
1607
1607
  attribute vec2 aTextureCoord;
1608
1608
 
1609
1609
  uniform mat3 projectionMatrix;
@@ -1614,7 +1614,7 @@ void main(void)
1614
1614
  {
1615
1615
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1616
1616
  vTextureCoord = aTextureCoord;
1617
- }`,NE=`varying vec2 vTextureCoord;
1617
+ }`,IS=`varying vec2 vTextureCoord;
1618
1618
  uniform sampler2D uSampler;
1619
1619
  uniform vec4 filterArea;
1620
1620
  uniform vec4 filterClamp;
@@ -1683,7 +1683,7 @@ void main()
1683
1683
 
1684
1684
  gl_FragColor = color;
1685
1685
  }
1686
- `;const fp=class extends Zt{constructor(t=[0,0],r,n=0){super(PE,NE),this.center=t,Object.assign(this,fp.defaults,r),this.time=n}apply(t,r,n,i){this.uniforms.time=this.time,t.applyFilter(this,r,n,i)}get center(){return this.uniforms.center}set center(t){this.uniforms.center=t}get amplitude(){return this.uniforms.amplitude}set amplitude(t){this.uniforms.amplitude=t}get wavelength(){return this.uniforms.wavelength}set wavelength(t){this.uniforms.wavelength=t}get brightness(){return this.uniforms.brightness}set brightness(t){this.uniforms.brightness=t}get speed(){return this.uniforms.speed}set speed(t){this.uniforms.speed=t}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}};let ME=fp;ME.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var kE=`attribute vec2 aVertexPosition;
1686
+ `;const up=class extends Dt{constructor(t=[0,0],r,n=0){super(ES,IS),this.center=t,Object.assign(this,up.defaults,r),this.time=n}apply(t,r,n,s){this.uniforms.time=this.time,t.applyFilter(this,r,n,s)}get center(){return this.uniforms.center}set center(t){this.uniforms.center=t}get amplitude(){return this.uniforms.amplitude}set amplitude(t){this.uniforms.amplitude=t}get wavelength(){return this.uniforms.wavelength}set wavelength(t){this.uniforms.wavelength=t}get brightness(){return this.uniforms.brightness}set brightness(t){this.uniforms.brightness=t}get speed(){return this.uniforms.speed}set speed(t){this.uniforms.speed=t}get radius(){return this.uniforms.radius}set radius(t){this.uniforms.radius=t}};let RS=up;RS.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var PS=`attribute vec2 aVertexPosition;
1687
1687
  attribute vec2 aTextureCoord;
1688
1688
 
1689
1689
  uniform mat3 projectionMatrix;
@@ -1694,7 +1694,7 @@ void main(void)
1694
1694
  {
1695
1695
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1696
1696
  vTextureCoord = aTextureCoord;
1697
- }`,LE=`varying vec2 vTextureCoord;
1697
+ }`,MS=`varying vec2 vTextureCoord;
1698
1698
 
1699
1699
  uniform sampler2D uSampler;
1700
1700
  uniform float blur;
@@ -1733,7 +1733,7 @@ void main(void)
1733
1733
 
1734
1734
  gl_FragColor = color;
1735
1735
  }
1736
- `;let cp=class extends Zt{constructor(t){var r,n;super(kE,LE),this.uniforms.blur=t.blur,this.uniforms.gradientBlur=t.gradientBlur,this.uniforms.start=(r=t.start)!=null?r:new oe(0,window.innerHeight/2),this.uniforms.end=(n=t.end)!=null?n:new oe(600,window.innerHeight/2),this.uniforms.delta=new oe(30,30),this.uniforms.texSize=new oe(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(t){this.uniforms.blur=t}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(t){this.uniforms.gradientBlur=t}get start(){return this.uniforms.start}set start(t){this.uniforms.start=t,this.updateDelta()}get end(){return this.uniforms.end}set end(t){this.uniforms.end=t,this.updateDelta()}},FE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=t/n,this.uniforms.delta.y=r/n}},BE=class extends cp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=t/n}};const hp=class extends Zt{constructor(t,r,n,i){super(),typeof t=="number"&&(Ht("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),t={blur:t,gradientBlur:r,start:n,end:i}),t=Object.assign({},hp.defaults,t),this.tiltShiftXFilter=new FE(t),this.tiltShiftYFilter=new BE(t)}apply(t,r,n,i){const o=t.getFilterTexture();this.tiltShiftXFilter.apply(t,r,o,1),this.tiltShiftYFilter.apply(t,o,n,i),t.returnFilterTexture(o)}get blur(){return this.tiltShiftXFilter.blur}set blur(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}get start(){return this.tiltShiftXFilter.start}set start(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}get end(){return this.tiltShiftXFilter.end}set end(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}};let DE=hp;DE.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var UE=`attribute vec2 aVertexPosition;
1736
+ `;let lp=class extends Dt{constructor(t){var r,n;super(PS,MS),this.uniforms.blur=t.blur,this.uniforms.gradientBlur=t.gradientBlur,this.uniforms.start=(r=t.start)!=null?r:new Wt(0,window.innerHeight/2),this.uniforms.end=(n=t.end)!=null?n:new Wt(600,window.innerHeight/2),this.uniforms.delta=new Wt(30,30),this.uniforms.texSize=new Wt(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(t){this.uniforms.blur=t}get gradientBlur(){return this.uniforms.gradientBlur}set gradientBlur(t){this.uniforms.gradientBlur=t}get start(){return this.uniforms.start}set start(t){this.uniforms.start=t,this.updateDelta()}get end(){return this.uniforms.end}set end(t){this.uniforms.end=t,this.updateDelta()}},OS=class extends lp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=t/n,this.uniforms.delta.y=r/n}},FS=class extends lp{updateDelta(){const t=this.uniforms.end.x-this.uniforms.start.x,r=this.uniforms.end.y-this.uniforms.start.y,n=Math.sqrt(t*t+r*r);this.uniforms.delta.x=-r/n,this.uniforms.delta.y=t/n}};const hp=class extends Dt{constructor(t,r,n,s){super(),typeof t=="number"&&(Rt("5.3.0","TiltShiftFilter constructor arguments is deprecated, use options."),t={blur:t,gradientBlur:r,start:n,end:s}),t=Object.assign({},hp.defaults,t),this.tiltShiftXFilter=new OS(t),this.tiltShiftYFilter=new FS(t)}apply(t,r,n,s){const a=t.getFilterTexture();this.tiltShiftXFilter.apply(t,r,a,1),this.tiltShiftYFilter.apply(t,a,n,s),t.returnFilterTexture(a)}get blur(){return this.tiltShiftXFilter.blur}set blur(t){this.tiltShiftXFilter.blur=this.tiltShiftYFilter.blur=t}get gradientBlur(){return this.tiltShiftXFilter.gradientBlur}set gradientBlur(t){this.tiltShiftXFilter.gradientBlur=this.tiltShiftYFilter.gradientBlur=t}get start(){return this.tiltShiftXFilter.start}set start(t){this.tiltShiftXFilter.start=this.tiltShiftYFilter.start=t}get end(){return this.tiltShiftXFilter.end}set end(t){this.tiltShiftXFilter.end=this.tiltShiftYFilter.end=t}};let NS=hp;NS.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var LS=`attribute vec2 aVertexPosition;
1737
1737
  attribute vec2 aTextureCoord;
1738
1738
 
1739
1739
  uniform mat3 projectionMatrix;
@@ -1744,7 +1744,7 @@ void main(void)
1744
1744
  {
1745
1745
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1746
1746
  vTextureCoord = aTextureCoord;
1747
- }`,$E=`varying vec2 vTextureCoord;
1747
+ }`,kS=`varying vec2 vTextureCoord;
1748
1748
 
1749
1749
  uniform sampler2D uSampler;
1750
1750
  uniform float radius;
@@ -1800,7 +1800,7 @@ void main(void)
1800
1800
  gl_FragColor = texture2D(uSampler, coord );
1801
1801
 
1802
1802
  }
1803
- `;const dp=class extends Zt{constructor(e){super(UE,$E),Object.assign(this,dp.defaults,e)}get offset(){return this.uniforms.offset}set offset(e){this.uniforms.offset=e}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}get angle(){return this.uniforms.angle}set angle(e){this.uniforms.angle=e}};let GE=dp;GE.defaults={radius:200,angle:4,padding:20,offset:new oe};var jE=`attribute vec2 aVertexPosition;
1803
+ `;const cp=class extends Dt{constructor(e){super(LS,kS),Object.assign(this,cp.defaults,e)}get offset(){return this.uniforms.offset}set offset(e){this.uniforms.offset=e}get radius(){return this.uniforms.radius}set radius(e){this.uniforms.radius=e}get angle(){return this.uniforms.angle}set angle(e){this.uniforms.angle=e}};let BS=cp;BS.defaults={radius:200,angle:4,padding:20,offset:new Wt};var DS=`attribute vec2 aVertexPosition;
1804
1804
  attribute vec2 aTextureCoord;
1805
1805
 
1806
1806
  uniform mat3 projectionMatrix;
@@ -1811,7 +1811,7 @@ void main(void)
1811
1811
  {
1812
1812
  gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
1813
1813
  vTextureCoord = aTextureCoord;
1814
- }`,qE=`varying vec2 vTextureCoord;
1814
+ }`,US=`varying vec2 vTextureCoord;
1815
1815
  uniform sampler2D uSampler;
1816
1816
  uniform vec4 filterArea;
1817
1817
 
@@ -1897,7 +1897,7 @@ void main() {
1897
1897
 
1898
1898
  gl_FragColor = color;
1899
1899
  }
1900
- `,pp=Object.getOwnPropertySymbols,zE=Object.prototype.hasOwnProperty,HE=Object.prototype.propertyIsEnumerable,VE=(e,t)=>{var r={};for(var n in e)zE.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&pp)for(var n of pp(e))t.indexOf(n)<0&&HE.call(e,n)&&(r[n]=e[n]);return r};const vp=class extends Zt{constructor(e){const t=Object.assign(vp.defaults,e),{maxKernelSize:r}=t,n=VE(t,["maxKernelSize"]);super(jE,qE.replace("${maxKernelSize}",r.toFixed(1))),Object.assign(this,n)}get center(){return this.uniforms.uCenter}set center(e){this.uniforms.uCenter=e}get strength(){return this.uniforms.uStrength}set strength(e){this.uniforms.uStrength=e}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(e){this.uniforms.uInnerRadius=e}get radius(){return this.uniforms.uRadius}set radius(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e}};let WE=vp;WE.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const _s=e=>{const{contrast:t=1,saturation:r=1,brightness:n=1,alpha:i=1,red:o=1,blue:a=1,gamma:u=1,green:f=1,blurRadius:h=0,temperature:d=0,hue:p=0,sharpness:c=0}=e||{},v=new zr.Filter(null,`
1900
+ `,fp=Object.getOwnPropertySymbols,$S=Object.prototype.hasOwnProperty,GS=Object.prototype.propertyIsEnumerable,zS=(e,t)=>{var r={};for(var n in e)$S.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fp)for(var n of fp(e))t.indexOf(n)<0&&GS.call(e,n)&&(r[n]=e[n]);return r};const dp=class extends Dt{constructor(e){const t=Object.assign(dp.defaults,e),{maxKernelSize:r}=t,n=zS(t,["maxKernelSize"]);super(DS,US.replace("${maxKernelSize}",r.toFixed(1))),Object.assign(this,n)}get center(){return this.uniforms.uCenter}set center(e){this.uniforms.uCenter=e}get strength(){return this.uniforms.uStrength}set strength(e){this.uniforms.uStrength=e}get innerRadius(){return this.uniforms.uInnerRadius}set innerRadius(e){this.uniforms.uInnerRadius=e}get radius(){return this.uniforms.uRadius}set radius(e){(e<0||e===1/0)&&(e=-1),this.uniforms.uRadius=e}};let HS=dp;HS.defaults={strength:.1,center:[0,0],innerRadius:0,radius:-1,maxKernelSize:32};const cs=e=>{const{contrast:t=1,saturation:r=1,brightness:n=1,alpha:s=1,red:a=1,blue:u=1,gamma:l=1,green:c=1,blurRadius:f=0,temperature:p=0,hue:m=0,sharpness:g=0}=e||{},x=new Fr.Filter(null,`
1901
1901
  precision mediump float;
1902
1902
  varying vec2 vTextureCoord;
1903
1903
  uniform sampler2D uSampler;
@@ -1909,7 +1909,7 @@ void main() {
1909
1909
  color.b = color.b - (temperature / 100.0);
1910
1910
  gl_FragColor = color;
1911
1911
  }
1912
- `);v.uniforms.temperature=d;const y=new eE([0,-c,0,-c,1+4*c,-c,0,-c,0]),_=new zr.filters.ColorMatrixFilter;_.hue(p,!1);const b=new ys(h,1,!0);return{adjustmentFilter:new _T({...u&&{gamma:u},...n&&{brightness:n},...t&&{contrast:t},...r&&{saturation:r},...o&&{red:o},...f&&{green:f},...a&&{blue:a},...i&&{alpha:i}}),blurFilter:b,hueFilter:_,sharpnessFilter:y,temperatureFilter:v}},XE=()=>{const e=new zr.Filter(null,`
1912
+ `);x.uniforms.temperature=p;const y=new Zw([0,-g,0,-g,1+4*g,-g,0,-g,0]),S=new Fr.filters.ColorMatrixFilter;S.hue(m,!1);const T=new hs(f,1,!0);return{adjustmentFilter:new gw({...l&&{gamma:l},...n&&{brightness:n},...t&&{contrast:t},...r&&{saturation:r},...a&&{red:a},...c&&{green:c},...u&&{blue:u},...s&&{alpha:s}}),blurFilter:T,hueFilter:S,sharpnessFilter:y,temperatureFilter:x}},VS=()=>{const e=new Fr.Filter(null,`
1913
1913
  precision mediump float;
1914
1914
  uniform mat3 uNightVisionMatrix;
1915
1915
  varying vec2 vTextureCoord;
@@ -1920,7 +1920,7 @@ void main() {
1920
1920
  vec3 color = texColor.rgb;
1921
1921
  gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1922
1922
  }
1923
- `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},gp=Et.forwardRef((e,t)=>{const r=mt.useRef(null),n=mt.useRef(null),{src:i,visible:o,transformation:{x:a,y:u,width:f,height:h,anchor:d,colorCorrection:p={},effect:c},pointerdown:v}=e;console.log("PixiImageSprite props",e);const{blurRadius:y=0}=p,{temperatureFilter:_,sharpnessFilter:b,hueFilter:m,blurFilter:w,adjustmentFilter:T}=_s(p),{nightVisionFilter:x}=XE();return Et.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:n,children:Vt.jsx(le.Sprite,{image:i,width:f,height:h,anchor:d,ref:r,alpha:o?1:0,x:a,y:u,...o&&{interactive:!0,pointerdown:v},filters:[_,b,m,T,...y>0?[w]:[],...c===Sn.NightVision?[x]:[]]})})})});gp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Fo={build(e){const t=e.points;let r,n,i,o,a,u;if(e.type===Ne.CIRC){const y=e.shape;r=y.x,n=y.y,a=u=y.radius,i=o=0}else if(e.type===Ne.ELIP){const y=e.shape;r=y.x,n=y.y,a=y.width,u=y.height,i=o=0}else{const y=e.shape,_=y.width/2,b=y.height/2;r=y.x+_,n=y.y+b,a=u=Math.max(0,Math.min(y.radius,Math.min(_,b))),i=_-a,o=b-u}if(!(a>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(a+u)),h=f*8+(i?4:0)+(o?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+o,t[2]=t[4]=r-i,t[5]=t[7]=n-o;return}let d=0,p=f*4+(i?2:0)+2,c=p,v=h;{const y=i+a,_=o,b=r+y,m=r-y,w=n+_;if(t[d++]=b,t[d++]=w,t[--p]=w,t[--p]=m,o){const T=n-_;t[c++]=m,t[c++]=T,t[--v]=T,t[--v]=b}}for(let y=1;y<f;y++){const _=Math.PI/2*(y/f),b=i+Math.cos(_)*a,m=o+Math.sin(_)*u,w=r+b,T=r-b,x=n+m,E=n-m;t[d++]=w,t[d++]=x,t[--p]=x,t[--p]=T,t[c++]=T,t[c++]=E,t[--v]=E,t[--v]=w}{const y=i,_=o+u,b=r+y,m=r-y,w=n+_,T=n-_;t[d++]=b,t[d++]=w,t[--v]=T,t[--v]=b,i&&(t[d++]=m,t[d++]=w,t[--v]=T,t[--v]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const a=o;let u,f;if(e.type!==Ne.RREC){const d=e.shape;u=d.x,f=d.y}else{const d=e.shape;u=d.x+d.width/2,f=d.y+d.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),o++,n.push(r[0],r[1]);for(let d=2;d<r.length;d+=2)n.push(r[d],r[d+1]),i.push(o++,a,o);i.push(a+1,a,o)}};function mp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],a=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+a),o=u,a=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const a=r-o-2,u=r-o-1,f=o,h=o+1;[e[a],e[f]]=[e[f],e[a]],[e[u],e[h]]=[e[h],e[u]]}}}const yp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,o=t.indices;if(r.length>=6){mp(r,!1);const a=[];for(let h=0;h<n.length;h++){const d=n[h];mp(d.points,!0),a.push(r.length/2),r=r.concat(d.points)}const u=k_(r,a,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)o.push(u[h]+f),o.push(u[h+1]+f),o.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},KE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,a=e.points;a.length=0,i>=0&&o>=0&&a.push(r,n,r+i,n,r+i,n+o,r,n+o)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},YE={build(e){Fo.build(e)},triangulate(e,t){Fo.triangulate(e,t)}};var Sr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Sr||{}),jn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(jn||{});const Si={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class _p{static curveTo(t,r,n,i,o,a){const u=a[a.length-2],h=a[a.length-1]-r,d=u-t,p=i-r,c=n-t,v=Math.abs(h*c-d*p);if(v<1e-8||o===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const y=h*h+d*d,_=p*p+c*c,b=h*p+d*c,m=o*Math.sqrt(y)/v,w=o*Math.sqrt(_)/v,T=m*b/y,x=w*b/_,E=m*c+w*d,I=m*p+w*h,O=d*(w+T),A=h*(w+T),L=c*(m+x),R=p*(m+x),C=Math.atan2(A-I,O-E),P=Math.atan2(R-I,L-E);return{cx:E+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:d*p>c*h}}static arc(t,r,n,i,o,a,u,f,h){const d=u-a,p=Si._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/go)*40),c=d/(p*2),v=c*2,y=Math.cos(c),_=Math.sin(c),b=p-1,m=b%1/b;for(let w=0;w<=b;++w){const T=w+m*w,x=c+a+v*T,E=Math.cos(x),I=-Math.sin(x);h.push((y*E+_*I)*o+n,(y*-I+_*E)*o+i)}}}class ZE{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class Su{static curveLength(t,r,n,i,o,a,u,f){let d=0,p=0,c=0,v=0,y=0,_=0,b=0,m=0,w=0,T=0,x=0,E=t,I=r;for(let O=1;O<=10;++O)p=O/10,c=p*p,v=c*p,y=1-p,_=y*y,b=_*y,m=b*t+3*_*p*n+3*y*c*o+v*u,w=b*r+3*_*p*i+3*y*c*a+v*f,T=E-m,x=I-w,E=m,I=w,d+=Math.sqrt(T*T+x*x);return d}static curveTo(t,r,n,i,o,a,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const d=Si._segmentsCount(Su.curveLength(f,h,t,r,n,i,o,a));let p=0,c=0,v=0,y=0,_=0;u.push(f,h);for(let b=1,m=0;b<=d;++b)m=b/d,p=1-m,c=p*p,v=c*p,y=m*m,_=y*m,u.push(v*f+3*c*m*t+3*p*y*n+_*o,v*h+3*c*m*r+3*p*y*i+_*a)}}function bp(e,t,r,n,i,o,a,u){const f=e-r*i,h=t-n*i,d=e+r*o,p=t+n*o;let c,v;a?(c=n,v=-r):(c=-n,v=r);const y=f+c,_=h+v,b=d+c,m=p+v;return u.push(y,_,b,m),2}function qn(e,t,r,n,i,o,a,u){const f=r-e,h=n-t;let d=Math.atan2(f,h),p=Math.atan2(i-e,o-t);u&&d<p?d+=Math.PI*2:!u&&d>p&&(p+=Math.PI*2);let c=d;const v=p-d,y=Math.abs(v),_=Math.sqrt(f*f+h*h),b=(15*y*Math.sqrt(_)/Math.PI>>0)+1,m=v/b;if(c+=m,u){a.push(e,t,r,n);for(let w=1,T=c;w<b;w++,T+=m)a.push(e,t,e+Math.sin(T)*_,t+Math.cos(T)*_);a.push(e,t,i,o)}else{a.push(r,n,e,t);for(let w=1,T=c;w<b;w++,T+=m)a.push(e+Math.sin(T)*_,t+Math.cos(T)*_,e,t);a.push(i,o,e,t)}return b*2}function QE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const o=e.lineStyle,a=new oe(n[0],n[1]),u=new oe(n[n.length-2],n[n.length-1]),f=r.type!==Ne.POLY||r.closeStroke,h=Math.abs(a.x-u.x)<i&&Math.abs(a.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const z=(a.x+u.x)*.5,nt=(u.y+a.y)*.5;n.unshift(z,nt),n.push(z,nt)}const d=t.points,p=n.length/2;let c=n.length;const v=d.length/2,y=o.width/2,_=y*y,b=o.miterLimit*o.miterLimit;let m=n[0],w=n[1],T=n[2],x=n[3],E=0,I=0,O=-(w-x),A=m-T,L=0,R=0,C=Math.sqrt(O*O+A*A);O/=C,A/=C,O*=y,A*=y;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===jn.ROUND?c+=qn(m-O*(M-F)*.5,w-A*(M-F)*.5,m-O*M,w-A*M,m+O*F,w+A*F,d,!0)+2:o.cap===jn.SQUARE&&(c+=bp(m,w,O,A,M,F,!0,d))),d.push(m-O*M,w-A*M,m+O*F,w+A*F);for(let z=1;z<p-1;++z){m=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],E=n[(z+1)*2],I=n[(z+1)*2+1],O=-(w-x),A=m-T,C=Math.sqrt(O*O+A*A),O/=C,A/=C,O*=y,A*=y,L=-(x-I),R=T-E,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=y,R*=y;const nt=T-m,V=w-x,D=T-E,k=I-x,G=nt*D+V*k,j=V*D-k*nt,Q=j<0;if(Math.abs(j)<.001*Math.abs(G)){d.push(T-O*M,x-A*M,T+O*F,x+A*F),G>=0&&(o.join===Sr.ROUND?c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+4:c+=2,d.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const K=(-O+m)*(-A+x)-(-O+T)*(-A+w),$=(-L+E)*(-R+x)-(-L+T)*(-R+I),W=(nt*$-D*K)/j,et=(k*K-V*$)/j,Y=(W-T)*(W-T)+(et-x)*(et-x),rt=T+(W-T)*M,ot=x+(et-x)*M,pt=T-(W-T)*F,vt=x-(et-x)*F,_t=Math.min(nt*nt+V*V,D*D+k*k),At=Q?M:F,ne=_t+At*At*_,Ut=Y<=ne;let it=o.join;if(it===Sr.MITER&&Y/_>b&&(it=Sr.BEVEL),Ut)switch(it){case Sr.MITER:{d.push(rt,ot,pt,vt);break}case Sr.BEVEL:{Q?d.push(rt,ot,T+O*F,x+A*F,rt,ot,T+L*F,x+R*F):d.push(T-O*M,x-A*M,pt,vt,T-L*M,x-R*M,pt,vt),c+=2;break}case Sr.ROUND:{Q?(d.push(rt,ot,T+O*F,x+A*F),c+=qn(T,x,T+O*F,x+A*F,T+L*F,x+R*F,d,!0)+4,d.push(rt,ot,T+L*F,x+R*F)):(d.push(T-O*M,x-A*M,pt,vt),c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+4,d.push(T-L*M,x-R*M,pt,vt));break}}else{switch(d.push(T-O*M,x-A*M,T+O*F,x+A*F),it){case Sr.MITER:{Q?d.push(pt,vt,pt,vt):d.push(rt,ot,rt,ot),c+=2;break}case Sr.ROUND:{Q?c+=qn(T,x,T+O*F,x+A*F,T+L*F,x+R*F,d,!0)+2:c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+2;break}}d.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}m=n[(p-2)*2],w=n[(p-2)*2+1],T=n[(p-1)*2],x=n[(p-1)*2+1],O=-(w-x),A=m-T,C=Math.sqrt(O*O+A*A),O/=C,A/=C,O*=y,A*=y,d.push(T-O*M,x-A*M,T+O*F,x+A*F),f||(o.cap===jn.ROUND?c+=qn(T-O*(M-F)*.5,x-A*(M-F)*.5,T-O*M,x-A*M,T+O*F,x+A*F,d,!1)+2:o.cap===jn.SQUARE&&(c+=bp(T,x,O,A,M,F,!1,d)));const q=t.indices,Z=Si.epsilon*Si.epsilon;for(let z=v;z<c+v-2;++z)m=d[z*2],w=d[z*2+1],T=d[(z+1)*2],x=d[(z+1)*2+1],E=d[(z+2)*2],I=d[(z+2)*2+1],!(Math.abs(m*(x-I)+T*(I-w)+E*(w-x))<Z)&&q.push(z,z+1,z+2)}function JE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Ne.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,u=t.indices,f=i.length/2,h=a.length/2;let d=h;for(a.push(i[0],i[1]),r=1;r<f;r++)a.push(i[r*2],i[r*2+1]),u.push(d,d+1),d++;o&&u.push(d,h)}function xp(e,t){e.lineStyle.native?JE(e,t):QE(e,t)}class Au{static curveLength(t,r,n,i,o,a){const u=t-2*n+o,f=r-2*i+a,h=2*n-2*t,d=2*i-2*r,p=4*(u*u+f*f),c=4*(u*h+f*d),v=h*h+d*d,y=2*Math.sqrt(p+c+v),_=Math.sqrt(p),b=2*p*_,m=2*Math.sqrt(v),w=c/_;return(b*y+_*c*(y-m)+(4*v*p-c*c)*Math.log((2*_+w+y)/(w+m)))/(4*b)}static curveTo(t,r,n,i,o){const a=o[o.length-2],u=o[o.length-1],f=Si._segmentsCount(Au.curveLength(a,u,t,r,n,i));let h=0,d=0;for(let p=1;p<=f;++p){const c=p/f;h=a+(t-a)*c,d=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,d+(r+(i-r)*c-d)*c)}}}const Ou={[Ne.POLY]:yp,[Ne.CIRC]:Fo,[Ne.ELIP]:Fo,[Ne.RECT]:KE,[Ne.RREC]:YE},wp=[],Bo=[];class Cu{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(t){return this.minX>this.maxX||this.minY>this.maxY?ie.EMPTY:(t=t||new ie(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:i,c:o,d:a,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,d=i*r.x+a*r.y+f;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(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=t[0],u=t[1];r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[2],u=t[3],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[4],u=t[5],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[6],u=t[7],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o}addFrame(t,r,n,i,o){this.addFrameMatrix(t.worldTransform,r,n,i,o)}addFrameMatrix(t,r,n,i,o){const a=t.a,u=t.b,f=t.c,h=t.d,d=t.tx,p=t.ty;let c=this.minX,v=this.minY,y=this.maxX,_=this.maxY,b=a*r+f*n+d,m=u*r+h*n+p;c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*i+f*n+d,m=u*i+h*n+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*r+f*o+d,m=u*r+h*o+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*i+f*o+d,m=u*i+h*o+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,this.minX=c,this.minY=v,this.maxX=y,this.maxY=_}addVertexData(t,r,n){let i=this.minX,o=this.minY,a=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],d=t[f+1];i=h<i?h:i,o=d<o?d:o,a=h>a?h:a,u=d>u?d:u}this.minX=i,this.minY=o,this.maxX=a,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,a=o){const u=t.a,f=t.b,h=t.c,d=t.d,p=t.tx,c=t.ty;let v=this.minX,y=this.minY,_=this.maxX,b=this.maxY;for(let m=n;m<i;m+=2){const w=r[m],T=r[m+1],x=u*w+h*T+p,E=d*T+f*w+c;v=Math.min(v,x-o),_=Math.max(_,x+o),y=Math.min(y,E-a),b=Math.max(b,E+a)}this.minX=v,this.minY=y,this.maxX=_,this.maxY=b}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,o=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>o?t.maxY:o}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,o=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,i=t.minY>r.y?t.minY:r.y,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,a=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,o,a){t-=o,r-=a,n+=o,i+=a,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>i?this.maxY:i}}class Ai extends Ws{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new ou,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 Cu,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(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const i=r[n];Object.defineProperty(Ai.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}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(t,r){return t||(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 ie),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ie),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Cu);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,o=this._boundsID;this._bounds=this._localBounds;const a=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,a}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,i){return r&&(t=r.toGlobal(t,n,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,i=1,o=0,a=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=o,this.skew.x=a,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,this}destroy(t){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 t2),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*pw}set angle(t){this.transform.rotation=t*cs}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){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=t,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 t2 extends Ai{constructor(){super(...arguments),this.sortDirty=null}}Ai.prototype.displayObjectUpdateTransform=Ai.prototype.updateTransform;const e2=new $e;function r2(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Ru=class extends Ai{constructor(){super(),this.children=[],this.sortableChildren=Ru.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);co(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,co(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,co(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,i=n-r;let o;if(i>0&&i<=n){o=this.children.splice(r,i);for(let a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<o.length;++a)o[a].emit("removed",this),this.emit("childRemoved",o[a],this,a);return o}else if(i===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(r2),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 e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,i=this.children.length;n<i;++n){const o=this.children[n];o.visible&&o.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Ru.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=e2.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,a=this.children.length;o<a;++o){const u=this.children[o],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var i,o,a;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==Ee.NONE));if(n&&e.batch.flush(),t&&((o=this._enabledFilters)!=null&&o.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let Oi=Ru;Oi.defaultSortableChildren=!1,Oi.prototype.containerUpdateTransform=Oi.prototype.updateTransform,Object.defineProperties(Dt,{SORTABLE_CHILDREN:{get(){return Oi.defaultSortableChildren},set(e){Ht("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Oi.defaultSortableChildren=e}}});class Do{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Do(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 Ci=new oe,Tp=class extends ed{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 Cu,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 e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Bo.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),wp.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const i=new Do(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Do(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].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(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,Ci):Ci.copyFrom(e),n.shape.contains(Ci.x,Ci.y))){let i=!1;if(n.holes){for(let o=0;o<n.holes.length;o++)if(n.holes[o].shape.contains(Ci.x,Ci.y)){i=!0;break}}if(!i)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,d=f.lineStyle;Ou[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||d.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:d;if(!v.visible)continue;const y=v.texture.baseTexture,_=this.indices.length,b=this.points.length/2;y.wrapMode=Ji.REPEAT,c===0?this.processFill(f):this.processLine(f);const m=this.points.length/2-b;m!==0&&(r&&!this._compareStyles(n,v)&&(r.end(_,b),r=null),r||(r=wp.pop()||new ZE,r.begin(v,_,b),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,b,m,v.matrix))}}const i=this.indices.length,o=this.points.length/2;if(r&&r.end(i,o),this.batches.length===0){this.batchable=!0;return}const a=o>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(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let i=0;i<n.size;i++){const o=n.start+i;this.indicesUint16[o]=this.indicesUint16[o]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Kt._globalBatch;for(let d=0;d<this.drawCalls.length;d++)this.drawCalls[d].texArray.clear(),Bo.push(this.drawCalls[d]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Bo.pop();n||(n=new ru,n.texArray=new lu),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,a=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let d=0;d<this.batches.length;d++){const p=this.batches[d],c=8,v=p.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==y&&(o=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Bo.pop(),n||(n=new ru,n.texArray=new lu),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Ji.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=p.size,h+=p.size,a=y._batchLocation,this.addColors(t,v.color,v.alpha,p.attribSize,p.attribStart),this.addTextureIds(r,a,p.attribSize,p.attribStart)}Kt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),o=new Float32Array(i),a=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)o[u++]=e[f*2],o[u++]=e[f*2+1],o[u++]=t[f*2],o[u++]=t[f*2+1],a[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?yp.triangulate(e,this):Ou[e.type].triangulate(e,this)}processLine(e){xp(e,this);for(let t=0;t<e.holes.length;t++)xp(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Ou[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const o=Be.shared.setValue(t).toLittleEndianNumber(),a=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=a}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,o=null){let a=0;const u=t.length,f=r.frame;for(;a<i;){let d=e[(n+a)*2],p=e[(n+a)*2+1];if(o){const c=o.a*d+o.c*p+o.tx;p=o.b*d+o.d*p+o.ty,d=c}a++,t.push(d/f.width,p/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,o=1e-6,a=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let d=u.x/u.width,p=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let y=r+2;y<a;y+=2)c=Math.min(c,Math.floor(e[y]+o)),v=Math.min(v,Math.floor(e[y+1]+o));d-=c,p-=v;for(let y=r;y<a;y+=2)e[y]=(e[y]+d)*f,e[y+1]=(e[y+1]+p)*h}};let Ep=Tp;Ep.BATCHABLE_SIZE=100;class Uo{constructor(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Uo;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Iu extends Uo{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=jn.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Iu;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Pu={},$o=class extends Oi{constructor(e=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 Uo,this._lineStyle=new Iu,this._matrix=null,this._holeMode=!1,this.state=po.for2d(),this._geometry=e||new Ep,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Pt.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new $o(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Wt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:jn.BUTT,join:Sr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new hs,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new hs,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(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],i=r[r.length-1];return(n!==e||i!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),Au.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Su.curveTo(e,t,r,n,i,o,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const o=this.currentPath.points,a=_p.curveTo(e,t,r,n,i,o);if(a){const{cx:u,cy:f,radius:h,startAngle:d,endAngle:p,anticlockwise:c}=a;this.arc(u,f,h,d,p,c)}return this}arc(e,t,r,n,i,o=!1){if(n===i)return this;if(!o&&i<=n?i+=go:o&&n<=i&&(n+=go),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const p=Math.abs(d[d.length-2]-u),c=Math.abs(d[d.length-1]-f);p<h&&c<h||d.push(u,f)}else this.moveTo(u,f),d=this.currentPath.points;return _p.arc(u,f,e,t,r,n,i,o,d),this}beginFill(e=0,t){return this.beginTextureFill({texture:Wt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Be.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Wt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new ie(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new iu(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new nu(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new vw(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const i=new hs(t);return i.closeStroke=r,this.drawShape(i),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,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 e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===Ne.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const i=e.batches[n],o=i.style.color,a=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:a,blendMode:t,indices:f,uvs:u,_batchRGB:Be.shared.setValue(o).toRgbArray(),_tintRGB:o,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,i=t.uniforms,o=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Be.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let a=0,u=o.length;a<u;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,a=r.count;for(let u=0;u<a;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,o)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!Pu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const o={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:br.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;Pu[r]=new ps(a,o)}t=Pu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,$o._TEMP_POINT),this._geometry.containsPoint($o._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Be.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,i=t.c,o=t.d,a=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let d=0;for(let p=0;p<f.length;p+=2){const c=f[p],v=f[p+1];h[d++]=r*c+i*v+a,h[d++]=o*v+n*c+u}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){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(e)}};let Nu=$o;Nu.curves=Si,Nu._TEMP_POINT=new oe;var n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mu={},i2={get exports(){return Mu},set exports(e){Mu=e}};/*!
1923
+ `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},pp=st.forwardRef((e,t)=>{const r=W.useRef(null),n=W.useRef(null),{src:s,visible:a,transformation:{x:u,y:l,width:c,height:f,anchor:p,colorCorrection:m={},effect:g},pointerdown:x}=e,{blurRadius:y=0}=m,{temperatureFilter:S,sharpnessFilter:T,hueFilter:w,blurFilter:I,adjustmentFilter:A}=cs(m),{nightVisionFilter:R}=VS();return st.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Mt.jsx(Wn,{...e,ref:t,children:Mt.jsx(Yt.Container,{ref:n,children:Mt.jsx(Yt.Sprite,{image:s,width:c,height:f,anchor:p,ref:r,alpha:a?1:0,x:u,y:l,...a&&{interactive:!0,pointerdown:x},filters:[S,T,w,A,...y>0?[I]:[],...g===pn.NightVision?[R]:[]]})})})});pp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Ra={build(e){const t=e.points;let r,n,s,a,u,l;if(e.type===xe.CIRC){const y=e.shape;r=y.x,n=y.y,u=l=y.radius,s=a=0}else if(e.type===xe.ELIP){const y=e.shape;r=y.x,n=y.y,u=y.width,l=y.height,s=a=0}else{const y=e.shape,S=y.width/2,T=y.height/2;r=y.x+S,n=y.y+T,u=l=Math.max(0,Math.min(y.radius,Math.min(S,T))),s=S-u,a=T-l}if(!(u>=0&&l>=0&&s>=0&&a>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(u+l)),f=c*8+(s?4:0)+(a?4:0);if(t.length=f,f===0)return;if(c===0){t.length=8,t[0]=t[6]=r+s,t[1]=t[3]=n+a,t[2]=t[4]=r-s,t[5]=t[7]=n-a;return}let p=0,m=c*4+(s?2:0)+2,g=m,x=f;{const y=s+u,S=a,T=r+y,w=r-y,I=n+S;if(t[p++]=T,t[p++]=I,t[--m]=I,t[--m]=w,a){const A=n-S;t[g++]=w,t[g++]=A,t[--x]=A,t[--x]=T}}for(let y=1;y<c;y++){const S=Math.PI/2*(y/c),T=s+Math.cos(S)*u,w=a+Math.sin(S)*l,I=r+T,A=r-T,R=n+w,N=n-w;t[p++]=I,t[p++]=R,t[--m]=R,t[--m]=A,t[g++]=A,t[g++]=N,t[--x]=N,t[--x]=I}{const y=s,S=a+l,T=r+y,w=r-y,I=n+S,A=n-S;t[p++]=T,t[p++]=I,t[--x]=A,t[--x]=T,s&&(t[p++]=w,t[p++]=I,t[--x]=A,t[--x]=w)}},triangulate(e,t){const r=e.points,n=t.points,s=t.indices;if(r.length===0)return;let a=n.length/2;const u=a;let l,c;if(e.type!==xe.RREC){const p=e.shape;l=p.x,c=p.y}else{const p=e.shape;l=p.x+p.width/2,c=p.y+p.height/2}const f=e.matrix;n.push(e.matrix?f.a*l+f.c*c+f.tx:l,e.matrix?f.b*l+f.d*c+f.ty:c),a++,n.push(r[0],r[1]);for(let p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),s.push(a++,u,a);s.push(u+1,u,a)}};function gp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let s=0,a=e[r-2],u=e[r-1];s<r;s+=2){const l=e[s],c=e[s+1];n+=(l-a)*(c+u),a=l,u=c}if(!t&&n>0||t&&n<=0){const s=r/2;for(let a=s+s%2;a<r;a+=2){const u=r-a-2,l=r-a-1,c=a,f=a+1;[e[u],e[c]]=[e[c],e[u]],[e[l],e[f]]=[e[f],e[l]]}}}const mp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,s=t.points,a=t.indices;if(r.length>=6){gp(r,!1);const u=[];for(let f=0;f<n.length;f++){const p=n[f];gp(p.points,!0),u.push(r.length/2),r=r.concat(p.points)}const l=Px(r,u,2);if(!l)return;const c=s.length/2;for(let f=0;f<l.length;f+=3)a.push(l[f]+c),a.push(l[f+1]+c),a.push(l[f+2]+c);for(let f=0;f<r.length;f++)s.push(r[f])}}},jS={build(e){const t=e.shape,r=t.x,n=t.y,s=t.width,a=t.height,u=e.points;u.length=0,s>=0&&a>=0&&u.push(r,n,r+s,n,r+s,n+a,r,n+a)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const s=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(s,s+1,s+2,s+1,s+2,s+3)}},XS={build(e){Ra.build(e)},triangulate(e,t){Ra.triangulate(e,t)}};var cr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(cr||{}),Mn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Mn||{});const gi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class vp{static curveTo(t,r,n,s,a,u){const l=u[u.length-2],f=u[u.length-1]-r,p=l-t,m=s-r,g=n-t,x=Math.abs(f*g-p*m);if(x<1e-8||a===0)return(u[u.length-2]!==t||u[u.length-1]!==r)&&u.push(t,r),null;const y=f*f+p*p,S=m*m+g*g,T=f*m+p*g,w=a*Math.sqrt(y)/x,I=a*Math.sqrt(S)/x,A=w*T/y,R=I*T/S,N=w*g+I*p,B=w*m+I*f,L=p*(I+A),O=f*(I+A),z=g*(w+R),X=m*(w+R),tt=Math.atan2(O-B,L-N),it=Math.atan2(X-B,z-N);return{cx:N+t,cy:B+r,radius:a,startAngle:tt,endAngle:it,anticlockwise:p*m>g*f}}static arc(t,r,n,s,a,u,l,c,f){const p=l-u,m=gi._segmentsCount(Math.abs(p)*a,Math.ceil(Math.abs(p)/la)*40),g=p/(m*2),x=g*2,y=Math.cos(g),S=Math.sin(g),T=m-1,w=T%1/T;for(let I=0;I<=T;++I){const A=I+w*I,R=g+u+x*A,N=Math.cos(R),B=-Math.sin(R);f.push((y*N+S*B)*a+n,(y*-B+S*N)*a+s)}}}class WS{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class xl{static curveLength(t,r,n,s,a,u,l,c){let p=0,m=0,g=0,x=0,y=0,S=0,T=0,w=0,I=0,A=0,R=0,N=t,B=r;for(let L=1;L<=10;++L)m=L/10,g=m*m,x=g*m,y=1-m,S=y*y,T=S*y,w=T*t+3*S*m*n+3*y*g*a+x*l,I=T*r+3*S*m*s+3*y*g*u+x*c,A=N-w,R=B-I,N=w,B=I,p+=Math.sqrt(A*A+R*R);return p}static curveTo(t,r,n,s,a,u,l){const c=l[l.length-2],f=l[l.length-1];l.length-=2;const p=gi._segmentsCount(xl.curveLength(c,f,t,r,n,s,a,u));let m=0,g=0,x=0,y=0,S=0;l.push(c,f);for(let T=1,w=0;T<=p;++T)w=T/p,m=1-w,g=m*m,x=g*m,y=w*w,S=y*w,l.push(x*c+3*g*w*t+3*m*y*n+S*a,x*f+3*g*w*r+3*m*y*s+S*u)}}function yp(e,t,r,n,s,a,u,l){const c=e-r*s,f=t-n*s,p=e+r*a,m=t+n*a;let g,x;u?(g=n,x=-r):(g=-n,x=r);const y=c+g,S=f+x,T=p+g,w=m+x;return l.push(y,S,T,w),2}function On(e,t,r,n,s,a,u,l){const c=r-e,f=n-t;let p=Math.atan2(c,f),m=Math.atan2(s-e,a-t);l&&p<m?p+=Math.PI*2:!l&&p>m&&(m+=Math.PI*2);let g=p;const x=m-p,y=Math.abs(x),S=Math.sqrt(c*c+f*f),T=(15*y*Math.sqrt(S)/Math.PI>>0)+1,w=x/T;if(g+=w,l){u.push(e,t,r,n);for(let I=1,A=g;I<T;I++,A+=w)u.push(e,t,e+Math.sin(A)*S,t+Math.cos(A)*S);u.push(e,t,s,a)}else{u.push(r,n,e,t);for(let I=1,A=g;I<T;I++,A+=w)u.push(e+Math.sin(A)*S,t+Math.cos(A)*S,e,t);u.push(s,a,e,t)}return T*2}function qS(e,t){const r=e.shape;let n=e.points||r.points.slice();const s=t.closePointEps;if(n.length===0)return;const a=e.lineStyle,u=new Wt(n[0],n[1]),l=new Wt(n[n.length-2],n[n.length-1]),c=r.type!==xe.POLY||r.closeStroke,f=Math.abs(u.x-l.x)<s&&Math.abs(u.y-l.y)<s;if(c){n=n.slice(),f&&(n.pop(),n.pop(),l.set(n[n.length-2],n[n.length-1]));const G=(u.x+l.x)*.5,rt=(l.y+u.y)*.5;n.unshift(G,rt),n.push(G,rt)}const p=t.points,m=n.length/2;let g=n.length;const x=p.length/2,y=a.width/2,S=y*y,T=a.miterLimit*a.miterLimit;let w=n[0],I=n[1],A=n[2],R=n[3],N=0,B=0,L=-(I-R),O=w-A,z=0,X=0,tt=Math.sqrt(L*L+O*O);L/=tt,O/=tt,L*=y,O*=y;const it=a.alignment,V=(1-it)*2,j=it*2;c||(a.cap===Mn.ROUND?g+=On(w-L*(V-j)*.5,I-O*(V-j)*.5,w-L*V,I-O*V,w+L*j,I+O*j,p,!0)+2:a.cap===Mn.SQUARE&&(g+=yp(w,I,L,O,V,j,!0,p))),p.push(w-L*V,I-O*V,w+L*j,I+O*j);for(let G=1;G<m-1;++G){w=n[(G-1)*2],I=n[(G-1)*2+1],A=n[G*2],R=n[G*2+1],N=n[(G+1)*2],B=n[(G+1)*2+1],L=-(I-R),O=w-A,tt=Math.sqrt(L*L+O*O),L/=tt,O/=tt,L*=y,O*=y,z=-(R-B),X=A-N,tt=Math.sqrt(z*z+X*X),z/=tt,X/=tt,z*=y,X*=y;const rt=A-w,gt=I-R,H=A-N,K=B-R,ct=rt*H+gt*K,yt=gt*H-K*rt,wt=yt<0;if(Math.abs(yt)<.001*Math.abs(ct)){p.push(A-L*V,R-O*V,A+L*j,R+O*j),ct>=0&&(a.join===cr.ROUND?g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+4:g+=2,p.push(A-z*j,R-X*j,A+z*V,R+X*V));continue}const Pt=(-L+w)*(-O+R)-(-L+A)*(-O+I),Ft=(-z+N)*(-X+R)-(-z+A)*(-X+B),Vt=(rt*Ft-H*Pt)/yt,Ut=(K*Pt-gt*Ft)/yt,Zt=(Vt-A)*(Vt-A)+(Ut-R)*(Ut-R),J=A+(Vt-A)*V,q=R+(Ut-R)*V,at=A-(Vt-A)*j,St=R-(Ut-R)*j,Et=Math.min(rt*rt+gt*gt,H*H+K*K),Jt=wt?V:j,gr=Et+Jt*Jt*S,Me=Zt<=gr;let $r=a.join;if($r===cr.MITER&&Zt/S>T&&($r=cr.BEVEL),Me)switch($r){case cr.MITER:{p.push(J,q,at,St);break}case cr.BEVEL:{wt?p.push(J,q,A+L*j,R+O*j,J,q,A+z*j,R+X*j):p.push(A-L*V,R-O*V,at,St,A-z*V,R-X*V,at,St),g+=2;break}case cr.ROUND:{wt?(p.push(J,q,A+L*j,R+O*j),g+=On(A,R,A+L*j,R+O*j,A+z*j,R+X*j,p,!0)+4,p.push(J,q,A+z*j,R+X*j)):(p.push(A-L*V,R-O*V,at,St),g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+4,p.push(A-z*V,R-X*V,at,St));break}}else{switch(p.push(A-L*V,R-O*V,A+L*j,R+O*j),$r){case cr.MITER:{wt?p.push(at,St,at,St):p.push(J,q,J,q),g+=2;break}case cr.ROUND:{wt?g+=On(A,R,A+L*j,R+O*j,A+z*j,R+X*j,p,!0)+2:g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+2;break}}p.push(A-z*V,R-X*V,A+z*j,R+X*j),g+=2}}w=n[(m-2)*2],I=n[(m-2)*2+1],A=n[(m-1)*2],R=n[(m-1)*2+1],L=-(I-R),O=w-A,tt=Math.sqrt(L*L+O*O),L/=tt,O/=tt,L*=y,O*=y,p.push(A-L*V,R-O*V,A+L*j,R+O*j),c||(a.cap===Mn.ROUND?g+=On(A-L*(V-j)*.5,R-O*(V-j)*.5,A-L*V,R-O*V,A+L*j,R+O*j,p,!1)+2:a.cap===Mn.SQUARE&&(g+=yp(A,R,L,O,V,j,!1,p)));const xt=t.indices,kt=gi.epsilon*gi.epsilon;for(let G=x;G<g+x-2;++G)w=p[G*2],I=p[G*2+1],A=p[(G+1)*2],R=p[(G+1)*2+1],N=p[(G+2)*2],B=p[(G+2)*2+1],!(Math.abs(w*(R-B)+A*(B-I)+N*(I-R))<kt)&&xt.push(G,G+1,G+2)}function YS(e,t){let r=0;const n=e.shape,s=e.points||n.points,a=n.type!==xe.POLY||n.closeStroke;if(s.length===0)return;const u=t.points,l=t.indices,c=s.length/2,f=u.length/2;let p=f;for(u.push(s[0],s[1]),r=1;r<c;r++)u.push(s[r*2],s[r*2+1]),l.push(p,p+1),p++;a&&l.push(p,f)}function _p(e,t){e.lineStyle.native?YS(e,t):qS(e,t)}class bl{static curveLength(t,r,n,s,a,u){const l=t-2*n+a,c=r-2*s+u,f=2*n-2*t,p=2*s-2*r,m=4*(l*l+c*c),g=4*(l*f+c*p),x=f*f+p*p,y=2*Math.sqrt(m+g+x),S=Math.sqrt(m),T=2*m*S,w=2*Math.sqrt(x),I=g/S;return(T*y+S*g*(y-w)+(4*x*m-g*g)*Math.log((2*S+I+y)/(I+w)))/(4*T)}static curveTo(t,r,n,s,a){const u=a[a.length-2],l=a[a.length-1],c=gi._segmentsCount(bl.curveLength(u,l,t,r,n,s));let f=0,p=0;for(let m=1;m<=c;++m){const g=m/c;f=u+(t-u)*g,p=l+(r-l)*g,a.push(f+(t+(n-t)*g-f)*g,p+(r+(s-r)*g-p)*g)}}}const Tl={[xe.POLY]:mp,[xe.CIRC]:Ra,[xe.ELIP]:Ra,[xe.RECT]:jS,[xe.RREC]:XS},xp=[],Pa=[];class wl{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(t){return this.minX>this.maxX||this.minY>this.maxY?jt.EMPTY:(t=t||new jt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:s,c:a,d:u,tx:l,ty:c}=t,f=n*r.x+a*r.y+l,p=s*r.x+u*r.y+c;this.minX=Math.min(this.minX,f),this.maxX=Math.max(this.maxX,f),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,s=this.maxX,a=this.maxY,u=t[0],l=t[1];r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[2],l=t[3],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[4],l=t[5],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[6],l=t[7],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,this.minX=r,this.minY=n,this.maxX=s,this.maxY=a}addFrame(t,r,n,s,a){this.addFrameMatrix(t.worldTransform,r,n,s,a)}addFrameMatrix(t,r,n,s,a){const u=t.a,l=t.b,c=t.c,f=t.d,p=t.tx,m=t.ty;let g=this.minX,x=this.minY,y=this.maxX,S=this.maxY,T=u*r+c*n+p,w=l*r+f*n+m;g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*s+c*n+p,w=l*s+f*n+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*r+c*a+p,w=l*r+f*a+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*s+c*a+p,w=l*s+f*a+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,this.minX=g,this.minY=x,this.maxX=y,this.maxY=S}addVertexData(t,r,n){let s=this.minX,a=this.minY,u=this.maxX,l=this.maxY;for(let c=r;c<n;c+=2){const f=t[c],p=t[c+1];s=f<s?f:s,a=p<a?p:a,u=f>u?f:u,l=p>l?p:l}this.minX=s,this.minY=a,this.maxX=u,this.maxY=l}addVertices(t,r,n,s){this.addVerticesMatrix(t.worldTransform,r,n,s)}addVerticesMatrix(t,r,n,s,a=0,u=a){const l=t.a,c=t.b,f=t.c,p=t.d,m=t.tx,g=t.ty;let x=this.minX,y=this.minY,S=this.maxX,T=this.maxY;for(let w=n;w<s;w+=2){const I=r[w],A=r[w+1],R=l*I+f*A+m,N=p*A+c*I+g;x=Math.min(x,R-a),S=Math.max(S,R+a),y=Math.min(y,N-u),T=Math.max(T,N+u)}this.minX=x,this.minY=y,this.maxX=S,this.maxY=T}addBounds(t){const r=this.minX,n=this.minY,s=this.maxX,a=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>s?t.maxX:s,this.maxY=t.maxY>a?t.maxY:a}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,s=t.minY>r.minY?t.minY:r.minY,a=t.maxX<r.maxX?t.maxX:r.maxX,u=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=a&&s<=u){const l=this.minX,c=this.minY,f=this.maxX,p=this.maxY;this.minX=n<l?n:l,this.minY=s<c?s:c,this.maxX=a>f?a:f,this.maxY=u>p?u:p}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,s=t.minY>r.y?t.minY:r.y,a=t.maxX<r.x+r.width?t.maxX:r.x+r.width,u=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=a&&s<=u){const l=this.minX,c=this.minY,f=this.maxX,p=this.maxY;this.minX=n<l?n:l,this.minY=s<c?s:c,this.maxX=a>f?a:f,this.maxY=u>p?u:p}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,s,a,u){t-=a,r-=u,n+=a,s+=u,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>s?this.maxY:s}}class mi extends Gs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new el,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 wl,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(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const s=r[n];Object.defineProperty(mi.prototype,s,Object.getOwnPropertyDescriptor(t,s))}}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(t,r){return t||(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 jt),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new jt),t=this._localBoundsRect),this._localBounds||(this._localBounds=new wl);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const s=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const u=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=s,this._bounds.updateID+=this._boundsID-a,u}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,s){return r&&(t=r.toGlobal(t,n,s)),s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,s=1,a=0,u=0,l=0,c=0,f=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=s||1,this.rotation=a,this.skew.x=u,this.skew.y=l,this.pivot.x=c,this.pivot.y=f,this}destroy(t){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 KS),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*hT}set angle(t){this.transform.rotation=t*ns}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){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=t,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 KS extends mi{constructor(){super(...arguments),this.sortDirty=null}}mi.prototype.displayObjectUpdateTransform=mi.prototype.updateTransform;const ZS=new Pe;function JS(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Sl=class extends mi{constructor(){super(),this.children=[],this.sortableChildren=Sl.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);sa(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,sa(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,sa(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,s=n-r;let a;if(s>0&&s<=n){a=this.children.splice(r,s);for(let u=0;u<a.length;++u)a[u].parent=null,a[u].transform&&(a[u].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let u=0;u<a.length;++u)a[u].emit("removed",this),this.emit("childRemoved",a[u],this,u);return a}else if(s===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(JS),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 e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,s=this.children.length;n<s;++n){const a=this.children[n];a.visible&&a.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Sl.prototype._render&&(r=this.getBounds(!0));const s=e.projection.transform;if(s&&(n?(n=ZS.copyFrom(n),n.prepend(s)):n=s),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let a=0,u=this.children.length;a<u;++a){const l=this.children[a],c=l.cullable;l.cullable=c||!this.cullArea,l.render(e),l.cullable=c}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var s,a,u;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let l=0;l<t.length;l++)t[l].enabled&&this._enabledFilters.push(t[l])}const n=t&&((s=this._enabledFilters)==null?void 0:s.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==de.NONE));if(n&&e.batch.flush(),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let l=0,c=this.children.length;l<c;++l)this.children[l].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((u=this._enabledFilters)!=null&&u.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let vi=Sl;vi.defaultSortableChildren=!1,vi.prototype.containerUpdateTransform=vi.prototype.updateTransform,Object.defineProperties(_t,{SORTABLE_CHILDREN:{get(){return vi.defaultSortableChildren},set(e){Rt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),vi.defaultSortableChildren=e}}});class Ma{constructor(t,r=null,n=null,s=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=s,this.type=t.type}clone(){return new Ma(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 yi=new Wt,bp=class extends Qf{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 wl,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 e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Pa.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),xp.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const s=new Ma(e,t,r,n);return this.graphicsData.push(s),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Ma(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].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(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,yi):yi.copyFrom(e),n.shape.contains(yi.x,yi.y))){let s=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(yi.x,yi.y)){s=!0;break}}if(!s)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let l=this.shapeIndex;l<t.length;l++){this.shapeIndex++;const c=t[l],f=c.fillStyle,p=c.lineStyle;Tl[c.type].build(c),c.matrix&&this.transformPoints(c.points,c.matrix),(f.visible||p.visible)&&this.processHoles(c.holes);for(let g=0;g<2;g++){const x=g===0?f:p;if(!x.visible)continue;const y=x.texture.baseTexture,S=this.indices.length,T=this.points.length/2;y.wrapMode=ji.REPEAT,g===0?this.processFill(c):this.processLine(c);const w=this.points.length/2-T;w!==0&&(r&&!this._compareStyles(n,x)&&(r.end(S,T),r=null),r||(r=xp.pop()||new WS,r.begin(x,S,T),this.batches.push(r),n=x),this.addUvs(this.points,e,x.texture,T,w,x.matrix))}}const s=this.indices.length,a=this.points.length/2;if(r&&r.end(s,a),this.batches.length===0){this.batchable=!0;return}const u=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&u===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=u?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,s=r.lineStyle;if(n&&!n.texture.baseTexture.valid||s&&!s.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let s=0;s<n.size;s++){const a=n.start+s;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<bp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Lt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Pa.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Pa.pop();n||(n=new Zu,n.texArray=new nl),n.texArray.count=0,n.start=0,n.size=0,n.type=Kr.TRIANGLES;let s=0,a=null,u=0,l=!1,c=Kr.TRIANGLES,f=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const m=this.batches[p],g=8,x=m.style,y=x.texture.baseTexture;l!==!!x.native&&(l=!!x.native,c=l?Kr.LINES:Kr.TRIANGLES,a=null,s=g,e++),a!==y&&(a=y,y._batchEnabled!==e&&(s===g&&(e++,s=0,n.size>0&&(n=Pa.pop(),n||(n=new Zu,n.texArray=new nl),this.drawCalls.push(n)),n.start=f,n.size=0,n.texArray.count=0,n.type=c),y.touched=1,y._batchEnabled=e,y._batchLocation=s,y.wrapMode=ji.REPEAT,n.texArray.elements[n.texArray.count++]=y,s++)),n.size+=m.size,f+=m.size,u=y._batchLocation,this.addColors(t,x.color,x.alpha,m.attribSize,m.attribStart),this.addTextureIds(r,u,m.attribSize,m.attribStart)}Lt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,s=new ArrayBuffer(e.length*3*4),a=new Float32Array(s),u=new Uint32Array(s);let l=0;for(let c=0;c<e.length/2;c++)a[l++]=e[c*2],a[l++]=e[c*2+1],a[l++]=t[c*2],a[l++]=t[c*2+1],u[l++]=r[c],a[l++]=n[c];this._buffer.update(s),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?mp.triangulate(e,this):Tl[e.type].triangulate(e,this)}processLine(e){_p(e,this);for(let t=0;t<e.holes.length;t++)_p(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Tl[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],s=e[r*2+1];e[r*2]=t.a*n+t.c*s+t.tx,e[r*2+1]=t.b*n+t.d*s+t.ty}}addColors(e,t,r,n,s=0){const a=Ce.shared.setValue(t).toLittleEndianNumber(),u=Ce.shared.setValue(a).toPremultiplied(r);e.length=Math.max(e.length,s+n);for(let l=0;l<n;l++)e[s+l]=u}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let s=0;s<r;s++)e[n+s]=t}addUvs(e,t,r,n,s,a=null){let u=0;const l=t.length,c=r.frame;for(;u<s;){let p=e[(n+u)*2],m=e[(n+u)*2+1];if(a){const g=a.a*p+a.c*m+a.tx;m=a.b*p+a.d*m+a.ty,p=g}u++,t.push(p/c.width,m/c.height)}const f=r.baseTexture;(c.width<f.width||c.height<f.height)&&this.adjustUvs(t,r,l,s)}adjustUvs(e,t,r,n){const s=t.baseTexture,a=1e-6,u=r+n*2,l=t.frame,c=l.width/s.width,f=l.height/s.height;let p=l.x/l.width,m=l.y/l.height,g=Math.floor(e[r]+a),x=Math.floor(e[r+1]+a);for(let y=r+2;y<u;y+=2)g=Math.min(g,Math.floor(e[y]+a)),x=Math.min(x,Math.floor(e[y+1]+a));p-=g,m-=x;for(let y=r;y<u;y+=2)e[y]=(e[y]+p)*c,e[y+1]=(e[y+1]+m)*f}};let Tp=bp;Tp.BATCHABLE_SIZE=100;class Oa{constructor(){this.color=16777215,this.alpha=1,this.texture=Ot.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Oa;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Ot.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Al extends Oa{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Mn.BUTT,this.join=cr.MITER,this.miterLimit=10}clone(){const t=new Al;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Cl={},Fa=class extends vi{constructor(e=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 Oa,this._lineStyle=new Al,this._matrix=null,this._holeMode=!1,this.state=oa.for2d(),this._geometry=e||new Tp,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ce(16777215),this.blendMode=ht.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Fa(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,s=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:s}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Ot.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Mn.BUTT,join:cr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new is,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new is,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(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],s=r[r.length-1];return(n!==e||s!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const s=this.currentPath.points;return s.length===0&&this.moveTo(0,0),bl.curveTo(e,t,r,n,s),this}bezierCurveTo(e,t,r,n,s,a){return this._initCurve(),xl.curveTo(e,t,r,n,s,a,this.currentPath.points),this}arcTo(e,t,r,n,s){this._initCurve(e,t);const a=this.currentPath.points,u=vp.curveTo(e,t,r,n,s,a);if(u){const{cx:l,cy:c,radius:f,startAngle:p,endAngle:m,anticlockwise:g}=u;this.arc(l,c,f,p,m,g)}return this}arc(e,t,r,n,s,a=!1){if(n===s)return this;if(!a&&s<=n?s+=la:a&&n<=s&&(n+=la),s-n===0)return this;const l=e+Math.cos(n)*r,c=t+Math.sin(n)*r,f=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const m=Math.abs(p[p.length-2]-l),g=Math.abs(p[p.length-1]-c);m<f&&g<f||p.push(l,c)}else this.moveTo(l,c),p=this.currentPath.points;return vp.arc(l,c,e,t,r,n,s,a,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Ot.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Ce.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Ot.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new jt(e,t,r,n))}drawRoundedRect(e,t,r,n,s){return this.drawShape(new Qu(e,t,r,n,s))}drawCircle(e,t,r){return this.drawShape(new Ju(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new cT(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const s=new is(t);return s.closeStroke=r,this.drawShape(s),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,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 e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===xe.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const s=e.batches[n],a=s.style.color,u=new Float32Array(this.vertexData.buffer,s.attribStart*4*2,s.attribSize*2),l=new Float32Array(e.uvsFloat32.buffer,s.attribStart*4*2,s.attribSize*2),c=new Uint16Array(e.indicesUint16.buffer,s.start*2,s.size),f={vertexData:u,blendMode:t,indices:c,uvs:l,_batchRGB:Ce.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:s.style.texture,alpha:s.style.alpha,worldAlpha:1};this.batches[n]=f}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,s=t.uniforms,a=r.drawCalls;s.translationMatrix=this.transform.worldTransform,Ce.shared.setValue(this._tintColor).premultiply(n).toArray(s.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let u=0,l=a.length;u<l;u++)this._renderDrawCallDirect(e,r.drawCalls[u])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:s,start:a}=t,u=r.count;for(let l=0;l<u;l++)e.texture.bind(r.elements[l],l);e.geometry.draw(n,s,a)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!Cl[r]){const{maxTextures:n}=e.plugins[r],s=new Int32Array(n);for(let l=0;l<n;l++)s[l]=l;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Pe,default:ar.from({uSamplers:s},!0)},u=e.plugins[r]._shader.program;Cl[r]=new as(u,a)}t=Cl[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:s}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,s)}containsPoint(e){return this.worldTransform.applyInverse(e,Fa._TEMP_POINT),this._geometry.containsPoint(Fa._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Ce.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,s=t.c,a=t.d,u=t.tx,l=t.ty,c=this._geometry.points,f=this.vertexData;let p=0;for(let m=0;m<c.length;m+=2){const g=c[m],x=c[m+1];f[p++]=r*g+s*x+u,f[p++]=a*x+n*g+l}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){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(e)}};let El=Fa;El.curves=gi,El._TEMP_POINT=new Wt;var QS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Il={},tA={get exports(){return Il},set exports(e){Il=e}};/*!
1924
1924
  * d-path-parser - v1.0.0
1925
1925
  * by Massimo Artizzu (MaxArt2501)
1926
1926
  *
@@ -1928,74 +1928,33 @@ void main() {
1928
1928
  *
1929
1929
  * Licensed under the MIT License
1930
1930
  * See LICENSE for details
1931
- */(function(e,t){(function(r,n){e.exports=n()})(n2,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},o={number:function(_){return+v("number",_)},"coordinate pair":function(_){var b=v("number",_);if(b===null&&!_)return null;v("comma");var m=v("number",!0);return{x:+b,y:+m}},"arc definition":function(_){var b=o["coordinate pair"](_);if(!b&&!_)return null;v("comma");var m=+v("number",!0);v("comma",!0);var w=!!+v("flag",!0);v("comma");var T=!!+v("flag",!0);v("comma");var x=o["coordinate pair"](!0);return{radii:b,rotation:m,large:w,clockwise:T,end:x}}},a=0,u=[];a<n.length;){var f=v("command"),h=f.toUpperCase(),d=f!==h,p;switch(h){case"M":p=y("coordinate pair").map(function(_,b){return b===1&&(f=d?"l":"L"),c({end:_})});break;case"L":case"T":p=y("coordinate pair").map(function(_){return c({end:_})});break;case"C":if(p=y("coordinate pair"),p.length%3)throw Error("Expected coordinate pair triplet at position "+a);p=p.reduce(function(_,b,m){var w=m%3;if(!w)_.push(c({cp1:b}));else{var T=_[_.length-1];T[w===1?"cp2":"end"]=b}return _},[]);break;case"Q":case"S":if(p=y("coordinate pair"),p.length&1)throw Error("Expected coordinate pair couple at position "+a);p=p.reduce(function(_,b,m){var w=m&1;if(!w)_.push(c({cp:b}));else{var T=_[_.length-1];T.end=b}return _},[]);break;case"H":case"V":p=y("number").map(function(_){return c({value:_})});break;case"A":p=y("arc definition").map(c);break;case"Z":p=[{code:"Z"}];break}u.push.apply(u,p)}return u;function c(_){return _.code=f,_.relative=d,_}function v(_,b){i[_].lastIndex=a;var m=i[_].exec(n);if(!m||m.index!==a){if(!b)return null;throw Error("Expected "+_+" at position "+a)}return a=i[_].lastIndex,m[1]}function y(_){for(var b=[],m,w=!0;m=o[_](w);)b.push(m),w=!!v("comma");return b}}})})(i2);const s2=/^\s+/,o2=/\s+$/;function Tt(e,t){if(e=e||"",t=t||{},e instanceof Tt)return e;if(!(this instanceof Tt))return new Tt(e,t);var r=a2(e);this._originalInput=e,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=t.format||r.format,this._gradientType=t.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}Tt.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 e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,i,o,a;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*o+.0722*a},setAlpha:function(e){return this._a=Ip(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ap(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ap(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=Sp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Sp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Op(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return c2(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},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(ce(this._r,255)*100)+"%",g:Math.round(ce(this._g,255)*100)+"%",b:Math.round(ce(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ce(this._r,255)*100)+"%, "+Math.round(ce(this._g,255)*100)+"%, "+Math.round(ce(this._b,255)*100)+"%)":"rgba("+Math.round(ce(this._r,255)*100)+"%, "+Math.round(ce(this._g,255)*100)+"%, "+Math.round(ce(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:T2[Op(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Cp(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=Tt(e);r="#"+Cp(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Tt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v2,arguments)},brighten:function(){return this._applyModification(g2,arguments)},darken:function(){return this._applyModification(m2,arguments)},desaturate:function(){return this._applyModification(h2,arguments)},saturate:function(){return this._applyModification(d2,arguments)},greyscale:function(){return this._applyModification(p2,arguments)},spin:function(){return this._applyModification(y2,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x2,arguments)},complement:function(){return this._applyCombination(_2,arguments)},monochromatic:function(){return this._applyCombination(w2,arguments)},splitcomplement:function(){return this._applyCombination(b2,arguments)},triad:function(){return this._applyCombination(Rp,[3])},tetrad:function(){return this._applyCombination(Rp,[4])}},Tt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=bs(e[n]));e=r}return Tt(e,t)};function a2(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,u=!1;return typeof e=="string"&&(e=O2(e)),typeof e=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=l2(e.r,e.g,e.b),a=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(n=bs(e.s),i=bs(e.v),t=f2(e.h,n,i),a=!0,u="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=bs(e.s),o=bs(e.l),t=u2(e.h,n,o),a=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Ip(r),{ok:a,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function l2(e,t,r){return{r:ce(e,255)*255,g:ce(t,255)*255,b:ce(r,255)*255}}function Sp(e,t,r){e=ce(e,255),t=ce(t,255),r=ce(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,a,u=(n+i)/2;if(n==i)o=a=0;else{var f=n-i;switch(a=u>.5?f/(2-n-i):f/(n+i),n){case e:o=(t-r)/f+(t<r?6:0);break;case t:o=(r-e)/f+2;break;case r:o=(e-t)/f+4;break}o/=6}return{h:o,s:a,l:u}}function u2(e,t,r){var n,i,o;e=ce(e,360),t=ce(t,100),r=ce(r,100);function a(h,d,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?h+(d-h)*6*p:p<1/2?d:p<2/3?h+(d-h)*(2/3-p)*6:h}if(t===0)n=i=o=r;else{var u=r<.5?r*(1+t):r+t-r*t,f=2*r-u;n=a(f,u,e+1/3),i=a(f,u,e),o=a(f,u,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function Ap(e,t,r){e=ce(e,255),t=ce(t,255),r=ce(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,a,u=n,f=n-i;if(a=n===0?0:f/n,n==i)o=0;else{switch(n){case e:o=(t-r)/f+(t<r?6:0);break;case t:o=(r-e)/f+2;break;case r:o=(e-t)/f+4;break}o/=6}return{h:o,s:a,v:u}}function f2(e,t,r){e=ce(e,360)*6,t=ce(t,100),r=ce(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),u=r*(1-(1-i)*t),f=n%6,h=[r,a,o,o,u,r][f],d=[u,r,r,a,o,o][f],p=[o,o,u,r,r,a][f];return{r:h*255,g:d*255,b:p*255}}function Op(e,t,r,n){var i=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function c2(e,t,r,n,i){var o=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16)),Ar(Pp(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Cp(e,t,r,n){var i=[Ar(Pp(n)),Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return i.join("")}Tt.equals=function(e,t){return!e||!t?!1:Tt(e).toRgbString()==Tt(t).toRgbString()},Tt.random=function(){return Tt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function h2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.s-=t/100,r.s=Go(r.s),Tt(r)}function d2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.s+=t/100,r.s=Go(r.s),Tt(r)}function p2(e){return Tt(e).desaturate(100)}function v2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.l+=t/100,r.l=Go(r.l),Tt(r)}function g2(e,t){t=t===0?0:t||10;var r=Tt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),Tt(r)}function m2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.l-=t/100,r.l=Go(r.l),Tt(r)}function y2(e,t){var r=Tt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,Tt(r)}function _2(e){var t=Tt(e).toHsl();return t.h=(t.h+180)%360,Tt(t)}function Rp(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Tt(e).toHsl(),n=[Tt(e)],i=360/t,o=1;o<t;o++)n.push(Tt({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function b2(e){var t=Tt(e).toHsl(),r=t.h;return[Tt(e),Tt({h:(r+72)%360,s:t.s,l:t.l}),Tt({h:(r+216)%360,s:t.s,l:t.l})]}function x2(e,t,r){t=t||6,r=r||30;var n=Tt(e).toHsl(),i=360/r,o=[Tt(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(Tt(n));return o}function w2(e,t){t=t||6;for(var r=Tt(e).toHsv(),n=r.h,i=r.s,o=r.v,a=[],u=1/t;t--;)a.push(Tt({h:n,s:i,v:o})),o=(o+u)%1;return a}Tt.mix=function(e,t,r){r=r===0?0:r||50;var n=Tt(e).toRgb(),i=Tt(t).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return Tt(a)},Tt.readability=function(e,t){var r=Tt(e),n=Tt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},Tt.isReadable=function(e,t,r){var n=Tt.readability(e,t),i,o;switch(o=!1,i=C2(r),i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o},Tt.mostReadable=function(e,t,r){var n=null,i=0,o,a,u,f;r=r||{},a=r.includeFallbackColors,u=r.level,f=r.size;for(var h=0;h<t.length;h++)o=Tt.readability(e,t[h]),o>i&&(i=o,n=Tt(t[h]));return Tt.isReadable(e,n,{level:u,size:f})||!a?n:(r.includeFallbackColors=!1,Tt.mostReadable(e,["#fff","#000"],r))};var ku=Tt.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"},T2=Tt.hexNames=E2(ku);function E2(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Ip(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ce(e,t){S2(e)&&(e="100%");var r=A2(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Go(e){return Math.min(1,Math.max(0,e))}function tr(e){return parseInt(e,16)}function S2(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function A2(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Ar(e){return e.length==1?"0"+e:""+e}function bs(e){return e<=1&&(e=e*100+"%"),e}function Pp(e){return Math.round(parseFloat(e)*255).toString(16)}function Np(e){return tr(e)/255}var Or=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),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 Kr(e){return!!Or.CSS_UNIT.exec(e)}function O2(e){e=e.replace(s2,"").replace(o2,"").toLowerCase();var t=!1;if(ku[e])e=ku[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Or.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Or.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Or.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Or.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Or.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Or.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Or.hex8.exec(e))?{r:tr(r[1]),g:tr(r[2]),b:tr(r[3]),a:Np(r[4]),format:t?"name":"hex8"}:(r=Or.hex6.exec(e))?{r:tr(r[1]),g:tr(r[2]),b:tr(r[3]),format:t?"name":"hex"}:(r=Or.hex4.exec(e))?{r:tr(r[1]+""+r[1]),g:tr(r[2]+""+r[2]),b:tr(r[3]+""+r[3]),a:Np(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Or.hex3.exec(e))?{r:tr(r[1]+""+r[1]),g:tr(r[2]+""+r[2]),b:tr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function C2(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var R2=function(){function e(t,r){var n=[],i=!0,o=!1,a=void 0;try{for(var u=t[Symbol.iterator](),f;!(i=(f=u.next()).done)&&(n.push(f.value),!(r&&n.length===r));i=!0);}catch(h){o=!0,a=h}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xs=Math.PI*2,Lu=function(t,r,n,i,o,a,u){var f=t.x,h=t.y;f*=r,h*=n;var d=i*f-o*h,p=o*f+i*h;return{x:d+a,y:p+u}},I2=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),o=Math.sin(t),a=Math.cos(t+r),u=Math.sin(t+r);return[{x:i-o*n,y:o+i*n},{x:a+u*n,y:u-a*n},{x:a,y:u}]},Mp=function(t,r,n,i){var o=t*i-r*n<0?-1:1,a=t*n+r*i;return a>1&&(a=1),a<-1&&(a=-1),o*Math.acos(a)},P2=function(t,r,n,i,o,a,u,f,h,d,p,c){var v=Math.pow(o,2),y=Math.pow(a,2),_=Math.pow(p,2),b=Math.pow(c,2),m=v*y-v*b-y*_;m<0&&(m=0),m/=v*b+y*_,m=Math.sqrt(m)*(u===f?-1:1);var w=m*o/a*c,T=m*-a/o*p,x=d*w-h*T+(t+n)/2,E=h*w+d*T+(r+i)/2,I=(p-w)/o,O=(c-T)/a,A=(-p-w)/o,L=(-c-T)/a,R=Mp(1,0,I,O),C=Mp(I,O,A,L);return f===0&&C>0&&(C-=xs),f===1&&C<0&&(C+=xs),[x,E,R,C]},kp=function(t){var r=t.px,n=t.py,i=t.cx,o=t.cy,a=t.rx,u=t.ry,f=t.xAxisRotation,h=f===void 0?0:f,d=t.largeArcFlag,p=d===void 0?0:d,c=t.sweepFlag,v=c===void 0?0:c,y=[];if(a===0||u===0)return[];var _=Math.sin(h*xs/360),b=Math.cos(h*xs/360),m=b*(r-i)/2+_*(n-o)/2,w=-_*(r-i)/2+b*(n-o)/2;if(m===0&&w===0)return[];a=Math.abs(a),u=Math.abs(u);var T=Math.pow(m,2)/Math.pow(a,2)+Math.pow(w,2)/Math.pow(u,2);T>1&&(a*=Math.sqrt(T),u*=Math.sqrt(T));var x=P2(r,n,i,o,a,u,p,v,_,b,m,w),E=R2(x,4),I=E[0],O=E[1],A=E[2],L=E[3],R=Math.abs(L)/(xs/4);Math.abs(1-R)<1e-7&&(R=1);var C=Math.max(Math.ceil(R),1);L/=C;for(var P=0;P<C;P++)y.push(I2(A,L)),A+=L;return y.map(function(M){var F=Lu(M[0],a,u,b,_,I,O),q=F.x,Z=F.y,z=Lu(M[1],a,u,b,_,I,O),nt=z.x,V=z.y,D=Lu(M[2],a,u,b,_,I,O),k=D.x,G=D.y;return{x1:q,y1:Z,x2:nt,y2:V,x:k,y:G}})};class N2 extends Nu{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const i=t[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:i}=Tt(t).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(t){let r="r",n="r";const i=t.nodeName==="elipse";i&&(r+="x",n+="y");const o=parseFloat(t.getAttribute(n)),a=parseFloat(t.getAttribute(r)),u=t.getAttribute("cx"),f=t.getAttribute("cy");let h=0,d=0;u!==null&&(h=parseFloat(u)),f!==null&&(d=parseFloat(f)),i?this.drawEllipse(h,d,o,a):this.drawCircle(h,d,o)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),o=parseFloat(t.getAttribute("height")),a=parseFloat(t.getAttribute("rx"));a?this.drawRoundedRect(r,n,i,o,a):this.drawRect(r,n,i,o)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),i={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(o=>{const[a,u]=o.split(":");if(a){const f=this._convertStyleName(a);i[f]||(i[f]=u.trim())}}),i}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:i,stroke:o,strokeOpacity:a,strokeWidth:u,cap:f,join:h,miterLimit:d}=this._svgStyle(t),c=u!==null?parseFloat(u):o!==null?1:0,v=o!==null?this._hexToUint(o):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:o===null&&u===null&&r?this.line.width:c,alpha:a===null?this.line.alpha:parseFloat(a),color:o===null&&r?this.line.color:v,cap:f===null&&r?this.line.cap:f,join:h===null&&r?this.line.join:h,miterLimit:d===null&&r?this.line.miterLimit:parseFloat(d)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,i=0;const o=Mu(r.trim());for(let a=0;a<o.length;a++){const u=o[a];switch(u.code){case"m":{this.moveTo(n+=u.end.x,i+=u.end.y);break}case"M":{this.moveTo(n=u.end.x,i=u.end.y);break}case"H":{this.lineTo(n=u.value,i);break}case"h":{this.lineTo(n+=u.value,i);break}case"V":{this.lineTo(n,i=u.value);break}case"v":{this.lineTo(n,i+=u.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=u.end.x,i=u.end.y);break}case"l":{this.lineTo(n+=u.end.x,i+=u.end.y);break}case"C":{this.bezierCurveTo(u.cp1.x,u.cp1.y,u.cp2.x,u.cp2.y,n=u.end.x,i=u.end.y);break}case"c":{const f=n,h=i;this.bezierCurveTo(f+u.cp1.x,h+u.cp1.y,f+u.cp2.x,h+u.cp2.y,n+=u.end.x,i+=u.end.y);break}case"s":case"q":{const f=n,h=i;this.quadraticCurveTo(f+u.cp.x,h+u.cp.y,n+=u.end.x,i+=u.end.y);break}case"S":case"Q":{this.quadraticCurveTo(u.cp.x,u.cp.y,n=u.end.x,i=u.end.y);break}case"a":{kp({px:n,py:i,cx:n+=u.end.x,cy:i+=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:d,y2:p,x:c,y:v})=>this.bezierCurveTo(f,h,d,p,c,v));break}case"A":{kp({px:n,py:i,cx:n=u.end.x,cy:i=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:d,y2:p,x:c,y:v})=>this.bezierCurveTo(f,h,d,p,c,v));break}default:{console.info("[PIXI.SVG] Draw command not supported:",u.code,u);break}}}}}var jo={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},M2=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function k2(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&M2.indexOf(e)>=0}function L2(e){switch(e|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 F2(e){return(e|32)===97}function Ri(e){return e>=48&&e<=57}function B2(e){return e>=48&&e<=57||e===43||e===45||e===46}function D2(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function qo(e){for(;e.index<e.max&&k2(e.path.charCodeAt(e.index));)e.index++}function U2(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function $2(e){var t=e.index,r=t,n=e.max,i=!1,o=!1,a=!1,u=!1,f;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(f=e.path.charCodeAt(r),(f===43||f===45)&&(r++,f=r<n?e.path.charCodeAt(r):0),!Ri(f)&&f!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(f!==46){if(i=f===48,r++,f=r<n?e.path.charCodeAt(r):0,i&&r<n&&f&&Ri(f)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Ri(e.path.charCodeAt(r));)r++,o=!0;f=r<n?e.path.charCodeAt(r):0}if(f===46){for(u=!0,r++;Ri(e.path.charCodeAt(r));)r++,a=!0;f=r<n?e.path.charCodeAt(r):0}if(f===101||f===69){if(u&&!o&&!a){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,f=r<n?e.path.charCodeAt(r):0,(f===43||f===45)&&r++,r<n&&Ri(e.path.charCodeAt(r)))for(;r<n&&Ri(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function Fu(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=jo[r]&&(e.result.push([t].concat(n.splice(0,jo[r]))),!!jo[r]););}function G2(e){var t=e.max,r,n,i,o,a;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=F2(r),!L2(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(o=jo[e.path[e.index].toLowerCase()],e.index++,qo(e),e.data=[],!o){Fu(e);return}for(i=!1;;){for(a=o;a>0;a--){if(n&&(a===3||a===4)?U2(e):$2(e),e.err.length){Fu(e);return}e.data.push(e.param),qo(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,qo(e),i=!0)}if(!i&&(e.index>=e.max||!B2(e.path.charCodeAt(e.index))))break}Fu(e)}var j2=function(t){var r=new D2(t),n=r.max;for(qo(r);r.index<n&&!r.err.length;)G2(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 q2(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function Cr(){if(!(this instanceof Cr))return new Cr;this.queue=[],this.cache=null}Cr.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},Cr.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},Cr.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},Cr.prototype.rotate=function(e,t,r){var n,i,o;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,i=Math.cos(n),o=Math.sin(n),this.queue.push([i,o,-o,i,0,0]),this.cache=null,this.translate(-t,-r)),this},Cr.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},Cr.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},Cr.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 e=1;e<this.queue.length;e++)this.cache=q2(this.cache,this.queue[e]);return this.cache},Cr.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var Lp=Cr,z2=Lp,H2={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},V2=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,W2=/[\s,]+/,X2=function(t){var r=new z2,n,i;return t.split(V2).forEach(function(o){if(o.length){if(typeof H2[o]<"u"){n=o;return}switch(i=o.split(W2).map(function(a){return+a||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},ws=Math.PI*2;function Fp(e,t,r,n){var i=e*n-t*r<0?-1:1,o=e*r+t*n;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)}function K2(e,t,r,n,i,o,a,u,f,h){var d=h*(e-r)/2+f*(t-n)/2,p=-f*(e-r)/2+h*(t-n)/2,c=a*a,v=u*u,y=d*d,_=p*p,b=c*v-c*_-v*y;b<0&&(b=0),b/=c*_+v*y,b=Math.sqrt(b)*(i===o?-1:1);var m=b*a/u*p,w=b*-u/a*d,T=h*m-f*w+(e+r)/2,x=f*m+h*w+(t+n)/2,E=(d-m)/a,I=(p-w)/u,O=(-d-m)/a,A=(-p-w)/u,L=Fp(1,0,E,I),R=Fp(E,I,O,A);return o===0&&R>0&&(R-=ws),o===1&&R<0&&(R+=ws),[T,x,L,R]}function Y2(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),a=Math.sin(e+t);return[n,i,n-i*r,i+n*r,o+a*r,a-o*r,o,a]}var Z2=function(t,r,n,i,o,a,u,f,h){var d=Math.sin(h*ws/360),p=Math.cos(h*ws/360),c=p*(t-n)/2+d*(r-i)/2,v=-d*(t-n)/2+p*(r-i)/2;if(c===0&&v===0)return[];if(u===0||f===0)return[];u=Math.abs(u),f=Math.abs(f);var y=c*c/(u*u)+v*v/(f*f);y>1&&(u*=Math.sqrt(y),f*=Math.sqrt(y));var _=K2(t,r,n,i,o,a,u,f,d,p),b=[],m=_[2],w=_[3],T=Math.max(Math.ceil(Math.abs(w)/(ws/4)),1);w/=T;for(var x=0;x<T;x++)b.push(Y2(m,w)),m+=w;return b.map(function(E){for(var I=0;I<E.length;I+=2){var O=E[I+0],A=E[I+1];O*=u,A*=f;var L=p*O-d*A,R=d*O+p*A;E[I+0]=L+_[0],E[I+1]=R+_[1]}return E})},Ts=1e-10,Bp=Math.PI/180;function Es(e,t,r){if(!(this instanceof Es))return new Es(e,t,r);this.rx=e,this.ry=t,this.ax=r}Es.prototype.transform=function(e){var t=Math.cos(this.ax*Bp),r=Math.sin(this.ax*Bp),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],i=n[0]*n[0]+n[2]*n[2],o=n[1]*n[1]+n[3]*n[3],a=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),u=(i+o)/2;if(a<Ts*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];a=Math.sqrt(a);var h=u+a/2,d=u-a/2;return this.ax=Math.abs(f)<Ts&&Math.abs(h-o)<Ts?90:Math.atan(Math.abs(f)>Math.abs(h-o)?(h-i)/f:f/(h-o))*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},Es.prototype.isDegenerate=function(){return this.rx<Ts*this.ry||this.ry<Ts*this.rx};var Q2=Es,J2=j2,tS=X2,pn=Lp,eS=Z2,rS=Q2;function ge(e){if(!(this instanceof ge))return new ge(e);var t=J2(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ge.from=function(e){if(typeof e=="string")return new ge(e);if(e instanceof ge){var t=new ge("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return pn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},ge.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,o,a){var u,f,h,d;switch(n[0]){case"v":u=e.calc(0,n[1],!0),f=u[0]===0?["v",u[1]]:["l",u[0],u[1]];break;case"V":u=e.calc(o,n[1],!1),f=u[0]===e.calc(o,a,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":u=e.calc(n[1],0,!0),f=u[1]===0?["h",u[0]]:["l",u[0],u[1]];break;case"H":u=e.calc(n[1],a,!1),f=u[1]===e.calc(o,a,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var p=e.toArray(),c=rS(n[1],n[2],n[3]).transform(p);if(p[0]*p[3]-p[1]*p[2]<0&&(n[5]=n[5]?"0":"1"),u=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===o&&n[7]===a||n[0]==="a"&&n[6]===0&&n[7]===0){f=[n[0]==="a"?"l":"L",u[0],u[1]];break}c.isDegenerate()?f=[n[0]==="a"?"l":"L",u[0],u[1]]:f=[n[0],c.rx,c.ry,c.ax,n[4],n[5],u[0],u[1]];break;case"m":d=i>0,u=e.calc(n[1],n[2],d),f=["m",u[0],u[1]];break;default:for(h=n[0],f=[h],d=h.toLowerCase()===h,r=1;r<n.length;r+=2)u=e.calc(n[r],n[r+1],d),f.push(u[0],u[1])}t.segments[i]=f},!0)},ge.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=pn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},ge.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var o=this.segments[n],a=o[0];a!==t||a==="m"||a==="M"?(a==="m"&&t==="z"&&(e+=" "),e+=a,r=!1):r=!0;for(var u=1;u<o.length;u++){var f=o[u];u===1?r&&f>=0&&(e+=" "):f>=0&&(e+=" "),e+=f}t=a}return e},ge.prototype.translate=function(e,t){return this.__stack.push(pn().translate(e,t||0)),this},ge.prototype.scale=function(e,t){return this.__stack.push(pn().scale(e,!t&&t!==0?e:t)),this},ge.prototype.rotate=function(e,t,r){return this.__stack.push(pn().rotate(e,t||0,r||0)),this},ge.prototype.skewX=function(e){return this.__stack.push(pn().skewX(e)),this},ge.prototype.skewY=function(e){return this.__stack.push(pn().skewY(e)),this},ge.prototype.matrix=function(e){return this.__stack.push(pn().matrix(e)),this},ge.prototype.transform=function(e){return e.trim()?(this.__stack.push(tS(e)),this):this},ge.prototype.round=function(e){var t=0,r=0,n=0,i=0,o;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(a){var u=a[0].toLowerCase()===a[0];switch(a[0]){case"H":case"h":u&&(a[1]+=n),n=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"V":case"v":u&&(a[1]+=i),i=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":u&&(a[1]+=n,a[2]+=i),n=a[1]-a[1].toFixed(e),i=a[2]-a[2].toFixed(e),t=n,r=i,a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e);return;case"A":case"a":u&&(a[6]+=n,a[7]+=i),n=a[6]-a[6].toFixed(e),i=a[7]-a[7].toFixed(e),a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e),a[3]=+a[3].toFixed(e+2),a[6]=+a[6].toFixed(e),a[7]=+a[7].toFixed(e);return;default:o=a.length,u&&(a[o-2]+=n,a[o-1]+=i),n=a[o-2]-a[o-2].toFixed(e),i=a[o-1]-a[o-1].toFixed(e),a.forEach(function(f,h){h&&(a[h]=+a[h].toFixed(e))});return}}),this},ge.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,o=0,a=0,u=0,f=0,h,d,p;if(t||this.__evaluateStack(),r.forEach(function(c,v){var y=e(c,v,o,a);Array.isArray(y)&&(n[v]=y,i=!0);var _=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":o=c[1]+(_?o:0),a=c[2]+(_?a:0),u=o,f=a;return;case"h":case"H":o=c[1]+(_?o:0);return;case"v":case"V":a=c[1]+(_?a:0);return;case"z":case"Z":o=u,a=f;return;default:o=c[c.length-2]+(_?o:0),a=c[c.length-1]+(_?a:0)}}),!i)return this;for(p=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(d=0;d<n[h].length;d++)p.push(n[h][d]);else p.push(r[h]);return this.segments=p,this},ge.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toUpperCase(),a;if(i!==o)switch(e[0]=o,i){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(a=1;a<e.length;a++)e[a]+=a%2?r:n}},!0),this},ge.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toLowerCase(),a;if(i!==o&&!(t===0&&i==="M"))switch(e[0]=o,i){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(a=1;a<e.length;a++)e[a]-=a%2?r:n}},!0),this},ge.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,o,a,u=[],f=e[0];return f!=="A"&&f!=="a"?null:(f==="a"?(o=r+e[6],a=n+e[7]):(o=e[6],a=e[7]),i=eS(r,n,o,a,e[4],e[5],e[1],e[2],e[3]),i.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(i.forEach(function(h){u.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}),u))}),this},ge.prototype.unshort=function(){var e=this.segments,t,r,n,i,o;return this.iterate(function(a,u,f,h){var d=a[0],p=d.toUpperCase(),c;u&&(p==="T"?(c=d==="t",n=e[u-1],n[0]==="Q"?(t=n[1]-f,r=n[2]-h):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),i=-t,o=-r,c||(i+=f,o+=h),e[u]=[c?"q":"Q",i,o,a[1],a[2]]):p==="S"&&(c=d==="s",n=e[u-1],n[0]==="C"?(t=n[3]-f,r=n[4]-h):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),i=-t,o=-r,c||(i+=f,o+=h),e[u]=[c?"c":"C",i,o,a[1],a[2],a[3],a[4]]))}),this};var nS=ge,iS=nS;const sS=En(iS),oS=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(null),i=mt.useRef(null),o=mt.useRef(null),a=mt.useRef(null),{path:u,visible:f,transformation:{x:h,y:d,width:p,height:c,anchor:v,hexColor:y,fill:_,stroke:b="none",strokeWidth:m=0,colorCorrection:w={}},pointerdown:T,pointerup:x}=e,E=le.useApp(),{temperatureFilter:I,sharpnessFilter:O,hueFilter:A,blurFilter:L,adjustmentFilter:R}=_s(w),{blurRadius:C=0}=w;return Et.useEffect(()=>{const P=sS(u).scale(5).translate(0,0).toString(),M=`<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${c}">
1932
- <path stroke="${b}" stroke-width="${m}" fill="${y||_}" d="${P}">
1931
+ */(function(e,t){(function(r,n){e.exports=n()})(QS,function(){return function(n){for(var s={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},a={number:function(S){return+x("number",S)},"coordinate pair":function(S){var T=x("number",S);if(T===null&&!S)return null;x("comma");var w=x("number",!0);return{x:+T,y:+w}},"arc definition":function(S){var T=a["coordinate pair"](S);if(!T&&!S)return null;x("comma");var w=+x("number",!0);x("comma",!0);var I=!!+x("flag",!0);x("comma");var A=!!+x("flag",!0);x("comma");var R=a["coordinate pair"](!0);return{radii:T,rotation:w,large:I,clockwise:A,end:R}}},u=0,l=[];u<n.length;){var c=x("command"),f=c.toUpperCase(),p=c!==f,m;switch(f){case"M":m=y("coordinate pair").map(function(S,T){return T===1&&(c=p?"l":"L"),g({end:S})});break;case"L":case"T":m=y("coordinate pair").map(function(S){return g({end:S})});break;case"C":if(m=y("coordinate pair"),m.length%3)throw Error("Expected coordinate pair triplet at position "+u);m=m.reduce(function(S,T,w){var I=w%3;if(!I)S.push(g({cp1:T}));else{var A=S[S.length-1];A[I===1?"cp2":"end"]=T}return S},[]);break;case"Q":case"S":if(m=y("coordinate pair"),m.length&1)throw Error("Expected coordinate pair couple at position "+u);m=m.reduce(function(S,T,w){var I=w&1;if(!I)S.push(g({cp:T}));else{var A=S[S.length-1];A.end=T}return S},[]);break;case"H":case"V":m=y("number").map(function(S){return g({value:S})});break;case"A":m=y("arc definition").map(g);break;case"Z":m=[{code:"Z"}];break}l.push.apply(l,m)}return l;function g(S){return S.code=c,S.relative=p,S}function x(S,T){s[S].lastIndex=u;var w=s[S].exec(n);if(!w||w.index!==u){if(!T)return null;throw Error("Expected "+S+" at position "+u)}return u=s[S].lastIndex,w[1]}function y(S){for(var T=[],w,I=!0;w=a[S](I);)T.push(w),I=!!x("comma");return T}}})})(tA);const eA=/^\s+/,rA=/\s+$/;function nt(e,t){if(e=e||"",t=t||{},e instanceof nt)return e;if(!(this instanceof nt))return new nt(e,t);var r=nA(e);this._originalInput=e,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=t.format||r.format,this._gradientType=t.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}nt.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 e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,s,a,u;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?s=t/12.92:s=Math.pow((t+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?u=n/12.92:u=Math.pow((n+.055)/1.055,2.4),.2126*s+.7152*a+.0722*u},setAlpha:function(e){return this._a=Ip(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Sp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Sp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=wp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=wp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Ap(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return oA(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},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(te(this._r,255)*100)+"%",g:Math.round(te(this._g,255)*100)+"%",b:Math.round(te(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%)":"rgba("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:_A[Ap(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Cp(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var s=nt(e);r="#"+Cp(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,s=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return nt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(cA,arguments)},brighten:function(){return this._applyModification(fA,arguments)},darken:function(){return this._applyModification(dA,arguments)},desaturate:function(){return this._applyModification(uA,arguments)},saturate:function(){return this._applyModification(lA,arguments)},greyscale:function(){return this._applyModification(hA,arguments)},spin:function(){return this._applyModification(pA,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(vA,arguments)},complement:function(){return this._applyCombination(gA,arguments)},monochromatic:function(){return this._applyCombination(yA,arguments)},splitcomplement:function(){return this._applyCombination(mA,arguments)},triad:function(){return this._applyCombination(Ep,[3])},tetrad:function(){return this._applyCombination(Ep,[4])}},nt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=fs(e[n]));e=r}return nt(e,t)};function nA(e){var t={r:0,g:0,b:0},r=1,n=null,s=null,a=null,u=!1,l=!1;return typeof e=="string"&&(e=wA(e)),typeof e=="object"&&(Dr(e.r)&&Dr(e.g)&&Dr(e.b)?(t=iA(e.r,e.g,e.b),u=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Dr(e.h)&&Dr(e.s)&&Dr(e.v)?(n=fs(e.s),s=fs(e.v),t=aA(e.h,n,s),u=!0,l="hsv"):Dr(e.h)&&Dr(e.s)&&Dr(e.l)&&(n=fs(e.s),a=fs(e.l),t=sA(e.h,n,a),u=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Ip(r),{ok:u,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function iA(e,t,r){return{r:te(e,255)*255,g:te(t,255)*255,b:te(r,255)*255}}function wp(e,t,r){e=te(e,255),t=te(t,255),r=te(r,255);var n=Math.max(e,t,r),s=Math.min(e,t,r),a,u,l=(n+s)/2;if(n==s)a=u=0;else{var c=n-s;switch(u=l>.5?c/(2-n-s):c/(n+s),n){case e:a=(t-r)/c+(t<r?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4;break}a/=6}return{h:a,s:u,l}}function sA(e,t,r){var n,s,a;e=te(e,360),t=te(t,100),r=te(r,100);function u(f,p,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?f+(p-f)*6*m:m<1/2?p:m<2/3?f+(p-f)*(2/3-m)*6:f}if(t===0)n=s=a=r;else{var l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;n=u(c,l,e+1/3),s=u(c,l,e),a=u(c,l,e-1/3)}return{r:n*255,g:s*255,b:a*255}}function Sp(e,t,r){e=te(e,255),t=te(t,255),r=te(r,255);var n=Math.max(e,t,r),s=Math.min(e,t,r),a,u,l=n,c=n-s;if(u=n===0?0:c/n,n==s)a=0;else{switch(n){case e:a=(t-r)/c+(t<r?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4;break}a/=6}return{h:a,s:u,v:l}}function aA(e,t,r){e=te(e,360)*6,t=te(t,100),r=te(r,100);var n=Math.floor(e),s=e-n,a=r*(1-t),u=r*(1-s*t),l=r*(1-(1-s)*t),c=n%6,f=[r,u,a,a,l,r][c],p=[l,r,r,u,a,a][c],m=[a,a,l,r,r,u][c];return{r:f*255,g:p*255,b:m*255}}function Ap(e,t,r,n){var s=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16))];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[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function oA(e,t,r,n,s){var a=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16)),fr(Rp(n))];return s&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Cp(e,t,r,n){var s=[fr(Rp(n)),fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16))];return s.join("")}nt.equals=function(e,t){return!e||!t?!1:nt(e).toRgbString()==nt(t).toRgbString()},nt.random=function(){return nt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function uA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.s-=t/100,r.s=Na(r.s),nt(r)}function lA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.s+=t/100,r.s=Na(r.s),nt(r)}function hA(e){return nt(e).desaturate(100)}function cA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.l+=t/100,r.l=Na(r.l),nt(r)}function fA(e,t){t=t===0?0:t||10;var r=nt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),nt(r)}function dA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.l-=t/100,r.l=Na(r.l),nt(r)}function pA(e,t){var r=nt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,nt(r)}function gA(e){var t=nt(e).toHsl();return t.h=(t.h+180)%360,nt(t)}function Ep(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=nt(e).toHsl(),n=[nt(e)],s=360/t,a=1;a<t;a++)n.push(nt({h:(r.h+a*s)%360,s:r.s,l:r.l}));return n}function mA(e){var t=nt(e).toHsl(),r=t.h;return[nt(e),nt({h:(r+72)%360,s:t.s,l:t.l}),nt({h:(r+216)%360,s:t.s,l:t.l})]}function vA(e,t,r){t=t||6,r=r||30;var n=nt(e).toHsl(),s=360/r,a=[nt(e)];for(n.h=(n.h-(s*t>>1)+720)%360;--t;)n.h=(n.h+s)%360,a.push(nt(n));return a}function yA(e,t){t=t||6;for(var r=nt(e).toHsv(),n=r.h,s=r.s,a=r.v,u=[],l=1/t;t--;)u.push(nt({h:n,s,v:a})),a=(a+l)%1;return u}nt.mix=function(e,t,r){r=r===0?0:r||50;var n=nt(e).toRgb(),s=nt(t).toRgb(),a=r/100,u={r:(s.r-n.r)*a+n.r,g:(s.g-n.g)*a+n.g,b:(s.b-n.b)*a+n.b,a:(s.a-n.a)*a+n.a};return nt(u)},nt.readability=function(e,t){var r=nt(e),n=nt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},nt.isReadable=function(e,t,r){var n=nt.readability(e,t),s,a;switch(a=!1,s=SA(r),s.level+s.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a},nt.mostReadable=function(e,t,r){var n=null,s=0,a,u,l,c;r=r||{},u=r.includeFallbackColors,l=r.level,c=r.size;for(var f=0;f<t.length;f++)a=nt.readability(e,t[f]),a>s&&(s=a,n=nt(t[f]));return nt.isReadable(e,n,{level:l,size:c})||!u?n:(r.includeFallbackColors=!1,nt.mostReadable(e,["#fff","#000"],r))};var Rl=nt.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"},_A=nt.hexNames=xA(Rl);function xA(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Ip(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function te(e,t){bA(e)&&(e="100%");var r=TA(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Na(e){return Math.min(1,Math.max(0,e))}function $e(e){return parseInt(e,16)}function bA(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function TA(e){return typeof e=="string"&&e.indexOf("%")!=-1}function fr(e){return e.length==1?"0"+e:""+e}function fs(e){return e<=1&&(e=e*100+"%"),e}function Rp(e){return Math.round(parseFloat(e)*255).toString(16)}function Pp(e){return $e(e)/255}var dr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",s="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+s),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 Dr(e){return!!dr.CSS_UNIT.exec(e)}function wA(e){e=e.replace(eA,"").replace(rA,"").toLowerCase();var t=!1;if(Rl[e])e=Rl[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=dr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=dr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=dr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=dr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=dr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=dr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=dr.hex8.exec(e))?{r:$e(r[1]),g:$e(r[2]),b:$e(r[3]),a:Pp(r[4]),format:t?"name":"hex8"}:(r=dr.hex6.exec(e))?{r:$e(r[1]),g:$e(r[2]),b:$e(r[3]),format:t?"name":"hex"}:(r=dr.hex4.exec(e))?{r:$e(r[1]+""+r[1]),g:$e(r[2]+""+r[2]),b:$e(r[3]+""+r[3]),a:Pp(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=dr.hex3.exec(e))?{r:$e(r[1]+""+r[1]),g:$e(r[2]+""+r[2]),b:$e(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function SA(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var AA=function(){function e(t,r){var n=[],s=!0,a=!1,u=void 0;try{for(var l=t[Symbol.iterator](),c;!(s=(c=l.next()).done)&&(n.push(c.value),!(r&&n.length===r));s=!0);}catch(f){a=!0,u=f}finally{try{!s&&l.return&&l.return()}finally{if(a)throw u}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ds=Math.PI*2,Pl=function(t,r,n,s,a,u,l){var c=t.x,f=t.y;c*=r,f*=n;var p=s*c-a*f,m=a*c+s*f;return{x:p+u,y:m+l}},CA=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),s=Math.cos(t),a=Math.sin(t),u=Math.cos(t+r),l=Math.sin(t+r);return[{x:s-a*n,y:a+s*n},{x:u+l*n,y:l-u*n},{x:u,y:l}]},Mp=function(t,r,n,s){var a=t*s-r*n<0?-1:1,u=t*n+r*s;return u>1&&(u=1),u<-1&&(u=-1),a*Math.acos(u)},EA=function(t,r,n,s,a,u,l,c,f,p,m,g){var x=Math.pow(a,2),y=Math.pow(u,2),S=Math.pow(m,2),T=Math.pow(g,2),w=x*y-x*T-y*S;w<0&&(w=0),w/=x*T+y*S,w=Math.sqrt(w)*(l===c?-1:1);var I=w*a/u*g,A=w*-u/a*m,R=p*I-f*A+(t+n)/2,N=f*I+p*A+(r+s)/2,B=(m-I)/a,L=(g-A)/u,O=(-m-I)/a,z=(-g-A)/u,X=Mp(1,0,B,L),tt=Mp(B,L,O,z);return c===0&&tt>0&&(tt-=ds),c===1&&tt<0&&(tt+=ds),[R,N,X,tt]},Op=function(t){var r=t.px,n=t.py,s=t.cx,a=t.cy,u=t.rx,l=t.ry,c=t.xAxisRotation,f=c===void 0?0:c,p=t.largeArcFlag,m=p===void 0?0:p,g=t.sweepFlag,x=g===void 0?0:g,y=[];if(u===0||l===0)return[];var S=Math.sin(f*ds/360),T=Math.cos(f*ds/360),w=T*(r-s)/2+S*(n-a)/2,I=-S*(r-s)/2+T*(n-a)/2;if(w===0&&I===0)return[];u=Math.abs(u),l=Math.abs(l);var A=Math.pow(w,2)/Math.pow(u,2)+Math.pow(I,2)/Math.pow(l,2);A>1&&(u*=Math.sqrt(A),l*=Math.sqrt(A));var R=EA(r,n,s,a,u,l,m,x,S,T,w,I),N=AA(R,4),B=N[0],L=N[1],O=N[2],z=N[3],X=Math.abs(z)/(ds/4);Math.abs(1-X)<1e-7&&(X=1);var tt=Math.max(Math.ceil(X),1);z/=tt;for(var it=0;it<tt;it++)y.push(CA(O,z)),O+=z;return y.map(function(V){var j=Pl(V[0],u,l,T,S,B,L),xt=j.x,kt=j.y,G=Pl(V[1],u,l,T,S,B,L),rt=G.x,gt=G.y,H=Pl(V[2],u,l,T,S,B,L),K=H.x,ct=H.y;return{x1:xt,y1:kt,x2:rt,y2:gt,x:K,y:ct}})};class IA extends El{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const s=t[n];switch(this._svgFill(s,r),s.nodeName.toLowerCase()){case"path":{this._svgPath(s);break}case"circle":case"ellipse":{this._svgCircle(s);break}case"rect":{this._svgRect(s);break}case"polygon":{this._svgPoly(s,!0);break}case"polyline":{this._svgPoly(s);break}case"g":break;default:{console.info(`[PIXI.SVG] <${s.nodeName}> elements unsupported`);break}}this._svgChildren(s.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:s}=nt(t).toRgb();return(r<<16)+(n<<8)+s}_svgCircle(t){let r="r",n="r";const s=t.nodeName==="elipse";s&&(r+="x",n+="y");const a=parseFloat(t.getAttribute(n)),u=parseFloat(t.getAttribute(r)),l=t.getAttribute("cx"),c=t.getAttribute("cy");let f=0,p=0;l!==null&&(f=parseFloat(l)),c!==null&&(p=parseFloat(c)),s?this.drawEllipse(f,p,a,u):this.drawCircle(f,p,a)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),s=parseFloat(t.getAttribute("width")),a=parseFloat(t.getAttribute("height")),u=parseFloat(t.getAttribute("rx"));u?this.drawRoundedRect(r,n,s,a,u):this.drawRect(r,n,s,a)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),s={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(a=>{const[u,l]=a.split(":");if(u){const c=this._convertStyleName(u);s[c]||(s[c]=l.trim())}}),s}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(s=>parseInt(s,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:s,stroke:a,strokeOpacity:u,strokeWidth:l,cap:c,join:f,miterLimit:p}=this._svgStyle(t),g=l!==null?parseFloat(l):a!==null?1:0,x=a!==null?this._hexToUint(a):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),s!==null?parseFloat(s):1):r||this.beginFill(0),this.lineStyle({width:a===null&&l===null&&r?this.line.width:g,alpha:u===null?this.line.alpha:parseFloat(u),color:a===null&&r?this.line.color:x,cap:c===null&&r?this.line.cap:c,join:f===null&&r?this.line.join:f,miterLimit:p===null&&r?this.line.miterLimit:parseFloat(p)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,s=0;const a=Il(r.trim());for(let u=0;u<a.length;u++){const l=a[u];switch(l.code){case"m":{this.moveTo(n+=l.end.x,s+=l.end.y);break}case"M":{this.moveTo(n=l.end.x,s=l.end.y);break}case"H":{this.lineTo(n=l.value,s);break}case"h":{this.lineTo(n+=l.value,s);break}case"V":{this.lineTo(n,s=l.value);break}case"v":{this.lineTo(n,s+=l.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=l.end.x,s=l.end.y);break}case"l":{this.lineTo(n+=l.end.x,s+=l.end.y);break}case"C":{this.bezierCurveTo(l.cp1.x,l.cp1.y,l.cp2.x,l.cp2.y,n=l.end.x,s=l.end.y);break}case"c":{const c=n,f=s;this.bezierCurveTo(c+l.cp1.x,f+l.cp1.y,c+l.cp2.x,f+l.cp2.y,n+=l.end.x,s+=l.end.y);break}case"s":case"q":{const c=n,f=s;this.quadraticCurveTo(c+l.cp.x,f+l.cp.y,n+=l.end.x,s+=l.end.y);break}case"S":case"Q":{this.quadraticCurveTo(l.cp.x,l.cp.y,n=l.end.x,s=l.end.y);break}case"a":{Op({px:n,py:s,cx:n+=l.end.x,cy:s+=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:c,y1:f,x2:p,y2:m,x:g,y:x})=>this.bezierCurveTo(c,f,p,m,g,x));break}case"A":{Op({px:n,py:s,cx:n=l.end.x,cy:s=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:c,y1:f,x2:p,y2:m,x:g,y:x})=>this.bezierCurveTo(c,f,p,m,g,x));break}default:{console.info("[PIXI.SVG] Draw command not supported:",l.code,l);break}}}}}var La={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},RA=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function PA(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&RA.indexOf(e)>=0}function MA(e){switch(e|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 OA(e){return(e|32)===97}function _i(e){return e>=48&&e<=57}function FA(e){return e>=48&&e<=57||e===43||e===45||e===46}function NA(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function ka(e){for(;e.index<e.max&&PA(e.path.charCodeAt(e.index));)e.index++}function LA(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function kA(e){var t=e.index,r=t,n=e.max,s=!1,a=!1,u=!1,l=!1,c;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(c=e.path.charCodeAt(r),(c===43||c===45)&&(r++,c=r<n?e.path.charCodeAt(r):0),!_i(c)&&c!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(c!==46){if(s=c===48,r++,c=r<n?e.path.charCodeAt(r):0,s&&r<n&&c&&_i(c)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&_i(e.path.charCodeAt(r));)r++,a=!0;c=r<n?e.path.charCodeAt(r):0}if(c===46){for(l=!0,r++;_i(e.path.charCodeAt(r));)r++,u=!0;c=r<n?e.path.charCodeAt(r):0}if(c===101||c===69){if(l&&!a&&!u){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,c=r<n?e.path.charCodeAt(r):0,(c===43||c===45)&&r++,r<n&&_i(e.path.charCodeAt(r)))for(;r<n&&_i(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function Ml(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=La[r]&&(e.result.push([t].concat(n.splice(0,La[r]))),!!La[r]););}function BA(e){var t=e.max,r,n,s,a,u;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=OA(r),!MA(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(a=La[e.path[e.index].toLowerCase()],e.index++,ka(e),e.data=[],!a){Ml(e);return}for(s=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?LA(e):kA(e),e.err.length){Ml(e);return}e.data.push(e.param),ka(e),s=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,ka(e),s=!0)}if(!s&&(e.index>=e.max||!FA(e.path.charCodeAt(e.index))))break}Ml(e)}var DA=function(t){var r=new NA(t),n=r.max;for(ka(r);r.index<n&&!r.err.length;)BA(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 UA(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function pr(){if(!(this instanceof pr))return new pr;this.queue=[],this.cache=null}pr.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},pr.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},pr.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},pr.prototype.rotate=function(e,t,r){var n,s,a;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,s=Math.cos(n),a=Math.sin(n),this.queue.push([s,a,-a,s,0,0]),this.cache=null,this.translate(-t,-r)),this},pr.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},pr.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},pr.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 e=1;e<this.queue.length;e++)this.cache=UA(this.cache,this.queue[e]);return this.cache},pr.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var Fp=pr,$A=Fp,GA={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},zA=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,HA=/[\s,]+/,VA=function(t){var r=new $A,n,s;return t.split(zA).forEach(function(a){if(a.length){if(typeof GA[a]<"u"){n=a;return}switch(s=a.split(HA).map(function(u){return+u||0}),n){case"matrix":s.length===6&&r.matrix(s);return;case"scale":s.length===1?r.scale(s[0],s[0]):s.length===2&&r.scale(s[0],s[1]);return;case"rotate":s.length===1?r.rotate(s[0],0,0):s.length===3&&r.rotate(s[0],s[1],s[2]);return;case"translate":s.length===1?r.translate(s[0],0):s.length===2&&r.translate(s[0],s[1]);return;case"skewX":s.length===1&&r.skewX(s[0]);return;case"skewY":s.length===1&&r.skewY(s[0]);return}}}),r},ps=Math.PI*2;function Np(e,t,r,n){var s=e*n-t*r<0?-1:1,a=e*r+t*n;return a>1&&(a=1),a<-1&&(a=-1),s*Math.acos(a)}function jA(e,t,r,n,s,a,u,l,c,f){var p=f*(e-r)/2+c*(t-n)/2,m=-c*(e-r)/2+f*(t-n)/2,g=u*u,x=l*l,y=p*p,S=m*m,T=g*x-g*S-x*y;T<0&&(T=0),T/=g*S+x*y,T=Math.sqrt(T)*(s===a?-1:1);var w=T*u/l*m,I=T*-l/u*p,A=f*w-c*I+(e+r)/2,R=c*w+f*I+(t+n)/2,N=(p-w)/u,B=(m-I)/l,L=(-p-w)/u,O=(-m-I)/l,z=Np(1,0,N,B),X=Np(N,B,L,O);return a===0&&X>0&&(X-=ps),a===1&&X<0&&(X+=ps),[A,R,z,X]}function XA(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),s=Math.sin(e),a=Math.cos(e+t),u=Math.sin(e+t);return[n,s,n-s*r,s+n*r,a+u*r,u-a*r,a,u]}var WA=function(t,r,n,s,a,u,l,c,f){var p=Math.sin(f*ps/360),m=Math.cos(f*ps/360),g=m*(t-n)/2+p*(r-s)/2,x=-p*(t-n)/2+m*(r-s)/2;if(g===0&&x===0)return[];if(l===0||c===0)return[];l=Math.abs(l),c=Math.abs(c);var y=g*g/(l*l)+x*x/(c*c);y>1&&(l*=Math.sqrt(y),c*=Math.sqrt(y));var S=jA(t,r,n,s,a,u,l,c,p,m),T=[],w=S[2],I=S[3],A=Math.max(Math.ceil(Math.abs(I)/(ps/4)),1);I/=A;for(var R=0;R<A;R++)T.push(XA(w,I)),w+=I;return T.map(function(N){for(var B=0;B<N.length;B+=2){var L=N[B+0],O=N[B+1];L*=l,O*=c;var z=m*L-p*O,X=p*L+m*O;N[B+0]=z+S[0],N[B+1]=X+S[1]}return N})},gs=1e-10,Lp=Math.PI/180;function ms(e,t,r){if(!(this instanceof ms))return new ms(e,t,r);this.rx=e,this.ry=t,this.ax=r}ms.prototype.transform=function(e){var t=Math.cos(this.ax*Lp),r=Math.sin(this.ax*Lp),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],s=n[0]*n[0]+n[2]*n[2],a=n[1]*n[1]+n[3]*n[3],u=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),l=(s+a)/2;if(u<gs*l)return this.rx=this.ry=Math.sqrt(l),this.ax=0,this;var c=n[0]*n[1]+n[2]*n[3];u=Math.sqrt(u);var f=l+u/2,p=l-u/2;return this.ax=Math.abs(c)<gs&&Math.abs(f-a)<gs?90:Math.atan(Math.abs(c)>Math.abs(f-a)?(f-s)/c:c/(f-a))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(f),this.ry=Math.sqrt(p)):(this.ax+=90,this.rx=Math.sqrt(p),this.ry=Math.sqrt(f)),this},ms.prototype.isDegenerate=function(){return this.rx<gs*this.ry||this.ry<gs*this.rx};var qA=ms,YA=DA,KA=VA,nn=Fp,ZA=WA,JA=qA;function ie(e){if(!(this instanceof ie))return new ie(e);var t=YA(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ie.from=function(e){if(typeof e=="string")return new ie(e);if(e instanceof ie){var t=new ie("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return nn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},ie.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,s,a,u){var l,c,f,p;switch(n[0]){case"v":l=e.calc(0,n[1],!0),c=l[0]===0?["v",l[1]]:["l",l[0],l[1]];break;case"V":l=e.calc(a,n[1],!1),c=l[0]===e.calc(a,u,!1)[0]?["V",l[1]]:["L",l[0],l[1]];break;case"h":l=e.calc(n[1],0,!0),c=l[1]===0?["h",l[0]]:["l",l[0],l[1]];break;case"H":l=e.calc(n[1],u,!1),c=l[1]===e.calc(a,u,!1)[1]?["H",l[0]]:["L",l[0],l[1]];break;case"a":case"A":var m=e.toArray(),g=JA(n[1],n[2],n[3]).transform(m);if(m[0]*m[3]-m[1]*m[2]<0&&(n[5]=n[5]?"0":"1"),l=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===a&&n[7]===u||n[0]==="a"&&n[6]===0&&n[7]===0){c=[n[0]==="a"?"l":"L",l[0],l[1]];break}g.isDegenerate()?c=[n[0]==="a"?"l":"L",l[0],l[1]]:c=[n[0],g.rx,g.ry,g.ax,n[4],n[5],l[0],l[1]];break;case"m":p=s>0,l=e.calc(n[1],n[2],p),c=["m",l[0],l[1]];break;default:for(f=n[0],c=[f],p=f.toLowerCase()===f,r=1;r<n.length;r+=2)l=e.calc(n[r],n[r+1],p),c.push(l[0],l[1])}t.segments[s]=c},!0)},ie.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=nn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},ie.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,s=this.segments.length;n<s;n++){var a=this.segments[n],u=a[0];u!==t||u==="m"||u==="M"?(u==="m"&&t==="z"&&(e+=" "),e+=u,r=!1):r=!0;for(var l=1;l<a.length;l++){var c=a[l];l===1?r&&c>=0&&(e+=" "):c>=0&&(e+=" "),e+=c}t=u}return e},ie.prototype.translate=function(e,t){return this.__stack.push(nn().translate(e,t||0)),this},ie.prototype.scale=function(e,t){return this.__stack.push(nn().scale(e,!t&&t!==0?e:t)),this},ie.prototype.rotate=function(e,t,r){return this.__stack.push(nn().rotate(e,t||0,r||0)),this},ie.prototype.skewX=function(e){return this.__stack.push(nn().skewX(e)),this},ie.prototype.skewY=function(e){return this.__stack.push(nn().skewY(e)),this},ie.prototype.matrix=function(e){return this.__stack.push(nn().matrix(e)),this},ie.prototype.transform=function(e){return e.trim()?(this.__stack.push(KA(e)),this):this},ie.prototype.round=function(e){var t=0,r=0,n=0,s=0,a;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(u){var l=u[0].toLowerCase()===u[0];switch(u[0]){case"H":case"h":l&&(u[1]+=n),n=u[1]-u[1].toFixed(e),u[1]=+u[1].toFixed(e);return;case"V":case"v":l&&(u[1]+=s),s=u[1]-u[1].toFixed(e),u[1]=+u[1].toFixed(e);return;case"Z":case"z":n=t,s=r;return;case"M":case"m":l&&(u[1]+=n,u[2]+=s),n=u[1]-u[1].toFixed(e),s=u[2]-u[2].toFixed(e),t=n,r=s,u[1]=+u[1].toFixed(e),u[2]=+u[2].toFixed(e);return;case"A":case"a":l&&(u[6]+=n,u[7]+=s),n=u[6]-u[6].toFixed(e),s=u[7]-u[7].toFixed(e),u[1]=+u[1].toFixed(e),u[2]=+u[2].toFixed(e),u[3]=+u[3].toFixed(e+2),u[6]=+u[6].toFixed(e),u[7]=+u[7].toFixed(e);return;default:a=u.length,l&&(u[a-2]+=n,u[a-1]+=s),n=u[a-2]-u[a-2].toFixed(e),s=u[a-1]-u[a-1].toFixed(e),u.forEach(function(c,f){f&&(u[f]=+u[f].toFixed(e))});return}}),this},ie.prototype.iterate=function(e,t){var r=this.segments,n={},s=!1,a=0,u=0,l=0,c=0,f,p,m;if(t||this.__evaluateStack(),r.forEach(function(g,x){var y=e(g,x,a,u);Array.isArray(y)&&(n[x]=y,s=!0);var S=g[0]===g[0].toLowerCase();switch(g[0]){case"m":case"M":a=g[1]+(S?a:0),u=g[2]+(S?u:0),l=a,c=u;return;case"h":case"H":a=g[1]+(S?a:0);return;case"v":case"V":u=g[1]+(S?u:0);return;case"z":case"Z":a=l,u=c;return;default:a=g[g.length-2]+(S?a:0),u=g[g.length-1]+(S?u:0)}}),!s)return this;for(m=[],f=0;f<r.length;f++)if(typeof n[f]<"u")for(p=0;p<n[f].length;p++)m.push(n[f][p]);else m.push(r[f]);return this.segments=m,this},ie.prototype.abs=function(){return this.iterate(function(e,t,r,n){var s=e[0],a=s.toUpperCase(),u;if(s!==a)switch(e[0]=a,s){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(u=1;u<e.length;u++)e[u]+=u%2?r:n}},!0),this},ie.prototype.rel=function(){return this.iterate(function(e,t,r,n){var s=e[0],a=s.toLowerCase(),u;if(s!==a&&!(t===0&&s==="M"))switch(e[0]=a,s){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(u=1;u<e.length;u++)e[u]-=u%2?r:n}},!0),this},ie.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var s,a,u,l=[],c=e[0];return c!=="A"&&c!=="a"?null:(c==="a"?(a=r+e[6],u=n+e[7]):(a=e[6],u=e[7]),s=ZA(r,n,a,u,e[4],e[5],e[1],e[2],e[3]),s.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(s.forEach(function(f){l.push(["C",f[2],f[3],f[4],f[5],f[6],f[7]])}),l))}),this},ie.prototype.unshort=function(){var e=this.segments,t,r,n,s,a;return this.iterate(function(u,l,c,f){var p=u[0],m=p.toUpperCase(),g;l&&(m==="T"?(g=p==="t",n=e[l-1],n[0]==="Q"?(t=n[1]-c,r=n[2]-f):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),s=-t,a=-r,g||(s+=c,a+=f),e[l]=[g?"q":"Q",s,a,u[1],u[2]]):m==="S"&&(g=p==="s",n=e[l-1],n[0]==="C"?(t=n[3]-c,r=n[4]-f):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),s=-t,a=-r,g||(s+=c,a+=f),e[l]=[g?"c":"C",s,a,u[1],u[2],u[3],u[4]]))}),this};var QA=ie,tC=QA;const eC=Hn(tC),rC=st.forwardRef((e,t)=>{const[r,n]=st.useState(null),s=W.useRef(null),a=W.useRef(null),u=W.useRef(null),{path:l,visible:c,transformation:{x:f,y:p,width:m,height:g,anchor:x,hexColor:y,fill:S,stroke:T="none",strokeWidth:w=0,colorCorrection:I={}},pointerdown:A,pointerup:R}=e,N=Yt.useApp(),{temperatureFilter:B,sharpnessFilter:L,hueFilter:O,blurFilter:z,adjustmentFilter:X}=cs(I),{blurRadius:tt=0}=I;return st.useEffect(()=>{const it=eC(l).scale(5).translate(0,0).toString(),V=`<svg xmlns="http://www.w3.org/2000/svg" width="${m}" height="${g}">
1932
+ <path stroke="${T}" stroke-width="${w}" fill="${y||S}" d="${it}">
1933
1933
  </path>
1934
- </svg>`,F=new N2(M),q=E.renderer.generateTexture(F);return n(q),()=>{}},[E,u,b,m,y,_]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:o,children:Vt.jsx(le.Container,{ref:a,children:r&&Vt.jsx(le.Sprite,{texture:r,width:p,height:c,anchor:v,ref:i,x:h,y:d,alpha:f?1:0,...f&&{interactive:!0,pointerdown:T,pointerup:x},filters:[I,O,A,R,...C>0?[L]:[]]})})})})});var aS=Mr,lS=function(){return aS.Date.now()},uS=lS,fS=/\s/;function cS(e){for(var t=e.length;t--&&fS.test(e.charAt(t)););return t}var hS=cS,dS=hS,pS=/^\s+/;function vS(e){return e&&e.slice(0,dS(e)+1).replace(pS,"")}var gS=vS,mS=Yi,yS=Qi,_S="[object Symbol]";function bS(e){return typeof e=="symbol"||yS(e)&&mS(e)==_S}var zo=bS,xS=gS,Dp=Zi,wS=zo,Up=0/0,TS=/^[-+]0x[0-9a-f]+$/i,ES=/^0b[01]+$/i,SS=/^0o[0-7]+$/i,AS=parseInt;function OS(e){if(typeof e=="number")return e;if(wS(e))return Up;if(Dp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xS(e);var r=ES.test(e);return r||SS.test(e)?AS(e.slice(2),r?2:8):TS.test(e)?Up:+e}var CS=OS,RS=Zi,Bu=uS,$p=CS,IS="Expected a function",PS=Math.max,NS=Math.min;function MS(e,t,r){var n,i,o,a,u,f,h=0,d=!1,p=!1,c=!0;if(typeof e!="function")throw new TypeError(IS);t=$p(t)||0,RS(r)&&(d=!!r.leading,p="maxWait"in r,o=p?PS($p(r.maxWait)||0,t):o,c="trailing"in r?!!r.trailing:c);function v(I){var O=n,A=i;return n=i=void 0,h=I,a=e.apply(A,O),a}function y(I){return h=I,u=setTimeout(m,t),d?v(I):a}function _(I){var O=I-f,A=I-h,L=t-O;return p?NS(L,o-A):L}function b(I){var O=I-f,A=I-h;return f===void 0||O>=t||O<0||p&&A>=o}function m(){var I=Bu();if(b(I))return w(I);u=setTimeout(m,_(I))}function w(I){return u=void 0,c&&n?v(I):(n=i=void 0,a)}function T(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?a:w(Bu())}function E(){var I=Bu(),O=b(I);if(n=arguments,i=this,f=I,O){if(u===void 0)return y(f);if(p)return clearTimeout(u),u=setTimeout(m,t),v(f)}return u===void 0&&(u=setTimeout(m,t)),a}return E.cancel=T,E.flush=x,E}var kS=MS;const Ii=En(kS),LS=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=Et.useState(!1),n=mt.useRef(null),i=mt.useRef(t),o=mt.useRef(null),{tl:a,dragModeRef:u}=mt.useContext(An);console.log("audio props",e);const{uniqueId:f,src:h,startAt:d,endAt:p,mute:c,speed:v,audioStartAt:y,audioEndAt:_,visible:b}=e,m=Et.useRef(null);Ze(Oe.PAUSE,()=>{var A;n.current&&m.current&&((A=m.current)==null||A.pause(),i.current.isPlaying=!1)}),Et.useEffect(()=>{m.current&&(u.current?(m.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const w=(A,L)=>{var R,C;n.current&&((R=m.current)==null||R.play({volume:!c&&b?1:0,start:A,end:L,speed:v||1}),u.current?((C=m.current)==null||C.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},T=Ii((A,L)=>{var R;m.current&&((R=m.current)==null||R.play({volume:!c&&b?1:0,start:A,end:L,speed:v||1}),i.current.isPlaying=!0)},100),x=Ii(()=>{m.current&&(m.current.pause(),i.current.isPlaying=!1)},300),E=()=>{var A;n.current&&((A=m.current)==null||A.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=(A,L)=>{var C,P,M,F;const R=A+((C=o.current)==null?void 0:C.time());m.current&&u.current?(T(R,L),x(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&m.current&&((P=m.current)==null||P.refresh(),(M=m.current)==null||M.refreshPaused(),(F=m.current)==null||F.resume(),i.current.isPlaying=!0)},O=()=>{};return mt.useEffect(()=>{let A=_e.context(()=>{});if(n.current&&a.current){const L={duration:Number(_)-Number(y),onStart:w,onComplete:E,onStartParams:[y,_],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[y,_]};A=_e.context(()=>{o.current=_e.from(n.current,L,y),a.current.to(n.current,{alpha:1,duration:.01},d).to(n.current,{alpha:0,duration:.1},Number(p)-.09),a.current.add(o.current,d)})}return()=>{o.current&&(o.current.kill(),_e.killTweensOf(o.current)),A.revert()}},[d,p,y,_]),Et.useEffect(()=>{n.current&&r(!0)},[]),Et.useEffect(()=>{n.current&&m.current&&(i.current.mute=!c&&b?1:0,i.current.speed=v,m.current.volume=c?0:1)},[b,c,v]),Et.useEffect(()=>(rl(h)||(m.current=ly.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{console.log("audio loaded"),i.current.loaded=!0}})),()=>{m.current&&m.current.pause&&m.current.pause()}),[f,h]),Vt.jsx(le.Container,{ref:n})};function FS(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Gp=FS;function BS(){this.__data__=[],this.size=0}var DS=BS;function US(e,t){return e===t||e!==e&&t!==t}var jp=US,$S=jp;function GS(e,t){for(var r=e.length;r--;)if($S(e[r][0],t))return r;return-1}var Ho=GS,jS=Ho,qS=Array.prototype,zS=qS.splice;function HS(e){var t=this.__data__,r=jS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zS.call(t,r,1),--this.size,!0}var VS=HS,WS=Ho;function XS(e){var t=this.__data__,r=WS(t,e);return r<0?void 0:t[r][1]}var KS=XS,YS=Ho;function ZS(e){return YS(this.__data__,e)>-1}var QS=ZS,JS=Ho;function tA(e,t){var r=this.__data__,n=JS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var eA=tA,rA=DS,nA=VS,iA=KS,sA=QS,oA=eA;function Pi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pi.prototype.clear=rA,Pi.prototype.delete=nA,Pi.prototype.get=iA,Pi.prototype.has=sA,Pi.prototype.set=oA;var Vo=Pi,aA=Vo;function lA(){this.__data__=new aA,this.size=0}var uA=lA;function fA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var cA=fA;function hA(e){return this.__data__.get(e)}var dA=hA;function pA(e){return this.__data__.has(e)}var vA=pA,gA=ei,mA=gA(Object,"create"),Wo=mA,qp=Wo;function yA(){this.__data__=qp?qp(null):{},this.size=0}var _A=yA;function bA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xA=bA,wA=Wo,TA="__lodash_hash_undefined__",EA=Object.prototype,SA=EA.hasOwnProperty;function AA(e){var t=this.__data__;if(wA){var r=t[e];return r===TA?void 0:r}return SA.call(t,e)?t[e]:void 0}var OA=AA,CA=Wo,RA=Object.prototype,IA=RA.hasOwnProperty;function PA(e){var t=this.__data__;return CA?t[e]!==void 0:IA.call(t,e)}var NA=PA,MA=Wo,kA="__lodash_hash_undefined__";function LA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=MA&&t===void 0?kA:t,this}var FA=LA,BA=_A,DA=xA,UA=OA,$A=NA,GA=FA;function Ni(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ni.prototype.clear=BA,Ni.prototype.delete=DA,Ni.prototype.get=UA,Ni.prototype.has=$A,Ni.prototype.set=GA;var jA=Ni,zp=jA,qA=Vo,zA=Va;function HA(){this.size=0,this.__data__={hash:new zp,map:new(zA||qA),string:new zp}}var VA=HA;function WA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var XA=WA,KA=XA;function YA(e,t){var r=e.__data__;return KA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Xo=YA,ZA=Xo;function QA(e){var t=ZA(this,e).delete(e);return this.size-=t?1:0,t}var JA=QA,tO=Xo;function eO(e){return tO(this,e).get(e)}var rO=eO,nO=Xo;function iO(e){return nO(this,e).has(e)}var sO=iO,oO=Xo;function aO(e,t){var r=oO(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var lO=aO,uO=VA,fO=JA,cO=rO,hO=sO,dO=lO;function Mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mi.prototype.clear=uO,Mi.prototype.delete=fO,Mi.prototype.get=cO,Mi.prototype.has=hO,Mi.prototype.set=dO;var Du=Mi,pO=Vo,vO=Va,gO=Du,mO=200;function yO(e,t){var r=this.__data__;if(r instanceof pO){var n=r.__data__;if(!vO||n.length<mO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new gO(n)}return r.set(e,t),this.size=r.size,this}var _O=yO,bO=Vo,xO=uA,wO=cA,TO=dA,EO=vA,SO=_O;function ki(e){var t=this.__data__=new bO(e);this.size=t.size}ki.prototype.clear=xO,ki.prototype.delete=wO,ki.prototype.get=TO,ki.prototype.has=EO,ki.prototype.set=SO;var Hp=ki,AO="__lodash_hash_undefined__";function OO(e){return this.__data__.set(e,AO),this}var CO=OO;function RO(e){return this.__data__.has(e)}var IO=RO,PO=Du,NO=CO,MO=IO;function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new PO;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=NO,Ko.prototype.has=MO;var kO=Ko;function LO(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var FO=LO;function BO(e,t){return e.has(t)}var DO=BO,UO=kO,$O=FO,GO=DO,jO=1,qO=2;function zO(e,t,r,n,i,o){var a=r&jO,u=e.length,f=t.length;if(u!=f&&!(a&&f>u))return!1;var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var p=-1,c=!0,v=r&qO?new UO:void 0;for(o.set(e,t),o.set(t,e);++p<u;){var y=e[p],_=t[p];if(n)var b=a?n(_,y,p,t,e,o):n(y,_,p,e,t,o);if(b!==void 0){if(b)continue;c=!1;break}if(v){if(!$O(t,function(m,w){if(!GO(v,w)&&(y===m||i(y,m,r,n,o)))return v.push(w)})){c=!1;break}}else if(!(y===_||i(y,_,r,n,o))){c=!1;break}}return o.delete(e),o.delete(t),c}var Vp=zO,HO=Mr,VO=HO.Uint8Array,WO=VO;function XO(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var KO=XO;function YO(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ZO=YO,Wp=js,Xp=WO,QO=jp,JO=Vp,tC=KO,eC=ZO,rC=1,nC=2,iC="[object Boolean]",sC="[object Date]",oC="[object Error]",aC="[object Map]",lC="[object Number]",uC="[object RegExp]",fC="[object Set]",cC="[object String]",hC="[object Symbol]",dC="[object ArrayBuffer]",pC="[object DataView]",Kp=Wp?Wp.prototype:void 0,Uu=Kp?Kp.valueOf:void 0;function vC(e,t,r,n,i,o,a){switch(r){case pC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dC:return!(e.byteLength!=t.byteLength||!o(new Xp(e),new Xp(t)));case iC:case sC:case lC:return QO(+e,+t);case oC:return e.name==t.name&&e.message==t.message;case uC:case cC:return e==t+"";case aC:var u=tC;case fC:var f=n&rC;if(u||(u=eC),e.size!=t.size&&!f)return!1;var h=a.get(e);if(h)return h==t;n|=nC,a.set(e,t);var d=JO(u(e),u(t),n,i,o,a);return a.delete(e),d;case hC:if(Uu)return Uu.call(e)==Uu.call(t)}return!1}var gC=vC;function mC(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var yC=mC,_C=yC,bC=kr;function xC(e,t,r){var n=t(e);return bC(e)?n:_C(n,r(e))}var wC=xC;function TC(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var EC=TC;function SC(){return[]}var AC=SC,OC=EC,CC=AC,RC=Object.prototype,IC=RC.propertyIsEnumerable,Yp=Object.getOwnPropertySymbols,PC=Yp?function(e){return e==null?[]:(e=Object(e),OC(Yp(e),function(t){return IC.call(e,t)}))}:CC,NC=PC;function MC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kC=MC,LC=9007199254740991,FC=/^(?:0|[1-9]\d*)$/;function BC(e,t){var r=typeof e;return t=t??LC,!!t&&(r=="number"||r!="symbol"&&FC.test(e))&&e>-1&&e%1==0&&e<t}var Zp=BC,DC=kC,UC=Qa,$C=kr,GC=tl,jC=Zp,qC=el,zC=Object.prototype,HC=zC.hasOwnProperty;function VC(e,t){var r=$C(e),n=!r&&UC(e),i=!r&&!n&&GC(e),o=!r&&!n&&!i&&qC(e),a=r||n||i||o,u=a?DC(e.length,String):[],f=u.length;for(var h in e)(t||HC.call(e,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||jC(h,f)))&&u.push(h);return u}var WC=VC,XC=WC,KC=vc,YC=qs;function ZC(e){return YC(e)?XC(e):KC(e)}var $u=ZC,QC=wC,JC=NC,tR=$u;function eR(e){return QC(e,tR,JC)}var rR=eR,Qp=rR,nR=1,iR=Object.prototype,sR=iR.hasOwnProperty;function oR(e,t,r,n,i,o){var a=r&nR,u=Qp(e),f=u.length,h=Qp(t),d=h.length;if(f!=d&&!a)return!1;for(var p=f;p--;){var c=u[p];if(!(a?c in t:sR.call(t,c)))return!1}var v=o.get(e),y=o.get(t);if(v&&y)return v==t&&y==e;var _=!0;o.set(e,t),o.set(t,e);for(var b=a;++p<f;){c=u[p];var m=e[c],w=t[c];if(n)var T=a?n(w,m,c,t,e,o):n(m,w,c,e,t,o);if(!(T===void 0?m===w||i(m,w,r,n,o):T)){_=!1;break}b||(b=c=="constructor")}if(_&&!b){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof E=="function"&&E instanceof E)&&(_=!1)}return o.delete(e),o.delete(t),_}var aR=oR,Gu=Hp,lR=Vp,uR=gC,fR=aR,Jp=Ic,tv=kr,ev=tl,cR=el,hR=1,rv="[object Arguments]",nv="[object Array]",Yo="[object Object]",dR=Object.prototype,iv=dR.hasOwnProperty;function pR(e,t,r,n,i,o){var a=tv(e),u=tv(t),f=a?nv:Jp(e),h=u?nv:Jp(t);f=f==rv?Yo:f,h=h==rv?Yo:h;var d=f==Yo,p=h==Yo,c=f==h;if(c&&ev(e)){if(!ev(t))return!1;a=!0,d=!1}if(c&&!d)return o||(o=new Gu),a||cR(e)?lR(e,t,r,n,i,o):uR(e,t,f,r,n,i,o);if(!(r&hR)){var v=d&&iv.call(e,"__wrapped__"),y=p&&iv.call(t,"__wrapped__");if(v||y){var _=v?e.value():e,b=y?t.value():t;return o||(o=new Gu),i(_,b,r,n,o)}}return c?(o||(o=new Gu),fR(e,t,r,n,i,o)):!1}var vR=pR,gR=vR,sv=Qi;function ov(e,t,r,n,i){return e===t?!0:e==null||t==null||!sv(e)&&!sv(t)?e!==e&&t!==t:gR(e,t,r,n,ov,i)}var av=ov,mR=Hp,yR=av,_R=1,bR=2;function xR(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<o;){u=r[i];var f=u[0],h=e[f],d=u[1];if(a&&u[2]){if(h===void 0&&!(f in e))return!1}else{var p=new mR;if(n)var c=n(h,d,f,e,t,p);if(!(c===void 0?yR(d,h,_R|bR,n,p):c))return!1}}return!0}var wR=xR,TR=Zi;function ER(e){return e===e&&!TR(e)}var lv=ER,SR=lv,AR=$u;function OR(e){for(var t=AR(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,SR(i)]}return t}var CR=OR;function RR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var uv=RR,IR=wR,PR=CR,NR=uv;function MR(e){var t=PR(e);return t.length==1&&t[0][2]?NR(t[0][0],t[0][1]):function(r){return r===e||IR(r,e,t)}}var kR=MR,LR=kr,FR=zo,BR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,DR=/^\w*$/;function UR(e,t){if(LR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||FR(e)?!0:DR.test(e)||!BR.test(e)||t!=null&&e in Object(t)}var ju=UR,fv=Du,$R="Expected a function";function qu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($R);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(qu.Cache||fv),r}qu.Cache=fv;var GR=qu,jR=GR,qR=500;function zR(e){var t=jR(e,function(n){return r.size===qR&&r.clear(),n}),r=t.cache;return t}var HR=zR,VR=HR,WR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XR=/\\(\\)?/g,KR=VR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WR,function(r,n,i,o){t.push(i?o.replace(XR,"$1"):n||r)}),t}),YR=KR,cv=js,ZR=Gp,QR=kr,JR=zo,tI=1/0,hv=cv?cv.prototype:void 0,dv=hv?hv.toString:void 0;function pv(e){if(typeof e=="string")return e;if(QR(e))return ZR(e,pv)+"";if(JR(e))return dv?dv.call(e):"";var t=e+"";return t=="0"&&1/e==-tI?"-0":t}var eI=pv,rI=eI;function nI(e){return e==null?"":rI(e)}var iI=nI,sI=kr,oI=ju,aI=YR,lI=iI;function uI(e,t){return sI(e)?e:oI(e,t)?[e]:aI(lI(e))}var vv=uI,fI=zo,cI=1/0;function hI(e){if(typeof e=="string"||fI(e))return e;var t=e+"";return t=="0"&&1/e==-cI?"-0":t}var Zo=hI,dI=vv,pI=Zo;function vI(e,t){t=dI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pI(t[r++])];return r&&r==n?e:void 0}var gv=vI,gI=gv;function mI(e,t,r){var n=e==null?void 0:gI(e,t);return n===void 0?r:n}var yI=mI;function _I(e,t){return e!=null&&t in Object(e)}var bI=_I,xI=vv,wI=Qa,TI=kr,EI=Zp,SI=Ja,AI=Zo;function OI(e,t,r){t=xI(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=AI(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&SI(i)&&EI(a,i)&&(TI(e)||wI(e)))}var CI=OI,RI=bI,II=CI;function PI(e,t){return e!=null&&II(e,t,RI)}var NI=PI,MI=av,kI=yI,LI=NI,FI=ju,BI=lv,DI=uv,UI=Zo,$I=1,GI=2;function jI(e,t){return FI(e)&&BI(t)?DI(UI(e),t):function(r){var n=kI(r,e);return n===void 0&&n===t?LI(r,e):MI(t,n,$I|GI)}}var qI=jI;function zI(e){return e}var HI=zI;function VI(e){return function(t){return t==null?void 0:t[e]}}var WI=VI,XI=gv;function KI(e){return function(t){return XI(t,e)}}var YI=KI,ZI=WI,QI=YI,JI=ju,tP=Zo;function eP(e){return JI(e)?ZI(tP(e)):QI(e)}var rP=eP,nP=kR,iP=qI,sP=HI,oP=kr,aP=rP;function lP(e){return typeof e=="function"?e:e==null?sP:typeof e=="object"?oP(e)?iP(e[0],e[1]):nP(e):aP(e)}var uP=lP;function fP(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),u=a.length;u--;){var f=a[e?u:++i];if(r(o[f],f,o)===!1)break}return t}}var cP=fP,hP=cP,dP=hP(),pP=dP,vP=pP,gP=$u;function mP(e,t){return e&&vP(e,t,gP)}var yP=mP,_P=qs;function bP(e,t){return function(r,n){if(r==null)return r;if(!_P(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var xP=bP,wP=yP,TP=xP,EP=TP(wP),SP=EP,AP=SP,OP=qs;function CP(e,t){var r=-1,n=OP(e)?Array(e.length):[];return AP(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var RP=CP,IP=Gp,PP=uP,NP=RP,MP=kr;function kP(e,t){var r=MP(e)?IP:NP;return r(e,PP(t))}var LP=kP;const FP=En(LP);var zn={},mv={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.loop=Yr.conditional=Yr.parse=void 0;var BP=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(a){return e(t,a,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var o=Object.keys(r)[0];Array.isArray(r[o])?(i[o]={},e(t,r[o],n,i[o])):i[o]=r[o](t,n,i,e)}return n};Yr.parse=BP;var DP=function(t,r){return function(n,i,o,a){r(n,i,o)&&a(n,t,i,o)}};Yr.conditional=DP;var UP=function(t,r){return function(n,i,o,a){for(var u=[],f=n.pos;r(n,i,o);){var h={};if(a(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Yr.loop=UP;var be={};Object.defineProperty(be,"__esModule",{value:!0}),be.readBits=be.readArray=be.readUnsigned=be.readString=be.peekBytes=be.readBytes=be.peekByte=be.readByte=be.buildStream=void 0;var $P=function(t){return{data:t,pos:0}};be.buildStream=$P;var yv=function(){return function(t){return t.data[t.pos++]}};be.readByte=yv;var GP=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};be.peekByte=GP;var Qo=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};be.readBytes=Qo;var jP=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};be.peekBytes=jP;var qP=function(t){return function(r){return Array.from(Qo(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};be.readString=qP;var zP=function(t){return function(r){var n=Qo(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};be.readUnsigned=zP;var HP=function(t,r){return function(n,i,o){for(var a=typeof r=="function"?r(n,i,o):r,u=Qo(t),f=new Array(a),h=0;h<a;h++)f[h]=u(n);return f}};be.readArray=HP;var VP=function(t,r,n){for(var i=0,o=0;o<n;o++)i+=t[r+o]&&Math.pow(2,n-o-1);return i},WP=function(t){return function(r){for(var n=yv()(r),i=new Array(8),o=0;o<8;o++)i[7-o]=!!(n&1<<o);return Object.keys(t).reduce(function(a,u){var f=t[u];return f.length?a[u]=VP(i,f.index,f.length):a[u]=i[f.index],a},{})}};be.readBits=WP,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Yr,r=be,n={blocks:function(c){for(var v=0,y=[],_=c.data.length,b=0,m=(0,r.readByte)()(c);m!==v&&m;m=(0,r.readByte)()(c)){if(c.pos+m>=_){var w=_-c.pos;y.push((0,r.readBytes)(w)(c)),b+=w;break}y.push((0,r.readBytes)(m)(c)),b+=m}for(var T=new Uint8Array(b),x=0,E=0;E<y.length;E++)T.set(y[E],x),x+=y[E].length;return T}},i=(0,t.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(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===249}),o=(0,t.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,t.conditional)({lct:(0,r.readArray)(3,function(p,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(p,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(p){return(0,r.peekByte)()(p)===44}),a=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,y){return(0,r.readBytes)(y.text.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===1}),u=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,v,y){return(0,r.readString)(y.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(p){var c=(0,r.peekBytes)(2)(p);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,t.conditional)({gct:(0,r.readArray)(3,function(p,c){return Math.pow(2,c.lsd.gct.size+1)})},function(p,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,o,a],function(p){var c=(0,r.peekByte)()(p);return c===33||c===44})}],d=h;e.default=d}(mv);var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.deinterlace=void 0;var XP=function(t,r){for(var n=new Array(t.length),i=t.length/r,o=function(c,v){var y=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(y))},a=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var d=a[h];d<i;d+=u[h])o(d,f),f++;return n};Jo.deinterlace=XP;var ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.lzw=void 0;var KP=function(t,r,n){var i=4096,o=-1,a=n,u,f,h,d,p,c,v,I,y,_,E,b,O,A,R,L,m=new Array(n),w=new Array(i),T=new Array(i),x=new Array(i+1);for(b=t,f=1<<b,p=f+1,u=f+2,v=o,d=b+1,h=(1<<d)-1,y=0;y<f;y++)w[y]=0,T[y]=y;var E,I,O,A,L,R;for(E=I=O=A=L=R=0,_=0;_<a;){if(A===0){if(I<d){E+=r[R]<<I,I+=8,R++;continue}if(y=E&h,E>>=d,I-=d,y>u||y==p)break;if(y==f){d=b+1,h=(1<<d)-1,u=f+2,v=o;continue}if(v==o){x[A++]=T[y],v=y,O=y;continue}for(c=y,y==u&&(x[A++]=O,y=v);y>f;)x[A++]=T[y],y=w[y];O=T[y]&255,x[A++]=O,u<i&&(w[u]=v,T[u]=O,u++,!(u&h)&&u<i&&(d++,h+=u)),v=c}A--,m[L++]=x[A],_++}for(_=L;_<a;_++)m[_]=0;return m};ta.lzw=KP,Object.defineProperty(zn,"__esModule",{value:!0}),zn.decompressFrames=zn.decompressFrame=zn.parseGIF=void 0;var YP=eN(mv),ZP=Yr,QP=be,JP=Jo,tN=ta;function eN(e){return e&&e.__esModule?e:{default:e}}var rN=function(t){var r=new Uint8Array(t);return(0,ZP.parse)((0,QP.buildStream)(r),YP.default)};zn.parseGIF=rN;var nN=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var o=i*4,a=t.pixels[i],u=t.colorTable[a]||[0,0,0];n[o]=u[0],n[o+1]=u[1],n[o+2]=u[2],n[o+3]=a!==t.transparentIndex?255:0}return n},_v=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,o=i.descriptor.width*i.descriptor.height,a=(0,tN.lzw)(i.data.minCodeSize,i.data.blocks,o);i.descriptor.lct.interlaced&&(a=(0,JP.deinterlace)(a,i.descriptor.width));var u={pixels:a,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?u.colorTable=i.lct:u.colorTable=r,t.gce&&(u.delay=(t.gce.delay||10)*10,u.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(u.transparentIndex=t.gce.transparentColorIndex)),n&&(u.patch=nN(u)),u};zn.decompressFrame=_v;var iN=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return _v(n,t.gct,r)})};zn.decompressFrames=iN;const bv=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,o={...e,...i};return r&&Object.assign(o,{playing:o.autoPlay&&o.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(o,{length:o.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(o,{index:o.length===0?0:(o.length+o.index)%o.length}),t.playing!=null&&Object.assign(o,o.loaded?{playing:n}:{autoPlay:n}),o},sN=e=>bv({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),oN=e=>mt.useReducer(bv,e,sN);var aN='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 lN(e){const t=new Blob([aN],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const uN=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),fN=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),mt.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&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},cN=e=>{const t=mt.useRef(e);return mt.useEffect(()=>{t.current=e},[e]),t},hN=e=>{const t=cN(e);return mt.useCallback(r=>t.current&&t.current(r),[])},dN=fN(()=>new lN,e=>e.terminate()),pN=(e,t)=>{const r=hN(t),n=dN();mt.useEffect(()=>{if(typeof e=="string"){const i=o=>{const a=o.data||o;if(a.src===e){const u=a.error?a:uN(a);r(u)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},vN=({isPlaying:e,forwardRef:t,...r})=>{const n=Et.useRef(null);return Et.useImperativeHandle(t,()=>n.current,[n]),Et.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),Vt.jsx(le.AnimatedSprite,{ref:n,...r,isPlaying:e})},xv=Et.memo(vN);var ea={exports:{}};/**
1934
+ </svg>`,j=new IA(V),xt=N.renderer.generateTexture(j);return n(xt),()=>{}},[N,l,T,w,y,S]),Mt.jsx(Wn,{...e,ref:t,children:Mt.jsx(Yt.Container,{ref:a,children:Mt.jsx(Yt.Container,{ref:u,children:r&&Mt.jsx(Yt.Sprite,{texture:r,width:m,height:g,anchor:x,ref:s,x:f,y:p,alpha:c?1:0,...c&&{interactive:!0,pointerdown:A,pointerup:R},filters:[B,L,O,X,...tt>0?[z]:[]]})})})})});var nC=Tr,iC=function(){return nC.Date.now()},sC=iC,aC=/\s/;function oC(e){for(var t=e.length;t--&&aC.test(e.charAt(t)););return t}var uC=oC,lC=uC,hC=/^\s+/;function cC(e){return e&&e.slice(0,lC(e)+1).replace(hC,"")}var fC=cC,dC=zi,pC=Vi,gC="[object Symbol]";function mC(e){return typeof e=="symbol"||pC(e)&&dC(e)==gC}var Ba=mC,vC=fC,kp=Hi,yC=Ba,Bp=0/0,_C=/^[-+]0x[0-9a-f]+$/i,xC=/^0b[01]+$/i,bC=/^0o[0-7]+$/i,TC=parseInt;function wC(e){if(typeof e=="number")return e;if(yC(e))return Bp;if(kp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=kp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vC(e);var r=xC.test(e);return r||bC.test(e)?TC(e.slice(2),r?2:8):_C.test(e)?Bp:+e}var SC=wC,AC=Hi,Ol=sC,Dp=SC,CC="Expected a function",EC=Math.max,IC=Math.min;function RC(e,t,r){var n,s,a,u,l,c,f=0,p=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError(CC);t=Dp(t)||0,AC(r)&&(p=!!r.leading,m="maxWait"in r,a=m?EC(Dp(r.maxWait)||0,t):a,g="trailing"in r?!!r.trailing:g);function x(B){var L=n,O=s;return n=s=void 0,f=B,u=e.apply(O,L),u}function y(B){return f=B,l=setTimeout(w,t),p?x(B):u}function S(B){var L=B-c,O=B-f,z=t-L;return m?IC(z,a-O):z}function T(B){var L=B-c,O=B-f;return c===void 0||L>=t||L<0||m&&O>=a}function w(){var B=Ol();if(T(B))return I(B);l=setTimeout(w,S(B))}function I(B){return l=void 0,g&&n?x(B):(n=s=void 0,u)}function A(){l!==void 0&&clearTimeout(l),f=0,n=c=s=l=void 0}function R(){return l===void 0?u:I(Ol())}function N(){var B=Ol(),L=T(B);if(n=arguments,s=this,c=B,L){if(l===void 0)return y(c);if(m)return clearTimeout(l),l=setTimeout(w,t),x(c)}return l===void 0&&(l=setTimeout(w,t)),u}return N.cancel=A,N.flush=R,N}var PC=RC;const xi=Hn(PC),MC=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=st.useState(!1),n=W.useRef(null),s=W.useRef(t),a=W.useRef(null),{tl:u,dragModeRef:l}=W.useContext(gn),{uniqueId:c,src:f,startAt:p,endAt:m,mute:g,speed:x,audioStartAt:y,audioEndAt:S,visible:T}=e,w=st.useRef(null);we(ue.PAUSE,()=>{var O;n.current&&w.current&&((O=w.current)==null||O.pause(),s.current.isPlaying=!1)}),st.useEffect(()=>{w.current&&(l.current?(w.current.pause(),s.current.isPlaying=!1,s.current.isDragging=!0):s.current.isDragging=!1)},[l]);const I=(O,z)=>{var X,tt;n.current&&((X=w.current)==null||X.play({volume:!g&&T?1:0,start:O,end:z,speed:x||1}),l.current?((tt=w.current)==null||tt.pause(),s.current.isPlaying=!1,s.current.completed=!1):(s.current.isPlaying=!0,s.current.completed=!1))},A=xi((O,z)=>{var X;w.current&&((X=w.current)==null||X.play({volume:!g&&T?1:0,start:O,end:z,speed:x||1}),s.current.isPlaying=!0)},100),R=xi(()=>{w.current&&(w.current.pause(),s.current.isPlaying=!1)},300),N=()=>{var O;n.current&&((O=w.current)==null||O.stop(),s.current.isPlaying=!1,s.current.completed=!0)},B=(O,z)=>{var tt,it,V,j;const X=O+((tt=a.current)==null?void 0:tt.time());w.current&&l.current?(A(X,z),R(),s.current.isPlaying=!1):n.current&&!s.current.isPlaying&&w.current&&((it=w.current)==null||it.refresh(),(V=w.current)==null||V.refreshPaused(),(j=w.current)==null||j.resume(),s.current.isPlaying=!0)},L=()=>{};return W.useEffect(()=>{let O=oe.context(()=>{});if(n.current&&u.current){const z={duration:Number(S)-Number(y),onStart:I,onComplete:N,onStartParams:[y,S],onCompleteParams:[],onInterrupt:L,onUpdate:B,onUpdateParams:[y,S]};O=oe.context(()=>{a.current=oe.from(n.current,z,y),u.current.to(n.current,{alpha:1,duration:.01},p).to(n.current,{alpha:0,duration:.1},Number(m)-.09),u.current.add(a.current,p)})}return()=>{a.current&&(a.current.kill(),oe.killTweensOf(a.current)),O.revert()}},[p,m,y,S]),st.useEffect(()=>{n.current&&r(!0)},[]),st.useEffect(()=>{n.current&&w.current&&(s.current.mute=!g&&T?1:0,s.current.speed=x,w.current.volume=g?0:1)},[T,g,x]),st.useEffect(()=>(Zo(f)||(w.current=iv.Sound.from({url:f,preload:!0,singleInstance:!0,loaded:()=>{console.log("audio loaded"),s.current.loaded=!0}})),()=>{w.current&&w.current.pause&&w.current.pause()}),[c,f]),Mt.jsx(Yt.Container,{ref:n})};function OC(e,t){for(var r=-1,n=e==null?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}var Up=OC;function FC(){this.__data__=[],this.size=0}var NC=FC;function LC(e,t){return e===t||e!==e&&t!==t}var $p=LC,kC=$p;function BC(e,t){for(var r=e.length;r--;)if(kC(e[r][0],t))return r;return-1}var Da=BC,DC=Da,UC=Array.prototype,$C=UC.splice;function GC(e){var t=this.__data__,r=DC(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():$C.call(t,r,1),--this.size,!0}var zC=GC,HC=Da;function VC(e){var t=this.__data__,r=HC(t,e);return r<0?void 0:t[r][1]}var jC=VC,XC=Da;function WC(e){return XC(this.__data__,e)>-1}var qC=WC,YC=Da;function KC(e,t){var r=this.__data__,n=YC(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var ZC=KC,JC=NC,QC=zC,tE=jC,eE=qC,rE=ZC;function bi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}bi.prototype.clear=JC,bi.prototype.delete=QC,bi.prototype.get=tE,bi.prototype.has=eE,bi.prototype.set=rE;var Ua=bi,nE=Ua;function iE(){this.__data__=new nE,this.size=0}var sE=iE;function aE(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var oE=aE;function uE(e){return this.__data__.get(e)}var lE=uE;function hE(e){return this.__data__.has(e)}var cE=hE,fE=jn,dE=fE(Object,"create"),$a=dE,Gp=$a;function pE(){this.__data__=Gp?Gp(null):{},this.size=0}var gE=pE;function mE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vE=mE,yE=$a,_E="__lodash_hash_undefined__",xE=Object.prototype,bE=xE.hasOwnProperty;function TE(e){var t=this.__data__;if(yE){var r=t[e];return r===_E?void 0:r}return bE.call(t,e)?t[e]:void 0}var wE=TE,SE=$a,AE=Object.prototype,CE=AE.hasOwnProperty;function EE(e){var t=this.__data__;return SE?t[e]!==void 0:CE.call(t,e)}var IE=EE,RE=$a,PE="__lodash_hash_undefined__";function ME(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=RE&&t===void 0?PE:t,this}var OE=ME,FE=gE,NE=vE,LE=wE,kE=IE,BE=OE;function Ti(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ti.prototype.clear=FE,Ti.prototype.delete=NE,Ti.prototype.get=LE,Ti.prototype.has=kE,Ti.prototype.set=BE;var DE=Ti,zp=DE,UE=Ua,$E=Go;function GE(){this.size=0,this.__data__={hash:new zp,map:new($E||UE),string:new zp}}var zE=GE;function HE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var VE=HE,jE=VE;function XE(e,t){var r=e.__data__;return jE(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ga=XE,WE=Ga;function qE(e){var t=WE(this,e).delete(e);return this.size-=t?1:0,t}var YE=qE,KE=Ga;function ZE(e){return KE(this,e).get(e)}var JE=ZE,QE=Ga;function t2(e){return QE(this,e).has(e)}var e2=t2,r2=Ga;function n2(e,t){var r=r2(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i2=n2,s2=zE,a2=YE,o2=JE,u2=e2,l2=i2;function wi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}wi.prototype.clear=s2,wi.prototype.delete=a2,wi.prototype.get=o2,wi.prototype.has=u2,wi.prototype.set=l2;var Fl=wi,h2=Ua,c2=Go,f2=Fl,d2=200;function p2(e,t){var r=this.__data__;if(r instanceof h2){var n=r.__data__;if(!c2||n.length<d2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new f2(n)}return r.set(e,t),this.size=r.size,this}var g2=p2,m2=Ua,v2=sE,y2=oE,_2=lE,x2=cE,b2=g2;function Si(e){var t=this.__data__=new m2(e);this.size=t.size}Si.prototype.clear=v2,Si.prototype.delete=y2,Si.prototype.get=_2,Si.prototype.has=x2,Si.prototype.set=b2;var Hp=Si,T2="__lodash_hash_undefined__";function w2(e){return this.__data__.set(e,T2),this}var S2=w2;function A2(e){return this.__data__.has(e)}var C2=A2,E2=Fl,I2=S2,R2=C2;function za(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new E2;++t<r;)this.add(e[t])}za.prototype.add=za.prototype.push=I2,za.prototype.has=R2;var P2=za;function M2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var O2=M2;function F2(e,t){return e.has(t)}var N2=F2,L2=P2,k2=O2,B2=N2,D2=1,U2=2;function $2(e,t,r,n,s,a){var u=r&D2,l=e.length,c=t.length;if(l!=c&&!(u&&c>l))return!1;var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=-1,g=!0,x=r&U2?new L2:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var y=e[m],S=t[m];if(n)var T=u?n(S,y,m,t,e,a):n(y,S,m,e,t,a);if(T!==void 0){if(T)continue;g=!1;break}if(x){if(!k2(t,function(w,I){if(!B2(x,I)&&(y===w||s(y,w,r,n,a)))return x.push(I)})){g=!1;break}}else if(!(y===S||s(y,S,r,n,a))){g=!1;break}}return a.delete(e),a.delete(t),g}var Vp=$2,G2=Tr,z2=G2.Uint8Array,H2=z2;function V2(e){var t=-1,r=Array(e.size);return e.forEach(function(n,s){r[++t]=[s,n]}),r}var j2=V2;function X2(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var W2=X2,jp=ks,Xp=H2,q2=$p,Y2=Vp,K2=j2,Z2=W2,J2=1,Q2=2,tI="[object Boolean]",eI="[object Date]",rI="[object Error]",nI="[object Map]",iI="[object Number]",sI="[object RegExp]",aI="[object Set]",oI="[object String]",uI="[object Symbol]",lI="[object ArrayBuffer]",hI="[object DataView]",Wp=jp?jp.prototype:void 0,Nl=Wp?Wp.valueOf:void 0;function cI(e,t,r,n,s,a,u){switch(r){case hI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lI:return!(e.byteLength!=t.byteLength||!a(new Xp(e),new Xp(t)));case tI:case eI:case iI:return q2(+e,+t);case rI:return e.name==t.name&&e.message==t.message;case sI:case oI:return e==t+"";case nI:var l=K2;case aI:var c=n&J2;if(l||(l=Z2),e.size!=t.size&&!c)return!1;var f=u.get(e);if(f)return f==t;n|=Q2,u.set(e,t);var p=Y2(l(e),l(t),n,s,a,u);return u.delete(e),p;case uI:if(Nl)return Nl.call(e)==Nl.call(t)}return!1}var fI=cI;function dI(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var pI=dI,gI=pI,mI=wr;function vI(e,t,r){var n=t(e);return mI(e)?n:gI(n,r(e))}var yI=vI;function _I(e,t){for(var r=-1,n=e==null?0:e.length,s=0,a=[];++r<n;){var u=e[r];t(u,r,e)&&(a[s++]=u)}return a}var xI=_I;function bI(){return[]}var TI=bI,wI=xI,SI=TI,AI=Object.prototype,CI=AI.propertyIsEnumerable,qp=Object.getOwnPropertySymbols,EI=qp?function(e){return e==null?[]:(e=Object(e),wI(qp(e),function(t){return CI.call(e,t)}))}:SI,II=EI;function RI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var PI=RI,MI=9007199254740991,OI=/^(?:0|[1-9]\d*)$/;function FI(e,t){var r=typeof e;return t=t??MI,!!t&&(r=="number"||r!="symbol"&&OI.test(e))&&e>-1&&e%1==0&&e<t}var Yp=FI,NI=PI,LI=Wo,kI=wr,BI=Yo,DI=Yp,UI=Ko,$I=Object.prototype,GI=$I.hasOwnProperty;function zI(e,t){var r=kI(e),n=!r&&LI(e),s=!r&&!n&&BI(e),a=!r&&!n&&!s&&UI(e),u=r||n||s||a,l=u?NI(e.length,String):[],c=l.length;for(var f in e)(t||GI.call(e,f))&&!(u&&(f=="length"||s&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||DI(f,c)))&&l.push(f);return l}var HI=zI,VI=HI,jI=fc,XI=Bs;function WI(e){return XI(e)?VI(e):jI(e)}var Ll=WI,qI=yI,YI=II,KI=Ll;function ZI(e){return qI(e,KI,YI)}var JI=ZI,Kp=JI,QI=1,tR=Object.prototype,eR=tR.hasOwnProperty;function rR(e,t,r,n,s,a){var u=r&QI,l=Kp(e),c=l.length,f=Kp(t),p=f.length;if(c!=p&&!u)return!1;for(var m=c;m--;){var g=l[m];if(!(u?g in t:eR.call(t,g)))return!1}var x=a.get(e),y=a.get(t);if(x&&y)return x==t&&y==e;var S=!0;a.set(e,t),a.set(t,e);for(var T=u;++m<c;){g=l[m];var w=e[g],I=t[g];if(n)var A=u?n(I,w,g,t,e,a):n(w,I,g,e,t,a);if(!(A===void 0?w===I||s(w,I,r,n,a):A)){S=!1;break}T||(T=g=="constructor")}if(S&&!T){var R=e.constructor,N=t.constructor;R!=N&&"constructor"in e&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof N=="function"&&N instanceof N)&&(S=!1)}return a.delete(e),a.delete(t),S}var nR=rR,kl=Hp,iR=Vp,sR=fI,aR=nR,Zp=Ec,Jp=wr,Qp=Yo,oR=Ko,uR=1,tg="[object Arguments]",eg="[object Array]",Ha="[object Object]",lR=Object.prototype,rg=lR.hasOwnProperty;function hR(e,t,r,n,s,a){var u=Jp(e),l=Jp(t),c=u?eg:Zp(e),f=l?eg:Zp(t);c=c==tg?Ha:c,f=f==tg?Ha:f;var p=c==Ha,m=f==Ha,g=c==f;if(g&&Qp(e)){if(!Qp(t))return!1;u=!0,p=!1}if(g&&!p)return a||(a=new kl),u||oR(e)?iR(e,t,r,n,s,a):sR(e,t,c,r,n,s,a);if(!(r&uR)){var x=p&&rg.call(e,"__wrapped__"),y=m&&rg.call(t,"__wrapped__");if(x||y){var S=x?e.value():e,T=y?t.value():t;return a||(a=new kl),s(S,T,r,n,a)}}return g?(a||(a=new kl),aR(e,t,r,n,s,a)):!1}var cR=hR,fR=cR,ng=Vi;function ig(e,t,r,n,s){return e===t?!0:e==null||t==null||!ng(e)&&!ng(t)?e!==e&&t!==t:fR(e,t,r,n,ig,s)}var sg=ig,dR=Hp,pR=sg,gR=1,mR=2;function vR(e,t,r,n){var s=r.length,a=s,u=!n;if(e==null)return!a;for(e=Object(e);s--;){var l=r[s];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){l=r[s];var c=l[0],f=e[c],p=l[1];if(u&&l[2]){if(f===void 0&&!(c in e))return!1}else{var m=new dR;if(n)var g=n(f,p,c,e,t,m);if(!(g===void 0?pR(p,f,gR|mR,n,m):g))return!1}}return!0}var yR=vR,_R=Hi;function xR(e){return e===e&&!_R(e)}var ag=xR,bR=ag,TR=Ll;function wR(e){for(var t=TR(e),r=t.length;r--;){var n=t[r],s=e[n];t[r]=[n,s,bR(s)]}return t}var SR=wR;function AR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var og=AR,CR=yR,ER=SR,IR=og;function RR(e){var t=ER(e);return t.length==1&&t[0][2]?IR(t[0][0],t[0][1]):function(r){return r===e||CR(r,e,t)}}var PR=RR,MR=wr,OR=Ba,FR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NR=/^\w*$/;function LR(e,t){if(MR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||OR(e)?!0:NR.test(e)||!FR.test(e)||t!=null&&e in Object(t)}var Bl=LR,ug=Fl,kR="Expected a function";function Dl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(kR);var r=function(){var n=arguments,s=t?t.apply(this,n):n[0],a=r.cache;if(a.has(s))return a.get(s);var u=e.apply(this,n);return r.cache=a.set(s,u)||a,u};return r.cache=new(Dl.Cache||ug),r}Dl.Cache=ug;var BR=Dl,DR=BR,UR=500;function $R(e){var t=DR(e,function(n){return r.size===UR&&r.clear(),n}),r=t.cache;return t}var GR=$R,zR=GR,HR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VR=/\\(\\)?/g,jR=zR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(HR,function(r,n,s,a){t.push(s?a.replace(VR,"$1"):n||r)}),t}),XR=jR,lg=ks,WR=Up,qR=wr,YR=Ba,KR=1/0,hg=lg?lg.prototype:void 0,cg=hg?hg.toString:void 0;function fg(e){if(typeof e=="string")return e;if(qR(e))return WR(e,fg)+"";if(YR(e))return cg?cg.call(e):"";var t=e+"";return t=="0"&&1/e==-KR?"-0":t}var ZR=fg,JR=ZR;function QR(e){return e==null?"":JR(e)}var tP=QR,eP=wr,rP=Bl,nP=XR,iP=tP;function sP(e,t){return eP(e)?e:rP(e,t)?[e]:nP(iP(e))}var dg=sP,aP=Ba,oP=1/0;function uP(e){if(typeof e=="string"||aP(e))return e;var t=e+"";return t=="0"&&1/e==-oP?"-0":t}var Va=uP,lP=dg,hP=Va;function cP(e,t){t=lP(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hP(t[r++])];return r&&r==n?e:void 0}var pg=cP,fP=pg;function dP(e,t,r){var n=e==null?void 0:fP(e,t);return n===void 0?r:n}var pP=dP;function gP(e,t){return e!=null&&t in Object(e)}var mP=gP,vP=dg,yP=Wo,_P=wr,xP=Yp,bP=qo,TP=Va;function wP(e,t,r){t=vP(t,e);for(var n=-1,s=t.length,a=!1;++n<s;){var u=TP(t[n]);if(!(a=e!=null&&r(e,u)))break;e=e[u]}return a||++n!=s?a:(s=e==null?0:e.length,!!s&&bP(s)&&xP(u,s)&&(_P(e)||yP(e)))}var SP=wP,AP=mP,CP=SP;function EP(e,t){return e!=null&&CP(e,t,AP)}var IP=EP,RP=sg,PP=pP,MP=IP,OP=Bl,FP=ag,NP=og,LP=Va,kP=1,BP=2;function DP(e,t){return OP(e)&&FP(t)?NP(LP(e),t):function(r){var n=PP(r,e);return n===void 0&&n===t?MP(r,e):RP(t,n,kP|BP)}}var UP=DP;function $P(e){return e}var GP=$P;function zP(e){return function(t){return t==null?void 0:t[e]}}var HP=zP,VP=pg;function jP(e){return function(t){return VP(t,e)}}var XP=jP,WP=HP,qP=XP,YP=Bl,KP=Va;function ZP(e){return YP(e)?WP(KP(e)):qP(e)}var JP=ZP,QP=PR,tM=UP,eM=GP,rM=wr,nM=JP;function iM(e){return typeof e=="function"?e:e==null?eM:typeof e=="object"?rM(e)?tM(e[0],e[1]):QP(e):nM(e)}var sM=iM;function aM(e){return function(t,r,n){for(var s=-1,a=Object(t),u=n(t),l=u.length;l--;){var c=u[e?l:++s];if(r(a[c],c,a)===!1)break}return t}}var oM=aM,uM=oM,lM=uM(),hM=lM,cM=hM,fM=Ll;function dM(e,t){return e&&cM(e,t,fM)}var pM=dM,gM=Bs;function mM(e,t){return function(r,n){if(r==null)return r;if(!gM(r))return e(r,n);for(var s=r.length,a=t?s:-1,u=Object(r);(t?a--:++a<s)&&n(u[a],a,u)!==!1;);return r}}var vM=mM,yM=pM,_M=vM,xM=_M(yM),bM=xM,TM=bM,wM=Bs;function SM(e,t){var r=-1,n=wM(e)?Array(e.length):[];return TM(e,function(s,a,u){n[++r]=t(s,a,u)}),n}var AM=SM,CM=Up,EM=sM,IM=AM,RM=wr;function PM(e,t){var r=RM(e)?CM:IM;return r(e,EM(t))}var MM=PM;const OM=Hn(MM);var Fn={},gg={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.loop=Ur.conditional=Ur.parse=void 0;var FM=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(u){return e(t,u,n,s)});else if(typeof r=="function")r(t,n,s,e);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(s[a]={},e(t,r[a],n,s[a])):s[a]=r[a](t,n,s,e)}return n};Ur.parse=FM;var NM=function(t,r){return function(n,s,a,u){r(n,s,a)&&u(n,t,s,a)}};Ur.conditional=NM;var LM=function(t,r){return function(n,s,a,u){for(var l=[],c=n.pos;r(n,s,a);){var f={};if(u(n,t,s,f),n.pos===c)break;c=n.pos,l.push(f)}return l}};Ur.loop=LM;var le={};Object.defineProperty(le,"__esModule",{value:!0}),le.readBits=le.readArray=le.readUnsigned=le.readString=le.peekBytes=le.readBytes=le.peekByte=le.readByte=le.buildStream=void 0;var kM=function(t){return{data:t,pos:0}};le.buildStream=kM;var mg=function(){return function(t){return t.data[t.pos++]}};le.readByte=mg;var BM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};le.peekByte=BM;var ja=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};le.readBytes=ja;var DM=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};le.peekBytes=DM;var UM=function(t){return function(r){return Array.from(ja(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};le.readString=UM;var $M=function(t){return function(r){var n=ja(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};le.readUnsigned=$M;var GM=function(t,r){return function(n,s,a){for(var u=typeof r=="function"?r(n,s,a):r,l=ja(t),c=new Array(u),f=0;f<u;f++)c[f]=l(n);return c}};le.readArray=GM;var zM=function(t,r,n){for(var s=0,a=0;a<n;a++)s+=t[r+a]&&Math.pow(2,n-a-1);return s},HM=function(t){return function(r){for(var n=mg()(r),s=new Array(8),a=0;a<8;a++)s[7-a]=!!(n&1<<a);return Object.keys(t).reduce(function(u,l){var c=t[l];return c.length?u[l]=zM(s,c.index,c.length):u[l]=s[c.index],u},{})}};le.readBits=HM,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ur,r=le,n={blocks:function(g){for(var x=0,y=[],S=g.data.length,T=0,w=(0,r.readByte)()(g);w!==x&&w;w=(0,r.readByte)()(g)){if(g.pos+w>=S){var I=S-g.pos;y.push((0,r.readBytes)(I)(g)),T+=I;break}y.push((0,r.readBytes)(w)(g)),T+=w}for(var A=new Uint8Array(T),R=0,N=0;N<y.length;N++)A.set(y[N],R),R+=y[N].length;return A}},s=(0,t.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(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===249}),a=(0,t.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,t.conditional)({lct:(0,r.readArray)(3,function(m,g,x){return Math.pow(2,x.descriptor.lct.size+1)})},function(m,g,x){return x.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(m){return(0,r.peekByte)()(m)===44}),u=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(g,x,y){return(0,r.readBytes)(y.text.blockSize)(g)}},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===1}),l=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(g,x,y){return(0,r.readString)(y.blockSize)(g)}},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===255}),c=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===254}),f=[{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,t.conditional)({gct:(0,r.readArray)(3,function(m,g){return Math.pow(2,g.lsd.gct.size+1)})},function(m,g){return g.lsd.gct.exists}),{frames:(0,t.loop)([s,l,c,a,u],function(m){var g=(0,r.peekByte)()(m);return g===33||g===44})}],p=f;e.default=p}(gg);var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.deinterlace=void 0;var VM=function(t,r){for(var n=new Array(t.length),s=t.length/r,a=function(g,x){var y=t.slice(x*r,(x+1)*r);n.splice.apply(n,[g*r,r].concat(y))},u=[0,4,2,1],l=[8,8,4,2],c=0,f=0;f<4;f++)for(var p=u[f];p<s;p+=l[f])a(p,c),c++;return n};Xa.deinterlace=VM;var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.lzw=void 0;var jM=function(t,r,n){var s=4096,a=-1,u=n,l,c,f,p,m,g,x,B,y,S,N,T,L,O,X,z,w=new Array(n),I=new Array(s),A=new Array(s),R=new Array(s+1);for(T=t,c=1<<T,m=c+1,l=c+2,x=a,p=T+1,f=(1<<p)-1,y=0;y<c;y++)I[y]=0,A[y]=y;var N,B,L,O,z,X;for(N=B=L=O=z=X=0,S=0;S<u;){if(O===0){if(B<p){N+=r[X]<<B,B+=8,X++;continue}if(y=N&f,N>>=p,B-=p,y>l||y==m)break;if(y==c){p=T+1,f=(1<<p)-1,l=c+2,x=a;continue}if(x==a){R[O++]=A[y],x=y,L=y;continue}for(g=y,y==l&&(R[O++]=L,y=x);y>c;)R[O++]=A[y],y=I[y];L=A[y]&255,R[O++]=L,l<s&&(I[l]=x,A[l]=L,l++,!(l&f)&&l<s&&(p++,f+=l)),x=g}O--,w[z++]=R[O],S++}for(S=z;S<u;S++)w[S]=0;return w};Wa.lzw=jM,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.decompressFrames=Fn.decompressFrame=Fn.parseGIF=void 0;var XM=ZM(gg),WM=Ur,qM=le,YM=Xa,KM=Wa;function ZM(e){return e&&e.__esModule?e:{default:e}}var JM=function(t){var r=new Uint8Array(t);return(0,WM.parse)((0,qM.buildStream)(r),XM.default)};Fn.parseGIF=JM;var QM=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),s=0;s<r;s++){var a=s*4,u=t.pixels[s],l=t.colorTable[u]||[0,0,0];n[a]=l[0],n[a+1]=l[1],n[a+2]=l[2],n[a+3]=u!==t.transparentIndex?255:0}return n},vg=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var s=t.image,a=s.descriptor.width*s.descriptor.height,u=(0,KM.lzw)(s.data.minCodeSize,s.data.blocks,a);s.descriptor.lct.interlaced&&(u=(0,YM.deinterlace)(u,s.descriptor.width));var l={pixels:u,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return s.descriptor.lct&&s.descriptor.lct.exists?l.colorTable=s.lct:l.colorTable=r,t.gce&&(l.delay=(t.gce.delay||10)*10,l.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(l.transparentIndex=t.gce.transparentColorIndex)),n&&(l.patch=QM(l)),l};Fn.decompressFrame=vg;var tO=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return vg(n,t.gct,r)})};Fn.decompressFrames=tO;const yg=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...s}=t,a={...e,...s};return r&&Object.assign(a,{playing:a.autoPlay&&a.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(a,{length:a.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(a,{index:a.length===0?0:(a.length+a.index)%a.length}),t.playing!=null&&Object.assign(a,a.loaded?{playing:n}:{autoPlay:n}),a},eO=e=>yg({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),rO=e=>W.useReducer(yg,e,eO);var nO='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 iO(e){const t=new Blob([nO],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const sO=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),aO=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),W.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&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},oO=e=>{const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t},uO=e=>{const t=oO(e);return W.useCallback(r=>t.current&&t.current(r),[])},lO=aO(()=>new iO,e=>e.terminate()),hO=(e,t)=>{const r=uO(t),n=lO();W.useEffect(()=>{if(typeof e=="string"){const s=a=>{const u=a.data||a;if(u.src===e){const l=u.error?u:sO(u);r(l)}};return n.addEventListener("message",s),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",s)}}},[n,e])},cO=({isPlaying:e,forwardRef:t,...r})=>{const n=st.useRef(null);return st.useImperativeHandle(t,()=>n.current,[n]),st.useEffect(()=>{if(n.current===null)return;const s=n.current;s[e?"gotoAndPlay":"gotoAndStop"](s.currentFrame)},[e]),Mt.jsx(Yt.AnimatedSprite,{ref:n,...r,isPlaying:e})},_g=st.memo(cO);var qa={exports:{}};/**
1935
1935
  * @license
1936
1936
  * Lodash <https://lodash.com/>
1937
1937
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1938
1938
  * Released under MIT license <https://lodash.com/license>
1939
1939
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1940
1940
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1941
- */ea.exports,function(e,t){(function(){var r,n="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",p=1,c=2,v=4,y=1,_=2,b=1,m=2,w=4,T=8,x=16,E=32,I=64,O=128,A=256,L=512,R=30,C="...",P=800,M=16,F=1,q=2,Z=3,z=1/0,nt=9007199254740991,V=17976931348623157e292,D=0/0,k=4294967295,G=k-1,j=k>>>1,Q=[["ary",O],["bind",b],["bindKey",m],["curry",T],["curryRight",x],["flip",L],["partial",E],["partialRight",I],["rearg",A]],K="[object Arguments]",$="[object Array]",W="[object AsyncFunction]",et="[object Boolean]",Y="[object Date]",rt="[object DOMException]",ot="[object Error]",pt="[object Function]",vt="[object GeneratorFunction]",_t="[object Map]",At="[object Number]",ne="[object Null]",Ut="[object Object]",it="[object Promise]",ut="[object Proxy]",dt="[object RegExp]",gt="[object Set]",at="[object String]",It="[object Symbol]",St="[object Undefined]",Mt="[object WeakMap]",He="[object WeakSet]",Ge="[object ArrayBuffer]",Qt="[object DataView]",Ss="[object Float32Array]",he="[object Float64Array]",ur="[object Int8Array]",zu="[object Int16Array]",Hu="[object Int32Array]",Vu="[object Uint8Array]",Wu="[object Uint8ClampedArray]",Xu="[object Uint16Array]",Ku="[object Uint32Array]",EN=/\b__p \+= '';/g,SN=/\b(__p \+=) '' \+/g,AN=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Cv=/&(?:amp|lt|gt|quot|#39);/g,Rv=/[&<>"']/g,ON=RegExp(Cv.source),CN=RegExp(Rv.source),RN=/<%-([\s\S]+?)%>/g,IN=/<%([\s\S]+?)%>/g,Iv=/<%=([\s\S]+?)%>/g,PN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NN=/^\w*$/,MN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yu=/[\\^$.*+?()[\]{}|]/g,kN=RegExp(Yu.source),Zu=/^\s+/,LN=/\s/,FN=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,BN=/\{\n\/\* \[wrapped with (.+)\] \*/,DN=/,? & /,UN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$N=/[()=,{}\[\]\/\s]/,GN=/\\(\\)?/g,jN=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pv=/\w*$/,qN=/^[-+]0x[0-9a-f]+$/i,zN=/^0b[01]+$/i,HN=/^\[object .+?Constructor\]$/,VN=/^0o[0-7]+$/i,WN=/^(?:0|[1-9]\d*)$/,XN=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ra=/($^)/,KN=/['\n\r\u2028\u2029\\]/g,na="\\ud800-\\udfff",YN="\\u0300-\\u036f",ZN="\\ufe20-\\ufe2f",QN="\\u20d0-\\u20ff",Nv=YN+ZN+QN,Mv="\\u2700-\\u27bf",kv="a-z\\xdf-\\xf6\\xf8-\\xff",JN="\\xac\\xb1\\xd7\\xf7",tM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eM="\\u2000-\\u206f",rM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lv="A-Z\\xc0-\\xd6\\xd8-\\xde",Fv="\\ufe0e\\ufe0f",Bv=JN+tM+eM+rM,Qu="['’]",nM="["+na+"]",Dv="["+Bv+"]",ia="["+Nv+"]",Uv="\\d+",iM="["+Mv+"]",$v="["+kv+"]",Gv="[^"+na+Bv+Uv+Mv+kv+Lv+"]",Ju="\\ud83c[\\udffb-\\udfff]",sM="(?:"+ia+"|"+Ju+")",jv="[^"+na+"]",tf="(?:\\ud83c[\\udde6-\\uddff]){2}",ef="[\\ud800-\\udbff][\\udc00-\\udfff]",Li="["+Lv+"]",qv="\\u200d",zv="(?:"+$v+"|"+Gv+")",oM="(?:"+Li+"|"+Gv+")",Hv="(?:"+Qu+"(?:d|ll|m|re|s|t|ve))?",Vv="(?:"+Qu+"(?:D|LL|M|RE|S|T|VE))?",Wv=sM+"?",Xv="["+Fv+"]?",aM="(?:"+qv+"(?:"+[jv,tf,ef].join("|")+")"+Xv+Wv+")*",lM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",uM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kv=Xv+Wv+aM,fM="(?:"+[iM,tf,ef].join("|")+")"+Kv,cM="(?:"+[jv+ia+"?",ia,tf,ef,nM].join("|")+")",hM=RegExp(Qu,"g"),dM=RegExp(ia,"g"),rf=RegExp(Ju+"(?="+Ju+")|"+cM+Kv,"g"),pM=RegExp([Li+"?"+$v+"+"+Hv+"(?="+[Dv,Li,"$"].join("|")+")",oM+"+"+Vv+"(?="+[Dv,Li+zv,"$"].join("|")+")",Li+"?"+zv+"+"+Hv,Li+"+"+Vv,uM,lM,Uv,fM].join("|"),"g"),vM=RegExp("["+qv+na+Nv+Fv+"]"),gM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mM=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],yM=-1,fe={};fe[Ss]=fe[he]=fe[ur]=fe[zu]=fe[Hu]=fe[Vu]=fe[Wu]=fe[Xu]=fe[Ku]=!0,fe[K]=fe[$]=fe[Ge]=fe[et]=fe[Qt]=fe[Y]=fe[ot]=fe[pt]=fe[_t]=fe[At]=fe[Ut]=fe[dt]=fe[gt]=fe[at]=fe[Mt]=!1;var ae={};ae[K]=ae[$]=ae[Ge]=ae[Qt]=ae[et]=ae[Y]=ae[Ss]=ae[he]=ae[ur]=ae[zu]=ae[Hu]=ae[_t]=ae[At]=ae[Ut]=ae[dt]=ae[gt]=ae[at]=ae[It]=ae[Vu]=ae[Wu]=ae[Xu]=ae[Ku]=!0,ae[ot]=ae[pt]=ae[Mt]=!1;var _M={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},bM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},xM={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},wM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},TM=parseFloat,EM=parseInt,Yv=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,SM=typeof self=="object"&&self&&self.Object===Object&&self,Me=Yv||SM||Function("return this")(),nf=t&&!t.nodeType&&t,Hn=nf&&!0&&e&&!e.nodeType&&e,Zv=Hn&&Hn.exports===nf,sf=Zv&&Yv.process,fr=function(){try{var J=Hn&&Hn.require&&Hn.require("util").types;return J||sf&&sf.binding&&sf.binding("util")}catch{}}(),Qv=fr&&fr.isArrayBuffer,Jv=fr&&fr.isDate,tg=fr&&fr.isMap,eg=fr&&fr.isRegExp,rg=fr&&fr.isSet,ng=fr&&fr.isTypedArray;function er(J,lt,st){switch(st.length){case 0:return J.call(lt);case 1:return J.call(lt,st[0]);case 2:return J.call(lt,st[0],st[1]);case 3:return J.call(lt,st[0],st[1],st[2])}return J.apply(lt,st)}function AM(J,lt,st,xt){for(var Nt=-1,Yt=J==null?0:J.length;++Nt<Yt;){var Se=J[Nt];lt(xt,Se,st(Se),J)}return xt}function cr(J,lt){for(var st=-1,xt=J==null?0:J.length;++st<xt&&lt(J[st],st,J)!==!1;);return J}function OM(J,lt){for(var st=J==null?0:J.length;st--&&lt(J[st],st,J)!==!1;);return J}function ig(J,lt){for(var st=-1,xt=J==null?0:J.length;++st<xt;)if(!lt(J[st],st,J))return!1;return!0}function vn(J,lt){for(var st=-1,xt=J==null?0:J.length,Nt=0,Yt=[];++st<xt;){var Se=J[st];lt(Se,st,J)&&(Yt[Nt++]=Se)}return Yt}function sa(J,lt){var st=J==null?0:J.length;return!!st&&Fi(J,lt,0)>-1}function of(J,lt,st){for(var xt=-1,Nt=J==null?0:J.length;++xt<Nt;)if(st(lt,J[xt]))return!0;return!1}function de(J,lt){for(var st=-1,xt=J==null?0:J.length,Nt=Array(xt);++st<xt;)Nt[st]=lt(J[st],st,J);return Nt}function gn(J,lt){for(var st=-1,xt=lt.length,Nt=J.length;++st<xt;)J[Nt+st]=lt[st];return J}function af(J,lt,st,xt){var Nt=-1,Yt=J==null?0:J.length;for(xt&&Yt&&(st=J[++Nt]);++Nt<Yt;)st=lt(st,J[Nt],Nt,J);return st}function CM(J,lt,st,xt){var Nt=J==null?0:J.length;for(xt&&Nt&&(st=J[--Nt]);Nt--;)st=lt(st,J[Nt],Nt,J);return st}function lf(J,lt){for(var st=-1,xt=J==null?0:J.length;++st<xt;)if(lt(J[st],st,J))return!0;return!1}var RM=uf("length");function IM(J){return J.split("")}function PM(J){return J.match(UN)||[]}function sg(J,lt,st){var xt;return st(J,function(Nt,Yt,Se){if(lt(Nt,Yt,Se))return xt=Yt,!1}),xt}function oa(J,lt,st,xt){for(var Nt=J.length,Yt=st+(xt?1:-1);xt?Yt--:++Yt<Nt;)if(lt(J[Yt],Yt,J))return Yt;return-1}function Fi(J,lt,st){return lt===lt?qM(J,lt,st):oa(J,og,st)}function NM(J,lt,st,xt){for(var Nt=st-1,Yt=J.length;++Nt<Yt;)if(xt(J[Nt],lt))return Nt;return-1}function og(J){return J!==J}function ag(J,lt){var st=J==null?0:J.length;return st?cf(J,lt)/st:D}function uf(J){return function(lt){return lt==null?r:lt[J]}}function ff(J){return function(lt){return J==null?r:J[lt]}}function lg(J,lt,st,xt,Nt){return Nt(J,function(Yt,Se,se){st=xt?(xt=!1,Yt):lt(st,Yt,Se,se)}),st}function MM(J,lt){var st=J.length;for(J.sort(lt);st--;)J[st]=J[st].value;return J}function cf(J,lt){for(var st,xt=-1,Nt=J.length;++xt<Nt;){var Yt=lt(J[xt]);Yt!==r&&(st=st===r?Yt:st+Yt)}return st}function hf(J,lt){for(var st=-1,xt=Array(J);++st<J;)xt[st]=lt(st);return xt}function kM(J,lt){return de(lt,function(st){return[st,J[st]]})}function ug(J){return J&&J.slice(0,dg(J)+1).replace(Zu,"")}function rr(J){return function(lt){return J(lt)}}function df(J,lt){return de(lt,function(st){return J[st]})}function As(J,lt){return J.has(lt)}function fg(J,lt){for(var st=-1,xt=J.length;++st<xt&&Fi(lt,J[st],0)>-1;);return st}function cg(J,lt){for(var st=J.length;st--&&Fi(lt,J[st],0)>-1;);return st}function LM(J,lt){for(var st=J.length,xt=0;st--;)J[st]===lt&&++xt;return xt}var FM=ff(_M),BM=ff(bM);function DM(J){return"\\"+wM[J]}function UM(J,lt){return J==null?r:J[lt]}function Bi(J){return vM.test(J)}function $M(J){return gM.test(J)}function GM(J){for(var lt,st=[];!(lt=J.next()).done;)st.push(lt.value);return st}function pf(J){var lt=-1,st=Array(J.size);return J.forEach(function(xt,Nt){st[++lt]=[Nt,xt]}),st}function hg(J,lt){return function(st){return J(lt(st))}}function mn(J,lt){for(var st=-1,xt=J.length,Nt=0,Yt=[];++st<xt;){var Se=J[st];(Se===lt||Se===d)&&(J[st]=d,Yt[Nt++]=st)}return Yt}function aa(J){var lt=-1,st=Array(J.size);return J.forEach(function(xt){st[++lt]=xt}),st}function jM(J){var lt=-1,st=Array(J.size);return J.forEach(function(xt){st[++lt]=[xt,xt]}),st}function qM(J,lt,st){for(var xt=st-1,Nt=J.length;++xt<Nt;)if(J[xt]===lt)return xt;return-1}function zM(J,lt,st){for(var xt=st+1;xt--;)if(J[xt]===lt)return xt;return xt}function Di(J){return Bi(J)?VM(J):RM(J)}function Rr(J){return Bi(J)?WM(J):IM(J)}function dg(J){for(var lt=J.length;lt--&&LN.test(J.charAt(lt)););return lt}var HM=ff(xM);function VM(J){for(var lt=rf.lastIndex=0;rf.test(J);)++lt;return lt}function WM(J){return J.match(rf)||[]}function XM(J){return J.match(pM)||[]}var KM=function J(lt){lt=lt==null?Me:Ui.defaults(Me.Object(),lt,Ui.pick(Me,mM));var st=lt.Array,xt=lt.Date,Nt=lt.Error,Yt=lt.Function,Se=lt.Math,se=lt.Object,vf=lt.RegExp,YM=lt.String,hr=lt.TypeError,la=st.prototype,ZM=Yt.prototype,$i=se.prototype,ua=lt["__core-js_shared__"],fa=ZM.toString,ee=$i.hasOwnProperty,QM=0,pg=function(){var s=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ca=$i.toString,JM=fa.call(se),t3=Me._,e3=vf("^"+fa.call(ee).replace(Yu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ha=Zv?lt.Buffer:r,yn=lt.Symbol,da=lt.Uint8Array,vg=ha?ha.allocUnsafe:r,pa=hg(se.getPrototypeOf,se),gg=se.create,mg=$i.propertyIsEnumerable,va=la.splice,yg=yn?yn.isConcatSpreadable:r,Os=yn?yn.iterator:r,Vn=yn?yn.toStringTag:r,ga=function(){try{var s=Zn(se,"defineProperty");return s({},"",{}),s}catch{}}(),r3=lt.clearTimeout!==Me.clearTimeout&&lt.clearTimeout,n3=xt&&xt.now!==Me.Date.now&&xt.now,i3=lt.setTimeout!==Me.setTimeout&&lt.setTimeout,ma=Se.ceil,ya=Se.floor,gf=se.getOwnPropertySymbols,s3=ha?ha.isBuffer:r,_g=lt.isFinite,o3=la.join,a3=hg(se.keys,se),Ae=Se.max,De=Se.min,l3=xt.now,u3=lt.parseInt,bg=Se.random,f3=la.reverse,mf=Zn(lt,"DataView"),Cs=Zn(lt,"Map"),yf=Zn(lt,"Promise"),Gi=Zn(lt,"Set"),Rs=Zn(lt,"WeakMap"),Is=Zn(se,"create"),_a=Rs&&new Rs,ji={},c3=Qn(mf),h3=Qn(Cs),d3=Qn(yf),p3=Qn(Gi),v3=Qn(Rs),ba=yn?yn.prototype:r,Ps=ba?ba.valueOf:r,xg=ba?ba.toString:r;function B(s){if(ye(s)&&!kt(s)&&!(s instanceof jt)){if(s instanceof dr)return s;if(ee.call(s,"__wrapped__"))return wm(s)}return new dr(s)}var qi=function(){function s(){}return function(l){if(!me(l))return{};if(gg)return gg(l);s.prototype=l;var g=new s;return s.prototype=r,g}}();function xa(){}function dr(s,l){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}B.templateSettings={escape:RN,evaluate:IN,interpolate:Iv,variable:"",imports:{_:B}},B.prototype=xa.prototype,B.prototype.constructor=B,dr.prototype=qi(xa.prototype),dr.prototype.constructor=dr;function jt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=k,this.__views__=[]}function g3(){var s=new jt(this.__wrapped__);return s.__actions__=Ve(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Ve(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Ve(this.__views__),s}function m3(){if(this.__filtered__){var s=new jt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function y3(){var s=this.__wrapped__.value(),l=this.__dir__,g=kt(s),S=l<0,N=g?s.length:0,U=Ik(0,N,this.__views__),H=U.start,X=U.end,tt=X-H,ft=S?X:H-1,ct=this.__iteratees__,ht=ct.length,yt=0,wt=De(tt,this.__takeCount__);if(!g||!S&&N==tt&&wt==tt)return Hg(s,this.__actions__);var Ct=[];t:for(;tt--&&yt<wt;){ft+=l;for(var Ft=-1,Rt=s[ft];++Ft<ht;){var $t=ct[Ft],zt=$t.iteratee,sr=$t.type,ze=zt(Rt);if(sr==q)Rt=ze;else if(!ze){if(sr==F)continue t;break t}}Ct[yt++]=Rt}return Ct}jt.prototype=qi(xa.prototype),jt.prototype.constructor=jt;function Wn(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function _3(){this.__data__=Is?Is(null):{},this.size=0}function b3(s){var l=this.has(s)&&delete this.__data__[s];return this.size-=l?1:0,l}function x3(s){var l=this.__data__;if(Is){var g=l[s];return g===f?r:g}return ee.call(l,s)?l[s]:r}function w3(s){var l=this.__data__;return Is?l[s]!==r:ee.call(l,s)}function T3(s,l){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Is&&l===r?f:l,this}Wn.prototype.clear=_3,Wn.prototype.delete=b3,Wn.prototype.get=x3,Wn.prototype.has=w3,Wn.prototype.set=T3;function Zr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function E3(){this.__data__=[],this.size=0}function S3(s){var l=this.__data__,g=wa(l,s);if(g<0)return!1;var S=l.length-1;return g==S?l.pop():va.call(l,g,1),--this.size,!0}function A3(s){var l=this.__data__,g=wa(l,s);return g<0?r:l[g][1]}function O3(s){return wa(this.__data__,s)>-1}function C3(s,l){var g=this.__data__,S=wa(g,s);return S<0?(++this.size,g.push([s,l])):g[S][1]=l,this}Zr.prototype.clear=E3,Zr.prototype.delete=S3,Zr.prototype.get=A3,Zr.prototype.has=O3,Zr.prototype.set=C3;function Qr(s){var l=-1,g=s==null?0:s.length;for(this.clear();++l<g;){var S=s[l];this.set(S[0],S[1])}}function R3(){this.size=0,this.__data__={hash:new Wn,map:new(Cs||Zr),string:new Wn}}function I3(s){var l=ka(this,s).delete(s);return this.size-=l?1:0,l}function P3(s){return ka(this,s).get(s)}function N3(s){return ka(this,s).has(s)}function M3(s,l){var g=ka(this,s),S=g.size;return g.set(s,l),this.size+=g.size==S?0:1,this}Qr.prototype.clear=R3,Qr.prototype.delete=I3,Qr.prototype.get=P3,Qr.prototype.has=N3,Qr.prototype.set=M3;function Xn(s){var l=-1,g=s==null?0:s.length;for(this.__data__=new Qr;++l<g;)this.add(s[l])}function k3(s){return this.__data__.set(s,f),this}function L3(s){return this.__data__.has(s)}Xn.prototype.add=Xn.prototype.push=k3,Xn.prototype.has=L3;function Ir(s){var l=this.__data__=new Zr(s);this.size=l.size}function F3(){this.__data__=new Zr,this.size=0}function B3(s){var l=this.__data__,g=l.delete(s);return this.size=l.size,g}function D3(s){return this.__data__.get(s)}function U3(s){return this.__data__.has(s)}function $3(s,l){var g=this.__data__;if(g instanceof Zr){var S=g.__data__;if(!Cs||S.length<i-1)return S.push([s,l]),this.size=++g.size,this;g=this.__data__=new Qr(S)}return g.set(s,l),this.size=g.size,this}Ir.prototype.clear=F3,Ir.prototype.delete=B3,Ir.prototype.get=D3,Ir.prototype.has=U3,Ir.prototype.set=$3;function wg(s,l){var g=kt(s),S=!g&&Jn(s),N=!g&&!S&&Tn(s),U=!g&&!S&&!N&&Wi(s),H=g||S||N||U,X=H?hf(s.length,YM):[],tt=X.length;for(var ft in s)(l||ee.call(s,ft))&&!(H&&(ft=="length"||N&&(ft=="offset"||ft=="parent")||U&&(ft=="buffer"||ft=="byteLength"||ft=="byteOffset")||rn(ft,tt)))&&X.push(ft);return X}function Tg(s){var l=s.length;return l?s[Rf(0,l-1)]:r}function G3(s,l){return La(Ve(s),Kn(l,0,s.length))}function j3(s){return La(Ve(s))}function _f(s,l,g){(g!==r&&!Pr(s[l],g)||g===r&&!(l in s))&&Jr(s,l,g)}function Ns(s,l,g){var S=s[l];(!(ee.call(s,l)&&Pr(S,g))||g===r&&!(l in s))&&Jr(s,l,g)}function wa(s,l){for(var g=s.length;g--;)if(Pr(s[g][0],l))return g;return-1}function q3(s,l,g,S){return _n(s,function(N,U,H){l(S,N,g(N),H)}),S}function Eg(s,l){return s&&jr(l,Pe(l),s)}function z3(s,l){return s&&jr(l,Xe(l),s)}function Jr(s,l,g){l=="__proto__"&&ga?ga(s,l,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[l]=g}function bf(s,l){for(var g=-1,S=l.length,N=st(S),U=s==null;++g<S;)N[g]=U?r:tc(s,l[g]);return N}function Kn(s,l,g){return s===s&&(g!==r&&(s=s<=g?s:g),l!==r&&(s=s>=l?s:l)),s}function pr(s,l,g,S,N,U){var H,X=l&p,tt=l&c,ft=l&v;if(g&&(H=N?g(s,S,N,U):g(s)),H!==r)return H;if(!me(s))return s;var ct=kt(s);if(ct){if(H=Nk(s),!X)return Ve(s,H)}else{var ht=Ue(s),yt=ht==pt||ht==vt;if(Tn(s))return Xg(s,X);if(ht==Ut||ht==K||yt&&!N){if(H=tt||yt?{}:dm(s),!X)return tt?xk(s,z3(H,s)):bk(s,Eg(H,s))}else{if(!ae[ht])return N?s:{};H=Mk(s,ht,X)}}U||(U=new Ir);var wt=U.get(s);if(wt)return wt;U.set(s,H),jm(s)?s.forEach(function(Rt){H.add(pr(Rt,l,g,Rt,s,U))}):$m(s)&&s.forEach(function(Rt,$t){H.set($t,pr(Rt,l,g,$t,s,U))});var Ct=ft?tt?$f:Uf:tt?Xe:Pe,Ft=ct?r:Ct(s);return cr(Ft||s,function(Rt,$t){Ft&&($t=Rt,Rt=s[$t]),Ns(H,$t,pr(Rt,l,g,$t,s,U))}),H}function H3(s){var l=Pe(s);return function(g){return Sg(g,s,l)}}function Sg(s,l,g){var S=g.length;if(s==null)return!S;for(s=se(s);S--;){var N=g[S],U=l[N],H=s[N];if(H===r&&!(N in s)||!U(H))return!1}return!0}function Ag(s,l,g){if(typeof s!="function")throw new hr(a);return Us(function(){s.apply(r,g)},l)}function Ms(s,l,g,S){var N=-1,U=sa,H=!0,X=s.length,tt=[],ft=l.length;if(!X)return tt;g&&(l=de(l,rr(g))),S?(U=of,H=!1):l.length>=i&&(U=As,H=!1,l=new Xn(l));t:for(;++N<X;){var ct=s[N],ht=g==null?ct:g(ct);if(ct=S||ct!==0?ct:0,H&&ht===ht){for(var yt=ft;yt--;)if(l[yt]===ht)continue t;tt.push(ct)}else U(l,ht,S)||tt.push(ct)}return tt}var _n=Jg(Gr),Og=Jg(wf,!0);function V3(s,l){var g=!0;return _n(s,function(S,N,U){return g=!!l(S,N,U),g}),g}function Ta(s,l,g){for(var S=-1,N=s.length;++S<N;){var U=s[S],H=l(U);if(H!=null&&(X===r?H===H&&!ir(H):g(H,X)))var X=H,tt=U}return tt}function W3(s,l,g,S){var N=s.length;for(g=Lt(g),g<0&&(g=-g>N?0:N+g),S=S===r||S>N?N:Lt(S),S<0&&(S+=N),S=g>S?0:zm(S);g<S;)s[g++]=l;return s}function Cg(s,l){var g=[];return _n(s,function(S,N,U){l(S,N,U)&&g.push(S)}),g}function ke(s,l,g,S,N){var U=-1,H=s.length;for(g||(g=Lk),N||(N=[]);++U<H;){var X=s[U];l>0&&g(X)?l>1?ke(X,l-1,g,S,N):gn(N,X):S||(N[N.length]=X)}return N}var xf=tm(),Rg=tm(!0);function Gr(s,l){return s&&xf(s,l,Pe)}function wf(s,l){return s&&Rg(s,l,Pe)}function Ea(s,l){return vn(l,function(g){return nn(s[g])})}function Yn(s,l){l=xn(l,s);for(var g=0,S=l.length;s!=null&&g<S;)s=s[qr(l[g++])];return g&&g==S?s:r}function Ig(s,l,g){var S=l(s);return kt(s)?S:gn(S,g(s))}function je(s){return s==null?s===r?St:ne:Vn&&Vn in se(s)?Rk(s):jk(s)}function Tf(s,l){return s>l}function X3(s,l){return s!=null&&ee.call(s,l)}function K3(s,l){return s!=null&&l in se(s)}function Y3(s,l,g){return s>=De(l,g)&&s<Ae(l,g)}function Ef(s,l,g){for(var S=g?of:sa,N=s[0].length,U=s.length,H=U,X=st(U),tt=1/0,ft=[];H--;){var ct=s[H];H&&l&&(ct=de(ct,rr(l))),tt=De(ct.length,tt),X[H]=!g&&(l||N>=120&&ct.length>=120)?new Xn(H&&ct):r}ct=s[0];var ht=-1,yt=X[0];t:for(;++ht<N&&ft.length<tt;){var wt=ct[ht],Ct=l?l(wt):wt;if(wt=g||wt!==0?wt:0,!(yt?As(yt,Ct):S(ft,Ct,g))){for(H=U;--H;){var Ft=X[H];if(!(Ft?As(Ft,Ct):S(s[H],Ct,g)))continue t}yt&&yt.push(Ct),ft.push(wt)}}return ft}function Z3(s,l,g,S){return Gr(s,function(N,U,H){l(S,g(N),U,H)}),S}function ks(s,l,g){l=xn(l,s),s=mm(s,l);var S=s==null?s:s[qr(gr(l))];return S==null?r:er(S,s,g)}function Pg(s){return ye(s)&&je(s)==K}function Q3(s){return ye(s)&&je(s)==Ge}function J3(s){return ye(s)&&je(s)==Y}function Ls(s,l,g,S,N){return s===l?!0:s==null||l==null||!ye(s)&&!ye(l)?s!==s&&l!==l:tk(s,l,g,S,Ls,N)}function tk(s,l,g,S,N,U){var H=kt(s),X=kt(l),tt=H?$:Ue(s),ft=X?$:Ue(l);tt=tt==K?Ut:tt,ft=ft==K?Ut:ft;var ct=tt==Ut,ht=ft==Ut,yt=tt==ft;if(yt&&Tn(s)){if(!Tn(l))return!1;H=!0,ct=!1}if(yt&&!ct)return U||(U=new Ir),H||Wi(s)?fm(s,l,g,S,N,U):Ok(s,l,tt,g,S,N,U);if(!(g&y)){var wt=ct&&ee.call(s,"__wrapped__"),Ct=ht&&ee.call(l,"__wrapped__");if(wt||Ct){var Ft=wt?s.value():s,Rt=Ct?l.value():l;return U||(U=new Ir),N(Ft,Rt,g,S,U)}}return yt?(U||(U=new Ir),Ck(s,l,g,S,N,U)):!1}function ek(s){return ye(s)&&Ue(s)==_t}function Sf(s,l,g,S){var N=g.length,U=N,H=!S;if(s==null)return!U;for(s=se(s);N--;){var X=g[N];if(H&&X[2]?X[1]!==s[X[0]]:!(X[0]in s))return!1}for(;++N<U;){X=g[N];var tt=X[0],ft=s[tt],ct=X[1];if(H&&X[2]){if(ft===r&&!(tt in s))return!1}else{var ht=new Ir;if(S)var yt=S(ft,ct,tt,s,l,ht);if(!(yt===r?Ls(ct,ft,y|_,S,ht):yt))return!1}}return!0}function Ng(s){if(!me(s)||Bk(s))return!1;var l=nn(s)?e3:HN;return l.test(Qn(s))}function rk(s){return ye(s)&&je(s)==dt}function nk(s){return ye(s)&&Ue(s)==gt}function ik(s){return ye(s)&&Ga(s.length)&&!!fe[je(s)]}function Mg(s){return typeof s=="function"?s:s==null?Ke:typeof s=="object"?kt(s)?Fg(s[0],s[1]):Lg(s):ey(s)}function Af(s){if(!Ds(s))return a3(s);var l=[];for(var g in se(s))ee.call(s,g)&&g!="constructor"&&l.push(g);return l}function sk(s){if(!me(s))return Gk(s);var l=Ds(s),g=[];for(var S in s)S=="constructor"&&(l||!ee.call(s,S))||g.push(S);return g}function Of(s,l){return s<l}function kg(s,l){var g=-1,S=We(s)?st(s.length):[];return _n(s,function(N,U,H){S[++g]=l(N,U,H)}),S}function Lg(s){var l=jf(s);return l.length==1&&l[0][2]?vm(l[0][0],l[0][1]):function(g){return g===s||Sf(g,s,l)}}function Fg(s,l){return zf(s)&&pm(l)?vm(qr(s),l):function(g){var S=tc(g,s);return S===r&&S===l?ec(g,s):Ls(l,S,y|_)}}function Sa(s,l,g,S,N){s!==l&&xf(l,function(U,H){if(N||(N=new Ir),me(U))ok(s,l,H,g,Sa,S,N);else{var X=S?S(Vf(s,H),U,H+"",s,l,N):r;X===r&&(X=U),_f(s,H,X)}},Xe)}function ok(s,l,g,S,N,U,H){var X=Vf(s,g),tt=Vf(l,g),ft=H.get(tt);if(ft){_f(s,g,ft);return}var ct=U?U(X,tt,g+"",s,l,H):r,ht=ct===r;if(ht){var yt=kt(tt),wt=!yt&&Tn(tt),Ct=!yt&&!wt&&Wi(tt);ct=tt,yt||wt||Ct?kt(X)?ct=X:xe(X)?ct=Ve(X):wt?(ht=!1,ct=Xg(tt,!0)):Ct?(ht=!1,ct=Kg(tt,!0)):ct=[]:$s(tt)||Jn(tt)?(ct=X,Jn(X)?ct=Hm(X):(!me(X)||nn(X))&&(ct=dm(tt))):ht=!1}ht&&(H.set(tt,ct),N(ct,tt,S,U,H),H.delete(tt)),_f(s,g,ct)}function Bg(s,l){var g=s.length;if(g)return l+=l<0?g:0,rn(l,g)?s[l]:r}function Dg(s,l,g){l.length?l=de(l,function(U){return kt(U)?function(H){return Yn(H,U.length===1?U[0]:U)}:U}):l=[Ke];var S=-1;l=de(l,rr(Ot()));var N=kg(s,function(U,H,X){var tt=de(l,function(ft){return ft(U)});return{criteria:tt,index:++S,value:U}});return MM(N,function(U,H){return _k(U,H,g)})}function ak(s,l){return Ug(s,l,function(g,S){return ec(s,S)})}function Ug(s,l,g){for(var S=-1,N=l.length,U={};++S<N;){var H=l[S],X=Yn(s,H);g(X,H)&&Fs(U,xn(H,s),X)}return U}function lk(s){return function(l){return Yn(l,s)}}function Cf(s,l,g,S){var N=S?NM:Fi,U=-1,H=l.length,X=s;for(s===l&&(l=Ve(l)),g&&(X=de(s,rr(g)));++U<H;)for(var tt=0,ft=l[U],ct=g?g(ft):ft;(tt=N(X,ct,tt,S))>-1;)X!==s&&va.call(X,tt,1),va.call(s,tt,1);return s}function $g(s,l){for(var g=s?l.length:0,S=g-1;g--;){var N=l[g];if(g==S||N!==U){var U=N;rn(N)?va.call(s,N,1):Nf(s,N)}}return s}function Rf(s,l){return s+ya(bg()*(l-s+1))}function uk(s,l,g,S){for(var N=-1,U=Ae(ma((l-s)/(g||1)),0),H=st(U);U--;)H[S?U:++N]=s,s+=g;return H}function If(s,l){var g="";if(!s||l<1||l>nt)return g;do l%2&&(g+=s),l=ya(l/2),l&&(s+=s);while(l);return g}function Bt(s,l){return Wf(gm(s,l,Ke),s+"")}function fk(s){return Tg(Xi(s))}function ck(s,l){var g=Xi(s);return La(g,Kn(l,0,g.length))}function Fs(s,l,g,S){if(!me(s))return s;l=xn(l,s);for(var N=-1,U=l.length,H=U-1,X=s;X!=null&&++N<U;){var tt=qr(l[N]),ft=g;if(tt==="__proto__"||tt==="constructor"||tt==="prototype")return s;if(N!=H){var ct=X[tt];ft=S?S(ct,tt,X):r,ft===r&&(ft=me(ct)?ct:rn(l[N+1])?[]:{})}Ns(X,tt,ft),X=X[tt]}return s}var Gg=_a?function(s,l){return _a.set(s,l),s}:Ke,hk=ga?function(s,l){return ga(s,"toString",{configurable:!0,enumerable:!1,value:nc(l),writable:!0})}:Ke;function dk(s){return La(Xi(s))}function vr(s,l,g){var S=-1,N=s.length;l<0&&(l=-l>N?0:N+l),g=g>N?N:g,g<0&&(g+=N),N=l>g?0:g-l>>>0,l>>>=0;for(var U=st(N);++S<N;)U[S]=s[S+l];return U}function pk(s,l){var g;return _n(s,function(S,N,U){return g=l(S,N,U),!g}),!!g}function Aa(s,l,g){var S=0,N=s==null?S:s.length;if(typeof l=="number"&&l===l&&N<=j){for(;S<N;){var U=S+N>>>1,H=s[U];H!==null&&!ir(H)&&(g?H<=l:H<l)?S=U+1:N=U}return N}return Pf(s,l,Ke,g)}function Pf(s,l,g,S){var N=0,U=s==null?0:s.length;if(U===0)return 0;l=g(l);for(var H=l!==l,X=l===null,tt=ir(l),ft=l===r;N<U;){var ct=ya((N+U)/2),ht=g(s[ct]),yt=ht!==r,wt=ht===null,Ct=ht===ht,Ft=ir(ht);if(H)var Rt=S||Ct;else ft?Rt=Ct&&(S||yt):X?Rt=Ct&&yt&&(S||!wt):tt?Rt=Ct&&yt&&!wt&&(S||!Ft):wt||Ft?Rt=!1:Rt=S?ht<=l:ht<l;Rt?N=ct+1:U=ct}return De(U,G)}function jg(s,l){for(var g=-1,S=s.length,N=0,U=[];++g<S;){var H=s[g],X=l?l(H):H;if(!g||!Pr(X,tt)){var tt=X;U[N++]=H===0?0:H}}return U}function qg(s){return typeof s=="number"?s:ir(s)?D:+s}function nr(s){if(typeof s=="string")return s;if(kt(s))return de(s,nr)+"";if(ir(s))return xg?xg.call(s):"";var l=s+"";return l=="0"&&1/s==-z?"-0":l}function bn(s,l,g){var S=-1,N=sa,U=s.length,H=!0,X=[],tt=X;if(g)H=!1,N=of;else if(U>=i){var ft=l?null:Sk(s);if(ft)return aa(ft);H=!1,N=As,tt=new Xn}else tt=l?[]:X;t:for(;++S<U;){var ct=s[S],ht=l?l(ct):ct;if(ct=g||ct!==0?ct:0,H&&ht===ht){for(var yt=tt.length;yt--;)if(tt[yt]===ht)continue t;l&&tt.push(ht),X.push(ct)}else N(tt,ht,g)||(tt!==X&&tt.push(ht),X.push(ct))}return X}function Nf(s,l){return l=xn(l,s),s=mm(s,l),s==null||delete s[qr(gr(l))]}function zg(s,l,g,S){return Fs(s,l,g(Yn(s,l)),S)}function Oa(s,l,g,S){for(var N=s.length,U=S?N:-1;(S?U--:++U<N)&&l(s[U],U,s););return g?vr(s,S?0:U,S?U+1:N):vr(s,S?U+1:0,S?N:U)}function Hg(s,l){var g=s;return g instanceof jt&&(g=g.value()),af(l,function(S,N){return N.func.apply(N.thisArg,gn([S],N.args))},g)}function Mf(s,l,g){var S=s.length;if(S<2)return S?bn(s[0]):[];for(var N=-1,U=st(S);++N<S;)for(var H=s[N],X=-1;++X<S;)X!=N&&(U[N]=Ms(U[N]||H,s[X],l,g));return bn(ke(U,1),l,g)}function Vg(s,l,g){for(var S=-1,N=s.length,U=l.length,H={};++S<N;){var X=S<U?l[S]:r;g(H,s[S],X)}return H}function kf(s){return xe(s)?s:[]}function Lf(s){return typeof s=="function"?s:Ke}function xn(s,l){return kt(s)?s:zf(s,l)?[s]:xm(Jt(s))}var vk=Bt;function wn(s,l,g){var S=s.length;return g=g===r?S:g,!l&&g>=S?s:vr(s,l,g)}var Wg=r3||function(s){return Me.clearTimeout(s)};function Xg(s,l){if(l)return s.slice();var g=s.length,S=vg?vg(g):new s.constructor(g);return s.copy(S),S}function Ff(s){var l=new s.constructor(s.byteLength);return new da(l).set(new da(s)),l}function gk(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function mk(s){var l=new s.constructor(s.source,Pv.exec(s));return l.lastIndex=s.lastIndex,l}function yk(s){return Ps?se(Ps.call(s)):{}}function Kg(s,l){var g=l?Ff(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function Yg(s,l){if(s!==l){var g=s!==r,S=s===null,N=s===s,U=ir(s),H=l!==r,X=l===null,tt=l===l,ft=ir(l);if(!X&&!ft&&!U&&s>l||U&&H&&tt&&!X&&!ft||S&&H&&tt||!g&&tt||!N)return 1;if(!S&&!U&&!ft&&s<l||ft&&g&&N&&!S&&!U||X&&g&&N||!H&&N||!tt)return-1}return 0}function _k(s,l,g){for(var S=-1,N=s.criteria,U=l.criteria,H=N.length,X=g.length;++S<H;){var tt=Yg(N[S],U[S]);if(tt){if(S>=X)return tt;var ft=g[S];return tt*(ft=="desc"?-1:1)}}return s.index-l.index}function Zg(s,l,g,S){for(var N=-1,U=s.length,H=g.length,X=-1,tt=l.length,ft=Ae(U-H,0),ct=st(tt+ft),ht=!S;++X<tt;)ct[X]=l[X];for(;++N<H;)(ht||N<U)&&(ct[g[N]]=s[N]);for(;ft--;)ct[X++]=s[N++];return ct}function Qg(s,l,g,S){for(var N=-1,U=s.length,H=-1,X=g.length,tt=-1,ft=l.length,ct=Ae(U-X,0),ht=st(ct+ft),yt=!S;++N<ct;)ht[N]=s[N];for(var wt=N;++tt<ft;)ht[wt+tt]=l[tt];for(;++H<X;)(yt||N<U)&&(ht[wt+g[H]]=s[N++]);return ht}function Ve(s,l){var g=-1,S=s.length;for(l||(l=st(S));++g<S;)l[g]=s[g];return l}function jr(s,l,g,S){var N=!g;g||(g={});for(var U=-1,H=l.length;++U<H;){var X=l[U],tt=S?S(g[X],s[X],X,g,s):r;tt===r&&(tt=s[X]),N?Jr(g,X,tt):Ns(g,X,tt)}return g}function bk(s,l){return jr(s,qf(s),l)}function xk(s,l){return jr(s,cm(s),l)}function Ca(s,l){return function(g,S){var N=kt(g)?AM:q3,U=l?l():{};return N(g,s,Ot(S,2),U)}}function zi(s){return Bt(function(l,g){var S=-1,N=g.length,U=N>1?g[N-1]:r,H=N>2?g[2]:r;for(U=s.length>3&&typeof U=="function"?(N--,U):r,H&&qe(g[0],g[1],H)&&(U=N<3?r:U,N=1),l=se(l);++S<N;){var X=g[S];X&&s(l,X,S,U)}return l})}function Jg(s,l){return function(g,S){if(g==null)return g;if(!We(g))return s(g,S);for(var N=g.length,U=l?N:-1,H=se(g);(l?U--:++U<N)&&S(H[U],U,H)!==!1;);return g}}function tm(s){return function(l,g,S){for(var N=-1,U=se(l),H=S(l),X=H.length;X--;){var tt=H[s?X:++N];if(g(U[tt],tt,U)===!1)break}return l}}function wk(s,l,g){var S=l&b,N=Bs(s);function U(){var H=this&&this!==Me&&this instanceof U?N:s;return H.apply(S?g:this,arguments)}return U}function em(s){return function(l){l=Jt(l);var g=Bi(l)?Rr(l):r,S=g?g[0]:l.charAt(0),N=g?wn(g,1).join(""):l.slice(1);return S[s]()+N}}function Hi(s){return function(l){return af(Jm(Qm(l).replace(hM,"")),s,"")}}function Bs(s){return function(){var l=arguments;switch(l.length){case 0:return new s;case 1:return new s(l[0]);case 2:return new s(l[0],l[1]);case 3:return new s(l[0],l[1],l[2]);case 4:return new s(l[0],l[1],l[2],l[3]);case 5:return new s(l[0],l[1],l[2],l[3],l[4]);case 6:return new s(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new s(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var g=qi(s.prototype),S=s.apply(g,l);return me(S)?S:g}}function Tk(s,l,g){var S=Bs(s);function N(){for(var U=arguments.length,H=st(U),X=U,tt=Vi(N);X--;)H[X]=arguments[X];var ft=U<3&&H[0]!==tt&&H[U-1]!==tt?[]:mn(H,tt);if(U-=ft.length,U<g)return om(s,l,Ra,N.placeholder,r,H,ft,r,r,g-U);var ct=this&&this!==Me&&this instanceof N?S:s;return er(ct,this,H)}return N}function rm(s){return function(l,g,S){var N=se(l);if(!We(l)){var U=Ot(g,3);l=Pe(l),g=function(X){return U(N[X],X,N)}}var H=s(l,g,S);return H>-1?N[U?l[H]:H]:r}}function nm(s){return en(function(l){var g=l.length,S=g,N=dr.prototype.thru;for(s&&l.reverse();S--;){var U=l[S];if(typeof U!="function")throw new hr(a);if(N&&!H&&Ma(U)=="wrapper")var H=new dr([],!0)}for(S=H?S:g;++S<g;){U=l[S];var X=Ma(U),tt=X=="wrapper"?Gf(U):r;tt&&Hf(tt[0])&&tt[1]==(O|T|E|A)&&!tt[4].length&&tt[9]==1?H=H[Ma(tt[0])].apply(H,tt[3]):H=U.length==1&&Hf(U)?H[X]():H.thru(U)}return function(){var ft=arguments,ct=ft[0];if(H&&ft.length==1&&kt(ct))return H.plant(ct).value();for(var ht=0,yt=g?l[ht].apply(this,ft):ct;++ht<g;)yt=l[ht].call(this,yt);return yt}})}function Ra(s,l,g,S,N,U,H,X,tt,ft){var ct=l&O,ht=l&b,yt=l&m,wt=l&(T|x),Ct=l&L,Ft=yt?r:Bs(s);function Rt(){for(var $t=arguments.length,zt=st($t),sr=$t;sr--;)zt[sr]=arguments[sr];if(wt)var ze=Vi(Rt),or=LM(zt,ze);if(S&&(zt=Zg(zt,S,N,wt)),U&&(zt=Qg(zt,U,H,wt)),$t-=or,wt&&$t<ft){var we=mn(zt,ze);return om(s,l,Ra,Rt.placeholder,g,zt,we,X,tt,ft-$t)}var Nr=ht?g:this,on=yt?Nr[s]:s;return $t=zt.length,X?zt=qk(zt,X):Ct&&$t>1&&zt.reverse(),ct&&tt<$t&&(zt.length=tt),this&&this!==Me&&this instanceof Rt&&(on=Ft||Bs(on)),on.apply(Nr,zt)}return Rt}function im(s,l){return function(g,S){return Z3(g,s,l(S),{})}}function Ia(s,l){return function(g,S){var N;if(g===r&&S===r)return l;if(g!==r&&(N=g),S!==r){if(N===r)return S;typeof g=="string"||typeof S=="string"?(g=nr(g),S=nr(S)):(g=qg(g),S=qg(S)),N=s(g,S)}return N}}function Bf(s){return en(function(l){return l=de(l,rr(Ot())),Bt(function(g){var S=this;return s(l,function(N){return er(N,S,g)})})})}function Pa(s,l){l=l===r?" ":nr(l);var g=l.length;if(g<2)return g?If(l,s):l;var S=If(l,ma(s/Di(l)));return Bi(l)?wn(Rr(S),0,s).join(""):S.slice(0,s)}function Ek(s,l,g,S){var N=l&b,U=Bs(s);function H(){for(var X=-1,tt=arguments.length,ft=-1,ct=S.length,ht=st(ct+tt),yt=this&&this!==Me&&this instanceof H?U:s;++ft<ct;)ht[ft]=S[ft];for(;tt--;)ht[ft++]=arguments[++X];return er(yt,N?g:this,ht)}return H}function sm(s){return function(l,g,S){return S&&typeof S!="number"&&qe(l,g,S)&&(g=S=r),l=sn(l),g===r?(g=l,l=0):g=sn(g),S=S===r?l<g?1:-1:sn(S),uk(l,g,S,s)}}function Na(s){return function(l,g){return typeof l=="string"&&typeof g=="string"||(l=mr(l),g=mr(g)),s(l,g)}}function om(s,l,g,S,N,U,H,X,tt,ft){var ct=l&T,ht=ct?H:r,yt=ct?r:H,wt=ct?U:r,Ct=ct?r:U;l|=ct?E:I,l&=~(ct?I:E),l&w||(l&=~(b|m));var Ft=[s,l,N,wt,ht,Ct,yt,X,tt,ft],Rt=g.apply(r,Ft);return Hf(s)&&ym(Rt,Ft),Rt.placeholder=S,_m(Rt,s,l)}function Df(s){var l=Se[s];return function(g,S){if(g=mr(g),S=S==null?0:De(Lt(S),292),S&&_g(g)){var N=(Jt(g)+"e").split("e"),U=l(N[0]+"e"+(+N[1]+S));return N=(Jt(U)+"e").split("e"),+(N[0]+"e"+(+N[1]-S))}return l(g)}}var Sk=Gi&&1/aa(new Gi([,-0]))[1]==z?function(s){return new Gi(s)}:oc;function am(s){return function(l){var g=Ue(l);return g==_t?pf(l):g==gt?jM(l):kM(l,s(l))}}function tn(s,l,g,S,N,U,H,X){var tt=l&m;if(!tt&&typeof s!="function")throw new hr(a);var ft=S?S.length:0;if(ft||(l&=~(E|I),S=N=r),H=H===r?H:Ae(Lt(H),0),X=X===r?X:Lt(X),ft-=N?N.length:0,l&I){var ct=S,ht=N;S=N=r}var yt=tt?r:Gf(s),wt=[s,l,g,S,N,ct,ht,U,H,X];if(yt&&$k(wt,yt),s=wt[0],l=wt[1],g=wt[2],S=wt[3],N=wt[4],X=wt[9]=wt[9]===r?tt?0:s.length:Ae(wt[9]-ft,0),!X&&l&(T|x)&&(l&=~(T|x)),!l||l==b)var Ct=wk(s,l,g);else l==T||l==x?Ct=Tk(s,l,X):(l==E||l==(b|E))&&!N.length?Ct=Ek(s,l,g,S):Ct=Ra.apply(r,wt);var Ft=yt?Gg:ym;return _m(Ft(Ct,wt),s,l)}function lm(s,l,g,S){return s===r||Pr(s,$i[g])&&!ee.call(S,g)?l:s}function um(s,l,g,S,N,U){return me(s)&&me(l)&&(U.set(l,s),Sa(s,l,r,um,U),U.delete(l)),s}function Ak(s){return $s(s)?r:s}function fm(s,l,g,S,N,U){var H=g&y,X=s.length,tt=l.length;if(X!=tt&&!(H&&tt>X))return!1;var ft=U.get(s),ct=U.get(l);if(ft&&ct)return ft==l&&ct==s;var ht=-1,yt=!0,wt=g&_?new Xn:r;for(U.set(s,l),U.set(l,s);++ht<X;){var Ct=s[ht],Ft=l[ht];if(S)var Rt=H?S(Ft,Ct,ht,l,s,U):S(Ct,Ft,ht,s,l,U);if(Rt!==r){if(Rt)continue;yt=!1;break}if(wt){if(!lf(l,function($t,zt){if(!As(wt,zt)&&(Ct===$t||N(Ct,$t,g,S,U)))return wt.push(zt)})){yt=!1;break}}else if(!(Ct===Ft||N(Ct,Ft,g,S,U))){yt=!1;break}}return U.delete(s),U.delete(l),yt}function Ok(s,l,g,S,N,U,H){switch(g){case Qt:if(s.byteLength!=l.byteLength||s.byteOffset!=l.byteOffset)return!1;s=s.buffer,l=l.buffer;case Ge:return!(s.byteLength!=l.byteLength||!U(new da(s),new da(l)));case et:case Y:case At:return Pr(+s,+l);case ot:return s.name==l.name&&s.message==l.message;case dt:case at:return s==l+"";case _t:var X=pf;case gt:var tt=S&y;if(X||(X=aa),s.size!=l.size&&!tt)return!1;var ft=H.get(s);if(ft)return ft==l;S|=_,H.set(s,l);var ct=fm(X(s),X(l),S,N,U,H);return H.delete(s),ct;case It:if(Ps)return Ps.call(s)==Ps.call(l)}return!1}function Ck(s,l,g,S,N,U){var H=g&y,X=Uf(s),tt=X.length,ft=Uf(l),ct=ft.length;if(tt!=ct&&!H)return!1;for(var ht=tt;ht--;){var yt=X[ht];if(!(H?yt in l:ee.call(l,yt)))return!1}var wt=U.get(s),Ct=U.get(l);if(wt&&Ct)return wt==l&&Ct==s;var Ft=!0;U.set(s,l),U.set(l,s);for(var Rt=H;++ht<tt;){yt=X[ht];var $t=s[yt],zt=l[yt];if(S)var sr=H?S(zt,$t,yt,l,s,U):S($t,zt,yt,s,l,U);if(!(sr===r?$t===zt||N($t,zt,g,S,U):sr)){Ft=!1;break}Rt||(Rt=yt=="constructor")}if(Ft&&!Rt){var ze=s.constructor,or=l.constructor;ze!=or&&"constructor"in s&&"constructor"in l&&!(typeof ze=="function"&&ze instanceof ze&&typeof or=="function"&&or instanceof or)&&(Ft=!1)}return U.delete(s),U.delete(l),Ft}function en(s){return Wf(gm(s,r,Sm),s+"")}function Uf(s){return Ig(s,Pe,qf)}function $f(s){return Ig(s,Xe,cm)}var Gf=_a?function(s){return _a.get(s)}:oc;function Ma(s){for(var l=s.name+"",g=ji[l],S=ee.call(ji,l)?g.length:0;S--;){var N=g[S],U=N.func;if(U==null||U==s)return N.name}return l}function Vi(s){var l=ee.call(B,"placeholder")?B:s;return l.placeholder}function Ot(){var s=B.iteratee||ic;return s=s===ic?Mg:s,arguments.length?s(arguments[0],arguments[1]):s}function ka(s,l){var g=s.__data__;return Fk(l)?g[typeof l=="string"?"string":"hash"]:g.map}function jf(s){for(var l=Pe(s),g=l.length;g--;){var S=l[g],N=s[S];l[g]=[S,N,pm(N)]}return l}function Zn(s,l){var g=UM(s,l);return Ng(g)?g:r}function Rk(s){var l=ee.call(s,Vn),g=s[Vn];try{s[Vn]=r;var S=!0}catch{}var N=ca.call(s);return S&&(l?s[Vn]=g:delete s[Vn]),N}var qf=gf?function(s){return s==null?[]:(s=se(s),vn(gf(s),function(l){return mg.call(s,l)}))}:ac,cm=gf?function(s){for(var l=[];s;)gn(l,qf(s)),s=pa(s);return l}:ac,Ue=je;(mf&&Ue(new mf(new ArrayBuffer(1)))!=Qt||Cs&&Ue(new Cs)!=_t||yf&&Ue(yf.resolve())!=it||Gi&&Ue(new Gi)!=gt||Rs&&Ue(new Rs)!=Mt)&&(Ue=function(s){var l=je(s),g=l==Ut?s.constructor:r,S=g?Qn(g):"";if(S)switch(S){case c3:return Qt;case h3:return _t;case d3:return it;case p3:return gt;case v3:return Mt}return l});function Ik(s,l,g){for(var S=-1,N=g.length;++S<N;){var U=g[S],H=U.size;switch(U.type){case"drop":s+=H;break;case"dropRight":l-=H;break;case"take":l=De(l,s+H);break;case"takeRight":s=Ae(s,l-H);break}}return{start:s,end:l}}function Pk(s){var l=s.match(BN);return l?l[1].split(DN):[]}function hm(s,l,g){l=xn(l,s);for(var S=-1,N=l.length,U=!1;++S<N;){var H=qr(l[S]);if(!(U=s!=null&&g(s,H)))break;s=s[H]}return U||++S!=N?U:(N=s==null?0:s.length,!!N&&Ga(N)&&rn(H,N)&&(kt(s)||Jn(s)))}function Nk(s){var l=s.length,g=new s.constructor(l);return l&&typeof s[0]=="string"&&ee.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function dm(s){return typeof s.constructor=="function"&&!Ds(s)?qi(pa(s)):{}}function Mk(s,l,g){var S=s.constructor;switch(l){case Ge:return Ff(s);case et:case Y:return new S(+s);case Qt:return gk(s,g);case Ss:case he:case ur:case zu:case Hu:case Vu:case Wu:case Xu:case Ku:return Kg(s,g);case _t:return new S;case At:case at:return new S(s);case dt:return mk(s);case gt:return new S;case It:return yk(s)}}function kk(s,l){var g=l.length;if(!g)return s;var S=g-1;return l[S]=(g>1?"& ":"")+l[S],l=l.join(g>2?", ":" "),s.replace(FN,`{
1942
- /* [wrapped with `+l+`] */
1943
- `)}function Lk(s){return kt(s)||Jn(s)||!!(yg&&s&&s[yg])}function rn(s,l){var g=typeof s;return l=l??nt,!!l&&(g=="number"||g!="symbol"&&WN.test(s))&&s>-1&&s%1==0&&s<l}function qe(s,l,g){if(!me(g))return!1;var S=typeof l;return(S=="number"?We(g)&&rn(l,g.length):S=="string"&&l in g)?Pr(g[l],s):!1}function zf(s,l){if(kt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||ir(s)?!0:NN.test(s)||!PN.test(s)||l!=null&&s in se(l)}function Fk(s){var l=typeof s;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?s!=="__proto__":s===null}function Hf(s){var l=Ma(s),g=B[l];if(typeof g!="function"||!(l in jt.prototype))return!1;if(s===g)return!0;var S=Gf(g);return!!S&&s===S[0]}function Bk(s){return!!pg&&pg in s}var Dk=ua?nn:lc;function Ds(s){var l=s&&s.constructor,g=typeof l=="function"&&l.prototype||$i;return s===g}function pm(s){return s===s&&!me(s)}function vm(s,l){return function(g){return g==null?!1:g[s]===l&&(l!==r||s in se(g))}}function Uk(s){var l=Ua(s,function(S){return g.size===h&&g.clear(),S}),g=l.cache;return l}function $k(s,l){var g=s[1],S=l[1],N=g|S,U=N<(b|m|O),H=S==O&&g==T||S==O&&g==A&&s[7].length<=l[8]||S==(O|A)&&l[7].length<=l[8]&&g==T;if(!(U||H))return s;S&b&&(s[2]=l[2],N|=g&b?0:w);var X=l[3];if(X){var tt=s[3];s[3]=tt?Zg(tt,X,l[4]):X,s[4]=tt?mn(s[3],d):l[4]}return X=l[5],X&&(tt=s[5],s[5]=tt?Qg(tt,X,l[6]):X,s[6]=tt?mn(s[5],d):l[6]),X=l[7],X&&(s[7]=X),S&O&&(s[8]=s[8]==null?l[8]:De(s[8],l[8])),s[9]==null&&(s[9]=l[9]),s[0]=l[0],s[1]=N,s}function Gk(s){var l=[];if(s!=null)for(var g in se(s))l.push(g);return l}function jk(s){return ca.call(s)}function gm(s,l,g){return l=Ae(l===r?s.length-1:l,0),function(){for(var S=arguments,N=-1,U=Ae(S.length-l,0),H=st(U);++N<U;)H[N]=S[l+N];N=-1;for(var X=st(l+1);++N<l;)X[N]=S[N];return X[l]=g(H),er(s,this,X)}}function mm(s,l){return l.length<2?s:Yn(s,vr(l,0,-1))}function qk(s,l){for(var g=s.length,S=De(l.length,g),N=Ve(s);S--;){var U=l[S];s[S]=rn(U,g)?N[U]:r}return s}function Vf(s,l){if(!(l==="constructor"&&typeof s[l]=="function")&&l!="__proto__")return s[l]}var ym=bm(Gg),Us=i3||function(s,l){return Me.setTimeout(s,l)},Wf=bm(hk);function _m(s,l,g){var S=l+"";return Wf(s,kk(S,zk(Pk(S),g)))}function bm(s){var l=0,g=0;return function(){var S=l3(),N=M-(S-g);if(g=S,N>0){if(++l>=P)return arguments[0]}else l=0;return s.apply(r,arguments)}}function La(s,l){var g=-1,S=s.length,N=S-1;for(l=l===r?S:l;++g<l;){var U=Rf(g,N),H=s[U];s[U]=s[g],s[g]=H}return s.length=l,s}var xm=Uk(function(s){var l=[];return s.charCodeAt(0)===46&&l.push(""),s.replace(MN,function(g,S,N,U){l.push(N?U.replace(GN,"$1"):S||g)}),l});function qr(s){if(typeof s=="string"||ir(s))return s;var l=s+"";return l=="0"&&1/s==-z?"-0":l}function Qn(s){if(s!=null){try{return fa.call(s)}catch{}try{return s+""}catch{}}return""}function zk(s,l){return cr(Q,function(g){var S="_."+g[0];l&g[1]&&!sa(s,S)&&s.push(S)}),s.sort()}function wm(s){if(s instanceof jt)return s.clone();var l=new dr(s.__wrapped__,s.__chain__);return l.__actions__=Ve(s.__actions__),l.__index__=s.__index__,l.__values__=s.__values__,l}function Hk(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=Ae(Lt(l),0);var S=s==null?0:s.length;if(!S||l<1)return[];for(var N=0,U=0,H=st(ma(S/l));N<S;)H[U++]=vr(s,N,N+=l);return H}function Vk(s){for(var l=-1,g=s==null?0:s.length,S=0,N=[];++l<g;){var U=s[l];U&&(N[S++]=U)}return N}function Wk(){var s=arguments.length;if(!s)return[];for(var l=st(s-1),g=arguments[0],S=s;S--;)l[S-1]=arguments[S];return gn(kt(g)?Ve(g):[g],ke(l,1))}var Xk=Bt(function(s,l){return xe(s)?Ms(s,ke(l,1,xe,!0)):[]}),Kk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ms(s,ke(l,1,xe,!0),Ot(g,2)):[]}),Yk=Bt(function(s,l){var g=gr(l);return xe(g)&&(g=r),xe(s)?Ms(s,ke(l,1,xe,!0),r,g):[]});function Zk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:Lt(l),vr(s,l<0?0:l,S)):[]}function Qk(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:Lt(l),l=S-l,vr(s,0,l<0?0:l)):[]}function Jk(s,l){return s&&s.length?Oa(s,Ot(l,3),!0,!0):[]}function t5(s,l){return s&&s.length?Oa(s,Ot(l,3),!0):[]}function e5(s,l,g,S){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&qe(s,l,g)&&(g=0,S=N),W3(s,l,g,S)):[]}function Tm(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:Lt(g);return N<0&&(N=Ae(S+N,0)),oa(s,Ot(l,3),N)}function Em(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S-1;return g!==r&&(N=Lt(g),N=g<0?Ae(S+N,0):De(N,S-1)),oa(s,Ot(l,3),N,!0)}function Sm(s){var l=s==null?0:s.length;return l?ke(s,1):[]}function r5(s){var l=s==null?0:s.length;return l?ke(s,z):[]}function n5(s,l){var g=s==null?0:s.length;return g?(l=l===r?1:Lt(l),ke(s,l)):[]}function i5(s){for(var l=-1,g=s==null?0:s.length,S={};++l<g;){var N=s[l];S[N[0]]=N[1]}return S}function Am(s){return s&&s.length?s[0]:r}function s5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=g==null?0:Lt(g);return N<0&&(N=Ae(S+N,0)),Fi(s,l,N)}function o5(s){var l=s==null?0:s.length;return l?vr(s,0,-1):[]}var a5=Bt(function(s){var l=de(s,kf);return l.length&&l[0]===s[0]?Ef(l):[]}),l5=Bt(function(s){var l=gr(s),g=de(s,kf);return l===gr(g)?l=r:g.pop(),g.length&&g[0]===s[0]?Ef(g,Ot(l,2)):[]}),u5=Bt(function(s){var l=gr(s),g=de(s,kf);return l=typeof l=="function"?l:r,l&&g.pop(),g.length&&g[0]===s[0]?Ef(g,r,l):[]});function f5(s,l){return s==null?"":o3.call(s,l)}function gr(s){var l=s==null?0:s.length;return l?s[l-1]:r}function c5(s,l,g){var S=s==null?0:s.length;if(!S)return-1;var N=S;return g!==r&&(N=Lt(g),N=N<0?Ae(S+N,0):De(N,S-1)),l===l?zM(s,l,N):oa(s,og,N,!0)}function h5(s,l){return s&&s.length?Bg(s,Lt(l)):r}var d5=Bt(Om);function Om(s,l){return s&&s.length&&l&&l.length?Cf(s,l):s}function p5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,Ot(g,2)):s}function v5(s,l,g){return s&&s.length&&l&&l.length?Cf(s,l,r,g):s}var g5=en(function(s,l){var g=s==null?0:s.length,S=bf(s,l);return $g(s,de(l,function(N){return rn(N,g)?+N:N}).sort(Yg)),S});function m5(s,l){var g=[];if(!(s&&s.length))return g;var S=-1,N=[],U=s.length;for(l=Ot(l,3);++S<U;){var H=s[S];l(H,S,s)&&(g.push(H),N.push(S))}return $g(s,N),g}function Xf(s){return s==null?s:f3.call(s)}function y5(s,l,g){var S=s==null?0:s.length;return S?(g&&typeof g!="number"&&qe(s,l,g)?(l=0,g=S):(l=l==null?0:Lt(l),g=g===r?S:Lt(g)),vr(s,l,g)):[]}function _5(s,l){return Aa(s,l)}function b5(s,l,g){return Pf(s,l,Ot(g,2))}function x5(s,l){var g=s==null?0:s.length;if(g){var S=Aa(s,l);if(S<g&&Pr(s[S],l))return S}return-1}function w5(s,l){return Aa(s,l,!0)}function T5(s,l,g){return Pf(s,l,Ot(g,2),!0)}function E5(s,l){var g=s==null?0:s.length;if(g){var S=Aa(s,l,!0)-1;if(Pr(s[S],l))return S}return-1}function S5(s){return s&&s.length?jg(s):[]}function A5(s,l){return s&&s.length?jg(s,Ot(l,2)):[]}function O5(s){var l=s==null?0:s.length;return l?vr(s,1,l):[]}function C5(s,l,g){return s&&s.length?(l=g||l===r?1:Lt(l),vr(s,0,l<0?0:l)):[]}function R5(s,l,g){var S=s==null?0:s.length;return S?(l=g||l===r?1:Lt(l),l=S-l,vr(s,l<0?0:l,S)):[]}function I5(s,l){return s&&s.length?Oa(s,Ot(l,3),!1,!0):[]}function P5(s,l){return s&&s.length?Oa(s,Ot(l,3)):[]}var N5=Bt(function(s){return bn(ke(s,1,xe,!0))}),M5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),bn(ke(s,1,xe,!0),Ot(l,2))}),k5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,bn(ke(s,1,xe,!0),r,l)});function L5(s){return s&&s.length?bn(s):[]}function F5(s,l){return s&&s.length?bn(s,Ot(l,2)):[]}function B5(s,l){return l=typeof l=="function"?l:r,s&&s.length?bn(s,r,l):[]}function Kf(s){if(!(s&&s.length))return[];var l=0;return s=vn(s,function(g){if(xe(g))return l=Ae(g.length,l),!0}),hf(l,function(g){return de(s,uf(g))})}function Cm(s,l){if(!(s&&s.length))return[];var g=Kf(s);return l==null?g:de(g,function(S){return er(l,r,S)})}var D5=Bt(function(s,l){return xe(s)?Ms(s,l):[]}),U5=Bt(function(s){return Mf(vn(s,xe))}),$5=Bt(function(s){var l=gr(s);return xe(l)&&(l=r),Mf(vn(s,xe),Ot(l,2))}),G5=Bt(function(s){var l=gr(s);return l=typeof l=="function"?l:r,Mf(vn(s,xe),r,l)}),j5=Bt(Kf);function q5(s,l){return Vg(s||[],l||[],Ns)}function z5(s,l){return Vg(s||[],l||[],Fs)}var H5=Bt(function(s){var l=s.length,g=l>1?s[l-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Cm(s,g)});function Rm(s){var l=B(s);return l.__chain__=!0,l}function V5(s,l){return l(s),s}function Fa(s,l){return l(s)}var W5=en(function(s){var l=s.length,g=l?s[0]:0,S=this.__wrapped__,N=function(U){return bf(U,s)};return l>1||this.__actions__.length||!(S instanceof jt)||!rn(g)?this.thru(N):(S=S.slice(g,+g+(l?1:0)),S.__actions__.push({func:Fa,args:[N],thisArg:r}),new dr(S,this.__chain__).thru(function(U){return l&&!U.length&&U.push(r),U}))});function X5(){return Rm(this)}function K5(){return new dr(this.value(),this.__chain__)}function Y5(){this.__values__===r&&(this.__values__=qm(this.value()));var s=this.__index__>=this.__values__.length,l=s?r:this.__values__[this.__index__++];return{done:s,value:l}}function Z5(){return this}function Q5(s){for(var l,g=this;g instanceof xa;){var S=wm(g);S.__index__=0,S.__values__=r,l?N.__wrapped__=S:l=S;var N=S;g=g.__wrapped__}return N.__wrapped__=s,l}function J5(){var s=this.__wrapped__;if(s instanceof jt){var l=s;return this.__actions__.length&&(l=new jt(this)),l=l.reverse(),l.__actions__.push({func:Fa,args:[Xf],thisArg:r}),new dr(l,this.__chain__)}return this.thru(Xf)}function tL(){return Hg(this.__wrapped__,this.__actions__)}var eL=Ca(function(s,l,g){ee.call(s,g)?++s[g]:Jr(s,g,1)});function rL(s,l,g){var S=kt(s)?ig:V3;return g&&qe(s,l,g)&&(l=r),S(s,Ot(l,3))}function nL(s,l){var g=kt(s)?vn:Cg;return g(s,Ot(l,3))}var iL=rm(Tm),sL=rm(Em);function oL(s,l){return ke(Ba(s,l),1)}function aL(s,l){return ke(Ba(s,l),z)}function lL(s,l,g){return g=g===r?1:Lt(g),ke(Ba(s,l),g)}function Im(s,l){var g=kt(s)?cr:_n;return g(s,Ot(l,3))}function Pm(s,l){var g=kt(s)?OM:Og;return g(s,Ot(l,3))}var uL=Ca(function(s,l,g){ee.call(s,g)?s[g].push(l):Jr(s,g,[l])});function fL(s,l,g,S){s=We(s)?s:Xi(s),g=g&&!S?Lt(g):0;var N=s.length;return g<0&&(g=Ae(N+g,0)),ja(s)?g<=N&&s.indexOf(l,g)>-1:!!N&&Fi(s,l,g)>-1}var cL=Bt(function(s,l,g){var S=-1,N=typeof l=="function",U=We(s)?st(s.length):[];return _n(s,function(H){U[++S]=N?er(l,H,g):ks(H,l,g)}),U}),hL=Ca(function(s,l,g){Jr(s,g,l)});function Ba(s,l){var g=kt(s)?de:kg;return g(s,Ot(l,3))}function dL(s,l,g,S){return s==null?[]:(kt(l)||(l=l==null?[]:[l]),g=S?r:g,kt(g)||(g=g==null?[]:[g]),Dg(s,l,g))}var pL=Ca(function(s,l,g){s[g?0:1].push(l)},function(){return[[],[]]});function vL(s,l,g){var S=kt(s)?af:lg,N=arguments.length<3;return S(s,Ot(l,4),g,N,_n)}function gL(s,l,g){var S=kt(s)?CM:lg,N=arguments.length<3;return S(s,Ot(l,4),g,N,Og)}function mL(s,l){var g=kt(s)?vn:Cg;return g(s,$a(Ot(l,3)))}function yL(s){var l=kt(s)?Tg:fk;return l(s)}function _L(s,l,g){(g?qe(s,l,g):l===r)?l=1:l=Lt(l);var S=kt(s)?G3:ck;return S(s,l)}function bL(s){var l=kt(s)?j3:dk;return l(s)}function xL(s){if(s==null)return 0;if(We(s))return ja(s)?Di(s):s.length;var l=Ue(s);return l==_t||l==gt?s.size:Af(s).length}function wL(s,l,g){var S=kt(s)?lf:pk;return g&&qe(s,l,g)&&(l=r),S(s,Ot(l,3))}var TL=Bt(function(s,l){if(s==null)return[];var g=l.length;return g>1&&qe(s,l[0],l[1])?l=[]:g>2&&qe(l[0],l[1],l[2])&&(l=[l[0]]),Dg(s,ke(l,1),[])}),Da=n3||function(){return Me.Date.now()};function EL(s,l){if(typeof l!="function")throw new hr(a);return s=Lt(s),function(){if(--s<1)return l.apply(this,arguments)}}function Nm(s,l,g){return l=g?r:l,l=s&&l==null?s.length:l,tn(s,O,r,r,r,r,l)}function Mm(s,l){var g;if(typeof l!="function")throw new hr(a);return s=Lt(s),function(){return--s>0&&(g=l.apply(this,arguments)),s<=1&&(l=r),g}}var Yf=Bt(function(s,l,g){var S=b;if(g.length){var N=mn(g,Vi(Yf));S|=E}return tn(s,S,l,g,N)}),km=Bt(function(s,l,g){var S=b|m;if(g.length){var N=mn(g,Vi(km));S|=E}return tn(l,S,s,g,N)});function Lm(s,l,g){l=g?r:l;var S=tn(s,T,r,r,r,r,r,l);return S.placeholder=Lm.placeholder,S}function Fm(s,l,g){l=g?r:l;var S=tn(s,x,r,r,r,r,r,l);return S.placeholder=Fm.placeholder,S}function Bm(s,l,g){var S,N,U,H,X,tt,ft=0,ct=!1,ht=!1,yt=!0;if(typeof s!="function")throw new hr(a);l=mr(l)||0,me(g)&&(ct=!!g.leading,ht="maxWait"in g,U=ht?Ae(mr(g.maxWait)||0,l):U,yt="trailing"in g?!!g.trailing:yt);function wt(we){var Nr=S,on=N;return S=N=r,ft=we,H=s.apply(on,Nr),H}function Ct(we){return ft=we,X=Us($t,l),ct?wt(we):H}function Ft(we){var Nr=we-tt,on=we-ft,ry=l-Nr;return ht?De(ry,U-on):ry}function Rt(we){var Nr=we-tt,on=we-ft;return tt===r||Nr>=l||Nr<0||ht&&on>=U}function $t(){var we=Da();if(Rt(we))return zt(we);X=Us($t,Ft(we))}function zt(we){return X=r,yt&&S?wt(we):(S=N=r,H)}function sr(){X!==r&&Wg(X),ft=0,S=tt=N=X=r}function ze(){return X===r?H:zt(Da())}function or(){var we=Da(),Nr=Rt(we);if(S=arguments,N=this,tt=we,Nr){if(X===r)return Ct(tt);if(ht)return Wg(X),X=Us($t,l),wt(tt)}return X===r&&(X=Us($t,l)),H}return or.cancel=sr,or.flush=ze,or}var SL=Bt(function(s,l){return Ag(s,1,l)}),AL=Bt(function(s,l,g){return Ag(s,mr(l)||0,g)});function OL(s){return tn(s,L)}function Ua(s,l){if(typeof s!="function"||l!=null&&typeof l!="function")throw new hr(a);var g=function(){var S=arguments,N=l?l.apply(this,S):S[0],U=g.cache;if(U.has(N))return U.get(N);var H=s.apply(this,S);return g.cache=U.set(N,H)||U,H};return g.cache=new(Ua.Cache||Qr),g}Ua.Cache=Qr;function $a(s){if(typeof s!="function")throw new hr(a);return function(){var l=arguments;switch(l.length){case 0:return!s.call(this);case 1:return!s.call(this,l[0]);case 2:return!s.call(this,l[0],l[1]);case 3:return!s.call(this,l[0],l[1],l[2])}return!s.apply(this,l)}}function CL(s){return Mm(2,s)}var RL=vk(function(s,l){l=l.length==1&&kt(l[0])?de(l[0],rr(Ot())):de(ke(l,1),rr(Ot()));var g=l.length;return Bt(function(S){for(var N=-1,U=De(S.length,g);++N<U;)S[N]=l[N].call(this,S[N]);return er(s,this,S)})}),Zf=Bt(function(s,l){var g=mn(l,Vi(Zf));return tn(s,E,r,l,g)}),Dm=Bt(function(s,l){var g=mn(l,Vi(Dm));return tn(s,I,r,l,g)}),IL=en(function(s,l){return tn(s,A,r,r,r,l)});function PL(s,l){if(typeof s!="function")throw new hr(a);return l=l===r?l:Lt(l),Bt(s,l)}function NL(s,l){if(typeof s!="function")throw new hr(a);return l=l==null?0:Ae(Lt(l),0),Bt(function(g){var S=g[l],N=wn(g,0,l);return S&&gn(N,S),er(s,this,N)})}function ML(s,l,g){var S=!0,N=!0;if(typeof s!="function")throw new hr(a);return me(g)&&(S="leading"in g?!!g.leading:S,N="trailing"in g?!!g.trailing:N),Bm(s,l,{leading:S,maxWait:l,trailing:N})}function kL(s){return Nm(s,1)}function LL(s,l){return Zf(Lf(l),s)}function FL(){if(!arguments.length)return[];var s=arguments[0];return kt(s)?s:[s]}function BL(s){return pr(s,v)}function DL(s,l){return l=typeof l=="function"?l:r,pr(s,v,l)}function UL(s){return pr(s,p|v)}function $L(s,l){return l=typeof l=="function"?l:r,pr(s,p|v,l)}function GL(s,l){return l==null||Sg(s,l,Pe(l))}function Pr(s,l){return s===l||s!==s&&l!==l}var jL=Na(Tf),qL=Na(function(s,l){return s>=l}),Jn=Pg(function(){return arguments}())?Pg:function(s){return ye(s)&&ee.call(s,"callee")&&!mg.call(s,"callee")},kt=st.isArray,zL=Qv?rr(Qv):Q3;function We(s){return s!=null&&Ga(s.length)&&!nn(s)}function xe(s){return ye(s)&&We(s)}function HL(s){return s===!0||s===!1||ye(s)&&je(s)==et}var Tn=s3||lc,VL=Jv?rr(Jv):J3;function WL(s){return ye(s)&&s.nodeType===1&&!$s(s)}function XL(s){if(s==null)return!0;if(We(s)&&(kt(s)||typeof s=="string"||typeof s.splice=="function"||Tn(s)||Wi(s)||Jn(s)))return!s.length;var l=Ue(s);if(l==_t||l==gt)return!s.size;if(Ds(s))return!Af(s).length;for(var g in s)if(ee.call(s,g))return!1;return!0}function KL(s,l){return Ls(s,l)}function YL(s,l,g){g=typeof g=="function"?g:r;var S=g?g(s,l):r;return S===r?Ls(s,l,r,g):!!S}function Qf(s){if(!ye(s))return!1;var l=je(s);return l==ot||l==rt||typeof s.message=="string"&&typeof s.name=="string"&&!$s(s)}function ZL(s){return typeof s=="number"&&_g(s)}function nn(s){if(!me(s))return!1;var l=je(s);return l==pt||l==vt||l==W||l==ut}function Um(s){return typeof s=="number"&&s==Lt(s)}function Ga(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=nt}function me(s){var l=typeof s;return s!=null&&(l=="object"||l=="function")}function ye(s){return s!=null&&typeof s=="object"}var $m=tg?rr(tg):ek;function QL(s,l){return s===l||Sf(s,l,jf(l))}function JL(s,l,g){return g=typeof g=="function"?g:r,Sf(s,l,jf(l),g)}function tF(s){return Gm(s)&&s!=+s}function eF(s){if(Dk(s))throw new Nt(o);return Ng(s)}function rF(s){return s===null}function nF(s){return s==null}function Gm(s){return typeof s=="number"||ye(s)&&je(s)==At}function $s(s){if(!ye(s)||je(s)!=Ut)return!1;var l=pa(s);if(l===null)return!0;var g=ee.call(l,"constructor")&&l.constructor;return typeof g=="function"&&g instanceof g&&fa.call(g)==JM}var Jf=eg?rr(eg):rk;function iF(s){return Um(s)&&s>=-nt&&s<=nt}var jm=rg?rr(rg):nk;function ja(s){return typeof s=="string"||!kt(s)&&ye(s)&&je(s)==at}function ir(s){return typeof s=="symbol"||ye(s)&&je(s)==It}var Wi=ng?rr(ng):ik;function sF(s){return s===r}function oF(s){return ye(s)&&Ue(s)==Mt}function aF(s){return ye(s)&&je(s)==He}var lF=Na(Of),uF=Na(function(s,l){return s<=l});function qm(s){if(!s)return[];if(We(s))return ja(s)?Rr(s):Ve(s);if(Os&&s[Os])return GM(s[Os]());var l=Ue(s),g=l==_t?pf:l==gt?aa:Xi;return g(s)}function sn(s){if(!s)return s===0?s:0;if(s=mr(s),s===z||s===-z){var l=s<0?-1:1;return l*V}return s===s?s:0}function Lt(s){var l=sn(s),g=l%1;return l===l?g?l-g:l:0}function zm(s){return s?Kn(Lt(s),0,k):0}function mr(s){if(typeof s=="number")return s;if(ir(s))return D;if(me(s)){var l=typeof s.valueOf=="function"?s.valueOf():s;s=me(l)?l+"":l}if(typeof s!="string")return s===0?s:+s;s=ug(s);var g=zN.test(s);return g||VN.test(s)?EM(s.slice(2),g?2:8):qN.test(s)?D:+s}function Hm(s){return jr(s,Xe(s))}function fF(s){return s?Kn(Lt(s),-nt,nt):s===0?s:0}function Jt(s){return s==null?"":nr(s)}var cF=zi(function(s,l){if(Ds(l)||We(l)){jr(l,Pe(l),s);return}for(var g in l)ee.call(l,g)&&Ns(s,g,l[g])}),Vm=zi(function(s,l){jr(l,Xe(l),s)}),qa=zi(function(s,l,g,S){jr(l,Xe(l),s,S)}),hF=zi(function(s,l,g,S){jr(l,Pe(l),s,S)}),dF=en(bf);function pF(s,l){var g=qi(s);return l==null?g:Eg(g,l)}var vF=Bt(function(s,l){s=se(s);var g=-1,S=l.length,N=S>2?l[2]:r;for(N&&qe(l[0],l[1],N)&&(S=1);++g<S;)for(var U=l[g],H=Xe(U),X=-1,tt=H.length;++X<tt;){var ft=H[X],ct=s[ft];(ct===r||Pr(ct,$i[ft])&&!ee.call(s,ft))&&(s[ft]=U[ft])}return s}),gF=Bt(function(s){return s.push(r,um),er(Wm,r,s)});function mF(s,l){return sg(s,Ot(l,3),Gr)}function yF(s,l){return sg(s,Ot(l,3),wf)}function _F(s,l){return s==null?s:xf(s,Ot(l,3),Xe)}function bF(s,l){return s==null?s:Rg(s,Ot(l,3),Xe)}function xF(s,l){return s&&Gr(s,Ot(l,3))}function wF(s,l){return s&&wf(s,Ot(l,3))}function TF(s){return s==null?[]:Ea(s,Pe(s))}function EF(s){return s==null?[]:Ea(s,Xe(s))}function tc(s,l,g){var S=s==null?r:Yn(s,l);return S===r?g:S}function SF(s,l){return s!=null&&hm(s,l,X3)}function ec(s,l){return s!=null&&hm(s,l,K3)}var AF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=ca.call(l)),s[l]=g},nc(Ke)),OF=im(function(s,l,g){l!=null&&typeof l.toString!="function"&&(l=ca.call(l)),ee.call(s,l)?s[l].push(g):s[l]=[g]},Ot),CF=Bt(ks);function Pe(s){return We(s)?wg(s):Af(s)}function Xe(s){return We(s)?wg(s,!0):sk(s)}function RF(s,l){var g={};return l=Ot(l,3),Gr(s,function(S,N,U){Jr(g,l(S,N,U),S)}),g}function IF(s,l){var g={};return l=Ot(l,3),Gr(s,function(S,N,U){Jr(g,N,l(S,N,U))}),g}var PF=zi(function(s,l,g){Sa(s,l,g)}),Wm=zi(function(s,l,g,S){Sa(s,l,g,S)}),NF=en(function(s,l){var g={};if(s==null)return g;var S=!1;l=de(l,function(U){return U=xn(U,s),S||(S=U.length>1),U}),jr(s,$f(s),g),S&&(g=pr(g,p|c|v,Ak));for(var N=l.length;N--;)Nf(g,l[N]);return g});function MF(s,l){return Xm(s,$a(Ot(l)))}var kF=en(function(s,l){return s==null?{}:ak(s,l)});function Xm(s,l){if(s==null)return{};var g=de($f(s),function(S){return[S]});return l=Ot(l),Ug(s,g,function(S,N){return l(S,N[0])})}function LF(s,l,g){l=xn(l,s);var S=-1,N=l.length;for(N||(N=1,s=r);++S<N;){var U=s==null?r:s[qr(l[S])];U===r&&(S=N,U=g),s=nn(U)?U.call(s):U}return s}function FF(s,l,g){return s==null?s:Fs(s,l,g)}function BF(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:Fs(s,l,g,S)}var Km=am(Pe),Ym=am(Xe);function DF(s,l,g){var S=kt(s),N=S||Tn(s)||Wi(s);if(l=Ot(l,4),g==null){var U=s&&s.constructor;N?g=S?new U:[]:me(s)?g=nn(U)?qi(pa(s)):{}:g={}}return(N?cr:Gr)(s,function(H,X,tt){return l(g,H,X,tt)}),g}function UF(s,l){return s==null?!0:Nf(s,l)}function $F(s,l,g){return s==null?s:zg(s,l,Lf(g))}function GF(s,l,g,S){return S=typeof S=="function"?S:r,s==null?s:zg(s,l,Lf(g),S)}function Xi(s){return s==null?[]:df(s,Pe(s))}function jF(s){return s==null?[]:df(s,Xe(s))}function qF(s,l,g){return g===r&&(g=l,l=r),g!==r&&(g=mr(g),g=g===g?g:0),l!==r&&(l=mr(l),l=l===l?l:0),Kn(mr(s),l,g)}function zF(s,l,g){return l=sn(l),g===r?(g=l,l=0):g=sn(g),s=mr(s),Y3(s,l,g)}function HF(s,l,g){if(g&&typeof g!="boolean"&&qe(s,l,g)&&(l=g=r),g===r&&(typeof l=="boolean"?(g=l,l=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&l===r?(s=0,l=1):(s=sn(s),l===r?(l=s,s=0):l=sn(l)),s>l){var S=s;s=l,l=S}if(g||s%1||l%1){var N=bg();return De(s+N*(l-s+TM("1e-"+((N+"").length-1))),l)}return Rf(s,l)}var VF=Hi(function(s,l,g){return l=l.toLowerCase(),s+(g?Zm(l):l)});function Zm(s){return rc(Jt(s).toLowerCase())}function Qm(s){return s=Jt(s),s&&s.replace(XN,FM).replace(dM,"")}function WF(s,l,g){s=Jt(s),l=nr(l);var S=s.length;g=g===r?S:Kn(Lt(g),0,S);var N=g;return g-=l.length,g>=0&&s.slice(g,N)==l}function XF(s){return s=Jt(s),s&&CN.test(s)?s.replace(Rv,BM):s}function KF(s){return s=Jt(s),s&&kN.test(s)?s.replace(Yu,"\\$&"):s}var YF=Hi(function(s,l,g){return s+(g?"-":"")+l.toLowerCase()}),ZF=Hi(function(s,l,g){return s+(g?" ":"")+l.toLowerCase()}),QF=em("toLowerCase");function JF(s,l,g){s=Jt(s),l=Lt(l);var S=l?Di(s):0;if(!l||S>=l)return s;var N=(l-S)/2;return Pa(ya(N),g)+s+Pa(ma(N),g)}function t4(s,l,g){s=Jt(s),l=Lt(l);var S=l?Di(s):0;return l&&S<l?s+Pa(l-S,g):s}function e4(s,l,g){s=Jt(s),l=Lt(l);var S=l?Di(s):0;return l&&S<l?Pa(l-S,g)+s:s}function r4(s,l,g){return g||l==null?l=0:l&&(l=+l),u3(Jt(s).replace(Zu,""),l||0)}function n4(s,l,g){return(g?qe(s,l,g):l===r)?l=1:l=Lt(l),If(Jt(s),l)}function i4(){var s=arguments,l=Jt(s[0]);return s.length<3?l:l.replace(s[1],s[2])}var s4=Hi(function(s,l,g){return s+(g?"_":"")+l.toLowerCase()});function o4(s,l,g){return g&&typeof g!="number"&&qe(s,l,g)&&(l=g=r),g=g===r?k:g>>>0,g?(s=Jt(s),s&&(typeof l=="string"||l!=null&&!Jf(l))&&(l=nr(l),!l&&Bi(s))?wn(Rr(s),0,g):s.split(l,g)):[]}var a4=Hi(function(s,l,g){return s+(g?" ":"")+rc(l)});function l4(s,l,g){return s=Jt(s),g=g==null?0:Kn(Lt(g),0,s.length),l=nr(l),s.slice(g,g+l.length)==l}function u4(s,l,g){var S=B.templateSettings;g&&qe(s,l,g)&&(l=r),s=Jt(s),l=qa({},l,S,lm);var N=qa({},l.imports,S.imports,lm),U=Pe(N),H=df(N,U),X,tt,ft=0,ct=l.interpolate||ra,ht="__p += '",yt=vf((l.escape||ra).source+"|"+ct.source+"|"+(ct===Iv?jN:ra).source+"|"+(l.evaluate||ra).source+"|$","g"),wt="//# sourceURL="+(ee.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++yM+"]")+`
1944
- `;s.replace(yt,function(Rt,$t,zt,sr,ze,or){return zt||(zt=sr),ht+=s.slice(ft,or).replace(KN,DM),$t&&(X=!0,ht+=`' +
1945
- __e(`+$t+`) +
1946
- '`),ze&&(tt=!0,ht+=`';
1947
- `+ze+`;
1948
- __p += '`),zt&&(ht+=`' +
1949
- ((__t = (`+zt+`)) == null ? '' : __t) +
1950
- '`),ft=or+Rt.length,Rt}),ht+=`';
1951
- `;var Ct=ee.call(l,"variable")&&l.variable;if(!Ct)ht=`with (obj) {
1952
- `+ht+`
1941
+ */qa.exports,function(e,t){(function(){var r,n="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",m=1,g=2,x=4,y=1,S=2,T=1,w=2,I=4,A=8,R=16,N=32,B=64,L=128,O=256,z=512,X=30,tt="...",it=800,V=16,j=1,xt=2,kt=3,G=1/0,rt=9007199254740991,gt=17976931348623157e292,H=0/0,K=4294967295,ct=K-1,yt=K>>>1,wt=[["ary",L],["bind",T],["bindKey",w],["curry",A],["curryRight",R],["flip",z],["partial",N],["partialRight",B],["rearg",O]],Pt="[object Arguments]",Ft="[object Array]",Vt="[object AsyncFunction]",Ut="[object Boolean]",Zt="[object Date]",J="[object DOMException]",q="[object Error]",at="[object Function]",St="[object GeneratorFunction]",Et="[object Map]",Jt="[object Number]",gr="[object Null]",Me="[object Object]",$r="[object Promise]",mr="[object Proxy]",Ai="[object RegExp]",vr="[object Set]",vs="[object String]",Ya="[object Symbol]",yO="[object Undefined]",ys="[object WeakMap]",_O="[object WeakSet]",_s="[object ArrayBuffer]",Ci="[object DataView]",Ul="[object Float32Array]",$l="[object Float64Array]",Gl="[object Int8Array]",zl="[object Int16Array]",Hl="[object Int32Array]",Vl="[object Uint8Array]",jl="[object Uint8ClampedArray]",Xl="[object Uint16Array]",Wl="[object Uint32Array]",xO=/\b__p \+= '';/g,bO=/\b(__p \+=) '' \+/g,TO=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ag=/&(?:amp|lt|gt|quot|#39);/g,Cg=/[&<>"']/g,wO=RegExp(Ag.source),SO=RegExp(Cg.source),AO=/<%-([\s\S]+?)%>/g,CO=/<%([\s\S]+?)%>/g,Eg=/<%=([\s\S]+?)%>/g,EO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IO=/^\w*$/,RO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ql=/[\\^$.*+?()[\]{}|]/g,PO=RegExp(ql.source),Yl=/^\s+/,MO=/\s/,OO=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,FO=/\{\n\/\* \[wrapped with (.+)\] \*/,NO=/,? & /,LO=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kO=/[()=,{}\[\]\/\s]/,BO=/\\(\\)?/g,DO=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ig=/\w*$/,UO=/^[-+]0x[0-9a-f]+$/i,$O=/^0b[01]+$/i,GO=/^\[object .+?Constructor\]$/,zO=/^0o[0-7]+$/i,HO=/^(?:0|[1-9]\d*)$/,VO=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ka=/($^)/,jO=/['\n\r\u2028\u2029\\]/g,Za="\\ud800-\\udfff",XO="\\u0300-\\u036f",WO="\\ufe20-\\ufe2f",qO="\\u20d0-\\u20ff",Rg=XO+WO+qO,Pg="\\u2700-\\u27bf",Mg="a-z\\xdf-\\xf6\\xf8-\\xff",YO="\\xac\\xb1\\xd7\\xf7",KO="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ZO="\\u2000-\\u206f",JO=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Og="A-Z\\xc0-\\xd6\\xd8-\\xde",Fg="\\ufe0e\\ufe0f",Ng=YO+KO+ZO+JO,Kl="['’]",QO="["+Za+"]",Lg="["+Ng+"]",Ja="["+Rg+"]",kg="\\d+",tF="["+Pg+"]",Bg="["+Mg+"]",Dg="[^"+Za+Ng+kg+Pg+Mg+Og+"]",Zl="\\ud83c[\\udffb-\\udfff]",eF="(?:"+Ja+"|"+Zl+")",Ug="[^"+Za+"]",Jl="(?:\\ud83c[\\udde6-\\uddff]){2}",Ql="[\\ud800-\\udbff][\\udc00-\\udfff]",Ei="["+Og+"]",$g="\\u200d",Gg="(?:"+Bg+"|"+Dg+")",rF="(?:"+Ei+"|"+Dg+")",zg="(?:"+Kl+"(?:d|ll|m|re|s|t|ve))?",Hg="(?:"+Kl+"(?:D|LL|M|RE|S|T|VE))?",Vg=eF+"?",jg="["+Fg+"]?",nF="(?:"+$g+"(?:"+[Ug,Jl,Ql].join("|")+")"+jg+Vg+")*",iF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xg=jg+Vg+nF,aF="(?:"+[tF,Jl,Ql].join("|")+")"+Xg,oF="(?:"+[Ug+Ja+"?",Ja,Jl,Ql,QO].join("|")+")",uF=RegExp(Kl,"g"),lF=RegExp(Ja,"g"),th=RegExp(Zl+"(?="+Zl+")|"+oF+Xg,"g"),hF=RegExp([Ei+"?"+Bg+"+"+zg+"(?="+[Lg,Ei,"$"].join("|")+")",rF+"+"+Hg+"(?="+[Lg,Ei+Gg,"$"].join("|")+")",Ei+"?"+Gg+"+"+zg,Ei+"+"+Hg,sF,iF,kg,aF].join("|"),"g"),cF=RegExp("["+$g+Za+Rg+Fg+"]"),fF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dF=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pF=-1,Qt={};Qt[Ul]=Qt[$l]=Qt[Gl]=Qt[zl]=Qt[Hl]=Qt[Vl]=Qt[jl]=Qt[Xl]=Qt[Wl]=!0,Qt[Pt]=Qt[Ft]=Qt[_s]=Qt[Ut]=Qt[Ci]=Qt[Zt]=Qt[q]=Qt[at]=Qt[Et]=Qt[Jt]=Qt[Me]=Qt[Ai]=Qt[vr]=Qt[vs]=Qt[ys]=!1;var qt={};qt[Pt]=qt[Ft]=qt[_s]=qt[Ci]=qt[Ut]=qt[Zt]=qt[Ul]=qt[$l]=qt[Gl]=qt[zl]=qt[Hl]=qt[Et]=qt[Jt]=qt[Me]=qt[Ai]=qt[vr]=qt[vs]=qt[Ya]=qt[Vl]=qt[jl]=qt[Xl]=qt[Wl]=!0,qt[q]=qt[at]=qt[ys]=!1;var gF={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},mF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_F=parseFloat,xF=parseInt,Wg=typeof We=="object"&&We&&We.Object===Object&&We,bF=typeof self=="object"&&self&&self.Object===Object&&self,be=Wg||bF||Function("return this")(),eh=t&&!t.nodeType&&t,Nn=eh&&!0&&e&&!e.nodeType&&e,qg=Nn&&Nn.exports===eh,rh=qg&&Wg.process,Ke=function(){try{var P=Nn&&Nn.require&&Nn.require("util").types;return P||rh&&rh.binding&&rh.binding("util")}catch{}}(),Yg=Ke&&Ke.isArrayBuffer,Kg=Ke&&Ke.isDate,Zg=Ke&&Ke.isMap,Jg=Ke&&Ke.isRegExp,Qg=Ke&&Ke.isSet,tm=Ke&&Ke.isTypedArray;function Ge(P,k,F){switch(F.length){case 0:return P.call(k);case 1:return P.call(k,F[0]);case 2:return P.call(k,F[0],F[1]);case 3:return P.call(k,F[0],F[1],F[2])}return P.apply(k,F)}function TF(P,k,F,Q){for(var ft=-1,Bt=P==null?0:P.length;++ft<Bt;){var pe=P[ft];k(Q,pe,F(pe),P)}return Q}function Ze(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q&&k(P[F],F,P)!==!1;);return P}function wF(P,k){for(var F=P==null?0:P.length;F--&&k(P[F],F,P)!==!1;);return P}function em(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q;)if(!k(P[F],F,P))return!1;return!0}function sn(P,k){for(var F=-1,Q=P==null?0:P.length,ft=0,Bt=[];++F<Q;){var pe=P[F];k(pe,F,P)&&(Bt[ft++]=pe)}return Bt}function Qa(P,k){var F=P==null?0:P.length;return!!F&&Ii(P,k,0)>-1}function nh(P,k,F){for(var Q=-1,ft=P==null?0:P.length;++Q<ft;)if(F(k,P[Q]))return!0;return!1}function ee(P,k){for(var F=-1,Q=P==null?0:P.length,ft=Array(Q);++F<Q;)ft[F]=k(P[F],F,P);return ft}function an(P,k){for(var F=-1,Q=k.length,ft=P.length;++F<Q;)P[ft+F]=k[F];return P}function ih(P,k,F,Q){var ft=-1,Bt=P==null?0:P.length;for(Q&&Bt&&(F=P[++ft]);++ft<Bt;)F=k(F,P[ft],ft,P);return F}function SF(P,k,F,Q){var ft=P==null?0:P.length;for(Q&&ft&&(F=P[--ft]);ft--;)F=k(F,P[ft],ft,P);return F}function sh(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q;)if(k(P[F],F,P))return!0;return!1}var AF=ah("length");function CF(P){return P.split("")}function EF(P){return P.match(LO)||[]}function rm(P,k,F){var Q;return F(P,function(ft,Bt,pe){if(k(ft,Bt,pe))return Q=Bt,!1}),Q}function to(P,k,F,Q){for(var ft=P.length,Bt=F+(Q?1:-1);Q?Bt--:++Bt<ft;)if(k(P[Bt],Bt,P))return Bt;return-1}function Ii(P,k,F){return k===k?UF(P,k,F):to(P,nm,F)}function IF(P,k,F,Q){for(var ft=F-1,Bt=P.length;++ft<Bt;)if(Q(P[ft],k))return ft;return-1}function nm(P){return P!==P}function im(P,k){var F=P==null?0:P.length;return F?uh(P,k)/F:H}function ah(P){return function(k){return k==null?r:k[P]}}function oh(P){return function(k){return P==null?r:P[k]}}function sm(P,k,F,Q,ft){return ft(P,function(Bt,pe,Xt){F=Q?(Q=!1,Bt):k(F,Bt,pe,Xt)}),F}function RF(P,k){var F=P.length;for(P.sort(k);F--;)P[F]=P[F].value;return P}function uh(P,k){for(var F,Q=-1,ft=P.length;++Q<ft;){var Bt=k(P[Q]);Bt!==r&&(F=F===r?Bt:F+Bt)}return F}function lh(P,k){for(var F=-1,Q=Array(P);++F<P;)Q[F]=k(F);return Q}function PF(P,k){return ee(k,function(F){return[F,P[F]]})}function am(P){return P&&P.slice(0,hm(P)+1).replace(Yl,"")}function ze(P){return function(k){return P(k)}}function hh(P,k){return ee(k,function(F){return P[F]})}function xs(P,k){return P.has(k)}function om(P,k){for(var F=-1,Q=P.length;++F<Q&&Ii(k,P[F],0)>-1;);return F}function um(P,k){for(var F=P.length;F--&&Ii(k,P[F],0)>-1;);return F}function MF(P,k){for(var F=P.length,Q=0;F--;)P[F]===k&&++Q;return Q}var OF=oh(gF),FF=oh(mF);function NF(P){return"\\"+yF[P]}function LF(P,k){return P==null?r:P[k]}function Ri(P){return cF.test(P)}function kF(P){return fF.test(P)}function BF(P){for(var k,F=[];!(k=P.next()).done;)F.push(k.value);return F}function ch(P){var k=-1,F=Array(P.size);return P.forEach(function(Q,ft){F[++k]=[ft,Q]}),F}function lm(P,k){return function(F){return P(k(F))}}function on(P,k){for(var F=-1,Q=P.length,ft=0,Bt=[];++F<Q;){var pe=P[F];(pe===k||pe===p)&&(P[F]=p,Bt[ft++]=F)}return Bt}function eo(P){var k=-1,F=Array(P.size);return P.forEach(function(Q){F[++k]=Q}),F}function DF(P){var k=-1,F=Array(P.size);return P.forEach(function(Q){F[++k]=[Q,Q]}),F}function UF(P,k,F){for(var Q=F-1,ft=P.length;++Q<ft;)if(P[Q]===k)return Q;return-1}function $F(P,k,F){for(var Q=F+1;Q--;)if(P[Q]===k)return Q;return Q}function Pi(P){return Ri(P)?zF(P):AF(P)}function yr(P){return Ri(P)?HF(P):CF(P)}function hm(P){for(var k=P.length;k--&&MO.test(P.charAt(k)););return k}var GF=oh(vF);function zF(P){for(var k=th.lastIndex=0;th.test(P);)++k;return k}function HF(P){return P.match(th)||[]}function VF(P){return P.match(hF)||[]}var jF=function P(k){k=k==null?be:Mi.defaults(be.Object(),k,Mi.pick(be,dF));var F=k.Array,Q=k.Date,ft=k.Error,Bt=k.Function,pe=k.Math,Xt=k.Object,fh=k.RegExp,XF=k.String,Je=k.TypeError,ro=F.prototype,WF=Bt.prototype,Oi=Xt.prototype,no=k["__core-js_shared__"],io=WF.toString,zt=Oi.hasOwnProperty,qF=0,cm=function(){var i=/[^.]+$/.exec(no&&no.keys&&no.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),so=Oi.toString,YF=io.call(Xt),KF=be._,ZF=fh("^"+io.call(zt).replace(ql,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ao=qg?k.Buffer:r,un=k.Symbol,oo=k.Uint8Array,fm=ao?ao.allocUnsafe:r,uo=lm(Xt.getPrototypeOf,Xt),dm=Xt.create,pm=Oi.propertyIsEnumerable,lo=ro.splice,gm=un?un.isConcatSpreadable:r,bs=un?un.iterator:r,Ln=un?un.toStringTag:r,ho=function(){try{var i=$n(Xt,"defineProperty");return i({},"",{}),i}catch{}}(),JF=k.clearTimeout!==be.clearTimeout&&k.clearTimeout,QF=Q&&Q.now!==be.Date.now&&Q.now,t3=k.setTimeout!==be.setTimeout&&k.setTimeout,co=pe.ceil,fo=pe.floor,dh=Xt.getOwnPropertySymbols,e3=ao?ao.isBuffer:r,mm=k.isFinite,r3=ro.join,n3=lm(Xt.keys,Xt),ge=pe.max,Ee=pe.min,i3=Q.now,s3=k.parseInt,vm=pe.random,a3=ro.reverse,ph=$n(k,"DataView"),Ts=$n(k,"Map"),gh=$n(k,"Promise"),Fi=$n(k,"Set"),ws=$n(k,"WeakMap"),Ss=$n(Xt,"create"),po=ws&&new ws,Ni={},o3=Gn(ph),u3=Gn(Ts),l3=Gn(gh),h3=Gn(Fi),c3=Gn(ws),go=un?un.prototype:r,As=go?go.valueOf:r,ym=go?go.toString:r;function _(i){if(ae(i)&&!dt(i)&&!(i instanceof At)){if(i instanceof Qe)return i;if(zt.call(i,"__wrapped__"))return _0(i)}return new Qe(i)}var Li=function(){function i(){}return function(o){if(!se(o))return{};if(dm)return dm(o);i.prototype=o;var h=new i;return i.prototype=r,h}}();function mo(){}function Qe(i,o){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}_.templateSettings={escape:AO,evaluate:CO,interpolate:Eg,variable:"",imports:{_}},_.prototype=mo.prototype,_.prototype.constructor=_,Qe.prototype=Li(mo.prototype),Qe.prototype.constructor=Qe;function At(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=K,this.__views__=[]}function f3(){var i=new At(this.__wrapped__);return i.__actions__=Le(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Le(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Le(this.__views__),i}function d3(){if(this.__filtered__){var i=new At(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function p3(){var i=this.__wrapped__.value(),o=this.__dir__,h=dt(i),d=o<0,v=h?i.length:0,b=CN(0,v,this.__views__),C=b.start,E=b.end,M=E-C,D=d?E:C-1,U=this.__iteratees__,$=U.length,Y=0,et=Ee(M,this.__takeCount__);if(!h||!d&&v==M&&et==M)return zm(i,this.__actions__);var ut=[];t:for(;M--&&Y<et;){D+=o;for(var mt=-1,lt=i[D];++mt<$;){var bt=U[mt],It=bt.iteratee,je=bt.type,Ne=It(lt);if(je==xt)lt=Ne;else if(!Ne){if(je==j)continue t;break t}}ut[Y++]=lt}return ut}At.prototype=Li(mo.prototype),At.prototype.constructor=At;function kn(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function g3(){this.__data__=Ss?Ss(null):{},this.size=0}function m3(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}function v3(i){var o=this.__data__;if(Ss){var h=o[i];return h===c?r:h}return zt.call(o,i)?o[i]:r}function y3(i){var o=this.__data__;return Ss?o[i]!==r:zt.call(o,i)}function _3(i,o){var h=this.__data__;return this.size+=this.has(i)?0:1,h[i]=Ss&&o===r?c:o,this}kn.prototype.clear=g3,kn.prototype.delete=m3,kn.prototype.get=v3,kn.prototype.has=y3,kn.prototype.set=_3;function Gr(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function x3(){this.__data__=[],this.size=0}function b3(i){var o=this.__data__,h=vo(o,i);if(h<0)return!1;var d=o.length-1;return h==d?o.pop():lo.call(o,h,1),--this.size,!0}function T3(i){var o=this.__data__,h=vo(o,i);return h<0?r:o[h][1]}function w3(i){return vo(this.__data__,i)>-1}function S3(i,o){var h=this.__data__,d=vo(h,i);return d<0?(++this.size,h.push([i,o])):h[d][1]=o,this}Gr.prototype.clear=x3,Gr.prototype.delete=b3,Gr.prototype.get=T3,Gr.prototype.has=w3,Gr.prototype.set=S3;function zr(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function A3(){this.size=0,this.__data__={hash:new kn,map:new(Ts||Gr),string:new kn}}function C3(i){var o=Ro(this,i).delete(i);return this.size-=o?1:0,o}function E3(i){return Ro(this,i).get(i)}function I3(i){return Ro(this,i).has(i)}function R3(i,o){var h=Ro(this,i),d=h.size;return h.set(i,o),this.size+=h.size==d?0:1,this}zr.prototype.clear=A3,zr.prototype.delete=C3,zr.prototype.get=E3,zr.prototype.has=I3,zr.prototype.set=R3;function Bn(i){var o=-1,h=i==null?0:i.length;for(this.__data__=new zr;++o<h;)this.add(i[o])}function P3(i){return this.__data__.set(i,c),this}function M3(i){return this.__data__.has(i)}Bn.prototype.add=Bn.prototype.push=P3,Bn.prototype.has=M3;function _r(i){var o=this.__data__=new Gr(i);this.size=o.size}function O3(){this.__data__=new Gr,this.size=0}function F3(i){var o=this.__data__,h=o.delete(i);return this.size=o.size,h}function N3(i){return this.__data__.get(i)}function L3(i){return this.__data__.has(i)}function k3(i,o){var h=this.__data__;if(h instanceof Gr){var d=h.__data__;if(!Ts||d.length<s-1)return d.push([i,o]),this.size=++h.size,this;h=this.__data__=new zr(d)}return h.set(i,o),this.size=h.size,this}_r.prototype.clear=O3,_r.prototype.delete=F3,_r.prototype.get=N3,_r.prototype.has=L3,_r.prototype.set=k3;function _m(i,o){var h=dt(i),d=!h&&zn(i),v=!h&&!d&&dn(i),b=!h&&!d&&!v&&Ui(i),C=h||d||v||b,E=C?lh(i.length,XF):[],M=E.length;for(var D in i)(o||zt.call(i,D))&&!(C&&(D=="length"||v&&(D=="offset"||D=="parent")||b&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||Xr(D,M)))&&E.push(D);return E}function xm(i){var o=i.length;return o?i[Ch(0,o-1)]:r}function B3(i,o){return Po(Le(i),Dn(o,0,i.length))}function D3(i){return Po(Le(i))}function mh(i,o,h){(h!==r&&!xr(i[o],h)||h===r&&!(o in i))&&Hr(i,o,h)}function Cs(i,o,h){var d=i[o];(!(zt.call(i,o)&&xr(d,h))||h===r&&!(o in i))&&Hr(i,o,h)}function vo(i,o){for(var h=i.length;h--;)if(xr(i[h][0],o))return h;return-1}function U3(i,o,h,d){return ln(i,function(v,b,C){o(d,v,h(v),C)}),d}function bm(i,o){return i&&Mr(o,_e(o),i)}function $3(i,o){return i&&Mr(o,Be(o),i)}function Hr(i,o,h){o=="__proto__"&&ho?ho(i,o,{configurable:!0,enumerable:!0,value:h,writable:!0}):i[o]=h}function vh(i,o){for(var h=-1,d=o.length,v=F(d),b=i==null;++h<d;)v[h]=b?r:Zh(i,o[h]);return v}function Dn(i,o,h){return i===i&&(h!==r&&(i=i<=h?i:h),o!==r&&(i=i>=o?i:o)),i}function tr(i,o,h,d,v,b){var C,E=o&m,M=o&g,D=o&x;if(h&&(C=v?h(i,d,v,b):h(i)),C!==r)return C;if(!se(i))return i;var U=dt(i);if(U){if(C=IN(i),!E)return Le(i,C)}else{var $=Ie(i),Y=$==at||$==St;if(dn(i))return jm(i,E);if($==Me||$==Pt||Y&&!v){if(C=M||Y?{}:h0(i),!E)return M?vN(i,$3(C,i)):mN(i,bm(C,i))}else{if(!qt[$])return v?i:{};C=RN(i,$,E)}}b||(b=new _r);var et=b.get(i);if(et)return et;b.set(i,C),U0(i)?i.forEach(function(lt){C.add(tr(lt,o,h,lt,i,b))}):B0(i)&&i.forEach(function(lt,bt){C.set(bt,tr(lt,o,h,bt,i,b))});var ut=D?M?Bh:kh:M?Be:_e,mt=U?r:ut(i);return Ze(mt||i,function(lt,bt){mt&&(bt=lt,lt=i[bt]),Cs(C,bt,tr(lt,o,h,bt,i,b))}),C}function G3(i){var o=_e(i);return function(h){return Tm(h,i,o)}}function Tm(i,o,h){var d=h.length;if(i==null)return!d;for(i=Xt(i);d--;){var v=h[d],b=o[v],C=i[v];if(C===r&&!(v in i)||!b(C))return!1}return!0}function wm(i,o,h){if(typeof i!="function")throw new Je(u);return Fs(function(){i.apply(r,h)},o)}function Es(i,o,h,d){var v=-1,b=Qa,C=!0,E=i.length,M=[],D=o.length;if(!E)return M;h&&(o=ee(o,ze(h))),d?(b=nh,C=!1):o.length>=s&&(b=xs,C=!1,o=new Bn(o));t:for(;++v<E;){var U=i[v],$=h==null?U:h(U);if(U=d||U!==0?U:0,C&&$===$){for(var Y=D;Y--;)if(o[Y]===$)continue t;M.push(U)}else b(o,$,d)||M.push(U)}return M}var ln=Km(Pr),Sm=Km(_h,!0);function z3(i,o){var h=!0;return ln(i,function(d,v,b){return h=!!o(d,v,b),h}),h}function yo(i,o,h){for(var d=-1,v=i.length;++d<v;){var b=i[d],C=o(b);if(C!=null&&(E===r?C===C&&!Ve(C):h(C,E)))var E=C,M=b}return M}function H3(i,o,h,d){var v=i.length;for(h=pt(h),h<0&&(h=-h>v?0:v+h),d=d===r||d>v?v:pt(d),d<0&&(d+=v),d=h>d?0:G0(d);h<d;)i[h++]=o;return i}function Am(i,o){var h=[];return ln(i,function(d,v,b){o(d,v,b)&&h.push(d)}),h}function Te(i,o,h,d,v){var b=-1,C=i.length;for(h||(h=MN),v||(v=[]);++b<C;){var E=i[b];o>0&&h(E)?o>1?Te(E,o-1,h,d,v):an(v,E):d||(v[v.length]=E)}return v}var yh=Zm(),Cm=Zm(!0);function Pr(i,o){return i&&yh(i,o,_e)}function _h(i,o){return i&&Cm(i,o,_e)}function _o(i,o){return sn(o,function(h){return Wr(i[h])})}function Un(i,o){o=cn(o,i);for(var h=0,d=o.length;i!=null&&h<d;)i=i[Or(o[h++])];return h&&h==d?i:r}function Em(i,o,h){var d=o(i);return dt(i)?d:an(d,h(i))}function Oe(i){return i==null?i===r?yO:gr:Ln&&Ln in Xt(i)?AN(i):DN(i)}function xh(i,o){return i>o}function V3(i,o){return i!=null&&zt.call(i,o)}function j3(i,o){return i!=null&&o in Xt(i)}function X3(i,o,h){return i>=Ee(o,h)&&i<ge(o,h)}function bh(i,o,h){for(var d=h?nh:Qa,v=i[0].length,b=i.length,C=b,E=F(b),M=1/0,D=[];C--;){var U=i[C];C&&o&&(U=ee(U,ze(o))),M=Ee(U.length,M),E[C]=!h&&(o||v>=120&&U.length>=120)?new Bn(C&&U):r}U=i[0];var $=-1,Y=E[0];t:for(;++$<v&&D.length<M;){var et=U[$],ut=o?o(et):et;if(et=h||et!==0?et:0,!(Y?xs(Y,ut):d(D,ut,h))){for(C=b;--C;){var mt=E[C];if(!(mt?xs(mt,ut):d(i[C],ut,h)))continue t}Y&&Y.push(ut),D.push(et)}}return D}function W3(i,o,h,d){return Pr(i,function(v,b,C){o(d,h(v),b,C)}),d}function Is(i,o,h){o=cn(o,i),i=p0(i,o);var d=i==null?i:i[Or(rr(o))];return d==null?r:Ge(d,i,h)}function Im(i){return ae(i)&&Oe(i)==Pt}function q3(i){return ae(i)&&Oe(i)==_s}function Y3(i){return ae(i)&&Oe(i)==Zt}function Rs(i,o,h,d,v){return i===o?!0:i==null||o==null||!ae(i)&&!ae(o)?i!==i&&o!==o:K3(i,o,h,d,Rs,v)}function K3(i,o,h,d,v,b){var C=dt(i),E=dt(o),M=C?Ft:Ie(i),D=E?Ft:Ie(o);M=M==Pt?Me:M,D=D==Pt?Me:D;var U=M==Me,$=D==Me,Y=M==D;if(Y&&dn(i)){if(!dn(o))return!1;C=!0,U=!1}if(Y&&!U)return b||(b=new _r),C||Ui(i)?o0(i,o,h,d,v,b):wN(i,o,M,h,d,v,b);if(!(h&y)){var et=U&&zt.call(i,"__wrapped__"),ut=$&&zt.call(o,"__wrapped__");if(et||ut){var mt=et?i.value():i,lt=ut?o.value():o;return b||(b=new _r),v(mt,lt,h,d,b)}}return Y?(b||(b=new _r),SN(i,o,h,d,v,b)):!1}function Z3(i){return ae(i)&&Ie(i)==Et}function Th(i,o,h,d){var v=h.length,b=v,C=!d;if(i==null)return!b;for(i=Xt(i);v--;){var E=h[v];if(C&&E[2]?E[1]!==i[E[0]]:!(E[0]in i))return!1}for(;++v<b;){E=h[v];var M=E[0],D=i[M],U=E[1];if(C&&E[2]){if(D===r&&!(M in i))return!1}else{var $=new _r;if(d)var Y=d(D,U,M,i,o,$);if(!(Y===r?Rs(U,D,y|S,d,$):Y))return!1}}return!0}function Rm(i){if(!se(i)||FN(i))return!1;var o=Wr(i)?ZF:GO;return o.test(Gn(i))}function J3(i){return ae(i)&&Oe(i)==Ai}function Q3(i){return ae(i)&&Ie(i)==vr}function tN(i){return ae(i)&&ko(i.length)&&!!Qt[Oe(i)]}function Pm(i){return typeof i=="function"?i:i==null?De:typeof i=="object"?dt(i)?Fm(i[0],i[1]):Om(i):J0(i)}function wh(i){if(!Os(i))return n3(i);var o=[];for(var h in Xt(i))zt.call(i,h)&&h!="constructor"&&o.push(h);return o}function eN(i){if(!se(i))return BN(i);var o=Os(i),h=[];for(var d in i)d=="constructor"&&(o||!zt.call(i,d))||h.push(d);return h}function Sh(i,o){return i<o}function Mm(i,o){var h=-1,d=ke(i)?F(i.length):[];return ln(i,function(v,b,C){d[++h]=o(v,b,C)}),d}function Om(i){var o=Uh(i);return o.length==1&&o[0][2]?f0(o[0][0],o[0][1]):function(h){return h===i||Th(h,i,o)}}function Fm(i,o){return Gh(i)&&c0(o)?f0(Or(i),o):function(h){var d=Zh(h,i);return d===r&&d===o?Jh(h,i):Rs(o,d,y|S)}}function xo(i,o,h,d,v){i!==o&&yh(o,function(b,C){if(v||(v=new _r),se(b))rN(i,o,C,h,xo,d,v);else{var E=d?d(Hh(i,C),b,C+"",i,o,v):r;E===r&&(E=b),mh(i,C,E)}},Be)}function rN(i,o,h,d,v,b,C){var E=Hh(i,h),M=Hh(o,h),D=C.get(M);if(D){mh(i,h,D);return}var U=b?b(E,M,h+"",i,o,C):r,$=U===r;if($){var Y=dt(M),et=!Y&&dn(M),ut=!Y&&!et&&Ui(M);U=M,Y||et||ut?dt(E)?U=E:he(E)?U=Le(E):et?($=!1,U=jm(M,!0)):ut?($=!1,U=Xm(M,!0)):U=[]:Ns(M)||zn(M)?(U=E,zn(E)?U=z0(E):(!se(E)||Wr(E))&&(U=h0(M))):$=!1}$&&(C.set(M,U),v(U,M,d,b,C),C.delete(M)),mh(i,h,U)}function Nm(i,o){var h=i.length;if(h)return o+=o<0?h:0,Xr(o,h)?i[o]:r}function Lm(i,o,h){o.length?o=ee(o,function(b){return dt(b)?function(C){return Un(C,b.length===1?b[0]:b)}:b}):o=[De];var d=-1;o=ee(o,ze(ot()));var v=Mm(i,function(b,C,E){var M=ee(o,function(D){return D(b)});return{criteria:M,index:++d,value:b}});return RF(v,function(b,C){return gN(b,C,h)})}function nN(i,o){return km(i,o,function(h,d){return Jh(i,d)})}function km(i,o,h){for(var d=-1,v=o.length,b={};++d<v;){var C=o[d],E=Un(i,C);h(E,C)&&Ps(b,cn(C,i),E)}return b}function iN(i){return function(o){return Un(o,i)}}function Ah(i,o,h,d){var v=d?IF:Ii,b=-1,C=o.length,E=i;for(i===o&&(o=Le(o)),h&&(E=ee(i,ze(h)));++b<C;)for(var M=0,D=o[b],U=h?h(D):D;(M=v(E,U,M,d))>-1;)E!==i&&lo.call(E,M,1),lo.call(i,M,1);return i}function Bm(i,o){for(var h=i?o.length:0,d=h-1;h--;){var v=o[h];if(h==d||v!==b){var b=v;Xr(v)?lo.call(i,v,1):Rh(i,v)}}return i}function Ch(i,o){return i+fo(vm()*(o-i+1))}function sN(i,o,h,d){for(var v=-1,b=ge(co((o-i)/(h||1)),0),C=F(b);b--;)C[d?b:++v]=i,i+=h;return C}function Eh(i,o){var h="";if(!i||o<1||o>rt)return h;do o%2&&(h+=i),o=fo(o/2),o&&(i+=i);while(o);return h}function vt(i,o){return Vh(d0(i,o,De),i+"")}function aN(i){return xm($i(i))}function oN(i,o){var h=$i(i);return Po(h,Dn(o,0,h.length))}function Ps(i,o,h,d){if(!se(i))return i;o=cn(o,i);for(var v=-1,b=o.length,C=b-1,E=i;E!=null&&++v<b;){var M=Or(o[v]),D=h;if(M==="__proto__"||M==="constructor"||M==="prototype")return i;if(v!=C){var U=E[M];D=d?d(U,M,E):r,D===r&&(D=se(U)?U:Xr(o[v+1])?[]:{})}Cs(E,M,D),E=E[M]}return i}var Dm=po?function(i,o){return po.set(i,o),i}:De,uN=ho?function(i,o){return ho(i,"toString",{configurable:!0,enumerable:!1,value:tc(o),writable:!0})}:De;function lN(i){return Po($i(i))}function er(i,o,h){var d=-1,v=i.length;o<0&&(o=-o>v?0:v+o),h=h>v?v:h,h<0&&(h+=v),v=o>h?0:h-o>>>0,o>>>=0;for(var b=F(v);++d<v;)b[d]=i[d+o];return b}function hN(i,o){var h;return ln(i,function(d,v,b){return h=o(d,v,b),!h}),!!h}function bo(i,o,h){var d=0,v=i==null?d:i.length;if(typeof o=="number"&&o===o&&v<=yt){for(;d<v;){var b=d+v>>>1,C=i[b];C!==null&&!Ve(C)&&(h?C<=o:C<o)?d=b+1:v=b}return v}return Ih(i,o,De,h)}function Ih(i,o,h,d){var v=0,b=i==null?0:i.length;if(b===0)return 0;o=h(o);for(var C=o!==o,E=o===null,M=Ve(o),D=o===r;v<b;){var U=fo((v+b)/2),$=h(i[U]),Y=$!==r,et=$===null,ut=$===$,mt=Ve($);if(C)var lt=d||ut;else D?lt=ut&&(d||Y):E?lt=ut&&Y&&(d||!et):M?lt=ut&&Y&&!et&&(d||!mt):et||mt?lt=!1:lt=d?$<=o:$<o;lt?v=U+1:b=U}return Ee(b,ct)}function Um(i,o){for(var h=-1,d=i.length,v=0,b=[];++h<d;){var C=i[h],E=o?o(C):C;if(!h||!xr(E,M)){var M=E;b[v++]=C===0?0:C}}return b}function $m(i){return typeof i=="number"?i:Ve(i)?H:+i}function He(i){if(typeof i=="string")return i;if(dt(i))return ee(i,He)+"";if(Ve(i))return ym?ym.call(i):"";var o=i+"";return o=="0"&&1/i==-G?"-0":o}function hn(i,o,h){var d=-1,v=Qa,b=i.length,C=!0,E=[],M=E;if(h)C=!1,v=nh;else if(b>=s){var D=o?null:bN(i);if(D)return eo(D);C=!1,v=xs,M=new Bn}else M=o?[]:E;t:for(;++d<b;){var U=i[d],$=o?o(U):U;if(U=h||U!==0?U:0,C&&$===$){for(var Y=M.length;Y--;)if(M[Y]===$)continue t;o&&M.push($),E.push(U)}else v(M,$,h)||(M!==E&&M.push($),E.push(U))}return E}function Rh(i,o){return o=cn(o,i),i=p0(i,o),i==null||delete i[Or(rr(o))]}function Gm(i,o,h,d){return Ps(i,o,h(Un(i,o)),d)}function To(i,o,h,d){for(var v=i.length,b=d?v:-1;(d?b--:++b<v)&&o(i[b],b,i););return h?er(i,d?0:b,d?b+1:v):er(i,d?b+1:0,d?v:b)}function zm(i,o){var h=i;return h instanceof At&&(h=h.value()),ih(o,function(d,v){return v.func.apply(v.thisArg,an([d],v.args))},h)}function Ph(i,o,h){var d=i.length;if(d<2)return d?hn(i[0]):[];for(var v=-1,b=F(d);++v<d;)for(var C=i[v],E=-1;++E<d;)E!=v&&(b[v]=Es(b[v]||C,i[E],o,h));return hn(Te(b,1),o,h)}function Hm(i,o,h){for(var d=-1,v=i.length,b=o.length,C={};++d<v;){var E=d<b?o[d]:r;h(C,i[d],E)}return C}function Mh(i){return he(i)?i:[]}function Oh(i){return typeof i=="function"?i:De}function cn(i,o){return dt(i)?i:Gh(i,o)?[i]:y0($t(i))}var cN=vt;function fn(i,o,h){var d=i.length;return h=h===r?d:h,!o&&h>=d?i:er(i,o,h)}var Vm=JF||function(i){return be.clearTimeout(i)};function jm(i,o){if(o)return i.slice();var h=i.length,d=fm?fm(h):new i.constructor(h);return i.copy(d),d}function Fh(i){var o=new i.constructor(i.byteLength);return new oo(o).set(new oo(i)),o}function fN(i,o){var h=o?Fh(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.byteLength)}function dN(i){var o=new i.constructor(i.source,Ig.exec(i));return o.lastIndex=i.lastIndex,o}function pN(i){return As?Xt(As.call(i)):{}}function Xm(i,o){var h=o?Fh(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.length)}function Wm(i,o){if(i!==o){var h=i!==r,d=i===null,v=i===i,b=Ve(i),C=o!==r,E=o===null,M=o===o,D=Ve(o);if(!E&&!D&&!b&&i>o||b&&C&&M&&!E&&!D||d&&C&&M||!h&&M||!v)return 1;if(!d&&!b&&!D&&i<o||D&&h&&v&&!d&&!b||E&&h&&v||!C&&v||!M)return-1}return 0}function gN(i,o,h){for(var d=-1,v=i.criteria,b=o.criteria,C=v.length,E=h.length;++d<C;){var M=Wm(v[d],b[d]);if(M){if(d>=E)return M;var D=h[d];return M*(D=="desc"?-1:1)}}return i.index-o.index}function qm(i,o,h,d){for(var v=-1,b=i.length,C=h.length,E=-1,M=o.length,D=ge(b-C,0),U=F(M+D),$=!d;++E<M;)U[E]=o[E];for(;++v<C;)($||v<b)&&(U[h[v]]=i[v]);for(;D--;)U[E++]=i[v++];return U}function Ym(i,o,h,d){for(var v=-1,b=i.length,C=-1,E=h.length,M=-1,D=o.length,U=ge(b-E,0),$=F(U+D),Y=!d;++v<U;)$[v]=i[v];for(var et=v;++M<D;)$[et+M]=o[M];for(;++C<E;)(Y||v<b)&&($[et+h[C]]=i[v++]);return $}function Le(i,o){var h=-1,d=i.length;for(o||(o=F(d));++h<d;)o[h]=i[h];return o}function Mr(i,o,h,d){var v=!h;h||(h={});for(var b=-1,C=o.length;++b<C;){var E=o[b],M=d?d(h[E],i[E],E,h,i):r;M===r&&(M=i[E]),v?Hr(h,E,M):Cs(h,E,M)}return h}function mN(i,o){return Mr(i,$h(i),o)}function vN(i,o){return Mr(i,u0(i),o)}function wo(i,o){return function(h,d){var v=dt(h)?TF:U3,b=o?o():{};return v(h,i,ot(d,2),b)}}function ki(i){return vt(function(o,h){var d=-1,v=h.length,b=v>1?h[v-1]:r,C=v>2?h[2]:r;for(b=i.length>3&&typeof b=="function"?(v--,b):r,C&&Fe(h[0],h[1],C)&&(b=v<3?r:b,v=1),o=Xt(o);++d<v;){var E=h[d];E&&i(o,E,d,b)}return o})}function Km(i,o){return function(h,d){if(h==null)return h;if(!ke(h))return i(h,d);for(var v=h.length,b=o?v:-1,C=Xt(h);(o?b--:++b<v)&&d(C[b],b,C)!==!1;);return h}}function Zm(i){return function(o,h,d){for(var v=-1,b=Xt(o),C=d(o),E=C.length;E--;){var M=C[i?E:++v];if(h(b[M],M,b)===!1)break}return o}}function yN(i,o,h){var d=o&T,v=Ms(i);function b(){var C=this&&this!==be&&this instanceof b?v:i;return C.apply(d?h:this,arguments)}return b}function Jm(i){return function(o){o=$t(o);var h=Ri(o)?yr(o):r,d=h?h[0]:o.charAt(0),v=h?fn(h,1).join(""):o.slice(1);return d[i]()+v}}function Bi(i){return function(o){return ih(K0(Y0(o).replace(uF,"")),i,"")}}function Ms(i){return function(){var o=arguments;switch(o.length){case 0:return new i;case 1:return new i(o[0]);case 2:return new i(o[0],o[1]);case 3:return new i(o[0],o[1],o[2]);case 4:return new i(o[0],o[1],o[2],o[3]);case 5:return new i(o[0],o[1],o[2],o[3],o[4]);case 6:return new i(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new i(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var h=Li(i.prototype),d=i.apply(h,o);return se(d)?d:h}}function _N(i,o,h){var d=Ms(i);function v(){for(var b=arguments.length,C=F(b),E=b,M=Di(v);E--;)C[E]=arguments[E];var D=b<3&&C[0]!==M&&C[b-1]!==M?[]:on(C,M);if(b-=D.length,b<h)return n0(i,o,So,v.placeholder,r,C,D,r,r,h-b);var U=this&&this!==be&&this instanceof v?d:i;return Ge(U,this,C)}return v}function Qm(i){return function(o,h,d){var v=Xt(o);if(!ke(o)){var b=ot(h,3);o=_e(o),h=function(E){return b(v[E],E,v)}}var C=i(o,h,d);return C>-1?v[b?o[C]:C]:r}}function t0(i){return jr(function(o){var h=o.length,d=h,v=Qe.prototype.thru;for(i&&o.reverse();d--;){var b=o[d];if(typeof b!="function")throw new Je(u);if(v&&!C&&Io(b)=="wrapper")var C=new Qe([],!0)}for(d=C?d:h;++d<h;){b=o[d];var E=Io(b),M=E=="wrapper"?Dh(b):r;M&&zh(M[0])&&M[1]==(L|A|N|O)&&!M[4].length&&M[9]==1?C=C[Io(M[0])].apply(C,M[3]):C=b.length==1&&zh(b)?C[E]():C.thru(b)}return function(){var D=arguments,U=D[0];if(C&&D.length==1&&dt(U))return C.plant(U).value();for(var $=0,Y=h?o[$].apply(this,D):U;++$<h;)Y=o[$].call(this,Y);return Y}})}function So(i,o,h,d,v,b,C,E,M,D){var U=o&L,$=o&T,Y=o&w,et=o&(A|R),ut=o&z,mt=Y?r:Ms(i);function lt(){for(var bt=arguments.length,It=F(bt),je=bt;je--;)It[je]=arguments[je];if(et)var Ne=Di(lt),Xe=MF(It,Ne);if(d&&(It=qm(It,d,v,et)),b&&(It=Ym(It,b,C,et)),bt-=Xe,et&&bt<D){var ce=on(It,Ne);return n0(i,o,So,lt.placeholder,h,It,ce,E,M,D-bt)}var br=$?h:this,Yr=Y?br[i]:i;return bt=It.length,E?It=UN(It,E):ut&&bt>1&&It.reverse(),U&&M<bt&&(It.length=M),this&&this!==be&&this instanceof lt&&(Yr=mt||Ms(Yr)),Yr.apply(br,It)}return lt}function e0(i,o){return function(h,d){return W3(h,i,o(d),{})}}function Ao(i,o){return function(h,d){var v;if(h===r&&d===r)return o;if(h!==r&&(v=h),d!==r){if(v===r)return d;typeof h=="string"||typeof d=="string"?(h=He(h),d=He(d)):(h=$m(h),d=$m(d)),v=i(h,d)}return v}}function Nh(i){return jr(function(o){return o=ee(o,ze(ot())),vt(function(h){var d=this;return i(o,function(v){return Ge(v,d,h)})})})}function Co(i,o){o=o===r?" ":He(o);var h=o.length;if(h<2)return h?Eh(o,i):o;var d=Eh(o,co(i/Pi(o)));return Ri(o)?fn(yr(d),0,i).join(""):d.slice(0,i)}function xN(i,o,h,d){var v=o&T,b=Ms(i);function C(){for(var E=-1,M=arguments.length,D=-1,U=d.length,$=F(U+M),Y=this&&this!==be&&this instanceof C?b:i;++D<U;)$[D]=d[D];for(;M--;)$[D++]=arguments[++E];return Ge(Y,v?h:this,$)}return C}function r0(i){return function(o,h,d){return d&&typeof d!="number"&&Fe(o,h,d)&&(h=d=r),o=qr(o),h===r?(h=o,o=0):h=qr(h),d=d===r?o<h?1:-1:qr(d),sN(o,h,d,i)}}function Eo(i){return function(o,h){return typeof o=="string"&&typeof h=="string"||(o=nr(o),h=nr(h)),i(o,h)}}function n0(i,o,h,d,v,b,C,E,M,D){var U=o&A,$=U?C:r,Y=U?r:C,et=U?b:r,ut=U?r:b;o|=U?N:B,o&=~(U?B:N),o&I||(o&=~(T|w));var mt=[i,o,v,et,$,ut,Y,E,M,D],lt=h.apply(r,mt);return zh(i)&&g0(lt,mt),lt.placeholder=d,m0(lt,i,o)}function Lh(i){var o=pe[i];return function(h,d){if(h=nr(h),d=d==null?0:Ee(pt(d),292),d&&mm(h)){var v=($t(h)+"e").split("e"),b=o(v[0]+"e"+(+v[1]+d));return v=($t(b)+"e").split("e"),+(v[0]+"e"+(+v[1]-d))}return o(h)}}var bN=Fi&&1/eo(new Fi([,-0]))[1]==G?function(i){return new Fi(i)}:nc;function i0(i){return function(o){var h=Ie(o);return h==Et?ch(o):h==vr?DF(o):PF(o,i(o))}}function Vr(i,o,h,d,v,b,C,E){var M=o&w;if(!M&&typeof i!="function")throw new Je(u);var D=d?d.length:0;if(D||(o&=~(N|B),d=v=r),C=C===r?C:ge(pt(C),0),E=E===r?E:pt(E),D-=v?v.length:0,o&B){var U=d,$=v;d=v=r}var Y=M?r:Dh(i),et=[i,o,h,d,v,U,$,b,C,E];if(Y&&kN(et,Y),i=et[0],o=et[1],h=et[2],d=et[3],v=et[4],E=et[9]=et[9]===r?M?0:i.length:ge(et[9]-D,0),!E&&o&(A|R)&&(o&=~(A|R)),!o||o==T)var ut=yN(i,o,h);else o==A||o==R?ut=_N(i,o,E):(o==N||o==(T|N))&&!v.length?ut=xN(i,o,h,d):ut=So.apply(r,et);var mt=Y?Dm:g0;return m0(mt(ut,et),i,o)}function s0(i,o,h,d){return i===r||xr(i,Oi[h])&&!zt.call(d,h)?o:i}function a0(i,o,h,d,v,b){return se(i)&&se(o)&&(b.set(o,i),xo(i,o,r,a0,b),b.delete(o)),i}function TN(i){return Ns(i)?r:i}function o0(i,o,h,d,v,b){var C=h&y,E=i.length,M=o.length;if(E!=M&&!(C&&M>E))return!1;var D=b.get(i),U=b.get(o);if(D&&U)return D==o&&U==i;var $=-1,Y=!0,et=h&S?new Bn:r;for(b.set(i,o),b.set(o,i);++$<E;){var ut=i[$],mt=o[$];if(d)var lt=C?d(mt,ut,$,o,i,b):d(ut,mt,$,i,o,b);if(lt!==r){if(lt)continue;Y=!1;break}if(et){if(!sh(o,function(bt,It){if(!xs(et,It)&&(ut===bt||v(ut,bt,h,d,b)))return et.push(It)})){Y=!1;break}}else if(!(ut===mt||v(ut,mt,h,d,b))){Y=!1;break}}return b.delete(i),b.delete(o),Y}function wN(i,o,h,d,v,b,C){switch(h){case Ci:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case _s:return!(i.byteLength!=o.byteLength||!b(new oo(i),new oo(o)));case Ut:case Zt:case Jt:return xr(+i,+o);case q:return i.name==o.name&&i.message==o.message;case Ai:case vs:return i==o+"";case Et:var E=ch;case vr:var M=d&y;if(E||(E=eo),i.size!=o.size&&!M)return!1;var D=C.get(i);if(D)return D==o;d|=S,C.set(i,o);var U=o0(E(i),E(o),d,v,b,C);return C.delete(i),U;case Ya:if(As)return As.call(i)==As.call(o)}return!1}function SN(i,o,h,d,v,b){var C=h&y,E=kh(i),M=E.length,D=kh(o),U=D.length;if(M!=U&&!C)return!1;for(var $=M;$--;){var Y=E[$];if(!(C?Y in o:zt.call(o,Y)))return!1}var et=b.get(i),ut=b.get(o);if(et&&ut)return et==o&&ut==i;var mt=!0;b.set(i,o),b.set(o,i);for(var lt=C;++$<M;){Y=E[$];var bt=i[Y],It=o[Y];if(d)var je=C?d(It,bt,Y,o,i,b):d(bt,It,Y,i,o,b);if(!(je===r?bt===It||v(bt,It,h,d,b):je)){mt=!1;break}lt||(lt=Y=="constructor")}if(mt&&!lt){var Ne=i.constructor,Xe=o.constructor;Ne!=Xe&&"constructor"in i&&"constructor"in o&&!(typeof Ne=="function"&&Ne instanceof Ne&&typeof Xe=="function"&&Xe instanceof Xe)&&(mt=!1)}return b.delete(i),b.delete(o),mt}function jr(i){return Vh(d0(i,r,T0),i+"")}function kh(i){return Em(i,_e,$h)}function Bh(i){return Em(i,Be,u0)}var Dh=po?function(i){return po.get(i)}:nc;function Io(i){for(var o=i.name+"",h=Ni[o],d=zt.call(Ni,o)?h.length:0;d--;){var v=h[d],b=v.func;if(b==null||b==i)return v.name}return o}function Di(i){var o=zt.call(_,"placeholder")?_:i;return o.placeholder}function ot(){var i=_.iteratee||ec;return i=i===ec?Pm:i,arguments.length?i(arguments[0],arguments[1]):i}function Ro(i,o){var h=i.__data__;return ON(o)?h[typeof o=="string"?"string":"hash"]:h.map}function Uh(i){for(var o=_e(i),h=o.length;h--;){var d=o[h],v=i[d];o[h]=[d,v,c0(v)]}return o}function $n(i,o){var h=LF(i,o);return Rm(h)?h:r}function AN(i){var o=zt.call(i,Ln),h=i[Ln];try{i[Ln]=r;var d=!0}catch{}var v=so.call(i);return d&&(o?i[Ln]=h:delete i[Ln]),v}var $h=dh?function(i){return i==null?[]:(i=Xt(i),sn(dh(i),function(o){return pm.call(i,o)}))}:ic,u0=dh?function(i){for(var o=[];i;)an(o,$h(i)),i=uo(i);return o}:ic,Ie=Oe;(ph&&Ie(new ph(new ArrayBuffer(1)))!=Ci||Ts&&Ie(new Ts)!=Et||gh&&Ie(gh.resolve())!=$r||Fi&&Ie(new Fi)!=vr||ws&&Ie(new ws)!=ys)&&(Ie=function(i){var o=Oe(i),h=o==Me?i.constructor:r,d=h?Gn(h):"";if(d)switch(d){case o3:return Ci;case u3:return Et;case l3:return $r;case h3:return vr;case c3:return ys}return o});function CN(i,o,h){for(var d=-1,v=h.length;++d<v;){var b=h[d],C=b.size;switch(b.type){case"drop":i+=C;break;case"dropRight":o-=C;break;case"take":o=Ee(o,i+C);break;case"takeRight":i=ge(i,o-C);break}}return{start:i,end:o}}function EN(i){var o=i.match(FO);return o?o[1].split(NO):[]}function l0(i,o,h){o=cn(o,i);for(var d=-1,v=o.length,b=!1;++d<v;){var C=Or(o[d]);if(!(b=i!=null&&h(i,C)))break;i=i[C]}return b||++d!=v?b:(v=i==null?0:i.length,!!v&&ko(v)&&Xr(C,v)&&(dt(i)||zn(i)))}function IN(i){var o=i.length,h=new i.constructor(o);return o&&typeof i[0]=="string"&&zt.call(i,"index")&&(h.index=i.index,h.input=i.input),h}function h0(i){return typeof i.constructor=="function"&&!Os(i)?Li(uo(i)):{}}function RN(i,o,h){var d=i.constructor;switch(o){case _s:return Fh(i);case Ut:case Zt:return new d(+i);case Ci:return fN(i,h);case Ul:case $l:case Gl:case zl:case Hl:case Vl:case jl:case Xl:case Wl:return Xm(i,h);case Et:return new d;case Jt:case vs:return new d(i);case Ai:return dN(i);case vr:return new d;case Ya:return pN(i)}}function PN(i,o){var h=o.length;if(!h)return i;var d=h-1;return o[d]=(h>1?"& ":"")+o[d],o=o.join(h>2?", ":" "),i.replace(OO,`{
1942
+ /* [wrapped with `+o+`] */
1943
+ `)}function MN(i){return dt(i)||zn(i)||!!(gm&&i&&i[gm])}function Xr(i,o){var h=typeof i;return o=o??rt,!!o&&(h=="number"||h!="symbol"&&HO.test(i))&&i>-1&&i%1==0&&i<o}function Fe(i,o,h){if(!se(h))return!1;var d=typeof o;return(d=="number"?ke(h)&&Xr(o,h.length):d=="string"&&o in h)?xr(h[o],i):!1}function Gh(i,o){if(dt(i))return!1;var h=typeof i;return h=="number"||h=="symbol"||h=="boolean"||i==null||Ve(i)?!0:IO.test(i)||!EO.test(i)||o!=null&&i in Xt(o)}function ON(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function zh(i){var o=Io(i),h=_[o];if(typeof h!="function"||!(o in At.prototype))return!1;if(i===h)return!0;var d=Dh(h);return!!d&&i===d[0]}function FN(i){return!!cm&&cm in i}var NN=no?Wr:sc;function Os(i){var o=i&&i.constructor,h=typeof o=="function"&&o.prototype||Oi;return i===h}function c0(i){return i===i&&!se(i)}function f0(i,o){return function(h){return h==null?!1:h[i]===o&&(o!==r||i in Xt(h))}}function LN(i){var o=No(i,function(d){return h.size===f&&h.clear(),d}),h=o.cache;return o}function kN(i,o){var h=i[1],d=o[1],v=h|d,b=v<(T|w|L),C=d==L&&h==A||d==L&&h==O&&i[7].length<=o[8]||d==(L|O)&&o[7].length<=o[8]&&h==A;if(!(b||C))return i;d&T&&(i[2]=o[2],v|=h&T?0:I);var E=o[3];if(E){var M=i[3];i[3]=M?qm(M,E,o[4]):E,i[4]=M?on(i[3],p):o[4]}return E=o[5],E&&(M=i[5],i[5]=M?Ym(M,E,o[6]):E,i[6]=M?on(i[5],p):o[6]),E=o[7],E&&(i[7]=E),d&L&&(i[8]=i[8]==null?o[8]:Ee(i[8],o[8])),i[9]==null&&(i[9]=o[9]),i[0]=o[0],i[1]=v,i}function BN(i){var o=[];if(i!=null)for(var h in Xt(i))o.push(h);return o}function DN(i){return so.call(i)}function d0(i,o,h){return o=ge(o===r?i.length-1:o,0),function(){for(var d=arguments,v=-1,b=ge(d.length-o,0),C=F(b);++v<b;)C[v]=d[o+v];v=-1;for(var E=F(o+1);++v<o;)E[v]=d[v];return E[o]=h(C),Ge(i,this,E)}}function p0(i,o){return o.length<2?i:Un(i,er(o,0,-1))}function UN(i,o){for(var h=i.length,d=Ee(o.length,h),v=Le(i);d--;){var b=o[d];i[d]=Xr(b,h)?v[b]:r}return i}function Hh(i,o){if(!(o==="constructor"&&typeof i[o]=="function")&&o!="__proto__")return i[o]}var g0=v0(Dm),Fs=t3||function(i,o){return be.setTimeout(i,o)},Vh=v0(uN);function m0(i,o,h){var d=o+"";return Vh(i,PN(d,$N(EN(d),h)))}function v0(i){var o=0,h=0;return function(){var d=i3(),v=V-(d-h);if(h=d,v>0){if(++o>=it)return arguments[0]}else o=0;return i.apply(r,arguments)}}function Po(i,o){var h=-1,d=i.length,v=d-1;for(o=o===r?d:o;++h<o;){var b=Ch(h,v),C=i[b];i[b]=i[h],i[h]=C}return i.length=o,i}var y0=LN(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(RO,function(h,d,v,b){o.push(v?b.replace(BO,"$1"):d||h)}),o});function Or(i){if(typeof i=="string"||Ve(i))return i;var o=i+"";return o=="0"&&1/i==-G?"-0":o}function Gn(i){if(i!=null){try{return io.call(i)}catch{}try{return i+""}catch{}}return""}function $N(i,o){return Ze(wt,function(h){var d="_."+h[0];o&h[1]&&!Qa(i,d)&&i.push(d)}),i.sort()}function _0(i){if(i instanceof At)return i.clone();var o=new Qe(i.__wrapped__,i.__chain__);return o.__actions__=Le(i.__actions__),o.__index__=i.__index__,o.__values__=i.__values__,o}function GN(i,o,h){(h?Fe(i,o,h):o===r)?o=1:o=ge(pt(o),0);var d=i==null?0:i.length;if(!d||o<1)return[];for(var v=0,b=0,C=F(co(d/o));v<d;)C[b++]=er(i,v,v+=o);return C}function zN(i){for(var o=-1,h=i==null?0:i.length,d=0,v=[];++o<h;){var b=i[o];b&&(v[d++]=b)}return v}function HN(){var i=arguments.length;if(!i)return[];for(var o=F(i-1),h=arguments[0],d=i;d--;)o[d-1]=arguments[d];return an(dt(h)?Le(h):[h],Te(o,1))}var VN=vt(function(i,o){return he(i)?Es(i,Te(o,1,he,!0)):[]}),jN=vt(function(i,o){var h=rr(o);return he(h)&&(h=r),he(i)?Es(i,Te(o,1,he,!0),ot(h,2)):[]}),XN=vt(function(i,o){var h=rr(o);return he(h)&&(h=r),he(i)?Es(i,Te(o,1,he,!0),r,h):[]});function WN(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),er(i,o<0?0:o,d)):[]}function qN(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),o=d-o,er(i,0,o<0?0:o)):[]}function YN(i,o){return i&&i.length?To(i,ot(o,3),!0,!0):[]}function KN(i,o){return i&&i.length?To(i,ot(o,3),!0):[]}function ZN(i,o,h,d){var v=i==null?0:i.length;return v?(h&&typeof h!="number"&&Fe(i,o,h)&&(h=0,d=v),H3(i,o,h,d)):[]}function x0(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=h==null?0:pt(h);return v<0&&(v=ge(d+v,0)),to(i,ot(o,3),v)}function b0(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=d-1;return h!==r&&(v=pt(h),v=h<0?ge(d+v,0):Ee(v,d-1)),to(i,ot(o,3),v,!0)}function T0(i){var o=i==null?0:i.length;return o?Te(i,1):[]}function JN(i){var o=i==null?0:i.length;return o?Te(i,G):[]}function QN(i,o){var h=i==null?0:i.length;return h?(o=o===r?1:pt(o),Te(i,o)):[]}function tL(i){for(var o=-1,h=i==null?0:i.length,d={};++o<h;){var v=i[o];d[v[0]]=v[1]}return d}function w0(i){return i&&i.length?i[0]:r}function eL(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=h==null?0:pt(h);return v<0&&(v=ge(d+v,0)),Ii(i,o,v)}function rL(i){var o=i==null?0:i.length;return o?er(i,0,-1):[]}var nL=vt(function(i){var o=ee(i,Mh);return o.length&&o[0]===i[0]?bh(o):[]}),iL=vt(function(i){var o=rr(i),h=ee(i,Mh);return o===rr(h)?o=r:h.pop(),h.length&&h[0]===i[0]?bh(h,ot(o,2)):[]}),sL=vt(function(i){var o=rr(i),h=ee(i,Mh);return o=typeof o=="function"?o:r,o&&h.pop(),h.length&&h[0]===i[0]?bh(h,r,o):[]});function aL(i,o){return i==null?"":r3.call(i,o)}function rr(i){var o=i==null?0:i.length;return o?i[o-1]:r}function oL(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=d;return h!==r&&(v=pt(h),v=v<0?ge(d+v,0):Ee(v,d-1)),o===o?$F(i,o,v):to(i,nm,v,!0)}function uL(i,o){return i&&i.length?Nm(i,pt(o)):r}var lL=vt(S0);function S0(i,o){return i&&i.length&&o&&o.length?Ah(i,o):i}function hL(i,o,h){return i&&i.length&&o&&o.length?Ah(i,o,ot(h,2)):i}function cL(i,o,h){return i&&i.length&&o&&o.length?Ah(i,o,r,h):i}var fL=jr(function(i,o){var h=i==null?0:i.length,d=vh(i,o);return Bm(i,ee(o,function(v){return Xr(v,h)?+v:v}).sort(Wm)),d});function dL(i,o){var h=[];if(!(i&&i.length))return h;var d=-1,v=[],b=i.length;for(o=ot(o,3);++d<b;){var C=i[d];o(C,d,i)&&(h.push(C),v.push(d))}return Bm(i,v),h}function jh(i){return i==null?i:a3.call(i)}function pL(i,o,h){var d=i==null?0:i.length;return d?(h&&typeof h!="number"&&Fe(i,o,h)?(o=0,h=d):(o=o==null?0:pt(o),h=h===r?d:pt(h)),er(i,o,h)):[]}function gL(i,o){return bo(i,o)}function mL(i,o,h){return Ih(i,o,ot(h,2))}function vL(i,o){var h=i==null?0:i.length;if(h){var d=bo(i,o);if(d<h&&xr(i[d],o))return d}return-1}function yL(i,o){return bo(i,o,!0)}function _L(i,o,h){return Ih(i,o,ot(h,2),!0)}function xL(i,o){var h=i==null?0:i.length;if(h){var d=bo(i,o,!0)-1;if(xr(i[d],o))return d}return-1}function bL(i){return i&&i.length?Um(i):[]}function TL(i,o){return i&&i.length?Um(i,ot(o,2)):[]}function wL(i){var o=i==null?0:i.length;return o?er(i,1,o):[]}function SL(i,o,h){return i&&i.length?(o=h||o===r?1:pt(o),er(i,0,o<0?0:o)):[]}function AL(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),o=d-o,er(i,o<0?0:o,d)):[]}function CL(i,o){return i&&i.length?To(i,ot(o,3),!1,!0):[]}function EL(i,o){return i&&i.length?To(i,ot(o,3)):[]}var IL=vt(function(i){return hn(Te(i,1,he,!0))}),RL=vt(function(i){var o=rr(i);return he(o)&&(o=r),hn(Te(i,1,he,!0),ot(o,2))}),PL=vt(function(i){var o=rr(i);return o=typeof o=="function"?o:r,hn(Te(i,1,he,!0),r,o)});function ML(i){return i&&i.length?hn(i):[]}function OL(i,o){return i&&i.length?hn(i,ot(o,2)):[]}function FL(i,o){return o=typeof o=="function"?o:r,i&&i.length?hn(i,r,o):[]}function Xh(i){if(!(i&&i.length))return[];var o=0;return i=sn(i,function(h){if(he(h))return o=ge(h.length,o),!0}),lh(o,function(h){return ee(i,ah(h))})}function A0(i,o){if(!(i&&i.length))return[];var h=Xh(i);return o==null?h:ee(h,function(d){return Ge(o,r,d)})}var NL=vt(function(i,o){return he(i)?Es(i,o):[]}),LL=vt(function(i){return Ph(sn(i,he))}),kL=vt(function(i){var o=rr(i);return he(o)&&(o=r),Ph(sn(i,he),ot(o,2))}),BL=vt(function(i){var o=rr(i);return o=typeof o=="function"?o:r,Ph(sn(i,he),r,o)}),DL=vt(Xh);function UL(i,o){return Hm(i||[],o||[],Cs)}function $L(i,o){return Hm(i||[],o||[],Ps)}var GL=vt(function(i){var o=i.length,h=o>1?i[o-1]:r;return h=typeof h=="function"?(i.pop(),h):r,A0(i,h)});function C0(i){var o=_(i);return o.__chain__=!0,o}function zL(i,o){return o(i),i}function Mo(i,o){return o(i)}var HL=jr(function(i){var o=i.length,h=o?i[0]:0,d=this.__wrapped__,v=function(b){return vh(b,i)};return o>1||this.__actions__.length||!(d instanceof At)||!Xr(h)?this.thru(v):(d=d.slice(h,+h+(o?1:0)),d.__actions__.push({func:Mo,args:[v],thisArg:r}),new Qe(d,this.__chain__).thru(function(b){return o&&!b.length&&b.push(r),b}))});function VL(){return C0(this)}function jL(){return new Qe(this.value(),this.__chain__)}function XL(){this.__values__===r&&(this.__values__=$0(this.value()));var i=this.__index__>=this.__values__.length,o=i?r:this.__values__[this.__index__++];return{done:i,value:o}}function WL(){return this}function qL(i){for(var o,h=this;h instanceof mo;){var d=_0(h);d.__index__=0,d.__values__=r,o?v.__wrapped__=d:o=d;var v=d;h=h.__wrapped__}return v.__wrapped__=i,o}function YL(){var i=this.__wrapped__;if(i instanceof At){var o=i;return this.__actions__.length&&(o=new At(this)),o=o.reverse(),o.__actions__.push({func:Mo,args:[jh],thisArg:r}),new Qe(o,this.__chain__)}return this.thru(jh)}function KL(){return zm(this.__wrapped__,this.__actions__)}var ZL=wo(function(i,o,h){zt.call(i,h)?++i[h]:Hr(i,h,1)});function JL(i,o,h){var d=dt(i)?em:z3;return h&&Fe(i,o,h)&&(o=r),d(i,ot(o,3))}function QL(i,o){var h=dt(i)?sn:Am;return h(i,ot(o,3))}var tk=Qm(x0),ek=Qm(b0);function rk(i,o){return Te(Oo(i,o),1)}function nk(i,o){return Te(Oo(i,o),G)}function ik(i,o,h){return h=h===r?1:pt(h),Te(Oo(i,o),h)}function E0(i,o){var h=dt(i)?Ze:ln;return h(i,ot(o,3))}function I0(i,o){var h=dt(i)?wF:Sm;return h(i,ot(o,3))}var sk=wo(function(i,o,h){zt.call(i,h)?i[h].push(o):Hr(i,h,[o])});function ak(i,o,h,d){i=ke(i)?i:$i(i),h=h&&!d?pt(h):0;var v=i.length;return h<0&&(h=ge(v+h,0)),Bo(i)?h<=v&&i.indexOf(o,h)>-1:!!v&&Ii(i,o,h)>-1}var ok=vt(function(i,o,h){var d=-1,v=typeof o=="function",b=ke(i)?F(i.length):[];return ln(i,function(C){b[++d]=v?Ge(o,C,h):Is(C,o,h)}),b}),uk=wo(function(i,o,h){Hr(i,h,o)});function Oo(i,o){var h=dt(i)?ee:Mm;return h(i,ot(o,3))}function lk(i,o,h,d){return i==null?[]:(dt(o)||(o=o==null?[]:[o]),h=d?r:h,dt(h)||(h=h==null?[]:[h]),Lm(i,o,h))}var hk=wo(function(i,o,h){i[h?0:1].push(o)},function(){return[[],[]]});function ck(i,o,h){var d=dt(i)?ih:sm,v=arguments.length<3;return d(i,ot(o,4),h,v,ln)}function fk(i,o,h){var d=dt(i)?SF:sm,v=arguments.length<3;return d(i,ot(o,4),h,v,Sm)}function dk(i,o){var h=dt(i)?sn:Am;return h(i,Lo(ot(o,3)))}function pk(i){var o=dt(i)?xm:aN;return o(i)}function gk(i,o,h){(h?Fe(i,o,h):o===r)?o=1:o=pt(o);var d=dt(i)?B3:oN;return d(i,o)}function mk(i){var o=dt(i)?D3:lN;return o(i)}function vk(i){if(i==null)return 0;if(ke(i))return Bo(i)?Pi(i):i.length;var o=Ie(i);return o==Et||o==vr?i.size:wh(i).length}function yk(i,o,h){var d=dt(i)?sh:hN;return h&&Fe(i,o,h)&&(o=r),d(i,ot(o,3))}var _k=vt(function(i,o){if(i==null)return[];var h=o.length;return h>1&&Fe(i,o[0],o[1])?o=[]:h>2&&Fe(o[0],o[1],o[2])&&(o=[o[0]]),Lm(i,Te(o,1),[])}),Fo=QF||function(){return be.Date.now()};function xk(i,o){if(typeof o!="function")throw new Je(u);return i=pt(i),function(){if(--i<1)return o.apply(this,arguments)}}function R0(i,o,h){return o=h?r:o,o=i&&o==null?i.length:o,Vr(i,L,r,r,r,r,o)}function P0(i,o){var h;if(typeof o!="function")throw new Je(u);return i=pt(i),function(){return--i>0&&(h=o.apply(this,arguments)),i<=1&&(o=r),h}}var Wh=vt(function(i,o,h){var d=T;if(h.length){var v=on(h,Di(Wh));d|=N}return Vr(i,d,o,h,v)}),M0=vt(function(i,o,h){var d=T|w;if(h.length){var v=on(h,Di(M0));d|=N}return Vr(o,d,i,h,v)});function O0(i,o,h){o=h?r:o;var d=Vr(i,A,r,r,r,r,r,o);return d.placeholder=O0.placeholder,d}function F0(i,o,h){o=h?r:o;var d=Vr(i,R,r,r,r,r,r,o);return d.placeholder=F0.placeholder,d}function N0(i,o,h){var d,v,b,C,E,M,D=0,U=!1,$=!1,Y=!0;if(typeof i!="function")throw new Je(u);o=nr(o)||0,se(h)&&(U=!!h.leading,$="maxWait"in h,b=$?ge(nr(h.maxWait)||0,o):b,Y="trailing"in h?!!h.trailing:Y);function et(ce){var br=d,Yr=v;return d=v=r,D=ce,C=i.apply(Yr,br),C}function ut(ce){return D=ce,E=Fs(bt,o),U?et(ce):C}function mt(ce){var br=ce-M,Yr=ce-D,Q0=o-br;return $?Ee(Q0,b-Yr):Q0}function lt(ce){var br=ce-M,Yr=ce-D;return M===r||br>=o||br<0||$&&Yr>=b}function bt(){var ce=Fo();if(lt(ce))return It(ce);E=Fs(bt,mt(ce))}function It(ce){return E=r,Y&&d?et(ce):(d=v=r,C)}function je(){E!==r&&Vm(E),D=0,d=M=v=E=r}function Ne(){return E===r?C:It(Fo())}function Xe(){var ce=Fo(),br=lt(ce);if(d=arguments,v=this,M=ce,br){if(E===r)return ut(M);if($)return Vm(E),E=Fs(bt,o),et(M)}return E===r&&(E=Fs(bt,o)),C}return Xe.cancel=je,Xe.flush=Ne,Xe}var bk=vt(function(i,o){return wm(i,1,o)}),Tk=vt(function(i,o,h){return wm(i,nr(o)||0,h)});function wk(i){return Vr(i,z)}function No(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new Je(u);var h=function(){var d=arguments,v=o?o.apply(this,d):d[0],b=h.cache;if(b.has(v))return b.get(v);var C=i.apply(this,d);return h.cache=b.set(v,C)||b,C};return h.cache=new(No.Cache||zr),h}No.Cache=zr;function Lo(i){if(typeof i!="function")throw new Je(u);return function(){var o=arguments;switch(o.length){case 0:return!i.call(this);case 1:return!i.call(this,o[0]);case 2:return!i.call(this,o[0],o[1]);case 3:return!i.call(this,o[0],o[1],o[2])}return!i.apply(this,o)}}function Sk(i){return P0(2,i)}var Ak=cN(function(i,o){o=o.length==1&&dt(o[0])?ee(o[0],ze(ot())):ee(Te(o,1),ze(ot()));var h=o.length;return vt(function(d){for(var v=-1,b=Ee(d.length,h);++v<b;)d[v]=o[v].call(this,d[v]);return Ge(i,this,d)})}),qh=vt(function(i,o){var h=on(o,Di(qh));return Vr(i,N,r,o,h)}),L0=vt(function(i,o){var h=on(o,Di(L0));return Vr(i,B,r,o,h)}),Ck=jr(function(i,o){return Vr(i,O,r,r,r,o)});function Ek(i,o){if(typeof i!="function")throw new Je(u);return o=o===r?o:pt(o),vt(i,o)}function Ik(i,o){if(typeof i!="function")throw new Je(u);return o=o==null?0:ge(pt(o),0),vt(function(h){var d=h[o],v=fn(h,0,o);return d&&an(v,d),Ge(i,this,v)})}function Rk(i,o,h){var d=!0,v=!0;if(typeof i!="function")throw new Je(u);return se(h)&&(d="leading"in h?!!h.leading:d,v="trailing"in h?!!h.trailing:v),N0(i,o,{leading:d,maxWait:o,trailing:v})}function Pk(i){return R0(i,1)}function Mk(i,o){return qh(Oh(o),i)}function Ok(){if(!arguments.length)return[];var i=arguments[0];return dt(i)?i:[i]}function Fk(i){return tr(i,x)}function Nk(i,o){return o=typeof o=="function"?o:r,tr(i,x,o)}function Lk(i){return tr(i,m|x)}function kk(i,o){return o=typeof o=="function"?o:r,tr(i,m|x,o)}function Bk(i,o){return o==null||Tm(i,o,_e(o))}function xr(i,o){return i===o||i!==i&&o!==o}var Dk=Eo(xh),Uk=Eo(function(i,o){return i>=o}),zn=Im(function(){return arguments}())?Im:function(i){return ae(i)&&zt.call(i,"callee")&&!pm.call(i,"callee")},dt=F.isArray,$k=Yg?ze(Yg):q3;function ke(i){return i!=null&&ko(i.length)&&!Wr(i)}function he(i){return ae(i)&&ke(i)}function Gk(i){return i===!0||i===!1||ae(i)&&Oe(i)==Ut}var dn=e3||sc,zk=Kg?ze(Kg):Y3;function Hk(i){return ae(i)&&i.nodeType===1&&!Ns(i)}function Vk(i){if(i==null)return!0;if(ke(i)&&(dt(i)||typeof i=="string"||typeof i.splice=="function"||dn(i)||Ui(i)||zn(i)))return!i.length;var o=Ie(i);if(o==Et||o==vr)return!i.size;if(Os(i))return!wh(i).length;for(var h in i)if(zt.call(i,h))return!1;return!0}function jk(i,o){return Rs(i,o)}function Xk(i,o,h){h=typeof h=="function"?h:r;var d=h?h(i,o):r;return d===r?Rs(i,o,r,h):!!d}function Yh(i){if(!ae(i))return!1;var o=Oe(i);return o==q||o==J||typeof i.message=="string"&&typeof i.name=="string"&&!Ns(i)}function Wk(i){return typeof i=="number"&&mm(i)}function Wr(i){if(!se(i))return!1;var o=Oe(i);return o==at||o==St||o==Vt||o==mr}function k0(i){return typeof i=="number"&&i==pt(i)}function ko(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=rt}function se(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function ae(i){return i!=null&&typeof i=="object"}var B0=Zg?ze(Zg):Z3;function qk(i,o){return i===o||Th(i,o,Uh(o))}function Yk(i,o,h){return h=typeof h=="function"?h:r,Th(i,o,Uh(o),h)}function Kk(i){return D0(i)&&i!=+i}function Zk(i){if(NN(i))throw new ft(a);return Rm(i)}function Jk(i){return i===null}function Qk(i){return i==null}function D0(i){return typeof i=="number"||ae(i)&&Oe(i)==Jt}function Ns(i){if(!ae(i)||Oe(i)!=Me)return!1;var o=uo(i);if(o===null)return!0;var h=zt.call(o,"constructor")&&o.constructor;return typeof h=="function"&&h instanceof h&&io.call(h)==YF}var Kh=Jg?ze(Jg):J3;function t5(i){return k0(i)&&i>=-rt&&i<=rt}var U0=Qg?ze(Qg):Q3;function Bo(i){return typeof i=="string"||!dt(i)&&ae(i)&&Oe(i)==vs}function Ve(i){return typeof i=="symbol"||ae(i)&&Oe(i)==Ya}var Ui=tm?ze(tm):tN;function e5(i){return i===r}function r5(i){return ae(i)&&Ie(i)==ys}function n5(i){return ae(i)&&Oe(i)==_O}var i5=Eo(Sh),s5=Eo(function(i,o){return i<=o});function $0(i){if(!i)return[];if(ke(i))return Bo(i)?yr(i):Le(i);if(bs&&i[bs])return BF(i[bs]());var o=Ie(i),h=o==Et?ch:o==vr?eo:$i;return h(i)}function qr(i){if(!i)return i===0?i:0;if(i=nr(i),i===G||i===-G){var o=i<0?-1:1;return o*gt}return i===i?i:0}function pt(i){var o=qr(i),h=o%1;return o===o?h?o-h:o:0}function G0(i){return i?Dn(pt(i),0,K):0}function nr(i){if(typeof i=="number")return i;if(Ve(i))return H;if(se(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=se(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=am(i);var h=$O.test(i);return h||zO.test(i)?xF(i.slice(2),h?2:8):UO.test(i)?H:+i}function z0(i){return Mr(i,Be(i))}function a5(i){return i?Dn(pt(i),-rt,rt):i===0?i:0}function $t(i){return i==null?"":He(i)}var o5=ki(function(i,o){if(Os(o)||ke(o)){Mr(o,_e(o),i);return}for(var h in o)zt.call(o,h)&&Cs(i,h,o[h])}),H0=ki(function(i,o){Mr(o,Be(o),i)}),Do=ki(function(i,o,h,d){Mr(o,Be(o),i,d)}),u5=ki(function(i,o,h,d){Mr(o,_e(o),i,d)}),l5=jr(vh);function h5(i,o){var h=Li(i);return o==null?h:bm(h,o)}var c5=vt(function(i,o){i=Xt(i);var h=-1,d=o.length,v=d>2?o[2]:r;for(v&&Fe(o[0],o[1],v)&&(d=1);++h<d;)for(var b=o[h],C=Be(b),E=-1,M=C.length;++E<M;){var D=C[E],U=i[D];(U===r||xr(U,Oi[D])&&!zt.call(i,D))&&(i[D]=b[D])}return i}),f5=vt(function(i){return i.push(r,a0),Ge(V0,r,i)});function d5(i,o){return rm(i,ot(o,3),Pr)}function p5(i,o){return rm(i,ot(o,3),_h)}function g5(i,o){return i==null?i:yh(i,ot(o,3),Be)}function m5(i,o){return i==null?i:Cm(i,ot(o,3),Be)}function v5(i,o){return i&&Pr(i,ot(o,3))}function y5(i,o){return i&&_h(i,ot(o,3))}function _5(i){return i==null?[]:_o(i,_e(i))}function x5(i){return i==null?[]:_o(i,Be(i))}function Zh(i,o,h){var d=i==null?r:Un(i,o);return d===r?h:d}function b5(i,o){return i!=null&&l0(i,o,V3)}function Jh(i,o){return i!=null&&l0(i,o,j3)}var T5=e0(function(i,o,h){o!=null&&typeof o.toString!="function"&&(o=so.call(o)),i[o]=h},tc(De)),w5=e0(function(i,o,h){o!=null&&typeof o.toString!="function"&&(o=so.call(o)),zt.call(i,o)?i[o].push(h):i[o]=[h]},ot),S5=vt(Is);function _e(i){return ke(i)?_m(i):wh(i)}function Be(i){return ke(i)?_m(i,!0):eN(i)}function A5(i,o){var h={};return o=ot(o,3),Pr(i,function(d,v,b){Hr(h,o(d,v,b),d)}),h}function C5(i,o){var h={};return o=ot(o,3),Pr(i,function(d,v,b){Hr(h,v,o(d,v,b))}),h}var E5=ki(function(i,o,h){xo(i,o,h)}),V0=ki(function(i,o,h,d){xo(i,o,h,d)}),I5=jr(function(i,o){var h={};if(i==null)return h;var d=!1;o=ee(o,function(b){return b=cn(b,i),d||(d=b.length>1),b}),Mr(i,Bh(i),h),d&&(h=tr(h,m|g|x,TN));for(var v=o.length;v--;)Rh(h,o[v]);return h});function R5(i,o){return j0(i,Lo(ot(o)))}var P5=jr(function(i,o){return i==null?{}:nN(i,o)});function j0(i,o){if(i==null)return{};var h=ee(Bh(i),function(d){return[d]});return o=ot(o),km(i,h,function(d,v){return o(d,v[0])})}function M5(i,o,h){o=cn(o,i);var d=-1,v=o.length;for(v||(v=1,i=r);++d<v;){var b=i==null?r:i[Or(o[d])];b===r&&(d=v,b=h),i=Wr(b)?b.call(i):b}return i}function O5(i,o,h){return i==null?i:Ps(i,o,h)}function F5(i,o,h,d){return d=typeof d=="function"?d:r,i==null?i:Ps(i,o,h,d)}var X0=i0(_e),W0=i0(Be);function N5(i,o,h){var d=dt(i),v=d||dn(i)||Ui(i);if(o=ot(o,4),h==null){var b=i&&i.constructor;v?h=d?new b:[]:se(i)?h=Wr(b)?Li(uo(i)):{}:h={}}return(v?Ze:Pr)(i,function(C,E,M){return o(h,C,E,M)}),h}function L5(i,o){return i==null?!0:Rh(i,o)}function k5(i,o,h){return i==null?i:Gm(i,o,Oh(h))}function B5(i,o,h,d){return d=typeof d=="function"?d:r,i==null?i:Gm(i,o,Oh(h),d)}function $i(i){return i==null?[]:hh(i,_e(i))}function D5(i){return i==null?[]:hh(i,Be(i))}function U5(i,o,h){return h===r&&(h=o,o=r),h!==r&&(h=nr(h),h=h===h?h:0),o!==r&&(o=nr(o),o=o===o?o:0),Dn(nr(i),o,h)}function $5(i,o,h){return o=qr(o),h===r?(h=o,o=0):h=qr(h),i=nr(i),X3(i,o,h)}function G5(i,o,h){if(h&&typeof h!="boolean"&&Fe(i,o,h)&&(o=h=r),h===r&&(typeof o=="boolean"?(h=o,o=r):typeof i=="boolean"&&(h=i,i=r)),i===r&&o===r?(i=0,o=1):(i=qr(i),o===r?(o=i,i=0):o=qr(o)),i>o){var d=i;i=o,o=d}if(h||i%1||o%1){var v=vm();return Ee(i+v*(o-i+_F("1e-"+((v+"").length-1))),o)}return Ch(i,o)}var z5=Bi(function(i,o,h){return o=o.toLowerCase(),i+(h?q0(o):o)});function q0(i){return Qh($t(i).toLowerCase())}function Y0(i){return i=$t(i),i&&i.replace(VO,OF).replace(lF,"")}function H5(i,o,h){i=$t(i),o=He(o);var d=i.length;h=h===r?d:Dn(pt(h),0,d);var v=h;return h-=o.length,h>=0&&i.slice(h,v)==o}function V5(i){return i=$t(i),i&&SO.test(i)?i.replace(Cg,FF):i}function j5(i){return i=$t(i),i&&PO.test(i)?i.replace(ql,"\\$&"):i}var X5=Bi(function(i,o,h){return i+(h?"-":"")+o.toLowerCase()}),W5=Bi(function(i,o,h){return i+(h?" ":"")+o.toLowerCase()}),q5=Jm("toLowerCase");function Y5(i,o,h){i=$t(i),o=pt(o);var d=o?Pi(i):0;if(!o||d>=o)return i;var v=(o-d)/2;return Co(fo(v),h)+i+Co(co(v),h)}function K5(i,o,h){i=$t(i),o=pt(o);var d=o?Pi(i):0;return o&&d<o?i+Co(o-d,h):i}function Z5(i,o,h){i=$t(i),o=pt(o);var d=o?Pi(i):0;return o&&d<o?Co(o-d,h)+i:i}function J5(i,o,h){return h||o==null?o=0:o&&(o=+o),s3($t(i).replace(Yl,""),o||0)}function Q5(i,o,h){return(h?Fe(i,o,h):o===r)?o=1:o=pt(o),Eh($t(i),o)}function tB(){var i=arguments,o=$t(i[0]);return i.length<3?o:o.replace(i[1],i[2])}var eB=Bi(function(i,o,h){return i+(h?"_":"")+o.toLowerCase()});function rB(i,o,h){return h&&typeof h!="number"&&Fe(i,o,h)&&(o=h=r),h=h===r?K:h>>>0,h?(i=$t(i),i&&(typeof o=="string"||o!=null&&!Kh(o))&&(o=He(o),!o&&Ri(i))?fn(yr(i),0,h):i.split(o,h)):[]}var nB=Bi(function(i,o,h){return i+(h?" ":"")+Qh(o)});function iB(i,o,h){return i=$t(i),h=h==null?0:Dn(pt(h),0,i.length),o=He(o),i.slice(h,h+o.length)==o}function sB(i,o,h){var d=_.templateSettings;h&&Fe(i,o,h)&&(o=r),i=$t(i),o=Do({},o,d,s0);var v=Do({},o.imports,d.imports,s0),b=_e(v),C=hh(v,b),E,M,D=0,U=o.interpolate||Ka,$="__p += '",Y=fh((o.escape||Ka).source+"|"+U.source+"|"+(U===Eg?DO:Ka).source+"|"+(o.evaluate||Ka).source+"|$","g"),et="//# sourceURL="+(zt.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pF+"]")+`
1944
+ `;i.replace(Y,function(lt,bt,It,je,Ne,Xe){return It||(It=je),$+=i.slice(D,Xe).replace(jO,NF),bt&&(E=!0,$+=`' +
1945
+ __e(`+bt+`) +
1946
+ '`),Ne&&(M=!0,$+=`';
1947
+ `+Ne+`;
1948
+ __p += '`),It&&($+=`' +
1949
+ ((__t = (`+It+`)) == null ? '' : __t) +
1950
+ '`),D=Xe+lt.length,lt}),$+=`';
1951
+ `;var ut=zt.call(o,"variable")&&o.variable;if(!ut)$=`with (obj) {
1952
+ `+$+`
1953
1953
  }
1954
- `;else if($N.test(Ct))throw new Nt(u);ht=(tt?ht.replace(EN,""):ht).replace(SN,"$1").replace(AN,"$1;"),ht="function("+(Ct||"obj")+`) {
1955
- `+(Ct?"":`obj || (obj = {});
1956
- `)+"var __t, __p = ''"+(X?", __e = _.escape":"")+(tt?`, __j = Array.prototype.join;
1954
+ `;else if(kO.test(ut))throw new ft(l);$=(M?$.replace(xO,""):$).replace(bO,"$1").replace(TO,"$1;"),$="function("+(ut||"obj")+`) {
1955
+ `+(ut?"":`obj || (obj = {});
1956
+ `)+"var __t, __p = ''"+(E?", __e = _.escape":"")+(M?`, __j = Array.prototype.join;
1957
1957
  function print() { __p += __j.call(arguments, '') }
1958
1958
  `:`;
1959
- `)+ht+`return __p
1960
- }`;var Ft=ty(function(){return Yt(U,wt+"return "+ht).apply(r,H)});if(Ft.source=ht,Qf(Ft))throw Ft;return Ft}function f4(s){return Jt(s).toLowerCase()}function c4(s){return Jt(s).toUpperCase()}function h4(s,l,g){if(s=Jt(s),s&&(g||l===r))return ug(s);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=Rr(l),U=fg(S,N),H=cg(S,N)+1;return wn(S,U,H).join("")}function d4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.slice(0,dg(s)+1);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=cg(S,Rr(l))+1;return wn(S,0,N).join("")}function p4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.replace(Zu,"");if(!s||!(l=nr(l)))return s;var S=Rr(s),N=fg(S,Rr(l));return wn(S,N).join("")}function v4(s,l){var g=R,S=C;if(me(l)){var N="separator"in l?l.separator:N;g="length"in l?Lt(l.length):g,S="omission"in l?nr(l.omission):S}s=Jt(s);var U=s.length;if(Bi(s)){var H=Rr(s);U=H.length}if(g>=U)return s;var X=g-Di(S);if(X<1)return S;var tt=H?wn(H,0,X).join(""):s.slice(0,X);if(N===r)return tt+S;if(H&&(X+=tt.length-X),Jf(N)){if(s.slice(X).search(N)){var ft,ct=tt;for(N.global||(N=vf(N.source,Jt(Pv.exec(N))+"g")),N.lastIndex=0;ft=N.exec(ct);)var ht=ft.index;tt=tt.slice(0,ht===r?X:ht)}}else if(s.indexOf(nr(N),X)!=X){var yt=tt.lastIndexOf(N);yt>-1&&(tt=tt.slice(0,yt))}return tt+S}function g4(s){return s=Jt(s),s&&ON.test(s)?s.replace(Cv,HM):s}var m4=Hi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),rc=em("toUpperCase");function Jm(s,l,g){return s=Jt(s),l=g?r:l,l===r?$M(s)?XM(s):PM(s):s.match(l)||[]}var ty=Bt(function(s,l){try{return er(s,r,l)}catch(g){return Qf(g)?g:new Nt(g)}}),y4=en(function(s,l){return cr(l,function(g){g=qr(g),Jr(s,g,Yf(s[g],s))}),s});function _4(s){var l=s==null?0:s.length,g=Ot();return s=l?de(s,function(S){if(typeof S[1]!="function")throw new hr(a);return[g(S[0]),S[1]]}):[],Bt(function(S){for(var N=-1;++N<l;){var U=s[N];if(er(U[0],this,S))return er(U[1],this,S)}})}function b4(s){return H3(pr(s,p))}function nc(s){return function(){return s}}function x4(s,l){return s==null||s!==s?l:s}var w4=nm(),T4=nm(!0);function Ke(s){return s}function ic(s){return Mg(typeof s=="function"?s:pr(s,p))}function E4(s){return Lg(pr(s,p))}function S4(s,l){return Fg(s,pr(l,p))}var A4=Bt(function(s,l){return function(g){return ks(g,s,l)}}),O4=Bt(function(s,l){return function(g){return ks(s,g,l)}});function sc(s,l,g){var S=Pe(l),N=Ea(l,S);g==null&&!(me(l)&&(N.length||!S.length))&&(g=l,l=s,s=this,N=Ea(l,Pe(l)));var U=!(me(g)&&"chain"in g)||!!g.chain,H=nn(s);return cr(N,function(X){var tt=l[X];s[X]=tt,H&&(s.prototype[X]=function(){var ft=this.__chain__;if(U||ft){var ct=s(this.__wrapped__),ht=ct.__actions__=Ve(this.__actions__);return ht.push({func:tt,args:arguments,thisArg:s}),ct.__chain__=ft,ct}return tt.apply(s,gn([this.value()],arguments))})}),s}function C4(){return Me._===this&&(Me._=t3),this}function oc(){}function R4(s){return s=Lt(s),Bt(function(l){return Bg(l,s)})}var I4=Bf(de),P4=Bf(ig),N4=Bf(lf);function ey(s){return zf(s)?uf(qr(s)):lk(s)}function M4(s){return function(l){return s==null?r:Yn(s,l)}}var k4=sm(),L4=sm(!0);function ac(){return[]}function lc(){return!1}function F4(){return{}}function B4(){return""}function D4(){return!0}function U4(s,l){if(s=Lt(s),s<1||s>nt)return[];var g=k,S=De(s,k);l=Ot(l),s-=k;for(var N=hf(S,l);++g<s;)l(g);return N}function $4(s){return kt(s)?de(s,qr):ir(s)?[s]:Ve(xm(Jt(s)))}function G4(s){var l=++QM;return Jt(s)+l}var j4=Ia(function(s,l){return s+l},0),q4=Df("ceil"),z4=Ia(function(s,l){return s/l},1),H4=Df("floor");function V4(s){return s&&s.length?Ta(s,Ke,Tf):r}function W4(s,l){return s&&s.length?Ta(s,Ot(l,2),Tf):r}function X4(s){return ag(s,Ke)}function K4(s,l){return ag(s,Ot(l,2))}function Y4(s){return s&&s.length?Ta(s,Ke,Of):r}function Z4(s,l){return s&&s.length?Ta(s,Ot(l,2),Of):r}var Q4=Ia(function(s,l){return s*l},1),J4=Df("round"),tB=Ia(function(s,l){return s-l},0);function eB(s){return s&&s.length?cf(s,Ke):0}function rB(s,l){return s&&s.length?cf(s,Ot(l,2)):0}return B.after=EL,B.ary=Nm,B.assign=cF,B.assignIn=Vm,B.assignInWith=qa,B.assignWith=hF,B.at=dF,B.before=Mm,B.bind=Yf,B.bindAll=y4,B.bindKey=km,B.castArray=FL,B.chain=Rm,B.chunk=Hk,B.compact=Vk,B.concat=Wk,B.cond=_4,B.conforms=b4,B.constant=nc,B.countBy=eL,B.create=pF,B.curry=Lm,B.curryRight=Fm,B.debounce=Bm,B.defaults=vF,B.defaultsDeep=gF,B.defer=SL,B.delay=AL,B.difference=Xk,B.differenceBy=Kk,B.differenceWith=Yk,B.drop=Zk,B.dropRight=Qk,B.dropRightWhile=Jk,B.dropWhile=t5,B.fill=e5,B.filter=nL,B.flatMap=oL,B.flatMapDeep=aL,B.flatMapDepth=lL,B.flatten=Sm,B.flattenDeep=r5,B.flattenDepth=n5,B.flip=OL,B.flow=w4,B.flowRight=T4,B.fromPairs=i5,B.functions=TF,B.functionsIn=EF,B.groupBy=uL,B.initial=o5,B.intersection=a5,B.intersectionBy=l5,B.intersectionWith=u5,B.invert=AF,B.invertBy=OF,B.invokeMap=cL,B.iteratee=ic,B.keyBy=hL,B.keys=Pe,B.keysIn=Xe,B.map=Ba,B.mapKeys=RF,B.mapValues=IF,B.matches=E4,B.matchesProperty=S4,B.memoize=Ua,B.merge=PF,B.mergeWith=Wm,B.method=A4,B.methodOf=O4,B.mixin=sc,B.negate=$a,B.nthArg=R4,B.omit=NF,B.omitBy=MF,B.once=CL,B.orderBy=dL,B.over=I4,B.overArgs=RL,B.overEvery=P4,B.overSome=N4,B.partial=Zf,B.partialRight=Dm,B.partition=pL,B.pick=kF,B.pickBy=Xm,B.property=ey,B.propertyOf=M4,B.pull=d5,B.pullAll=Om,B.pullAllBy=p5,B.pullAllWith=v5,B.pullAt=g5,B.range=k4,B.rangeRight=L4,B.rearg=IL,B.reject=mL,B.remove=m5,B.rest=PL,B.reverse=Xf,B.sampleSize=_L,B.set=FF,B.setWith=BF,B.shuffle=bL,B.slice=y5,B.sortBy=TL,B.sortedUniq=S5,B.sortedUniqBy=A5,B.split=o4,B.spread=NL,B.tail=O5,B.take=C5,B.takeRight=R5,B.takeRightWhile=I5,B.takeWhile=P5,B.tap=V5,B.throttle=ML,B.thru=Fa,B.toArray=qm,B.toPairs=Km,B.toPairsIn=Ym,B.toPath=$4,B.toPlainObject=Hm,B.transform=DF,B.unary=kL,B.union=N5,B.unionBy=M5,B.unionWith=k5,B.uniq=L5,B.uniqBy=F5,B.uniqWith=B5,B.unset=UF,B.unzip=Kf,B.unzipWith=Cm,B.update=$F,B.updateWith=GF,B.values=Xi,B.valuesIn=jF,B.without=D5,B.words=Jm,B.wrap=LL,B.xor=U5,B.xorBy=$5,B.xorWith=G5,B.zip=j5,B.zipObject=q5,B.zipObjectDeep=z5,B.zipWith=H5,B.entries=Km,B.entriesIn=Ym,B.extend=Vm,B.extendWith=qa,sc(B,B),B.add=j4,B.attempt=ty,B.camelCase=VF,B.capitalize=Zm,B.ceil=q4,B.clamp=qF,B.clone=BL,B.cloneDeep=UL,B.cloneDeepWith=$L,B.cloneWith=DL,B.conformsTo=GL,B.deburr=Qm,B.defaultTo=x4,B.divide=z4,B.endsWith=WF,B.eq=Pr,B.escape=XF,B.escapeRegExp=KF,B.every=rL,B.find=iL,B.findIndex=Tm,B.findKey=mF,B.findLast=sL,B.findLastIndex=Em,B.findLastKey=yF,B.floor=H4,B.forEach=Im,B.forEachRight=Pm,B.forIn=_F,B.forInRight=bF,B.forOwn=xF,B.forOwnRight=wF,B.get=tc,B.gt=jL,B.gte=qL,B.has=SF,B.hasIn=ec,B.head=Am,B.identity=Ke,B.includes=fL,B.indexOf=s5,B.inRange=zF,B.invoke=CF,B.isArguments=Jn,B.isArray=kt,B.isArrayBuffer=zL,B.isArrayLike=We,B.isArrayLikeObject=xe,B.isBoolean=HL,B.isBuffer=Tn,B.isDate=VL,B.isElement=WL,B.isEmpty=XL,B.isEqual=KL,B.isEqualWith=YL,B.isError=Qf,B.isFinite=ZL,B.isFunction=nn,B.isInteger=Um,B.isLength=Ga,B.isMap=$m,B.isMatch=QL,B.isMatchWith=JL,B.isNaN=tF,B.isNative=eF,B.isNil=nF,B.isNull=rF,B.isNumber=Gm,B.isObject=me,B.isObjectLike=ye,B.isPlainObject=$s,B.isRegExp=Jf,B.isSafeInteger=iF,B.isSet=jm,B.isString=ja,B.isSymbol=ir,B.isTypedArray=Wi,B.isUndefined=sF,B.isWeakMap=oF,B.isWeakSet=aF,B.join=f5,B.kebabCase=YF,B.last=gr,B.lastIndexOf=c5,B.lowerCase=ZF,B.lowerFirst=QF,B.lt=lF,B.lte=uF,B.max=V4,B.maxBy=W4,B.mean=X4,B.meanBy=K4,B.min=Y4,B.minBy=Z4,B.stubArray=ac,B.stubFalse=lc,B.stubObject=F4,B.stubString=B4,B.stubTrue=D4,B.multiply=Q4,B.nth=h5,B.noConflict=C4,B.noop=oc,B.now=Da,B.pad=JF,B.padEnd=t4,B.padStart=e4,B.parseInt=r4,B.random=HF,B.reduce=vL,B.reduceRight=gL,B.repeat=n4,B.replace=i4,B.result=LF,B.round=J4,B.runInContext=J,B.sample=yL,B.size=xL,B.snakeCase=s4,B.some=wL,B.sortedIndex=_5,B.sortedIndexBy=b5,B.sortedIndexOf=x5,B.sortedLastIndex=w5,B.sortedLastIndexBy=T5,B.sortedLastIndexOf=E5,B.startCase=a4,B.startsWith=l4,B.subtract=tB,B.sum=eB,B.sumBy=rB,B.template=u4,B.times=U4,B.toFinite=sn,B.toInteger=Lt,B.toLength=zm,B.toLower=f4,B.toNumber=mr,B.toSafeInteger=fF,B.toString=Jt,B.toUpper=c4,B.trim=h4,B.trimEnd=d4,B.trimStart=p4,B.truncate=v4,B.unescape=g4,B.uniqueId=G4,B.upperCase=m4,B.upperFirst=rc,B.each=Im,B.eachRight=Pm,B.first=Am,sc(B,function(){var s={};return Gr(B,function(l,g){ee.call(B.prototype,g)||(s[g]=l)}),s}(),{chain:!1}),B.VERSION=n,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),cr(["drop","take"],function(s,l){jt.prototype[s]=function(g){g=g===r?1:Ae(Lt(g),0);var S=this.__filtered__&&!l?new jt(this):this.clone();return S.__filtered__?S.__takeCount__=De(g,S.__takeCount__):S.__views__.push({size:De(g,k),type:s+(S.__dir__<0?"Right":"")}),S},jt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),cr(["filter","map","takeWhile"],function(s,l){var g=l+1,S=g==F||g==Z;jt.prototype[s]=function(N){var U=this.clone();return U.__iteratees__.push({iteratee:Ot(N,3),type:g}),U.__filtered__=U.__filtered__||S,U}}),cr(["head","last"],function(s,l){var g="take"+(l?"Right":"");jt.prototype[s]=function(){return this[g](1).value()[0]}}),cr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");jt.prototype[s]=function(){return this.__filtered__?new jt(this):this[g](1)}}),jt.prototype.compact=function(){return this.filter(Ke)},jt.prototype.find=function(s){return this.filter(s).head()},jt.prototype.findLast=function(s){return this.reverse().find(s)},jt.prototype.invokeMap=Bt(function(s,l){return typeof s=="function"?new jt(this):this.map(function(g){return ks(g,s,l)})}),jt.prototype.reject=function(s){return this.filter($a(Ot(s)))},jt.prototype.slice=function(s,l){s=Lt(s);var g=this;return g.__filtered__&&(s>0||l<0)?new jt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=Lt(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},jt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},jt.prototype.toArray=function(){return this.take(k)},Gr(jt.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),S=/^(?:head|last)$/.test(l),N=B[S?"take"+(l=="last"?"Right":""):l],U=S||/^find/.test(l);N&&(B.prototype[l]=function(){var H=this.__wrapped__,X=S?[1]:arguments,tt=H instanceof jt,ft=X[0],ct=tt||kt(H),ht=function($t){var zt=N.apply(B,gn([$t],X));return S&&yt?zt[0]:zt};ct&&g&&typeof ft=="function"&&ft.length!=1&&(tt=ct=!1);var yt=this.__chain__,wt=!!this.__actions__.length,Ct=U&&!yt,Ft=tt&&!wt;if(!U&&ct){H=Ft?H:new jt(this);var Rt=s.apply(H,X);return Rt.__actions__.push({func:Fa,args:[ht],thisArg:r}),new dr(Rt,yt)}return Ct&&Ft?s.apply(this,X):(Rt=this.thru(ht),Ct?S?Rt.value()[0]:Rt.value():Rt)})}),cr(["pop","push","shift","sort","splice","unshift"],function(s){var l=la[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",S=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(S&&!this.__chain__){var U=this.value();return l.apply(kt(U)?U:[],N)}return this[g](function(H){return l.apply(kt(H)?H:[],N)})}}),Gr(jt.prototype,function(s,l){var g=B[l];if(g){var S=g.name+"";ee.call(ji,S)||(ji[S]=[]),ji[S].push({name:l,func:g})}}),ji[Ra(r,m).name]=[{name:"wrapper",func:r}],jt.prototype.clone=g3,jt.prototype.reverse=m3,jt.prototype.value=y3,B.prototype.at=W5,B.prototype.chain=X5,B.prototype.commit=K5,B.prototype.next=Y5,B.prototype.plant=Q5,B.prototype.reverse=J5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=tL,B.prototype.first=B.prototype.head,Os&&(B.prototype[Os]=Z5),B},Ui=KM();Hn?((Hn.exports=Ui)._=Ui,nf._=Ui):Me._=Ui}).call(Ye)}(ea,ea.exports);var wv=ea.exports;const gN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},Tv=Et.forwardRef((e,t)=>{const[r,n]=Et.useState([]),[,i]=Et.useState(0),[o,a]=Et.useState([]),[,u]=mt.useState(!1),[f,h]=oN({autoPlay:!1}),d=mt.useRef(null),p=mt.useRef(null),c=mt.useRef(gN),v=mt.useRef(),{tl:y,dragModeRef:_}=mt.useContext(An),{frames:b,delays:m}=f,{src:w,startAt:T,endAt:x,frameStartAt:E,frameEndAt:I,loop:O,visible:A,transformation:{width:L=0,height:R=0,x:C,y:P,animation:M,colorCorrection:F={}},pointerdown:q}=e,{temperatureFilter:Z,sharpnessFilter:z,hueFilter:nt,blurFilter:V,adjustmentFilter:D}=_s(F),{blurRadius:k=0}=F,G=.1;pN(w,h),Ze(Oe.PAUSE,()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)}),Et.useEffect(()=>{c.current&&d.current&&(_.current?(d.current.stop(),c.current.isPlaying=!1,c.current.isDragging=!0):c.current.isDragging=!1)},[_]),Et.useEffect(()=>{if(!rl(b)){const rt=FP(b,vt=>{const{data:_t,width:At,height:ne}=vt,Ut=new Uint8Array(_t);return zr.Texture.fromBuffer(Ut,At,ne)}),ot=rt.map((vt,_t)=>({texture:vt,time:m[_t]}));n(rt),a(ot);let pt=0;m.forEach(vt=>{pt+=vt*10}),i(pt),c.current.totalDuration=pt,c.current.totalFrames=b.length}},[b,m]);const j=wv.debounce(rt=>{if(d.current){let ot=rt===0?0:rt/G;ot=isNaN(ot)?0:ot;const pt=c.current.totalFrames;ot=ot>pt?pt:ot,ot>=pt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),c.current.isPlaying=!0)}},20),Q=wv.debounce(()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},50),K=rt=>{if(d.current){let ot=rt===0?0:rt/G;ot=isNaN(ot)?0:ot;const pt=c.current.totalFrames;ot=ot>pt?pt:ot,ot>=pt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),c.current.isPlaying=!0)}},$=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},W=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},et=rt=>{var pt;const ot=rt+((pt=v.current)==null?void 0:pt.time());d.current&&_.current?(j(ot),Q(),c.current.isPlaying=!1):v.current&&d.current&&!c.current.isPlaying&&v.current.isActive()&&y.current.isActive()&&(j(ot),c.current.isPlaying=!0)},Y=()=>{u(!0)};return mt.useEffect(()=>{let rt=_e.context(()=>{});if(p.current&&y.current){const ot={duration:Number(I)-Number(E),onStart:K,onComplete:$,onStartParams:[E,I],onCompleteParams:[],onInterrupt:W,onUpdate:et,onUpdateParams:[E,I]};v.current&&v.current.kill(),rt=_e.context(()=>{v.current=_e.from(p.current,ot,E),y.current.add(v.current,T)})}return()=>{console.log("PixiGif Sprite Component cleanup"),v.current&&(v.current.kill(),_e.killTweensOf(v.current)),rt.revert()}},[M,T,x,E,I]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Vt.jsx(le.Container,{ref:p,children:r&&r.length>0&&Vt.jsx(xv,{x:C,y:P,width:L,height:R,animationSpeed:1,alpha:A?1:0,loop:O,textures:o,onComplete:Y,anchor:.5,forwardRef:d,...A&&{interactive:!0,pointerdown:q},filters:[Z,z,nt,D,...k>0?[V]:[]]})})})});Tv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};var Ev={exports:{}};/*!
1961
- * Quill Editor v1.3.7
1962
- * https://quilljs.com/
1963
- * Copyright (c) 2014, Jason Chen
1964
- * Copyright (c) 2013, salesforce.com
1965
- */(function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:Ye,function(){return function(r){var n={};function i(o){if(n[o])return n[o].exports;var a=n[o]={i:o,l:!1,exports:{}};return r[o].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=r,i.c=n,i.d=function(o,a,u){i.o(o,a)||Object.defineProperty(o,a,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(a,"a",a),a},i.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},i.p="",i(i.s=109)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(17),a=i(18),u=i(19),f=i(45),h=i(46),d=i(47),p=i(48),c=i(49),v=i(12),y=i(32),_=i(33),b=i(31),m=i(1),w={Scope:m.Scope,create:m.create,find:m.find,query:m.query,register:m.register,Container:o.default,Format:a.default,Leaf:u.default,Embed:p.default,Scroll:f.default,Block:d.default,Inline:h.default,Text:c.default,Attributor:{Attribute:v.default,Class:y.default,Style:_.default,Store:b.default}};n.default=w},function(r,n,i){var o=this&&this.__extends||function(){var b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,w){m.__proto__=w}||function(m,w){for(var T in w)w.hasOwnProperty(T)&&(m[T]=w[T])};return function(m,w){b(m,w);function T(){this.constructor=m}m.prototype=w===null?Object.create(w):(T.prototype=w.prototype,new T)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=function(b){o(m,b);function m(w){var T=this;return w="[Parchment] "+w,T=b.call(this,w)||this,T.message=w,T.name=T.constructor.name,T}return m}(Error);n.ParchmentError=a;var u={},f={},h={},d={};n.DATA_KEY="__blot";var p;(function(b){b[b.TYPE=3]="TYPE",b[b.LEVEL=12]="LEVEL",b[b.ATTRIBUTE=13]="ATTRIBUTE",b[b.BLOT=14]="BLOT",b[b.INLINE=7]="INLINE",b[b.BLOCK=11]="BLOCK",b[b.BLOCK_BLOT=10]="BLOCK_BLOT",b[b.INLINE_BLOT=6]="INLINE_BLOT",b[b.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",b[b.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",b[b.ANY=15]="ANY"})(p=n.Scope||(n.Scope={}));function c(b,m){var w=y(b);if(w==null)throw new a("Unable to create "+b+" blot");var T=w,x=b instanceof Node||b.nodeType===Node.TEXT_NODE?b:T.create(m);return new T(x,m)}n.create=c;function v(b,m){return m===void 0&&(m=!1),b==null?null:b[n.DATA_KEY]!=null?b[n.DATA_KEY].blot:m?v(b.parentNode,m):null}n.find=v;function y(b,m){m===void 0&&(m=p.ANY);var w;if(typeof b=="string")w=d[b]||u[b];else if(b instanceof Text||b.nodeType===Node.TEXT_NODE)w=d.text;else if(typeof b=="number")b&p.LEVEL&p.BLOCK?w=d.block:b&p.LEVEL&p.INLINE&&(w=d.inline);else if(b instanceof HTMLElement){var T=(b.getAttribute("class")||"").split(/\s+/);for(var x in T)if(w=f[T[x]],w)break;w=w||h[b.tagName]}return w==null?null:m&p.LEVEL&w.scope&&m&p.TYPE&w.scope?w:null}n.query=y;function _(){for(var b=[],m=0;m<arguments.length;m++)b[m]=arguments[m];if(b.length>1)return b.map(function(x){return _(x)});var w=b[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new a("Invalid definition");if(w.blotName==="abstract")throw new a("Cannot register abstract class");if(d[w.blotName||w.attrName]=w,typeof w.keyName=="string")u[w.keyName]=w;else if(w.className!=null&&(f[w.className]=w),w.tagName!=null){Array.isArray(w.tagName)?w.tagName=w.tagName.map(function(x){return x.toUpperCase()}):w.tagName=w.tagName.toUpperCase();var T=Array.isArray(w.tagName)?w.tagName:[w.tagName];T.forEach(function(x){(h[x]==null||w.className==null)&&(h[x]=w)})}return w}n.register=_},function(r,n,i){var o=i(51),a=i(11),u=i(3),f=i(20),h=String.fromCharCode(0),d=function(p){Array.isArray(p)?this.ops=p:p!=null&&Array.isArray(p.ops)?this.ops=p.ops:this.ops=[]};d.prototype.insert=function(p,c){var v={};return p.length===0?this:(v.insert=p,c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v))},d.prototype.delete=function(p){return p<=0?this:this.push({delete:p})},d.prototype.retain=function(p,c){if(p<=0)return this;var v={retain:p};return c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v)},d.prototype.push=function(p){var c=this.ops.length,v=this.ops[c-1];if(p=u(!0,{},p),typeof v=="object"){if(typeof p.delete=="number"&&typeof v.delete=="number")return this.ops[c-1]={delete:v.delete+p.delete},this;if(typeof v.delete=="number"&&p.insert!=null&&(c-=1,v=this.ops[c-1],typeof v!="object"))return this.ops.unshift(p),this;if(a(p.attributes,v.attributes)){if(typeof p.insert=="string"&&typeof v.insert=="string")return this.ops[c-1]={insert:v.insert+p.insert},typeof p.attributes=="object"&&(this.ops[c-1].attributes=p.attributes),this;if(typeof p.retain=="number"&&typeof v.retain=="number")return this.ops[c-1]={retain:v.retain+p.retain},typeof p.attributes=="object"&&(this.ops[c-1].attributes=p.attributes),this}}return c===this.ops.length?this.ops.push(p):this.ops.splice(c,0,p),this},d.prototype.chop=function(){var p=this.ops[this.ops.length-1];return p&&p.retain&&!p.attributes&&this.ops.pop(),this},d.prototype.filter=function(p){return this.ops.filter(p)},d.prototype.forEach=function(p){this.ops.forEach(p)},d.prototype.map=function(p){return this.ops.map(p)},d.prototype.partition=function(p){var c=[],v=[];return this.forEach(function(y){var _=p(y)?c:v;_.push(y)}),[c,v]},d.prototype.reduce=function(p,c){return this.ops.reduce(p,c)},d.prototype.changeLength=function(){return this.reduce(function(p,c){return c.insert?p+f.length(c):c.delete?p-c.delete:p},0)},d.prototype.length=function(){return this.reduce(function(p,c){return p+f.length(c)},0)},d.prototype.slice=function(p,c){p=p||0,typeof c!="number"&&(c=1/0);for(var v=[],y=f.iterator(this.ops),_=0;_<c&&y.hasNext();){var b;_<p?b=y.next(p-_):(b=y.next(c-_),v.push(b)),_+=f.length(b)}return new d(v)},d.prototype.compose=function(p){var c=f.iterator(this.ops),v=f.iterator(p.ops),y=[],_=v.peek();if(_!=null&&typeof _.retain=="number"&&_.attributes==null){for(var b=_.retain;c.peekType()==="insert"&&c.peekLength()<=b;)b-=c.peekLength(),y.push(c.next());_.retain-b>0&&v.next(_.retain-b)}for(var m=new d(y);c.hasNext()||v.hasNext();)if(v.peekType()==="insert")m.push(v.next());else if(c.peekType()==="delete")m.push(c.next());else{var w=Math.min(c.peekLength(),v.peekLength()),T=c.next(w),x=v.next(w);if(typeof x.retain=="number"){var E={};typeof T.retain=="number"?E.retain=w:E.insert=T.insert;var I=f.attributes.compose(T.attributes,x.attributes,typeof T.retain=="number");if(I&&(E.attributes=I),m.push(E),!v.hasNext()&&a(m.ops[m.ops.length-1],E)){var O=new d(c.rest());return m.concat(O).chop()}}else typeof x.delete=="number"&&typeof T.retain=="number"&&m.push(x)}return m.chop()},d.prototype.concat=function(p){var c=new d(this.ops.slice());return p.ops.length>0&&(c.push(p.ops[0]),c.ops=c.ops.concat(p.ops.slice(1))),c},d.prototype.diff=function(p,c){if(this.ops===p.ops)return new d;var v=[this,p].map(function(w){return w.map(function(T){if(T.insert!=null)return typeof T.insert=="string"?T.insert:h;var x=w===p?"on":"with";throw new Error("diff() called "+x+" non-document")}).join("")}),y=new d,_=o(v[0],v[1],c),b=f.iterator(this.ops),m=f.iterator(p.ops);return _.forEach(function(w){for(var T=w[1].length;T>0;){var x=0;switch(w[0]){case o.INSERT:x=Math.min(m.peekLength(),T),y.push(m.next(x));break;case o.DELETE:x=Math.min(T,b.peekLength()),b.next(x),y.delete(x);break;case o.EQUAL:x=Math.min(b.peekLength(),m.peekLength(),T);var E=b.next(x),I=m.next(x);a(E.insert,I.insert)?y.retain(x,f.attributes.diff(E.attributes,I.attributes)):y.push(I).delete(x);break}T-=x}}),y.chop()},d.prototype.eachLine=function(p,c){c=c||`
1966
- `;for(var v=f.iterator(this.ops),y=new d,_=0;v.hasNext();){if(v.peekType()!=="insert")return;var b=v.peek(),m=f.length(b)-v.peekLength(),w=typeof b.insert=="string"?b.insert.indexOf(c,m)-m:-1;if(w<0)y.push(v.next());else if(w>0)y.push(v.next(w));else{if(p(y,v.next(1).attributes||{},_)===!1)return;_+=1,y=new d}}y.length()>0&&p(y,{},_)},d.prototype.transform=function(p,c){if(c=!!c,typeof p=="number")return this.transformPosition(p,c);for(var v=f.iterator(this.ops),y=f.iterator(p.ops),_=new d;v.hasNext()||y.hasNext();)if(v.peekType()==="insert"&&(c||y.peekType()!=="insert"))_.retain(f.length(v.next()));else if(y.peekType()==="insert")_.push(y.next());else{var b=Math.min(v.peekLength(),y.peekLength()),m=v.next(b),w=y.next(b);if(m.delete)continue;w.delete?_.push(w):_.retain(b,f.attributes.transform(m.attributes,w.attributes,c))}return _.chop()},d.prototype.transformPosition=function(p,c){c=!!c;for(var v=f.iterator(this.ops),y=0;v.hasNext()&&y<=p;){var _=v.peekLength(),b=v.peekType();if(v.next(),b==="delete"){p-=Math.min(_,p-y);continue}else b==="insert"&&(y<p||!c)&&(p+=_);y+=_}return p},r.exports=d},function(r,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,a=Object.defineProperty,u=Object.getOwnPropertyDescriptor,f=function(v){return typeof Array.isArray=="function"?Array.isArray(v):o.call(v)==="[object Array]"},h=function(v){if(!v||o.call(v)!=="[object Object]")return!1;var y=i.call(v,"constructor"),_=v.constructor&&v.constructor.prototype&&i.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!y&&!_)return!1;var b;for(b in v);return typeof b>"u"||i.call(v,b)},d=function(v,y){a&&y.name==="__proto__"?a(v,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):v[y.name]=y.newValue},p=function(v,y){if(y==="__proto__")if(i.call(v,y)){if(u)return u(v,y).value}else return;return v[y]};r.exports=function c(){var v,y,_,b,m,w,T=arguments[0],x=1,E=arguments.length,I=!1;for(typeof T=="boolean"&&(I=T,T=arguments[1]||{},x=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});x<E;++x)if(v=arguments[x],v!=null)for(y in v)_=p(T,y),b=p(v,y),T!==b&&(I&&b&&(h(b)||(m=f(b)))?(m?(m=!1,w=_&&f(_)?_:[]):w=_&&h(_)?_:{},d(T,{name:y,newValue:c(I,w,b)})):typeof b<"u"&&d(T,{name:y,newValue:b}));return T}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BlockEmbed=n.bubbleFormats=void 0;var o=function(){function C(P,M){for(var F=0;F<M.length;F++){var q=M[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,M,F){return M&&C(P.prototype,M),F&&C(P,F),P}}(),a=function C(P,M,F){P===null&&(P=Function.prototype);var q=Object.getOwnPropertyDescriptor(P,M);if(q===void 0){var Z=Object.getPrototypeOf(P);return Z===null?void 0:C(Z,M,F)}else{if("value"in q)return q.value;var z=q.get;return z===void 0?void 0:z.call(F)}},u=i(3),f=T(u),h=i(2),d=T(h),p=i(0),c=T(p),v=i(16),y=T(v),_=i(6),b=T(_),m=i(7),w=T(m);function T(C){return C&&C.__esModule?C:{default:C}}function x(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function E(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function I(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var O=1,A=function(C){I(P,C);function P(){return x(this,P),E(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return o(P,[{key:"attach",value:function(){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"attach",this).call(this),this.attributes=new c.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new d.default().insert(this.value(),(0,f.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(F,q){var Z=c.default.query(F,c.default.Scope.BLOCK_ATTRIBUTE);Z!=null&&this.attributes.attribute(Z,q)}},{key:"formatAt",value:function(F,q,Z,z){this.format(Z,z)}},{key:"insertAt",value:function(F,q,Z){if(typeof q=="string"&&q.endsWith(`
1967
- `)){var z=c.default.create(L.blotName);this.parent.insertBefore(z,F===0?this:this.next),z.insertAt(0,q.slice(0,-1))}else a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,q,Z)}}]),P}(c.default.Embed);A.scope=c.default.Scope.BLOCK_BLOT;var L=function(C){I(P,C);function P(M){x(this,P);var F=E(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M));return F.cache={},F}return o(P,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(c.default.Leaf).reduce(function(F,q){return q.length()===0?F:F.insert(q.value(),R(q))},new d.default).insert(`
1968
- `,R(this))),this.cache.delta}},{key:"deleteAt",value:function(F,q){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"deleteAt",this).call(this,F,q),this.cache={}}},{key:"formatAt",value:function(F,q,Z,z){q<=0||(c.default.query(Z,c.default.Scope.BLOCK)?F+q===this.length()&&this.format(Z,z):a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"formatAt",this).call(this,F,Math.min(q,this.length()-F-1),Z,z),this.cache={})}},{key:"insertAt",value:function(F,q,Z){if(Z!=null)return a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,q,Z);if(q.length!==0){var z=q.split(`
1969
- `),nt=z.shift();nt.length>0&&(F<this.length()-1||this.children.tail==null?a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,Math.min(F,this.length()-1),nt):this.children.tail.insertAt(this.children.tail.length(),nt),this.cache={});var V=this;z.reduce(function(D,k){return V=V.split(D,!0),V.insertAt(0,k),k.length},F+nt.length)}}},{key:"insertBefore",value:function(F,q){var Z=this.children.head;a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertBefore",this).call(this,F,q),Z instanceof y.default&&Z.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"length",this).call(this)+O),this.cache.length}},{key:"moveChildren",value:function(F,q){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"moveChildren",this).call(this,F,q),this.cache={}}},{key:"optimize",value:function(F){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"removeChild",this).call(this,F),this.cache={}}},{key:"split",value:function(F){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(q&&(F===0||F>=this.length()-O)){var Z=this.clone();return F===0?(this.parent.insertBefore(Z,this),this):(this.parent.insertBefore(Z,this.next),Z)}else{var z=a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"split",this).call(this,F,q);return this.cache={},z}}}]),P}(c.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[b.default,c.default.Embed,w.default];function R(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return C==null||(typeof C.formats=="function"&&(P=(0,f.default)(P,C.formats())),C.parent==null||C.parent.blotName=="scroll"||C.parent.statics.scope!==C.statics.scope)?P:R(C.parent,P)}n.bubbleFormats=R,n.BlockEmbed=A,n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.overload=n.expandConfig=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},a=function(){function V(D,k){var G=[],j=!0,Q=!1,K=void 0;try{for(var $=D[Symbol.iterator](),W;!(j=(W=$.next()).done)&&(G.push(W.value),!(k&&G.length===k));j=!0);}catch(et){Q=!0,K=et}finally{try{!j&&$.return&&$.return()}finally{if(Q)throw K}}return G}return function(D,k){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return V(D,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function V(D,k){for(var G=0;G<k.length;G++){var j=k[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(D,j.key,j)}}return function(D,k,G){return k&&V(D.prototype,k),G&&V(D,G),D}}();i(50);var f=i(2),h=R(f),d=i(14),p=R(d),c=i(8),v=R(c),y=i(9),_=R(y),b=i(0),m=R(b),w=i(15),T=R(w),x=i(3),E=R(x),I=i(10),O=R(I),A=i(34),L=R(A);function R(V){return V&&V.__esModule?V:{default:V}}function C(V,D,k){return D in V?Object.defineProperty(V,D,{value:k,enumerable:!0,configurable:!0,writable:!0}):V[D]=k,V}function P(V,D){if(!(V instanceof D))throw new TypeError("Cannot call a class as a function")}var M=(0,O.default)("quill"),F=function(){u(V,null,[{key:"debug",value:function(k){k===!0&&(k="log"),O.default.level(k)}},{key:"find",value:function(k){return k.__quill||m.default.find(k)}},{key:"import",value:function(k){return this.imports[k]==null&&M.error("Cannot import "+k+". Are you sure it was registered?"),this.imports[k]}},{key:"register",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof k!="string"){var K=k.attrName||k.blotName;typeof K=="string"?this.register("formats/"+K,k,G):Object.keys(k).forEach(function($){j.register($,k[$],G)})}else this.imports[k]!=null&&!Q&&M.warn("Overwriting "+k+" with",G),this.imports[k]=G,(k.startsWith("blots/")||k.startsWith("formats/"))&&G.blotName!=="abstract"?m.default.register(G):k.startsWith("modules")&&typeof G.register=="function"&&G.register()}}]);function V(D){var k=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(P(this,V),this.options=q(D,G),this.container=this.options.container,this.container==null)return M.error("Invalid Quill container",D);this.options.debug&&V.debug(this.options.debug);var j=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new v.default,this.scroll=m.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new p.default(this.scroll),this.selection=new T.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(v.default.events.EDITOR_CHANGE,function(K){K===v.default.events.TEXT_CHANGE&&k.root.classList.toggle("ql-blank",k.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(K,$){var W=k.selection.lastRange,et=W&&W.length===0?W.index:void 0;Z.call(k,function(){return k.editor.update(null,$,et)},K)});var Q=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+j+"<p><br></p></div>");this.setContents(Q),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return u(V,[{key:"addContainer",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof k=="string"){var j=k;k=document.createElement("div"),k.classList.add(j)}return this.container.insertBefore(k,G),k}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(k,G,j){var Q=this,K=z(k,G,j),$=a(K,4);return k=$[0],G=$[1],j=$[3],Z.call(this,function(){return Q.editor.deleteText(k,G)},j,k,-1*G)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(k),this.container.classList.toggle("ql-disabled",!k)}},{key:"focus",value:function(){var k=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=k,this.scrollIntoView()}},{key:"format",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return Z.call(this,function(){var K=j.getSelection(!0),$=new h.default;if(K==null)return $;if(m.default.query(k,m.default.Scope.BLOCK))$=j.editor.formatLine(K.index,K.length,C({},k,G));else{if(K.length===0)return j.selection.format(k,G),$;$=j.editor.formatText(K.index,K.length,C({},k,G))}return j.setSelection(K,v.default.sources.SILENT),$},Q)}},{key:"formatLine",value:function(k,G,j,Q,K){var $=this,W=void 0,et=z(k,G,j,Q,K),Y=a(et,4);return k=Y[0],G=Y[1],W=Y[2],K=Y[3],Z.call(this,function(){return $.editor.formatLine(k,G,W)},K,k,0)}},{key:"formatText",value:function(k,G,j,Q,K){var $=this,W=void 0,et=z(k,G,j,Q,K),Y=a(et,4);return k=Y[0],G=Y[1],W=Y[2],K=Y[3],Z.call(this,function(){return $.editor.formatText(k,G,W)},K,k,0)}},{key:"getBounds",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=void 0;typeof k=="number"?j=this.selection.getBounds(k,G):j=this.selection.getBounds(k.index,k.length);var Q=this.container.getBoundingClientRect();return{bottom:j.bottom-Q.top,height:j.height,left:j.left-Q.left,right:j.right-Q.left,top:j.top-Q.top,width:j.width}}},{key:"getContents",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,j=z(k,G),Q=a(j,2);return k=Q[0],G=Q[1],this.editor.getContents(k,G)}},{key:"getFormat",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof k=="number"?this.editor.getFormat(k,G):this.editor.getFormat(k.index,k.length)}},{key:"getIndex",value:function(k){return k.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(k){return this.scroll.leaf(k)}},{key:"getLine",value:function(k){return this.scroll.line(k)}},{key:"getLines",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof k!="number"?this.scroll.lines(k.index,k.length):this.scroll.lines(k,G)}},{key:"getModule",value:function(k){return this.theme.modules[k]}},{key:"getSelection",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return k&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,j=z(k,G),Q=a(j,2);return k=Q[0],G=Q[1],this.editor.getText(k,G)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(k,G,j){var Q=this,K=arguments.length>3&&arguments[3]!==void 0?arguments[3]:V.sources.API;return Z.call(this,function(){return Q.editor.insertEmbed(k,G,j)},K,k)}},{key:"insertText",value:function(k,G,j,Q,K){var $=this,W=void 0,et=z(k,0,j,Q,K),Y=a(et,4);return k=Y[0],W=Y[2],K=Y[3],Z.call(this,function(){return $.editor.insertText(k,G,W)},K,k,G.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(k,G,j){this.clipboard.dangerouslyPasteHTML(k,G,j)}},{key:"removeFormat",value:function(k,G,j){var Q=this,K=z(k,G,j),$=a(K,4);return k=$[0],G=$[1],j=$[3],Z.call(this,function(){return Q.editor.removeFormat(k,G)},j,k)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(k){var G=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){k=new h.default(k);var Q=G.getLength(),K=G.editor.deleteText(0,Q),$=G.editor.applyDelta(k),W=$.ops[$.ops.length-1];W!=null&&typeof W.insert=="string"&&W.insert[W.insert.length-1]===`
1970
- `&&(G.editor.deleteText(G.getLength()-1,1),$.delete(1));var et=K.compose($);return et},j)}},{key:"setSelection",value:function(k,G,j){if(k==null)this.selection.setRange(null,G||V.sources.API);else{var Q=z(k,G,j),K=a(Q,4);k=K[0],G=K[1],j=K[3],this.selection.setRange(new w.Range(k,G),j),j!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,j=new h.default().insert(k);return this.setContents(j,G)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,G=this.scroll.update(k);return this.selection.update(k),G}},{key:"updateContents",value:function(k){var G=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){return k=new h.default(k),G.editor.applyDelta(k,j)},j,!0)}}]),V}();F.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},F.events=v.default.events,F.sources=v.default.sources,F.version="1.3.7",F.imports={delta:h.default,parchment:m.default,"core/module":_.default,"core/theme":L.default};function q(V,D){if(D=(0,E.default)(!0,{container:V,modules:{clipboard:!0,keyboard:!0,history:!0}},D),!D.theme||D.theme===F.DEFAULTS.theme)D.theme=L.default;else if(D.theme=F.import("themes/"+D.theme),D.theme==null)throw new Error("Invalid theme "+D.theme+". Did you register it?");var k=(0,E.default)(!0,{},D.theme.DEFAULTS);[k,D].forEach(function(Q){Q.modules=Q.modules||{},Object.keys(Q.modules).forEach(function(K){Q.modules[K]===!0&&(Q.modules[K]={})})});var G=Object.keys(k.modules).concat(Object.keys(D.modules)),j=G.reduce(function(Q,K){var $=F.import("modules/"+K);return $==null?M.error("Cannot load "+K+" module. Are you sure you registered it?"):Q[K]=$.DEFAULTS||{},Q},{});return D.modules!=null&&D.modules.toolbar&&D.modules.toolbar.constructor!==Object&&(D.modules.toolbar={container:D.modules.toolbar}),D=(0,E.default)(!0,{},F.DEFAULTS,{modules:j},k,D),["bounds","container","scrollingContainer"].forEach(function(Q){typeof D[Q]=="string"&&(D[Q]=document.querySelector(D[Q]))}),D.modules=Object.keys(D.modules).reduce(function(Q,K){return D.modules[K]&&(Q[K]=D.modules[K]),Q},{}),D}function Z(V,D,k,G){if(this.options.strict&&!this.isEnabled()&&D===v.default.sources.USER)return new h.default;var j=k==null?null:this.getSelection(),Q=this.editor.delta,K=V();if(j!=null&&(k===!0&&(k=j.index),G==null?j=nt(j,K,D):G!==0&&(j=nt(j,k,G,D)),this.setSelection(j,v.default.sources.SILENT)),K.length()>0){var $,W=[v.default.events.TEXT_CHANGE,K,Q,D];if(($=this.emitter).emit.apply($,[v.default.events.EDITOR_CHANGE].concat(W)),D!==v.default.sources.SILENT){var et;(et=this.emitter).emit.apply(et,W)}}return K}function z(V,D,k,G,j){var Q={};return typeof V.index=="number"&&typeof V.length=="number"?typeof D!="number"?(j=G,G=k,k=D,D=V.length,V=V.index):(D=V.length,V=V.index):typeof D!="number"&&(j=G,G=k,k=D,D=0),(typeof k>"u"?"undefined":o(k))==="object"?(Q=k,j=G):typeof k=="string"&&(G!=null?Q[k]=G:j=k),j=j||v.default.sources.API,[V,D,Q,j]}function nt(V,D,k,G){if(V==null)return null;var j=void 0,Q=void 0;if(D instanceof h.default){var K=[V.index,V.index+V.length].map(function(Y){return D.transformPosition(Y,G!==v.default.sources.USER)}),$=a(K,2);j=$[0],Q=$[1]}else{var W=[V.index,V.index+V.length].map(function(Y){return Y<D||Y===D&&G===v.default.sources.USER?Y:k>=0?Y+k:Math.max(D,Y+k)}),et=a(W,2);j=et[0],Q=et[1]}return new w.Range(j,Q-j)}n.expandConfig=q,n.overload=z,n.default=F},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),a=function b(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:b(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(7),f=p(u),h=i(0),d=p(h);function p(b){return b&&b.__esModule?b:{default:b}}function c(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function v(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function y(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var _=function(b){y(m,b);function m(){return c(this,m),v(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"formatAt",value:function(T,x,E,I){if(m.compare(this.statics.blotName,E)<0&&d.default.query(E,d.default.Scope.BLOT)){var O=this.isolate(T,x);I&&O.wrap(E,I)}else a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"formatAt",this).call(this,T,x,E,I)}},{key:"optimize",value:function(T){if(a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"optimize",this).call(this,T),this.parent instanceof m&&m.compare(this.statics.blotName,this.parent.statics.blotName)>0){var x=this.parent.isolate(this.offset(),this.length());this.moveChildren(x),x.wrap(this)}}}],[{key:"compare",value:function(T,x){var E=m.order.indexOf(T),I=m.order.indexOf(x);return E>=0||I>=0?E-I:T===x?0:T<x?-1:1}}]),m}(d.default.Inline);_.allowedChildren=[_,d.default.Embed,f.default],_.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default.Text);n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function w(T,x){for(var E=0;E<x.length;E++){var I=x[E];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(T,I.key,I)}}return function(T,x,E){return x&&w(T.prototype,x),E&&w(T,E),T}}(),a=function w(T,x,E){T===null&&(T=Function.prototype);var I=Object.getOwnPropertyDescriptor(T,x);if(I===void 0){var O=Object.getPrototypeOf(T);return O===null?void 0:w(O,x,E)}else{if("value"in I)return I.value;var A=I.get;return A===void 0?void 0:A.call(E)}},u=i(54),f=p(u),h=i(10),d=p(h);function p(w){return w&&w.__esModule?w:{default:w}}function c(w,T){if(!(w instanceof T))throw new TypeError("Cannot call a class as a function")}function v(w,T){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T&&(typeof T=="object"||typeof T=="function")?T:w}function y(w,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof T);w.prototype=Object.create(T&&T.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),T&&(Object.setPrototypeOf?Object.setPrototypeOf(w,T):w.__proto__=T)}var _=(0,d.default)("quill:events"),b=["selectionchange","mousedown","mouseup","click"];b.forEach(function(w){document.addEventListener(w,function(){for(var T=arguments.length,x=Array(T),E=0;E<T;E++)x[E]=arguments[E];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(I){if(I.__quill&&I.__quill.emitter){var O;(O=I.__quill.emitter).handleDOM.apply(O,x)}})})});var m=function(w){y(T,w);function T(){c(this,T);var x=v(this,(T.__proto__||Object.getPrototypeOf(T)).call(this));return x.listeners={},x.on("error",_.error),x}return o(T,[{key:"emit",value:function(){_.log.apply(_,arguments),a(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(E){for(var I=arguments.length,O=Array(I>1?I-1:0),A=1;A<I;A++)O[A-1]=arguments[A];(this.listeners[E.type]||[]).forEach(function(L){var R=L.node,C=L.handler;(E.target===R||R.contains(E.target))&&C.apply(void 0,[E].concat(O))})}},{key:"listenDOM",value:function(E,I,O){this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push({node:I,handler:O})}}]),T}(f.default);m.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},m.sources={API:"api",SILENT:"silent",USER:"user"},n.default=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});function o(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}var a=function u(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o(this,u),this.quill=f,this.options=h};a.DEFAULTS={},n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=["error","warn","log","info"],a="warn";function u(h){if(o.indexOf(h)<=o.indexOf(a)){for(var d,p=arguments.length,c=Array(p>1?p-1:0),v=1;v<p;v++)c[v-1]=arguments[v];(d=console)[h].apply(d,c)}}function f(h){return o.reduce(function(d,p){return d[p]=u.bind(console,p,h),d},{})}u.level=f.level=function(h){a=h},n.default=f},function(r,n,i){var o=Array.prototype.slice,a=i(52),u=i(53),f=r.exports=function(c,v,y){return y||(y={}),c===v?!0:c instanceof Date&&v instanceof Date?c.getTime()===v.getTime():!c||!v||typeof c!="object"&&typeof v!="object"?y.strict?c===v:c==v:p(c,v,y)};function h(c){return c==null}function d(c){return!(!c||typeof c!="object"||typeof c.length!="number"||typeof c.copy!="function"||typeof c.slice!="function"||c.length>0&&typeof c[0]!="number")}function p(c,v,y){var _,b;if(h(c)||h(v)||c.prototype!==v.prototype)return!1;if(u(c))return u(v)?(c=o.call(c),v=o.call(v),f(c,v,y)):!1;if(d(c)){if(!d(v)||c.length!==v.length)return!1;for(_=0;_<c.length;_++)if(c[_]!==v[_])return!1;return!0}try{var m=a(c),w=a(v)}catch{return!1}if(m.length!=w.length)return!1;for(m.sort(),w.sort(),_=m.length-1;_>=0;_--)if(m[_]!=w[_])return!1;for(_=m.length-1;_>=0;_--)if(b=m[_],!f(c[b],v[b],y))return!1;return typeof c==typeof v}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),a=function(){function u(f,h,d){d===void 0&&(d={}),this.attrName=f,this.keyName=h;var p=o.Scope.TYPE&o.Scope.ATTRIBUTE;d.scope!=null?this.scope=d.scope&o.Scope.LEVEL|p:this.scope=o.Scope.ATTRIBUTE,d.whitelist!=null&&(this.whitelist=d.whitelist)}return u.keys=function(f){return[].map.call(f.attributes,function(h){return h.name})},u.prototype.add=function(f,h){return this.canAdd(f,h)?(f.setAttribute(this.keyName,h),!0):!1},u.prototype.canAdd=function(f,h){var d=o.query(f,o.Scope.BLOT&(this.scope|o.Scope.TYPE));return d==null?!1:this.whitelist==null?!0:typeof h=="string"?this.whitelist.indexOf(h.replace(/["']/g,""))>-1:this.whitelist.indexOf(h)>-1},u.prototype.remove=function(f){f.removeAttribute(this.keyName)},u.prototype.value=function(f){var h=f.getAttribute(this.keyName);return this.canAdd(f,h)&&h?h:""},u}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var o=function(){function A(L,R){var C=[],P=!0,M=!1,F=void 0;try{for(var q=L[Symbol.iterator](),Z;!(P=(Z=q.next()).done)&&(C.push(Z.value),!(R&&C.length===R));P=!0);}catch(z){M=!0,F=z}finally{try{!P&&q.return&&q.return()}finally{if(M)throw F}}return C}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return A(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function A(L,R){for(var C=0;C<R.length;C++){var P=R[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,R,C){return R&&A(L.prototype,R),C&&A(L,C),L}}(),u=function A(L,R,C){L===null&&(L=Function.prototype);var P=Object.getOwnPropertyDescriptor(L,R);if(P===void 0){var M=Object.getPrototypeOf(L);return M===null?void 0:A(M,R,C)}else{if("value"in P)return P.value;var F=P.get;return F===void 0?void 0:F.call(C)}},f=i(2),h=w(f),d=i(0),p=w(d),c=i(4),v=w(c),y=i(6),_=w(y),b=i(7),m=w(b);function w(A){return A&&A.__esModule?A:{default:A}}function T(A,L){if(!(A instanceof L))throw new TypeError("Cannot call a class as a function")}function x(A,L){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:A}function E(A,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);A.prototype=Object.create(L&&L.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(A,L):A.__proto__=L)}var I=function(A){E(L,A);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L}(_.default);I.blotName="code",I.tagName="CODE";var O=function(A){E(L,A);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return a(L,[{key:"delta",value:function(){var C=this,P=this.domNode.textContent;return P.endsWith(`
1971
- `)&&(P=P.slice(0,-1)),P.split(`
1972
- `).reduce(function(M,F){return M.insert(F).insert(`
1973
- `,C.formats())},new h.default)}},{key:"format",value:function(C,P){if(!(C===this.statics.blotName&&P)){var M=this.descendant(m.default,this.length()-1),F=o(M,1),q=F[0];q!=null&&q.deleteAt(q.length()-1,1),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"format",this).call(this,C,P)}}},{key:"formatAt",value:function(C,P,M,F){if(P!==0&&!(p.default.query(M,p.default.Scope.BLOCK)==null||M===this.statics.blotName&&F===this.statics.formats(this.domNode))){var q=this.newlineIndex(C);if(!(q<0||q>=C+P)){var Z=this.newlineIndex(C,!0)+1,z=q-Z+1,nt=this.isolate(Z,z),V=nt.next;nt.format(M,F),V instanceof L&&V.formatAt(0,C-Z+P-z,M,F)}}}},{key:"insertAt",value:function(C,P,M){if(M==null){var F=this.descendant(m.default,C),q=o(F,2),Z=q[0],z=q[1];Z.insertAt(z,P)}}},{key:"length",value:function(){var C=this.domNode.textContent.length;return this.domNode.textContent.endsWith(`
1974
- `)?C:C+1}},{key:"newlineIndex",value:function(C){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(P)return this.domNode.textContent.slice(0,C).lastIndexOf(`
1975
- `);var M=this.domNode.textContent.slice(C).indexOf(`
1976
- `);return M>-1?C+M:-1}},{key:"optimize",value:function(C){this.domNode.textContent.endsWith(`
1977
- `)||this.appendChild(p.default.create("text",`
1978
- `)),u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,C);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===P.statics.formats(P.domNode)&&(P.optimize(C),P.moveChildren(this),P.remove())}},{key:"replace",value:function(C){u(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,C),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(P){var M=p.default.find(P);M==null?P.parentNode.removeChild(P):M instanceof p.default.Embed?M.remove():M.unwrap()})}}],[{key:"create",value:function(C){var P=u(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,C);return P.setAttribute("spellcheck",!1),P}},{key:"formats",value:function(){return!0}}]),L}(v.default);O.blotName="code-block",O.tagName="PRE",O.TAB=" ",n.Code=I,n.default=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},a=function(){function V(D,k){var G=[],j=!0,Q=!1,K=void 0;try{for(var $=D[Symbol.iterator](),W;!(j=(W=$.next()).done)&&(G.push(W.value),!(k&&G.length===k));j=!0);}catch(et){Q=!0,K=et}finally{try{!j&&$.return&&$.return()}finally{if(Q)throw K}}return G}return function(D,k){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return V(D,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function V(D,k){for(var G=0;G<k.length;G++){var j=k[G];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(D,j.key,j)}}return function(D,k,G){return k&&V(D.prototype,k),G&&V(D,G),D}}(),f=i(2),h=P(f),d=i(20),p=P(d),c=i(0),v=P(c),y=i(13),_=P(y),b=i(24),m=P(b),w=i(4),T=P(w),x=i(16),E=P(x),I=i(21),O=P(I),A=i(11),L=P(A),R=i(3),C=P(R);function P(V){return V&&V.__esModule?V:{default:V}}function M(V,D,k){return D in V?Object.defineProperty(V,D,{value:k,enumerable:!0,configurable:!0,writable:!0}):V[D]=k,V}function F(V,D){if(!(V instanceof D))throw new TypeError("Cannot call a class as a function")}var q=/^[ -~]*$/,Z=function(){function V(D){F(this,V),this.scroll=D,this.delta=this.getDelta()}return u(V,[{key:"applyDelta",value:function(k){var G=this,j=!1;this.scroll.update();var Q=this.scroll.length();return this.scroll.batchStart(),k=nt(k),k.reduce(function(K,$){var W=$.retain||$.delete||$.insert.length||1,et=$.attributes||{};if($.insert!=null){if(typeof $.insert=="string"){var Y=$.insert;Y.endsWith(`
1979
- `)&&j&&(j=!1,Y=Y.slice(0,-1)),K>=Q&&!Y.endsWith(`
1980
- `)&&(j=!0),G.scroll.insertAt(K,Y);var rt=G.scroll.line(K),ot=a(rt,2),pt=ot[0],vt=ot[1],_t=(0,C.default)({},(0,w.bubbleFormats)(pt));if(pt instanceof T.default){var At=pt.descendant(v.default.Leaf,vt),ne=a(At,1),Ut=ne[0];_t=(0,C.default)(_t,(0,w.bubbleFormats)(Ut))}et=p.default.attributes.diff(_t,et)||{}}else if(o($.insert)==="object"){var it=Object.keys($.insert)[0];if(it==null)return K;G.scroll.insertAt(K,it,$.insert[it])}Q+=W}return Object.keys(et).forEach(function(ut){G.scroll.formatAt(K,W,ut,et[ut])}),K+W},0),k.reduce(function(K,$){return typeof $.delete=="number"?(G.scroll.deleteAt(K,$.delete),K):K+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,G){return this.scroll.deleteAt(k,G),this.update(new h.default().retain(k).delete(G))}},{key:"formatLine",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Q).forEach(function(K){if(!(j.scroll.whitelist!=null&&!j.scroll.whitelist[K])){var $=j.scroll.lines(k,Math.max(G,1)),W=G;$.forEach(function(et){var Y=et.length();if(!(et instanceof _.default))et.format(K,Q[K]);else{var rt=k-et.offset(j.scroll),ot=et.newlineIndex(rt+W)-rt+1;et.formatAt(rt,ot,K,Q[K])}W-=Y})}}),this.scroll.optimize(),this.update(new h.default().retain(k).retain(G,(0,O.default)(Q)))}},{key:"formatText",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Q).forEach(function(K){j.scroll.formatAt(k,G,K,Q[K])}),this.update(new h.default().retain(k).retain(G,(0,O.default)(Q)))}},{key:"getContents",value:function(k,G){return this.delta.slice(k,k+G)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,G){return k.concat(G.delta())},new h.default)}},{key:"getFormat",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,j=[],Q=[];G===0?this.scroll.path(k).forEach(function($){var W=a($,1),et=W[0];et instanceof T.default?j.push(et):et instanceof v.default.Leaf&&Q.push(et)}):(j=this.scroll.lines(k,G),Q=this.scroll.descendants(v.default.Leaf,k,G));var K=[j,Q].map(function($){if($.length===0)return{};for(var W=(0,w.bubbleFormats)($.shift());Object.keys(W).length>0;){var et=$.shift();if(et==null)return W;W=z((0,w.bubbleFormats)(et),W)}return W});return C.default.apply(C.default,K)}},{key:"getText",value:function(k,G){return this.getContents(k,G).filter(function(j){return typeof j.insert=="string"}).map(function(j){return j.insert}).join("")}},{key:"insertEmbed",value:function(k,G,j){return this.scroll.insertAt(k,G,j),this.update(new h.default().retain(k).insert(M({},G,j)))}},{key:"insertText",value:function(k,G){var j=this,Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return G=G.replace(/\r\n/g,`
1981
- `).replace(/\r/g,`
1982
- `),this.scroll.insertAt(k,G),Object.keys(Q).forEach(function(K){j.scroll.formatAt(k,G.length,K,Q[K])}),this.update(new h.default().retain(k).insert(G,(0,O.default)(Q)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var k=this.scroll.children.head;return k.statics.blotName!==T.default.blotName||k.children.length>1?!1:k.children.head instanceof E.default}},{key:"removeFormat",value:function(k,G){var j=this.getText(k,G),Q=this.scroll.line(k+G),K=a(Q,2),$=K[0],W=K[1],et=0,Y=new h.default;$!=null&&($ instanceof _.default?et=$.newlineIndex(W)-W+1:et=$.length()-W,Y=$.delta().slice(W,W+et-1).insert(`
1983
- `));var rt=this.getContents(k,G+et),ot=rt.diff(new h.default().insert(j).concat(Y)),pt=new h.default().retain(k).concat(ot);return this.applyDelta(pt)}},{key:"update",value:function(k){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Q=this.delta;if(G.length===1&&G[0].type==="characterData"&&G[0].target.data.match(q)&&v.default.find(G[0].target)){var K=v.default.find(G[0].target),$=(0,w.bubbleFormats)(K),W=K.offset(this.scroll),et=G[0].oldValue.replace(m.default.CONTENTS,""),Y=new h.default().insert(et),rt=new h.default().insert(K.value()),ot=new h.default().retain(W).concat(Y.diff(rt,j));k=ot.reduce(function(pt,vt){return vt.insert?pt.insert(vt.insert,$):pt.push(vt)},new h.default),this.delta=Q.compose(k)}else this.delta=this.getDelta(),(!k||!(0,L.default)(Q.compose(k),this.delta))&&(k=Q.diff(this.delta,j));return k}}]),V}();function z(V,D){return Object.keys(D).reduce(function(k,G){return V[G]==null||(D[G]===V[G]?k[G]=D[G]:Array.isArray(D[G])?D[G].indexOf(V[G])<0&&(k[G]=D[G].concat([V[G]])):k[G]=[D[G],V[G]]),k},{})}function nt(V){return V.reduce(function(D,k){if(k.insert===1){var G=(0,O.default)(k.attributes);return delete G.image,D.insert({image:k.attributes.image},G)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,O.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var j=k.insert.replace(/\r\n/g,`
1984
- `).replace(/\r/g,`
1985
- `);return D.insert(j,k.attributes)}return D.push(k)},new h.default)}n.default=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Range=void 0;var o=function(){function A(L,R){var C=[],P=!0,M=!1,F=void 0;try{for(var q=L[Symbol.iterator](),Z;!(P=(Z=q.next()).done)&&(C.push(Z.value),!(R&&C.length===R));P=!0);}catch(z){M=!0,F=z}finally{try{!P&&q.return&&q.return()}finally{if(M)throw F}}return C}return function(L,R){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return A(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function A(L,R){for(var C=0;C<R.length;C++){var P=R[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(L,P.key,P)}}return function(L,R,C){return R&&A(L.prototype,R),C&&A(L,C),L}}(),u=i(0),f=m(u),h=i(21),d=m(h),p=i(11),c=m(p),v=i(8),y=m(v),_=i(10),b=m(_);function m(A){return A&&A.__esModule?A:{default:A}}function w(A){if(Array.isArray(A)){for(var L=0,R=Array(A.length);L<A.length;L++)R[L]=A[L];return R}else return Array.from(A)}function T(A,L){if(!(A instanceof L))throw new TypeError("Cannot call a class as a function")}var x=(0,b.default)("quill:selection"),E=function A(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;T(this,A),this.index=L,this.length=R},I=function(){function A(L,R){var C=this;T(this,A),this.emitter=R,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=f.default.create("cursor",this),this.lastRange=this.savedRange=new E(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){C.mouseDown||setTimeout(C.update.bind(C,y.default.sources.USER),1)}),this.emitter.on(y.default.events.EDITOR_CHANGE,function(P,M){P===y.default.events.TEXT_CHANGE&&M.length()>0&&C.update(y.default.sources.SILENT)}),this.emitter.on(y.default.events.SCROLL_BEFORE_UPDATE,function(){if(C.hasFocus()){var P=C.getNativeRange();P!=null&&P.start.node!==C.cursor.textNode&&C.emitter.once(y.default.events.SCROLL_UPDATE,function(){try{C.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(y.default.events.SCROLL_OPTIMIZE,function(P,M){if(M.range){var F=M.range,q=F.startNode,Z=F.startOffset,z=F.endNode,nt=F.endOffset;C.setNativeRange(q,Z,z,nt)}}),this.update(y.default.sources.SILENT)}return a(A,[{key:"handleComposition",value:function(){var R=this;this.root.addEventListener("compositionstart",function(){R.composing=!0}),this.root.addEventListener("compositionend",function(){if(R.composing=!1,R.cursor.parent){var C=R.cursor.restore();if(!C)return;setTimeout(function(){R.setNativeRange(C.startNode,C.startOffset,C.endNode,C.endOffset)},1)}})}},{key:"handleDragging",value:function(){var R=this;this.emitter.listenDOM("mousedown",document.body,function(){R.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){R.mouseDown=!1,R.update(y.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(R,C){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[R])){this.scroll.update();var P=this.getNativeRange();if(!(P==null||!P.native.collapsed||f.default.query(R,f.default.Scope.BLOCK))){if(P.start.node!==this.cursor.textNode){var M=f.default.find(P.start.node,!1);if(M==null)return;if(M instanceof f.default.Leaf){var F=M.split(P.start.offset);M.parent.insertBefore(this.cursor,F)}else M.insertBefore(this.cursor,P.start.node);this.cursor.attach()}this.cursor.format(R,C),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P=this.scroll.length();R=Math.min(R,P-1),C=Math.min(R+C,P-1)-R;var M=void 0,F=this.scroll.leaf(R),q=o(F,2),Z=q[0],z=q[1];if(Z==null)return null;var nt=Z.position(z,!0),V=o(nt,2);M=V[0],z=V[1];var D=document.createRange();if(C>0){D.setStart(M,z);var k=this.scroll.leaf(R+C),G=o(k,2);if(Z=G[0],z=G[1],Z==null)return null;var j=Z.position(z,!0),Q=o(j,2);return M=Q[0],z=Q[1],D.setEnd(M,z),D.getBoundingClientRect()}else{var K="left",$=void 0;return M instanceof Text?(z<M.data.length?(D.setStart(M,z),D.setEnd(M,z+1)):(D.setStart(M,z-1),D.setEnd(M,z),K="right"),$=D.getBoundingClientRect()):($=Z.domNode.getBoundingClientRect(),z>0&&(K="right")),{bottom:$.top+$.height,height:$.height,left:$[K],right:$[K],top:$.top,width:0}}}},{key:"getNativeRange",value:function(){var R=document.getSelection();if(R==null||R.rangeCount<=0)return null;var C=R.getRangeAt(0);if(C==null)return null;var P=this.normalizeNative(C);return x.info("getNativeRange",P),P}},{key:"getRange",value:function(){var R=this.getNativeRange();if(R==null)return[null,null];var C=this.normalizedToRange(R);return[C,R]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(R){var C=this,P=[[R.start.node,R.start.offset]];R.native.collapsed||P.push([R.end.node,R.end.offset]);var M=P.map(function(Z){var z=o(Z,2),nt=z[0],V=z[1],D=f.default.find(nt,!0),k=D.offset(C.scroll);return V===0?k:D instanceof f.default.Container?k+D.length():k+D.index(nt,V)}),F=Math.min(Math.max.apply(Math,w(M)),this.scroll.length()-1),q=Math.min.apply(Math,[F].concat(w(M)));return new E(q,F-q)}},{key:"normalizeNative",value:function(R){if(!O(this.root,R.startContainer)||!R.collapsed&&!O(this.root,R.endContainer))return null;var C={start:{node:R.startContainer,offset:R.startOffset},end:{node:R.endContainer,offset:R.endOffset},native:R};return[C.start,C.end].forEach(function(P){for(var M=P.node,F=P.offset;!(M instanceof Text)&&M.childNodes.length>0;)if(M.childNodes.length>F)M=M.childNodes[F],F=0;else if(M.childNodes.length===F)M=M.lastChild,F=M instanceof Text?M.data.length:M.childNodes.length+1;else break;P.node=M,P.offset=F}),C}},{key:"rangeToNative",value:function(R){var C=this,P=R.collapsed?[R.index]:[R.index,R.index+R.length],M=[],F=this.scroll.length();return P.forEach(function(q,Z){q=Math.min(F-1,q);var z=void 0,nt=C.scroll.leaf(q),V=o(nt,2),D=V[0],k=V[1],G=D.position(k,Z!==0),j=o(G,2);z=j[0],k=j[1],M.push(z,k)}),M.length<2&&(M=M.concat(M)),M}},{key:"scrollIntoView",value:function(R){var C=this.lastRange;if(C!=null){var P=this.getBounds(C.index,C.length);if(P!=null){var M=this.scroll.length()-1,F=this.scroll.line(Math.min(C.index,M)),q=o(F,1),Z=q[0],z=Z;if(C.length>0){var nt=this.scroll.line(Math.min(C.index+C.length,M)),V=o(nt,1);z=V[0]}if(!(Z==null||z==null)){var D=R.getBoundingClientRect();P.top<D.top?R.scrollTop-=D.top-P.top:P.bottom>D.bottom&&(R.scrollTop+=P.bottom-D.bottom)}}}}},{key:"setNativeRange",value:function(R,C){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:R,M=arguments.length>3&&arguments[3]!==void 0?arguments[3]:C,F=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(x.info("setNativeRange",R,C,P,M),!(R!=null&&(this.root.parentNode==null||R.parentNode==null||P.parentNode==null))){var q=document.getSelection();if(q!=null)if(R!=null){this.hasFocus()||this.root.focus();var Z=(this.getNativeRange()||{}).native;if(Z==null||F||R!==Z.startContainer||C!==Z.startOffset||P!==Z.endContainer||M!==Z.endOffset){R.tagName=="BR"&&(C=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode),P.tagName=="BR"&&(M=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode);var z=document.createRange();z.setStart(R,C),z.setEnd(P,M),q.removeAllRanges(),q.addRange(z)}}else q.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(R){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof C=="string"&&(P=C,C=!1),x.info("setRange",R),R!=null){var M=this.rangeToNative(R);this.setNativeRange.apply(this,w(M).concat([C]))}else this.setNativeRange(null);this.update(P)}},{key:"update",value:function(){var R=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y.default.sources.USER,C=this.lastRange,P=this.getRange(),M=o(P,2),F=M[0],q=M[1];if(this.lastRange=F,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,c.default)(C,this.lastRange)){var Z;!this.composing&&q!=null&&q.native.collapsed&&q.start.node!==this.cursor.textNode&&this.cursor.restore();var z=[y.default.events.SELECTION_CHANGE,(0,d.default)(this.lastRange),(0,d.default)(C),R];if((Z=this.emitter).emit.apply(Z,[y.default.events.EDITOR_CHANGE].concat(z)),R!==y.default.sources.SILENT){var nt;(nt=this.emitter).emit.apply(nt,z)}}}}]),A}();function O(A,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),A.contains(L)}n.Range=E,n.default=I},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(0),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"insertInto",value:function(m,w){m.children.length===0?a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"insertInto",this).call(this,m,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),_}(f.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(44),u=i(30),f=i(1),h=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.build(),y}return c.prototype.appendChild=function(v){this.insertBefore(v)},c.prototype.attach=function(){p.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},c.prototype.build=function(){var v=this;this.children=new a.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(y){try{var _=d(y);v.insertBefore(_,v.children.head||void 0)}catch(b){if(b instanceof f.ParchmentError)return;throw b}})},c.prototype.deleteAt=function(v,y){if(v===0&&y===this.length())return this.remove();this.children.forEachAt(v,y,function(_,b,m){_.deleteAt(b,m)})},c.prototype.descendant=function(v,y){var _=this.children.find(y),b=_[0],m=_[1];return v.blotName==null&&v(b)||v.blotName!=null&&b instanceof v?[b,m]:b instanceof c?b.descendant(v,m):[null,-1]},c.prototype.descendants=function(v,y,_){y===void 0&&(y=0),_===void 0&&(_=Number.MAX_VALUE);var b=[],m=_;return this.children.forEachAt(y,_,function(w,T,x){(v.blotName==null&&v(w)||v.blotName!=null&&w instanceof v)&&b.push(w),w instanceof c&&(b=b.concat(w.descendants(v,T,m))),m-=x}),b},c.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),p.prototype.detach.call(this)},c.prototype.formatAt=function(v,y,_,b){this.children.forEachAt(v,y,function(m,w,T){m.formatAt(w,T,_,b)})},c.prototype.insertAt=function(v,y,_){var b=this.children.find(v),m=b[0],w=b[1];if(m)m.insertAt(w,y,_);else{var T=_==null?f.create("text",y):f.create(y,_);this.appendChild(T)}},c.prototype.insertBefore=function(v,y){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(_){return v instanceof _}))throw new f.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,y)},c.prototype.length=function(){return this.children.reduce(function(v,y){return v+y.length()},0)},c.prototype.moveChildren=function(v,y){this.children.forEach(function(_){v.insertBefore(_,y)})},c.prototype.optimize=function(v){if(p.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var y=f.create(this.statics.defaultChild);this.appendChild(y),y.optimize(v)}else this.remove()},c.prototype.path=function(v,y){y===void 0&&(y=!1);var _=this.children.find(v,y),b=_[0],m=_[1],w=[[this,v]];return b instanceof c?w.concat(b.path(m,y)):(b!=null&&w.push([b,m]),w)},c.prototype.removeChild=function(v){this.children.remove(v)},c.prototype.replace=function(v){v instanceof c&&v.moveChildren(this),p.prototype.replace.call(this,v)},c.prototype.split=function(v,y){if(y===void 0&&(y=!1),!y){if(v===0)return this;if(v===this.length())return this.next}var _=this.clone();return this.parent.insertBefore(_,this.next),this.children.forEachAt(v,this.length(),function(b,m,w){b=b.split(m,y),_.appendChild(b)}),_},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(v,y){var _=this,b=[],m=[];v.forEach(function(w){w.target===_.domNode&&w.type==="childList"&&(b.push.apply(b,w.addedNodes),m.push.apply(m,w.removedNodes))}),m.forEach(function(w){if(!(w.parentNode!=null&&w.tagName!=="IFRAME"&&document.body.compareDocumentPosition(w)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var T=f.find(w);T!=null&&(T.domNode.parentNode==null||T.domNode.parentNode===_.domNode)&&T.detach()}}),b.filter(function(w){return w.parentNode==_.domNode}).sort(function(w,T){return w===T?0:w.compareDocumentPosition(T)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(w){var T=null;w.nextSibling!=null&&(T=f.find(w.nextSibling));var x=d(w);(x.next!=T||x.next==null)&&(x.parent!=null&&x.parent.removeChild(_),_.insertBefore(x,T||void 0))})},c}(u.default);function d(p){var c=f.find(p);if(c==null)try{c=f.create(p)}catch{c=f.create(f.Scope.INLINE),[].slice.call(p.childNodes).forEach(function(y){c.domNode.appendChild(y)}),p.parentNode&&p.parentNode.replaceChild(c.domNode,p),c.attach()}return c}n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12),u=i(31),f=i(17),h=i(1),d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.attributes=new u.default(y.domNode),y}return c.formats=function(v){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return v.tagName.toLowerCase()},c.prototype.format=function(v,y){var _=h.query(v);_ instanceof a.default?this.attributes.attribute(_,y):y&&_!=null&&(v!==this.statics.blotName||this.formats()[v]!==y)&&this.replaceWith(v,y)},c.prototype.formats=function(){var v=this.attributes.values(),y=this.statics.formats(this.domNode);return y!=null&&(v[this.statics.blotName]=y),v},c.prototype.replaceWith=function(v,y){var _=p.prototype.replaceWith.call(this,v,y);return this.attributes.copy(_),_},c.prototype.update=function(v,y){var _=this;p.prototype.update.call(this,v,y),v.some(function(b){return b.target===_.domNode&&b.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(v,y){var _=p.prototype.wrap.call(this,v,y);return _ instanceof c&&_.statics.scope===this.statics.scope&&this.attributes.move(_),_},c}(f.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(30),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.value=function(p){return!0},d.prototype.index=function(p,c){return this.domNode===p||this.domNode.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},d.prototype.position=function(p,c){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return p>0&&(v+=1),[this.parent.domNode,v]},d.prototype.value=function(){var p;return p={},p[this.statics.blotName]=this.statics.value(this.domNode)||!0,p},d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=i(11),a=i(3),u={attributes:{compose:function(h,d,p){typeof h!="object"&&(h={}),typeof d!="object"&&(d={});var c=a(!0,{},d);p||(c=Object.keys(c).reduce(function(y,_){return c[_]!=null&&(y[_]=c[_]),y},{}));for(var v in h)h[v]!==void 0&&d[v]===void 0&&(c[v]=h[v]);return Object.keys(c).length>0?c:void 0},diff:function(h,d){typeof h!="object"&&(h={}),typeof d!="object"&&(d={});var p=Object.keys(h).concat(Object.keys(d)).reduce(function(c,v){return o(h[v],d[v])||(c[v]=d[v]===void 0?null:d[v]),c},{});return Object.keys(p).length>0?p:void 0},transform:function(h,d,p){if(typeof h!="object")return d;if(typeof d=="object"){if(!p)return d;var c=Object.keys(d).reduce(function(v,y){return h[y]===void 0&&(v[y]=d[y]),v},{});return Object.keys(c).length>0?c:void 0}}},iterator:function(h){return new f(h)},length:function(h){return typeof h.delete=="number"?h.delete:typeof h.retain=="number"?h.retain:typeof h.insert=="string"?h.insert.length:1}};function f(h){this.ops=h,this.index=0,this.offset=0}f.prototype.hasNext=function(){return this.peekLength()<1/0},f.prototype.next=function(h){h||(h=1/0);var d=this.ops[this.index];if(d){var p=this.offset,c=u.length(d);if(h>=c-p?(h=c-p,this.index+=1,this.offset=0):this.offset+=h,typeof d.delete=="number")return{delete:h};var v={};return d.attributes&&(v.attributes=d.attributes),typeof d.retain=="number"?v.retain=h:typeof d.insert=="string"?v.insert=d.insert.substr(p,h):v.insert=d.insert,v}else return{retain:1/0}},f.prototype.peek=function(){return this.ops[this.index]},f.prototype.peekLength=function(){return this.ops[this.index]?u.length(this.ops[this.index])-this.offset:1/0},f.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},f.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var h=this.offset,d=this.index,p=this.next(),c=this.ops.slice(this.index);return this.offset=h,this.index=d,[p].concat(c)}else return[]},r.exports=u},function(r,n){var i=function(){function o(_,b){return b!=null&&_ instanceof b}var a;try{a=Map}catch{a=function(){}}var u;try{u=Set}catch{u=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(_,b,m,w,T){typeof b=="object"&&(m=b.depth,w=b.prototype,T=b.includeNonEnumerable,b=b.circular);var x=[],E=[],I=typeof Buffer<"u";typeof b>"u"&&(b=!0),typeof m>"u"&&(m=1/0);function O(A,L){if(A===null)return null;if(L===0)return A;var R,C;if(typeof A!="object")return A;if(o(A,a))R=new a;else if(o(A,u))R=new u;else if(o(A,f))R=new f(function(D,k){A.then(function(G){D(O(G,L-1))},function(G){k(O(G,L-1))})});else if(h.__isArray(A))R=[];else if(h.__isRegExp(A))R=new RegExp(A.source,y(A)),A.lastIndex&&(R.lastIndex=A.lastIndex);else if(h.__isDate(A))R=new Date(A.getTime());else{if(I&&Buffer.isBuffer(A))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(A.length):R=new Buffer(A.length),A.copy(R),R;o(A,Error)?R=Object.create(A):typeof w>"u"?(C=Object.getPrototypeOf(A),R=Object.create(C)):(R=Object.create(w),C=w)}if(b){var P=x.indexOf(A);if(P!=-1)return E[P];x.push(A),E.push(R)}o(A,a)&&A.forEach(function(D,k){var G=O(k,L-1),j=O(D,L-1);R.set(G,j)}),o(A,u)&&A.forEach(function(D){var k=O(D,L-1);R.add(k)});for(var M in A){var F;C&&(F=Object.getOwnPropertyDescriptor(C,M)),!(F&&F.set==null)&&(R[M]=O(A[M],L-1))}if(Object.getOwnPropertySymbols)for(var q=Object.getOwnPropertySymbols(A),M=0;M<q.length;M++){var Z=q[M],z=Object.getOwnPropertyDescriptor(A,Z);z&&!z.enumerable&&!T||(R[Z]=O(A[Z],L-1),z.enumerable||Object.defineProperty(R,Z,{enumerable:!1}))}if(T)for(var nt=Object.getOwnPropertyNames(A),M=0;M<nt.length;M++){var V=nt[M],z=Object.getOwnPropertyDescriptor(A,V);z&&z.enumerable||(R[V]=O(A[V],L-1),Object.defineProperty(R,V,{enumerable:!1}))}return R}return O(_,m)}h.clonePrototype=function(b){if(b===null)return null;var m=function(){};return m.prototype=b,new m};function d(_){return Object.prototype.toString.call(_)}h.__objToStr=d;function p(_){return typeof _=="object"&&d(_)==="[object Date]"}h.__isDate=p;function c(_){return typeof _=="object"&&d(_)==="[object Array]"}h.__isArray=c;function v(_){return typeof _=="object"&&d(_)==="[object RegExp]"}h.__isRegExp=v;function y(_){var b="";return _.global&&(b+="g"),_.ignoreCase&&(b+="i"),_.multiline&&(b+="m"),b}return h.__getRegExpFlags=y,h}();typeof r=="object"&&r.exports&&(r.exports=i)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),u=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},f=i(0),h=x(f),d=i(8),p=x(d),c=i(4),v=x(c),y=i(16),_=x(y),b=i(13),m=x(b),w=i(25),T=x(w);function x(R){return R&&R.__esModule?R:{default:R}}function E(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function I(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function O(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}function A(R){return R instanceof v.default||R instanceof c.BlockEmbed}var L=function(R){O(C,R);function C(P,M){E(this,C);var F=I(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P));return F.emitter=M.emitter,Array.isArray(M.whitelist)&&(F.whitelist=M.whitelist.reduce(function(q,Z){return q[Z]=!0,q},{})),F.domNode.addEventListener("DOMNodeInserted",function(){}),F.optimize(),F.enable(),F}return a(C,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(M,F){var q=this.line(M),Z=o(q,2),z=Z[0],nt=Z[1],V=this.line(M+F),D=o(V,1),k=D[0];if(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"deleteAt",this).call(this,M,F),k!=null&&z!==k&&nt>0){if(z instanceof c.BlockEmbed||k instanceof c.BlockEmbed){this.optimize();return}if(z instanceof m.default){var G=z.newlineIndex(z.length(),!0);if(G>-1&&(z=z.split(G+1),z===k)){this.optimize();return}}else if(k instanceof m.default){var j=k.newlineIndex(0);j>-1&&k.split(j+1)}var Q=k.children.head instanceof _.default?null:k.children.head;z.moveChildren(k,Q),z.remove()}this.optimize()}},{key:"enable",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",M)}},{key:"formatAt",value:function(M,F,q,Z){this.whitelist!=null&&!this.whitelist[q]||(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"formatAt",this).call(this,M,F,q,Z),this.optimize())}},{key:"insertAt",value:function(M,F,q){if(!(q!=null&&this.whitelist!=null&&!this.whitelist[F])){if(M>=this.length())if(q==null||h.default.query(F,h.default.Scope.BLOCK)==null){var Z=h.default.create(this.statics.defaultChild);this.appendChild(Z),q==null&&F.endsWith(`
1986
- `)&&(F=F.slice(0,-1)),Z.insertAt(0,F,q)}else{var z=h.default.create(F,q);this.appendChild(z)}else u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertAt",this).call(this,M,F,q);this.optimize()}}},{key:"insertBefore",value:function(M,F){if(M.statics.scope===h.default.Scope.INLINE_BLOT){var q=h.default.create(this.statics.defaultChild);q.appendChild(M),M=q}u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"insertBefore",this).call(this,M,F)}},{key:"leaf",value:function(M){return this.path(M).pop()||[null,-1]}},{key:"line",value:function(M){return M===this.length()?this.line(M-1):this.descendant(A,M)}},{key:"lines",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,q=function Z(z,nt,V){var D=[],k=V;return z.children.forEachAt(nt,V,function(G,j,Q){A(G)?D.push(G):G instanceof h.default.Container&&(D=D.concat(Z(G,j,k))),k-=Q}),D};return q(this,M,F)}},{key:"optimize",value:function(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"optimize",this).call(this,M,F),M.length>0&&this.emitter.emit(p.default.events.SCROLL_OPTIMIZE,M,F))}},{key:"path",value:function(M){return u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"path",this).call(this,M).slice(1)}},{key:"update",value:function(M){if(this.batch!==!0){var F=p.default.sources.USER;typeof M=="string"&&(F=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(p.default.events.SCROLL_BEFORE_UPDATE,F,M),u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"update",this).call(this,M.concat([])),M.length>0&&this.emitter.emit(p.default.events.SCROLL_UPDATE,F,M)}}}]),C}(h.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[v.default,c.BlockEmbed,T.default],n.default=L},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SHORTKEY=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},a=function(){function $(W,et){var Y=[],rt=!0,ot=!1,pt=void 0;try{for(var vt=W[Symbol.iterator](),_t;!(rt=(_t=vt.next()).done)&&(Y.push(_t.value),!(et&&Y.length===et));rt=!0);}catch(At){ot=!0,pt=At}finally{try{!rt&&vt.return&&vt.return()}finally{if(ot)throw pt}}return Y}return function(W,et){if(Array.isArray(W))return W;if(Symbol.iterator in Object(W))return $(W,et);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function $(W,et){for(var Y=0;Y<et.length;Y++){var rt=et[Y];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(W,rt.key,rt)}}return function(W,et,Y){return et&&$(W.prototype,et),Y&&$(W,Y),W}}(),f=i(21),h=R(f),d=i(11),p=R(d),c=i(3),v=R(c),y=i(2),_=R(y),b=i(20),m=R(b),w=i(0),T=R(w),x=i(5),E=R(x),I=i(10),O=R(I),A=i(9),L=R(A);function R($){return $&&$.__esModule?$:{default:$}}function C($,W,et){return W in $?Object.defineProperty($,W,{value:et,enumerable:!0,configurable:!0,writable:!0}):$[W]=et,$}function P($,W){if(!($ instanceof W))throw new TypeError("Cannot call a class as a function")}function M($,W){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W&&(typeof W=="object"||typeof W=="function")?W:$}function F($,W){if(typeof W!="function"&&W!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof W);$.prototype=Object.create(W&&W.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),W&&(Object.setPrototypeOf?Object.setPrototypeOf($,W):$.__proto__=W)}var q=(0,O.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",z=function($){F(W,$),u(W,null,[{key:"match",value:function(Y,rt){return rt=K(rt),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ot){return!!rt[ot]!==Y[ot]&&rt[ot]!==null})?!1:rt.key===(Y.which||Y.keyCode)}}]);function W(et,Y){P(this,W);var rt=M(this,(W.__proto__||Object.getPrototypeOf(W)).call(this,et,Y));return rt.bindings={},Object.keys(rt.options.bindings).forEach(function(ot){ot==="list autofill"&&et.scroll.whitelist!=null&&!et.scroll.whitelist.list||rt.options.bindings[ot]&&rt.addBinding(rt.options.bindings[ot])}),rt.addBinding({key:W.keys.ENTER,shiftKey:null},G),rt.addBinding({key:W.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(rt.addBinding({key:W.keys.BACKSPACE},{collapsed:!0},V),rt.addBinding({key:W.keys.DELETE},{collapsed:!0},D)):(rt.addBinding({key:W.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},V),rt.addBinding({key:W.keys.DELETE},{collapsed:!0,suffix:/^.?$/},D)),rt.addBinding({key:W.keys.BACKSPACE},{collapsed:!1},k),rt.addBinding({key:W.keys.DELETE},{collapsed:!1},k),rt.addBinding({key:W.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},V),rt.listen(),rt}return u(W,[{key:"addBinding",value:function(Y){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},pt=K(Y);if(pt==null||pt.key==null)return q.warn("Attempted to add invalid keyboard binding",pt);typeof rt=="function"&&(rt={handler:rt}),typeof ot=="function"&&(ot={handler:ot}),pt=(0,v.default)(pt,rt,ot),this.bindings[pt.key]=this.bindings[pt.key]||[],this.bindings[pt.key].push(pt)}},{key:"listen",value:function(){var Y=this;this.quill.root.addEventListener("keydown",function(rt){if(!rt.defaultPrevented){var ot=rt.which||rt.keyCode,pt=(Y.bindings[ot]||[]).filter(function(he){return W.match(rt,he)});if(pt.length!==0){var vt=Y.quill.getSelection();if(!(vt==null||!Y.quill.hasFocus())){var _t=Y.quill.getLine(vt.index),At=a(_t,2),ne=At[0],Ut=At[1],it=Y.quill.getLeaf(vt.index),ut=a(it,2),dt=ut[0],gt=ut[1],at=vt.length===0?[dt,gt]:Y.quill.getLeaf(vt.index+vt.length),It=a(at,2),St=It[0],Mt=It[1],He=dt instanceof T.default.Text?dt.value().slice(0,gt):"",Ge=St instanceof T.default.Text?St.value().slice(Mt):"",Qt={collapsed:vt.length===0,empty:vt.length===0&&ne.length()<=1,format:Y.quill.getFormat(vt),offset:Ut,prefix:He,suffix:Ge},Ss=pt.some(function(he){if(he.collapsed!=null&&he.collapsed!==Qt.collapsed||he.empty!=null&&he.empty!==Qt.empty||he.offset!=null&&he.offset!==Qt.offset)return!1;if(Array.isArray(he.format)){if(he.format.every(function(ur){return Qt.format[ur]==null}))return!1}else if(o(he.format)==="object"&&!Object.keys(he.format).every(function(ur){return he.format[ur]===!0?Qt.format[ur]!=null:he.format[ur]===!1?Qt.format[ur]==null:(0,p.default)(he.format[ur],Qt.format[ur])}))return!1;return he.prefix!=null&&!he.prefix.test(Qt.prefix)||he.suffix!=null&&!he.suffix.test(Qt.suffix)?!1:he.handler.call(Y,vt,Qt)!==!0});Ss&&rt.preventDefault()}}}})}}]),W}(L.default);z.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},z.DEFAULTS={bindings:{bold:Q("bold"),italic:Q("italic"),underline:Q("underline"),indent:{key:z.keys.TAB,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","+1",E.default.sources.USER)}},outdent:{key:z.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(W,et){if(et.collapsed&&et.offset!==0)return!0;this.quill.format("indent","-1",E.default.sources.USER)}},"outdent backspace":{key:z.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(W,et){et.format.indent!=null?this.quill.format("indent","-1",E.default.sources.USER):et.format.list!=null&&this.quill.format("list",!1,E.default.sources.USER)}},"indent code-block":j(!0),"outdent code-block":j(!1),"remove tab":{key:z.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(W){this.quill.deleteText(W.index-1,1,E.default.sources.USER)}},tab:{key:z.keys.TAB,handler:function(W){this.quill.history.cutoff();var et=new _.default().retain(W.index).delete(W.length).insert(" ");this.quill.updateContents(et,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index+1,E.default.sources.SILENT)}},"list empty enter":{key:z.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(W,et){this.quill.format("list",!1,E.default.sources.USER),et.format.indent&&this.quill.format("indent",!1,E.default.sources.USER)}},"checklist enter":{key:z.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(W){var et=this.quill.getLine(W.index),Y=a(et,2),rt=Y[0],ot=Y[1],pt=(0,v.default)({},rt.formats(),{list:"checked"}),vt=new _.default().retain(W.index).insert(`
1987
- `,pt).retain(rt.length()-ot-1).retain(1,{list:"unchecked"});this.quill.updateContents(vt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:z.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(W,et){var Y=this.quill.getLine(W.index),rt=a(Y,2),ot=rt[0],pt=rt[1],vt=new _.default().retain(W.index).insert(`
1988
- `,et.format).retain(ot.length()-pt-1).retain(1,{header:null});this.quill.updateContents(vt,E.default.sources.USER),this.quill.setSelection(W.index+1,E.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(W,et){var Y=et.prefix.length,rt=this.quill.getLine(W.index),ot=a(rt,2),pt=ot[0],vt=ot[1];if(vt>Y)return!0;var _t=void 0;switch(et.prefix.trim()){case"[]":case"[ ]":_t="unchecked";break;case"[x]":_t="checked";break;case"-":case"*":_t="bullet";break;default:_t="ordered"}this.quill.insertText(W.index," ",E.default.sources.USER),this.quill.history.cutoff();var At=new _.default().retain(W.index-vt).delete(Y+1).retain(pt.length()-2-vt).retain(1,{list:_t});this.quill.updateContents(At,E.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(W.index-Y,E.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(W){var et=this.quill.getLine(W.index),Y=a(et,2),rt=Y[0],ot=Y[1],pt=new _.default().retain(W.index+rt.length()-ot-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(pt,E.default.sources.USER)}},"embed left":nt(z.keys.LEFT,!1),"embed left shift":nt(z.keys.LEFT,!0),"embed right":nt(z.keys.RIGHT,!1),"embed right shift":nt(z.keys.RIGHT,!0)}};function nt($,W){var et,Y=$===z.keys.LEFT?"prefix":"suffix";return et={key:$,shiftKey:W,altKey:null},C(et,Y,/^$/),C(et,"handler",function(ot){var pt=ot.index;$===z.keys.RIGHT&&(pt+=ot.length+1);var vt=this.quill.getLeaf(pt),_t=a(vt,1),At=_t[0];return At instanceof T.default.Embed?($===z.keys.LEFT?W?this.quill.setSelection(ot.index-1,ot.length+1,E.default.sources.USER):this.quill.setSelection(ot.index-1,E.default.sources.USER):W?this.quill.setSelection(ot.index,ot.length+1,E.default.sources.USER):this.quill.setSelection(ot.index+ot.length+1,E.default.sources.USER),!1):!0}),et}function V($,W){if(!($.index===0||this.quill.getLength()<=1)){var et=this.quill.getLine($.index),Y=a(et,1),rt=Y[0],ot={};if(W.offset===0){var pt=this.quill.getLine($.index-1),vt=a(pt,1),_t=vt[0];if(_t!=null&&_t.length()>1){var At=rt.formats(),ne=this.quill.getFormat($.index-1,1);ot=m.default.attributes.diff(At,ne)||{}}}var Ut=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(W.prefix)?2:1;this.quill.deleteText($.index-Ut,Ut,E.default.sources.USER),Object.keys(ot).length>0&&this.quill.formatLine($.index-Ut,Ut,ot,E.default.sources.USER),this.quill.focus()}}function D($,W){var et=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(W.suffix)?2:1;if(!($.index>=this.quill.getLength()-et)){var Y={},rt=0,ot=this.quill.getLine($.index),pt=a(ot,1),vt=pt[0];if(W.offset>=vt.length()-1){var _t=this.quill.getLine($.index+1),At=a(_t,1),ne=At[0];if(ne){var Ut=vt.formats(),it=this.quill.getFormat($.index,1);Y=m.default.attributes.diff(Ut,it)||{},rt=ne.length()}}this.quill.deleteText($.index,et,E.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine($.index+rt-1,et,Y,E.default.sources.USER)}}function k($){var W=this.quill.getLines($),et={};if(W.length>1){var Y=W[0].formats(),rt=W[W.length-1].formats();et=m.default.attributes.diff(rt,Y)||{}}this.quill.deleteText($,E.default.sources.USER),Object.keys(et).length>0&&this.quill.formatLine($.index,1,et,E.default.sources.USER),this.quill.setSelection($.index,E.default.sources.SILENT),this.quill.focus()}function G($,W){var et=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var Y=Object.keys(W.format).reduce(function(rt,ot){return T.default.query(ot,T.default.Scope.BLOCK)&&!Array.isArray(W.format[ot])&&(rt[ot]=W.format[ot]),rt},{});this.quill.insertText($.index,`
1989
- `,Y,E.default.sources.USER),this.quill.setSelection($.index+1,E.default.sources.SILENT),this.quill.focus(),Object.keys(W.format).forEach(function(rt){Y[rt]==null&&(Array.isArray(W.format[rt])||rt!=="link"&&et.quill.format(rt,W.format[rt],E.default.sources.USER))})}function j($){return{key:z.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(et){var Y=T.default.query("code-block"),rt=et.index,ot=et.length,pt=this.quill.scroll.descendant(Y,rt),vt=a(pt,2),_t=vt[0],At=vt[1];if(_t!=null){var ne=this.quill.getIndex(_t),Ut=_t.newlineIndex(At,!0)+1,it=_t.newlineIndex(ne+At+ot),ut=_t.domNode.textContent.slice(Ut,it).split(`
1990
- `);At=0,ut.forEach(function(dt,gt){$?(_t.insertAt(Ut+At,Y.TAB),At+=Y.TAB.length,gt===0?rt+=Y.TAB.length:ot+=Y.TAB.length):dt.startsWith(Y.TAB)&&(_t.deleteAt(Ut+At,Y.TAB.length),At-=Y.TAB.length,gt===0?rt-=Y.TAB.length:ot-=Y.TAB.length),At+=dt.length+1}),this.quill.update(E.default.sources.USER),this.quill.setSelection(rt,ot,E.default.sources.SILENT)}}}}function Q($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(et,Y){this.quill.format($,!Y.format[$],E.default.sources.USER)}}}function K($){if(typeof $=="string"||typeof $=="number")return K({key:$});if((typeof $>"u"?"undefined":o($))==="object"&&($=(0,h.default)($,!1)),typeof $.key=="string")if(z.keys[$.key.toUpperCase()]!=null)$.key=z.keys[$.key.toUpperCase()];else if($.key.length===1)$.key=$.key.toUpperCase().charCodeAt(0);else return null;return $.shortKey&&($[Z]=$.shortKey,delete $.shortKey),$}n.default=z,n.SHORTKEY=Z},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){var x=[],E=!0,I=!1,O=void 0;try{for(var A=w[Symbol.iterator](),L;!(E=(L=A.next()).done)&&(x.push(L.value),!(T&&x.length===T));E=!0);}catch(R){I=!0,O=R}finally{try{!E&&A.return&&A.return()}finally{if(I)throw O}}return x}return function(w,T){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return m(w,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(x)}},u=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),f=i(0),h=c(f),d=i(7),p=c(d);function c(m){return m&&m.__esModule?m:{default:m}}function v(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function y(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function _(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var b=function(m){_(w,m),u(w,null,[{key:"value",value:function(){}}]);function w(T,x){v(this,w);var E=y(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return E.selection=x,E.textNode=document.createTextNode(w.CONTENTS),E.domNode.appendChild(E.textNode),E._length=0,E}return u(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,E){if(this._length!==0)return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,x,E);for(var I=this,O=0;I!=null&&I.statics.scope!==h.default.Scope.BLOCK_BLOT;)O+=I.offset(I.parent),I=I.parent;I!=null&&(this._length=w.CONTENTS.length,I.optimize(),I.formatAt(O,w.CONTENTS.length,x,E),this._length=0)}},{key:"index",value:function(x,E){return x===this.textNode?0:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var x=this.textNode,E=this.selection.getNativeRange(),I=void 0,O=void 0,A=void 0;if(E!=null&&E.start.node===x&&E.end.node===x){var L=[x,E.start.offset,E.end.offset];I=L[0],O=L[1],A=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==w.CONTENTS){var R=this.textNode.data.split(w.CONTENTS).join("");this.next instanceof p.default?(I=this.next.domNode,this.next.insertAt(0,R),this.textNode.data=w.CONTENTS):(this.textNode.data=R,this.parent.insertBefore(h.default.create(this.textNode),this),this.textNode=document.createTextNode(w.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),O!=null){var C=[O,A].map(function(M){return Math.max(0,Math.min(I.data.length,M-1))}),P=o(C,2);return O=P[0],A=P[1],{startNode:I,startOffset:O,endNode:I,endOffset:A}}}}},{key:"update",value:function(x,E){var I=this;if(x.some(function(A){return A.type==="characterData"&&A.target===I.textNode})){var O=this.restore();O&&(E.range=O)}}},{key:"value",value:function(){return""}}]),w}(h.default.Embed);b.blotName="cursor",b.className="ql-cursor",b.tagName="span",b.CONTENTS="\uFEFF",n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=h(o),u=i(4),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return _}(a.default.Container);v.allowedChildren=[f.default,u.BlockEmbed,v],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.ColorStyle=n.ColorClass=n.ColorAttributor=void 0;var o=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),a=function b(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:b(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function d(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function p(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function c(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var v=function(b){c(m,b);function m(){return d(this,m),p(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"value",value:function(T){var x=a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"value",this).call(this,T);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(E){return("00"+parseInt(E).toString(16)).slice(-2)}).join("")):x}}]),m}(f.default.Attributor.Style),y=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),_=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=y,n.ColorStyle=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var o=function(){function _(b,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(b,T.key,T)}}return function(b,m,w){return m&&_(b.prototype,m),w&&_(b,w),b}}(),a=function _(b,m,w){b===null&&(b=Function.prototype);var T=Object.getOwnPropertyDescriptor(b,m);if(T===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:_(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(6),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function d(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function p(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function c(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var v=function(_){c(b,_);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"format",value:function(w,T){if(w!==this.statics.blotName||!T)return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,w,T);T=this.constructor.sanitize(T),this.domNode.setAttribute("href",T)}}],[{key:"create",value:function(w){var T=a(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,w);return w=this.sanitize(w),T.setAttribute("href",w),T.setAttribute("rel","noopener noreferrer"),T.setAttribute("target","_blank"),T}},{key:"formats",value:function(w){return w.getAttribute("href")}},{key:"sanitize",value:function(w){return y(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),b}(f.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function y(_,b){var m=document.createElement("a");m.href=_;var w=m.href.slice(0,m.href.indexOf(":"));return b.indexOf(w)>-1}n.default=v,n.sanitize=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},a=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),u=i(23),f=p(u),h=i(107),d=p(h);function p(b){return b&&b.__esModule?b:{default:b}}function c(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}var v=0;function y(b,m){b.setAttribute(m,b.getAttribute(m)!=="true")}var _=function(){function b(m){var w=this;c(this,b),this.select=m,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){w.togglePicker()}),this.label.addEventListener("keydown",function(T){switch(T.keyCode){case f.default.keys.ENTER:w.togglePicker();break;case f.default.keys.ESCAPE:w.escape(),T.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return a(b,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),y(this.label,"aria-expanded"),y(this.options,"aria-hidden")}},{key:"buildItem",value:function(w){var T=this,x=document.createElement("span");return x.tabIndex="0",x.setAttribute("role","button"),x.classList.add("ql-picker-item"),w.hasAttribute("value")&&x.setAttribute("data-value",w.getAttribute("value")),w.textContent&&x.setAttribute("data-label",w.textContent),x.addEventListener("click",function(){T.selectItem(x,!0)}),x.addEventListener("keydown",function(E){switch(E.keyCode){case f.default.keys.ENTER:T.selectItem(x,!0),E.preventDefault();break;case f.default.keys.ESCAPE:T.escape(),E.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=d.default,w.tabIndex="0",w.setAttribute("role","button"),w.setAttribute("aria-expanded","false"),this.container.appendChild(w),w}},{key:"buildOptions",value:function(){var w=this,T=document.createElement("span");T.classList.add("ql-picker-options"),T.setAttribute("aria-hidden","true"),T.tabIndex="-1",T.id="ql-picker-options-"+v,v+=1,this.label.setAttribute("aria-controls",T.id),this.options=T,[].slice.call(this.select.options).forEach(function(x){var E=w.buildItem(x);T.appendChild(E),x.selected===!0&&w.selectItem(E)}),this.container.appendChild(T)}},{key:"buildPicker",value:function(){var w=this;[].slice.call(this.select.attributes).forEach(function(T){w.container.setAttribute(T.name,T.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var w=this;this.close(),setTimeout(function(){return w.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(w){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=this.container.querySelector(".ql-selected");if(w!==x&&(x!=null&&x.classList.remove("ql-selected"),w!=null&&(w.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(w.parentNode.children,w),w.hasAttribute("data-value")?this.label.setAttribute("data-value",w.getAttribute("data-value")):this.label.removeAttribute("data-value"),w.hasAttribute("data-label")?this.label.setAttribute("data-label",w.getAttribute("data-label")):this.label.removeAttribute("data-label"),T))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":o(Event))==="object"){var E=document.createEvent("Event");E.initEvent("change",!0,!0),this.select.dispatchEvent(E)}this.close()}}},{key:"update",value:function(){var w=void 0;if(this.select.selectedIndex>-1){var T=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];w=this.select.options[this.select.selectedIndex],this.selectItem(T)}else this.selectItem(null);var x=w!=null&&w!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",x)}}]),b}();n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),a=q(o),u=i(5),f=q(u),h=i(4),d=q(h),p=i(16),c=q(p),v=i(25),y=q(v),_=i(24),b=q(_),m=i(35),w=q(m),T=i(6),x=q(T),E=i(22),I=q(E),O=i(7),A=q(O),L=i(55),R=q(L),C=i(42),P=q(C),M=i(23),F=q(M);function q(Z){return Z&&Z.__esModule?Z:{default:Z}}f.default.register({"blots/block":d.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":y.default,"blots/cursor":b.default,"blots/embed":w.default,"blots/inline":x.default,"blots/scroll":I.default,"blots/text":A.default,"modules/clipboard":R.default,"modules/history":P.default,"modules/keyboard":F.default}),a.default.register(d.default,c.default,b.default,x.default,I.default,A.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),a=function(){function u(f){this.domNode=f,this.domNode[o.DATA_KEY]={blot:this}}return Object.defineProperty(u.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),u.create=function(f){if(this.tagName==null)throw new o.ParchmentError("Blot definition missing tagName");var h;return Array.isArray(this.tagName)?(typeof f=="string"&&(f=f.toUpperCase(),parseInt(f).toString()===f&&(f=parseInt(f))),typeof f=="number"?h=document.createElement(this.tagName[f-1]):this.tagName.indexOf(f)>-1?h=document.createElement(f):h=document.createElement(this.tagName[0])):h=document.createElement(this.tagName),this.className&&h.classList.add(this.className),h},u.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},u.prototype.clone=function(){var f=this.domNode.cloneNode(!1);return o.create(f)},u.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[o.DATA_KEY]},u.prototype.deleteAt=function(f,h){var d=this.isolate(f,h);d.remove()},u.prototype.formatAt=function(f,h,d,p){var c=this.isolate(f,h);if(o.query(d,o.Scope.BLOT)!=null&&p)c.wrap(d,p);else if(o.query(d,o.Scope.ATTRIBUTE)!=null){var v=o.create(this.statics.scope);c.wrap(v),v.format(d,p)}},u.prototype.insertAt=function(f,h,d){var p=d==null?o.create("text",h):o.create(h,d),c=this.split(f);this.parent.insertBefore(p,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var d=null;f.children.insertBefore(this,h),h!=null&&(d=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=d)&&f.domNode.insertBefore(this.domNode,d),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var d=this.split(f);return d.split(h),d},u.prototype.length=function(){return 1},u.prototype.offset=function(f){return f===void 0&&(f=this.parent),this.parent==null||this==f?0:this.parent.children.offset(this)+this.parent.offset(f)},u.prototype.optimize=function(f){this.domNode[o.DATA_KEY]!=null&&delete this.domNode[o.DATA_KEY].mutations},u.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},u.prototype.replace=function(f){f.parent!=null&&(f.parent.insertBefore(this,f.next),f.remove())},u.prototype.replaceWith=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return d.replace(this),d},u.prototype.split=function(f,h){return f===0?this:this.next},u.prototype.update=function(f,h){},u.prototype.wrap=function(f,h){var d=typeof f=="string"?o.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(d,this.next),d.appendChild(this),d},u.blotName="abstract",u}();n.default=a},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),a=i(32),u=i(33),f=i(1),h=function(){function d(p){this.attributes={},this.domNode=p,this.build()}return d.prototype.attribute=function(p,c){c?p.add(this.domNode,c)&&(p.value(this.domNode)!=null?this.attributes[p.attrName]=p:delete this.attributes[p.attrName]):(p.remove(this.domNode),delete this.attributes[p.attrName])},d.prototype.build=function(){var p=this;this.attributes={};var c=o.default.keys(this.domNode),v=a.default.keys(this.domNode),y=u.default.keys(this.domNode);c.concat(v).concat(y).forEach(function(_){var b=f.query(_,f.Scope.ATTRIBUTE);b instanceof o.default&&(p.attributes[b.attrName]=b)})},d.prototype.copy=function(p){var c=this;Object.keys(this.attributes).forEach(function(v){var y=c.attributes[v].value(c.domNode);p.format(v,y)})},d.prototype.move=function(p){var c=this;this.copy(p),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},d.prototype.values=function(){var p=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=p.attributes[v].value(p.domNode),c},{})},d}();n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h,d){var p=h.getAttribute("class")||"";return p.split(/\s+/).filter(function(c){return c.indexOf(d+"-")===0})}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(this.remove(p),p.classList.add(this.keyName+"-"+c),!0):!1},d.prototype.remove=function(p){var c=u(p,this.keyName);c.forEach(function(v){p.classList.remove(v)}),p.classList.length===0&&p.removeAttribute("class")},d.prototype.value=function(p){var c=u(p,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(p,v)?v:""},d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(12);function u(h){var d=h.split("-"),p=d.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return d[0]+p}var f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.keys=function(p){return(p.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},d.prototype.add=function(p,c){return this.canAdd(p,c)?(p.style[u(this.keyName)]=c,!0):!1},d.prototype.remove=function(p){p.style[u(this.keyName)]="",p.getAttribute("style")||p.removeAttribute("style")},d.prototype.value=function(p){var c=p.style[u(this.keyName)];return this.canAdd(p,c)?c:""},d}(a.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){a(this,f),this.quill=h,this.options=d,this.modules={}}return o(f,[{key:"init",value:function(){var d=this;Object.keys(this.options.modules).forEach(function(p){d.modules[p]==null&&d.addModule(p)})}},{key:"addModule",value:function(d){var p=this.quill.constructor.import("modules/"+d);return this.modules[d]=new p(this.quill,this.options.modules[d]||{}),this.modules[d]}}]),f}();u.DEFAULTS={modules:{}},u.themes={default:u},n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(x)}},u=i(0),f=p(u),h=i(7),d=p(h);function p(m){return m&&m.__esModule?m:{default:m}}function c(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function v(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function y(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var _="\uFEFF",b=function(m){y(w,m);function w(T){c(this,w);var x=v(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return x.contentNode=document.createElement("span"),x.contentNode.setAttribute("contenteditable",!1),[].slice.call(x.domNode.childNodes).forEach(function(E){x.contentNode.appendChild(E)}),x.leftGuard=document.createTextNode(_),x.rightGuard=document.createTextNode(_),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(w,[{key:"index",value:function(x,E){return x===this.leftGuard?0:x===this.rightGuard?1:a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,E)}},{key:"restore",value:function(x){var E=void 0,I=void 0,O=x.data.split(_).join("");if(x===this.leftGuard)if(this.prev instanceof d.default){var A=this.prev.length();this.prev.insertAt(A,O),E={startNode:this.prev.domNode,startOffset:A+O.length}}else I=document.createTextNode(O),this.parent.insertBefore(f.default.create(I),this),E={startNode:I,startOffset:O.length};else x===this.rightGuard&&(this.next instanceof d.default?(this.next.insertAt(0,O),E={startNode:this.next.domNode,startOffset:O.length}):(I=document.createTextNode(O),this.parent.insertBefore(f.default.create(I),this.next),E={startNode:I,startOffset:O.length}));return x.data=_,E}},{key:"update",value:function(x,E){var I=this;x.forEach(function(O){if(O.type==="characterData"&&(O.target===I.leftGuard||O.target===I.rightGuard)){var A=I.restore(O.target);A&&(E.range=A)}})}}]),w}(f.default.Embed);n.default=b},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new a.default.Attributor.Attribute("align","align",f),d=new a.default.Attributor.Class("align","ql-align",f),p=new a.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=d,n.AlignStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var o=i(0),a=f(o),u=i(26);function f(p){return p&&p.__esModule?p:{default:p}}var h=new a.default.Attributor.Class("background","ql-bg",{scope:a.default.Scope.INLINE}),d=new u.ColorAttributor("background","background-color",{scope:a.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var o=i(0),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:a.default.Scope.BLOCK,whitelist:["rtl"]},h=new a.default.Attributor.Attribute("direction","dir",f),d=new a.default.Attributor.Class("direction","ql-direction",f),p=new a.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=d,n.DirectionStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var o=function(){function m(w,T){for(var x=0;x<T.length;x++){var E=T[x];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(w,E.key,E)}}return function(w,T,x){return T&&m(w.prototype,T),x&&m(w,x),w}}(),a=function m(w,T,x){w===null&&(w=Function.prototype);var E=Object.getOwnPropertyDescriptor(w,T);if(E===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:m(I,T,x)}else{if("value"in E)return E.value;var O=E.get;return O===void 0?void 0:O.call(x)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function d(m,w){if(!(m instanceof w))throw new TypeError("Cannot call a class as a function")}function p(m,w){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:m}function c(m,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);m.prototype=Object.create(w&&w.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(m,w):m.__proto__=w)}var v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},y=new f.default.Attributor.Class("font","ql-font",v),_=function(m){c(w,m);function w(){return d(this,w),p(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return o(w,[{key:"value",value:function(x){return a(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),w}(f.default.Attributor.Style),b=new _("font","font-family",v);n.FontStyle=b,n.FontClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var o=i(0),a=u(o);function u(d){return d&&d.__esModule?d:{default:d}}var f=new a.default.Attributor.Class("size","ql-size",{scope:a.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new a.default.Attributor.Style("size","font-size",{scope:a.default.Scope.INLINE,whitelist:["10px","18px","32px"]});n.SizeClass=f,n.SizeStyle=h},function(r,n,i){r.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.getLastChangeIndex=n.default=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var O=E[I];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=i(0),u=c(a),f=i(5),h=c(f),d=i(9),p=c(d);function c(T){return T&&T.__esModule?T:{default:T}}function v(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function y(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function _(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var b=function(T){_(x,T);function x(E,I){v(this,x);var O=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,E,I));return O.lastRecorded=0,O.ignoreChange=!1,O.clear(),O.quill.on(h.default.events.EDITOR_CHANGE,function(A,L,R,C){A!==h.default.events.TEXT_CHANGE||O.ignoreChange||(!O.options.userOnly||C===h.default.sources.USER?O.record(L,R):O.transform(L))}),O.quill.keyboard.addBinding({key:"Z",shortKey:!0},O.undo.bind(O)),O.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},O.redo.bind(O)),/Win/i.test(navigator.platform)&&O.quill.keyboard.addBinding({key:"Y",shortKey:!0},O.redo.bind(O)),O}return o(x,[{key:"change",value:function(I,O){if(this.stack[I].length!==0){var A=this.stack[I].pop();this.stack[O].push(A),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(A[I],h.default.sources.USER),this.ignoreChange=!1;var L=w(A[I]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(I,O){if(I.ops.length!==0){this.stack.redo=[];var A=this.quill.getContents().diff(O),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();A=A.compose(R.undo),I=R.redo.compose(I)}else this.lastRecorded=L;this.stack.undo.push({redo:I,undo:A}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(I){this.stack.undo.forEach(function(O){O.undo=I.transform(O.undo,!0),O.redo=I.transform(O.redo,!0)}),this.stack.redo.forEach(function(O){O.undo=I.transform(O.undo,!0),O.redo=I.transform(O.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(p.default);b.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function m(T){var x=T.ops[T.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
1991
- `):x.attributes!=null?Object.keys(x.attributes).some(function(E){return u.default.query(E,u.default.Scope.BLOCK)!=null}):!1}function w(T){var x=T.reduce(function(I,O){return I+=O.delete||0,I},0),E=T.length()-x;return m(T)&&(E-=1),E}n.default=b,n.getLastChangeIndex=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var o=function(){function G(j,Q){for(var K=0;K<Q.length;K++){var $=Q[K];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(j,$.key,$)}}return function(j,Q,K){return Q&&G(j.prototype,Q),K&&G(j,K),j}}(),a=function G(j,Q,K){j===null&&(j=Function.prototype);var $=Object.getOwnPropertyDescriptor(j,Q);if($===void 0){var W=Object.getPrototypeOf(j);return W===null?void 0:G(W,Q,K)}else{if("value"in $)return $.value;var et=$.get;return et===void 0?void 0:et.call(K)}},u=i(3),f=L(u),h=i(2),d=L(h),p=i(8),c=L(p),v=i(23),y=L(v),_=i(34),b=L(_),m=i(59),w=L(m),T=i(60),x=L(T),E=i(28),I=L(E),O=i(61),A=L(O);function L(G){return G&&G.__esModule?G:{default:G}}function R(G,j){if(!(G instanceof j))throw new TypeError("Cannot call a class as a function")}function C(G,j){if(!G)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j&&(typeof j=="object"||typeof j=="function")?j:G}function P(G,j){if(typeof j!="function"&&j!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof j);G.prototype=Object.create(j&&j.prototype,{constructor:{value:G,enumerable:!1,writable:!0,configurable:!0}}),j&&(Object.setPrototypeOf?Object.setPrototypeOf(G,j):G.__proto__=j)}var M=[!1,"center","right","justify"],F=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],q=[!1,"serif","monospace"],Z=["1","2","3",!1],z=["small",!1,"large","huge"],nt=function(G){P(j,G);function j(Q,K){R(this,j);var $=C(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,Q,K)),W=function et(Y){if(!document.body.contains(Q.root))return document.body.removeEventListener("click",et);$.tooltip!=null&&!$.tooltip.root.contains(Y.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(rt){rt.container.contains(Y.target)||rt.close()})};return Q.emitter.listenDOM("click",document.body,W),$}return o(j,[{key:"addModule",value:function(K){var $=a(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"addModule",this).call(this,K);return K==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(K,$){K.forEach(function(W){var et=W.getAttribute("class")||"";et.split(/\s+/).forEach(function(Y){if(Y.startsWith("ql-")&&(Y=Y.slice(3),$[Y]!=null))if(Y==="direction")W.innerHTML=$[Y][""]+$[Y].rtl;else if(typeof $[Y]=="string")W.innerHTML=$[Y];else{var rt=W.value||"";rt!=null&&$[Y][rt]&&(W.innerHTML=$[Y][rt])}})})}},{key:"buildPickers",value:function(K,$){var W=this;this.pickers=K.map(function(Y){if(Y.classList.contains("ql-align"))return Y.querySelector("option")==null&&k(Y,M),new x.default(Y,$.align);if(Y.classList.contains("ql-background")||Y.classList.contains("ql-color")){var rt=Y.classList.contains("ql-background")?"background":"color";return Y.querySelector("option")==null&&k(Y,F,rt==="background"?"#ffffff":"#000000"),new w.default(Y,$[rt])}else return Y.querySelector("option")==null&&(Y.classList.contains("ql-font")?k(Y,q):Y.classList.contains("ql-header")?k(Y,Z):Y.classList.contains("ql-size")&&k(Y,z)),new I.default(Y)});var et=function(){W.pickers.forEach(function(rt){rt.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,et)}}]),j}(b.default);nt.DEFAULTS=(0,f.default)(!0,{},b.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var j=this,Q=this.container.querySelector("input.ql-image[type=file]");Q==null&&(Q=document.createElement("input"),Q.setAttribute("type","file"),Q.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Q.classList.add("ql-image"),Q.addEventListener("change",function(){if(Q.files!=null&&Q.files[0]!=null){var K=new FileReader;K.onload=function($){var W=j.quill.getSelection(!0);j.quill.updateContents(new d.default().retain(W.index).delete(W.length).insert({image:$.target.result}),c.default.sources.USER),j.quill.setSelection(W.index+1,c.default.sources.SILENT),Q.value=""},K.readAsDataURL(Q.files[0])}}),this.container.appendChild(Q)),Q.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var V=function(G){P(j,G);function j(Q,K){R(this,j);var $=C(this,(j.__proto__||Object.getPrototypeOf(j)).call(this,Q,K));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return o(j,[{key:"listen",value:function(){var K=this;this.textbox.addEventListener("keydown",function($){y.default.match($,"enter")?(K.save(),$.preventDefault()):y.default.match($,"escape")&&(K.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),$!=null?this.textbox.value=$:K!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+K)||""),this.root.setAttribute("data-mode",K)}},{key:"restoreFocus",value:function(){var K=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=K}},{key:"save",value:function(){var K=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",K,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",K,c.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":K=D(K);case"formula":{if(!K)break;var W=this.quill.getSelection(!0);if(W!=null){var et=W.index+W.length;this.quill.insertEmbed(et,this.root.getAttribute("data-mode"),K,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(et+1," ",c.default.sources.USER),this.quill.setSelection(et+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),j}(A.default);function D(G){var j=G.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||G.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return j?(j[1]||"https")+"://www.youtube.com/embed/"+j[2]+"?showinfo=0":(j=G.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(j[1]||"https")+"://player.vimeo.com/video/"+j[2]+"/":G}function k(G,j){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;j.forEach(function(K){var $=document.createElement("option");K===Q?$.setAttribute("selected","selected"):$.setAttribute("value",K),G.appendChild($)})}n.BaseTooltip=V,n.default=nt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function a(){this.head=this.tail=null,this.length=0}return a.prototype.append=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];this.insertBefore(u[0],null),u.length>1&&this.append.apply(this,u.slice(1))},a.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},a.prototype.insertBefore=function(u,f){u&&(u.next=f,f!=null?(u.prev=f.prev,f.prev!=null&&(f.prev.next=u),f.prev=u,f===this.head&&(this.head=u)):this.tail!=null?(this.tail.next=u,u.prev=this.tail,this.tail=u):(u.prev=null,this.head=this.tail=u),this.length+=1)},a.prototype.offset=function(u){for(var f=0,h=this.head;h!=null;){if(h===u)return f;f+=h.length(),h=h.next}return-1},a.prototype.remove=function(u){this.contains(u)&&(u.prev!=null&&(u.prev.next=u.next),u.next!=null&&(u.next.prev=u.prev),u===this.head&&(this.head=u.next),u===this.tail&&(this.tail=u.prev),this.length-=1)},a.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},a.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,d=this.iterator();h=d();){var p=h.length();if(u<p||f&&u===p&&(h.next==null||h.next.length()!==0))return[h,u];u-=p}return[null,0]},a.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},a.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var d=this.find(u),p=d[0],c=d[1],v,y=u-c,_=this.iterator(p);(v=_())&&y<u+f;){var b=v.length();u>y?h(v,u-y,Math.min(f,y+b-u)):h(v,0,Math.min(b,u+f-y)),y+=b}},a.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},a.prototype.reduce=function(u,f){for(var h,d=this.iterator();h=d();)f=u(f,h);return f},a}();n.default=o},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var y in v)v.hasOwnProperty(y)&&(c[y]=v[y])};return function(c,v){p(c,v);function y(){this.constructor=c}c.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,d=function(p){o(c,p);function c(v){var y=p.call(this,v)||this;return y.scroll=y,y.observer=new MutationObserver(function(_){y.update(_)}),y.observer.observe(y.domNode,f),y.attach(),y}return c.prototype.detach=function(){p.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,y){this.update(),v===0&&y===this.length()?this.children.forEach(function(_){_.remove()}):p.prototype.deleteAt.call(this,v,y)},c.prototype.formatAt=function(v,y,_,b){this.update(),p.prototype.formatAt.call(this,v,y,_,b)},c.prototype.insertAt=function(v,y,_){this.update(),p.prototype.insertAt.call(this,v,y,_)},c.prototype.optimize=function(v,y){var _=this;v===void 0&&(v=[]),y===void 0&&(y={}),p.prototype.optimize.call(this,y);for(var b=[].slice.call(this.observer.takeRecords());b.length>0;)v.push(b.pop());for(var m=function(E,I){I===void 0&&(I=!0),!(E==null||E===_)&&E.domNode.parentNode!=null&&(E.domNode[u.DATA_KEY].mutations==null&&(E.domNode[u.DATA_KEY].mutations=[]),I&&m(E.parent))},w=function(E){E.domNode[u.DATA_KEY]==null||E.domNode[u.DATA_KEY].mutations==null||(E instanceof a.default&&E.children.forEach(w),E.optimize(y))},T=v,x=0;T.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(T.forEach(function(E){var I=u.find(E.target,!0);I!=null&&(I.domNode===E.target&&(E.type==="childList"?(m(u.find(E.previousSibling,!1)),[].forEach.call(E.addedNodes,function(O){var A=u.find(O,!1);m(A,!1),A instanceof a.default&&A.children.forEach(function(L){m(L,!1)})})):E.type==="attributes"&&m(I.prev)),m(I))}),this.children.forEach(w),T=[].slice.call(this.observer.takeRecords()),b=T.slice();b.length>0;)v.push(b.pop())}},c.prototype.update=function(v,y){var _=this;y===void 0&&(y={}),v=v||this.observer.takeRecords(),v.map(function(b){var m=u.find(b.target,!0);return m==null?null:m.domNode[u.DATA_KEY].mutations==null?(m.domNode[u.DATA_KEY].mutations=[b],m):(m.domNode[u.DATA_KEY].mutations.push(b),null)}).forEach(function(b){b==null||b===_||b.domNode[u.DATA_KEY]==null||b.update(b.domNode[u.DATA_KEY].mutations||[],y)}),this.domNode[u.DATA_KEY].mutations!=null&&p.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,y),this.optimize(v,y)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(a.default);n.default=d},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,c){p.__proto__=c}||function(p,c){for(var v in c)c.hasOwnProperty(v)&&(p[v]=c[v])};return function(p,c){d(p,c);function v(){this.constructor=p}p.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1);function f(d,p){if(Object.keys(d).length!==Object.keys(p).length)return!1;for(var c in d)if(d[c]!==p[c])return!1;return!0}var h=function(d){o(p,d);function p(){return d!==null&&d.apply(this,arguments)||this}return p.formats=function(c){if(c.tagName!==p.tagName)return d.formats.call(this,c)},p.prototype.format=function(c,v){var y=this;c===this.statics.blotName&&!v?(this.children.forEach(function(_){_ instanceof a.default||(_=_.wrap(p.blotName,!0)),y.attributes.copy(_)}),this.unwrap()):d.prototype.format.call(this,c,v)},p.prototype.formatAt=function(c,v,y,_){if(this.formats()[y]!=null||u.query(y,u.Scope.ATTRIBUTE)){var b=this.isolate(c,v);b.format(y,_)}else d.prototype.formatAt.call(this,c,v,y,_)},p.prototype.optimize=function(c){d.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var y=this.next;y instanceof p&&y.prev===this&&f(v,y.formats())&&(y.moveChildren(this),y.remove())},p.blotName="inline",p.scope=u.Scope.INLINE_BLOT,p.tagName="SPAN",p}(a.default);n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(18),u=i(1),f=function(h){o(d,h);function d(){return h!==null&&h.apply(this,arguments)||this}return d.formats=function(p){var c=u.query(d.blotName).tagName;if(p.tagName!==c)return h.formats.call(this,p)},d.prototype.format=function(p,c){u.query(p,u.Scope.BLOCK)!=null&&(p===this.statics.blotName&&!c?this.replaceWith(d.blotName):h.prototype.format.call(this,p,c))},d.prototype.formatAt=function(p,c,v,y){u.query(v,u.Scope.BLOCK)!=null?this.format(v,y):h.prototype.formatAt.call(this,p,c,v,y)},d.prototype.insertAt=function(p,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,p,c,v);else{var y=this.split(p),_=u.create(c,v);y.parent.insertBefore(_,y)}},d.prototype.update=function(p,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,p,c)},d.blotName="block",d.scope=u.Scope.BLOCK_BLOT,d.tagName="P",d}(a.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var p in d)d.hasOwnProperty(p)&&(h[p]=d[p])};return function(h,d){f(h,d);function p(){this.constructor=h}h.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=function(f){o(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(d){},h.prototype.format=function(d,p){f.prototype.formatAt.call(this,0,this.length(),d,p)},h.prototype.formatAt=function(d,p,c,v){d===0&&p===this.length()?this.format(c,v):f.prototype.formatAt.call(this,d,p,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(a.default);n.default=u},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var c in p)p.hasOwnProperty(c)&&(d[c]=p[c])};return function(d,p){h(d,p);function c(){this.constructor=d}d.prototype=p===null?Object.create(p):(c.prototype=p.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var a=i(19),u=i(1),f=function(h){o(d,h);function d(p){var c=h.call(this,p)||this;return c.text=c.statics.value(c.domNode),c}return d.create=function(p){return document.createTextNode(p)},d.value=function(p){var c=p.data;return c.normalize&&(c=c.normalize()),c},d.prototype.deleteAt=function(p,c){this.domNode.data=this.text=this.text.slice(0,p)+this.text.slice(p+c)},d.prototype.index=function(p,c){return this.domNode===p?c:-1},d.prototype.insertAt=function(p,c,v){v==null?(this.text=this.text.slice(0,p)+c+this.text.slice(p),this.domNode.data=this.text):h.prototype.insertAt.call(this,p,c,v)},d.prototype.length=function(){return this.text.length},d.prototype.optimize=function(p){h.prototype.optimize.call(this,p),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof d&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},d.prototype.position=function(p,c){return[this.domNode,p]},d.prototype.split=function(p,c){if(c===void 0&&(c=!1),!c){if(p===0)return this;if(p===this.length())return this.next}var v=u.create(this.domNode.splitText(p));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},d.prototype.update=function(p,c){var v=this;p.some(function(y){return y.type==="characterData"&&y.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},d.prototype.value=function(){return this.text},d.blotName="text",d.scope=u.Scope.INLINE_BLOT,d}(a.default);n.default=f},function(r,n,i){var o=document.createElement("div");if(o.classList.toggle("test-class",!1),o.classList.contains("test-class")){var a=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:a.call(this,u)}}String.prototype.startsWith||(String.prototype.startsWith=function(u,f){return f=f||0,this.substr(f,u.length)===u}),String.prototype.endsWith||(String.prototype.endsWith=function(u,f){var h=this.toString();(typeof f!="number"||!isFinite(f)||Math.floor(f)!==f||f>h.length)&&(f=h.length),f-=u.length;var d=h.indexOf(u,f);return d!==-1&&d===f}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(f){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof f!="function")throw new TypeError("predicate must be a function");for(var h=Object(this),d=h.length>>>0,p=arguments[1],c,v=0;v<d;v++)if(c=h[v],f.call(p,c,v,h))return c}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})},function(r,n){var i=-1,o=1,a=0;function u(x,E,I){if(x==E)return x?[[a,x]]:[];(I<0||x.length<I)&&(I=null);var O=p(x,E),A=x.substring(0,O);x=x.substring(O),E=E.substring(O),O=c(x,E);var L=x.substring(x.length-O);x=x.substring(0,x.length-O),E=E.substring(0,E.length-O);var R=f(x,E);return A&&R.unshift([a,A]),L&&R.push([a,L]),y(R),I!=null&&(R=m(R,I)),R=w(R),R}function f(x,E){var I;if(!x)return[[o,E]];if(!E)return[[i,x]];var O=x.length>E.length?x:E,A=x.length>E.length?E:x,L=O.indexOf(A);if(L!=-1)return I=[[o,O.substring(0,L)],[a,A],[o,O.substring(L+A.length)]],x.length>E.length&&(I[0][0]=I[2][0]=i),I;if(A.length==1)return[[i,x],[o,E]];var R=v(x,E);if(R){var C=R[0],P=R[1],M=R[2],F=R[3],q=R[4],Z=u(C,M),z=u(P,F);return Z.concat([[a,q]],z)}return h(x,E)}function h(x,E){for(var I=x.length,O=E.length,A=Math.ceil((I+O)/2),L=A,R=2*A,C=new Array(R),P=new Array(R),M=0;M<R;M++)C[M]=-1,P[M]=-1;C[L+1]=0,P[L+1]=0;for(var F=I-O,q=F%2!=0,Z=0,z=0,nt=0,V=0,D=0;D<A;D++){for(var k=-D+Z;k<=D-z;k+=2){var G=L+k,j;k==-D||k!=D&&C[G-1]<C[G+1]?j=C[G+1]:j=C[G-1]+1;for(var Q=j-k;j<I&&Q<O&&x.charAt(j)==E.charAt(Q);)j++,Q++;if(C[G]=j,j>I)z+=2;else if(Q>O)Z+=2;else if(q){var K=L+F-k;if(K>=0&&K<R&&P[K]!=-1){var $=I-P[K];if(j>=$)return d(x,E,j,Q)}}}for(var W=-D+nt;W<=D-V;W+=2){var K=L+W,$;W==-D||W!=D&&P[K-1]<P[K+1]?$=P[K+1]:$=P[K-1]+1;for(var et=$-W;$<I&&et<O&&x.charAt(I-$-1)==E.charAt(O-et-1);)$++,et++;if(P[K]=$,$>I)V+=2;else if(et>O)nt+=2;else if(!q){var G=L+F-W;if(G>=0&&G<R&&C[G]!=-1){var j=C[G],Q=L+j-G;if($=I-$,j>=$)return d(x,E,j,Q)}}}}return[[i,x],[o,E]]}function d(x,E,I,O){var A=x.substring(0,I),L=E.substring(0,O),R=x.substring(I),C=E.substring(O),P=u(A,L),M=u(R,C);return P.concat(M)}function p(x,E){if(!x||!E||x.charAt(0)!=E.charAt(0))return 0;for(var I=0,O=Math.min(x.length,E.length),A=O,L=0;I<A;)x.substring(L,A)==E.substring(L,A)?(I=A,L=I):O=A,A=Math.floor((O-I)/2+I);return A}function c(x,E){if(!x||!E||x.charAt(x.length-1)!=E.charAt(E.length-1))return 0;for(var I=0,O=Math.min(x.length,E.length),A=O,L=0;I<A;)x.substring(x.length-A,x.length-L)==E.substring(E.length-A,E.length-L)?(I=A,L=I):O=A,A=Math.floor((O-I)/2+I);return A}function v(x,E){var I=x.length>E.length?x:E,O=x.length>E.length?E:x;if(I.length<4||O.length*2<I.length)return null;function A(z,nt,V){for(var D=z.substring(V,V+Math.floor(z.length/4)),k=-1,G="",j,Q,K,$;(k=nt.indexOf(D,k+1))!=-1;){var W=p(z.substring(V),nt.substring(k)),et=c(z.substring(0,V),nt.substring(0,k));G.length<et+W&&(G=nt.substring(k-et,k)+nt.substring(k,k+W),j=z.substring(0,V-et),Q=z.substring(V+W),K=nt.substring(0,k-et),$=nt.substring(k+W))}return G.length*2>=z.length?[j,Q,K,$,G]:null}var L=A(I,O,Math.ceil(I.length/4)),R=A(I,O,Math.ceil(I.length/2)),C;if(!L&&!R)return null;R?L?C=L[4].length>R[4].length?L:R:C=R:C=L;var P,M,F,q;x.length>E.length?(P=C[0],M=C[1],F=C[2],q=C[3]):(F=C[0],q=C[1],P=C[2],M=C[3]);var Z=C[4];return[P,M,F,q,Z]}function y(x){x.push([a,""]);for(var E=0,I=0,O=0,A="",L="",R;E<x.length;)switch(x[E][0]){case o:O++,L+=x[E][1],E++;break;case i:I++,A+=x[E][1],E++;break;case a:I+O>1?(I!==0&&O!==0&&(R=p(L,A),R!==0&&(E-I-O>0&&x[E-I-O-1][0]==a?x[E-I-O-1][1]+=L.substring(0,R):(x.splice(0,0,[a,L.substring(0,R)]),E++),L=L.substring(R),A=A.substring(R)),R=c(L,A),R!==0&&(x[E][1]=L.substring(L.length-R)+x[E][1],L=L.substring(0,L.length-R),A=A.substring(0,A.length-R))),I===0?x.splice(E-O,I+O,[o,L]):O===0?x.splice(E-I,I+O,[i,A]):x.splice(E-I-O,I+O,[i,A],[o,L]),E=E-I-O+(I?1:0)+(O?1:0)+1):E!==0&&x[E-1][0]==a?(x[E-1][1]+=x[E][1],x.splice(E,1)):E++,O=0,I=0,A="",L="";break}x[x.length-1][1]===""&&x.pop();var C=!1;for(E=1;E<x.length-1;)x[E-1][0]==a&&x[E+1][0]==a&&(x[E][1].substring(x[E][1].length-x[E-1][1].length)==x[E-1][1]?(x[E][1]=x[E-1][1]+x[E][1].substring(0,x[E][1].length-x[E-1][1].length),x[E+1][1]=x[E-1][1]+x[E+1][1],x.splice(E-1,1),C=!0):x[E][1].substring(0,x[E+1][1].length)==x[E+1][1]&&(x[E-1][1]+=x[E+1][1],x[E][1]=x[E][1].substring(x[E+1][1].length)+x[E+1][1],x.splice(E+1,1),C=!0)),E++;C&&y(x)}var _=u;_.INSERT=o,_.DELETE=i,_.EQUAL=a,r.exports=_;function b(x,E){if(E===0)return[a,x];for(var I=0,O=0;O<x.length;O++){var A=x[O];if(A[0]===i||A[0]===a){var L=I+A[1].length;if(E===L)return[O+1,x];if(E<L){x=x.slice();var R=E-I,C=[A[0],A[1].slice(0,R)],P=[A[0],A[1].slice(R)];return x.splice(O,1,C,P),[O+1,x]}else I=L}}throw new Error("cursor_pos is out of bounds!")}function m(x,E){var I=b(x,E),O=I[1],A=I[0],L=O[A],R=O[A+1];if(L==null)return x;if(L[0]!==a)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return O.splice(A,2,R,L),T(O,A,2);if(R!=null&&R[1].indexOf(L[1])===0){O.splice(A,2,[R[0],L[1]],[0,L[1]]);var C=R[1].slice(L[1].length);return C.length>0&&O.splice(A+2,0,[R[0],C]),T(O,A,3)}else return x}function w(x){for(var E=!1,I=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},O=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},A=2;A<x.length;A+=1)x[A-2][0]===a&&O(x[A-2][1])&&x[A-1][0]===i&&I(x[A-1][1])&&x[A][0]===o&&I(x[A][1])&&(E=!0,x[A-1][1]=x[A-2][1].slice(-1)+x[A-1][1],x[A][1]=x[A-2][1].slice(-1)+x[A][1],x[A-2][1]=x[A-2][1].slice(0,-1));if(!E)return x;for(var L=[],A=0;A<x.length;A+=1)x[A][1].length>0&&L.push(x[A]);return L}function T(x,E,I){for(var O=E+I-1;O>=0&&O>=E-1;O--)if(O+1<x.length){var A=x[O],L=x[O+1];A[0]===L[1]&&x.splice(O,2,[A[0],A[1]+L[1]])}return x}},function(r,n){n=r.exports=typeof Object.keys=="function"?Object.keys:i,n.shim=i;function i(o){var a=[];for(var u in o)a.push(u);return a}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?o:a,n.supported=o;function o(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=a;function a(u){return u&&typeof u=="object"&&typeof u.length=="number"&&Object.prototype.hasOwnProperty.call(u,"callee")&&!Object.prototype.propertyIsEnumerable.call(u,"callee")||!1}},function(r,n){var i=Object.prototype.hasOwnProperty,o="~";function a(){}Object.create&&(a.prototype=Object.create(null),new a().__proto__||(o=!1));function u(h,d,p){this.fn=h,this.context=d,this.once=p||!1}function f(){this._events=new a,this._eventsCount=0}f.prototype.eventNames=function(){var d=[],p,c;if(this._eventsCount===0)return d;for(c in p=this._events)i.call(p,c)&&d.push(o?c.slice(1):c);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(p)):d},f.prototype.listeners=function(d,p){var c=o?o+d:d,v=this._events[c];if(p)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var y=0,_=v.length,b=new Array(_);y<_;y++)b[y]=v[y].fn;return b},f.prototype.emit=function(d,p,c,v,y,_){var b=o?o+d:d;if(!this._events[b])return!1;var m=this._events[b],w=arguments.length,T,x;if(m.fn){switch(m.once&&this.removeListener(d,m.fn,void 0,!0),w){case 1:return m.fn.call(m.context),!0;case 2:return m.fn.call(m.context,p),!0;case 3:return m.fn.call(m.context,p,c),!0;case 4:return m.fn.call(m.context,p,c,v),!0;case 5:return m.fn.call(m.context,p,c,v,y),!0;case 6:return m.fn.call(m.context,p,c,v,y,_),!0}for(x=1,T=new Array(w-1);x<w;x++)T[x-1]=arguments[x];m.fn.apply(m.context,T)}else{var E=m.length,I;for(x=0;x<E;x++)switch(m[x].once&&this.removeListener(d,m[x].fn,void 0,!0),w){case 1:m[x].fn.call(m[x].context);break;case 2:m[x].fn.call(m[x].context,p);break;case 3:m[x].fn.call(m[x].context,p,c);break;case 4:m[x].fn.call(m[x].context,p,c,v);break;default:if(!T)for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];m[x].fn.apply(m[x].context,T)}}return!0},f.prototype.on=function(d,p,c){var v=new u(p,c||this),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.once=function(d,p,c){var v=new u(p,c||this,!0),y=o?o+d:d;return this._events[y]?this._events[y].fn?this._events[y]=[this._events[y],v]:this._events[y].push(v):(this._events[y]=v,this._eventsCount++),this},f.prototype.removeListener=function(d,p,c,v){var y=o?o+d:d;if(!this._events[y])return this;if(!p)return--this._eventsCount===0?this._events=new a:delete this._events[y],this;var _=this._events[y];if(_.fn)_.fn===p&&(!v||_.once)&&(!c||_.context===c)&&(--this._eventsCount===0?this._events=new a:delete this._events[y]);else{for(var b=0,m=[],w=_.length;b<w;b++)(_[b].fn!==p||v&&!_[b].once||c&&_[b].context!==c)&&m.push(_[b]);m.length?this._events[y]=m.length===1?m[0]:m:--this._eventsCount===0?this._events=new a:delete this._events[y]}return this},f.prototype.removeAllListeners=function(d){var p;return d?(p=o?o+d:d,this._events[p]&&(--this._eventsCount===0?this._events=new a:delete this._events[p])):(this._events=new a,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prototype.setMaxListeners=function(){return this},f.prefixed=o,f.EventEmitter=f,typeof r<"u"&&(r.exports=f)},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.matchText=n.matchSpacing=n.matchNewline=n.matchBlot=n.matchAttributor=n.default=void 0;var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(it){return typeof it}:function(it){return it&&typeof Symbol=="function"&&it.constructor===Symbol&&it!==Symbol.prototype?"symbol":typeof it},a=function(){function it(ut,dt){var gt=[],at=!0,It=!1,St=void 0;try{for(var Mt=ut[Symbol.iterator](),He;!(at=(He=Mt.next()).done)&&(gt.push(He.value),!(dt&&gt.length===dt));at=!0);}catch(Ge){It=!0,St=Ge}finally{try{!at&&Mt.return&&Mt.return()}finally{if(It)throw St}}return gt}return function(ut,dt){if(Array.isArray(ut))return ut;if(Symbol.iterator in Object(ut))return it(ut,dt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function it(ut,dt){for(var gt=0;gt<dt.length;gt++){var at=dt[gt];at.enumerable=at.enumerable||!1,at.configurable=!0,"value"in at&&(at.writable=!0),Object.defineProperty(ut,at.key,at)}}return function(ut,dt,gt){return dt&&it(ut.prototype,dt),gt&&it(ut,gt),ut}}(),f=i(3),h=P(f),d=i(2),p=P(d),c=i(0),v=P(c),y=i(5),_=P(y),b=i(10),m=P(b),w=i(9),T=P(w),x=i(36),E=i(37),I=i(13),O=P(I),A=i(26),L=i(38),R=i(39),C=i(40);function P(it){return it&&it.__esModule?it:{default:it}}function M(it,ut,dt){return ut in it?Object.defineProperty(it,ut,{value:dt,enumerable:!0,configurable:!0,writable:!0}):it[ut]=dt,it}function F(it,ut){if(!(it instanceof ut))throw new TypeError("Cannot call a class as a function")}function q(it,ut){if(!it)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ut&&(typeof ut=="object"||typeof ut=="function")?ut:it}function Z(it,ut){if(typeof ut!="function"&&ut!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof ut);it.prototype=Object.create(ut&&ut.prototype,{constructor:{value:it,enumerable:!1,writable:!0,configurable:!0}}),ut&&(Object.setPrototypeOf?Object.setPrototypeOf(it,ut):it.__proto__=ut)}var z=(0,m.default)("quill:clipboard"),nt="__ql-matcher",V=[[Node.TEXT_NODE,Ut],[Node.TEXT_NODE,_t],["br",ot],[Node.ELEMENT_NODE,_t],[Node.ELEMENT_NODE,rt],[Node.ELEMENT_NODE,At],[Node.ELEMENT_NODE,Y],[Node.ELEMENT_NODE,ne],["li",vt],["b",et.bind(et,"bold")],["i",et.bind(et,"italic")],["style",pt]],D=[x.AlignAttribute,L.DirectionAttribute].reduce(function(it,ut){return it[ut.keyName]=ut,it},{}),k=[x.AlignStyle,E.BackgroundStyle,A.ColorStyle,L.DirectionStyle,R.FontStyle,C.SizeStyle].reduce(function(it,ut){return it[ut.keyName]=ut,it},{}),G=function(it){Z(ut,it);function ut(dt,gt){F(this,ut);var at=q(this,(ut.__proto__||Object.getPrototypeOf(ut)).call(this,dt,gt));return at.quill.root.addEventListener("paste",at.onPaste.bind(at)),at.container=at.quill.addContainer("ql-clipboard"),at.container.setAttribute("contenteditable",!0),at.container.setAttribute("tabindex",-1),at.matchers=[],V.concat(at.options.matchers).forEach(function(It){var St=a(It,2),Mt=St[0],He=St[1];!gt.matchVisual&&He===At||at.addMatcher(Mt,He)}),at}return u(ut,[{key:"addMatcher",value:function(gt,at){this.matchers.push([gt,at])}},{key:"convert",value:function(gt){if(typeof gt=="string")return this.container.innerHTML=gt.replace(/\>\r?\n +\</g,"><"),this.convert();var at=this.quill.getFormat(this.quill.selection.savedRange.index);if(at[O.default.blotName]){var It=this.container.innerText;return this.container.innerHTML="",new p.default().insert(It,M({},O.default.blotName,at[O.default.blotName]))}var St=this.prepareMatching(),Mt=a(St,2),He=Mt[0],Ge=Mt[1],Qt=W(this.container,He,Ge);return K(Qt,`
1992
- `)&&Qt.ops[Qt.ops.length-1].attributes==null&&(Qt=Qt.compose(new p.default().retain(Qt.length()-1).delete(1))),z.log("convert",this.container.innerHTML,Qt),this.container.innerHTML="",Qt}},{key:"dangerouslyPasteHTML",value:function(gt,at){var It=arguments.length>2&&arguments[2]!==void 0?arguments[2]:_.default.sources.API;if(typeof gt=="string")this.quill.setContents(this.convert(gt),at),this.quill.setSelection(0,_.default.sources.SILENT);else{var St=this.convert(at);this.quill.updateContents(new p.default().retain(gt).concat(St),It),this.quill.setSelection(gt+St.length(),_.default.sources.SILENT)}}},{key:"onPaste",value:function(gt){var at=this;if(!(gt.defaultPrevented||!this.quill.isEnabled())){var It=this.quill.getSelection(),St=new p.default().retain(It.index),Mt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(_.default.sources.SILENT),setTimeout(function(){St=St.concat(at.convert()).delete(It.length),at.quill.updateContents(St,_.default.sources.USER),at.quill.setSelection(St.length()-It.length,_.default.sources.SILENT),at.quill.scrollingContainer.scrollTop=Mt,at.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var gt=this,at=[],It=[];return this.matchers.forEach(function(St){var Mt=a(St,2),He=Mt[0],Ge=Mt[1];switch(He){case Node.TEXT_NODE:It.push(Ge);break;case Node.ELEMENT_NODE:at.push(Ge);break;default:[].forEach.call(gt.container.querySelectorAll(He),function(Qt){Qt[nt]=Qt[nt]||[],Qt[nt].push(Ge)});break}}),[at,It]}}]),ut}(T.default);G.DEFAULTS={matchers:[],matchVisual:!0};function j(it,ut,dt){return(typeof ut>"u"?"undefined":o(ut))==="object"?Object.keys(ut).reduce(function(gt,at){return j(gt,at,ut[at])},it):it.reduce(function(gt,at){return at.attributes&&at.attributes[ut]?gt.push(at):gt.insert(at.insert,(0,h.default)({},M({},ut,dt),at.attributes))},new p.default)}function Q(it){if(it.nodeType!==Node.ELEMENT_NODE)return{};var ut="__ql-computed-style";return it[ut]||(it[ut]=window.getComputedStyle(it))}function K(it,ut){for(var dt="",gt=it.ops.length-1;gt>=0&&dt.length<ut.length;--gt){var at=it.ops[gt];if(typeof at.insert!="string")break;dt=at.insert+dt}return dt.slice(-1*ut.length)===ut}function $(it){if(it.childNodes.length===0)return!1;var ut=Q(it);return["block","list-item"].indexOf(ut.display)>-1}function W(it,ut,dt){return it.nodeType===it.TEXT_NODE?dt.reduce(function(gt,at){return at(it,gt)},new p.default):it.nodeType===it.ELEMENT_NODE?[].reduce.call(it.childNodes||[],function(gt,at){var It=W(at,ut,dt);return at.nodeType===it.ELEMENT_NODE&&(It=ut.reduce(function(St,Mt){return Mt(at,St)},It),It=(at[nt]||[]).reduce(function(St,Mt){return Mt(at,St)},It)),gt.concat(It)},new p.default):new p.default}function et(it,ut,dt){return j(dt,it,!0)}function Y(it,ut){var dt=v.default.Attributor.Attribute.keys(it),gt=v.default.Attributor.Class.keys(it),at=v.default.Attributor.Style.keys(it),It={};return dt.concat(gt).concat(at).forEach(function(St){var Mt=v.default.query(St,v.default.Scope.ATTRIBUTE);Mt!=null&&(It[Mt.attrName]=Mt.value(it),It[Mt.attrName])||(Mt=D[St],Mt!=null&&(Mt.attrName===St||Mt.keyName===St)&&(It[Mt.attrName]=Mt.value(it)||void 0),Mt=k[St],Mt!=null&&(Mt.attrName===St||Mt.keyName===St)&&(Mt=k[St],It[Mt.attrName]=Mt.value(it)||void 0))}),Object.keys(It).length>0&&(ut=j(ut,It)),ut}function rt(it,ut){var dt=v.default.query(it);if(dt==null)return ut;if(dt.prototype instanceof v.default.Embed){var gt={},at=dt.value(it);at!=null&&(gt[dt.blotName]=at,ut=new p.default().insert(gt,dt.formats(it)))}else typeof dt.formats=="function"&&(ut=j(ut,dt.blotName,dt.formats(it)));return ut}function ot(it,ut){return K(ut,`
1993
- `)||ut.insert(`
1994
- `),ut}function pt(){return new p.default}function vt(it,ut){var dt=v.default.query(it);if(dt==null||dt.blotName!=="list-item"||!K(ut,`
1995
- `))return ut;for(var gt=-1,at=it.parentNode;!at.classList.contains("ql-clipboard");)(v.default.query(at)||{}).blotName==="list"&&(gt+=1),at=at.parentNode;return gt<=0?ut:ut.compose(new p.default().retain(ut.length()-1).retain(1,{indent:gt}))}function _t(it,ut){return K(ut,`
1996
- `)||($(it)||ut.length()>0&&it.nextSibling&&$(it.nextSibling))&&ut.insert(`
1997
- `),ut}function At(it,ut){if($(it)&&it.nextElementSibling!=null&&!K(ut,`
1998
-
1999
- `)){var dt=it.offsetHeight+parseFloat(Q(it).marginTop)+parseFloat(Q(it).marginBottom);it.nextElementSibling.offsetTop>it.offsetTop+dt*1.5&&ut.insert(`
2000
- `)}return ut}function ne(it,ut){var dt={},gt=it.style||{};return gt.fontStyle&&Q(it).fontStyle==="italic"&&(dt.italic=!0),gt.fontWeight&&(Q(it).fontWeight.startsWith("bold")||parseInt(Q(it).fontWeight)>=700)&&(dt.bold=!0),Object.keys(dt).length>0&&(ut=j(ut,dt)),parseFloat(gt.textIndent||0)>0&&(ut=new p.default().insert(" ").concat(ut)),ut}function Ut(it,ut){var dt=it.data;if(it.parentNode.tagName==="O:P")return ut.insert(dt.trim());if(dt.trim().length===0&&it.parentNode.classList.contains("ql-clipboard"))return ut;if(!Q(it.parentNode).whiteSpace.startsWith("pre")){var gt=function(It,St){return St=St.replace(/[^\u00a0]/g,""),St.length<1&&It?" ":St};dt=dt.replace(/\r\n/g," ").replace(/\n/g," "),dt=dt.replace(/\s\s+/g,gt.bind(gt,!0)),(it.previousSibling==null&&$(it.parentNode)||it.previousSibling!=null&&$(it.previousSibling))&&(dt=dt.replace(/^\s+/,gt.bind(gt,!1))),(it.nextSibling==null&&$(it.parentNode)||it.nextSibling!=null&&$(it.nextSibling))&&(dt=dt.replace(/\s+$/,gt.bind(gt,!1)))}return ut.insert(dt)}n.default=G,n.matchAttributor=Y,n.matchBlot=rt,n.matchNewline=_t,n.matchSpacing=At,n.matchText=Ut},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"optimize",value:function(m){a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,m),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return a(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),_}(f.default);v.blotName="bold",v.tagName=["STRONG","B"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.addControls=n.default=void 0;var o=function(){function C(P,M){var F=[],q=!0,Z=!1,z=void 0;try{for(var nt=P[Symbol.iterator](),V;!(q=(V=nt.next()).done)&&(F.push(V.value),!(M&&F.length===M));q=!0);}catch(D){Z=!0,z=D}finally{try{!q&&nt.return&&nt.return()}finally{if(Z)throw z}}return F}return function(P,M){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return C(P,M);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function C(P,M){for(var F=0;F<M.length;F++){var q=M[F];q.enumerable=q.enumerable||!1,q.configurable=!0,"value"in q&&(q.writable=!0),Object.defineProperty(P,q.key,q)}}return function(P,M,F){return M&&C(P.prototype,M),F&&C(P,F),P}}(),u=i(2),f=m(u),h=i(0),d=m(h),p=i(5),c=m(p),v=i(10),y=m(v),_=i(9),b=m(_);function m(C){return C&&C.__esModule?C:{default:C}}function w(C,P,M){return P in C?Object.defineProperty(C,P,{value:M,enumerable:!0,configurable:!0,writable:!0}):C[P]=M,C}function T(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function x(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function E(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var I=(0,y.default)("quill:toolbar"),O=function(C){E(P,C);function P(M,F){T(this,P);var q=x(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,M,F));if(Array.isArray(q.options.container)){var Z=document.createElement("div");L(Z,q.options.container),M.container.parentNode.insertBefore(Z,M.container),q.container=Z}else typeof q.options.container=="string"?q.container=document.querySelector(q.options.container):q.container=q.options.container;if(!(q.container instanceof HTMLElement)){var z;return z=I.error("Container required for toolbar",q.options),x(q,z)}return q.container.classList.add("ql-toolbar"),q.controls=[],q.handlers={},Object.keys(q.options.handlers).forEach(function(nt){q.addHandler(nt,q.options.handlers[nt])}),[].forEach.call(q.container.querySelectorAll("button, select"),function(nt){q.attach(nt)}),q.quill.on(c.default.events.EDITOR_CHANGE,function(nt,V){nt===c.default.events.SELECTION_CHANGE&&q.update(V)}),q.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var nt=q.quill.selection.getRange(),V=o(nt,1),D=V[0];q.update(D)}),q}return a(P,[{key:"addHandler",value:function(F,q){this.handlers[F]=q}},{key:"attach",value:function(F){var q=this,Z=[].find.call(F.classList,function(nt){return nt.indexOf("ql-")===0});if(Z){if(Z=Z.slice(3),F.tagName==="BUTTON"&&F.setAttribute("type","button"),this.handlers[Z]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[Z]==null){I.warn("ignoring attaching to disabled format",Z,F);return}if(d.default.query(Z)==null){I.warn("ignoring attaching to nonexistent format",Z,F);return}}var z=F.tagName==="SELECT"?"change":"click";F.addEventListener(z,function(nt){var V=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var D=F.options[F.selectedIndex];D.hasAttribute("selected")?V=!1:V=D.value||!1}else F.classList.contains("ql-active")?V=!1:V=F.value||!F.hasAttribute("value"),nt.preventDefault();q.quill.focus();var k=q.quill.selection.getRange(),G=o(k,1),j=G[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,V);else if(d.default.query(Z).prototype instanceof d.default.Embed){if(V=prompt("Enter "+Z),!V)return;q.quill.updateContents(new f.default().retain(j.index).delete(j.length).insert(w({},Z,V)),c.default.sources.USER)}else q.quill.format(Z,V,c.default.sources.USER);q.update(j)}),this.controls.push([Z,F])}}},{key:"update",value:function(F){var q=F==null?{}:this.quill.getFormat(F);this.controls.forEach(function(Z){var z=o(Z,2),nt=z[0],V=z[1];if(V.tagName==="SELECT"){var D=void 0;if(F==null)D=null;else if(q[nt]==null)D=V.querySelector("option[selected]");else if(!Array.isArray(q[nt])){var k=q[nt];typeof k=="string"&&(k=k.replace(/\"/g,'\\"')),D=V.querySelector('option[value="'+k+'"]')}D==null?(V.value="",V.selectedIndex=-1):D.selected=!0}else if(F==null)V.classList.remove("ql-active");else if(V.hasAttribute("value")){var G=q[nt]===V.getAttribute("value")||q[nt]!=null&&q[nt].toString()===V.getAttribute("value")||q[nt]==null&&!V.getAttribute("value");V.classList.toggle("ql-active",G)}else V.classList.toggle("ql-active",q[nt]!=null)})}}]),P}(b.default);O.DEFAULTS={};function A(C,P,M){var F=document.createElement("button");F.setAttribute("type","button"),F.classList.add("ql-"+P),M!=null&&(F.value=M),C.appendChild(F)}function L(C,P){Array.isArray(P[0])||(P=[P]),P.forEach(function(M){var F=document.createElement("span");F.classList.add("ql-formats"),M.forEach(function(q){if(typeof q=="string")A(F,q);else{var Z=Object.keys(q)[0],z=q[Z];Array.isArray(z)?R(F,Z,z):A(F,Z,z)}}),C.appendChild(F)})}function R(C,P,M){var F=document.createElement("select");F.classList.add("ql-"+P),M.forEach(function(q){var Z=document.createElement("option");q!==!1?Z.setAttribute("value",q):Z.setAttribute("selected","selected"),F.appendChild(Z)}),C.appendChild(F)}O.DEFAULTS={container:null,handlers:{clean:function(){var P=this,M=this.quill.getSelection();if(M!=null)if(M.length==0){var F=this.quill.getFormat();Object.keys(F).forEach(function(q){d.default.query(q,d.default.Scope.INLINE)!=null&&P.quill.format(q,!1)})}else this.quill.removeFormat(M,c.default.sources.USER)},direction:function(P){var M=this.quill.getFormat().align;P==="rtl"&&M==null?this.quill.format("align","right",c.default.sources.USER):!P&&M==="right"&&this.quill.format("align",!1,c.default.sources.USER),this.quill.format("direction",P,c.default.sources.USER)},indent:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M),q=parseInt(F.indent||0);if(P==="+1"||P==="-1"){var Z=P==="+1"?1:-1;F.direction==="rtl"&&(Z*=-1),this.quill.format("indent",q+Z,c.default.sources.USER)}},link:function(P){P===!0&&(P=prompt("Enter link URL:")),this.quill.format("link",P,c.default.sources.USER)},list:function(P){var M=this.quill.getSelection(),F=this.quill.getFormat(M);P==="check"?F.list==="checked"||F.list==="unchecked"?this.quill.format("list",!1,c.default.sources.USER):this.quill.format("list","unchecked",c.default.sources.USER):this.quill.format("list",P,c.default.sources.USER)}}},n.default=O,n.addControls=L},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(b,m){d(this,_);var w=p(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,b));return w.label.innerHTML=m,w.container.classList.add("ql-color-picker"),[].slice.call(w.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(T){T.classList.add("ql-primary")}),w}return o(_,[{key:"buildItem",value:function(m){var w=a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"buildItem",this).call(this,m);return w.style.backgroundColor=m.getAttribute("value")||"",w}},{key:"selectItem",value:function(m,w){a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,m,w);var T=this.label.querySelector(".ql-color-label"),x=m&&m.getAttribute("data-value")||"";T&&(T.tagName==="line"?T.style.stroke=x:T.style.fill=x)}}]),_}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(28),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(b,m){d(this,_);var w=p(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,b));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(T){T.innerHTML=m[T.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return o(_,[{key:"selectItem",value:function(m,w){a(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"selectItem",this).call(this,m,w),m=m||this.defaultItem,this.label.innerHTML=m.innerHTML}}]),_}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,d){for(var p=0;p<d.length;p++){var c=d[p];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,d,p){return d&&f(h.prototype,d),p&&f(h,p),h}}();function a(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,d){var p=this;a(this,f),this.quill=h,this.boundsContainer=d||document.body,this.root=h.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){p.root.style.marginTop=-1*p.quill.root.scrollTop+"px"}),this.hide()}return o(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(d){var p=d.left+d.width/2-this.root.offsetWidth/2,c=d.bottom+this.quill.root.scrollTop;this.root.style.left=p+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),y=this.root.getBoundingClientRect(),_=0;if(y.right>v.right&&(_=v.right-y.right,this.root.style.left=p+_+"px"),y.left<v.left&&(_=v.left-y.left,this.root.style.left=p+_+"px"),y.bottom>v.bottom){var b=y.bottom-y.top,m=d.bottom-d.top+b;this.root.style.top=c-m+"px",this.root.classList.add("ql-flip")}return _}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),f}();n.default=u},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function R(C,P){var M=[],F=!0,q=!1,Z=void 0;try{for(var z=C[Symbol.iterator](),nt;!(F=(nt=z.next()).done)&&(M.push(nt.value),!(P&&M.length===P));F=!0);}catch(V){q=!0,Z=V}finally{try{!F&&z.return&&z.return()}finally{if(q)throw Z}}return M}return function(C,P){if(Array.isArray(C))return C;if(Symbol.iterator in Object(C))return R(C,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function R(C,P,M){C===null&&(C=Function.prototype);var F=Object.getOwnPropertyDescriptor(C,P);if(F===void 0){var q=Object.getPrototypeOf(C);return q===null?void 0:R(q,P,M)}else{if("value"in F)return F.value;var Z=F.get;return Z===void 0?void 0:Z.call(M)}},u=function(){function R(C,P){for(var M=0;M<P.length;M++){var F=P[M];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(C,F.key,F)}}return function(C,P,M){return P&&R(C.prototype,P),M&&R(C,M),C}}(),f=i(3),h=T(f),d=i(8),p=T(d),c=i(43),v=T(c),y=i(27),_=T(y),b=i(15),m=i(41),w=T(m);function T(R){return R&&R.__esModule?R:{default:R}}function x(R,C){if(!(R instanceof C))throw new TypeError("Cannot call a class as a function")}function E(R,C){if(!R)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:R}function I(R,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);R.prototype=Object.create(C&&C.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(R,C):R.__proto__=C)}var O=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],A=function(R){I(C,R);function C(P,M){x(this,C),M.modules.toolbar!=null&&M.modules.toolbar.container==null&&(M.modules.toolbar.container=O);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.quill.container.classList.add("ql-snow"),F}return u(C,[{key:"extendToolbar",value:function(M){M.container.classList.add("ql-snow"),this.buildButtons([].slice.call(M.container.querySelectorAll("button")),w.default),this.buildPickers([].slice.call(M.container.querySelectorAll("select")),w.default),this.tooltip=new L(this.quill,this.options.bounds),M.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(F,q){M.handlers.link.call(M,!q.format.link)})}}]),C}(v.default);A.DEFAULTS=(0,h.default)(!0,{},v.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(C){if(C){var P=this.quill.getSelection();if(P==null||P.length==0)return;var M=this.quill.getText(P);/^\S+@\S+\.\S+$/.test(M)&&M.indexOf("mailto:")!==0&&(M="mailto:"+M);var F=this.quill.theme.tooltip;F.edit("link",M)}else this.quill.format("link",!1)}}}}});var L=function(R){I(C,R);function C(P,M){x(this,C);var F=E(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,M));return F.preview=F.root.querySelector("a.ql-preview"),F}return u(C,[{key:"listen",value:function(){var M=this;a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(F){M.root.classList.contains("ql-editing")?M.save():M.edit("link",M.preview.textContent),F.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(F){if(M.linkRange!=null){var q=M.linkRange;M.restoreFocus(),M.quill.formatText(q,"link",!1,p.default.sources.USER),delete M.linkRange}F.preventDefault(),M.hide()}),this.quill.on(p.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===p.default.sources.USER){var z=M.quill.scroll.descendant(_.default,F.index),nt=o(z,2),V=nt[0],D=nt[1];if(V!=null){M.linkRange=new b.Range(F.index-D,V.length());var k=_.default.formats(V.domNode);M.preview.textContent=k,M.preview.setAttribute("href",k),M.show(),M.position(M.quill.getBounds(M.linkRange));return}}else delete M.linkRange;M.hide()}})}},{key:"show",value:function(){a(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),C}(c.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),n.default=A},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(29),a=at(o),u=i(36),f=i(38),h=i(64),d=i(65),p=at(d),c=i(66),v=at(c),y=i(67),_=at(y),b=i(37),m=i(26),w=i(39),T=i(40),x=i(56),E=at(x),I=i(68),O=at(I),A=i(27),L=at(A),R=i(69),C=at(R),P=i(70),M=at(P),F=i(71),q=at(F),Z=i(72),z=at(Z),nt=i(73),V=at(nt),D=i(13),k=at(D),G=i(74),j=at(G),Q=i(75),K=at(Q),$=i(57),W=at($),et=i(41),Y=at(et),rt=i(28),ot=at(rt),pt=i(59),vt=at(pt),_t=i(60),At=at(_t),ne=i(61),Ut=at(ne),it=i(108),ut=at(it),dt=i(62),gt=at(dt);function at(It){return It&&It.__esModule?It:{default:It}}a.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":b.BackgroundClass,"attributors/class/color":m.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":T.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":b.BackgroundStyle,"attributors/style/color":m.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":T.SizeStyle},!0),a.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":b.BackgroundStyle,"formats/color":m.ColorStyle,"formats/font":w.FontClass,"formats/size":T.SizeClass,"formats/blockquote":p.default,"formats/code-block":k.default,"formats/header":v.default,"formats/list":_.default,"formats/bold":E.default,"formats/code":D.Code,"formats/italic":O.default,"formats/link":L.default,"formats/script":C.default,"formats/strike":M.default,"formats/underline":q.default,"formats/image":z.default,"formats/video":V.default,"formats/list/item":y.ListItem,"modules/formula":j.default,"modules/syntax":K.default,"modules/toolbar":W.default,"themes/bubble":ut.default,"themes/snow":gt.default,"ui/icons":Y.default,"ui/picker":ot.default,"ui/icon-picker":At.default,"ui/color-picker":vt.default,"ui/tooltip":Ut.default},!0),n.default=a.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var o=function(){function _(b,m){for(var w=0;w<m.length;w++){var T=m[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(b,T.key,T)}}return function(b,m,w){return m&&_(b.prototype,m),w&&_(b,w),b}}(),a=function _(b,m,w){b===null&&(b=Function.prototype);var T=Object.getOwnPropertyDescriptor(b,m);if(T===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:_(x,m,w)}else{if("value"in T)return T.value;var E=T.get;return E===void 0?void 0:E.call(w)}},u=i(0),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function d(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function p(_,b){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:_}function c(_,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);_.prototype=Object.create(b&&b.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(_,b):_.__proto__=b)}var v=function(_){c(b,_);function b(){return d(this,b),p(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"add",value:function(w,T){if(T==="+1"||T==="-1"){var x=this.value(w)||0;T=T==="+1"?x+1:x-1}return T===0?(this.remove(w),!0):a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"add",this).call(this,w,T)}},{key:"canAdd",value:function(w,T){return a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"canAdd",this).call(this,w,T)||a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"canAdd",this).call(this,w,parseInt(T))}},{key:"value",value:function(w){return parseInt(a(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,w))||void 0}}]),b}(f.default.Attributor.Class),y=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(4),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="blockquote",p.tagName="blockquote",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function v(y,_){for(var b=0;b<_.length;b++){var m=_[b];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(y,m.key,m)}}return function(y,_,b){return _&&v(y.prototype,_),b&&v(y,b),y}}(),a=i(4),u=f(a);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function d(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var c=function(v){p(y,v);function y(){return h(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,null,[{key:"formats",value:function(b){return this.tagName.indexOf(b.tagName)+1}}]),y}(u.default);c.blotName="header",c.tagName=["H1","H2","H3","H4","H5","H6"],n.default=c},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.ListItem=void 0;var o=function(){function x(E,I){for(var O=0;O<I.length;O++){var A=I[O];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(E,A.key,A)}}return function(E,I,O){return I&&x(E.prototype,I),O&&x(E,O),E}}(),a=function x(E,I,O){E===null&&(E=Function.prototype);var A=Object.getOwnPropertyDescriptor(E,I);if(A===void 0){var L=Object.getPrototypeOf(E);return L===null?void 0:x(L,I,O)}else{if("value"in A)return A.value;var R=A.get;return R===void 0?void 0:R.call(O)}},u=i(0),f=v(u),h=i(4),d=v(h),p=i(25),c=v(p);function v(x){return x&&x.__esModule?x:{default:x}}function y(x,E,I){return E in x?Object.defineProperty(x,E,{value:I,enumerable:!0,configurable:!0,writable:!0}):x[E]=I,x}function _(x,E){if(!(x instanceof E))throw new TypeError("Cannot call a class as a function")}function b(x,E){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return E&&(typeof E=="object"||typeof E=="function")?E:x}function m(x,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof E);x.prototype=Object.create(E&&E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),E&&(Object.setPrototypeOf?Object.setPrototypeOf(x,E):x.__proto__=E)}var w=function(x){m(E,x);function E(){return _(this,E),b(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}return o(E,[{key:"format",value:function(O,A){O===T.blotName&&!A?this.replaceWith(f.default.create(this.statics.scope)):a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"format",this).call(this,O,A)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(O,A){return this.parent.isolate(this.offset(this.parent),this.length()),O===this.parent.statics.blotName?(this.parent.replaceWith(O,A),this):(this.parent.unwrap(),a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replaceWith",this).call(this,O,A))}}],[{key:"formats",value:function(O){return O.tagName===this.tagName?void 0:a(E.__proto__||Object.getPrototypeOf(E),"formats",this).call(this,O)}}]),E}(d.default);w.blotName="list-item",w.tagName="LI";var T=function(x){m(E,x),o(E,null,[{key:"create",value:function(O){var A=O==="ordered"?"OL":"UL",L=a(E.__proto__||Object.getPrototypeOf(E),"create",this).call(this,A);return(O==="checked"||O==="unchecked")&&L.setAttribute("data-checked",O==="checked"),L}},{key:"formats",value:function(O){if(O.tagName==="OL")return"ordered";if(O.tagName==="UL")return O.hasAttribute("data-checked")?O.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function E(I){_(this,E);var O=b(this,(E.__proto__||Object.getPrototypeOf(E)).call(this,I)),A=function(R){if(R.target.parentNode===I){var C=O.statics.formats(I),P=f.default.find(R.target);C==="checked"?P.format("list","unchecked"):C==="unchecked"&&P.format("list","checked")}};return I.addEventListener("touchstart",A),I.addEventListener("mousedown",A),O}return o(E,[{key:"format",value:function(O,A){this.children.length>0&&this.children.tail.format(O,A)}},{key:"formats",value:function(){return y({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(O,A){if(O instanceof w)a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"insertBefore",this).call(this,O,A);else{var L=A==null?this.length():A.offset(this),R=this.split(L);R.parent.insertBefore(O,R)}}},{key:"optimize",value:function(O){a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"optimize",this).call(this,O);var A=this.next;A!=null&&A.prev===this&&A.statics.blotName===this.statics.blotName&&A.domNode.tagName===this.domNode.tagName&&A.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(A.moveChildren(this),A.remove())}},{key:"replace",value:function(O){if(O.statics.blotName!==this.statics.blotName){var A=f.default.create(this.statics.defaultChild);O.moveChildren(A),this.appendChild(A)}a(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"replace",this).call(this,O)}}]),E}(c.default);T.blotName="list",T.scope=f.default.Scope.BLOCK_BLOT,T.tagName=["OL","UL"],T.defaultChild="list-item",T.allowedChildren=[w],n.ListItem=w,n.default=T},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(56),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="italic",p.tagName=["EM","I"],n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function y(_,b){for(var m=0;m<b.length;m++){var w=b[m];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(_,w.key,w)}}return function(_,b,m){return b&&y(_.prototype,b),m&&y(_,m),_}}(),a=function y(_,b,m){_===null&&(_=Function.prototype);var w=Object.getOwnPropertyDescriptor(_,b);if(w===void 0){var T=Object.getPrototypeOf(_);return T===null?void 0:y(T,b,m)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(m)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function d(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function p(y,_){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:y}function c(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(y,_):y.__proto__=_)}var v=function(y){c(_,y);function _(){return d(this,_),p(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,null,[{key:"create",value:function(m){return m==="super"?document.createElement("sup"):m==="sub"?document.createElement("sub"):a(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,m)}},{key:"formats",value:function(m){if(m.tagName==="SUB")return"sub";if(m.tagName==="SUP")return"super"}}]),_}(f.default);v.blotName="script",v.tagName=["SUB","SUP"],n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="strike",p.tagName="S",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),a=u(o);function u(c){return c&&c.__esModule?c:{default:c}}function f(c,v){if(!(c instanceof v))throw new TypeError("Cannot call a class as a function")}function h(c,v){if(!c)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:c}function d(c,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);c.prototype=Object.create(v&&v.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(c,v):c.__proto__=v)}var p=function(c){d(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(a.default);p.blotName="underline",p.tagName="U",n.default=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),a=function b(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:b(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(0),f=d(u),h=i(27);function d(b){return b&&b.__esModule?b:{default:b}}function p(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function c(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function v(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var y=["alt","height","width"],_=function(b){v(m,b);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return typeof T=="string"&&x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"match",value:function(T){return/\.(jpe?g|gif|png)$/.test(T)||/^data:image\/.+;base64/.test(T)}},{key:"sanitize",value:function(T){return(0,h.sanitize)(T,["http","https","data"])?T:"//:0"}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(f.default.Embed);_.blotName="image",_.tagName="IMG",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(m,w){for(var T=0;T<w.length;T++){var x=w[T];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(m,x.key,x)}}return function(m,w,T){return w&&b(m.prototype,w),T&&b(m,T),m}}(),a=function b(m,w,T){m===null&&(m=Function.prototype);var x=Object.getOwnPropertyDescriptor(m,w);if(x===void 0){var E=Object.getPrototypeOf(m);return E===null?void 0:b(E,w,T)}else{if("value"in x)return x.value;var I=x.get;return I===void 0?void 0:I.call(T)}},u=i(4),f=i(27),h=d(f);function d(b){return b&&b.__esModule?b:{default:b}}function p(b,m){if(!(b instanceof m))throw new TypeError("Cannot call a class as a function")}function c(b,m){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:b}function v(b,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);b.prototype=Object.create(m&&m.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(b,m):b.__proto__=m)}var y=["height","width"],_=function(b){v(m,b);function m(){return p(this,m),c(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,[{key:"format",value:function(T,x){y.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):a(m.prototype.__proto__||Object.getPrototypeOf(m.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=a(m.__proto__||Object.getPrototypeOf(m),"create",this).call(this,T);return x.setAttribute("frameborder","0"),x.setAttribute("allowfullscreen",!0),x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return y.reduce(function(x,E){return T.hasAttribute(E)&&(x[E]=T.getAttribute(E)),x},{})}},{key:"sanitize",value:function(T){return h.default.sanitize(T)}},{key:"value",value:function(T){return T.getAttribute("src")}}]),m}(u.BlockEmbed);_.blotName="video",_.className="ql-video",_.tagName="IFRAME",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var o=function(){function T(x,E){for(var I=0;I<E.length;I++){var O=E[I];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}return function(x,E,I){return E&&T(x.prototype,E),I&&T(x,I),x}}(),a=function T(x,E,I){x===null&&(x=Function.prototype);var O=Object.getOwnPropertyDescriptor(x,E);if(O===void 0){var A=Object.getPrototypeOf(x);return A===null?void 0:T(A,E,I)}else{if("value"in O)return O.value;var L=O.get;return L===void 0?void 0:L.call(I)}},u=i(35),f=v(u),h=i(5),d=v(h),p=i(9),c=v(p);function v(T){return T&&T.__esModule?T:{default:T}}function y(T,x){if(!(T instanceof x))throw new TypeError("Cannot call a class as a function")}function _(T,x){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:T}function b(T,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);T.prototype=Object.create(x&&x.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(T,x):T.__proto__=x)}var m=function(T){b(x,T);function x(){return y(this,x),_(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(I){var O=a(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return typeof I=="string"&&(window.katex.render(I,O,{throwOnError:!1,errorColor:"#f00"}),O.setAttribute("data-value",I)),O}},{key:"value",value:function(I){return I.getAttribute("data-value")}}]),x}(f.default);m.blotName="formula",m.className="ql-formula",m.tagName="SPAN";var w=function(T){b(x,T),o(x,null,[{key:"register",value:function(){d.default.register(m,!0)}}]);function x(){y(this,x);var E=_(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return E}return x}(c.default);n.FormulaBlot=m,n.default=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.CodeToken=n.CodeBlock=void 0;var o=function(){function I(O,A){for(var L=0;L<A.length;L++){var R=A[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,R.key,R)}}return function(O,A,L){return A&&I(O.prototype,A),L&&I(O,L),O}}(),a=function I(O,A,L){O===null&&(O=Function.prototype);var R=Object.getOwnPropertyDescriptor(O,A);if(R===void 0){var C=Object.getPrototypeOf(O);return C===null?void 0:I(C,A,L)}else{if("value"in R)return R.value;var P=R.get;return P===void 0?void 0:P.call(L)}},u=i(0),f=_(u),h=i(5),d=_(h),p=i(9),c=_(p),v=i(13),y=_(v);function _(I){return I&&I.__esModule?I:{default:I}}function b(I,O){if(!(I instanceof O))throw new TypeError("Cannot call a class as a function")}function m(I,O){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:I}function w(I,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);I.prototype=Object.create(O&&O.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(I,O):I.__proto__=O)}var T=function(I){w(O,I);function O(){return b(this,O),m(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}return o(O,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),a(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var R=this.domNode.textContent;this.cachedText!==R&&((R.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(R),this.domNode.normalize(),this.attach()),this.cachedText=R)}}]),O}(y.default);T.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),E=function(I){w(O,I),o(O,null,[{key:"register",value:function(){d.default.register(x,!0),d.default.register(T,!0)}}]);function O(A,L){b(this,O);var R=m(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,A,L));if(typeof R.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var C=null;return R.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(C),C=setTimeout(function(){R.highlight(),C=null},R.options.interval)}),R.highlight(),R}return o(O,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(d.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(T).forEach(function(C){C.highlight(L.options.highlight)}),this.quill.update(d.default.sources.SILENT),R!=null&&this.quill.setSelection(R,d.default.sources.SILENT)}}}]),O}(c.default);E.DEFAULTS={highlight:function(){return window.hljs==null?null:function(I){var O=window.hljs.highlightAuto(I);return O.value}}(),interval:1e3},n.CodeBlock=T,n.CodeToken=x,n.default=E},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line> <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'},function(r,n){r.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'},function(r,n){r.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'},function(r,n){r.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BubbleTooltip=void 0;var o=function O(A,L,R){A===null&&(A=Function.prototype);var C=Object.getOwnPropertyDescriptor(A,L);if(C===void 0){var P=Object.getPrototypeOf(A);return P===null?void 0:O(P,L,R)}else{if("value"in C)return C.value;var M=C.get;return M===void 0?void 0:M.call(R)}},a=function(){function O(A,L){for(var R=0;R<L.length;R++){var C=L[R];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(A,C.key,C)}}return function(A,L,R){return L&&O(A.prototype,L),R&&O(A,R),A}}(),u=i(3),f=b(u),h=i(8),d=b(h),p=i(43),c=b(p),v=i(15),y=i(41),_=b(y);function b(O){return O&&O.__esModule?O:{default:O}}function m(O,A){if(!(O instanceof A))throw new TypeError("Cannot call a class as a function")}function w(O,A){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:O}function T(O,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);O.prototype=Object.create(A&&A.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(O,A):O.__proto__=A)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],E=function(O){T(A,O);function A(L,R){m(this,A),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var C=w(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,L,R));return C.quill.container.classList.add("ql-bubble"),C}return a(A,[{key:"extendToolbar",value:function(R){this.tooltip=new I(this.quill,this.options.bounds),this.tooltip.root.appendChild(R.container),this.buildButtons([].slice.call(R.container.querySelectorAll("button")),_.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),_.default)}}]),A}(c.default);E.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){A?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var I=function(O){T(A,O);function A(L,R){m(this,A);var C=w(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,L,R));return C.quill.on(d.default.events.EDITOR_CHANGE,function(P,M,F,q){if(P===d.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&q===d.default.sources.USER){C.show(),C.root.style.left="0px",C.root.style.width="",C.root.style.width=C.root.offsetWidth+"px";var Z=C.quill.getLines(M.index,M.length);if(Z.length===1)C.position(C.quill.getBounds(M));else{var z=Z[Z.length-1],nt=C.quill.getIndex(z),V=Math.min(z.length()-1,M.index+M.length-nt),D=C.quill.getBounds(new v.Range(nt,V));C.position(D)}}else document.activeElement!==C.textbox&&C.quill.hasFocus()&&C.hide()}),C}return a(A,[{key:"listen",value:function(){var R=this;o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(d.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!R.root.classList.contains("ql-hidden")){var C=R.quill.getSelection();C!=null&&R.position(R.quill.getBounds(C))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(R){var C=o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"position",this).call(this,R),P=this.root.querySelector(".ql-tooltip-arrow");if(P.style.marginLeft="",C===0)return C;P.style.marginLeft=-1*C-P.offsetWidth/2+"px"}}]),A}(p.BaseTooltip);I.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),n.BubbleTooltip=I,n.default=E},function(r,n,i){r.exports=i(63)}]).default})})(Ev);var mN=Ev.exports;const yN=En(mN),aB="",_N=Et.forwardRef((e,t)=>{const[r,n]=mt.useState(!1),i=300,o=mt.useRef(null),a=mt.useRef(0),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),d=mt.useRef(16),p=mt.useRef(null),c=mt.useRef(null),{uniqueId:v,visible:y,text:_,disabled:b,transformation:m,onTextUpdate:w,pointerdown:T,onExitQuillEditor:x}=e,{x:E,y:I,fontFamily:O="Arial",fontWeight:A="normal",fontStyle:L="normal",fontSize:R=16,fontVariant:C="normal",fill:P="black",stroke:M,strokeThickness:F=0,blurRadius:q=0,blurEnabled:Z=!1,dropShadowColor:z=null,dropShadow:nt=!1,dropShadowBlur:V=0,wordWrapWidth:D=5e7,leading:k=0,letterSpacing:G,colorCorrection:j={}}=m,{temperatureFilter:Q,sharpnessFilter:K,hueFilter:$,blurFilter:W,adjustmentFilter:et}=_s(j),{blurRadius:Y=0}=j;Et.useEffect(()=>{d.current=Number(R)},[R]);const rt=["italic","oblique"].includes(L)?L:void 0,ot=["small-caps"].includes(C),pt=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,vt=Number(G)>0?G:void 0,_t=Et.useMemo(()=>new zr.TextStyle({fontFamily:O,fontSize:R,fill:P||"white",...M&&F>0&&{stroke:M,strokeThickness:F},...rt&&{fontStyle:rt},...ot&&{fontVariant:ot},...pt&&{fontWeight:pt},...vt&&{letterSpacing:vt},...Z&&{dropShadow:!0,dropShadowBlur:Number(q),dropShadowColor:(z==null?void 0:z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...nt&&{dropShadow:!0,dropShadowBlur:Number(V),dropShadowColor:(z==null?void 0:z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:D||500,leading:k||0}),[Z,q,P,O,R,L,k,rt,pt,ot,vt,z,M,F,D,nt,V]);Et.useEffect(()=>{p.current={...m}},[m]);const At=()=>{n(!0)},ne=()=>{const dt=new Date().getTime();dt-a.current<i?At():T&&T(),a.current=dt},Ut=dt=>{w&&w({text:dt&&dt.replace(/\n+/g,`
2001
- `),uniqueId:v})},it=()=>{n(!1),x&&x()},ut=dt=>{dt&&(dt.preventDefault(),dt.stopPropagation())};return Et.useEffect(()=>{var dt,gt;if(r&&f.current){let at=document.getElementById("note-editor");if(at){at.style.position="absolute",at.style.display="block",at.style.zIndex="10",at.style.left=E+"px",at.style.top=I+"px",at.style.backgroundColor="var(--chakra-color-darkShark)",at.style.transform="scale(1.5)",at.style.width="300px",at.style.height="100px",at.style.color="#fff",at.style.fontSize="20px",at.style.border="1px solid #CBCEE0";const It={esc:{key:27,handler:function(){it()}}};if(c.current=new yN("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...It}}},placeholder:"Compose your text here...",theme:"snow"}),c.current){c.current.on("text-change",function(){c.current&&Ut(c.current.root.innerText)}),(gt=(dt=c.current)==null?void 0:dt.container)==null||gt.addEventListener("paste",ut),c.current.setText(_),c.current.focus(),c.current.off("text-change",()=>{}),c.current.hasFocus()||(at.style.display="none");const St=document.createElement("button");St.innerHTML="&#10006;",St.style.position="absolute",St.style.bottom="-14px",St.style.left="-3px",St.style.cursor="pointer",St.addEventListener("click",()=>{it()}),St.style.border="none",St.style.borderRadius="50%",St.style.width="15px",St.style.height="15px",St.style.backgroundColor="#f8f8f8",St.style.color="#333",St.style.fontSize="10px",at.appendChild(St)}}}else if(c.current){let at=document.getElementById("note-editor");at&&at.hasChildNodes()&&(at.removeChild(at.firstChild),at.removeAttribute("class"),at.removeAttribute("style")),c.current.off("text-change",()=>{})}return()=>{var at,It;c.current&&(c.current.off("text-change",()=>{}),(It=(at=c.current)==null?void 0:at.container)==null||It.removeEventListener("paste",ut))}},[E,I,r]),Et.useEffect(()=>{if(!r){const dt=document.getElementById("note-editor");dt&&(dt.style.display="none")}},[r]),Vt.jsx(ni,{...e,ref:t,isText:!0,onDoubleClick:At,isTextEditMode:r,children:Vt.jsxs(le.Container,{ref:o,children:[r&&y&&Vt.jsx(le.Container,{ref:f}),Vt.jsx(le.Container,{alpha:r?0:1,ref:h,children:Vt.jsx(le.Text,{style:_t,x:E,y:I,anchor:.5,text:_,alpha:y?1:0,...y&&!r&&!b&&{interactive:!0,buttonMode:!0,pointerdown:ne},ref:u,filters:[Q,K,$,et,...Y>0?[W]:[]]})})]})})}),bN=(e,t,r,n)=>{const i=mt.useCallback(Ii(e,n),[e,n]),o=mt.useCallback(Ii(t,n),[t,n]),a=mt.useCallback(Ii(r,n),[r,n]),u=mt.useCallback(()=>{i()},[i]),f=mt.useCallback(()=>{o()},[o]),h=mt.useCallback(()=>{a()},[a]);return{onPointerOver:u,onPointerDown:f,onPointerOut:h}},xN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Sv=Et.forwardRef((e,t)=>{const[,r]=Et.useState(!1),[n,i]=Et.useState(),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(xN),h=mt.useRef(),{uniqueId:d,mute:p=!1,src:c,startAt:v,endAt:y,frameStartAt:_,frameEndAt:b,visible:m,transformation:{x:w,y:T,width:x,height:E,animation:I,colorCorrection:O={}},pointerdown:A=()=>{},pointerout:L=()=>{},pointerover:R=()=>{}}=e,{tl:C,dragModeRef:P}=mt.useContext(An),{onPointerDown:M,onPointerOut:F,onPointerOver:q}=bN(R,A,L,1),{blurRadius:Z=0}=O,{temperatureFilter:z,sharpnessFilter:nt,hueFilter:V,blurFilter:D,adjustmentFilter:k}=_s(O),G=c||"",j=Et.useMemo(()=>{const Y=document.createElement("video");return Y.src=c,Y.crossOrigin="Anonymus",Y.autoplay=!1,Y.currentTime=_===0?.001:_,Y},[c,_]);Ze(Oe.PAUSE,()=>{if(u.current){const Y=u.current;Y.currentTime>0&&!Y.paused&&!Y.ended&&Y.readyState>Y.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}});const Q=Et.useCallback(Ii(()=>{if(u.current){const Y=u.current;Y.currentTime>0&&!Y.paused&&!Y.ended&&Y.readyState>Y.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1}},400),[u]);Et.useEffect(()=>{u.current?(P.current?(Q(),f.current.isPlaying=!1,f.current.isDragging=!0):f.current.isDragging=!1,u.current.muted=p):f.current.isDragging=!1},[p,P,Q,u]);const K=Y=>{if(u.current){if(u.current.currentTime=Number(Y),!P.current){const rt=u.current,ot=rt.currentTime>0&&!rt.paused&&!rt.ended&&rt.readyState>rt.HAVE_CURRENT_DATA;u.current.currentTime=Number(Y),C.current&&C.current.isActive()&&h.current&&h.current.isActive()&&(ot||u.current.play(),f.current.isPlaying=!0)}f.current.progress=0}},$=()=>{if(u.current){const Y=u.current;Y.currentTime>0&&!Y.paused&&!Y.ended&&Y.readyState>Y.HAVE_CURRENT_DATA&&u.current.pause(),f.current.isPlaying=!1,h.current&&(f.current.progress=h.current.progress())}},W=()=>{},et=()=>{var Y,rt;if(h.current&&(f.current.progress=h.current.progress()),u.current&&h.current){const ot=_+((Y=h==null?void 0:h.current)==null?void 0:Y.time()),pt=Math.abs(u.current.currentTime-ot),vt=u.current,_t=vt.currentTime>0&&!vt.paused&&!vt.ended&&vt.readyState>vt.HAVE_CURRENT_DATA;P.current?(u.current.currentTime=ot,setTimeout(()=>{u.current&&u.current.play().then(()=>{f.current.isPlaying=!1,u.current&&u.current.pause()})},100),f.current.isPlaying=!1):!f.current.isPlaying&&f.current.progress>.01&&f.current.progress<.99?(rt=C.current)!=null&&rt.isActive()&&h.current&&h.current.isActive()&&(_t||u.current.play(),f.current.isPlaying=!0):pt>.3&&f.current.progress>.01&&f.current.progress<.99}};return mt.useEffect(()=>{let Y=_e.context(()=>{});if(a.current&&C.current){const rt={duration:Number(b)-Number(_),onStart:K,onComplete:$,onStartParams:[_,b],onCompleteParams:[],onInterrupt:W,onUpdate:et,onUpdateParams:[_,b]};Y=_e.context(()=>{h.current=_e.from(a.current,rt,_),C.current.add(h.current,v)})}return()=>{h.current&&(h.current.kill(),_e.killTweensOf(h.current)),Y.revert()}},[I,v,y,_,b]),Et.useEffect(()=>{a.current&&r(!0)},[]),Et.useEffect(()=>{u.current&&(u.current.muted=p)},[p]),Et.useEffect(()=>{const Y=Math.round((Number(_)+Number.EPSILON)*100)/100,rt=function(){u.current&&(u.current.currentTime=Y)},ot=function(){if(u.current){const it=u.current;it.currentTime>0&&!it.paused&&!it.ended&&it.readyState>it.HAVE_CURRENT_DATA&&u.current.pause()}f.current.isWaiting=!1,f.current.isStalled=!1},pt=function(){u.current&&u.current.pause(),f.current.isWaiting=!0,f.current.isStalled=!1},vt=function(){f.current.isWaiting=!1,f.current.isStalled=!1},_t=function(){f.current.isWaiting=!1,f.current.isStalled=!0},At=Math.round((Number(_)+Number.EPSILON)*100)/100,ne=Math.round((Number(b)+Number.EPSILON)*100)/100,Ut=`${G}#t=${At},${ne}`;return zr.Texture.fromLoader(j,Ut,d,{pixiIdPrefix:d,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(it=>{it&&(i(it),u.current=it.baseTexture.resource.source,u.current.id=d,u.current.addEventListener("loadedmetadata",rt),u.current.addEventListener("ended",ot),u.current.addEventListener("loadstart",pt),u.current.addEventListener("canplaythrough",vt),u.current.addEventListener("stalled",_t))}),()=>{u.current&&(u.current.pause(),u.current.removeEventListener("loadedmetadata",rt),u.current.removeEventListener("ended",ot),u.current.removeEventListener("loadstart",pt),u.current.removeEventListener("canplaythrough",vt),u.current.removeEventListener("stalled",_t))}},[G,d,_,b,j]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,pointerdown:M,pointerover:q,pointerout:F,children:Vt.jsx(le.Container,{ref:a,children:n&&Vt.jsx(le.Sprite,{texture:n,width:x,height:E,anchor:.5,x:w,y:T,ref:o,alpha:m?1:0,...m&&{interactive:!0,pointerdown:A},filters:[z,nt,V,k,...Z>0?[D]:[]]})})})});Sv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const wN=e=>{const{startAt:t,endAt:r}=e,[n,i]=Et.useState(!1),o=mt.useRef(null),a=mt.useRef(null),u=mt.useRef(null),f=mt.useRef(null),h=mt.useRef(null),{tl:d,totalDuration:p=0,reverseModeRef:c}=mt.useContext(An),v=()=>{i(!0)},y=()=>{i(!1)},_=()=>{if(c.current&&f.current&&d.current){const m=d.current.time();m>t&&m<r&&(i(()=>!0),a.current&&(a.current.alpha=1))}},b=m=>{m<.2?i(!0):i(!1)};return Et.useEffect(()=>{const m={onStart:v,onStartParams:[{alpha:1}]},w={onComplete:y,onCompleteParams:[{alpha:t>0?0:1}]},T=Math.max(0,t-1),x=_e.context(()=>{if(o.current&&d.current){const E=_e.from(o.current,{alpha:t<.2?1:0,duration:.5,...m});d.current.add(E,T),d.current.to(o.current,{alpha:0,duration:.5,overwrite:"auto",...w},r-.5),t<.2&&i(!0),f.current=_e.to(u.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(t),onUpdate:_},t),d.current.add(f.current,t),p>.2&&d.current.call(b,[t],p-.3)}});return()=>{var E;(E=f.current)==null||E.kill(),x.revert()}},[t,r,p]),Et.useEffect(()=>{const m=_e.context(()=>{a.current&&d.current&&(h.current&&h.current.kill(),h.current=_e.to(a.current,{alpha:1,duration:.5,overwrite:"auto"}),d.current.add(h.current,t))});return()=>{h.current&&h.current.kill(),m.revert()}},[n,t]),Vt.jsx(le.Container,{ref:o,alpha:1,children:Vt.jsx(le.Container,{ref:u,children:n&&Vt.jsx(le.Container,{ref:a,alpha:t<.2?1:0,children:e.children})})})},TN=e=>{const{startAt:t,endAt:r}=e,{setTotalDuration:n}=mt.useContext(An);return Et.useEffect(()=>{n&&n(r)},[t,r]),e.children};var Av=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(Av||{}),Ov=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Ov||{});re.Animations=Av,re.BlendModes=Ov,re.Events=Oe,re.GsapPixieContext=An,re.GsapPixieContextProvider=my,re.PixiAnimatedSprite=xv,re.PixiAudioSprite=LS,re.PixiGifSprite=Tv,re.PixiImageSprite=gp,re.PixiSequence=wN,re.PixiSequenceWrapper=TN,re.PixiSvgPathSprite=oS,re.PixiTextSprite=_N,re.PixiVideoSprite=Sv,re.emitCustomEvent=ti,re.newCustomEventEmitter=gy,re.useCustomEventListener=Ze,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
1959
+ `)+$+`return __p
1960
+ }`;var mt=Z0(function(){return Bt(b,et+"return "+$).apply(r,C)});if(mt.source=$,Yh(mt))throw mt;return mt}function aB(i){return $t(i).toLowerCase()}function oB(i){return $t(i).toUpperCase()}function uB(i,o,h){if(i=$t(i),i&&(h||o===r))return am(i);if(!i||!(o=He(o)))return i;var d=yr(i),v=yr(o),b=om(d,v),C=um(d,v)+1;return fn(d,b,C).join("")}function lB(i,o,h){if(i=$t(i),i&&(h||o===r))return i.slice(0,hm(i)+1);if(!i||!(o=He(o)))return i;var d=yr(i),v=um(d,yr(o))+1;return fn(d,0,v).join("")}function hB(i,o,h){if(i=$t(i),i&&(h||o===r))return i.replace(Yl,"");if(!i||!(o=He(o)))return i;var d=yr(i),v=om(d,yr(o));return fn(d,v).join("")}function cB(i,o){var h=X,d=tt;if(se(o)){var v="separator"in o?o.separator:v;h="length"in o?pt(o.length):h,d="omission"in o?He(o.omission):d}i=$t(i);var b=i.length;if(Ri(i)){var C=yr(i);b=C.length}if(h>=b)return i;var E=h-Pi(d);if(E<1)return d;var M=C?fn(C,0,E).join(""):i.slice(0,E);if(v===r)return M+d;if(C&&(E+=M.length-E),Kh(v)){if(i.slice(E).search(v)){var D,U=M;for(v.global||(v=fh(v.source,$t(Ig.exec(v))+"g")),v.lastIndex=0;D=v.exec(U);)var $=D.index;M=M.slice(0,$===r?E:$)}}else if(i.indexOf(He(v),E)!=E){var Y=M.lastIndexOf(v);Y>-1&&(M=M.slice(0,Y))}return M+d}function fB(i){return i=$t(i),i&&wO.test(i)?i.replace(Ag,GF):i}var dB=Bi(function(i,o,h){return i+(h?" ":"")+o.toUpperCase()}),Qh=Jm("toUpperCase");function K0(i,o,h){return i=$t(i),o=h?r:o,o===r?kF(i)?VF(i):EF(i):i.match(o)||[]}var Z0=vt(function(i,o){try{return Ge(i,r,o)}catch(h){return Yh(h)?h:new ft(h)}}),pB=jr(function(i,o){return Ze(o,function(h){h=Or(h),Hr(i,h,Wh(i[h],i))}),i});function gB(i){var o=i==null?0:i.length,h=ot();return i=o?ee(i,function(d){if(typeof d[1]!="function")throw new Je(u);return[h(d[0]),d[1]]}):[],vt(function(d){for(var v=-1;++v<o;){var b=i[v];if(Ge(b[0],this,d))return Ge(b[1],this,d)}})}function mB(i){return G3(tr(i,m))}function tc(i){return function(){return i}}function vB(i,o){return i==null||i!==i?o:i}var yB=t0(),_B=t0(!0);function De(i){return i}function ec(i){return Pm(typeof i=="function"?i:tr(i,m))}function xB(i){return Om(tr(i,m))}function bB(i,o){return Fm(i,tr(o,m))}var TB=vt(function(i,o){return function(h){return Is(h,i,o)}}),wB=vt(function(i,o){return function(h){return Is(i,h,o)}});function rc(i,o,h){var d=_e(o),v=_o(o,d);h==null&&!(se(o)&&(v.length||!d.length))&&(h=o,o=i,i=this,v=_o(o,_e(o)));var b=!(se(h)&&"chain"in h)||!!h.chain,C=Wr(i);return Ze(v,function(E){var M=o[E];i[E]=M,C&&(i.prototype[E]=function(){var D=this.__chain__;if(b||D){var U=i(this.__wrapped__),$=U.__actions__=Le(this.__actions__);return $.push({func:M,args:arguments,thisArg:i}),U.__chain__=D,U}return M.apply(i,an([this.value()],arguments))})}),i}function SB(){return be._===this&&(be._=KF),this}function nc(){}function AB(i){return i=pt(i),vt(function(o){return Nm(o,i)})}var CB=Nh(ee),EB=Nh(em),IB=Nh(sh);function J0(i){return Gh(i)?ah(Or(i)):iN(i)}function RB(i){return function(o){return i==null?r:Un(i,o)}}var PB=r0(),MB=r0(!0);function ic(){return[]}function sc(){return!1}function OB(){return{}}function FB(){return""}function NB(){return!0}function LB(i,o){if(i=pt(i),i<1||i>rt)return[];var h=K,d=Ee(i,K);o=ot(o),i-=K;for(var v=lh(d,o);++h<i;)o(h);return v}function kB(i){return dt(i)?ee(i,Or):Ve(i)?[i]:Le(y0($t(i)))}function BB(i){var o=++qF;return $t(i)+o}var DB=Ao(function(i,o){return i+o},0),UB=Lh("ceil"),$B=Ao(function(i,o){return i/o},1),GB=Lh("floor");function zB(i){return i&&i.length?yo(i,De,xh):r}function HB(i,o){return i&&i.length?yo(i,ot(o,2),xh):r}function VB(i){return im(i,De)}function jB(i,o){return im(i,ot(o,2))}function XB(i){return i&&i.length?yo(i,De,Sh):r}function WB(i,o){return i&&i.length?yo(i,ot(o,2),Sh):r}var qB=Ao(function(i,o){return i*o},1),YB=Lh("round"),KB=Ao(function(i,o){return i-o},0);function ZB(i){return i&&i.length?uh(i,De):0}function JB(i,o){return i&&i.length?uh(i,ot(o,2)):0}return _.after=xk,_.ary=R0,_.assign=o5,_.assignIn=H0,_.assignInWith=Do,_.assignWith=u5,_.at=l5,_.before=P0,_.bind=Wh,_.bindAll=pB,_.bindKey=M0,_.castArray=Ok,_.chain=C0,_.chunk=GN,_.compact=zN,_.concat=HN,_.cond=gB,_.conforms=mB,_.constant=tc,_.countBy=ZL,_.create=h5,_.curry=O0,_.curryRight=F0,_.debounce=N0,_.defaults=c5,_.defaultsDeep=f5,_.defer=bk,_.delay=Tk,_.difference=VN,_.differenceBy=jN,_.differenceWith=XN,_.drop=WN,_.dropRight=qN,_.dropRightWhile=YN,_.dropWhile=KN,_.fill=ZN,_.filter=QL,_.flatMap=rk,_.flatMapDeep=nk,_.flatMapDepth=ik,_.flatten=T0,_.flattenDeep=JN,_.flattenDepth=QN,_.flip=wk,_.flow=yB,_.flowRight=_B,_.fromPairs=tL,_.functions=_5,_.functionsIn=x5,_.groupBy=sk,_.initial=rL,_.intersection=nL,_.intersectionBy=iL,_.intersectionWith=sL,_.invert=T5,_.invertBy=w5,_.invokeMap=ok,_.iteratee=ec,_.keyBy=uk,_.keys=_e,_.keysIn=Be,_.map=Oo,_.mapKeys=A5,_.mapValues=C5,_.matches=xB,_.matchesProperty=bB,_.memoize=No,_.merge=E5,_.mergeWith=V0,_.method=TB,_.methodOf=wB,_.mixin=rc,_.negate=Lo,_.nthArg=AB,_.omit=I5,_.omitBy=R5,_.once=Sk,_.orderBy=lk,_.over=CB,_.overArgs=Ak,_.overEvery=EB,_.overSome=IB,_.partial=qh,_.partialRight=L0,_.partition=hk,_.pick=P5,_.pickBy=j0,_.property=J0,_.propertyOf=RB,_.pull=lL,_.pullAll=S0,_.pullAllBy=hL,_.pullAllWith=cL,_.pullAt=fL,_.range=PB,_.rangeRight=MB,_.rearg=Ck,_.reject=dk,_.remove=dL,_.rest=Ek,_.reverse=jh,_.sampleSize=gk,_.set=O5,_.setWith=F5,_.shuffle=mk,_.slice=pL,_.sortBy=_k,_.sortedUniq=bL,_.sortedUniqBy=TL,_.split=rB,_.spread=Ik,_.tail=wL,_.take=SL,_.takeRight=AL,_.takeRightWhile=CL,_.takeWhile=EL,_.tap=zL,_.throttle=Rk,_.thru=Mo,_.toArray=$0,_.toPairs=X0,_.toPairsIn=W0,_.toPath=kB,_.toPlainObject=z0,_.transform=N5,_.unary=Pk,_.union=IL,_.unionBy=RL,_.unionWith=PL,_.uniq=ML,_.uniqBy=OL,_.uniqWith=FL,_.unset=L5,_.unzip=Xh,_.unzipWith=A0,_.update=k5,_.updateWith=B5,_.values=$i,_.valuesIn=D5,_.without=NL,_.words=K0,_.wrap=Mk,_.xor=LL,_.xorBy=kL,_.xorWith=BL,_.zip=DL,_.zipObject=UL,_.zipObjectDeep=$L,_.zipWith=GL,_.entries=X0,_.entriesIn=W0,_.extend=H0,_.extendWith=Do,rc(_,_),_.add=DB,_.attempt=Z0,_.camelCase=z5,_.capitalize=q0,_.ceil=UB,_.clamp=U5,_.clone=Fk,_.cloneDeep=Lk,_.cloneDeepWith=kk,_.cloneWith=Nk,_.conformsTo=Bk,_.deburr=Y0,_.defaultTo=vB,_.divide=$B,_.endsWith=H5,_.eq=xr,_.escape=V5,_.escapeRegExp=j5,_.every=JL,_.find=tk,_.findIndex=x0,_.findKey=d5,_.findLast=ek,_.findLastIndex=b0,_.findLastKey=p5,_.floor=GB,_.forEach=E0,_.forEachRight=I0,_.forIn=g5,_.forInRight=m5,_.forOwn=v5,_.forOwnRight=y5,_.get=Zh,_.gt=Dk,_.gte=Uk,_.has=b5,_.hasIn=Jh,_.head=w0,_.identity=De,_.includes=ak,_.indexOf=eL,_.inRange=$5,_.invoke=S5,_.isArguments=zn,_.isArray=dt,_.isArrayBuffer=$k,_.isArrayLike=ke,_.isArrayLikeObject=he,_.isBoolean=Gk,_.isBuffer=dn,_.isDate=zk,_.isElement=Hk,_.isEmpty=Vk,_.isEqual=jk,_.isEqualWith=Xk,_.isError=Yh,_.isFinite=Wk,_.isFunction=Wr,_.isInteger=k0,_.isLength=ko,_.isMap=B0,_.isMatch=qk,_.isMatchWith=Yk,_.isNaN=Kk,_.isNative=Zk,_.isNil=Qk,_.isNull=Jk,_.isNumber=D0,_.isObject=se,_.isObjectLike=ae,_.isPlainObject=Ns,_.isRegExp=Kh,_.isSafeInteger=t5,_.isSet=U0,_.isString=Bo,_.isSymbol=Ve,_.isTypedArray=Ui,_.isUndefined=e5,_.isWeakMap=r5,_.isWeakSet=n5,_.join=aL,_.kebabCase=X5,_.last=rr,_.lastIndexOf=oL,_.lowerCase=W5,_.lowerFirst=q5,_.lt=i5,_.lte=s5,_.max=zB,_.maxBy=HB,_.mean=VB,_.meanBy=jB,_.min=XB,_.minBy=WB,_.stubArray=ic,_.stubFalse=sc,_.stubObject=OB,_.stubString=FB,_.stubTrue=NB,_.multiply=qB,_.nth=uL,_.noConflict=SB,_.noop=nc,_.now=Fo,_.pad=Y5,_.padEnd=K5,_.padStart=Z5,_.parseInt=J5,_.random=G5,_.reduce=ck,_.reduceRight=fk,_.repeat=Q5,_.replace=tB,_.result=M5,_.round=YB,_.runInContext=P,_.sample=pk,_.size=vk,_.snakeCase=eB,_.some=yk,_.sortedIndex=gL,_.sortedIndexBy=mL,_.sortedIndexOf=vL,_.sortedLastIndex=yL,_.sortedLastIndexBy=_L,_.sortedLastIndexOf=xL,_.startCase=nB,_.startsWith=iB,_.subtract=KB,_.sum=ZB,_.sumBy=JB,_.template=sB,_.times=LB,_.toFinite=qr,_.toInteger=pt,_.toLength=G0,_.toLower=aB,_.toNumber=nr,_.toSafeInteger=a5,_.toString=$t,_.toUpper=oB,_.trim=uB,_.trimEnd=lB,_.trimStart=hB,_.truncate=cB,_.unescape=fB,_.uniqueId=BB,_.upperCase=dB,_.upperFirst=Qh,_.each=E0,_.eachRight=I0,_.first=w0,rc(_,function(){var i={};return Pr(_,function(o,h){zt.call(_.prototype,h)||(i[h]=o)}),i}(),{chain:!1}),_.VERSION=n,Ze(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),Ze(["drop","take"],function(i,o){At.prototype[i]=function(h){h=h===r?1:ge(pt(h),0);var d=this.__filtered__&&!o?new At(this):this.clone();return d.__filtered__?d.__takeCount__=Ee(h,d.__takeCount__):d.__views__.push({size:Ee(h,K),type:i+(d.__dir__<0?"Right":"")}),d},At.prototype[i+"Right"]=function(h){return this.reverse()[i](h).reverse()}}),Ze(["filter","map","takeWhile"],function(i,o){var h=o+1,d=h==j||h==kt;At.prototype[i]=function(v){var b=this.clone();return b.__iteratees__.push({iteratee:ot(v,3),type:h}),b.__filtered__=b.__filtered__||d,b}}),Ze(["head","last"],function(i,o){var h="take"+(o?"Right":"");At.prototype[i]=function(){return this[h](1).value()[0]}}),Ze(["initial","tail"],function(i,o){var h="drop"+(o?"":"Right");At.prototype[i]=function(){return this.__filtered__?new At(this):this[h](1)}}),At.prototype.compact=function(){return this.filter(De)},At.prototype.find=function(i){return this.filter(i).head()},At.prototype.findLast=function(i){return this.reverse().find(i)},At.prototype.invokeMap=vt(function(i,o){return typeof i=="function"?new At(this):this.map(function(h){return Is(h,i,o)})}),At.prototype.reject=function(i){return this.filter(Lo(ot(i)))},At.prototype.slice=function(i,o){i=pt(i);var h=this;return h.__filtered__&&(i>0||o<0)?new At(h):(i<0?h=h.takeRight(-i):i&&(h=h.drop(i)),o!==r&&(o=pt(o),h=o<0?h.dropRight(-o):h.take(o-i)),h)},At.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},At.prototype.toArray=function(){return this.take(K)},Pr(At.prototype,function(i,o){var h=/^(?:filter|find|map|reject)|While$/.test(o),d=/^(?:head|last)$/.test(o),v=_[d?"take"+(o=="last"?"Right":""):o],b=d||/^find/.test(o);v&&(_.prototype[o]=function(){var C=this.__wrapped__,E=d?[1]:arguments,M=C instanceof At,D=E[0],U=M||dt(C),$=function(bt){var It=v.apply(_,an([bt],E));return d&&Y?It[0]:It};U&&h&&typeof D=="function"&&D.length!=1&&(M=U=!1);var Y=this.__chain__,et=!!this.__actions__.length,ut=b&&!Y,mt=M&&!et;if(!b&&U){C=mt?C:new At(this);var lt=i.apply(C,E);return lt.__actions__.push({func:Mo,args:[$],thisArg:r}),new Qe(lt,Y)}return ut&&mt?i.apply(this,E):(lt=this.thru($),ut?d?lt.value()[0]:lt.value():lt)})}),Ze(["pop","push","shift","sort","splice","unshift"],function(i){var o=ro[i],h=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",d=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var v=arguments;if(d&&!this.__chain__){var b=this.value();return o.apply(dt(b)?b:[],v)}return this[h](function(C){return o.apply(dt(C)?C:[],v)})}}),Pr(At.prototype,function(i,o){var h=_[o];if(h){var d=h.name+"";zt.call(Ni,d)||(Ni[d]=[]),Ni[d].push({name:o,func:h})}}),Ni[So(r,w).name]=[{name:"wrapper",func:r}],At.prototype.clone=f3,At.prototype.reverse=d3,At.prototype.value=p3,_.prototype.at=HL,_.prototype.chain=VL,_.prototype.commit=jL,_.prototype.next=XL,_.prototype.plant=qL,_.prototype.reverse=YL,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=KL,_.prototype.first=_.prototype.head,bs&&(_.prototype[bs]=WL),_},Mi=jF();Nn?((Nn.exports=Mi)._=Mi,eh._=Mi):be._=Mi}).call(We)}(qa,qa.exports);var xg=qa.exports;const fO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},bg=st.forwardRef((e,t)=>{const[r,n]=st.useState([]),[,s]=st.useState(0),[a,u]=st.useState([]),[,l]=W.useState(!1),[c,f]=rO({autoPlay:!1}),p=W.useRef(null),m=W.useRef(null),g=W.useRef(fO),x=W.useRef(),{tl:y,dragModeRef:S}=W.useContext(gn),{frames:T,delays:w}=c,{src:I,startAt:A,endAt:R,frameStartAt:N,frameEndAt:B,loop:L,visible:O,transformation:{width:z=0,height:X=0,x:tt,y:it,animation:V,colorCorrection:j={}},pointerdown:xt}=e,{temperatureFilter:kt,sharpnessFilter:G,hueFilter:rt,blurFilter:gt,adjustmentFilter:H}=cs(j),{blurRadius:K=0}=j,ct=.1;hO(I,f),we(ue.PAUSE,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),we(ue.SEEK_END,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),we(ue.SCRUBBER_CLICKED,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),st.useEffect(()=>{g.current&&p.current&&(S.current?(p.current.stop(),g.current.isPlaying=!1,g.current.isDragging=!0):g.current.isDragging=!1)},[S]),st.useEffect(()=>{if(!Zo(T)){const J=OM(T,St=>{const{data:Et,width:Jt,height:gr}=St,Me=new Uint8Array(Et);return Fr.Texture.fromBuffer(Me,Jt,gr)}),q=J.map((St,Et)=>({texture:St,time:w[Et]}));n(J),u(q);let at=0;w.forEach(St=>{at+=St*10}),s(at),g.current.totalDuration=at,g.current.totalFrames=T.length}},[T,w]);const yt=xg.debounce(J=>{if(p.current){let q=J===0?0:J/ct;q=isNaN(q)?0:q;const at=g.current.totalFrames;q=q>at?at:q,q>=at?(p.current.gotoAndStop(0),g.current.isPlaying=!1):(p.current.gotoAndPlay(q||0),g.current.isPlaying=!0)}},20),wt=xg.debounce(()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},50),Pt=J=>{if(p.current){let q=J===0?0:J/ct;q=isNaN(q)?0:q;const at=g.current.totalFrames;q=q>at?at:q,q>=at?(p.current.gotoAndStop(0),g.current.isPlaying=!1):(p.current.gotoAndPlay(q||0),g.current.isPlaying=!0)}},Ft=()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},Vt=()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},Ut=J=>{var at;const q=J+((at=x.current)==null?void 0:at.time());p.current&&S.current?(yt(q),wt(),g.current.isPlaying=!1):x.current&&p.current&&!g.current.isPlaying&&x.current.isActive()&&y.current.isActive()&&(yt(q),g.current.isPlaying=!0)},Zt=()=>{l(!0)};return W.useEffect(()=>{let J=oe.context(()=>{});if(m.current&&y.current){const q={duration:Number(B)-Number(N),onStart:Pt,onComplete:Ft,onStartParams:[N,B],onCompleteParams:[],onInterrupt:Vt,onUpdate:Ut,onUpdateParams:[N,B]};x.current&&x.current.kill(),J=oe.context(()=>{x.current=oe.from(m.current,q,N),y.current.add(x.current,A)})}return()=>{x.current&&(x.current.kill(),oe.killTweensOf(x.current)),J.revert()}},[V,A,R,N,B]),Mt.jsx(Wn,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Mt.jsx(Yt.Container,{ref:m,children:r&&r.length>0&&Mt.jsx(_g,{x:tt,y:it,width:z,height:X,animationSpeed:1,alpha:O?1:0,loop:L,textures:a,onComplete:Zt,anchor:.5,forwardRef:p,...O&&{interactive:!0,pointerdown:xt},filters:[kt,G,rt,H,...K>0?[gt]:[]]})})})});bg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const dO=st.forwardRef((e,t)=>{const n=W.useRef(null),s=W.useRef(0),a=W.useRef(null),u=W.useRef(null),l=W.useRef(null),c=W.useRef(16),f=W.useRef(null),{visible:p,text:m,disabled:g,transformation:x,pointerdown:y,onDobuleClick:S}=e,{x:T,y:w,fontFamily:I="Arial",fontWeight:A="normal",fontStyle:R="normal",fontSize:N=16,fontVariant:B="normal",fill:L="black",stroke:O,strokeThickness:z=0,blurRadius:X=0,blurEnabled:tt=!1,dropShadowColor:it=null,dropShadow:V=!1,dropShadowBlur:j=0,wordWrapWidth:xt=5e7,leading:kt=0,letterSpacing:G,colorCorrection:rt={}}=x,{temperatureFilter:gt,sharpnessFilter:H,hueFilter:K,blurFilter:ct,adjustmentFilter:yt}=cs(rt),{blurRadius:wt=0}=rt;st.useEffect(()=>{c.current=Number(N)},[N]);const Pt=["italic","oblique"].includes(R)?R:void 0,Ft=["small-caps"].includes(B),Vt=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,Ut=Number(G)>0?G:void 0,Zt=st.useMemo(()=>new Fr.TextStyle({fontFamily:I,fontSize:N,fill:L||"white",...O&&z>0&&{stroke:O,strokeThickness:z},...Pt&&{fontStyle:Pt},...Ft&&{fontVariant:Ft},...Vt&&{fontWeight:Vt},...Ut&&{letterSpacing:Ut},...tt&&{dropShadow:!0,dropShadowBlur:Number(X),dropShadowColor:(it==null?void 0:it.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...V&&{dropShadow:!0,dropShadowBlur:Number(j),dropShadowColor:(it==null?void 0:it.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:xt||500,leading:kt||0}),[tt,X,L,I,N,R,kt,Pt,Vt,Ft,Ut,it,O,z,xt,V,j]);st.useEffect(()=>{f.current={...x}},[x]);const J=()=>{const at=new Date().getTime();at-s.current<300&&S?S():y&&y(),s.current=at},q=()=>{S&&S()};return Mt.jsx(Wn,{...e,ref:t,isText:!0,onDoubleClick:q,children:Mt.jsxs(Yt.Container,{ref:n,children:[isEditing&&p&&Mt.jsx(Yt.Container,{ref:u}),Mt.jsx(Yt.Container,{alpha:isEditing?0:1,ref:l,children:Mt.jsx(Yt.Text,{style:Zt,x:T,y:w,anchor:.5,text:m,alpha:p?1:0,...p&&!g&&{interactive:!0,buttonMode:!0,pointerdown:J},ref:a,filters:[gt,H,K,yt,...wt>0?[ct]:[]]})})]})})}),pO=(e,t,r,n)=>{const s=W.useCallback(xi(e,n),[e,n]),a=W.useCallback(xi(t,n),[t,n]),u=W.useCallback(xi(r,n),[r,n]),l=W.useCallback(()=>{s()},[s]),c=W.useCallback(()=>{a()},[a]),f=W.useCallback(()=>{u()},[u]);return{onPointerOver:l,onPointerDown:c,onPointerOut:f}},gO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Tg=st.forwardRef((e,t)=>{const[r,n]=st.useState(0),[s,a]=st.useState(),u=W.useRef(null),l=W.useRef(null),c=W.useRef(null),f=W.useRef(gO),p=W.useRef(),{uniqueId:m,mute:g=!1,src:x,startAt:y,endAt:S,frameStartAt:T,frameEndAt:w,visible:I,transformation:{x:A,y:R,width:N,height:B,animation:L,colorCorrection:O={}},pointerdown:z=()=>{},pointerout:X=()=>{},pointerover:tt=()=>{}}=e,{tl:it,dragModeRef:V}=W.useContext(gn),{onPointerDown:j,onPointerOut:xt,onPointerOver:kt}=pO(tt,z,X,1),{blurRadius:G=0}=O,{temperatureFilter:rt,sharpnessFilter:gt,hueFilter:H,blurFilter:K,adjustmentFilter:ct}=cs(O),yt=x||"",wt=st.useMemo(()=>{const J=document.createElement("video");return J.src=x,J.crossOrigin="Anonymus",J.autoplay=!1,J.currentTime=T===0?.001:T,J},[x,T]);we(ue.PAUSE,()=>{c.current&&(c.current.pause(),f.current.isPlaying=!1)}),we(ue.SCRUBBER_CLICKED,()=>{c.current&&(c.current.pause(),f.current.isPlaying=!1)});const Pt=st.useCallback(xi(()=>{if(c.current){const J=c.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&c.current.pause(),f.current.isPlaying=!1}},400),[c]);st.useEffect(()=>{c.current?(V.current?(Pt(),f.current.isPlaying=!1,f.current.isDragging=!0):f.current.isDragging=!1,c.current.muted=g):f.current.isDragging=!1},[g,V,Pt,c]);const Ft=J=>{if(c.current){if(c.current.currentTime=Number(J),!V.current){const q=c.current,at=q.currentTime>0&&!q.paused&&!q.ended&&q.readyState>q.HAVE_CURRENT_DATA;it.current&&it.current.isActive()&&p.current&&p.current.isActive()&&(at||c.current.play(),f.current.isPlaying=!0,n(St=>St+1))}f.current.progress=0}},Vt=()=>{if(c.current){const J=c.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&c.current.pause(),f.current.isPlaying=!1,p.current&&(f.current.progress=p.current.progress())}},Ut=()=>{},Zt=()=>{var J,q;if(p.current&&(f.current.progress=p.current.progress()),c.current&&p.current){const at=T+((J=p==null?void 0:p.current)==null?void 0:J.time()),St=Math.abs(c.current.currentTime-at),Et=c.current,Jt=Et.currentTime>0&&!Et.paused&&!Et.ended&&Et.readyState>Et.HAVE_CURRENT_DATA;V.current?(c.current.currentTime=at,setTimeout(()=>{c.current&&c.current.play().then(()=>{f.current.isPlaying=!1,c.current&&c.current.pause()})},100),f.current.isPlaying=!1):(Jt!==f.current.isPlaying||!Jt)&&f.current.progress>.01&&f.current.progress<.99?(q=it.current)!=null&&q.isActive()&&p.current&&p.current.isActive()&&(Jt||c.current.play(),f.current.isPlaying=!0):St>.3&&f.current.progress>.01&&f.current.progress<.99&&(c.current.currentTime=at)}};return W.useEffect(()=>{let J=oe.context(()=>{});if(l.current&&it.current){const q={duration:Number(w)-Number(T),onStart:Ft,onComplete:Vt,onStartParams:[T,w],onCompleteParams:[],onInterrupt:Ut,onUpdate:Zt,onUpdateParams:[T,w]};J=oe.context(()=>{p.current=oe.from(l.current,q,T),it.current.add(p.current,y)})}return()=>{p.current&&(p.current.kill(),oe.killTweensOf(p.current)),J.revert()}},[L,y,S,T,w]),st.useEffect(()=>{c.current&&(c.current.muted=g)},[g]),st.useEffect(()=>{const J=Math.round((Number(T)+Number.EPSILON)*100)/100,q=function(){c.current&&(c.current.currentTime=J)},at=function(){if(c.current){const mr=c.current;mr.currentTime>0&&!mr.paused&&!mr.ended&&mr.readyState>mr.HAVE_CURRENT_DATA&&c.current.pause()}f.current.isWaiting=!1,f.current.isStalled=!1},St=function(){c.current&&c.current.pause(),f.current.isWaiting=!0,f.current.isStalled=!1},Et=function(){f.current.isWaiting=!1,f.current.isStalled=!1},Jt=function(){f.current.isWaiting=!1,f.current.isStalled=!0},gr=Math.round((Number(T)+Number.EPSILON)*100)/100,Me=Math.round((Number(w)+Number.EPSILON)*100)/100,$r=`${yt}#t=${gr},${Me}`;return Fr.Texture.fromLoader(wt,$r,m,{pixiIdPrefix:m,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(mr=>{mr&&(a(mr),c.current=mr.baseTexture.resource.source,c.current.id=m,c.current.addEventListener("loadedmetadata",q),c.current.addEventListener("ended",at),c.current.addEventListener("loadstart",St),c.current.addEventListener("canplaythrough",Et),c.current.addEventListener("stalled",Jt))}),()=>{c.current&&(c.current.pause(),c.current.removeEventListener("loadedmetadata",q),c.current.removeEventListener("ended",at),c.current.removeEventListener("loadstart",St),c.current.removeEventListener("canplaythrough",Et),c.current.removeEventListener("stalled",Jt))}},[yt,m,T,w,wt]),st.useEffect(()=>{const J=setTimeout(()=>{s&&p.current&&it.current&&p.current.progress()<.1&&c.current&&!p.current.isActive()&&c.current.play().then(()=>{f.current.isPlaying=!1,c.current&&c.current.pause()})},30);return()=>{clearTimeout(J)}},[s]),st.useEffect(()=>{it.current&&!it.current.isActive()&&(f.current.isPlaying=!1,c.current&&c.current.pause());const J=setTimeout(()=>{if(s&&it.current&&r>0){it.current.isActive()||(f.current.isPlaying=!1,c.current&&c.current.pause());const q=c.current;q&&it.current.isActive()&&p.current&&p.current.isActive()&&(q.currentTime>0&&!q.paused&&!q.ended&&q.readyState>q.HAVE_CURRENT_DATA||c.current.play(),f.current.isPlaying=!0)}},10);return()=>{clearTimeout(J)}},[r,s]),Mt.jsx(Wn,{...e,ref:t,ignoreTlForVideo:!0,pointerdown:j,pointerover:kt,pointerout:xt,children:Mt.jsx(Yt.Container,{ref:l,children:s&&Mt.jsx(Yt.Sprite,{texture:s,width:N,height:B,anchor:.5,x:A,y:R,ref:u,alpha:I?1:0,...I&&{interactive:!0,pointerdown:z},filters:[rt,gt,H,ct,...G>0?[K]:[]]})})})});Tg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const mO=e=>{const{startAt:t,endAt:r}=e,[n,s]=st.useState(!1),a=W.useRef(null),u=W.useRef(null),l=W.useRef(null),c=W.useRef(null),f=W.useRef(null),p=W.useRef(!1),m=W.useRef(!1),{tl:g,totalDuration:x=0,reverseModeRef:y}=W.useContext(gn),S=()=>{p.current||(p.current=!0,s(!0))},T=()=>{s(!1),p.current=!1},w=()=>{if(y.current&&c.current&&g.current){m.current=!0;const A=g.current.time();A>t&&A<r?(s(()=>!0),p.current=!0,u.current&&(u.current.alpha=1)):(s(()=>!1),p.current=!1,u.current&&(u.current.alpha=0))}},I=A=>{A<.2?(s(!0),p.current=!0):(s(!1),p.current=!1)};return st.useEffect(()=>{const A={onStart:S,onStartParams:[{alpha:1}]},R={onComplete:T,onCompleteParams:[{alpha:t>0?0:1}]},N=Math.max(0,t-1),B=oe.context(()=>{if(a.current&&g.current){const L=oe.from(a.current,{alpha:t<.2?1:0,duration:.5,...A});g.current.add(L,N),g.current.to(a.current,{alpha:0,duration:.5,overwrite:"auto",...R},r-.5),t<.2&&(s(!0),p.current=!0),c.current=oe.to(l.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(t),onStart:S,onStartParams:[{alpha:1}],onUpdate:w,onComplete:T,onCompleteParams:[{alpha:t>0?0:1}]},t),g.current.add(c.current,t),x>.2&&g.current.call(I,[t],x-.3)}});return()=>{var L;(L=c.current)==null||L.kill(),B.revert()}},[t,r,x]),st.useEffect(()=>{p.current=n;const A=oe.context(()=>{u.current&&g.current&&(f.current&&f.current.kill(),f.current=oe.to(u.current,{alpha:1,duration:.5,overwrite:"auto"}),g.current.add(f.current,t))}),R=setTimeout(()=>{var N,B,L,O;if(f.current&&g.current&&c.current&&!((N=f.current)!=null&&N.isActive())&&((B=f.current)==null?void 0:B.time())<.2){const z=(L=c.current)==null?void 0:L.time();(O=f.current)==null||O.time(z)}},50);return()=>{f.current&&f.current.kill(),A.revert(),clearInterval(R)}},[n,t]),Mt.jsx(Yt.Container,{ref:a,alpha:1,children:Mt.jsx(Yt.Container,{ref:l,children:n&&Mt.jsx(Yt.Container,{ref:u,alpha:t<.2?1:0,children:e.children})})})},vO=e=>{const{startAt:t,endAt:r}=e,{setTotalDuration:n}=W.useContext(gn);return st.useEffect(()=>{n&&n(r)},[t,r]),e.children};var wg=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(wg||{}),Sg=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Sg||{});Ht.Animations=wg,Ht.BlendModes=Sg,Ht.Events=ue,Ht.GsapPixieContext=gn,Ht.GsapPixieContextProvider=dv,Ht.PixiAnimatedSprite=_g,Ht.PixiAudioSprite=MC,Ht.PixiGifSprite=bg,Ht.PixiImageSprite=pp,Ht.PixiSequence=mO,Ht.PixiSequenceWrapper=vO,Ht.PixiSvgPathSprite=rC,Ht.PixiTextSprite=dO,Ht.PixiVideoSprite=Tg,Ht.emitCustomEvent=Vn,Ht.newCustomEventEmitter=fv,Ht.useCustomEventListener=we,Object.defineProperty(Ht,Symbol.toStringTag,{value:"Module"})});