reacthub-pixitweenjs 0.2.83 → 0.2.85

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(se,_t){typeof exports=="object"&&typeof module<"u"?_t(exports,require("react"),require("@pixi/react"),require("gsap"),require("pixi.js"),require("reacthub-react-bindings"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","gsap","pixi.js","reacthub-react-bindings","@pixi/sound"],_t):(se=typeof globalThis<"u"?globalThis:se||self,_t(se["reacthub-pixitweenjs"]={},se.React,se.PIXIReact,se.gsap,se.PIXI,se.reacthubReactBindings,se.PIXI.sound))})(this,function(se,_t,ye,Te,ey,ry,ny){"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(_t),on=ac(ey);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 iy(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 lc={exports:{}},Gs={};/**
1
+ (function(se,_t){typeof exports=="object"&&typeof module<"u"?_t(exports,require("react"),require("@pixi/react"),require("gsap"),require("pixi.js"),require("reacthub-react-bindings"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","gsap","pixi.js","reacthub-react-bindings","@pixi/sound"],_t):(se=typeof globalThis<"u"?globalThis:se||self,_t(se["reacthub-pixitweenjs"]={},se.React,se.PIXIReact,se.gsap,se.PIXI,se.reacthubReactBindings,se.PIXI.sound))})(this,function(se,_t,me,Te,ny,iy,sy){"use strict";function lc(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=lc(_t),zr=lc(ny);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 oy(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 uc={exports:{}},Gs={};/**
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 sy=_t,oy=Symbol.for("react.element"),ay=Symbol.for("react.fragment"),ly=Object.prototype.hasOwnProperty,uy=sy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,fy={key:!0,ref:!0,__self:!0,__source:!0};function uc(e,t,r){var n,i={},o=null,l=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)ly.call(t,n)&&!fy.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:oy,type:e,key:o,ref:l,props:i,_owner:uy.current}}Gs.Fragment=ay,Gs.jsx=uc,Gs.jsxs=uc,lc.exports=Gs;var re=lc.exports,Qn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Qn||{});let fc;function cc(){return fc=document.body,fc}function mr(e,t,r){let n;return _t.useEffect(()=>{n=n||cc();const i=o=>{const l=o.detail;t(l)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function Jn(e,t){const r=cc(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function cy(){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 ti=St.createContext({}),ke={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"},hy=({children:e})=>{const[t,r]=_t.useState(!1),n=_t.useRef(),i=_t.useRef(),o=_t.useRef(.001);_t.useLayoutEffect(()=>(i.current=Te.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&Te.killTweensOf(n.current),n.current=Te.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),Te.killTweensOf(n.current)),i.current.revert()}),[]);const l=_t.useCallback(()=>{if(n.current){let b=n.current.time();o.current=b}},[]);_t.useEffect(()=>{if(n.current){const y=n.current;y.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){y.pause(),l()}).eventCallback("onUpdate",function(){l()}).eventCallback("onComplete",function(){y.pause(),y.revert(),Jn(ke.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),l()})}},[]);const u=_t.useCallback(()=>{n.current&&n.current.revert()},[]),f=_t.useCallback(()=>{n.current&&n.current.restart()},[]),h=_t.useCallback(()=>{if(n.current){const y=n.current;y.repeat(1),y.restart()}},[]),p=_t.useCallback(y=>{n.current&&n.current.seek(y)},[]),d=_t.useCallback(()=>{n.current&&n.current.seek(4)},[]),c=_t.useCallback(()=>{const y=n.current;return y?y.totalDuration():0},[]),v=()=>{n.current&&(n.current.pause(),Jn(ke.PAUSE))},m=()=>{n.current&&(n.current.resume(),Jn(ke.RESUME))};return mr(ke.SEEK_START,()=>{r(!0)}),mr(ke.SCRUBBER_PLAY,()=>{m()}),mr(ke.SCRUBBER_PAUSE,()=>{v()}),mr(ke.SCRUBBER_SEEK,y=>{p(y)}),mr(ke.SEEK_END,()=>{r(!1)}),mr(ke.SCRUBBER_PROGRESS_UPDATE,y=>{}),re.jsx(ti.Provider,{value:{gsapCtx:i,tl:n,handlePlay:m,handlePause:v,handleReset:u,handleSeek:p,handleSeekTest:d,handleRestart:f,handleRepeat:h,playerTimeRef:o,isDragging:t,getTimelineDuration:c},children:e})},dy=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:o,onDoubleClick:l,uniqueId:u="",isText:f=!1})=>{const h=on.utils.string2hex("#F3C409"),p=on.utils.string2hex("#F3C409"),d=St.useRef({isDragging:!1}),c=300,v=St.useRef(0),m=St.useCallback(()=>{o&&!d.current.isDragging&&o(!0)},[o]),y=St.useCallback(()=>{o&&!d.current.isDragging&&o(!1)},[o]),b=St.useCallback(()=>{d.current.isDragging=!0;const T=new Date().getTime();T-v.current<c&&l&&l(),v.current=T},[]),_=St.useCallback(T=>{d.current.isDragging=!0,i&&i(T),Jn(ke.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),w=St.useCallback(()=>{if(t.current===null)return;const T=t.current.x,x=t.current.y,S=t.current.width,I=t.current.height,A=t.current.rotation,O=[t.current.scale.x,t.current.scale.y],L=O[0]<0?-1:1,R=O[1]<0?-1:1;n&&(n({uniqueId:u,transformation:{x:Math.round(T),y:Math.round(x),width:Math.round(Math.max(5,S)),height:Math.round(Math.max(5,I)),rotation:A,scale:f?O:[L,R]}}),Jn(ke.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),d.current.isDragging=!1},[n]);return St.useEffect(()=>(e.current&&(e.current.on("mouseover",m),e.current.on("mouseout",y),e.current.on("mousedown",b)),()=>{e.current&&(e.current.off("mouseover",m),e.current.off("mouseout",y),e.current.off("mousedown",b))}),[]),re.jsx(ry.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:h,shape:"circle",radius:10},transformchange:_,transformcommit:w})},py=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:1};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var vy=Object.prototype;function gy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||vy;return e===r}var hc=gy;function my(e,t){return function(r){return e(t(r))}}var yy=my,_y=yy,by=_y(Object.keys,Object),xy=by,wy=hc,Ty=xy,Ey=Object.prototype,Sy=Ey.hasOwnProperty;function Ay(e){if(!wy(e))return Ty(e);var t=[];for(var r in Object(e))Sy.call(e,r)&&r!="constructor"&&t.push(r);return t}var dc=Ay,Oy=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,pc=Oy,Cy=pc,Ry=typeof self=="object"&&self&&self.Object===Object&&self,Iy=Cy||Ry||Function("return this")(),Mr=Iy,Py=Mr,Ny=Py.Symbol,js=Ny,vc=js,gc=Object.prototype,My=gc.hasOwnProperty,ky=gc.toString,Xi=vc?vc.toStringTag:void 0;function Ly(e){var t=My.call(e,Xi),r=e[Xi];try{e[Xi]=void 0;var n=!0}catch{}var i=ky.call(e);return n&&(t?e[Xi]=r:delete e[Xi]),i}var Fy=Ly,By=Object.prototype,Dy=By.toString;function Uy(e){return Dy.call(e)}var $y=Uy,mc=js,Gy=Fy,jy=$y,qy="[object Null]",zy="[object Undefined]",yc=mc?mc.toStringTag:void 0;function Hy(e){return e==null?e===void 0?zy:qy:yc&&yc in Object(e)?Gy(e):jy(e)}var Ki=Hy;function Vy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Yi=Vy,Wy=Ki,Xy=Yi,Ky="[object AsyncFunction]",Yy="[object Function]",Zy="[object GeneratorFunction]",Qy="[object Proxy]";function Jy(e){if(!Xy(e))return!1;var t=Wy(e);return t==Yy||t==Zy||t==Ky||t==Qy}var _c=Jy,t0=Mr,e0=t0["__core-js_shared__"],r0=e0,Ha=r0,bc=function(){var e=/[^.]+$/.exec(Ha&&Ha.keys&&Ha.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function n0(e){return!!bc&&bc in e}var i0=n0,s0=Function.prototype,o0=s0.toString;function a0(e){if(e!=null){try{return o0.call(e)}catch{}try{return e+""}catch{}}return""}var xc=a0,l0=_c,u0=i0,f0=Yi,c0=xc,h0=/[\\^$.*+?()[\]{}|]/g,d0=/^\[object .+?Constructor\]$/,p0=Function.prototype,v0=Object.prototype,g0=p0.toString,m0=v0.hasOwnProperty,y0=RegExp("^"+g0.call(m0).replace(h0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _0(e){if(!f0(e)||u0(e))return!1;var t=l0(e)?y0:d0;return t.test(c0(e))}var b0=_0;function x0(e,t){return e==null?void 0:e[t]}var w0=x0,T0=b0,E0=w0;function S0(e,t){var r=E0(e,t);return T0(r)?r:void 0}var ei=S0,A0=ei,O0=Mr,C0=A0(O0,"DataView"),R0=C0,I0=ei,P0=Mr,N0=I0(P0,"Map"),Va=N0,M0=ei,k0=Mr,L0=M0(k0,"Promise"),F0=L0,B0=ei,D0=Mr,U0=B0(D0,"Set"),$0=U0,G0=ei,j0=Mr,q0=G0(j0,"WeakMap"),z0=q0,Wa=R0,Xa=Va,Ka=F0,Ya=$0,Za=z0,wc=Ki,ri=xc,Tc="[object Map]",H0="[object Object]",Ec="[object Promise]",Sc="[object Set]",Ac="[object WeakMap]",Oc="[object DataView]",V0=ri(Wa),W0=ri(Xa),X0=ri(Ka),K0=ri(Ya),Y0=ri(Za),Sn=wc;(Wa&&Sn(new Wa(new ArrayBuffer(1)))!=Oc||Xa&&Sn(new Xa)!=Tc||Ka&&Sn(Ka.resolve())!=Ec||Ya&&Sn(new Ya)!=Sc||Za&&Sn(new Za)!=Ac)&&(Sn=function(e){var t=wc(e),r=t==H0?e.constructor:void 0,n=r?ri(r):"";if(n)switch(n){case V0:return Oc;case W0:return Tc;case X0:return Ec;case K0:return Sc;case Y0:return Ac}return t});var Cc=Sn;function Z0(e){return e!=null&&typeof e=="object"}var Zi=Z0,Q0=Ki,J0=Zi,t1="[object Arguments]";function e1(e){return J0(e)&&Q0(e)==t1}var r1=e1,Rc=r1,n1=Zi,Ic=Object.prototype,i1=Ic.hasOwnProperty,s1=Ic.propertyIsEnumerable,o1=Rc(function(){return arguments}())?Rc:function(e){return n1(e)&&i1.call(e,"callee")&&!s1.call(e,"callee")},Qa=o1,a1=Array.isArray,kr=a1,l1=9007199254740991;function u1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=l1}var Ja=u1,f1=_c,c1=Ja;function h1(e){return e!=null&&c1(e.length)&&!f1(e)}var qs=h1,zs={exports:{}};function d1(){return!1}var p1=d1;zs.exports,function(e,t){var r=Mr,n=p1,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(zs,zs.exports);var tl=zs.exports,v1=Ki,g1=Ja,m1=Zi,y1="[object Arguments]",_1="[object Array]",b1="[object Boolean]",x1="[object Date]",w1="[object Error]",T1="[object Function]",E1="[object Map]",S1="[object Number]",A1="[object Object]",O1="[object RegExp]",C1="[object Set]",R1="[object String]",I1="[object WeakMap]",P1="[object ArrayBuffer]",N1="[object DataView]",M1="[object Float32Array]",k1="[object Float64Array]",L1="[object Int8Array]",F1="[object Int16Array]",B1="[object Int32Array]",D1="[object Uint8Array]",U1="[object Uint8ClampedArray]",$1="[object Uint16Array]",G1="[object Uint32Array]",le={};le[M1]=le[k1]=le[L1]=le[F1]=le[B1]=le[D1]=le[U1]=le[$1]=le[G1]=!0,le[y1]=le[_1]=le[P1]=le[b1]=le[N1]=le[x1]=le[w1]=le[T1]=le[E1]=le[S1]=le[A1]=le[O1]=le[C1]=le[R1]=le[I1]=!1;function j1(e){return m1(e)&&g1(e.length)&&!!le[v1(e)]}var q1=j1;function z1(e){return function(t){return e(t)}}var H1=z1,Hs={exports:{}};Hs.exports,function(e,t){var r=pc,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,l=o&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}}();e.exports=u}(Hs,Hs.exports);var V1=Hs.exports,W1=q1,X1=H1,Pc=V1,Nc=Pc&&Pc.isTypedArray,K1=Nc?X1(Nc):W1,el=K1,Y1=dc,Z1=Cc,Q1=Qa,J1=kr,t_=qs,e_=tl,r_=hc,n_=el,i_="[object Map]",s_="[object Set]",o_=Object.prototype,a_=o_.hasOwnProperty;function l_(e){if(e==null)return!0;if(t_(e)&&(J1(e)||typeof e=="string"||typeof e.splice=="function"||e_(e)||n_(e)||Q1(e)))return!e.length;var t=Z1(e);if(t==i_||t==s_)return!e.size;if(r_(e))return!Y1(e).length;for(var r in e)if(a_.call(e,r))return!1;return!0}var u_=l_;const Qi=En(u_),f_=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],ni=St.forwardRef((e,t)=>{const[r,n]=St.useState(!1),[i,o]=_t.useState(!1),[l,u]=_t.useState(!1),[f,h]=_t.useState(e.initialAlpha),p=_t.useRef(null),d=_t.useRef(null),c=_t.useRef(null),v=_t.useRef(null),m=_t.useRef(e.initialAlpha),{tl:y}=_t.useContext(ti),{uniqueId:b,startAt:_,endAt:w,initialAlpha:T,transformation:{x,y:S,width:I,height:A,scale:O=[1,1],rotation:L=0,animation:R,effect:C},applyTransformer:P,disabled:M,ignoreTlForVideo:F,pointerdown:q,pointerout:Z,pointerover:z,isText:nt,isDragging:W,isGif:D,onDoubleClick:k,isTextEditMode:j}=e;mr(ke.COMPLETE,()=>{p.current&&(m.current=T,h(T))}),St.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>l}),[i,l]),St.useEffect(()=>{p.current&&n(!0)},[]);const G=St.useCallback(()=>{u(!0),z&&z()},[]),Y=()=>{console.log("reverse complete"),m.current=T,h(T)},X=st=>{m.current=st.alpha,h(st.alpha)},$=st=>{m.current=st.alpha,h(st.alpha)};St.useEffect(()=>{let st=Te.context(()=>{});if(p.current&&y.current){const dt={duration:Number(w)-Number(_)},gt={onStart:X,onReverseComplete:Y,onStartParams:[{alpha:1}]},yt={onComplete:$,onCompleteParams:[{alpha:0}]},Tt=py(R||"None");st=Te.context(()=>{var te,Lt;Qi(Tt.from)?Qi(Tt.to)?Qi(Tt.fromTo)?y.current.to(p.current,{alpha:1,duration:.1,...gt},_).to(p.current,{alpha:0,duration:.1,...yt},Number(w)-.09):y.current.fromTo(p.current,(te=Tt.fromTo)==null?void 0:te.from,{...(Lt=Tt.fromTo)==null?void 0:Lt.to,...gt},_).to(p.current,{alpha:0,duration:.1,...yt},Number(w)-.09):y.current.to(p.current,{alpha:1,duration:.1,...Tt.to,...gt},_).to(p.current,{alpha:0,duration:.1,...yt},Number(w)-.09):y.current.from(p.current,{...Tt.from},_).to(p.current,{alpha:1,duration:.1,...gt},_).to(p.current,{alpha:0,duration:.1,...yt},Number(w)-.09),F||y.current.from(p.current,{...dt},_)})}return()=>{y.current&&(y.current.progress(0).kill(),Te.killTweensOf(y.current)),st.revert()}},[R,_,w,F]);const V=St.useCallback(()=>{o(!0)},[]),tt=St.useCallback(st=>{console.log("changeEnd",st),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(st)),o(!1)},[]),et=ye.withFilters(ye.Container,{matrix:on.filters.ColorMatrixFilter});console.log("abstraction props",e),console.log("alphaRef",b,m.current,f,T);const it=m.current||f;return re.jsxs(ye.Container,{ref:d,children:[re.jsxs(ye.Container,{ref:p,alpha:it,position:[x,S],pivot:[x,S],width:I,height:A,scale:O,rotation:L,...!M&&!i&&!W&&it>0&&{interactive:!0,buttonMode:!0,pointerdown:q,pointerover:z,pointerout:Z},children:[!D&&re.jsx(et,{scale:1,apply:({matrix:st})=>{C===Qn.BlackAndWhite?st.desaturate():C===Qn.Sepia?st.sepia():C===Qn.RetroVintage||C===Qn.NightVision?st.negative():C===Qn.Normal&&st.reset()},matrix:{enabled:!0,matrix:f_},children:re.jsx(ye.Container,{ref:c,children:e.children})}),D&&re.jsx(ye.Container,{ref:c,children:e.children})]}),P&&!j&&re.jsx(dy,{pixiTransformerRef:v,imageRef:p,isMounted:r,transformCommit:tt,transformChange:V,mouseoverEvent:G,uniqueId:b,isText:nt,onDoubleClick:k})]})});ni.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var An=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(An||{}),Mc=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Mc||{}),rl=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(rl||{}),Rt=(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))(Rt||{}),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||{}),Wt=(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))(Wt||{}),nl=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(nl||{}),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||{}),On=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(On||{}),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||{}),Cn=(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))(Cn||{}),il=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(il||{}),or=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(or||{}),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||{}),we=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(we||{}),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 Ut={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 sl=/iPhone/i,kc=/iPod/i,Lc=/iPad/i,Fc=/\biOS-universal(?:.+)Mac\b/i,ol=/\bAndroid(?:.+)Mobile\b/i,Bc=/Android/i,si=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Vs=/Silk/i,zr=/Windows Phone/i,Dc=/\bWindows(?:.+)ARM\b/i,Uc=/BlackBerry/i,$c=/BB10/i,Gc=/Opera Mini/i,jc=/\b(CriOS|Chrome)(?:.+)Mobile/i,qc=/Mobile(?:.+)Firefox\b/i,zc=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function c_(e){return function(t){return t.test(e)}}function Hc(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=c_(r),o={apple:{phone:i(sl)&&!i(zr),ipod:i(kc),tablet:!i(sl)&&(i(Lc)||zc(t))&&!i(zr),universal:i(Fc),device:(i(sl)||i(kc)||i(Lc)||i(Fc)||zc(t))&&!i(zr)},amazon:{phone:i(si),tablet:!i(si)&&i(Vs),device:i(si)||i(Vs)},android:{phone:!i(zr)&&i(si)||!i(zr)&&i(ol),tablet:!i(zr)&&!i(si)&&!i(ol)&&(i(Vs)||i(Bc)),device:!i(zr)&&(i(si)||i(Vs)||i(ol)||i(Bc))||i(/\bokhttp\b/i)},windows:{phone:i(zr),tablet:i(Dc),device:i(zr)||i(Dc)},other:{blackberry:i(Uc),blackberry10:i($c),opera:i(Gc),firefox:i(qc),chrome:i(jc),device:i(Uc)||i($c)||i(Gc)||i(qc)||i(jc)},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=(Hc.default??Hc)(globalThis.navigator);Ut.RETINA_PREFIX=/@([0-9\.]+)x/,Ut.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Vc={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,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,d,c){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,d||f,c),m=r?r+h:h;return f._events[m]?f._events[m].fn?f._events[m]=[f._events[m],v]:f._events[m].push(v):(f._events[m]=v,f._eventsCount++),f}function l(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=[],p,d;if(this._eventsCount===0)return h;for(d in p=this._events)t.call(p,d)&&h.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},u.prototype.listeners=function(h){var p=r?r+h:h,d=this._events[p];if(!d)return[];if(d.fn)return[d.fn];for(var c=0,v=d.length,m=new Array(v);c<v;c++)m[c]=d[c].fn;return m},u.prototype.listenerCount=function(h){var p=r?r+h:h,d=this._events[p];return d?d.fn?1:d.length:0},u.prototype.emit=function(h,p,d,c,v,m){var y=r?r+h:h;if(!this._events[y])return!1;var b=this._events[y],_=arguments.length,w,T;if(b.fn){switch(b.once&&this.removeListener(h,b.fn,void 0,!0),_){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,p),!0;case 3:return b.fn.call(b.context,p,d),!0;case 4:return b.fn.call(b.context,p,d,c),!0;case 5:return b.fn.call(b.context,p,d,c,v),!0;case 6:return b.fn.call(b.context,p,d,c,v,m),!0}for(T=1,w=new Array(_-1);T<_;T++)w[T-1]=arguments[T];b.fn.apply(b.context,w)}else{var x=b.length,S;for(T=0;T<x;T++)switch(b[T].once&&this.removeListener(h,b[T].fn,void 0,!0),_){case 1:b[T].fn.call(b[T].context);break;case 2:b[T].fn.call(b[T].context,p);break;case 3:b[T].fn.call(b[T].context,p,d);break;case 4:b[T].fn.call(b[T].context,p,d,c);break;default:if(!w)for(S=1,w=new Array(_-1);S<_;S++)w[S-1]=arguments[S];b[T].fn.apply(b[T].context,w)}}return!0},u.prototype.on=function(h,p,d){return o(this,h,p,d,!1)},u.prototype.once=function(h,p,d){return o(this,h,p,d,!0)},u.prototype.removeListener=function(h,p,d,c){var v=r?r+h:h;if(!this._events[v])return this;if(!p)return l(this,v),this;var m=this._events[v];if(m.fn)m.fn===p&&(!c||m.once)&&(!d||m.context===d)&&l(this,v);else{for(var y=0,b=[],_=m.length;y<_;y++)(m[y].fn!==p||c&&!m[y].once||d&&m[y].context!==d)&&b.push(m[y]);b.length?this._events[v]=b.length===1?b[0]:b:l(this,v)}return this},u.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&l(this,p)):(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})(Vc);var h_=Vc.exports;const Ws=En(h_);var al={exports:{}};al.exports=Xs,al.exports.default=Xs;function Xs(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Wc(e,0,i,r,!0),l=[];if(!o||o.next===o.prev)return l;var u,f,h,p,d,c,v;if(n&&(o=m_(e,t,o,r)),e.length>80*r){u=h=e[0],f=p=e[1];for(var m=r;m<i;m+=r)d=e[m],c=e[m+1],d<u&&(u=d),c<f&&(f=c),d>h&&(h=d),c>p&&(p=c);v=Math.max(h-u,p-f),v=v!==0?32767/v:0}return ts(o,l,r,u,f,v,0),l}function Wc(e,t,r,n,i){var o,l;if(i===fl(e,t,r,n)>0)for(o=t;o<r;o+=n)l=Yc(o,e[o],e[o+1],l);else for(o=r-n;o>=t;o-=n)l=Yc(o,e[o],e[o+1],l);return l&&Ks(l,l.next)&&(rs(l),l=l.next),l}function Rn(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Ks(r,r.next)||de(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,l){if(e){!l&&o&&w_(e,n,i,o);for(var u=e,f,h;e.prev!==e.next;){if(f=e.prev,h=e.next,o?p_(e,n,i,o):d_(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){l?l===1?(e=v_(Rn(e),t,r),ts(e,t,r,n,i,o,2)):l===2&&g_(e,t,r,n,i,o):ts(Rn(e),t,r,n,i,o,1);break}}}}function d_(e){var t=e.prev,r=e,n=e.next;if(de(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,l=n.x,u=t.y,f=r.y,h=n.y,p=i<o?i<l?i:l:o<l?o:l,d=u<f?u<h?u:h:f<h?f:h,c=i>o?i>l?i:l:o>l?o:l,v=u>f?u>h?u:h:f>h?f:h,m=n.next;m!==t;){if(m.x>=p&&m.x<=c&&m.y>=d&&m.y<=v&&ai(i,u,o,f,l,h,m.x,m.y)&&de(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function p_(e,t,r,n){var i=e.prev,o=e,l=e.next;if(de(i,o,l)>=0)return!1;for(var u=i.x,f=o.x,h=l.x,p=i.y,d=o.y,c=l.y,v=u<f?u<h?u:h:f<h?f:h,m=p<d?p<c?p:c:d<c?d:c,y=u>f?u>h?u:h:f>h?f:h,b=p>d?p>c?p:c:d>c?d:c,_=ll(v,m,t,r,n),w=ll(y,b,t,r,n),T=e.prevZ,x=e.nextZ;T&&T.z>=_&&x&&x.z<=w;){if(T.x>=v&&T.x<=y&&T.y>=m&&T.y<=b&&T!==i&&T!==l&&ai(u,p,f,d,h,c,T.x,T.y)&&de(T.prev,T,T.next)>=0||(T=T.prevZ,x.x>=v&&x.x<=y&&x.y>=m&&x.y<=b&&x!==i&&x!==l&&ai(u,p,f,d,h,c,x.x,x.y)&&de(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;T&&T.z>=_;){if(T.x>=v&&T.x<=y&&T.y>=m&&T.y<=b&&T!==i&&T!==l&&ai(u,p,f,d,h,c,T.x,T.y)&&de(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;x&&x.z<=w;){if(x.x>=v&&x.x<=y&&x.y>=m&&x.y<=b&&x!==i&&x!==l&&ai(u,p,f,d,h,c,x.x,x.y)&&de(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function v_(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Ks(i,o)&&Xc(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 Rn(n)}function g_(e,t,r,n,i,o){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&S_(l,u)){var f=Kc(l,u);l=Rn(l,l.next),f=Rn(f,f.next),ts(l,t,r,n,i,o,0),ts(f,t,r,n,i,o,0);return}u=u.next}l=l.next}while(l!==e)}function m_(e,t,r,n){var i=[],o,l,u,f,h;for(o=0,l=t.length;o<l;o++)u=t[o]*n,f=o<l-1?t[o+1]*n:e.length,h=Wc(e,u,f,n,!1),h===h.next&&(h.steiner=!0),i.push(E_(h));for(i.sort(y_),o=0;o<i.length;o++)r=__(i[o],r);return r}function y_(e,t){return e.x-t.x}function __(e,t){var r=b_(e,t);if(!r)return t;var n=Kc(r,e);return Rn(n,n.next),Rn(r,r.next)}function b_(e,t){var r=t,n=e.x,i=e.y,o=-1/0,l;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,l=r.x<r.next.x?r:r.next,u===n))return l}r=r.next}while(r!==t);if(!l)return null;var f=l,h=l.x,p=l.y,d=1/0,c;r=l;do n>=r.x&&r.x>=h&&n!==r.x&&ai(i<p?n:o,i,h,p,i<p?o:n,i,r.x,r.y)&&(c=Math.abs(i-r.y)/(n-r.x),es(r,e)&&(c<d||c===d&&(r.x>l.x||r.x===l.x&&x_(l,r)))&&(l=r,d=c)),r=r.next;while(r!==f);return l}function x_(e,t){return de(e.prev,e,t.prev)<0&&de(t.next,e,e.next)<0}function w_(e,t,r,n){var i=e;do i.z===0&&(i.z=ll(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,T_(i)}function T_(e){var t,r,n,i,o,l,u,f,h=1;do{for(r=e,e=null,o=null,l=0;r;){for(l++,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(l>1);return e}function ll(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 E_(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,l,u){return(i-l)*(t-u)>=(e-l)*(o-u)&&(e-l)*(n-u)>=(r-l)*(t-u)&&(r-l)*(o-u)>=(i-l)*(n-u)}function S_(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!A_(e,t)&&(es(e,t)&&es(t,e)&&O_(e,t)&&(de(e.prev,e,t.prev)||de(e,t.prev,t))||Ks(e,t)&&de(e.prev,e,e.next)>0&&de(t.prev,t,t.next)>0)}function de(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 Xc(e,t,r,n){var i=Zs(de(e,t,r)),o=Zs(de(e,t,n)),l=Zs(de(r,n,e)),u=Zs(de(r,n,t));return!!(i!==o&&l!==u||i===0&&Ys(e,r,t)||o===0&&Ys(e,n,t)||l===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 A_(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&&Xc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function es(e,t){return de(e.prev,e,e.next)<0?de(e,t,e.next)>=0&&de(e,e.prev,t)>=0:de(e,t,e.prev)<0||de(e,e.next,t)<0}function O_(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 Kc(e,t){var r=new ul(e.i,e.x,e.y),n=new ul(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 Yc(e,t,r,n){var i=new ul(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 ul(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,l=Math.abs(fl(e,0,o,r));if(i)for(var u=0,f=t.length;u<f;u++){var h=t[u]*r,p=u<f-1?t[u+1]*r:e.length;l-=Math.abs(fl(e,h,p,r))}var d=0;for(u=0;u<n.length;u+=3){var c=n[u]*r,v=n[u+1]*r,m=n[u+2]*r;d+=Math.abs((e[c]-e[m])*(e[v+1]-e[c+1])-(e[c]-e[v])*(e[m+1]-e[c+1]))}return l===0&&d===0?0:Math.abs((d-l)/l)};function fl(e,t,r,n){for(var i=0,o=t,l=r-n;o<r;o+=n)i+=(e[l]-e[o])*(e[o+1]+e[l+1]),l=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 l=0;l<t;l++)r.vertices.push(e[i][o][l]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var C_=al.exports;const R_=En(C_);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 l,u=2147483647,f=36,h=1,p=26,d=38,c=700,v=72,m=128,y="-",b=/^xn--/,_=/[^\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,S=Math.floor,I=String.fromCharCode,A;function O(D){throw new RangeError(T[D])}function L(D,k){for(var j=D.length,G=[];j--;)G[j]=k(D[j]);return G}function R(D,k){var j=D.split("@"),G="";j.length>1&&(G=j[0]+"@",D=j[1]),D=D.replace(w,".");var Y=D.split("."),X=L(Y,k).join(".");return G+X}function C(D){for(var k=[],j=0,G=D.length,Y,X;j<G;)Y=D.charCodeAt(j++),Y>=55296&&Y<=56319&&j<G?(X=D.charCodeAt(j++),(X&64512)==56320?k.push(((Y&1023)<<10)+(X&1023)+65536):(k.push(Y),j--)):k.push(Y);return k}function P(D){return L(D,function(k){var j="";return k>65535&&(k-=65536,j+=I(k>>>10&1023|55296),k=56320|k&1023),j+=I(k),j}).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,j){var G=0;for(D=j?S(D/c):D>>1,D+=S(D/k);D>x*p>>1;G+=f)D=S(D/x);return S(G+(x+1)*D/(D+d))}function Z(D){var k=[],j=D.length,G,Y=0,X=m,$=v,V,tt,et,it,st,dt,gt,yt,Tt;for(V=D.lastIndexOf(y),V<0&&(V=0),tt=0;tt<V;++tt)D.charCodeAt(tt)>=128&&O("not-basic"),k.push(D.charCodeAt(tt));for(et=V>0?V+1:0;et<j;){for(it=Y,st=1,dt=f;et>=j&&O("invalid-input"),gt=M(D.charCodeAt(et++)),(gt>=f||gt>S((u-Y)/st))&&O("overflow"),Y+=gt*st,yt=dt<=$?h:dt>=$+p?p:dt-$,!(gt<yt);dt+=f)Tt=f-yt,st>S(u/Tt)&&O("overflow"),st*=Tt;G=k.length+1,$=q(Y-it,G,it==0),S(Y/G)>u-X&&O("overflow"),X+=S(Y/G),Y%=G,k.splice(Y++,0,X)}return P(k)}function z(D){var k,j,G,Y,X,$,V,tt,et,it,st,dt=[],gt,yt,Tt,te;for(D=C(D),gt=D.length,k=m,j=0,X=v,$=0;$<gt;++$)st=D[$],st<128&&dt.push(I(st));for(G=Y=dt.length,Y&&dt.push(y);G<gt;){for(V=u,$=0;$<gt;++$)st=D[$],st>=k&&st<V&&(V=st);for(yt=G+1,V-k>S((u-j)/yt)&&O("overflow"),j+=(V-k)*yt,k=V,$=0;$<gt;++$)if(st=D[$],st<k&&++j>u&&O("overflow"),st==k){for(tt=j,et=f;it=et<=X?h:et>=X+p?p:et-X,!(tt<it);et+=f)te=tt-it,Tt=f-it,dt.push(I(F(it+te%Tt,0))),tt=S(te/Tt);dt.push(I(F(tt,0))),X=q(j,yt,G==Y),j=0,++G}++j,++k}return dt.join("")}function nt(D){return R(D,function(k){return b.test(k)?Z(k.slice(4).toLowerCase()):k})}function W(D){return R(D,function(k){return _.test(k)?"xn--"+z(k):k})}if(l={version:"1.4.1",ucs2:{decode:C,encode:P},decode:Z,encode:z,toASCII:W,toUnicode:nt},n&&i)if(e.exports==n)i.exports=l;else for(A in l)l.hasOwnProperty(A)&&(n[A]=l[A]);else r.punycode=l})(Ye)}(Qs,Qs.exports);var I_=Qs.exports,P_=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 l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},Zc=typeof Symbol<"u"&&Symbol,N_=P_,M_=function(){return typeof Zc!="function"||typeof Symbol!="function"||typeof Zc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:N_()},Qc={foo:{}},k_=Object,L_=function(){return{__proto__:Qc}.foo===Qc.foo&&!({__proto__:null}instanceof k_)},F_="Function.prototype.bind called on incompatible ",cl=Array.prototype.slice,B_=Object.prototype.toString,D_="[object Function]",U_=function(t){var r=this;if(typeof r!="function"||B_.call(r)!==D_)throw new TypeError(F_+r);for(var n=cl.call(arguments,1),i,o=function(){if(this instanceof i){var p=r.apply(this,n.concat(cl.call(arguments)));return Object(p)===p?p:this}else return r.apply(t,n.concat(cl.call(arguments)))},l=Math.max(0,r.length-n.length),u=[],f=0;f<l;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},$_=U_,hl=Function.prototype.bind||$_,G_=hl,j_=G_.call(Function.call,Object.prototype.hasOwnProperty),Gt,li=SyntaxError,Jc=Function,ui=TypeError,dl=function(e){try{return Jc('"use strict"; return ('+e+").constructor;")()}catch{}},In=Object.getOwnPropertyDescriptor;if(In)try{In({},"")}catch{In=null}var pl=function(){throw new ui},q_=In?function(){try{return arguments.callee,pl}catch{try{return In(arguments,"callee").get}catch{return pl}}}():pl,fi=M_(),z_=L_(),Oe=Object.getPrototypeOf||(z_?function(e){return e.__proto__}:null),ci={},H_=typeof Uint8Array>"u"||!Oe?Gt:Oe(Uint8Array),Pn={"%AggregateError%":typeof AggregateError>"u"?Gt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Gt:ArrayBuffer,"%ArrayIteratorPrototype%":fi&&Oe?Oe([][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%":Jc,"%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&&Oe?Oe(Oe([][Symbol.iterator]())):Gt,"%JSON%":typeof JSON=="object"?JSON:Gt,"%Map%":typeof Map>"u"?Gt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!fi||!Oe?Gt:Oe(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||!Oe?Gt:Oe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Gt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":fi&&Oe?Oe(""[Symbol.iterator]()):Gt,"%Symbol%":fi?Symbol:Gt,"%SyntaxError%":li,"%ThrowTypeError%":q_,"%TypedArray%":H_,"%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(Oe)try{null.error}catch(e){var V_=Oe(Oe(e));Pn["%Error.prototype%"]=V_}var W_=function e(t){var r;if(t==="%AsyncFunction%")r=dl("async function () {}");else if(t==="%GeneratorFunction%")r=dl("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=dl("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Oe&&(r=Oe(i.prototype))}return Pn[t]=r,r},th={"%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=hl,Js=j_,X_=ns.call(Function.call,Array.prototype.concat),K_=ns.call(Function.apply,Array.prototype.splice),eh=ns.call(Function.call,String.prototype.replace),to=ns.call(Function.call,String.prototype.slice),Y_=ns.call(Function.call,RegExp.prototype.exec),Z_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Q_=/\\(\\)?/g,J_=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 eh(t,Z_,function(o,l,u,f){i[i.length]=u?eh(f,Q_,"$1"):l||o}),i},tb=function(t,r){var n=t,i;if(Js(th,n)&&(i=th[n],n="%"+i[0]+"%"),Js(Pn,n)){var o=Pn[n];if(o===ci&&(o=W_(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!")},vl=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(Y_(/^%?[^%]*%?$/,t)===null)throw new li("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=J_(t),i=n.length>0?n[0]:"",o=tb("%"+i+"%",r),l=o.name,u=o.value,f=!1,h=o.alias;h&&(i=h[0],K_(n,X_([0,1],h)));for(var p=1,d=!0;p<n.length;p+=1){var c=n[p],v=to(c,0,1),m=to(c,-1);if((v==='"'||v==="'"||v==="`"||m==='"'||m==="'"||m==="`")&&v!==m)throw new li("property names with quotes must have matching quotes");if((c==="constructor"||!d)&&(f=!0),i+="."+c,l="%"+i+"%",Js(Pn,l))u=Pn[l];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(In&&p+1>=n.length){var y=In(u,c);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?u=y.get:u=u[c]}else d=Js(u,c),u=u[c];d&&!f&&(Pn[l]=u)}}return u},rh={exports:{}};(function(e){var t=hl,r=vl,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||t.call(i,n),l=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(d){var c=o(t,i,arguments);if(l&&u){var v=l(c,"length");v.configurable&&u(c,"length",{value:1+f(0,d.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})(rh);var eb=rh.exports,nh=vl,ih=eb,rb=ih(nh("String.prototype.indexOf")),nb=function(t,r){var n=nh(t,!!r);return typeof n=="function"&&rb(t,".prototype.")>-1?ih(n):n};const ib=iy(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var gl=typeof Map=="function"&&Map.prototype,ml=Object.getOwnPropertyDescriptor&&gl?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,eo=gl&&ml&&typeof ml.get=="function"?ml.get:null,sh=gl&&Map.prototype.forEach,yl=typeof Set=="function"&&Set.prototype,_l=Object.getOwnPropertyDescriptor&&yl?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ro=yl&&_l&&typeof _l.get=="function"?_l.get:null,oh=yl&&Set.prototype.forEach,sb=typeof WeakMap=="function"&&WeakMap.prototype,is=sb?WeakMap.prototype.has:null,ob=typeof WeakSet=="function"&&WeakSet.prototype,ss=ob?WeakSet.prototype.has:null,ab=typeof WeakRef=="function"&&WeakRef.prototype,ah=ab?WeakRef.prototype.deref:null,lb=Boolean.prototype.valueOf,ub=Object.prototype.toString,fb=Function.prototype.toString,cb=String.prototype.match,bl=String.prototype.slice,un=String.prototype.replace,hb=String.prototype.toUpperCase,lh=String.prototype.toLowerCase,uh=RegExp.prototype.test,fh=Array.prototype.concat,Br=Array.prototype.join,db=Array.prototype.slice,ch=Math.floor,xl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,wl=Object.getOwnPropertySymbols,Tl=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,hh=Object.prototype.propertyIsEnumerable,dh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function ph(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||uh.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ch(-e):ch(e);if(n!==e){var i=String(n),o=bl.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 El=ib,vh=El.custom,gh=_h(vh)?vh:null,pb=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 l=fn(o,"customInspect")?o.customInspect:!0;if(typeof l!="boolean"&&l!=="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 xh(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var f=String(t);return u?ph(t,f):f}if(typeof t=="bigint"){var h=String(t)+"n";return u?ph(t,h):h}var p=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof t=="object")return Sl(t)?"[Array]":"[Object]";var d=Nb(o,n);if(typeof i>"u")i=[];else if(bh(i,t)>=0)return"[Circular]";function c(M,F,q){if(F&&(i=db.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"&&!yh(t)){var v=Tb(t),m=no(t,c);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(m.length>0?" { "+Br.call(m,", ")+" }":"")}if(_h(t)){var y=hi?un.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Tl.call(t);return typeof t=="object"&&!hi?os(y):y}if(Rb(t)){for(var b="<"+lh.call(String(t.nodeName)),_=t.attributes||[],w=0;w<_.length;w++)b+=" "+_[w].name+"="+mh(vb(_[w].value),"double",o);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+lh.call(String(t.nodeName))+">",b}if(Sl(t)){if(t.length===0)return"[]";var T=no(t,c);return d&&!Pb(T)?"["+Ol(T,d)+"]":"[ "+Br.call(T,", ")+" ]"}if(mb(t)){var x=no(t,c);return!("cause"in Error.prototype)&&"cause"in t&&!hh.call(t,"cause")?"{ ["+String(t)+"] "+Br.call(fh.call("[cause]: "+c(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Br.call(x,", ")+" }"}if(typeof t=="object"&&l){if(gh&&typeof t[gh]=="function"&&El)return El(t,{depth:p-n});if(l!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Eb(t)){var S=[];return sh&&sh.call(t,function(M,F){S.push(c(F,t,!0)+" => "+c(M,t))}),wh("Map",eo.call(t),S,d)}if(Ob(t)){var I=[];return oh&&oh.call(t,function(M){I.push(c(M,t))}),wh("Set",ro.call(t),I,d)}if(Sb(t))return Al("WeakMap");if(Cb(t))return Al("WeakSet");if(Ab(t))return Al("WeakRef");if(_b(t))return os(c(Number(t)));if(xb(t))return os(c(xl.call(t)));if(bb(t))return os(lb.call(t));if(yb(t))return os(c(String(t)));if(!gb(t)&&!yh(t)){var A=no(t,c),O=dh?dh(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",R=!O&&Le&&Object(t)===t&&Le in t?bl.call(cn(t),8,-1):L?"Object":"",C=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",P=C+(R||L?"["+Br.call(fh.call([],R||[],L||[]),": ")+"] ":"");return A.length===0?P+"{}":d?P+"{"+Ol(A,d)+"}":P+"{ "+Br.call(A,", ")+" }"}return String(t)};function mh(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function vb(e){return un.call(String(e),/"/g,"&quot;")}function Sl(e){return cn(e)==="[object Array]"&&(!Le||!(typeof e=="object"&&Le in e))}function gb(e){return cn(e)==="[object Date]"&&(!Le||!(typeof e=="object"&&Le in e))}function yh(e){return cn(e)==="[object RegExp]"&&(!Le||!(typeof e=="object"&&Le in e))}function mb(e){return cn(e)==="[object Error]"&&(!Le||!(typeof e=="object"&&Le in e))}function yb(e){return cn(e)==="[object String]"&&(!Le||!(typeof e=="object"&&Le in e))}function _b(e){return cn(e)==="[object Number]"&&(!Le||!(typeof e=="object"&&Le in e))}function bb(e){return cn(e)==="[object Boolean]"&&(!Le||!(typeof e=="object"&&Le in e))}function _h(e){if(hi)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Tl)return!1;try{return Tl.call(e),!0}catch{}return!1}function xb(e){if(!e||typeof e!="object"||!xl)return!1;try{return xl.call(e),!0}catch{}return!1}var wb=Object.prototype.hasOwnProperty||function(e){return e in this};function fn(e,t){return wb.call(e,t)}function cn(e){return ub.call(e)}function Tb(e){if(e.name)return e.name;var t=cb.call(fb.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function bh(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 Eb(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 Sb(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 Ab(e){if(!ah||!e||typeof e!="object")return!1;try{return ah.call(e),!0}catch{}return!1}function Ob(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 Cb(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 Rb(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function xh(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return xh(bl.call(e,0,t.maxStringLength),t)+n}var i=un.call(un.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ib);return mh(i,"single",t)}function Ib(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":"")+hb.call(t.toString(16))}function os(e){return"Object("+e+")"}function Al(e){return e+" { ? }"}function wh(e,t,r,n){var i=n?Ol(r,n):Br.call(r,", ");return e+" ("+t+") {"+i+"}"}function Pb(e){for(var t=0;t<e.length;t++)if(bh(e[t],`
10
- `)>=0)return!1;return!0}function Nb(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 Ol(e,t){if(e.length===0)return"";var r=`
9
+ */var ay=_t,ly=Symbol.for("react.element"),uy=Symbol.for("react.fragment"),fy=Object.prototype.hasOwnProperty,cy=ay.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,hy={key:!0,ref:!0,__self:!0,__source:!0};function fc(e,t,r){var n,i={},o=null,l=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(n in t)fy.call(t,n)&&!hy.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:ly,type:e,key:o,ref:l,props:i,_owner:cy.current}}Gs.Fragment=uy,Gs.jsx=fc,Gs.jsxs=fc,uc.exports=Gs;var Yt=uc.exports,Sn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Sn||{});let cc;function hc(){return cc=document.body,cc}function mr(e,t,r){let n;return _t.useEffect(()=>{n=n||hc();const i=o=>{const l=o.detail;t(l)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function Jn(e,t){const r=hc(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function dy(){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 ti=Et.createContext({}),ke={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"},py=({children:e})=>{const[t,r]=_t.useState(!1),n=_t.useRef(),i=_t.useRef(),o=_t.useRef(.001);_t.useLayoutEffect(()=>(i.current=Te.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&Te.killTweensOf(n.current),n.current=Te.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),Te.killTweensOf(n.current)),i.current.revert()}),[]);const l=_t.useCallback(()=>{if(n.current){let _=n.current.time();o.current=_}},[]);_t.useEffect(()=>{if(n.current){const y=n.current;y.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){y.pause(),l()}).eventCallback("onUpdate",function(){l()}).eventCallback("onComplete",function(){y.pause(),y.revert(),Jn(ke.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),l()})}},[]);const u=_t.useCallback(()=>{n.current&&n.current.revert()},[]),f=_t.useCallback(()=>{n.current&&n.current.restart()},[]),h=_t.useCallback(()=>{if(n.current){const y=n.current;y.repeat(1),y.restart()}},[]),p=_t.useCallback(y=>{n.current&&n.current.seek(y)},[]),d=_t.useCallback(()=>{n.current&&n.current.seek(4)},[]),c=_t.useCallback(()=>{const y=n.current;return y?y.totalDuration():0},[]),v=()=>{n.current&&(n.current.pause(),Jn(ke.PAUSE))},m=()=>{n.current&&(n.current.resume(),Jn(ke.RESUME))};return mr(ke.SEEK_START,()=>{r(!0)}),mr(ke.SCRUBBER_PLAY,()=>{m()}),mr(ke.SCRUBBER_PAUSE,()=>{v()}),mr(ke.SCRUBBER_SEEK,y=>{p(y)}),mr(ke.SEEK_END,()=>{r(!1)}),mr(ke.SCRUBBER_PROGRESS_UPDATE,y=>{}),Yt.jsx(ti.Provider,{value:{gsapCtx:i,tl:n,handlePlay:m,handlePause:v,handleReset:u,handleSeek:p,handleSeekTest:d,handleRestart:f,handleRepeat:h,playerTimeRef:o,isDragging:t,getTimelineDuration:c},children:e})},vy=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:o,onDoubleClick:l,uniqueId:u="",isText:f=!1})=>{const h=zr.utils.string2hex("#F3C409"),p=zr.utils.string2hex("#F3C409"),d=Et.useRef({isDragging:!1}),c=300,v=Et.useRef(0),m=Et.useCallback(()=>{o&&!d.current.isDragging&&o(!0)},[o]),y=Et.useCallback(()=>{o&&!d.current.isDragging&&o(!1)},[o]),_=Et.useCallback(()=>{d.current.isDragging=!0;const T=new Date().getTime();T-v.current<c&&l&&l(),v.current=T},[]),b=Et.useCallback(T=>{d.current.isDragging=!0,i&&i(T),Jn(ke.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[i]),w=Et.useCallback(()=>{if(t.current===null)return;const T=t.current.x,x=t.current.y,S=t.current.width,I=t.current.height,A=t.current.rotation,O=[t.current.scale.x,t.current.scale.y],L=O[0]<0?-1:1,R=O[1]<0?-1:1;n&&(n({uniqueId:u,transformation:{x:Math.round(T),y:Math.round(x),width:Math.round(Math.max(5,S)),height:Math.round(Math.max(5,I)),rotation:A,scale:f?O:[L,R]}}),Jn(ke.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),d.current.isDragging=!1},[n]);return Et.useEffect(()=>(e.current&&(e.current.on("mouseover",m),e.current.on("mouseout",y),e.current.on("mousedown",_)),()=>{e.current&&(e.current.off("mouseover",m),e.current.off("mouseout",y),e.current.off("mousedown",_))}),[]),Yt.jsx(iy.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:h,shape:"circle",radius:10},transformchange:b,transformcommit:w})},gy=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:1};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var my=Object.prototype;function yy(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||my;return e===r}var dc=yy;function _y(e,t){return function(r){return e(t(r))}}var by=_y,xy=by,wy=xy(Object.keys,Object),Ty=wy,Ey=dc,Sy=Ty,Ay=Object.prototype,Oy=Ay.hasOwnProperty;function Cy(e){if(!Ey(e))return Sy(e);var t=[];for(var r in Object(e))Oy.call(e,r)&&r!="constructor"&&t.push(r);return t}var pc=Cy,Ry=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,vc=Ry,Iy=vc,Py=typeof self=="object"&&self&&self.Object===Object&&self,Ny=Iy||Py||Function("return this")(),Mr=Ny,My=Mr,ky=My.Symbol,js=ky,gc=js,mc=Object.prototype,Ly=mc.hasOwnProperty,Fy=mc.toString,Ki=gc?gc.toStringTag:void 0;function By(e){var t=Ly.call(e,Ki),r=e[Ki];try{e[Ki]=void 0;var n=!0}catch{}var i=Fy.call(e);return n&&(t?e[Ki]=r:delete e[Ki]),i}var Dy=By,Uy=Object.prototype,$y=Uy.toString;function Gy(e){return $y.call(e)}var jy=Gy,yc=js,qy=Dy,zy=jy,Hy="[object Null]",Vy="[object Undefined]",_c=yc?yc.toStringTag:void 0;function Wy(e){return e==null?e===void 0?Vy:Hy:_c&&_c in Object(e)?qy(e):zy(e)}var Yi=Wy;function Xy(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zi=Xy,Ky=Yi,Yy=Zi,Zy="[object AsyncFunction]",Qy="[object Function]",Jy="[object GeneratorFunction]",t0="[object Proxy]";function e0(e){if(!Yy(e))return!1;var t=Ky(e);return t==Qy||t==Jy||t==Zy||t==t0}var bc=e0,r0=Mr,n0=r0["__core-js_shared__"],i0=n0,Ha=i0,xc=function(){var e=/[^.]+$/.exec(Ha&&Ha.keys&&Ha.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function s0(e){return!!xc&&xc in e}var o0=s0,a0=Function.prototype,l0=a0.toString;function u0(e){if(e!=null){try{return l0.call(e)}catch{}try{return e+""}catch{}}return""}var wc=u0,f0=bc,c0=o0,h0=Zi,d0=wc,p0=/[\\^$.*+?()[\]{}|]/g,v0=/^\[object .+?Constructor\]$/,g0=Function.prototype,m0=Object.prototype,y0=g0.toString,_0=m0.hasOwnProperty,b0=RegExp("^"+y0.call(_0).replace(p0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function x0(e){if(!h0(e)||c0(e))return!1;var t=f0(e)?b0:v0;return t.test(d0(e))}var w0=x0;function T0(e,t){return e==null?void 0:e[t]}var E0=T0,S0=w0,A0=E0;function O0(e,t){var r=A0(e,t);return S0(r)?r:void 0}var ei=O0,C0=ei,R0=Mr,I0=C0(R0,"DataView"),P0=I0,N0=ei,M0=Mr,k0=N0(M0,"Map"),Va=k0,L0=ei,F0=Mr,B0=L0(F0,"Promise"),D0=B0,U0=ei,$0=Mr,G0=U0($0,"Set"),j0=G0,q0=ei,z0=Mr,H0=q0(z0,"WeakMap"),V0=H0,Wa=P0,Xa=Va,Ka=D0,Ya=j0,Za=V0,Tc=Yi,ri=wc,Ec="[object Map]",W0="[object Object]",Sc="[object Promise]",Ac="[object Set]",Oc="[object WeakMap]",Cc="[object DataView]",X0=ri(Wa),K0=ri(Xa),Y0=ri(Ka),Z0=ri(Ya),Q0=ri(Za),An=Tc;(Wa&&An(new Wa(new ArrayBuffer(1)))!=Cc||Xa&&An(new Xa)!=Ec||Ka&&An(Ka.resolve())!=Sc||Ya&&An(new Ya)!=Ac||Za&&An(new Za)!=Oc)&&(An=function(e){var t=Tc(e),r=t==W0?e.constructor:void 0,n=r?ri(r):"";if(n)switch(n){case X0:return Cc;case K0:return Ec;case Y0:return Sc;case Z0:return Ac;case Q0:return Oc}return t});var Rc=An;function J0(e){return e!=null&&typeof e=="object"}var Qi=J0,t1=Yi,e1=Qi,r1="[object Arguments]";function n1(e){return e1(e)&&t1(e)==r1}var i1=n1,Ic=i1,s1=Qi,Pc=Object.prototype,o1=Pc.hasOwnProperty,a1=Pc.propertyIsEnumerable,l1=Ic(function(){return arguments}())?Ic:function(e){return s1(e)&&o1.call(e,"callee")&&!a1.call(e,"callee")},Qa=l1,u1=Array.isArray,kr=u1,f1=9007199254740991;function c1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=f1}var Ja=c1,h1=bc,d1=Ja;function p1(e){return e!=null&&d1(e.length)&&!h1(e)}var qs=p1,zs={exports:{}};function v1(){return!1}var g1=v1;zs.exports,function(e,t){var r=Mr,n=g1,i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,u=l?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(zs,zs.exports);var tl=zs.exports,m1=Yi,y1=Ja,_1=Qi,b1="[object Arguments]",x1="[object Array]",w1="[object Boolean]",T1="[object Date]",E1="[object Error]",S1="[object Function]",A1="[object Map]",O1="[object Number]",C1="[object Object]",R1="[object RegExp]",I1="[object Set]",P1="[object String]",N1="[object WeakMap]",M1="[object ArrayBuffer]",k1="[object DataView]",L1="[object Float32Array]",F1="[object Float64Array]",B1="[object Int8Array]",D1="[object Int16Array]",U1="[object Int32Array]",$1="[object Uint8Array]",G1="[object Uint8ClampedArray]",j1="[object Uint16Array]",q1="[object Uint32Array]",le={};le[L1]=le[F1]=le[B1]=le[D1]=le[U1]=le[$1]=le[G1]=le[j1]=le[q1]=!0,le[b1]=le[x1]=le[M1]=le[w1]=le[k1]=le[T1]=le[E1]=le[S1]=le[A1]=le[O1]=le[C1]=le[R1]=le[I1]=le[P1]=le[N1]=!1;function z1(e){return _1(e)&&y1(e.length)&&!!le[m1(e)]}var H1=z1;function V1(e){return function(t){return e(t)}}var W1=V1,Hs={exports:{}};Hs.exports,function(e,t){var r=vc,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===n,l=o&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}}();e.exports=u}(Hs,Hs.exports);var X1=Hs.exports,K1=H1,Y1=W1,Nc=X1,Mc=Nc&&Nc.isTypedArray,Z1=Mc?Y1(Mc):K1,el=Z1,Q1=pc,J1=Rc,t_=Qa,e_=kr,r_=qs,n_=tl,i_=dc,s_=el,o_="[object Map]",a_="[object Set]",l_=Object.prototype,u_=l_.hasOwnProperty;function f_(e){if(e==null)return!0;if(r_(e)&&(e_(e)||typeof e=="string"||typeof e.splice=="function"||n_(e)||s_(e)||t_(e)))return!e.length;var t=J1(e);if(t==o_||t==a_)return!e.size;if(i_(e))return!Q1(e).length;for(var r in e)if(u_.call(e,r))return!1;return!0}var c_=f_;const ni=En(c_);var rl=(e=>(e.NONE="none",e.NORMAL="normal",e.LENSFLARE="lensflare",e.FILMSTRIP="filmstrip",e.GRUNGE="grunge",e.BRICKS="bricks",e))(rl||{});const kc={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}},h_=e=>{const{overlay:t,width:r,height:n,x:i,y:o}=e,{src:l,blendmode:u}=kc[t]||kc.normal;return Yt.jsx(me.TilingSprite,{image:l,width:r,height:n,x:i,y:o,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},d_=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],ii=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(!1),[i,o]=_t.useState(!1),[l,u]=_t.useState(!1),f=_t.useRef(null),h=_t.useRef(null),p=_t.useRef(null),d=_t.useRef(null),c=_t.useRef(e.initialAlpha),{tl:v}=_t.useContext(ti),{uniqueId:m,startAt:y,endAt:_,initialAlpha:b,transformation:{x:w,y:T,width:x,height:S,scale:I=[1,1],rotation:A=0,animation:O,effect:L,overlay:R},applyTransformer:C,disabled:P,ignoreTlForVideo:M,pointerdown:F,pointerout:q,pointerover:Z,isText:z,isDragging:it,isGif:W,onDoubleClick:D,isTextEditMode:k}=e;mr(ke.COMPLETE,()=>{f.current&&(c.current=b)}),Et.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>l}),[i,l]),Et.useEffect(()=>{f.current&&n(!0)},[]);const j=Et.useCallback(()=>{u(!0),Z&&Z()},[]),G=()=>{console.log("reverse complete"),c.current=b},Y=rt=>{c.current=rt.alpha},X=rt=>{c.current=rt.alpha};Et.useEffect(()=>{let rt=Te.context(()=>{});if(f.current&&v.current){const ot={duration:Number(_)-Number(y)},ct={onStart:Y,onReverseComplete:G,onStartParams:[{alpha:1}]},gt={onComplete:X,onCompleteParams:[{alpha:0}]},yt=gy(O||"None");console.log("easeing",yt),rt=Te.context(()=>{var St,ee;ni(yt.from)?ni(yt.to)?ni(yt.fromTo)?v.current.to(f.current,{alpha:1,duration:.1,...ct},y).to(f.current,{alpha:0,duration:.1,...gt},Number(_)-.09):v.current.fromTo(f.current,(St=yt.fromTo)==null?void 0:St.from,{...(ee=yt.fromTo)==null?void 0:ee.to,...ct},y).to(f.current,{alpha:0,duration:.1,...gt},Number(_)-.09):v.current.to(f.current,{alpha:1,duration:.1,...yt.to,...ct},y).to(f.current,{alpha:0,duration:.1,...gt},Number(_)-.09):v.current.from(f.current,{...yt.from},y).to(f.current,{alpha:1,duration:.1,...ct},y).to(f.current,{alpha:0,duration:.1,...gt},Number(_)-.09),M||v.current.from(f.current,{...ot},y)})}return()=>{v.current&&(v.current.progress(0).kill(),Te.killTweensOf(v.current)),rt.revert()}},[O,y,_,M]);const $=Et.useCallback(()=>{o(!0)},[]),V=Et.useCallback(rt=>{console.log("changeEnd",rt),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(rt)),o(!1)},[]),tt=me.withFilters(me.Container,{matrix:zr.filters.ColorMatrixFilter});console.log("abstraction props",e);const et=c.current;return Yt.jsxs(me.Container,{ref:h,children:[Yt.jsxs(me.Container,{ref:f,alpha:et,position:[w,T],pivot:[w,T],width:x,height:S,scale:I,rotation:A,...!P&&!i&&!it&&et>0&&{interactive:!0,buttonMode:!0,pointerdown:F,pointerover:Z,pointerout:q},children:[!W&&Yt.jsx(tt,{scale:1,apply:({matrix:rt})=>{L===Sn.BlackAndWhite?rt.desaturate():L===Sn.Sepia?rt.sepia():L===Sn.RetroVintage||L===Sn.NightVision?rt.negative():L===Sn.Normal&&rt.reset()},matrix:{enabled:!0,matrix:d_},children:Yt.jsx(me.Container,{ref:p,children:e.children})}),W&&Yt.jsx(me.Container,{ref:p,children:e.children}),!ni(R)&&R!==rl.NONE&&R!==rl.NORMAL&&Yt.jsx(h_,{overlay:R,width:x,height:S,x:w,y:T})]}),C&&!k&&Yt.jsx(vy,{pixiTransformerRef:d,imageRef:f,isMounted:r,transformCommit:V,transformChange:$,mouseoverEvent:j,uniqueId:m,isText:z,onDoubleClick:D})]})});ii.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var On=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(On||{}),Lc=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Lc||{}),nl=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(nl||{}),Rt=(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))(Rt||{}),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||{}),si=(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))(si||{}),Wt=(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))(Wt||{}),il=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(il||{}),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||{}),Cn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(Cn||{}),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||{}),Rn=(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))(Rn||{}),sl=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(sl||{}),or=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(or||{}),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||{}),we=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(we||{}),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 ol=/iPhone/i,Fc=/iPod/i,Bc=/iPad/i,Dc=/\biOS-universal(?:.+)Mac\b/i,al=/\bAndroid(?:.+)Mobile\b/i,Uc=/Android/i,oi=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Vs=/Silk/i,Hr=/Windows Phone/i,$c=/\bWindows(?:.+)ARM\b/i,Gc=/BlackBerry/i,jc=/BB10/i,qc=/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 p_(e){return function(t){return t.test(e)}}function Wc(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=p_(r),o={apple:{phone:i(ol)&&!i(Hr),ipod:i(Fc),tablet:!i(ol)&&(i(Bc)||Vc(t))&&!i(Hr),universal:i(Dc),device:(i(ol)||i(Fc)||i(Bc)||i(Dc)||Vc(t))&&!i(Hr)},amazon:{phone:i(oi),tablet:!i(oi)&&i(Vs),device:i(oi)||i(Vs)},android:{phone:!i(Hr)&&i(oi)||!i(Hr)&&i(al),tablet:!i(Hr)&&!i(oi)&&!i(al)&&(i(Vs)||i(Uc)),device:!i(Hr)&&(i(oi)||i(Vs)||i(al)||i(Uc))||i(/\bokhttp\b/i)},windows:{phone:i(Hr),tablet:i($c),device:i(Hr)||i($c)},other:{blackberry:i(Gc),blackberry10:i(jc),opera:i(qc),firefox:i(Hc),chrome:i(zc),device:i(Gc)||i(jc)||i(qc)||i(Hc)||i(zc)},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 ai=(Wc.default??Wc)(globalThis.navigator);Dt.RETINA_PREFIX=/@([0-9\.]+)x/,Dt.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 i(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,d,c){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,d||f,c),m=r?r+h:h;return f._events[m]?f._events[m].fn?f._events[m]=[f._events[m],v]:f._events[m].push(v):(f._events[m]=v,f._eventsCount++),f}function l(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=[],p,d;if(this._eventsCount===0)return h;for(d in p=this._events)t.call(p,d)&&h.push(r?d.slice(1):d);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},u.prototype.listeners=function(h){var p=r?r+h:h,d=this._events[p];if(!d)return[];if(d.fn)return[d.fn];for(var c=0,v=d.length,m=new Array(v);c<v;c++)m[c]=d[c].fn;return m},u.prototype.listenerCount=function(h){var p=r?r+h:h,d=this._events[p];return d?d.fn?1:d.length:0},u.prototype.emit=function(h,p,d,c,v,m){var y=r?r+h:h;if(!this._events[y])return!1;var _=this._events[y],b=arguments.length,w,T;if(_.fn){switch(_.once&&this.removeListener(h,_.fn,void 0,!0),b){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,p),!0;case 3:return _.fn.call(_.context,p,d),!0;case 4:return _.fn.call(_.context,p,d,c),!0;case 5:return _.fn.call(_.context,p,d,c,v),!0;case 6:return _.fn.call(_.context,p,d,c,v,m),!0}for(T=1,w=new Array(b-1);T<b;T++)w[T-1]=arguments[T];_.fn.apply(_.context,w)}else{var x=_.length,S;for(T=0;T<x;T++)switch(_[T].once&&this.removeListener(h,_[T].fn,void 0,!0),b){case 1:_[T].fn.call(_[T].context);break;case 2:_[T].fn.call(_[T].context,p);break;case 3:_[T].fn.call(_[T].context,p,d);break;case 4:_[T].fn.call(_[T].context,p,d,c);break;default:if(!w)for(S=1,w=new Array(b-1);S<b;S++)w[S-1]=arguments[S];_[T].fn.apply(_[T].context,w)}}return!0},u.prototype.on=function(h,p,d){return o(this,h,p,d,!1)},u.prototype.once=function(h,p,d){return o(this,h,p,d,!0)},u.prototype.removeListener=function(h,p,d,c){var v=r?r+h:h;if(!this._events[v])return this;if(!p)return l(this,v),this;var m=this._events[v];if(m.fn)m.fn===p&&(!c||m.once)&&(!d||m.context===d)&&l(this,v);else{for(var y=0,_=[],b=m.length;y<b;y++)(m[y].fn!==p||c&&!m[y].once||d&&m[y].context!==d)&&_.push(m[y]);_.length?this._events[v]=_.length===1?_[0]:_:l(this,v)}return this},u.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&l(this,p)):(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})(Xc);var v_=Xc.exports;const Ws=En(v_);var ll={exports:{}};ll.exports=Xs,ll.exports.default=Xs;function Xs(e,t,r){r=r||2;var n=t&&t.length,i=n?t[0]*r:e.length,o=Kc(e,0,i,r,!0),l=[];if(!o||o.next===o.prev)return l;var u,f,h,p,d,c,v;if(n&&(o=b_(e,t,o,r)),e.length>80*r){u=h=e[0],f=p=e[1];for(var m=r;m<i;m+=r)d=e[m],c=e[m+1],d<u&&(u=d),c<f&&(f=c),d>h&&(h=d),c>p&&(p=c);v=Math.max(h-u,p-f),v=v!==0?32767/v:0}return ts(o,l,r,u,f,v,0),l}function Kc(e,t,r,n,i){var o,l;if(i===cl(e,t,r,n)>0)for(o=t;o<r;o+=n)l=Qc(o,e[o],e[o+1],l);else for(o=r-n;o>=t;o-=n)l=Qc(o,e[o],e[o+1],l);return l&&Ks(l,l.next)&&(rs(l),l=l.next),l}function In(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Ks(r,r.next)||de(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,l){if(e){!l&&o&&S_(e,n,i,o);for(var u=e,f,h;e.prev!==e.next;){if(f=e.prev,h=e.next,o?m_(e,n,i,o):g_(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){l?l===1?(e=y_(In(e),t,r),ts(e,t,r,n,i,o,2)):l===2&&__(e,t,r,n,i,o):ts(In(e),t,r,n,i,o,1);break}}}}function g_(e){var t=e.prev,r=e,n=e.next;if(de(t,r,n)>=0)return!1;for(var i=t.x,o=r.x,l=n.x,u=t.y,f=r.y,h=n.y,p=i<o?i<l?i:l:o<l?o:l,d=u<f?u<h?u:h:f<h?f:h,c=i>o?i>l?i:l:o>l?o:l,v=u>f?u>h?u:h:f>h?f:h,m=n.next;m!==t;){if(m.x>=p&&m.x<=c&&m.y>=d&&m.y<=v&&li(i,u,o,f,l,h,m.x,m.y)&&de(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function m_(e,t,r,n){var i=e.prev,o=e,l=e.next;if(de(i,o,l)>=0)return!1;for(var u=i.x,f=o.x,h=l.x,p=i.y,d=o.y,c=l.y,v=u<f?u<h?u:h:f<h?f:h,m=p<d?p<c?p:c:d<c?d:c,y=u>f?u>h?u:h:f>h?f:h,_=p>d?p>c?p:c:d>c?d:c,b=ul(v,m,t,r,n),w=ul(y,_,t,r,n),T=e.prevZ,x=e.nextZ;T&&T.z>=b&&x&&x.z<=w;){if(T.x>=v&&T.x<=y&&T.y>=m&&T.y<=_&&T!==i&&T!==l&&li(u,p,f,d,h,c,T.x,T.y)&&de(T.prev,T,T.next)>=0||(T=T.prevZ,x.x>=v&&x.x<=y&&x.y>=m&&x.y<=_&&x!==i&&x!==l&&li(u,p,f,d,h,c,x.x,x.y)&&de(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;T&&T.z>=b;){if(T.x>=v&&T.x<=y&&T.y>=m&&T.y<=_&&T!==i&&T!==l&&li(u,p,f,d,h,c,T.x,T.y)&&de(T.prev,T,T.next)>=0)return!1;T=T.prevZ}for(;x&&x.z<=w;){if(x.x>=v&&x.x<=y&&x.y>=m&&x.y<=_&&x!==i&&x!==l&&li(u,p,f,d,h,c,x.x,x.y)&&de(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function y_(e,t,r){var n=e;do{var i=n.prev,o=n.next.next;!Ks(i,o)&&Yc(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 In(n)}function __(e,t,r,n,i,o){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&C_(l,u)){var f=Zc(l,u);l=In(l,l.next),f=In(f,f.next),ts(l,t,r,n,i,o,0),ts(f,t,r,n,i,o,0);return}u=u.next}l=l.next}while(l!==e)}function b_(e,t,r,n){var i=[],o,l,u,f,h;for(o=0,l=t.length;o<l;o++)u=t[o]*n,f=o<l-1?t[o+1]*n:e.length,h=Kc(e,u,f,n,!1),h===h.next&&(h.steiner=!0),i.push(O_(h));for(i.sort(x_),o=0;o<i.length;o++)r=w_(i[o],r);return r}function x_(e,t){return e.x-t.x}function w_(e,t){var r=T_(e,t);if(!r)return t;var n=Zc(r,e);return In(n,n.next),In(r,r.next)}function T_(e,t){var r=t,n=e.x,i=e.y,o=-1/0,l;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,l=r.x<r.next.x?r:r.next,u===n))return l}r=r.next}while(r!==t);if(!l)return null;var f=l,h=l.x,p=l.y,d=1/0,c;r=l;do n>=r.x&&r.x>=h&&n!==r.x&&li(i<p?n:o,i,h,p,i<p?o:n,i,r.x,r.y)&&(c=Math.abs(i-r.y)/(n-r.x),es(r,e)&&(c<d||c===d&&(r.x>l.x||r.x===l.x&&E_(l,r)))&&(l=r,d=c)),r=r.next;while(r!==f);return l}function E_(e,t){return de(e.prev,e,t.prev)<0&&de(t.next,e,e.next)<0}function S_(e,t,r,n){var i=e;do i.z===0&&(i.z=ul(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,A_(i)}function A_(e){var t,r,n,i,o,l,u,f,h=1;do{for(r=e,e=null,o=null,l=0;r;){for(l++,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(l>1);return e}function ul(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 O_(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 li(e,t,r,n,i,o,l,u){return(i-l)*(t-u)>=(e-l)*(o-u)&&(e-l)*(n-u)>=(r-l)*(t-u)&&(r-l)*(o-u)>=(i-l)*(n-u)}function C_(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!R_(e,t)&&(es(e,t)&&es(t,e)&&I_(e,t)&&(de(e.prev,e,t.prev)||de(e,t.prev,t))||Ks(e,t)&&de(e.prev,e,e.next)>0&&de(t.prev,t,t.next)>0)}function de(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 Yc(e,t,r,n){var i=Zs(de(e,t,r)),o=Zs(de(e,t,n)),l=Zs(de(r,n,e)),u=Zs(de(r,n,t));return!!(i!==o&&l!==u||i===0&&Ys(e,r,t)||o===0&&Ys(e,n,t)||l===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 R_(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&&Yc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function es(e,t){return de(e.prev,e,e.next)<0?de(e,t,e.next)>=0&&de(e,e.prev,t)>=0:de(e,t,e.prev)<0||de(e,e.next,t)<0}function I_(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 Zc(e,t){var r=new fl(e.i,e.x,e.y),n=new fl(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 Qc(e,t,r,n){var i=new fl(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 fl(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,l=Math.abs(cl(e,0,o,r));if(i)for(var u=0,f=t.length;u<f;u++){var h=t[u]*r,p=u<f-1?t[u+1]*r:e.length;l-=Math.abs(cl(e,h,p,r))}var d=0;for(u=0;u<n.length;u+=3){var c=n[u]*r,v=n[u+1]*r,m=n[u+2]*r;d+=Math.abs((e[c]-e[m])*(e[v+1]-e[c+1])-(e[c]-e[v])*(e[m+1]-e[c+1]))}return l===0&&d===0?0:Math.abs((d-l)/l)};function cl(e,t,r,n){for(var i=0,o=t,l=r-n;o<r;o+=n)i+=(e[l]-e[o])*(e[o+1]+e[l+1]),l=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 l=0;l<t;l++)r.vertices.push(e[i][o][l]);i>0&&(n+=e[i-1].length,r.holes.push(n))}return r};var P_=ll.exports;const N_=En(P_);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 l,u=2147483647,f=36,h=1,p=26,d=38,c=700,v=72,m=128,y="-",_=/^xn--/,b=/[^\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,S=Math.floor,I=String.fromCharCode,A;function O(D){throw new RangeError(T[D])}function L(D,k){for(var j=D.length,G=[];j--;)G[j]=k(D[j]);return G}function R(D,k){var j=D.split("@"),G="";j.length>1&&(G=j[0]+"@",D=j[1]),D=D.replace(w,".");var Y=D.split("."),X=L(Y,k).join(".");return G+X}function C(D){for(var k=[],j=0,G=D.length,Y,X;j<G;)Y=D.charCodeAt(j++),Y>=55296&&Y<=56319&&j<G?(X=D.charCodeAt(j++),(X&64512)==56320?k.push(((Y&1023)<<10)+(X&1023)+65536):(k.push(Y),j--)):k.push(Y);return k}function P(D){return L(D,function(k){var j="";return k>65535&&(k-=65536,j+=I(k>>>10&1023|55296),k=56320|k&1023),j+=I(k),j}).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,j){var G=0;for(D=j?S(D/c):D>>1,D+=S(D/k);D>x*p>>1;G+=f)D=S(D/x);return S(G+(x+1)*D/(D+d))}function Z(D){var k=[],j=D.length,G,Y=0,X=m,$=v,V,tt,et,rt,ot,ct,gt,yt,St;for(V=D.lastIndexOf(y),V<0&&(V=0),tt=0;tt<V;++tt)D.charCodeAt(tt)>=128&&O("not-basic"),k.push(D.charCodeAt(tt));for(et=V>0?V+1:0;et<j;){for(rt=Y,ot=1,ct=f;et>=j&&O("invalid-input"),gt=M(D.charCodeAt(et++)),(gt>=f||gt>S((u-Y)/ot))&&O("overflow"),Y+=gt*ot,yt=ct<=$?h:ct>=$+p?p:ct-$,!(gt<yt);ct+=f)St=f-yt,ot>S(u/St)&&O("overflow"),ot*=St;G=k.length+1,$=q(Y-rt,G,rt==0),S(Y/G)>u-X&&O("overflow"),X+=S(Y/G),Y%=G,k.splice(Y++,0,X)}return P(k)}function z(D){var k,j,G,Y,X,$,V,tt,et,rt,ot,ct=[],gt,yt,St,ee;for(D=C(D),gt=D.length,k=m,j=0,X=v,$=0;$<gt;++$)ot=D[$],ot<128&&ct.push(I(ot));for(G=Y=ct.length,Y&&ct.push(y);G<gt;){for(V=u,$=0;$<gt;++$)ot=D[$],ot>=k&&ot<V&&(V=ot);for(yt=G+1,V-k>S((u-j)/yt)&&O("overflow"),j+=(V-k)*yt,k=V,$=0;$<gt;++$)if(ot=D[$],ot<k&&++j>u&&O("overflow"),ot==k){for(tt=j,et=f;rt=et<=X?h:et>=X+p?p:et-X,!(tt<rt);et+=f)ee=tt-rt,St=f-rt,ct.push(I(F(rt+ee%St,0))),tt=S(ee/St);ct.push(I(F(tt,0))),X=q(j,yt,G==Y),j=0,++G}++j,++k}return ct.join("")}function it(D){return R(D,function(k){return _.test(k)?Z(k.slice(4).toLowerCase()):k})}function W(D){return R(D,function(k){return b.test(k)?"xn--"+z(k):k})}if(l={version:"1.4.1",ucs2:{decode:C,encode:P},decode:Z,encode:z,toASCII:W,toUnicode:it},n&&i)if(e.exports==n)i.exports=l;else for(A in l)l.hasOwnProperty(A)&&(n[A]=l[A]);else r.punycode=l})(Ye)}(Qs,Qs.exports);var M_=Qs.exports,k_=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 l=Object.getOwnPropertyDescriptor(t,r);if(l.value!==i||l.enumerable!==!0)return!1}return!0},Jc=typeof Symbol<"u"&&Symbol,L_=k_,F_=function(){return typeof Jc!="function"||typeof Symbol!="function"||typeof Jc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:L_()},th={foo:{}},B_=Object,D_=function(){return{__proto__:th}.foo===th.foo&&!({__proto__:null}instanceof B_)},U_="Function.prototype.bind called on incompatible ",hl=Array.prototype.slice,$_=Object.prototype.toString,G_="[object Function]",j_=function(t){var r=this;if(typeof r!="function"||$_.call(r)!==G_)throw new TypeError(U_+r);for(var n=hl.call(arguments,1),i,o=function(){if(this instanceof i){var p=r.apply(this,n.concat(hl.call(arguments)));return Object(p)===p?p:this}else return r.apply(t,n.concat(hl.call(arguments)))},l=Math.max(0,r.length-n.length),u=[],f=0;f<l;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},q_=j_,dl=Function.prototype.bind||q_,z_=dl,H_=z_.call(Function.call,Object.prototype.hasOwnProperty),Gt,ui=SyntaxError,eh=Function,fi=TypeError,pl=function(e){try{return eh('"use strict"; return ('+e+").constructor;")()}catch{}},Pn=Object.getOwnPropertyDescriptor;if(Pn)try{Pn({},"")}catch{Pn=null}var vl=function(){throw new fi},V_=Pn?function(){try{return arguments.callee,vl}catch{try{return Pn(arguments,"callee").get}catch{return vl}}}():vl,ci=F_(),W_=D_(),Oe=Object.getPrototypeOf||(W_?function(e){return e.__proto__}:null),hi={},X_=typeof Uint8Array>"u"||!Oe?Gt:Oe(Uint8Array),Nn={"%AggregateError%":typeof AggregateError>"u"?Gt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Gt:ArrayBuffer,"%ArrayIteratorPrototype%":ci&&Oe?Oe([][Symbol.iterator]()):Gt,"%AsyncFromSyncIteratorPrototype%":Gt,"%AsyncFunction%":hi,"%AsyncGenerator%":hi,"%AsyncGeneratorFunction%":hi,"%AsyncIteratorPrototype%":hi,"%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%":eh,"%GeneratorFunction%":hi,"%Int8Array%":typeof Int8Array>"u"?Gt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Gt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Gt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ci&&Oe?Oe(Oe([][Symbol.iterator]())):Gt,"%JSON%":typeof JSON=="object"?JSON:Gt,"%Map%":typeof Map>"u"?Gt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ci||!Oe?Gt:Oe(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"||!ci||!Oe?Gt:Oe(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Gt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ci&&Oe?Oe(""[Symbol.iterator]()):Gt,"%Symbol%":ci?Symbol:Gt,"%SyntaxError%":ui,"%ThrowTypeError%":V_,"%TypedArray%":X_,"%TypeError%":fi,"%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(Oe)try{null.error}catch(e){var K_=Oe(Oe(e));Nn["%Error.prototype%"]=K_}var Y_=function e(t){var r;if(t==="%AsyncFunction%")r=pl("async function () {}");else if(t==="%GeneratorFunction%")r=pl("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=pl("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Oe&&(r=Oe(i.prototype))}return Nn[t]=r,r},rh={"%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=dl,Js=H_,Z_=ns.call(Function.call,Array.prototype.concat),Q_=ns.call(Function.apply,Array.prototype.splice),nh=ns.call(Function.call,String.prototype.replace),to=ns.call(Function.call,String.prototype.slice),J_=ns.call(Function.call,RegExp.prototype.exec),tb=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,eb=/\\(\\)?/g,rb=function(t){var r=to(t,0,1),n=to(t,-1);if(r==="%"&&n!=="%")throw new ui("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ui("invalid intrinsic syntax, expected opening `%`");var i=[];return nh(t,tb,function(o,l,u,f){i[i.length]=u?nh(f,eb,"$1"):l||o}),i},nb=function(t,r){var n=t,i;if(Js(rh,n)&&(i=rh[n],n="%"+i[0]+"%"),Js(Nn,n)){var o=Nn[n];if(o===hi&&(o=Y_(n)),typeof o>"u"&&!r)throw new fi("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:o}}throw new ui("intrinsic "+t+" does not exist!")},gl=function(t,r){if(typeof t!="string"||t.length===0)throw new fi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new fi('"allowMissing" argument must be a boolean');if(J_(/^%?[^%]*%?$/,t)===null)throw new ui("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=rb(t),i=n.length>0?n[0]:"",o=nb("%"+i+"%",r),l=o.name,u=o.value,f=!1,h=o.alias;h&&(i=h[0],Q_(n,Z_([0,1],h)));for(var p=1,d=!0;p<n.length;p+=1){var c=n[p],v=to(c,0,1),m=to(c,-1);if((v==='"'||v==="'"||v==="`"||m==='"'||m==="'"||m==="`")&&v!==m)throw new ui("property names with quotes must have matching quotes");if((c==="constructor"||!d)&&(f=!0),i+="."+c,l="%"+i+"%",Js(Nn,l))u=Nn[l];else if(u!=null){if(!(c in u)){if(!r)throw new fi("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pn&&p+1>=n.length){var y=Pn(u,c);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?u=y.get:u=u[c]}else d=Js(u,c),u=u[c];d&&!f&&(Nn[l]=u)}}return u},ih={exports:{}};(function(e){var t=dl,r=gl,n=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),o=r("%Reflect.apply%",!0)||t.call(i,n),l=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(d){var c=o(t,i,arguments);if(l&&u){var v=l(c,"length");v.configurable&&u(c,"length",{value:1+f(0,d.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})(ih);var ib=ih.exports,sh=gl,oh=ib,sb=oh(sh("String.prototype.indexOf")),ob=function(t,r){var n=sh(t,!!r);return typeof n=="function"&&sb(t,".prototype.")>-1?oh(n):n};const ab=oy(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ml=typeof Map=="function"&&Map.prototype,yl=Object.getOwnPropertyDescriptor&&ml?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,eo=ml&&yl&&typeof yl.get=="function"?yl.get:null,ah=ml&&Map.prototype.forEach,_l=typeof Set=="function"&&Set.prototype,bl=Object.getOwnPropertyDescriptor&&_l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ro=_l&&bl&&typeof bl.get=="function"?bl.get:null,lh=_l&&Set.prototype.forEach,lb=typeof WeakMap=="function"&&WeakMap.prototype,is=lb?WeakMap.prototype.has:null,ub=typeof WeakSet=="function"&&WeakSet.prototype,ss=ub?WeakSet.prototype.has:null,fb=typeof WeakRef=="function"&&WeakRef.prototype,uh=fb?WeakRef.prototype.deref:null,cb=Boolean.prototype.valueOf,hb=Object.prototype.toString,db=Function.prototype.toString,pb=String.prototype.match,xl=String.prototype.slice,un=String.prototype.replace,vb=String.prototype.toUpperCase,fh=String.prototype.toLowerCase,ch=RegExp.prototype.test,hh=Array.prototype.concat,Br=Array.prototype.join,gb=Array.prototype.slice,dh=Math.floor,wl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Tl=Object.getOwnPropertySymbols,El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,di=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Le=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===di||"symbol")?Symbol.toStringTag:null,ph=Object.prototype.propertyIsEnumerable,vh=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function gh(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||ch.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-dh(-e):dh(e);if(n!==e){var i=String(n),o=xl.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 Sl=ab,mh=Sl.custom,yh=xh(mh)?mh:null,mb=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 l=fn(o,"customInspect")?o.customInspect:!0;if(typeof l!="boolean"&&l!=="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 Th(t,o);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var f=String(t);return u?gh(t,f):f}if(typeof t=="bigint"){var h=String(t)+"n";return u?gh(t,h):h}var p=typeof o.depth>"u"?5:o.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof t=="object")return Al(t)?"[Array]":"[Object]";var d=Lb(o,n);if(typeof i>"u")i=[];else if(wh(i,t)>=0)return"[Circular]";function c(M,F,q){if(F&&(i=gb.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"&&!bh(t)){var v=Ab(t),m=no(t,c);return"[Function"+(v?": "+v:" (anonymous)")+"]"+(m.length>0?" { "+Br.call(m,", ")+" }":"")}if(xh(t)){var y=di?un.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):El.call(t);return typeof t=="object"&&!di?os(y):y}if(Nb(t)){for(var _="<"+fh.call(String(t.nodeName)),b=t.attributes||[],w=0;w<b.length;w++)_+=" "+b[w].name+"="+_h(yb(b[w].value),"double",o);return _+=">",t.childNodes&&t.childNodes.length&&(_+="..."),_+="</"+fh.call(String(t.nodeName))+">",_}if(Al(t)){if(t.length===0)return"[]";var T=no(t,c);return d&&!kb(T)?"["+Cl(T,d)+"]":"[ "+Br.call(T,", ")+" ]"}if(bb(t)){var x=no(t,c);return!("cause"in Error.prototype)&&"cause"in t&&!ph.call(t,"cause")?"{ ["+String(t)+"] "+Br.call(hh.call("[cause]: "+c(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Br.call(x,", ")+" }"}if(typeof t=="object"&&l){if(yh&&typeof t[yh]=="function"&&Sl)return Sl(t,{depth:p-n});if(l!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(Ob(t)){var S=[];return ah&&ah.call(t,function(M,F){S.push(c(F,t,!0)+" => "+c(M,t))}),Eh("Map",eo.call(t),S,d)}if(Ib(t)){var I=[];return lh&&lh.call(t,function(M){I.push(c(M,t))}),Eh("Set",ro.call(t),I,d)}if(Cb(t))return Ol("WeakMap");if(Pb(t))return Ol("WeakSet");if(Rb(t))return Ol("WeakRef");if(wb(t))return os(c(Number(t)));if(Eb(t))return os(c(wl.call(t)));if(Tb(t))return os(cb.call(t));if(xb(t))return os(c(String(t)));if(!_b(t)&&!bh(t)){var A=no(t,c),O=vh?vh(t)===Object.prototype:t instanceof Object||t.constructor===Object,L=t instanceof Object?"":"null prototype",R=!O&&Le&&Object(t)===t&&Le in t?xl.call(cn(t),8,-1):L?"Object":"",C=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",P=C+(R||L?"["+Br.call(hh.call([],R||[],L||[]),": ")+"] ":"");return A.length===0?P+"{}":d?P+"{"+Cl(A,d)+"}":P+"{ "+Br.call(A,", ")+" }"}return String(t)};function _h(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function yb(e){return un.call(String(e),/"/g,"&quot;")}function Al(e){return cn(e)==="[object Array]"&&(!Le||!(typeof e=="object"&&Le in e))}function _b(e){return cn(e)==="[object Date]"&&(!Le||!(typeof e=="object"&&Le in e))}function bh(e){return cn(e)==="[object RegExp]"&&(!Le||!(typeof e=="object"&&Le in e))}function bb(e){return cn(e)==="[object Error]"&&(!Le||!(typeof e=="object"&&Le in e))}function xb(e){return cn(e)==="[object String]"&&(!Le||!(typeof e=="object"&&Le in e))}function wb(e){return cn(e)==="[object Number]"&&(!Le||!(typeof e=="object"&&Le in e))}function Tb(e){return cn(e)==="[object Boolean]"&&(!Le||!(typeof e=="object"&&Le in e))}function xh(e){if(di)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!El)return!1;try{return El.call(e),!0}catch{}return!1}function Eb(e){if(!e||typeof e!="object"||!wl)return!1;try{return wl.call(e),!0}catch{}return!1}var Sb=Object.prototype.hasOwnProperty||function(e){return e in this};function fn(e,t){return Sb.call(e,t)}function cn(e){return hb.call(e)}function Ab(e){if(e.name)return e.name;var t=pb.call(db.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function wh(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 Ob(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 Cb(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 Rb(e){if(!uh||!e||typeof e!="object")return!1;try{return uh.call(e),!0}catch{}return!1}function Ib(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 Pb(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 Nb(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Th(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Th(xl.call(e,0,t.maxStringLength),t)+n}var i=un.call(un.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Mb);return _h(i,"single",t)}function Mb(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":"")+vb.call(t.toString(16))}function os(e){return"Object("+e+")"}function Ol(e){return e+" { ? }"}function Eh(e,t,r,n){var i=n?Cl(r,n):Br.call(r,", ");return e+" ("+t+") {"+i+"}"}function kb(e){for(var t=0;t<e.length;t++)if(wh(e[t],`
10
+ `)>=0)return!1;return!0}function Lb(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 Cl(e,t){if(e.length===0)return"";var r=`
11
11
  `+t.prev+t.base;return r+Br.call(e,","+r)+`
12
- `+t.prev}function no(e,t){var r=Sl(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 wl=="function"?wl(e):[],l;if(hi){l={};for(var u=0;u<o.length;u++)l["$"+o[u]]=o[u]}for(var f in e)fn(e,f)&&(r&&String(Number(f))===f&&f<e.length||hi&&l["$"+f]instanceof Symbol||(uh.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if(typeof wl=="function")for(var h=0;h<o.length;h++)hh.call(e,o[h])&&n.push("["+t(o[h])+"]: "+t(e[o[h]],e));return n}var Cl=vl,di=nb,Mb=pb,kb=Cl("%TypeError%"),io=Cl("%WeakMap%",!0),so=Cl("%Map%",!0),Lb=di("WeakMap.prototype.get",!0),Fb=di("WeakMap.prototype.set",!0),Bb=di("WeakMap.prototype.has",!0),Db=di("Map.prototype.get",!0),Ub=di("Map.prototype.set",!0),$b=di("Map.prototype.has",!0),Rl=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},Gb=function(e,t){var r=Rl(e,t);return r&&r.value},jb=function(e,t,r){var n=Rl(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},qb=function(e,t){return!!Rl(e,t)},zb=function(){var t,r,n,i={assert:function(o){if(!i.has(o))throw new kb("Side channel does not contain "+Mb(o))},get:function(o){if(io&&o&&(typeof o=="object"||typeof o=="function")){if(t)return Lb(t,o)}else if(so){if(r)return Db(r,o)}else if(n)return Gb(n,o)},has:function(o){if(io&&o&&(typeof o=="object"||typeof o=="function")){if(t)return Bb(t,o)}else if(so){if(r)return $b(r,o)}else if(n)return qb(n,o);return!1},set:function(o,l){io&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new io),Fb(t,o,l)):so?(r||(r=new so),Ub(r,o,l)):(n||(n={key:{},next:null}),jb(n,o,l))}};return i},Hb=String.prototype.replace,Vb=/%20/g,Il={RFC1738:"RFC1738",RFC3986:"RFC3986"},Pl={default:Il.RFC3986,formatters:{RFC1738:function(e){return Hb.call(e,Vb,"+")},RFC3986:function(e){return String(e)}},RFC1738:Il.RFC1738,RFC3986:Il.RFC3986},Wb=Pl,Nl=Object.prototype.hasOwnProperty,Nn=Array.isArray,Dr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Xb=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Nn(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]<"u"&&i.push(n[o]);r.obj[r.prop]=i}}},Th=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},Kb=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Nn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Nl.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 Nn(t)&&!Nn(r)&&(i=Th(t,n)),Nn(t)&&Nn(r)?(r.forEach(function(o,l){if(Nl.call(t,l)){var u=t[l];u&&typeof u=="object"&&o&&typeof o=="object"?t[l]=e(u,o,n):t.push(o)}else t[l]=o}),t):Object.keys(r).reduce(function(o,l){var u=r[l];return Nl.call(o,l)?o[l]=e(o[l],u,n):o[l]=u,o},i)},Yb=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},Zb=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}},Qb=function(t,r,n,i,o){if(t.length===0)return t;var l=t;if(typeof t=="symbol"?l=Symbol.prototype.toString.call(t):typeof t!="string"&&(l=String(t)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var u="",f=0;f<l.length;++f){var h=l.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||o===Wb.RFC1738&&(h===40||h===41)){u+=l.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|l.charCodeAt(f)&1023),u+=Dr[240|h>>18]+Dr[128|h>>12&63]+Dr[128|h>>6&63]+Dr[128|h&63]}return u},Jb=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],l=o.obj[o.prop],u=Object.keys(l),f=0;f<u.length;++f){var h=u[f],p=l[h];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(r.push({obj:l,prop:h}),n.push(p))}return Xb(r),t},tx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ex=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},rx=function(t,r){return[].concat(t,r)},nx=function(t,r){if(Nn(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Eh={arrayToObject:Th,assign:Yb,combine:rx,compact:Jb,decode:Zb,encode:Qb,isBuffer:ex,isRegExp:tx,maybeMap:nx,merge:Kb},Sh=zb,oo=Eh,as=Pl,ix=Object.prototype.hasOwnProperty,Ah={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Hr=Array.isArray,sx=Array.prototype.push,Oh=function(e,t){sx.apply(e,Hr(t)?t:[t])},ox=Date.prototype.toISOString,Ch=as.default,Fe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:oo.encode,encodeValuesOnly:!1,format:Ch,formatter:as.formatters[Ch],indices:!1,serializeDate:function(t){return ox.call(t)},skipNulls:!1,strictNullHandling:!1},ax=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Ml={},lx=function e(t,r,n,i,o,l,u,f,h,p,d,c,v,m,y,b){for(var _=t,w=b,T=0,x=!1;(w=w.get(Ml))!==void 0&&!x;){var S=w.get(t);if(T+=1,typeof S<"u"){if(S===T)throw new RangeError("Cyclic object value");x=!0}typeof w.get(Ml)>"u"&&(T=0)}if(typeof f=="function"?_=f(r,_):_ instanceof Date?_=d(_):n==="comma"&&Hr(_)&&(_=oo.maybeMap(_,function(Z){return Z instanceof Date?d(Z):Z})),_===null){if(o)return u&&!m?u(r,Fe.encoder,y,"key",c):r;_=""}if(ax(_)||oo.isBuffer(_)){if(u){var I=m?r:u(r,Fe.encoder,y,"key",c);return[v(I)+"="+v(u(_,Fe.encoder,y,"value",c))]}return[v(r)+"="+v(String(_))]}var A=[];if(typeof _>"u")return A;var O;if(n==="comma"&&Hr(_))m&&u&&(_=oo.maybeMap(_,u)),O=[{value:_.length>0?_.join(",")||null:void 0}];else if(Hr(f))O=f;else{var L=Object.keys(_);O=h?L.sort(h):L}for(var R=i&&Hr(_)&&_.length===1?r+"[]":r,C=0;C<O.length;++C){var P=O[C],M=typeof P=="object"&&typeof P.value<"u"?P.value:_[P];if(!(l&&M===null)){var F=Hr(_)?typeof n=="function"?n(R,P):R:R+(p?"."+P:"["+P+"]");b.set(t,T);var q=Sh();q.set(Ml,b),Oh(A,e(M,F,n,i,o,l,n==="comma"&&m&&Hr(_)?null:u,f,h,p,d,c,v,m,y,q))}}return A},ux=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(!ix.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"||Hr(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}},fx=function(e,t){var r=e,n=ux(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):Hr(n.filter)&&(o=n.filter,i=o);var l=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in Ah?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var f=Ah[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 p=Sh(),d=0;d<i.length;++d){var c=i[d];n.skipNulls&&r[c]===null||Oh(l,lx(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,p))}var v=l.join(n.delimiter),m=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),v.length>0?m+v:""},pi=Eh,kl=Object.prototype.hasOwnProperty,cx=Array.isArray,Ce={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},hx=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Rh=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},dx="utf8=%26%2310003%3B",px="utf8=%E2%9C%93",vx=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,l=i.split(r.delimiter,o),u=-1,f,h=r.charset;if(r.charsetSentinel)for(f=0;f<l.length;++f)l[f].indexOf("utf8=")===0&&(l[f]===px?h="utf-8":l[f]===dx&&(h="iso-8859-1"),u=f,f=l.length);for(f=0;f<l.length;++f)if(f!==u){var p=l[f],d=p.indexOf("]="),c=d===-1?p.indexOf("="):d+1,v,m;c===-1?(v=r.decoder(p,Ce.decoder,h,"key"),m=r.strictNullHandling?null:""):(v=r.decoder(p.slice(0,c),Ce.decoder,h,"key"),m=pi.maybeMap(Rh(p.slice(c+1),r),function(y){return r.decoder(y,Ce.decoder,h,"value")})),m&&r.interpretNumericEntities&&h==="iso-8859-1"&&(m=hx(m)),p.indexOf("[]=")>-1&&(m=cx(m)?[m]:m),kl.call(n,v)?n[v]=pi.combine(n[v],m):n[v]=m}return n},gx=function(e,t,r,n){for(var i=n?t:Rh(t,r),o=e.length-1;o>=0;--o){var l,u=e[o];if(u==="[]"&&r.parseArrays)l=[].concat(i);else{l=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===""?l={0:i}:!isNaN(h)&&u!==f&&String(h)===f&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(l=[],l[h]=i):f!=="__proto__"&&(l[f]=i)}i=l}return i},mx=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,f=n.depth>0&&l.exec(o),h=f?o.slice(0,f.index):o,p=[];if(h){if(!n.plainObjects&&kl.call(Object.prototype,h)&&!n.allowPrototypes)return;p.push(h)}for(var d=0;n.depth>0&&(f=u.exec(o))!==null&&d<n.depth;){if(d+=1,!n.plainObjects&&kl.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;p.push(f[1])}return f&&p.push("["+o.slice(f.index)+"]"),gx(p,r,n,i)}},yx=function(t){if(!t)return Ce;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"?Ce.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ce.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ce.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ce.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ce.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ce.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ce.comma,decoder:typeof t.decoder=="function"?t.decoder:Ce.decoder,delimiter:typeof t.delimiter=="string"||pi.isRegExp(t.delimiter)?t.delimiter:Ce.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ce.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ce.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ce.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ce.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ce.strictNullHandling}},_x=function(e,t){var r=yx(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?vx(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),l=0;l<o.length;++l){var u=o[l],f=mx(u,n[u],r,typeof e=="string");i=pi.merge(i,f,r)}return r.allowSparse===!0?i:pi.compact(i)},bx=fx,xx=_x,wx=Pl,Tx={formats:wx,parse:xx,stringify:bx},Ex=I_;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 Sx=/^([a-z0-9.+-]+:)/i,Ax=/:[0-9]*$/,Ox=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Cx=["<",">",'"',"`"," ","\r",`
13
- `," "],Rx=["{","}","|","\\","^","`"].concat(Cx),Ll=["'"].concat(Rx),Ih=["%","/","?",";","#"].concat(Ll),Ph=["/","?","#"],Ix=255,Nh=/^[+a-z0-9A-Z_-]{0,63}$/,Px=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Nx={javascript:!0,"javascript:":!0},Fl={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},Bl=Tx;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),l=/\\/g;o[0]=o[0].replace(l,"/"),e=o.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=Ox.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=Bl.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=Sx.exec(u);if(h){h=h[0];var p=h.toLowerCase();this.protocol=p,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var d=u.substr(0,2)==="//";d&&!(h&&Fl[h])&&(u=u.substr(2),this.slashes=!0)}if(!Fl[h]&&(d||h&&!vi[h])){for(var c=-1,v=0;v<Ph.length;v++){var m=u.indexOf(Ph[v]);m!==-1&&(c===-1||m<c)&&(c=m)}var y,b;c===-1?b=u.lastIndexOf("@"):b=u.lastIndexOf("@",c),b!==-1&&(y=u.slice(0,b),u=u.slice(b+1),this.auth=decodeURIComponent(y)),c=-1;for(var v=0;v<Ih.length;v++){var m=u.indexOf(Ih[v]);m!==-1&&(c===-1||m<c)&&(c=m)}c===-1&&(c=u.length),this.host=u.slice(0,c),u=u.slice(c),this.parseHost(),this.hostname=this.hostname||"";var _=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!_)for(var w=this.hostname.split(/\./),v=0,T=w.length;v<T;v++){var x=w[v];if(x&&!x.match(Nh)){for(var S="",I=0,A=x.length;I<A;I++)x.charCodeAt(I)>127?S+="x":S+=x[I];if(!S.match(Nh)){var O=w.slice(0,v),L=w.slice(v+1),R=x.match(Px);R&&(O.push(R[1]),L.unshift(R[2])),L.length&&(u="/"+L.join(".")+u),this.hostname=O.join(".");break}}}this.hostname.length>Ix?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=Ex.toASCII(this.hostname));var C=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+C,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!Nx[p])for(var v=0,T=Ll.length;v<T;v++){var M=Ll[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=Bl.parse(this.query)),u=u.slice(0,Z)):t&&(this.search="",this.query={}),u&&(this.pathname=u),vi[p]&&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 Mx(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=Bl.stringify(this.query));var l=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),l&&l.charAt(0)!=="?"&&(l="?"+l),r=r.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),l=l.replace("#","%23"),t+i+r+l+n};function kx(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 l=Object.keys(e),u=0;u<l.length;u++){var f=l[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),p=0;p<h.length;p++){var d=h[p];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Fl[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 m=r.pathname&&r.pathname.charAt(0)==="/",y=e.host||e.pathname&&e.pathname.charAt(0)==="/",b=y||m||r.host&&e.pathname,_=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]==="")),y)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 S=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;S&&(r.auth=S.shift(),r.hostname=S.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],A=(r.host||e.host||w.length>1)&&(I==="."||I==="..")||I==="",O=0,L=w.length;L>=0;L--)I=w[L],I==="."?w.splice(L,1):I===".."?(w.splice(L,1),O++):O&&(w.splice(L,1),O--);if(!b&&!_)for(;O--;O)w.unshift("..");b&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),A&&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 S=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;S&&(r.auth=S.shift(),r.hostname=S.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=Ax.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 Lx=ao,Fx=kx,Bx=Mx;const Dx={parse:Lx,format:Bx,resolve:Fx},Mh={};function Ht(e,t,r=3){if(Mh[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
12
+ `+t.prev}function no(e,t){var r=Al(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 Tl=="function"?Tl(e):[],l;if(di){l={};for(var u=0;u<o.length;u++)l["$"+o[u]]=o[u]}for(var f in e)fn(e,f)&&(r&&String(Number(f))===f&&f<e.length||di&&l["$"+f]instanceof Symbol||(ch.call(/[^\w$]/,f)?n.push(t(f,e)+": "+t(e[f],e)):n.push(f+": "+t(e[f],e))));if(typeof Tl=="function")for(var h=0;h<o.length;h++)ph.call(e,o[h])&&n.push("["+t(o[h])+"]: "+t(e[o[h]],e));return n}var Rl=gl,pi=ob,Fb=mb,Bb=Rl("%TypeError%"),io=Rl("%WeakMap%",!0),so=Rl("%Map%",!0),Db=pi("WeakMap.prototype.get",!0),Ub=pi("WeakMap.prototype.set",!0),$b=pi("WeakMap.prototype.has",!0),Gb=pi("Map.prototype.get",!0),jb=pi("Map.prototype.set",!0),qb=pi("Map.prototype.has",!0),Il=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},zb=function(e,t){var r=Il(e,t);return r&&r.value},Hb=function(e,t,r){var n=Il(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Vb=function(e,t){return!!Il(e,t)},Wb=function(){var t,r,n,i={assert:function(o){if(!i.has(o))throw new Bb("Side channel does not contain "+Fb(o))},get:function(o){if(io&&o&&(typeof o=="object"||typeof o=="function")){if(t)return Db(t,o)}else if(so){if(r)return Gb(r,o)}else if(n)return zb(n,o)},has: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);return!1},set:function(o,l){io&&o&&(typeof o=="object"||typeof o=="function")?(t||(t=new io),Ub(t,o,l)):so?(r||(r=new so),jb(r,o,l)):(n||(n={key:{},next:null}),Hb(n,o,l))}};return i},Xb=String.prototype.replace,Kb=/%20/g,Pl={RFC1738:"RFC1738",RFC3986:"RFC3986"},Nl={default:Pl.RFC3986,formatters:{RFC1738:function(e){return Xb.call(e,Kb,"+")},RFC3986:function(e){return String(e)}},RFC1738:Pl.RFC1738,RFC3986:Pl.RFC3986},Yb=Nl,Ml=Object.prototype.hasOwnProperty,Mn=Array.isArray,Dr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Zb=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Mn(n)){for(var i=[],o=0;o<n.length;++o)typeof n[o]<"u"&&i.push(n[o]);r.obj[r.prop]=i}}},Sh=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},Qb=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Mn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ml.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 Mn(t)&&!Mn(r)&&(i=Sh(t,n)),Mn(t)&&Mn(r)?(r.forEach(function(o,l){if(Ml.call(t,l)){var u=t[l];u&&typeof u=="object"&&o&&typeof o=="object"?t[l]=e(u,o,n):t.push(o)}else t[l]=o}),t):Object.keys(r).reduce(function(o,l){var u=r[l];return Ml.call(o,l)?o[l]=e(o[l],u,n):o[l]=u,o},i)},Jb=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},tx=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}},ex=function(t,r,n,i,o){if(t.length===0)return t;var l=t;if(typeof t=="symbol"?l=Symbol.prototype.toString.call(t):typeof t!="string"&&(l=String(t)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var u="",f=0;f<l.length;++f){var h=l.charCodeAt(f);if(h===45||h===46||h===95||h===126||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||o===Yb.RFC1738&&(h===40||h===41)){u+=l.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|l.charCodeAt(f)&1023),u+=Dr[240|h>>18]+Dr[128|h>>12&63]+Dr[128|h>>6&63]+Dr[128|h&63]}return u},rx=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var o=r[i],l=o.obj[o.prop],u=Object.keys(l),f=0;f<u.length;++f){var h=u[f],p=l[h];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(r.push({obj:l,prop:h}),n.push(p))}return Zb(r),t},nx=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ix=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},sx=function(t,r){return[].concat(t,r)},ox=function(t,r){if(Mn(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Ah={arrayToObject:Sh,assign:Jb,combine:sx,compact:rx,decode:tx,encode:ex,isBuffer:ix,isRegExp:nx,maybeMap:ox,merge:Qb},Oh=Wb,oo=Ah,as=Nl,ax=Object.prototype.hasOwnProperty,Ch={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Vr=Array.isArray,lx=Array.prototype.push,Rh=function(e,t){lx.apply(e,Vr(t)?t:[t])},ux=Date.prototype.toISOString,Ih=as.default,Fe={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:oo.encode,encodeValuesOnly:!1,format:Ih,formatter:as.formatters[Ih],indices:!1,serializeDate:function(t){return ux.call(t)},skipNulls:!1,strictNullHandling:!1},fx=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},kl={},cx=function e(t,r,n,i,o,l,u,f,h,p,d,c,v,m,y,_){for(var b=t,w=_,T=0,x=!1;(w=w.get(kl))!==void 0&&!x;){var S=w.get(t);if(T+=1,typeof S<"u"){if(S===T)throw new RangeError("Cyclic object value");x=!0}typeof w.get(kl)>"u"&&(T=0)}if(typeof f=="function"?b=f(r,b):b instanceof Date?b=d(b):n==="comma"&&Vr(b)&&(b=oo.maybeMap(b,function(Z){return Z instanceof Date?d(Z):Z})),b===null){if(o)return u&&!m?u(r,Fe.encoder,y,"key",c):r;b=""}if(fx(b)||oo.isBuffer(b)){if(u){var I=m?r:u(r,Fe.encoder,y,"key",c);return[v(I)+"="+v(u(b,Fe.encoder,y,"value",c))]}return[v(r)+"="+v(String(b))]}var A=[];if(typeof b>"u")return A;var O;if(n==="comma"&&Vr(b))m&&u&&(b=oo.maybeMap(b,u)),O=[{value:b.length>0?b.join(",")||null:void 0}];else if(Vr(f))O=f;else{var L=Object.keys(b);O=h?L.sort(h):L}for(var R=i&&Vr(b)&&b.length===1?r+"[]":r,C=0;C<O.length;++C){var P=O[C],M=typeof P=="object"&&typeof P.value<"u"?P.value:b[P];if(!(l&&M===null)){var F=Vr(b)?typeof n=="function"?n(R,P):R:R+(p?"."+P:"["+P+"]");_.set(t,T);var q=Oh();q.set(kl,_),Rh(A,e(M,F,n,i,o,l,n==="comma"&&m&&Vr(b)?null:u,f,h,p,d,c,v,m,y,q))}}return A},hx=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(!ax.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}},dx=function(e,t){var r=e,n=hx(t),i,o;typeof n.filter=="function"?(o=n.filter,r=o("",r)):Vr(n.filter)&&(o=n.filter,i=o);var l=[];if(typeof r!="object"||r===null)return"";var u;t&&t.arrayFormat in Ch?u=t.arrayFormat:t&&"indices"in t?u=t.indices?"indices":"repeat":u="indices";var f=Ch[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 p=Oh(),d=0;d<i.length;++d){var c=i[d];n.skipNulls&&r[c]===null||Rh(l,cx(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,p))}var v=l.join(n.delimiter),m=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),v.length>0?m+v:""},vi=Ah,Ll=Object.prototype.hasOwnProperty,px=Array.isArray,Ce={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:vi.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vx=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Ph=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},gx="utf8=%26%2310003%3B",mx="utf8=%E2%9C%93",yx=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,o=r.parameterLimit===1/0?void 0:r.parameterLimit,l=i.split(r.delimiter,o),u=-1,f,h=r.charset;if(r.charsetSentinel)for(f=0;f<l.length;++f)l[f].indexOf("utf8=")===0&&(l[f]===mx?h="utf-8":l[f]===gx&&(h="iso-8859-1"),u=f,f=l.length);for(f=0;f<l.length;++f)if(f!==u){var p=l[f],d=p.indexOf("]="),c=d===-1?p.indexOf("="):d+1,v,m;c===-1?(v=r.decoder(p,Ce.decoder,h,"key"),m=r.strictNullHandling?null:""):(v=r.decoder(p.slice(0,c),Ce.decoder,h,"key"),m=vi.maybeMap(Ph(p.slice(c+1),r),function(y){return r.decoder(y,Ce.decoder,h,"value")})),m&&r.interpretNumericEntities&&h==="iso-8859-1"&&(m=vx(m)),p.indexOf("[]=")>-1&&(m=px(m)?[m]:m),Ll.call(n,v)?n[v]=vi.combine(n[v],m):n[v]=m}return n},_x=function(e,t,r,n){for(var i=n?t:Ph(t,r),o=e.length-1;o>=0;--o){var l,u=e[o];if(u==="[]"&&r.parseArrays)l=[].concat(i);else{l=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===""?l={0:i}:!isNaN(h)&&u!==f&&String(h)===f&&h>=0&&r.parseArrays&&h<=r.arrayLimit?(l=[],l[h]=i):f!=="__proto__"&&(l[f]=i)}i=l}return i},bx=function(t,r,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,f=n.depth>0&&l.exec(o),h=f?o.slice(0,f.index):o,p=[];if(h){if(!n.plainObjects&&Ll.call(Object.prototype,h)&&!n.allowPrototypes)return;p.push(h)}for(var d=0;n.depth>0&&(f=u.exec(o))!==null&&d<n.depth;){if(d+=1,!n.plainObjects&&Ll.call(Object.prototype,f[1].slice(1,-1))&&!n.allowPrototypes)return;p.push(f[1])}return f&&p.push("["+o.slice(f.index)+"]"),_x(p,r,n,i)}},xx=function(t){if(!t)return Ce;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"?Ce.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Ce.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Ce.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Ce.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Ce.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ce.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Ce.comma,decoder:typeof t.decoder=="function"?t.decoder:Ce.decoder,delimiter:typeof t.delimiter=="string"||vi.isRegExp(t.delimiter)?t.delimiter:Ce.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Ce.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Ce.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Ce.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Ce.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ce.strictNullHandling}},wx=function(e,t){var r=xx(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?yx(e,r):e,i=r.plainObjects?Object.create(null):{},o=Object.keys(n),l=0;l<o.length;++l){var u=o[l],f=bx(u,n[u],r,typeof e=="string");i=vi.merge(i,f,r)}return r.allowSparse===!0?i:vi.compact(i)},Tx=dx,Ex=wx,Sx=Nl,Ax={formats:Sx,parse:Ex,stringify:Tx},Ox=M_;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 Cx=/^([a-z0-9.+-]+:)/i,Rx=/:[0-9]*$/,Ix=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Px=["<",">",'"',"`"," ","\r",`
13
+ `," "],Nx=["{","}","|","\\","^","`"].concat(Px),Fl=["'"].concat(Nx),Nh=["%","/","?",";","#"].concat(Fl),Mh=["/","?","#"],Mx=255,kh=/^[+a-z0-9A-Z_-]{0,63}$/,kx=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Lx={javascript:!0,"javascript:":!0},Bl={javascript:!0,"javascript:":!0},gi={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Dl=Ax;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),l=/\\/g;o[0]=o[0].replace(l,"/"),e=o.join(i);var u=e;if(u=u.trim(),!r&&e.split("#").length===1){var f=Ix.exec(u);if(f)return this.path=u,this.href=u,this.pathname=f[1],f[2]?(this.search=f[2],t?this.query=Dl.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var h=Cx.exec(u);if(h){h=h[0];var p=h.toLowerCase();this.protocol=p,u=u.substr(h.length)}if(r||h||u.match(/^\/\/[^@/]+@[^@/]+/)){var d=u.substr(0,2)==="//";d&&!(h&&Bl[h])&&(u=u.substr(2),this.slashes=!0)}if(!Bl[h]&&(d||h&&!gi[h])){for(var c=-1,v=0;v<Mh.length;v++){var m=u.indexOf(Mh[v]);m!==-1&&(c===-1||m<c)&&(c=m)}var y,_;c===-1?_=u.lastIndexOf("@"):_=u.lastIndexOf("@",c),_!==-1&&(y=u.slice(0,_),u=u.slice(_+1),this.auth=decodeURIComponent(y)),c=-1;for(var v=0;v<Nh.length;v++){var m=u.indexOf(Nh[v]);m!==-1&&(c===-1||m<c)&&(c=m)}c===-1&&(c=u.length),this.host=u.slice(0,c),u=u.slice(c),this.parseHost(),this.hostname=this.hostname||"";var b=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!b)for(var w=this.hostname.split(/\./),v=0,T=w.length;v<T;v++){var x=w[v];if(x&&!x.match(kh)){for(var S="",I=0,A=x.length;I<A;I++)x.charCodeAt(I)>127?S+="x":S+=x[I];if(!S.match(kh)){var O=w.slice(0,v),L=w.slice(v+1),R=x.match(kx);R&&(O.push(R[1]),L.unshift(R[2])),L.length&&(u="/"+L.join(".")+u),this.hostname=O.join(".");break}}}this.hostname.length>Mx?this.hostname="":this.hostname=this.hostname.toLowerCase(),b||(this.hostname=Ox.toASCII(this.hostname));var C=this.port?":"+this.port:"",P=this.hostname||"";this.host=P+C,this.href+=this.host,b&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),u[0]!=="/"&&(u="/"+u))}if(!Lx[p])for(var v=0,T=Fl.length;v<T;v++){var M=Fl[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=Dl.parse(this.query)),u=u.slice(0,Z)):t&&(this.search="",this.query={}),u&&(this.pathname=u),gi[p]&&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 Fx(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=Dl.stringify(this.query));var l=this.search||o&&"?"+o||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||gi[t])&&i!==!1?(i="//"+(i||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):i||(i=""),n&&n.charAt(0)!=="#"&&(n="#"+n),l&&l.charAt(0)!=="?"&&(l="?"+l),r=r.replace(/[?#]/g,function(u){return encodeURIComponent(u)}),l=l.replace("#","%23"),t+i+r+l+n};function Bx(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 l=Object.keys(e),u=0;u<l.length;u++){var f=l[u];f!=="protocol"&&(r[f]=e[f])}return gi[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(!gi[e.protocol]){for(var h=Object.keys(e),p=0;p<h.length;p++){var d=h[p];r[d]=e[d]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Bl[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 m=r.pathname&&r.pathname.charAt(0)==="/",y=e.host||e.pathname&&e.pathname.charAt(0)==="/",_=y||m||r.host&&e.pathname,b=_,w=r.pathname&&r.pathname.split("/")||[],T=e.pathname&&e.pathname.split("/")||[],x=r.protocol&&!gi[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),_=_&&(T[0]===""||w[0]==="")),y)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 S=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;S&&(r.auth=S.shift(),r.hostname=S.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],A=(r.host||e.host||w.length>1)&&(I==="."||I==="..")||I==="",O=0,L=w.length;L>=0;L--)I=w[L],I==="."?w.splice(L,1):I===".."?(w.splice(L,1),O++):O&&(w.splice(L,1),O--);if(!_&&!b)for(;O--;O)w.unshift("..");_&&w[0]!==""&&(!w[0]||w[0].charAt(0)!=="/")&&w.unshift(""),A&&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 S=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;S&&(r.auth=S.shift(),r.hostname=S.shift(),r.host=r.hostname)}return _=_||r.host&&w.length,_&&!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=Rx.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 Dx=ao,Ux=Bx,$x=Fx;const Gx={parse:Dx,format:$x,resolve:Ux},Lh={};function Ht(e,t,r=3){if(Lh[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))),Mh[t]=!0}let Dl;function Ux(){return typeof Dl>"u"&&(Dl=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:Ut.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!Ut.ADAPTER.getWebGLRenderingContext())return!1;const n=Ut.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 l=i.getExtension("WEBGL_lose_context");l&&l.loseContext()}return i=null,o}catch{return!1}}()),Dl}var $x={grad:.9,turn:360,rad:360/(2*Math.PI)},Vr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Re=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},ar=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},kh=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Lh=function(e){return{r:ar(e.r,0,255),g:ar(e.g,0,255),b:ar(e.b,0,255),a:ar(e.a)}},Ul=function(e){return{r:Re(e.r),g:Re(e.g),b:Re(e.b),a:Re(e.a,3)}},Gx=/^#([0-9a-f]{3,8})$/i,lo=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Fh=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),l=o-Math.min(t,r,n),u=l?o===t?(r-n)/l:o===r?2+(n-t)/l:4+(t-r)/l:0;return{h:60*(u<0?u+6:u),s:o?l/o*100:0,v:o/255*100,a:i}},Bh=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),l=n*(1-r),u=n*(1-(t-o)*r),f=n*(1-(1-t+o)*r),h=o%6;return{r:255*[n,u,l,l,f,n][h],g:255*[f,n,n,u,l,l][h],b:255*[l,l,f,n,n,u][h],a:i}},Dh=function(e){return{h:kh(e.h),s:ar(e.s,0,100),l:ar(e.l,0,100),a:ar(e.a)}},Uh=function(e){return{h:Re(e.h),s:Re(e.s),l:Re(e.l),a:Re(e.a,3)}},$h=function(e){return Bh((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=Fh(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},jx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,qx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,zx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Hx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,$l={string:[[function(e){var t=Gx.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?Re(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?Re(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=zx.exec(e)||Hx.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Lh({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=jx.exec(e)||qx.exec(e);if(!t)return null;var r,n,i=Dh({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*($x[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return $h(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 Vr(t)&&Vr(r)&&Vr(n)?Lh({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(!Vr(t)||!Vr(r)||!Vr(n))return null;var l=Dh({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return $h(l)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,i=e.a,o=i===void 0?1:i;if(!Vr(t)||!Vr(r)||!Vr(n))return null;var l=function(u){return{h:kh(u.h),s:ar(u.s,0,100),v:ar(u.v,0,100),a:ar(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return Bh(l)},"hsv"]]},Gh=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]},Vx=function(e){return typeof e=="string"?Gh(e.trim(),$l.string):typeof e=="object"&&e!==null?Gh(e,$l.object):[null,void 0]},Gl=function(e,t){var r=ls(e);return{h:r.h,s:ar(r.s+100*t,0,100),l:r.l,a:r.a}},jl=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},jh=function(e,t){var r=ls(e);return{h:r.h,s:r.s,l:ar(r.l+100*t,0,100),a:r.a}},ql=function(){function e(t){this.parsed=Vx(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 Re(jl(this.rgba),2)},e.prototype.isDark=function(){return jl(this.rgba)<.5},e.prototype.isLight=function(){return jl(this.rgba)>=.5},e.prototype.toHex=function(){return t=Ul(this.rgba),r=t.r,n=t.g,i=t.b,l=(o=t.a)<1?lo(Re(255*o)):"","#"+lo(r)+lo(n)+lo(i)+l;var t,r,n,i,o,l},e.prototype.toRgb=function(){return Ul(this.rgba)},e.prototype.toRgbString=function(){return t=Ul(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 Uh(ls(this.rgba))},e.prototype.toHslString=function(){return t=Uh(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=Fh(this.rgba),{h:Re(t.h),s:Re(t.s),v:Re(t.v),a:Re(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(Gl(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ur(Gl(this.rgba,-t))},e.prototype.grayscale=function(){return Ur(Gl(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ur(jh(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ur(jh(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}):Re(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}):Re(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ur(t).toHex()},e}(),Ur=function(e){return e instanceof ql?e:new ql(e)},qh=[],Wx=function(e){e.forEach(function(t){qh.indexOf(t)<0&&(t(ql,$l),qh.push(t))})};function Xx(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(l){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(l!=null&&l.closest){var p=this.toRgb(),d=1/0,c="black";if(!o.length)for(var v in r)o[v]=new e(r[v]).toRgb();for(var m in r){var y=(u=p,f=o[m],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));y<d&&(d=y,c=m)}return c}},t.string.push([function(l){var u=l.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}Wx([Xx]);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(l=>e[l]===t[l])}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:l}=r.rgba;t=[n/255,i/255,o/255,l]}}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 zl(e){return Ht("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Be.shared.setValue(e).toNumber()}function Kx(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[Rt.NORMAL_NPM]=Rt.NORMAL,e[Rt.ADD_NPM]=Rt.ADD,e[Rt.SCREEN_NPM]=Rt.SCREEN,t[Rt.NORMAL]=Rt.NORMAL_NPM,t[Rt.ADD]=Rt.ADD_NPM,t[Rt.SCREEN]=Rt.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const Yx=Kx();function zh(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 Hh(e){return!(e&e-1)&&!!e}function Vh(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 Zx=0;function us(){return++Zx}const Wh={},$r=Object.create(null),hn=Object.create(null);let ho;function Qx(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,ho||(ho=document.createElement("a")),ho.href=e;const r=Dx.parse(ho.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Xh(e,t=1){var n;const r=(n=Ut.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 Hl=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},Kh=(e,t)=>Hl(e).priority??t,Jt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Hl).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(Hl).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(l=>t(l)),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)=>Kh(o,r)-Kh(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class Jx{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 tw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
- `);function ew(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 rw(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=tw.replace(/%forloop%/gi,ew(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Vl=0,Wl=1,Xl=2,Kl=3,Yl=4,Zl=5;let po=class Qm{constructor(){this.data=0,this.blendMode=Rt.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Vl)}set blend(t){!!(this.data&1<<Vl)!==t&&(this.data^=1<<Vl)}get offsets(){return!!(this.data&1<<Wl)}set offsets(t){!!(this.data&1<<Wl)!==t&&(this.data^=1<<Wl)}get culling(){return!!(this.data&1<<Xl)}set culling(t){!!(this.data&1<<Xl)!==t&&(this.data^=1<<Xl)}get depthTest(){return!!(this.data&1<<Kl)}set depthTest(t){!!(this.data&1<<Kl)!==t&&(this.data^=1<<Kl)}get depthMask(){return!!(this.data&1<<Zl)}set depthMask(t){!!(this.data&1<<Zl)!==t&&(this.data^=1<<Zl)}get clockwiseFrontFace(){return!!(this.data&1<<Yl)}set clockwiseFrontFace(t){!!(this.data&1<<Yl)!==t&&(this.data^=1<<Yl)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==Rt.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 Qm;return t.depthTest=!1,t.blend=!0,t}};const Ql=[];function Yh(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=Ql.length-1;n>=0;--n){const i=Ql[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,l,u,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:p}=this;this._aliasCount++;for(let d=0,c=p.length;d<c;d++)p[d][h](t,r,n,i,o,l,u,f);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(_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 Jl 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,l=r.realHeight;return n.width===o&&n.height===l?i.texSubImage2D(r.target,0,0,0,o,l,r.format,n.type,this.data):(n.width=o,n.height=l,i.texImage2D(r.target,0,n.internalFormat,o,l,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 nw={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:l,height:u,wrapMode:f,format:h,type:p,target:d,resolution:c,resourceOptions:v}=t;e&&!(e instanceof fs)&&(e=Yh(e,v),e.internal=!0),this.resolution=c||Ut.RESOLUTION,this.width=Math.round((l||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=p,this.target=d,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=l>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=Hh(this.realWidth)&&Hh(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=Ut.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let i=null;if(n)i=e;else{if(!e._pixiId){const l=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${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 Jl(e,{width:t,height:r}),o=e instanceof Float32Array?Wt.FLOAT:Wt.UNSIGNED_BYTE;return new mi(i,Object.assign({},nw,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 Xt=mi;Xt.defaultOptions={mipmap:On.POW2,anisotropicLevel:0,scaleMode:Lr.LINEAR,wrapMode:Ji.CLAMP,alphaMode:ln.UNPACK,target:ii.TEXTURE_2D,format:bt.RGBA,type:Wt.UNSIGNED_BYTE},Xt._globalBatch=0;class tu{constructor(){this.texArray=null,this.blend=0,this.type=an.TRIANGLES,this.start=0,this.size=0,this.data=null}}let iw=0,Ze=class Jm{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=iw++,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 Jm(t)}};class vo{constructor(t,r=0,n=!1,i=Wt.FLOAT,o,l,u,f=1){this.buffer=t,this.size=r,this.normalized=n,this.type=i,this.stride=o,this.start=l,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 sw={Float32Array,Uint32Array,Int32Array,Uint8Array};function ow(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 l=null,u=0;for(let f=0;f<e.length;f++){const h=t[f],p=e[f],d=zh(p);i[d]||(i[d]=new sw[d](o)),l=i[d];for(let c=0;c<p.length;c++){const v=(c/h|0)*n+u,m=c%h;l[v+m]=p[c]}u+=h}return new Float32Array(o)}const Zh={5126:4,5123:2,5121:1};let aw=0;const lw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class yi{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=aw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new _r("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,i=!1,o,l,u,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Ze||(r instanceof Array&&(r=new Float32Array(r)),r=new Ze(r));const h=t.split("|");if(h.length>1){for(let d=0;d<h.length;d++)this.addAttribute(h[d],r,n,i,o);return this}let p=this.buffers.indexOf(r);return p===-1&&(this.buffers.push(r),p=this.buffers.length-1),this.attributes[t]=new vo(p,n,i,o,l,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 Ze||(t instanceof Array&&(t=new Uint16Array(t)),t=new Ze(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 Ze;let i;for(i in this.attributes){const o=this.attributes[i],l=this.buffers[o.buffer];t.push(l.data),r.push(o.size*Zh[o.type]/4),o.buffer=0}for(n.data=ow(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 Ze(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 l;for(let u=0;u<t.length;u++){l=t[u];for(let f=0;f<l.buffers.length;f++)i[f]=i[f]||0,i[f]+=l.buffers[f].data.length,o[f]=0}for(let u=0;u<l.buffers.length;u++)n[u]=new lw[zh(l.buffers[u].data)](i[u]),r.buffers[u]=new Ze(n[u]);for(let u=0;u<t.length;u++){l=t[u];for(let f=0;f<l.buffers.length;f++)n[f].set(l.buffers[f].data,o[f]),o[f]+=l.buffers[f].data.length}if(r.attributes=l.attributes,l.indexBuffer){r.indexBuffer=r.buffers[l.buffers.indexOf(l.indexBuffer)],r.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER;let u=0,f=0,h=0,p=0;for(let d=0;d<l.buffers.length;d++)if(l.buffers[d]!==l.indexBuffer){p=d;break}for(const d in l.attributes){const c=l.attributes[d];(c.buffer|0)===p&&(f+=c.size*Zh[c.type]/4)}for(let d=0;d<t.length;d++){const c=t[d].indexBuffer.data;for(let v=0;v<c.length;v++)r.indexBuffer.data[v+h]+=u;u+=t[d].buffers[p].data.length/f,h+=c.length}}return r}}class Qh extends yi{constructor(t=!1){super(),this._buffer=new Ze(null,t,!1),this._indexBuffer=new Ze(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Wt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Wt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Wt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Wt.FLOAT).addIndex(this._indexBuffer)}}const go=Math.PI*2,uw=180/Math.PI,cs=Math.PI/180;var Pe=(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))(Pe||{});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 ne{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=Pe.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 ne(0,0,0,0)}clone(){return new ne(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 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,l=this.bottom;if(i<=n||l<=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),p=mo[3].set(t.right,t.bottom);if(h.x<=u.x||f.y<=u.y)return!1;const d=Math.sign(r.a*r.d-r.b*r.c);if(d===0||(r.apply(u,u),r.apply(f,f),r.apply(h,h),r.apply(p,p),Math.max(u.x,f.x,h.x,p.x)<=n||Math.min(u.x,f.x,h.x,p.x)>=i||Math.max(u.y,f.y,h.y,p.y)<=o||Math.min(u.y,f.y,h.y,p.y)>=l))return!1;const c=d*(f.y-u.y),v=d*(u.x-f.x),m=c*n+v*o,y=c*i+v*o,b=c*n+v*l,_=c*i+v*l;if(Math.max(m,y,b,_)<=c*u.x+v*u.y||Math.min(m,y,b,_)>=c*p.x+v*p.y)return!1;const w=d*(u.y-h.y),T=d*(h.x-u.x),x=w*n+T*o,S=w*i+T*o,I=w*n+T*l,A=w*i+T*l;return!(Math.max(x,S,I,A)<=w*u.x+T*u.y||Math.min(x,S,I,A)>=w*p.x+T*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),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 eu{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=Pe.CIRC}clone(){return new eu(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 ne(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 fw=class ty{constructor(t=0,r=0,n=0,i=0){this.x=t,this.y=r,this.width=n,this.height=i,this.type=Pe.ELIP}clone(){return new ty(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 ne(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=Pe.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,l=i-1;o<i;l=o++){const u=this.points[o*2],f=this.points[o*2+1],h=this.points[l*2],p=this.points[l*2+1];f>r!=p>r&&t<(h-u)*((r-f)/(p-f))+u&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class ru{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=Pe.RREC}clone(){return new ru(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 l=n*n;if(i*i+o*o<=l||(i=t-(this.x+this.width-n),i*i+o*o<=l)||(o=r-(this.y+this.height-n),i*i+o*o<=l)||(i=t-(this.x+n),i*i+o*o<=l))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,l=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=l}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,l){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=l,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,l=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=l*r-this.ty*n,this.ty=l*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,l,u,f,h){return this.a=Math.cos(u+h)*o,this.b=Math.sin(u+h)*o,this.c=-Math.sin(u-f)*l,this.d=Math.cos(u-f)*l,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,l=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+(l.x*r+l.y*i),t.position.y=this.ty+(l.x*n+l.y*o),t}invert(){const t=this.a,r=this.b,n=this.c,i=this.d,o=this.tx,l=t*i-r*n;return this.a=i/l,this.b=-r/l,this.c=-n/l,this.d=t/l,this.tx=(n*this.ty-i*o)/l,this.ty=-(t*this.ty-r*o)/l,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 Mn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],kn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Ln=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Fn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],nu=[],Jh=[],yo=Math.sign;function cw(){for(let e=0;e<16;e++){const t=[];nu.push(t);for(let r=0;r<16;r++){const n=yo(Mn[e]*Mn[r]+Ln[e]*kn[r]),i=yo(kn[e]*Mn[r]+Fn[e]*kn[r]),o=yo(Mn[e]*Ln[r]+Ln[e]*Fn[r]),l=yo(kn[e]*Ln[r]+Fn[e]*Fn[r]);for(let u=0;u<16;u++)if(Mn[u]===n&&kn[u]===i&&Ln[u]===o&&Fn[u]===l){t.push(u);break}}}for(let e=0;e<16;e++){const t=new $e;t.set(Mn[e],kn[e],Ln[e],Fn[e],0,0),Jh.push(t)}}cw();const pe={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=>Mn[e],uY:e=>kn[e],vX:e=>Ln[e],vY:e=>Fn[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>nu[e][t],sub:(e,t)=>nu[e][pe.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?pe.S:pe.N:Math.abs(t)*2<=Math.abs(e)?e>0?pe.E:pe.W:t>0?e>0?pe.SE:pe.SW:e>0?pe.NE:pe.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const i=Jh[pe.inv(t)];i.tx=r,i.ty=n,e.append(i)}};class Bn{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 Bn(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 td=class{constructor(){this.worldTransform=new $e,this.localTransform=new $e,this.position=new Bn(this.onChange,this,0,0),this.scale=new Bn(this.onChange,this,1,1),this.pivot=new Bn(this.onChange,this,0,0),this.skew=new Bn(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 iu=td;iu.IDENTITY=new td;var hw=`varying vec2 vTextureCoord;
18
+ Deprecated since v${e}`),console.warn(n))),Lh[t]=!0}let Ul;function jx(){return typeof Ul>"u"&&(Ul=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 l=i.getExtension("WEBGL_lose_context");l&&l.loseContext()}return i=null,o}catch{return!1}}()),Ul}var qx={grad:.9,turn:360,rad:360/(2*Math.PI)},Wr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},Re=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},ar=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Fh=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Bh=function(e){return{r:ar(e.r,0,255),g:ar(e.g,0,255),b:ar(e.b,0,255),a:ar(e.a)}},$l=function(e){return{r:Re(e.r),g:Re(e.g),b:Re(e.b),a:Re(e.a,3)}},zx=/^#([0-9a-f]{3,8})$/i,lo=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Dh=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=Math.max(t,r,n),l=o-Math.min(t,r,n),u=l?o===t?(r-n)/l:o===r?2+(n-t)/l:4+(t-r)/l:0;return{h:60*(u<0?u+6:u),s:o?l/o*100:0,v:o/255*100,a:i}},Uh=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),l=n*(1-r),u=n*(1-(t-o)*r),f=n*(1-(1-t+o)*r),h=o%6;return{r:255*[n,u,l,l,f,n][h],g:255*[f,n,n,u,l,l][h],b:255*[l,l,f,n,n,u][h],a:i}},$h=function(e){return{h:Fh(e.h),s:ar(e.s,0,100),l:ar(e.l,0,100),a:ar(e.a)}},Gh=function(e){return{h:Re(e.h),s:Re(e.s),l:Re(e.l),a:Re(e.a,3)}},jh=function(e){return Uh((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=Dh(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},Hx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Wx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Gl={string:[[function(e){var t=zx.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?Re(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?Re(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=Wx.exec(e)||Xx.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Bh({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=Hx.exec(e)||Vx.exec(e);if(!t)return null;var r,n,i=$h({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(qx[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return jh(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)?Bh({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 l=$h({h:Number(t),s:Number(r),l:Number(n),a:Number(o)});return jh(l)},"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 l=function(u){return{h:Fh(u.h),s:ar(u.s,0,100),v:ar(u.v,0,100),a:ar(u.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(o)});return Uh(l)},"hsv"]]},qh=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]},Kx=function(e){return typeof e=="string"?qh(e.trim(),Gl.string):typeof e=="object"&&e!==null?qh(e,Gl.object):[null,void 0]},jl=function(e,t){var r=ls(e);return{h:r.h,s:ar(r.s+100*t,0,100),l:r.l,a:r.a}},ql=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},zh=function(e,t){var r=ls(e);return{h:r.h,s:r.s,l:ar(r.l+100*t,0,100),a:r.a}},zl=function(){function e(t){this.parsed=Kx(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 Re(ql(this.rgba),2)},e.prototype.isDark=function(){return ql(this.rgba)<.5},e.prototype.isLight=function(){return ql(this.rgba)>=.5},e.prototype.toHex=function(){return t=$l(this.rgba),r=t.r,n=t.g,i=t.b,l=(o=t.a)<1?lo(Re(255*o)):"","#"+lo(r)+lo(n)+lo(i)+l;var t,r,n,i,o,l},e.prototype.toRgb=function(){return $l(this.rgba)},e.prototype.toRgbString=function(){return t=$l(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 Gh(ls(this.rgba))},e.prototype.toHslString=function(){return t=Gh(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=Dh(this.rgba),{h:Re(t.h),s:Re(t.s),v:Re(t.v),a:Re(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(jl(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ur(jl(this.rgba,-t))},e.prototype.grayscale=function(){return Ur(jl(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ur(zh(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ur(zh(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}):Re(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}):Re(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ur(t).toHex()},e}(),Ur=function(e){return e instanceof zl?e:new zl(e)},Hh=[],Yx=function(e){e.forEach(function(t){Hh.indexOf(t)<0&&(t(zl,Gl),Hh.push(t))})};function Zx(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(l){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(l!=null&&l.closest){var p=this.toRgb(),d=1/0,c="black";if(!o.length)for(var v in r)o[v]=new e(r[v]).toRgb();for(var m in r){var y=(u=p,f=o[m],Math.pow(u.r-f.r,2)+Math.pow(u.g-f.g,2)+Math.pow(u.b-f.b,2));y<d&&(d=y,c=m)}return c}},t.string.push([function(l){var u=l.toLowerCase(),f=u==="transparent"?"#0000":r[u];return f?new e(f).toRgb():null},"name"])}Yx([Zx]);const mi=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 mi)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(l=>e[l]===t[l])}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]=mi.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=mi.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ur(e);if(r.isValid()){const{r:n,g:i,b:o,a:l}=r.rgba;t=[n/255,i/255,o/255,l]}}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=mi;Be.shared=new mi,Be.temp=new mi,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 Hl(e){return Ht("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Be.shared.setValue(e).toNumber()}function Qx(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[Rt.NORMAL_NPM]=Rt.NORMAL,e[Rt.ADD_NPM]=Rt.ADD,e[Rt.SCREEN_NPM]=Rt.SCREEN,t[Rt.NORMAL]=Rt.NORMAL_NPM,t[Rt.ADD]=Rt.ADD_NPM,t[Rt.SCREEN]=Rt.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const Jx=Qx();function Vh(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 Wh(e){return!(e&e-1)&&!!e}function Xh(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 tw=0;function us(){return++tw}const Kh={},$r=Object.create(null),hn=Object.create(null);let ho;function ew(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,ho||(ho=document.createElement("a")),ho.href=e;const r=Gx.parse(ho.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Yh(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 Vl=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},Zh=(e,t)=>Vl(e).priority??t,te={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(Vl).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(Vl).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(l=>t(l)),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)=>Zh(o,r)-Zh(i,r)))},n=>{const i=t.indexOf(n.ref);i!==-1&&t.splice(i,1)})}};class rw{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 nw=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
+ `);function iw(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 sw(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=nw.replace(/%forloop%/gi,iw(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Wl=0,Xl=1,Kl=2,Yl=3,Zl=4,Ql=5;let po=class ty{constructor(){this.data=0,this.blendMode=Rt.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Wl)}set blend(t){!!(this.data&1<<Wl)!==t&&(this.data^=1<<Wl)}get offsets(){return!!(this.data&1<<Xl)}set offsets(t){!!(this.data&1<<Xl)!==t&&(this.data^=1<<Xl)}get culling(){return!!(this.data&1<<Kl)}set culling(t){!!(this.data&1<<Kl)!==t&&(this.data^=1<<Kl)}get depthTest(){return!!(this.data&1<<Yl)}set depthTest(t){!!(this.data&1<<Yl)!==t&&(this.data^=1<<Yl)}get depthMask(){return!!(this.data&1<<Ql)}set depthMask(t){!!(this.data&1<<Ql)!==t&&(this.data^=1<<Ql)}get clockwiseFrontFace(){return!!(this.data&1<<Zl)}set clockwiseFrontFace(t){!!(this.data&1<<Zl)!==t&&(this.data^=1<<Zl)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==Rt.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 ty;return t.depthTest=!1,t.blend=!0,t}};const Jl=[];function Qh(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=Jl.length-1;n>=0;--n){const i=Jl[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,l,u,f){if(arguments.length>8)throw new Error("max arguments reached");const{name:h,items:p}=this;this._aliasCount++;for(let d=0,c=p.length;d<c;d++)p[d][h](t,r,n,i,o,l,u,f);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(_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 tu 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,l=r.realHeight;return n.width===o&&n.height===l?i.texSubImage2D(r.target,0,0,0,o,l,r.format,n.type,this.data):(n.width=o,n.height=l,i.texImage2D(r.target,0,n.internalFormat,o,l,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 ow={scaleMode:Lr.NEAREST,format:bt.RGBA,alphaMode:ln.NPM},yi=class extends Ws{constructor(e=null,t=null){super(),t=Object.assign({},yi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:i,scaleMode:o,width:l,height:u,wrapMode:f,format:h,type:p,target:d,resolution:c,resourceOptions:v}=t;e&&!(e instanceof fs)&&(e=Qh(e,v),e.internal=!0),this.resolution=c||Dt.RESOLUTION,this.width=Math.round((l||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=p,this.target=d,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=l>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=Wh(this.realWidth)&&Wh(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(),yi.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 l=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${l}_${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 yi(e,t),o.cacheId=i,yi.addToCache(o,i)),o}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const i=new tu(e,{width:t,height:r}),o=e instanceof Float32Array?Wt.FLOAT:Wt.UNSIGNED_BYTE;return new yi(i,Object.assign({},ow,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 Xt=yi;Xt.defaultOptions={mipmap:Cn.POW2,anisotropicLevel:0,scaleMode:Lr.LINEAR,wrapMode:Ji.CLAMP,alphaMode:ln.UNPACK,target:si.TEXTURE_2D,format:bt.RGBA,type:Wt.UNSIGNED_BYTE},Xt._globalBatch=0;class eu{constructor(){this.texArray=null,this.blend=0,this.type=an.TRIANGLES,this.start=0,this.size=0,this.data=null}}let aw=0,Ze=class ey{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=aw++,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 ey(t)}};class vo{constructor(t,r=0,n=!1,i=Wt.FLOAT,o,l,u,f=1){this.buffer=t,this.size=r,this.normalized=n,this.type=i,this.stride=o,this.start=l,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 lw={Float32Array,Uint32Array,Int32Array,Uint8Array};function uw(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 l=null,u=0;for(let f=0;f<e.length;f++){const h=t[f],p=e[f],d=Vh(p);i[d]||(i[d]=new lw[d](o)),l=i[d];for(let c=0;c<p.length;c++){const v=(c/h|0)*n+u,m=c%h;l[v+m]=p[c]}u+=h}return new Float32Array(o)}const Jh={5126:4,5123:2,5121:1};let fw=0;const cw={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class _i{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=fw++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new _r("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,i=!1,o,l,u,f=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Ze||(r instanceof Array&&(r=new Float32Array(r)),r=new Ze(r));const h=t.split("|");if(h.length>1){for(let d=0;d<h.length;d++)this.addAttribute(h[d],r,n,i,o);return this}let p=this.buffers.indexOf(r);return p===-1&&(this.buffers.push(r),p=this.buffers.length-1),this.attributes[t]=new vo(p,n,i,o,l,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 Ze||(t instanceof Array&&(t=new Uint16Array(t)),t=new Ze(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 Ze;let i;for(i in this.attributes){const o=this.attributes[i],l=this.buffers[o.buffer];t.push(l.data),r.push(o.size*Jh[o.type]/4),o.buffer=0}for(n.data=uw(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 _i;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Ze(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 _i,n=[],i=[],o=[];let l;for(let u=0;u<t.length;u++){l=t[u];for(let f=0;f<l.buffers.length;f++)i[f]=i[f]||0,i[f]+=l.buffers[f].data.length,o[f]=0}for(let u=0;u<l.buffers.length;u++)n[u]=new cw[Vh(l.buffers[u].data)](i[u]),r.buffers[u]=new Ze(n[u]);for(let u=0;u<t.length;u++){l=t[u];for(let f=0;f<l.buffers.length;f++)n[f].set(l.buffers[f].data,o[f]),o[f]+=l.buffers[f].data.length}if(r.attributes=l.attributes,l.indexBuffer){r.indexBuffer=r.buffers[l.buffers.indexOf(l.indexBuffer)],r.indexBuffer.type=Fr.ELEMENT_ARRAY_BUFFER;let u=0,f=0,h=0,p=0;for(let d=0;d<l.buffers.length;d++)if(l.buffers[d]!==l.indexBuffer){p=d;break}for(const d in l.attributes){const c=l.attributes[d];(c.buffer|0)===p&&(f+=c.size*Jh[c.type]/4)}for(let d=0;d<t.length;d++){const c=t[d].indexBuffer.data;for(let v=0;v<c.length;v++)r.indexBuffer.data[v+h]+=u;u+=t[d].buffers[p].data.length/f,h+=c.length}}return r}}class td extends _i{constructor(t=!1){super(),this._buffer=new Ze(null,t,!1),this._indexBuffer=new Ze(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Wt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Wt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Wt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Wt.FLOAT).addIndex(this._indexBuffer)}}const go=Math.PI*2,hw=180/Math.PI,cs=Math.PI/180;var Pe=(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))(Pe||{});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 ne{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=Pe.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 ne(0,0,0,0)}clone(){return new ne(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 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,l=this.bottom;if(i<=n||l<=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),p=mo[3].set(t.right,t.bottom);if(h.x<=u.x||f.y<=u.y)return!1;const d=Math.sign(r.a*r.d-r.b*r.c);if(d===0||(r.apply(u,u),r.apply(f,f),r.apply(h,h),r.apply(p,p),Math.max(u.x,f.x,h.x,p.x)<=n||Math.min(u.x,f.x,h.x,p.x)>=i||Math.max(u.y,f.y,h.y,p.y)<=o||Math.min(u.y,f.y,h.y,p.y)>=l))return!1;const c=d*(f.y-u.y),v=d*(u.x-f.x),m=c*n+v*o,y=c*i+v*o,_=c*n+v*l,b=c*i+v*l;if(Math.max(m,y,_,b)<=c*u.x+v*u.y||Math.min(m,y,_,b)>=c*p.x+v*p.y)return!1;const w=d*(u.y-h.y),T=d*(h.x-u.x),x=w*n+T*o,S=w*i+T*o,I=w*n+T*l,A=w*i+T*l;return!(Math.max(x,S,I,A)<=w*u.x+T*u.y||Math.min(x,S,I,A)>=w*p.x+T*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),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 ru{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=Pe.CIRC}clone(){return new ru(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 ne(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 dw=class ry{constructor(t=0,r=0,n=0,i=0){this.x=t,this.y=r,this.width=n,this.height=i,this.type=Pe.ELIP}clone(){return new ry(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 ne(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=Pe.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,l=i-1;o<i;l=o++){const u=this.points[o*2],f=this.points[o*2+1],h=this.points[l*2],p=this.points[l*2+1];f>r!=p>r&&t<(h-u)*((r-f)/(p-f))+u&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class nu{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=Pe.RREC}clone(){return new nu(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 l=n*n;if(i*i+o*o<=l||(i=t-(this.x+this.width-n),i*i+o*o<=l)||(o=r-(this.y+this.height-n),i*i+o*o<=l)||(i=t-(this.x+n),i*i+o*o<=l))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,l=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=l}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,l){return this.a=t,this.b=r,this.c=n,this.d=i,this.tx=o,this.ty=l,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,l=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=l*r-this.ty*n,this.ty=l*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,l,u,f,h){return this.a=Math.cos(u+h)*o,this.b=Math.sin(u+h)*o,this.c=-Math.sin(u-f)*l,this.d=Math.cos(u-f)*l,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,l=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+(l.x*r+l.y*i),t.position.y=this.ty+(l.x*n+l.y*o),t}invert(){const t=this.a,r=this.b,n=this.c,i=this.d,o=this.tx,l=t*i-r*n;return this.a=i/l,this.b=-r/l,this.c=-n/l,this.d=t/l,this.tx=(n*this.ty-i*o)/l,this.ty=-(t*this.ty-r*o)/l,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 kn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Ln=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Fn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Bn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],iu=[],ed=[],yo=Math.sign;function pw(){for(let e=0;e<16;e++){const t=[];iu.push(t);for(let r=0;r<16;r++){const n=yo(kn[e]*kn[r]+Fn[e]*Ln[r]),i=yo(Ln[e]*kn[r]+Bn[e]*Ln[r]),o=yo(kn[e]*Fn[r]+Fn[e]*Bn[r]),l=yo(Ln[e]*Fn[r]+Bn[e]*Bn[r]);for(let u=0;u<16;u++)if(kn[u]===n&&Ln[u]===i&&Fn[u]===o&&Bn[u]===l){t.push(u);break}}}for(let e=0;e<16;e++){const t=new $e;t.set(kn[e],Ln[e],Fn[e],Bn[e],0,0),ed.push(t)}}pw();const pe={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=>kn[e],uY:e=>Ln[e],vX:e=>Fn[e],vY:e=>Bn[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>iu[e][t],sub:(e,t)=>iu[e][pe.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?pe.S:pe.N:Math.abs(t)*2<=Math.abs(e)?e>0?pe.E:pe.W:t>0?e>0?pe.SE:pe.SW:e>0?pe.NE:pe.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const i=ed[pe.inv(t)];i.tx=r,i.ty=n,e.append(i)}};class Dn{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 Dn(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 rd=class{constructor(){this.worldTransform=new $e,this.localTransform=new $e,this.position=new Dn(this.onChange,this,0,0),this.scale=new Dn(this.onChange,this,1,1),this.pivot=new Dn(this.onChange,this,0,0),this.skew=new Dn(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 su=rd;su.IDENTITY=new rd;var vw=`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
- }`,dw=`attribute vec2 aVertexPosition;
26
+ }`,gw=`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 ed(e,t,r){const n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}function su(e){const t=new Array(e);for(let r=0;r<t.length;r++)t[r]=!1;return t}function rd(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 su(2*t);case"bvec3":return su(3*t);case"bvec4":return su(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 nd(e,t,r){const n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}function ou(e){const t=new Array(e);for(let r=0;r<t.length;r++)t[r]=!1;return t}function id(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 ou(2*t);case"bvec3":return ou(3*t);case"bvec4":return ou(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 bi=[{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
- }`}],pw={float:`
157
+ }`}],mw={float:`
158
158
  if (cv !== v)
159
159
  {
160
160
  cu.value = v;
@@ -290,7 +290,7 @@ void main(void){
290
290
  cu.value = v;
291
291
 
292
292
  gl.uniform1i(location, v);
293
- }`},vw={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 gw(e,t){var n;const r=[`
293
+ }`},yw={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 _w(e,t){var n;const r=[`
294
294
  var v = null;
295
295
  var cv = null;
296
296
  var cu = null;
@@ -300,18 +300,18 @@ void main(void){
300
300
  renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}');
301
301
  `):r.push(`
302
302
  renderer.shader.syncUniformGroup(uv.${i}, syncData);
303
- `));continue}const l=e.uniforms[i];let u=!1;for(let f=0;f<_i.length;f++)if(_i[f].test(o,l)){r.push(_i[f].code(i,l)),u=!0;break}if(!u){const h=(o.size===1&&!o.isArray?pw:vw)[o.type].replace("location",`ud["${i}"].location`);r.push(`
303
+ `));continue}const l=e.uniforms[i];let u=!1;for(let f=0;f<bi.length;f++)if(bi[f].test(o,l)){r.push(bi[f].code(i,l)),u=!0;break}if(!u){const h=(o.size===1&&!o.isArray?mw:yw)[o.type].replace("location",`ud["${i}"].location`);r.push(`
304
304
  cu = ud["${i}"];
305
305
  cv = cu.value;
306
306
  v = uv["${i}"];
307
307
  ${h};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
308
- `))}const nd={};let bi=nd;function mw(){if(bi===nd||bi!=null&&bi.isContextLost()){const e=Ut.ADAPTER.createCanvas();let t;Ut.PREFER_ENV>=An.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 yw(){if(!_o){_o=or.MEDIUM;const e=mw();e&&e.getShaderPrecisionFormat&&(_o=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?or.HIGH:or.MEDIUM)}return _o}function id(e,t){const r=e.getShaderSource(t).split(`
308
+ `))}const sd={};let xi=sd;function bw(){if(xi===sd||xi!=null&&xi.isContextLost()){const e=Dt.ADAPTER.createCanvas();let t;Dt.PREFER_ENV>=On.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),xi=t}return xi}let _o;function xw(){if(!_o){_o=or.MEDIUM;const e=bw();e&&e.getShaderPrecisionFormat&&(_o=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?or.HIGH:or.MEDIUM)}return _o}function od(e,t){const r=e.getShaderSource(t).split(`
309
309
  `).map((h,p)=>`${p}: ${h}`),n=e.getShaderInfoLog(t),i=n.split(`
310
310
  `),o={},l=i.map(h=>parseFloat(h.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(h=>h&&!o[h]?(o[h]=!0,!0):!1),u=[""];l.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 _w(e,t,r,n){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(r,e.COMPILE_STATUS)||id(e,r),e.getShaderParameter(n,e.COMPILE_STATUS)||id(e,n),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const bw={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 sd(e){return bw[e]}let bo=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 ad(e,t){if(!bo){const r=Object.keys(od);bo={};for(let n=0;n<r.length;++n){const i=r[n];bo[e[i]]=od[i]}}return bo[t]}function ld(e,t,r){if(e.substring(0,9)!=="precision"){let n=t;return t===or.HIGH&&r!==or.HIGH&&(n=or.MEDIUM),`precision ${n} float;
312
- ${e}`}else if(r!==or.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}let ds;function xw(){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 ww=0;const xo={},xi=class{constructor(e,t,r="pixi-shader",n={}){this.extra={},this.id=ww++,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}
311
+ `);u[0]=f,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...u),console.groupEnd()}function ww(e,t,r,n){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(r,e.COMPILE_STATUS)||od(e,r),e.getShaderParameter(n,e.COMPILE_STATUS)||od(e,n),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const Tw={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 Tw[e]}let bo=null;const ld={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(!bo){const r=Object.keys(ld);bo={};for(let n=0;n<r.length;++n){const i=r[n];bo[e[i]]=ld[i]}}return bo[t]}function fd(e,t,r){if(e.substring(0,9)!=="precision"){let n=t;return t===or.HIGH&&r!==or.HIGH&&(n=or.MEDIUM),`precision ${n} float;
312
+ ${e}`}else if(r!==or.HIGH&&e.substring(0,15)==="precision highp")return e.replace("precision highp","precision mediump");return e}let ds;function Ew(){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 Sw=0;const xo={},wi=class{constructor(e,t,r="pixi-shader",n={}){this.extra={},this.id=Sw++,this.vertexSrc=e||wi.defaultVertexSrc,this.fragmentSrc=t||wi.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}
313
313
  ${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${r}
314
- ${this.fragmentSrc}`,this.vertexSrc=ld(this.vertexSrc,xi.defaultVertexPrecision,or.HIGH),this.fragmentSrc=ld(this.fragmentSrc,xi.defaultFragmentPrecision,yw())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return dw}static get defaultFragmentSrc(){return hw}static from(e,t,r){const n=e+t;let i=Wh[n];return i||(Wh[n]=i=new xi(e,t,r)),i}};let Wr=xi;Wr.defaultVertexPrecision=or.HIGH,Wr.defaultFragmentPrecision=oi.apple.device?or.HIGH:or.MEDIUM;let Tw=0;class br{constructor(t,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Tw++,this.static=!!r,this.ubo=!!n,t instanceof Ze?(this.buffer=t,this.buffer.type=Fr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new Ze(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=Wr.from(t,r);return new ps(i,n)}}class Ew{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 Wr(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=fd(this.vertexSrc,wi.defaultVertexPrecision,or.HIGH),this.fragmentSrc=fd(this.fragmentSrc,wi.defaultFragmentPrecision,xw())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return gw}static get defaultFragmentSrc(){return vw}static from(e,t,r){const n=e+t;let i=Kh[n];return i||(Kh[n]=i=new wi(e,t,r)),i}};let Xr=wi;Xr.defaultVertexPrecision=or.HIGH,Xr.defaultFragmentPrecision=ai.apple.device?or.HIGH:or.MEDIUM;let Aw=0;class br{constructor(t,r,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Aw++,this.static=!!r,this.ubo=!!n,t instanceof Ze?(this.buffer=t,this.buffer.type=Fr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new Ze(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 Ow{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+=`
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 ou{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 Sw(){return!oi.apple.device}function Aw(e){let t=!0;const r=Ut.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 ud{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var Ow=`varying vec2 vTextureCoord;
322
+ `,r}}class au{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 Cw(){return!ai.apple.device}function Rw(e){let t=!0;const r=Dt.ADAPTER.getNavigator();if(ai.tablet||ai.phone){if(ai.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(t=!1)}if(ai.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(t=!1)}}return t?e:4}class cd{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var Iw=`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
- `,Cw=`precision highp float;
332
+ `,Pw=`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 ud{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=Qh,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??Aw(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Sw(),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 Cw}static get defaultFragmentTemplate(){return Ow}setShaderGenerator({vertex:e=xr.defaultVertexSrc,fragment:t=xr.defaultFragmentTemplate}={}){this.shaderGenerator=new Ew(e,t)}contextChange(){const e=this.renderer.gl;Ut.PREFER_ENV===An.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),xr.defaultMaxTextures),this.maxTextures=rw(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 tu);for(;t.length<n;)t.push(new ou);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 l=++Xt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let p=0;p<this._bufferSize;++p){const d=e[p];e[p]=null,d._batchEnabled!==l&&(f.count>=t&&(n.boundArray(f,i,l,t),this.buildDrawCalls(f,h,p),h=p,f=r[++u],++l),d._batchEnabled=l,d.touched=o,f.elements[f.count++]=d)}f.count>0&&(n.boundArray(f,i,l,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++l);for(let p=0;p<i.length;p++)i[p]=null;Xt._globalBatch=l}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:o,vertexSize:l}=this,u=xr._drawCallPool;let f=this._dcIndex,h=this._aIndex,p=this._iIndex,d=u[f];d.start=this._iIndex,d.texArray=e;for(let c=t;c<r;++c){const v=n[c],m=v._texture.baseTexture,y=Yx[m.alphaMode?1:0][v.blendMode];n[c]=null,t<c&&d.blend!==y&&(d.size=p-d.start,t=c,d=u[++f],d.texArray=e,d.start=p),this.packInterleavedGeometry(v,i,o,h,p),h+=v.vertexData.length/2*l,p+=v.indices.length,d.blend=y}t<r&&(d.size=p-d.start,++f),this._dcIndex=f,this._aIndex=h,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;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:l,type:u,size:f,start:h,blend:p}=n[o];i!==l&&(i=l,this.bindAndClearTexArray(l)),this.state.blendMode=p,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=Vh(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 Jx(n*this.vertexSize*4)),i}getIndexBuffer(e){const t=fo(Math.ceil(e/12)),r=Vh(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:l}=t,u=n/this.vertexSize,f=e.uvs,h=e.indices,p=e.vertexData,d=e._texture.baseTexture._batchLocation,c=Math.min(e.worldAlpha,1),v=Be.shared.setValue(e._tintRGB).toPremultiplied(c);for(let m=0;m<p.length;m+=2)l[n++]=p[m],l[n++]=p[m+1],l[n++]=f[m],l[n++]=f[m+1],o[n++]=v,l[n++]=d;for(let m=0;m<h.length;m++)r[i++]=u+h[m]}};let wr=xr;wr.defaultBatchSize=4096,wr.extension={name:"batch",type:qt.RendererPlugin},wr._drawCallPool=[],wr._textureArrayPool=[],Jt.add(wr);var Rw=`varying vec2 vTextureCoord;
353
+ `;const xr=class extends cd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=td,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??Rw(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??Cw(),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 Pw}static get defaultFragmentTemplate(){return Iw}setShaderGenerator({vertex:e=xr.defaultVertexSrc,fragment:t=xr.defaultFragmentTemplate}={}){this.shaderGenerator=new Ow(e,t)}contextChange(){const e=this.renderer.gl;Dt.PREFER_ENV===On.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),xr.defaultMaxTextures),this.maxTextures=sw(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 eu);for(;t.length<n;)t.push(new au);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 l=++Xt._globalBatch,u=0,f=r[0],h=0;n.copyBoundTextures(i,t);for(let p=0;p<this._bufferSize;++p){const d=e[p];e[p]=null,d._batchEnabled!==l&&(f.count>=t&&(n.boundArray(f,i,l,t),this.buildDrawCalls(f,h,p),h=p,f=r[++u],++l),d._batchEnabled=l,d.touched=o,f.elements[f.count++]=d)}f.count>0&&(n.boundArray(f,i,l,t),this.buildDrawCalls(f,h,this._bufferSize),++u,++l);for(let p=0;p<i.length;p++)i[p]=null;Xt._globalBatch=l}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:i,_indexBuffer:o,vertexSize:l}=this,u=xr._drawCallPool;let f=this._dcIndex,h=this._aIndex,p=this._iIndex,d=u[f];d.start=this._iIndex,d.texArray=e;for(let c=t;c<r;++c){const v=n[c],m=v._texture.baseTexture,y=Jx[m.alphaMode?1:0][v.blendMode];n[c]=null,t<c&&d.blend!==y&&(d.size=p-d.start,t=c,d=u[++f],d.texArray=e,d.start=p),this.packInterleavedGeometry(v,i,o,h,p),h+=v.vertexData.length/2*l,p+=v.indices.length,d.blend=y}t<r&&(d.size=p-d.start,++f),this._dcIndex=f,this._aIndex=h,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;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:l,type:u,size:f,start:h,blend:p}=n[o];i!==l&&(i=l,this.bindAndClearTexArray(l)),this.state.blendMode=p,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=Xh(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 rw(n*this.vertexSize*4)),i}getIndexBuffer(e){const t=fo(Math.ceil(e/12)),r=Xh(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:l}=t,u=n/this.vertexSize,f=e.uvs,h=e.indices,p=e.vertexData,d=e._texture.baseTexture._batchLocation,c=Math.min(e.worldAlpha,1),v=Be.shared.setValue(e._tintRGB).toPremultiplied(c);for(let m=0;m<p.length;m+=2)l[n++]=p[m],l[n++]=p[m+1],l[n++]=f[m],l[n++]=f[m+1],o[n++]=v,l[n++]=d;for(let m=0;m<h.length;m++)r[i++]=u+h[m]}};let wr=xr;wr.defaultBatchSize=4096,wr.extension={name:"batch",type:qt.RendererPlugin},wr._drawCallPool=[],wr._textureArrayPool=[],te.add(wr);var Nw=`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
- `,Iw=`attribute vec2 aVertexPosition;
360
+ `,Mw=`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=Wr.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 Iw}static get defaultFragmentSrc(){return Rw}};let Yt=vs;Yt.defaultResolution=1,Yt.defaultMultisample=we.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"},Jt.add(wo);class fd{constructor(t){this.renderer=t,this.emptyRenderer=new ud(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:l,count:u}=t;let f=0;for(let h=0;h<u;h++){const p=o[h],d=p._batchLocation;if(d>=0&&d<i&&r[d]===p){l[h]=d;continue}for(;f<i;){const c=r[f];if(c&&c._batchEnabled===n&&c._batchLocation===f){f++;continue}l[h]=f,p._batchLocation=f,r[f]=p;break}}}destroy(){this.renderer=null}}fd.extension={type:qt.RendererSystem,name:"batch"},Jt.add(fd);let cd=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=cd++}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=cd++,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(Ut.PREFER_ENV>=An.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"},Jt.add(To);class Pw extends Jl{upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,l=r.realHeight;return n.width===o&&n.height===l?i.texSubImage2D(r.target,0,0,0,o,l,r.format,n.type,this.data):(n.width=o,n.height=l,i.texImage2D(r.target,0,n.internalFormat,o,l,0,r.format,n.type,this.data)),!0}}class au{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=we.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new Xt(null,{scaleMode:Lr.NEAREST,resolution:1,mipmap:On.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Xt(new Pw(null,{width:this.width,height:this.height}),{scaleMode:Lr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:On.OFF,format:bt.DEPTH_COMPONENT,type:Wt.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 hd extends Xt{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=we.NONE),super(null,t),this.mipmap=On.OFF,this.valid=!0,this._clear=new Be([0,0,0,0]),this.framebuffer=new au(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=Qx(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,i){const o=t.gl,l=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===l&&n.height===u?o.texSubImage2D(o.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=l,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 dd 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??Ut.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=l=>{n(l),this.onError.emit(l)})}),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 l in o){const u=o[l];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 pd{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 l=t.width/2/i,u=t.height/2/o,f=t.x/i+l,h=t.y/o+u;n=pe.add(n,pe.NW),this.x0=f+l*pe.uX(n),this.y0=h+u*pe.uY(n),n=pe.add(n,2),this.x1=f+l*pe.uX(n),this.y1=h+u*pe.uY(n),n=pe.add(n,2),this.x2=f+l*pe.uX(n),this.y2=h+u*pe.uY(n),n=pe.add(n,2),this.x3=f+l*pe.uX(n),this.y3=h+u*pe.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 vd=new pd;function Eo(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Vt extends Ws{constructor(t,r,n,i,o,l,u){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new ne(0,0,1,1)),t instanceof Vt&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=i,this.valid=!1,this._uvs=vd,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=l?new oe(l.x,l.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]&&Vt.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,Vt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Vt(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===vd&&(this._uvs=new pd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=Ut.STRICT_TEXTURE_CACHE){const i=typeof t=="string";let o=null;if(i)o=t;else if(t instanceof Xt){if(!t.cacheId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${u}-${us()}`,Xt.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 l=$r[o];if(i&&n&&!l)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!l&&!(t instanceof Xt)?(r.resolution||(r.resolution=Xh(t)),l=new Vt(new Xt(t,r)),l.baseTexture.cacheId=o,Xt.addToCache(l.baseTexture,o),Vt.addToCache(l,o)):!l&&t instanceof Xt&&(l=new Vt(t),Vt.addToCache(l,o)),l}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Vt.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 Vt(Xt.fromBuffer(t,r,n,i))}static fromLoader(t,r,n,i){const o=new Xt(t,Object.assign({scaleMode:Xt.defaultOptions.scaleMode,resolution:Xh(r)},i)),{resource:l}=o;l instanceof dd&&(l.url=r);const u=new Vt(o);return n||(n=r),Xt.addToCache(u.baseTexture,n),Vt.addToCache(u,n),n!==r&&(Xt.addToCache(u.baseTexture,r),Vt.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,l=r+i>this.baseTexture.width,u=n+o>this.baseTexture.height;if(l||u){const f=l&&u?"and":"or",h=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,p=`Y: ${n} + ${o} = ${n+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${f} ${p}`)}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 Vt._EMPTY||(Vt._EMPTY=new Vt(new Xt),Eo(Vt._EMPTY),Eo(Vt._EMPTY.baseTexture)),Vt._EMPTY}static get WHITE(){if(!Vt._WHITE){const t=Ut.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Vt._WHITE=new Vt(Xt.from(t)),Eo(Vt._WHITE),Eo(Vt._WHITE.baseTexture)}return Vt._WHITE}}class So extends Vt{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,l=Math.round(r*i)/i;this.valid=o>0&&l>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=l,n&&this.baseTexture.resize(o,l),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 hd(t))}}class gd{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=we.NONE){const i=new hd(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new So(i)}getOptimalTexture(t,r,n=1,i=we.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 l=this.texturePool[o].pop();return l||(l=this.createTexture(t,r,i)),l.filterPoolKey=o,l.setResolution(n),l}getFilterTexture(t,r,n){const i=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||we.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}}}gd.SCREEN_KEY=-1;class Nw extends yi{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Mw 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 Ze(this.vertices),this.uvBuffer=new Ze(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 kw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=we.NONE,this.sourceFrame=new ne,this.destinationFrame=new ne,this.bindingSourceFrame=new ne,this.bindingDestinationFrame=new ne,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],lu=new $e;class md{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new gd,this.statePool=[],this.quad=new Nw,this.quadUv=new Mw,this.tempRect=new ne,this.activeState={},this.globalUniforms=new br({outputFrame:new ne,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 kw,l=this.renderer.renderTexture;let u=r[0].resolution,f=r[0].multisample,h=r[0].padding,p=r[0].autoFit,d=r[0].legacy??!0;for(let m=1;m<r.length;m++){const y=r[m];u=Math.min(u,y.resolution),f=Math.min(f,y.multisample),h=this.useMaxPadding?Math.max(h,y.padding):h+y.padding,p=p&&y.autoFit,d=d||(y.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=l.current),i.push(o),o.resolution=u,o.multisample=f,o.legacy=d,o.target=t,o.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),o.sourceFrame.pad(h);const c=this.tempRect.copyFrom(l.sourceFrame);n.projection.transform&&this.transformAABB(lu.copyFrom(n.projection.transform).invert(),c),p?(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,l.current?l.current.resolution:n.resolution,l.sourceFrame,l.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(l.sourceFrame),o.bindingDestinationFrame.copyFrom(l.destinationFrame),o.transform=n.projection.transform,n.projection.transform=null,l.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,l=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],l[0]=Math.round(o[0]*r.resolution),l[1]=Math.round(o[1]*r.resolution),l[2]=1/l[0],l[3]=1/l[1],u[0]=.5*l[2],u[1]=.5*l[3],u[2]=r.sourceFrame.width*o[2]-.5*l[2],u[3]=r.sourceFrame.height*o[3]-.5*l[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,Cn.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let h=r.renderTexture,p=this.getOptimalFilterTexture(h.width,h.height,r.resolution);p.filterFrame=h.filterFrame;let d=0;for(d=0;d<n.length-1;++d){d===1&&r.multisample>1&&(p=this.getOptimalFilterTexture(h.width,h.height,r.resolution),p.filterFrame=h.filterFrame),n[d].apply(this,h,p,Cn.CLEAR,r);const c=h;h=p,p=c}n[d].apply(this,h,f.renderTexture,Cn.BLEND,r),d>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(h),this.returnFilterTexture(p)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=Cn.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 l=this.tempRect;l.x=0,l.y=0,l.width=t.filterFrame.width,l.height=t.filterFrame.height,n.bind(t,t.filterFrame,l)}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===Cn.CLEAR||r===Cn.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,l=t.set(i.width,0,0,i.height,n.x,n.y),u=r.worldTransform.copyTo($e.TEMP_MATRIX);return u.invert(),l.prepend(u),l.scale(1/o.width,1/o.height),l.translate(r.anchor.x,r.anchor.y),l}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,i=we.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||we.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],l=Ao[3];n.set(r.left,r.top),i.set(r.left,r.bottom),o.set(r.right,r.top),l.set(r.right,r.bottom),t.apply(n,n),t.apply(i,i),t.apply(o,o),t.apply(l,l);const u=Math.min(n.x,i.x,o.x,l.x),f=Math.min(n.y,i.y,o.y,l.y),h=Math.max(n.x,i.x,o.x,l.x),p=Math.max(n.y,i.y,o.y,l.y);r.x=u,r.y=f,r.width=h-u,r.height=p-f}roundFrame(t,r,n,i,o){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(o){const{a:l,b:u,c:f,d:h}=o;if((Math.abs(u)>1e-4||Math.abs(f)>1e-4)&&(Math.abs(l)>1e-4||Math.abs(h)>1e-4))return}o=o?lu.copyFrom(o):lu.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)}}}md.extension={type:qt.RendererSystem,name:"filter"},Jt.add(md);class Lw{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=we.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Fw=new ne;class yd{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new au(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 ne,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;Ut.PREFER_ENV===An.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 l=0;l<t.colorTextures.length;l++){const u=t.colorTextures[l];this.renderer.texture.unbind(u.parentTextureArray||u)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const l=r.width>>n,u=r.height>>n,f=l/r.width;this.setViewport(r.x*f,r.y*f,l,u)}else{const l=t.width>>n,u=t.height>>n;this.setViewport(0,0,l,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=rl.COLOR|rl.DEPTH){const{gl:l}=this;l.clearColor(t,r,n,i),l.clear(o)}initFramebuffer(t){const{gl:r}=this,n=new Lw(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 l=0;l<o;l++){const u=i[l],f=u.parentTextureArray||u;this.renderer.texture.bind(f,0),l===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 l=o.length;n.drawBuffers||(l=Math.min(l,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<l;f++){const h=o[f],p=h.parentTextureArray||h;this.renderer.texture.bind(p,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,p._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,p._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=we.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=we.NONE),n}blit(t,r,n){const{current:i,renderer:o,gl:l,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 p=i.colorTextures[0];if(!p)return;f.blitFramebuffer||(f.blitFramebuffer=new au(i.width,i.height),f.blitFramebuffer.addColorTexture(0,p)),t=f.blitFramebuffer,t.colorTextures[0]!==p&&(t.colorTextures[0]=p,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=Fw,r.width=i.width,r.height=i.height),n||(n=r);const h=r.width===n.width&&r.height===n.height;this.bind(t),l.bindFramebuffer(l.READ_FRAMEBUFFER,f.framebuffer),l.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,l.COLOR_BUFFER_BIT,h?l.NEAREST:l.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,l=o.createRenderbuffer();o.bindRenderbuffer(o.RENDERBUFFER,l),r.msaaBuffer?o.renderbufferStorageMultisample(o.RENDERBUFFER,r.multisample,o.DEPTH24_STENCIL8,n,i):o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,n,i),r.stencil=l,o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.RENDERBUFFER,l)}reset(){this.current=this.unknownFramebuffer,this.viewport=new ne}destroy(){this.renderer=null}}yd.extension={type:qt.RendererSystem,name:"framebuffer"},Jt.add(yd);const uu={5126:4,5123:2,5121:1};class _d{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;Ut.PREFER_ENV===An.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,l,u,f)=>n.drawElementsInstancedANGLE(i,o,l,u,f),t.drawArraysInstanced=(i,o,l,u)=>n.drawArraysInstancedANGLE(i,o,l,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 l=i[r.program.id]||this.initGeometryVao(t,r,o);this._activeGeometry=t,this._activeVao!==l&&(this._activeVao=l,this.hasVao?n.bindVertexArray(l):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 l in n)i[l]&&o.push(l,i[l].location);return o.join("-")}initGeometryVao(t,r,n=!0){const i=this.gl,o=this.CONTEXT_UID,l=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 p=h[f];if(p)return h[u.id]=p,p;const d=t.buffers,c=t.attributes,v={},m={};for(const y in d)v[y]=0,m[y]=0;for(const y in c)!c[y].size&&u.attributeData[y]?c[y].size=u.attributeData[y].size:c[y].size||console.warn(`PIXI Geometry attribute '${y}' size cannot be determined (likely the bound shader does not have the attribute)`),v[c[y].buffer]+=c[y].size*uu[c[y].type];for(const y in c){const b=c[y],_=b.size;b.stride===void 0&&(v[b.buffer]===_*uu[b.type]?b.stride=0:b.stride=v[b.buffer]),b.start===void 0&&(b.start=m[b.buffer],m[b.buffer]+=_*uu[b.type])}p=i.createVertexArray(),i.bindVertexArray(p);for(let y=0;y<d.length;y++){const b=d[y];l.bind(b),n&&b._glBuffers[o].refCount++}return this.activateVao(t,u),h[u.id]=p,h[f]=p,i.bindVertexArray(null),l.unbind(Fr.ARRAY_BUFFER),p}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,l=(u=this.renderer)==null?void 0:u.buffer;if(t.disposeRunner.remove(this),!!n){if(l)for(let f=0;f<o.length;f++){const h=o[f]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&l.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,l=t.buffers,u=t.attributes;t.indexBuffer&&o.bind(t.indexBuffer);let f=null;for(const h in u){const p=u[h],d=l[p.buffer],c=d._glBuffers[i];if(r.attributeData[h]){f!==c&&(o.bind(d),f=c);const v=r.attributeData[h].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,p.size,p.type||n.FLOAT,p.normalized,p.stride,p.start),p.instance)if(this.hasInstance)n.vertexAttribDivisor(v,p.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,i){const{gl:o}=this,l=this._activeGeometry;if(l.indexBuffer){const u=l.indexBuffer.data.BYTES_PER_ELEMENT,f=u===2?o.UNSIGNED_SHORT:o.UNSIGNED_INT;u===2||u===4&&this.canUseUInt32ElementIndex?l.instanced?o.drawElementsInstanced(t,r||l.indexBuffer.data.length,f,(n||0)*u,i||1):o.drawElements(t,r||l.indexBuffer.data.length,f,(n||0)*u):console.warn("unsupported index buffer type: uint32")}else l.instanced?o.drawArraysInstanced(t,n,r||l.getSize(),i||1):o.drawArrays(t,n,r||l.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}_d.extension={type:qt.RendererSystem,name:"geometry"},Jt.add(_d);const bd=new $e;class Bw{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],l=t[i+1];r[i]=o*n.a+l*n.c+n.tx,r[i+1]=o*n.b+l*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&&(bd.set(i.width/o.width,0,0,i.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(bd));const l=r.baseTexture,u=this.uClampFrame,f=this.clampMargin/l.resolution,h=this.clampOffset;return u[0]=(r._frame.x+f+h)/l.width,u[1]=(r._frame.y+f+h)/l.height,u[2]=(r._frame.x+r._frame.width-f+h)/l.width,u[3]=(r._frame.y+r._frame.height-f+h)/l.height,this.uClampOffset[0]=h/l.realWidth,this.uClampOffset[1]=h/l.realHeight,this.isSimple=r._frame.width===l.width&&r._frame.height===l.height&&r.rotate===0,!0}}var Dw=`varying vec2 vMaskCoord;
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 Mw}static get defaultFragmentSrc(){return Nw}};let Zt=vs;Zt.defaultResolution=1,Zt.defaultMultisample=we.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 hd{constructor(t){this.renderer=t,this.emptyRenderer=new cd(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:l,count:u}=t;let f=0;for(let h=0;h<u;h++){const p=o[h],d=p._batchLocation;if(d>=0&&d<i&&r[d]===p){l[h]=d;continue}for(;f<i;){const c=r[f];if(c&&c._batchEnabled===n&&c._batchLocation===f){f++;continue}l[h]=f,p._batchLocation=f,r[f]=p;break}}}destroy(){this.renderer=null}}hd.extension={type:qt.RendererSystem,name:"batch"},te.add(hd);let dd=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=dd++}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=dd++,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>=On.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 kw extends tu{upload(t,r,n){const i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===ln.UNPACK);const o=r.realWidth,l=r.realHeight;return n.width===o&&n.height===l?i.texSubImage2D(r.target,0,0,0,o,l,r.format,n.type,this.data):(n.width=o,n.height=l,i.texImage2D(r.target,0,n.internalFormat,o,l,0,r.format,n.type,this.data)),!0}}class lu{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=we.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new Xt(null,{scaleMode:Lr.NEAREST,resolution:1,mipmap:Cn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Xt(new kw(null,{width:this.width,height:this.height}),{scaleMode:Lr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:Cn.OFF,format:bt.DEPTH_COMPONENT,type:Wt.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 pd extends Xt{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=we.NONE),super(null,t),this.mipmap=Cn.OFF,this.valid=!0,this._clear=new Be([0,0,0,0]),this.framebuffer=new lu(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=ew(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,i){const o=t.gl,l=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===l&&n.height===u?o.texSubImage2D(o.TEXTURE_2D,0,0,0,r.format,n.type,i):(n.width=l,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 vd 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=l=>{n(l),this.onError.emit(l)})}),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 l in o){const u=o[l];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 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 i=r.width,o=r.height;if(n){const l=t.width/2/i,u=t.height/2/o,f=t.x/i+l,h=t.y/o+u;n=pe.add(n,pe.NW),this.x0=f+l*pe.uX(n),this.y0=h+u*pe.uY(n),n=pe.add(n,2),this.x1=f+l*pe.uX(n),this.y1=h+u*pe.uY(n),n=pe.add(n,2),this.x2=f+l*pe.uX(n),this.y2=h+u*pe.uY(n),n=pe.add(n,2),this.x3=f+l*pe.uX(n),this.y3=h+u*pe.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 md=new gd;function Eo(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Vt extends Ws{constructor(t,r,n,i,o,l,u){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new ne(0,0,1,1)),t instanceof Vt&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=i,this.valid=!1,this._uvs=md,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=l?new oe(l.x,l.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]&&Vt.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,Vt.removeFromCache(this),this.textureCacheIds=null}clone(){var i;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Vt(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===md&&(this._uvs=new gd),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 Xt){if(!t.cacheId){const u=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${u}-${us()}`,Xt.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 l=$r[o];if(i&&n&&!l)throw new Error(`The cacheId "${o}" does not exist in TextureCache.`);return!l&&!(t instanceof Xt)?(r.resolution||(r.resolution=Yh(t)),l=new Vt(new Xt(t,r)),l.baseTexture.cacheId=o,Xt.addToCache(l.baseTexture,o),Vt.addToCache(l,o)):!l&&t instanceof Xt&&(l=new Vt(t),Vt.addToCache(l,o)),l}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),i=Vt.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 Vt(Xt.fromBuffer(t,r,n,i))}static fromLoader(t,r,n,i){const o=new Xt(t,Object.assign({scaleMode:Xt.defaultOptions.scaleMode,resolution:Yh(r)},i)),{resource:l}=o;l instanceof vd&&(l.url=r);const u=new Vt(o);return n||(n=r),Xt.addToCache(u.baseTexture,n),Vt.addToCache(u,n),n!==r&&(Xt.addToCache(u.baseTexture,r),Vt.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,l=r+i>this.baseTexture.width,u=n+o>this.baseTexture.height;if(l||u){const f=l&&u?"and":"or",h=`X: ${r} + ${i} = ${r+i} > ${this.baseTexture.width}`,p=`Y: ${n} + ${o} = ${n+o} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${h} ${f} ${p}`)}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 Vt._EMPTY||(Vt._EMPTY=new Vt(new Xt),Eo(Vt._EMPTY),Eo(Vt._EMPTY.baseTexture)),Vt._EMPTY}static get WHITE(){if(!Vt._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),Vt._WHITE=new Vt(Xt.from(t)),Eo(Vt._WHITE),Eo(Vt._WHITE.baseTexture)}return Vt._WHITE}}class So extends Vt{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,l=Math.round(r*i)/i;this.valid=o>0&&l>0,this._frame.width=this.orig.width=o,this._frame.height=this.orig.height=l,n&&this.baseTexture.resize(o,l),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 pd(t))}}class yd{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=we.NONE){const i=new pd(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new So(i)}getOptimalTexture(t,r,n=1,i=we.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 l=this.texturePool[o].pop();return l||(l=this.createTexture(t,r,i)),l.filterPoolKey=o,l.setResolution(n),l}getFilterTexture(t,r,n){const i=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||we.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}}}yd.SCREEN_KEY=-1;class Lw extends _i{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class Fw extends _i{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 Ze(this.vertices),this.uvBuffer=new Ze(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 Bw{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=we.NONE,this.sourceFrame=new ne,this.destinationFrame=new ne,this.bindingSourceFrame=new ne,this.bindingDestinationFrame=new ne,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],uu=new $e;class _d{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new yd,this.statePool=[],this.quad=new Lw,this.quadUv=new Fw,this.tempRect=new ne,this.activeState={},this.globalUniforms=new br({outputFrame:new ne,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 Bw,l=this.renderer.renderTexture;let u=r[0].resolution,f=r[0].multisample,h=r[0].padding,p=r[0].autoFit,d=r[0].legacy??!0;for(let m=1;m<r.length;m++){const y=r[m];u=Math.min(u,y.resolution),f=Math.min(f,y.multisample),h=this.useMaxPadding?Math.max(h,y.padding):h+y.padding,p=p&&y.autoFit,d=d||(y.legacy??!0)}i.length===1&&(this.defaultFilterStack[0].renderTexture=l.current),i.push(o),o.resolution=u,o.multisample=f,o.legacy=d,o.target=t,o.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),o.sourceFrame.pad(h);const c=this.tempRect.copyFrom(l.sourceFrame);n.projection.transform&&this.transformAABB(uu.copyFrom(n.projection.transform).invert(),c),p?(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,l.current?l.current.resolution:n.resolution,l.sourceFrame,l.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(l.sourceFrame),o.bindingDestinationFrame.copyFrom(l.destinationFrame),o.transform=n.projection.transform,n.projection.transform=null,l.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,l=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],l[0]=Math.round(o[0]*r.resolution),l[1]=Math.round(o[1]*r.resolution),l[2]=1/l[0],l[3]=1/l[1],u[0]=.5*l[2],u[1]=.5*l[3],u[2]=r.sourceFrame.width*o[2]-.5*l[2],u[3]=r.sourceFrame.height*o[3]-.5*l[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,Rn.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let h=r.renderTexture,p=this.getOptimalFilterTexture(h.width,h.height,r.resolution);p.filterFrame=h.filterFrame;let d=0;for(d=0;d<n.length-1;++d){d===1&&r.multisample>1&&(p=this.getOptimalFilterTexture(h.width,h.height,r.resolution),p.filterFrame=h.filterFrame),n[d].apply(this,h,p,Rn.CLEAR,r);const c=h;h=p,p=c}n[d].apply(this,h,f.renderTexture,Rn.BLEND,r),d>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(h),this.returnFilterTexture(p)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=Rn.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 l=this.tempRect;l.x=0,l.y=0,l.width=t.filterFrame.width,l.height=t.filterFrame.height,n.bind(t,t.filterFrame,l)}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===Rn.CLEAR||r===Rn.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,l=t.set(i.width,0,0,i.height,n.x,n.y),u=r.worldTransform.copyTo($e.TEMP_MATRIX);return u.invert(),l.prepend(u),l.scale(1/o.width,1/o.height),l.translate(r.anchor.x,r.anchor.y),l}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,i=we.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||we.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],l=Ao[3];n.set(r.left,r.top),i.set(r.left,r.bottom),o.set(r.right,r.top),l.set(r.right,r.bottom),t.apply(n,n),t.apply(i,i),t.apply(o,o),t.apply(l,l);const u=Math.min(n.x,i.x,o.x,l.x),f=Math.min(n.y,i.y,o.y,l.y),h=Math.max(n.x,i.x,o.x,l.x),p=Math.max(n.y,i.y,o.y,l.y);r.x=u,r.y=f,r.width=h-u,r.height=p-f}roundFrame(t,r,n,i,o){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(o){const{a:l,b:u,c:f,d:h}=o;if((Math.abs(u)>1e-4||Math.abs(f)>1e-4)&&(Math.abs(l)>1e-4||Math.abs(h)>1e-4))return}o=o?uu.copyFrom(o):uu.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)}}}_d.extension={type:qt.RendererSystem,name:"filter"},te.add(_d);class Dw{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=we.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const Uw=new ne;class bd{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new lu(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 ne,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===On.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 l=0;l<t.colorTextures.length;l++){const u=t.colorTextures[l];this.renderer.texture.unbind(u.parentTextureArray||u)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const l=r.width>>n,u=r.height>>n,f=l/r.width;this.setViewport(r.x*f,r.y*f,l,u)}else{const l=t.width>>n,u=t.height>>n;this.setViewport(0,0,l,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=nl.COLOR|nl.DEPTH){const{gl:l}=this;l.clearColor(t,r,n,i),l.clear(o)}initFramebuffer(t){const{gl:r}=this,n=new Dw(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 l=0;l<o;l++){const u=i[l],f=u.parentTextureArray||u;this.renderer.texture.bind(f,0),l===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 l=o.length;n.drawBuffers||(l=Math.min(l,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<l;f++){const h=o[f],p=h.parentTextureArray||h;this.renderer.texture.bind(p,0),f===0&&i.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,i.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,i.multisample,p._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,p._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=we.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=we.NONE),n}blit(t,r,n){const{current:i,renderer:o,gl:l,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 p=i.colorTextures[0];if(!p)return;f.blitFramebuffer||(f.blitFramebuffer=new lu(i.width,i.height),f.blitFramebuffer.addColorTexture(0,p)),t=f.blitFramebuffer,t.colorTextures[0]!==p&&(t.colorTextures[0]=p,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=Uw,r.width=i.width,r.height=i.height),n||(n=r);const h=r.width===n.width&&r.height===n.height;this.bind(t),l.bindFramebuffer(l.READ_FRAMEBUFFER,f.framebuffer),l.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,l.COLOR_BUFFER_BIT,h?l.NEAREST:l.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,l=o.createRenderbuffer();o.bindRenderbuffer(o.RENDERBUFFER,l),r.msaaBuffer?o.renderbufferStorageMultisample(o.RENDERBUFFER,r.multisample,o.DEPTH24_STENCIL8,n,i):o.renderbufferStorage(o.RENDERBUFFER,o.DEPTH_STENCIL,n,i),r.stencil=l,o.framebufferRenderbuffer(o.FRAMEBUFFER,o.DEPTH_STENCIL_ATTACHMENT,o.RENDERBUFFER,l)}reset(){this.current=this.unknownFramebuffer,this.viewport=new ne}destroy(){this.renderer=null}}bd.extension={type:qt.RendererSystem,name:"framebuffer"},te.add(bd);const fu={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;Dt.PREFER_ENV===On.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,l,u,f)=>n.drawElementsInstancedANGLE(i,o,l,u,f),t.drawArraysInstanced=(i,o,l,u)=>n.drawArraysInstancedANGLE(i,o,l,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 l=i[r.program.id]||this.initGeometryVao(t,r,o);this._activeGeometry=t,this._activeVao!==l&&(this._activeVao=l,this.hasVao?n.bindVertexArray(l):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 l in n)i[l]&&o.push(l,i[l].location);return o.join("-")}initGeometryVao(t,r,n=!0){const i=this.gl,o=this.CONTEXT_UID,l=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 p=h[f];if(p)return h[u.id]=p,p;const d=t.buffers,c=t.attributes,v={},m={};for(const y in d)v[y]=0,m[y]=0;for(const y in c)!c[y].size&&u.attributeData[y]?c[y].size=u.attributeData[y].size:c[y].size||console.warn(`PIXI Geometry attribute '${y}' size cannot be determined (likely the bound shader does not have the attribute)`),v[c[y].buffer]+=c[y].size*fu[c[y].type];for(const y in c){const _=c[y],b=_.size;_.stride===void 0&&(v[_.buffer]===b*fu[_.type]?_.stride=0:_.stride=v[_.buffer]),_.start===void 0&&(_.start=m[_.buffer],m[_.buffer]+=b*fu[_.type])}p=i.createVertexArray(),i.bindVertexArray(p);for(let y=0;y<d.length;y++){const _=d[y];l.bind(_),n&&_._glBuffers[o].refCount++}return this.activateVao(t,u),h[u.id]=p,h[f]=p,i.bindVertexArray(null),l.unbind(Fr.ARRAY_BUFFER),p}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,l=(u=this.renderer)==null?void 0:u.buffer;if(t.disposeRunner.remove(this),!!n){if(l)for(let f=0;f<o.length;f++){const h=o[f]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,h.refCount===0&&!r&&l.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,l=t.buffers,u=t.attributes;t.indexBuffer&&o.bind(t.indexBuffer);let f=null;for(const h in u){const p=u[h],d=l[p.buffer],c=d._glBuffers[i];if(r.attributeData[h]){f!==c&&(o.bind(d),f=c);const v=r.attributeData[h].location;if(n.enableVertexAttribArray(v),n.vertexAttribPointer(v,p.size,p.type||n.FLOAT,p.normalized,p.stride,p.start),p.instance)if(this.hasInstance)n.vertexAttribDivisor(v,p.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,i){const{gl:o}=this,l=this._activeGeometry;if(l.indexBuffer){const u=l.indexBuffer.data.BYTES_PER_ELEMENT,f=u===2?o.UNSIGNED_SHORT:o.UNSIGNED_INT;u===2||u===4&&this.canUseUInt32ElementIndex?l.instanced?o.drawElementsInstanced(t,r||l.indexBuffer.data.length,f,(n||0)*u,i||1):o.drawElements(t,r||l.indexBuffer.data.length,f,(n||0)*u):console.warn("unsupported index buffer type: uint32")}else l.instanced?o.drawArraysInstanced(t,n,r||l.getSize(),i||1):o.drawArrays(t,n,r||l.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}xd.extension={type:qt.RendererSystem,name:"geometry"},te.add(xd);const wd=new $e;class $w{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],l=t[i+1];r[i]=o*n.a+l*n.c+n.tx,r[i+1]=o*n.b+l*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&&(wd.set(i.width/o.width,0,0,i.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(wd));const l=r.baseTexture,u=this.uClampFrame,f=this.clampMargin/l.resolution,h=this.clampOffset;return u[0]=(r._frame.x+f+h)/l.width,u[1]=(r._frame.y+f+h)/l.height,u[2]=(r._frame.x+r._frame.width-f+h)/l.width,u[3]=(r._frame.y+r._frame.height-f+h)/l.height,this.uClampOffset[0]=h/l.realWidth,this.uClampOffset[1]=h/l.realHeight,this.isSimple=r._frame.width===l.width&&r._frame.height===l.height&&r.rotate===0,!0}}var Gw=`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
- `,Uw=`attribute vec2 aVertexPosition;
411
+ `,jw=`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 $w extends Yt{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||Uw,r||Dw,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,l=o._texture;l.valid&&(l.uvMatrix||(l.uvMatrix=new Bw(l,0)),l.uvMatrix.update(),this.uniforms.npmAlpha=l.baseTexture.alphaMode?0:1,this.uniforms.mask=l,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,o).prepend(l.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=l.uvMatrix.uClampFrame,t.applyFilter(this,r,n,i))}}class Gw{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=Yt.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 xd{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 Gw;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 $w]));const o=this.renderer,l=o.renderTexture;let u,f;if(l.current){const p=l.current;u=t.resolution||p.resolution,f=t.multisample??p.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}}xd.extension={type:qt.RendererSystem,name:"mask"},Jt.add(xd);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 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 Td=new $e,Ed=[],Oo=class extends wd{constructor(e){super(e),this.glConst=Ut.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,Ed.pop()??new ne);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?Td.copyFrom(i):Td.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&&Ed.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 Sd=Oo;Sd.extension={type:qt.RendererSystem,name:"scissor"},Jt.add(Sd);class Ad extends wd{constructor(t){super(t),this.glConst=Ut.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)}}Ad.extension={type:qt.RendererSystem,name:"stencil"},Jt.add(Ad);class Od{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}}Od.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"_plugin"},Jt.add(Od);class Cd{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,l=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=l*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-l-r.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Cd.extension={type:qt.RendererSystem,name:"projection"},Jt.add(Cd);const jw=new iu;class Rd{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 l=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=jw,this.renderer.render(t,{renderTexture:l,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=u,l}destroy(){}}Rd.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"textureGenerator"},Jt.add(Rd);const Dn=new ne,gs=new ne;class Id{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ne,this.destinationFrame=new ne,this.viewportFrame=new ne}bind(t=null,r,n){const i=this.renderer;this.current=t;let o,l,u;t?(o=t.baseTexture,u=o.resolution,r||(Dn.width=t.frame.width,Dn.height=t.frame.height,r=Dn),n||(gs.x=t.frame.x,gs.y=t.frame.y,gs.width=r.width,gs.height=r.height,n=gs),l=o.framebuffer):(u=i.resolution,r||(Dn.width=i._view.screen.width,Dn.height=i._view.screen.height,r=Dn),n||(n=Dn,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(l,f),this.renderer.projection.update(n,r,u,!l),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,l=this.current?this.current.baseTexture:this.renderer._view.screen,u=o.width!==l.width||o.height!==l.height;if(u){let{x:f,y:h,width:p,height:d}=this.viewportFrame;f=Math.round(f),h=Math.round(h),p=Math.round(p),d=Math.round(d),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,h,p,d)}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}}Id.extension={type:qt.RendererSystem,name:"renderTexture"},Jt.add(Id);class qw{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 zw(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 l=ad(t,o.type),u={type:l,name:o.name,size:sd(l),location:t.getAttribLocation(e,o.name)};r[o.name]=u}return r}function Hw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const o=t.getActiveUniform(e,i),l=o.name.replace(/\[.*?\]$/,""),u=!!o.name.match(/\[.*?\]$/),f=ad(t,o.type);r[l]={name:l,index:i,type:f,size:o.size,isArray:u,value:rd(f,o.size)}}return r}function Vw(e,t){var f;const r=ed(e,e.VERTEX_SHADER,t.vertexSrc),n=ed(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)||_w(e,i,r,n),t.attributeData=zw(i,e),t.uniformData=Hw(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const h=Object.keys(t.attributeData);h.sort((p,d)=>p>d?1:-1);for(let p=0;p<h.length;p++)t.attributeData[h[p]].location=p,e.bindAttribLocation(i,p,h[p]);e.linkProgram(i)}e.deleteShader(r),e.deleteShader(n);const l={};for(const h in t.uniformData){const p=t.uniformData[h];l[h]={location:e.getUniformLocation(i,h),value:rd(p.type,p.size)}}return new qw(i,l)}function Ww(e,t,r,n,i){r.buffer.update(i)}const Xw={float:`
427
+ `;class qw 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||jw,r||Gw,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,l=o._texture;l.valid&&(l.uvMatrix||(l.uvMatrix=new $w(l,0)),l.uvMatrix.update(),this.uniforms.npmAlpha=l.baseTexture.alphaMode?0:1,this.uniforms.mask=l,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,o).prepend(l.uvMatrix.mapCoord),this.uniforms.alpha=o.worldAlpha,this.uniforms.maskClamp=l.uvMatrix.uClampFrame,t.applyFilter(this,r,n,i))}}class zw{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 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 o=this.maskDataPool.pop()||new zw;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 qw]));const o=this.renderer,l=o.renderTexture;let u,f;if(l.current){const p=l.current;u=t.resolution||p.resolution,f=t.multisample??p.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}}Td.extension={type:qt.RendererSystem,name:"mask"},te.add(Td);class Ed{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 Sd=new $e,Ad=[],Oo=class extends Ed{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,Ad.pop()??new ne);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?Sd.copyFrom(i):Sd.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&&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 Od=Oo;Od.extension={type:qt.RendererSystem,name:"scissor"},te.add(Od);class Cd extends Ed{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)}}Cd.extension={type:qt.RendererSystem,name:"stencil"},te.add(Cd);class Rd{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}}Rd.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"_plugin"},te.add(Rd);class Id{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,l=i?-1:1;o.identity(),o.a=1/r.width*2,o.d=l*(1/r.height*2),o.tx=-1-r.x*o.a,o.ty=-l-r.y*o.d}setTransform(t){}destroy(){this.renderer=null}}Id.extension={type:qt.RendererSystem,name:"projection"},te.add(Id);const Hw=new su;class Pd{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 l=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=Hw,this.renderer.render(t,{renderTexture:l,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=u,l}destroy(){}}Pd.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"textureGenerator"},te.add(Pd);const Un=new ne,gs=new ne;class Nd{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ne,this.destinationFrame=new ne,this.viewportFrame=new ne}bind(t=null,r,n){const i=this.renderer;this.current=t;let o,l,u;t?(o=t.baseTexture,u=o.resolution,r||(Un.width=t.frame.width,Un.height=t.frame.height,r=Un),n||(gs.x=t.frame.x,gs.y=t.frame.y,gs.width=r.width,gs.height=r.height,n=gs),l=o.framebuffer):(u=i.resolution,r||(Un.width=i._view.screen.width,Un.height=i._view.screen.height,r=Un),n||(n=Un,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(l,f),this.renderer.projection.update(n,r,u,!l),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,l=this.current?this.current.baseTexture:this.renderer._view.screen,u=o.width!==l.width||o.height!==l.height;if(u){let{x:f,y:h,width:p,height:d}=this.viewportFrame;f=Math.round(f),h=Math.round(h),p=Math.round(p),d=Math.round(d),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(f,h,p,d)}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}}Nd.extension={type:qt.RendererSystem,name:"renderTexture"},te.add(Nd);class Vw{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 Ww(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 l=ud(t,o.type),u={type:l,name:o.name,size:ad(l),location:t.getAttribLocation(e,o.name)};r[o.name]=u}return r}function Xw(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let i=0;i<n;i++){const o=t.getActiveUniform(e,i),l=o.name.replace(/\[.*?\]$/,""),u=!!o.name.match(/\[.*?\]$/),f=ud(t,o.type);r[l]={name:l,index:i,type:f,size:o.size,isArray:u,value:id(f,o.size)}}return r}function Kw(e,t){var f;const r=nd(e,e.VERTEX_SHADER,t.vertexSrc),n=nd(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)||ww(e,i,r,n),t.attributeData=Ww(i,e),t.uniformData=Xw(i,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const h=Object.keys(t.attributeData);h.sort((p,d)=>p>d?1:-1);for(let p=0;p<h.length;p++)t.attributeData[h[p]].location=p,e.bindAttribLocation(i,p,h[p]);e.linkProgram(i)}e.deleteShader(r),e.deleteShader(n);const l={};for(const h in t.uniformData){const p=t.uniformData[h];l[h]={location:e.getUniformLocation(i,h),value:id(p.type,p.size)}}return new Vw(i,l)}function Yw(e,t,r,n,i){r.buffer.update(i)}const Zw={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
- `},Pd={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 Kw(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 l=t[o];if(r=Pd[l.data.type],l.data.size>1&&(r=Math.max(r,16)*l.data.size),l.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,l.offset=i,i+=r,n=r):(l.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function Yw(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 Zw(e,t){if(!e.autoManage)return{size:0,syncFunc:Ww};const r=Yw(e.uniforms,t),{uboElements:n,size:i}=Kw(r),o=[`
465
+ `},Md={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 Qw(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 l=t[o];if(r=Md[l.data.type],l.data.size>1&&(r=Math.max(r,16)*l.data.size),l.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,l.offset=i,i+=r,n=r):(l.offset=i,n+=r,i+=r)}return i=Math.ceil(i/16)*16,{uboElements:t,size:i}}function Jw(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 tT(e,t){if(!e.autoManage)return{size:0,syncFunc:Yw};const r=Jw(e.uniforms,t),{uboElements:n,size:i}=Qw(r),o=[`
466
466
  var v = null;
467
467
  var v2 = null;
468
468
  var cv = null;
@@ -470,7 +470,7 @@ void main(void)
470
470
  var gl = renderer.gl
471
471
  var index = 0;
472
472
  var data = buffer.data;
473
- `];for(let l=0;l<n.length;l++){const u=n[l],f=e.uniforms[u.data.name],h=u.data.name;let p=!1;for(let d=0;d<_i.length;d++){const c=_i[d];if(c.codeUbo&&c.test(u.data,f)){o.push(`offset = ${u.offset/4};`,_i[d].codeUbo(u.data.name,f)),p=!0;break}}if(!p)if(u.data.size>1){const d=sd(u.data.type),c=Math.max(Pd[u.data.type]/16,1),v=d/c,m=(4-v%4)%4;o.push(`
473
+ `];for(let l=0;l<n.length;l++){const u=n[l],f=e.uniforms[u.data.name],h=u.data.name;let p=!1;for(let d=0;d<bi.length;d++){const c=bi[d];if(c.codeUbo&&c.test(u.data,f)){o.push(`offset = ${u.offset/4};`,bi[d].codeUbo(u.data.name,f)),p=!0;break}}if(!p)if(u.data.size>1){const d=ad(u.data.type),c=Math.max(Md[u.data.type]/16,1),v=d/c,m=(4-v%4)%4;o.push(`
474
474
  cv = ud.${h}.value;
475
475
  v = uv.${h};
476
476
  offset = ${u.offset/4};
@@ -486,7 +486,7 @@ void main(void)
486
486
  offset += ${m};
487
487
  }
488
488
 
489
- `)}else{const d=Xw[u.data.type];o.push(`
489
+ `)}else{const d=Zw[u.data.type];o.push(`
490
490
  cv = ud.${h}.value;
491
491
  v = uv.${h};
492
492
  offset = ${u.offset/4};
@@ -494,7 +494,7 @@ void main(void)
494
494
  `)}}return o.push(`
495
495
  renderer.buffer.update(buffer);
496
496
  `),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join(`
497
- `))}}let Qw=0;const Co={textureCount:0,uboCount:0};class Nd{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=Qw++}systemCheck(){if(!xw())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]=gw(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 l=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[l];if(u||(u=this._uboCache[l]=Zw(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 l in i)o.push(l),r[l]&&o.push(r[l].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=Vw(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}}Nd.extension={type:qt.RendererSystem,name:"shader"},Jt.add(Nd);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"},Jt.add(Ro);function Jw(e,t=[]){return t[Rt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD]=[e.ONE,e.ONE],t[Rt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.NONE]=[0,0],t[Rt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Rt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Rt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Rt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Rt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Rt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Rt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const tT=0,eT=1,rT=2,nT=3,iT=4,sT=5,fu=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Rt.NONE,this._blendEq=!1,this.map=[],this.map[tT]=this.setBlend,this.map[eT]=this.setOffset,this.map[rT]=this.setCullFace,this.map[nT]=this.setDepthTest,this.map[iT]=this.setFrontFace,this.map[sT]=this.setDepthMask,this.checks=[],this.defaultState=new po,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=Jw(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(fu.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(fu.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 Md=fu;Md.extension={type:qt.RendererSystem,name:"state"},Jt.add(Md);class oT 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(l=>this._systemsHash[l]===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!==il.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=il.AUTO,Tr.defaultMaxIdle=60*60,Tr.defaultCheckCountMax=60*10,Tr.extension={type:qt.RendererSystem,name:"textureGC"},Jt.add(Tr);class cu{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=Wt.UNSIGNED_BYTE,this.internalFormat=bt.RGBA,this.samplerType=0}}function aT(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Wt.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},[Wt.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},[Wt.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},[Wt.SHORT]:{[bt.RGBA_INTEGER]:e.RGBA16I,[bt.RGB_INTEGER]:e.RGB16I,[bt.RG_INTEGER]:e.RG16I,[bt.RED_INTEGER]:e.R16I},[Wt.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},[Wt.INT]:{[bt.RGBA_INTEGER]:e.RGBA32I,[bt.RGB_INTEGER]:e.RGB32I,[bt.RG_INTEGER]:e.RG32I,[bt.RED_INTEGER]:e.R32I},[Wt.FLOAT]:{[bt.RGBA]:e.RGBA32F,[bt.RGB]:e.RGB32F,[bt.RG]:e.RG32F,[bt.RED]:e.R32F,[bt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Wt.HALF_FLOAT]:{[bt.RGBA]:e.RGBA16F,[bt.RGB]:e.RGB16F,[bt.RG]:e.RG16F,[bt.RED]:e.R16F},[Wt.UNSIGNED_SHORT_5_6_5]:{[bt.RGB]:e.RGB565},[Wt.UNSIGNED_SHORT_4_4_4_4]:{[bt.RGBA]:e.RGBA4},[Wt.UNSIGNED_SHORT_5_5_5_1]:{[bt.RGBA]:e.RGB5_A1},[Wt.UNSIGNED_INT_2_10_10_10_REV]:{[bt.RGBA]:e.RGB10_A2,[bt.RGBA_INTEGER]:e.RGB10_A2UI},[Wt.UNSIGNED_INT_10F_11F_11F_REV]:{[bt.RGB]:e.R11F_G11F_B10F},[Wt.UNSIGNED_INT_5_9_9_9_REV]:{[bt.RGB]:e.RGB9_E5},[Wt.UNSIGNED_INT_24_8]:{[bt.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Wt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[bt.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Wt.UNSIGNED_BYTE]:{[bt.RGBA]:e.RGBA,[bt.RGB]:e.RGB,[bt.ALPHA]:e.ALPHA,[bt.LUMINANCE]:e.LUMINANCE,[bt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Wt.UNSIGNED_SHORT_5_6_5]:{[bt.RGB]:e.RGB},[Wt.UNSIGNED_SHORT_4_4_4_4]:{[bt.RGBA]:e.RGBA},[Wt.UNSIGNED_SHORT_5_5_5_1]:{[bt.RGBA]:e.RGBA}},t}class kd{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Xt,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=aT(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 cu(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 cu(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 l=r[o];l&&l._glTextures[i].samplerType!==nl.FLOAT&&this.renderer.texture.unbind(l)}}initTexture(t){const r=new cu(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===Wt.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!==nl.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,l=t.realHeight,u=n.gl;(r.width!==o||r.height!==l||r.dirtyId<0)&&(r.width=o,r.height=l,u.texImage2D(t.target,0,r.internalFormat,o,l,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===On.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!==On.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}}kd.extension={type:qt.RendererSystem,name:"texture"},Jt.add(kd);class Ld{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 l=0;l<t.buffers.length;l++){const u=t.buffers[l];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,l,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 l=0;l<t.buffers.length;l++){const u=t.buffers[l];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}}Ld.extension={type:qt.RendererSystem,name:"transformFeedback"},Jt.add(Ld);class Po{constructor(t){this.renderer=t}init(t){this.screen=new ne(0,0,t.width,t.height),this.element=t.view||Ut.ADAPTER.createCanvas(),this.resolution=t.resolution||Ut.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:Ut.RESOLUTION,autoDensity:!1},Po.extension={type:[qt.RendererSystem,qt.CanvasRendererSystem],name:"_view"},Jt.add(Po),Ut.PREFER_ENV=An.WEBGL2,Ut.STRICT_TEXTURE_CACHE=!1,Ut.RENDER_OPTIONS={...To.defaultOptions,...wo.defaultOptions,...Po.defaultOptions,...Ro.defaultOptions},Object.defineProperties(Ut,{WRAP_MODE:{get(){return Xt.defaultOptions.wrapMode},set(e){Ht("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Xt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Xt.defaultOptions.scaleMode},set(e){Ht("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Xt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Xt.defaultOptions.mipmap},set(e){Ht("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Xt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Xt.defaultOptions.anisotropicLevel},set(e){Ht("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Xt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Ht("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Yt.defaultResolution},set(e){Yt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Ht("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Yt.defaultMultisample},set(e){Yt.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 Wr.defaultVertexPrecision},set(e){Ht("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Wr.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Wr.defaultFragmentPrecision},set(e){Ht("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Wr.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 hu{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 Qe=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 hu(null,null,1/0),this.deltaMS=1/Qe.targetFPMS,this.elapsedMS=1/Qe.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 hu(e,t,r))}addOnce(e,t,r=No.NORMAL){return this._addListener(new hu(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*Qe.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,Qe.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(!Qe._shared){const e=Qe._shared=new Qe;e.autoStart=!0,e._protected=!0}return Qe._shared}static get system(){if(!Qe._system){const e=Qe._system=new Qe;e.autoStart=!0,e._protected=!0}return Qe._system}};let Er=Qe;Er.targetFPMS=.06,Object.defineProperties(Ut,{TARGET_FPMS:{get(){return Er.targetFPMS},set(e){Ht("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),Er.targetFPMS=e}}});class Fd{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()}}}Fd.extension=qt.Application,Jt.add(Fd);const lT=[];Jt.handleByList(qt.Renderer,lT);class Bd{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>=we.HIGH?this.multisample=we.HIGH:r>=we.MEDIUM?this.multisample=we.MEDIUM:r>=we.LOW?this.multisample=we.LOW:this.multisample=we.NONE}destroy(){}}Bd.extension={type:qt.RendererSystem,name:"_multisample"},Jt.add(Bd);class uT{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Dd{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 l=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,l.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 uT(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Dd.extension={type:qt.RendererSystem,name:"buffer"},Jt.add(Dd);class Ud{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,o,l,u;if(r&&(i=r.renderTexture,o=r.clear,l=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=l,!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}}Ud.extension={type:qt.RendererSystem,name:"objectRenderer"},Jt.add(Ud);const du=class extends oT{constructor(e){super(),this.type=Mc.WEBGL,e=Object.assign({},Ut.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:du.__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=du.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:Ux()}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=du;wi.extension={type:qt.Renderer,priority:1},wi.__plugins={},wi.__systems={},Jt.handleByMap(qt.RendererPlugin,wi.__plugins),Jt.handleByMap(qt.RendererSystem,wi.__systems),Jt.add(wi);class $d 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 l=new Xt;this.items.push(l),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(Yh(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 fT extends $d{constructor(t,r){const{width:n,height:i}=r||{};let o,l;Array.isArray(t)?(o=t,l=t.length):l=t,super(l,{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:l}=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=l[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 cT 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 $d{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 l=0;l<ms.SIDES;l++)this.items[l].target=ii.TEXTURE_CUBE_MAP_POSITIVE_X+l;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 Gd=ms;Gd.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 Ut.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??Ut.ADAPTER.createCanvas(0,0),Ti._EMPTY}}const Mo=class extends dn{constructor(e,t){t=t||{},super(Ut.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 pu=Mo;pu.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,pu.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const vu=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:l,mime:u}=e[i];l=l||e[i];const f=l.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||vu.MIME_TYPES[h]||`video/${h}`,o.src=l,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||vu.TYPES.includes(t)}};let gu=vu;gu.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],gu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Ql.push(Ti,dd,cT,gu,pu,Jl,Gd,fT);var hT=`attribute vec2 aVertexPosition;
497
+ `))}}let eT=0;const Co={textureCount:0,uboCount:0};class kd{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=eT++}systemCheck(){if(!Ew())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]=_w(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 l=this.getSignature(t,this.shader.program.uniformData,"ubo");let u=this._uboCache[l];if(u||(u=this._uboCache[l]=tT(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 l in i)o.push(l),r[l]&&o.push(r[l].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=Kw(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}}kd.extension={type:qt.RendererSystem,name:"shader"},te.add(kd);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 rT(e,t=[]){return t[Rt.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD]=[e.ONE,e.ONE],t[Rt.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.NONE]=[0,0],t[Rt.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[Rt.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[Rt.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[Rt.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[Rt.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[Rt.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[Rt.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[Rt.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[Rt.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[Rt.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const nT=0,iT=1,sT=2,oT=3,aT=4,lT=5,cu=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=Rt.NONE,this._blendEq=!1,this.map=[],this.map[nT]=this.setBlend,this.map[iT]=this.setOffset,this.map[sT]=this.setCullFace,this.map[oT]=this.setDepthTest,this.map[aT]=this.setFrontFace,this.map[lT]=this.setDepthMask,this.checks=[],this.defaultState=new po,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=rT(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(cu.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(cu.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 Ld=cu;Ld.extension={type:qt.RendererSystem,name:"state"},te.add(Ld);class uT 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(l=>this._systemsHash[l]===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!==sl.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=sl.AUTO,Tr.defaultMaxIdle=60*60,Tr.defaultCheckCountMax=60*10,Tr.extension={type:qt.RendererSystem,name:"textureGC"},te.add(Tr);class hu{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=Wt.UNSIGNED_BYTE,this.internalFormat=bt.RGBA,this.samplerType=0}}function fT(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Wt.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},[Wt.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},[Wt.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},[Wt.SHORT]:{[bt.RGBA_INTEGER]:e.RGBA16I,[bt.RGB_INTEGER]:e.RGB16I,[bt.RG_INTEGER]:e.RG16I,[bt.RED_INTEGER]:e.R16I},[Wt.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},[Wt.INT]:{[bt.RGBA_INTEGER]:e.RGBA32I,[bt.RGB_INTEGER]:e.RGB32I,[bt.RG_INTEGER]:e.RG32I,[bt.RED_INTEGER]:e.R32I},[Wt.FLOAT]:{[bt.RGBA]:e.RGBA32F,[bt.RGB]:e.RGB32F,[bt.RG]:e.RG32F,[bt.RED]:e.R32F,[bt.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Wt.HALF_FLOAT]:{[bt.RGBA]:e.RGBA16F,[bt.RGB]:e.RGB16F,[bt.RG]:e.RG16F,[bt.RED]:e.R16F},[Wt.UNSIGNED_SHORT_5_6_5]:{[bt.RGB]:e.RGB565},[Wt.UNSIGNED_SHORT_4_4_4_4]:{[bt.RGBA]:e.RGBA4},[Wt.UNSIGNED_SHORT_5_5_5_1]:{[bt.RGBA]:e.RGB5_A1},[Wt.UNSIGNED_INT_2_10_10_10_REV]:{[bt.RGBA]:e.RGB10_A2,[bt.RGBA_INTEGER]:e.RGB10_A2UI},[Wt.UNSIGNED_INT_10F_11F_11F_REV]:{[bt.RGB]:e.R11F_G11F_B10F},[Wt.UNSIGNED_INT_5_9_9_9_REV]:{[bt.RGB]:e.RGB9_E5},[Wt.UNSIGNED_INT_24_8]:{[bt.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Wt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[bt.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Wt.UNSIGNED_BYTE]:{[bt.RGBA]:e.RGBA,[bt.RGB]:e.RGB,[bt.ALPHA]:e.ALPHA,[bt.LUMINANCE]:e.LUMINANCE,[bt.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Wt.UNSIGNED_SHORT_5_6_5]:{[bt.RGB]:e.RGB},[Wt.UNSIGNED_SHORT_4_4_4_4]:{[bt.RGBA]:e.RGBA},[Wt.UNSIGNED_SHORT_5_5_5_1]:{[bt.RGBA]:e.RGBA}},t}class Fd{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Xt,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=fT(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 hu(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 hu(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 l=r[o];l&&l._glTextures[i].samplerType!==il.FLOAT&&this.renderer.texture.unbind(l)}}initTexture(t){const r=new hu(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===Wt.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!==il.FLOAT&&(this.hasIntegerTextures=!0);else{const o=t.realWidth,l=t.realHeight,u=n.gl;(r.width!==o||r.height!==l||r.dirtyId<0)&&(r.width=o,r.height=l,u.texImage2D(t.target,0,r.internalFormat,o,l,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===Cn.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!==Cn.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}}Fd.extension={type:qt.RendererSystem,name:"texture"},te.add(Fd);class Bd{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 l=0;l<t.buffers.length;l++){const u=t.buffers[l];u&&(n.buffer.update(u),u._glBuffers[i].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,l,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 l=0;l<t.buffers.length;l++){const u=t.buffers[l];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}}Bd.extension={type:qt.RendererSystem,name:"transformFeedback"},te.add(Bd);class Po{constructor(t){this.renderer=t}init(t){this.screen=new ne(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=On.WEBGL2,Dt.STRICT_TEXTURE_CACHE=!1,Dt.RENDER_OPTIONS={...To.defaultOptions,...wo.defaultOptions,...Po.defaultOptions,...Ro.defaultOptions},Object.defineProperties(Dt,{WRAP_MODE:{get(){return Xt.defaultOptions.wrapMode},set(e){Ht("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Xt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Xt.defaultOptions.scaleMode},set(e){Ht("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Xt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Xt.defaultOptions.mipmap},set(e){Ht("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Xt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Xt.defaultOptions.anisotropicLevel},set(e){Ht("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Xt.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 du{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 Qe=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 du(null,null,1/0),this.deltaMS=1/Qe.targetFPMS,this.elapsedMS=1/Qe.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 du(e,t,r))}addOnce(e,t,r=No.NORMAL){return this._addListener(new du(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*Qe.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,Qe.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(!Qe._shared){const e=Qe._shared=new Qe;e.autoStart=!0,e._protected=!0}return Qe._shared}static get system(){if(!Qe._system){const e=Qe._system=new Qe;e.autoStart=!0,e._protected=!0}return Qe._system}};let Er=Qe;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 Dd{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()}}}Dd.extension=qt.Application,te.add(Dd);const cT=[];te.handleByList(qt.Renderer,cT);class Ud{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>=we.HIGH?this.multisample=we.HIGH:r>=we.MEDIUM?this.multisample=we.MEDIUM:r>=we.LOW?this.multisample=we.LOW:this.multisample=we.NONE}destroy(){}}Ud.extension={type:qt.RendererSystem,name:"_multisample"},te.add(Ud);class hT{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class $d{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 l=t._glBuffers[o]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,r||0,l.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 hT(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}$d.extension={type:qt.RendererSystem,name:"buffer"},te.add($d);class Gd{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let i,o,l,u;if(r&&(i=r.renderTexture,o=r.clear,l=r.transform,u=r.skipUpdateTransform),this.renderingToScreen=!i,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=l,!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}}Gd.extension={type:qt.RendererSystem,name:"objectRenderer"},te.add(Gd);const pu=class extends uT{constructor(e){super(),this.type=Lc.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:pu.__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=pu.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:jx()}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 Ti=pu;Ti.extension={type:qt.Renderer,priority:1},Ti.__plugins={},Ti.__systems={},te.handleByMap(qt.RendererPlugin,Ti.__plugins),te.handleByMap(qt.RendererSystem,Ti.__systems),te.add(Ti);class jd 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 l=new Xt;this.items.push(l),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(Qh(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 dT extends jd{constructor(t,r){const{width:n,height:i}=r||{};let o,l;Array.isArray(t)?(o=t,l=t.length):l=t,super(l,{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=si.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:i,itemDirtyIds:o,items:l}=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=l[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 pT 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 jd{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 l=0;l<ms.SIDES;l++)this.items[l].target=si.TEXTURE_CUBE_MAP_POSITIVE_X+l;this.linkBaseTexture=o!==!1,e&&this.initFromArray(e,t),i!==!1&&this.load()}bind(e){super.bind(e),e.target=si.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=si.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 qd=ms;qd.SIDES=6;class Ei extends dn{constructor(t,r){r=r||{};let n,i;typeof t=="string"?(n=Ei.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 Ei._EMPTY=Ei._EMPTY??Dt.ADAPTER.createCanvas(0,0),Ei._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 vu=Mo;vu.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,vu.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const gu=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:l,mime:u}=e[i];l=l||e[i];const f=l.split("?").shift().toLowerCase(),h=f.slice(f.lastIndexOf(".")+1);u=u||gu.MIME_TYPES[h]||`video/${h}`,o.src=l,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||gu.TYPES.includes(t)}};let mu=gu;mu.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],mu.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Jl.push(Ei,vd,pT,mu,vu,tu,qd,dT);var vT=`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
- }`,dT=`varying vec2 vTextureCoord;
508
+ }`,gT=`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 pT=class extends Yt{constructor(t){super(hT,dT),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 vT=`attribute vec2 aVertexPosition;
539
+ `;let mT=class extends Zt{constructor(t){super(vT,gT),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 yT=`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
- }`,gT=`
550
+ }`,_T=`
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
- }`,mT=`
576
+ }`,bT=`
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 Yt{constructor(t=4,r=3,n=!1){super(vT,n?mT:gT),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,l=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*l,t.applyFilter(this,r,n,i);else{const f=t.getFilterTexture();let h=r,p=f,d;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*l,t.applyFilter(this,h,p,1),d=h,h=p,p=d;u=this._kernels[c]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*l,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 l=1;l<r;l++)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 jd=`attribute vec2 aVertexPosition;
604
+ `;let ys=class extends Zt{constructor(t=4,r=3,n=!1){super(yT,n?bT:_T),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,l=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*l,t.applyFilter(this,r,n,i);else{const f=t.getFilterTexture();let h=r,p=f,d;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*l,t.applyFilter(this,h,p,1),d=h,h=p,p=d;u=this._kernels[c]+.5,this.uniforms.uOffset[0]=u*o,this.uniforms.uOffset[1]=u*l,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 l=1;l<r;l++)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 zd=`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
- }`,yT=`
615
+ }`,xT=`
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 _T=class extends Yt{constructor(t=.5){super(jd,yT),this.threshold=t}get threshold(){return this.uniforms.threshold}set threshold(t){this.uniforms.threshold=t}};var bT=`uniform sampler2D uSampler;
636
+ `;let wT=class extends Zt{constructor(t=.5){super(zd,xT),this.threshold=t}get threshold(){return this.uniforms.threshold}set threshold(t){this.uniforms.threshold=t}};var TT=`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 qd=class extends Yt{constructor(t){super(jd,bT),this.bloomScale=1,this.brightness=1,this._resolution=Ut.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const r=Object.assign(qd.defaults,t);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:i,quality:o,pixelSize:l,resolution:u}=r;this._extractFilter=new _T(r.threshold),this._extractFilter.resolution=u,this._blurFilter=n?new ys(n):new ys(i,o),this.pixelSize=l,this.resolution=u}apply(t,r,n,i,o){const l=t.getFilterTexture();this._extractFilter.apply(t,r,l,1,o);const u=t.getFilterTexture();this._blurFilter.apply(t,l,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(l)}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 xT=qd;xT.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:Ut.FILTER_RESOLUTION};var wT=`attribute vec2 aVertexPosition;
650
+ `;const Hd=class extends Zt{constructor(t){super(zd,TT),this.bloomScale=1,this.brightness=1,this._resolution=Dt.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const r=Object.assign(Hd.defaults,t);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:i,quality:o,pixelSize:l,resolution:u}=r;this._extractFilter=new wT(r.threshold),this._extractFilter.resolution=u,this._blurFilter=n?new ys(n):new ys(i,o),this.pixelSize=l,this.resolution=u}apply(t,r,n,i,o){const l=t.getFilterTexture();this._extractFilter.apply(t,r,l,1,o);const u=t.getFilterTexture();this._blurFilter.apply(t,l,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(l)}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 ET=Hd;ET.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:Dt.FILTER_RESOLUTION};var ST=`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
- }`,TT=`uniform float radius;
661
+ }`,AT=`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 zd=class extends Yt{constructor(t){super(wT,TT),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,zd.defaults,t)}apply(t,r,n,i){const{width:o,height:l}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=l,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 ET=zd;ET.defaults={center:[.5,.5],radius:100,strength:1};var ST=`const float PI = 3.1415926538;
694
+ `;const Vd=class extends Zt{constructor(t){super(ST,AT),this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Vd.defaults,t)}apply(t,r,n,i){const{width:o,height:l}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=l,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 OT=Vd;OT.defaults={center:[.5,.5],radius:100,strength:1};var CT=`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
- `,AT=`attribute vec2 aVertexPosition;
821
+ `,RT=`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
- `,Un=Un||{};Un.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 Un=Un||{};Un.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 l("linear-gradient",e.linearGradient,f)||l("repeating-linear-gradient",e.repeatingLinearGradient,f)||l("radial-gradient",e.radialGradient,d)||l("repeating-radial-gradient",e.repeatingRadialGradient,d)}function l(z,nt,W){return u(nt,function(D){var k=W();return k&&(q(e.comma)||r("Missing comma before color stops")),{type:z,orientation:k,colorStops:T(x)}})}function u(z,nt){var W=q(z);if(W){q(e.startCall)||r("Missing (");var D=nt(W);return q(e.endCall)||r("Missing )"),D}}function f(){return h()||p()}function h(){return F("directional",e.sideOrCorner,1)}function p(){return F("angular",e.angleValue,1)}function d(){var z,nt=c(),W;return nt&&(z=[],z.push(nt),W=t,q(e.comma)&&(nt=c(),nt?z.push(nt):t=W)),z}function c(){var z=v()||m();if(z)z.at=b();else{var nt=y();if(nt){z=nt;var W=b();W&&(z.at=W)}else{var D=_();D&&(z={type:"default-radial",at:D})}}return z}function v(){var z=F("shape",/^(circle)/i,0);return z&&(z.style=M()||y()),z}function m(){var z=F("shape",/^(ellipse)/i,0);return z&&(z.style=C()||y()),z}function y(){return F("extent-keyword",e.extentKeywords,1)}function b(){if(F("position",/^at/,0)){var z=_();return z||r("Missing positioning value"),z}}function _(){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(),W=[];if(nt)for(W.push(nt);q(e.comma);)nt=z(),nt?W.push(nt):r("One extra comma");return W}function x(){var z=S();return z||r("Expected color definition"),z.length=C(),z}function S(){return A()||L()||O()||I()}function I(){return F("literal",e.literalColor,0)}function A(){return F("hex",e.hexColor,1)}function O(){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,W){var D=q(nt);if(D)return{type:z,value:D[W]}}function q(z){var nt,W;return W=/^[\n\r\t\s]+/.exec(t),W&&Z(W[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 OT=Un.parse;Un.stringify;var Hd={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]},Vd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function CT(e){var t,r=[],n=1,i;if(typeof e=="string")if(Hd[e])r=Hd[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),l=o.length,u=l<=4;n=1,u?(r=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],l===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)],l===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 l=o==="cmyk"?4:o==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,v){if(/%$/.test(c))return v===l?parseFloat(c)/100:o==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(o[v]==="h"){if(/deg$/.test(c))return parseFloat(c);if(Vd[c]!==void 0)return Vd[c]}return parseFloat(c)}),f===o&&r.push(1),n=h||r[l]===void 0?1:r[l],r=r.slice(0,l)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),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 mu={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},yu={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,l,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++)l=t+1/3*-(h-1),l<0?l++:l>1&&l--,6*l<1?f=i+(o-i)*6*l:2*l<1?f=o:3*l<2?f=i+(o-i)*(2/3-l)*6:f=i,u[h]=f*255;return u}};mu.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),l=o-i,u,f,h;return o===i?u=0:t===o?u=(r-n)/l:r===o?u=2+(n-t)/l:n===o&&(u=4+(t-r)/l),u=Math.min(u*60,360),u<0&&(u+=360),h=(i+o)/2,o===i?f=0:h<=.5?f=l/(o+i):f=l/(2-o-i),[u,f*100,h*100]};function RT(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments));var t,r=CT(e);if(!r.space)return[];const n=r.space[0]==="h"?yu.min:mu.min,i=r.space[0]==="h"?yu.max:mu.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=yu.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}function Wd(e){switch(typeof e){case"string":return IT(e);case"number":return uo(e);default:return e}}function IT(e){const t=RT(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 PT(e){const t=OT($T(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=NT(r.type),i=MT(r.colorStops),o=DT(r.orientation);return{type:n,stops:i,angle:o}}function NT(e){const t={"linear-gradient":0,"radial-gradient":1};if(!(e in t))throw new Error(`Unsupported gradient type "${e}"`);return t[e]}function MT(e){const t=FT(e),r=[];for(let n=0;n<e.length;n++){const i=kT(e[n]);r.push({offset:t[n],color:i.slice(0,3),alpha:i[3]})}return r}function kT(e){return Wd(LT(e))}function LT(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;default:return`${e.type}(${e.value.join(",")})`}}function FT(e){const t=[];for(let i=0;i<e.length;i++){const o=e[i];let l=-1;o.type==="literal"&&o.length&&"type"in o.length&&o.length.type==="%"&&"value"in o.length&&(l=parseFloat(o.length.value)/100),t.push(l)}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 l=r(i),u=(l.offset-n)/(1+l.indexDelta);for(let f=0;f<=l.indexDelta;f++)t[i+f]=n+(f+1)*u;i+=l.indexDelta,n=t[i]}}return t.map(BT)}function BT(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function DT(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 UT(e.value)}return 0}function UT(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 $T(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 GT=Object.defineProperty,jT=Object.defineProperties,qT=Object.getOwnPropertyDescriptors,Xd=Object.getOwnPropertySymbols,zT=Object.prototype.hasOwnProperty,HT=Object.prototype.propertyIsEnumerable,Kd=(e,t,r)=>t in e?GT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_u=(e,t)=>{for(var r in t||(t={}))zT.call(t,r)&&Kd(e,r,t[r]);if(Xd)for(var r of Xd(t))HT.call(t,r)&&Kd(e,r,t[r]);return e},VT=(e,t)=>jT(e,qT(t));const Yd=90;function WT(e){return[...e].sort((t,r)=>t.offset-r.offset)}const bu=class extends Yt{constructor(t){t&&"css"in t&&(t=VT(_u({},PT(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const r=_u(_u({},bu.defaults),t);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(AT,ST),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(t){const r=WT(t),n=new Float32Array(r.length*3),i=0,o=1,l=2;for(let u=0;u<r.length;u++){const f=Wd(r[u].color),h=u*3;n[h+i]=f[i],n[h+o]=f[o],n[h+l]=f[l]}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-Yd}get angle(){return this.uniforms.uAngle+Yd}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=bu;ko.LINEAR=0,ko.RADIAL=1,ko.CONIC=2,ko.defaults={type:bu.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var XT=`attribute vec2 aVertexPosition;
837
+ `,$n=$n||{};$n.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 $n=$n||{};$n.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 it=new Error(t+": "+z);throw it.source=t,it}function n(){var z=i();return t.length>0&&r("Invalid input not EOF"),z}function i(){return T(o)}function o(){return l("linear-gradient",e.linearGradient,f)||l("repeating-linear-gradient",e.repeatingLinearGradient,f)||l("radial-gradient",e.radialGradient,d)||l("repeating-radial-gradient",e.repeatingRadialGradient,d)}function l(z,it,W){return u(it,function(D){var k=W();return k&&(q(e.comma)||r("Missing comma before color stops")),{type:z,orientation:k,colorStops:T(x)}})}function u(z,it){var W=q(z);if(W){q(e.startCall)||r("Missing (");var D=it(W);return q(e.endCall)||r("Missing )"),D}}function f(){return h()||p()}function h(){return F("directional",e.sideOrCorner,1)}function p(){return F("angular",e.angleValue,1)}function d(){var z,it=c(),W;return it&&(z=[],z.push(it),W=t,q(e.comma)&&(it=c(),it?z.push(it):t=W)),z}function c(){var z=v()||m();if(z)z.at=_();else{var it=y();if(it){z=it;var W=_();W&&(z.at=W)}else{var D=b();D&&(z={type:"default-radial",at:D})}}return z}function v(){var z=F("shape",/^(circle)/i,0);return z&&(z.style=M()||y()),z}function m(){var z=F("shape",/^(ellipse)/i,0);return z&&(z.style=C()||y()),z}function y(){return F("extent-keyword",e.extentKeywords,1)}function _(){if(F("position",/^at/,0)){var z=b();return z||r("Missing positioning value"),z}}function b(){var z=w();if(z.x||z.y)return{type:"position",value:z}}function w(){return{x:C(),y:C()}}function T(z){var it=z(),W=[];if(it)for(W.push(it);q(e.comma);)it=z(),it?W.push(it):r("One extra comma");return W}function x(){var z=S();return z||r("Expected color definition"),z.length=C(),z}function S(){return A()||L()||O()||I()}function I(){return F("literal",e.literalColor,0)}function A(){return F("hex",e.hexColor,1)}function O(){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,it,W){var D=q(it);if(D)return{type:z,value:D[W]}}function q(z){var it,W;return W=/^[\n\r\t\s]+/.exec(t),W&&Z(W[0].length),it=z.exec(t),it&&Z(it[0].length),it}function Z(z){t=t.substr(z)}return function(z){return t=z.toString(),n()}}();var IT=$n.parse;$n.stringify;var Wd={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]},Xd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function PT(e){var t,r=[],n=1,i;if(typeof e=="string")if(Wd[e])r=Wd[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),l=o.length,u=l<=4;n=1,u?(r=[parseInt(o[0]+o[0],16),parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16)],l===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)],l===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 l=o==="cmyk"?4:o==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(c,v){if(/%$/.test(c))return v===l?parseFloat(c)/100:o==="rgb"?parseFloat(c)*255/100:parseFloat(c);if(o[v]==="h"){if(/deg$/.test(c))return parseFloat(c);if(Xd[c]!==void 0)return Xd[c]}return parseFloat(c)}),f===o&&r.push(1),n=h||r[l]===void 0?1:r[l],r=r.slice(0,l)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),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 yu={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},_u={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,l,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++)l=t+1/3*-(h-1),l<0?l++:l>1&&l--,6*l<1?f=i+(o-i)*6*l:2*l<1?f=o:3*l<2?f=i+(o-i)*(2/3-l)*6:f=i,u[h]=f*255;return u}};yu.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),l=o-i,u,f,h;return o===i?u=0:t===o?u=(r-n)/l:r===o?u=2+(n-t)/l:n===o&&(u=4+(t-r)/l),u=Math.min(u*60,360),u<0&&(u+=360),h=(i+o)/2,o===i?f=0:h<=.5?f=l/(o+i):f=l/(2-o-i),[u,f*100,h*100]};function NT(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments));var t,r=PT(e);if(!r.space)return[];const n=r.space[0]==="h"?_u.min:yu.min,i=r.space[0]==="h"?_u.max:yu.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=_u.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}function Kd(e){switch(typeof e){case"string":return MT(e);case"number":return uo(e);default:return e}}function MT(e){const t=NT(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 kT(e){const t=IT(qT(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=LT(r.type),i=FT(r.colorStops),o=GT(r.orientation);return{type:n,stops:i,angle:o}}function LT(e){const t={"linear-gradient":0,"radial-gradient":1};if(!(e in t))throw new Error(`Unsupported gradient type "${e}"`);return t[e]}function FT(e){const t=UT(e),r=[];for(let n=0;n<e.length;n++){const i=BT(e[n]);r.push({offset:t[n],color:i.slice(0,3),alpha:i[3]})}return r}function BT(e){return Kd(DT(e))}function DT(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;default:return`${e.type}(${e.value.join(",")})`}}function UT(e){const t=[];for(let i=0;i<e.length;i++){const o=e[i];let l=-1;o.type==="literal"&&o.length&&"type"in o.length&&o.length.type==="%"&&"value"in o.length&&(l=parseFloat(o.length.value)/100),t.push(l)}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 l=r(i),u=(l.offset-n)/(1+l.indexDelta);for(let f=0;f<=l.indexDelta;f++)t[i+f]=n+(f+1)*u;i+=l.indexDelta,n=t[i]}}return t.map($T)}function $T(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function GT(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 jT(e.value)}return 0}function jT(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 qT(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 zT=Object.defineProperty,HT=Object.defineProperties,VT=Object.getOwnPropertyDescriptors,Yd=Object.getOwnPropertySymbols,WT=Object.prototype.hasOwnProperty,XT=Object.prototype.propertyIsEnumerable,Zd=(e,t,r)=>t in e?zT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,bu=(e,t)=>{for(var r in t||(t={}))WT.call(t,r)&&Zd(e,r,t[r]);if(Yd)for(var r of Yd(t))XT.call(t,r)&&Zd(e,r,t[r]);return e},KT=(e,t)=>HT(e,VT(t));const Qd=90;function YT(e){return[...e].sort((t,r)=>t.offset-r.offset)}const xu=class extends Zt{constructor(t){t&&"css"in t&&(t=KT(bu({},kT(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const r=bu(bu({},xu.defaults),t);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(RT,CT),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(t){const r=YT(t),n=new Float32Array(r.length*3),i=0,o=1,l=2;for(let u=0;u<r.length;u++){const f=Kd(r[u].color),h=u*3;n[h+i]=f[i],n[h+o]=f[o],n[h+l]=f[l]}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-Qd}get angle(){return this.uniforms.uAngle+Qd}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=xu;ko.LINEAR=0,ko.RADIAL=1,ko.CONIC=2,ko.defaults={type:xu.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var ZT=`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
- }`,KT=`precision mediump float;
848
+ }`,QT=`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 YT=class extends Yt{constructor(t,r=200,n=200){super(XT,KT),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 ZT=`attribute vec2 aVertexPosition;
877
+ `;let JT=class extends Zt{constructor(t,r=200,n=200){super(ZT,QT),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 tE=`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
- }`,QT=`varying vec2 vTextureCoord;
888
+ }`,eE=`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 Zd=class extends Yt{constructor(t){super(ZT,QT),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Zd.defaults,t)}apply(t,r,n,i){const{width:o,height:l}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=l,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 JT=Zd;JT.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var tE=`attribute vec2 aVertexPosition;
954
+ `;const Jd=class extends Zt{constructor(t){super(tE,eE),this.time=0,this.seed=0,this.uniforms.dimensions=new Float32Array(2),Object.assign(this,Jd.defaults,t)}apply(t,r,n,i){const{width:o,height:l}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=l,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 rE=Jd;rE.defaults={curvature:1,lineWidth:1,lineContrast:.25,verticalLine:!1,noise:0,noiseSize:1,seed:0,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3,time:0};var nE=`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
- }`,eE=`varying vec2 vTextureCoord;
965
+ }`,iE=`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
- }`,rE=Object.defineProperty,Qd=Object.getOwnPropertySymbols,nE=Object.prototype.hasOwnProperty,iE=Object.prototype.propertyIsEnumerable,Jd=(e,t,r)=>t in e?rE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tp=(e,t)=>{for(var r in t||(t={}))nE.call(t,r)&&Jd(e,r,t[r]);if(Qd)for(var r of Qd(t))iE.call(t,r)&&Jd(e,r,t[r]);return e};const xu=class extends Yt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=Ut.FILTER_RESOLUTION;const r=t?tp(tp({},xu.defaults),t):xu.defaults,{kernels:n,blur:i,quality:o,pixelSize:l,resolution:u}=r;this._offset=new Bn(this._updatePadding,this),this._tintFilter=new Yt(tE,eE),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=l,this.resolution=u;const{shadowOnly:f,rotation:h,distance:p,offset:d,alpha:c,color:v}=r;this.shadowOnly=f,h!==void 0&&p!==void 0?(this.rotation=h,this.distance=p):this.offset=d,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 zl(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 sE=xu;sE.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:Ut.FILTER_RESOLUTION};var oE=`attribute vec2 aVertexPosition;
983
+ }`,sE=Object.defineProperty,tp=Object.getOwnPropertySymbols,oE=Object.prototype.hasOwnProperty,aE=Object.prototype.propertyIsEnumerable,ep=(e,t,r)=>t in e?sE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rp=(e,t)=>{for(var r in t||(t={}))oE.call(t,r)&&ep(e,r,t[r]);if(tp)for(var r of tp(t))aE.call(t,r)&&ep(e,r,t[r]);return e};const wu=class extends Zt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=Dt.FILTER_RESOLUTION;const r=t?rp(rp({},wu.defaults),t):wu.defaults,{kernels:n,blur:i,quality:o,pixelSize:l,resolution:u}=r;this._offset=new Dn(this._updatePadding,this),this._tintFilter=new Zt(nE,iE),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=l,this.resolution=u;const{shadowOnly:f,rotation:h,distance:p,offset:d,alpha:c,color:v}=r;this.shadowOnly=f,h!==void 0&&p!==void 0?(this.rotation=h,this.distance=p):this.offset=d,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 Hl(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 lE=wu;lE.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 uE=`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
- }`,aE=`// precision highp float;
994
+ }`,fE=`// 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 wu=class extends Yt{constructor(t){super(oE,aE),this.offset=100,this.fillMode=wu.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=Vt.from(this._canvas,{scaleMode:Lr.NEAREST}),Object.assign(this,wu.defaults,t)}apply(t,r,n,i){const{width:o,height:l}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=l,this.uniforms.aspect=l/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 l=1;for(let u=0;u<r;u++){const f=l/(o-u),h=Math.max(f*(1-Math.random()*.6),i);t[u]=h,l-=h}t[r]=l}else{let o=1;const l=Math.sqrt(1/this._slices);for(let u=0;u<r;u++){const f=Math.max(l*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 l=0;l<this._slices;l++){i=Math.floor(this._offsets[l]*256);const u=this._sizes[l]*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=wu;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 lE=`attribute vec2 aVertexPosition;
1090
+ `;const Tu=class extends Zt{constructor(t){super(uE,fE),this.offset=100,this.fillMode=Tu.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=Vt.from(this._canvas,{scaleMode:Lr.NEAREST}),Object.assign(this,Tu.defaults,t)}apply(t,r,n,i){const{width:o,height:l}=r.filterFrame;this.uniforms.dimensions[0]=o,this.uniforms.dimensions[1]=l,this.uniforms.aspect=l/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 l=1;for(let u=0;u<r;u++){const f=l/(o-u),h=Math.max(f*(1-Math.random()*.6),i);t[u]=h,l-=h}t[r]=l}else{let o=1;const l=Math.sqrt(1/this._slices);for(let u=0;u<r;u++){const f=Math.max(l*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 l=0;l<this._slices;l++){i=Math.floor(this._offsets[l]*256);const u=this._sizes[l]*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 Si=Tu;Si.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},Si.TRANSPARENT=0,Si.ORIGINAL=1,Si.LOOP=2,Si.CLAMP=3,Si.MIRROR=4;var cE=`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
- }`,uE=`varying vec2 vTextureCoord;
1101
+ }`,hE=`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 ep=class extends Yt{constructor(e){const t=Object.assign({},ep.defaults,e),{outerStrength:r,innerStrength:n,color:i,knockout:o,quality:l,alpha:u}=t,f=Math.round(t.distance);super(lE,uE.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/l/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 zl(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 fE=ep;fE.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var cE=`attribute vec2 aVertexPosition;
1167
+ `;const np=class extends Zt{constructor(e){const t=Object.assign({},np.defaults,e),{outerStrength:r,innerStrength:n,color:i,knockout:o,quality:l,alpha:u}=t,f=Math.round(t.distance);super(cE,hE.replace(/__ANGLE_STEP_SIZE__/gi,`${(1/l/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 Hl(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 dE=np;dE.defaults={distance:10,outerStrength:4,innerStrength:0,color:16777215,quality:.1,knockout:!1,alpha:1};var pE=`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
- }`,hE=`vec3 mod289(vec3 x)
1178
+ }`,vE=`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
- `,dE=`varying vec2 vTextureCoord;
1273
+ `,gE=`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 rp=class extends Yt{constructor(t){super(cE,dE.replace("${perlin}",hE)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(rp.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:l}=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]=l,this.uniforms.aspect=l/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 pE=rp;pE.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var vE=`attribute vec2 aVertexPosition;
1318
+ `;const ip=class extends Zt{constructor(t){super(pE,gE.replace("${perlin}",vE)),this.parallel=!0,this.time=0,this._angle=0,this.uniforms.dimensions=new Float32Array(2);const r=Object.assign(ip.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:l}=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]=l,this.uniforms.aspect=l/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 mE=ip;mE.defaults={angle:30,gain:.5,lacunarity:2.5,time:0,parallel:!0,center:[0,0],alpha:1};var yE=`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
- }`,gE=`precision mediump float;
1329
+ }`,_E=`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 np=class extends Yt{constructor(e){super(vE,gE),this._hue=0;const t=Object.assign({},np.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 mE=np;mE.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var yE=`attribute vec2 aVertexPosition;
1387
+ `;const sp=class extends Zt{constructor(e){super(yE,_E),this._hue=0;const t=Object.assign({},sp.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 bE=sp;bE.defaults={hue:0,saturation:0,lightness:0,colorize:!1,alpha:1};var xE=`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
- }`,_E=`varying vec2 vTextureCoord;
1398
+ }`,wE=`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 ip=class extends Yt{constructor(t,r=0){super(yE,_E),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof t=="number"?(this.seed=t,t=void 0):this.seed=r,Object.assign(this,ip.defaults,t)}apply(t,r,n,i){var o,l;this.uniforms.dimensions[0]=(o=r.filterFrame)==null?void 0:o.width,this.uniforms.dimensions[1]=(l=r.filterFrame)==null?void 0:l.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 bE=ip;bE.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var xE=`attribute vec2 aVertexPosition;
1502
+ `;const op=class extends Zt{constructor(t,r=0){super(xE,wE),this.seed=0,this.uniforms.dimensions=new Float32Array(2),typeof t=="number"?(this.seed=t,t=void 0):this.seed=r,Object.assign(this,op.defaults,t)}apply(t,r,n,i){var o,l;this.uniforms.dimensions[0]=(o=r.filterFrame)==null?void 0:o.width,this.uniforms.dimensions[1]=(l=r.filterFrame)==null?void 0:l.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 TE=op;TE.defaults={sepia:.3,noise:.3,noiseSize:1,scratch:.5,scratchDensity:.3,scratchWidth:1,vignetting:.3,vignettingAlpha:1,vignettingBlur:.3};var EE=`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
- }`,wE=`varying vec2 vTextureCoord;
1513
+ }`,SE=`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 Yt{constructor(t=1,r=0,n=.1,i=1,o=!1){super(xE,wE.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 zl(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 sp=Lo;sp.MIN_SAMPLES=1,sp.MAX_SAMPLES=100;var TE=`attribute vec2 aVertexPosition;
1551
+ `;const Lo=class extends Zt{constructor(t=1,r=0,n=.1,i=1,o=!1){super(EE,SE.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 Hl(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 ap=Lo;ap.MIN_SAMPLES=1,ap.MAX_SAMPLES=100;var AE=`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
- }`,EE=`varying vec2 vTextureCoord;
1562
+ }`,OE=`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 op=class extends Yt{constructor(t){super(TE,EE),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,i){var o,l;this.uniforms.dimensions[0]=(o=r.filterFrame)==null?void 0:o.width,this.uniforms.dimensions[1]=(l=r.filterFrame)==null?void 0:l.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 SE=op;SE.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var AE=`attribute vec2 aVertexPosition;
1606
+ `;const lp=class extends Zt{constructor(t){super(AE,OE),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,lp.defaults,t)}apply(t,r,n,i){var o,l;this.uniforms.dimensions[0]=(o=r.filterFrame)==null?void 0:o.width,this.uniforms.dimensions[1]=(l=r.filterFrame)==null?void 0:l.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 CE=lp;CE.defaults={mirror:!0,boundary:.5,amplitude:[0,20],waveLength:[30,100],alpha:[1,1],time:0};var RE=`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
- }`,OE=`varying vec2 vTextureCoord;
1617
+ }`,IE=`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 ap=class extends Yt{constructor(t=[0,0],r,n=0){super(AE,OE),this.center=t,Object.assign(this,ap.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 CE=ap;CE.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var RE=`attribute vec2 aVertexPosition;
1686
+ `;const up=class extends Zt{constructor(t=[0,0],r,n=0){super(RE,IE),this.center=t,Object.assign(this,up.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 PE=up;PE.defaults={amplitude:30,wavelength:160,brightness:1,speed:500,radius:-1};var NE=`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
- }`,IE=`varying vec2 vTextureCoord;
1697
+ }`,ME=`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 lp=class extends Yt{constructor(t){var r,n;super(RE,IE),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()}},PE=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}},NE=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 up=class extends Yt{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({},up.defaults,t),this.tiltShiftXFilter=new PE(t),this.tiltShiftYFilter=new NE(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 ME=up;ME.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var kE=`attribute vec2 aVertexPosition;
1736
+ `;let fp=class extends Zt{constructor(t){var r,n;super(NE,ME),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()}},kE=class extends fp{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}},LE=class extends fp{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 cp=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({},cp.defaults,t),this.tiltShiftXFilter=new kE(t),this.tiltShiftYFilter=new LE(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 FE=cp;FE.defaults={blur:100,gradientBlur:600,start:void 0,end:void 0};var BE=`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
- }`,LE=`varying vec2 vTextureCoord;
1747
+ }`,DE=`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 fp=class extends Yt{constructor(e){super(kE,LE),Object.assign(this,fp.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 FE=fp;FE.defaults={radius:200,angle:4,padding:20,offset:new oe};var BE=`attribute vec2 aVertexPosition;
1803
+ `;const hp=class extends Zt{constructor(e){super(BE,DE),Object.assign(this,hp.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 UE=hp;UE.defaults={radius:200,angle:4,padding:20,offset:new oe};var $E=`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
- }`,DE=`varying vec2 vTextureCoord;
1814
+ }`,GE=`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
- `,cp=Object.getOwnPropertySymbols,UE=Object.prototype.hasOwnProperty,$E=Object.prototype.propertyIsEnumerable,GE=(e,t)=>{var r={};for(var n in e)UE.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&cp)for(var n of cp(e))t.indexOf(n)<0&&$E.call(e,n)&&(r[n]=e[n]);return r};const hp=class extends Yt{constructor(e){const t=Object.assign(hp.defaults,e),{maxKernelSize:r}=t,n=GE(t,["maxKernelSize"]);super(BE,DE.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 jE=hp;jE.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:l=1,gamma:u=1,green:f=1,blurRadius:h=0,temperature:p=0,hue:d=0,sharpness:c=0}=e||{},v=new on.Filter(null,`
1900
+ `,dp=Object.getOwnPropertySymbols,jE=Object.prototype.hasOwnProperty,qE=Object.prototype.propertyIsEnumerable,zE=(e,t)=>{var r={};for(var n in e)jE.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&dp)for(var n of dp(e))t.indexOf(n)<0&&qE.call(e,n)&&(r[n]=e[n]);return r};const pp=class extends Zt{constructor(e){const t=Object.assign(pp.defaults,e),{maxKernelSize:r}=t,n=zE(t,["maxKernelSize"]);super($E,GE.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 HE=pp;HE.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:l=1,gamma:u=1,green:f=1,blurRadius:h=0,temperature:p=0,hue:d=0,sharpness:c=0}=e||{},v=new zr.Filter(null,`
1901
1901
  precision mediump float;
1902
1902
  varying vec2 vTextureCoord;
1903
1903
  uniform sampler2D uSampler;
@@ -1909,7 +1909,18 @@ void main() {
1909
1909
  color.b = color.b - (temperature / 100.0);
1910
1910
  gl_FragColor = color;
1911
1911
  }
1912
- `);v.uniforms.temperature=p;const m=new YT([0,-c,0,-c,1+4*c,-c,0,-c,0]),y=new on.filters.ColorMatrixFilter;y.hue(d,!1);const b=new ys(h,1,!0);return{adjustmentFilter:new pT({...u&&{gamma:u},...n&&{brightness:n},...t&&{contrast:t},...r&&{saturation:r},...o&&{red:o},...f&&{green:f},...l&&{blue:l},...i&&{alpha:i}}),blurFilter:b,hueFilter:y,sharpnessFilter:m,temperatureFilter:v}},qE=St.forwardRef((e,t)=>{const r=_t.useRef(null),n=_t.useRef(null),{src:i,transformation:{x:o,y:l,width:u,height:f,anchor:h,colorCorrection:p={}},pointerdown:d}=e,{blurRadius:c=0}=p,{temperatureFilter:v,sharpnessFilter:m,hueFilter:y,blurFilter:b,adjustmentFilter:_}=_s(p);return re.jsx(ni,{...e,ref:t,children:re.jsx(ye.Container,{ref:n,children:re.jsx(ye.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:o,y:l,interactive:!0,pointerdown:d,filters:[v,m,y,_,...c>0?[b]:[]]})})})}),Fo={build(e){const t=e.points;let r,n,i,o,l,u;if(e.type===Pe.CIRC){const m=e.shape;r=m.x,n=m.y,l=u=m.radius,i=o=0}else if(e.type===Pe.ELIP){const m=e.shape;r=m.x,n=m.y,l=m.width,u=m.height,i=o=0}else{const m=e.shape,y=m.width/2,b=m.height/2;r=m.x+y,n=m.y+b,l=u=Math.max(0,Math.min(m.radius,Math.min(y,b))),i=y-l,o=b-u}if(!(l>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(l+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 p=0,d=f*4+(i?2:0)+2,c=d,v=h;{const m=i+l,y=o,b=r+m,_=r-m,w=n+y;if(t[p++]=b,t[p++]=w,t[--d]=w,t[--d]=_,o){const T=n-y;t[c++]=_,t[c++]=T,t[--v]=T,t[--v]=b}}for(let m=1;m<f;m++){const y=Math.PI/2*(m/f),b=i+Math.cos(y)*l,_=o+Math.sin(y)*u,w=r+b,T=r-b,x=n+_,S=n-_;t[p++]=w,t[p++]=x,t[--d]=x,t[--d]=T,t[c++]=T,t[c++]=S,t[--v]=S,t[--v]=w}{const m=i,y=o+u,b=r+m,_=r-m,w=n+y,T=n-y;t[p++]=b,t[p++]=w,t[--v]=T,t[--v]=b,i&&(t[p++]=_,t[p++]=w,t[--v]=T,t[--v]=_)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const l=o;let u,f;if(e.type!==Pe.RREC){const p=e.shape;u=p.x,f=p.y}else{const p=e.shape;u=p.x+p.width/2,f=p.y+p.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 p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),i.push(o++,l,o);i.push(l+1,l,o)}};function dp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],l=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+l),o=u,l=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const l=r-o-2,u=r-o-1,f=o,h=o+1;[e[l],e[f]]=[e[f],e[l]],[e[u],e[h]]=[e[h],e[u]]}}}const pp={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){dp(r,!1);const l=[];for(let h=0;h<n.length;h++){const p=n[h];dp(p.points,!0),l.push(r.length/2),r=r.concat(p.points)}const u=R_(r,l,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])}}},zE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,l=e.points;l.length=0,i>=0&&o>=0&&l.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)}},HE={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||{}),$n=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))($n||{});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 vp{static curveTo(t,r,n,i,o,l){const u=l[l.length-2],h=l[l.length-1]-r,p=u-t,d=i-r,c=n-t,v=Math.abs(h*c-p*d);if(v<1e-8||o===0)return(l[l.length-2]!==t||l[l.length-1]!==r)&&l.push(t,r),null;const m=h*h+p*p,y=d*d+c*c,b=h*d+p*c,_=o*Math.sqrt(m)/v,w=o*Math.sqrt(y)/v,T=_*b/m,x=w*b/y,S=_*c+w*p,I=_*d+w*h,A=p*(w+T),O=h*(w+T),L=c*(_+x),R=d*(_+x),C=Math.atan2(O-I,A-S),P=Math.atan2(R-I,L-S);return{cx:S+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:p*d>c*h}}static arc(t,r,n,i,o,l,u,f,h){const p=u-l,d=Si._segmentsCount(Math.abs(p)*o,Math.ceil(Math.abs(p)/go)*40),c=p/(d*2),v=c*2,m=Math.cos(c),y=Math.sin(c),b=d-1,_=b%1/b;for(let w=0;w<=b;++w){const T=w+_*w,x=c+l+v*T,S=Math.cos(x),I=-Math.sin(x);h.push((m*S+y*I)*o+n,(m*-I+y*S)*o+i)}}}class VE{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 Tu{static curveLength(t,r,n,i,o,l,u,f){let p=0,d=0,c=0,v=0,m=0,y=0,b=0,_=0,w=0,T=0,x=0,S=t,I=r;for(let A=1;A<=10;++A)d=A/10,c=d*d,v=c*d,m=1-d,y=m*m,b=y*m,_=b*t+3*y*d*n+3*m*c*o+v*u,w=b*r+3*y*d*i+3*m*c*l+v*f,T=S-_,x=I-w,S=_,I=w,p+=Math.sqrt(T*T+x*x);return p}static curveTo(t,r,n,i,o,l,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const p=Si._segmentsCount(Tu.curveLength(f,h,t,r,n,i,o,l));let d=0,c=0,v=0,m=0,y=0;u.push(f,h);for(let b=1,_=0;b<=p;++b)_=b/p,d=1-_,c=d*d,v=c*d,m=_*_,y=m*_,u.push(v*f+3*c*_*t+3*d*m*n+y*o,v*h+3*c*_*r+3*d*m*i+y*l)}}function gp(e,t,r,n,i,o,l,u){const f=e-r*i,h=t-n*i,p=e+r*o,d=t+n*o;let c,v;l?(c=n,v=-r):(c=-n,v=r);const m=f+c,y=h+v,b=p+c,_=d+v;return u.push(m,y,b,_),2}function Gn(e,t,r,n,i,o,l,u){const f=r-e,h=n-t;let p=Math.atan2(f,h),d=Math.atan2(i-e,o-t);u&&p<d?p+=Math.PI*2:!u&&p>d&&(d+=Math.PI*2);let c=p;const v=d-p,m=Math.abs(v),y=Math.sqrt(f*f+h*h),b=(15*m*Math.sqrt(y)/Math.PI>>0)+1,_=v/b;if(c+=_,u){l.push(e,t,r,n);for(let w=1,T=c;w<b;w++,T+=_)l.push(e,t,e+Math.sin(T)*y,t+Math.cos(T)*y);l.push(e,t,i,o)}else{l.push(r,n,e,t);for(let w=1,T=c;w<b;w++,T+=_)l.push(e+Math.sin(T)*y,t+Math.cos(T)*y,e,t);l.push(i,o,e,t)}return b*2}function WE(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,l=new oe(n[0],n[1]),u=new oe(n[n.length-2],n[n.length-1]),f=r.type!==Pe.POLY||r.closeStroke,h=Math.abs(l.x-u.x)<i&&Math.abs(l.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=(l.x+u.x)*.5,nt=(u.y+l.y)*.5;n.unshift(z,nt),n.push(z,nt)}const p=t.points,d=n.length/2;let c=n.length;const v=p.length/2,m=o.width/2,y=m*m,b=o.miterLimit*o.miterLimit;let _=n[0],w=n[1],T=n[2],x=n[3],S=0,I=0,A=-(w-x),O=_-T,L=0,R=0,C=Math.sqrt(A*A+O*O);A/=C,O/=C,A*=m,O*=m;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===$n.ROUND?c+=Gn(_-A*(M-F)*.5,w-O*(M-F)*.5,_-A*M,w-O*M,_+A*F,w+O*F,p,!0)+2:o.cap===$n.SQUARE&&(c+=gp(_,w,A,O,M,F,!0,p))),p.push(_-A*M,w-O*M,_+A*F,w+O*F);for(let z=1;z<d-1;++z){_=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],S=n[(z+1)*2],I=n[(z+1)*2+1],A=-(w-x),O=_-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=m,O*=m,L=-(x-I),R=T-S,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=m,R*=m;const nt=T-_,W=w-x,D=T-S,k=I-x,j=nt*D+W*k,G=W*D-k*nt,Y=G<0;if(Math.abs(G)<.001*Math.abs(j)){p.push(T-A*M,x-O*M,T+A*F,x+O*F),j>=0&&(o.join===Sr.ROUND?c+=Gn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,p,!1)+4:c+=2,p.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const X=(-A+_)*(-O+x)-(-A+T)*(-O+w),$=(-L+S)*(-R+x)-(-L+T)*(-R+I),V=(nt*$-D*X)/G,tt=(k*X-W*$)/G,et=(V-T)*(V-T)+(tt-x)*(tt-x),it=T+(V-T)*M,st=x+(tt-x)*M,dt=T-(V-T)*F,gt=x-(tt-x)*F,yt=Math.min(nt*nt+W*W,D*D+k*k),Tt=Y?M:F,te=yt+Tt*Tt*y,Lt=et<=te;let rt=o.join;if(rt===Sr.MITER&&et/y>b&&(rt=Sr.BEVEL),Lt)switch(rt){case Sr.MITER:{p.push(it,st,dt,gt);break}case Sr.BEVEL:{Y?p.push(it,st,T+A*F,x+O*F,it,st,T+L*F,x+R*F):p.push(T-A*M,x-O*M,dt,gt,T-L*M,x-R*M,dt,gt),c+=2;break}case Sr.ROUND:{Y?(p.push(it,st,T+A*F,x+O*F),c+=Gn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,p,!0)+4,p.push(it,st,T+L*F,x+R*F)):(p.push(T-A*M,x-O*M,dt,gt),c+=Gn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,p,!1)+4,p.push(T-L*M,x-R*M,dt,gt));break}}else{switch(p.push(T-A*M,x-O*M,T+A*F,x+O*F),rt){case Sr.MITER:{Y?p.push(dt,gt,dt,gt):p.push(it,st,it,st),c+=2;break}case Sr.ROUND:{Y?c+=Gn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,p,!0)+2:c+=Gn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,p,!1)+2;break}}p.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}_=n[(d-2)*2],w=n[(d-2)*2+1],T=n[(d-1)*2],x=n[(d-1)*2+1],A=-(w-x),O=_-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=m,O*=m,p.push(T-A*M,x-O*M,T+A*F,x+O*F),f||(o.cap===$n.ROUND?c+=Gn(T-A*(M-F)*.5,x-O*(M-F)*.5,T-A*M,x-O*M,T+A*F,x+O*F,p,!1)+2:o.cap===$n.SQUARE&&(c+=gp(T,x,A,O,M,F,!1,p)));const q=t.indices,Z=Si.epsilon*Si.epsilon;for(let z=v;z<c+v-2;++z)_=p[z*2],w=p[z*2+1],T=p[(z+1)*2],x=p[(z+1)*2+1],S=p[(z+2)*2],I=p[(z+2)*2+1],!(Math.abs(_*(x-I)+T*(I-w)+S*(w-x))<Z)&&q.push(z,z+1,z+2)}function XE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Pe.POLY||n.closeStroke;if(i.length===0)return;const l=t.points,u=t.indices,f=i.length/2,h=l.length/2;let p=h;for(l.push(i[0],i[1]),r=1;r<f;r++)l.push(i[r*2],i[r*2+1]),u.push(p,p+1),p++;o&&u.push(p,h)}function mp(e,t){e.lineStyle.native?XE(e,t):WE(e,t)}class Eu{static curveLength(t,r,n,i,o,l){const u=t-2*n+o,f=r-2*i+l,h=2*n-2*t,p=2*i-2*r,d=4*(u*u+f*f),c=4*(u*h+f*p),v=h*h+p*p,m=2*Math.sqrt(d+c+v),y=Math.sqrt(d),b=2*d*y,_=2*Math.sqrt(v),w=c/y;return(b*m+y*c*(m-_)+(4*v*d-c*c)*Math.log((2*y+w+m)/(w+_)))/(4*b)}static curveTo(t,r,n,i,o){const l=o[o.length-2],u=o[o.length-1],f=Si._segmentsCount(Eu.curveLength(l,u,t,r,n,i));let h=0,p=0;for(let d=1;d<=f;++d){const c=d/f;h=l+(t-l)*c,p=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,p+(r+(i-r)*c-p)*c)}}}const Su={[Pe.POLY]:pp,[Pe.CIRC]:Fo,[Pe.ELIP]:Fo,[Pe.RECT]:zE,[Pe.RREC]:HE},yp=[],Bo=[];class Au{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?ne.EMPTY:(t=t||new ne(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:l,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,p=i*r.x+l*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,l=t[0],u=t[1];r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,o=u>o?u:o,l=t[2],u=t[3],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,o=u>o?u:o,l=t[4],u=t[5],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,o=u>o?u:o,l=t[6],u=t[7],r=l<r?l:r,n=u<n?u:n,i=l>i?l: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 l=t.a,u=t.b,f=t.c,h=t.d,p=t.tx,d=t.ty;let c=this.minX,v=this.minY,m=this.maxX,y=this.maxY,b=l*r+f*n+p,_=u*r+h*n+d;c=b<c?b:c,v=_<v?_:v,m=b>m?b:m,y=_>y?_:y,b=l*i+f*n+p,_=u*i+h*n+d,c=b<c?b:c,v=_<v?_:v,m=b>m?b:m,y=_>y?_:y,b=l*r+f*o+p,_=u*r+h*o+d,c=b<c?b:c,v=_<v?_:v,m=b>m?b:m,y=_>y?_:y,b=l*i+f*o+p,_=u*i+h*o+d,c=b<c?b:c,v=_<v?_:v,m=b>m?b:m,y=_>y?_:y,this.minX=c,this.minY=v,this.maxX=m,this.maxY=y}addVertexData(t,r,n){let i=this.minX,o=this.minY,l=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],p=t[f+1];i=h<i?h:i,o=p<o?p:o,l=h>l?h:l,u=p>u?p:u}this.minX=i,this.minY=o,this.maxX=l,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,l=o){const u=t.a,f=t.b,h=t.c,p=t.d,d=t.tx,c=t.ty;let v=this.minX,m=this.minY,y=this.maxX,b=this.maxY;for(let _=n;_<i;_+=2){const w=r[_],T=r[_+1],x=u*w+h*T+d,S=p*T+f*w+c;v=Math.min(v,x-o),y=Math.max(y,x+o),m=Math.min(m,S-l),b=Math.max(b,S+l)}this.minX=v,this.minY=m,this.maxX=y,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,l=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=l>p?l: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,i=t.minY>r.y?t.minY:r.y,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,l=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=l>p?l:p}}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,l){t-=o,r-=l,n+=o,i+=l,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 iu,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 Au,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 ne),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ne),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Au);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 l=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,l}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,l=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=l,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 KE),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*uw}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 KE extends Ai{constructor(){super(...arguments),this.sortDirty=null}}Ai.prototype.displayObjectUpdateTransform=Ai.prototype.updateTransform;const YE=new $e;function ZE(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Ou=class extends Ai{constructor(){super(),this.children=[],this.sortableChildren=Ou.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 l=0;l<o.length;++l)o[l].parent=null,o[l].transform&&(o[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let l=0;l<o.length;++l)o[l].emit("removed",this),this.emit("childRemoved",o[l],this,l);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(ZE),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!==Ou.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=YE.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,l=this.children.length;o<l;++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,l;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&&((l=this._enabledFilters)!=null&&l.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=Ou;Oi.defaultSortableChildren=!1,Oi.prototype.containerUpdateTransform=Oi.prototype.updateTransform,Object.defineProperties(Ut,{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,_p=class extends Qh{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 Au,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(),yp.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,p=f.lineStyle;Su[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||p.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:p;if(!v.visible)continue;const m=v.texture.baseTexture,y=this.indices.length,b=this.points.length/2;m.wrapMode=Ji.REPEAT,c===0?this.processFill(f):this.processLine(f);const _=this.points.length/2-b;_!==0&&(r&&!this._compareStyles(n,v)&&(r.end(y,b),r=null),r||(r=yp.pop()||new VE,r.begin(v,y,b),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,b,_,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 l=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&l===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=l?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<_p.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Xt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Bo.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Bo.pop();n||(n=new tu,n.texArray=new ou),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,l=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const d=this.batches[p],c=8,v=d.style,m=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==m&&(o=m,m._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Bo.pop(),n||(n=new tu,n.texArray=new ou),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),m.touched=1,m._batchEnabled=e,m._batchLocation=i,m.wrapMode=Ji.REPEAT,n.texArray.elements[n.texArray.count++]=m,i++)),n.size+=d.size,h+=d.size,l=m._batchLocation,this.addColors(t,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(r,l,d.attribSize,d.attribStart)}Xt._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),l=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],l[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?pp.triangulate(e,this):Su[e.type].triangulate(e,this)}processLine(e){mp(e,this);for(let t=0;t<e.holes.length;t++)mp(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Su[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(),l=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=l}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 l=0;const u=t.length,f=r.frame;for(;l<i;){let p=e[(n+l)*2],d=e[(n+l)*2+1];if(o){const c=o.a*p+o.c*d+o.tx;d=o.b*p+o.d*d+o.ty,p=c}l++,t.push(p/f.width,d/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,l=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let p=u.x/u.width,d=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let m=r+2;m<l;m+=2)c=Math.min(c,Math.floor(e[m]+o)),v=Math.min(v,Math.floor(e[m+1]+o));p-=c,d-=v;for(let m=r;m<l;m+=2)e[m]=(e[m]+p)*f,e[m+1]=(e[m+1]+d)*h}};let bp=_p;bp.BATCHABLE_SIZE=100;class Uo{constructor(){this.color=16777215,this.alpha=1,this.texture=Vt.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=Vt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Cu extends Uo{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=$n.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Cu;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 Ru={},$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 Cu,this._matrix=null,this._holeMode=!1,this.state=po.for2d(),this._geometry=e||new bp,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Rt.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:Vt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:$n.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),Eu.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Tu.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,l=vp.curveTo(e,t,r,n,i,o);if(l){const{cx:u,cy:f,radius:h,startAngle:p,endAngle:d,anticlockwise:c}=l;this.arc(u,f,h,p,d,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 p=this.currentPath?this.currentPath.points:null;if(p){const d=Math.abs(p[p.length-2]-u),c=Math.abs(p[p.length-1]-f);d<h&&c<h||p.push(u,f)}else this.moveTo(u,f),p=this.currentPath.points;return vp.arc(u,f,e,t,r,n,i,o,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Vt.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:Vt.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 ne(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new ru(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new eu(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new fw(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===Pe.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,l=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:l,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 l=0,u=o.length;l<u;l++)this._renderDrawCallDirect(e,r.drawCalls[l])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,l=r.count;for(let u=0;u<l;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(!Ru[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)},l=e.plugins[r]._shader.program;Ru[r]=new ps(l,o)}t=Ru[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,l=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let p=0;for(let d=0;d<f.length;d+=2){const c=f[d],v=f[d+1];h[p++]=r*c+i*v+l,h[p++]=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 Iu=$o;Iu.curves=Si,Iu._TEMP_POINT=new oe;var QE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Pu={},JE={get exports(){return Pu},set exports(e){Pu=e}};/*!
1912
+ `);v.uniforms.temperature=p;const m=new JT([0,-c,0,-c,1+4*c,-c,0,-c,0]),y=new zr.filters.ColorMatrixFilter;y.hue(d,!1);const _=new ys(h,1,!0);return{adjustmentFilter:new mT({...u&&{gamma:u},...n&&{brightness:n},...t&&{contrast:t},...r&&{saturation:r},...o&&{red:o},...f&&{green:f},...l&&{blue:l},...i&&{alpha:i}}),blurFilter:_,hueFilter:y,sharpnessFilter:m,temperatureFilter:v}},VE=()=>{const e=new zr.Filter(null,`
1913
+ precision mediump float;
1914
+ uniform mat3 uNightVisionMatrix;
1915
+ varying vec2 vTextureCoord;
1916
+ uniform sampler2D uSampler;
1917
+
1918
+ void main(void) {
1919
+ vec4 texColor = texture2D(uSampler, vTextureCoord);
1920
+ vec3 color = texColor.rgb;
1921
+ gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1922
+ }
1923
+ `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},WE=Et.forwardRef((e,t)=>{const r=_t.useRef(null),n=_t.useRef(null),{src:i,transformation:{x:o,y:l,width:u,height:f,anchor:h,colorCorrection:p={},effect:d},pointerdown:c}=e,{blurRadius:v=0}=p,{temperatureFilter:m,sharpnessFilter:y,hueFilter:_,blurFilter:b,adjustmentFilter:w}=_s(p),{nightVisionFilter:T}=VE();return Yt.jsx(ii,{...e,ref:t,children:Yt.jsx(me.Container,{ref:n,children:Yt.jsx(me.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:o,y:l,interactive:!0,pointerdown:c,filters:[m,y,_,w,...v>0?[b]:[],...d===Sn.NightVision?[T]:[]]})})})}),Fo={build(e){const t=e.points;let r,n,i,o,l,u;if(e.type===Pe.CIRC){const m=e.shape;r=m.x,n=m.y,l=u=m.radius,i=o=0}else if(e.type===Pe.ELIP){const m=e.shape;r=m.x,n=m.y,l=m.width,u=m.height,i=o=0}else{const m=e.shape,y=m.width/2,_=m.height/2;r=m.x+y,n=m.y+_,l=u=Math.max(0,Math.min(m.radius,Math.min(y,_))),i=y-l,o=_-u}if(!(l>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(l+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 p=0,d=f*4+(i?2:0)+2,c=d,v=h;{const m=i+l,y=o,_=r+m,b=r-m,w=n+y;if(t[p++]=_,t[p++]=w,t[--d]=w,t[--d]=b,o){const T=n-y;t[c++]=b,t[c++]=T,t[--v]=T,t[--v]=_}}for(let m=1;m<f;m++){const y=Math.PI/2*(m/f),_=i+Math.cos(y)*l,b=o+Math.sin(y)*u,w=r+_,T=r-_,x=n+b,S=n-b;t[p++]=w,t[p++]=x,t[--d]=x,t[--d]=T,t[c++]=T,t[c++]=S,t[--v]=S,t[--v]=w}{const m=i,y=o+u,_=r+m,b=r-m,w=n+y,T=n-y;t[p++]=_,t[p++]=w,t[--v]=T,t[--v]=_,i&&(t[p++]=b,t[p++]=w,t[--v]=T,t[--v]=b)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const l=o;let u,f;if(e.type!==Pe.RREC){const p=e.shape;u=p.x,f=p.y}else{const p=e.shape;u=p.x+p.width/2,f=p.y+p.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 p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),i.push(o++,l,o);i.push(l+1,l,o)}};function vp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],l=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+l),o=u,l=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const l=r-o-2,u=r-o-1,f=o,h=o+1;[e[l],e[f]]=[e[f],e[l]],[e[u],e[h]]=[e[h],e[u]]}}}const gp={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){vp(r,!1);const l=[];for(let h=0;h<n.length;h++){const p=n[h];vp(p.points,!0),l.push(r.length/2),r=r.concat(p.points)}const u=N_(r,l,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])}}},XE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,l=e.points;l.length=0,i>=0&&o>=0&&l.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)}},KE={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||{}),Gn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Gn||{});const Ai={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 mp{static curveTo(t,r,n,i,o,l){const u=l[l.length-2],h=l[l.length-1]-r,p=u-t,d=i-r,c=n-t,v=Math.abs(h*c-p*d);if(v<1e-8||o===0)return(l[l.length-2]!==t||l[l.length-1]!==r)&&l.push(t,r),null;const m=h*h+p*p,y=d*d+c*c,_=h*d+p*c,b=o*Math.sqrt(m)/v,w=o*Math.sqrt(y)/v,T=b*_/m,x=w*_/y,S=b*c+w*p,I=b*d+w*h,A=p*(w+T),O=h*(w+T),L=c*(b+x),R=d*(b+x),C=Math.atan2(O-I,A-S),P=Math.atan2(R-I,L-S);return{cx:S+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:p*d>c*h}}static arc(t,r,n,i,o,l,u,f,h){const p=u-l,d=Ai._segmentsCount(Math.abs(p)*o,Math.ceil(Math.abs(p)/go)*40),c=p/(d*2),v=c*2,m=Math.cos(c),y=Math.sin(c),_=d-1,b=_%1/_;for(let w=0;w<=_;++w){const T=w+b*w,x=c+l+v*T,S=Math.cos(x),I=-Math.sin(x);h.push((m*S+y*I)*o+n,(m*-I+y*S)*o+i)}}}class YE{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 Eu{static curveLength(t,r,n,i,o,l,u,f){let p=0,d=0,c=0,v=0,m=0,y=0,_=0,b=0,w=0,T=0,x=0,S=t,I=r;for(let A=1;A<=10;++A)d=A/10,c=d*d,v=c*d,m=1-d,y=m*m,_=y*m,b=_*t+3*y*d*n+3*m*c*o+v*u,w=_*r+3*y*d*i+3*m*c*l+v*f,T=S-b,x=I-w,S=b,I=w,p+=Math.sqrt(T*T+x*x);return p}static curveTo(t,r,n,i,o,l,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const p=Ai._segmentsCount(Eu.curveLength(f,h,t,r,n,i,o,l));let d=0,c=0,v=0,m=0,y=0;u.push(f,h);for(let _=1,b=0;_<=p;++_)b=_/p,d=1-b,c=d*d,v=c*d,m=b*b,y=m*b,u.push(v*f+3*c*b*t+3*d*m*n+y*o,v*h+3*c*b*r+3*d*m*i+y*l)}}function yp(e,t,r,n,i,o,l,u){const f=e-r*i,h=t-n*i,p=e+r*o,d=t+n*o;let c,v;l?(c=n,v=-r):(c=-n,v=r);const m=f+c,y=h+v,_=p+c,b=d+v;return u.push(m,y,_,b),2}function jn(e,t,r,n,i,o,l,u){const f=r-e,h=n-t;let p=Math.atan2(f,h),d=Math.atan2(i-e,o-t);u&&p<d?p+=Math.PI*2:!u&&p>d&&(d+=Math.PI*2);let c=p;const v=d-p,m=Math.abs(v),y=Math.sqrt(f*f+h*h),_=(15*m*Math.sqrt(y)/Math.PI>>0)+1,b=v/_;if(c+=b,u){l.push(e,t,r,n);for(let w=1,T=c;w<_;w++,T+=b)l.push(e,t,e+Math.sin(T)*y,t+Math.cos(T)*y);l.push(e,t,i,o)}else{l.push(r,n,e,t);for(let w=1,T=c;w<_;w++,T+=b)l.push(e+Math.sin(T)*y,t+Math.cos(T)*y,e,t);l.push(i,o,e,t)}return _*2}function ZE(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,l=new oe(n[0],n[1]),u=new oe(n[n.length-2],n[n.length-1]),f=r.type!==Pe.POLY||r.closeStroke,h=Math.abs(l.x-u.x)<i&&Math.abs(l.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=(l.x+u.x)*.5,it=(u.y+l.y)*.5;n.unshift(z,it),n.push(z,it)}const p=t.points,d=n.length/2;let c=n.length;const v=p.length/2,m=o.width/2,y=m*m,_=o.miterLimit*o.miterLimit;let b=n[0],w=n[1],T=n[2],x=n[3],S=0,I=0,A=-(w-x),O=b-T,L=0,R=0,C=Math.sqrt(A*A+O*O);A/=C,O/=C,A*=m,O*=m;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===Gn.ROUND?c+=jn(b-A*(M-F)*.5,w-O*(M-F)*.5,b-A*M,w-O*M,b+A*F,w+O*F,p,!0)+2:o.cap===Gn.SQUARE&&(c+=yp(b,w,A,O,M,F,!0,p))),p.push(b-A*M,w-O*M,b+A*F,w+O*F);for(let z=1;z<d-1;++z){b=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],S=n[(z+1)*2],I=n[(z+1)*2+1],A=-(w-x),O=b-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=m,O*=m,L=-(x-I),R=T-S,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=m,R*=m;const it=T-b,W=w-x,D=T-S,k=I-x,j=it*D+W*k,G=W*D-k*it,Y=G<0;if(Math.abs(G)<.001*Math.abs(j)){p.push(T-A*M,x-O*M,T+A*F,x+O*F),j>=0&&(o.join===Sr.ROUND?c+=jn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,p,!1)+4:c+=2,p.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const X=(-A+b)*(-O+x)-(-A+T)*(-O+w),$=(-L+S)*(-R+x)-(-L+T)*(-R+I),V=(it*$-D*X)/G,tt=(k*X-W*$)/G,et=(V-T)*(V-T)+(tt-x)*(tt-x),rt=T+(V-T)*M,ot=x+(tt-x)*M,ct=T-(V-T)*F,gt=x-(tt-x)*F,yt=Math.min(it*it+W*W,D*D+k*k),St=Y?M:F,ee=yt+St*St*y,Ut=et<=ee;let nt=o.join;if(nt===Sr.MITER&&et/y>_&&(nt=Sr.BEVEL),Ut)switch(nt){case Sr.MITER:{p.push(rt,ot,ct,gt);break}case Sr.BEVEL:{Y?p.push(rt,ot,T+A*F,x+O*F,rt,ot,T+L*F,x+R*F):p.push(T-A*M,x-O*M,ct,gt,T-L*M,x-R*M,ct,gt),c+=2;break}case Sr.ROUND:{Y?(p.push(rt,ot,T+A*F,x+O*F),c+=jn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,p,!0)+4,p.push(rt,ot,T+L*F,x+R*F)):(p.push(T-A*M,x-O*M,ct,gt),c+=jn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,p,!1)+4,p.push(T-L*M,x-R*M,ct,gt));break}}else{switch(p.push(T-A*M,x-O*M,T+A*F,x+O*F),nt){case Sr.MITER:{Y?p.push(ct,gt,ct,gt):p.push(rt,ot,rt,ot),c+=2;break}case Sr.ROUND:{Y?c+=jn(T,x,T+A*F,x+O*F,T+L*F,x+R*F,p,!0)+2:c+=jn(T,x,T-A*M,x-O*M,T-L*M,x-R*M,p,!1)+2;break}}p.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}b=n[(d-2)*2],w=n[(d-2)*2+1],T=n[(d-1)*2],x=n[(d-1)*2+1],A=-(w-x),O=b-T,C=Math.sqrt(A*A+O*O),A/=C,O/=C,A*=m,O*=m,p.push(T-A*M,x-O*M,T+A*F,x+O*F),f||(o.cap===Gn.ROUND?c+=jn(T-A*(M-F)*.5,x-O*(M-F)*.5,T-A*M,x-O*M,T+A*F,x+O*F,p,!1)+2:o.cap===Gn.SQUARE&&(c+=yp(T,x,A,O,M,F,!1,p)));const q=t.indices,Z=Ai.epsilon*Ai.epsilon;for(let z=v;z<c+v-2;++z)b=p[z*2],w=p[z*2+1],T=p[(z+1)*2],x=p[(z+1)*2+1],S=p[(z+2)*2],I=p[(z+2)*2+1],!(Math.abs(b*(x-I)+T*(I-w)+S*(w-x))<Z)&&q.push(z,z+1,z+2)}function QE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Pe.POLY||n.closeStroke;if(i.length===0)return;const l=t.points,u=t.indices,f=i.length/2,h=l.length/2;let p=h;for(l.push(i[0],i[1]),r=1;r<f;r++)l.push(i[r*2],i[r*2+1]),u.push(p,p+1),p++;o&&u.push(p,h)}function _p(e,t){e.lineStyle.native?QE(e,t):ZE(e,t)}class Su{static curveLength(t,r,n,i,o,l){const u=t-2*n+o,f=r-2*i+l,h=2*n-2*t,p=2*i-2*r,d=4*(u*u+f*f),c=4*(u*h+f*p),v=h*h+p*p,m=2*Math.sqrt(d+c+v),y=Math.sqrt(d),_=2*d*y,b=2*Math.sqrt(v),w=c/y;return(_*m+y*c*(m-b)+(4*v*d-c*c)*Math.log((2*y+w+m)/(w+b)))/(4*_)}static curveTo(t,r,n,i,o){const l=o[o.length-2],u=o[o.length-1],f=Ai._segmentsCount(Su.curveLength(l,u,t,r,n,i));let h=0,p=0;for(let d=1;d<=f;++d){const c=d/f;h=l+(t-l)*c,p=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,p+(r+(i-r)*c-p)*c)}}}const Au={[Pe.POLY]:gp,[Pe.CIRC]:Fo,[Pe.ELIP]:Fo,[Pe.RECT]:XE,[Pe.RREC]:KE},bp=[],Bo=[];class Ou{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?ne.EMPTY:(t=t||new ne(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:l,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,p=i*r.x+l*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,l=t[0],u=t[1];r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,o=u>o?u:o,l=t[2],u=t[3],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,o=u>o?u:o,l=t[4],u=t[5],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,o=u>o?u:o,l=t[6],u=t[7],r=l<r?l:r,n=u<n?u:n,i=l>i?l: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 l=t.a,u=t.b,f=t.c,h=t.d,p=t.tx,d=t.ty;let c=this.minX,v=this.minY,m=this.maxX,y=this.maxY,_=l*r+f*n+p,b=u*r+h*n+d;c=_<c?_:c,v=b<v?b:v,m=_>m?_:m,y=b>y?b:y,_=l*i+f*n+p,b=u*i+h*n+d,c=_<c?_:c,v=b<v?b:v,m=_>m?_:m,y=b>y?b:y,_=l*r+f*o+p,b=u*r+h*o+d,c=_<c?_:c,v=b<v?b:v,m=_>m?_:m,y=b>y?b:y,_=l*i+f*o+p,b=u*i+h*o+d,c=_<c?_:c,v=b<v?b:v,m=_>m?_:m,y=b>y?b:y,this.minX=c,this.minY=v,this.maxX=m,this.maxY=y}addVertexData(t,r,n){let i=this.minX,o=this.minY,l=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],p=t[f+1];i=h<i?h:i,o=p<o?p:o,l=h>l?h:l,u=p>u?p:u}this.minX=i,this.minY=o,this.maxX=l,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,l=o){const u=t.a,f=t.b,h=t.c,p=t.d,d=t.tx,c=t.ty;let v=this.minX,m=this.minY,y=this.maxX,_=this.maxY;for(let b=n;b<i;b+=2){const w=r[b],T=r[b+1],x=u*w+h*T+d,S=p*T+f*w+c;v=Math.min(v,x-o),y=Math.max(y,x+o),m=Math.min(m,S-l),_=Math.max(_,S+l)}this.minX=v,this.minY=m,this.maxX=y,this.maxY=_}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,l=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=l>p?l: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,i=t.minY>r.y?t.minY:r.y,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,l=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=l>p?l:p}}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,l){t-=o,r-=l,n+=o,i+=l,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 Oi extends Ws{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new su,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 Ou,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(Oi.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 ne),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ne),t=this._localBoundsRect),this._localBounds||(this._localBounds=new Ou);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 l=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,l}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,l=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=l,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 JE),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*hw}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 JE extends Oi{constructor(){super(...arguments),this.sortDirty=null}}Oi.prototype.displayObjectUpdateTransform=Oi.prototype.updateTransform;const t2=new $e;function e2(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Cu=class extends Oi{constructor(){super(),this.children=[],this.sortableChildren=Cu.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 l=0;l<o.length;++l)o[l].parent=null,o[l].transform&&(o[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let l=0;l<o.length;++l)o[l].emit("removed",this),this.emit("childRemoved",o[l],this,l);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(e2),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!==Cu.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=t2.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,l=this.children.length;o<l;++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,l;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&&((l=this._enabledFilters)!=null&&l.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 Ci=Cu;Ci.defaultSortableChildren=!1,Ci.prototype.containerUpdateTransform=Ci.prototype.updateTransform,Object.defineProperties(Dt,{SORTABLE_CHILDREN:{get(){return Ci.defaultSortableChildren},set(e){Ht("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Ci.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 Ri=new oe,xp=class extends td{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 Ou,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(),bp.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,Ri):Ri.copyFrom(e),n.shape.contains(Ri.x,Ri.y))){let i=!1;if(n.holes){for(let o=0;o<n.holes.length;o++)if(n.holes[o].shape.contains(Ri.x,Ri.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,p=f.lineStyle;Au[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||p.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:p;if(!v.visible)continue;const m=v.texture.baseTexture,y=this.indices.length,_=this.points.length/2;m.wrapMode=Ji.REPEAT,c===0?this.processFill(f):this.processLine(f);const b=this.points.length/2-_;b!==0&&(r&&!this._compareStyles(n,v)&&(r.end(y,_),r=null),r||(r=bp.pop()||new YE,r.begin(v,y,_),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,_,b,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 l=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&l===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=l?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<xp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Xt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Bo.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Bo.pop();n||(n=new eu,n.texArray=new au),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,l=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const d=this.batches[p],c=8,v=d.style,m=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==m&&(o=m,m._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Bo.pop(),n||(n=new eu,n.texArray=new au),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),m.touched=1,m._batchEnabled=e,m._batchLocation=i,m.wrapMode=Ji.REPEAT,n.texArray.elements[n.texArray.count++]=m,i++)),n.size+=d.size,h+=d.size,l=m._batchLocation,this.addColors(t,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(r,l,d.attribSize,d.attribStart)}Xt._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),l=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],l[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?gp.triangulate(e,this):Au[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];Au[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(),l=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=l}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 l=0;const u=t.length,f=r.frame;for(;l<i;){let p=e[(n+l)*2],d=e[(n+l)*2+1];if(o){const c=o.a*p+o.c*d+o.tx;d=o.b*p+o.d*d+o.ty,p=c}l++,t.push(p/f.width,d/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,l=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let p=u.x/u.width,d=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let m=r+2;m<l;m+=2)c=Math.min(c,Math.floor(e[m]+o)),v=Math.min(v,Math.floor(e[m+1]+o));p-=c,d-=v;for(let m=r;m<l;m+=2)e[m]=(e[m]+p)*f,e[m+1]=(e[m+1]+d)*h}};let wp=xp;wp.BATCHABLE_SIZE=100;class Uo{constructor(){this.color=16777215,this.alpha=1,this.texture=Vt.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=Vt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Ru extends Uo{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Gn.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Ru;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 Iu={},$o=class extends Ci{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 Ru,this._matrix=null,this._holeMode=!1,this.state=po.for2d(),this._geometry=e||new wp,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Rt.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:Vt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Gn.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),Su.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Eu.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,l=mp.curveTo(e,t,r,n,i,o);if(l){const{cx:u,cy:f,radius:h,startAngle:p,endAngle:d,anticlockwise:c}=l;this.arc(u,f,h,p,d,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 p=this.currentPath?this.currentPath.points:null;if(p){const d=Math.abs(p[p.length-2]-u),c=Math.abs(p[p.length-1]-f);d<h&&c<h||p.push(u,f)}else this.moveTo(u,f),p=this.currentPath.points;return mp.arc(u,f,e,t,r,n,i,o,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Vt.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:Vt.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 ne(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new nu(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new ru(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new dw(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===Pe.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,l=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:l,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 l=0,u=o.length;l<u;l++)this._renderDrawCallDirect(e,r.drawCalls[l])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,l=r.count;for(let u=0;u<l;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(!Iu[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)},l=e.plugins[r]._shader.program;Iu[r]=new ps(l,o)}t=Iu[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,l=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let p=0;for(let d=0;d<f.length;d+=2){const c=f[d],v=f[d+1];h[p++]=r*c+i*v+l,h[p++]=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 Pu=$o;Pu.curves=Ai,Pu._TEMP_POINT=new oe;var r2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Nu={},n2={get exports(){return Nu},set exports(e){Nu=e}};/*!
1913
1924
  * d-path-parser - v1.0.0
1914
1925
  * by Massimo Artizzu (MaxArt2501)
1915
1926
  *
@@ -1917,73 +1928,73 @@ void main() {
1917
1928
  *
1918
1929
  * Licensed under the MIT License
1919
1930
  * See LICENSE for details
1920
- */(function(e,t){(function(r,n){e.exports=n()})(QE,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(y){return+v("number",y)},"coordinate pair":function(y){var b=v("number",y);if(b===null&&!y)return null;v("comma");var _=v("number",!0);return{x:+b,y:+_}},"arc definition":function(y){var b=o["coordinate pair"](y);if(!b&&!y)return null;v("comma");var _=+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:_,large:w,clockwise:T,end:x}}},l=0,u=[];l<n.length;){var f=v("command"),h=f.toUpperCase(),p=f!==h,d;switch(h){case"M":d=m("coordinate pair").map(function(y,b){return b===1&&(f=p?"l":"L"),c({end:y})});break;case"L":case"T":d=m("coordinate pair").map(function(y){return c({end:y})});break;case"C":if(d=m("coordinate pair"),d.length%3)throw Error("Expected coordinate pair triplet at position "+l);d=d.reduce(function(y,b,_){var w=_%3;if(!w)y.push(c({cp1:b}));else{var T=y[y.length-1];T[w===1?"cp2":"end"]=b}return y},[]);break;case"Q":case"S":if(d=m("coordinate pair"),d.length&1)throw Error("Expected coordinate pair couple at position "+l);d=d.reduce(function(y,b,_){var w=_&1;if(!w)y.push(c({cp:b}));else{var T=y[y.length-1];T.end=b}return y},[]);break;case"H":case"V":d=m("number").map(function(y){return c({value:y})});break;case"A":d=m("arc definition").map(c);break;case"Z":d=[{code:"Z"}];break}u.push.apply(u,d)}return u;function c(y){return y.code=f,y.relative=p,y}function v(y,b){i[y].lastIndex=l;var _=i[y].exec(n);if(!_||_.index!==l){if(!b)return null;throw Error("Expected "+y+" at position "+l)}return l=i[y].lastIndex,_[1]}function m(y){for(var b=[],_,w=!0;_=o[y](w);)b.push(_),w=!!v("comma");return b}}})})(JE);const t2=/^\s+/,e2=/\s+$/;function Et(e,t){if(e=e||"",t=t||{},e instanceof Et)return e;if(!(this instanceof Et))return new Et(e,t);var r=r2(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}Et.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,l;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?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*o+.0722*l},setAlpha:function(e){return this._a=Ap(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=wp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString: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.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=xp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=xp(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 Tp(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return o2(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(fe(this._r,255)*100)+"%",g:Math.round(fe(this._g,255)*100)+"%",b:Math.round(fe(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(fe(this._r,255)*100)+"%, "+Math.round(fe(this._g,255)*100)+"%, "+Math.round(fe(this._b,255)*100)+"%)":"rgba("+Math.round(fe(this._r,255)*100)+"%, "+Math.round(fe(this._g,255)*100)+"%, "+Math.round(fe(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:y2[Tp(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Ep(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=Et(e);r="#"+Ep(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 Et(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(f2,arguments)},brighten:function(){return this._applyModification(c2,arguments)},darken:function(){return this._applyModification(h2,arguments)},desaturate:function(){return this._applyModification(a2,arguments)},saturate:function(){return this._applyModification(l2,arguments)},greyscale:function(){return this._applyModification(u2,arguments)},spin:function(){return this._applyModification(d2,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(g2,arguments)},complement:function(){return this._applyCombination(p2,arguments)},monochromatic:function(){return this._applyCombination(m2,arguments)},splitcomplement:function(){return this._applyCombination(v2,arguments)},triad:function(){return this._applyCombination(Sp,[3])},tetrad:function(){return this._applyCombination(Sp,[4])}},Et.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 Et(e,t)};function r2(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,l=!1,u=!1;return typeof e=="string"&&(e=w2(e)),typeof e=="object"&&(Xr(e.r)&&Xr(e.g)&&Xr(e.b)?(t=n2(e.r,e.g,e.b),l=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Xr(e.h)&&Xr(e.s)&&Xr(e.v)?(n=bs(e.s),i=bs(e.v),t=s2(e.h,n,i),l=!0,u="hsv"):Xr(e.h)&&Xr(e.s)&&Xr(e.l)&&(n=bs(e.s),o=bs(e.l),t=i2(e.h,n,o),l=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Ap(r),{ok:l,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 n2(e,t,r){return{r:fe(e,255)*255,g:fe(t,255)*255,b:fe(r,255)*255}}function xp(e,t,r){e=fe(e,255),t=fe(t,255),r=fe(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,l,u=(n+i)/2;if(n==i)o=l=0;else{var f=n-i;switch(l=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:l,l:u}}function i2(e,t,r){var n,i,o;e=fe(e,360),t=fe(t,100),r=fe(r,100);function l(h,p,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?h+(p-h)*6*d:d<1/2?p:d<2/3?h+(p-h)*(2/3-d)*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=l(f,u,e+1/3),i=l(f,u,e),o=l(f,u,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function wp(e,t,r){e=fe(e,255),t=fe(t,255),r=fe(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,l,u=n,f=n-i;if(l=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:l,v:u}}function s2(e,t,r){e=fe(e,360)*6,t=fe(t,100),r=fe(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),l=r*(1-i*t),u=r*(1-(1-i)*t),f=n%6,h=[r,l,o,o,u,r][f],p=[u,r,r,l,o,o][f],d=[o,o,u,r,r,l][f];return{r:h*255,g:p*255,b:d*255}}function Tp(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 o2(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(Op(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 Ep(e,t,r,n){var i=[Ar(Op(n)),Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return i.join("")}Et.equals=function(e,t){return!e||!t?!1:Et(e).toRgbString()==Et(t).toRgbString()},Et.random=function(){return Et.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function a2(e,t){t=t===0?0:t||10;var r=Et(e).toHsl();return r.s-=t/100,r.s=Go(r.s),Et(r)}function l2(e,t){t=t===0?0:t||10;var r=Et(e).toHsl();return r.s+=t/100,r.s=Go(r.s),Et(r)}function u2(e){return Et(e).desaturate(100)}function f2(e,t){t=t===0?0:t||10;var r=Et(e).toHsl();return r.l+=t/100,r.l=Go(r.l),Et(r)}function c2(e,t){t=t===0?0:t||10;var r=Et(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)))),Et(r)}function h2(e,t){t=t===0?0:t||10;var r=Et(e).toHsl();return r.l-=t/100,r.l=Go(r.l),Et(r)}function d2(e,t){var r=Et(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,Et(r)}function p2(e){var t=Et(e).toHsl();return t.h=(t.h+180)%360,Et(t)}function Sp(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Et(e).toHsl(),n=[Et(e)],i=360/t,o=1;o<t;o++)n.push(Et({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function v2(e){var t=Et(e).toHsl(),r=t.h;return[Et(e),Et({h:(r+72)%360,s:t.s,l:t.l}),Et({h:(r+216)%360,s:t.s,l:t.l})]}function g2(e,t,r){t=t||6,r=r||30;var n=Et(e).toHsl(),i=360/r,o=[Et(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(Et(n));return o}function m2(e,t){t=t||6;for(var r=Et(e).toHsv(),n=r.h,i=r.s,o=r.v,l=[],u=1/t;t--;)l.push(Et({h:n,s:i,v:o})),o=(o+u)%1;return l}Et.mix=function(e,t,r){r=r===0?0:r||50;var n=Et(e).toRgb(),i=Et(t).toRgb(),o=r/100,l={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 Et(l)},Et.readability=function(e,t){var r=Et(e),n=Et(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},Et.isReadable=function(e,t,r){var n=Et.readability(e,t),i,o;switch(o=!1,i=T2(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},Et.mostReadable=function(e,t,r){var n=null,i=0,o,l,u,f;r=r||{},l=r.includeFallbackColors,u=r.level,f=r.size;for(var h=0;h<t.length;h++)o=Et.readability(e,t[h]),o>i&&(i=o,n=Et(t[h]));return Et.isReadable(e,n,{level:u,size:f})||!l?n:(r.includeFallbackColors=!1,Et.mostReadable(e,["#fff","#000"],r))};var Nu=Et.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"},y2=Et.hexNames=_2(Nu);function _2(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Ap(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fe(e,t){b2(e)&&(e="100%");var r=x2(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 Je(e){return parseInt(e,16)}function b2(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function x2(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 Op(e){return Math.round(parseFloat(e)*255).toString(16)}function Cp(e){return Je(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 Xr(e){return!!Or.CSS_UNIT.exec(e)}function w2(e){e=e.replace(t2,"").replace(e2,"").toLowerCase();var t=!1;if(Nu[e])e=Nu[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:Je(r[1]),g:Je(r[2]),b:Je(r[3]),a:Cp(r[4]),format:t?"name":"hex8"}:(r=Or.hex6.exec(e))?{r:Je(r[1]),g:Je(r[2]),b:Je(r[3]),format:t?"name":"hex"}:(r=Or.hex4.exec(e))?{r:Je(r[1]+""+r[1]),g:Je(r[2]+""+r[2]),b:Je(r[3]+""+r[3]),a:Cp(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Or.hex3.exec(e))?{r:Je(r[1]+""+r[1]),g:Je(r[2]+""+r[2]),b:Je(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function T2(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 E2=function(){function e(t,r){var n=[],i=!0,o=!1,l=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,l=h}finally{try{!i&&u.return&&u.return()}finally{if(o)throw l}}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,Mu=function(t,r,n,i,o,l,u){var f=t.x,h=t.y;f*=r,h*=n;var p=i*f-o*h,d=o*f+i*h;return{x:p+l,y:d+u}},S2=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),l=Math.cos(t+r),u=Math.sin(t+r);return[{x:i-o*n,y:o+i*n},{x:l+u*n,y:u-l*n},{x:l,y:u}]},Rp=function(t,r,n,i){var o=t*i-r*n<0?-1:1,l=t*n+r*i;return l>1&&(l=1),l<-1&&(l=-1),o*Math.acos(l)},A2=function(t,r,n,i,o,l,u,f,h,p,d,c){var v=Math.pow(o,2),m=Math.pow(l,2),y=Math.pow(d,2),b=Math.pow(c,2),_=v*m-v*b-m*y;_<0&&(_=0),_/=v*b+m*y,_=Math.sqrt(_)*(u===f?-1:1);var w=_*o/l*c,T=_*-l/o*d,x=p*w-h*T+(t+n)/2,S=h*w+p*T+(r+i)/2,I=(d-w)/o,A=(c-T)/l,O=(-d-w)/o,L=(-c-T)/l,R=Rp(1,0,I,A),C=Rp(I,A,O,L);return f===0&&C>0&&(C-=xs),f===1&&C<0&&(C+=xs),[x,S,R,C]},Ip=function(t){var r=t.px,n=t.py,i=t.cx,o=t.cy,l=t.rx,u=t.ry,f=t.xAxisRotation,h=f===void 0?0:f,p=t.largeArcFlag,d=p===void 0?0:p,c=t.sweepFlag,v=c===void 0?0:c,m=[];if(l===0||u===0)return[];var y=Math.sin(h*xs/360),b=Math.cos(h*xs/360),_=b*(r-i)/2+y*(n-o)/2,w=-y*(r-i)/2+b*(n-o)/2;if(_===0&&w===0)return[];l=Math.abs(l),u=Math.abs(u);var T=Math.pow(_,2)/Math.pow(l,2)+Math.pow(w,2)/Math.pow(u,2);T>1&&(l*=Math.sqrt(T),u*=Math.sqrt(T));var x=A2(r,n,i,o,l,u,d,v,y,b,_,w),S=E2(x,4),I=S[0],A=S[1],O=S[2],L=S[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++)m.push(S2(O,L)),O+=L;return m.map(function(M){var F=Mu(M[0],l,u,b,y,I,A),q=F.x,Z=F.y,z=Mu(M[1],l,u,b,y,I,A),nt=z.x,W=z.y,D=Mu(M[2],l,u,b,y,I,A),k=D.x,j=D.y;return{x1:q,y1:Z,x2:nt,y2:W,x:k,y:j}})};class O2 extends Iu{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}=Et(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)),l=parseFloat(t.getAttribute(r)),u=t.getAttribute("cx"),f=t.getAttribute("cy");let h=0,p=0;u!==null&&(h=parseFloat(u)),f!==null&&(p=parseFloat(f)),i?this.drawEllipse(h,p,o,l):this.drawCircle(h,p,o)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),o=parseFloat(t.getAttribute("height")),l=parseFloat(t.getAttribute("rx"));l?this.drawRoundedRect(r,n,i,o,l):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[l,u]=o.split(":");if(l){const f=this._convertStyleName(l);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:l,strokeWidth:u,cap:f,join:h,miterLimit:p}=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:l===null?this.line.alpha:parseFloat(l),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: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,i=0;const o=Pu(r.trim());for(let l=0;l<o.length;l++){const u=o[l];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":{Ip({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:p,y2:d,x:c,y:v})=>this.bezierCurveTo(f,h,p,d,c,v));break}case"A":{Ip({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:p,y2:d,x:c,y:v})=>this.bezierCurveTo(f,h,p,d,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},C2=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function R2(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&C2.indexOf(e)>=0}function I2(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 P2(e){return(e|32)===97}function Ri(e){return e>=48&&e<=57}function N2(e){return e>=48&&e<=57||e===43||e===45||e===46}function M2(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&&R2(e.path.charCodeAt(e.index));)e.index++}function k2(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 L2(e){var t=e.index,r=t,n=e.max,i=!1,o=!1,l=!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++,l=!0;f=r<n?e.path.charCodeAt(r):0}if(f===101||f===69){if(u&&!o&&!l){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 ku(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 F2(e){var t=e.max,r,n,i,o,l;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=P2(r),!I2(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){ku(e);return}for(i=!1;;){for(l=o;l>0;l--){if(n&&(l===3||l===4)?k2(e):L2(e),e.err.length){ku(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||!N2(e.path.charCodeAt(e.index))))break}ku(e)}var B2=function(t){var r=new M2(t),n=r.max;for(qo(r);r.index<n&&!r.err.length;)F2(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 D2(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=D2(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 Pp=Cr,U2=Pp,$2={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},G2=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,j2=/[\s,]+/,q2=function(t){var r=new U2,n,i;return t.split(G2).forEach(function(o){if(o.length){if(typeof $2[o]<"u"){n=o;return}switch(i=o.split(j2).map(function(l){return+l||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 Np(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 z2(e,t,r,n,i,o,l,u,f,h){var p=h*(e-r)/2+f*(t-n)/2,d=-f*(e-r)/2+h*(t-n)/2,c=l*l,v=u*u,m=p*p,y=d*d,b=c*v-c*y-v*m;b<0&&(b=0),b/=c*y+v*m,b=Math.sqrt(b)*(i===o?-1:1);var _=b*l/u*d,w=b*-u/l*p,T=h*_-f*w+(e+r)/2,x=f*_+h*w+(t+n)/2,S=(p-_)/l,I=(d-w)/u,A=(-p-_)/l,O=(-d-w)/u,L=Np(1,0,S,I),R=Np(S,I,A,O);return o===0&&R>0&&(R-=ws),o===1&&R<0&&(R+=ws),[T,x,L,R]}function H2(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),l=Math.sin(e+t);return[n,i,n-i*r,i+n*r,o+l*r,l-o*r,o,l]}var V2=function(t,r,n,i,o,l,u,f,h){var p=Math.sin(h*ws/360),d=Math.cos(h*ws/360),c=d*(t-n)/2+p*(r-i)/2,v=-p*(t-n)/2+d*(r-i)/2;if(c===0&&v===0)return[];if(u===0||f===0)return[];u=Math.abs(u),f=Math.abs(f);var m=c*c/(u*u)+v*v/(f*f);m>1&&(u*=Math.sqrt(m),f*=Math.sqrt(m));var y=z2(t,r,n,i,o,l,u,f,p,d),b=[],_=y[2],w=y[3],T=Math.max(Math.ceil(Math.abs(w)/(ws/4)),1);w/=T;for(var x=0;x<T;x++)b.push(H2(_,w)),_+=w;return b.map(function(S){for(var I=0;I<S.length;I+=2){var A=S[I+0],O=S[I+1];A*=u,O*=f;var L=d*A-p*O,R=p*A+d*O;S[I+0]=L+y[0],S[I+1]=R+y[1]}return S})},Ts=1e-10,Mp=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*Mp),r=Math.sin(this.ax*Mp),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],l=((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(l<Ts*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];l=Math.sqrt(l);var h=u+l/2,p=u-l/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(p)):(this.ax+=90,this.rx=Math.sqrt(p),this.ry=Math.sqrt(h)),this},Es.prototype.isDegenerate=function(){return this.rx<Ts*this.ry||this.ry<Ts*this.rx};var W2=Es,X2=B2,K2=q2,pn=Pp,Y2=V2,Z2=W2;function ve(e){if(!(this instanceof ve))return new ve(e);var t=X2(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ve.from=function(e){if(typeof e=="string")return new ve(e);if(e instanceof ve){var t=new ve("");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)},ve.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,o,l){var u,f,h,p;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,l,!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],l,!1),f=u[1]===e.calc(o,l,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var d=e.toArray(),c=Z2(n[1],n[2],n[3]).transform(d);if(d[0]*d[3]-d[1]*d[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]===l||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":p=i>0,u=e.calc(n[1],n[2],p),f=["m",u[0],u[1]];break;default:for(h=n[0],f=[h],p=h.toLowerCase()===h,r=1;r<n.length;r+=2)u=e.calc(n[r],n[r+1],p),f.push(u[0],u[1])}t.segments[i]=f},!0)},ve.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=[]}},ve.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],l=o[0];l!==t||l==="m"||l==="M"?(l==="m"&&t==="z"&&(e+=" "),e+=l,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=l}return e},ve.prototype.translate=function(e,t){return this.__stack.push(pn().translate(e,t||0)),this},ve.prototype.scale=function(e,t){return this.__stack.push(pn().scale(e,!t&&t!==0?e:t)),this},ve.prototype.rotate=function(e,t,r){return this.__stack.push(pn().rotate(e,t||0,r||0)),this},ve.prototype.skewX=function(e){return this.__stack.push(pn().skewX(e)),this},ve.prototype.skewY=function(e){return this.__stack.push(pn().skewY(e)),this},ve.prototype.matrix=function(e){return this.__stack.push(pn().matrix(e)),this},ve.prototype.transform=function(e){return e.trim()?(this.__stack.push(K2(e)),this):this},ve.prototype.round=function(e){var t=0,r=0,n=0,i=0,o;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(l){var u=l[0].toLowerCase()===l[0];switch(l[0]){case"H":case"h":u&&(l[1]+=n),n=l[1]-l[1].toFixed(e),l[1]=+l[1].toFixed(e);return;case"V":case"v":u&&(l[1]+=i),i=l[1]-l[1].toFixed(e),l[1]=+l[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":u&&(l[1]+=n,l[2]+=i),n=l[1]-l[1].toFixed(e),i=l[2]-l[2].toFixed(e),t=n,r=i,l[1]=+l[1].toFixed(e),l[2]=+l[2].toFixed(e);return;case"A":case"a":u&&(l[6]+=n,l[7]+=i),n=l[6]-l[6].toFixed(e),i=l[7]-l[7].toFixed(e),l[1]=+l[1].toFixed(e),l[2]=+l[2].toFixed(e),l[3]=+l[3].toFixed(e+2),l[6]=+l[6].toFixed(e),l[7]=+l[7].toFixed(e);return;default:o=l.length,u&&(l[o-2]+=n,l[o-1]+=i),n=l[o-2]-l[o-2].toFixed(e),i=l[o-1]-l[o-1].toFixed(e),l.forEach(function(f,h){h&&(l[h]=+l[h].toFixed(e))});return}}),this},ve.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,o=0,l=0,u=0,f=0,h,p,d;if(t||this.__evaluateStack(),r.forEach(function(c,v){var m=e(c,v,o,l);Array.isArray(m)&&(n[v]=m,i=!0);var y=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":o=c[1]+(y?o:0),l=c[2]+(y?l:0),u=o,f=l;return;case"h":case"H":o=c[1]+(y?o:0);return;case"v":case"V":l=c[1]+(y?l:0);return;case"z":case"Z":o=u,l=f;return;default:o=c[c.length-2]+(y?o:0),l=c[c.length-1]+(y?l:0)}}),!i)return this;for(d=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(p=0;p<n[h].length;p++)d.push(n[h][p]);else d.push(r[h]);return this.segments=d,this},ve.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toUpperCase(),l;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(l=1;l<e.length;l++)e[l]+=l%2?r:n}},!0),this},ve.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toLowerCase(),l;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(l=1;l<e.length;l++)e[l]-=l%2?r:n}},!0),this},ve.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,o,l,u=[],f=e[0];return f!=="A"&&f!=="a"?null:(f==="a"?(o=r+e[6],l=n+e[7]):(o=e[6],l=e[7]),i=Y2(r,n,o,l,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},ve.prototype.unshort=function(){var e=this.segments,t,r,n,i,o;return this.iterate(function(l,u,f,h){var p=l[0],d=p.toUpperCase(),c;u&&(d==="T"?(c=p==="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,l[1],l[2]]):d==="S"&&(c=p==="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,l[1],l[2],l[3],l[4]]))}),this};var Q2=ve,J2=Q2;const tS=En(J2),eS=St.forwardRef((e,t)=>{const[r,n]=St.useState(null),i=_t.useRef(null),o=_t.useRef(null),l=_t.useRef(null),{path:u,transformation:{x:f,y:h,width:p,height:d,anchor:c,hexColor:v,fill:m,stroke:y="none",strokeWidth:b=0,colorCorrection:_={}},pointerdown:w,pointerup:T}=e,x=ye.useApp(),{temperatureFilter:S,sharpnessFilter:I,hueFilter:A,blurFilter:O,adjustmentFilter:L}=_s(_),{blurRadius:R=0}=_;return St.useEffect(()=>{const C=tS(u).scale(5).translate(0,0).toString(),P=`<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${d}">
1921
- <path stroke="${y}" stroke-width="${b}" fill="${v||m}" d="${C}">
1931
+ */(function(e,t){(function(r,n){e.exports=n()})(r2,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(y){return+v("number",y)},"coordinate pair":function(y){var _=v("number",y);if(_===null&&!y)return null;v("comma");var b=v("number",!0);return{x:+_,y:+b}},"arc definition":function(y){var _=o["coordinate pair"](y);if(!_&&!y)return null;v("comma");var b=+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:_,rotation:b,large:w,clockwise:T,end:x}}},l=0,u=[];l<n.length;){var f=v("command"),h=f.toUpperCase(),p=f!==h,d;switch(h){case"M":d=m("coordinate pair").map(function(y,_){return _===1&&(f=p?"l":"L"),c({end:y})});break;case"L":case"T":d=m("coordinate pair").map(function(y){return c({end:y})});break;case"C":if(d=m("coordinate pair"),d.length%3)throw Error("Expected coordinate pair triplet at position "+l);d=d.reduce(function(y,_,b){var w=b%3;if(!w)y.push(c({cp1:_}));else{var T=y[y.length-1];T[w===1?"cp2":"end"]=_}return y},[]);break;case"Q":case"S":if(d=m("coordinate pair"),d.length&1)throw Error("Expected coordinate pair couple at position "+l);d=d.reduce(function(y,_,b){var w=b&1;if(!w)y.push(c({cp:_}));else{var T=y[y.length-1];T.end=_}return y},[]);break;case"H":case"V":d=m("number").map(function(y){return c({value:y})});break;case"A":d=m("arc definition").map(c);break;case"Z":d=[{code:"Z"}];break}u.push.apply(u,d)}return u;function c(y){return y.code=f,y.relative=p,y}function v(y,_){i[y].lastIndex=l;var b=i[y].exec(n);if(!b||b.index!==l){if(!_)return null;throw Error("Expected "+y+" at position "+l)}return l=i[y].lastIndex,b[1]}function m(y){for(var _=[],b,w=!0;b=o[y](w);)_.push(b),w=!!v("comma");return _}}})})(n2);const i2=/^\s+/,s2=/\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=o2(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,l;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?l=n/12.92:l=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*o+.0722*l},setAlpha:function(e){return this._a=Cp(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ep(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ep(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=Tp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Tp(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 Sp(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return f2(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(fe(this._r,255)*100)+"%",g:Math.round(fe(this._g,255)*100)+"%",b:Math.round(fe(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(fe(this._r,255)*100)+"%, "+Math.round(fe(this._g,255)*100)+"%, "+Math.round(fe(this._b,255)*100)+"%)":"rgba("+Math.round(fe(this._r,255)*100)+"%, "+Math.round(fe(this._g,255)*100)+"%, "+Math.round(fe(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:w2[Sp(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Ap(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=Tt(e);r="#"+Ap(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(p2,arguments)},brighten:function(){return this._applyModification(v2,arguments)},darken:function(){return this._applyModification(g2,arguments)},desaturate:function(){return this._applyModification(c2,arguments)},saturate:function(){return this._applyModification(h2,arguments)},greyscale:function(){return this._applyModification(d2,arguments)},spin:function(){return this._applyModification(m2,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(b2,arguments)},complement:function(){return this._applyCombination(y2,arguments)},monochromatic:function(){return this._applyCombination(x2,arguments)},splitcomplement:function(){return this._applyCombination(_2,arguments)},triad:function(){return this._applyCombination(Op,[3])},tetrad:function(){return this._applyCombination(Op,[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 o2(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,l=!1,u=!1;return typeof e=="string"&&(e=A2(e)),typeof e=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=a2(e.r,e.g,e.b),l=!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=u2(e.h,n,i),l=!0,u="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=bs(e.s),o=bs(e.l),t=l2(e.h,n,o),l=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Cp(r),{ok:l,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 a2(e,t,r){return{r:fe(e,255)*255,g:fe(t,255)*255,b:fe(r,255)*255}}function Tp(e,t,r){e=fe(e,255),t=fe(t,255),r=fe(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,l,u=(n+i)/2;if(n==i)o=l=0;else{var f=n-i;switch(l=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:l,l:u}}function l2(e,t,r){var n,i,o;e=fe(e,360),t=fe(t,100),r=fe(r,100);function l(h,p,d){return d<0&&(d+=1),d>1&&(d-=1),d<1/6?h+(p-h)*6*d:d<1/2?p:d<2/3?h+(p-h)*(2/3-d)*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=l(f,u,e+1/3),i=l(f,u,e),o=l(f,u,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function Ep(e,t,r){e=fe(e,255),t=fe(t,255),r=fe(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,l,u=n,f=n-i;if(l=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:l,v:u}}function u2(e,t,r){e=fe(e,360)*6,t=fe(t,100),r=fe(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),l=r*(1-i*t),u=r*(1-(1-i)*t),f=n%6,h=[r,l,o,o,u,r][f],p=[u,r,r,l,o,o][f],d=[o,o,u,r,r,l][f];return{r:h*255,g:p*255,b:d*255}}function Sp(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 f2(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(Rp(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 Ap(e,t,r,n){var i=[Ar(Rp(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 c2(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 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){return Tt(e).desaturate(100)}function p2(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 v2(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 g2(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 m2(e,t){var r=Tt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,Tt(r)}function y2(e){var t=Tt(e).toHsl();return t.h=(t.h+180)%360,Tt(t)}function Op(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 _2(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 b2(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 x2(e,t){t=t||6;for(var r=Tt(e).toHsv(),n=r.h,i=r.s,o=r.v,l=[],u=1/t;t--;)l.push(Tt({h:n,s:i,v:o})),o=(o+u)%1;return l}Tt.mix=function(e,t,r){r=r===0?0:r||50;var n=Tt(e).toRgb(),i=Tt(t).toRgb(),o=r/100,l={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(l)},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=O2(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,l,u,f;r=r||{},l=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})||!l?n:(r.includeFallbackColors=!1,Tt.mostReadable(e,["#fff","#000"],r))};var Mu=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"},w2=Tt.hexNames=T2(Mu);function T2(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Cp(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fe(e,t){E2(e)&&(e="100%");var r=S2(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 Je(e){return parseInt(e,16)}function E2(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function S2(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 Rp(e){return Math.round(parseFloat(e)*255).toString(16)}function Ip(e){return Je(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 A2(e){e=e.replace(i2,"").replace(s2,"").toLowerCase();var t=!1;if(Mu[e])e=Mu[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:Je(r[1]),g:Je(r[2]),b:Je(r[3]),a:Ip(r[4]),format:t?"name":"hex8"}:(r=Or.hex6.exec(e))?{r:Je(r[1]),g:Je(r[2]),b:Je(r[3]),format:t?"name":"hex"}:(r=Or.hex4.exec(e))?{r:Je(r[1]+""+r[1]),g:Je(r[2]+""+r[2]),b:Je(r[3]+""+r[3]),a:Ip(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Or.hex3.exec(e))?{r:Je(r[1]+""+r[1]),g:Je(r[2]+""+r[2]),b:Je(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function O2(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 C2=function(){function e(t,r){var n=[],i=!0,o=!1,l=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,l=h}finally{try{!i&&u.return&&u.return()}finally{if(o)throw l}}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,ku=function(t,r,n,i,o,l,u){var f=t.x,h=t.y;f*=r,h*=n;var p=i*f-o*h,d=o*f+i*h;return{x:p+l,y:d+u}},R2=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),l=Math.cos(t+r),u=Math.sin(t+r);return[{x:i-o*n,y:o+i*n},{x:l+u*n,y:u-l*n},{x:l,y:u}]},Pp=function(t,r,n,i){var o=t*i-r*n<0?-1:1,l=t*n+r*i;return l>1&&(l=1),l<-1&&(l=-1),o*Math.acos(l)},I2=function(t,r,n,i,o,l,u,f,h,p,d,c){var v=Math.pow(o,2),m=Math.pow(l,2),y=Math.pow(d,2),_=Math.pow(c,2),b=v*m-v*_-m*y;b<0&&(b=0),b/=v*_+m*y,b=Math.sqrt(b)*(u===f?-1:1);var w=b*o/l*c,T=b*-l/o*d,x=p*w-h*T+(t+n)/2,S=h*w+p*T+(r+i)/2,I=(d-w)/o,A=(c-T)/l,O=(-d-w)/o,L=(-c-T)/l,R=Pp(1,0,I,A),C=Pp(I,A,O,L);return f===0&&C>0&&(C-=xs),f===1&&C<0&&(C+=xs),[x,S,R,C]},Np=function(t){var r=t.px,n=t.py,i=t.cx,o=t.cy,l=t.rx,u=t.ry,f=t.xAxisRotation,h=f===void 0?0:f,p=t.largeArcFlag,d=p===void 0?0:p,c=t.sweepFlag,v=c===void 0?0:c,m=[];if(l===0||u===0)return[];var y=Math.sin(h*xs/360),_=Math.cos(h*xs/360),b=_*(r-i)/2+y*(n-o)/2,w=-y*(r-i)/2+_*(n-o)/2;if(b===0&&w===0)return[];l=Math.abs(l),u=Math.abs(u);var T=Math.pow(b,2)/Math.pow(l,2)+Math.pow(w,2)/Math.pow(u,2);T>1&&(l*=Math.sqrt(T),u*=Math.sqrt(T));var x=I2(r,n,i,o,l,u,d,v,y,_,b,w),S=C2(x,4),I=S[0],A=S[1],O=S[2],L=S[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++)m.push(R2(O,L)),O+=L;return m.map(function(M){var F=ku(M[0],l,u,_,y,I,A),q=F.x,Z=F.y,z=ku(M[1],l,u,_,y,I,A),it=z.x,W=z.y,D=ku(M[2],l,u,_,y,I,A),k=D.x,j=D.y;return{x1:q,y1:Z,x2:it,y2:W,x:k,y:j}})};class P2 extends Pu{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)),l=parseFloat(t.getAttribute(r)),u=t.getAttribute("cx"),f=t.getAttribute("cy");let h=0,p=0;u!==null&&(h=parseFloat(u)),f!==null&&(p=parseFloat(f)),i?this.drawEllipse(h,p,o,l):this.drawCircle(h,p,o)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),o=parseFloat(t.getAttribute("height")),l=parseFloat(t.getAttribute("rx"));l?this.drawRoundedRect(r,n,i,o,l):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[l,u]=o.split(":");if(l){const f=this._convertStyleName(l);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:l,strokeWidth:u,cap:f,join:h,miterLimit:p}=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:l===null?this.line.alpha:parseFloat(l),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: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,i=0;const o=Nu(r.trim());for(let l=0;l<o.length;l++){const u=o[l];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":{Np({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:p,y2:d,x:c,y:v})=>this.bezierCurveTo(f,h,p,d,c,v));break}case"A":{Np({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:p,y2:d,x:c,y:v})=>this.bezierCurveTo(f,h,p,d,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},N2=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function M2(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&N2.indexOf(e)>=0}function k2(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 L2(e){return(e|32)===97}function Ii(e){return e>=48&&e<=57}function F2(e){return e>=48&&e<=57||e===43||e===45||e===46}function B2(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&&M2(e.path.charCodeAt(e.index));)e.index++}function D2(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 U2(e){var t=e.index,r=t,n=e.max,i=!1,o=!1,l=!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),!Ii(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&&Ii(f)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Ii(e.path.charCodeAt(r));)r++,o=!0;f=r<n?e.path.charCodeAt(r):0}if(f===46){for(u=!0,r++;Ii(e.path.charCodeAt(r));)r++,l=!0;f=r<n?e.path.charCodeAt(r):0}if(f===101||f===69){if(u&&!o&&!l){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&&Ii(e.path.charCodeAt(r)))for(;r<n&&Ii(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 Lu(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 $2(e){var t=e.max,r,n,i,o,l;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=L2(r),!k2(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){Lu(e);return}for(i=!1;;){for(l=o;l>0;l--){if(n&&(l===3||l===4)?D2(e):U2(e),e.err.length){Lu(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||!F2(e.path.charCodeAt(e.index))))break}Lu(e)}var G2=function(t){var r=new B2(t),n=r.max;for(qo(r);r.index<n&&!r.err.length;)$2(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 j2(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=j2(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 Mp=Cr,q2=Mp,z2={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},H2=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,V2=/[\s,]+/,W2=function(t){var r=new q2,n,i;return t.split(H2).forEach(function(o){if(o.length){if(typeof z2[o]<"u"){n=o;return}switch(i=o.split(V2).map(function(l){return+l||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 kp(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 X2(e,t,r,n,i,o,l,u,f,h){var p=h*(e-r)/2+f*(t-n)/2,d=-f*(e-r)/2+h*(t-n)/2,c=l*l,v=u*u,m=p*p,y=d*d,_=c*v-c*y-v*m;_<0&&(_=0),_/=c*y+v*m,_=Math.sqrt(_)*(i===o?-1:1);var b=_*l/u*d,w=_*-u/l*p,T=h*b-f*w+(e+r)/2,x=f*b+h*w+(t+n)/2,S=(p-b)/l,I=(d-w)/u,A=(-p-b)/l,O=(-d-w)/u,L=kp(1,0,S,I),R=kp(S,I,A,O);return o===0&&R>0&&(R-=ws),o===1&&R<0&&(R+=ws),[T,x,L,R]}function K2(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),l=Math.sin(e+t);return[n,i,n-i*r,i+n*r,o+l*r,l-o*r,o,l]}var Y2=function(t,r,n,i,o,l,u,f,h){var p=Math.sin(h*ws/360),d=Math.cos(h*ws/360),c=d*(t-n)/2+p*(r-i)/2,v=-p*(t-n)/2+d*(r-i)/2;if(c===0&&v===0)return[];if(u===0||f===0)return[];u=Math.abs(u),f=Math.abs(f);var m=c*c/(u*u)+v*v/(f*f);m>1&&(u*=Math.sqrt(m),f*=Math.sqrt(m));var y=X2(t,r,n,i,o,l,u,f,p,d),_=[],b=y[2],w=y[3],T=Math.max(Math.ceil(Math.abs(w)/(ws/4)),1);w/=T;for(var x=0;x<T;x++)_.push(K2(b,w)),b+=w;return _.map(function(S){for(var I=0;I<S.length;I+=2){var A=S[I+0],O=S[I+1];A*=u,O*=f;var L=d*A-p*O,R=p*A+d*O;S[I+0]=L+y[0],S[I+1]=R+y[1]}return S})},Ts=1e-10,Lp=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*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)],i=n[0]*n[0]+n[2]*n[2],o=n[1]*n[1]+n[3]*n[3],l=((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(l<Ts*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];l=Math.sqrt(l);var h=u+l/2,p=u-l/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(p)):(this.ax+=90,this.rx=Math.sqrt(p),this.ry=Math.sqrt(h)),this},Es.prototype.isDegenerate=function(){return this.rx<Ts*this.ry||this.ry<Ts*this.rx};var Z2=Es,Q2=G2,J2=W2,pn=Mp,tS=Y2,eS=Z2;function ve(e){if(!(this instanceof ve))return new ve(e);var t=Q2(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ve.from=function(e){if(typeof e=="string")return new ve(e);if(e instanceof ve){var t=new ve("");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)},ve.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,o,l){var u,f,h,p;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,l,!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],l,!1),f=u[1]===e.calc(o,l,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var d=e.toArray(),c=eS(n[1],n[2],n[3]).transform(d);if(d[0]*d[3]-d[1]*d[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]===l||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":p=i>0,u=e.calc(n[1],n[2],p),f=["m",u[0],u[1]];break;default:for(h=n[0],f=[h],p=h.toLowerCase()===h,r=1;r<n.length;r+=2)u=e.calc(n[r],n[r+1],p),f.push(u[0],u[1])}t.segments[i]=f},!0)},ve.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=[]}},ve.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],l=o[0];l!==t||l==="m"||l==="M"?(l==="m"&&t==="z"&&(e+=" "),e+=l,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=l}return e},ve.prototype.translate=function(e,t){return this.__stack.push(pn().translate(e,t||0)),this},ve.prototype.scale=function(e,t){return this.__stack.push(pn().scale(e,!t&&t!==0?e:t)),this},ve.prototype.rotate=function(e,t,r){return this.__stack.push(pn().rotate(e,t||0,r||0)),this},ve.prototype.skewX=function(e){return this.__stack.push(pn().skewX(e)),this},ve.prototype.skewY=function(e){return this.__stack.push(pn().skewY(e)),this},ve.prototype.matrix=function(e){return this.__stack.push(pn().matrix(e)),this},ve.prototype.transform=function(e){return e.trim()?(this.__stack.push(J2(e)),this):this},ve.prototype.round=function(e){var t=0,r=0,n=0,i=0,o;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(l){var u=l[0].toLowerCase()===l[0];switch(l[0]){case"H":case"h":u&&(l[1]+=n),n=l[1]-l[1].toFixed(e),l[1]=+l[1].toFixed(e);return;case"V":case"v":u&&(l[1]+=i),i=l[1]-l[1].toFixed(e),l[1]=+l[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":u&&(l[1]+=n,l[2]+=i),n=l[1]-l[1].toFixed(e),i=l[2]-l[2].toFixed(e),t=n,r=i,l[1]=+l[1].toFixed(e),l[2]=+l[2].toFixed(e);return;case"A":case"a":u&&(l[6]+=n,l[7]+=i),n=l[6]-l[6].toFixed(e),i=l[7]-l[7].toFixed(e),l[1]=+l[1].toFixed(e),l[2]=+l[2].toFixed(e),l[3]=+l[3].toFixed(e+2),l[6]=+l[6].toFixed(e),l[7]=+l[7].toFixed(e);return;default:o=l.length,u&&(l[o-2]+=n,l[o-1]+=i),n=l[o-2]-l[o-2].toFixed(e),i=l[o-1]-l[o-1].toFixed(e),l.forEach(function(f,h){h&&(l[h]=+l[h].toFixed(e))});return}}),this},ve.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,o=0,l=0,u=0,f=0,h,p,d;if(t||this.__evaluateStack(),r.forEach(function(c,v){var m=e(c,v,o,l);Array.isArray(m)&&(n[v]=m,i=!0);var y=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":o=c[1]+(y?o:0),l=c[2]+(y?l:0),u=o,f=l;return;case"h":case"H":o=c[1]+(y?o:0);return;case"v":case"V":l=c[1]+(y?l:0);return;case"z":case"Z":o=u,l=f;return;default:o=c[c.length-2]+(y?o:0),l=c[c.length-1]+(y?l:0)}}),!i)return this;for(d=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(p=0;p<n[h].length;p++)d.push(n[h][p]);else d.push(r[h]);return this.segments=d,this},ve.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toUpperCase(),l;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(l=1;l<e.length;l++)e[l]+=l%2?r:n}},!0),this},ve.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toLowerCase(),l;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(l=1;l<e.length;l++)e[l]-=l%2?r:n}},!0),this},ve.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,o,l,u=[],f=e[0];return f!=="A"&&f!=="a"?null:(f==="a"?(o=r+e[6],l=n+e[7]):(o=e[6],l=e[7]),i=tS(r,n,o,l,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},ve.prototype.unshort=function(){var e=this.segments,t,r,n,i,o;return this.iterate(function(l,u,f,h){var p=l[0],d=p.toUpperCase(),c;u&&(d==="T"?(c=p==="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,l[1],l[2]]):d==="S"&&(c=p==="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,l[1],l[2],l[3],l[4]]))}),this};var rS=ve,nS=rS;const iS=En(nS),sS=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(null),i=_t.useRef(null),o=_t.useRef(null),l=_t.useRef(null),{path:u,transformation:{x:f,y:h,width:p,height:d,anchor:c,hexColor:v,fill:m,stroke:y="none",strokeWidth:_=0,colorCorrection:b={}},pointerdown:w,pointerup:T}=e,x=me.useApp(),{temperatureFilter:S,sharpnessFilter:I,hueFilter:A,blurFilter:O,adjustmentFilter:L}=_s(b),{blurRadius:R=0}=b;return Et.useEffect(()=>{const C=iS(u).scale(5).translate(0,0).toString(),P=`<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${d}">
1932
+ <path stroke="${y}" stroke-width="${_}" fill="${v||m}" d="${C}">
1922
1933
  </path>
1923
- </svg>`,M=new O2(P),F=x.renderer.generateTexture(M);return n(F),()=>{}},[x,u,y,b,v,m]),re.jsx(ni,{...e,ref:t,children:re.jsx(ye.Container,{ref:o,children:re.jsx(ye.Container,{ref:l,children:r&&re.jsx(ye.Sprite,{texture:r,width:p,height:d,anchor:c,ref:i,x:f,y:h,interactive:!0,pointerdown:w,pointerup:T,filters:[S,I,A,L,...R>0?[O]:[]]})})})})});var rS=Mr,nS=function(){return rS.Date.now()},iS=nS,sS=/\s/;function oS(e){for(var t=e.length;t--&&sS.test(e.charAt(t)););return t}var aS=oS,lS=aS,uS=/^\s+/;function fS(e){return e&&e.slice(0,lS(e)+1).replace(uS,"")}var cS=fS,hS=Ki,dS=Zi,pS="[object Symbol]";function vS(e){return typeof e=="symbol"||dS(e)&&hS(e)==pS}var zo=vS,gS=cS,kp=Yi,mS=zo,Lp=0/0,yS=/^[-+]0x[0-9a-f]+$/i,_S=/^0b[01]+$/i,bS=/^0o[0-7]+$/i,xS=parseInt;function wS(e){if(typeof e=="number")return e;if(mS(e))return Lp;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=gS(e);var r=_S.test(e);return r||bS.test(e)?xS(e.slice(2),r?2:8):yS.test(e)?Lp:+e}var TS=wS,ES=Yi,Lu=iS,Fp=TS,SS="Expected a function",AS=Math.max,OS=Math.min;function CS(e,t,r){var n,i,o,l,u,f,h=0,p=!1,d=!1,c=!0;if(typeof e!="function")throw new TypeError(SS);t=Fp(t)||0,ES(r)&&(p=!!r.leading,d="maxWait"in r,o=d?AS(Fp(r.maxWait)||0,t):o,c="trailing"in r?!!r.trailing:c);function v(I){var A=n,O=i;return n=i=void 0,h=I,l=e.apply(O,A),l}function m(I){return h=I,u=setTimeout(_,t),p?v(I):l}function y(I){var A=I-f,O=I-h,L=t-A;return d?OS(L,o-O):L}function b(I){var A=I-f,O=I-h;return f===void 0||A>=t||A<0||d&&O>=o}function _(){var I=Lu();if(b(I))return w(I);u=setTimeout(_,y(I))}function w(I){return u=void 0,c&&n?v(I):(n=i=void 0,l)}function T(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?l:w(Lu())}function S(){var I=Lu(),A=b(I);if(n=arguments,i=this,f=I,A){if(u===void 0)return m(f);if(d)return clearTimeout(u),u=setTimeout(_,t),v(f)}return u===void 0&&(u=setTimeout(_,t)),l}return S.cancel=T,S.flush=x,S}var RS=CS;const Bp=En(RS),IS=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);console.log("allProps",e);const n=_t.useRef(null),i=_t.useRef(t),o=_t.useRef(null),{tl:l,isDragging:u}=_t.useContext(ti),{uniqueId:f,src:h,startAt:p,endAt:d,mute:c,speed:v}=e,m=e.audioStartAt||p,y=e.audioEndAt||d,b=St.useRef(null);mr(ke.PAUSE,()=>{var A;n.current&&b.current&&((A=b.current)==null||A.pause(),i.current.isPlaying=!1)}),St.useEffect(()=>{b.current&&(u?(b.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const _=A=>{var O,L;n.current&&((O=b.current)==null||O.play({volume:c?0:1,start:A,end:d,speed:v||1}),u?((L=b.current)==null||L.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},w=Bp((A,O)=>{var L;b.current&&((L=b.current)==null||L.play({volume:c?0:1,start:A,end:O,speed:v||1}),i.current.isPlaying=!0)},100),T=Bp(()=>{b.current&&(b.current.pause(),i.current.isPlaying=!1)},300),x=()=>{var A;n.current&&(console.log("audio gsapOnStart",p),(A=b.current)==null||A.stop(),i.current.isPlaying=!1,i.current.completed=!0)},S=(A,O)=>{var R,C,P,M;const L=A+((R=o.current)==null?void 0:R.time());b.current&&i.current.isDragging?(w(L,O),T(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&((C=b.current)==null||C.refresh(),(P=b.current)==null||P.refreshPaused(),(M=b.current)==null||M.resume(),i.current.isPlaying=!0)},I=()=>{};return _t.useEffect(()=>{let A=Te.context(()=>{});if(n.current&&l.current){const O={duration:Number(y)-Number(m),onStart:_,onComplete:x,onStartParams:[m,y],onCompleteParams:[],onInterrupt:I,onUpdate:S,onUpdateParams:[m,y]};o.current&&o.current.kill(),A=Te.context(()=>{o.current=Te.from(n.current,O,m),l.current.to(n.current,{alpha:1,duration:.01},p).to(n.current,{alpha:0,duration:.1},Number(d)-.09),l.current.add(o.current,p)})}return()=>{o.current&&(o.current.kill(),Te.killTweensOf(o.current)),A.revert()}},[p,d,m,y]),St.useEffect(()=>{n.current&&r(!0)},[]),St.useEffect(()=>{n.current&&b.current&&(i.current.mute=c,i.current.speed=v,b.current.volume=c?0:1)},[c,v]),St.useEffect(()=>(Qi(h)||(b.current=ny.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{i.current.loaded=!0}})),()=>{b.current&&(b.current.pause&&b.current.pause(),b.current.destroy&&b.current.destroy())}),[f,h]),re.jsx(ye.Container,{ref:n})};function PS(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 Dp=PS;function NS(){this.__data__=[],this.size=0}var MS=NS;function kS(e,t){return e===t||e!==e&&t!==t}var Up=kS,LS=Up;function FS(e,t){for(var r=e.length;r--;)if(LS(e[r][0],t))return r;return-1}var Ho=FS,BS=Ho,DS=Array.prototype,US=DS.splice;function $S(e){var t=this.__data__,r=BS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():US.call(t,r,1),--this.size,!0}var GS=$S,jS=Ho;function qS(e){var t=this.__data__,r=jS(t,e);return r<0?void 0:t[r][1]}var zS=qS,HS=Ho;function VS(e){return HS(this.__data__,e)>-1}var WS=VS,XS=Ho;function KS(e,t){var r=this.__data__,n=XS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var YS=KS,ZS=MS,QS=GS,JS=zS,tA=WS,eA=YS;function Ii(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])}}Ii.prototype.clear=ZS,Ii.prototype.delete=QS,Ii.prototype.get=JS,Ii.prototype.has=tA,Ii.prototype.set=eA;var Vo=Ii,rA=Vo;function nA(){this.__data__=new rA,this.size=0}var iA=nA;function sA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var oA=sA;function aA(e){return this.__data__.get(e)}var lA=aA;function uA(e){return this.__data__.has(e)}var fA=uA,cA=ei,hA=cA(Object,"create"),Wo=hA,$p=Wo;function dA(){this.__data__=$p?$p(null):{},this.size=0}var pA=dA;function vA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gA=vA,mA=Wo,yA="__lodash_hash_undefined__",_A=Object.prototype,bA=_A.hasOwnProperty;function xA(e){var t=this.__data__;if(mA){var r=t[e];return r===yA?void 0:r}return bA.call(t,e)?t[e]:void 0}var wA=xA,TA=Wo,EA=Object.prototype,SA=EA.hasOwnProperty;function AA(e){var t=this.__data__;return TA?t[e]!==void 0:SA.call(t,e)}var OA=AA,CA=Wo,RA="__lodash_hash_undefined__";function IA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=CA&&t===void 0?RA:t,this}var PA=IA,NA=pA,MA=gA,kA=wA,LA=OA,FA=PA;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=NA,Pi.prototype.delete=MA,Pi.prototype.get=kA,Pi.prototype.has=LA,Pi.prototype.set=FA;var BA=Pi,Gp=BA,DA=Vo,UA=Va;function $A(){this.size=0,this.__data__={hash:new Gp,map:new(UA||DA),string:new Gp}}var GA=$A;function jA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var qA=jA,zA=qA;function HA(e,t){var r=e.__data__;return zA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Xo=HA,VA=Xo;function WA(e){var t=VA(this,e).delete(e);return this.size-=t?1:0,t}var XA=WA,KA=Xo;function YA(e){return KA(this,e).get(e)}var ZA=YA,QA=Xo;function JA(e){return QA(this,e).has(e)}var tO=JA,eO=Xo;function rO(e,t){var r=eO(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var nO=rO,iO=GA,sO=XA,oO=ZA,aO=tO,lO=nO;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=iO,Ni.prototype.delete=sO,Ni.prototype.get=oO,Ni.prototype.has=aO,Ni.prototype.set=lO;var Fu=Ni,uO=Vo,fO=Va,cO=Fu,hO=200;function dO(e,t){var r=this.__data__;if(r instanceof uO){var n=r.__data__;if(!fO||n.length<hO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new cO(n)}return r.set(e,t),this.size=r.size,this}var pO=dO,vO=Vo,gO=iA,mO=oA,yO=lA,_O=fA,bO=pO;function Mi(e){var t=this.__data__=new vO(e);this.size=t.size}Mi.prototype.clear=gO,Mi.prototype.delete=mO,Mi.prototype.get=yO,Mi.prototype.has=_O,Mi.prototype.set=bO;var jp=Mi,xO="__lodash_hash_undefined__";function wO(e){return this.__data__.set(e,xO),this}var TO=wO;function EO(e){return this.__data__.has(e)}var SO=EO,AO=Fu,OO=TO,CO=SO;function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new AO;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=OO,Ko.prototype.has=CO;var RO=Ko;function IO(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 PO=IO;function NO(e,t){return e.has(t)}var MO=NO,kO=RO,LO=PO,FO=MO,BO=1,DO=2;function UO(e,t,r,n,i,o){var l=r&BO,u=e.length,f=t.length;if(u!=f&&!(l&&f>u))return!1;var h=o.get(e),p=o.get(t);if(h&&p)return h==t&&p==e;var d=-1,c=!0,v=r&DO?new kO:void 0;for(o.set(e,t),o.set(t,e);++d<u;){var m=e[d],y=t[d];if(n)var b=l?n(y,m,d,t,e,o):n(m,y,d,e,t,o);if(b!==void 0){if(b)continue;c=!1;break}if(v){if(!LO(t,function(_,w){if(!FO(v,w)&&(m===_||i(m,_,r,n,o)))return v.push(w)})){c=!1;break}}else if(!(m===y||i(m,y,r,n,o))){c=!1;break}}return o.delete(e),o.delete(t),c}var qp=UO,$O=Mr,GO=$O.Uint8Array,jO=GO;function qO(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var zO=qO;function HO(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var VO=HO,zp=js,Hp=jO,WO=Up,XO=qp,KO=zO,YO=VO,ZO=1,QO=2,JO="[object Boolean]",tC="[object Date]",eC="[object Error]",rC="[object Map]",nC="[object Number]",iC="[object RegExp]",sC="[object Set]",oC="[object String]",aC="[object Symbol]",lC="[object ArrayBuffer]",uC="[object DataView]",Vp=zp?zp.prototype:void 0,Bu=Vp?Vp.valueOf:void 0;function fC(e,t,r,n,i,o,l){switch(r){case uC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lC:return!(e.byteLength!=t.byteLength||!o(new Hp(e),new Hp(t)));case JO:case tC:case nC:return WO(+e,+t);case eC:return e.name==t.name&&e.message==t.message;case iC:case oC:return e==t+"";case rC:var u=KO;case sC:var f=n&ZO;if(u||(u=YO),e.size!=t.size&&!f)return!1;var h=l.get(e);if(h)return h==t;n|=QO,l.set(e,t);var p=XO(u(e),u(t),n,i,o,l);return l.delete(e),p;case aC:if(Bu)return Bu.call(e)==Bu.call(t)}return!1}var cC=fC;function hC(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var dC=hC,pC=dC,vC=kr;function gC(e,t,r){var n=t(e);return vC(e)?n:pC(n,r(e))}var mC=gC;function yC(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var l=e[r];t(l,r,e)&&(o[i++]=l)}return o}var _C=yC;function bC(){return[]}var xC=bC,wC=_C,TC=xC,EC=Object.prototype,SC=EC.propertyIsEnumerable,Wp=Object.getOwnPropertySymbols,AC=Wp?function(e){return e==null?[]:(e=Object(e),wC(Wp(e),function(t){return SC.call(e,t)}))}:TC,OC=AC;function CC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var RC=CC,IC=9007199254740991,PC=/^(?:0|[1-9]\d*)$/;function NC(e,t){var r=typeof e;return t=t??IC,!!t&&(r=="number"||r!="symbol"&&PC.test(e))&&e>-1&&e%1==0&&e<t}var Xp=NC,MC=RC,kC=Qa,LC=kr,FC=tl,BC=Xp,DC=el,UC=Object.prototype,$C=UC.hasOwnProperty;function GC(e,t){var r=LC(e),n=!r&&kC(e),i=!r&&!n&&FC(e),o=!r&&!n&&!i&&DC(e),l=r||n||i||o,u=l?MC(e.length,String):[],f=u.length;for(var h in e)(t||$C.call(e,h))&&!(l&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||BC(h,f)))&&u.push(h);return u}var jC=GC,qC=jC,zC=dc,HC=qs;function VC(e){return HC(e)?qC(e):zC(e)}var Du=VC,WC=mC,XC=OC,KC=Du;function YC(e){return WC(e,KC,XC)}var ZC=YC,Kp=ZC,QC=1,JC=Object.prototype,tR=JC.hasOwnProperty;function eR(e,t,r,n,i,o){var l=r&QC,u=Kp(e),f=u.length,h=Kp(t),p=h.length;if(f!=p&&!l)return!1;for(var d=f;d--;){var c=u[d];if(!(l?c in t:tR.call(t,c)))return!1}var v=o.get(e),m=o.get(t);if(v&&m)return v==t&&m==e;var y=!0;o.set(e,t),o.set(t,e);for(var b=l;++d<f;){c=u[d];var _=e[c],w=t[c];if(n)var T=l?n(w,_,c,t,e,o):n(_,w,c,e,t,o);if(!(T===void 0?_===w||i(_,w,r,n,o):T)){y=!1;break}b||(b=c=="constructor")}if(y&&!b){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(y=!1)}return o.delete(e),o.delete(t),y}var rR=eR,Uu=jp,nR=qp,iR=cC,sR=rR,Yp=Cc,Zp=kr,Qp=tl,oR=el,aR=1,Jp="[object Arguments]",tv="[object Array]",Yo="[object Object]",lR=Object.prototype,ev=lR.hasOwnProperty;function uR(e,t,r,n,i,o){var l=Zp(e),u=Zp(t),f=l?tv:Yp(e),h=u?tv:Yp(t);f=f==Jp?Yo:f,h=h==Jp?Yo:h;var p=f==Yo,d=h==Yo,c=f==h;if(c&&Qp(e)){if(!Qp(t))return!1;l=!0,p=!1}if(c&&!p)return o||(o=new Uu),l||oR(e)?nR(e,t,r,n,i,o):iR(e,t,f,r,n,i,o);if(!(r&aR)){var v=p&&ev.call(e,"__wrapped__"),m=d&&ev.call(t,"__wrapped__");if(v||m){var y=v?e.value():e,b=m?t.value():t;return o||(o=new Uu),i(y,b,r,n,o)}}return c?(o||(o=new Uu),sR(e,t,r,n,i,o)):!1}var fR=uR,cR=fR,rv=Zi;function nv(e,t,r,n,i){return e===t?!0:e==null||t==null||!rv(e)&&!rv(t)?e!==e&&t!==t:cR(e,t,r,n,nv,i)}var iv=nv,hR=jp,dR=iv,pR=1,vR=2;function gR(e,t,r,n){var i=r.length,o=i,l=!n;if(e==null)return!o;for(e=Object(e);i--;){var u=r[i];if(l&&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],p=u[1];if(l&&u[2]){if(h===void 0&&!(f in e))return!1}else{var d=new hR;if(n)var c=n(h,p,f,e,t,d);if(!(c===void 0?dR(p,h,pR|vR,n,d):c))return!1}}return!0}var mR=gR,yR=Yi;function _R(e){return e===e&&!yR(e)}var sv=_R,bR=sv,xR=Du;function wR(e){for(var t=xR(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,bR(i)]}return t}var TR=wR;function ER(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var ov=ER,SR=mR,AR=TR,OR=ov;function CR(e){var t=AR(e);return t.length==1&&t[0][2]?OR(t[0][0],t[0][1]):function(r){return r===e||SR(r,e,t)}}var RR=CR,IR=kr,PR=zo,NR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,MR=/^\w*$/;function kR(e,t){if(IR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||PR(e)?!0:MR.test(e)||!NR.test(e)||t!=null&&e in Object(t)}var $u=kR,av=Fu,LR="Expected a function";function Gu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(LR);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 l=e.apply(this,n);return r.cache=o.set(i,l)||o,l};return r.cache=new(Gu.Cache||av),r}Gu.Cache=av;var FR=Gu,BR=FR,DR=500;function UR(e){var t=BR(e,function(n){return r.size===DR&&r.clear(),n}),r=t.cache;return t}var $R=UR,GR=$R,jR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qR=/\\(\\)?/g,zR=GR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(jR,function(r,n,i,o){t.push(i?o.replace(qR,"$1"):n||r)}),t}),HR=zR,lv=js,VR=Dp,WR=kr,XR=zo,KR=1/0,uv=lv?lv.prototype:void 0,fv=uv?uv.toString:void 0;function cv(e){if(typeof e=="string")return e;if(WR(e))return VR(e,cv)+"";if(XR(e))return fv?fv.call(e):"";var t=e+"";return t=="0"&&1/e==-KR?"-0":t}var YR=cv,ZR=YR;function QR(e){return e==null?"":ZR(e)}var JR=QR,tI=kr,eI=$u,rI=HR,nI=JR;function iI(e,t){return tI(e)?e:eI(e,t)?[e]:rI(nI(e))}var hv=iI,sI=zo,oI=1/0;function aI(e){if(typeof e=="string"||sI(e))return e;var t=e+"";return t=="0"&&1/e==-oI?"-0":t}var Zo=aI,lI=hv,uI=Zo;function fI(e,t){t=lI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[uI(t[r++])];return r&&r==n?e:void 0}var dv=fI,cI=dv;function hI(e,t,r){var n=e==null?void 0:cI(e,t);return n===void 0?r:n}var dI=hI;function pI(e,t){return e!=null&&t in Object(e)}var vI=pI,gI=hv,mI=Qa,yI=kr,_I=Xp,bI=Ja,xI=Zo;function wI(e,t,r){t=gI(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var l=xI(t[n]);if(!(o=e!=null&&r(e,l)))break;e=e[l]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&bI(i)&&_I(l,i)&&(yI(e)||mI(e)))}var TI=wI,EI=vI,SI=TI;function AI(e,t){return e!=null&&SI(e,t,EI)}var OI=AI,CI=iv,RI=dI,II=OI,PI=$u,NI=sv,MI=ov,kI=Zo,LI=1,FI=2;function BI(e,t){return PI(e)&&NI(t)?MI(kI(e),t):function(r){var n=RI(r,e);return n===void 0&&n===t?II(r,e):CI(t,n,LI|FI)}}var DI=BI;function UI(e){return e}var $I=UI;function GI(e){return function(t){return t==null?void 0:t[e]}}var jI=GI,qI=dv;function zI(e){return function(t){return qI(t,e)}}var HI=zI,VI=jI,WI=HI,XI=$u,KI=Zo;function YI(e){return XI(e)?VI(KI(e)):WI(e)}var ZI=YI,QI=RR,JI=DI,tP=$I,eP=kr,rP=ZI;function nP(e){return typeof e=="function"?e:e==null?tP:typeof e=="object"?eP(e)?JI(e[0],e[1]):QI(e):rP(e)}var iP=nP;function sP(e){return function(t,r,n){for(var i=-1,o=Object(t),l=n(t),u=l.length;u--;){var f=l[e?u:++i];if(r(o[f],f,o)===!1)break}return t}}var oP=sP,aP=oP,lP=aP(),uP=lP,fP=uP,cP=Du;function hP(e,t){return e&&fP(e,t,cP)}var dP=hP,pP=qs;function vP(e,t){return function(r,n){if(r==null)return r;if(!pP(r))return e(r,n);for(var i=r.length,o=t?i:-1,l=Object(r);(t?o--:++o<i)&&n(l[o],o,l)!==!1;);return r}}var gP=vP,mP=dP,yP=gP,_P=yP(mP),bP=_P,xP=bP,wP=qs;function TP(e,t){var r=-1,n=wP(e)?Array(e.length):[];return xP(e,function(i,o,l){n[++r]=t(i,o,l)}),n}var EP=TP,SP=Dp,AP=iP,OP=EP,CP=kr;function RP(e,t){var r=CP(e)?SP:OP;return r(e,AP(t))}var IP=RP;const PP=En(IP);var jn={},pv={},Kr={};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.loop=Kr.conditional=Kr.parse=void 0;var NP=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(l){return e(t,l,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};Kr.parse=NP;var MP=function(t,r){return function(n,i,o,l){r(n,i,o)&&l(n,t,i,o)}};Kr.conditional=MP;var kP=function(t,r){return function(n,i,o,l){for(var u=[],f=n.pos;r(n,i,o);){var h={};if(l(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Kr.loop=kP;var _e={};Object.defineProperty(_e,"__esModule",{value:!0}),_e.readBits=_e.readArray=_e.readUnsigned=_e.readString=_e.peekBytes=_e.readBytes=_e.peekByte=_e.readByte=_e.buildStream=void 0;var LP=function(t){return{data:t,pos:0}};_e.buildStream=LP;var vv=function(){return function(t){return t.data[t.pos++]}};_e.readByte=vv;var FP=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};_e.peekByte=FP;var Qo=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};_e.readBytes=Qo;var BP=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};_e.peekBytes=BP;var DP=function(t){return function(r){return Array.from(Qo(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};_e.readString=DP;var UP=function(t){return function(r){var n=Qo(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};_e.readUnsigned=UP;var $P=function(t,r){return function(n,i,o){for(var l=typeof r=="function"?r(n,i,o):r,u=Qo(t),f=new Array(l),h=0;h<l;h++)f[h]=u(n);return f}};_e.readArray=$P;var GP=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},jP=function(t){return function(r){for(var n=vv()(r),i=new Array(8),o=0;o<8;o++)i[7-o]=!!(n&1<<o);return Object.keys(t).reduce(function(l,u){var f=t[u];return f.length?l[u]=GP(i,f.index,f.length):l[u]=i[f.index],l},{})}};_e.readBits=jP,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Kr,r=_e,n={blocks:function(c){for(var v=0,m=[],y=c.data.length,b=0,_=(0,r.readByte)()(c);_!==v&&_;_=(0,r.readByte)()(c)){if(c.pos+_>=y){var w=y-c.pos;m.push((0,r.readBytes)(w)(c)),b+=w;break}m.push((0,r.readBytes)(_)(c)),b+=_}for(var T=new Uint8Array(b),x=0,S=0;S<m.length;S++)T.set(m[S],x),x+=m[S].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(d){var c=(0,r.peekBytes)(2)(d);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(d,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(d,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(d){return(0,r.peekByte)()(d)===44}),l=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,m){return(0,r.readBytes)(m.text.blockSize)(c)}},n]},function(d){var c=(0,r.peekBytes)(2)(d);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,m){return(0,r.readString)(m.blockSize)(c)}},n]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(d){var c=(0,r.peekBytes)(2)(d);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(d,c){return Math.pow(2,c.lsd.gct.size+1)})},function(d,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,o,l],function(d){var c=(0,r.peekByte)()(d);return c===33||c===44})}],p=h;e.default=p}(pv);var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.deinterlace=void 0;var qP=function(t,r){for(var n=new Array(t.length),i=t.length/r,o=function(c,v){var m=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(m))},l=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var p=l[h];p<i;p+=u[h])o(p,f),f++;return n};Jo.deinterlace=qP;var ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.lzw=void 0;var zP=function(t,r,n){var i=4096,o=-1,l=n,u,f,h,p,d,c,v,I,m,y,S,b,A,O,R,L,_=new Array(n),w=new Array(i),T=new Array(i),x=new Array(i+1);for(b=t,f=1<<b,d=f+1,u=f+2,v=o,p=b+1,h=(1<<p)-1,m=0;m<f;m++)w[m]=0,T[m]=m;var S,I,A,O,L,R;for(S=I=A=O=L=R=0,y=0;y<l;){if(O===0){if(I<p){S+=r[R]<<I,I+=8,R++;continue}if(m=S&h,S>>=p,I-=p,m>u||m==d)break;if(m==f){p=b+1,h=(1<<p)-1,u=f+2,v=o;continue}if(v==o){x[O++]=T[m],v=m,A=m;continue}for(c=m,m==u&&(x[O++]=A,m=v);m>f;)x[O++]=T[m],m=w[m];A=T[m]&255,x[O++]=A,u<i&&(w[u]=v,T[u]=A,u++,!(u&h)&&u<i&&(p++,h+=u)),v=c}O--,_[L++]=x[O],y++}for(y=L;y<l;y++)_[y]=0;return _};ta.lzw=zP,Object.defineProperty(jn,"__esModule",{value:!0}),jn.decompressFrames=jn.decompressFrame=jn.parseGIF=void 0;var HP=YP(pv),VP=Kr,WP=_e,XP=Jo,KP=ta;function YP(e){return e&&e.__esModule?e:{default:e}}var ZP=function(t){var r=new Uint8Array(t);return(0,VP.parse)((0,WP.buildStream)(r),HP.default)};jn.parseGIF=ZP;var QP=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var o=i*4,l=t.pixels[i],u=t.colorTable[l]||[0,0,0];n[o]=u[0],n[o+1]=u[1],n[o+2]=u[2],n[o+3]=l!==t.transparentIndex?255:0}return n},gv=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,l=(0,KP.lzw)(i.data.minCodeSize,i.data.blocks,o);i.descriptor.lct.interlaced&&(l=(0,XP.deinterlace)(l,i.descriptor.width));var u={pixels:l,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=QP(u)),u};jn.decompressFrame=gv;var JP=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return gv(n,t.gct,r)})};jn.decompressFrames=JP;const mv=(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},tN=e=>mv({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),eN=e=>_t.useReducer(mv,e,tN);var rN='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 nN(e){const t=new Blob([rN],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const iN=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),sN=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),_t.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)},oN=e=>{const t=_t.useRef(e);return _t.useEffect(()=>{t.current=e},[e]),t},aN=e=>{const t=oN(e);return _t.useCallback(r=>t.current&&t.current(r),[])},lN=sN(()=>new nN,e=>e.terminate()),uN=(e,t)=>{const r=aN(t),n=lN();_t.useEffect(()=>{if(typeof e=="string"){const i=o=>{const l=o.data||o;if(l.src===e){const u=l.error?l:iN(l);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])},fN=({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 i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),re.jsx(ye.AnimatedSprite,{ref:n,...r,isPlaying:e})},yv=St.memo(fN);var ea={exports:{}};/**
1934
+ </svg>`,M=new P2(P),F=x.renderer.generateTexture(M);return n(F),()=>{}},[x,u,y,_,v,m]),Yt.jsx(ii,{...e,ref:t,children:Yt.jsx(me.Container,{ref:o,children:Yt.jsx(me.Container,{ref:l,children:r&&Yt.jsx(me.Sprite,{texture:r,width:p,height:d,anchor:c,ref:i,x:f,y:h,interactive:!0,pointerdown:w,pointerup:T,filters:[S,I,A,L,...R>0?[O]:[]]})})})})});var oS=Mr,aS=function(){return oS.Date.now()},lS=aS,uS=/\s/;function fS(e){for(var t=e.length;t--&&uS.test(e.charAt(t)););return t}var cS=fS,hS=cS,dS=/^\s+/;function pS(e){return e&&e.slice(0,hS(e)+1).replace(dS,"")}var vS=pS,gS=Yi,mS=Qi,yS="[object Symbol]";function _S(e){return typeof e=="symbol"||mS(e)&&gS(e)==yS}var zo=_S,bS=vS,Fp=Zi,xS=zo,Bp=0/0,wS=/^[-+]0x[0-9a-f]+$/i,TS=/^0b[01]+$/i,ES=/^0o[0-7]+$/i,SS=parseInt;function AS(e){if(typeof e=="number")return e;if(xS(e))return Bp;if(Fp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=bS(e);var r=TS.test(e);return r||ES.test(e)?SS(e.slice(2),r?2:8):wS.test(e)?Bp:+e}var OS=AS,CS=Zi,Fu=lS,Dp=OS,RS="Expected a function",IS=Math.max,PS=Math.min;function NS(e,t,r){var n,i,o,l,u,f,h=0,p=!1,d=!1,c=!0;if(typeof e!="function")throw new TypeError(RS);t=Dp(t)||0,CS(r)&&(p=!!r.leading,d="maxWait"in r,o=d?IS(Dp(r.maxWait)||0,t):o,c="trailing"in r?!!r.trailing:c);function v(I){var A=n,O=i;return n=i=void 0,h=I,l=e.apply(O,A),l}function m(I){return h=I,u=setTimeout(b,t),p?v(I):l}function y(I){var A=I-f,O=I-h,L=t-A;return d?PS(L,o-O):L}function _(I){var A=I-f,O=I-h;return f===void 0||A>=t||A<0||d&&O>=o}function b(){var I=Fu();if(_(I))return w(I);u=setTimeout(b,y(I))}function w(I){return u=void 0,c&&n?v(I):(n=i=void 0,l)}function T(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?l:w(Fu())}function S(){var I=Fu(),A=_(I);if(n=arguments,i=this,f=I,A){if(u===void 0)return m(f);if(d)return clearTimeout(u),u=setTimeout(b,t),v(f)}return u===void 0&&(u=setTimeout(b,t)),l}return S.cancel=T,S.flush=x,S}var MS=NS;const Up=En(MS),kS=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);console.log("allProps",e);const n=_t.useRef(null),i=_t.useRef(t),o=_t.useRef(null),{tl:l,isDragging:u}=_t.useContext(ti),{uniqueId:f,src:h,startAt:p,endAt:d,mute:c,speed:v}=e,m=e.audioStartAt||p,y=e.audioEndAt||d,_=Et.useRef(null);mr(ke.PAUSE,()=>{var A;n.current&&_.current&&((A=_.current)==null||A.pause(),i.current.isPlaying=!1)}),Et.useEffect(()=>{_.current&&(u?(_.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const b=A=>{var O,L;n.current&&((O=_.current)==null||O.play({volume:c?0:1,start:A,end:d,speed:v||1}),u?((L=_.current)==null||L.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},w=Up((A,O)=>{var L;_.current&&((L=_.current)==null||L.play({volume:c?0:1,start:A,end:O,speed:v||1}),i.current.isPlaying=!0)},100),T=Up(()=>{_.current&&(_.current.pause(),i.current.isPlaying=!1)},300),x=()=>{var A;n.current&&(console.log("audio gsapOnStart",p),(A=_.current)==null||A.stop(),i.current.isPlaying=!1,i.current.completed=!0)},S=(A,O)=>{var R,C,P,M;const L=A+((R=o.current)==null?void 0:R.time());_.current&&i.current.isDragging?(w(L,O),T(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&((C=_.current)==null||C.refresh(),(P=_.current)==null||P.refreshPaused(),(M=_.current)==null||M.resume(),i.current.isPlaying=!0)},I=()=>{};return _t.useEffect(()=>{let A=Te.context(()=>{});if(n.current&&l.current){const O={duration:Number(y)-Number(m),onStart:b,onComplete:x,onStartParams:[m,y],onCompleteParams:[],onInterrupt:I,onUpdate:S,onUpdateParams:[m,y]};o.current&&o.current.kill(),A=Te.context(()=>{o.current=Te.from(n.current,O,m),l.current.to(n.current,{alpha:1,duration:.01},p).to(n.current,{alpha:0,duration:.1},Number(d)-.09),l.current.add(o.current,p)})}return()=>{o.current&&(o.current.kill(),Te.killTweensOf(o.current)),A.revert()}},[p,d,m,y]),Et.useEffect(()=>{n.current&&r(!0)},[]),Et.useEffect(()=>{n.current&&_.current&&(i.current.mute=c,i.current.speed=v,_.current.volume=c?0:1)},[c,v]),Et.useEffect(()=>(ni(h)||(_.current=sy.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{i.current.loaded=!0}})),()=>{_.current&&(_.current.pause&&_.current.pause(),_.current.destroy&&_.current.destroy())}),[f,h]),Yt.jsx(me.Container,{ref:n})};function LS(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 $p=LS;function FS(){this.__data__=[],this.size=0}var BS=FS;function DS(e,t){return e===t||e!==e&&t!==t}var Gp=DS,US=Gp;function $S(e,t){for(var r=e.length;r--;)if(US(e[r][0],t))return r;return-1}var Ho=$S,GS=Ho,jS=Array.prototype,qS=jS.splice;function zS(e){var t=this.__data__,r=GS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():qS.call(t,r,1),--this.size,!0}var HS=zS,VS=Ho;function WS(e){var t=this.__data__,r=VS(t,e);return r<0?void 0:t[r][1]}var XS=WS,KS=Ho;function YS(e){return KS(this.__data__,e)>-1}var ZS=YS,QS=Ho;function JS(e,t){var r=this.__data__,n=QS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var tA=JS,eA=BS,rA=HS,nA=XS,iA=ZS,sA=tA;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=eA,Pi.prototype.delete=rA,Pi.prototype.get=nA,Pi.prototype.has=iA,Pi.prototype.set=sA;var Vo=Pi,oA=Vo;function aA(){this.__data__=new oA,this.size=0}var lA=aA;function uA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var fA=uA;function cA(e){return this.__data__.get(e)}var hA=cA;function dA(e){return this.__data__.has(e)}var pA=dA,vA=ei,gA=vA(Object,"create"),Wo=gA,jp=Wo;function mA(){this.__data__=jp?jp(null):{},this.size=0}var yA=mA;function _A(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var bA=_A,xA=Wo,wA="__lodash_hash_undefined__",TA=Object.prototype,EA=TA.hasOwnProperty;function SA(e){var t=this.__data__;if(xA){var r=t[e];return r===wA?void 0:r}return EA.call(t,e)?t[e]:void 0}var AA=SA,OA=Wo,CA=Object.prototype,RA=CA.hasOwnProperty;function IA(e){var t=this.__data__;return OA?t[e]!==void 0:RA.call(t,e)}var PA=IA,NA=Wo,MA="__lodash_hash_undefined__";function kA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=NA&&t===void 0?MA:t,this}var LA=kA,FA=yA,BA=bA,DA=AA,UA=PA,$A=LA;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=FA,Ni.prototype.delete=BA,Ni.prototype.get=DA,Ni.prototype.has=UA,Ni.prototype.set=$A;var GA=Ni,qp=GA,jA=Vo,qA=Va;function zA(){this.size=0,this.__data__={hash:new qp,map:new(qA||jA),string:new qp}}var HA=zA;function VA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var WA=VA,XA=WA;function KA(e,t){var r=e.__data__;return XA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Xo=KA,YA=Xo;function ZA(e){var t=YA(this,e).delete(e);return this.size-=t?1:0,t}var QA=ZA,JA=Xo;function tO(e){return JA(this,e).get(e)}var eO=tO,rO=Xo;function nO(e){return rO(this,e).has(e)}var iO=nO,sO=Xo;function oO(e,t){var r=sO(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var aO=oO,lO=HA,uO=QA,fO=eO,cO=iO,hO=aO;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=lO,Mi.prototype.delete=uO,Mi.prototype.get=fO,Mi.prototype.has=cO,Mi.prototype.set=hO;var Bu=Mi,dO=Vo,pO=Va,vO=Bu,gO=200;function mO(e,t){var r=this.__data__;if(r instanceof dO){var n=r.__data__;if(!pO||n.length<gO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new vO(n)}return r.set(e,t),this.size=r.size,this}var yO=mO,_O=Vo,bO=lA,xO=fA,wO=hA,TO=pA,EO=yO;function ki(e){var t=this.__data__=new _O(e);this.size=t.size}ki.prototype.clear=bO,ki.prototype.delete=xO,ki.prototype.get=wO,ki.prototype.has=TO,ki.prototype.set=EO;var zp=ki,SO="__lodash_hash_undefined__";function AO(e){return this.__data__.set(e,SO),this}var OO=AO;function CO(e){return this.__data__.has(e)}var RO=CO,IO=Bu,PO=OO,NO=RO;function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new IO;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=PO,Ko.prototype.has=NO;var MO=Ko;function kO(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 LO=kO;function FO(e,t){return e.has(t)}var BO=FO,DO=MO,UO=LO,$O=BO,GO=1,jO=2;function qO(e,t,r,n,i,o){var l=r&GO,u=e.length,f=t.length;if(u!=f&&!(l&&f>u))return!1;var h=o.get(e),p=o.get(t);if(h&&p)return h==t&&p==e;var d=-1,c=!0,v=r&jO?new DO:void 0;for(o.set(e,t),o.set(t,e);++d<u;){var m=e[d],y=t[d];if(n)var _=l?n(y,m,d,t,e,o):n(m,y,d,e,t,o);if(_!==void 0){if(_)continue;c=!1;break}if(v){if(!UO(t,function(b,w){if(!$O(v,w)&&(m===b||i(m,b,r,n,o)))return v.push(w)})){c=!1;break}}else if(!(m===y||i(m,y,r,n,o))){c=!1;break}}return o.delete(e),o.delete(t),c}var Hp=qO,zO=Mr,HO=zO.Uint8Array,VO=HO;function WO(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var XO=WO;function KO(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var YO=KO,Vp=js,Wp=VO,ZO=Gp,QO=Hp,JO=XO,tC=YO,eC=1,rC=2,nC="[object Boolean]",iC="[object Date]",sC="[object Error]",oC="[object Map]",aC="[object Number]",lC="[object RegExp]",uC="[object Set]",fC="[object String]",cC="[object Symbol]",hC="[object ArrayBuffer]",dC="[object DataView]",Xp=Vp?Vp.prototype:void 0,Du=Xp?Xp.valueOf:void 0;function pC(e,t,r,n,i,o,l){switch(r){case dC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case hC:return!(e.byteLength!=t.byteLength||!o(new Wp(e),new Wp(t)));case nC:case iC:case aC:return ZO(+e,+t);case sC:return e.name==t.name&&e.message==t.message;case lC:case fC:return e==t+"";case oC:var u=JO;case uC:var f=n&eC;if(u||(u=tC),e.size!=t.size&&!f)return!1;var h=l.get(e);if(h)return h==t;n|=rC,l.set(e,t);var p=QO(u(e),u(t),n,i,o,l);return l.delete(e),p;case cC:if(Du)return Du.call(e)==Du.call(t)}return!1}var vC=pC;function gC(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var mC=gC,yC=mC,_C=kr;function bC(e,t,r){var n=t(e);return _C(e)?n:yC(n,r(e))}var xC=bC;function wC(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var l=e[r];t(l,r,e)&&(o[i++]=l)}return o}var TC=wC;function EC(){return[]}var SC=EC,AC=TC,OC=SC,CC=Object.prototype,RC=CC.propertyIsEnumerable,Kp=Object.getOwnPropertySymbols,IC=Kp?function(e){return e==null?[]:(e=Object(e),AC(Kp(e),function(t){return RC.call(e,t)}))}:OC,PC=IC;function NC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var MC=NC,kC=9007199254740991,LC=/^(?:0|[1-9]\d*)$/;function FC(e,t){var r=typeof e;return t=t??kC,!!t&&(r=="number"||r!="symbol"&&LC.test(e))&&e>-1&&e%1==0&&e<t}var Yp=FC,BC=MC,DC=Qa,UC=kr,$C=tl,GC=Yp,jC=el,qC=Object.prototype,zC=qC.hasOwnProperty;function HC(e,t){var r=UC(e),n=!r&&DC(e),i=!r&&!n&&$C(e),o=!r&&!n&&!i&&jC(e),l=r||n||i||o,u=l?BC(e.length,String):[],f=u.length;for(var h in e)(t||zC.call(e,h))&&!(l&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||GC(h,f)))&&u.push(h);return u}var VC=HC,WC=VC,XC=pc,KC=qs;function YC(e){return KC(e)?WC(e):XC(e)}var Uu=YC,ZC=xC,QC=PC,JC=Uu;function tR(e){return ZC(e,JC,QC)}var eR=tR,Zp=eR,rR=1,nR=Object.prototype,iR=nR.hasOwnProperty;function sR(e,t,r,n,i,o){var l=r&rR,u=Zp(e),f=u.length,h=Zp(t),p=h.length;if(f!=p&&!l)return!1;for(var d=f;d--;){var c=u[d];if(!(l?c in t:iR.call(t,c)))return!1}var v=o.get(e),m=o.get(t);if(v&&m)return v==t&&m==e;var y=!0;o.set(e,t),o.set(t,e);for(var _=l;++d<f;){c=u[d];var b=e[c],w=t[c];if(n)var T=l?n(w,b,c,t,e,o):n(b,w,c,e,t,o);if(!(T===void 0?b===w||i(b,w,r,n,o):T)){y=!1;break}_||(_=c=="constructor")}if(y&&!_){var x=e.constructor,S=t.constructor;x!=S&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(y=!1)}return o.delete(e),o.delete(t),y}var oR=sR,$u=zp,aR=Hp,lR=vC,uR=oR,Qp=Rc,Jp=kr,tv=tl,fR=el,cR=1,ev="[object Arguments]",rv="[object Array]",Yo="[object Object]",hR=Object.prototype,nv=hR.hasOwnProperty;function dR(e,t,r,n,i,o){var l=Jp(e),u=Jp(t),f=l?rv:Qp(e),h=u?rv:Qp(t);f=f==ev?Yo:f,h=h==ev?Yo:h;var p=f==Yo,d=h==Yo,c=f==h;if(c&&tv(e)){if(!tv(t))return!1;l=!0,p=!1}if(c&&!p)return o||(o=new $u),l||fR(e)?aR(e,t,r,n,i,o):lR(e,t,f,r,n,i,o);if(!(r&cR)){var v=p&&nv.call(e,"__wrapped__"),m=d&&nv.call(t,"__wrapped__");if(v||m){var y=v?e.value():e,_=m?t.value():t;return o||(o=new $u),i(y,_,r,n,o)}}return c?(o||(o=new $u),uR(e,t,r,n,i,o)):!1}var pR=dR,vR=pR,iv=Qi;function sv(e,t,r,n,i){return e===t?!0:e==null||t==null||!iv(e)&&!iv(t)?e!==e&&t!==t:vR(e,t,r,n,sv,i)}var ov=sv,gR=zp,mR=ov,yR=1,_R=2;function bR(e,t,r,n){var i=r.length,o=i,l=!n;if(e==null)return!o;for(e=Object(e);i--;){var u=r[i];if(l&&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],p=u[1];if(l&&u[2]){if(h===void 0&&!(f in e))return!1}else{var d=new gR;if(n)var c=n(h,p,f,e,t,d);if(!(c===void 0?mR(p,h,yR|_R,n,d):c))return!1}}return!0}var xR=bR,wR=Zi;function TR(e){return e===e&&!wR(e)}var av=TR,ER=av,SR=Uu;function AR(e){for(var t=SR(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ER(i)]}return t}var OR=AR;function CR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var lv=CR,RR=xR,IR=OR,PR=lv;function NR(e){var t=IR(e);return t.length==1&&t[0][2]?PR(t[0][0],t[0][1]):function(r){return r===e||RR(r,e,t)}}var MR=NR,kR=kr,LR=zo,FR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,BR=/^\w*$/;function DR(e,t){if(kR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||LR(e)?!0:BR.test(e)||!FR.test(e)||t!=null&&e in Object(t)}var Gu=DR,uv=Bu,UR="Expected a function";function ju(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(UR);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 l=e.apply(this,n);return r.cache=o.set(i,l)||o,l};return r.cache=new(ju.Cache||uv),r}ju.Cache=uv;var $R=ju,GR=$R,jR=500;function qR(e){var t=GR(e,function(n){return r.size===jR&&r.clear(),n}),r=t.cache;return t}var zR=qR,HR=zR,VR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,WR=/\\(\\)?/g,XR=HR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(VR,function(r,n,i,o){t.push(i?o.replace(WR,"$1"):n||r)}),t}),KR=XR,fv=js,YR=$p,ZR=kr,QR=zo,JR=1/0,cv=fv?fv.prototype:void 0,hv=cv?cv.toString:void 0;function dv(e){if(typeof e=="string")return e;if(ZR(e))return YR(e,dv)+"";if(QR(e))return hv?hv.call(e):"";var t=e+"";return t=="0"&&1/e==-JR?"-0":t}var tI=dv,eI=tI;function rI(e){return e==null?"":eI(e)}var nI=rI,iI=kr,sI=Gu,oI=KR,aI=nI;function lI(e,t){return iI(e)?e:sI(e,t)?[e]:oI(aI(e))}var pv=lI,uI=zo,fI=1/0;function cI(e){if(typeof e=="string"||uI(e))return e;var t=e+"";return t=="0"&&1/e==-fI?"-0":t}var Zo=cI,hI=pv,dI=Zo;function pI(e,t){t=hI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[dI(t[r++])];return r&&r==n?e:void 0}var vv=pI,vI=vv;function gI(e,t,r){var n=e==null?void 0:vI(e,t);return n===void 0?r:n}var mI=gI;function yI(e,t){return e!=null&&t in Object(e)}var _I=yI,bI=pv,xI=Qa,wI=kr,TI=Yp,EI=Ja,SI=Zo;function AI(e,t,r){t=bI(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var l=SI(t[n]);if(!(o=e!=null&&r(e,l)))break;e=e[l]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&EI(i)&&TI(l,i)&&(wI(e)||xI(e)))}var OI=AI,CI=_I,RI=OI;function II(e,t){return e!=null&&RI(e,t,CI)}var PI=II,NI=ov,MI=mI,kI=PI,LI=Gu,FI=av,BI=lv,DI=Zo,UI=1,$I=2;function GI(e,t){return LI(e)&&FI(t)?BI(DI(e),t):function(r){var n=MI(r,e);return n===void 0&&n===t?kI(r,e):NI(t,n,UI|$I)}}var jI=GI;function qI(e){return e}var zI=qI;function HI(e){return function(t){return t==null?void 0:t[e]}}var VI=HI,WI=vv;function XI(e){return function(t){return WI(t,e)}}var KI=XI,YI=VI,ZI=KI,QI=Gu,JI=Zo;function tP(e){return QI(e)?YI(JI(e)):ZI(e)}var eP=tP,rP=MR,nP=jI,iP=zI,sP=kr,oP=eP;function aP(e){return typeof e=="function"?e:e==null?iP:typeof e=="object"?sP(e)?nP(e[0],e[1]):rP(e):oP(e)}var lP=aP;function uP(e){return function(t,r,n){for(var i=-1,o=Object(t),l=n(t),u=l.length;u--;){var f=l[e?u:++i];if(r(o[f],f,o)===!1)break}return t}}var fP=uP,cP=fP,hP=cP(),dP=hP,pP=dP,vP=Uu;function gP(e,t){return e&&pP(e,t,vP)}var mP=gP,yP=qs;function _P(e,t){return function(r,n){if(r==null)return r;if(!yP(r))return e(r,n);for(var i=r.length,o=t?i:-1,l=Object(r);(t?o--:++o<i)&&n(l[o],o,l)!==!1;);return r}}var bP=_P,xP=mP,wP=bP,TP=wP(xP),EP=TP,SP=EP,AP=qs;function OP(e,t){var r=-1,n=AP(e)?Array(e.length):[];return SP(e,function(i,o,l){n[++r]=t(i,o,l)}),n}var CP=OP,RP=$p,IP=lP,PP=CP,NP=kr;function MP(e,t){var r=NP(e)?RP:PP;return r(e,IP(t))}var kP=MP;const LP=En(kP);var qn={},gv={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.loop=Yr.conditional=Yr.parse=void 0;var FP=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(l){return e(t,l,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=FP;var BP=function(t,r){return function(n,i,o,l){r(n,i,o)&&l(n,t,i,o)}};Yr.conditional=BP;var DP=function(t,r){return function(n,i,o,l){for(var u=[],f=n.pos;r(n,i,o);){var h={};if(l(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Yr.loop=DP;var _e={};Object.defineProperty(_e,"__esModule",{value:!0}),_e.readBits=_e.readArray=_e.readUnsigned=_e.readString=_e.peekBytes=_e.readBytes=_e.peekByte=_e.readByte=_e.buildStream=void 0;var UP=function(t){return{data:t,pos:0}};_e.buildStream=UP;var mv=function(){return function(t){return t.data[t.pos++]}};_e.readByte=mv;var $P=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};_e.peekByte=$P;var Qo=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};_e.readBytes=Qo;var GP=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};_e.peekBytes=GP;var jP=function(t){return function(r){return Array.from(Qo(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};_e.readString=jP;var qP=function(t){return function(r){var n=Qo(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};_e.readUnsigned=qP;var zP=function(t,r){return function(n,i,o){for(var l=typeof r=="function"?r(n,i,o):r,u=Qo(t),f=new Array(l),h=0;h<l;h++)f[h]=u(n);return f}};_e.readArray=zP;var HP=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},VP=function(t){return function(r){for(var n=mv()(r),i=new Array(8),o=0;o<8;o++)i[7-o]=!!(n&1<<o);return Object.keys(t).reduce(function(l,u){var f=t[u];return f.length?l[u]=HP(i,f.index,f.length):l[u]=i[f.index],l},{})}};_e.readBits=VP,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Yr,r=_e,n={blocks:function(c){for(var v=0,m=[],y=c.data.length,_=0,b=(0,r.readByte)()(c);b!==v&&b;b=(0,r.readByte)()(c)){if(c.pos+b>=y){var w=y-c.pos;m.push((0,r.readBytes)(w)(c)),_+=w;break}m.push((0,r.readBytes)(b)(c)),_+=b}for(var T=new Uint8Array(_),x=0,S=0;S<m.length;S++)T.set(m[S],x),x+=m[S].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(d){var c=(0,r.peekBytes)(2)(d);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(d,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(d,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(d){return(0,r.peekByte)()(d)===44}),l=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,m){return(0,r.readBytes)(m.text.blockSize)(c)}},n]},function(d){var c=(0,r.peekBytes)(2)(d);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,m){return(0,r.readString)(m.blockSize)(c)}},n]},function(d){var c=(0,r.peekBytes)(2)(d);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(d){var c=(0,r.peekBytes)(2)(d);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(d,c){return Math.pow(2,c.lsd.gct.size+1)})},function(d,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,o,l],function(d){var c=(0,r.peekByte)()(d);return c===33||c===44})}],p=h;e.default=p}(gv);var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.deinterlace=void 0;var WP=function(t,r){for(var n=new Array(t.length),i=t.length/r,o=function(c,v){var m=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(m))},l=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var p=l[h];p<i;p+=u[h])o(p,f),f++;return n};Jo.deinterlace=WP;var ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.lzw=void 0;var XP=function(t,r,n){var i=4096,o=-1,l=n,u,f,h,p,d,c,v,I,m,y,S,_,A,O,R,L,b=new Array(n),w=new Array(i),T=new Array(i),x=new Array(i+1);for(_=t,f=1<<_,d=f+1,u=f+2,v=o,p=_+1,h=(1<<p)-1,m=0;m<f;m++)w[m]=0,T[m]=m;var S,I,A,O,L,R;for(S=I=A=O=L=R=0,y=0;y<l;){if(O===0){if(I<p){S+=r[R]<<I,I+=8,R++;continue}if(m=S&h,S>>=p,I-=p,m>u||m==d)break;if(m==f){p=_+1,h=(1<<p)-1,u=f+2,v=o;continue}if(v==o){x[O++]=T[m],v=m,A=m;continue}for(c=m,m==u&&(x[O++]=A,m=v);m>f;)x[O++]=T[m],m=w[m];A=T[m]&255,x[O++]=A,u<i&&(w[u]=v,T[u]=A,u++,!(u&h)&&u<i&&(p++,h+=u)),v=c}O--,b[L++]=x[O],y++}for(y=L;y<l;y++)b[y]=0;return b};ta.lzw=XP,Object.defineProperty(qn,"__esModule",{value:!0}),qn.decompressFrames=qn.decompressFrame=qn.parseGIF=void 0;var KP=tN(gv),YP=Yr,ZP=_e,QP=Jo,JP=ta;function tN(e){return e&&e.__esModule?e:{default:e}}var eN=function(t){var r=new Uint8Array(t);return(0,YP.parse)((0,ZP.buildStream)(r),KP.default)};qn.parseGIF=eN;var rN=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var o=i*4,l=t.pixels[i],u=t.colorTable[l]||[0,0,0];n[o]=u[0],n[o+1]=u[1],n[o+2]=u[2],n[o+3]=l!==t.transparentIndex?255:0}return n},yv=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,l=(0,JP.lzw)(i.data.minCodeSize,i.data.blocks,o);i.descriptor.lct.interlaced&&(l=(0,QP.deinterlace)(l,i.descriptor.width));var u={pixels:l,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=rN(u)),u};qn.decompressFrame=yv;var nN=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return yv(n,t.gct,r)})};qn.decompressFrames=nN;const _v=(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},iN=e=>_v({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),sN=e=>_t.useReducer(_v,e,iN);var oN='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 aN(e){const t=new Blob([oN],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const lN=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),uN=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),_t.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)},fN=e=>{const t=_t.useRef(e);return _t.useEffect(()=>{t.current=e},[e]),t},cN=e=>{const t=fN(e);return _t.useCallback(r=>t.current&&t.current(r),[])},hN=uN(()=>new aN,e=>e.terminate()),dN=(e,t)=>{const r=cN(t),n=hN();_t.useEffect(()=>{if(typeof e=="string"){const i=o=>{const l=o.data||o;if(l.src===e){const u=l.error?l:lN(l);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])},pN=({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]),Yt.jsx(me.AnimatedSprite,{ref:n,...r,isPlaying:e})},bv=Et.memo(pN);var ea={exports:{}};/**
1924
1935
  * @license
1925
1936
  * Lodash <https://lodash.com/>
1926
1937
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1927
1938
  * Released under MIT license <https://lodash.com/license>
1928
1939
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1929
1940
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1930
- */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.",l="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",d=1,c=2,v=4,m=1,y=2,b=1,_=2,w=4,T=8,x=16,S=32,I=64,A=128,O=256,L=512,R=30,C="...",P=800,M=16,F=1,q=2,Z=3,z=1/0,nt=9007199254740991,W=17976931348623157e292,D=0/0,k=4294967295,j=k-1,G=k>>>1,Y=[["ary",A],["bind",b],["bindKey",_],["curry",T],["curryRight",x],["flip",L],["partial",S],["partialRight",I],["rearg",O]],X="[object Arguments]",$="[object Array]",V="[object AsyncFunction]",tt="[object Boolean]",et="[object Date]",it="[object DOMException]",st="[object Error]",dt="[object Function]",gt="[object GeneratorFunction]",yt="[object Map]",Tt="[object Number]",te="[object Null]",Lt="[object Object]",rt="[object Promise]",lt="[object Proxy]",pt="[object RegExp]",vt="[object Set]",ct="[object String]",Pt="[object Symbol]",Ft="[object Undefined]",Nt="[object WeakMap]",He="[object WeakSet]",Ge="[object ArrayBuffer]",Zt="[object DataView]",Ss="[object Float32Array]",ce="[object Float64Array]",lr="[object Int8Array]",ju="[object Int16Array]",qu="[object Int32Array]",zu="[object Uint8Array]",Hu="[object Uint8ClampedArray]",Vu="[object Uint16Array]",Wu="[object Uint32Array]",yN=/\b__p \+= '';/g,_N=/\b(__p \+=) '' \+/g,bN=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Tv=/&(?:amp|lt|gt|quot|#39);/g,Ev=/[&<>"']/g,xN=RegExp(Tv.source),wN=RegExp(Ev.source),TN=/<%-([\s\S]+?)%>/g,EN=/<%([\s\S]+?)%>/g,Sv=/<%=([\s\S]+?)%>/g,SN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,AN=/^\w*$/,ON=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xu=/[\\^$.*+?()[\]{}|]/g,CN=RegExp(Xu.source),Ku=/^\s+/,RN=/\s/,IN=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,PN=/\{\n\/\* \[wrapped with (.+)\] \*/,NN=/,? & /,MN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kN=/[()=,{}\[\]\/\s]/,LN=/\\(\\)?/g,FN=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Av=/\w*$/,BN=/^[-+]0x[0-9a-f]+$/i,DN=/^0b[01]+$/i,UN=/^\[object .+?Constructor\]$/,$N=/^0o[0-7]+$/i,GN=/^(?:0|[1-9]\d*)$/,jN=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ra=/($^)/,qN=/['\n\r\u2028\u2029\\]/g,na="\\ud800-\\udfff",zN="\\u0300-\\u036f",HN="\\ufe20-\\ufe2f",VN="\\u20d0-\\u20ff",Ov=zN+HN+VN,Cv="\\u2700-\\u27bf",Rv="a-z\\xdf-\\xf6\\xf8-\\xff",WN="\\xac\\xb1\\xd7\\xf7",XN="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",KN="\\u2000-\\u206f",YN=" \\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",Iv="A-Z\\xc0-\\xd6\\xd8-\\xde",Pv="\\ufe0e\\ufe0f",Nv=WN+XN+KN+YN,Yu="['’]",ZN="["+na+"]",Mv="["+Nv+"]",ia="["+Ov+"]",kv="\\d+",QN="["+Cv+"]",Lv="["+Rv+"]",Fv="[^"+na+Nv+kv+Cv+Rv+Iv+"]",Zu="\\ud83c[\\udffb-\\udfff]",JN="(?:"+ia+"|"+Zu+")",Bv="[^"+na+"]",Qu="(?:\\ud83c[\\udde6-\\uddff]){2}",Ju="[\\ud800-\\udbff][\\udc00-\\udfff]",ki="["+Iv+"]",Dv="\\u200d",Uv="(?:"+Lv+"|"+Fv+")",tM="(?:"+ki+"|"+Fv+")",$v="(?:"+Yu+"(?:d|ll|m|re|s|t|ve))?",Gv="(?:"+Yu+"(?:D|LL|M|RE|S|T|VE))?",jv=JN+"?",qv="["+Pv+"]?",eM="(?:"+Dv+"(?:"+[Bv,Qu,Ju].join("|")+")"+qv+jv+")*",rM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",nM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zv=qv+jv+eM,iM="(?:"+[QN,Qu,Ju].join("|")+")"+zv,sM="(?:"+[Bv+ia+"?",ia,Qu,Ju,ZN].join("|")+")",oM=RegExp(Yu,"g"),aM=RegExp(ia,"g"),tf=RegExp(Zu+"(?="+Zu+")|"+sM+zv,"g"),lM=RegExp([ki+"?"+Lv+"+"+$v+"(?="+[Mv,ki,"$"].join("|")+")",tM+"+"+Gv+"(?="+[Mv,ki+Uv,"$"].join("|")+")",ki+"?"+Uv+"+"+$v,ki+"+"+Gv,nM,rM,kv,iM].join("|"),"g"),uM=RegExp("["+Dv+na+Ov+Pv+"]"),fM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cM=["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"],hM=-1,ue={};ue[Ss]=ue[ce]=ue[lr]=ue[ju]=ue[qu]=ue[zu]=ue[Hu]=ue[Vu]=ue[Wu]=!0,ue[X]=ue[$]=ue[Ge]=ue[tt]=ue[Zt]=ue[et]=ue[st]=ue[dt]=ue[yt]=ue[Tt]=ue[Lt]=ue[pt]=ue[vt]=ue[ct]=ue[Nt]=!1;var ae={};ae[X]=ae[$]=ae[Ge]=ae[Zt]=ae[tt]=ae[et]=ae[Ss]=ae[ce]=ae[lr]=ae[ju]=ae[qu]=ae[yt]=ae[Tt]=ae[Lt]=ae[pt]=ae[vt]=ae[ct]=ae[Pt]=ae[zu]=ae[Hu]=ae[Vu]=ae[Wu]=!0,ae[st]=ae[dt]=ae[Nt]=!1;var dM={À:"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"},pM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vM={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},gM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},mM=parseFloat,yM=parseInt,Hv=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,_M=typeof self=="object"&&self&&self.Object===Object&&self,Ne=Hv||_M||Function("return this")(),ef=t&&!t.nodeType&&t,qn=ef&&!0&&e&&!e.nodeType&&e,Vv=qn&&qn.exports===ef,rf=Vv&&Hv.process,ur=function(){try{var Q=qn&&qn.require&&qn.require("util").types;return Q||rf&&rf.binding&&rf.binding("util")}catch{}}(),Wv=ur&&ur.isArrayBuffer,Xv=ur&&ur.isDate,Kv=ur&&ur.isMap,Yv=ur&&ur.isRegExp,Zv=ur&&ur.isSet,Qv=ur&&ur.isTypedArray;function tr(Q,at,ot){switch(ot.length){case 0:return Q.call(at);case 1:return Q.call(at,ot[0]);case 2:return Q.call(at,ot[0],ot[1]);case 3:return Q.call(at,ot[0],ot[1],ot[2])}return Q.apply(at,ot)}function bM(Q,at,ot,xt){for(var It=-1,Kt=Q==null?0:Q.length;++It<Kt;){var Se=Q[It];at(xt,Se,ot(Se),Q)}return xt}function fr(Q,at){for(var ot=-1,xt=Q==null?0:Q.length;++ot<xt&&at(Q[ot],ot,Q)!==!1;);return Q}function xM(Q,at){for(var ot=Q==null?0:Q.length;ot--&&at(Q[ot],ot,Q)!==!1;);return Q}function Jv(Q,at){for(var ot=-1,xt=Q==null?0:Q.length;++ot<xt;)if(!at(Q[ot],ot,Q))return!1;return!0}function vn(Q,at){for(var ot=-1,xt=Q==null?0:Q.length,It=0,Kt=[];++ot<xt;){var Se=Q[ot];at(Se,ot,Q)&&(Kt[It++]=Se)}return Kt}function sa(Q,at){var ot=Q==null?0:Q.length;return!!ot&&Li(Q,at,0)>-1}function nf(Q,at,ot){for(var xt=-1,It=Q==null?0:Q.length;++xt<It;)if(ot(at,Q[xt]))return!0;return!1}function he(Q,at){for(var ot=-1,xt=Q==null?0:Q.length,It=Array(xt);++ot<xt;)It[ot]=at(Q[ot],ot,Q);return It}function gn(Q,at){for(var ot=-1,xt=at.length,It=Q.length;++ot<xt;)Q[It+ot]=at[ot];return Q}function sf(Q,at,ot,xt){var It=-1,Kt=Q==null?0:Q.length;for(xt&&Kt&&(ot=Q[++It]);++It<Kt;)ot=at(ot,Q[It],It,Q);return ot}function wM(Q,at,ot,xt){var It=Q==null?0:Q.length;for(xt&&It&&(ot=Q[--It]);It--;)ot=at(ot,Q[It],It,Q);return ot}function of(Q,at){for(var ot=-1,xt=Q==null?0:Q.length;++ot<xt;)if(at(Q[ot],ot,Q))return!0;return!1}var TM=af("length");function EM(Q){return Q.split("")}function SM(Q){return Q.match(MN)||[]}function tg(Q,at,ot){var xt;return ot(Q,function(It,Kt,Se){if(at(It,Kt,Se))return xt=Kt,!1}),xt}function oa(Q,at,ot,xt){for(var It=Q.length,Kt=ot+(xt?1:-1);xt?Kt--:++Kt<It;)if(at(Q[Kt],Kt,Q))return Kt;return-1}function Li(Q,at,ot){return at===at?BM(Q,at,ot):oa(Q,eg,ot)}function AM(Q,at,ot,xt){for(var It=ot-1,Kt=Q.length;++It<Kt;)if(xt(Q[It],at))return It;return-1}function eg(Q){return Q!==Q}function rg(Q,at){var ot=Q==null?0:Q.length;return ot?uf(Q,at)/ot:D}function af(Q){return function(at){return at==null?r:at[Q]}}function lf(Q){return function(at){return Q==null?r:Q[at]}}function ng(Q,at,ot,xt,It){return It(Q,function(Kt,Se,ie){ot=xt?(xt=!1,Kt):at(ot,Kt,Se,ie)}),ot}function OM(Q,at){var ot=Q.length;for(Q.sort(at);ot--;)Q[ot]=Q[ot].value;return Q}function uf(Q,at){for(var ot,xt=-1,It=Q.length;++xt<It;){var Kt=at(Q[xt]);Kt!==r&&(ot=ot===r?Kt:ot+Kt)}return ot}function ff(Q,at){for(var ot=-1,xt=Array(Q);++ot<Q;)xt[ot]=at(ot);return xt}function CM(Q,at){return he(at,function(ot){return[ot,Q[ot]]})}function ig(Q){return Q&&Q.slice(0,lg(Q)+1).replace(Ku,"")}function er(Q){return function(at){return Q(at)}}function cf(Q,at){return he(at,function(ot){return Q[ot]})}function As(Q,at){return Q.has(at)}function sg(Q,at){for(var ot=-1,xt=Q.length;++ot<xt&&Li(at,Q[ot],0)>-1;);return ot}function og(Q,at){for(var ot=Q.length;ot--&&Li(at,Q[ot],0)>-1;);return ot}function RM(Q,at){for(var ot=Q.length,xt=0;ot--;)Q[ot]===at&&++xt;return xt}var IM=lf(dM),PM=lf(pM);function NM(Q){return"\\"+gM[Q]}function MM(Q,at){return Q==null?r:Q[at]}function Fi(Q){return uM.test(Q)}function kM(Q){return fM.test(Q)}function LM(Q){for(var at,ot=[];!(at=Q.next()).done;)ot.push(at.value);return ot}function hf(Q){var at=-1,ot=Array(Q.size);return Q.forEach(function(xt,It){ot[++at]=[It,xt]}),ot}function ag(Q,at){return function(ot){return Q(at(ot))}}function mn(Q,at){for(var ot=-1,xt=Q.length,It=0,Kt=[];++ot<xt;){var Se=Q[ot];(Se===at||Se===p)&&(Q[ot]=p,Kt[It++]=ot)}return Kt}function aa(Q){var at=-1,ot=Array(Q.size);return Q.forEach(function(xt){ot[++at]=xt}),ot}function FM(Q){var at=-1,ot=Array(Q.size);return Q.forEach(function(xt){ot[++at]=[xt,xt]}),ot}function BM(Q,at,ot){for(var xt=ot-1,It=Q.length;++xt<It;)if(Q[xt]===at)return xt;return-1}function DM(Q,at,ot){for(var xt=ot+1;xt--;)if(Q[xt]===at)return xt;return xt}function Bi(Q){return Fi(Q)?$M(Q):TM(Q)}function Rr(Q){return Fi(Q)?GM(Q):EM(Q)}function lg(Q){for(var at=Q.length;at--&&RN.test(Q.charAt(at)););return at}var UM=lf(vM);function $M(Q){for(var at=tf.lastIndex=0;tf.test(Q);)++at;return at}function GM(Q){return Q.match(tf)||[]}function jM(Q){return Q.match(lM)||[]}var qM=function Q(at){at=at==null?Ne:Di.defaults(Ne.Object(),at,Di.pick(Ne,cM));var ot=at.Array,xt=at.Date,It=at.Error,Kt=at.Function,Se=at.Math,ie=at.Object,df=at.RegExp,zM=at.String,cr=at.TypeError,la=ot.prototype,HM=Kt.prototype,Ui=ie.prototype,ua=at["__core-js_shared__"],fa=HM.toString,ee=Ui.hasOwnProperty,VM=0,ug=function(){var s=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ca=Ui.toString,WM=fa.call(ie),XM=Ne._,KM=df("^"+fa.call(ee).replace(Xu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ha=Vv?at.Buffer:r,yn=at.Symbol,da=at.Uint8Array,fg=ha?ha.allocUnsafe:r,pa=ag(ie.getPrototypeOf,ie),cg=ie.create,hg=Ui.propertyIsEnumerable,va=la.splice,dg=yn?yn.isConcatSpreadable:r,Os=yn?yn.iterator:r,zn=yn?yn.toStringTag:r,ga=function(){try{var s=Kn(ie,"defineProperty");return s({},"",{}),s}catch{}}(),YM=at.clearTimeout!==Ne.clearTimeout&&at.clearTimeout,ZM=xt&&xt.now!==Ne.Date.now&&xt.now,QM=at.setTimeout!==Ne.setTimeout&&at.setTimeout,ma=Se.ceil,ya=Se.floor,pf=ie.getOwnPropertySymbols,JM=ha?ha.isBuffer:r,pg=at.isFinite,t3=la.join,e3=ag(ie.keys,ie),Ae=Se.max,De=Se.min,r3=xt.now,n3=at.parseInt,vg=Se.random,i3=la.reverse,vf=Kn(at,"DataView"),Cs=Kn(at,"Map"),gf=Kn(at,"Promise"),$i=Kn(at,"Set"),Rs=Kn(at,"WeakMap"),Is=Kn(ie,"create"),_a=Rs&&new Rs,Gi={},s3=Yn(vf),o3=Yn(Cs),a3=Yn(gf),l3=Yn($i),u3=Yn(Rs),ba=yn?yn.prototype:r,Ps=ba?ba.valueOf:r,gg=ba?ba.toString:r;function B(s){if(me(s)&&!Mt(s)&&!(s instanceof jt)){if(s instanceof hr)return s;if(ee.call(s,"__wrapped__"))return mm(s)}return new hr(s)}var ji=function(){function s(){}return function(a){if(!ge(a))return{};if(cg)return cg(a);s.prototype=a;var g=new s;return s.prototype=r,g}}();function xa(){}function hr(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=r}B.templateSettings={escape:TN,evaluate:EN,interpolate:Sv,variable:"",imports:{_:B}},B.prototype=xa.prototype,B.prototype.constructor=B,hr.prototype=ji(xa.prototype),hr.prototype.constructor=hr;function jt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=k,this.__views__=[]}function f3(){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 c3(){if(this.__filtered__){var s=new jt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function h3(){var s=this.__wrapped__.value(),a=this.__dir__,g=Mt(s),E=a<0,N=g?s.length:0,U=Ek(0,N,this.__views__),H=U.start,K=U.end,J=K-H,ut=E?K:H-1,ft=this.__iteratees__,ht=ft.length,mt=0,wt=De(J,this.__takeCount__);if(!g||!E&&N==J&&wt==J)return $g(s,this.__actions__);var Ot=[];t:for(;J--&&mt<wt;){ut+=a;for(var Bt=-1,Ct=s[ut];++Bt<ht;){var $t=ft[Bt],zt=$t.iteratee,ir=$t.type,ze=zt(Ct);if(ir==q)Ct=ze;else if(!ze){if(ir==F)continue t;break t}}Ot[mt++]=Ct}return Ot}jt.prototype=ji(xa.prototype),jt.prototype.constructor=jt;function Hn(s){var a=-1,g=s==null?0:s.length;for(this.clear();++a<g;){var E=s[a];this.set(E[0],E[1])}}function d3(){this.__data__=Is?Is(null):{},this.size=0}function p3(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function v3(s){var a=this.__data__;if(Is){var g=a[s];return g===f?r:g}return ee.call(a,s)?a[s]:r}function g3(s){var a=this.__data__;return Is?a[s]!==r:ee.call(a,s)}function m3(s,a){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Is&&a===r?f:a,this}Hn.prototype.clear=d3,Hn.prototype.delete=p3,Hn.prototype.get=v3,Hn.prototype.has=g3,Hn.prototype.set=m3;function Yr(s){var a=-1,g=s==null?0:s.length;for(this.clear();++a<g;){var E=s[a];this.set(E[0],E[1])}}function y3(){this.__data__=[],this.size=0}function _3(s){var a=this.__data__,g=wa(a,s);if(g<0)return!1;var E=a.length-1;return g==E?a.pop():va.call(a,g,1),--this.size,!0}function b3(s){var a=this.__data__,g=wa(a,s);return g<0?r:a[g][1]}function x3(s){return wa(this.__data__,s)>-1}function w3(s,a){var g=this.__data__,E=wa(g,s);return E<0?(++this.size,g.push([s,a])):g[E][1]=a,this}Yr.prototype.clear=y3,Yr.prototype.delete=_3,Yr.prototype.get=b3,Yr.prototype.has=x3,Yr.prototype.set=w3;function Zr(s){var a=-1,g=s==null?0:s.length;for(this.clear();++a<g;){var E=s[a];this.set(E[0],E[1])}}function T3(){this.size=0,this.__data__={hash:new Hn,map:new(Cs||Yr),string:new Hn}}function E3(s){var a=ka(this,s).delete(s);return this.size-=a?1:0,a}function S3(s){return ka(this,s).get(s)}function A3(s){return ka(this,s).has(s)}function O3(s,a){var g=ka(this,s),E=g.size;return g.set(s,a),this.size+=g.size==E?0:1,this}Zr.prototype.clear=T3,Zr.prototype.delete=E3,Zr.prototype.get=S3,Zr.prototype.has=A3,Zr.prototype.set=O3;function Vn(s){var a=-1,g=s==null?0:s.length;for(this.__data__=new Zr;++a<g;)this.add(s[a])}function C3(s){return this.__data__.set(s,f),this}function R3(s){return this.__data__.has(s)}Vn.prototype.add=Vn.prototype.push=C3,Vn.prototype.has=R3;function Ir(s){var a=this.__data__=new Yr(s);this.size=a.size}function I3(){this.__data__=new Yr,this.size=0}function P3(s){var a=this.__data__,g=a.delete(s);return this.size=a.size,g}function N3(s){return this.__data__.get(s)}function M3(s){return this.__data__.has(s)}function k3(s,a){var g=this.__data__;if(g instanceof Yr){var E=g.__data__;if(!Cs||E.length<i-1)return E.push([s,a]),this.size=++g.size,this;g=this.__data__=new Zr(E)}return g.set(s,a),this.size=g.size,this}Ir.prototype.clear=I3,Ir.prototype.delete=P3,Ir.prototype.get=N3,Ir.prototype.has=M3,Ir.prototype.set=k3;function mg(s,a){var g=Mt(s),E=!g&&Zn(s),N=!g&&!E&&Tn(s),U=!g&&!E&&!N&&Vi(s),H=g||E||N||U,K=H?ff(s.length,zM):[],J=K.length;for(var ut in s)(a||ee.call(s,ut))&&!(H&&(ut=="length"||N&&(ut=="offset"||ut=="parent")||U&&(ut=="buffer"||ut=="byteLength"||ut=="byteOffset")||en(ut,J)))&&K.push(ut);return K}function yg(s){var a=s.length;return a?s[Of(0,a-1)]:r}function L3(s,a){return La(Ve(s),Wn(a,0,s.length))}function F3(s){return La(Ve(s))}function mf(s,a,g){(g!==r&&!Pr(s[a],g)||g===r&&!(a in s))&&Qr(s,a,g)}function Ns(s,a,g){var E=s[a];(!(ee.call(s,a)&&Pr(E,g))||g===r&&!(a in s))&&Qr(s,a,g)}function wa(s,a){for(var g=s.length;g--;)if(Pr(s[g][0],a))return g;return-1}function B3(s,a,g,E){return _n(s,function(N,U,H){a(E,N,g(N),H)}),E}function _g(s,a){return s&&jr(a,Ie(a),s)}function D3(s,a){return s&&jr(a,Xe(a),s)}function Qr(s,a,g){a=="__proto__"&&ga?ga(s,a,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[a]=g}function yf(s,a){for(var g=-1,E=a.length,N=ot(E),U=s==null;++g<E;)N[g]=U?r:Qf(s,a[g]);return N}function Wn(s,a,g){return s===s&&(g!==r&&(s=s<=g?s:g),a!==r&&(s=s>=a?s:a)),s}function dr(s,a,g,E,N,U){var H,K=a&d,J=a&c,ut=a&v;if(g&&(H=N?g(s,E,N,U):g(s)),H!==r)return H;if(!ge(s))return s;var ft=Mt(s);if(ft){if(H=Ak(s),!K)return Ve(s,H)}else{var ht=Ue(s),mt=ht==dt||ht==gt;if(Tn(s))return qg(s,K);if(ht==Lt||ht==X||mt&&!N){if(H=J||mt?{}:lm(s),!K)return J?vk(s,D3(H,s)):pk(s,_g(H,s))}else{if(!ae[ht])return N?s:{};H=Ok(s,ht,K)}}U||(U=new Ir);var wt=U.get(s);if(wt)return wt;U.set(s,H),Bm(s)?s.forEach(function(Ct){H.add(dr(Ct,a,g,Ct,s,U))}):Lm(s)&&s.forEach(function(Ct,$t){H.set($t,dr(Ct,a,g,$t,s,U))});var Ot=ut?J?Df:Bf:J?Xe:Ie,Bt=ft?r:Ot(s);return fr(Bt||s,function(Ct,$t){Bt&&($t=Ct,Ct=s[$t]),Ns(H,$t,dr(Ct,a,g,$t,s,U))}),H}function U3(s){var a=Ie(s);return function(g){return bg(g,s,a)}}function bg(s,a,g){var E=g.length;if(s==null)return!E;for(s=ie(s);E--;){var N=g[E],U=a[N],H=s[N];if(H===r&&!(N in s)||!U(H))return!1}return!0}function xg(s,a,g){if(typeof s!="function")throw new cr(l);return Us(function(){s.apply(r,g)},a)}function Ms(s,a,g,E){var N=-1,U=sa,H=!0,K=s.length,J=[],ut=a.length;if(!K)return J;g&&(a=he(a,er(g))),E?(U=nf,H=!1):a.length>=i&&(U=As,H=!1,a=new Vn(a));t:for(;++N<K;){var ft=s[N],ht=g==null?ft:g(ft);if(ft=E||ft!==0?ft:0,H&&ht===ht){for(var mt=ut;mt--;)if(a[mt]===ht)continue t;J.push(ft)}else U(a,ht,E)||J.push(ft)}return J}var _n=Xg(Gr),wg=Xg(bf,!0);function $3(s,a){var g=!0;return _n(s,function(E,N,U){return g=!!a(E,N,U),g}),g}function Ta(s,a,g){for(var E=-1,N=s.length;++E<N;){var U=s[E],H=a(U);if(H!=null&&(K===r?H===H&&!nr(H):g(H,K)))var K=H,J=U}return J}function G3(s,a,g,E){var N=s.length;for(g=kt(g),g<0&&(g=-g>N?0:N+g),E=E===r||E>N?N:kt(E),E<0&&(E+=N),E=g>E?0:Um(E);g<E;)s[g++]=a;return s}function Tg(s,a){var g=[];return _n(s,function(E,N,U){a(E,N,U)&&g.push(E)}),g}function Me(s,a,g,E,N){var U=-1,H=s.length;for(g||(g=Rk),N||(N=[]);++U<H;){var K=s[U];a>0&&g(K)?a>1?Me(K,a-1,g,E,N):gn(N,K):E||(N[N.length]=K)}return N}var _f=Kg(),Eg=Kg(!0);function Gr(s,a){return s&&_f(s,a,Ie)}function bf(s,a){return s&&Eg(s,a,Ie)}function Ea(s,a){return vn(a,function(g){return rn(s[g])})}function Xn(s,a){a=xn(a,s);for(var g=0,E=a.length;s!=null&&g<E;)s=s[qr(a[g++])];return g&&g==E?s:r}function Sg(s,a,g){var E=a(s);return Mt(s)?E:gn(E,g(s))}function je(s){return s==null?s===r?Ft:te:zn&&zn in ie(s)?Tk(s):Fk(s)}function xf(s,a){return s>a}function j3(s,a){return s!=null&&ee.call(s,a)}function q3(s,a){return s!=null&&a in ie(s)}function z3(s,a,g){return s>=De(a,g)&&s<Ae(a,g)}function wf(s,a,g){for(var E=g?nf:sa,N=s[0].length,U=s.length,H=U,K=ot(U),J=1/0,ut=[];H--;){var ft=s[H];H&&a&&(ft=he(ft,er(a))),J=De(ft.length,J),K[H]=!g&&(a||N>=120&&ft.length>=120)?new Vn(H&&ft):r}ft=s[0];var ht=-1,mt=K[0];t:for(;++ht<N&&ut.length<J;){var wt=ft[ht],Ot=a?a(wt):wt;if(wt=g||wt!==0?wt:0,!(mt?As(mt,Ot):E(ut,Ot,g))){for(H=U;--H;){var Bt=K[H];if(!(Bt?As(Bt,Ot):E(s[H],Ot,g)))continue t}mt&&mt.push(Ot),ut.push(wt)}}return ut}function H3(s,a,g,E){return Gr(s,function(N,U,H){a(E,g(N),U,H)}),E}function ks(s,a,g){a=xn(a,s),s=hm(s,a);var E=s==null?s:s[qr(vr(a))];return E==null?r:tr(E,s,g)}function Ag(s){return me(s)&&je(s)==X}function V3(s){return me(s)&&je(s)==Ge}function W3(s){return me(s)&&je(s)==et}function Ls(s,a,g,E,N){return s===a?!0:s==null||a==null||!me(s)&&!me(a)?s!==s&&a!==a:X3(s,a,g,E,Ls,N)}function X3(s,a,g,E,N,U){var H=Mt(s),K=Mt(a),J=H?$:Ue(s),ut=K?$:Ue(a);J=J==X?Lt:J,ut=ut==X?Lt:ut;var ft=J==Lt,ht=ut==Lt,mt=J==ut;if(mt&&Tn(s)){if(!Tn(a))return!1;H=!0,ft=!1}if(mt&&!ft)return U||(U=new Ir),H||Vi(s)?sm(s,a,g,E,N,U):xk(s,a,J,g,E,N,U);if(!(g&m)){var wt=ft&&ee.call(s,"__wrapped__"),Ot=ht&&ee.call(a,"__wrapped__");if(wt||Ot){var Bt=wt?s.value():s,Ct=Ot?a.value():a;return U||(U=new Ir),N(Bt,Ct,g,E,U)}}return mt?(U||(U=new Ir),wk(s,a,g,E,N,U)):!1}function K3(s){return me(s)&&Ue(s)==yt}function Tf(s,a,g,E){var N=g.length,U=N,H=!E;if(s==null)return!U;for(s=ie(s);N--;){var K=g[N];if(H&&K[2]?K[1]!==s[K[0]]:!(K[0]in s))return!1}for(;++N<U;){K=g[N];var J=K[0],ut=s[J],ft=K[1];if(H&&K[2]){if(ut===r&&!(J in s))return!1}else{var ht=new Ir;if(E)var mt=E(ut,ft,J,s,a,ht);if(!(mt===r?Ls(ft,ut,m|y,E,ht):mt))return!1}}return!0}function Og(s){if(!ge(s)||Pk(s))return!1;var a=rn(s)?KM:UN;return a.test(Yn(s))}function Y3(s){return me(s)&&je(s)==pt}function Z3(s){return me(s)&&Ue(s)==vt}function Q3(s){return me(s)&&Ga(s.length)&&!!ue[je(s)]}function Cg(s){return typeof s=="function"?s:s==null?Ke:typeof s=="object"?Mt(s)?Pg(s[0],s[1]):Ig(s):Ym(s)}function Ef(s){if(!Ds(s))return e3(s);var a=[];for(var g in ie(s))ee.call(s,g)&&g!="constructor"&&a.push(g);return a}function J3(s){if(!ge(s))return Lk(s);var a=Ds(s),g=[];for(var E in s)E=="constructor"&&(a||!ee.call(s,E))||g.push(E);return g}function Sf(s,a){return s<a}function Rg(s,a){var g=-1,E=We(s)?ot(s.length):[];return _n(s,function(N,U,H){E[++g]=a(N,U,H)}),E}function Ig(s){var a=$f(s);return a.length==1&&a[0][2]?fm(a[0][0],a[0][1]):function(g){return g===s||Tf(g,s,a)}}function Pg(s,a){return jf(s)&&um(a)?fm(qr(s),a):function(g){var E=Qf(g,s);return E===r&&E===a?Jf(g,s):Ls(a,E,m|y)}}function Sa(s,a,g,E,N){s!==a&&_f(a,function(U,H){if(N||(N=new Ir),ge(U))tk(s,a,H,g,Sa,E,N);else{var K=E?E(zf(s,H),U,H+"",s,a,N):r;K===r&&(K=U),mf(s,H,K)}},Xe)}function tk(s,a,g,E,N,U,H){var K=zf(s,g),J=zf(a,g),ut=H.get(J);if(ut){mf(s,g,ut);return}var ft=U?U(K,J,g+"",s,a,H):r,ht=ft===r;if(ht){var mt=Mt(J),wt=!mt&&Tn(J),Ot=!mt&&!wt&&Vi(J);ft=J,mt||wt||Ot?Mt(K)?ft=K:be(K)?ft=Ve(K):wt?(ht=!1,ft=qg(J,!0)):Ot?(ht=!1,ft=zg(J,!0)):ft=[]:$s(J)||Zn(J)?(ft=K,Zn(K)?ft=$m(K):(!ge(K)||rn(K))&&(ft=lm(J))):ht=!1}ht&&(H.set(J,ft),N(ft,J,E,U,H),H.delete(J)),mf(s,g,ft)}function Ng(s,a){var g=s.length;if(g)return a+=a<0?g:0,en(a,g)?s[a]:r}function Mg(s,a,g){a.length?a=he(a,function(U){return Mt(U)?function(H){return Xn(H,U.length===1?U[0]:U)}:U}):a=[Ke];var E=-1;a=he(a,er(At()));var N=Rg(s,function(U,H,K){var J=he(a,function(ut){return ut(U)});return{criteria:J,index:++E,value:U}});return OM(N,function(U,H){return dk(U,H,g)})}function ek(s,a){return kg(s,a,function(g,E){return Jf(s,E)})}function kg(s,a,g){for(var E=-1,N=a.length,U={};++E<N;){var H=a[E],K=Xn(s,H);g(K,H)&&Fs(U,xn(H,s),K)}return U}function rk(s){return function(a){return Xn(a,s)}}function Af(s,a,g,E){var N=E?AM:Li,U=-1,H=a.length,K=s;for(s===a&&(a=Ve(a)),g&&(K=he(s,er(g)));++U<H;)for(var J=0,ut=a[U],ft=g?g(ut):ut;(J=N(K,ft,J,E))>-1;)K!==s&&va.call(K,J,1),va.call(s,J,1);return s}function Lg(s,a){for(var g=s?a.length:0,E=g-1;g--;){var N=a[g];if(g==E||N!==U){var U=N;en(N)?va.call(s,N,1):If(s,N)}}return s}function Of(s,a){return s+ya(vg()*(a-s+1))}function nk(s,a,g,E){for(var N=-1,U=Ae(ma((a-s)/(g||1)),0),H=ot(U);U--;)H[E?U:++N]=s,s+=g;return H}function Cf(s,a){var g="";if(!s||a<1||a>nt)return g;do a%2&&(g+=s),a=ya(a/2),a&&(s+=s);while(a);return g}function Dt(s,a){return Hf(cm(s,a,Ke),s+"")}function ik(s){return yg(Wi(s))}function sk(s,a){var g=Wi(s);return La(g,Wn(a,0,g.length))}function Fs(s,a,g,E){if(!ge(s))return s;a=xn(a,s);for(var N=-1,U=a.length,H=U-1,K=s;K!=null&&++N<U;){var J=qr(a[N]),ut=g;if(J==="__proto__"||J==="constructor"||J==="prototype")return s;if(N!=H){var ft=K[J];ut=E?E(ft,J,K):r,ut===r&&(ut=ge(ft)?ft:en(a[N+1])?[]:{})}Ns(K,J,ut),K=K[J]}return s}var Fg=_a?function(s,a){return _a.set(s,a),s}:Ke,ok=ga?function(s,a){return ga(s,"toString",{configurable:!0,enumerable:!1,value:ec(a),writable:!0})}:Ke;function ak(s){return La(Wi(s))}function pr(s,a,g){var E=-1,N=s.length;a<0&&(a=-a>N?0:N+a),g=g>N?N:g,g<0&&(g+=N),N=a>g?0:g-a>>>0,a>>>=0;for(var U=ot(N);++E<N;)U[E]=s[E+a];return U}function lk(s,a){var g;return _n(s,function(E,N,U){return g=a(E,N,U),!g}),!!g}function Aa(s,a,g){var E=0,N=s==null?E:s.length;if(typeof a=="number"&&a===a&&N<=G){for(;E<N;){var U=E+N>>>1,H=s[U];H!==null&&!nr(H)&&(g?H<=a:H<a)?E=U+1:N=U}return N}return Rf(s,a,Ke,g)}function Rf(s,a,g,E){var N=0,U=s==null?0:s.length;if(U===0)return 0;a=g(a);for(var H=a!==a,K=a===null,J=nr(a),ut=a===r;N<U;){var ft=ya((N+U)/2),ht=g(s[ft]),mt=ht!==r,wt=ht===null,Ot=ht===ht,Bt=nr(ht);if(H)var Ct=E||Ot;else ut?Ct=Ot&&(E||mt):K?Ct=Ot&&mt&&(E||!wt):J?Ct=Ot&&mt&&!wt&&(E||!Bt):wt||Bt?Ct=!1:Ct=E?ht<=a:ht<a;Ct?N=ft+1:U=ft}return De(U,j)}function Bg(s,a){for(var g=-1,E=s.length,N=0,U=[];++g<E;){var H=s[g],K=a?a(H):H;if(!g||!Pr(K,J)){var J=K;U[N++]=H===0?0:H}}return U}function Dg(s){return typeof s=="number"?s:nr(s)?D:+s}function rr(s){if(typeof s=="string")return s;if(Mt(s))return he(s,rr)+"";if(nr(s))return gg?gg.call(s):"";var a=s+"";return a=="0"&&1/s==-z?"-0":a}function bn(s,a,g){var E=-1,N=sa,U=s.length,H=!0,K=[],J=K;if(g)H=!1,N=nf;else if(U>=i){var ut=a?null:_k(s);if(ut)return aa(ut);H=!1,N=As,J=new Vn}else J=a?[]:K;t:for(;++E<U;){var ft=s[E],ht=a?a(ft):ft;if(ft=g||ft!==0?ft:0,H&&ht===ht){for(var mt=J.length;mt--;)if(J[mt]===ht)continue t;a&&J.push(ht),K.push(ft)}else N(J,ht,g)||(J!==K&&J.push(ht),K.push(ft))}return K}function If(s,a){return a=xn(a,s),s=hm(s,a),s==null||delete s[qr(vr(a))]}function Ug(s,a,g,E){return Fs(s,a,g(Xn(s,a)),E)}function Oa(s,a,g,E){for(var N=s.length,U=E?N:-1;(E?U--:++U<N)&&a(s[U],U,s););return g?pr(s,E?0:U,E?U+1:N):pr(s,E?U+1:0,E?N:U)}function $g(s,a){var g=s;return g instanceof jt&&(g=g.value()),sf(a,function(E,N){return N.func.apply(N.thisArg,gn([E],N.args))},g)}function Pf(s,a,g){var E=s.length;if(E<2)return E?bn(s[0]):[];for(var N=-1,U=ot(E);++N<E;)for(var H=s[N],K=-1;++K<E;)K!=N&&(U[N]=Ms(U[N]||H,s[K],a,g));return bn(Me(U,1),a,g)}function Gg(s,a,g){for(var E=-1,N=s.length,U=a.length,H={};++E<N;){var K=E<U?a[E]:r;g(H,s[E],K)}return H}function Nf(s){return be(s)?s:[]}function Mf(s){return typeof s=="function"?s:Ke}function xn(s,a){return Mt(s)?s:jf(s,a)?[s]:gm(Qt(s))}var uk=Dt;function wn(s,a,g){var E=s.length;return g=g===r?E:g,!a&&g>=E?s:pr(s,a,g)}var jg=YM||function(s){return Ne.clearTimeout(s)};function qg(s,a){if(a)return s.slice();var g=s.length,E=fg?fg(g):new s.constructor(g);return s.copy(E),E}function kf(s){var a=new s.constructor(s.byteLength);return new da(a).set(new da(s)),a}function fk(s,a){var g=a?kf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function ck(s){var a=new s.constructor(s.source,Av.exec(s));return a.lastIndex=s.lastIndex,a}function hk(s){return Ps?ie(Ps.call(s)):{}}function zg(s,a){var g=a?kf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function Hg(s,a){if(s!==a){var g=s!==r,E=s===null,N=s===s,U=nr(s),H=a!==r,K=a===null,J=a===a,ut=nr(a);if(!K&&!ut&&!U&&s>a||U&&H&&J&&!K&&!ut||E&&H&&J||!g&&J||!N)return 1;if(!E&&!U&&!ut&&s<a||ut&&g&&N&&!E&&!U||K&&g&&N||!H&&N||!J)return-1}return 0}function dk(s,a,g){for(var E=-1,N=s.criteria,U=a.criteria,H=N.length,K=g.length;++E<H;){var J=Hg(N[E],U[E]);if(J){if(E>=K)return J;var ut=g[E];return J*(ut=="desc"?-1:1)}}return s.index-a.index}function Vg(s,a,g,E){for(var N=-1,U=s.length,H=g.length,K=-1,J=a.length,ut=Ae(U-H,0),ft=ot(J+ut),ht=!E;++K<J;)ft[K]=a[K];for(;++N<H;)(ht||N<U)&&(ft[g[N]]=s[N]);for(;ut--;)ft[K++]=s[N++];return ft}function Wg(s,a,g,E){for(var N=-1,U=s.length,H=-1,K=g.length,J=-1,ut=a.length,ft=Ae(U-K,0),ht=ot(ft+ut),mt=!E;++N<ft;)ht[N]=s[N];for(var wt=N;++J<ut;)ht[wt+J]=a[J];for(;++H<K;)(mt||N<U)&&(ht[wt+g[H]]=s[N++]);return ht}function Ve(s,a){var g=-1,E=s.length;for(a||(a=ot(E));++g<E;)a[g]=s[g];return a}function jr(s,a,g,E){var N=!g;g||(g={});for(var U=-1,H=a.length;++U<H;){var K=a[U],J=E?E(g[K],s[K],K,g,s):r;J===r&&(J=s[K]),N?Qr(g,K,J):Ns(g,K,J)}return g}function pk(s,a){return jr(s,Gf(s),a)}function vk(s,a){return jr(s,om(s),a)}function Ca(s,a){return function(g,E){var N=Mt(g)?bM:B3,U=a?a():{};return N(g,s,At(E,2),U)}}function qi(s){return Dt(function(a,g){var E=-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),a=ie(a);++E<N;){var K=g[E];K&&s(a,K,E,U)}return a})}function Xg(s,a){return function(g,E){if(g==null)return g;if(!We(g))return s(g,E);for(var N=g.length,U=a?N:-1,H=ie(g);(a?U--:++U<N)&&E(H[U],U,H)!==!1;);return g}}function Kg(s){return function(a,g,E){for(var N=-1,U=ie(a),H=E(a),K=H.length;K--;){var J=H[s?K:++N];if(g(U[J],J,U)===!1)break}return a}}function gk(s,a,g){var E=a&b,N=Bs(s);function U(){var H=this&&this!==Ne&&this instanceof U?N:s;return H.apply(E?g:this,arguments)}return U}function Yg(s){return function(a){a=Qt(a);var g=Fi(a)?Rr(a):r,E=g?g[0]:a.charAt(0),N=g?wn(g,1).join(""):a.slice(1);return E[s]()+N}}function zi(s){return function(a){return sf(Xm(Wm(a).replace(oM,"")),s,"")}}function Bs(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var g=ji(s.prototype),E=s.apply(g,a);return ge(E)?E:g}}function mk(s,a,g){var E=Bs(s);function N(){for(var U=arguments.length,H=ot(U),K=U,J=Hi(N);K--;)H[K]=arguments[K];var ut=U<3&&H[0]!==J&&H[U-1]!==J?[]:mn(H,J);if(U-=ut.length,U<g)return em(s,a,Ra,N.placeholder,r,H,ut,r,r,g-U);var ft=this&&this!==Ne&&this instanceof N?E:s;return tr(ft,this,H)}return N}function Zg(s){return function(a,g,E){var N=ie(a);if(!We(a)){var U=At(g,3);a=Ie(a),g=function(K){return U(N[K],K,N)}}var H=s(a,g,E);return H>-1?N[U?a[H]:H]:r}}function Qg(s){return tn(function(a){var g=a.length,E=g,N=hr.prototype.thru;for(s&&a.reverse();E--;){var U=a[E];if(typeof U!="function")throw new cr(l);if(N&&!H&&Ma(U)=="wrapper")var H=new hr([],!0)}for(E=H?E:g;++E<g;){U=a[E];var K=Ma(U),J=K=="wrapper"?Uf(U):r;J&&qf(J[0])&&J[1]==(A|T|S|O)&&!J[4].length&&J[9]==1?H=H[Ma(J[0])].apply(H,J[3]):H=U.length==1&&qf(U)?H[K]():H.thru(U)}return function(){var ut=arguments,ft=ut[0];if(H&&ut.length==1&&Mt(ft))return H.plant(ft).value();for(var ht=0,mt=g?a[ht].apply(this,ut):ft;++ht<g;)mt=a[ht].call(this,mt);return mt}})}function Ra(s,a,g,E,N,U,H,K,J,ut){var ft=a&A,ht=a&b,mt=a&_,wt=a&(T|x),Ot=a&L,Bt=mt?r:Bs(s);function Ct(){for(var $t=arguments.length,zt=ot($t),ir=$t;ir--;)zt[ir]=arguments[ir];if(wt)var ze=Hi(Ct),sr=RM(zt,ze);if(E&&(zt=Vg(zt,E,N,wt)),U&&(zt=Wg(zt,U,H,wt)),$t-=sr,wt&&$t<ut){var xe=mn(zt,ze);return em(s,a,Ra,Ct.placeholder,g,zt,xe,K,J,ut-$t)}var Nr=ht?g:this,sn=mt?Nr[s]:s;return $t=zt.length,K?zt=Bk(zt,K):Ot&&$t>1&&zt.reverse(),ft&&J<$t&&(zt.length=J),this&&this!==Ne&&this instanceof Ct&&(sn=Bt||Bs(sn)),sn.apply(Nr,zt)}return Ct}function Jg(s,a){return function(g,E){return H3(g,s,a(E),{})}}function Ia(s,a){return function(g,E){var N;if(g===r&&E===r)return a;if(g!==r&&(N=g),E!==r){if(N===r)return E;typeof g=="string"||typeof E=="string"?(g=rr(g),E=rr(E)):(g=Dg(g),E=Dg(E)),N=s(g,E)}return N}}function Lf(s){return tn(function(a){return a=he(a,er(At())),Dt(function(g){var E=this;return s(a,function(N){return tr(N,E,g)})})})}function Pa(s,a){a=a===r?" ":rr(a);var g=a.length;if(g<2)return g?Cf(a,s):a;var E=Cf(a,ma(s/Bi(a)));return Fi(a)?wn(Rr(E),0,s).join(""):E.slice(0,s)}function yk(s,a,g,E){var N=a&b,U=Bs(s);function H(){for(var K=-1,J=arguments.length,ut=-1,ft=E.length,ht=ot(ft+J),mt=this&&this!==Ne&&this instanceof H?U:s;++ut<ft;)ht[ut]=E[ut];for(;J--;)ht[ut++]=arguments[++K];return tr(mt,N?g:this,ht)}return H}function tm(s){return function(a,g,E){return E&&typeof E!="number"&&qe(a,g,E)&&(g=E=r),a=nn(a),g===r?(g=a,a=0):g=nn(g),E=E===r?a<g?1:-1:nn(E),nk(a,g,E,s)}}function Na(s){return function(a,g){return typeof a=="string"&&typeof g=="string"||(a=gr(a),g=gr(g)),s(a,g)}}function em(s,a,g,E,N,U,H,K,J,ut){var ft=a&T,ht=ft?H:r,mt=ft?r:H,wt=ft?U:r,Ot=ft?r:U;a|=ft?S:I,a&=~(ft?I:S),a&w||(a&=~(b|_));var Bt=[s,a,N,wt,ht,Ot,mt,K,J,ut],Ct=g.apply(r,Bt);return qf(s)&&dm(Ct,Bt),Ct.placeholder=E,pm(Ct,s,a)}function Ff(s){var a=Se[s];return function(g,E){if(g=gr(g),E=E==null?0:De(kt(E),292),E&&pg(g)){var N=(Qt(g)+"e").split("e"),U=a(N[0]+"e"+(+N[1]+E));return N=(Qt(U)+"e").split("e"),+(N[0]+"e"+(+N[1]-E))}return a(g)}}var _k=$i&&1/aa(new $i([,-0]))[1]==z?function(s){return new $i(s)}:ic;function rm(s){return function(a){var g=Ue(a);return g==yt?hf(a):g==vt?FM(a):CM(a,s(a))}}function Jr(s,a,g,E,N,U,H,K){var J=a&_;if(!J&&typeof s!="function")throw new cr(l);var ut=E?E.length:0;if(ut||(a&=~(S|I),E=N=r),H=H===r?H:Ae(kt(H),0),K=K===r?K:kt(K),ut-=N?N.length:0,a&I){var ft=E,ht=N;E=N=r}var mt=J?r:Uf(s),wt=[s,a,g,E,N,ft,ht,U,H,K];if(mt&&kk(wt,mt),s=wt[0],a=wt[1],g=wt[2],E=wt[3],N=wt[4],K=wt[9]=wt[9]===r?J?0:s.length:Ae(wt[9]-ut,0),!K&&a&(T|x)&&(a&=~(T|x)),!a||a==b)var Ot=gk(s,a,g);else a==T||a==x?Ot=mk(s,a,K):(a==S||a==(b|S))&&!N.length?Ot=yk(s,a,g,E):Ot=Ra.apply(r,wt);var Bt=mt?Fg:dm;return pm(Bt(Ot,wt),s,a)}function nm(s,a,g,E){return s===r||Pr(s,Ui[g])&&!ee.call(E,g)?a:s}function im(s,a,g,E,N,U){return ge(s)&&ge(a)&&(U.set(a,s),Sa(s,a,r,im,U),U.delete(a)),s}function bk(s){return $s(s)?r:s}function sm(s,a,g,E,N,U){var H=g&m,K=s.length,J=a.length;if(K!=J&&!(H&&J>K))return!1;var ut=U.get(s),ft=U.get(a);if(ut&&ft)return ut==a&&ft==s;var ht=-1,mt=!0,wt=g&y?new Vn:r;for(U.set(s,a),U.set(a,s);++ht<K;){var Ot=s[ht],Bt=a[ht];if(E)var Ct=H?E(Bt,Ot,ht,a,s,U):E(Ot,Bt,ht,s,a,U);if(Ct!==r){if(Ct)continue;mt=!1;break}if(wt){if(!of(a,function($t,zt){if(!As(wt,zt)&&(Ot===$t||N(Ot,$t,g,E,U)))return wt.push(zt)})){mt=!1;break}}else if(!(Ot===Bt||N(Ot,Bt,g,E,U))){mt=!1;break}}return U.delete(s),U.delete(a),mt}function xk(s,a,g,E,N,U,H){switch(g){case Zt:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case Ge:return!(s.byteLength!=a.byteLength||!U(new da(s),new da(a)));case tt:case et:case Tt:return Pr(+s,+a);case st:return s.name==a.name&&s.message==a.message;case pt:case ct:return s==a+"";case yt:var K=hf;case vt:var J=E&m;if(K||(K=aa),s.size!=a.size&&!J)return!1;var ut=H.get(s);if(ut)return ut==a;E|=y,H.set(s,a);var ft=sm(K(s),K(a),E,N,U,H);return H.delete(s),ft;case Pt:if(Ps)return Ps.call(s)==Ps.call(a)}return!1}function wk(s,a,g,E,N,U){var H=g&m,K=Bf(s),J=K.length,ut=Bf(a),ft=ut.length;if(J!=ft&&!H)return!1;for(var ht=J;ht--;){var mt=K[ht];if(!(H?mt in a:ee.call(a,mt)))return!1}var wt=U.get(s),Ot=U.get(a);if(wt&&Ot)return wt==a&&Ot==s;var Bt=!0;U.set(s,a),U.set(a,s);for(var Ct=H;++ht<J;){mt=K[ht];var $t=s[mt],zt=a[mt];if(E)var ir=H?E(zt,$t,mt,a,s,U):E($t,zt,mt,s,a,U);if(!(ir===r?$t===zt||N($t,zt,g,E,U):ir)){Bt=!1;break}Ct||(Ct=mt=="constructor")}if(Bt&&!Ct){var ze=s.constructor,sr=a.constructor;ze!=sr&&"constructor"in s&&"constructor"in a&&!(typeof ze=="function"&&ze instanceof ze&&typeof sr=="function"&&sr instanceof sr)&&(Bt=!1)}return U.delete(s),U.delete(a),Bt}function tn(s){return Hf(cm(s,r,bm),s+"")}function Bf(s){return Sg(s,Ie,Gf)}function Df(s){return Sg(s,Xe,om)}var Uf=_a?function(s){return _a.get(s)}:ic;function Ma(s){for(var a=s.name+"",g=Gi[a],E=ee.call(Gi,a)?g.length:0;E--;){var N=g[E],U=N.func;if(U==null||U==s)return N.name}return a}function Hi(s){var a=ee.call(B,"placeholder")?B:s;return a.placeholder}function At(){var s=B.iteratee||rc;return s=s===rc?Cg:s,arguments.length?s(arguments[0],arguments[1]):s}function ka(s,a){var g=s.__data__;return Ik(a)?g[typeof a=="string"?"string":"hash"]:g.map}function $f(s){for(var a=Ie(s),g=a.length;g--;){var E=a[g],N=s[E];a[g]=[E,N,um(N)]}return a}function Kn(s,a){var g=MM(s,a);return Og(g)?g:r}function Tk(s){var a=ee.call(s,zn),g=s[zn];try{s[zn]=r;var E=!0}catch{}var N=ca.call(s);return E&&(a?s[zn]=g:delete s[zn]),N}var Gf=pf?function(s){return s==null?[]:(s=ie(s),vn(pf(s),function(a){return hg.call(s,a)}))}:sc,om=pf?function(s){for(var a=[];s;)gn(a,Gf(s)),s=pa(s);return a}:sc,Ue=je;(vf&&Ue(new vf(new ArrayBuffer(1)))!=Zt||Cs&&Ue(new Cs)!=yt||gf&&Ue(gf.resolve())!=rt||$i&&Ue(new $i)!=vt||Rs&&Ue(new Rs)!=Nt)&&(Ue=function(s){var a=je(s),g=a==Lt?s.constructor:r,E=g?Yn(g):"";if(E)switch(E){case s3:return Zt;case o3:return yt;case a3:return rt;case l3:return vt;case u3:return Nt}return a});function Ek(s,a,g){for(var E=-1,N=g.length;++E<N;){var U=g[E],H=U.size;switch(U.type){case"drop":s+=H;break;case"dropRight":a-=H;break;case"take":a=De(a,s+H);break;case"takeRight":s=Ae(s,a-H);break}}return{start:s,end:a}}function Sk(s){var a=s.match(PN);return a?a[1].split(NN):[]}function am(s,a,g){a=xn(a,s);for(var E=-1,N=a.length,U=!1;++E<N;){var H=qr(a[E]);if(!(U=s!=null&&g(s,H)))break;s=s[H]}return U||++E!=N?U:(N=s==null?0:s.length,!!N&&Ga(N)&&en(H,N)&&(Mt(s)||Zn(s)))}function Ak(s){var a=s.length,g=new s.constructor(a);return a&&typeof s[0]=="string"&&ee.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function lm(s){return typeof s.constructor=="function"&&!Ds(s)?ji(pa(s)):{}}function Ok(s,a,g){var E=s.constructor;switch(a){case Ge:return kf(s);case tt:case et:return new E(+s);case Zt:return fk(s,g);case Ss:case ce:case lr:case ju:case qu:case zu:case Hu:case Vu:case Wu:return zg(s,g);case yt:return new E;case Tt:case ct:return new E(s);case pt:return ck(s);case vt:return new E;case Pt:return hk(s)}}function Ck(s,a){var g=a.length;if(!g)return s;var E=g-1;return a[E]=(g>1?"& ":"")+a[E],a=a.join(g>2?", ":" "),s.replace(IN,`{
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.",l="Expected a function",u="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,p="__lodash_placeholder__",d=1,c=2,v=4,m=1,y=2,_=1,b=2,w=4,T=8,x=16,S=32,I=64,A=128,O=256,L=512,R=30,C="...",P=800,M=16,F=1,q=2,Z=3,z=1/0,it=9007199254740991,W=17976931348623157e292,D=0/0,k=4294967295,j=k-1,G=k>>>1,Y=[["ary",A],["bind",_],["bindKey",b],["curry",T],["curryRight",x],["flip",L],["partial",S],["partialRight",I],["rearg",O]],X="[object Arguments]",$="[object Array]",V="[object AsyncFunction]",tt="[object Boolean]",et="[object Date]",rt="[object DOMException]",ot="[object Error]",ct="[object Function]",gt="[object GeneratorFunction]",yt="[object Map]",St="[object Number]",ee="[object Null]",Ut="[object Object]",nt="[object Promise]",lt="[object Proxy]",pt="[object RegExp]",vt="[object Set]",ht="[object String]",Pt="[object Symbol]",Lt="[object Undefined]",Nt="[object WeakMap]",He="[object WeakSet]",Ge="[object ArrayBuffer]",Qt="[object DataView]",Ss="[object Float32Array]",ce="[object Float64Array]",lr="[object Int8Array]",qu="[object Int16Array]",zu="[object Int32Array]",Hu="[object Uint8Array]",Vu="[object Uint8ClampedArray]",Wu="[object Uint16Array]",Xu="[object Uint32Array]",wN=/\b__p \+= '';/g,TN=/\b(__p \+=) '' \+/g,EN=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Sv=/&(?:amp|lt|gt|quot|#39);/g,Av=/[&<>"']/g,SN=RegExp(Sv.source),AN=RegExp(Av.source),ON=/<%-([\s\S]+?)%>/g,CN=/<%([\s\S]+?)%>/g,Ov=/<%=([\s\S]+?)%>/g,RN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IN=/^\w*$/,PN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ku=/[\\^$.*+?()[\]{}|]/g,NN=RegExp(Ku.source),Yu=/^\s+/,MN=/\s/,kN=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,LN=/\{\n\/\* \[wrapped with (.+)\] \*/,FN=/,? & /,BN=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,DN=/[()=,{}\[\]\/\s]/,UN=/\\(\\)?/g,$N=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Cv=/\w*$/,GN=/^[-+]0x[0-9a-f]+$/i,jN=/^0b[01]+$/i,qN=/^\[object .+?Constructor\]$/,zN=/^0o[0-7]+$/i,HN=/^(?:0|[1-9]\d*)$/,VN=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ra=/($^)/,WN=/['\n\r\u2028\u2029\\]/g,na="\\ud800-\\udfff",XN="\\u0300-\\u036f",KN="\\ufe20-\\ufe2f",YN="\\u20d0-\\u20ff",Rv=XN+KN+YN,Iv="\\u2700-\\u27bf",Pv="a-z\\xdf-\\xf6\\xf8-\\xff",ZN="\\xac\\xb1\\xd7\\xf7",QN="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",JN="\\u2000-\\u206f",tM=" \\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",Nv="A-Z\\xc0-\\xd6\\xd8-\\xde",Mv="\\ufe0e\\ufe0f",kv=ZN+QN+JN+tM,Zu="['’]",eM="["+na+"]",Lv="["+kv+"]",ia="["+Rv+"]",Fv="\\d+",rM="["+Iv+"]",Bv="["+Pv+"]",Dv="[^"+na+kv+Fv+Iv+Pv+Nv+"]",Qu="\\ud83c[\\udffb-\\udfff]",nM="(?:"+ia+"|"+Qu+")",Uv="[^"+na+"]",Ju="(?:\\ud83c[\\udde6-\\uddff]){2}",tf="[\\ud800-\\udbff][\\udc00-\\udfff]",Li="["+Nv+"]",$v="\\u200d",Gv="(?:"+Bv+"|"+Dv+")",iM="(?:"+Li+"|"+Dv+")",jv="(?:"+Zu+"(?:d|ll|m|re|s|t|ve))?",qv="(?:"+Zu+"(?:D|LL|M|RE|S|T|VE))?",zv=nM+"?",Hv="["+Mv+"]?",sM="(?:"+$v+"(?:"+[Uv,Ju,tf].join("|")+")"+Hv+zv+")*",oM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",aM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Vv=Hv+zv+sM,lM="(?:"+[rM,Ju,tf].join("|")+")"+Vv,uM="(?:"+[Uv+ia+"?",ia,Ju,tf,eM].join("|")+")",fM=RegExp(Zu,"g"),cM=RegExp(ia,"g"),ef=RegExp(Qu+"(?="+Qu+")|"+uM+Vv,"g"),hM=RegExp([Li+"?"+Bv+"+"+jv+"(?="+[Lv,Li,"$"].join("|")+")",iM+"+"+qv+"(?="+[Lv,Li+Gv,"$"].join("|")+")",Li+"?"+Gv+"+"+jv,Li+"+"+qv,aM,oM,Fv,lM].join("|"),"g"),dM=RegExp("["+$v+na+Rv+Mv+"]"),pM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vM=["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"],gM=-1,ue={};ue[Ss]=ue[ce]=ue[lr]=ue[qu]=ue[zu]=ue[Hu]=ue[Vu]=ue[Wu]=ue[Xu]=!0,ue[X]=ue[$]=ue[Ge]=ue[tt]=ue[Qt]=ue[et]=ue[ot]=ue[ct]=ue[yt]=ue[St]=ue[Ut]=ue[pt]=ue[vt]=ue[ht]=ue[Nt]=!1;var ae={};ae[X]=ae[$]=ae[Ge]=ae[Qt]=ae[tt]=ae[et]=ae[Ss]=ae[ce]=ae[lr]=ae[qu]=ae[zu]=ae[yt]=ae[St]=ae[Ut]=ae[pt]=ae[vt]=ae[ht]=ae[Pt]=ae[Hu]=ae[Vu]=ae[Wu]=ae[Xu]=!0,ae[ot]=ae[ct]=ae[Nt]=!1;var mM={À:"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"},yM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_M={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},bM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},xM=parseFloat,wM=parseInt,Wv=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,TM=typeof self=="object"&&self&&self.Object===Object&&self,Ne=Wv||TM||Function("return this")(),rf=t&&!t.nodeType&&t,zn=rf&&!0&&e&&!e.nodeType&&e,Xv=zn&&zn.exports===rf,nf=Xv&&Wv.process,ur=function(){try{var Q=zn&&zn.require&&zn.require("util").types;return Q||nf&&nf.binding&&nf.binding("util")}catch{}}(),Kv=ur&&ur.isArrayBuffer,Yv=ur&&ur.isDate,Zv=ur&&ur.isMap,Qv=ur&&ur.isRegExp,Jv=ur&&ur.isSet,tg=ur&&ur.isTypedArray;function tr(Q,at,st){switch(st.length){case 0:return Q.call(at);case 1:return Q.call(at,st[0]);case 2:return Q.call(at,st[0],st[1]);case 3:return Q.call(at,st[0],st[1],st[2])}return Q.apply(at,st)}function EM(Q,at,st,xt){for(var It=-1,Kt=Q==null?0:Q.length;++It<Kt;){var Se=Q[It];at(xt,Se,st(Se),Q)}return xt}function fr(Q,at){for(var st=-1,xt=Q==null?0:Q.length;++st<xt&&at(Q[st],st,Q)!==!1;);return Q}function SM(Q,at){for(var st=Q==null?0:Q.length;st--&&at(Q[st],st,Q)!==!1;);return Q}function eg(Q,at){for(var st=-1,xt=Q==null?0:Q.length;++st<xt;)if(!at(Q[st],st,Q))return!1;return!0}function vn(Q,at){for(var st=-1,xt=Q==null?0:Q.length,It=0,Kt=[];++st<xt;){var Se=Q[st];at(Se,st,Q)&&(Kt[It++]=Se)}return Kt}function sa(Q,at){var st=Q==null?0:Q.length;return!!st&&Fi(Q,at,0)>-1}function sf(Q,at,st){for(var xt=-1,It=Q==null?0:Q.length;++xt<It;)if(st(at,Q[xt]))return!0;return!1}function he(Q,at){for(var st=-1,xt=Q==null?0:Q.length,It=Array(xt);++st<xt;)It[st]=at(Q[st],st,Q);return It}function gn(Q,at){for(var st=-1,xt=at.length,It=Q.length;++st<xt;)Q[It+st]=at[st];return Q}function of(Q,at,st,xt){var It=-1,Kt=Q==null?0:Q.length;for(xt&&Kt&&(st=Q[++It]);++It<Kt;)st=at(st,Q[It],It,Q);return st}function AM(Q,at,st,xt){var It=Q==null?0:Q.length;for(xt&&It&&(st=Q[--It]);It--;)st=at(st,Q[It],It,Q);return st}function af(Q,at){for(var st=-1,xt=Q==null?0:Q.length;++st<xt;)if(at(Q[st],st,Q))return!0;return!1}var OM=lf("length");function CM(Q){return Q.split("")}function RM(Q){return Q.match(BN)||[]}function rg(Q,at,st){var xt;return st(Q,function(It,Kt,Se){if(at(It,Kt,Se))return xt=Kt,!1}),xt}function oa(Q,at,st,xt){for(var It=Q.length,Kt=st+(xt?1:-1);xt?Kt--:++Kt<It;)if(at(Q[Kt],Kt,Q))return Kt;return-1}function Fi(Q,at,st){return at===at?GM(Q,at,st):oa(Q,ng,st)}function IM(Q,at,st,xt){for(var It=st-1,Kt=Q.length;++It<Kt;)if(xt(Q[It],at))return It;return-1}function ng(Q){return Q!==Q}function ig(Q,at){var st=Q==null?0:Q.length;return st?ff(Q,at)/st:D}function lf(Q){return function(at){return at==null?r:at[Q]}}function uf(Q){return function(at){return Q==null?r:Q[at]}}function sg(Q,at,st,xt,It){return It(Q,function(Kt,Se,ie){st=xt?(xt=!1,Kt):at(st,Kt,Se,ie)}),st}function PM(Q,at){var st=Q.length;for(Q.sort(at);st--;)Q[st]=Q[st].value;return Q}function ff(Q,at){for(var st,xt=-1,It=Q.length;++xt<It;){var Kt=at(Q[xt]);Kt!==r&&(st=st===r?Kt:st+Kt)}return st}function cf(Q,at){for(var st=-1,xt=Array(Q);++st<Q;)xt[st]=at(st);return xt}function NM(Q,at){return he(at,function(st){return[st,Q[st]]})}function og(Q){return Q&&Q.slice(0,fg(Q)+1).replace(Yu,"")}function er(Q){return function(at){return Q(at)}}function hf(Q,at){return he(at,function(st){return Q[st]})}function As(Q,at){return Q.has(at)}function ag(Q,at){for(var st=-1,xt=Q.length;++st<xt&&Fi(at,Q[st],0)>-1;);return st}function lg(Q,at){for(var st=Q.length;st--&&Fi(at,Q[st],0)>-1;);return st}function MM(Q,at){for(var st=Q.length,xt=0;st--;)Q[st]===at&&++xt;return xt}var kM=uf(mM),LM=uf(yM);function FM(Q){return"\\"+bM[Q]}function BM(Q,at){return Q==null?r:Q[at]}function Bi(Q){return dM.test(Q)}function DM(Q){return pM.test(Q)}function UM(Q){for(var at,st=[];!(at=Q.next()).done;)st.push(at.value);return st}function df(Q){var at=-1,st=Array(Q.size);return Q.forEach(function(xt,It){st[++at]=[It,xt]}),st}function ug(Q,at){return function(st){return Q(at(st))}}function mn(Q,at){for(var st=-1,xt=Q.length,It=0,Kt=[];++st<xt;){var Se=Q[st];(Se===at||Se===p)&&(Q[st]=p,Kt[It++]=st)}return Kt}function aa(Q){var at=-1,st=Array(Q.size);return Q.forEach(function(xt){st[++at]=xt}),st}function $M(Q){var at=-1,st=Array(Q.size);return Q.forEach(function(xt){st[++at]=[xt,xt]}),st}function GM(Q,at,st){for(var xt=st-1,It=Q.length;++xt<It;)if(Q[xt]===at)return xt;return-1}function jM(Q,at,st){for(var xt=st+1;xt--;)if(Q[xt]===at)return xt;return xt}function Di(Q){return Bi(Q)?zM(Q):OM(Q)}function Rr(Q){return Bi(Q)?HM(Q):CM(Q)}function fg(Q){for(var at=Q.length;at--&&MN.test(Q.charAt(at)););return at}var qM=uf(_M);function zM(Q){for(var at=ef.lastIndex=0;ef.test(Q);)++at;return at}function HM(Q){return Q.match(ef)||[]}function VM(Q){return Q.match(hM)||[]}var WM=function Q(at){at=at==null?Ne:Ui.defaults(Ne.Object(),at,Ui.pick(Ne,vM));var st=at.Array,xt=at.Date,It=at.Error,Kt=at.Function,Se=at.Math,ie=at.Object,pf=at.RegExp,XM=at.String,cr=at.TypeError,la=st.prototype,KM=Kt.prototype,$i=ie.prototype,ua=at["__core-js_shared__"],fa=KM.toString,re=$i.hasOwnProperty,YM=0,cg=function(){var s=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),ca=$i.toString,ZM=fa.call(ie),QM=Ne._,JM=pf("^"+fa.call(re).replace(Ku,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ha=Xv?at.Buffer:r,yn=at.Symbol,da=at.Uint8Array,hg=ha?ha.allocUnsafe:r,pa=ug(ie.getPrototypeOf,ie),dg=ie.create,pg=$i.propertyIsEnumerable,va=la.splice,vg=yn?yn.isConcatSpreadable:r,Os=yn?yn.iterator:r,Hn=yn?yn.toStringTag:r,ga=function(){try{var s=Yn(ie,"defineProperty");return s({},"",{}),s}catch{}}(),t3=at.clearTimeout!==Ne.clearTimeout&&at.clearTimeout,e3=xt&&xt.now!==Ne.Date.now&&xt.now,r3=at.setTimeout!==Ne.setTimeout&&at.setTimeout,ma=Se.ceil,ya=Se.floor,vf=ie.getOwnPropertySymbols,n3=ha?ha.isBuffer:r,gg=at.isFinite,i3=la.join,s3=ug(ie.keys,ie),Ae=Se.max,De=Se.min,o3=xt.now,a3=at.parseInt,mg=Se.random,l3=la.reverse,gf=Yn(at,"DataView"),Cs=Yn(at,"Map"),mf=Yn(at,"Promise"),Gi=Yn(at,"Set"),Rs=Yn(at,"WeakMap"),Is=Yn(ie,"create"),_a=Rs&&new Rs,ji={},u3=Zn(gf),f3=Zn(Cs),c3=Zn(mf),h3=Zn(Gi),d3=Zn(Rs),ba=yn?yn.prototype:r,Ps=ba?ba.valueOf:r,yg=ba?ba.toString:r;function B(s){if(ye(s)&&!Mt(s)&&!(s instanceof jt)){if(s instanceof hr)return s;if(re.call(s,"__wrapped__"))return _m(s)}return new hr(s)}var qi=function(){function s(){}return function(a){if(!ge(a))return{};if(dg)return dg(a);s.prototype=a;var g=new s;return s.prototype=r,g}}();function xa(){}function hr(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=r}B.templateSettings={escape:ON,evaluate:CN,interpolate:Ov,variable:"",imports:{_:B}},B.prototype=xa.prototype,B.prototype.constructor=B,hr.prototype=qi(xa.prototype),hr.prototype.constructor=hr;function jt(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=k,this.__views__=[]}function p3(){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 v3(){if(this.__filtered__){var s=new jt(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function g3(){var s=this.__wrapped__.value(),a=this.__dir__,g=Mt(s),E=a<0,N=g?s.length:0,U=Ck(0,N,this.__views__),H=U.start,K=U.end,J=K-H,ut=E?K:H-1,ft=this.__iteratees__,dt=ft.length,mt=0,wt=De(J,this.__takeCount__);if(!g||!E&&N==J&&wt==J)return jg(s,this.__actions__);var Ot=[];t:for(;J--&&mt<wt;){ut+=a;for(var Ft=-1,Ct=s[ut];++Ft<dt;){var $t=ft[Ft],zt=$t.iteratee,ir=$t.type,ze=zt(Ct);if(ir==q)Ct=ze;else if(!ze){if(ir==F)continue t;break t}}Ot[mt++]=Ct}return Ot}jt.prototype=qi(xa.prototype),jt.prototype.constructor=jt;function Vn(s){var a=-1,g=s==null?0:s.length;for(this.clear();++a<g;){var E=s[a];this.set(E[0],E[1])}}function m3(){this.__data__=Is?Is(null):{},this.size=0}function y3(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function _3(s){var a=this.__data__;if(Is){var g=a[s];return g===f?r:g}return re.call(a,s)?a[s]:r}function b3(s){var a=this.__data__;return Is?a[s]!==r:re.call(a,s)}function x3(s,a){var g=this.__data__;return this.size+=this.has(s)?0:1,g[s]=Is&&a===r?f:a,this}Vn.prototype.clear=m3,Vn.prototype.delete=y3,Vn.prototype.get=_3,Vn.prototype.has=b3,Vn.prototype.set=x3;function Zr(s){var a=-1,g=s==null?0:s.length;for(this.clear();++a<g;){var E=s[a];this.set(E[0],E[1])}}function w3(){this.__data__=[],this.size=0}function T3(s){var a=this.__data__,g=wa(a,s);if(g<0)return!1;var E=a.length-1;return g==E?a.pop():va.call(a,g,1),--this.size,!0}function E3(s){var a=this.__data__,g=wa(a,s);return g<0?r:a[g][1]}function S3(s){return wa(this.__data__,s)>-1}function A3(s,a){var g=this.__data__,E=wa(g,s);return E<0?(++this.size,g.push([s,a])):g[E][1]=a,this}Zr.prototype.clear=w3,Zr.prototype.delete=T3,Zr.prototype.get=E3,Zr.prototype.has=S3,Zr.prototype.set=A3;function Qr(s){var a=-1,g=s==null?0:s.length;for(this.clear();++a<g;){var E=s[a];this.set(E[0],E[1])}}function O3(){this.size=0,this.__data__={hash:new Vn,map:new(Cs||Zr),string:new Vn}}function C3(s){var a=ka(this,s).delete(s);return this.size-=a?1:0,a}function R3(s){return ka(this,s).get(s)}function I3(s){return ka(this,s).has(s)}function P3(s,a){var g=ka(this,s),E=g.size;return g.set(s,a),this.size+=g.size==E?0:1,this}Qr.prototype.clear=O3,Qr.prototype.delete=C3,Qr.prototype.get=R3,Qr.prototype.has=I3,Qr.prototype.set=P3;function Wn(s){var a=-1,g=s==null?0:s.length;for(this.__data__=new Qr;++a<g;)this.add(s[a])}function N3(s){return this.__data__.set(s,f),this}function M3(s){return this.__data__.has(s)}Wn.prototype.add=Wn.prototype.push=N3,Wn.prototype.has=M3;function Ir(s){var a=this.__data__=new Zr(s);this.size=a.size}function k3(){this.__data__=new Zr,this.size=0}function L3(s){var a=this.__data__,g=a.delete(s);return this.size=a.size,g}function F3(s){return this.__data__.get(s)}function B3(s){return this.__data__.has(s)}function D3(s,a){var g=this.__data__;if(g instanceof Zr){var E=g.__data__;if(!Cs||E.length<i-1)return E.push([s,a]),this.size=++g.size,this;g=this.__data__=new Qr(E)}return g.set(s,a),this.size=g.size,this}Ir.prototype.clear=k3,Ir.prototype.delete=L3,Ir.prototype.get=F3,Ir.prototype.has=B3,Ir.prototype.set=D3;function _g(s,a){var g=Mt(s),E=!g&&Qn(s),N=!g&&!E&&Tn(s),U=!g&&!E&&!N&&Wi(s),H=g||E||N||U,K=H?cf(s.length,XM):[],J=K.length;for(var ut in s)(a||re.call(s,ut))&&!(H&&(ut=="length"||N&&(ut=="offset"||ut=="parent")||U&&(ut=="buffer"||ut=="byteLength"||ut=="byteOffset")||rn(ut,J)))&&K.push(ut);return K}function bg(s){var a=s.length;return a?s[Cf(0,a-1)]:r}function U3(s,a){return La(Ve(s),Xn(a,0,s.length))}function $3(s){return La(Ve(s))}function yf(s,a,g){(g!==r&&!Pr(s[a],g)||g===r&&!(a in s))&&Jr(s,a,g)}function Ns(s,a,g){var E=s[a];(!(re.call(s,a)&&Pr(E,g))||g===r&&!(a in s))&&Jr(s,a,g)}function wa(s,a){for(var g=s.length;g--;)if(Pr(s[g][0],a))return g;return-1}function G3(s,a,g,E){return _n(s,function(N,U,H){a(E,N,g(N),H)}),E}function xg(s,a){return s&&jr(a,Ie(a),s)}function j3(s,a){return s&&jr(a,Xe(a),s)}function Jr(s,a,g){a=="__proto__"&&ga?ga(s,a,{configurable:!0,enumerable:!0,value:g,writable:!0}):s[a]=g}function _f(s,a){for(var g=-1,E=a.length,N=st(E),U=s==null;++g<E;)N[g]=U?r:Jf(s,a[g]);return N}function Xn(s,a,g){return s===s&&(g!==r&&(s=s<=g?s:g),a!==r&&(s=s>=a?s:a)),s}function dr(s,a,g,E,N,U){var H,K=a&d,J=a&c,ut=a&v;if(g&&(H=N?g(s,E,N,U):g(s)),H!==r)return H;if(!ge(s))return s;var ft=Mt(s);if(ft){if(H=Ik(s),!K)return Ve(s,H)}else{var dt=Ue(s),mt=dt==ct||dt==gt;if(Tn(s))return Hg(s,K);if(dt==Ut||dt==X||mt&&!N){if(H=J||mt?{}:fm(s),!K)return J?_k(s,j3(H,s)):yk(s,xg(H,s))}else{if(!ae[dt])return N?s:{};H=Pk(s,dt,K)}}U||(U=new Ir);var wt=U.get(s);if(wt)return wt;U.set(s,H),Um(s)?s.forEach(function(Ct){H.add(dr(Ct,a,g,Ct,s,U))}):Bm(s)&&s.forEach(function(Ct,$t){H.set($t,dr(Ct,a,g,$t,s,U))});var Ot=ut?J?Uf:Df:J?Xe:Ie,Ft=ft?r:Ot(s);return fr(Ft||s,function(Ct,$t){Ft&&($t=Ct,Ct=s[$t]),Ns(H,$t,dr(Ct,a,g,$t,s,U))}),H}function q3(s){var a=Ie(s);return function(g){return wg(g,s,a)}}function wg(s,a,g){var E=g.length;if(s==null)return!E;for(s=ie(s);E--;){var N=g[E],U=a[N],H=s[N];if(H===r&&!(N in s)||!U(H))return!1}return!0}function Tg(s,a,g){if(typeof s!="function")throw new cr(l);return Us(function(){s.apply(r,g)},a)}function Ms(s,a,g,E){var N=-1,U=sa,H=!0,K=s.length,J=[],ut=a.length;if(!K)return J;g&&(a=he(a,er(g))),E?(U=sf,H=!1):a.length>=i&&(U=As,H=!1,a=new Wn(a));t:for(;++N<K;){var ft=s[N],dt=g==null?ft:g(ft);if(ft=E||ft!==0?ft:0,H&&dt===dt){for(var mt=ut;mt--;)if(a[mt]===dt)continue t;J.push(ft)}else U(a,dt,E)||J.push(ft)}return J}var _n=Yg(Gr),Eg=Yg(xf,!0);function z3(s,a){var g=!0;return _n(s,function(E,N,U){return g=!!a(E,N,U),g}),g}function Ta(s,a,g){for(var E=-1,N=s.length;++E<N;){var U=s[E],H=a(U);if(H!=null&&(K===r?H===H&&!nr(H):g(H,K)))var K=H,J=U}return J}function H3(s,a,g,E){var N=s.length;for(g=kt(g),g<0&&(g=-g>N?0:N+g),E=E===r||E>N?N:kt(E),E<0&&(E+=N),E=g>E?0:Gm(E);g<E;)s[g++]=a;return s}function Sg(s,a){var g=[];return _n(s,function(E,N,U){a(E,N,U)&&g.push(E)}),g}function Me(s,a,g,E,N){var U=-1,H=s.length;for(g||(g=Mk),N||(N=[]);++U<H;){var K=s[U];a>0&&g(K)?a>1?Me(K,a-1,g,E,N):gn(N,K):E||(N[N.length]=K)}return N}var bf=Zg(),Ag=Zg(!0);function Gr(s,a){return s&&bf(s,a,Ie)}function xf(s,a){return s&&Ag(s,a,Ie)}function Ea(s,a){return vn(a,function(g){return nn(s[g])})}function Kn(s,a){a=xn(a,s);for(var g=0,E=a.length;s!=null&&g<E;)s=s[qr(a[g++])];return g&&g==E?s:r}function Og(s,a,g){var E=a(s);return Mt(s)?E:gn(E,g(s))}function je(s){return s==null?s===r?Lt:ee:Hn&&Hn in ie(s)?Ok(s):$k(s)}function wf(s,a){return s>a}function V3(s,a){return s!=null&&re.call(s,a)}function W3(s,a){return s!=null&&a in ie(s)}function X3(s,a,g){return s>=De(a,g)&&s<Ae(a,g)}function Tf(s,a,g){for(var E=g?sf:sa,N=s[0].length,U=s.length,H=U,K=st(U),J=1/0,ut=[];H--;){var ft=s[H];H&&a&&(ft=he(ft,er(a))),J=De(ft.length,J),K[H]=!g&&(a||N>=120&&ft.length>=120)?new Wn(H&&ft):r}ft=s[0];var dt=-1,mt=K[0];t:for(;++dt<N&&ut.length<J;){var wt=ft[dt],Ot=a?a(wt):wt;if(wt=g||wt!==0?wt:0,!(mt?As(mt,Ot):E(ut,Ot,g))){for(H=U;--H;){var Ft=K[H];if(!(Ft?As(Ft,Ot):E(s[H],Ot,g)))continue t}mt&&mt.push(Ot),ut.push(wt)}}return ut}function K3(s,a,g,E){return Gr(s,function(N,U,H){a(E,g(N),U,H)}),E}function ks(s,a,g){a=xn(a,s),s=pm(s,a);var E=s==null?s:s[qr(vr(a))];return E==null?r:tr(E,s,g)}function Cg(s){return ye(s)&&je(s)==X}function Y3(s){return ye(s)&&je(s)==Ge}function Z3(s){return ye(s)&&je(s)==et}function Ls(s,a,g,E,N){return s===a?!0:s==null||a==null||!ye(s)&&!ye(a)?s!==s&&a!==a:Q3(s,a,g,E,Ls,N)}function Q3(s,a,g,E,N,U){var H=Mt(s),K=Mt(a),J=H?$:Ue(s),ut=K?$:Ue(a);J=J==X?Ut:J,ut=ut==X?Ut:ut;var ft=J==Ut,dt=ut==Ut,mt=J==ut;if(mt&&Tn(s)){if(!Tn(a))return!1;H=!0,ft=!1}if(mt&&!ft)return U||(U=new Ir),H||Wi(s)?am(s,a,g,E,N,U):Sk(s,a,J,g,E,N,U);if(!(g&m)){var wt=ft&&re.call(s,"__wrapped__"),Ot=dt&&re.call(a,"__wrapped__");if(wt||Ot){var Ft=wt?s.value():s,Ct=Ot?a.value():a;return U||(U=new Ir),N(Ft,Ct,g,E,U)}}return mt?(U||(U=new Ir),Ak(s,a,g,E,N,U)):!1}function J3(s){return ye(s)&&Ue(s)==yt}function Ef(s,a,g,E){var N=g.length,U=N,H=!E;if(s==null)return!U;for(s=ie(s);N--;){var K=g[N];if(H&&K[2]?K[1]!==s[K[0]]:!(K[0]in s))return!1}for(;++N<U;){K=g[N];var J=K[0],ut=s[J],ft=K[1];if(H&&K[2]){if(ut===r&&!(J in s))return!1}else{var dt=new Ir;if(E)var mt=E(ut,ft,J,s,a,dt);if(!(mt===r?Ls(ft,ut,m|y,E,dt):mt))return!1}}return!0}function Rg(s){if(!ge(s)||Lk(s))return!1;var a=nn(s)?JM:qN;return a.test(Zn(s))}function tk(s){return ye(s)&&je(s)==pt}function ek(s){return ye(s)&&Ue(s)==vt}function rk(s){return ye(s)&&Ga(s.length)&&!!ue[je(s)]}function Ig(s){return typeof s=="function"?s:s==null?Ke:typeof s=="object"?Mt(s)?Mg(s[0],s[1]):Ng(s):Qm(s)}function Sf(s){if(!Ds(s))return s3(s);var a=[];for(var g in ie(s))re.call(s,g)&&g!="constructor"&&a.push(g);return a}function nk(s){if(!ge(s))return Uk(s);var a=Ds(s),g=[];for(var E in s)E=="constructor"&&(a||!re.call(s,E))||g.push(E);return g}function Af(s,a){return s<a}function Pg(s,a){var g=-1,E=We(s)?st(s.length):[];return _n(s,function(N,U,H){E[++g]=a(N,U,H)}),E}function Ng(s){var a=Gf(s);return a.length==1&&a[0][2]?hm(a[0][0],a[0][1]):function(g){return g===s||Ef(g,s,a)}}function Mg(s,a){return qf(s)&&cm(a)?hm(qr(s),a):function(g){var E=Jf(g,s);return E===r&&E===a?tc(g,s):Ls(a,E,m|y)}}function Sa(s,a,g,E,N){s!==a&&bf(a,function(U,H){if(N||(N=new Ir),ge(U))ik(s,a,H,g,Sa,E,N);else{var K=E?E(Hf(s,H),U,H+"",s,a,N):r;K===r&&(K=U),yf(s,H,K)}},Xe)}function ik(s,a,g,E,N,U,H){var K=Hf(s,g),J=Hf(a,g),ut=H.get(J);if(ut){yf(s,g,ut);return}var ft=U?U(K,J,g+"",s,a,H):r,dt=ft===r;if(dt){var mt=Mt(J),wt=!mt&&Tn(J),Ot=!mt&&!wt&&Wi(J);ft=J,mt||wt||Ot?Mt(K)?ft=K:be(K)?ft=Ve(K):wt?(dt=!1,ft=Hg(J,!0)):Ot?(dt=!1,ft=Vg(J,!0)):ft=[]:$s(J)||Qn(J)?(ft=K,Qn(K)?ft=jm(K):(!ge(K)||nn(K))&&(ft=fm(J))):dt=!1}dt&&(H.set(J,ft),N(ft,J,E,U,H),H.delete(J)),yf(s,g,ft)}function kg(s,a){var g=s.length;if(g)return a+=a<0?g:0,rn(a,g)?s[a]:r}function Lg(s,a,g){a.length?a=he(a,function(U){return Mt(U)?function(H){return Kn(H,U.length===1?U[0]:U)}:U}):a=[Ke];var E=-1;a=he(a,er(At()));var N=Pg(s,function(U,H,K){var J=he(a,function(ut){return ut(U)});return{criteria:J,index:++E,value:U}});return PM(N,function(U,H){return mk(U,H,g)})}function sk(s,a){return Fg(s,a,function(g,E){return tc(s,E)})}function Fg(s,a,g){for(var E=-1,N=a.length,U={};++E<N;){var H=a[E],K=Kn(s,H);g(K,H)&&Fs(U,xn(H,s),K)}return U}function ok(s){return function(a){return Kn(a,s)}}function Of(s,a,g,E){var N=E?IM:Fi,U=-1,H=a.length,K=s;for(s===a&&(a=Ve(a)),g&&(K=he(s,er(g)));++U<H;)for(var J=0,ut=a[U],ft=g?g(ut):ut;(J=N(K,ft,J,E))>-1;)K!==s&&va.call(K,J,1),va.call(s,J,1);return s}function Bg(s,a){for(var g=s?a.length:0,E=g-1;g--;){var N=a[g];if(g==E||N!==U){var U=N;rn(N)?va.call(s,N,1):Pf(s,N)}}return s}function Cf(s,a){return s+ya(mg()*(a-s+1))}function ak(s,a,g,E){for(var N=-1,U=Ae(ma((a-s)/(g||1)),0),H=st(U);U--;)H[E?U:++N]=s,s+=g;return H}function Rf(s,a){var g="";if(!s||a<1||a>it)return g;do a%2&&(g+=s),a=ya(a/2),a&&(s+=s);while(a);return g}function Bt(s,a){return Vf(dm(s,a,Ke),s+"")}function lk(s){return bg(Xi(s))}function uk(s,a){var g=Xi(s);return La(g,Xn(a,0,g.length))}function Fs(s,a,g,E){if(!ge(s))return s;a=xn(a,s);for(var N=-1,U=a.length,H=U-1,K=s;K!=null&&++N<U;){var J=qr(a[N]),ut=g;if(J==="__proto__"||J==="constructor"||J==="prototype")return s;if(N!=H){var ft=K[J];ut=E?E(ft,J,K):r,ut===r&&(ut=ge(ft)?ft:rn(a[N+1])?[]:{})}Ns(K,J,ut),K=K[J]}return s}var Dg=_a?function(s,a){return _a.set(s,a),s}:Ke,fk=ga?function(s,a){return ga(s,"toString",{configurable:!0,enumerable:!1,value:rc(a),writable:!0})}:Ke;function ck(s){return La(Xi(s))}function pr(s,a,g){var E=-1,N=s.length;a<0&&(a=-a>N?0:N+a),g=g>N?N:g,g<0&&(g+=N),N=a>g?0:g-a>>>0,a>>>=0;for(var U=st(N);++E<N;)U[E]=s[E+a];return U}function hk(s,a){var g;return _n(s,function(E,N,U){return g=a(E,N,U),!g}),!!g}function Aa(s,a,g){var E=0,N=s==null?E:s.length;if(typeof a=="number"&&a===a&&N<=G){for(;E<N;){var U=E+N>>>1,H=s[U];H!==null&&!nr(H)&&(g?H<=a:H<a)?E=U+1:N=U}return N}return If(s,a,Ke,g)}function If(s,a,g,E){var N=0,U=s==null?0:s.length;if(U===0)return 0;a=g(a);for(var H=a!==a,K=a===null,J=nr(a),ut=a===r;N<U;){var ft=ya((N+U)/2),dt=g(s[ft]),mt=dt!==r,wt=dt===null,Ot=dt===dt,Ft=nr(dt);if(H)var Ct=E||Ot;else ut?Ct=Ot&&(E||mt):K?Ct=Ot&&mt&&(E||!wt):J?Ct=Ot&&mt&&!wt&&(E||!Ft):wt||Ft?Ct=!1:Ct=E?dt<=a:dt<a;Ct?N=ft+1:U=ft}return De(U,j)}function Ug(s,a){for(var g=-1,E=s.length,N=0,U=[];++g<E;){var H=s[g],K=a?a(H):H;if(!g||!Pr(K,J)){var J=K;U[N++]=H===0?0:H}}return U}function $g(s){return typeof s=="number"?s:nr(s)?D:+s}function rr(s){if(typeof s=="string")return s;if(Mt(s))return he(s,rr)+"";if(nr(s))return yg?yg.call(s):"";var a=s+"";return a=="0"&&1/s==-z?"-0":a}function bn(s,a,g){var E=-1,N=sa,U=s.length,H=!0,K=[],J=K;if(g)H=!1,N=sf;else if(U>=i){var ut=a?null:Tk(s);if(ut)return aa(ut);H=!1,N=As,J=new Wn}else J=a?[]:K;t:for(;++E<U;){var ft=s[E],dt=a?a(ft):ft;if(ft=g||ft!==0?ft:0,H&&dt===dt){for(var mt=J.length;mt--;)if(J[mt]===dt)continue t;a&&J.push(dt),K.push(ft)}else N(J,dt,g)||(J!==K&&J.push(dt),K.push(ft))}return K}function Pf(s,a){return a=xn(a,s),s=pm(s,a),s==null||delete s[qr(vr(a))]}function Gg(s,a,g,E){return Fs(s,a,g(Kn(s,a)),E)}function Oa(s,a,g,E){for(var N=s.length,U=E?N:-1;(E?U--:++U<N)&&a(s[U],U,s););return g?pr(s,E?0:U,E?U+1:N):pr(s,E?U+1:0,E?N:U)}function jg(s,a){var g=s;return g instanceof jt&&(g=g.value()),of(a,function(E,N){return N.func.apply(N.thisArg,gn([E],N.args))},g)}function Nf(s,a,g){var E=s.length;if(E<2)return E?bn(s[0]):[];for(var N=-1,U=st(E);++N<E;)for(var H=s[N],K=-1;++K<E;)K!=N&&(U[N]=Ms(U[N]||H,s[K],a,g));return bn(Me(U,1),a,g)}function qg(s,a,g){for(var E=-1,N=s.length,U=a.length,H={};++E<N;){var K=E<U?a[E]:r;g(H,s[E],K)}return H}function Mf(s){return be(s)?s:[]}function kf(s){return typeof s=="function"?s:Ke}function xn(s,a){return Mt(s)?s:qf(s,a)?[s]:ym(Jt(s))}var dk=Bt;function wn(s,a,g){var E=s.length;return g=g===r?E:g,!a&&g>=E?s:pr(s,a,g)}var zg=t3||function(s){return Ne.clearTimeout(s)};function Hg(s,a){if(a)return s.slice();var g=s.length,E=hg?hg(g):new s.constructor(g);return s.copy(E),E}function Lf(s){var a=new s.constructor(s.byteLength);return new da(a).set(new da(s)),a}function pk(s,a){var g=a?Lf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.byteLength)}function vk(s){var a=new s.constructor(s.source,Cv.exec(s));return a.lastIndex=s.lastIndex,a}function gk(s){return Ps?ie(Ps.call(s)):{}}function Vg(s,a){var g=a?Lf(s.buffer):s.buffer;return new s.constructor(g,s.byteOffset,s.length)}function Wg(s,a){if(s!==a){var g=s!==r,E=s===null,N=s===s,U=nr(s),H=a!==r,K=a===null,J=a===a,ut=nr(a);if(!K&&!ut&&!U&&s>a||U&&H&&J&&!K&&!ut||E&&H&&J||!g&&J||!N)return 1;if(!E&&!U&&!ut&&s<a||ut&&g&&N&&!E&&!U||K&&g&&N||!H&&N||!J)return-1}return 0}function mk(s,a,g){for(var E=-1,N=s.criteria,U=a.criteria,H=N.length,K=g.length;++E<H;){var J=Wg(N[E],U[E]);if(J){if(E>=K)return J;var ut=g[E];return J*(ut=="desc"?-1:1)}}return s.index-a.index}function Xg(s,a,g,E){for(var N=-1,U=s.length,H=g.length,K=-1,J=a.length,ut=Ae(U-H,0),ft=st(J+ut),dt=!E;++K<J;)ft[K]=a[K];for(;++N<H;)(dt||N<U)&&(ft[g[N]]=s[N]);for(;ut--;)ft[K++]=s[N++];return ft}function Kg(s,a,g,E){for(var N=-1,U=s.length,H=-1,K=g.length,J=-1,ut=a.length,ft=Ae(U-K,0),dt=st(ft+ut),mt=!E;++N<ft;)dt[N]=s[N];for(var wt=N;++J<ut;)dt[wt+J]=a[J];for(;++H<K;)(mt||N<U)&&(dt[wt+g[H]]=s[N++]);return dt}function Ve(s,a){var g=-1,E=s.length;for(a||(a=st(E));++g<E;)a[g]=s[g];return a}function jr(s,a,g,E){var N=!g;g||(g={});for(var U=-1,H=a.length;++U<H;){var K=a[U],J=E?E(g[K],s[K],K,g,s):r;J===r&&(J=s[K]),N?Jr(g,K,J):Ns(g,K,J)}return g}function yk(s,a){return jr(s,jf(s),a)}function _k(s,a){return jr(s,lm(s),a)}function Ca(s,a){return function(g,E){var N=Mt(g)?EM:G3,U=a?a():{};return N(g,s,At(E,2),U)}}function zi(s){return Bt(function(a,g){var E=-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),a=ie(a);++E<N;){var K=g[E];K&&s(a,K,E,U)}return a})}function Yg(s,a){return function(g,E){if(g==null)return g;if(!We(g))return s(g,E);for(var N=g.length,U=a?N:-1,H=ie(g);(a?U--:++U<N)&&E(H[U],U,H)!==!1;);return g}}function Zg(s){return function(a,g,E){for(var N=-1,U=ie(a),H=E(a),K=H.length;K--;){var J=H[s?K:++N];if(g(U[J],J,U)===!1)break}return a}}function bk(s,a,g){var E=a&_,N=Bs(s);function U(){var H=this&&this!==Ne&&this instanceof U?N:s;return H.apply(E?g:this,arguments)}return U}function Qg(s){return function(a){a=Jt(a);var g=Bi(a)?Rr(a):r,E=g?g[0]:a.charAt(0),N=g?wn(g,1).join(""):a.slice(1);return E[s]()+N}}function Hi(s){return function(a){return of(Ym(Km(a).replace(fM,"")),s,"")}}function Bs(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var g=qi(s.prototype),E=s.apply(g,a);return ge(E)?E:g}}function xk(s,a,g){var E=Bs(s);function N(){for(var U=arguments.length,H=st(U),K=U,J=Vi(N);K--;)H[K]=arguments[K];var ut=U<3&&H[0]!==J&&H[U-1]!==J?[]:mn(H,J);if(U-=ut.length,U<g)return nm(s,a,Ra,N.placeholder,r,H,ut,r,r,g-U);var ft=this&&this!==Ne&&this instanceof N?E:s;return tr(ft,this,H)}return N}function Jg(s){return function(a,g,E){var N=ie(a);if(!We(a)){var U=At(g,3);a=Ie(a),g=function(K){return U(N[K],K,N)}}var H=s(a,g,E);return H>-1?N[U?a[H]:H]:r}}function tm(s){return en(function(a){var g=a.length,E=g,N=hr.prototype.thru;for(s&&a.reverse();E--;){var U=a[E];if(typeof U!="function")throw new cr(l);if(N&&!H&&Ma(U)=="wrapper")var H=new hr([],!0)}for(E=H?E:g;++E<g;){U=a[E];var K=Ma(U),J=K=="wrapper"?$f(U):r;J&&zf(J[0])&&J[1]==(A|T|S|O)&&!J[4].length&&J[9]==1?H=H[Ma(J[0])].apply(H,J[3]):H=U.length==1&&zf(U)?H[K]():H.thru(U)}return function(){var ut=arguments,ft=ut[0];if(H&&ut.length==1&&Mt(ft))return H.plant(ft).value();for(var dt=0,mt=g?a[dt].apply(this,ut):ft;++dt<g;)mt=a[dt].call(this,mt);return mt}})}function Ra(s,a,g,E,N,U,H,K,J,ut){var ft=a&A,dt=a&_,mt=a&b,wt=a&(T|x),Ot=a&L,Ft=mt?r:Bs(s);function Ct(){for(var $t=arguments.length,zt=st($t),ir=$t;ir--;)zt[ir]=arguments[ir];if(wt)var ze=Vi(Ct),sr=MM(zt,ze);if(E&&(zt=Xg(zt,E,N,wt)),U&&(zt=Kg(zt,U,H,wt)),$t-=sr,wt&&$t<ut){var xe=mn(zt,ze);return nm(s,a,Ra,Ct.placeholder,g,zt,xe,K,J,ut-$t)}var Nr=dt?g:this,on=mt?Nr[s]:s;return $t=zt.length,K?zt=Gk(zt,K):Ot&&$t>1&&zt.reverse(),ft&&J<$t&&(zt.length=J),this&&this!==Ne&&this instanceof Ct&&(on=Ft||Bs(on)),on.apply(Nr,zt)}return Ct}function em(s,a){return function(g,E){return K3(g,s,a(E),{})}}function Ia(s,a){return function(g,E){var N;if(g===r&&E===r)return a;if(g!==r&&(N=g),E!==r){if(N===r)return E;typeof g=="string"||typeof E=="string"?(g=rr(g),E=rr(E)):(g=$g(g),E=$g(E)),N=s(g,E)}return N}}function Ff(s){return en(function(a){return a=he(a,er(At())),Bt(function(g){var E=this;return s(a,function(N){return tr(N,E,g)})})})}function Pa(s,a){a=a===r?" ":rr(a);var g=a.length;if(g<2)return g?Rf(a,s):a;var E=Rf(a,ma(s/Di(a)));return Bi(a)?wn(Rr(E),0,s).join(""):E.slice(0,s)}function wk(s,a,g,E){var N=a&_,U=Bs(s);function H(){for(var K=-1,J=arguments.length,ut=-1,ft=E.length,dt=st(ft+J),mt=this&&this!==Ne&&this instanceof H?U:s;++ut<ft;)dt[ut]=E[ut];for(;J--;)dt[ut++]=arguments[++K];return tr(mt,N?g:this,dt)}return H}function rm(s){return function(a,g,E){return E&&typeof E!="number"&&qe(a,g,E)&&(g=E=r),a=sn(a),g===r?(g=a,a=0):g=sn(g),E=E===r?a<g?1:-1:sn(E),ak(a,g,E,s)}}function Na(s){return function(a,g){return typeof a=="string"&&typeof g=="string"||(a=gr(a),g=gr(g)),s(a,g)}}function nm(s,a,g,E,N,U,H,K,J,ut){var ft=a&T,dt=ft?H:r,mt=ft?r:H,wt=ft?U:r,Ot=ft?r:U;a|=ft?S:I,a&=~(ft?I:S),a&w||(a&=~(_|b));var Ft=[s,a,N,wt,dt,Ot,mt,K,J,ut],Ct=g.apply(r,Ft);return zf(s)&&vm(Ct,Ft),Ct.placeholder=E,gm(Ct,s,a)}function Bf(s){var a=Se[s];return function(g,E){if(g=gr(g),E=E==null?0:De(kt(E),292),E&&gg(g)){var N=(Jt(g)+"e").split("e"),U=a(N[0]+"e"+(+N[1]+E));return N=(Jt(U)+"e").split("e"),+(N[0]+"e"+(+N[1]-E))}return a(g)}}var Tk=Gi&&1/aa(new Gi([,-0]))[1]==z?function(s){return new Gi(s)}:sc;function im(s){return function(a){var g=Ue(a);return g==yt?df(a):g==vt?$M(a):NM(a,s(a))}}function tn(s,a,g,E,N,U,H,K){var J=a&b;if(!J&&typeof s!="function")throw new cr(l);var ut=E?E.length:0;if(ut||(a&=~(S|I),E=N=r),H=H===r?H:Ae(kt(H),0),K=K===r?K:kt(K),ut-=N?N.length:0,a&I){var ft=E,dt=N;E=N=r}var mt=J?r:$f(s),wt=[s,a,g,E,N,ft,dt,U,H,K];if(mt&&Dk(wt,mt),s=wt[0],a=wt[1],g=wt[2],E=wt[3],N=wt[4],K=wt[9]=wt[9]===r?J?0:s.length:Ae(wt[9]-ut,0),!K&&a&(T|x)&&(a&=~(T|x)),!a||a==_)var Ot=bk(s,a,g);else a==T||a==x?Ot=xk(s,a,K):(a==S||a==(_|S))&&!N.length?Ot=wk(s,a,g,E):Ot=Ra.apply(r,wt);var Ft=mt?Dg:vm;return gm(Ft(Ot,wt),s,a)}function sm(s,a,g,E){return s===r||Pr(s,$i[g])&&!re.call(E,g)?a:s}function om(s,a,g,E,N,U){return ge(s)&&ge(a)&&(U.set(a,s),Sa(s,a,r,om,U),U.delete(a)),s}function Ek(s){return $s(s)?r:s}function am(s,a,g,E,N,U){var H=g&m,K=s.length,J=a.length;if(K!=J&&!(H&&J>K))return!1;var ut=U.get(s),ft=U.get(a);if(ut&&ft)return ut==a&&ft==s;var dt=-1,mt=!0,wt=g&y?new Wn:r;for(U.set(s,a),U.set(a,s);++dt<K;){var Ot=s[dt],Ft=a[dt];if(E)var Ct=H?E(Ft,Ot,dt,a,s,U):E(Ot,Ft,dt,s,a,U);if(Ct!==r){if(Ct)continue;mt=!1;break}if(wt){if(!af(a,function($t,zt){if(!As(wt,zt)&&(Ot===$t||N(Ot,$t,g,E,U)))return wt.push(zt)})){mt=!1;break}}else if(!(Ot===Ft||N(Ot,Ft,g,E,U))){mt=!1;break}}return U.delete(s),U.delete(a),mt}function Sk(s,a,g,E,N,U,H){switch(g){case Qt:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case Ge:return!(s.byteLength!=a.byteLength||!U(new da(s),new da(a)));case tt:case et:case St:return Pr(+s,+a);case ot:return s.name==a.name&&s.message==a.message;case pt:case ht:return s==a+"";case yt:var K=df;case vt:var J=E&m;if(K||(K=aa),s.size!=a.size&&!J)return!1;var ut=H.get(s);if(ut)return ut==a;E|=y,H.set(s,a);var ft=am(K(s),K(a),E,N,U,H);return H.delete(s),ft;case Pt:if(Ps)return Ps.call(s)==Ps.call(a)}return!1}function Ak(s,a,g,E,N,U){var H=g&m,K=Df(s),J=K.length,ut=Df(a),ft=ut.length;if(J!=ft&&!H)return!1;for(var dt=J;dt--;){var mt=K[dt];if(!(H?mt in a:re.call(a,mt)))return!1}var wt=U.get(s),Ot=U.get(a);if(wt&&Ot)return wt==a&&Ot==s;var Ft=!0;U.set(s,a),U.set(a,s);for(var Ct=H;++dt<J;){mt=K[dt];var $t=s[mt],zt=a[mt];if(E)var ir=H?E(zt,$t,mt,a,s,U):E($t,zt,mt,s,a,U);if(!(ir===r?$t===zt||N($t,zt,g,E,U):ir)){Ft=!1;break}Ct||(Ct=mt=="constructor")}if(Ft&&!Ct){var ze=s.constructor,sr=a.constructor;ze!=sr&&"constructor"in s&&"constructor"in a&&!(typeof ze=="function"&&ze instanceof ze&&typeof sr=="function"&&sr instanceof sr)&&(Ft=!1)}return U.delete(s),U.delete(a),Ft}function en(s){return Vf(dm(s,r,wm),s+"")}function Df(s){return Og(s,Ie,jf)}function Uf(s){return Og(s,Xe,lm)}var $f=_a?function(s){return _a.get(s)}:sc;function Ma(s){for(var a=s.name+"",g=ji[a],E=re.call(ji,a)?g.length:0;E--;){var N=g[E],U=N.func;if(U==null||U==s)return N.name}return a}function Vi(s){var a=re.call(B,"placeholder")?B:s;return a.placeholder}function At(){var s=B.iteratee||nc;return s=s===nc?Ig:s,arguments.length?s(arguments[0],arguments[1]):s}function ka(s,a){var g=s.__data__;return kk(a)?g[typeof a=="string"?"string":"hash"]:g.map}function Gf(s){for(var a=Ie(s),g=a.length;g--;){var E=a[g],N=s[E];a[g]=[E,N,cm(N)]}return a}function Yn(s,a){var g=BM(s,a);return Rg(g)?g:r}function Ok(s){var a=re.call(s,Hn),g=s[Hn];try{s[Hn]=r;var E=!0}catch{}var N=ca.call(s);return E&&(a?s[Hn]=g:delete s[Hn]),N}var jf=vf?function(s){return s==null?[]:(s=ie(s),vn(vf(s),function(a){return pg.call(s,a)}))}:oc,lm=vf?function(s){for(var a=[];s;)gn(a,jf(s)),s=pa(s);return a}:oc,Ue=je;(gf&&Ue(new gf(new ArrayBuffer(1)))!=Qt||Cs&&Ue(new Cs)!=yt||mf&&Ue(mf.resolve())!=nt||Gi&&Ue(new Gi)!=vt||Rs&&Ue(new Rs)!=Nt)&&(Ue=function(s){var a=je(s),g=a==Ut?s.constructor:r,E=g?Zn(g):"";if(E)switch(E){case u3:return Qt;case f3:return yt;case c3:return nt;case h3:return vt;case d3:return Nt}return a});function Ck(s,a,g){for(var E=-1,N=g.length;++E<N;){var U=g[E],H=U.size;switch(U.type){case"drop":s+=H;break;case"dropRight":a-=H;break;case"take":a=De(a,s+H);break;case"takeRight":s=Ae(s,a-H);break}}return{start:s,end:a}}function Rk(s){var a=s.match(LN);return a?a[1].split(FN):[]}function um(s,a,g){a=xn(a,s);for(var E=-1,N=a.length,U=!1;++E<N;){var H=qr(a[E]);if(!(U=s!=null&&g(s,H)))break;s=s[H]}return U||++E!=N?U:(N=s==null?0:s.length,!!N&&Ga(N)&&rn(H,N)&&(Mt(s)||Qn(s)))}function Ik(s){var a=s.length,g=new s.constructor(a);return a&&typeof s[0]=="string"&&re.call(s,"index")&&(g.index=s.index,g.input=s.input),g}function fm(s){return typeof s.constructor=="function"&&!Ds(s)?qi(pa(s)):{}}function Pk(s,a,g){var E=s.constructor;switch(a){case Ge:return Lf(s);case tt:case et:return new E(+s);case Qt:return pk(s,g);case Ss:case ce:case lr:case qu:case zu:case Hu:case Vu:case Wu:case Xu:return Vg(s,g);case yt:return new E;case St:case ht:return new E(s);case pt:return vk(s);case vt:return new E;case Pt:return gk(s)}}function Nk(s,a){var g=a.length;if(!g)return s;var E=g-1;return a[E]=(g>1?"& ":"")+a[E],a=a.join(g>2?", ":" "),s.replace(kN,`{
1931
1942
  /* [wrapped with `+a+`] */
1932
- `)}function Rk(s){return Mt(s)||Zn(s)||!!(dg&&s&&s[dg])}function en(s,a){var g=typeof s;return a=a??nt,!!a&&(g=="number"||g!="symbol"&&GN.test(s))&&s>-1&&s%1==0&&s<a}function qe(s,a,g){if(!ge(g))return!1;var E=typeof a;return(E=="number"?We(g)&&en(a,g.length):E=="string"&&a in g)?Pr(g[a],s):!1}function jf(s,a){if(Mt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||nr(s)?!0:AN.test(s)||!SN.test(s)||a!=null&&s in ie(a)}function Ik(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function qf(s){var a=Ma(s),g=B[a];if(typeof g!="function"||!(a in jt.prototype))return!1;if(s===g)return!0;var E=Uf(g);return!!E&&s===E[0]}function Pk(s){return!!ug&&ug in s}var Nk=ua?rn:oc;function Ds(s){var a=s&&s.constructor,g=typeof a=="function"&&a.prototype||Ui;return s===g}function um(s){return s===s&&!ge(s)}function fm(s,a){return function(g){return g==null?!1:g[s]===a&&(a!==r||s in ie(g))}}function Mk(s){var a=Ua(s,function(E){return g.size===h&&g.clear(),E}),g=a.cache;return a}function kk(s,a){var g=s[1],E=a[1],N=g|E,U=N<(b|_|A),H=E==A&&g==T||E==A&&g==O&&s[7].length<=a[8]||E==(A|O)&&a[7].length<=a[8]&&g==T;if(!(U||H))return s;E&b&&(s[2]=a[2],N|=g&b?0:w);var K=a[3];if(K){var J=s[3];s[3]=J?Vg(J,K,a[4]):K,s[4]=J?mn(s[3],p):a[4]}return K=a[5],K&&(J=s[5],s[5]=J?Wg(J,K,a[6]):K,s[6]=J?mn(s[5],p):a[6]),K=a[7],K&&(s[7]=K),E&A&&(s[8]=s[8]==null?a[8]:De(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=N,s}function Lk(s){var a=[];if(s!=null)for(var g in ie(s))a.push(g);return a}function Fk(s){return ca.call(s)}function cm(s,a,g){return a=Ae(a===r?s.length-1:a,0),function(){for(var E=arguments,N=-1,U=Ae(E.length-a,0),H=ot(U);++N<U;)H[N]=E[a+N];N=-1;for(var K=ot(a+1);++N<a;)K[N]=E[N];return K[a]=g(H),tr(s,this,K)}}function hm(s,a){return a.length<2?s:Xn(s,pr(a,0,-1))}function Bk(s,a){for(var g=s.length,E=De(a.length,g),N=Ve(s);E--;){var U=a[E];s[E]=en(U,g)?N[U]:r}return s}function zf(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var dm=vm(Fg),Us=QM||function(s,a){return Ne.setTimeout(s,a)},Hf=vm(ok);function pm(s,a,g){var E=a+"";return Hf(s,Ck(E,Dk(Sk(E),g)))}function vm(s){var a=0,g=0;return function(){var E=r3(),N=M-(E-g);if(g=E,N>0){if(++a>=P)return arguments[0]}else a=0;return s.apply(r,arguments)}}function La(s,a){var g=-1,E=s.length,N=E-1;for(a=a===r?E:a;++g<a;){var U=Of(g,N),H=s[U];s[U]=s[g],s[g]=H}return s.length=a,s}var gm=Mk(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(ON,function(g,E,N,U){a.push(N?U.replace(LN,"$1"):E||g)}),a});function qr(s){if(typeof s=="string"||nr(s))return s;var a=s+"";return a=="0"&&1/s==-z?"-0":a}function Yn(s){if(s!=null){try{return fa.call(s)}catch{}try{return s+""}catch{}}return""}function Dk(s,a){return fr(Y,function(g){var E="_."+g[0];a&g[1]&&!sa(s,E)&&s.push(E)}),s.sort()}function mm(s){if(s instanceof jt)return s.clone();var a=new hr(s.__wrapped__,s.__chain__);return a.__actions__=Ve(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function Uk(s,a,g){(g?qe(s,a,g):a===r)?a=1:a=Ae(kt(a),0);var E=s==null?0:s.length;if(!E||a<1)return[];for(var N=0,U=0,H=ot(ma(E/a));N<E;)H[U++]=pr(s,N,N+=a);return H}function $k(s){for(var a=-1,g=s==null?0:s.length,E=0,N=[];++a<g;){var U=s[a];U&&(N[E++]=U)}return N}function Gk(){var s=arguments.length;if(!s)return[];for(var a=ot(s-1),g=arguments[0],E=s;E--;)a[E-1]=arguments[E];return gn(Mt(g)?Ve(g):[g],Me(a,1))}var jk=Dt(function(s,a){return be(s)?Ms(s,Me(a,1,be,!0)):[]}),qk=Dt(function(s,a){var g=vr(a);return be(g)&&(g=r),be(s)?Ms(s,Me(a,1,be,!0),At(g,2)):[]}),zk=Dt(function(s,a){var g=vr(a);return be(g)&&(g=r),be(s)?Ms(s,Me(a,1,be,!0),r,g):[]});function Hk(s,a,g){var E=s==null?0:s.length;return E?(a=g||a===r?1:kt(a),pr(s,a<0?0:a,E)):[]}function Vk(s,a,g){var E=s==null?0:s.length;return E?(a=g||a===r?1:kt(a),a=E-a,pr(s,0,a<0?0:a)):[]}function Wk(s,a){return s&&s.length?Oa(s,At(a,3),!0,!0):[]}function Xk(s,a){return s&&s.length?Oa(s,At(a,3),!0):[]}function Kk(s,a,g,E){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&qe(s,a,g)&&(g=0,E=N),G3(s,a,g,E)):[]}function ym(s,a,g){var E=s==null?0:s.length;if(!E)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(E+N,0)),oa(s,At(a,3),N)}function _m(s,a,g){var E=s==null?0:s.length;if(!E)return-1;var N=E-1;return g!==r&&(N=kt(g),N=g<0?Ae(E+N,0):De(N,E-1)),oa(s,At(a,3),N,!0)}function bm(s){var a=s==null?0:s.length;return a?Me(s,1):[]}function Yk(s){var a=s==null?0:s.length;return a?Me(s,z):[]}function Zk(s,a){var g=s==null?0:s.length;return g?(a=a===r?1:kt(a),Me(s,a)):[]}function Qk(s){for(var a=-1,g=s==null?0:s.length,E={};++a<g;){var N=s[a];E[N[0]]=N[1]}return E}function xm(s){return s&&s.length?s[0]:r}function Jk(s,a,g){var E=s==null?0:s.length;if(!E)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(E+N,0)),Li(s,a,N)}function t5(s){var a=s==null?0:s.length;return a?pr(s,0,-1):[]}var e5=Dt(function(s){var a=he(s,Nf);return a.length&&a[0]===s[0]?wf(a):[]}),r5=Dt(function(s){var a=vr(s),g=he(s,Nf);return a===vr(g)?a=r:g.pop(),g.length&&g[0]===s[0]?wf(g,At(a,2)):[]}),n5=Dt(function(s){var a=vr(s),g=he(s,Nf);return a=typeof a=="function"?a:r,a&&g.pop(),g.length&&g[0]===s[0]?wf(g,r,a):[]});function i5(s,a){return s==null?"":t3.call(s,a)}function vr(s){var a=s==null?0:s.length;return a?s[a-1]:r}function s5(s,a,g){var E=s==null?0:s.length;if(!E)return-1;var N=E;return g!==r&&(N=kt(g),N=N<0?Ae(E+N,0):De(N,E-1)),a===a?DM(s,a,N):oa(s,eg,N,!0)}function o5(s,a){return s&&s.length?Ng(s,kt(a)):r}var a5=Dt(wm);function wm(s,a){return s&&s.length&&a&&a.length?Af(s,a):s}function l5(s,a,g){return s&&s.length&&a&&a.length?Af(s,a,At(g,2)):s}function u5(s,a,g){return s&&s.length&&a&&a.length?Af(s,a,r,g):s}var f5=tn(function(s,a){var g=s==null?0:s.length,E=yf(s,a);return Lg(s,he(a,function(N){return en(N,g)?+N:N}).sort(Hg)),E});function c5(s,a){var g=[];if(!(s&&s.length))return g;var E=-1,N=[],U=s.length;for(a=At(a,3);++E<U;){var H=s[E];a(H,E,s)&&(g.push(H),N.push(E))}return Lg(s,N),g}function Vf(s){return s==null?s:i3.call(s)}function h5(s,a,g){var E=s==null?0:s.length;return E?(g&&typeof g!="number"&&qe(s,a,g)?(a=0,g=E):(a=a==null?0:kt(a),g=g===r?E:kt(g)),pr(s,a,g)):[]}function d5(s,a){return Aa(s,a)}function p5(s,a,g){return Rf(s,a,At(g,2))}function v5(s,a){var g=s==null?0:s.length;if(g){var E=Aa(s,a);if(E<g&&Pr(s[E],a))return E}return-1}function g5(s,a){return Aa(s,a,!0)}function m5(s,a,g){return Rf(s,a,At(g,2),!0)}function y5(s,a){var g=s==null?0:s.length;if(g){var E=Aa(s,a,!0)-1;if(Pr(s[E],a))return E}return-1}function _5(s){return s&&s.length?Bg(s):[]}function b5(s,a){return s&&s.length?Bg(s,At(a,2)):[]}function x5(s){var a=s==null?0:s.length;return a?pr(s,1,a):[]}function w5(s,a,g){return s&&s.length?(a=g||a===r?1:kt(a),pr(s,0,a<0?0:a)):[]}function T5(s,a,g){var E=s==null?0:s.length;return E?(a=g||a===r?1:kt(a),a=E-a,pr(s,a<0?0:a,E)):[]}function E5(s,a){return s&&s.length?Oa(s,At(a,3),!1,!0):[]}function S5(s,a){return s&&s.length?Oa(s,At(a,3)):[]}var A5=Dt(function(s){return bn(Me(s,1,be,!0))}),O5=Dt(function(s){var a=vr(s);return be(a)&&(a=r),bn(Me(s,1,be,!0),At(a,2))}),C5=Dt(function(s){var a=vr(s);return a=typeof a=="function"?a:r,bn(Me(s,1,be,!0),r,a)});function R5(s){return s&&s.length?bn(s):[]}function I5(s,a){return s&&s.length?bn(s,At(a,2)):[]}function P5(s,a){return a=typeof a=="function"?a:r,s&&s.length?bn(s,r,a):[]}function Wf(s){if(!(s&&s.length))return[];var a=0;return s=vn(s,function(g){if(be(g))return a=Ae(g.length,a),!0}),ff(a,function(g){return he(s,af(g))})}function Tm(s,a){if(!(s&&s.length))return[];var g=Wf(s);return a==null?g:he(g,function(E){return tr(a,r,E)})}var N5=Dt(function(s,a){return be(s)?Ms(s,a):[]}),M5=Dt(function(s){return Pf(vn(s,be))}),k5=Dt(function(s){var a=vr(s);return be(a)&&(a=r),Pf(vn(s,be),At(a,2))}),L5=Dt(function(s){var a=vr(s);return a=typeof a=="function"?a:r,Pf(vn(s,be),r,a)}),F5=Dt(Wf);function B5(s,a){return Gg(s||[],a||[],Ns)}function D5(s,a){return Gg(s||[],a||[],Fs)}var U5=Dt(function(s){var a=s.length,g=a>1?s[a-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Tm(s,g)});function Em(s){var a=B(s);return a.__chain__=!0,a}function $5(s,a){return a(s),s}function Fa(s,a){return a(s)}var G5=tn(function(s){var a=s.length,g=a?s[0]:0,E=this.__wrapped__,N=function(U){return yf(U,s)};return a>1||this.__actions__.length||!(E instanceof jt)||!en(g)?this.thru(N):(E=E.slice(g,+g+(a?1:0)),E.__actions__.push({func:Fa,args:[N],thisArg:r}),new hr(E,this.__chain__).thru(function(U){return a&&!U.length&&U.push(r),U}))});function j5(){return Em(this)}function q5(){return new hr(this.value(),this.__chain__)}function z5(){this.__values__===r&&(this.__values__=Dm(this.value()));var s=this.__index__>=this.__values__.length,a=s?r:this.__values__[this.__index__++];return{done:s,value:a}}function H5(){return this}function V5(s){for(var a,g=this;g instanceof xa;){var E=mm(g);E.__index__=0,E.__values__=r,a?N.__wrapped__=E:a=E;var N=E;g=g.__wrapped__}return N.__wrapped__=s,a}function W5(){var s=this.__wrapped__;if(s instanceof jt){var a=s;return this.__actions__.length&&(a=new jt(this)),a=a.reverse(),a.__actions__.push({func:Fa,args:[Vf],thisArg:r}),new hr(a,this.__chain__)}return this.thru(Vf)}function X5(){return $g(this.__wrapped__,this.__actions__)}var K5=Ca(function(s,a,g){ee.call(s,g)?++s[g]:Qr(s,g,1)});function Y5(s,a,g){var E=Mt(s)?Jv:$3;return g&&qe(s,a,g)&&(a=r),E(s,At(a,3))}function Z5(s,a){var g=Mt(s)?vn:Tg;return g(s,At(a,3))}var Q5=Zg(ym),J5=Zg(_m);function tL(s,a){return Me(Ba(s,a),1)}function eL(s,a){return Me(Ba(s,a),z)}function rL(s,a,g){return g=g===r?1:kt(g),Me(Ba(s,a),g)}function Sm(s,a){var g=Mt(s)?fr:_n;return g(s,At(a,3))}function Am(s,a){var g=Mt(s)?xM:wg;return g(s,At(a,3))}var nL=Ca(function(s,a,g){ee.call(s,g)?s[g].push(a):Qr(s,g,[a])});function iL(s,a,g,E){s=We(s)?s:Wi(s),g=g&&!E?kt(g):0;var N=s.length;return g<0&&(g=Ae(N+g,0)),ja(s)?g<=N&&s.indexOf(a,g)>-1:!!N&&Li(s,a,g)>-1}var sL=Dt(function(s,a,g){var E=-1,N=typeof a=="function",U=We(s)?ot(s.length):[];return _n(s,function(H){U[++E]=N?tr(a,H,g):ks(H,a,g)}),U}),oL=Ca(function(s,a,g){Qr(s,g,a)});function Ba(s,a){var g=Mt(s)?he:Rg;return g(s,At(a,3))}function aL(s,a,g,E){return s==null?[]:(Mt(a)||(a=a==null?[]:[a]),g=E?r:g,Mt(g)||(g=g==null?[]:[g]),Mg(s,a,g))}var lL=Ca(function(s,a,g){s[g?0:1].push(a)},function(){return[[],[]]});function uL(s,a,g){var E=Mt(s)?sf:ng,N=arguments.length<3;return E(s,At(a,4),g,N,_n)}function fL(s,a,g){var E=Mt(s)?wM:ng,N=arguments.length<3;return E(s,At(a,4),g,N,wg)}function cL(s,a){var g=Mt(s)?vn:Tg;return g(s,$a(At(a,3)))}function hL(s){var a=Mt(s)?yg:ik;return a(s)}function dL(s,a,g){(g?qe(s,a,g):a===r)?a=1:a=kt(a);var E=Mt(s)?L3:sk;return E(s,a)}function pL(s){var a=Mt(s)?F3:ak;return a(s)}function vL(s){if(s==null)return 0;if(We(s))return ja(s)?Bi(s):s.length;var a=Ue(s);return a==yt||a==vt?s.size:Ef(s).length}function gL(s,a,g){var E=Mt(s)?of:lk;return g&&qe(s,a,g)&&(a=r),E(s,At(a,3))}var mL=Dt(function(s,a){if(s==null)return[];var g=a.length;return g>1&&qe(s,a[0],a[1])?a=[]:g>2&&qe(a[0],a[1],a[2])&&(a=[a[0]]),Mg(s,Me(a,1),[])}),Da=ZM||function(){return Ne.Date.now()};function yL(s,a){if(typeof a!="function")throw new cr(l);return s=kt(s),function(){if(--s<1)return a.apply(this,arguments)}}function Om(s,a,g){return a=g?r:a,a=s&&a==null?s.length:a,Jr(s,A,r,r,r,r,a)}function Cm(s,a){var g;if(typeof a!="function")throw new cr(l);return s=kt(s),function(){return--s>0&&(g=a.apply(this,arguments)),s<=1&&(a=r),g}}var Xf=Dt(function(s,a,g){var E=b;if(g.length){var N=mn(g,Hi(Xf));E|=S}return Jr(s,E,a,g,N)}),Rm=Dt(function(s,a,g){var E=b|_;if(g.length){var N=mn(g,Hi(Rm));E|=S}return Jr(a,E,s,g,N)});function Im(s,a,g){a=g?r:a;var E=Jr(s,T,r,r,r,r,r,a);return E.placeholder=Im.placeholder,E}function Pm(s,a,g){a=g?r:a;var E=Jr(s,x,r,r,r,r,r,a);return E.placeholder=Pm.placeholder,E}function Nm(s,a,g){var E,N,U,H,K,J,ut=0,ft=!1,ht=!1,mt=!0;if(typeof s!="function")throw new cr(l);a=gr(a)||0,ge(g)&&(ft=!!g.leading,ht="maxWait"in g,U=ht?Ae(gr(g.maxWait)||0,a):U,mt="trailing"in g?!!g.trailing:mt);function wt(xe){var Nr=E,sn=N;return E=N=r,ut=xe,H=s.apply(sn,Nr),H}function Ot(xe){return ut=xe,K=Us($t,a),ft?wt(xe):H}function Bt(xe){var Nr=xe-J,sn=xe-ut,Zm=a-Nr;return ht?De(Zm,U-sn):Zm}function Ct(xe){var Nr=xe-J,sn=xe-ut;return J===r||Nr>=a||Nr<0||ht&&sn>=U}function $t(){var xe=Da();if(Ct(xe))return zt(xe);K=Us($t,Bt(xe))}function zt(xe){return K=r,mt&&E?wt(xe):(E=N=r,H)}function ir(){K!==r&&jg(K),ut=0,E=J=N=K=r}function ze(){return K===r?H:zt(Da())}function sr(){var xe=Da(),Nr=Ct(xe);if(E=arguments,N=this,J=xe,Nr){if(K===r)return Ot(J);if(ht)return jg(K),K=Us($t,a),wt(J)}return K===r&&(K=Us($t,a)),H}return sr.cancel=ir,sr.flush=ze,sr}var _L=Dt(function(s,a){return xg(s,1,a)}),bL=Dt(function(s,a,g){return xg(s,gr(a)||0,g)});function xL(s){return Jr(s,L)}function Ua(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new cr(l);var g=function(){var E=arguments,N=a?a.apply(this,E):E[0],U=g.cache;if(U.has(N))return U.get(N);var H=s.apply(this,E);return g.cache=U.set(N,H)||U,H};return g.cache=new(Ua.Cache||Zr),g}Ua.Cache=Zr;function $a(s){if(typeof s!="function")throw new cr(l);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function wL(s){return Cm(2,s)}var TL=uk(function(s,a){a=a.length==1&&Mt(a[0])?he(a[0],er(At())):he(Me(a,1),er(At()));var g=a.length;return Dt(function(E){for(var N=-1,U=De(E.length,g);++N<U;)E[N]=a[N].call(this,E[N]);return tr(s,this,E)})}),Kf=Dt(function(s,a){var g=mn(a,Hi(Kf));return Jr(s,S,r,a,g)}),Mm=Dt(function(s,a){var g=mn(a,Hi(Mm));return Jr(s,I,r,a,g)}),EL=tn(function(s,a){return Jr(s,O,r,r,r,a)});function SL(s,a){if(typeof s!="function")throw new cr(l);return a=a===r?a:kt(a),Dt(s,a)}function AL(s,a){if(typeof s!="function")throw new cr(l);return a=a==null?0:Ae(kt(a),0),Dt(function(g){var E=g[a],N=wn(g,0,a);return E&&gn(N,E),tr(s,this,N)})}function OL(s,a,g){var E=!0,N=!0;if(typeof s!="function")throw new cr(l);return ge(g)&&(E="leading"in g?!!g.leading:E,N="trailing"in g?!!g.trailing:N),Nm(s,a,{leading:E,maxWait:a,trailing:N})}function CL(s){return Om(s,1)}function RL(s,a){return Kf(Mf(a),s)}function IL(){if(!arguments.length)return[];var s=arguments[0];return Mt(s)?s:[s]}function PL(s){return dr(s,v)}function NL(s,a){return a=typeof a=="function"?a:r,dr(s,v,a)}function ML(s){return dr(s,d|v)}function kL(s,a){return a=typeof a=="function"?a:r,dr(s,d|v,a)}function LL(s,a){return a==null||bg(s,a,Ie(a))}function Pr(s,a){return s===a||s!==s&&a!==a}var FL=Na(xf),BL=Na(function(s,a){return s>=a}),Zn=Ag(function(){return arguments}())?Ag:function(s){return me(s)&&ee.call(s,"callee")&&!hg.call(s,"callee")},Mt=ot.isArray,DL=Wv?er(Wv):V3;function We(s){return s!=null&&Ga(s.length)&&!rn(s)}function be(s){return me(s)&&We(s)}function UL(s){return s===!0||s===!1||me(s)&&je(s)==tt}var Tn=JM||oc,$L=Xv?er(Xv):W3;function GL(s){return me(s)&&s.nodeType===1&&!$s(s)}function jL(s){if(s==null)return!0;if(We(s)&&(Mt(s)||typeof s=="string"||typeof s.splice=="function"||Tn(s)||Vi(s)||Zn(s)))return!s.length;var a=Ue(s);if(a==yt||a==vt)return!s.size;if(Ds(s))return!Ef(s).length;for(var g in s)if(ee.call(s,g))return!1;return!0}function qL(s,a){return Ls(s,a)}function zL(s,a,g){g=typeof g=="function"?g:r;var E=g?g(s,a):r;return E===r?Ls(s,a,r,g):!!E}function Yf(s){if(!me(s))return!1;var a=je(s);return a==st||a==it||typeof s.message=="string"&&typeof s.name=="string"&&!$s(s)}function HL(s){return typeof s=="number"&&pg(s)}function rn(s){if(!ge(s))return!1;var a=je(s);return a==dt||a==gt||a==V||a==lt}function km(s){return typeof s=="number"&&s==kt(s)}function Ga(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=nt}function ge(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function me(s){return s!=null&&typeof s=="object"}var Lm=Kv?er(Kv):K3;function VL(s,a){return s===a||Tf(s,a,$f(a))}function WL(s,a,g){return g=typeof g=="function"?g:r,Tf(s,a,$f(a),g)}function XL(s){return Fm(s)&&s!=+s}function KL(s){if(Nk(s))throw new It(o);return Og(s)}function YL(s){return s===null}function ZL(s){return s==null}function Fm(s){return typeof s=="number"||me(s)&&je(s)==Tt}function $s(s){if(!me(s)||je(s)!=Lt)return!1;var a=pa(s);if(a===null)return!0;var g=ee.call(a,"constructor")&&a.constructor;return typeof g=="function"&&g instanceof g&&fa.call(g)==WM}var Zf=Yv?er(Yv):Y3;function QL(s){return km(s)&&s>=-nt&&s<=nt}var Bm=Zv?er(Zv):Z3;function ja(s){return typeof s=="string"||!Mt(s)&&me(s)&&je(s)==ct}function nr(s){return typeof s=="symbol"||me(s)&&je(s)==Pt}var Vi=Qv?er(Qv):Q3;function JL(s){return s===r}function tF(s){return me(s)&&Ue(s)==Nt}function eF(s){return me(s)&&je(s)==He}var rF=Na(Sf),nF=Na(function(s,a){return s<=a});function Dm(s){if(!s)return[];if(We(s))return ja(s)?Rr(s):Ve(s);if(Os&&s[Os])return LM(s[Os]());var a=Ue(s),g=a==yt?hf:a==vt?aa:Wi;return g(s)}function nn(s){if(!s)return s===0?s:0;if(s=gr(s),s===z||s===-z){var a=s<0?-1:1;return a*W}return s===s?s:0}function kt(s){var a=nn(s),g=a%1;return a===a?g?a-g:a:0}function Um(s){return s?Wn(kt(s),0,k):0}function gr(s){if(typeof s=="number")return s;if(nr(s))return D;if(ge(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=ge(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=ig(s);var g=DN.test(s);return g||$N.test(s)?yM(s.slice(2),g?2:8):BN.test(s)?D:+s}function $m(s){return jr(s,Xe(s))}function iF(s){return s?Wn(kt(s),-nt,nt):s===0?s:0}function Qt(s){return s==null?"":rr(s)}var sF=qi(function(s,a){if(Ds(a)||We(a)){jr(a,Ie(a),s);return}for(var g in a)ee.call(a,g)&&Ns(s,g,a[g])}),Gm=qi(function(s,a){jr(a,Xe(a),s)}),qa=qi(function(s,a,g,E){jr(a,Xe(a),s,E)}),oF=qi(function(s,a,g,E){jr(a,Ie(a),s,E)}),aF=tn(yf);function lF(s,a){var g=ji(s);return a==null?g:_g(g,a)}var uF=Dt(function(s,a){s=ie(s);var g=-1,E=a.length,N=E>2?a[2]:r;for(N&&qe(a[0],a[1],N)&&(E=1);++g<E;)for(var U=a[g],H=Xe(U),K=-1,J=H.length;++K<J;){var ut=H[K],ft=s[ut];(ft===r||Pr(ft,Ui[ut])&&!ee.call(s,ut))&&(s[ut]=U[ut])}return s}),fF=Dt(function(s){return s.push(r,im),tr(jm,r,s)});function cF(s,a){return tg(s,At(a,3),Gr)}function hF(s,a){return tg(s,At(a,3),bf)}function dF(s,a){return s==null?s:_f(s,At(a,3),Xe)}function pF(s,a){return s==null?s:Eg(s,At(a,3),Xe)}function vF(s,a){return s&&Gr(s,At(a,3))}function gF(s,a){return s&&bf(s,At(a,3))}function mF(s){return s==null?[]:Ea(s,Ie(s))}function yF(s){return s==null?[]:Ea(s,Xe(s))}function Qf(s,a,g){var E=s==null?r:Xn(s,a);return E===r?g:E}function _F(s,a){return s!=null&&am(s,a,j3)}function Jf(s,a){return s!=null&&am(s,a,q3)}var bF=Jg(function(s,a,g){a!=null&&typeof a.toString!="function"&&(a=ca.call(a)),s[a]=g},ec(Ke)),xF=Jg(function(s,a,g){a!=null&&typeof a.toString!="function"&&(a=ca.call(a)),ee.call(s,a)?s[a].push(g):s[a]=[g]},At),wF=Dt(ks);function Ie(s){return We(s)?mg(s):Ef(s)}function Xe(s){return We(s)?mg(s,!0):J3(s)}function TF(s,a){var g={};return a=At(a,3),Gr(s,function(E,N,U){Qr(g,a(E,N,U),E)}),g}function EF(s,a){var g={};return a=At(a,3),Gr(s,function(E,N,U){Qr(g,N,a(E,N,U))}),g}var SF=qi(function(s,a,g){Sa(s,a,g)}),jm=qi(function(s,a,g,E){Sa(s,a,g,E)}),AF=tn(function(s,a){var g={};if(s==null)return g;var E=!1;a=he(a,function(U){return U=xn(U,s),E||(E=U.length>1),U}),jr(s,Df(s),g),E&&(g=dr(g,d|c|v,bk));for(var N=a.length;N--;)If(g,a[N]);return g});function OF(s,a){return qm(s,$a(At(a)))}var CF=tn(function(s,a){return s==null?{}:ek(s,a)});function qm(s,a){if(s==null)return{};var g=he(Df(s),function(E){return[E]});return a=At(a),kg(s,g,function(E,N){return a(E,N[0])})}function RF(s,a,g){a=xn(a,s);var E=-1,N=a.length;for(N||(N=1,s=r);++E<N;){var U=s==null?r:s[qr(a[E])];U===r&&(E=N,U=g),s=rn(U)?U.call(s):U}return s}function IF(s,a,g){return s==null?s:Fs(s,a,g)}function PF(s,a,g,E){return E=typeof E=="function"?E:r,s==null?s:Fs(s,a,g,E)}var zm=rm(Ie),Hm=rm(Xe);function NF(s,a,g){var E=Mt(s),N=E||Tn(s)||Vi(s);if(a=At(a,4),g==null){var U=s&&s.constructor;N?g=E?new U:[]:ge(s)?g=rn(U)?ji(pa(s)):{}:g={}}return(N?fr:Gr)(s,function(H,K,J){return a(g,H,K,J)}),g}function MF(s,a){return s==null?!0:If(s,a)}function kF(s,a,g){return s==null?s:Ug(s,a,Mf(g))}function LF(s,a,g,E){return E=typeof E=="function"?E:r,s==null?s:Ug(s,a,Mf(g),E)}function Wi(s){return s==null?[]:cf(s,Ie(s))}function FF(s){return s==null?[]:cf(s,Xe(s))}function BF(s,a,g){return g===r&&(g=a,a=r),g!==r&&(g=gr(g),g=g===g?g:0),a!==r&&(a=gr(a),a=a===a?a:0),Wn(gr(s),a,g)}function DF(s,a,g){return a=nn(a),g===r?(g=a,a=0):g=nn(g),s=gr(s),z3(s,a,g)}function UF(s,a,g){if(g&&typeof g!="boolean"&&qe(s,a,g)&&(a=g=r),g===r&&(typeof a=="boolean"?(g=a,a=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&a===r?(s=0,a=1):(s=nn(s),a===r?(a=s,s=0):a=nn(a)),s>a){var E=s;s=a,a=E}if(g||s%1||a%1){var N=vg();return De(s+N*(a-s+mM("1e-"+((N+"").length-1))),a)}return Of(s,a)}var $F=zi(function(s,a,g){return a=a.toLowerCase(),s+(g?Vm(a):a)});function Vm(s){return tc(Qt(s).toLowerCase())}function Wm(s){return s=Qt(s),s&&s.replace(jN,IM).replace(aM,"")}function GF(s,a,g){s=Qt(s),a=rr(a);var E=s.length;g=g===r?E:Wn(kt(g),0,E);var N=g;return g-=a.length,g>=0&&s.slice(g,N)==a}function jF(s){return s=Qt(s),s&&wN.test(s)?s.replace(Ev,PM):s}function qF(s){return s=Qt(s),s&&CN.test(s)?s.replace(Xu,"\\$&"):s}var zF=zi(function(s,a,g){return s+(g?"-":"")+a.toLowerCase()}),HF=zi(function(s,a,g){return s+(g?" ":"")+a.toLowerCase()}),VF=Yg("toLowerCase");function WF(s,a,g){s=Qt(s),a=kt(a);var E=a?Bi(s):0;if(!a||E>=a)return s;var N=(a-E)/2;return Pa(ya(N),g)+s+Pa(ma(N),g)}function XF(s,a,g){s=Qt(s),a=kt(a);var E=a?Bi(s):0;return a&&E<a?s+Pa(a-E,g):s}function KF(s,a,g){s=Qt(s),a=kt(a);var E=a?Bi(s):0;return a&&E<a?Pa(a-E,g)+s:s}function YF(s,a,g){return g||a==null?a=0:a&&(a=+a),n3(Qt(s).replace(Ku,""),a||0)}function ZF(s,a,g){return(g?qe(s,a,g):a===r)?a=1:a=kt(a),Cf(Qt(s),a)}function QF(){var s=arguments,a=Qt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var JF=zi(function(s,a,g){return s+(g?"_":"")+a.toLowerCase()});function t4(s,a,g){return g&&typeof g!="number"&&qe(s,a,g)&&(a=g=r),g=g===r?k:g>>>0,g?(s=Qt(s),s&&(typeof a=="string"||a!=null&&!Zf(a))&&(a=rr(a),!a&&Fi(s))?wn(Rr(s),0,g):s.split(a,g)):[]}var e4=zi(function(s,a,g){return s+(g?" ":"")+tc(a)});function r4(s,a,g){return s=Qt(s),g=g==null?0:Wn(kt(g),0,s.length),a=rr(a),s.slice(g,g+a.length)==a}function n4(s,a,g){var E=B.templateSettings;g&&qe(s,a,g)&&(a=r),s=Qt(s),a=qa({},a,E,nm);var N=qa({},a.imports,E.imports,nm),U=Ie(N),H=cf(N,U),K,J,ut=0,ft=a.interpolate||ra,ht="__p += '",mt=df((a.escape||ra).source+"|"+ft.source+"|"+(ft===Sv?FN:ra).source+"|"+(a.evaluate||ra).source+"|$","g"),wt="//# sourceURL="+(ee.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++hM+"]")+`
1933
- `;s.replace(mt,function(Ct,$t,zt,ir,ze,sr){return zt||(zt=ir),ht+=s.slice(ut,sr).replace(qN,NM),$t&&(K=!0,ht+=`' +
1943
+ `)}function Mk(s){return Mt(s)||Qn(s)||!!(vg&&s&&s[vg])}function rn(s,a){var g=typeof s;return a=a??it,!!a&&(g=="number"||g!="symbol"&&HN.test(s))&&s>-1&&s%1==0&&s<a}function qe(s,a,g){if(!ge(g))return!1;var E=typeof a;return(E=="number"?We(g)&&rn(a,g.length):E=="string"&&a in g)?Pr(g[a],s):!1}function qf(s,a){if(Mt(s))return!1;var g=typeof s;return g=="number"||g=="symbol"||g=="boolean"||s==null||nr(s)?!0:IN.test(s)||!RN.test(s)||a!=null&&s in ie(a)}function kk(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function zf(s){var a=Ma(s),g=B[a];if(typeof g!="function"||!(a in jt.prototype))return!1;if(s===g)return!0;var E=$f(g);return!!E&&s===E[0]}function Lk(s){return!!cg&&cg in s}var Fk=ua?nn:ac;function Ds(s){var a=s&&s.constructor,g=typeof a=="function"&&a.prototype||$i;return s===g}function cm(s){return s===s&&!ge(s)}function hm(s,a){return function(g){return g==null?!1:g[s]===a&&(a!==r||s in ie(g))}}function Bk(s){var a=Ua(s,function(E){return g.size===h&&g.clear(),E}),g=a.cache;return a}function Dk(s,a){var g=s[1],E=a[1],N=g|E,U=N<(_|b|A),H=E==A&&g==T||E==A&&g==O&&s[7].length<=a[8]||E==(A|O)&&a[7].length<=a[8]&&g==T;if(!(U||H))return s;E&_&&(s[2]=a[2],N|=g&_?0:w);var K=a[3];if(K){var J=s[3];s[3]=J?Xg(J,K,a[4]):K,s[4]=J?mn(s[3],p):a[4]}return K=a[5],K&&(J=s[5],s[5]=J?Kg(J,K,a[6]):K,s[6]=J?mn(s[5],p):a[6]),K=a[7],K&&(s[7]=K),E&A&&(s[8]=s[8]==null?a[8]:De(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=N,s}function Uk(s){var a=[];if(s!=null)for(var g in ie(s))a.push(g);return a}function $k(s){return ca.call(s)}function dm(s,a,g){return a=Ae(a===r?s.length-1:a,0),function(){for(var E=arguments,N=-1,U=Ae(E.length-a,0),H=st(U);++N<U;)H[N]=E[a+N];N=-1;for(var K=st(a+1);++N<a;)K[N]=E[N];return K[a]=g(H),tr(s,this,K)}}function pm(s,a){return a.length<2?s:Kn(s,pr(a,0,-1))}function Gk(s,a){for(var g=s.length,E=De(a.length,g),N=Ve(s);E--;){var U=a[E];s[E]=rn(U,g)?N[U]:r}return s}function Hf(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var vm=mm(Dg),Us=r3||function(s,a){return Ne.setTimeout(s,a)},Vf=mm(fk);function gm(s,a,g){var E=a+"";return Vf(s,Nk(E,jk(Rk(E),g)))}function mm(s){var a=0,g=0;return function(){var E=o3(),N=M-(E-g);if(g=E,N>0){if(++a>=P)return arguments[0]}else a=0;return s.apply(r,arguments)}}function La(s,a){var g=-1,E=s.length,N=E-1;for(a=a===r?E:a;++g<a;){var U=Cf(g,N),H=s[U];s[U]=s[g],s[g]=H}return s.length=a,s}var ym=Bk(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(PN,function(g,E,N,U){a.push(N?U.replace(UN,"$1"):E||g)}),a});function qr(s){if(typeof s=="string"||nr(s))return s;var a=s+"";return a=="0"&&1/s==-z?"-0":a}function Zn(s){if(s!=null){try{return fa.call(s)}catch{}try{return s+""}catch{}}return""}function jk(s,a){return fr(Y,function(g){var E="_."+g[0];a&g[1]&&!sa(s,E)&&s.push(E)}),s.sort()}function _m(s){if(s instanceof jt)return s.clone();var a=new hr(s.__wrapped__,s.__chain__);return a.__actions__=Ve(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function qk(s,a,g){(g?qe(s,a,g):a===r)?a=1:a=Ae(kt(a),0);var E=s==null?0:s.length;if(!E||a<1)return[];for(var N=0,U=0,H=st(ma(E/a));N<E;)H[U++]=pr(s,N,N+=a);return H}function zk(s){for(var a=-1,g=s==null?0:s.length,E=0,N=[];++a<g;){var U=s[a];U&&(N[E++]=U)}return N}function Hk(){var s=arguments.length;if(!s)return[];for(var a=st(s-1),g=arguments[0],E=s;E--;)a[E-1]=arguments[E];return gn(Mt(g)?Ve(g):[g],Me(a,1))}var Vk=Bt(function(s,a){return be(s)?Ms(s,Me(a,1,be,!0)):[]}),Wk=Bt(function(s,a){var g=vr(a);return be(g)&&(g=r),be(s)?Ms(s,Me(a,1,be,!0),At(g,2)):[]}),Xk=Bt(function(s,a){var g=vr(a);return be(g)&&(g=r),be(s)?Ms(s,Me(a,1,be,!0),r,g):[]});function Kk(s,a,g){var E=s==null?0:s.length;return E?(a=g||a===r?1:kt(a),pr(s,a<0?0:a,E)):[]}function Yk(s,a,g){var E=s==null?0:s.length;return E?(a=g||a===r?1:kt(a),a=E-a,pr(s,0,a<0?0:a)):[]}function Zk(s,a){return s&&s.length?Oa(s,At(a,3),!0,!0):[]}function Qk(s,a){return s&&s.length?Oa(s,At(a,3),!0):[]}function Jk(s,a,g,E){var N=s==null?0:s.length;return N?(g&&typeof g!="number"&&qe(s,a,g)&&(g=0,E=N),H3(s,a,g,E)):[]}function bm(s,a,g){var E=s==null?0:s.length;if(!E)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(E+N,0)),oa(s,At(a,3),N)}function xm(s,a,g){var E=s==null?0:s.length;if(!E)return-1;var N=E-1;return g!==r&&(N=kt(g),N=g<0?Ae(E+N,0):De(N,E-1)),oa(s,At(a,3),N,!0)}function wm(s){var a=s==null?0:s.length;return a?Me(s,1):[]}function t5(s){var a=s==null?0:s.length;return a?Me(s,z):[]}function e5(s,a){var g=s==null?0:s.length;return g?(a=a===r?1:kt(a),Me(s,a)):[]}function r5(s){for(var a=-1,g=s==null?0:s.length,E={};++a<g;){var N=s[a];E[N[0]]=N[1]}return E}function Tm(s){return s&&s.length?s[0]:r}function n5(s,a,g){var E=s==null?0:s.length;if(!E)return-1;var N=g==null?0:kt(g);return N<0&&(N=Ae(E+N,0)),Fi(s,a,N)}function i5(s){var a=s==null?0:s.length;return a?pr(s,0,-1):[]}var s5=Bt(function(s){var a=he(s,Mf);return a.length&&a[0]===s[0]?Tf(a):[]}),o5=Bt(function(s){var a=vr(s),g=he(s,Mf);return a===vr(g)?a=r:g.pop(),g.length&&g[0]===s[0]?Tf(g,At(a,2)):[]}),a5=Bt(function(s){var a=vr(s),g=he(s,Mf);return a=typeof a=="function"?a:r,a&&g.pop(),g.length&&g[0]===s[0]?Tf(g,r,a):[]});function l5(s,a){return s==null?"":i3.call(s,a)}function vr(s){var a=s==null?0:s.length;return a?s[a-1]:r}function u5(s,a,g){var E=s==null?0:s.length;if(!E)return-1;var N=E;return g!==r&&(N=kt(g),N=N<0?Ae(E+N,0):De(N,E-1)),a===a?jM(s,a,N):oa(s,ng,N,!0)}function f5(s,a){return s&&s.length?kg(s,kt(a)):r}var c5=Bt(Em);function Em(s,a){return s&&s.length&&a&&a.length?Of(s,a):s}function h5(s,a,g){return s&&s.length&&a&&a.length?Of(s,a,At(g,2)):s}function d5(s,a,g){return s&&s.length&&a&&a.length?Of(s,a,r,g):s}var p5=en(function(s,a){var g=s==null?0:s.length,E=_f(s,a);return Bg(s,he(a,function(N){return rn(N,g)?+N:N}).sort(Wg)),E});function v5(s,a){var g=[];if(!(s&&s.length))return g;var E=-1,N=[],U=s.length;for(a=At(a,3);++E<U;){var H=s[E];a(H,E,s)&&(g.push(H),N.push(E))}return Bg(s,N),g}function Wf(s){return s==null?s:l3.call(s)}function g5(s,a,g){var E=s==null?0:s.length;return E?(g&&typeof g!="number"&&qe(s,a,g)?(a=0,g=E):(a=a==null?0:kt(a),g=g===r?E:kt(g)),pr(s,a,g)):[]}function m5(s,a){return Aa(s,a)}function y5(s,a,g){return If(s,a,At(g,2))}function _5(s,a){var g=s==null?0:s.length;if(g){var E=Aa(s,a);if(E<g&&Pr(s[E],a))return E}return-1}function b5(s,a){return Aa(s,a,!0)}function x5(s,a,g){return If(s,a,At(g,2),!0)}function w5(s,a){var g=s==null?0:s.length;if(g){var E=Aa(s,a,!0)-1;if(Pr(s[E],a))return E}return-1}function T5(s){return s&&s.length?Ug(s):[]}function E5(s,a){return s&&s.length?Ug(s,At(a,2)):[]}function S5(s){var a=s==null?0:s.length;return a?pr(s,1,a):[]}function A5(s,a,g){return s&&s.length?(a=g||a===r?1:kt(a),pr(s,0,a<0?0:a)):[]}function O5(s,a,g){var E=s==null?0:s.length;return E?(a=g||a===r?1:kt(a),a=E-a,pr(s,a<0?0:a,E)):[]}function C5(s,a){return s&&s.length?Oa(s,At(a,3),!1,!0):[]}function R5(s,a){return s&&s.length?Oa(s,At(a,3)):[]}var I5=Bt(function(s){return bn(Me(s,1,be,!0))}),P5=Bt(function(s){var a=vr(s);return be(a)&&(a=r),bn(Me(s,1,be,!0),At(a,2))}),N5=Bt(function(s){var a=vr(s);return a=typeof a=="function"?a:r,bn(Me(s,1,be,!0),r,a)});function M5(s){return s&&s.length?bn(s):[]}function k5(s,a){return s&&s.length?bn(s,At(a,2)):[]}function L5(s,a){return a=typeof a=="function"?a:r,s&&s.length?bn(s,r,a):[]}function Xf(s){if(!(s&&s.length))return[];var a=0;return s=vn(s,function(g){if(be(g))return a=Ae(g.length,a),!0}),cf(a,function(g){return he(s,lf(g))})}function Sm(s,a){if(!(s&&s.length))return[];var g=Xf(s);return a==null?g:he(g,function(E){return tr(a,r,E)})}var F5=Bt(function(s,a){return be(s)?Ms(s,a):[]}),B5=Bt(function(s){return Nf(vn(s,be))}),D5=Bt(function(s){var a=vr(s);return be(a)&&(a=r),Nf(vn(s,be),At(a,2))}),U5=Bt(function(s){var a=vr(s);return a=typeof a=="function"?a:r,Nf(vn(s,be),r,a)}),$5=Bt(Xf);function G5(s,a){return qg(s||[],a||[],Ns)}function j5(s,a){return qg(s||[],a||[],Fs)}var q5=Bt(function(s){var a=s.length,g=a>1?s[a-1]:r;return g=typeof g=="function"?(s.pop(),g):r,Sm(s,g)});function Am(s){var a=B(s);return a.__chain__=!0,a}function z5(s,a){return a(s),s}function Fa(s,a){return a(s)}var H5=en(function(s){var a=s.length,g=a?s[0]:0,E=this.__wrapped__,N=function(U){return _f(U,s)};return a>1||this.__actions__.length||!(E instanceof jt)||!rn(g)?this.thru(N):(E=E.slice(g,+g+(a?1:0)),E.__actions__.push({func:Fa,args:[N],thisArg:r}),new hr(E,this.__chain__).thru(function(U){return a&&!U.length&&U.push(r),U}))});function V5(){return Am(this)}function W5(){return new hr(this.value(),this.__chain__)}function X5(){this.__values__===r&&(this.__values__=$m(this.value()));var s=this.__index__>=this.__values__.length,a=s?r:this.__values__[this.__index__++];return{done:s,value:a}}function K5(){return this}function Y5(s){for(var a,g=this;g instanceof xa;){var E=_m(g);E.__index__=0,E.__values__=r,a?N.__wrapped__=E:a=E;var N=E;g=g.__wrapped__}return N.__wrapped__=s,a}function Z5(){var s=this.__wrapped__;if(s instanceof jt){var a=s;return this.__actions__.length&&(a=new jt(this)),a=a.reverse(),a.__actions__.push({func:Fa,args:[Wf],thisArg:r}),new hr(a,this.__chain__)}return this.thru(Wf)}function Q5(){return jg(this.__wrapped__,this.__actions__)}var J5=Ca(function(s,a,g){re.call(s,g)?++s[g]:Jr(s,g,1)});function tL(s,a,g){var E=Mt(s)?eg:z3;return g&&qe(s,a,g)&&(a=r),E(s,At(a,3))}function eL(s,a){var g=Mt(s)?vn:Sg;return g(s,At(a,3))}var rL=Jg(bm),nL=Jg(xm);function iL(s,a){return Me(Ba(s,a),1)}function sL(s,a){return Me(Ba(s,a),z)}function oL(s,a,g){return g=g===r?1:kt(g),Me(Ba(s,a),g)}function Om(s,a){var g=Mt(s)?fr:_n;return g(s,At(a,3))}function Cm(s,a){var g=Mt(s)?SM:Eg;return g(s,At(a,3))}var aL=Ca(function(s,a,g){re.call(s,g)?s[g].push(a):Jr(s,g,[a])});function lL(s,a,g,E){s=We(s)?s:Xi(s),g=g&&!E?kt(g):0;var N=s.length;return g<0&&(g=Ae(N+g,0)),ja(s)?g<=N&&s.indexOf(a,g)>-1:!!N&&Fi(s,a,g)>-1}var uL=Bt(function(s,a,g){var E=-1,N=typeof a=="function",U=We(s)?st(s.length):[];return _n(s,function(H){U[++E]=N?tr(a,H,g):ks(H,a,g)}),U}),fL=Ca(function(s,a,g){Jr(s,g,a)});function Ba(s,a){var g=Mt(s)?he:Pg;return g(s,At(a,3))}function cL(s,a,g,E){return s==null?[]:(Mt(a)||(a=a==null?[]:[a]),g=E?r:g,Mt(g)||(g=g==null?[]:[g]),Lg(s,a,g))}var hL=Ca(function(s,a,g){s[g?0:1].push(a)},function(){return[[],[]]});function dL(s,a,g){var E=Mt(s)?of:sg,N=arguments.length<3;return E(s,At(a,4),g,N,_n)}function pL(s,a,g){var E=Mt(s)?AM:sg,N=arguments.length<3;return E(s,At(a,4),g,N,Eg)}function vL(s,a){var g=Mt(s)?vn:Sg;return g(s,$a(At(a,3)))}function gL(s){var a=Mt(s)?bg:lk;return a(s)}function mL(s,a,g){(g?qe(s,a,g):a===r)?a=1:a=kt(a);var E=Mt(s)?U3:uk;return E(s,a)}function yL(s){var a=Mt(s)?$3:ck;return a(s)}function _L(s){if(s==null)return 0;if(We(s))return ja(s)?Di(s):s.length;var a=Ue(s);return a==yt||a==vt?s.size:Sf(s).length}function bL(s,a,g){var E=Mt(s)?af:hk;return g&&qe(s,a,g)&&(a=r),E(s,At(a,3))}var xL=Bt(function(s,a){if(s==null)return[];var g=a.length;return g>1&&qe(s,a[0],a[1])?a=[]:g>2&&qe(a[0],a[1],a[2])&&(a=[a[0]]),Lg(s,Me(a,1),[])}),Da=e3||function(){return Ne.Date.now()};function wL(s,a){if(typeof a!="function")throw new cr(l);return s=kt(s),function(){if(--s<1)return a.apply(this,arguments)}}function Rm(s,a,g){return a=g?r:a,a=s&&a==null?s.length:a,tn(s,A,r,r,r,r,a)}function Im(s,a){var g;if(typeof a!="function")throw new cr(l);return s=kt(s),function(){return--s>0&&(g=a.apply(this,arguments)),s<=1&&(a=r),g}}var Kf=Bt(function(s,a,g){var E=_;if(g.length){var N=mn(g,Vi(Kf));E|=S}return tn(s,E,a,g,N)}),Pm=Bt(function(s,a,g){var E=_|b;if(g.length){var N=mn(g,Vi(Pm));E|=S}return tn(a,E,s,g,N)});function Nm(s,a,g){a=g?r:a;var E=tn(s,T,r,r,r,r,r,a);return E.placeholder=Nm.placeholder,E}function Mm(s,a,g){a=g?r:a;var E=tn(s,x,r,r,r,r,r,a);return E.placeholder=Mm.placeholder,E}function km(s,a,g){var E,N,U,H,K,J,ut=0,ft=!1,dt=!1,mt=!0;if(typeof s!="function")throw new cr(l);a=gr(a)||0,ge(g)&&(ft=!!g.leading,dt="maxWait"in g,U=dt?Ae(gr(g.maxWait)||0,a):U,mt="trailing"in g?!!g.trailing:mt);function wt(xe){var Nr=E,on=N;return E=N=r,ut=xe,H=s.apply(on,Nr),H}function Ot(xe){return ut=xe,K=Us($t,a),ft?wt(xe):H}function Ft(xe){var Nr=xe-J,on=xe-ut,Jm=a-Nr;return dt?De(Jm,U-on):Jm}function Ct(xe){var Nr=xe-J,on=xe-ut;return J===r||Nr>=a||Nr<0||dt&&on>=U}function $t(){var xe=Da();if(Ct(xe))return zt(xe);K=Us($t,Ft(xe))}function zt(xe){return K=r,mt&&E?wt(xe):(E=N=r,H)}function ir(){K!==r&&zg(K),ut=0,E=J=N=K=r}function ze(){return K===r?H:zt(Da())}function sr(){var xe=Da(),Nr=Ct(xe);if(E=arguments,N=this,J=xe,Nr){if(K===r)return Ot(J);if(dt)return zg(K),K=Us($t,a),wt(J)}return K===r&&(K=Us($t,a)),H}return sr.cancel=ir,sr.flush=ze,sr}var TL=Bt(function(s,a){return Tg(s,1,a)}),EL=Bt(function(s,a,g){return Tg(s,gr(a)||0,g)});function SL(s){return tn(s,L)}function Ua(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new cr(l);var g=function(){var E=arguments,N=a?a.apply(this,E):E[0],U=g.cache;if(U.has(N))return U.get(N);var H=s.apply(this,E);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 cr(l);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function AL(s){return Im(2,s)}var OL=dk(function(s,a){a=a.length==1&&Mt(a[0])?he(a[0],er(At())):he(Me(a,1),er(At()));var g=a.length;return Bt(function(E){for(var N=-1,U=De(E.length,g);++N<U;)E[N]=a[N].call(this,E[N]);return tr(s,this,E)})}),Yf=Bt(function(s,a){var g=mn(a,Vi(Yf));return tn(s,S,r,a,g)}),Lm=Bt(function(s,a){var g=mn(a,Vi(Lm));return tn(s,I,r,a,g)}),CL=en(function(s,a){return tn(s,O,r,r,r,a)});function RL(s,a){if(typeof s!="function")throw new cr(l);return a=a===r?a:kt(a),Bt(s,a)}function IL(s,a){if(typeof s!="function")throw new cr(l);return a=a==null?0:Ae(kt(a),0),Bt(function(g){var E=g[a],N=wn(g,0,a);return E&&gn(N,E),tr(s,this,N)})}function PL(s,a,g){var E=!0,N=!0;if(typeof s!="function")throw new cr(l);return ge(g)&&(E="leading"in g?!!g.leading:E,N="trailing"in g?!!g.trailing:N),km(s,a,{leading:E,maxWait:a,trailing:N})}function NL(s){return Rm(s,1)}function ML(s,a){return Yf(kf(a),s)}function kL(){if(!arguments.length)return[];var s=arguments[0];return Mt(s)?s:[s]}function LL(s){return dr(s,v)}function FL(s,a){return a=typeof a=="function"?a:r,dr(s,v,a)}function BL(s){return dr(s,d|v)}function DL(s,a){return a=typeof a=="function"?a:r,dr(s,d|v,a)}function UL(s,a){return a==null||wg(s,a,Ie(a))}function Pr(s,a){return s===a||s!==s&&a!==a}var $L=Na(wf),GL=Na(function(s,a){return s>=a}),Qn=Cg(function(){return arguments}())?Cg:function(s){return ye(s)&&re.call(s,"callee")&&!pg.call(s,"callee")},Mt=st.isArray,jL=Kv?er(Kv):Y3;function We(s){return s!=null&&Ga(s.length)&&!nn(s)}function be(s){return ye(s)&&We(s)}function qL(s){return s===!0||s===!1||ye(s)&&je(s)==tt}var Tn=n3||ac,zL=Yv?er(Yv):Z3;function HL(s){return ye(s)&&s.nodeType===1&&!$s(s)}function VL(s){if(s==null)return!0;if(We(s)&&(Mt(s)||typeof s=="string"||typeof s.splice=="function"||Tn(s)||Wi(s)||Qn(s)))return!s.length;var a=Ue(s);if(a==yt||a==vt)return!s.size;if(Ds(s))return!Sf(s).length;for(var g in s)if(re.call(s,g))return!1;return!0}function WL(s,a){return Ls(s,a)}function XL(s,a,g){g=typeof g=="function"?g:r;var E=g?g(s,a):r;return E===r?Ls(s,a,r,g):!!E}function Zf(s){if(!ye(s))return!1;var a=je(s);return a==ot||a==rt||typeof s.message=="string"&&typeof s.name=="string"&&!$s(s)}function KL(s){return typeof s=="number"&&gg(s)}function nn(s){if(!ge(s))return!1;var a=je(s);return a==ct||a==gt||a==V||a==lt}function Fm(s){return typeof s=="number"&&s==kt(s)}function Ga(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=it}function ge(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function ye(s){return s!=null&&typeof s=="object"}var Bm=Zv?er(Zv):J3;function YL(s,a){return s===a||Ef(s,a,Gf(a))}function ZL(s,a,g){return g=typeof g=="function"?g:r,Ef(s,a,Gf(a),g)}function QL(s){return Dm(s)&&s!=+s}function JL(s){if(Fk(s))throw new It(o);return Rg(s)}function tF(s){return s===null}function eF(s){return s==null}function Dm(s){return typeof s=="number"||ye(s)&&je(s)==St}function $s(s){if(!ye(s)||je(s)!=Ut)return!1;var a=pa(s);if(a===null)return!0;var g=re.call(a,"constructor")&&a.constructor;return typeof g=="function"&&g instanceof g&&fa.call(g)==ZM}var Qf=Qv?er(Qv):tk;function rF(s){return Fm(s)&&s>=-it&&s<=it}var Um=Jv?er(Jv):ek;function ja(s){return typeof s=="string"||!Mt(s)&&ye(s)&&je(s)==ht}function nr(s){return typeof s=="symbol"||ye(s)&&je(s)==Pt}var Wi=tg?er(tg):rk;function nF(s){return s===r}function iF(s){return ye(s)&&Ue(s)==Nt}function sF(s){return ye(s)&&je(s)==He}var oF=Na(Af),aF=Na(function(s,a){return s<=a});function $m(s){if(!s)return[];if(We(s))return ja(s)?Rr(s):Ve(s);if(Os&&s[Os])return UM(s[Os]());var a=Ue(s),g=a==yt?df:a==vt?aa:Xi;return g(s)}function sn(s){if(!s)return s===0?s:0;if(s=gr(s),s===z||s===-z){var a=s<0?-1:1;return a*W}return s===s?s:0}function kt(s){var a=sn(s),g=a%1;return a===a?g?a-g:a:0}function Gm(s){return s?Xn(kt(s),0,k):0}function gr(s){if(typeof s=="number")return s;if(nr(s))return D;if(ge(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=ge(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=og(s);var g=jN.test(s);return g||zN.test(s)?wM(s.slice(2),g?2:8):GN.test(s)?D:+s}function jm(s){return jr(s,Xe(s))}function lF(s){return s?Xn(kt(s),-it,it):s===0?s:0}function Jt(s){return s==null?"":rr(s)}var uF=zi(function(s,a){if(Ds(a)||We(a)){jr(a,Ie(a),s);return}for(var g in a)re.call(a,g)&&Ns(s,g,a[g])}),qm=zi(function(s,a){jr(a,Xe(a),s)}),qa=zi(function(s,a,g,E){jr(a,Xe(a),s,E)}),fF=zi(function(s,a,g,E){jr(a,Ie(a),s,E)}),cF=en(_f);function hF(s,a){var g=qi(s);return a==null?g:xg(g,a)}var dF=Bt(function(s,a){s=ie(s);var g=-1,E=a.length,N=E>2?a[2]:r;for(N&&qe(a[0],a[1],N)&&(E=1);++g<E;)for(var U=a[g],H=Xe(U),K=-1,J=H.length;++K<J;){var ut=H[K],ft=s[ut];(ft===r||Pr(ft,$i[ut])&&!re.call(s,ut))&&(s[ut]=U[ut])}return s}),pF=Bt(function(s){return s.push(r,om),tr(zm,r,s)});function vF(s,a){return rg(s,At(a,3),Gr)}function gF(s,a){return rg(s,At(a,3),xf)}function mF(s,a){return s==null?s:bf(s,At(a,3),Xe)}function yF(s,a){return s==null?s:Ag(s,At(a,3),Xe)}function _F(s,a){return s&&Gr(s,At(a,3))}function bF(s,a){return s&&xf(s,At(a,3))}function xF(s){return s==null?[]:Ea(s,Ie(s))}function wF(s){return s==null?[]:Ea(s,Xe(s))}function Jf(s,a,g){var E=s==null?r:Kn(s,a);return E===r?g:E}function TF(s,a){return s!=null&&um(s,a,V3)}function tc(s,a){return s!=null&&um(s,a,W3)}var EF=em(function(s,a,g){a!=null&&typeof a.toString!="function"&&(a=ca.call(a)),s[a]=g},rc(Ke)),SF=em(function(s,a,g){a!=null&&typeof a.toString!="function"&&(a=ca.call(a)),re.call(s,a)?s[a].push(g):s[a]=[g]},At),AF=Bt(ks);function Ie(s){return We(s)?_g(s):Sf(s)}function Xe(s){return We(s)?_g(s,!0):nk(s)}function OF(s,a){var g={};return a=At(a,3),Gr(s,function(E,N,U){Jr(g,a(E,N,U),E)}),g}function CF(s,a){var g={};return a=At(a,3),Gr(s,function(E,N,U){Jr(g,N,a(E,N,U))}),g}var RF=zi(function(s,a,g){Sa(s,a,g)}),zm=zi(function(s,a,g,E){Sa(s,a,g,E)}),IF=en(function(s,a){var g={};if(s==null)return g;var E=!1;a=he(a,function(U){return U=xn(U,s),E||(E=U.length>1),U}),jr(s,Uf(s),g),E&&(g=dr(g,d|c|v,Ek));for(var N=a.length;N--;)Pf(g,a[N]);return g});function PF(s,a){return Hm(s,$a(At(a)))}var NF=en(function(s,a){return s==null?{}:sk(s,a)});function Hm(s,a){if(s==null)return{};var g=he(Uf(s),function(E){return[E]});return a=At(a),Fg(s,g,function(E,N){return a(E,N[0])})}function MF(s,a,g){a=xn(a,s);var E=-1,N=a.length;for(N||(N=1,s=r);++E<N;){var U=s==null?r:s[qr(a[E])];U===r&&(E=N,U=g),s=nn(U)?U.call(s):U}return s}function kF(s,a,g){return s==null?s:Fs(s,a,g)}function LF(s,a,g,E){return E=typeof E=="function"?E:r,s==null?s:Fs(s,a,g,E)}var Vm=im(Ie),Wm=im(Xe);function FF(s,a,g){var E=Mt(s),N=E||Tn(s)||Wi(s);if(a=At(a,4),g==null){var U=s&&s.constructor;N?g=E?new U:[]:ge(s)?g=nn(U)?qi(pa(s)):{}:g={}}return(N?fr:Gr)(s,function(H,K,J){return a(g,H,K,J)}),g}function BF(s,a){return s==null?!0:Pf(s,a)}function DF(s,a,g){return s==null?s:Gg(s,a,kf(g))}function UF(s,a,g,E){return E=typeof E=="function"?E:r,s==null?s:Gg(s,a,kf(g),E)}function Xi(s){return s==null?[]:hf(s,Ie(s))}function $F(s){return s==null?[]:hf(s,Xe(s))}function GF(s,a,g){return g===r&&(g=a,a=r),g!==r&&(g=gr(g),g=g===g?g:0),a!==r&&(a=gr(a),a=a===a?a:0),Xn(gr(s),a,g)}function jF(s,a,g){return a=sn(a),g===r?(g=a,a=0):g=sn(g),s=gr(s),X3(s,a,g)}function qF(s,a,g){if(g&&typeof g!="boolean"&&qe(s,a,g)&&(a=g=r),g===r&&(typeof a=="boolean"?(g=a,a=r):typeof s=="boolean"&&(g=s,s=r)),s===r&&a===r?(s=0,a=1):(s=sn(s),a===r?(a=s,s=0):a=sn(a)),s>a){var E=s;s=a,a=E}if(g||s%1||a%1){var N=mg();return De(s+N*(a-s+xM("1e-"+((N+"").length-1))),a)}return Cf(s,a)}var zF=Hi(function(s,a,g){return a=a.toLowerCase(),s+(g?Xm(a):a)});function Xm(s){return ec(Jt(s).toLowerCase())}function Km(s){return s=Jt(s),s&&s.replace(VN,kM).replace(cM,"")}function HF(s,a,g){s=Jt(s),a=rr(a);var E=s.length;g=g===r?E:Xn(kt(g),0,E);var N=g;return g-=a.length,g>=0&&s.slice(g,N)==a}function VF(s){return s=Jt(s),s&&AN.test(s)?s.replace(Av,LM):s}function WF(s){return s=Jt(s),s&&NN.test(s)?s.replace(Ku,"\\$&"):s}var XF=Hi(function(s,a,g){return s+(g?"-":"")+a.toLowerCase()}),KF=Hi(function(s,a,g){return s+(g?" ":"")+a.toLowerCase()}),YF=Qg("toLowerCase");function ZF(s,a,g){s=Jt(s),a=kt(a);var E=a?Di(s):0;if(!a||E>=a)return s;var N=(a-E)/2;return Pa(ya(N),g)+s+Pa(ma(N),g)}function QF(s,a,g){s=Jt(s),a=kt(a);var E=a?Di(s):0;return a&&E<a?s+Pa(a-E,g):s}function JF(s,a,g){s=Jt(s),a=kt(a);var E=a?Di(s):0;return a&&E<a?Pa(a-E,g)+s:s}function t4(s,a,g){return g||a==null?a=0:a&&(a=+a),a3(Jt(s).replace(Yu,""),a||0)}function e4(s,a,g){return(g?qe(s,a,g):a===r)?a=1:a=kt(a),Rf(Jt(s),a)}function r4(){var s=arguments,a=Jt(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var n4=Hi(function(s,a,g){return s+(g?"_":"")+a.toLowerCase()});function i4(s,a,g){return g&&typeof g!="number"&&qe(s,a,g)&&(a=g=r),g=g===r?k:g>>>0,g?(s=Jt(s),s&&(typeof a=="string"||a!=null&&!Qf(a))&&(a=rr(a),!a&&Bi(s))?wn(Rr(s),0,g):s.split(a,g)):[]}var s4=Hi(function(s,a,g){return s+(g?" ":"")+ec(a)});function o4(s,a,g){return s=Jt(s),g=g==null?0:Xn(kt(g),0,s.length),a=rr(a),s.slice(g,g+a.length)==a}function a4(s,a,g){var E=B.templateSettings;g&&qe(s,a,g)&&(a=r),s=Jt(s),a=qa({},a,E,sm);var N=qa({},a.imports,E.imports,sm),U=Ie(N),H=hf(N,U),K,J,ut=0,ft=a.interpolate||ra,dt="__p += '",mt=pf((a.escape||ra).source+"|"+ft.source+"|"+(ft===Ov?$N:ra).source+"|"+(a.evaluate||ra).source+"|$","g"),wt="//# sourceURL="+(re.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++gM+"]")+`
1944
+ `;s.replace(mt,function(Ct,$t,zt,ir,ze,sr){return zt||(zt=ir),dt+=s.slice(ut,sr).replace(WN,FM),$t&&(K=!0,dt+=`' +
1934
1945
  __e(`+$t+`) +
1935
- '`),ze&&(J=!0,ht+=`';
1946
+ '`),ze&&(J=!0,dt+=`';
1936
1947
  `+ze+`;
1937
- __p += '`),zt&&(ht+=`' +
1948
+ __p += '`),zt&&(dt+=`' +
1938
1949
  ((__t = (`+zt+`)) == null ? '' : __t) +
1939
- '`),ut=sr+Ct.length,Ct}),ht+=`';
1940
- `;var Ot=ee.call(a,"variable")&&a.variable;if(!Ot)ht=`with (obj) {
1941
- `+ht+`
1950
+ '`),ut=sr+Ct.length,Ct}),dt+=`';
1951
+ `;var Ot=re.call(a,"variable")&&a.variable;if(!Ot)dt=`with (obj) {
1952
+ `+dt+`
1942
1953
  }
1943
- `;else if(kN.test(Ot))throw new It(u);ht=(J?ht.replace(yN,""):ht).replace(_N,"$1").replace(bN,"$1;"),ht="function("+(Ot||"obj")+`) {
1954
+ `;else if(DN.test(Ot))throw new It(u);dt=(J?dt.replace(wN,""):dt).replace(TN,"$1").replace(EN,"$1;"),dt="function("+(Ot||"obj")+`) {
1944
1955
  `+(Ot?"":`obj || (obj = {});
1945
1956
  `)+"var __t, __p = ''"+(K?", __e = _.escape":"")+(J?`, __j = Array.prototype.join;
1946
1957
  function print() { __p += __j.call(arguments, '') }
1947
1958
  `:`;
1948
- `)+ht+`return __p
1949
- }`;var Bt=Km(function(){return Kt(U,wt+"return "+ht).apply(r,H)});if(Bt.source=ht,Yf(Bt))throw Bt;return Bt}function i4(s){return Qt(s).toLowerCase()}function s4(s){return Qt(s).toUpperCase()}function o4(s,a,g){if(s=Qt(s),s&&(g||a===r))return ig(s);if(!s||!(a=rr(a)))return s;var E=Rr(s),N=Rr(a),U=sg(E,N),H=og(E,N)+1;return wn(E,U,H).join("")}function a4(s,a,g){if(s=Qt(s),s&&(g||a===r))return s.slice(0,lg(s)+1);if(!s||!(a=rr(a)))return s;var E=Rr(s),N=og(E,Rr(a))+1;return wn(E,0,N).join("")}function l4(s,a,g){if(s=Qt(s),s&&(g||a===r))return s.replace(Ku,"");if(!s||!(a=rr(a)))return s;var E=Rr(s),N=sg(E,Rr(a));return wn(E,N).join("")}function u4(s,a){var g=R,E=C;if(ge(a)){var N="separator"in a?a.separator:N;g="length"in a?kt(a.length):g,E="omission"in a?rr(a.omission):E}s=Qt(s);var U=s.length;if(Fi(s)){var H=Rr(s);U=H.length}if(g>=U)return s;var K=g-Bi(E);if(K<1)return E;var J=H?wn(H,0,K).join(""):s.slice(0,K);if(N===r)return J+E;if(H&&(K+=J.length-K),Zf(N)){if(s.slice(K).search(N)){var ut,ft=J;for(N.global||(N=df(N.source,Qt(Av.exec(N))+"g")),N.lastIndex=0;ut=N.exec(ft);)var ht=ut.index;J=J.slice(0,ht===r?K:ht)}}else if(s.indexOf(rr(N),K)!=K){var mt=J.lastIndexOf(N);mt>-1&&(J=J.slice(0,mt))}return J+E}function f4(s){return s=Qt(s),s&&xN.test(s)?s.replace(Tv,UM):s}var c4=zi(function(s,a,g){return s+(g?" ":"")+a.toUpperCase()}),tc=Yg("toUpperCase");function Xm(s,a,g){return s=Qt(s),a=g?r:a,a===r?kM(s)?jM(s):SM(s):s.match(a)||[]}var Km=Dt(function(s,a){try{return tr(s,r,a)}catch(g){return Yf(g)?g:new It(g)}}),h4=tn(function(s,a){return fr(a,function(g){g=qr(g),Qr(s,g,Xf(s[g],s))}),s});function d4(s){var a=s==null?0:s.length,g=At();return s=a?he(s,function(E){if(typeof E[1]!="function")throw new cr(l);return[g(E[0]),E[1]]}):[],Dt(function(E){for(var N=-1;++N<a;){var U=s[N];if(tr(U[0],this,E))return tr(U[1],this,E)}})}function p4(s){return U3(dr(s,d))}function ec(s){return function(){return s}}function v4(s,a){return s==null||s!==s?a:s}var g4=Qg(),m4=Qg(!0);function Ke(s){return s}function rc(s){return Cg(typeof s=="function"?s:dr(s,d))}function y4(s){return Ig(dr(s,d))}function _4(s,a){return Pg(s,dr(a,d))}var b4=Dt(function(s,a){return function(g){return ks(g,s,a)}}),x4=Dt(function(s,a){return function(g){return ks(s,g,a)}});function nc(s,a,g){var E=Ie(a),N=Ea(a,E);g==null&&!(ge(a)&&(N.length||!E.length))&&(g=a,a=s,s=this,N=Ea(a,Ie(a)));var U=!(ge(g)&&"chain"in g)||!!g.chain,H=rn(s);return fr(N,function(K){var J=a[K];s[K]=J,H&&(s.prototype[K]=function(){var ut=this.__chain__;if(U||ut){var ft=s(this.__wrapped__),ht=ft.__actions__=Ve(this.__actions__);return ht.push({func:J,args:arguments,thisArg:s}),ft.__chain__=ut,ft}return J.apply(s,gn([this.value()],arguments))})}),s}function w4(){return Ne._===this&&(Ne._=XM),this}function ic(){}function T4(s){return s=kt(s),Dt(function(a){return Ng(a,s)})}var E4=Lf(he),S4=Lf(Jv),A4=Lf(of);function Ym(s){return jf(s)?af(qr(s)):rk(s)}function O4(s){return function(a){return s==null?r:Xn(s,a)}}var C4=tm(),R4=tm(!0);function sc(){return[]}function oc(){return!1}function I4(){return{}}function P4(){return""}function N4(){return!0}function M4(s,a){if(s=kt(s),s<1||s>nt)return[];var g=k,E=De(s,k);a=At(a),s-=k;for(var N=ff(E,a);++g<s;)a(g);return N}function k4(s){return Mt(s)?he(s,qr):nr(s)?[s]:Ve(gm(Qt(s)))}function L4(s){var a=++VM;return Qt(s)+a}var F4=Ia(function(s,a){return s+a},0),B4=Ff("ceil"),D4=Ia(function(s,a){return s/a},1),U4=Ff("floor");function $4(s){return s&&s.length?Ta(s,Ke,xf):r}function G4(s,a){return s&&s.length?Ta(s,At(a,2),xf):r}function j4(s){return rg(s,Ke)}function q4(s,a){return rg(s,At(a,2))}function z4(s){return s&&s.length?Ta(s,Ke,Sf):r}function H4(s,a){return s&&s.length?Ta(s,At(a,2),Sf):r}var V4=Ia(function(s,a){return s*a},1),W4=Ff("round"),X4=Ia(function(s,a){return s-a},0);function K4(s){return s&&s.length?uf(s,Ke):0}function Y4(s,a){return s&&s.length?uf(s,At(a,2)):0}return B.after=yL,B.ary=Om,B.assign=sF,B.assignIn=Gm,B.assignInWith=qa,B.assignWith=oF,B.at=aF,B.before=Cm,B.bind=Xf,B.bindAll=h4,B.bindKey=Rm,B.castArray=IL,B.chain=Em,B.chunk=Uk,B.compact=$k,B.concat=Gk,B.cond=d4,B.conforms=p4,B.constant=ec,B.countBy=K5,B.create=lF,B.curry=Im,B.curryRight=Pm,B.debounce=Nm,B.defaults=uF,B.defaultsDeep=fF,B.defer=_L,B.delay=bL,B.difference=jk,B.differenceBy=qk,B.differenceWith=zk,B.drop=Hk,B.dropRight=Vk,B.dropRightWhile=Wk,B.dropWhile=Xk,B.fill=Kk,B.filter=Z5,B.flatMap=tL,B.flatMapDeep=eL,B.flatMapDepth=rL,B.flatten=bm,B.flattenDeep=Yk,B.flattenDepth=Zk,B.flip=xL,B.flow=g4,B.flowRight=m4,B.fromPairs=Qk,B.functions=mF,B.functionsIn=yF,B.groupBy=nL,B.initial=t5,B.intersection=e5,B.intersectionBy=r5,B.intersectionWith=n5,B.invert=bF,B.invertBy=xF,B.invokeMap=sL,B.iteratee=rc,B.keyBy=oL,B.keys=Ie,B.keysIn=Xe,B.map=Ba,B.mapKeys=TF,B.mapValues=EF,B.matches=y4,B.matchesProperty=_4,B.memoize=Ua,B.merge=SF,B.mergeWith=jm,B.method=b4,B.methodOf=x4,B.mixin=nc,B.negate=$a,B.nthArg=T4,B.omit=AF,B.omitBy=OF,B.once=wL,B.orderBy=aL,B.over=E4,B.overArgs=TL,B.overEvery=S4,B.overSome=A4,B.partial=Kf,B.partialRight=Mm,B.partition=lL,B.pick=CF,B.pickBy=qm,B.property=Ym,B.propertyOf=O4,B.pull=a5,B.pullAll=wm,B.pullAllBy=l5,B.pullAllWith=u5,B.pullAt=f5,B.range=C4,B.rangeRight=R4,B.rearg=EL,B.reject=cL,B.remove=c5,B.rest=SL,B.reverse=Vf,B.sampleSize=dL,B.set=IF,B.setWith=PF,B.shuffle=pL,B.slice=h5,B.sortBy=mL,B.sortedUniq=_5,B.sortedUniqBy=b5,B.split=t4,B.spread=AL,B.tail=x5,B.take=w5,B.takeRight=T5,B.takeRightWhile=E5,B.takeWhile=S5,B.tap=$5,B.throttle=OL,B.thru=Fa,B.toArray=Dm,B.toPairs=zm,B.toPairsIn=Hm,B.toPath=k4,B.toPlainObject=$m,B.transform=NF,B.unary=CL,B.union=A5,B.unionBy=O5,B.unionWith=C5,B.uniq=R5,B.uniqBy=I5,B.uniqWith=P5,B.unset=MF,B.unzip=Wf,B.unzipWith=Tm,B.update=kF,B.updateWith=LF,B.values=Wi,B.valuesIn=FF,B.without=N5,B.words=Xm,B.wrap=RL,B.xor=M5,B.xorBy=k5,B.xorWith=L5,B.zip=F5,B.zipObject=B5,B.zipObjectDeep=D5,B.zipWith=U5,B.entries=zm,B.entriesIn=Hm,B.extend=Gm,B.extendWith=qa,nc(B,B),B.add=F4,B.attempt=Km,B.camelCase=$F,B.capitalize=Vm,B.ceil=B4,B.clamp=BF,B.clone=PL,B.cloneDeep=ML,B.cloneDeepWith=kL,B.cloneWith=NL,B.conformsTo=LL,B.deburr=Wm,B.defaultTo=v4,B.divide=D4,B.endsWith=GF,B.eq=Pr,B.escape=jF,B.escapeRegExp=qF,B.every=Y5,B.find=Q5,B.findIndex=ym,B.findKey=cF,B.findLast=J5,B.findLastIndex=_m,B.findLastKey=hF,B.floor=U4,B.forEach=Sm,B.forEachRight=Am,B.forIn=dF,B.forInRight=pF,B.forOwn=vF,B.forOwnRight=gF,B.get=Qf,B.gt=FL,B.gte=BL,B.has=_F,B.hasIn=Jf,B.head=xm,B.identity=Ke,B.includes=iL,B.indexOf=Jk,B.inRange=DF,B.invoke=wF,B.isArguments=Zn,B.isArray=Mt,B.isArrayBuffer=DL,B.isArrayLike=We,B.isArrayLikeObject=be,B.isBoolean=UL,B.isBuffer=Tn,B.isDate=$L,B.isElement=GL,B.isEmpty=jL,B.isEqual=qL,B.isEqualWith=zL,B.isError=Yf,B.isFinite=HL,B.isFunction=rn,B.isInteger=km,B.isLength=Ga,B.isMap=Lm,B.isMatch=VL,B.isMatchWith=WL,B.isNaN=XL,B.isNative=KL,B.isNil=ZL,B.isNull=YL,B.isNumber=Fm,B.isObject=ge,B.isObjectLike=me,B.isPlainObject=$s,B.isRegExp=Zf,B.isSafeInteger=QL,B.isSet=Bm,B.isString=ja,B.isSymbol=nr,B.isTypedArray=Vi,B.isUndefined=JL,B.isWeakMap=tF,B.isWeakSet=eF,B.join=i5,B.kebabCase=zF,B.last=vr,B.lastIndexOf=s5,B.lowerCase=HF,B.lowerFirst=VF,B.lt=rF,B.lte=nF,B.max=$4,B.maxBy=G4,B.mean=j4,B.meanBy=q4,B.min=z4,B.minBy=H4,B.stubArray=sc,B.stubFalse=oc,B.stubObject=I4,B.stubString=P4,B.stubTrue=N4,B.multiply=V4,B.nth=o5,B.noConflict=w4,B.noop=ic,B.now=Da,B.pad=WF,B.padEnd=XF,B.padStart=KF,B.parseInt=YF,B.random=UF,B.reduce=uL,B.reduceRight=fL,B.repeat=ZF,B.replace=QF,B.result=RF,B.round=W4,B.runInContext=Q,B.sample=hL,B.size=vL,B.snakeCase=JF,B.some=gL,B.sortedIndex=d5,B.sortedIndexBy=p5,B.sortedIndexOf=v5,B.sortedLastIndex=g5,B.sortedLastIndexBy=m5,B.sortedLastIndexOf=y5,B.startCase=e4,B.startsWith=r4,B.subtract=X4,B.sum=K4,B.sumBy=Y4,B.template=n4,B.times=M4,B.toFinite=nn,B.toInteger=kt,B.toLength=Um,B.toLower=i4,B.toNumber=gr,B.toSafeInteger=iF,B.toString=Qt,B.toUpper=s4,B.trim=o4,B.trimEnd=a4,B.trimStart=l4,B.truncate=u4,B.unescape=f4,B.uniqueId=L4,B.upperCase=c4,B.upperFirst=tc,B.each=Sm,B.eachRight=Am,B.first=xm,nc(B,function(){var s={};return Gr(B,function(a,g){ee.call(B.prototype,g)||(s[g]=a)}),s}(),{chain:!1}),B.VERSION=n,fr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),fr(["drop","take"],function(s,a){jt.prototype[s]=function(g){g=g===r?1:Ae(kt(g),0);var E=this.__filtered__&&!a?new jt(this):this.clone();return E.__filtered__?E.__takeCount__=De(g,E.__takeCount__):E.__views__.push({size:De(g,k),type:s+(E.__dir__<0?"Right":"")}),E},jt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),fr(["filter","map","takeWhile"],function(s,a){var g=a+1,E=g==F||g==Z;jt.prototype[s]=function(N){var U=this.clone();return U.__iteratees__.push({iteratee:At(N,3),type:g}),U.__filtered__=U.__filtered__||E,U}}),fr(["head","last"],function(s,a){var g="take"+(a?"Right":"");jt.prototype[s]=function(){return this[g](1).value()[0]}}),fr(["initial","tail"],function(s,a){var g="drop"+(a?"":"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=Dt(function(s,a){return typeof s=="function"?new jt(this):this.map(function(g){return ks(g,s,a)})}),jt.prototype.reject=function(s){return this.filter($a(At(s)))},jt.prototype.slice=function(s,a){s=kt(s);var g=this;return g.__filtered__&&(s>0||a<0)?new jt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),a!==r&&(a=kt(a),g=a<0?g.dropRight(-a):g.take(a-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,a){var g=/^(?:filter|find|map|reject)|While$/.test(a),E=/^(?:head|last)$/.test(a),N=B[E?"take"+(a=="last"?"Right":""):a],U=E||/^find/.test(a);N&&(B.prototype[a]=function(){var H=this.__wrapped__,K=E?[1]:arguments,J=H instanceof jt,ut=K[0],ft=J||Mt(H),ht=function($t){var zt=N.apply(B,gn([$t],K));return E&&mt?zt[0]:zt};ft&&g&&typeof ut=="function"&&ut.length!=1&&(J=ft=!1);var mt=this.__chain__,wt=!!this.__actions__.length,Ot=U&&!mt,Bt=J&&!wt;if(!U&&ft){H=Bt?H:new jt(this);var Ct=s.apply(H,K);return Ct.__actions__.push({func:Fa,args:[ht],thisArg:r}),new hr(Ct,mt)}return Ot&&Bt?s.apply(this,K):(Ct=this.thru(ht),Ot?E?Ct.value()[0]:Ct.value():Ct)})}),fr(["pop","push","shift","sort","splice","unshift"],function(s){var a=la[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",E=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(E&&!this.__chain__){var U=this.value();return a.apply(Mt(U)?U:[],N)}return this[g](function(H){return a.apply(Mt(H)?H:[],N)})}}),Gr(jt.prototype,function(s,a){var g=B[a];if(g){var E=g.name+"";ee.call(Gi,E)||(Gi[E]=[]),Gi[E].push({name:a,func:g})}}),Gi[Ra(r,_).name]=[{name:"wrapper",func:r}],jt.prototype.clone=f3,jt.prototype.reverse=c3,jt.prototype.value=h3,B.prototype.at=G5,B.prototype.chain=j5,B.prototype.commit=q5,B.prototype.next=z5,B.prototype.plant=V5,B.prototype.reverse=W5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=X5,B.prototype.first=B.prototype.head,Os&&(B.prototype[Os]=H5),B},Di=qM();qn?((qn.exports=Di)._=Di,ef._=Di):Ne._=Di}).call(Ye)}(ea,ea.exports);var _v=ea.exports;const cN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},hN=St.forwardRef((e,t)=>{const[r,n]=St.useState([]),[,i]=St.useState(0),[o,l]=St.useState([]),[,u]=_t.useState(0),[,f]=_t.useState(!1),[h,p]=eN({autoPlay:!1}),d=_t.useRef(null),c=_t.useRef(null),v=_t.useRef(cN),m=_t.useRef(),{tl:y,isDragging:b}=_t.useContext(ti),{frames:_,delays:w}=h,{src:T,startAt:x,endAt:S,frameStartAt:I,frameEndAt:A,loop:O,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:W,adjustmentFilter:D}=_s(F),{blurRadius:k=0}=F,j=.1;uN(T,p),mr(ke.PAUSE,it=>{console.log("pause event",it),d.current&&(d.current.stop(),v.current.isPlaying=!1)}),St.useEffect(()=>{v.current&&d.current&&(b?(d.current.stop(),v.current.isPlaying=!1,v.current.isDragging=!0):v.current.isDragging=!1)},[b]),St.useEffect(()=>{if(!Qi(_)){const it=PP(_,gt=>{const{data:yt,width:Tt,height:te}=gt,Lt=new Uint8Array(yt);return on.Texture.fromBuffer(Lt,Tt,te)}),st=it.map((gt,yt)=>({texture:gt,time:w[yt]}));n(it),l(st);let dt=0;w.forEach(gt=>{dt+=gt*10}),i(dt),v.current.totalDuration=dt,v.current.totalFrames=_.length}},[_,w]);const G=_v.debounce(it=>{if(d.current){let st=it===0?0:it/j;st=isNaN(st)?0:st;const dt=v.current.totalFrames;st=st>dt?dt:st,st>=dt?(d.current.gotoAndStop(0),v.current.isPlaying=!1):(d.current.gotoAndPlay(st||0),v.current.isPlaying=!0)}},20),Y=_v.debounce(()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},50),X=it=>{if(d.current){let st=it===0?0:it/j;st=isNaN(st)?0:st;const dt=v.current.totalFrames;st=st>dt?dt:st,st>=dt?(d.current.gotoAndStop(0),v.current.isPlaying=!1):(d.current.gotoAndPlay(st||0),v.current.isPlaying=!0)}},$=()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},V=()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},tt=it=>{var dt;const st=it+((dt=m.current)==null?void 0:dt.time());d.current&&v.current.isDragging?(G(st),Y(),v.current.isPlaying=!1):d.current&&!v.current.isPlaying&&(G(st),v.current.isPlaying=!0)},et=()=>{f(!0)};return _t.useEffect(()=>{let it=Te.context(()=>{});if(c.current&&y.current){const st={duration:Number(A)-Number(I),onStart:X,onComplete:$,onStartParams:[I,A],onCompleteParams:[],onInterrupt:V,onUpdate:tt,onUpdateParams:[I,A]};m.current&&m.current.kill(),it=Te.context(()=>{m.current=Te.from(c.current,st,I),y.current.add(m.current,x)})}return()=>{m.current&&(m.current.kill(),Te.killTweensOf(m.current)),it.revert()}},[M,x,S,I,A]),re.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:re.jsx(ye.Container,{ref:c,children:r&&r.length>0&&re.jsx(yv,{x:C,y:P,width:L,height:R,animationSpeed:1,loop:O,textures:o,onComplete:et,onFrameChange:it=>u(it),anchor:.5,forwardRef:d,interactive:!0,pointerdown:q,filters:[Z,z,nt,D,...k>0?[W]:[]]})})})});var bv={exports:{}};/*!
1959
+ `)+dt+`return __p
1960
+ }`;var Ft=Zm(function(){return Kt(U,wt+"return "+dt).apply(r,H)});if(Ft.source=dt,Zf(Ft))throw Ft;return Ft}function l4(s){return Jt(s).toLowerCase()}function u4(s){return Jt(s).toUpperCase()}function f4(s,a,g){if(s=Jt(s),s&&(g||a===r))return og(s);if(!s||!(a=rr(a)))return s;var E=Rr(s),N=Rr(a),U=ag(E,N),H=lg(E,N)+1;return wn(E,U,H).join("")}function c4(s,a,g){if(s=Jt(s),s&&(g||a===r))return s.slice(0,fg(s)+1);if(!s||!(a=rr(a)))return s;var E=Rr(s),N=lg(E,Rr(a))+1;return wn(E,0,N).join("")}function h4(s,a,g){if(s=Jt(s),s&&(g||a===r))return s.replace(Yu,"");if(!s||!(a=rr(a)))return s;var E=Rr(s),N=ag(E,Rr(a));return wn(E,N).join("")}function d4(s,a){var g=R,E=C;if(ge(a)){var N="separator"in a?a.separator:N;g="length"in a?kt(a.length):g,E="omission"in a?rr(a.omission):E}s=Jt(s);var U=s.length;if(Bi(s)){var H=Rr(s);U=H.length}if(g>=U)return s;var K=g-Di(E);if(K<1)return E;var J=H?wn(H,0,K).join(""):s.slice(0,K);if(N===r)return J+E;if(H&&(K+=J.length-K),Qf(N)){if(s.slice(K).search(N)){var ut,ft=J;for(N.global||(N=pf(N.source,Jt(Cv.exec(N))+"g")),N.lastIndex=0;ut=N.exec(ft);)var dt=ut.index;J=J.slice(0,dt===r?K:dt)}}else if(s.indexOf(rr(N),K)!=K){var mt=J.lastIndexOf(N);mt>-1&&(J=J.slice(0,mt))}return J+E}function p4(s){return s=Jt(s),s&&SN.test(s)?s.replace(Sv,qM):s}var v4=Hi(function(s,a,g){return s+(g?" ":"")+a.toUpperCase()}),ec=Qg("toUpperCase");function Ym(s,a,g){return s=Jt(s),a=g?r:a,a===r?DM(s)?VM(s):RM(s):s.match(a)||[]}var Zm=Bt(function(s,a){try{return tr(s,r,a)}catch(g){return Zf(g)?g:new It(g)}}),g4=en(function(s,a){return fr(a,function(g){g=qr(g),Jr(s,g,Kf(s[g],s))}),s});function m4(s){var a=s==null?0:s.length,g=At();return s=a?he(s,function(E){if(typeof E[1]!="function")throw new cr(l);return[g(E[0]),E[1]]}):[],Bt(function(E){for(var N=-1;++N<a;){var U=s[N];if(tr(U[0],this,E))return tr(U[1],this,E)}})}function y4(s){return q3(dr(s,d))}function rc(s){return function(){return s}}function _4(s,a){return s==null||s!==s?a:s}var b4=tm(),x4=tm(!0);function Ke(s){return s}function nc(s){return Ig(typeof s=="function"?s:dr(s,d))}function w4(s){return Ng(dr(s,d))}function T4(s,a){return Mg(s,dr(a,d))}var E4=Bt(function(s,a){return function(g){return ks(g,s,a)}}),S4=Bt(function(s,a){return function(g){return ks(s,g,a)}});function ic(s,a,g){var E=Ie(a),N=Ea(a,E);g==null&&!(ge(a)&&(N.length||!E.length))&&(g=a,a=s,s=this,N=Ea(a,Ie(a)));var U=!(ge(g)&&"chain"in g)||!!g.chain,H=nn(s);return fr(N,function(K){var J=a[K];s[K]=J,H&&(s.prototype[K]=function(){var ut=this.__chain__;if(U||ut){var ft=s(this.__wrapped__),dt=ft.__actions__=Ve(this.__actions__);return dt.push({func:J,args:arguments,thisArg:s}),ft.__chain__=ut,ft}return J.apply(s,gn([this.value()],arguments))})}),s}function A4(){return Ne._===this&&(Ne._=QM),this}function sc(){}function O4(s){return s=kt(s),Bt(function(a){return kg(a,s)})}var C4=Ff(he),R4=Ff(eg),I4=Ff(af);function Qm(s){return qf(s)?lf(qr(s)):ok(s)}function P4(s){return function(a){return s==null?r:Kn(s,a)}}var N4=rm(),M4=rm(!0);function oc(){return[]}function ac(){return!1}function k4(){return{}}function L4(){return""}function F4(){return!0}function B4(s,a){if(s=kt(s),s<1||s>it)return[];var g=k,E=De(s,k);a=At(a),s-=k;for(var N=cf(E,a);++g<s;)a(g);return N}function D4(s){return Mt(s)?he(s,qr):nr(s)?[s]:Ve(ym(Jt(s)))}function U4(s){var a=++YM;return Jt(s)+a}var $4=Ia(function(s,a){return s+a},0),G4=Bf("ceil"),j4=Ia(function(s,a){return s/a},1),q4=Bf("floor");function z4(s){return s&&s.length?Ta(s,Ke,wf):r}function H4(s,a){return s&&s.length?Ta(s,At(a,2),wf):r}function V4(s){return ig(s,Ke)}function W4(s,a){return ig(s,At(a,2))}function X4(s){return s&&s.length?Ta(s,Ke,Af):r}function K4(s,a){return s&&s.length?Ta(s,At(a,2),Af):r}var Y4=Ia(function(s,a){return s*a},1),Z4=Bf("round"),Q4=Ia(function(s,a){return s-a},0);function J4(s){return s&&s.length?ff(s,Ke):0}function tB(s,a){return s&&s.length?ff(s,At(a,2)):0}return B.after=wL,B.ary=Rm,B.assign=uF,B.assignIn=qm,B.assignInWith=qa,B.assignWith=fF,B.at=cF,B.before=Im,B.bind=Kf,B.bindAll=g4,B.bindKey=Pm,B.castArray=kL,B.chain=Am,B.chunk=qk,B.compact=zk,B.concat=Hk,B.cond=m4,B.conforms=y4,B.constant=rc,B.countBy=J5,B.create=hF,B.curry=Nm,B.curryRight=Mm,B.debounce=km,B.defaults=dF,B.defaultsDeep=pF,B.defer=TL,B.delay=EL,B.difference=Vk,B.differenceBy=Wk,B.differenceWith=Xk,B.drop=Kk,B.dropRight=Yk,B.dropRightWhile=Zk,B.dropWhile=Qk,B.fill=Jk,B.filter=eL,B.flatMap=iL,B.flatMapDeep=sL,B.flatMapDepth=oL,B.flatten=wm,B.flattenDeep=t5,B.flattenDepth=e5,B.flip=SL,B.flow=b4,B.flowRight=x4,B.fromPairs=r5,B.functions=xF,B.functionsIn=wF,B.groupBy=aL,B.initial=i5,B.intersection=s5,B.intersectionBy=o5,B.intersectionWith=a5,B.invert=EF,B.invertBy=SF,B.invokeMap=uL,B.iteratee=nc,B.keyBy=fL,B.keys=Ie,B.keysIn=Xe,B.map=Ba,B.mapKeys=OF,B.mapValues=CF,B.matches=w4,B.matchesProperty=T4,B.memoize=Ua,B.merge=RF,B.mergeWith=zm,B.method=E4,B.methodOf=S4,B.mixin=ic,B.negate=$a,B.nthArg=O4,B.omit=IF,B.omitBy=PF,B.once=AL,B.orderBy=cL,B.over=C4,B.overArgs=OL,B.overEvery=R4,B.overSome=I4,B.partial=Yf,B.partialRight=Lm,B.partition=hL,B.pick=NF,B.pickBy=Hm,B.property=Qm,B.propertyOf=P4,B.pull=c5,B.pullAll=Em,B.pullAllBy=h5,B.pullAllWith=d5,B.pullAt=p5,B.range=N4,B.rangeRight=M4,B.rearg=CL,B.reject=vL,B.remove=v5,B.rest=RL,B.reverse=Wf,B.sampleSize=mL,B.set=kF,B.setWith=LF,B.shuffle=yL,B.slice=g5,B.sortBy=xL,B.sortedUniq=T5,B.sortedUniqBy=E5,B.split=i4,B.spread=IL,B.tail=S5,B.take=A5,B.takeRight=O5,B.takeRightWhile=C5,B.takeWhile=R5,B.tap=z5,B.throttle=PL,B.thru=Fa,B.toArray=$m,B.toPairs=Vm,B.toPairsIn=Wm,B.toPath=D4,B.toPlainObject=jm,B.transform=FF,B.unary=NL,B.union=I5,B.unionBy=P5,B.unionWith=N5,B.uniq=M5,B.uniqBy=k5,B.uniqWith=L5,B.unset=BF,B.unzip=Xf,B.unzipWith=Sm,B.update=DF,B.updateWith=UF,B.values=Xi,B.valuesIn=$F,B.without=F5,B.words=Ym,B.wrap=ML,B.xor=B5,B.xorBy=D5,B.xorWith=U5,B.zip=$5,B.zipObject=G5,B.zipObjectDeep=j5,B.zipWith=q5,B.entries=Vm,B.entriesIn=Wm,B.extend=qm,B.extendWith=qa,ic(B,B),B.add=$4,B.attempt=Zm,B.camelCase=zF,B.capitalize=Xm,B.ceil=G4,B.clamp=GF,B.clone=LL,B.cloneDeep=BL,B.cloneDeepWith=DL,B.cloneWith=FL,B.conformsTo=UL,B.deburr=Km,B.defaultTo=_4,B.divide=j4,B.endsWith=HF,B.eq=Pr,B.escape=VF,B.escapeRegExp=WF,B.every=tL,B.find=rL,B.findIndex=bm,B.findKey=vF,B.findLast=nL,B.findLastIndex=xm,B.findLastKey=gF,B.floor=q4,B.forEach=Om,B.forEachRight=Cm,B.forIn=mF,B.forInRight=yF,B.forOwn=_F,B.forOwnRight=bF,B.get=Jf,B.gt=$L,B.gte=GL,B.has=TF,B.hasIn=tc,B.head=Tm,B.identity=Ke,B.includes=lL,B.indexOf=n5,B.inRange=jF,B.invoke=AF,B.isArguments=Qn,B.isArray=Mt,B.isArrayBuffer=jL,B.isArrayLike=We,B.isArrayLikeObject=be,B.isBoolean=qL,B.isBuffer=Tn,B.isDate=zL,B.isElement=HL,B.isEmpty=VL,B.isEqual=WL,B.isEqualWith=XL,B.isError=Zf,B.isFinite=KL,B.isFunction=nn,B.isInteger=Fm,B.isLength=Ga,B.isMap=Bm,B.isMatch=YL,B.isMatchWith=ZL,B.isNaN=QL,B.isNative=JL,B.isNil=eF,B.isNull=tF,B.isNumber=Dm,B.isObject=ge,B.isObjectLike=ye,B.isPlainObject=$s,B.isRegExp=Qf,B.isSafeInteger=rF,B.isSet=Um,B.isString=ja,B.isSymbol=nr,B.isTypedArray=Wi,B.isUndefined=nF,B.isWeakMap=iF,B.isWeakSet=sF,B.join=l5,B.kebabCase=XF,B.last=vr,B.lastIndexOf=u5,B.lowerCase=KF,B.lowerFirst=YF,B.lt=oF,B.lte=aF,B.max=z4,B.maxBy=H4,B.mean=V4,B.meanBy=W4,B.min=X4,B.minBy=K4,B.stubArray=oc,B.stubFalse=ac,B.stubObject=k4,B.stubString=L4,B.stubTrue=F4,B.multiply=Y4,B.nth=f5,B.noConflict=A4,B.noop=sc,B.now=Da,B.pad=ZF,B.padEnd=QF,B.padStart=JF,B.parseInt=t4,B.random=qF,B.reduce=dL,B.reduceRight=pL,B.repeat=e4,B.replace=r4,B.result=MF,B.round=Z4,B.runInContext=Q,B.sample=gL,B.size=_L,B.snakeCase=n4,B.some=bL,B.sortedIndex=m5,B.sortedIndexBy=y5,B.sortedIndexOf=_5,B.sortedLastIndex=b5,B.sortedLastIndexBy=x5,B.sortedLastIndexOf=w5,B.startCase=s4,B.startsWith=o4,B.subtract=Q4,B.sum=J4,B.sumBy=tB,B.template=a4,B.times=B4,B.toFinite=sn,B.toInteger=kt,B.toLength=Gm,B.toLower=l4,B.toNumber=gr,B.toSafeInteger=lF,B.toString=Jt,B.toUpper=u4,B.trim=f4,B.trimEnd=c4,B.trimStart=h4,B.truncate=d4,B.unescape=p4,B.uniqueId=U4,B.upperCase=v4,B.upperFirst=ec,B.each=Om,B.eachRight=Cm,B.first=Tm,ic(B,function(){var s={};return Gr(B,function(a,g){re.call(B.prototype,g)||(s[g]=a)}),s}(),{chain:!1}),B.VERSION=n,fr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),fr(["drop","take"],function(s,a){jt.prototype[s]=function(g){g=g===r?1:Ae(kt(g),0);var E=this.__filtered__&&!a?new jt(this):this.clone();return E.__filtered__?E.__takeCount__=De(g,E.__takeCount__):E.__views__.push({size:De(g,k),type:s+(E.__dir__<0?"Right":"")}),E},jt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),fr(["filter","map","takeWhile"],function(s,a){var g=a+1,E=g==F||g==Z;jt.prototype[s]=function(N){var U=this.clone();return U.__iteratees__.push({iteratee:At(N,3),type:g}),U.__filtered__=U.__filtered__||E,U}}),fr(["head","last"],function(s,a){var g="take"+(a?"Right":"");jt.prototype[s]=function(){return this[g](1).value()[0]}}),fr(["initial","tail"],function(s,a){var g="drop"+(a?"":"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,a){return typeof s=="function"?new jt(this):this.map(function(g){return ks(g,s,a)})}),jt.prototype.reject=function(s){return this.filter($a(At(s)))},jt.prototype.slice=function(s,a){s=kt(s);var g=this;return g.__filtered__&&(s>0||a<0)?new jt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),a!==r&&(a=kt(a),g=a<0?g.dropRight(-a):g.take(a-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,a){var g=/^(?:filter|find|map|reject)|While$/.test(a),E=/^(?:head|last)$/.test(a),N=B[E?"take"+(a=="last"?"Right":""):a],U=E||/^find/.test(a);N&&(B.prototype[a]=function(){var H=this.__wrapped__,K=E?[1]:arguments,J=H instanceof jt,ut=K[0],ft=J||Mt(H),dt=function($t){var zt=N.apply(B,gn([$t],K));return E&&mt?zt[0]:zt};ft&&g&&typeof ut=="function"&&ut.length!=1&&(J=ft=!1);var mt=this.__chain__,wt=!!this.__actions__.length,Ot=U&&!mt,Ft=J&&!wt;if(!U&&ft){H=Ft?H:new jt(this);var Ct=s.apply(H,K);return Ct.__actions__.push({func:Fa,args:[dt],thisArg:r}),new hr(Ct,mt)}return Ot&&Ft?s.apply(this,K):(Ct=this.thru(dt),Ot?E?Ct.value()[0]:Ct.value():Ct)})}),fr(["pop","push","shift","sort","splice","unshift"],function(s){var a=la[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",E=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(E&&!this.__chain__){var U=this.value();return a.apply(Mt(U)?U:[],N)}return this[g](function(H){return a.apply(Mt(H)?H:[],N)})}}),Gr(jt.prototype,function(s,a){var g=B[a];if(g){var E=g.name+"";re.call(ji,E)||(ji[E]=[]),ji[E].push({name:a,func:g})}}),ji[Ra(r,b).name]=[{name:"wrapper",func:r}],jt.prototype.clone=p3,jt.prototype.reverse=v3,jt.prototype.value=g3,B.prototype.at=H5,B.prototype.chain=V5,B.prototype.commit=W5,B.prototype.next=X5,B.prototype.plant=Y5,B.prototype.reverse=Z5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=Q5,B.prototype.first=B.prototype.head,Os&&(B.prototype[Os]=K5),B},Ui=WM();zn?((zn.exports=Ui)._=Ui,rf._=Ui):Ne._=Ui}).call(Ye)}(ea,ea.exports);var xv=ea.exports;const vN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},gN=Et.forwardRef((e,t)=>{const[r,n]=Et.useState([]),[,i]=Et.useState(0),[o,l]=Et.useState([]),[,u]=_t.useState(0),[,f]=_t.useState(!1),[h,p]=sN({autoPlay:!1}),d=_t.useRef(null),c=_t.useRef(null),v=_t.useRef(vN),m=_t.useRef(),{tl:y,isDragging:_}=_t.useContext(ti),{frames:b,delays:w}=h,{src:T,startAt:x,endAt:S,frameStartAt:I,frameEndAt:A,loop:O,transformation:{width:L=0,height:R=0,x:C,y:P,animation:M,colorCorrection:F={}},pointerdown:q}=e,{temperatureFilter:Z,sharpnessFilter:z,hueFilter:it,blurFilter:W,adjustmentFilter:D}=_s(F),{blurRadius:k=0}=F,j=.1;dN(T,p),mr(ke.PAUSE,rt=>{console.log("pause event",rt),d.current&&(d.current.stop(),v.current.isPlaying=!1)}),Et.useEffect(()=>{v.current&&d.current&&(_?(d.current.stop(),v.current.isPlaying=!1,v.current.isDragging=!0):v.current.isDragging=!1)},[_]),Et.useEffect(()=>{if(!ni(b)){const rt=LP(b,gt=>{const{data:yt,width:St,height:ee}=gt,Ut=new Uint8Array(yt);return zr.Texture.fromBuffer(Ut,St,ee)}),ot=rt.map((gt,yt)=>({texture:gt,time:w[yt]}));n(rt),l(ot);let ct=0;w.forEach(gt=>{ct+=gt*10}),i(ct),v.current.totalDuration=ct,v.current.totalFrames=b.length}},[b,w]);const G=xv.debounce(rt=>{if(d.current){let ot=rt===0?0:rt/j;ot=isNaN(ot)?0:ot;const ct=v.current.totalFrames;ot=ot>ct?ct:ot,ot>=ct?(d.current.gotoAndStop(0),v.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),v.current.isPlaying=!0)}},20),Y=xv.debounce(()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},50),X=rt=>{if(d.current){let ot=rt===0?0:rt/j;ot=isNaN(ot)?0:ot;const ct=v.current.totalFrames;ot=ot>ct?ct:ot,ot>=ct?(d.current.gotoAndStop(0),v.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),v.current.isPlaying=!0)}},$=()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},V=()=>{d.current&&(d.current.stop(),v.current.isPlaying=!1)},tt=rt=>{var ct;const ot=rt+((ct=m.current)==null?void 0:ct.time());d.current&&v.current.isDragging?(G(ot),Y(),v.current.isPlaying=!1):d.current&&!v.current.isPlaying&&(G(ot),v.current.isPlaying=!0)},et=()=>{f(!0)};return _t.useEffect(()=>{let rt=Te.context(()=>{});if(c.current&&y.current){const ot={duration:Number(A)-Number(I),onStart:X,onComplete:$,onStartParams:[I,A],onCompleteParams:[],onInterrupt:V,onUpdate:tt,onUpdateParams:[I,A]};m.current&&m.current.kill(),rt=Te.context(()=>{m.current=Te.from(c.current,ot,I),y.current.add(m.current,x)})}return()=>{m.current&&(m.current.kill(),Te.killTweensOf(m.current)),rt.revert()}},[M,x,S,I,A]),Yt.jsx(ii,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Yt.jsx(me.Container,{ref:c,children:r&&r.length>0&&Yt.jsx(bv,{x:C,y:P,width:L,height:R,animationSpeed:1,loop:O,textures:o,onComplete:et,onFrameChange:rt=>u(rt),anchor:.5,forwardRef:d,interactive:!0,pointerdown:q,filters:[Z,z,it,D,...k>0?[W]:[]]})})})});var wv={exports:{}};/*!
1950
1961
  * Quill Editor v1.3.7
1951
1962
  * https://quilljs.com/
1952
1963
  * Copyright (c) 2014, Jason Chen
1953
1964
  * Copyright (c) 2013, salesforce.com
1954
- */(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 l=n[o]={i:o,l:!1,exports:{}};return r[o].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=r,i.c=n,i.d=function(o,l,u){i.o(o,l)||Object.defineProperty(o,l,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(l,"a",l),l},i.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},i.p="",i(i.s=109)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(17),l=i(18),u=i(19),f=i(45),h=i(46),p=i(47),d=i(48),c=i(49),v=i(12),m=i(32),y=i(33),b=i(31),_=i(1),w={Scope:_.Scope,create:_.create,find:_.find,query:_.query,register:_.register,Container:o.default,Format:l.default,Leaf:u.default,Embed:d.default,Scroll:f.default,Block:p.default,Inline:h.default,Text:c.default,Attributor:{Attribute:v.default,Class:m.default,Style:y.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(_,w){_.__proto__=w}||function(_,w){for(var T in w)w.hasOwnProperty(T)&&(_[T]=w[T])};return function(_,w){b(_,w);function T(){this.constructor=_}_.prototype=w===null?Object.create(w):(T.prototype=w.prototype,new T)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=function(b){o(_,b);function _(w){var T=this;return w="[Parchment] "+w,T=b.call(this,w)||this,T.message=w,T.name=T.constructor.name,T}return _}(Error);n.ParchmentError=l;var u={},f={},h={},p={};n.DATA_KEY="__blot";var d;(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"})(d=n.Scope||(n.Scope={}));function c(b,_){var w=m(b);if(w==null)throw new l("Unable to create "+b+" blot");var T=w,x=b instanceof Node||b.nodeType===Node.TEXT_NODE?b:T.create(_);return new T(x,_)}n.create=c;function v(b,_){return _===void 0&&(_=!1),b==null?null:b[n.DATA_KEY]!=null?b[n.DATA_KEY].blot:_?v(b.parentNode,_):null}n.find=v;function m(b,_){_===void 0&&(_=d.ANY);var w;if(typeof b=="string")w=p[b]||u[b];else if(b instanceof Text||b.nodeType===Node.TEXT_NODE)w=p.text;else if(typeof b=="number")b&d.LEVEL&d.BLOCK?w=p.block:b&d.LEVEL&d.INLINE&&(w=p.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:_&d.LEVEL&w.scope&&_&d.TYPE&w.scope?w:null}n.query=m;function y(){for(var b=[],_=0;_<arguments.length;_++)b[_]=arguments[_];if(b.length>1)return b.map(function(x){return y(x)});var w=b[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new l("Invalid definition");if(w.blotName==="abstract")throw new l("Cannot register abstract class");if(p[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=y},function(r,n,i){var o=i(51),l=i(11),u=i(3),f=i(20),h=String.fromCharCode(0),p=function(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]};p.prototype.insert=function(d,c){var v={};return d.length===0?this:(v.insert=d,c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v))},p.prototype.delete=function(d){return d<=0?this:this.push({delete:d})},p.prototype.retain=function(d,c){if(d<=0)return this;var v={retain:d};return c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v)},p.prototype.push=function(d){var c=this.ops.length,v=this.ops[c-1];if(d=u(!0,{},d),typeof v=="object"){if(typeof d.delete=="number"&&typeof v.delete=="number")return this.ops[c-1]={delete:v.delete+d.delete},this;if(typeof v.delete=="number"&&d.insert!=null&&(c-=1,v=this.ops[c-1],typeof v!="object"))return this.ops.unshift(d),this;if(l(d.attributes,v.attributes)){if(typeof d.insert=="string"&&typeof v.insert=="string")return this.ops[c-1]={insert:v.insert+d.insert},typeof d.attributes=="object"&&(this.ops[c-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof v.retain=="number")return this.ops[c-1]={retain:v.retain+d.retain},typeof d.attributes=="object"&&(this.ops[c-1].attributes=d.attributes),this}}return c===this.ops.length?this.ops.push(d):this.ops.splice(c,0,d),this},p.prototype.chop=function(){var d=this.ops[this.ops.length-1];return d&&d.retain&&!d.attributes&&this.ops.pop(),this},p.prototype.filter=function(d){return this.ops.filter(d)},p.prototype.forEach=function(d){this.ops.forEach(d)},p.prototype.map=function(d){return this.ops.map(d)},p.prototype.partition=function(d){var c=[],v=[];return this.forEach(function(m){var y=d(m)?c:v;y.push(m)}),[c,v]},p.prototype.reduce=function(d,c){return this.ops.reduce(d,c)},p.prototype.changeLength=function(){return this.reduce(function(d,c){return c.insert?d+f.length(c):c.delete?d-c.delete:d},0)},p.prototype.length=function(){return this.reduce(function(d,c){return d+f.length(c)},0)},p.prototype.slice=function(d,c){d=d||0,typeof c!="number"&&(c=1/0);for(var v=[],m=f.iterator(this.ops),y=0;y<c&&m.hasNext();){var b;y<d?b=m.next(d-y):(b=m.next(c-y),v.push(b)),y+=f.length(b)}return new p(v)},p.prototype.compose=function(d){var c=f.iterator(this.ops),v=f.iterator(d.ops),m=[],y=v.peek();if(y!=null&&typeof y.retain=="number"&&y.attributes==null){for(var b=y.retain;c.peekType()==="insert"&&c.peekLength()<=b;)b-=c.peekLength(),m.push(c.next());y.retain-b>0&&v.next(y.retain-b)}for(var _=new p(m);c.hasNext()||v.hasNext();)if(v.peekType()==="insert")_.push(v.next());else if(c.peekType()==="delete")_.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 S={};typeof T.retain=="number"?S.retain=w:S.insert=T.insert;var I=f.attributes.compose(T.attributes,x.attributes,typeof T.retain=="number");if(I&&(S.attributes=I),_.push(S),!v.hasNext()&&l(_.ops[_.ops.length-1],S)){var A=new p(c.rest());return _.concat(A).chop()}}else typeof x.delete=="number"&&typeof T.retain=="number"&&_.push(x)}return _.chop()},p.prototype.concat=function(d){var c=new p(this.ops.slice());return d.ops.length>0&&(c.push(d.ops[0]),c.ops=c.ops.concat(d.ops.slice(1))),c},p.prototype.diff=function(d,c){if(this.ops===d.ops)return new p;var v=[this,d].map(function(w){return w.map(function(T){if(T.insert!=null)return typeof T.insert=="string"?T.insert:h;var x=w===d?"on":"with";throw new Error("diff() called "+x+" non-document")}).join("")}),m=new p,y=o(v[0],v[1],c),b=f.iterator(this.ops),_=f.iterator(d.ops);return y.forEach(function(w){for(var T=w[1].length;T>0;){var x=0;switch(w[0]){case o.INSERT:x=Math.min(_.peekLength(),T),m.push(_.next(x));break;case o.DELETE:x=Math.min(T,b.peekLength()),b.next(x),m.delete(x);break;case o.EQUAL:x=Math.min(b.peekLength(),_.peekLength(),T);var S=b.next(x),I=_.next(x);l(S.insert,I.insert)?m.retain(x,f.attributes.diff(S.attributes,I.attributes)):m.push(I).delete(x);break}T-=x}}),m.chop()},p.prototype.eachLine=function(d,c){c=c||`
1955
- `;for(var v=f.iterator(this.ops),m=new p,y=0;v.hasNext();){if(v.peekType()!=="insert")return;var b=v.peek(),_=f.length(b)-v.peekLength(),w=typeof b.insert=="string"?b.insert.indexOf(c,_)-_:-1;if(w<0)m.push(v.next());else if(w>0)m.push(v.next(w));else{if(d(m,v.next(1).attributes||{},y)===!1)return;y+=1,m=new p}}m.length()>0&&d(m,{},y)},p.prototype.transform=function(d,c){if(c=!!c,typeof d=="number")return this.transformPosition(d,c);for(var v=f.iterator(this.ops),m=f.iterator(d.ops),y=new p;v.hasNext()||m.hasNext();)if(v.peekType()==="insert"&&(c||m.peekType()!=="insert"))y.retain(f.length(v.next()));else if(m.peekType()==="insert")y.push(m.next());else{var b=Math.min(v.peekLength(),m.peekLength()),_=v.next(b),w=m.next(b);if(_.delete)continue;w.delete?y.push(w):y.retain(b,f.attributes.transform(_.attributes,w.attributes,c))}return y.chop()},p.prototype.transformPosition=function(d,c){c=!!c;for(var v=f.iterator(this.ops),m=0;v.hasNext()&&m<=d;){var y=v.peekLength(),b=v.peekType();if(v.next(),b==="delete"){d-=Math.min(y,d-m);continue}else b==="insert"&&(m<d||!c)&&(d+=y);m+=y}return d},r.exports=p},function(r,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,l=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 m=i.call(v,"constructor"),y=v.constructor&&v.constructor.prototype&&i.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!m&&!y)return!1;var b;for(b in v);return typeof b>"u"||i.call(v,b)},p=function(v,m){l&&m.name==="__proto__"?l(v,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):v[m.name]=m.newValue},d=function(v,m){if(m==="__proto__")if(i.call(v,m)){if(u)return u(v,m).value}else return;return v[m]};r.exports=function c(){var v,m,y,b,_,w,T=arguments[0],x=1,S=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<S;++x)if(v=arguments[x],v!=null)for(m in v)y=d(T,m),b=d(v,m),T!==b&&(I&&b&&(h(b)||(_=f(b)))?(_?(_=!1,w=y&&f(y)?y:[]):w=y&&h(y)?y:{},p(T,{name:m,newValue:c(I,w,b)})):typeof b<"u"&&p(T,{name:m,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}}(),l=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),p=T(h),d=i(0),c=T(d),v=i(16),m=T(v),y=i(6),b=T(y),_=i(7),w=T(_);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 S(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 A=1,O=function(C){I(P,C);function P(){return x(this,P),S(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return o(P,[{key:"attach",value:function(){l(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 p.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(`
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 l=n[o]={i:o,l:!1,exports:{}};return r[o].call(l.exports,l,l.exports,i),l.l=!0,l.exports}return i.m=r,i.c=n,i.d=function(o,l,u){i.o(o,l)||Object.defineProperty(o,l,{configurable:!1,enumerable:!0,get:u})},i.n=function(o){var l=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(l,"a",l),l},i.o=function(o,l){return Object.prototype.hasOwnProperty.call(o,l)},i.p="",i(i.s=109)}([function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(17),l=i(18),u=i(19),f=i(45),h=i(46),p=i(47),d=i(48),c=i(49),v=i(12),m=i(32),y=i(33),_=i(31),b=i(1),w={Scope:b.Scope,create:b.create,find:b.find,query:b.query,register:b.register,Container:o.default,Format:l.default,Leaf:u.default,Embed:d.default,Scroll:f.default,Block:p.default,Inline:h.default,Text:c.default,Attributor:{Attribute:v.default,Class:m.default,Style:y.default,Store:_.default}};n.default=w},function(r,n,i){var o=this&&this.__extends||function(){var _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,w){b.__proto__=w}||function(b,w){for(var T in w)w.hasOwnProperty(T)&&(b[T]=w[T])};return function(b,w){_(b,w);function T(){this.constructor=b}b.prototype=w===null?Object.create(w):(T.prototype=w.prototype,new T)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=function(_){o(b,_);function b(w){var T=this;return w="[Parchment] "+w,T=_.call(this,w)||this,T.message=w,T.name=T.constructor.name,T}return b}(Error);n.ParchmentError=l;var u={},f={},h={},p={};n.DATA_KEY="__blot";var d;(function(_){_[_.TYPE=3]="TYPE",_[_.LEVEL=12]="LEVEL",_[_.ATTRIBUTE=13]="ATTRIBUTE",_[_.BLOT=14]="BLOT",_[_.INLINE=7]="INLINE",_[_.BLOCK=11]="BLOCK",_[_.BLOCK_BLOT=10]="BLOCK_BLOT",_[_.INLINE_BLOT=6]="INLINE_BLOT",_[_.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",_[_.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",_[_.ANY=15]="ANY"})(d=n.Scope||(n.Scope={}));function c(_,b){var w=m(_);if(w==null)throw new l("Unable to create "+_+" blot");var T=w,x=_ instanceof Node||_.nodeType===Node.TEXT_NODE?_:T.create(b);return new T(x,b)}n.create=c;function v(_,b){return b===void 0&&(b=!1),_==null?null:_[n.DATA_KEY]!=null?_[n.DATA_KEY].blot:b?v(_.parentNode,b):null}n.find=v;function m(_,b){b===void 0&&(b=d.ANY);var w;if(typeof _=="string")w=p[_]||u[_];else if(_ instanceof Text||_.nodeType===Node.TEXT_NODE)w=p.text;else if(typeof _=="number")_&d.LEVEL&d.BLOCK?w=p.block:_&d.LEVEL&d.INLINE&&(w=p.inline);else if(_ instanceof HTMLElement){var T=(_.getAttribute("class")||"").split(/\s+/);for(var x in T)if(w=f[T[x]],w)break;w=w||h[_.tagName]}return w==null?null:b&d.LEVEL&w.scope&&b&d.TYPE&w.scope?w:null}n.query=m;function y(){for(var _=[],b=0;b<arguments.length;b++)_[b]=arguments[b];if(_.length>1)return _.map(function(x){return y(x)});var w=_[0];if(typeof w.blotName!="string"&&typeof w.attrName!="string")throw new l("Invalid definition");if(w.blotName==="abstract")throw new l("Cannot register abstract class");if(p[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=y},function(r,n,i){var o=i(51),l=i(11),u=i(3),f=i(20),h=String.fromCharCode(0),p=function(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]};p.prototype.insert=function(d,c){var v={};return d.length===0?this:(v.insert=d,c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v))},p.prototype.delete=function(d){return d<=0?this:this.push({delete:d})},p.prototype.retain=function(d,c){if(d<=0)return this;var v={retain:d};return c!=null&&typeof c=="object"&&Object.keys(c).length>0&&(v.attributes=c),this.push(v)},p.prototype.push=function(d){var c=this.ops.length,v=this.ops[c-1];if(d=u(!0,{},d),typeof v=="object"){if(typeof d.delete=="number"&&typeof v.delete=="number")return this.ops[c-1]={delete:v.delete+d.delete},this;if(typeof v.delete=="number"&&d.insert!=null&&(c-=1,v=this.ops[c-1],typeof v!="object"))return this.ops.unshift(d),this;if(l(d.attributes,v.attributes)){if(typeof d.insert=="string"&&typeof v.insert=="string")return this.ops[c-1]={insert:v.insert+d.insert},typeof d.attributes=="object"&&(this.ops[c-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof v.retain=="number")return this.ops[c-1]={retain:v.retain+d.retain},typeof d.attributes=="object"&&(this.ops[c-1].attributes=d.attributes),this}}return c===this.ops.length?this.ops.push(d):this.ops.splice(c,0,d),this},p.prototype.chop=function(){var d=this.ops[this.ops.length-1];return d&&d.retain&&!d.attributes&&this.ops.pop(),this},p.prototype.filter=function(d){return this.ops.filter(d)},p.prototype.forEach=function(d){this.ops.forEach(d)},p.prototype.map=function(d){return this.ops.map(d)},p.prototype.partition=function(d){var c=[],v=[];return this.forEach(function(m){var y=d(m)?c:v;y.push(m)}),[c,v]},p.prototype.reduce=function(d,c){return this.ops.reduce(d,c)},p.prototype.changeLength=function(){return this.reduce(function(d,c){return c.insert?d+f.length(c):c.delete?d-c.delete:d},0)},p.prototype.length=function(){return this.reduce(function(d,c){return d+f.length(c)},0)},p.prototype.slice=function(d,c){d=d||0,typeof c!="number"&&(c=1/0);for(var v=[],m=f.iterator(this.ops),y=0;y<c&&m.hasNext();){var _;y<d?_=m.next(d-y):(_=m.next(c-y),v.push(_)),y+=f.length(_)}return new p(v)},p.prototype.compose=function(d){var c=f.iterator(this.ops),v=f.iterator(d.ops),m=[],y=v.peek();if(y!=null&&typeof y.retain=="number"&&y.attributes==null){for(var _=y.retain;c.peekType()==="insert"&&c.peekLength()<=_;)_-=c.peekLength(),m.push(c.next());y.retain-_>0&&v.next(y.retain-_)}for(var b=new p(m);c.hasNext()||v.hasNext();)if(v.peekType()==="insert")b.push(v.next());else if(c.peekType()==="delete")b.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 S={};typeof T.retain=="number"?S.retain=w:S.insert=T.insert;var I=f.attributes.compose(T.attributes,x.attributes,typeof T.retain=="number");if(I&&(S.attributes=I),b.push(S),!v.hasNext()&&l(b.ops[b.ops.length-1],S)){var A=new p(c.rest());return b.concat(A).chop()}}else typeof x.delete=="number"&&typeof T.retain=="number"&&b.push(x)}return b.chop()},p.prototype.concat=function(d){var c=new p(this.ops.slice());return d.ops.length>0&&(c.push(d.ops[0]),c.ops=c.ops.concat(d.ops.slice(1))),c},p.prototype.diff=function(d,c){if(this.ops===d.ops)return new p;var v=[this,d].map(function(w){return w.map(function(T){if(T.insert!=null)return typeof T.insert=="string"?T.insert:h;var x=w===d?"on":"with";throw new Error("diff() called "+x+" non-document")}).join("")}),m=new p,y=o(v[0],v[1],c),_=f.iterator(this.ops),b=f.iterator(d.ops);return y.forEach(function(w){for(var T=w[1].length;T>0;){var x=0;switch(w[0]){case o.INSERT:x=Math.min(b.peekLength(),T),m.push(b.next(x));break;case o.DELETE:x=Math.min(T,_.peekLength()),_.next(x),m.delete(x);break;case o.EQUAL:x=Math.min(_.peekLength(),b.peekLength(),T);var S=_.next(x),I=b.next(x);l(S.insert,I.insert)?m.retain(x,f.attributes.diff(S.attributes,I.attributes)):m.push(I).delete(x);break}T-=x}}),m.chop()},p.prototype.eachLine=function(d,c){c=c||`
1966
+ `;for(var v=f.iterator(this.ops),m=new p,y=0;v.hasNext();){if(v.peekType()!=="insert")return;var _=v.peek(),b=f.length(_)-v.peekLength(),w=typeof _.insert=="string"?_.insert.indexOf(c,b)-b:-1;if(w<0)m.push(v.next());else if(w>0)m.push(v.next(w));else{if(d(m,v.next(1).attributes||{},y)===!1)return;y+=1,m=new p}}m.length()>0&&d(m,{},y)},p.prototype.transform=function(d,c){if(c=!!c,typeof d=="number")return this.transformPosition(d,c);for(var v=f.iterator(this.ops),m=f.iterator(d.ops),y=new p;v.hasNext()||m.hasNext();)if(v.peekType()==="insert"&&(c||m.peekType()!=="insert"))y.retain(f.length(v.next()));else if(m.peekType()==="insert")y.push(m.next());else{var _=Math.min(v.peekLength(),m.peekLength()),b=v.next(_),w=m.next(_);if(b.delete)continue;w.delete?y.push(w):y.retain(_,f.attributes.transform(b.attributes,w.attributes,c))}return y.chop()},p.prototype.transformPosition=function(d,c){c=!!c;for(var v=f.iterator(this.ops),m=0;v.hasNext()&&m<=d;){var y=v.peekLength(),_=v.peekType();if(v.next(),_==="delete"){d-=Math.min(y,d-m);continue}else _==="insert"&&(m<d||!c)&&(d+=y);m+=y}return d},r.exports=p},function(r,n){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,l=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 m=i.call(v,"constructor"),y=v.constructor&&v.constructor.prototype&&i.call(v.constructor.prototype,"isPrototypeOf");if(v.constructor&&!m&&!y)return!1;var _;for(_ in v);return typeof _>"u"||i.call(v,_)},p=function(v,m){l&&m.name==="__proto__"?l(v,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):v[m.name]=m.newValue},d=function(v,m){if(m==="__proto__")if(i.call(v,m)){if(u)return u(v,m).value}else return;return v[m]};r.exports=function c(){var v,m,y,_,b,w,T=arguments[0],x=1,S=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<S;++x)if(v=arguments[x],v!=null)for(m in v)y=d(T,m),_=d(v,m),T!==_&&(I&&_&&(h(_)||(b=f(_)))?(b?(b=!1,w=y&&f(y)?y:[]):w=y&&h(y)?y:{},p(T,{name:m,newValue:c(I,w,_)})):typeof _<"u"&&p(T,{name:m,newValue:_}));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}}(),l=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),p=T(h),d=i(0),c=T(d),v=i(16),m=T(v),y=i(6),_=T(y),b=i(7),w=T(b);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 S(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 A=1,O=function(C){I(P,C);function P(){return x(this,P),S(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}return o(P,[{key:"attach",value:function(){l(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 p.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(`
1956
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 l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,q,Z)}}]),P}(c.default.Embed);O.scope=c.default.Scope.BLOCK_BLOT;var L=function(C){I(P,C);function P(M){x(this,P);var F=S(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 p.default).insert(`
1957
1968
  `,R(this))),this.cache.delta}},{key:"deleteAt",value:function(F,q){l(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):l(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 l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,F,q,Z);if(q.length!==0){var z=q.split(`
1958
- `),nt=z.shift();nt.length>0&&(F<this.length()-1||this.children.tail==null?l(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 W=this;z.reduce(function(D,k){return W=W.split(D,!0),W.insertAt(0,k),k.length},F+nt.length)}}},{key:"insertBefore",value:function(F,q){var Z=this.children.head;l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertBefore",this).call(this,F,q),Z instanceof m.default&&Z.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"length",this).call(this)+A),this.cache.length}},{key:"moveChildren",value:function(F,q){l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"moveChildren",this).call(this,F,q),this.cache={}}},{key:"optimize",value:function(F){l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){l(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()-A)){var Z=this.clone();return F===0?(this.parent.insertBefore(Z,this),this):(this.parent.insertBefore(Z,this.next),Z)}else{var z=l(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=O,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(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},l=function(){function W(D,k){var j=[],G=!0,Y=!1,X=void 0;try{for(var $=D[Symbol.iterator](),V;!(G=(V=$.next()).done)&&(j.push(V.value),!(k&&j.length===k));G=!0);}catch(tt){Y=!0,X=tt}finally{try{!G&&$.return&&$.return()}finally{if(Y)throw X}}return j}return function(D,k){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return W(D,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function W(D,k){for(var j=0;j<k.length;j++){var G=k[j];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(D,G.key,G)}}return function(D,k,j){return k&&W(D.prototype,k),j&&W(D,j),D}}();i(50);var f=i(2),h=R(f),p=i(14),d=R(p),c=i(8),v=R(c),m=i(9),y=R(m),b=i(0),_=R(b),w=i(15),T=R(w),x=i(3),S=R(x),I=i(10),A=R(I),O=i(34),L=R(O);function R(W){return W&&W.__esModule?W:{default:W}}function C(W,D,k){return D in W?Object.defineProperty(W,D,{value:k,enumerable:!0,configurable:!0,writable:!0}):W[D]=k,W}function P(W,D){if(!(W instanceof D))throw new TypeError("Cannot call a class as a function")}var M=(0,A.default)("quill"),F=function(){u(W,null,[{key:"debug",value:function(k){k===!0&&(k="log"),A.default.level(k)}},{key:"find",value:function(k){return k.__quill||_.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,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof k!="string"){var X=k.attrName||k.blotName;typeof X=="string"?this.register("formats/"+X,k,j):Object.keys(k).forEach(function($){G.register($,k[$],j)})}else this.imports[k]!=null&&!Y&&M.warn("Overwriting "+k+" with",j),this.imports[k]=j,(k.startsWith("blots/")||k.startsWith("formats/"))&&j.blotName!=="abstract"?_.default.register(j):k.startsWith("modules")&&typeof j.register=="function"&&j.register()}}]);function W(D){var k=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(P(this,W),this.options=q(D,j),this.container=this.options.container,this.container==null)return M.error("Invalid Quill container",D);this.options.debug&&W.debug(this.options.debug);var G=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=_.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new d.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(X){X===v.default.events.TEXT_CHANGE&&k.root.classList.toggle("ql-blank",k.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(X,$){var V=k.selection.lastRange,tt=V&&V.length===0?V.index:void 0;Z.call(k,function(){return k.editor.update(null,$,tt)},X)});var Y=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+G+"<p><br></p></div>");this.setContents(Y),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return u(W,[{key:"addContainer",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof k=="string"){var G=k;k=document.createElement("div"),k.classList.add(G)}return this.container.insertBefore(k,j),k}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(k,j,G){var Y=this,X=z(k,j,G),$=l(X,4);return k=$[0],j=$[1],G=$[3],Z.call(this,function(){return Y.editor.deleteText(k,j)},G,k,-1*j)}},{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,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return Z.call(this,function(){var X=G.getSelection(!0),$=new h.default;if(X==null)return $;if(_.default.query(k,_.default.Scope.BLOCK))$=G.editor.formatLine(X.index,X.length,C({},k,j));else{if(X.length===0)return G.selection.format(k,j),$;$=G.editor.formatText(X.index,X.length,C({},k,j))}return G.setSelection(X,v.default.sources.SILENT),$},Y)}},{key:"formatLine",value:function(k,j,G,Y,X){var $=this,V=void 0,tt=z(k,j,G,Y,X),et=l(tt,4);return k=et[0],j=et[1],V=et[2],X=et[3],Z.call(this,function(){return $.editor.formatLine(k,j,V)},X,k,0)}},{key:"formatText",value:function(k,j,G,Y,X){var $=this,V=void 0,tt=z(k,j,G,Y,X),et=l(tt,4);return k=et[0],j=et[1],V=et[2],X=et[3],Z.call(this,function(){return $.editor.formatText(k,j,V)},X,k,0)}},{key:"getBounds",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=void 0;typeof k=="number"?G=this.selection.getBounds(k,j):G=this.selection.getBounds(k.index,k.length);var Y=this.container.getBoundingClientRect();return{bottom:G.bottom-Y.top,height:G.height,left:G.left-Y.left,right:G.right-Y.left,top:G.top-Y.top,width:G.width}}},{key:"getContents",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,G=z(k,j),Y=l(G,2);return k=Y[0],j=Y[1],this.editor.getContents(k,j)}},{key:"getFormat",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof k=="number"?this.editor.getFormat(k,j):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,j=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,j)}},{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,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,G=z(k,j),Y=l(G,2);return k=Y[0],j=Y[1],this.editor.getText(k,j)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(k,j,G){var Y=this,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:W.sources.API;return Z.call(this,function(){return Y.editor.insertEmbed(k,j,G)},X,k)}},{key:"insertText",value:function(k,j,G,Y,X){var $=this,V=void 0,tt=z(k,0,G,Y,X),et=l(tt,4);return k=et[0],V=et[2],X=et[3],Z.call(this,function(){return $.editor.insertText(k,j,V)},X,k,j.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,j,G){this.clipboard.dangerouslyPasteHTML(k,j,G)}},{key:"removeFormat",value:function(k,j,G){var Y=this,X=z(k,j,G),$=l(X,4);return k=$[0],j=$[1],G=$[3],Z.call(this,function(){return Y.editor.removeFormat(k,j)},G,k)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(k){var j=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){k=new h.default(k);var Y=j.getLength(),X=j.editor.deleteText(0,Y),$=j.editor.applyDelta(k),V=$.ops[$.ops.length-1];V!=null&&typeof V.insert=="string"&&V.insert[V.insert.length-1]===`
1959
- `&&(j.editor.deleteText(j.getLength()-1,1),$.delete(1));var tt=X.compose($);return tt},G)}},{key:"setSelection",value:function(k,j,G){if(k==null)this.selection.setRange(null,j||W.sources.API);else{var Y=z(k,j,G),X=l(Y,4);k=X[0],j=X[1],G=X[3],this.selection.setRange(new w.Range(k,j),G),G!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,G=new h.default().insert(k);return this.setContents(G,j)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,j=this.scroll.update(k);return this.selection.update(k),j}},{key:"updateContents",value:function(k){var j=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){return k=new h.default(k),j.editor.applyDelta(k,G)},G,!0)}}]),W}();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:_.default,"core/module":y.default,"core/theme":L.default};function q(W,D){if(D=(0,S.default)(!0,{container:W,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,S.default)(!0,{},D.theme.DEFAULTS);[k,D].forEach(function(Y){Y.modules=Y.modules||{},Object.keys(Y.modules).forEach(function(X){Y.modules[X]===!0&&(Y.modules[X]={})})});var j=Object.keys(k.modules).concat(Object.keys(D.modules)),G=j.reduce(function(Y,X){var $=F.import("modules/"+X);return $==null?M.error("Cannot load "+X+" module. Are you sure you registered it?"):Y[X]=$.DEFAULTS||{},Y},{});return D.modules!=null&&D.modules.toolbar&&D.modules.toolbar.constructor!==Object&&(D.modules.toolbar={container:D.modules.toolbar}),D=(0,S.default)(!0,{},F.DEFAULTS,{modules:G},k,D),["bounds","container","scrollingContainer"].forEach(function(Y){typeof D[Y]=="string"&&(D[Y]=document.querySelector(D[Y]))}),D.modules=Object.keys(D.modules).reduce(function(Y,X){return D.modules[X]&&(Y[X]=D.modules[X]),Y},{}),D}function Z(W,D,k,j){if(this.options.strict&&!this.isEnabled()&&D===v.default.sources.USER)return new h.default;var G=k==null?null:this.getSelection(),Y=this.editor.delta,X=W();if(G!=null&&(k===!0&&(k=G.index),j==null?G=nt(G,X,D):j!==0&&(G=nt(G,k,j,D)),this.setSelection(G,v.default.sources.SILENT)),X.length()>0){var $,V=[v.default.events.TEXT_CHANGE,X,Y,D];if(($=this.emitter).emit.apply($,[v.default.events.EDITOR_CHANGE].concat(V)),D!==v.default.sources.SILENT){var tt;(tt=this.emitter).emit.apply(tt,V)}}return X}function z(W,D,k,j,G){var Y={};return typeof W.index=="number"&&typeof W.length=="number"?typeof D!="number"?(G=j,j=k,k=D,D=W.length,W=W.index):(D=W.length,W=W.index):typeof D!="number"&&(G=j,j=k,k=D,D=0),(typeof k>"u"?"undefined":o(k))==="object"?(Y=k,G=j):typeof k=="string"&&(j!=null?Y[k]=j:G=k),G=G||v.default.sources.API,[W,D,Y,G]}function nt(W,D,k,j){if(W==null)return null;var G=void 0,Y=void 0;if(D instanceof h.default){var X=[W.index,W.index+W.length].map(function(et){return D.transformPosition(et,j!==v.default.sources.USER)}),$=l(X,2);G=$[0],Y=$[1]}else{var V=[W.index,W.index+W.length].map(function(et){return et<D||et===D&&j===v.default.sources.USER?et:k>=0?et+k:Math.max(D,et+k)}),tt=l(V,2);G=tt[0],Y=tt[1]}return new w.Range(G,Y-G)}n.expandConfig=q,n.overload=z,n.default=F},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(_,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(_,x.key,x)}}return function(_,w,T){return w&&b(_.prototype,w),T&&b(_,T),_}}(),l=function b(_,w,T){_===null&&(_=Function.prototype);var x=Object.getOwnPropertyDescriptor(_,w);if(x===void 0){var S=Object.getPrototypeOf(_);return S===null?void 0:b(S,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=d(u),h=i(0),p=d(h);function d(b){return b&&b.__esModule?b:{default:b}}function c(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function v(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function m(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var y=function(b){m(_,b);function _(){return c(this,_),v(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"formatAt",value:function(T,x,S,I){if(_.compare(this.statics.blotName,S)<0&&p.default.query(S,p.default.Scope.BLOT)){var A=this.isolate(T,x);I&&A.wrap(S,I)}else l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"formatAt",this).call(this,T,x,S,I)}},{key:"optimize",value:function(T){if(l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"optimize",this).call(this,T),this.parent instanceof _&&_.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 S=_.order.indexOf(T),I=_.order.indexOf(x);return S>=0||I>=0?S-I:T===x?0:T<x?-1:1}}]),_}(p.default.Inline);y.allowedChildren=[y,p.default.Embed,f.default],y.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default.Text);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function w(T,x){for(var S=0;S<x.length;S++){var I=x[S];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(T,I.key,I)}}return function(T,x,S){return x&&w(T.prototype,x),S&&w(T,S),T}}(),l=function w(T,x,S){T===null&&(T=Function.prototype);var I=Object.getOwnPropertyDescriptor(T,x);if(I===void 0){var A=Object.getPrototypeOf(T);return A===null?void 0:w(A,x,S)}else{if("value"in I)return I.value;var O=I.get;return O===void 0?void 0:O.call(S)}},u=i(54),f=d(u),h=i(10),p=d(h);function d(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 m(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 y=(0,p.default)("quill:events"),b=["selectionchange","mousedown","mouseup","click"];b.forEach(function(w){document.addEventListener(w,function(){for(var T=arguments.length,x=Array(T),S=0;S<T;S++)x[S]=arguments[S];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(I){if(I.__quill&&I.__quill.emitter){var A;(A=I.__quill.emitter).handleDOM.apply(A,x)}})})});var _=function(w){m(T,w);function T(){c(this,T);var x=v(this,(T.__proto__||Object.getPrototypeOf(T)).call(this));return x.listeners={},x.on("error",y.error),x}return o(T,[{key:"emit",value:function(){y.log.apply(y,arguments),l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(S){for(var I=arguments.length,A=Array(I>1?I-1:0),O=1;O<I;O++)A[O-1]=arguments[O];(this.listeners[S.type]||[]).forEach(function(L){var R=L.node,C=L.handler;(S.target===R||R.contains(S.target))&&C.apply(void 0,[S].concat(A))})}},{key:"listenDOM",value:function(S,I,A){this.listeners[S]||(this.listeners[S]=[]),this.listeners[S].push({node:I,handler:A})}}]),T}(f.default);_.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"},_.sources={API:"api",SILENT:"silent",USER:"user"},n.default=_},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 l=function u(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o(this,u),this.quill=f,this.options=h};l.DEFAULTS={},n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=["error","warn","log","info"],l="warn";function u(h){if(o.indexOf(h)<=o.indexOf(l)){for(var p,d=arguments.length,c=Array(d>1?d-1:0),v=1;v<d;v++)c[v-1]=arguments[v];(p=console)[h].apply(p,c)}}function f(h){return o.reduce(function(p,d){return p[d]=u.bind(console,d,h),p},{})}u.level=f.level=function(h){l=h},n.default=f},function(r,n,i){var o=Array.prototype.slice,l=i(52),u=i(53),f=r.exports=function(c,v,m){return m||(m={}),c===v?!0:c instanceof Date&&v instanceof Date?c.getTime()===v.getTime():!c||!v||typeof c!="object"&&typeof v!="object"?m.strict?c===v:c==v:d(c,v,m)};function h(c){return c==null}function p(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 d(c,v,m){var y,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,m)):!1;if(p(c)){if(!p(v)||c.length!==v.length)return!1;for(y=0;y<c.length;y++)if(c[y]!==v[y])return!1;return!0}try{var _=l(c),w=l(v)}catch{return!1}if(_.length!=w.length)return!1;for(_.sort(),w.sort(),y=_.length-1;y>=0;y--)if(_[y]!=w[y])return!1;for(y=_.length-1;y>=0;y--)if(b=_[y],!f(c[b],v[b],m))return!1;return typeof c==typeof v}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),l=function(){function u(f,h,p){p===void 0&&(p={}),this.attrName=f,this.keyName=h;var d=o.Scope.TYPE&o.Scope.ATTRIBUTE;p.scope!=null?this.scope=p.scope&o.Scope.LEVEL|d:this.scope=o.Scope.ATTRIBUTE,p.whitelist!=null&&(this.whitelist=p.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 p=o.query(f,o.Scope.BLOT&(this.scope|o.Scope.TYPE));return p==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=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var o=function(){function O(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 O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function O(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&&O(L.prototype,R),C&&O(L,C),L}}(),u=function O(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:O(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),p=i(0),d=w(p),c=i(4),v=w(c),m=i(6),y=w(m),b=i(7),_=w(b);function w(O){return O&&O.__esModule?O:{default:O}}function T(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}function x(O,L){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:O}function S(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);O.prototype=Object.create(L&&L.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L)}var I=function(O){S(L,O);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L}(y.default);I.blotName="code",I.tagName="CODE";var A=function(O){S(L,O);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return l(L,[{key:"delta",value:function(){var C=this,P=this.domNode.textContent;return P.endsWith(`
1969
+ `),it=z.shift();it.length>0&&(F<this.length()-1||this.children.tail==null?l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertAt",this).call(this,Math.min(F,this.length()-1),it):this.children.tail.insertAt(this.children.tail.length(),it),this.cache={});var W=this;z.reduce(function(D,k){return W=W.split(D,!0),W.insertAt(0,k),k.length},F+it.length)}}},{key:"insertBefore",value:function(F,q){var Z=this.children.head;l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"insertBefore",this).call(this,F,q),Z instanceof m.default&&Z.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"length",this).call(this)+A),this.cache.length}},{key:"moveChildren",value:function(F,q){l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"moveChildren",this).call(this,F,q),this.cache={}}},{key:"optimize",value:function(F){l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,F),this.cache={}}},{key:"path",value:function(F){return l(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"path",this).call(this,F,!0)}},{key:"removeChild",value:function(F){l(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()-A)){var Z=this.clone();return F===0?(this.parent.insertBefore(Z,this),this):(this.parent.insertBefore(Z,this.next),Z)}else{var z=l(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=[_.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=O,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(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},l=function(){function W(D,k){var j=[],G=!0,Y=!1,X=void 0;try{for(var $=D[Symbol.iterator](),V;!(G=(V=$.next()).done)&&(j.push(V.value),!(k&&j.length===k));G=!0);}catch(tt){Y=!0,X=tt}finally{try{!G&&$.return&&$.return()}finally{if(Y)throw X}}return j}return function(D,k){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return W(D,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function W(D,k){for(var j=0;j<k.length;j++){var G=k[j];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(D,G.key,G)}}return function(D,k,j){return k&&W(D.prototype,k),j&&W(D,j),D}}();i(50);var f=i(2),h=R(f),p=i(14),d=R(p),c=i(8),v=R(c),m=i(9),y=R(m),_=i(0),b=R(_),w=i(15),T=R(w),x=i(3),S=R(x),I=i(10),A=R(I),O=i(34),L=R(O);function R(W){return W&&W.__esModule?W:{default:W}}function C(W,D,k){return D in W?Object.defineProperty(W,D,{value:k,enumerable:!0,configurable:!0,writable:!0}):W[D]=k,W}function P(W,D){if(!(W instanceof D))throw new TypeError("Cannot call a class as a function")}var M=(0,A.default)("quill"),F=function(){u(W,null,[{key:"debug",value:function(k){k===!0&&(k="log"),A.default.level(k)}},{key:"find",value:function(k){return k.__quill||b.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,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof k!="string"){var X=k.attrName||k.blotName;typeof X=="string"?this.register("formats/"+X,k,j):Object.keys(k).forEach(function($){G.register($,k[$],j)})}else this.imports[k]!=null&&!Y&&M.warn("Overwriting "+k+" with",j),this.imports[k]=j,(k.startsWith("blots/")||k.startsWith("formats/"))&&j.blotName!=="abstract"?b.default.register(j):k.startsWith("modules")&&typeof j.register=="function"&&j.register()}}]);function W(D){var k=this,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(P(this,W),this.options=q(D,j),this.container=this.options.container,this.container==null)return M.error("Invalid Quill container",D);this.options.debug&&W.debug(this.options.debug);var G=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=b.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new d.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(X){X===v.default.events.TEXT_CHANGE&&k.root.classList.toggle("ql-blank",k.editor.isBlank())}),this.emitter.on(v.default.events.SCROLL_UPDATE,function(X,$){var V=k.selection.lastRange,tt=V&&V.length===0?V.index:void 0;Z.call(k,function(){return k.editor.update(null,$,tt)},X)});var Y=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+G+"<p><br></p></div>");this.setContents(Y),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return u(W,[{key:"addContainer",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof k=="string"){var G=k;k=document.createElement("div"),k.classList.add(G)}return this.container.insertBefore(k,j),k}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(k,j,G){var Y=this,X=z(k,j,G),$=l(X,4);return k=$[0],j=$[1],G=$[3],Z.call(this,function(){return Y.editor.deleteText(k,j)},G,k,-1*j)}},{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,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;return Z.call(this,function(){var X=G.getSelection(!0),$=new h.default;if(X==null)return $;if(b.default.query(k,b.default.Scope.BLOCK))$=G.editor.formatLine(X.index,X.length,C({},k,j));else{if(X.length===0)return G.selection.format(k,j),$;$=G.editor.formatText(X.index,X.length,C({},k,j))}return G.setSelection(X,v.default.sources.SILENT),$},Y)}},{key:"formatLine",value:function(k,j,G,Y,X){var $=this,V=void 0,tt=z(k,j,G,Y,X),et=l(tt,4);return k=et[0],j=et[1],V=et[2],X=et[3],Z.call(this,function(){return $.editor.formatLine(k,j,V)},X,k,0)}},{key:"formatText",value:function(k,j,G,Y,X){var $=this,V=void 0,tt=z(k,j,G,Y,X),et=l(tt,4);return k=et[0],j=et[1],V=et[2],X=et[3],Z.call(this,function(){return $.editor.formatText(k,j,V)},X,k,0)}},{key:"getBounds",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=void 0;typeof k=="number"?G=this.selection.getBounds(k,j):G=this.selection.getBounds(k.index,k.length);var Y=this.container.getBoundingClientRect();return{bottom:G.bottom-Y.top,height:G.height,left:G.left-Y.left,right:G.right-Y.left,top:G.top-Y.top,width:G.width}}},{key:"getContents",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,G=z(k,j),Y=l(G,2);return k=Y[0],j=Y[1],this.editor.getContents(k,j)}},{key:"getFormat",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof k=="number"?this.editor.getFormat(k,j):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,j=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,j)}},{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,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,G=z(k,j),Y=l(G,2);return k=Y[0],j=Y[1],this.editor.getText(k,j)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(k,j,G){var Y=this,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:W.sources.API;return Z.call(this,function(){return Y.editor.insertEmbed(k,j,G)},X,k)}},{key:"insertText",value:function(k,j,G,Y,X){var $=this,V=void 0,tt=z(k,0,G,Y,X),et=l(tt,4);return k=et[0],V=et[2],X=et[3],Z.call(this,function(){return $.editor.insertText(k,j,V)},X,k,j.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,j,G){this.clipboard.dangerouslyPasteHTML(k,j,G)}},{key:"removeFormat",value:function(k,j,G){var Y=this,X=z(k,j,G),$=l(X,4);return k=$[0],j=$[1],G=$[3],Z.call(this,function(){return Y.editor.removeFormat(k,j)},G,k)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(k){var j=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){k=new h.default(k);var Y=j.getLength(),X=j.editor.deleteText(0,Y),$=j.editor.applyDelta(k),V=$.ops[$.ops.length-1];V!=null&&typeof V.insert=="string"&&V.insert[V.insert.length-1]===`
1970
+ `&&(j.editor.deleteText(j.getLength()-1,1),$.delete(1));var tt=X.compose($);return tt},G)}},{key:"setSelection",value:function(k,j,G){if(k==null)this.selection.setRange(null,j||W.sources.API);else{var Y=z(k,j,G),X=l(Y,4);k=X[0],j=X[1],G=X[3],this.selection.setRange(new w.Range(k,j),G),G!==v.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API,G=new h.default().insert(k);return this.setContents(G,j)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v.default.sources.USER,j=this.scroll.update(k);return this.selection.update(k),j}},{key:"updateContents",value:function(k){var j=this,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:v.default.sources.API;return Z.call(this,function(){return k=new h.default(k),j.editor.applyDelta(k,G)},G,!0)}}]),W}();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:b.default,"core/module":y.default,"core/theme":L.default};function q(W,D){if(D=(0,S.default)(!0,{container:W,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,S.default)(!0,{},D.theme.DEFAULTS);[k,D].forEach(function(Y){Y.modules=Y.modules||{},Object.keys(Y.modules).forEach(function(X){Y.modules[X]===!0&&(Y.modules[X]={})})});var j=Object.keys(k.modules).concat(Object.keys(D.modules)),G=j.reduce(function(Y,X){var $=F.import("modules/"+X);return $==null?M.error("Cannot load "+X+" module. Are you sure you registered it?"):Y[X]=$.DEFAULTS||{},Y},{});return D.modules!=null&&D.modules.toolbar&&D.modules.toolbar.constructor!==Object&&(D.modules.toolbar={container:D.modules.toolbar}),D=(0,S.default)(!0,{},F.DEFAULTS,{modules:G},k,D),["bounds","container","scrollingContainer"].forEach(function(Y){typeof D[Y]=="string"&&(D[Y]=document.querySelector(D[Y]))}),D.modules=Object.keys(D.modules).reduce(function(Y,X){return D.modules[X]&&(Y[X]=D.modules[X]),Y},{}),D}function Z(W,D,k,j){if(this.options.strict&&!this.isEnabled()&&D===v.default.sources.USER)return new h.default;var G=k==null?null:this.getSelection(),Y=this.editor.delta,X=W();if(G!=null&&(k===!0&&(k=G.index),j==null?G=it(G,X,D):j!==0&&(G=it(G,k,j,D)),this.setSelection(G,v.default.sources.SILENT)),X.length()>0){var $,V=[v.default.events.TEXT_CHANGE,X,Y,D];if(($=this.emitter).emit.apply($,[v.default.events.EDITOR_CHANGE].concat(V)),D!==v.default.sources.SILENT){var tt;(tt=this.emitter).emit.apply(tt,V)}}return X}function z(W,D,k,j,G){var Y={};return typeof W.index=="number"&&typeof W.length=="number"?typeof D!="number"?(G=j,j=k,k=D,D=W.length,W=W.index):(D=W.length,W=W.index):typeof D!="number"&&(G=j,j=k,k=D,D=0),(typeof k>"u"?"undefined":o(k))==="object"?(Y=k,G=j):typeof k=="string"&&(j!=null?Y[k]=j:G=k),G=G||v.default.sources.API,[W,D,Y,G]}function it(W,D,k,j){if(W==null)return null;var G=void 0,Y=void 0;if(D instanceof h.default){var X=[W.index,W.index+W.length].map(function(et){return D.transformPosition(et,j!==v.default.sources.USER)}),$=l(X,2);G=$[0],Y=$[1]}else{var V=[W.index,W.index+W.length].map(function(et){return et<D||et===D&&j===v.default.sources.USER?et:k>=0?et+k:Math.max(D,et+k)}),tt=l(V,2);G=tt[0],Y=tt[1]}return new w.Range(G,Y-G)}n.expandConfig=q,n.overload=z,n.default=F},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(b,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(b,x.key,x)}}return function(b,w,T){return w&&_(b.prototype,w),T&&_(b,T),b}}(),l=function _(b,w,T){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,w);if(x===void 0){var S=Object.getPrototypeOf(b);return S===null?void 0:_(S,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=d(u),h=i(0),p=d(h);function d(_){return _&&_.__esModule?_:{default:_}}function c(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function v(_,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 m(_,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 y=function(_){m(b,_);function b(){return c(this,b),v(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"formatAt",value:function(T,x,S,I){if(b.compare(this.statics.blotName,S)<0&&p.default.query(S,p.default.Scope.BLOT)){var A=this.isolate(T,x);I&&A.wrap(S,I)}else l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,T,x,S,I)}},{key:"optimize",value:function(T){if(l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,T),this.parent instanceof b&&b.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 S=b.order.indexOf(T),I=b.order.indexOf(x);return S>=0||I>=0?S-I:T===x?0:T<x?-1:1}}]),b}(p.default.Inline);y.allowedChildren=[y,p.default.Embed,f.default],y.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default.Text);n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function w(T,x){for(var S=0;S<x.length;S++){var I=x[S];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(T,I.key,I)}}return function(T,x,S){return x&&w(T.prototype,x),S&&w(T,S),T}}(),l=function w(T,x,S){T===null&&(T=Function.prototype);var I=Object.getOwnPropertyDescriptor(T,x);if(I===void 0){var A=Object.getPrototypeOf(T);return A===null?void 0:w(A,x,S)}else{if("value"in I)return I.value;var O=I.get;return O===void 0?void 0:O.call(S)}},u=i(54),f=d(u),h=i(10),p=d(h);function d(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 m(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 y=(0,p.default)("quill:events"),_=["selectionchange","mousedown","mouseup","click"];_.forEach(function(w){document.addEventListener(w,function(){for(var T=arguments.length,x=Array(T),S=0;S<T;S++)x[S]=arguments[S];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(I){if(I.__quill&&I.__quill.emitter){var A;(A=I.__quill.emitter).handleDOM.apply(A,x)}})})});var b=function(w){m(T,w);function T(){c(this,T);var x=v(this,(T.__proto__||Object.getPrototypeOf(T)).call(this));return x.listeners={},x.on("error",y.error),x}return o(T,[{key:"emit",value:function(){y.log.apply(y,arguments),l(T.prototype.__proto__||Object.getPrototypeOf(T.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(S){for(var I=arguments.length,A=Array(I>1?I-1:0),O=1;O<I;O++)A[O-1]=arguments[O];(this.listeners[S.type]||[]).forEach(function(L){var R=L.node,C=L.handler;(S.target===R||R.contains(S.target))&&C.apply(void 0,[S].concat(A))})}},{key:"listenDOM",value:function(S,I,A){this.listeners[S]||(this.listeners[S]=[]),this.listeners[S].push({node:I,handler:A})}}]),T}(f.default);b.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"},b.sources={API:"api",SILENT:"silent",USER:"user"},n.default=b},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 l=function u(f){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};o(this,u),this.quill=f,this.options=h};l.DEFAULTS={},n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=["error","warn","log","info"],l="warn";function u(h){if(o.indexOf(h)<=o.indexOf(l)){for(var p,d=arguments.length,c=Array(d>1?d-1:0),v=1;v<d;v++)c[v-1]=arguments[v];(p=console)[h].apply(p,c)}}function f(h){return o.reduce(function(p,d){return p[d]=u.bind(console,d,h),p},{})}u.level=f.level=function(h){l=h},n.default=f},function(r,n,i){var o=Array.prototype.slice,l=i(52),u=i(53),f=r.exports=function(c,v,m){return m||(m={}),c===v?!0:c instanceof Date&&v instanceof Date?c.getTime()===v.getTime():!c||!v||typeof c!="object"&&typeof v!="object"?m.strict?c===v:c==v:d(c,v,m)};function h(c){return c==null}function p(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 d(c,v,m){var y,_;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,m)):!1;if(p(c)){if(!p(v)||c.length!==v.length)return!1;for(y=0;y<c.length;y++)if(c[y]!==v[y])return!1;return!0}try{var b=l(c),w=l(v)}catch{return!1}if(b.length!=w.length)return!1;for(b.sort(),w.sort(),y=b.length-1;y>=0;y--)if(b[y]!=w[y])return!1;for(y=b.length-1;y>=0;y--)if(_=b[y],!f(c[_],v[_],m))return!1;return typeof c==typeof v}},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),l=function(){function u(f,h,p){p===void 0&&(p={}),this.attrName=f,this.keyName=h;var d=o.Scope.TYPE&o.Scope.ATTRIBUTE;p.scope!=null?this.scope=p.scope&o.Scope.LEVEL|d:this.scope=o.Scope.ATTRIBUTE,p.whitelist!=null&&(this.whitelist=p.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 p=o.query(f,o.Scope.BLOT&(this.scope|o.Scope.TYPE));return p==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=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.Code=void 0;var o=function(){function O(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 O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function O(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&&O(L.prototype,R),C&&O(L,C),L}}(),u=function O(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:O(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),p=i(0),d=w(p),c=i(4),v=w(c),m=i(6),y=w(m),_=i(7),b=w(_);function w(O){return O&&O.__esModule?O:{default:O}}function T(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}function x(O,L){if(!O)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:O}function S(O,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);O.prototype=Object.create(L&&L.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(O,L):O.__proto__=L)}var I=function(O){S(L,O);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L}(y.default);I.blotName="code",I.tagName="CODE";var A=function(O){S(L,O);function L(){return T(this,L),x(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return l(L,[{key:"delta",value:function(){var C=this,P=this.domNode.textContent;return P.endsWith(`
1960
1971
  `)&&(P=P.slice(0,-1)),P.split(`
1961
1972
  `).reduce(function(M,F){return M.insert(F).insert(`
1962
- `,C.formats())},new h.default)}},{key:"format",value:function(C,P){if(!(C===this.statics.blotName&&P)){var M=this.descendant(_.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&&!(d.default.query(M,d.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),W=nt.next;nt.format(M,F),W instanceof L&&W.formatAt(0,C-Z+P-z,M,F)}}}},{key:"insertAt",value:function(C,P,M){if(M==null){var F=this.descendant(_.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(`
1973
+ `,C.formats())},new h.default)}},{key:"format",value:function(C,P){if(!(C===this.statics.blotName&&P)){var M=this.descendant(b.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&&!(d.default.query(M,d.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,it=this.isolate(Z,z),W=it.next;it.format(M,F),W instanceof L&&W.formatAt(0,C-Z+P-z,M,F)}}}},{key:"insertAt",value:function(C,P,M){if(M==null){var F=this.descendant(b.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(`
1963
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(`
1964
1975
  `);var M=this.domNode.textContent.slice(C).indexOf(`
1965
1976
  `);return M>-1?C+M:-1}},{key:"optimize",value:function(C){this.domNode.textContent.endsWith(`
1966
1977
  `)||this.appendChild(d.default.create("text",`
1967
- `)),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=d.default.find(P);M==null?P.parentNode.removeChild(P):M instanceof d.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);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",n.Code=I,n.default=A},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},l=function(){function W(D,k){var j=[],G=!0,Y=!1,X=void 0;try{for(var $=D[Symbol.iterator](),V;!(G=(V=$.next()).done)&&(j.push(V.value),!(k&&j.length===k));G=!0);}catch(tt){Y=!0,X=tt}finally{try{!G&&$.return&&$.return()}finally{if(Y)throw X}}return j}return function(D,k){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return W(D,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function W(D,k){for(var j=0;j<k.length;j++){var G=k[j];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(D,G.key,G)}}return function(D,k,j){return k&&W(D.prototype,k),j&&W(D,j),D}}(),f=i(2),h=P(f),p=i(20),d=P(p),c=i(0),v=P(c),m=i(13),y=P(m),b=i(24),_=P(b),w=i(4),T=P(w),x=i(16),S=P(x),I=i(21),A=P(I),O=i(11),L=P(O),R=i(3),C=P(R);function P(W){return W&&W.__esModule?W:{default:W}}function M(W,D,k){return D in W?Object.defineProperty(W,D,{value:k,enumerable:!0,configurable:!0,writable:!0}):W[D]=k,W}function F(W,D){if(!(W instanceof D))throw new TypeError("Cannot call a class as a function")}var q=/^[ -~]*$/,Z=function(){function W(D){F(this,W),this.scroll=D,this.delta=this.getDelta()}return u(W,[{key:"applyDelta",value:function(k){var j=this,G=!1;this.scroll.update();var Y=this.scroll.length();return this.scroll.batchStart(),k=nt(k),k.reduce(function(X,$){var V=$.retain||$.delete||$.insert.length||1,tt=$.attributes||{};if($.insert!=null){if(typeof $.insert=="string"){var et=$.insert;et.endsWith(`
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=d.default.find(P);M==null?P.parentNode.removeChild(P):M instanceof d.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);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",n.Code=I,n.default=A},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(W){return typeof W}:function(W){return W&&typeof Symbol=="function"&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W},l=function(){function W(D,k){var j=[],G=!0,Y=!1,X=void 0;try{for(var $=D[Symbol.iterator](),V;!(G=(V=$.next()).done)&&(j.push(V.value),!(k&&j.length===k));G=!0);}catch(tt){Y=!0,X=tt}finally{try{!G&&$.return&&$.return()}finally{if(Y)throw X}}return j}return function(D,k){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return W(D,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function W(D,k){for(var j=0;j<k.length;j++){var G=k[j];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(D,G.key,G)}}return function(D,k,j){return k&&W(D.prototype,k),j&&W(D,j),D}}(),f=i(2),h=P(f),p=i(20),d=P(p),c=i(0),v=P(c),m=i(13),y=P(m),_=i(24),b=P(_),w=i(4),T=P(w),x=i(16),S=P(x),I=i(21),A=P(I),O=i(11),L=P(O),R=i(3),C=P(R);function P(W){return W&&W.__esModule?W:{default:W}}function M(W,D,k){return D in W?Object.defineProperty(W,D,{value:k,enumerable:!0,configurable:!0,writable:!0}):W[D]=k,W}function F(W,D){if(!(W instanceof D))throw new TypeError("Cannot call a class as a function")}var q=/^[ -~]*$/,Z=function(){function W(D){F(this,W),this.scroll=D,this.delta=this.getDelta()}return u(W,[{key:"applyDelta",value:function(k){var j=this,G=!1;this.scroll.update();var Y=this.scroll.length();return this.scroll.batchStart(),k=it(k),k.reduce(function(X,$){var V=$.retain||$.delete||$.insert.length||1,tt=$.attributes||{};if($.insert!=null){if(typeof $.insert=="string"){var et=$.insert;et.endsWith(`
1968
1979
  `)&&G&&(G=!1,et=et.slice(0,-1)),X>=Y&&!et.endsWith(`
1969
- `)&&(G=!0),j.scroll.insertAt(X,et);var it=j.scroll.line(X),st=l(it,2),dt=st[0],gt=st[1],yt=(0,C.default)({},(0,w.bubbleFormats)(dt));if(dt instanceof T.default){var Tt=dt.descendant(v.default.Leaf,gt),te=l(Tt,1),Lt=te[0];yt=(0,C.default)(yt,(0,w.bubbleFormats)(Lt))}tt=d.default.attributes.diff(yt,tt)||{}}else if(o($.insert)==="object"){var rt=Object.keys($.insert)[0];if(rt==null)return X;j.scroll.insertAt(X,rt,$.insert[rt])}Y+=V}return Object.keys(tt).forEach(function(lt){j.scroll.formatAt(X,V,lt,tt[lt])}),X+V},0),k.reduce(function(X,$){return typeof $.delete=="number"?(j.scroll.deleteAt(X,$.delete),X):X+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,j){return this.scroll.deleteAt(k,j),this.update(new h.default().retain(k).delete(j))}},{key:"formatLine",value:function(k,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Y).forEach(function(X){if(!(G.scroll.whitelist!=null&&!G.scroll.whitelist[X])){var $=G.scroll.lines(k,Math.max(j,1)),V=j;$.forEach(function(tt){var et=tt.length();if(!(tt instanceof y.default))tt.format(X,Y[X]);else{var it=k-tt.offset(G.scroll),st=tt.newlineIndex(it+V)-it+1;tt.formatAt(it,st,X,Y[X])}V-=et})}}),this.scroll.optimize(),this.update(new h.default().retain(k).retain(j,(0,A.default)(Y)))}},{key:"formatText",value:function(k,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Y).forEach(function(X){G.scroll.formatAt(k,j,X,Y[X])}),this.update(new h.default().retain(k).retain(j,(0,A.default)(Y)))}},{key:"getContents",value:function(k,j){return this.delta.slice(k,k+j)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,j){return k.concat(j.delta())},new h.default)}},{key:"getFormat",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=[],Y=[];j===0?this.scroll.path(k).forEach(function($){var V=l($,1),tt=V[0];tt instanceof T.default?G.push(tt):tt instanceof v.default.Leaf&&Y.push(tt)}):(G=this.scroll.lines(k,j),Y=this.scroll.descendants(v.default.Leaf,k,j));var X=[G,Y].map(function($){if($.length===0)return{};for(var V=(0,w.bubbleFormats)($.shift());Object.keys(V).length>0;){var tt=$.shift();if(tt==null)return V;V=z((0,w.bubbleFormats)(tt),V)}return V});return C.default.apply(C.default,X)}},{key:"getText",value:function(k,j){return this.getContents(k,j).filter(function(G){return typeof G.insert=="string"}).map(function(G){return G.insert}).join("")}},{key:"insertEmbed",value:function(k,j,G){return this.scroll.insertAt(k,j,G),this.update(new h.default().retain(k).insert(M({},j,G)))}},{key:"insertText",value:function(k,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return j=j.replace(/\r\n/g,`
1980
+ `)&&(G=!0),j.scroll.insertAt(X,et);var rt=j.scroll.line(X),ot=l(rt,2),ct=ot[0],gt=ot[1],yt=(0,C.default)({},(0,w.bubbleFormats)(ct));if(ct instanceof T.default){var St=ct.descendant(v.default.Leaf,gt),ee=l(St,1),Ut=ee[0];yt=(0,C.default)(yt,(0,w.bubbleFormats)(Ut))}tt=d.default.attributes.diff(yt,tt)||{}}else if(o($.insert)==="object"){var nt=Object.keys($.insert)[0];if(nt==null)return X;j.scroll.insertAt(X,nt,$.insert[nt])}Y+=V}return Object.keys(tt).forEach(function(lt){j.scroll.formatAt(X,V,lt,tt[lt])}),X+V},0),k.reduce(function(X,$){return typeof $.delete=="number"?(j.scroll.deleteAt(X,$.delete),X):X+($.retain||$.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,j){return this.scroll.deleteAt(k,j),this.update(new h.default().retain(k).delete(j))}},{key:"formatLine",value:function(k,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(Y).forEach(function(X){if(!(G.scroll.whitelist!=null&&!G.scroll.whitelist[X])){var $=G.scroll.lines(k,Math.max(j,1)),V=j;$.forEach(function(tt){var et=tt.length();if(!(tt instanceof y.default))tt.format(X,Y[X]);else{var rt=k-tt.offset(G.scroll),ot=tt.newlineIndex(rt+V)-rt+1;tt.formatAt(rt,ot,X,Y[X])}V-=et})}}),this.scroll.optimize(),this.update(new h.default().retain(k).retain(j,(0,A.default)(Y)))}},{key:"formatText",value:function(k,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(Y).forEach(function(X){G.scroll.formatAt(k,j,X,Y[X])}),this.update(new h.default().retain(k).retain(j,(0,A.default)(Y)))}},{key:"getContents",value:function(k,j){return this.delta.slice(k,k+j)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,j){return k.concat(j.delta())},new h.default)}},{key:"getFormat",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,G=[],Y=[];j===0?this.scroll.path(k).forEach(function($){var V=l($,1),tt=V[0];tt instanceof T.default?G.push(tt):tt instanceof v.default.Leaf&&Y.push(tt)}):(G=this.scroll.lines(k,j),Y=this.scroll.descendants(v.default.Leaf,k,j));var X=[G,Y].map(function($){if($.length===0)return{};for(var V=(0,w.bubbleFormats)($.shift());Object.keys(V).length>0;){var tt=$.shift();if(tt==null)return V;V=z((0,w.bubbleFormats)(tt),V)}return V});return C.default.apply(C.default,X)}},{key:"getText",value:function(k,j){return this.getContents(k,j).filter(function(G){return typeof G.insert=="string"}).map(function(G){return G.insert}).join("")}},{key:"insertEmbed",value:function(k,j,G){return this.scroll.insertAt(k,j,G),this.update(new h.default().retain(k).insert(M({},j,G)))}},{key:"insertText",value:function(k,j){var G=this,Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return j=j.replace(/\r\n/g,`
1970
1981
  `).replace(/\r/g,`
1971
1982
  `),this.scroll.insertAt(k,j),Object.keys(Y).forEach(function(X){G.scroll.formatAt(k,j.length,X,Y[X])}),this.update(new h.default().retain(k).insert(j,(0,A.default)(Y)))}},{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 S.default}},{key:"removeFormat",value:function(k,j){var G=this.getText(k,j),Y=this.scroll.line(k+j),X=l(Y,2),$=X[0],V=X[1],tt=0,et=new h.default;$!=null&&($ instanceof y.default?tt=$.newlineIndex(V)-V+1:tt=$.length()-V,et=$.delta().slice(V,V+tt-1).insert(`
1972
- `));var it=this.getContents(k,j+tt),st=it.diff(new h.default().insert(G).concat(et)),dt=new h.default().retain(k).concat(st);return this.applyDelta(dt)}},{key:"update",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Y=this.delta;if(j.length===1&&j[0].type==="characterData"&&j[0].target.data.match(q)&&v.default.find(j[0].target)){var X=v.default.find(j[0].target),$=(0,w.bubbleFormats)(X),V=X.offset(this.scroll),tt=j[0].oldValue.replace(_.default.CONTENTS,""),et=new h.default().insert(tt),it=new h.default().insert(X.value()),st=new h.default().retain(V).concat(et.diff(it,G));k=st.reduce(function(dt,gt){return gt.insert?dt.insert(gt.insert,$):dt.push(gt)},new h.default),this.delta=Y.compose(k)}else this.delta=this.getDelta(),(!k||!(0,L.default)(Y.compose(k),this.delta))&&(k=Y.diff(this.delta,G));return k}}]),W}();function z(W,D){return Object.keys(D).reduce(function(k,j){return W[j]==null||(D[j]===W[j]?k[j]=D[j]:Array.isArray(D[j])?D[j].indexOf(W[j])<0&&(k[j]=D[j].concat([W[j]])):k[j]=[D[j],W[j]]),k},{})}function nt(W){return W.reduce(function(D,k){if(k.insert===1){var j=(0,A.default)(k.attributes);return delete j.image,D.insert({image:k.attributes.image},j)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,A.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var G=k.insert.replace(/\r\n/g,`
1983
+ `));var rt=this.getContents(k,j+tt),ot=rt.diff(new h.default().insert(G).concat(et)),ct=new h.default().retain(k).concat(ot);return this.applyDelta(ct)}},{key:"update",value:function(k){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,Y=this.delta;if(j.length===1&&j[0].type==="characterData"&&j[0].target.data.match(q)&&v.default.find(j[0].target)){var X=v.default.find(j[0].target),$=(0,w.bubbleFormats)(X),V=X.offset(this.scroll),tt=j[0].oldValue.replace(b.default.CONTENTS,""),et=new h.default().insert(tt),rt=new h.default().insert(X.value()),ot=new h.default().retain(V).concat(et.diff(rt,G));k=ot.reduce(function(ct,gt){return gt.insert?ct.insert(gt.insert,$):ct.push(gt)},new h.default),this.delta=Y.compose(k)}else this.delta=this.getDelta(),(!k||!(0,L.default)(Y.compose(k),this.delta))&&(k=Y.diff(this.delta,G));return k}}]),W}();function z(W,D){return Object.keys(D).reduce(function(k,j){return W[j]==null||(D[j]===W[j]?k[j]=D[j]:Array.isArray(D[j])?D[j].indexOf(W[j])<0&&(k[j]=D[j].concat([W[j]])):k[j]=[D[j],W[j]]),k},{})}function it(W){return W.reduce(function(D,k){if(k.insert===1){var j=(0,A.default)(k.attributes);return delete j.image,D.insert({image:k.attributes.image},j)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,A.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var G=k.insert.replace(/\r\n/g,`
1973
1984
  `).replace(/\r/g,`
1974
- `);return D.insert(G,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 O(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 O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function O(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&&O(L.prototype,R),C&&O(L,C),L}}(),u=i(0),f=_(u),h=i(21),p=_(h),d=i(11),c=_(d),v=i(8),m=_(v),y=i(10),b=_(y);function _(O){return O&&O.__esModule?O:{default:O}}function w(O){if(Array.isArray(O)){for(var L=0,R=Array(O.length);L<O.length;L++)R[L]=O[L];return R}else return Array.from(O)}function T(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}var x=(0,b.default)("quill:selection"),S=function O(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;T(this,O),this.index=L,this.length=R},I=function(){function O(L,R){var C=this;T(this,O),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 S(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){C.mouseDown||setTimeout(C.update.bind(C,m.default.sources.USER),1)}),this.emitter.on(m.default.events.EDITOR_CHANGE,function(P,M){P===m.default.events.TEXT_CHANGE&&M.length()>0&&C.update(m.default.sources.SILENT)}),this.emitter.on(m.default.events.SCROLL_BEFORE_UPDATE,function(){if(C.hasFocus()){var P=C.getNativeRange();P!=null&&P.start.node!==C.cursor.textNode&&C.emitter.once(m.default.events.SCROLL_UPDATE,function(){try{C.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(m.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(m.default.sources.SILENT)}return l(O,[{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(m.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),W=o(nt,2);M=W[0],z=W[1];var D=document.createRange();if(C>0){D.setStart(M,z);var k=this.scroll.leaf(R+C),j=o(k,2);if(Z=j[0],z=j[1],Z==null)return null;var G=Z.position(z,!0),Y=o(G,2);return M=Y[0],z=Y[1],D.setEnd(M,z),D.getBoundingClientRect()}else{var X="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),X="right"),$=D.getBoundingClientRect()):($=Z.domNode.getBoundingClientRect(),z>0&&(X="right")),{bottom:$.top+$.height,height:$.height,left:$[X],right:$[X],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],W=z[1],D=f.default.find(nt,!0),k=D.offset(C.scroll);return W===0?k:D instanceof f.default.Container?k+D.length():k+D.index(nt,W)}),F=Math.min(Math.max.apply(Math,w(M)),this.scroll.length()-1),q=Math.min.apply(Math,[F].concat(w(M)));return new S(q,F-q)}},{key:"normalizeNative",value:function(R){if(!A(this.root,R.startContainer)||!R.collapsed&&!A(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),W=o(nt,2),D=W[0],k=W[1],j=D.position(k,Z!==0),G=o(j,2);z=G[0],k=G[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)),W=o(nt,1);z=W[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]:m.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]:m.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=[m.default.events.SELECTION_CHANGE,(0,p.default)(this.lastRange),(0,p.default)(C),R];if((Z=this.emitter).emit.apply(Z,[m.default.events.EDITOR_CHANGE].concat(z)),R!==m.default.sources.SILENT){var nt;(nt=this.emitter).emit.apply(nt,z)}}}}]),O}();function A(O,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),O.contains(L)}n.Range=S,n.default=I},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(y,b){for(var _=0;_<b.length;_++){var w=b[_];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,b,_){return b&&m(y.prototype,b),_&&m(y,_),y}}(),l=function m(y,b,_){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,b);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,b,_)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(_)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(){return p(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,[{key:"insertInto",value:function(_,w){_.children.length===0?l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"insertInto",this).call(this,_,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),y}(f.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var m in v)v.hasOwnProperty(m)&&(c[m]=v[m])};return function(c,v){d(c,v);function m(){this.constructor=c}c.prototype=v===null?Object.create(v):(m.prototype=v.prototype,new m)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(44),u=i(30),f=i(1),h=function(d){o(c,d);function c(v){var m=d.call(this,v)||this;return m.build(),m}return c.prototype.appendChild=function(v){this.insertBefore(v)},c.prototype.attach=function(){d.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},c.prototype.build=function(){var v=this;this.children=new l.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(m){try{var y=p(m);v.insertBefore(y,v.children.head||void 0)}catch(b){if(b instanceof f.ParchmentError)return;throw b}})},c.prototype.deleteAt=function(v,m){if(v===0&&m===this.length())return this.remove();this.children.forEachAt(v,m,function(y,b,_){y.deleteAt(b,_)})},c.prototype.descendant=function(v,m){var y=this.children.find(m),b=y[0],_=y[1];return v.blotName==null&&v(b)||v.blotName!=null&&b instanceof v?[b,_]:b instanceof c?b.descendant(v,_):[null,-1]},c.prototype.descendants=function(v,m,y){m===void 0&&(m=0),y===void 0&&(y=Number.MAX_VALUE);var b=[],_=y;return this.children.forEachAt(m,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,_))),_-=x}),b},c.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),d.prototype.detach.call(this)},c.prototype.formatAt=function(v,m,y,b){this.children.forEachAt(v,m,function(_,w,T){_.formatAt(w,T,y,b)})},c.prototype.insertAt=function(v,m,y){var b=this.children.find(v),_=b[0],w=b[1];if(_)_.insertAt(w,m,y);else{var T=y==null?f.create("text",m):f.create(m,y);this.appendChild(T)}},c.prototype.insertBefore=function(v,m){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(y){return v instanceof y}))throw new f.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,m)},c.prototype.length=function(){return this.children.reduce(function(v,m){return v+m.length()},0)},c.prototype.moveChildren=function(v,m){this.children.forEach(function(y){v.insertBefore(y,m)})},c.prototype.optimize=function(v){if(d.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var m=f.create(this.statics.defaultChild);this.appendChild(m),m.optimize(v)}else this.remove()},c.prototype.path=function(v,m){m===void 0&&(m=!1);var y=this.children.find(v,m),b=y[0],_=y[1],w=[[this,v]];return b instanceof c?w.concat(b.path(_,m)):(b!=null&&w.push([b,_]),w)},c.prototype.removeChild=function(v){this.children.remove(v)},c.prototype.replace=function(v){v instanceof c&&v.moveChildren(this),d.prototype.replace.call(this,v)},c.prototype.split=function(v,m){if(m===void 0&&(m=!1),!m){if(v===0)return this;if(v===this.length())return this.next}var y=this.clone();return this.parent.insertBefore(y,this.next),this.children.forEachAt(v,this.length(),function(b,_,w){b=b.split(_,m),y.appendChild(b)}),y},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(v,m){var y=this,b=[],_=[];v.forEach(function(w){w.target===y.domNode&&w.type==="childList"&&(b.push.apply(b,w.addedNodes),_.push.apply(_,w.removedNodes))}),_.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===y.domNode)&&T.detach()}}),b.filter(function(w){return w.parentNode==y.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=p(w);(x.next!=T||x.next==null)&&(x.parent!=null&&x.parent.removeChild(y),y.insertBefore(x,T||void 0))})},c}(u.default);function p(d){var c=f.find(d);if(c==null)try{c=f.create(d)}catch{c=f.create(f.Scope.INLINE),[].slice.call(d.childNodes).forEach(function(m){c.domNode.appendChild(m)}),d.parentNode&&d.parentNode.replaceChild(c.domNode,d),c.attach()}return c}n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var m in v)v.hasOwnProperty(m)&&(c[m]=v[m])};return function(c,v){d(c,v);function m(){this.constructor=c}c.prototype=v===null?Object.create(v):(m.prototype=v.prototype,new m)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12),u=i(31),f=i(17),h=i(1),p=function(d){o(c,d);function c(v){var m=d.call(this,v)||this;return m.attributes=new u.default(m.domNode),m}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,m){var y=h.query(v);y instanceof l.default?this.attributes.attribute(y,m):m&&y!=null&&(v!==this.statics.blotName||this.formats()[v]!==m)&&this.replaceWith(v,m)},c.prototype.formats=function(){var v=this.attributes.values(),m=this.statics.formats(this.domNode);return m!=null&&(v[this.statics.blotName]=m),v},c.prototype.replaceWith=function(v,m){var y=d.prototype.replaceWith.call(this,v,m);return this.attributes.copy(y),y},c.prototype.update=function(v,m){var y=this;d.prototype.update.call(this,v,m),v.some(function(b){return b.target===y.domNode&&b.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(v,m){var y=d.prototype.wrap.call(this,v,m);return y instanceof c&&y.statics.scope===this.statics.scope&&this.attributes.move(y),y},c}(f.default);n.default=p},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(30),u=i(1),f=function(h){o(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.value=function(d){return!0},p.prototype.index=function(d,c){return this.domNode===d||this.domNode.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},p.prototype.position=function(d,c){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return d>0&&(v+=1),[this.parent.domNode,v]},p.prototype.value=function(){var d;return d={},d[this.statics.blotName]=this.statics.value(this.domNode)||!0,d},p.scope=u.Scope.INLINE_BLOT,p}(l.default);n.default=f},function(r,n,i){var o=i(11),l=i(3),u={attributes:{compose:function(h,p,d){typeof h!="object"&&(h={}),typeof p!="object"&&(p={});var c=l(!0,{},p);d||(c=Object.keys(c).reduce(function(m,y){return c[y]!=null&&(m[y]=c[y]),m},{}));for(var v in h)h[v]!==void 0&&p[v]===void 0&&(c[v]=h[v]);return Object.keys(c).length>0?c:void 0},diff:function(h,p){typeof h!="object"&&(h={}),typeof p!="object"&&(p={});var d=Object.keys(h).concat(Object.keys(p)).reduce(function(c,v){return o(h[v],p[v])||(c[v]=p[v]===void 0?null:p[v]),c},{});return Object.keys(d).length>0?d:void 0},transform:function(h,p,d){if(typeof h!="object")return p;if(typeof p=="object"){if(!d)return p;var c=Object.keys(p).reduce(function(v,m){return h[m]===void 0&&(v[m]=p[m]),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 p=this.ops[this.index];if(p){var d=this.offset,c=u.length(p);if(h>=c-d?(h=c-d,this.index+=1,this.offset=0):this.offset+=h,typeof p.delete=="number")return{delete:h};var v={};return p.attributes&&(v.attributes=p.attributes),typeof p.retain=="number"?v.retain=h:typeof p.insert=="string"?v.insert=p.insert.substr(d,h):v.insert=p.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,p=this.index,d=this.next(),c=this.ops.slice(this.index);return this.offset=h,this.index=p,[d].concat(c)}else return[]},r.exports=u},function(r,n){var i=function(){function o(y,b){return b!=null&&y instanceof b}var l;try{l=Map}catch{l=function(){}}var u;try{u=Set}catch{u=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(y,b,_,w,T){typeof b=="object"&&(_=b.depth,w=b.prototype,T=b.includeNonEnumerable,b=b.circular);var x=[],S=[],I=typeof Buffer<"u";typeof b>"u"&&(b=!0),typeof _>"u"&&(_=1/0);function A(O,L){if(O===null)return null;if(L===0)return O;var R,C;if(typeof O!="object")return O;if(o(O,l))R=new l;else if(o(O,u))R=new u;else if(o(O,f))R=new f(function(D,k){O.then(function(j){D(A(j,L-1))},function(j){k(A(j,L-1))})});else if(h.__isArray(O))R=[];else if(h.__isRegExp(O))R=new RegExp(O.source,m(O)),O.lastIndex&&(R.lastIndex=O.lastIndex);else if(h.__isDate(O))R=new Date(O.getTime());else{if(I&&Buffer.isBuffer(O))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(O.length):R=new Buffer(O.length),O.copy(R),R;o(O,Error)?R=Object.create(O):typeof w>"u"?(C=Object.getPrototypeOf(O),R=Object.create(C)):(R=Object.create(w),C=w)}if(b){var P=x.indexOf(O);if(P!=-1)return S[P];x.push(O),S.push(R)}o(O,l)&&O.forEach(function(D,k){var j=A(k,L-1),G=A(D,L-1);R.set(j,G)}),o(O,u)&&O.forEach(function(D){var k=A(D,L-1);R.add(k)});for(var M in O){var F;C&&(F=Object.getOwnPropertyDescriptor(C,M)),!(F&&F.set==null)&&(R[M]=A(O[M],L-1))}if(Object.getOwnPropertySymbols)for(var q=Object.getOwnPropertySymbols(O),M=0;M<q.length;M++){var Z=q[M],z=Object.getOwnPropertyDescriptor(O,Z);z&&!z.enumerable&&!T||(R[Z]=A(O[Z],L-1),z.enumerable||Object.defineProperty(R,Z,{enumerable:!1}))}if(T)for(var nt=Object.getOwnPropertyNames(O),M=0;M<nt.length;M++){var W=nt[M],z=Object.getOwnPropertyDescriptor(O,W);z&&z.enumerable||(R[W]=A(O[W],L-1),Object.defineProperty(R,W,{enumerable:!1}))}return R}return A(y,_)}h.clonePrototype=function(b){if(b===null)return null;var _=function(){};return _.prototype=b,new _};function p(y){return Object.prototype.toString.call(y)}h.__objToStr=p;function d(y){return typeof y=="object"&&p(y)==="[object Date]"}h.__isDate=d;function c(y){return typeof y=="object"&&p(y)==="[object Array]"}h.__isArray=c;function v(y){return typeof y=="object"&&p(y)==="[object RegExp]"}h.__isRegExp=v;function m(y){var b="";return y.global&&(b+="g"),y.ignoreCase&&(b+="i"),y.multiline&&(b+="m"),b}return h.__getRegExpFlags=m,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(W){q=!0,Z=W}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")}}(),l=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),p=i(8),d=x(p),c=i(4),v=x(c),m=i(16),y=x(m),b=i(13),_=x(b),w=i(25),T=x(w);function x(R){return R&&R.__esModule?R:{default:R}}function S(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 A(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 O(R){return R instanceof v.default||R instanceof c.BlockEmbed}var L=function(R){A(C,R);function C(P,M){S(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 l(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],W=this.line(M+F),D=o(W,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 _.default){var j=z.newlineIndex(z.length(),!0);if(j>-1&&(z=z.split(j+1),z===k)){this.optimize();return}}else if(k instanceof _.default){var G=k.newlineIndex(0);G>-1&&k.split(G+1)}var Y=k.children.head instanceof y.default?null:k.children.head;z.moveChildren(k,Y),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(`
1975
- `)&&(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(O,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,W){var D=[],k=W;return z.children.forEachAt(nt,W,function(j,G,Y){O(j)?D.push(j):j instanceof h.default.Container&&(D=D.concat(Z(j,G,k))),k-=Y}),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(d.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=d.default.sources.USER;typeof M=="string"&&(F=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(d.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(d.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 $},l=function(){function $(V,tt){var et=[],it=!0,st=!1,dt=void 0;try{for(var gt=V[Symbol.iterator](),yt;!(it=(yt=gt.next()).done)&&(et.push(yt.value),!(tt&&et.length===tt));it=!0);}catch(Tt){st=!0,dt=Tt}finally{try{!it&&gt.return&&gt.return()}finally{if(st)throw dt}}return et}return function(V,tt){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return $(V,tt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function $(V,tt){for(var et=0;et<tt.length;et++){var it=tt[et];it.enumerable=it.enumerable||!1,it.configurable=!0,"value"in it&&(it.writable=!0),Object.defineProperty(V,it.key,it)}}return function(V,tt,et){return tt&&$(V.prototype,tt),et&&$(V,et),V}}(),f=i(21),h=R(f),p=i(11),d=R(p),c=i(3),v=R(c),m=i(2),y=R(m),b=i(20),_=R(b),w=i(0),T=R(w),x=i(5),S=R(x),I=i(10),A=R(I),O=i(9),L=R(O);function R($){return $&&$.__esModule?$:{default:$}}function C($,V,tt){return V in $?Object.defineProperty($,V,{value:tt,enumerable:!0,configurable:!0,writable:!0}):$[V]=tt,$}function P($,V){if(!($ instanceof V))throw new TypeError("Cannot call a class as a function")}function M($,V){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V&&(typeof V=="object"||typeof V=="function")?V:$}function F($,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof V);$.prototype=Object.create(V&&V.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf($,V):$.__proto__=V)}var q=(0,A.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",z=function($){F(V,$),u(V,null,[{key:"match",value:function(et,it){return it=X(it),["altKey","ctrlKey","metaKey","shiftKey"].some(function(st){return!!it[st]!==et[st]&&it[st]!==null})?!1:it.key===(et.which||et.keyCode)}}]);function V(tt,et){P(this,V);var it=M(this,(V.__proto__||Object.getPrototypeOf(V)).call(this,tt,et));return it.bindings={},Object.keys(it.options.bindings).forEach(function(st){st==="list autofill"&&tt.scroll.whitelist!=null&&!tt.scroll.whitelist.list||it.options.bindings[st]&&it.addBinding(it.options.bindings[st])}),it.addBinding({key:V.keys.ENTER,shiftKey:null},j),it.addBinding({key:V.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(it.addBinding({key:V.keys.BACKSPACE},{collapsed:!0},W),it.addBinding({key:V.keys.DELETE},{collapsed:!0},D)):(it.addBinding({key:V.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},W),it.addBinding({key:V.keys.DELETE},{collapsed:!0,suffix:/^.?$/},D)),it.addBinding({key:V.keys.BACKSPACE},{collapsed:!1},k),it.addBinding({key:V.keys.DELETE},{collapsed:!1},k),it.addBinding({key:V.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},W),it.listen(),it}return u(V,[{key:"addBinding",value:function(et){var it=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},st=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},dt=X(et);if(dt==null||dt.key==null)return q.warn("Attempted to add invalid keyboard binding",dt);typeof it=="function"&&(it={handler:it}),typeof st=="function"&&(st={handler:st}),dt=(0,v.default)(dt,it,st),this.bindings[dt.key]=this.bindings[dt.key]||[],this.bindings[dt.key].push(dt)}},{key:"listen",value:function(){var et=this;this.quill.root.addEventListener("keydown",function(it){if(!it.defaultPrevented){var st=it.which||it.keyCode,dt=(et.bindings[st]||[]).filter(function(ce){return V.match(it,ce)});if(dt.length!==0){var gt=et.quill.getSelection();if(!(gt==null||!et.quill.hasFocus())){var yt=et.quill.getLine(gt.index),Tt=l(yt,2),te=Tt[0],Lt=Tt[1],rt=et.quill.getLeaf(gt.index),lt=l(rt,2),pt=lt[0],vt=lt[1],ct=gt.length===0?[pt,vt]:et.quill.getLeaf(gt.index+gt.length),Pt=l(ct,2),Ft=Pt[0],Nt=Pt[1],He=pt instanceof T.default.Text?pt.value().slice(0,vt):"",Ge=Ft instanceof T.default.Text?Ft.value().slice(Nt):"",Zt={collapsed:gt.length===0,empty:gt.length===0&&te.length()<=1,format:et.quill.getFormat(gt),offset:Lt,prefix:He,suffix:Ge},Ss=dt.some(function(ce){if(ce.collapsed!=null&&ce.collapsed!==Zt.collapsed||ce.empty!=null&&ce.empty!==Zt.empty||ce.offset!=null&&ce.offset!==Zt.offset)return!1;if(Array.isArray(ce.format)){if(ce.format.every(function(lr){return Zt.format[lr]==null}))return!1}else if(o(ce.format)==="object"&&!Object.keys(ce.format).every(function(lr){return ce.format[lr]===!0?Zt.format[lr]!=null:ce.format[lr]===!1?Zt.format[lr]==null:(0,d.default)(ce.format[lr],Zt.format[lr])}))return!1;return ce.prefix!=null&&!ce.prefix.test(Zt.prefix)||ce.suffix!=null&&!ce.suffix.test(Zt.suffix)?!1:ce.handler.call(et,gt,Zt)!==!0});Ss&&it.preventDefault()}}}})}}]),V}(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:Y("bold"),italic:Y("italic"),underline:Y("underline"),indent:{key:z.keys.TAB,format:["blockquote","indent","list"],handler:function(V,tt){if(tt.collapsed&&tt.offset!==0)return!0;this.quill.format("indent","+1",S.default.sources.USER)}},outdent:{key:z.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(V,tt){if(tt.collapsed&&tt.offset!==0)return!0;this.quill.format("indent","-1",S.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(V,tt){tt.format.indent!=null?this.quill.format("indent","-1",S.default.sources.USER):tt.format.list!=null&&this.quill.format("list",!1,S.default.sources.USER)}},"indent code-block":G(!0),"outdent code-block":G(!1),"remove tab":{key:z.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(V){this.quill.deleteText(V.index-1,1,S.default.sources.USER)}},tab:{key:z.keys.TAB,handler:function(V){this.quill.history.cutoff();var tt=new y.default().retain(V.index).delete(V.length).insert(" ");this.quill.updateContents(tt,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(V.index+1,S.default.sources.SILENT)}},"list empty enter":{key:z.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(V,tt){this.quill.format("list",!1,S.default.sources.USER),tt.format.indent&&this.quill.format("indent",!1,S.default.sources.USER)}},"checklist enter":{key:z.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(V){var tt=this.quill.getLine(V.index),et=l(tt,2),it=et[0],st=et[1],dt=(0,v.default)({},it.formats(),{list:"checked"}),gt=new y.default().retain(V.index).insert(`
1976
- `,dt).retain(it.length()-st-1).retain(1,{list:"unchecked"});this.quill.updateContents(gt,S.default.sources.USER),this.quill.setSelection(V.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:z.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(V,tt){var et=this.quill.getLine(V.index),it=l(et,2),st=it[0],dt=it[1],gt=new y.default().retain(V.index).insert(`
1977
- `,tt.format).retain(st.length()-dt-1).retain(1,{header:null});this.quill.updateContents(gt,S.default.sources.USER),this.quill.setSelection(V.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(V,tt){var et=tt.prefix.length,it=this.quill.getLine(V.index),st=l(it,2),dt=st[0],gt=st[1];if(gt>et)return!0;var yt=void 0;switch(tt.prefix.trim()){case"[]":case"[ ]":yt="unchecked";break;case"[x]":yt="checked";break;case"-":case"*":yt="bullet";break;default:yt="ordered"}this.quill.insertText(V.index," ",S.default.sources.USER),this.quill.history.cutoff();var Tt=new y.default().retain(V.index-gt).delete(et+1).retain(dt.length()-2-gt).retain(1,{list:yt});this.quill.updateContents(Tt,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(V.index-et,S.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(V){var tt=this.quill.getLine(V.index),et=l(tt,2),it=et[0],st=et[1],dt=new y.default().retain(V.index+it.length()-st-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(dt,S.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($,V){var tt,et=$===z.keys.LEFT?"prefix":"suffix";return tt={key:$,shiftKey:V,altKey:null},C(tt,et,/^$/),C(tt,"handler",function(st){var dt=st.index;$===z.keys.RIGHT&&(dt+=st.length+1);var gt=this.quill.getLeaf(dt),yt=l(gt,1),Tt=yt[0];return Tt instanceof T.default.Embed?($===z.keys.LEFT?V?this.quill.setSelection(st.index-1,st.length+1,S.default.sources.USER):this.quill.setSelection(st.index-1,S.default.sources.USER):V?this.quill.setSelection(st.index,st.length+1,S.default.sources.USER):this.quill.setSelection(st.index+st.length+1,S.default.sources.USER),!1):!0}),tt}function W($,V){if(!($.index===0||this.quill.getLength()<=1)){var tt=this.quill.getLine($.index),et=l(tt,1),it=et[0],st={};if(V.offset===0){var dt=this.quill.getLine($.index-1),gt=l(dt,1),yt=gt[0];if(yt!=null&&yt.length()>1){var Tt=it.formats(),te=this.quill.getFormat($.index-1,1);st=_.default.attributes.diff(Tt,te)||{}}}var Lt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(V.prefix)?2:1;this.quill.deleteText($.index-Lt,Lt,S.default.sources.USER),Object.keys(st).length>0&&this.quill.formatLine($.index-Lt,Lt,st,S.default.sources.USER),this.quill.focus()}}function D($,V){var tt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(V.suffix)?2:1;if(!($.index>=this.quill.getLength()-tt)){var et={},it=0,st=this.quill.getLine($.index),dt=l(st,1),gt=dt[0];if(V.offset>=gt.length()-1){var yt=this.quill.getLine($.index+1),Tt=l(yt,1),te=Tt[0];if(te){var Lt=gt.formats(),rt=this.quill.getFormat($.index,1);et=_.default.attributes.diff(Lt,rt)||{},it=te.length()}}this.quill.deleteText($.index,tt,S.default.sources.USER),Object.keys(et).length>0&&this.quill.formatLine($.index+it-1,tt,et,S.default.sources.USER)}}function k($){var V=this.quill.getLines($),tt={};if(V.length>1){var et=V[0].formats(),it=V[V.length-1].formats();tt=_.default.attributes.diff(it,et)||{}}this.quill.deleteText($,S.default.sources.USER),Object.keys(tt).length>0&&this.quill.formatLine($.index,1,tt,S.default.sources.USER),this.quill.setSelection($.index,S.default.sources.SILENT),this.quill.focus()}function j($,V){var tt=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var et=Object.keys(V.format).reduce(function(it,st){return T.default.query(st,T.default.Scope.BLOCK)&&!Array.isArray(V.format[st])&&(it[st]=V.format[st]),it},{});this.quill.insertText($.index,`
1978
- `,et,S.default.sources.USER),this.quill.setSelection($.index+1,S.default.sources.SILENT),this.quill.focus(),Object.keys(V.format).forEach(function(it){et[it]==null&&(Array.isArray(V.format[it])||it!=="link"&&tt.quill.format(it,V.format[it],S.default.sources.USER))})}function G($){return{key:z.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(tt){var et=T.default.query("code-block"),it=tt.index,st=tt.length,dt=this.quill.scroll.descendant(et,it),gt=l(dt,2),yt=gt[0],Tt=gt[1];if(yt!=null){var te=this.quill.getIndex(yt),Lt=yt.newlineIndex(Tt,!0)+1,rt=yt.newlineIndex(te+Tt+st),lt=yt.domNode.textContent.slice(Lt,rt).split(`
1979
- `);Tt=0,lt.forEach(function(pt,vt){$?(yt.insertAt(Lt+Tt,et.TAB),Tt+=et.TAB.length,vt===0?it+=et.TAB.length:st+=et.TAB.length):pt.startsWith(et.TAB)&&(yt.deleteAt(Lt+Tt,et.TAB.length),Tt-=et.TAB.length,vt===0?it-=et.TAB.length:st-=et.TAB.length),Tt+=pt.length+1}),this.quill.update(S.default.sources.USER),this.quill.setSelection(it,st,S.default.sources.SILENT)}}}}function Y($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(tt,et){this.quill.format($,!et.format[$],S.default.sources.USER)}}}function X($){if(typeof $=="string"||typeof $=="number")return X({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 _(w,T){var x=[],S=!0,I=!1,A=void 0;try{for(var O=w[Symbol.iterator](),L;!(S=(L=O.next()).done)&&(x.push(L.value),!(T&&x.length===T));S=!0);}catch(R){I=!0,A=R}finally{try{!S&&O.return&&O.return()}finally{if(I)throw A}}return x}return function(w,T){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return _(w,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function _(w,T,x){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,T);if(S===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:_(I,T,x)}else{if("value"in S)return S.value;var A=S.get;return A===void 0?void 0:A.call(x)}},u=function(){function _(w,T){for(var x=0;x<T.length;x++){var S=T[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,T,x){return T&&_(w.prototype,T),x&&_(w,x),w}}(),f=i(0),h=c(f),p=i(7),d=c(p);function c(_){return _&&_.__esModule?_:{default:_}}function v(_,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 y(_,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 b=function(_){y(w,_),u(w,null,[{key:"value",value:function(){}}]);function w(T,x){v(this,w);var S=m(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return S.selection=x,S.textNode=document.createTextNode(w.CONTENTS),S.domNode.appendChild(S.textNode),S._length=0,S}return u(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,S){if(this._length!==0)return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,x,S);for(var I=this,A=0;I!=null&&I.statics.scope!==h.default.Scope.BLOCK_BLOT;)A+=I.offset(I.parent),I=I.parent;I!=null&&(this._length=w.CONTENTS.length,I.optimize(),I.formatAt(A,w.CONTENTS.length,x,S),this._length=0)}},{key:"index",value:function(x,S){return x===this.textNode?0:l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,S)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){l(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,S=this.selection.getNativeRange(),I=void 0,A=void 0,O=void 0;if(S!=null&&S.start.node===x&&S.end.node===x){var L=[x,S.start.offset,S.end.offset];I=L[0],A=L[1],O=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 d.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(),A!=null){var C=[A,O].map(function(M){return Math.max(0,Math.min(I.data.length,M-1))}),P=o(C,2);return A=P[0],O=P[1],{startNode:I,startOffset:A,endNode:I,endOffset:O}}}}},{key:"update",value:function(x,S){var I=this;if(x.some(function(O){return O.type==="characterData"&&O.target===I.textNode})){var A=this.restore();A&&(S.range=A)}}},{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),l=h(o),u=i(4),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(){return p(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return y}(l.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(_,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(_,x.key,x)}}return function(_,w,T){return w&&b(_.prototype,w),T&&b(_,T),_}}(),l=function b(_,w,T){_===null&&(_=Function.prototype);var x=Object.getOwnPropertyDescriptor(_,w);if(x===void 0){var S=Object.getPrototypeOf(_);return S===null?void 0:b(S,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 p(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function d(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function c(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var v=function(b){c(_,b);function _(){return p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"value",value:function(T){var x=l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,T);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(S){return("00"+parseInt(S).toString(16)).slice(-2)}).join("")):x}}]),_}(f.default.Attributor.Style),m=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),y=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=m,n.ColorStyle=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var o=function(){function y(b,_){for(var w=0;w<_.length;w++){var T=_[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(b,T.key,T)}}return function(b,_,w){return _&&y(b.prototype,_),w&&y(b,w),b}}(),l=function y(b,_,w){b===null&&(b=Function.prototype);var T=Object.getOwnPropertyDescriptor(b,_);if(T===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:y(x,_,w)}else{if("value"in T)return T.value;var S=T.get;return S===void 0?void 0:S.call(w)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function d(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return p(this,b),d(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 l(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=l(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 m(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 m(y,b){var _=document.createElement("a");_.href=y;var w=_.href.slice(0,_.href.indexOf(":"));return b.indexOf(w)>-1}n.default=v,n.sanitize=m},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},l=function(){function b(_,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(_,x.key,x)}}return function(_,w,T){return w&&b(_.prototype,w),T&&b(_,T),_}}(),u=i(23),f=d(u),h=i(107),p=d(h);function d(b){return b&&b.__esModule?b:{default:b}}function c(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}var v=0;function m(b,_){b.setAttribute(_,b.getAttribute(_)!=="true")}var y=function(){function b(_){var w=this;c(this,b),this.select=_,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 l(b,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),m(this.label,"aria-expanded"),m(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(S){switch(S.keyCode){case f.default.keys.ENTER:T.selectItem(x,!0),S.preventDefault();break;case f.default.keys.ESCAPE:T.escape(),S.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=p.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 S=w.buildItem(x);T.appendChild(S),x.selected===!0&&w.selectItem(S)}),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 S=document.createEvent("Event");S.initEvent("change",!0,!0),this.select.dispatchEvent(S)}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=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),l=q(o),u=i(5),f=q(u),h=i(4),p=q(h),d=i(16),c=q(d),v=i(25),m=q(v),y=i(24),b=q(y),_=i(35),w=q(_),T=i(6),x=q(T),S=i(22),I=q(S),A=i(7),O=q(A),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":p.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":m.default,"blots/cursor":b.default,"blots/embed":w.default,"blots/inline":x.default,"blots/scroll":I.default,"blots/text":O.default,"modules/clipboard":R.default,"modules/history":P.default,"modules/keyboard":F.default}),l.default.register(p.default,c.default,b.default,x.default,I.default,O.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),l=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 p=this.isolate(f,h);p.remove()},u.prototype.formatAt=function(f,h,p,d){var c=this.isolate(f,h);if(o.query(p,o.Scope.BLOT)!=null&&d)c.wrap(p,d);else if(o.query(p,o.Scope.ATTRIBUTE)!=null){var v=o.create(this.statics.scope);c.wrap(v),v.format(p,d)}},u.prototype.insertAt=function(f,h,p){var d=p==null?o.create("text",h):o.create(h,p),c=this.split(f);this.parent.insertBefore(d,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var p=null;f.children.insertBefore(this,h),h!=null&&(p=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=p)&&f.domNode.insertBefore(this.domNode,p),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var p=this.split(f);return p.split(h),p},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 p=typeof f=="string"?o.create(f,h):f;return p.replace(this),p},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 p=typeof f=="string"?o.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(p,this.next),p.appendChild(this),p},u.blotName="abstract",u}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),l=i(32),u=i(33),f=i(1),h=function(){function p(d){this.attributes={},this.domNode=d,this.build()}return p.prototype.attribute=function(d,c){c?d.add(this.domNode,c)&&(d.value(this.domNode)!=null?this.attributes[d.attrName]=d:delete this.attributes[d.attrName]):(d.remove(this.domNode),delete this.attributes[d.attrName])},p.prototype.build=function(){var d=this;this.attributes={};var c=o.default.keys(this.domNode),v=l.default.keys(this.domNode),m=u.default.keys(this.domNode);c.concat(v).concat(m).forEach(function(y){var b=f.query(y,f.Scope.ATTRIBUTE);b instanceof o.default&&(d.attributes[b.attrName]=b)})},p.prototype.copy=function(d){var c=this;Object.keys(this.attributes).forEach(function(v){var m=c.attributes[v].value(c.domNode);d.format(v,m)})},p.prototype.move=function(d){var c=this;this.copy(d),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},p.prototype.values=function(){var d=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=d.attributes[v].value(d.domNode),c},{})},p}();n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12);function u(h,p){var d=h.getAttribute("class")||"";return d.split(/\s+/).filter(function(c){return c.indexOf(p+"-")===0})}var f=function(h){o(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.keys=function(d){return(d.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},p.prototype.add=function(d,c){return this.canAdd(d,c)?(this.remove(d),d.classList.add(this.keyName+"-"+c),!0):!1},p.prototype.remove=function(d){var c=u(d,this.keyName);c.forEach(function(v){d.classList.remove(v)}),d.classList.length===0&&d.removeAttribute("class")},p.prototype.value=function(d){var c=u(d,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(d,v)?v:""},p}(l.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12);function u(h){var p=h.split("-"),d=p.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return p[0]+d}var f=function(h){o(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.keys=function(d){return(d.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},p.prototype.add=function(d,c){return this.canAdd(d,c)?(d.style[u(this.keyName)]=c,!0):!1},p.prototype.remove=function(d){d.style[u(this.keyName)]="",d.getAttribute("style")||d.removeAttribute("style")},p.prototype.value=function(d){var c=d.style[u(this.keyName)];return this.canAdd(d,c)?c:""},p}(l.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,p){for(var d=0;d<p.length;d++){var c=p[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,p,d){return p&&f(h.prototype,p),d&&f(h,d),h}}();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,p){l(this,f),this.quill=h,this.options=p,this.modules={}}return o(f,[{key:"init",value:function(){var p=this;Object.keys(this.options.modules).forEach(function(d){p.modules[d]==null&&p.addModule(d)})}},{key:"addModule",value:function(p){var d=this.quill.constructor.import("modules/"+p);return this.modules[p]=new d(this.quill,this.options.modules[p]||{}),this.modules[p]}}]),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 _(w,T){for(var x=0;x<T.length;x++){var S=T[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,T,x){return T&&_(w.prototype,T),x&&_(w,x),w}}(),l=function _(w,T,x){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,T);if(S===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:_(I,T,x)}else{if("value"in S)return S.value;var A=S.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=d(u),h=i(7),p=d(h);function d(_){return _&&_.__esModule?_:{default:_}}function c(_,w){if(!(_ instanceof w))throw new TypeError("Cannot call a class as a function")}function v(_,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 m(_,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 y="\uFEFF",b=function(_){m(w,_);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(S){x.contentNode.appendChild(S)}),x.leftGuard=document.createTextNode(y),x.rightGuard=document.createTextNode(y),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(w,[{key:"index",value:function(x,S){return x===this.leftGuard?0:x===this.rightGuard?1:l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,S)}},{key:"restore",value:function(x){var S=void 0,I=void 0,A=x.data.split(y).join("");if(x===this.leftGuard)if(this.prev instanceof p.default){var O=this.prev.length();this.prev.insertAt(O,A),S={startNode:this.prev.domNode,startOffset:O+A.length}}else I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this),S={startNode:I,startOffset:A.length};else x===this.rightGuard&&(this.next instanceof p.default?(this.next.insertAt(0,A),S={startNode:this.next.domNode,startOffset:A.length}):(I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this.next),S={startNode:I,startOffset:A.length}));return x.data=y,S}},{key:"update",value:function(x,S){var I=this;x.forEach(function(A){if(A.type==="characterData"&&(A.target===I.leftGuard||A.target===I.rightGuard)){var O=I.restore(A.target);O&&(S.range=O)}})}}]),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),l=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:l.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new l.default.Attributor.Attribute("align","align",f),p=new l.default.Attributor.Class("align","ql-align",f),d=new l.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=p,n.AlignStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var o=i(0),l=f(o),u=i(26);function f(d){return d&&d.__esModule?d:{default:d}}var h=new l.default.Attributor.Class("background","ql-bg",{scope:l.default.Scope.INLINE}),p=new u.ColorAttributor("background","background-color",{scope:l.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var o=i(0),l=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:l.default.Scope.BLOCK,whitelist:["rtl"]},h=new l.default.Attributor.Attribute("direction","dir",f),p=new l.default.Attributor.Class("direction","ql-direction",f),d=new l.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=p,n.DirectionStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var o=function(){function _(w,T){for(var x=0;x<T.length;x++){var S=T[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,T,x){return T&&_(w.prototype,T),x&&_(w,x),w}}(),l=function _(w,T,x){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,T);if(S===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:_(I,T,x)}else{if("value"in S)return S.value;var A=S.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=h(u);function h(_){return _&&_.__esModule?_:{default:_}}function p(_,w){if(!(_ instanceof w))throw new TypeError("Cannot call a class as a function")}function d(_,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 c(_,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 v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},m=new f.default.Attributor.Class("font","ql-font",v),y=function(_){c(w,_);function w(){return p(this,w),d(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return o(w,[{key:"value",value:function(x){return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),w}(f.default.Attributor.Style),b=new y("font","font-family",v);n.FontStyle=b,n.FontClass=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var o=i(0),l=u(o);function u(p){return p&&p.__esModule?p:{default:p}}var f=new l.default.Attributor.Class("size","ql-size",{scope:l.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new l.default.Attributor.Style("size","font-size",{scope:l.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,S){for(var I=0;I<S.length;I++){var A=S[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,S,I){return S&&T(x.prototype,S),I&&T(x,I),x}}(),l=i(0),u=c(l),f=i(5),h=c(f),p=i(9),d=c(p);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 m(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 y(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){y(x,T);function x(S,I){v(this,x);var A=m(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,S,I));return A.lastRecorded=0,A.ignoreChange=!1,A.clear(),A.quill.on(h.default.events.EDITOR_CHANGE,function(O,L,R,C){O!==h.default.events.TEXT_CHANGE||A.ignoreChange||(!A.options.userOnly||C===h.default.sources.USER?A.record(L,R):A.transform(L))}),A.quill.keyboard.addBinding({key:"Z",shortKey:!0},A.undo.bind(A)),A.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},A.redo.bind(A)),/Win/i.test(navigator.platform)&&A.quill.keyboard.addBinding({key:"Y",shortKey:!0},A.redo.bind(A)),A}return o(x,[{key:"change",value:function(I,A){if(this.stack[I].length!==0){var O=this.stack[I].pop();this.stack[A].push(O),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(O[I],h.default.sources.USER),this.ignoreChange=!1;var L=w(O[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,A){if(I.ops.length!==0){this.stack.redo=[];var O=this.quill.getContents().diff(A),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();O=O.compose(R.undo),I=R.redo.compose(I)}else this.lastRecorded=L;this.stack.undo.push({redo:I,undo:O}),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(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(d.default);b.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function _(T){var x=T.ops[T.ops.length-1];return x==null?!1:x.insert!=null?typeof x.insert=="string"&&x.insert.endsWith(`
1980
- `):x.attributes!=null?Object.keys(x.attributes).some(function(S){return u.default.query(S,u.default.Scope.BLOCK)!=null}):!1}function w(T){var x=T.reduce(function(I,A){return I+=A.delete||0,I},0),S=T.length()-x;return _(T)&&(S-=1),S}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 j(G,Y){for(var X=0;X<Y.length;X++){var $=Y[X];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(G,$.key,$)}}return function(G,Y,X){return Y&&j(G.prototype,Y),X&&j(G,X),G}}(),l=function j(G,Y,X){G===null&&(G=Function.prototype);var $=Object.getOwnPropertyDescriptor(G,Y);if($===void 0){var V=Object.getPrototypeOf(G);return V===null?void 0:j(V,Y,X)}else{if("value"in $)return $.value;var tt=$.get;return tt===void 0?void 0:tt.call(X)}},u=i(3),f=L(u),h=i(2),p=L(h),d=i(8),c=L(d),v=i(23),m=L(v),y=i(34),b=L(y),_=i(59),w=L(_),T=i(60),x=L(T),S=i(28),I=L(S),A=i(61),O=L(A);function L(j){return j&&j.__esModule?j:{default:j}}function R(j,G){if(!(j instanceof G))throw new TypeError("Cannot call a class as a function")}function C(j,G){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G&&(typeof G=="object"||typeof G=="function")?G:j}function P(j,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof G);j.prototype=Object.create(G&&G.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),G&&(Object.setPrototypeOf?Object.setPrototypeOf(j,G):j.__proto__=G)}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(j){P(G,j);function G(Y,X){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,Y,X)),V=function tt(et){if(!document.body.contains(Y.root))return document.body.removeEventListener("click",tt);$.tooltip!=null&&!$.tooltip.root.contains(et.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(it){it.container.contains(et.target)||it.close()})};return Y.emitter.listenDOM("click",document.body,V),$}return o(G,[{key:"addModule",value:function(X){var $=l(G.prototype.__proto__||Object.getPrototypeOf(G.prototype),"addModule",this).call(this,X);return X==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(X,$){X.forEach(function(V){var tt=V.getAttribute("class")||"";tt.split(/\s+/).forEach(function(et){if(et.startsWith("ql-")&&(et=et.slice(3),$[et]!=null))if(et==="direction")V.innerHTML=$[et][""]+$[et].rtl;else if(typeof $[et]=="string")V.innerHTML=$[et];else{var it=V.value||"";it!=null&&$[et][it]&&(V.innerHTML=$[et][it])}})})}},{key:"buildPickers",value:function(X,$){var V=this;this.pickers=X.map(function(et){if(et.classList.contains("ql-align"))return et.querySelector("option")==null&&k(et,M),new x.default(et,$.align);if(et.classList.contains("ql-background")||et.classList.contains("ql-color")){var it=et.classList.contains("ql-background")?"background":"color";return et.querySelector("option")==null&&k(et,F,it==="background"?"#ffffff":"#000000"),new w.default(et,$[it])}else return et.querySelector("option")==null&&(et.classList.contains("ql-font")?k(et,q):et.classList.contains("ql-header")?k(et,Z):et.classList.contains("ql-size")&&k(et,z)),new I.default(et)});var tt=function(){V.pickers.forEach(function(it){it.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,tt)}}]),G}(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 G=this,Y=this.container.querySelector("input.ql-image[type=file]");Y==null&&(Y=document.createElement("input"),Y.setAttribute("type","file"),Y.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Y.classList.add("ql-image"),Y.addEventListener("change",function(){if(Y.files!=null&&Y.files[0]!=null){var X=new FileReader;X.onload=function($){var V=G.quill.getSelection(!0);G.quill.updateContents(new p.default().retain(V.index).delete(V.length).insert({image:$.target.result}),c.default.sources.USER),G.quill.setSelection(V.index+1,c.default.sources.SILENT),Y.value=""},X.readAsDataURL(Y.files[0])}}),this.container.appendChild(Y)),Y.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var W=function(j){P(G,j);function G(Y,X){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,Y,X));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return o(G,[{key:"listen",value:function(){var X=this;this.textbox.addEventListener("keydown",function($){m.default.match($,"enter")?(X.save(),$.preventDefault()):m.default.match($,"escape")&&(X.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var X=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=$:X!==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-"+X)||""),this.root.setAttribute("data-mode",X)}},{key:"restoreFocus",value:function(){var X=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=X}},{key:"save",value:function(){var X=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",X,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",X,c.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":X=D(X);case"formula":{if(!X)break;var V=this.quill.getSelection(!0);if(V!=null){var tt=V.index+V.length;this.quill.insertEmbed(tt,this.root.getAttribute("data-mode"),X,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(tt+1," ",c.default.sources.USER),this.quill.setSelection(tt+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),G}(O.default);function D(j){var G=j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return G?(G[1]||"https")+"://www.youtube.com/embed/"+G[2]+"?showinfo=0":(G=j.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(G[1]||"https")+"://player.vimeo.com/video/"+G[2]+"/":j}function k(j,G){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;G.forEach(function(X){var $=document.createElement("option");X===Y?$.setAttribute("selected","selected"):$.setAttribute("value",X),j.appendChild($)})}n.BaseTooltip=W,n.default=nt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function l(){this.head=this.tail=null,this.length=0}return l.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))},l.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},l.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)},l.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},l.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)},l.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},l.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,p=this.iterator();h=p();){var d=h.length();if(u<d||f&&u===d&&(h.next==null||h.next.length()!==0))return[h,u];u-=d}return[null,0]},l.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},l.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var p=this.find(u),d=p[0],c=p[1],v,m=u-c,y=this.iterator(d);(v=y())&&m<u+f;){var b=v.length();u>m?h(v,u-m,Math.min(f,m+b-u)):h(v,0,Math.min(b,u+f-m)),m+=b}},l.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},l.prototype.reduce=function(u,f){for(var h,p=this.iterator();h=p();)f=u(f,h);return f},l}();n.default=o},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var m in v)v.hasOwnProperty(m)&&(c[m]=v[m])};return function(c,v){d(c,v);function m(){this.constructor=c}c.prototype=v===null?Object.create(v):(m.prototype=v.prototype,new m)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,p=function(d){o(c,d);function c(v){var m=d.call(this,v)||this;return m.scroll=m,m.observer=new MutationObserver(function(y){m.update(y)}),m.observer.observe(m.domNode,f),m.attach(),m}return c.prototype.detach=function(){d.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,m){this.update(),v===0&&m===this.length()?this.children.forEach(function(y){y.remove()}):d.prototype.deleteAt.call(this,v,m)},c.prototype.formatAt=function(v,m,y,b){this.update(),d.prototype.formatAt.call(this,v,m,y,b)},c.prototype.insertAt=function(v,m,y){this.update(),d.prototype.insertAt.call(this,v,m,y)},c.prototype.optimize=function(v,m){var y=this;v===void 0&&(v=[]),m===void 0&&(m={}),d.prototype.optimize.call(this,m);for(var b=[].slice.call(this.observer.takeRecords());b.length>0;)v.push(b.pop());for(var _=function(S,I){I===void 0&&(I=!0),!(S==null||S===y)&&S.domNode.parentNode!=null&&(S.domNode[u.DATA_KEY].mutations==null&&(S.domNode[u.DATA_KEY].mutations=[]),I&&_(S.parent))},w=function(S){S.domNode[u.DATA_KEY]==null||S.domNode[u.DATA_KEY].mutations==null||(S instanceof l.default&&S.children.forEach(w),S.optimize(m))},T=v,x=0;T.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(T.forEach(function(S){var I=u.find(S.target,!0);I!=null&&(I.domNode===S.target&&(S.type==="childList"?(_(u.find(S.previousSibling,!1)),[].forEach.call(S.addedNodes,function(A){var O=u.find(A,!1);_(O,!1),O instanceof l.default&&O.children.forEach(function(L){_(L,!1)})})):S.type==="attributes"&&_(I.prev)),_(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,m){var y=this;m===void 0&&(m={}),v=v||this.observer.takeRecords(),v.map(function(b){var _=u.find(b.target,!0);return _==null?null:_.domNode[u.DATA_KEY].mutations==null?(_.domNode[u.DATA_KEY].mutations=[b],_):(_.domNode[u.DATA_KEY].mutations.push(b),null)}).forEach(function(b){b==null||b===y||b.domNode[u.DATA_KEY]==null||b.update(b.domNode[u.DATA_KEY].mutations||[],m)}),this.domNode[u.DATA_KEY].mutations!=null&&d.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,m),this.optimize(v,m)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(l.default);n.default=p},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var v in c)c.hasOwnProperty(v)&&(d[v]=c[v])};return function(d,c){p(d,c);function v(){this.constructor=d}d.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(18),u=i(1);function f(p,d){if(Object.keys(p).length!==Object.keys(d).length)return!1;for(var c in p)if(p[c]!==d[c])return!1;return!0}var h=function(p){o(d,p);function d(){return p!==null&&p.apply(this,arguments)||this}return d.formats=function(c){if(c.tagName!==d.tagName)return p.formats.call(this,c)},d.prototype.format=function(c,v){var m=this;c===this.statics.blotName&&!v?(this.children.forEach(function(y){y instanceof l.default||(y=y.wrap(d.blotName,!0)),m.attributes.copy(y)}),this.unwrap()):p.prototype.format.call(this,c,v)},d.prototype.formatAt=function(c,v,m,y){if(this.formats()[m]!=null||u.query(m,u.Scope.ATTRIBUTE)){var b=this.isolate(c,v);b.format(m,y)}else p.prototype.formatAt.call(this,c,v,m,y)},d.prototype.optimize=function(c){p.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var m=this.next;m instanceof d&&m.prev===this&&f(v,m.formats())&&(m.moveChildren(this),m.remove())},d.blotName="inline",d.scope=u.Scope.INLINE_BLOT,d.tagName="SPAN",d}(l.default);n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(18),u=i(1),f=function(h){o(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.formats=function(d){var c=u.query(p.blotName).tagName;if(d.tagName!==c)return h.formats.call(this,d)},p.prototype.format=function(d,c){u.query(d,u.Scope.BLOCK)!=null&&(d===this.statics.blotName&&!c?this.replaceWith(p.blotName):h.prototype.format.call(this,d,c))},p.prototype.formatAt=function(d,c,v,m){u.query(v,u.Scope.BLOCK)!=null?this.format(v,m):h.prototype.formatAt.call(this,d,c,v,m)},p.prototype.insertAt=function(d,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,d,c,v);else{var m=this.split(d),y=u.create(c,v);m.parent.insertBefore(y,m)}},p.prototype.update=function(d,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,d,c)},p.blotName="block",p.scope=u.Scope.BLOCK_BLOT,p.tagName="P",p}(l.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var d in p)p.hasOwnProperty(d)&&(h[d]=p[d])};return function(h,p){f(h,p);function d(){this.constructor=h}h.prototype=p===null?Object.create(p):(d.prototype=p.prototype,new d)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(19),u=function(f){o(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(p){},h.prototype.format=function(p,d){f.prototype.formatAt.call(this,0,this.length(),p,d)},h.prototype.formatAt=function(p,d,c,v){p===0&&d===this.length()?this.format(c,v):f.prototype.formatAt.call(this,p,d,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(l.default);n.default=u},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(19),u=i(1),f=function(h){o(p,h);function p(d){var c=h.call(this,d)||this;return c.text=c.statics.value(c.domNode),c}return p.create=function(d){return document.createTextNode(d)},p.value=function(d){var c=d.data;return c.normalize&&(c=c.normalize()),c},p.prototype.deleteAt=function(d,c){this.domNode.data=this.text=this.text.slice(0,d)+this.text.slice(d+c)},p.prototype.index=function(d,c){return this.domNode===d?c:-1},p.prototype.insertAt=function(d,c,v){v==null?(this.text=this.text.slice(0,d)+c+this.text.slice(d),this.domNode.data=this.text):h.prototype.insertAt.call(this,d,c,v)},p.prototype.length=function(){return this.text.length},p.prototype.optimize=function(d){h.prototype.optimize.call(this,d),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof p&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},p.prototype.position=function(d,c){return[this.domNode,d]},p.prototype.split=function(d,c){if(c===void 0&&(c=!1),!c){if(d===0)return this;if(d===this.length())return this.next}var v=u.create(this.domNode.splitText(d));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},p.prototype.update=function(d,c){var v=this;d.some(function(m){return m.type==="characterData"&&m.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},p.prototype.value=function(){return this.text},p.blotName="text",p.scope=u.Scope.INLINE_BLOT,p}(l.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 l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:l.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 p=h.indexOf(u,f);return p!==-1&&p===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),p=h.length>>>0,d=arguments[1],c,v=0;v<p;v++)if(c=h[v],f.call(d,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,l=0;function u(x,S,I){if(x==S)return x?[[l,x]]:[];(I<0||x.length<I)&&(I=null);var A=d(x,S),O=x.substring(0,A);x=x.substring(A),S=S.substring(A),A=c(x,S);var L=x.substring(x.length-A);x=x.substring(0,x.length-A),S=S.substring(0,S.length-A);var R=f(x,S);return O&&R.unshift([l,O]),L&&R.push([l,L]),m(R),I!=null&&(R=_(R,I)),R=w(R),R}function f(x,S){var I;if(!x)return[[o,S]];if(!S)return[[i,x]];var A=x.length>S.length?x:S,O=x.length>S.length?S:x,L=A.indexOf(O);if(L!=-1)return I=[[o,A.substring(0,L)],[l,O],[o,A.substring(L+O.length)]],x.length>S.length&&(I[0][0]=I[2][0]=i),I;if(O.length==1)return[[i,x],[o,S]];var R=v(x,S);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([[l,q]],z)}return h(x,S)}function h(x,S){for(var I=x.length,A=S.length,O=Math.ceil((I+A)/2),L=O,R=2*O,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-A,q=F%2!=0,Z=0,z=0,nt=0,W=0,D=0;D<O;D++){for(var k=-D+Z;k<=D-z;k+=2){var j=L+k,G;k==-D||k!=D&&C[j-1]<C[j+1]?G=C[j+1]:G=C[j-1]+1;for(var Y=G-k;G<I&&Y<A&&x.charAt(G)==S.charAt(Y);)G++,Y++;if(C[j]=G,G>I)z+=2;else if(Y>A)Z+=2;else if(q){var X=L+F-k;if(X>=0&&X<R&&P[X]!=-1){var $=I-P[X];if(G>=$)return p(x,S,G,Y)}}}for(var V=-D+nt;V<=D-W;V+=2){var X=L+V,$;V==-D||V!=D&&P[X-1]<P[X+1]?$=P[X+1]:$=P[X-1]+1;for(var tt=$-V;$<I&&tt<A&&x.charAt(I-$-1)==S.charAt(A-tt-1);)$++,tt++;if(P[X]=$,$>I)W+=2;else if(tt>A)nt+=2;else if(!q){var j=L+F-V;if(j>=0&&j<R&&C[j]!=-1){var G=C[j],Y=L+G-j;if($=I-$,G>=$)return p(x,S,G,Y)}}}}return[[i,x],[o,S]]}function p(x,S,I,A){var O=x.substring(0,I),L=S.substring(0,A),R=x.substring(I),C=S.substring(A),P=u(O,L),M=u(R,C);return P.concat(M)}function d(x,S){if(!x||!S||x.charAt(0)!=S.charAt(0))return 0;for(var I=0,A=Math.min(x.length,S.length),O=A,L=0;I<O;)x.substring(L,O)==S.substring(L,O)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function c(x,S){if(!x||!S||x.charAt(x.length-1)!=S.charAt(S.length-1))return 0;for(var I=0,A=Math.min(x.length,S.length),O=A,L=0;I<O;)x.substring(x.length-O,x.length-L)==S.substring(S.length-O,S.length-L)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function v(x,S){var I=x.length>S.length?x:S,A=x.length>S.length?S:x;if(I.length<4||A.length*2<I.length)return null;function O(z,nt,W){for(var D=z.substring(W,W+Math.floor(z.length/4)),k=-1,j="",G,Y,X,$;(k=nt.indexOf(D,k+1))!=-1;){var V=d(z.substring(W),nt.substring(k)),tt=c(z.substring(0,W),nt.substring(0,k));j.length<tt+V&&(j=nt.substring(k-tt,k)+nt.substring(k,k+V),G=z.substring(0,W-tt),Y=z.substring(W+V),X=nt.substring(0,k-tt),$=nt.substring(k+V))}return j.length*2>=z.length?[G,Y,X,$,j]:null}var L=O(I,A,Math.ceil(I.length/4)),R=O(I,A,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>S.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 m(x){x.push([l,""]);for(var S=0,I=0,A=0,O="",L="",R;S<x.length;)switch(x[S][0]){case o:A++,L+=x[S][1],S++;break;case i:I++,O+=x[S][1],S++;break;case l:I+A>1?(I!==0&&A!==0&&(R=d(L,O),R!==0&&(S-I-A>0&&x[S-I-A-1][0]==l?x[S-I-A-1][1]+=L.substring(0,R):(x.splice(0,0,[l,L.substring(0,R)]),S++),L=L.substring(R),O=O.substring(R)),R=c(L,O),R!==0&&(x[S][1]=L.substring(L.length-R)+x[S][1],L=L.substring(0,L.length-R),O=O.substring(0,O.length-R))),I===0?x.splice(S-A,I+A,[o,L]):A===0?x.splice(S-I,I+A,[i,O]):x.splice(S-I-A,I+A,[i,O],[o,L]),S=S-I-A+(I?1:0)+(A?1:0)+1):S!==0&&x[S-1][0]==l?(x[S-1][1]+=x[S][1],x.splice(S,1)):S++,A=0,I=0,O="",L="";break}x[x.length-1][1]===""&&x.pop();var C=!1;for(S=1;S<x.length-1;)x[S-1][0]==l&&x[S+1][0]==l&&(x[S][1].substring(x[S][1].length-x[S-1][1].length)==x[S-1][1]?(x[S][1]=x[S-1][1]+x[S][1].substring(0,x[S][1].length-x[S-1][1].length),x[S+1][1]=x[S-1][1]+x[S+1][1],x.splice(S-1,1),C=!0):x[S][1].substring(0,x[S+1][1].length)==x[S+1][1]&&(x[S-1][1]+=x[S+1][1],x[S][1]=x[S][1].substring(x[S+1][1].length)+x[S+1][1],x.splice(S+1,1),C=!0)),S++;C&&m(x)}var y=u;y.INSERT=o,y.DELETE=i,y.EQUAL=l,r.exports=y;function b(x,S){if(S===0)return[l,x];for(var I=0,A=0;A<x.length;A++){var O=x[A];if(O[0]===i||O[0]===l){var L=I+O[1].length;if(S===L)return[A+1,x];if(S<L){x=x.slice();var R=S-I,C=[O[0],O[1].slice(0,R)],P=[O[0],O[1].slice(R)];return x.splice(A,1,C,P),[A+1,x]}else I=L}}throw new Error("cursor_pos is out of bounds!")}function _(x,S){var I=b(x,S),A=I[1],O=I[0],L=A[O],R=A[O+1];if(L==null)return x;if(L[0]!==l)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return A.splice(O,2,R,L),T(A,O,2);if(R!=null&&R[1].indexOf(L[1])===0){A.splice(O,2,[R[0],L[1]],[0,L[1]]);var C=R[1].slice(L[1].length);return C.length>0&&A.splice(O+2,0,[R[0],C]),T(A,O,3)}else return x}function w(x){for(var S=!1,I=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},A=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},O=2;O<x.length;O+=1)x[O-2][0]===l&&A(x[O-2][1])&&x[O-1][0]===i&&I(x[O-1][1])&&x[O][0]===o&&I(x[O][1])&&(S=!0,x[O-1][1]=x[O-2][1].slice(-1)+x[O-1][1],x[O][1]=x[O-2][1].slice(-1)+x[O][1],x[O-2][1]=x[O-2][1].slice(0,-1));if(!S)return x;for(var L=[],O=0;O<x.length;O+=1)x[O][1].length>0&&L.push(x[O]);return L}function T(x,S,I){for(var A=S+I-1;A>=0&&A>=S-1;A--)if(A+1<x.length){var O=x[A],L=x[A+1];O[0]===L[1]&&x.splice(A,2,[O[0],O[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 l=[];for(var u in o)l.push(u);return l}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?o:l,n.supported=o;function o(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=l;function l(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 l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(o=!1));function u(h,p,d){this.fn=h,this.context=p,this.once=d||!1}function f(){this._events=new l,this._eventsCount=0}f.prototype.eventNames=function(){var p=[],d,c;if(this._eventsCount===0)return p;for(c in d=this._events)i.call(d,c)&&p.push(o?c.slice(1):c);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(d)):p},f.prototype.listeners=function(p,d){var c=o?o+p:p,v=this._events[c];if(d)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var m=0,y=v.length,b=new Array(y);m<y;m++)b[m]=v[m].fn;return b},f.prototype.emit=function(p,d,c,v,m,y){var b=o?o+p:p;if(!this._events[b])return!1;var _=this._events[b],w=arguments.length,T,x;if(_.fn){switch(_.once&&this.removeListener(p,_.fn,void 0,!0),w){case 1:return _.fn.call(_.context),!0;case 2:return _.fn.call(_.context,d),!0;case 3:return _.fn.call(_.context,d,c),!0;case 4:return _.fn.call(_.context,d,c,v),!0;case 5:return _.fn.call(_.context,d,c,v,m),!0;case 6:return _.fn.call(_.context,d,c,v,m,y),!0}for(x=1,T=new Array(w-1);x<w;x++)T[x-1]=arguments[x];_.fn.apply(_.context,T)}else{var S=_.length,I;for(x=0;x<S;x++)switch(_[x].once&&this.removeListener(p,_[x].fn,void 0,!0),w){case 1:_[x].fn.call(_[x].context);break;case 2:_[x].fn.call(_[x].context,d);break;case 3:_[x].fn.call(_[x].context,d,c);break;case 4:_[x].fn.call(_[x].context,d,c,v);break;default:if(!T)for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];_[x].fn.apply(_[x].context,T)}}return!0},f.prototype.on=function(p,d,c){var v=new u(d,c||this),m=o?o+p:p;return this._events[m]?this._events[m].fn?this._events[m]=[this._events[m],v]:this._events[m].push(v):(this._events[m]=v,this._eventsCount++),this},f.prototype.once=function(p,d,c){var v=new u(d,c||this,!0),m=o?o+p:p;return this._events[m]?this._events[m].fn?this._events[m]=[this._events[m],v]:this._events[m].push(v):(this._events[m]=v,this._eventsCount++),this},f.prototype.removeListener=function(p,d,c,v){var m=o?o+p:p;if(!this._events[m])return this;if(!d)return--this._eventsCount===0?this._events=new l:delete this._events[m],this;var y=this._events[m];if(y.fn)y.fn===d&&(!v||y.once)&&(!c||y.context===c)&&(--this._eventsCount===0?this._events=new l:delete this._events[m]);else{for(var b=0,_=[],w=y.length;b<w;b++)(y[b].fn!==d||v&&!y[b].once||c&&y[b].context!==c)&&_.push(y[b]);_.length?this._events[m]=_.length===1?_[0]:_:--this._eventsCount===0?this._events=new l:delete this._events[m]}return this},f.prototype.removeAllListeners=function(p){var d;return p?(d=o?o+p:p,this._events[d]&&(--this._eventsCount===0?this._events=new l:delete this._events[d])):(this._events=new l,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(rt){return typeof rt}:function(rt){return rt&&typeof Symbol=="function"&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt},l=function(){function rt(lt,pt){var vt=[],ct=!0,Pt=!1,Ft=void 0;try{for(var Nt=lt[Symbol.iterator](),He;!(ct=(He=Nt.next()).done)&&(vt.push(He.value),!(pt&&vt.length===pt));ct=!0);}catch(Ge){Pt=!0,Ft=Ge}finally{try{!ct&&Nt.return&&Nt.return()}finally{if(Pt)throw Ft}}return vt}return function(lt,pt){if(Array.isArray(lt))return lt;if(Symbol.iterator in Object(lt))return rt(lt,pt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function rt(lt,pt){for(var vt=0;vt<pt.length;vt++){var ct=pt[vt];ct.enumerable=ct.enumerable||!1,ct.configurable=!0,"value"in ct&&(ct.writable=!0),Object.defineProperty(lt,ct.key,ct)}}return function(lt,pt,vt){return pt&&rt(lt.prototype,pt),vt&&rt(lt,vt),lt}}(),f=i(3),h=P(f),p=i(2),d=P(p),c=i(0),v=P(c),m=i(5),y=P(m),b=i(10),_=P(b),w=i(9),T=P(w),x=i(36),S=i(37),I=i(13),A=P(I),O=i(26),L=i(38),R=i(39),C=i(40);function P(rt){return rt&&rt.__esModule?rt:{default:rt}}function M(rt,lt,pt){return lt in rt?Object.defineProperty(rt,lt,{value:pt,enumerable:!0,configurable:!0,writable:!0}):rt[lt]=pt,rt}function F(rt,lt){if(!(rt instanceof lt))throw new TypeError("Cannot call a class as a function")}function q(rt,lt){if(!rt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return lt&&(typeof lt=="object"||typeof lt=="function")?lt:rt}function Z(rt,lt){if(typeof lt!="function"&&lt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof lt);rt.prototype=Object.create(lt&&lt.prototype,{constructor:{value:rt,enumerable:!1,writable:!0,configurable:!0}}),lt&&(Object.setPrototypeOf?Object.setPrototypeOf(rt,lt):rt.__proto__=lt)}var z=(0,_.default)("quill:clipboard"),nt="__ql-matcher",W=[[Node.TEXT_NODE,Lt],[Node.TEXT_NODE,yt],["br",st],[Node.ELEMENT_NODE,yt],[Node.ELEMENT_NODE,it],[Node.ELEMENT_NODE,Tt],[Node.ELEMENT_NODE,et],[Node.ELEMENT_NODE,te],["li",gt],["b",tt.bind(tt,"bold")],["i",tt.bind(tt,"italic")],["style",dt]],D=[x.AlignAttribute,L.DirectionAttribute].reduce(function(rt,lt){return rt[lt.keyName]=lt,rt},{}),k=[x.AlignStyle,S.BackgroundStyle,O.ColorStyle,L.DirectionStyle,R.FontStyle,C.SizeStyle].reduce(function(rt,lt){return rt[lt.keyName]=lt,rt},{}),j=function(rt){Z(lt,rt);function lt(pt,vt){F(this,lt);var ct=q(this,(lt.__proto__||Object.getPrototypeOf(lt)).call(this,pt,vt));return ct.quill.root.addEventListener("paste",ct.onPaste.bind(ct)),ct.container=ct.quill.addContainer("ql-clipboard"),ct.container.setAttribute("contenteditable",!0),ct.container.setAttribute("tabindex",-1),ct.matchers=[],W.concat(ct.options.matchers).forEach(function(Pt){var Ft=l(Pt,2),Nt=Ft[0],He=Ft[1];!vt.matchVisual&&He===Tt||ct.addMatcher(Nt,He)}),ct}return u(lt,[{key:"addMatcher",value:function(vt,ct){this.matchers.push([vt,ct])}},{key:"convert",value:function(vt){if(typeof vt=="string")return this.container.innerHTML=vt.replace(/\>\r?\n +\</g,"><"),this.convert();var ct=this.quill.getFormat(this.quill.selection.savedRange.index);if(ct[A.default.blotName]){var Pt=this.container.innerText;return this.container.innerHTML="",new d.default().insert(Pt,M({},A.default.blotName,ct[A.default.blotName]))}var Ft=this.prepareMatching(),Nt=l(Ft,2),He=Nt[0],Ge=Nt[1],Zt=V(this.container,He,Ge);return X(Zt,`
1981
- `)&&Zt.ops[Zt.ops.length-1].attributes==null&&(Zt=Zt.compose(new d.default().retain(Zt.length()-1).delete(1))),z.log("convert",this.container.innerHTML,Zt),this.container.innerHTML="",Zt}},{key:"dangerouslyPasteHTML",value:function(vt,ct){var Pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof vt=="string")this.quill.setContents(this.convert(vt),ct),this.quill.setSelection(0,y.default.sources.SILENT);else{var Ft=this.convert(ct);this.quill.updateContents(new d.default().retain(vt).concat(Ft),Pt),this.quill.setSelection(vt+Ft.length(),y.default.sources.SILENT)}}},{key:"onPaste",value:function(vt){var ct=this;if(!(vt.defaultPrevented||!this.quill.isEnabled())){var Pt=this.quill.getSelection(),Ft=new d.default().retain(Pt.index),Nt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(y.default.sources.SILENT),setTimeout(function(){Ft=Ft.concat(ct.convert()).delete(Pt.length),ct.quill.updateContents(Ft,y.default.sources.USER),ct.quill.setSelection(Ft.length()-Pt.length,y.default.sources.SILENT),ct.quill.scrollingContainer.scrollTop=Nt,ct.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var vt=this,ct=[],Pt=[];return this.matchers.forEach(function(Ft){var Nt=l(Ft,2),He=Nt[0],Ge=Nt[1];switch(He){case Node.TEXT_NODE:Pt.push(Ge);break;case Node.ELEMENT_NODE:ct.push(Ge);break;default:[].forEach.call(vt.container.querySelectorAll(He),function(Zt){Zt[nt]=Zt[nt]||[],Zt[nt].push(Ge)});break}}),[ct,Pt]}}]),lt}(T.default);j.DEFAULTS={matchers:[],matchVisual:!0};function G(rt,lt,pt){return(typeof lt>"u"?"undefined":o(lt))==="object"?Object.keys(lt).reduce(function(vt,ct){return G(vt,ct,lt[ct])},rt):rt.reduce(function(vt,ct){return ct.attributes&&ct.attributes[lt]?vt.push(ct):vt.insert(ct.insert,(0,h.default)({},M({},lt,pt),ct.attributes))},new d.default)}function Y(rt){if(rt.nodeType!==Node.ELEMENT_NODE)return{};var lt="__ql-computed-style";return rt[lt]||(rt[lt]=window.getComputedStyle(rt))}function X(rt,lt){for(var pt="",vt=rt.ops.length-1;vt>=0&&pt.length<lt.length;--vt){var ct=rt.ops[vt];if(typeof ct.insert!="string")break;pt=ct.insert+pt}return pt.slice(-1*lt.length)===lt}function $(rt){if(rt.childNodes.length===0)return!1;var lt=Y(rt);return["block","list-item"].indexOf(lt.display)>-1}function V(rt,lt,pt){return rt.nodeType===rt.TEXT_NODE?pt.reduce(function(vt,ct){return ct(rt,vt)},new d.default):rt.nodeType===rt.ELEMENT_NODE?[].reduce.call(rt.childNodes||[],function(vt,ct){var Pt=V(ct,lt,pt);return ct.nodeType===rt.ELEMENT_NODE&&(Pt=lt.reduce(function(Ft,Nt){return Nt(ct,Ft)},Pt),Pt=(ct[nt]||[]).reduce(function(Ft,Nt){return Nt(ct,Ft)},Pt)),vt.concat(Pt)},new d.default):new d.default}function tt(rt,lt,pt){return G(pt,rt,!0)}function et(rt,lt){var pt=v.default.Attributor.Attribute.keys(rt),vt=v.default.Attributor.Class.keys(rt),ct=v.default.Attributor.Style.keys(rt),Pt={};return pt.concat(vt).concat(ct).forEach(function(Ft){var Nt=v.default.query(Ft,v.default.Scope.ATTRIBUTE);Nt!=null&&(Pt[Nt.attrName]=Nt.value(rt),Pt[Nt.attrName])||(Nt=D[Ft],Nt!=null&&(Nt.attrName===Ft||Nt.keyName===Ft)&&(Pt[Nt.attrName]=Nt.value(rt)||void 0),Nt=k[Ft],Nt!=null&&(Nt.attrName===Ft||Nt.keyName===Ft)&&(Nt=k[Ft],Pt[Nt.attrName]=Nt.value(rt)||void 0))}),Object.keys(Pt).length>0&&(lt=G(lt,Pt)),lt}function it(rt,lt){var pt=v.default.query(rt);if(pt==null)return lt;if(pt.prototype instanceof v.default.Embed){var vt={},ct=pt.value(rt);ct!=null&&(vt[pt.blotName]=ct,lt=new d.default().insert(vt,pt.formats(rt)))}else typeof pt.formats=="function"&&(lt=G(lt,pt.blotName,pt.formats(rt)));return lt}function st(rt,lt){return X(lt,`
1985
+ `);return D.insert(G,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 O(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 O(L,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function O(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&&O(L.prototype,R),C&&O(L,C),L}}(),u=i(0),f=b(u),h=i(21),p=b(h),d=i(11),c=b(d),v=i(8),m=b(v),y=i(10),_=b(y);function b(O){return O&&O.__esModule?O:{default:O}}function w(O){if(Array.isArray(O)){for(var L=0,R=Array(O.length);L<O.length;L++)R[L]=O[L];return R}else return Array.from(O)}function T(O,L){if(!(O instanceof L))throw new TypeError("Cannot call a class as a function")}var x=(0,_.default)("quill:selection"),S=function O(L){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;T(this,O),this.index=L,this.length=R},I=function(){function O(L,R){var C=this;T(this,O),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 S(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){C.mouseDown||setTimeout(C.update.bind(C,m.default.sources.USER),1)}),this.emitter.on(m.default.events.EDITOR_CHANGE,function(P,M){P===m.default.events.TEXT_CHANGE&&M.length()>0&&C.update(m.default.sources.SILENT)}),this.emitter.on(m.default.events.SCROLL_BEFORE_UPDATE,function(){if(C.hasFocus()){var P=C.getNativeRange();P!=null&&P.start.node!==C.cursor.textNode&&C.emitter.once(m.default.events.SCROLL_UPDATE,function(){try{C.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(m.default.events.SCROLL_OPTIMIZE,function(P,M){if(M.range){var F=M.range,q=F.startNode,Z=F.startOffset,z=F.endNode,it=F.endOffset;C.setNativeRange(q,Z,z,it)}}),this.update(m.default.sources.SILENT)}return l(O,[{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(m.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 it=Z.position(z,!0),W=o(it,2);M=W[0],z=W[1];var D=document.createRange();if(C>0){D.setStart(M,z);var k=this.scroll.leaf(R+C),j=o(k,2);if(Z=j[0],z=j[1],Z==null)return null;var G=Z.position(z,!0),Y=o(G,2);return M=Y[0],z=Y[1],D.setEnd(M,z),D.getBoundingClientRect()}else{var X="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),X="right"),$=D.getBoundingClientRect()):($=Z.domNode.getBoundingClientRect(),z>0&&(X="right")),{bottom:$.top+$.height,height:$.height,left:$[X],right:$[X],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),it=z[0],W=z[1],D=f.default.find(it,!0),k=D.offset(C.scroll);return W===0?k:D instanceof f.default.Container?k+D.length():k+D.index(it,W)}),F=Math.min(Math.max.apply(Math,w(M)),this.scroll.length()-1),q=Math.min.apply(Math,[F].concat(w(M)));return new S(q,F-q)}},{key:"normalizeNative",value:function(R){if(!A(this.root,R.startContainer)||!R.collapsed&&!A(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,it=C.scroll.leaf(q),W=o(it,2),D=W[0],k=W[1],j=D.position(k,Z!==0),G=o(j,2);z=G[0],k=G[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 it=this.scroll.line(Math.min(C.index+C.length,M)),W=o(it,1);z=W[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]:m.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]:m.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=[m.default.events.SELECTION_CHANGE,(0,p.default)(this.lastRange),(0,p.default)(C),R];if((Z=this.emitter).emit.apply(Z,[m.default.events.EDITOR_CHANGE].concat(z)),R!==m.default.sources.SILENT){var it;(it=this.emitter).emit.apply(it,z)}}}}]),O}();function A(O,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),O.contains(L)}n.Range=S,n.default=I},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(y,_){for(var b=0;b<_.length;b++){var w=_[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,_,b){return _&&m(y.prototype,_),b&&m(y,b),y}}(),l=function m(y,_,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,_);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,_,b)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(b)}},u=i(0),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(){return p(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,[{key:"insertInto",value:function(b,w){b.children.length===0?l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"insertInto",this).call(this,b,w):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),y}(f.default.Embed);v.blotName="break",v.tagName="BR",n.default=v},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var m in v)v.hasOwnProperty(m)&&(c[m]=v[m])};return function(c,v){d(c,v);function m(){this.constructor=c}c.prototype=v===null?Object.create(v):(m.prototype=v.prototype,new m)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(44),u=i(30),f=i(1),h=function(d){o(c,d);function c(v){var m=d.call(this,v)||this;return m.build(),m}return c.prototype.appendChild=function(v){this.insertBefore(v)},c.prototype.attach=function(){d.prototype.attach.call(this),this.children.forEach(function(v){v.attach()})},c.prototype.build=function(){var v=this;this.children=new l.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(m){try{var y=p(m);v.insertBefore(y,v.children.head||void 0)}catch(_){if(_ instanceof f.ParchmentError)return;throw _}})},c.prototype.deleteAt=function(v,m){if(v===0&&m===this.length())return this.remove();this.children.forEachAt(v,m,function(y,_,b){y.deleteAt(_,b)})},c.prototype.descendant=function(v,m){var y=this.children.find(m),_=y[0],b=y[1];return v.blotName==null&&v(_)||v.blotName!=null&&_ instanceof v?[_,b]:_ instanceof c?_.descendant(v,b):[null,-1]},c.prototype.descendants=function(v,m,y){m===void 0&&(m=0),y===void 0&&(y=Number.MAX_VALUE);var _=[],b=y;return this.children.forEachAt(m,y,function(w,T,x){(v.blotName==null&&v(w)||v.blotName!=null&&w instanceof v)&&_.push(w),w instanceof c&&(_=_.concat(w.descendants(v,T,b))),b-=x}),_},c.prototype.detach=function(){this.children.forEach(function(v){v.detach()}),d.prototype.detach.call(this)},c.prototype.formatAt=function(v,m,y,_){this.children.forEachAt(v,m,function(b,w,T){b.formatAt(w,T,y,_)})},c.prototype.insertAt=function(v,m,y){var _=this.children.find(v),b=_[0],w=_[1];if(b)b.insertAt(w,m,y);else{var T=y==null?f.create("text",m):f.create(m,y);this.appendChild(T)}},c.prototype.insertBefore=function(v,m){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(y){return v instanceof y}))throw new f.ParchmentError("Cannot insert "+v.statics.blotName+" into "+this.statics.blotName);v.insertInto(this,m)},c.prototype.length=function(){return this.children.reduce(function(v,m){return v+m.length()},0)},c.prototype.moveChildren=function(v,m){this.children.forEach(function(y){v.insertBefore(y,m)})},c.prototype.optimize=function(v){if(d.prototype.optimize.call(this,v),this.children.length===0)if(this.statics.defaultChild!=null){var m=f.create(this.statics.defaultChild);this.appendChild(m),m.optimize(v)}else this.remove()},c.prototype.path=function(v,m){m===void 0&&(m=!1);var y=this.children.find(v,m),_=y[0],b=y[1],w=[[this,v]];return _ instanceof c?w.concat(_.path(b,m)):(_!=null&&w.push([_,b]),w)},c.prototype.removeChild=function(v){this.children.remove(v)},c.prototype.replace=function(v){v instanceof c&&v.moveChildren(this),d.prototype.replace.call(this,v)},c.prototype.split=function(v,m){if(m===void 0&&(m=!1),!m){if(v===0)return this;if(v===this.length())return this.next}var y=this.clone();return this.parent.insertBefore(y,this.next),this.children.forEachAt(v,this.length(),function(_,b,w){_=_.split(b,m),y.appendChild(_)}),y},c.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},c.prototype.update=function(v,m){var y=this,_=[],b=[];v.forEach(function(w){w.target===y.domNode&&w.type==="childList"&&(_.push.apply(_,w.addedNodes),b.push.apply(b,w.removedNodes))}),b.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===y.domNode)&&T.detach()}}),_.filter(function(w){return w.parentNode==y.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=p(w);(x.next!=T||x.next==null)&&(x.parent!=null&&x.parent.removeChild(y),y.insertBefore(x,T||void 0))})},c}(u.default);function p(d){var c=f.find(d);if(c==null)try{c=f.create(d)}catch{c=f.create(f.Scope.INLINE),[].slice.call(d.childNodes).forEach(function(m){c.domNode.appendChild(m)}),d.parentNode&&d.parentNode.replaceChild(c.domNode,d),c.attach()}return c}n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var m in v)v.hasOwnProperty(m)&&(c[m]=v[m])};return function(c,v){d(c,v);function m(){this.constructor=c}c.prototype=v===null?Object.create(v):(m.prototype=v.prototype,new m)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12),u=i(31),f=i(17),h=i(1),p=function(d){o(c,d);function c(v){var m=d.call(this,v)||this;return m.attributes=new u.default(m.domNode),m}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,m){var y=h.query(v);y instanceof l.default?this.attributes.attribute(y,m):m&&y!=null&&(v!==this.statics.blotName||this.formats()[v]!==m)&&this.replaceWith(v,m)},c.prototype.formats=function(){var v=this.attributes.values(),m=this.statics.formats(this.domNode);return m!=null&&(v[this.statics.blotName]=m),v},c.prototype.replaceWith=function(v,m){var y=d.prototype.replaceWith.call(this,v,m);return this.attributes.copy(y),y},c.prototype.update=function(v,m){var y=this;d.prototype.update.call(this,v,m),v.some(function(_){return _.target===y.domNode&&_.type==="attributes"})&&this.attributes.build()},c.prototype.wrap=function(v,m){var y=d.prototype.wrap.call(this,v,m);return y instanceof c&&y.statics.scope===this.statics.scope&&this.attributes.move(y),y},c}(f.default);n.default=p},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(30),u=i(1),f=function(h){o(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.value=function(d){return!0},p.prototype.index=function(d,c){return this.domNode===d||this.domNode.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(c,1):-1},p.prototype.position=function(d,c){var v=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return d>0&&(v+=1),[this.parent.domNode,v]},p.prototype.value=function(){var d;return d={},d[this.statics.blotName]=this.statics.value(this.domNode)||!0,d},p.scope=u.Scope.INLINE_BLOT,p}(l.default);n.default=f},function(r,n,i){var o=i(11),l=i(3),u={attributes:{compose:function(h,p,d){typeof h!="object"&&(h={}),typeof p!="object"&&(p={});var c=l(!0,{},p);d||(c=Object.keys(c).reduce(function(m,y){return c[y]!=null&&(m[y]=c[y]),m},{}));for(var v in h)h[v]!==void 0&&p[v]===void 0&&(c[v]=h[v]);return Object.keys(c).length>0?c:void 0},diff:function(h,p){typeof h!="object"&&(h={}),typeof p!="object"&&(p={});var d=Object.keys(h).concat(Object.keys(p)).reduce(function(c,v){return o(h[v],p[v])||(c[v]=p[v]===void 0?null:p[v]),c},{});return Object.keys(d).length>0?d:void 0},transform:function(h,p,d){if(typeof h!="object")return p;if(typeof p=="object"){if(!d)return p;var c=Object.keys(p).reduce(function(v,m){return h[m]===void 0&&(v[m]=p[m]),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 p=this.ops[this.index];if(p){var d=this.offset,c=u.length(p);if(h>=c-d?(h=c-d,this.index+=1,this.offset=0):this.offset+=h,typeof p.delete=="number")return{delete:h};var v={};return p.attributes&&(v.attributes=p.attributes),typeof p.retain=="number"?v.retain=h:typeof p.insert=="string"?v.insert=p.insert.substr(d,h):v.insert=p.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,p=this.index,d=this.next(),c=this.ops.slice(this.index);return this.offset=h,this.index=p,[d].concat(c)}else return[]},r.exports=u},function(r,n){var i=function(){function o(y,_){return _!=null&&y instanceof _}var l;try{l=Map}catch{l=function(){}}var u;try{u=Set}catch{u=function(){}}var f;try{f=Promise}catch{f=function(){}}function h(y,_,b,w,T){typeof _=="object"&&(b=_.depth,w=_.prototype,T=_.includeNonEnumerable,_=_.circular);var x=[],S=[],I=typeof Buffer<"u";typeof _>"u"&&(_=!0),typeof b>"u"&&(b=1/0);function A(O,L){if(O===null)return null;if(L===0)return O;var R,C;if(typeof O!="object")return O;if(o(O,l))R=new l;else if(o(O,u))R=new u;else if(o(O,f))R=new f(function(D,k){O.then(function(j){D(A(j,L-1))},function(j){k(A(j,L-1))})});else if(h.__isArray(O))R=[];else if(h.__isRegExp(O))R=new RegExp(O.source,m(O)),O.lastIndex&&(R.lastIndex=O.lastIndex);else if(h.__isDate(O))R=new Date(O.getTime());else{if(I&&Buffer.isBuffer(O))return Buffer.allocUnsafe?R=Buffer.allocUnsafe(O.length):R=new Buffer(O.length),O.copy(R),R;o(O,Error)?R=Object.create(O):typeof w>"u"?(C=Object.getPrototypeOf(O),R=Object.create(C)):(R=Object.create(w),C=w)}if(_){var P=x.indexOf(O);if(P!=-1)return S[P];x.push(O),S.push(R)}o(O,l)&&O.forEach(function(D,k){var j=A(k,L-1),G=A(D,L-1);R.set(j,G)}),o(O,u)&&O.forEach(function(D){var k=A(D,L-1);R.add(k)});for(var M in O){var F;C&&(F=Object.getOwnPropertyDescriptor(C,M)),!(F&&F.set==null)&&(R[M]=A(O[M],L-1))}if(Object.getOwnPropertySymbols)for(var q=Object.getOwnPropertySymbols(O),M=0;M<q.length;M++){var Z=q[M],z=Object.getOwnPropertyDescriptor(O,Z);z&&!z.enumerable&&!T||(R[Z]=A(O[Z],L-1),z.enumerable||Object.defineProperty(R,Z,{enumerable:!1}))}if(T)for(var it=Object.getOwnPropertyNames(O),M=0;M<it.length;M++){var W=it[M],z=Object.getOwnPropertyDescriptor(O,W);z&&z.enumerable||(R[W]=A(O[W],L-1),Object.defineProperty(R,W,{enumerable:!1}))}return R}return A(y,b)}h.clonePrototype=function(_){if(_===null)return null;var b=function(){};return b.prototype=_,new b};function p(y){return Object.prototype.toString.call(y)}h.__objToStr=p;function d(y){return typeof y=="object"&&p(y)==="[object Date]"}h.__isDate=d;function c(y){return typeof y=="object"&&p(y)==="[object Array]"}h.__isArray=c;function v(y){return typeof y=="object"&&p(y)==="[object RegExp]"}h.__isRegExp=v;function m(y){var _="";return y.global&&(_+="g"),y.ignoreCase&&(_+="i"),y.multiline&&(_+="m"),_}return h.__getRegExpFlags=m,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](),it;!(F=(it=z.next()).done)&&(M.push(it.value),!(P&&M.length===P));F=!0);}catch(W){q=!0,Z=W}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")}}(),l=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),p=i(8),d=x(p),c=i(4),v=x(c),m=i(16),y=x(m),_=i(13),b=x(_),w=i(25),T=x(w);function x(R){return R&&R.__esModule?R:{default:R}}function S(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 A(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 O(R){return R instanceof v.default||R instanceof c.BlockEmbed}var L=function(R){A(C,R);function C(P,M){S(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 l(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],it=Z[1],W=this.line(M+F),D=o(W,1),k=D[0];if(u(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"deleteAt",this).call(this,M,F),k!=null&&z!==k&&it>0){if(z instanceof c.BlockEmbed||k instanceof c.BlockEmbed){this.optimize();return}if(z instanceof b.default){var j=z.newlineIndex(z.length(),!0);if(j>-1&&(z=z.split(j+1),z===k)){this.optimize();return}}else if(k instanceof b.default){var G=k.newlineIndex(0);G>-1&&k.split(G+1)}var Y=k.children.head instanceof y.default?null:k.children.head;z.moveChildren(k,Y),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(O,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,it,W){var D=[],k=W;return z.children.forEachAt(it,W,function(j,G,Y){O(j)?D.push(j):j instanceof h.default.Container&&(D=D.concat(Z(j,G,k))),k-=Y}),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(d.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=d.default.sources.USER;typeof M=="string"&&(F=M),Array.isArray(M)||(M=this.observer.takeRecords()),M.length>0&&this.emitter.emit(d.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(d.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 $},l=function(){function $(V,tt){var et=[],rt=!0,ot=!1,ct=void 0;try{for(var gt=V[Symbol.iterator](),yt;!(rt=(yt=gt.next()).done)&&(et.push(yt.value),!(tt&&et.length===tt));rt=!0);}catch(St){ot=!0,ct=St}finally{try{!rt&&gt.return&&gt.return()}finally{if(ot)throw ct}}return et}return function(V,tt){if(Array.isArray(V))return V;if(Symbol.iterator in Object(V))return $(V,tt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function $(V,tt){for(var et=0;et<tt.length;et++){var rt=tt[et];rt.enumerable=rt.enumerable||!1,rt.configurable=!0,"value"in rt&&(rt.writable=!0),Object.defineProperty(V,rt.key,rt)}}return function(V,tt,et){return tt&&$(V.prototype,tt),et&&$(V,et),V}}(),f=i(21),h=R(f),p=i(11),d=R(p),c=i(3),v=R(c),m=i(2),y=R(m),_=i(20),b=R(_),w=i(0),T=R(w),x=i(5),S=R(x),I=i(10),A=R(I),O=i(9),L=R(O);function R($){return $&&$.__esModule?$:{default:$}}function C($,V,tt){return V in $?Object.defineProperty($,V,{value:tt,enumerable:!0,configurable:!0,writable:!0}):$[V]=tt,$}function P($,V){if(!($ instanceof V))throw new TypeError("Cannot call a class as a function")}function M($,V){if(!$)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V&&(typeof V=="object"||typeof V=="function")?V:$}function F($,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof V);$.prototype=Object.create(V&&V.prototype,{constructor:{value:$,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf($,V):$.__proto__=V)}var q=(0,A.default)("quill:keyboard"),Z=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",z=function($){F(V,$),u(V,null,[{key:"match",value:function(et,rt){return rt=X(rt),["altKey","ctrlKey","metaKey","shiftKey"].some(function(ot){return!!rt[ot]!==et[ot]&&rt[ot]!==null})?!1:rt.key===(et.which||et.keyCode)}}]);function V(tt,et){P(this,V);var rt=M(this,(V.__proto__||Object.getPrototypeOf(V)).call(this,tt,et));return rt.bindings={},Object.keys(rt.options.bindings).forEach(function(ot){ot==="list autofill"&&tt.scroll.whitelist!=null&&!tt.scroll.whitelist.list||rt.options.bindings[ot]&&rt.addBinding(rt.options.bindings[ot])}),rt.addBinding({key:V.keys.ENTER,shiftKey:null},j),rt.addBinding({key:V.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(rt.addBinding({key:V.keys.BACKSPACE},{collapsed:!0},W),rt.addBinding({key:V.keys.DELETE},{collapsed:!0},D)):(rt.addBinding({key:V.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},W),rt.addBinding({key:V.keys.DELETE},{collapsed:!0,suffix:/^.?$/},D)),rt.addBinding({key:V.keys.BACKSPACE},{collapsed:!1},k),rt.addBinding({key:V.keys.DELETE},{collapsed:!1},k),rt.addBinding({key:V.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},W),rt.listen(),rt}return u(V,[{key:"addBinding",value:function(et){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ct=X(et);if(ct==null||ct.key==null)return q.warn("Attempted to add invalid keyboard binding",ct);typeof rt=="function"&&(rt={handler:rt}),typeof ot=="function"&&(ot={handler:ot}),ct=(0,v.default)(ct,rt,ot),this.bindings[ct.key]=this.bindings[ct.key]||[],this.bindings[ct.key].push(ct)}},{key:"listen",value:function(){var et=this;this.quill.root.addEventListener("keydown",function(rt){if(!rt.defaultPrevented){var ot=rt.which||rt.keyCode,ct=(et.bindings[ot]||[]).filter(function(ce){return V.match(rt,ce)});if(ct.length!==0){var gt=et.quill.getSelection();if(!(gt==null||!et.quill.hasFocus())){var yt=et.quill.getLine(gt.index),St=l(yt,2),ee=St[0],Ut=St[1],nt=et.quill.getLeaf(gt.index),lt=l(nt,2),pt=lt[0],vt=lt[1],ht=gt.length===0?[pt,vt]:et.quill.getLeaf(gt.index+gt.length),Pt=l(ht,2),Lt=Pt[0],Nt=Pt[1],He=pt instanceof T.default.Text?pt.value().slice(0,vt):"",Ge=Lt instanceof T.default.Text?Lt.value().slice(Nt):"",Qt={collapsed:gt.length===0,empty:gt.length===0&&ee.length()<=1,format:et.quill.getFormat(gt),offset:Ut,prefix:He,suffix:Ge},Ss=ct.some(function(ce){if(ce.collapsed!=null&&ce.collapsed!==Qt.collapsed||ce.empty!=null&&ce.empty!==Qt.empty||ce.offset!=null&&ce.offset!==Qt.offset)return!1;if(Array.isArray(ce.format)){if(ce.format.every(function(lr){return Qt.format[lr]==null}))return!1}else if(o(ce.format)==="object"&&!Object.keys(ce.format).every(function(lr){return ce.format[lr]===!0?Qt.format[lr]!=null:ce.format[lr]===!1?Qt.format[lr]==null:(0,d.default)(ce.format[lr],Qt.format[lr])}))return!1;return ce.prefix!=null&&!ce.prefix.test(Qt.prefix)||ce.suffix!=null&&!ce.suffix.test(Qt.suffix)?!1:ce.handler.call(et,gt,Qt)!==!0});Ss&&rt.preventDefault()}}}})}}]),V}(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:Y("bold"),italic:Y("italic"),underline:Y("underline"),indent:{key:z.keys.TAB,format:["blockquote","indent","list"],handler:function(V,tt){if(tt.collapsed&&tt.offset!==0)return!0;this.quill.format("indent","+1",S.default.sources.USER)}},outdent:{key:z.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(V,tt){if(tt.collapsed&&tt.offset!==0)return!0;this.quill.format("indent","-1",S.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(V,tt){tt.format.indent!=null?this.quill.format("indent","-1",S.default.sources.USER):tt.format.list!=null&&this.quill.format("list",!1,S.default.sources.USER)}},"indent code-block":G(!0),"outdent code-block":G(!1),"remove tab":{key:z.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(V){this.quill.deleteText(V.index-1,1,S.default.sources.USER)}},tab:{key:z.keys.TAB,handler:function(V){this.quill.history.cutoff();var tt=new y.default().retain(V.index).delete(V.length).insert(" ");this.quill.updateContents(tt,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(V.index+1,S.default.sources.SILENT)}},"list empty enter":{key:z.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(V,tt){this.quill.format("list",!1,S.default.sources.USER),tt.format.indent&&this.quill.format("indent",!1,S.default.sources.USER)}},"checklist enter":{key:z.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(V){var tt=this.quill.getLine(V.index),et=l(tt,2),rt=et[0],ot=et[1],ct=(0,v.default)({},rt.formats(),{list:"checked"}),gt=new y.default().retain(V.index).insert(`
1987
+ `,ct).retain(rt.length()-ot-1).retain(1,{list:"unchecked"});this.quill.updateContents(gt,S.default.sources.USER),this.quill.setSelection(V.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:z.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(V,tt){var et=this.quill.getLine(V.index),rt=l(et,2),ot=rt[0],ct=rt[1],gt=new y.default().retain(V.index).insert(`
1988
+ `,tt.format).retain(ot.length()-ct-1).retain(1,{header:null});this.quill.updateContents(gt,S.default.sources.USER),this.quill.setSelection(V.index+1,S.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(V,tt){var et=tt.prefix.length,rt=this.quill.getLine(V.index),ot=l(rt,2),ct=ot[0],gt=ot[1];if(gt>et)return!0;var yt=void 0;switch(tt.prefix.trim()){case"[]":case"[ ]":yt="unchecked";break;case"[x]":yt="checked";break;case"-":case"*":yt="bullet";break;default:yt="ordered"}this.quill.insertText(V.index," ",S.default.sources.USER),this.quill.history.cutoff();var St=new y.default().retain(V.index-gt).delete(et+1).retain(ct.length()-2-gt).retain(1,{list:yt});this.quill.updateContents(St,S.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(V.index-et,S.default.sources.SILENT)}},"code exit":{key:z.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(V){var tt=this.quill.getLine(V.index),et=l(tt,2),rt=et[0],ot=et[1],ct=new y.default().retain(V.index+rt.length()-ot-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ct,S.default.sources.USER)}},"embed left":it(z.keys.LEFT,!1),"embed left shift":it(z.keys.LEFT,!0),"embed right":it(z.keys.RIGHT,!1),"embed right shift":it(z.keys.RIGHT,!0)}};function it($,V){var tt,et=$===z.keys.LEFT?"prefix":"suffix";return tt={key:$,shiftKey:V,altKey:null},C(tt,et,/^$/),C(tt,"handler",function(ot){var ct=ot.index;$===z.keys.RIGHT&&(ct+=ot.length+1);var gt=this.quill.getLeaf(ct),yt=l(gt,1),St=yt[0];return St instanceof T.default.Embed?($===z.keys.LEFT?V?this.quill.setSelection(ot.index-1,ot.length+1,S.default.sources.USER):this.quill.setSelection(ot.index-1,S.default.sources.USER):V?this.quill.setSelection(ot.index,ot.length+1,S.default.sources.USER):this.quill.setSelection(ot.index+ot.length+1,S.default.sources.USER),!1):!0}),tt}function W($,V){if(!($.index===0||this.quill.getLength()<=1)){var tt=this.quill.getLine($.index),et=l(tt,1),rt=et[0],ot={};if(V.offset===0){var ct=this.quill.getLine($.index-1),gt=l(ct,1),yt=gt[0];if(yt!=null&&yt.length()>1){var St=rt.formats(),ee=this.quill.getFormat($.index-1,1);ot=b.default.attributes.diff(St,ee)||{}}}var Ut=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(V.prefix)?2:1;this.quill.deleteText($.index-Ut,Ut,S.default.sources.USER),Object.keys(ot).length>0&&this.quill.formatLine($.index-Ut,Ut,ot,S.default.sources.USER),this.quill.focus()}}function D($,V){var tt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(V.suffix)?2:1;if(!($.index>=this.quill.getLength()-tt)){var et={},rt=0,ot=this.quill.getLine($.index),ct=l(ot,1),gt=ct[0];if(V.offset>=gt.length()-1){var yt=this.quill.getLine($.index+1),St=l(yt,1),ee=St[0];if(ee){var Ut=gt.formats(),nt=this.quill.getFormat($.index,1);et=b.default.attributes.diff(Ut,nt)||{},rt=ee.length()}}this.quill.deleteText($.index,tt,S.default.sources.USER),Object.keys(et).length>0&&this.quill.formatLine($.index+rt-1,tt,et,S.default.sources.USER)}}function k($){var V=this.quill.getLines($),tt={};if(V.length>1){var et=V[0].formats(),rt=V[V.length-1].formats();tt=b.default.attributes.diff(rt,et)||{}}this.quill.deleteText($,S.default.sources.USER),Object.keys(tt).length>0&&this.quill.formatLine($.index,1,tt,S.default.sources.USER),this.quill.setSelection($.index,S.default.sources.SILENT),this.quill.focus()}function j($,V){var tt=this;$.length>0&&this.quill.scroll.deleteAt($.index,$.length);var et=Object.keys(V.format).reduce(function(rt,ot){return T.default.query(ot,T.default.Scope.BLOCK)&&!Array.isArray(V.format[ot])&&(rt[ot]=V.format[ot]),rt},{});this.quill.insertText($.index,`
1989
+ `,et,S.default.sources.USER),this.quill.setSelection($.index+1,S.default.sources.SILENT),this.quill.focus(),Object.keys(V.format).forEach(function(rt){et[rt]==null&&(Array.isArray(V.format[rt])||rt!=="link"&&tt.quill.format(rt,V.format[rt],S.default.sources.USER))})}function G($){return{key:z.keys.TAB,shiftKey:!$,format:{"code-block":!0},handler:function(tt){var et=T.default.query("code-block"),rt=tt.index,ot=tt.length,ct=this.quill.scroll.descendant(et,rt),gt=l(ct,2),yt=gt[0],St=gt[1];if(yt!=null){var ee=this.quill.getIndex(yt),Ut=yt.newlineIndex(St,!0)+1,nt=yt.newlineIndex(ee+St+ot),lt=yt.domNode.textContent.slice(Ut,nt).split(`
1990
+ `);St=0,lt.forEach(function(pt,vt){$?(yt.insertAt(Ut+St,et.TAB),St+=et.TAB.length,vt===0?rt+=et.TAB.length:ot+=et.TAB.length):pt.startsWith(et.TAB)&&(yt.deleteAt(Ut+St,et.TAB.length),St-=et.TAB.length,vt===0?rt-=et.TAB.length:ot-=et.TAB.length),St+=pt.length+1}),this.quill.update(S.default.sources.USER),this.quill.setSelection(rt,ot,S.default.sources.SILENT)}}}}function Y($){return{key:$[0].toUpperCase(),shortKey:!0,handler:function(tt,et){this.quill.format($,!et.format[$],S.default.sources.USER)}}}function X($){if(typeof $=="string"||typeof $=="number")return X({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 b(w,T){var x=[],S=!0,I=!1,A=void 0;try{for(var O=w[Symbol.iterator](),L;!(S=(L=O.next()).done)&&(x.push(L.value),!(T&&x.length===T));S=!0);}catch(R){I=!0,A=R}finally{try{!S&&O.return&&O.return()}finally{if(I)throw A}}return x}return function(w,T){if(Array.isArray(w))return w;if(Symbol.iterator in Object(w))return b(w,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function b(w,T,x){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,T);if(S===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:b(I,T,x)}else{if("value"in S)return S.value;var A=S.get;return A===void 0?void 0:A.call(x)}},u=function(){function b(w,T){for(var x=0;x<T.length;x++){var S=T[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,T,x){return T&&b(w.prototype,T),x&&b(w,x),w}}(),f=i(0),h=c(f),p=i(7),d=c(p);function c(b){return b&&b.__esModule?b:{default:b}}function v(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function m(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function y(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var _=function(b){y(w,b),u(w,null,[{key:"value",value:function(){}}]);function w(T,x){v(this,w);var S=m(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,T));return S.selection=x,S.textNode=document.createTextNode(w.CONTENTS),S.domNode.appendChild(S.textNode),S._length=0,S}return u(w,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(x,S){if(this._length!==0)return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"format",this).call(this,x,S);for(var I=this,A=0;I!=null&&I.statics.scope!==h.default.Scope.BLOCK_BLOT;)A+=I.offset(I.parent),I=I.parent;I!=null&&(this._length=w.CONTENTS.length,I.optimize(),I.formatAt(A,w.CONTENTS.length,x,S),this._length=0)}},{key:"index",value:function(x,S){return x===this.textNode?0:l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,S)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){l(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,S=this.selection.getNativeRange(),I=void 0,A=void 0,O=void 0;if(S!=null&&S.start.node===x&&S.end.node===x){var L=[x,S.start.offset,S.end.offset];I=L[0],A=L[1],O=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 d.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(),A!=null){var C=[A,O].map(function(M){return Math.max(0,Math.min(I.data.length,M-1))}),P=o(C,2);return A=P[0],O=P[1],{startNode:I,startOffset:A,endNode:I,endOffset:O}}}}},{key:"update",value:function(x,S){var I=this;if(x.some(function(O){return O.type==="characterData"&&O.target===I.textNode})){var A=this.restore();A&&(S.range=A)}}},{key:"value",value:function(){return""}}]),w}(h.default.Embed);_.blotName="cursor",_.className="ql-cursor",_.tagName="span",_.CONTENTS="\uFEFF",n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),l=h(o),u=i(4),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(){return p(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return y}(l.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,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(b,x.key,x)}}return function(b,w,T){return w&&_(b.prototype,w),T&&_(b,T),b}}(),l=function _(b,w,T){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,w);if(x===void 0){var S=Object.getPrototypeOf(b);return S===null?void 0:_(S,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(_){return _&&_.__esModule?_:{default:_}}function p(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function d(_,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 p(this,b),d(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"value",value:function(T){var x=l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,T);return x.startsWith("rgb(")?(x=x.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+x.split(",").map(function(S){return("00"+parseInt(S).toString(16)).slice(-2)}).join("")):x}}]),b}(f.default.Attributor.Style),m=new f.default.Attributor.Class("color","ql-color",{scope:f.default.Scope.INLINE}),y=new v("color","color",{scope:f.default.Scope.INLINE});n.ColorAttributor=v,n.ColorClass=m,n.ColorStyle=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.sanitize=n.default=void 0;var o=function(){function y(_,b){for(var w=0;w<b.length;w++){var T=b[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,b,w){return b&&y(_.prototype,b),w&&y(_,w),_}}(),l=function y(_,b,w){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,b);if(T===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:y(x,b,w)}else{if("value"in T)return T.value;var S=T.get;return S===void 0?void 0:S.call(w)}},u=i(6),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function d(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 p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"format",value:function(w,T){if(w!==this.statics.blotName||!T)return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,w,T);T=this.constructor.sanitize(T),this.domNode.setAttribute("href",T)}}],[{key:"create",value:function(w){var T=l(_.__proto__||Object.getPrototypeOf(_),"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 m(w,this.PROTOCOL_WHITELIST)?w:this.SANITIZED_URL}}]),_}(f.default);v.blotName="link",v.tagName="A",v.SANITIZED_URL="about:blank",v.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function m(y,_){var b=document.createElement("a");b.href=y;var w=b.href.slice(0,b.href.indexOf(":"));return _.indexOf(w)>-1}n.default=v,n.sanitize=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},l=function(){function _(b,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(b,x.key,x)}}return function(b,w,T){return w&&_(b.prototype,w),T&&_(b,T),b}}(),u=i(23),f=d(u),h=i(107),p=d(h);function d(_){return _&&_.__esModule?_:{default:_}}function c(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}var v=0;function m(_,b){_.setAttribute(b,_.getAttribute(b)!=="true")}var y=function(){function _(b){var w=this;c(this,_),this.select=b,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 l(_,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),m(this.label,"aria-expanded"),m(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(S){switch(S.keyCode){case f.default.keys.ENTER:T.selectItem(x,!0),S.preventDefault();break;case f.default.keys.ESCAPE:T.escape(),S.preventDefault();break}}),x}},{key:"buildLabel",value:function(){var w=document.createElement("span");return w.classList.add("ql-picker-label"),w.innerHTML=p.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 S=w.buildItem(x);T.appendChild(S),x.selected===!0&&w.selectItem(S)}),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 S=document.createEvent("Event");S.initEvent("change",!0,!0),this.select.dispatchEvent(S)}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)}}]),_}();n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(0),l=q(o),u=i(5),f=q(u),h=i(4),p=q(h),d=i(16),c=q(d),v=i(25),m=q(v),y=i(24),_=q(y),b=i(35),w=q(b),T=i(6),x=q(T),S=i(22),I=q(S),A=i(7),O=q(A),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":p.default,"blots/block/embed":h.BlockEmbed,"blots/break":c.default,"blots/container":m.default,"blots/cursor":_.default,"blots/embed":w.default,"blots/inline":x.default,"blots/scroll":I.default,"blots/text":O.default,"modules/clipboard":R.default,"modules/history":P.default,"modules/keyboard":F.default}),l.default.register(p.default,c.default,_.default,x.default,I.default,O.default),n.default=f.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(1),l=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 p=this.isolate(f,h);p.remove()},u.prototype.formatAt=function(f,h,p,d){var c=this.isolate(f,h);if(o.query(p,o.Scope.BLOT)!=null&&d)c.wrap(p,d);else if(o.query(p,o.Scope.ATTRIBUTE)!=null){var v=o.create(this.statics.scope);c.wrap(v),v.format(p,d)}},u.prototype.insertAt=function(f,h,p){var d=p==null?o.create("text",h):o.create(h,p),c=this.split(f);this.parent.insertBefore(d,c)},u.prototype.insertInto=function(f,h){h===void 0&&(h=null),this.parent!=null&&this.parent.children.remove(this);var p=null;f.children.insertBefore(this,h),h!=null&&(p=h.domNode),(this.domNode.parentNode!=f.domNode||this.domNode.nextSibling!=p)&&f.domNode.insertBefore(this.domNode,p),this.parent=f,this.attach()},u.prototype.isolate=function(f,h){var p=this.split(f);return p.split(h),p},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 p=typeof f=="string"?o.create(f,h):f;return p.replace(this),p},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 p=typeof f=="string"?o.create(f,h):f;return this.parent!=null&&this.parent.insertBefore(p,this.next),p.appendChild(this),p},u.blotName="abstract",u}();n.default=l},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(12),l=i(32),u=i(33),f=i(1),h=function(){function p(d){this.attributes={},this.domNode=d,this.build()}return p.prototype.attribute=function(d,c){c?d.add(this.domNode,c)&&(d.value(this.domNode)!=null?this.attributes[d.attrName]=d:delete this.attributes[d.attrName]):(d.remove(this.domNode),delete this.attributes[d.attrName])},p.prototype.build=function(){var d=this;this.attributes={};var c=o.default.keys(this.domNode),v=l.default.keys(this.domNode),m=u.default.keys(this.domNode);c.concat(v).concat(m).forEach(function(y){var _=f.query(y,f.Scope.ATTRIBUTE);_ instanceof o.default&&(d.attributes[_.attrName]=_)})},p.prototype.copy=function(d){var c=this;Object.keys(this.attributes).forEach(function(v){var m=c.attributes[v].value(c.domNode);d.format(v,m)})},p.prototype.move=function(d){var c=this;this.copy(d),Object.keys(this.attributes).forEach(function(v){c.attributes[v].remove(c.domNode)}),this.attributes={}},p.prototype.values=function(){var d=this;return Object.keys(this.attributes).reduce(function(c,v){return c[v]=d.attributes[v].value(d.domNode),c},{})},p}();n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12);function u(h,p){var d=h.getAttribute("class")||"";return d.split(/\s+/).filter(function(c){return c.indexOf(p+"-")===0})}var f=function(h){o(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.keys=function(d){return(d.getAttribute("class")||"").split(/\s+/).map(function(c){return c.split("-").slice(0,-1).join("-")})},p.prototype.add=function(d,c){return this.canAdd(d,c)?(this.remove(d),d.classList.add(this.keyName+"-"+c),!0):!1},p.prototype.remove=function(d){var c=u(d,this.keyName);c.forEach(function(v){d.classList.remove(v)}),d.classList.length===0&&d.removeAttribute("class")},p.prototype.value=function(d){var c=u(d,this.keyName)[0]||"",v=c.slice(this.keyName.length+1);return this.canAdd(d,v)?v:""},p}(l.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(12);function u(h){var p=h.split("-"),d=p.slice(1).map(function(c){return c[0].toUpperCase()+c.slice(1)}).join("");return p[0]+d}var f=function(h){o(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.keys=function(d){return(d.getAttribute("style")||"").split(";").map(function(c){var v=c.split(":");return v[0].trim()})},p.prototype.add=function(d,c){return this.canAdd(d,c)?(d.style[u(this.keyName)]=c,!0):!1},p.prototype.remove=function(d){d.style[u(this.keyName)]="",d.getAttribute("style")||d.removeAttribute("style")},p.prototype.value=function(d){var c=d.style[u(this.keyName)];return this.canAdd(d,c)?c:""},p}(l.default);n.default=f},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,p){for(var d=0;d<p.length;d++){var c=p[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,p,d){return p&&f(h.prototype,p),d&&f(h,d),h}}();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,p){l(this,f),this.quill=h,this.options=p,this.modules={}}return o(f,[{key:"init",value:function(){var p=this;Object.keys(this.options.modules).forEach(function(d){p.modules[d]==null&&p.addModule(d)})}},{key:"addModule",value:function(p){var d=this.quill.constructor.import("modules/"+p);return this.modules[p]=new d(this.quill,this.options.modules[p]||{}),this.modules[p]}}]),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 b(w,T){for(var x=0;x<T.length;x++){var S=T[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,T,x){return T&&b(w.prototype,T),x&&b(w,x),w}}(),l=function b(w,T,x){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,T);if(S===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:b(I,T,x)}else{if("value"in S)return S.value;var A=S.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=d(u),h=i(7),p=d(h);function d(b){return b&&b.__esModule?b:{default:b}}function c(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function v(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function m(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var y="\uFEFF",_=function(b){m(w,b);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(S){x.contentNode.appendChild(S)}),x.leftGuard=document.createTextNode(y),x.rightGuard=document.createTextNode(y),x.domNode.appendChild(x.leftGuard),x.domNode.appendChild(x.contentNode),x.domNode.appendChild(x.rightGuard),x}return o(w,[{key:"index",value:function(x,S){return x===this.leftGuard?0:x===this.rightGuard?1:l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"index",this).call(this,x,S)}},{key:"restore",value:function(x){var S=void 0,I=void 0,A=x.data.split(y).join("");if(x===this.leftGuard)if(this.prev instanceof p.default){var O=this.prev.length();this.prev.insertAt(O,A),S={startNode:this.prev.domNode,startOffset:O+A.length}}else I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this),S={startNode:I,startOffset:A.length};else x===this.rightGuard&&(this.next instanceof p.default?(this.next.insertAt(0,A),S={startNode:this.next.domNode,startOffset:A.length}):(I=document.createTextNode(A),this.parent.insertBefore(f.default.create(I),this.next),S={startNode:I,startOffset:A.length}));return x.data=y,S}},{key:"update",value:function(x,S){var I=this;x.forEach(function(A){if(A.type==="characterData"&&(A.target===I.leftGuard||A.target===I.rightGuard)){var O=I.restore(A.target);O&&(S.range=O)}})}}]),w}(f.default.Embed);n.default=_},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.AlignStyle=n.AlignClass=n.AlignAttribute=void 0;var o=i(0),l=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:l.default.Scope.BLOCK,whitelist:["right","center","justify"]},h=new l.default.Attributor.Attribute("align","align",f),p=new l.default.Attributor.Class("align","ql-align",f),d=new l.default.Attributor.Style("align","text-align",f);n.AlignAttribute=h,n.AlignClass=p,n.AlignStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.BackgroundStyle=n.BackgroundClass=void 0;var o=i(0),l=f(o),u=i(26);function f(d){return d&&d.__esModule?d:{default:d}}var h=new l.default.Attributor.Class("background","ql-bg",{scope:l.default.Scope.INLINE}),p=new u.ColorAttributor("background","background-color",{scope:l.default.Scope.INLINE});n.BackgroundClass=h,n.BackgroundStyle=p},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.DirectionStyle=n.DirectionClass=n.DirectionAttribute=void 0;var o=i(0),l=u(o);function u(c){return c&&c.__esModule?c:{default:c}}var f={scope:l.default.Scope.BLOCK,whitelist:["rtl"]},h=new l.default.Attributor.Attribute("direction","dir",f),p=new l.default.Attributor.Class("direction","ql-direction",f),d=new l.default.Attributor.Style("direction","direction",f);n.DirectionAttribute=h,n.DirectionClass=p,n.DirectionStyle=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.FontClass=n.FontStyle=void 0;var o=function(){function b(w,T){for(var x=0;x<T.length;x++){var S=T[x];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(w,S.key,S)}}return function(w,T,x){return T&&b(w.prototype,T),x&&b(w,x),w}}(),l=function b(w,T,x){w===null&&(w=Function.prototype);var S=Object.getOwnPropertyDescriptor(w,T);if(S===void 0){var I=Object.getPrototypeOf(w);return I===null?void 0:b(I,T,x)}else{if("value"in S)return S.value;var A=S.get;return A===void 0?void 0:A.call(x)}},u=i(0),f=h(u);function h(b){return b&&b.__esModule?b:{default:b}}function p(b,w){if(!(b instanceof w))throw new TypeError("Cannot call a class as a function")}function d(b,w){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:b}function c(b,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);b.prototype=Object.create(w&&w.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(b,w):b.__proto__=w)}var v={scope:f.default.Scope.INLINE,whitelist:["serif","monospace"]},m=new f.default.Attributor.Class("font","ql-font",v),y=function(b){c(w,b);function w(){return p(this,w),d(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return o(w,[{key:"value",value:function(x){return l(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"value",this).call(this,x).replace(/["']/g,"")}}]),w}(f.default.Attributor.Style),_=new y("font","font-family",v);n.FontStyle=_,n.FontClass=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.SizeStyle=n.SizeClass=void 0;var o=i(0),l=u(o);function u(p){return p&&p.__esModule?p:{default:p}}var f=new l.default.Attributor.Class("size","ql-size",{scope:l.default.Scope.INLINE,whitelist:["small","large","huge"]}),h=new l.default.Attributor.Style("size","font-size",{scope:l.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,S){for(var I=0;I<S.length;I++){var A=S[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,S,I){return S&&T(x.prototype,S),I&&T(x,I),x}}(),l=i(0),u=c(l),f=i(5),h=c(f),p=i(9),d=c(p);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 m(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 y(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 _=function(T){y(x,T);function x(S,I){v(this,x);var A=m(this,(x.__proto__||Object.getPrototypeOf(x)).call(this,S,I));return A.lastRecorded=0,A.ignoreChange=!1,A.clear(),A.quill.on(h.default.events.EDITOR_CHANGE,function(O,L,R,C){O!==h.default.events.TEXT_CHANGE||A.ignoreChange||(!A.options.userOnly||C===h.default.sources.USER?A.record(L,R):A.transform(L))}),A.quill.keyboard.addBinding({key:"Z",shortKey:!0},A.undo.bind(A)),A.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},A.redo.bind(A)),/Win/i.test(navigator.platform)&&A.quill.keyboard.addBinding({key:"Y",shortKey:!0},A.redo.bind(A)),A}return o(x,[{key:"change",value:function(I,A){if(this.stack[I].length!==0){var O=this.stack[I].pop();this.stack[A].push(O),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(O[I],h.default.sources.USER),this.ignoreChange=!1;var L=w(O[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,A){if(I.ops.length!==0){this.stack.redo=[];var O=this.quill.getContents().diff(A),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var R=this.stack.undo.pop();O=O.compose(R.undo),I=R.redo.compose(I)}else this.lastRecorded=L;this.stack.undo.push({redo:I,undo:O}),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(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=I.transform(A.undo,!0),A.redo=I.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),x}(d.default);_.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function b(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(S){return u.default.query(S,u.default.Scope.BLOCK)!=null}):!1}function w(T){var x=T.reduce(function(I,A){return I+=A.delete||0,I},0),S=T.length()-x;return b(T)&&(S-=1),S}n.default=_,n.getLastChangeIndex=w},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.BaseTooltip=void 0;var o=function(){function j(G,Y){for(var X=0;X<Y.length;X++){var $=Y[X];$.enumerable=$.enumerable||!1,$.configurable=!0,"value"in $&&($.writable=!0),Object.defineProperty(G,$.key,$)}}return function(G,Y,X){return Y&&j(G.prototype,Y),X&&j(G,X),G}}(),l=function j(G,Y,X){G===null&&(G=Function.prototype);var $=Object.getOwnPropertyDescriptor(G,Y);if($===void 0){var V=Object.getPrototypeOf(G);return V===null?void 0:j(V,Y,X)}else{if("value"in $)return $.value;var tt=$.get;return tt===void 0?void 0:tt.call(X)}},u=i(3),f=L(u),h=i(2),p=L(h),d=i(8),c=L(d),v=i(23),m=L(v),y=i(34),_=L(y),b=i(59),w=L(b),T=i(60),x=L(T),S=i(28),I=L(S),A=i(61),O=L(A);function L(j){return j&&j.__esModule?j:{default:j}}function R(j,G){if(!(j instanceof G))throw new TypeError("Cannot call a class as a function")}function C(j,G){if(!j)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return G&&(typeof G=="object"||typeof G=="function")?G:j}function P(j,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof G);j.prototype=Object.create(G&&G.prototype,{constructor:{value:j,enumerable:!1,writable:!0,configurable:!0}}),G&&(Object.setPrototypeOf?Object.setPrototypeOf(j,G):j.__proto__=G)}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"],it=function(j){P(G,j);function G(Y,X){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,Y,X)),V=function tt(et){if(!document.body.contains(Y.root))return document.body.removeEventListener("click",tt);$.tooltip!=null&&!$.tooltip.root.contains(et.target)&&document.activeElement!==$.tooltip.textbox&&!$.quill.hasFocus()&&$.tooltip.hide(),$.pickers!=null&&$.pickers.forEach(function(rt){rt.container.contains(et.target)||rt.close()})};return Y.emitter.listenDOM("click",document.body,V),$}return o(G,[{key:"addModule",value:function(X){var $=l(G.prototype.__proto__||Object.getPrototypeOf(G.prototype),"addModule",this).call(this,X);return X==="toolbar"&&this.extendToolbar($),$}},{key:"buildButtons",value:function(X,$){X.forEach(function(V){var tt=V.getAttribute("class")||"";tt.split(/\s+/).forEach(function(et){if(et.startsWith("ql-")&&(et=et.slice(3),$[et]!=null))if(et==="direction")V.innerHTML=$[et][""]+$[et].rtl;else if(typeof $[et]=="string")V.innerHTML=$[et];else{var rt=V.value||"";rt!=null&&$[et][rt]&&(V.innerHTML=$[et][rt])}})})}},{key:"buildPickers",value:function(X,$){var V=this;this.pickers=X.map(function(et){if(et.classList.contains("ql-align"))return et.querySelector("option")==null&&k(et,M),new x.default(et,$.align);if(et.classList.contains("ql-background")||et.classList.contains("ql-color")){var rt=et.classList.contains("ql-background")?"background":"color";return et.querySelector("option")==null&&k(et,F,rt==="background"?"#ffffff":"#000000"),new w.default(et,$[rt])}else return et.querySelector("option")==null&&(et.classList.contains("ql-font")?k(et,q):et.classList.contains("ql-header")?k(et,Z):et.classList.contains("ql-size")&&k(et,z)),new I.default(et)});var tt=function(){V.pickers.forEach(function(rt){rt.update()})};this.quill.on(c.default.events.EDITOR_CHANGE,tt)}}]),G}(_.default);it.DEFAULTS=(0,f.default)(!0,{},_.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var G=this,Y=this.container.querySelector("input.ql-image[type=file]");Y==null&&(Y=document.createElement("input"),Y.setAttribute("type","file"),Y.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),Y.classList.add("ql-image"),Y.addEventListener("change",function(){if(Y.files!=null&&Y.files[0]!=null){var X=new FileReader;X.onload=function($){var V=G.quill.getSelection(!0);G.quill.updateContents(new p.default().retain(V.index).delete(V.length).insert({image:$.target.result}),c.default.sources.USER),G.quill.setSelection(V.index+1,c.default.sources.SILENT),Y.value=""},X.readAsDataURL(Y.files[0])}}),this.container.appendChild(Y)),Y.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var W=function(j){P(G,j);function G(Y,X){R(this,G);var $=C(this,(G.__proto__||Object.getPrototypeOf(G)).call(this,Y,X));return $.textbox=$.root.querySelector('input[type="text"]'),$.listen(),$}return o(G,[{key:"listen",value:function(){var X=this;this.textbox.addEventListener("keydown",function($){m.default.match($,"enter")?(X.save(),$.preventDefault()):m.default.match($,"escape")&&(X.cancel(),$.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var X=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=$:X!==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-"+X)||""),this.root.setAttribute("data-mode",X)}},{key:"restoreFocus",value:function(){var X=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=X}},{key:"save",value:function(){var X=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var $=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",X,c.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",X,c.default.sources.USER)),this.quill.root.scrollTop=$;break}case"video":X=D(X);case"formula":{if(!X)break;var V=this.quill.getSelection(!0);if(V!=null){var tt=V.index+V.length;this.quill.insertEmbed(tt,this.root.getAttribute("data-mode"),X,c.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(tt+1," ",c.default.sources.USER),this.quill.setSelection(tt+2,c.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),G}(O.default);function D(j){var G=j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||j.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return G?(G[1]||"https")+"://www.youtube.com/embed/"+G[2]+"?showinfo=0":(G=j.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(G[1]||"https")+"://player.vimeo.com/video/"+G[2]+"/":j}function k(j,G){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;G.forEach(function(X){var $=document.createElement("option");X===Y?$.setAttribute("selected","selected"):$.setAttribute("value",X),j.appendChild($)})}n.BaseTooltip=W,n.default=it},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function l(){this.head=this.tail=null,this.length=0}return l.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))},l.prototype.contains=function(u){for(var f,h=this.iterator();f=h();)if(f===u)return!0;return!1},l.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)},l.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},l.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)},l.prototype.iterator=function(u){return u===void 0&&(u=this.head),function(){var f=u;return u!=null&&(u=u.next),f}},l.prototype.find=function(u,f){f===void 0&&(f=!1);for(var h,p=this.iterator();h=p();){var d=h.length();if(u<d||f&&u===d&&(h.next==null||h.next.length()!==0))return[h,u];u-=d}return[null,0]},l.prototype.forEach=function(u){for(var f,h=this.iterator();f=h();)u(f)},l.prototype.forEachAt=function(u,f,h){if(!(f<=0))for(var p=this.find(u),d=p[0],c=p[1],v,m=u-c,y=this.iterator(d);(v=y())&&m<u+f;){var _=v.length();u>m?h(v,u-m,Math.min(f,m+_-u)):h(v,0,Math.min(_,u+f-m)),m+=_}},l.prototype.map=function(u){return this.reduce(function(f,h){return f.push(u(h)),f},[])},l.prototype.reduce=function(u,f){for(var h,p=this.iterator();h=p();)f=u(f,h);return f},l}();n.default=o},function(r,n,i){var o=this&&this.__extends||function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,v){c.__proto__=v}||function(c,v){for(var m in v)v.hasOwnProperty(m)&&(c[m]=v[m])};return function(c,v){d(c,v);function m(){this.constructor=c}c.prototype=v===null?Object.create(v):(m.prototype=v.prototype,new m)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(17),u=i(1),f={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},h=100,p=function(d){o(c,d);function c(v){var m=d.call(this,v)||this;return m.scroll=m,m.observer=new MutationObserver(function(y){m.update(y)}),m.observer.observe(m.domNode,f),m.attach(),m}return c.prototype.detach=function(){d.prototype.detach.call(this),this.observer.disconnect()},c.prototype.deleteAt=function(v,m){this.update(),v===0&&m===this.length()?this.children.forEach(function(y){y.remove()}):d.prototype.deleteAt.call(this,v,m)},c.prototype.formatAt=function(v,m,y,_){this.update(),d.prototype.formatAt.call(this,v,m,y,_)},c.prototype.insertAt=function(v,m,y){this.update(),d.prototype.insertAt.call(this,v,m,y)},c.prototype.optimize=function(v,m){var y=this;v===void 0&&(v=[]),m===void 0&&(m={}),d.prototype.optimize.call(this,m);for(var _=[].slice.call(this.observer.takeRecords());_.length>0;)v.push(_.pop());for(var b=function(S,I){I===void 0&&(I=!0),!(S==null||S===y)&&S.domNode.parentNode!=null&&(S.domNode[u.DATA_KEY].mutations==null&&(S.domNode[u.DATA_KEY].mutations=[]),I&&b(S.parent))},w=function(S){S.domNode[u.DATA_KEY]==null||S.domNode[u.DATA_KEY].mutations==null||(S instanceof l.default&&S.children.forEach(w),S.optimize(m))},T=v,x=0;T.length>0;x+=1){if(x>=h)throw new Error("[Parchment] Maximum optimize iterations reached");for(T.forEach(function(S){var I=u.find(S.target,!0);I!=null&&(I.domNode===S.target&&(S.type==="childList"?(b(u.find(S.previousSibling,!1)),[].forEach.call(S.addedNodes,function(A){var O=u.find(A,!1);b(O,!1),O instanceof l.default&&O.children.forEach(function(L){b(L,!1)})})):S.type==="attributes"&&b(I.prev)),b(I))}),this.children.forEach(w),T=[].slice.call(this.observer.takeRecords()),_=T.slice();_.length>0;)v.push(_.pop())}},c.prototype.update=function(v,m){var y=this;m===void 0&&(m={}),v=v||this.observer.takeRecords(),v.map(function(_){var b=u.find(_.target,!0);return b==null?null:b.domNode[u.DATA_KEY].mutations==null?(b.domNode[u.DATA_KEY].mutations=[_],b):(b.domNode[u.DATA_KEY].mutations.push(_),null)}).forEach(function(_){_==null||_===y||_.domNode[u.DATA_KEY]==null||_.update(_.domNode[u.DATA_KEY].mutations||[],m)}),this.domNode[u.DATA_KEY].mutations!=null&&d.prototype.update.call(this,this.domNode[u.DATA_KEY].mutations,m),this.optimize(v,m)},c.blotName="scroll",c.defaultChild="block",c.scope=u.Scope.BLOCK_BLOT,c.tagName="DIV",c}(l.default);n.default=p},function(r,n,i){var o=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var v in c)c.hasOwnProperty(v)&&(d[v]=c[v])};return function(d,c){p(d,c);function v(){this.constructor=d}d.prototype=c===null?Object.create(c):(v.prototype=c.prototype,new v)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(18),u=i(1);function f(p,d){if(Object.keys(p).length!==Object.keys(d).length)return!1;for(var c in p)if(p[c]!==d[c])return!1;return!0}var h=function(p){o(d,p);function d(){return p!==null&&p.apply(this,arguments)||this}return d.formats=function(c){if(c.tagName!==d.tagName)return p.formats.call(this,c)},d.prototype.format=function(c,v){var m=this;c===this.statics.blotName&&!v?(this.children.forEach(function(y){y instanceof l.default||(y=y.wrap(d.blotName,!0)),m.attributes.copy(y)}),this.unwrap()):p.prototype.format.call(this,c,v)},d.prototype.formatAt=function(c,v,m,y){if(this.formats()[m]!=null||u.query(m,u.Scope.ATTRIBUTE)){var _=this.isolate(c,v);_.format(m,y)}else p.prototype.formatAt.call(this,c,v,m,y)},d.prototype.optimize=function(c){p.prototype.optimize.call(this,c);var v=this.formats();if(Object.keys(v).length===0)return this.unwrap();var m=this.next;m instanceof d&&m.prev===this&&f(v,m.formats())&&(m.moveChildren(this),m.remove())},d.blotName="inline",d.scope=u.Scope.INLINE_BLOT,d.tagName="SPAN",d}(l.default);n.default=h},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(18),u=i(1),f=function(h){o(p,h);function p(){return h!==null&&h.apply(this,arguments)||this}return p.formats=function(d){var c=u.query(p.blotName).tagName;if(d.tagName!==c)return h.formats.call(this,d)},p.prototype.format=function(d,c){u.query(d,u.Scope.BLOCK)!=null&&(d===this.statics.blotName&&!c?this.replaceWith(p.blotName):h.prototype.format.call(this,d,c))},p.prototype.formatAt=function(d,c,v,m){u.query(v,u.Scope.BLOCK)!=null?this.format(v,m):h.prototype.formatAt.call(this,d,c,v,m)},p.prototype.insertAt=function(d,c,v){if(v==null||u.query(c,u.Scope.INLINE)!=null)h.prototype.insertAt.call(this,d,c,v);else{var m=this.split(d),y=u.create(c,v);m.parent.insertBefore(y,m)}},p.prototype.update=function(d,c){navigator.userAgent.match(/Trident/)?this.build():h.prototype.update.call(this,d,c)},p.blotName="block",p.scope=u.Scope.BLOCK_BLOT,p.tagName="P",p}(l.default);n.default=f},function(r,n,i){var o=this&&this.__extends||function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,p){h.__proto__=p}||function(h,p){for(var d in p)p.hasOwnProperty(d)&&(h[d]=p[d])};return function(h,p){f(h,p);function d(){this.constructor=h}h.prototype=p===null?Object.create(p):(d.prototype=p.prototype,new d)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(19),u=function(f){o(h,f);function h(){return f!==null&&f.apply(this,arguments)||this}return h.formats=function(p){},h.prototype.format=function(p,d){f.prototype.formatAt.call(this,0,this.length(),p,d)},h.prototype.formatAt=function(p,d,c,v){p===0&&d===this.length()?this.format(c,v):f.prototype.formatAt.call(this,p,d,c,v)},h.prototype.formats=function(){return this.statics.formats(this.domNode)},h}(l.default);n.default=u},function(r,n,i){var o=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,d){p.__proto__=d}||function(p,d){for(var c in d)d.hasOwnProperty(c)&&(p[c]=d[c])};return function(p,d){h(p,d);function c(){this.constructor=p}p.prototype=d===null?Object.create(d):(c.prototype=d.prototype,new c)}}();Object.defineProperty(n,"__esModule",{value:!0});var l=i(19),u=i(1),f=function(h){o(p,h);function p(d){var c=h.call(this,d)||this;return c.text=c.statics.value(c.domNode),c}return p.create=function(d){return document.createTextNode(d)},p.value=function(d){var c=d.data;return c.normalize&&(c=c.normalize()),c},p.prototype.deleteAt=function(d,c){this.domNode.data=this.text=this.text.slice(0,d)+this.text.slice(d+c)},p.prototype.index=function(d,c){return this.domNode===d?c:-1},p.prototype.insertAt=function(d,c,v){v==null?(this.text=this.text.slice(0,d)+c+this.text.slice(d),this.domNode.data=this.text):h.prototype.insertAt.call(this,d,c,v)},p.prototype.length=function(){return this.text.length},p.prototype.optimize=function(d){h.prototype.optimize.call(this,d),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof p&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},p.prototype.position=function(d,c){return[this.domNode,d]},p.prototype.split=function(d,c){if(c===void 0&&(c=!1),!c){if(d===0)return this;if(d===this.length())return this.next}var v=u.create(this.domNode.splitText(d));return this.parent.insertBefore(v,this.next),this.text=this.statics.value(this.domNode),v},p.prototype.update=function(d,c){var v=this;d.some(function(m){return m.type==="characterData"&&m.target===v.domNode})&&(this.text=this.statics.value(this.domNode))},p.prototype.value=function(){return this.text},p.blotName="text",p.scope=u.Scope.INLINE_BLOT,p}(l.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 l=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(u,f){return arguments.length>1&&!this.contains(u)==!f?f:l.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 p=h.indexOf(u,f);return p!==-1&&p===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),p=h.length>>>0,d=arguments[1],c,v=0;v<p;v++)if(c=h[v],f.call(d,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,l=0;function u(x,S,I){if(x==S)return x?[[l,x]]:[];(I<0||x.length<I)&&(I=null);var A=d(x,S),O=x.substring(0,A);x=x.substring(A),S=S.substring(A),A=c(x,S);var L=x.substring(x.length-A);x=x.substring(0,x.length-A),S=S.substring(0,S.length-A);var R=f(x,S);return O&&R.unshift([l,O]),L&&R.push([l,L]),m(R),I!=null&&(R=b(R,I)),R=w(R),R}function f(x,S){var I;if(!x)return[[o,S]];if(!S)return[[i,x]];var A=x.length>S.length?x:S,O=x.length>S.length?S:x,L=A.indexOf(O);if(L!=-1)return I=[[o,A.substring(0,L)],[l,O],[o,A.substring(L+O.length)]],x.length>S.length&&(I[0][0]=I[2][0]=i),I;if(O.length==1)return[[i,x],[o,S]];var R=v(x,S);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([[l,q]],z)}return h(x,S)}function h(x,S){for(var I=x.length,A=S.length,O=Math.ceil((I+A)/2),L=O,R=2*O,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-A,q=F%2!=0,Z=0,z=0,it=0,W=0,D=0;D<O;D++){for(var k=-D+Z;k<=D-z;k+=2){var j=L+k,G;k==-D||k!=D&&C[j-1]<C[j+1]?G=C[j+1]:G=C[j-1]+1;for(var Y=G-k;G<I&&Y<A&&x.charAt(G)==S.charAt(Y);)G++,Y++;if(C[j]=G,G>I)z+=2;else if(Y>A)Z+=2;else if(q){var X=L+F-k;if(X>=0&&X<R&&P[X]!=-1){var $=I-P[X];if(G>=$)return p(x,S,G,Y)}}}for(var V=-D+it;V<=D-W;V+=2){var X=L+V,$;V==-D||V!=D&&P[X-1]<P[X+1]?$=P[X+1]:$=P[X-1]+1;for(var tt=$-V;$<I&&tt<A&&x.charAt(I-$-1)==S.charAt(A-tt-1);)$++,tt++;if(P[X]=$,$>I)W+=2;else if(tt>A)it+=2;else if(!q){var j=L+F-V;if(j>=0&&j<R&&C[j]!=-1){var G=C[j],Y=L+G-j;if($=I-$,G>=$)return p(x,S,G,Y)}}}}return[[i,x],[o,S]]}function p(x,S,I,A){var O=x.substring(0,I),L=S.substring(0,A),R=x.substring(I),C=S.substring(A),P=u(O,L),M=u(R,C);return P.concat(M)}function d(x,S){if(!x||!S||x.charAt(0)!=S.charAt(0))return 0;for(var I=0,A=Math.min(x.length,S.length),O=A,L=0;I<O;)x.substring(L,O)==S.substring(L,O)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function c(x,S){if(!x||!S||x.charAt(x.length-1)!=S.charAt(S.length-1))return 0;for(var I=0,A=Math.min(x.length,S.length),O=A,L=0;I<O;)x.substring(x.length-O,x.length-L)==S.substring(S.length-O,S.length-L)?(I=O,L=I):A=O,O=Math.floor((A-I)/2+I);return O}function v(x,S){var I=x.length>S.length?x:S,A=x.length>S.length?S:x;if(I.length<4||A.length*2<I.length)return null;function O(z,it,W){for(var D=z.substring(W,W+Math.floor(z.length/4)),k=-1,j="",G,Y,X,$;(k=it.indexOf(D,k+1))!=-1;){var V=d(z.substring(W),it.substring(k)),tt=c(z.substring(0,W),it.substring(0,k));j.length<tt+V&&(j=it.substring(k-tt,k)+it.substring(k,k+V),G=z.substring(0,W-tt),Y=z.substring(W+V),X=it.substring(0,k-tt),$=it.substring(k+V))}return j.length*2>=z.length?[G,Y,X,$,j]:null}var L=O(I,A,Math.ceil(I.length/4)),R=O(I,A,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>S.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 m(x){x.push([l,""]);for(var S=0,I=0,A=0,O="",L="",R;S<x.length;)switch(x[S][0]){case o:A++,L+=x[S][1],S++;break;case i:I++,O+=x[S][1],S++;break;case l:I+A>1?(I!==0&&A!==0&&(R=d(L,O),R!==0&&(S-I-A>0&&x[S-I-A-1][0]==l?x[S-I-A-1][1]+=L.substring(0,R):(x.splice(0,0,[l,L.substring(0,R)]),S++),L=L.substring(R),O=O.substring(R)),R=c(L,O),R!==0&&(x[S][1]=L.substring(L.length-R)+x[S][1],L=L.substring(0,L.length-R),O=O.substring(0,O.length-R))),I===0?x.splice(S-A,I+A,[o,L]):A===0?x.splice(S-I,I+A,[i,O]):x.splice(S-I-A,I+A,[i,O],[o,L]),S=S-I-A+(I?1:0)+(A?1:0)+1):S!==0&&x[S-1][0]==l?(x[S-1][1]+=x[S][1],x.splice(S,1)):S++,A=0,I=0,O="",L="";break}x[x.length-1][1]===""&&x.pop();var C=!1;for(S=1;S<x.length-1;)x[S-1][0]==l&&x[S+1][0]==l&&(x[S][1].substring(x[S][1].length-x[S-1][1].length)==x[S-1][1]?(x[S][1]=x[S-1][1]+x[S][1].substring(0,x[S][1].length-x[S-1][1].length),x[S+1][1]=x[S-1][1]+x[S+1][1],x.splice(S-1,1),C=!0):x[S][1].substring(0,x[S+1][1].length)==x[S+1][1]&&(x[S-1][1]+=x[S+1][1],x[S][1]=x[S][1].substring(x[S+1][1].length)+x[S+1][1],x.splice(S+1,1),C=!0)),S++;C&&m(x)}var y=u;y.INSERT=o,y.DELETE=i,y.EQUAL=l,r.exports=y;function _(x,S){if(S===0)return[l,x];for(var I=0,A=0;A<x.length;A++){var O=x[A];if(O[0]===i||O[0]===l){var L=I+O[1].length;if(S===L)return[A+1,x];if(S<L){x=x.slice();var R=S-I,C=[O[0],O[1].slice(0,R)],P=[O[0],O[1].slice(R)];return x.splice(A,1,C,P),[A+1,x]}else I=L}}throw new Error("cursor_pos is out of bounds!")}function b(x,S){var I=_(x,S),A=I[1],O=I[0],L=A[O],R=A[O+1];if(L==null)return x;if(L[0]!==l)return x;if(R!=null&&L[1]+R[1]===R[1]+L[1])return A.splice(O,2,R,L),T(A,O,2);if(R!=null&&R[1].indexOf(L[1])===0){A.splice(O,2,[R[0],L[1]],[0,L[1]]);var C=R[1].slice(L[1].length);return C.length>0&&A.splice(O+2,0,[R[0],C]),T(A,O,3)}else return x}function w(x){for(var S=!1,I=function(R){return R.charCodeAt(0)>=56320&&R.charCodeAt(0)<=57343},A=function(R){return R.charCodeAt(R.length-1)>=55296&&R.charCodeAt(R.length-1)<=56319},O=2;O<x.length;O+=1)x[O-2][0]===l&&A(x[O-2][1])&&x[O-1][0]===i&&I(x[O-1][1])&&x[O][0]===o&&I(x[O][1])&&(S=!0,x[O-1][1]=x[O-2][1].slice(-1)+x[O-1][1],x[O][1]=x[O-2][1].slice(-1)+x[O][1],x[O-2][1]=x[O-2][1].slice(0,-1));if(!S)return x;for(var L=[],O=0;O<x.length;O+=1)x[O][1].length>0&&L.push(x[O]);return L}function T(x,S,I){for(var A=S+I-1;A>=0&&A>=S-1;A--)if(A+1<x.length){var O=x[A],L=x[A+1];O[0]===L[1]&&x.splice(A,2,[O[0],O[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 l=[];for(var u in o)l.push(u);return l}},function(r,n){var i=function(){return Object.prototype.toString.call(arguments)}()=="[object Arguments]";n=r.exports=i?o:l,n.supported=o;function o(u){return Object.prototype.toString.call(u)=="[object Arguments]"}n.unsupported=l;function l(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 l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(o=!1));function u(h,p,d){this.fn=h,this.context=p,this.once=d||!1}function f(){this._events=new l,this._eventsCount=0}f.prototype.eventNames=function(){var p=[],d,c;if(this._eventsCount===0)return p;for(c in d=this._events)i.call(d,c)&&p.push(o?c.slice(1):c);return Object.getOwnPropertySymbols?p.concat(Object.getOwnPropertySymbols(d)):p},f.prototype.listeners=function(p,d){var c=o?o+p:p,v=this._events[c];if(d)return!!v;if(!v)return[];if(v.fn)return[v.fn];for(var m=0,y=v.length,_=new Array(y);m<y;m++)_[m]=v[m].fn;return _},f.prototype.emit=function(p,d,c,v,m,y){var _=o?o+p:p;if(!this._events[_])return!1;var b=this._events[_],w=arguments.length,T,x;if(b.fn){switch(b.once&&this.removeListener(p,b.fn,void 0,!0),w){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,c),!0;case 4:return b.fn.call(b.context,d,c,v),!0;case 5:return b.fn.call(b.context,d,c,v,m),!0;case 6:return b.fn.call(b.context,d,c,v,m,y),!0}for(x=1,T=new Array(w-1);x<w;x++)T[x-1]=arguments[x];b.fn.apply(b.context,T)}else{var S=b.length,I;for(x=0;x<S;x++)switch(b[x].once&&this.removeListener(p,b[x].fn,void 0,!0),w){case 1:b[x].fn.call(b[x].context);break;case 2:b[x].fn.call(b[x].context,d);break;case 3:b[x].fn.call(b[x].context,d,c);break;case 4:b[x].fn.call(b[x].context,d,c,v);break;default:if(!T)for(I=1,T=new Array(w-1);I<w;I++)T[I-1]=arguments[I];b[x].fn.apply(b[x].context,T)}}return!0},f.prototype.on=function(p,d,c){var v=new u(d,c||this),m=o?o+p:p;return this._events[m]?this._events[m].fn?this._events[m]=[this._events[m],v]:this._events[m].push(v):(this._events[m]=v,this._eventsCount++),this},f.prototype.once=function(p,d,c){var v=new u(d,c||this,!0),m=o?o+p:p;return this._events[m]?this._events[m].fn?this._events[m]=[this._events[m],v]:this._events[m].push(v):(this._events[m]=v,this._eventsCount++),this},f.prototype.removeListener=function(p,d,c,v){var m=o?o+p:p;if(!this._events[m])return this;if(!d)return--this._eventsCount===0?this._events=new l:delete this._events[m],this;var y=this._events[m];if(y.fn)y.fn===d&&(!v||y.once)&&(!c||y.context===c)&&(--this._eventsCount===0?this._events=new l:delete this._events[m]);else{for(var _=0,b=[],w=y.length;_<w;_++)(y[_].fn!==d||v&&!y[_].once||c&&y[_].context!==c)&&b.push(y[_]);b.length?this._events[m]=b.length===1?b[0]:b:--this._eventsCount===0?this._events=new l:delete this._events[m]}return this},f.prototype.removeAllListeners=function(p){var d;return p?(d=o?o+p:p,this._events[d]&&(--this._eventsCount===0?this._events=new l:delete this._events[d])):(this._events=new l,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(nt){return typeof nt}:function(nt){return nt&&typeof Symbol=="function"&&nt.constructor===Symbol&&nt!==Symbol.prototype?"symbol":typeof nt},l=function(){function nt(lt,pt){var vt=[],ht=!0,Pt=!1,Lt=void 0;try{for(var Nt=lt[Symbol.iterator](),He;!(ht=(He=Nt.next()).done)&&(vt.push(He.value),!(pt&&vt.length===pt));ht=!0);}catch(Ge){Pt=!0,Lt=Ge}finally{try{!ht&&Nt.return&&Nt.return()}finally{if(Pt)throw Lt}}return vt}return function(lt,pt){if(Array.isArray(lt))return lt;if(Symbol.iterator in Object(lt))return nt(lt,pt);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function nt(lt,pt){for(var vt=0;vt<pt.length;vt++){var ht=pt[vt];ht.enumerable=ht.enumerable||!1,ht.configurable=!0,"value"in ht&&(ht.writable=!0),Object.defineProperty(lt,ht.key,ht)}}return function(lt,pt,vt){return pt&&nt(lt.prototype,pt),vt&&nt(lt,vt),lt}}(),f=i(3),h=P(f),p=i(2),d=P(p),c=i(0),v=P(c),m=i(5),y=P(m),_=i(10),b=P(_),w=i(9),T=P(w),x=i(36),S=i(37),I=i(13),A=P(I),O=i(26),L=i(38),R=i(39),C=i(40);function P(nt){return nt&&nt.__esModule?nt:{default:nt}}function M(nt,lt,pt){return lt in nt?Object.defineProperty(nt,lt,{value:pt,enumerable:!0,configurable:!0,writable:!0}):nt[lt]=pt,nt}function F(nt,lt){if(!(nt instanceof lt))throw new TypeError("Cannot call a class as a function")}function q(nt,lt){if(!nt)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return lt&&(typeof lt=="object"||typeof lt=="function")?lt:nt}function Z(nt,lt){if(typeof lt!="function"&&lt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof lt);nt.prototype=Object.create(lt&&lt.prototype,{constructor:{value:nt,enumerable:!1,writable:!0,configurable:!0}}),lt&&(Object.setPrototypeOf?Object.setPrototypeOf(nt,lt):nt.__proto__=lt)}var z=(0,b.default)("quill:clipboard"),it="__ql-matcher",W=[[Node.TEXT_NODE,Ut],[Node.TEXT_NODE,yt],["br",ot],[Node.ELEMENT_NODE,yt],[Node.ELEMENT_NODE,rt],[Node.ELEMENT_NODE,St],[Node.ELEMENT_NODE,et],[Node.ELEMENT_NODE,ee],["li",gt],["b",tt.bind(tt,"bold")],["i",tt.bind(tt,"italic")],["style",ct]],D=[x.AlignAttribute,L.DirectionAttribute].reduce(function(nt,lt){return nt[lt.keyName]=lt,nt},{}),k=[x.AlignStyle,S.BackgroundStyle,O.ColorStyle,L.DirectionStyle,R.FontStyle,C.SizeStyle].reduce(function(nt,lt){return nt[lt.keyName]=lt,nt},{}),j=function(nt){Z(lt,nt);function lt(pt,vt){F(this,lt);var ht=q(this,(lt.__proto__||Object.getPrototypeOf(lt)).call(this,pt,vt));return ht.quill.root.addEventListener("paste",ht.onPaste.bind(ht)),ht.container=ht.quill.addContainer("ql-clipboard"),ht.container.setAttribute("contenteditable",!0),ht.container.setAttribute("tabindex",-1),ht.matchers=[],W.concat(ht.options.matchers).forEach(function(Pt){var Lt=l(Pt,2),Nt=Lt[0],He=Lt[1];!vt.matchVisual&&He===St||ht.addMatcher(Nt,He)}),ht}return u(lt,[{key:"addMatcher",value:function(vt,ht){this.matchers.push([vt,ht])}},{key:"convert",value:function(vt){if(typeof vt=="string")return this.container.innerHTML=vt.replace(/\>\r?\n +\</g,"><"),this.convert();var ht=this.quill.getFormat(this.quill.selection.savedRange.index);if(ht[A.default.blotName]){var Pt=this.container.innerText;return this.container.innerHTML="",new d.default().insert(Pt,M({},A.default.blotName,ht[A.default.blotName]))}var Lt=this.prepareMatching(),Nt=l(Lt,2),He=Nt[0],Ge=Nt[1],Qt=V(this.container,He,Ge);return X(Qt,`
1992
+ `)&&Qt.ops[Qt.ops.length-1].attributes==null&&(Qt=Qt.compose(new d.default().retain(Qt.length()-1).delete(1))),z.log("convert",this.container.innerHTML,Qt),this.container.innerHTML="",Qt}},{key:"dangerouslyPasteHTML",value:function(vt,ht){var Pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:y.default.sources.API;if(typeof vt=="string")this.quill.setContents(this.convert(vt),ht),this.quill.setSelection(0,y.default.sources.SILENT);else{var Lt=this.convert(ht);this.quill.updateContents(new d.default().retain(vt).concat(Lt),Pt),this.quill.setSelection(vt+Lt.length(),y.default.sources.SILENT)}}},{key:"onPaste",value:function(vt){var ht=this;if(!(vt.defaultPrevented||!this.quill.isEnabled())){var Pt=this.quill.getSelection(),Lt=new d.default().retain(Pt.index),Nt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(y.default.sources.SILENT),setTimeout(function(){Lt=Lt.concat(ht.convert()).delete(Pt.length),ht.quill.updateContents(Lt,y.default.sources.USER),ht.quill.setSelection(Lt.length()-Pt.length,y.default.sources.SILENT),ht.quill.scrollingContainer.scrollTop=Nt,ht.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var vt=this,ht=[],Pt=[];return this.matchers.forEach(function(Lt){var Nt=l(Lt,2),He=Nt[0],Ge=Nt[1];switch(He){case Node.TEXT_NODE:Pt.push(Ge);break;case Node.ELEMENT_NODE:ht.push(Ge);break;default:[].forEach.call(vt.container.querySelectorAll(He),function(Qt){Qt[it]=Qt[it]||[],Qt[it].push(Ge)});break}}),[ht,Pt]}}]),lt}(T.default);j.DEFAULTS={matchers:[],matchVisual:!0};function G(nt,lt,pt){return(typeof lt>"u"?"undefined":o(lt))==="object"?Object.keys(lt).reduce(function(vt,ht){return G(vt,ht,lt[ht])},nt):nt.reduce(function(vt,ht){return ht.attributes&&ht.attributes[lt]?vt.push(ht):vt.insert(ht.insert,(0,h.default)({},M({},lt,pt),ht.attributes))},new d.default)}function Y(nt){if(nt.nodeType!==Node.ELEMENT_NODE)return{};var lt="__ql-computed-style";return nt[lt]||(nt[lt]=window.getComputedStyle(nt))}function X(nt,lt){for(var pt="",vt=nt.ops.length-1;vt>=0&&pt.length<lt.length;--vt){var ht=nt.ops[vt];if(typeof ht.insert!="string")break;pt=ht.insert+pt}return pt.slice(-1*lt.length)===lt}function $(nt){if(nt.childNodes.length===0)return!1;var lt=Y(nt);return["block","list-item"].indexOf(lt.display)>-1}function V(nt,lt,pt){return nt.nodeType===nt.TEXT_NODE?pt.reduce(function(vt,ht){return ht(nt,vt)},new d.default):nt.nodeType===nt.ELEMENT_NODE?[].reduce.call(nt.childNodes||[],function(vt,ht){var Pt=V(ht,lt,pt);return ht.nodeType===nt.ELEMENT_NODE&&(Pt=lt.reduce(function(Lt,Nt){return Nt(ht,Lt)},Pt),Pt=(ht[it]||[]).reduce(function(Lt,Nt){return Nt(ht,Lt)},Pt)),vt.concat(Pt)},new d.default):new d.default}function tt(nt,lt,pt){return G(pt,nt,!0)}function et(nt,lt){var pt=v.default.Attributor.Attribute.keys(nt),vt=v.default.Attributor.Class.keys(nt),ht=v.default.Attributor.Style.keys(nt),Pt={};return pt.concat(vt).concat(ht).forEach(function(Lt){var Nt=v.default.query(Lt,v.default.Scope.ATTRIBUTE);Nt!=null&&(Pt[Nt.attrName]=Nt.value(nt),Pt[Nt.attrName])||(Nt=D[Lt],Nt!=null&&(Nt.attrName===Lt||Nt.keyName===Lt)&&(Pt[Nt.attrName]=Nt.value(nt)||void 0),Nt=k[Lt],Nt!=null&&(Nt.attrName===Lt||Nt.keyName===Lt)&&(Nt=k[Lt],Pt[Nt.attrName]=Nt.value(nt)||void 0))}),Object.keys(Pt).length>0&&(lt=G(lt,Pt)),lt}function rt(nt,lt){var pt=v.default.query(nt);if(pt==null)return lt;if(pt.prototype instanceof v.default.Embed){var vt={},ht=pt.value(nt);ht!=null&&(vt[pt.blotName]=ht,lt=new d.default().insert(vt,pt.formats(nt)))}else typeof pt.formats=="function"&&(lt=G(lt,pt.blotName,pt.formats(nt)));return lt}function ot(nt,lt){return X(lt,`
1982
1993
  `)||lt.insert(`
1983
- `),lt}function dt(){return new d.default}function gt(rt,lt){var pt=v.default.query(rt);if(pt==null||pt.blotName!=="list-item"||!X(lt,`
1984
- `))return lt;for(var vt=-1,ct=rt.parentNode;!ct.classList.contains("ql-clipboard");)(v.default.query(ct)||{}).blotName==="list"&&(vt+=1),ct=ct.parentNode;return vt<=0?lt:lt.compose(new d.default().retain(lt.length()-1).retain(1,{indent:vt}))}function yt(rt,lt){return X(lt,`
1985
- `)||($(rt)||lt.length()>0&&rt.nextSibling&&$(rt.nextSibling))&&lt.insert(`
1986
- `),lt}function Tt(rt,lt){if($(rt)&&rt.nextElementSibling!=null&&!X(lt,`
1994
+ `),lt}function ct(){return new d.default}function gt(nt,lt){var pt=v.default.query(nt);if(pt==null||pt.blotName!=="list-item"||!X(lt,`
1995
+ `))return lt;for(var vt=-1,ht=nt.parentNode;!ht.classList.contains("ql-clipboard");)(v.default.query(ht)||{}).blotName==="list"&&(vt+=1),ht=ht.parentNode;return vt<=0?lt:lt.compose(new d.default().retain(lt.length()-1).retain(1,{indent:vt}))}function yt(nt,lt){return X(lt,`
1996
+ `)||($(nt)||lt.length()>0&&nt.nextSibling&&$(nt.nextSibling))&&lt.insert(`
1997
+ `),lt}function St(nt,lt){if($(nt)&&nt.nextElementSibling!=null&&!X(lt,`
1987
1998
 
1988
- `)){var pt=rt.offsetHeight+parseFloat(Y(rt).marginTop)+parseFloat(Y(rt).marginBottom);rt.nextElementSibling.offsetTop>rt.offsetTop+pt*1.5&&lt.insert(`
1989
- `)}return lt}function te(rt,lt){var pt={},vt=rt.style||{};return vt.fontStyle&&Y(rt).fontStyle==="italic"&&(pt.italic=!0),vt.fontWeight&&(Y(rt).fontWeight.startsWith("bold")||parseInt(Y(rt).fontWeight)>=700)&&(pt.bold=!0),Object.keys(pt).length>0&&(lt=G(lt,pt)),parseFloat(vt.textIndent||0)>0&&(lt=new d.default().insert(" ").concat(lt)),lt}function Lt(rt,lt){var pt=rt.data;if(rt.parentNode.tagName==="O:P")return lt.insert(pt.trim());if(pt.trim().length===0&&rt.parentNode.classList.contains("ql-clipboard"))return lt;if(!Y(rt.parentNode).whiteSpace.startsWith("pre")){var vt=function(Pt,Ft){return Ft=Ft.replace(/[^\u00a0]/g,""),Ft.length<1&&Pt?" ":Ft};pt=pt.replace(/\r\n/g," ").replace(/\n/g," "),pt=pt.replace(/\s\s+/g,vt.bind(vt,!0)),(rt.previousSibling==null&&$(rt.parentNode)||rt.previousSibling!=null&&$(rt.previousSibling))&&(pt=pt.replace(/^\s+/,vt.bind(vt,!1))),(rt.nextSibling==null&&$(rt.parentNode)||rt.nextSibling!=null&&$(rt.nextSibling))&&(pt=pt.replace(/\s+$/,vt.bind(vt,!1)))}return lt.insert(pt)}n.default=j,n.matchAttributor=et,n.matchBlot=it,n.matchNewline=yt,n.matchSpacing=Tt,n.matchText=Lt},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(y,b){for(var _=0;_<b.length;_++){var w=b[_];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,b,_){return b&&m(y.prototype,b),_&&m(y,_),y}}(),l=function m(y,b,_){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,b);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,b,_)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(_)}},u=i(6),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(){return p(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,[{key:"optimize",value:function(_){l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"optimize",this).call(this,_),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),y}(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](),W;!(q=(W=nt.next()).done)&&(F.push(W.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")}}(),l=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=_(u),h=i(0),p=_(h),d=i(5),c=_(d),v=i(10),m=_(v),y=i(9),b=_(y);function _(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 S(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,m.default)("quill:toolbar"),A=function(C){S(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,W){nt===c.default.events.SELECTION_CHANGE&&q.update(W)}),q.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var nt=q.quill.selection.getRange(),W=o(nt,1),D=W[0];q.update(D)}),q}return l(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(p.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 W=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var D=F.options[F.selectedIndex];D.hasAttribute("selected")?W=!1:W=D.value||!1}else F.classList.contains("ql-active")?W=!1:W=F.value||!F.hasAttribute("value"),nt.preventDefault();q.quill.focus();var k=q.quill.selection.getRange(),j=o(k,1),G=j[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,W);else if(p.default.query(Z).prototype instanceof p.default.Embed){if(W=prompt("Enter "+Z),!W)return;q.quill.updateContents(new f.default().retain(G.index).delete(G.length).insert(w({},Z,W)),c.default.sources.USER)}else q.quill.format(Z,W,c.default.sources.USER);q.update(G)}),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],W=z[1];if(W.tagName==="SELECT"){var D=void 0;if(F==null)D=null;else if(q[nt]==null)D=W.querySelector("option[selected]");else if(!Array.isArray(q[nt])){var k=q[nt];typeof k=="string"&&(k=k.replace(/\"/g,'\\"')),D=W.querySelector('option[value="'+k+'"]')}D==null?(W.value="",W.selectedIndex=-1):D.selected=!0}else if(F==null)W.classList.remove("ql-active");else if(W.hasAttribute("value")){var j=q[nt]===W.getAttribute("value")||q[nt]!=null&&q[nt].toString()===W.getAttribute("value")||q[nt]==null&&!W.getAttribute("value");W.classList.toggle("ql-active",j)}else W.classList.toggle("ql-active",q[nt]!=null)})}}]),P}(b.default);A.DEFAULTS={};function O(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")O(F,q);else{var Z=Object.keys(q)[0],z=q[Z];Array.isArray(z)?R(F,Z,z):O(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)}A.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){p.default.query(q,p.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=A,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 m(y,b){for(var _=0;_<b.length;_++){var w=b[_];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,b,_){return b&&m(y.prototype,b),_&&m(y,_),y}}(),l=function m(y,b,_){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,b);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,b,_)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(_)}},u=i(28),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(b,_){p(this,y);var w=d(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,b));return w.label.innerHTML=_,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(y,[{key:"buildItem",value:function(_){var w=l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"buildItem",this).call(this,_);return w.style.backgroundColor=_.getAttribute("value")||"",w}},{key:"selectItem",value:function(_,w){l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"selectItem",this).call(this,_,w);var T=this.label.querySelector(".ql-color-label"),x=_&&_.getAttribute("data-value")||"";T&&(T.tagName==="line"?T.style.stroke=x:T.style.fill=x)}}]),y}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(y,b){for(var _=0;_<b.length;_++){var w=b[_];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,b,_){return b&&m(y.prototype,b),_&&m(y,_),y}}(),l=function m(y,b,_){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,b);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,b,_)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(_)}},u=i(28),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(b,_){p(this,y);var w=d(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,b));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(T){T.innerHTML=_[T.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return o(y,[{key:"selectItem",value:function(_,w){l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"selectItem",this).call(this,_,w),_=_||this.defaultItem,this.label.innerHTML=_.innerHTML}}]),y}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,p){for(var d=0;d<p.length;d++){var c=p[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,p,d){return p&&f(h.prototype,p),d&&f(h,d),h}}();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,p){var d=this;l(this,f),this.quill=h,this.boundsContainer=p||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(){d.root.style.marginTop=-1*d.quill.root.scrollTop+"px"}),this.hide()}return o(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(p){var d=p.left+p.width/2-this.root.offsetWidth/2,c=p.bottom+this.quill.root.scrollTop;this.root.style.left=d+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),m=this.root.getBoundingClientRect(),y=0;if(m.right>v.right&&(y=v.right-m.right,this.root.style.left=d+y+"px"),m.left<v.left&&(y=v.left-m.left,this.root.style.left=d+y+"px"),m.bottom>v.bottom){var b=m.bottom-m.top,_=p.bottom-p.top+b;this.root.style.top=c-_+"px",this.root.classList.add("ql-flip")}return y}},{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(W){q=!0,Z=W}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")}}(),l=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),p=i(8),d=T(p),c=i(43),v=T(c),m=i(27),y=T(m),b=i(15),_=i(41),w=T(_);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 S(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 A=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],O=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=A);var F=S(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);O.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=S(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;l(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,d.default.sources.USER),delete M.linkRange}F.preventDefault(),M.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===d.default.sources.USER){var z=M.quill.scroll.descendant(y.default,F.index),nt=o(z,2),W=nt[0],D=nt[1];if(W!=null){M.linkRange=new b.Range(F.index-D,W.length());var k=y.default.formats(W.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(){l(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=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(29),l=ct(o),u=i(36),f=i(38),h=i(64),p=i(65),d=ct(p),c=i(66),v=ct(c),m=i(67),y=ct(m),b=i(37),_=i(26),w=i(39),T=i(40),x=i(56),S=ct(x),I=i(68),A=ct(I),O=i(27),L=ct(O),R=i(69),C=ct(R),P=i(70),M=ct(P),F=i(71),q=ct(F),Z=i(72),z=ct(Z),nt=i(73),W=ct(nt),D=i(13),k=ct(D),j=i(74),G=ct(j),Y=i(75),X=ct(Y),$=i(57),V=ct($),tt=i(41),et=ct(tt),it=i(28),st=ct(it),dt=i(59),gt=ct(dt),yt=i(60),Tt=ct(yt),te=i(61),Lt=ct(te),rt=i(108),lt=ct(rt),pt=i(62),vt=ct(pt);function ct(Pt){return Pt&&Pt.__esModule?Pt:{default:Pt}}l.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":b.BackgroundClass,"attributors/class/color":_.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":_.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":T.SizeStyle},!0),l.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":b.BackgroundStyle,"formats/color":_.ColorStyle,"formats/font":w.FontClass,"formats/size":T.SizeClass,"formats/blockquote":d.default,"formats/code-block":k.default,"formats/header":v.default,"formats/list":y.default,"formats/bold":S.default,"formats/code":D.Code,"formats/italic":A.default,"formats/link":L.default,"formats/script":C.default,"formats/strike":M.default,"formats/underline":q.default,"formats/image":z.default,"formats/video":W.default,"formats/list/item":m.ListItem,"modules/formula":G.default,"modules/syntax":X.default,"modules/toolbar":V.default,"themes/bubble":lt.default,"themes/snow":vt.default,"ui/icons":et.default,"ui/picker":st.default,"ui/icon-picker":Tt.default,"ui/color-picker":gt.default,"ui/tooltip":Lt.default},!0),n.default=l.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var o=function(){function y(b,_){for(var w=0;w<_.length;w++){var T=_[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(b,T.key,T)}}return function(b,_,w){return _&&y(b.prototype,_),w&&y(b,w),b}}(),l=function y(b,_,w){b===null&&(b=Function.prototype);var T=Object.getOwnPropertyDescriptor(b,_);if(T===void 0){var x=Object.getPrototypeOf(b);return x===null?void 0:y(x,_,w)}else{if("value"in T)return T.value;var S=T.get;return S===void 0?void 0:S.call(w)}},u=i(0),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,b){if(!(y instanceof b))throw new TypeError("Cannot call a class as a function")}function d(y,b){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:y}function c(y,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);y.prototype=Object.create(b&&b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(y,b):y.__proto__=b)}var v=function(y){c(b,y);function b(){return p(this,b),d(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):l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"add",this).call(this,w,T)}},{key:"canAdd",value:function(w,T){return l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"canAdd",this).call(this,w,T)||l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"canAdd",this).call(this,w,parseInt(T))}},{key:"value",value:function(w){return parseInt(l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"value",this).call(this,w))||void 0}}]),b}(f.default.Attributor.Class),m=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(4),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="blockquote",d.tagName="blockquote",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function v(m,y){for(var b=0;b<y.length;b++){var _=y[b];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}return function(m,y,b){return y&&v(m.prototype,y),b&&v(m,b),m}}(),l=i(4),u=f(l);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}function p(v,m){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:v}function d(v,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);v.prototype=Object.create(m&&m.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(v,m):v.__proto__=m)}var c=function(v){d(m,v);function m(){return h(this,m),p(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,null,[{key:"formats",value:function(b){return this.tagName.indexOf(b.tagName)+1}}]),m}(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(S,I){for(var A=0;A<I.length;A++){var O=I[A];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(S,O.key,O)}}return function(S,I,A){return I&&x(S.prototype,I),A&&x(S,A),S}}(),l=function x(S,I,A){S===null&&(S=Function.prototype);var O=Object.getOwnPropertyDescriptor(S,I);if(O===void 0){var L=Object.getPrototypeOf(S);return L===null?void 0:x(L,I,A)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(A)}},u=i(0),f=v(u),h=i(4),p=v(h),d=i(25),c=v(d);function v(x){return x&&x.__esModule?x:{default:x}}function m(x,S,I){return S in x?Object.defineProperty(x,S,{value:I,enumerable:!0,configurable:!0,writable:!0}):x[S]=I,x}function y(x,S){if(!(x instanceof S))throw new TypeError("Cannot call a class as a function")}function b(x,S){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:x}function _(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);x.prototype=Object.create(S&&S.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(x,S):x.__proto__=S)}var w=function(x){_(S,x);function S(){return y(this,S),b(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return o(S,[{key:"format",value:function(A,O){A===T.blotName&&!O?this.replaceWith(f.default.create(this.statics.scope)):l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,A,O)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(A,O){return this.parent.isolate(this.offset(this.parent),this.length()),A===this.parent.statics.blotName?(this.parent.replaceWith(A,O),this):(this.parent.unwrap(),l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,A,O))}}],[{key:"formats",value:function(A){return A.tagName===this.tagName?void 0:l(S.__proto__||Object.getPrototypeOf(S),"formats",this).call(this,A)}}]),S}(p.default);w.blotName="list-item",w.tagName="LI";var T=function(x){_(S,x),o(S,null,[{key:"create",value:function(A){var O=A==="ordered"?"OL":"UL",L=l(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,O);return(A==="checked"||A==="unchecked")&&L.setAttribute("data-checked",A==="checked"),L}},{key:"formats",value:function(A){if(A.tagName==="OL")return"ordered";if(A.tagName==="UL")return A.hasAttribute("data-checked")?A.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function S(I){y(this,S);var A=b(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I)),O=function(R){if(R.target.parentNode===I){var C=A.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",O),I.addEventListener("mousedown",O),A}return o(S,[{key:"format",value:function(A,O){this.children.length>0&&this.children.tail.format(A,O)}},{key:"formats",value:function(){return m({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,O){if(A instanceof w)l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,A,O);else{var L=O==null?this.length():O.offset(this),R=this.split(L);R.parent.insertBefore(A,R)}}},{key:"optimize",value:function(A){l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,A);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var O=f.default.create(this.statics.defaultChild);A.moveChildren(O),this.appendChild(O)}l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,A)}}]),S}(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),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="italic",d.tagName=["EM","I"],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(y,b){for(var _=0;_<b.length;_++){var w=b[_];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,b,_){return b&&m(y.prototype,b),_&&m(y,_),y}}(),l=function m(y,b,_){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,b);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,b,_)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(_)}},u=i(6),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(){return p(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,null,[{key:"create",value:function(_){return _==="super"?document.createElement("sup"):_==="sub"?document.createElement("sub"):l(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,_)}},{key:"formats",value:function(_){if(_.tagName==="SUB")return"sub";if(_.tagName==="SUP")return"super"}}]),y}(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),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="strike",d.tagName="S",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="underline",d.tagName="U",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(_,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(_,x.key,x)}}return function(_,w,T){return w&&b(_.prototype,w),T&&b(_,T),_}}(),l=function b(_,w,T){_===null&&(_=Function.prototype);var x=Object.getOwnPropertyDescriptor(_,w);if(x===void 0){var S=Object.getPrototypeOf(_);return S===null?void 0:b(S,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=p(u),h=i(27);function p(b){return b&&b.__esModule?b:{default:b}}function d(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function c(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function v(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var m=["alt","height","width"],y=function(b){v(_,b);function _(){return d(this,_),c(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"format",value:function(T,x){m.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=l(_.__proto__||Object.getPrototypeOf(_),"create",this).call(this,T);return typeof T=="string"&&x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return m.reduce(function(x,S){return T.hasAttribute(S)&&(x[S]=T.getAttribute(S)),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")}}]),_}(f.default.Embed);y.blotName="image",y.tagName="IMG",n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function b(_,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(_,x.key,x)}}return function(_,w,T){return w&&b(_.prototype,w),T&&b(_,T),_}}(),l=function b(_,w,T){_===null&&(_=Function.prototype);var x=Object.getOwnPropertyDescriptor(_,w);if(x===void 0){var S=Object.getPrototypeOf(_);return S===null?void 0:b(S,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=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function d(b,_){if(!(b instanceof _))throw new TypeError("Cannot call a class as a function")}function c(b,_){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:b}function v(b,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);b.prototype=Object.create(_&&_.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(b,_):b.__proto__=_)}var m=["height","width"],y=function(b){v(_,b);function _(){return d(this,_),c(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{key:"format",value:function(T,x){m.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=l(_.__proto__||Object.getPrototypeOf(_),"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 m.reduce(function(x,S){return T.hasAttribute(S)&&(x[S]=T.getAttribute(S)),x},{})}},{key:"sanitize",value:function(T){return h.default.sanitize(T)}},{key:"value",value:function(T){return T.getAttribute("src")}}]),_}(u.BlockEmbed);y.blotName="video",y.className="ql-video",y.tagName="IFRAME",n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var o=function(){function T(x,S){for(var I=0;I<S.length;I++){var A=S[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,S,I){return S&&T(x.prototype,S),I&&T(x,I),x}}(),l=function T(x,S,I){x===null&&(x=Function.prototype);var A=Object.getOwnPropertyDescriptor(x,S);if(A===void 0){var O=Object.getPrototypeOf(x);return O===null?void 0:T(O,S,I)}else{if("value"in A)return A.value;var L=A.get;return L===void 0?void 0:L.call(I)}},u=i(35),f=v(u),h=i(5),p=v(h),d=i(9),c=v(d);function v(T){return T&&T.__esModule?T:{default:T}}function m(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 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 _=function(T){b(x,T);function x(){return m(this,x),y(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(I){var A=l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return typeof I=="string"&&(window.katex.render(I,A,{throwOnError:!1,errorColor:"#f00"}),A.setAttribute("data-value",I)),A}},{key:"value",value:function(I){return I.getAttribute("data-value")}}]),x}(f.default);_.blotName="formula",_.className="ql-formula",_.tagName="SPAN";var w=function(T){b(x,T),o(x,null,[{key:"register",value:function(){p.default.register(_,!0)}}]);function x(){m(this,x);var S=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return S}return x}(c.default);n.FormulaBlot=_,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(A,O){for(var L=0;L<O.length;L++){var R=O[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,R.key,R)}}return function(A,O,L){return O&&I(A.prototype,O),L&&I(A,L),A}}(),l=function I(A,O,L){A===null&&(A=Function.prototype);var R=Object.getOwnPropertyDescriptor(A,O);if(R===void 0){var C=Object.getPrototypeOf(A);return C===null?void 0:I(C,O,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=y(u),h=i(5),p=y(h),d=i(9),c=y(d),v=i(13),m=y(v);function y(I){return I&&I.__esModule?I:{default:I}}function b(I,A){if(!(I instanceof A))throw new TypeError("Cannot call a class as a function")}function _(I,A){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:I}function w(I,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);I.prototype=Object.create(A&&A.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(I,A):I.__proto__=A)}var T=function(I){w(A,I);function A(){return b(this,A),_(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return o(A,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),l(A.prototype.__proto__||Object.getPrototypeOf(A.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)}}]),A}(m.default);T.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),S=function(I){w(A,I),o(A,null,[{key:"register",value:function(){p.default.register(x,!0),p.default.register(T,!0)}}]);function A(O,L){b(this,A);var R=_(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,O,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(p.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(C),C=setTimeout(function(){R.highlight(),C=null},R.options.interval)}),R.highlight(),R}return o(A,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(p.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(T).forEach(function(C){C.highlight(L.options.highlight)}),this.quill.update(p.default.sources.SILENT),R!=null&&this.quill.setSelection(R,p.default.sources.SILENT)}}}]),A}(c.default);S.DEFAULTS={highlight:function(){return window.hljs==null?null:function(I){var A=window.hljs.highlightAuto(I);return A.value}}(),interval:1e3},n.CodeBlock=T,n.CodeToken=x,n.default=S},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 A(O,L,R){O===null&&(O=Function.prototype);var C=Object.getOwnPropertyDescriptor(O,L);if(C===void 0){var P=Object.getPrototypeOf(O);return P===null?void 0:A(P,L,R)}else{if("value"in C)return C.value;var M=C.get;return M===void 0?void 0:M.call(R)}},l=function(){function A(O,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(O,C.key,C)}}return function(O,L,R){return L&&A(O.prototype,L),R&&A(O,R),O}}(),u=i(3),f=b(u),h=i(8),p=b(h),d=i(43),c=b(d),v=i(15),m=i(41),y=b(m);function b(A){return A&&A.__esModule?A:{default:A}}function _(A,O){if(!(A instanceof O))throw new TypeError("Cannot call a class as a function")}function w(A,O){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:A}function T(A,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);A.prototype=Object.create(O&&O.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(A,O):A.__proto__=O)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],S=function(A){T(O,A);function O(L,R){_(this,O),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.container.classList.add("ql-bubble"),C}return l(O,[{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")),y.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),y.default)}}]),O}(c.default);S.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){O?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var I=function(A){T(O,A);function O(L,R){_(this,O);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.on(p.default.events.EDITOR_CHANGE,function(P,M,F,q){if(P===p.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&q===p.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),W=Math.min(z.length()-1,M.index+M.length-nt),D=C.quill.getBounds(new v.Range(nt,W));C.position(D)}}else document.activeElement!==C.textbox&&C.quill.hasFocus()&&C.hide()}),C}return l(O,[{key:"listen",value:function(){var R=this;o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(p.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(O.prototype.__proto__||Object.getPrototypeOf(O.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"}}]),O}(d.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=S},function(r,n,i){r.exports=i(63)}]).default})})(bv);var dN=bv.exports;const pN=En(dN),eB="",vN=St.forwardRef((e,t)=>{const[r,n]=_t.useState(!1),i=300,o=_t.useRef(null),l=_t.useRef(0),u=_t.useRef(null),f=_t.useRef(null),h=_t.useRef(null),p=_t.useRef(16),d=_t.useRef(null),c=_t.useRef(null),{uniqueId:v,text:m,disabled:y,transformation:b,onTextUpdate:_,pointerdown:w,onExitQuillEditor:T}=e,{x,y:S,fontFamily:I="Arial",fontWeight:A="normal",fontStyle:O="normal",fontSize:L=16,fontVariant:R="normal",fill:C="black",stroke:P,strokeThickness:M=0,blurRadius:F=0,blurEnabled:q=!1,dropShadowColor:Z=null,dropShadow:z=!1,dropShadowBlur:nt=0,wordWrapWidth:W=5e7,leading:D=0,letterSpacing:k,colorCorrection:j={}}=b,{temperatureFilter:G,sharpnessFilter:Y,hueFilter:X,blurFilter:$,adjustmentFilter:V}=_s(j),{blurRadius:tt=0}=j;St.useEffect(()=>{p.current=Number(L)},[L]);const et=["italic","oblique"].includes(O)?O:void 0,it=["small-caps"].includes(R),st=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,dt=Number(k)>0?k:void 0,gt=St.useMemo(()=>new on.TextStyle({fontFamily:I,fontSize:L,fill:C||"white",...P&&M>0&&{stroke:P,strokeThickness:M},...et&&{fontStyle:et},...it&&{fontVariant:it},...st&&{fontWeight:st},...dt&&{letterSpacing:dt},...q&&{dropShadow:!0,dropShadowBlur:Number(F),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...z&&{dropShadow:!0,dropShadowBlur:Number(nt),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:W||500,leading:D||0}),[q,F,C,I,L,O,D,et,st,it,dt,Z,P,M,W,z,nt]);St.useEffect(()=>{d.current={...b}},[b]);const yt=()=>{console.log("double click triggered"),n(!0)},Tt=()=>{const rt=new Date().getTime();rt-l.current<i?yt():w&&w(),l.current=rt},te=rt=>{_&&_({text:rt,uniqueId:v})},Lt=()=>{n(!1),T&&T()};return St.useEffect(()=>{if(r&&f.current){let rt=document.getElementById("note-editor");if(rt){rt.style.position="absolute",rt.style.display="block",rt.style.zIndex="10",rt.style.left=x+"px",rt.style.top=S+"px",rt.style.backgroundColor="var(--chakra-color-darkShark)",rt.style.transform="scale(1.5)",rt.style.width="300px",rt.style.height="100px",rt.style.color="#fff",rt.style.fontSize="20px",rt.style.border="1px solid #CBCEE0";const lt={esc:{key:27,handler:function(){Lt()}},enter:{key:13,handler:function(){Lt()}}};if(c.current=new pN("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...lt}}},placeholder:"Compose your text here...",theme:"snow"}),c.current){c.current.on("text-change",function(){c.current&&te(c.current.root.innerText)}),c.current.setText(m),c.current.focus(),c.current.off("text-change",()=>{console.log("removed")}),c.current.hasFocus()||(rt.style.display="none");const pt=document.createElement("button");pt.innerHTML="&#10006;",pt.style.position="absolute",pt.style.bottom="-14px",pt.style.left="-3px",pt.style.cursor="pointer",pt.addEventListener("click",()=>{Lt()}),pt.style.border="none",pt.style.borderRadius="50%",pt.style.width="15px",pt.style.height="15px",pt.style.backgroundColor="#f8f8f8",pt.style.color="#333",pt.style.fontSize="10px",rt.appendChild(pt)}}}else if(c.current){let rt=document.getElementById("note-editor");rt&&rt.hasChildNodes()&&(rt.removeChild(rt.firstChild),rt.removeAttribute("class"),rt.removeAttribute("style")),c.current.off("text-change",()=>{console.log("removed")})}return()=>{c.current&&c.current.off("text-change",()=>{})}},[x,S,r]),St.useEffect(()=>{if(!r){const rt=document.getElementById("note-editor");rt&&(rt.style.display="none")}},[r]),re.jsx(ni,{...e,ref:t,isText:!0,onDoubleClick:yt,isTextEditMode:r,children:re.jsxs(ye.Container,{ref:o,children:[r&&re.jsx(ye.Container,{ref:f}),re.jsx(ye.Container,{alpha:r?0:1,ref:h,children:re.jsx(ye.Text,{style:gt,x,y:S,anchor:.5,text:m,...!r&&!y&&{interactive:!0,buttonMode:!0,pointerdown:Tt},ref:u,filters:[G,Y,X,V,...tt>0?[$]:[]]})})]})})}),gN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},mN=St.forwardRef((e,t)=>{const[,r]=St.useState(!1),[,n]=St.useState({isWaiting:!1,isStalled:!1}),[i,o]=St.useState(),l=_t.useRef(null),u=_t.useRef(null),f=_t.useRef(null),h=_t.useRef(gN),p=_t.useRef(),{tl:d,isDragging:c}=_t.useContext(ti),{uniqueId:v,mute:m=!1,src:y,startAt:b,endAt:_,frameStartAt:w,frameEndAt:T,transformation:{x,y:S,width:I,height:A,animation:O,colorCorrection:L={}},pointerdown:R}=e,{blurRadius:C=0}=L,{temperatureFilter:P,sharpnessFilter:M,hueFilter:F,blurFilter:q,adjustmentFilter:Z}=_s(L),z=y||"",nt=St.useMemo(()=>{const G=document.createElement("video");return G.src=y,G.crossOrigin="Anonymus",G.autoplay=!1,G.currentTime=w===0?.001:w,G},[y,w]);mr(ke.PAUSE,()=>{if(f.current){const G=f.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&f.current.pause(),h.current.isPlaying=!1}}),St.useEffect(()=>{f.current&&(c?(f.current.pause(),h.current.isPlaying=!1,h.current.isDragging=!0):h.current.isDragging=!1,f.current.muted=m)},[m,c]);const W=G=>{f.current&&(f.current.currentTime=Number(G),c||(f.current.currentTime=Number(G),f.current.play(),h.current.isPlaying=!0))},D=()=>{if(f.current){const G=f.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&f.current.pause(),h.current.isPlaying=!1}},k=()=>{},j=()=>{var G;if(f.current&&p.current){const Y=w+((G=p.current)==null?void 0:G.time());Math.abs(f.current.currentTime-Y);const X=f.current,$=X.currentTime>0&&!X.paused&&!X.ended&&X.readyState>X.HAVE_CURRENT_DATA;h.current.isDragging?(f.current.currentTime=Y,f.current.play(),setTimeout(()=>{h.current.isPlaying=!1,f.current&&f.current.pause()},300),h.current.isPlaying=!1):h.current.isPlaying||($||f.current.play(),h.current.isPlaying=!0)}};return _t.useEffect(()=>{let G=Te.context(()=>{});if(u.current&&d.current){console.log("timlinepixi",w,T);const Y={duration:Number(T)-Number(w),onStart:W,onComplete:D,onStartParams:[w,T],onCompleteParams:[],onInterrupt:k,onUpdate:j,onUpdateParams:[w,T]};p.current&&p.current.kill(),G=Te.context(()=>{p.current=Te.from(u.current,Y,w),d.current.add(p.current,b)})}return()=>{p.current&&(p.current.kill(),Te.killTweensOf(p.current)),G.revert()}},[O,b,_,w,T]),St.useEffect(()=>{u.current&&r(!0)},[]),St.useEffect(()=>{f.current&&(f.current.muted=m)},[m]),St.useEffect(()=>{if(f.current){const G=f.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&c&&(f.current.pause(),h.current.isPlaying=!1)}},[c]),St.useEffect(()=>{const G=Math.round((Number(w)+Number.EPSILON)*100)/100,Y=function(){f.current&&(f.current.currentTime=G)},X=function(){if(f.current){const dt=f.current;dt.currentTime>0&&!dt.paused&&!dt.ended&&dt.readyState>dt.HAVE_CURRENT_DATA&&f.current.pause()}n({isWaiting:!1,isStalled:!1})},$=function(){f.current&&f.current.pause(),n({isWaiting:!0,isStalled:!1})},V=function(){n({isWaiting:!1,isStalled:!1})},tt=function(){n({isWaiting:!1,isStalled:!0})},et=Math.round((Number(w)+Number.EPSILON)*100)/100,it=Math.round((Number(T)+Number.EPSILON)*100)/100,st=`${z}#t=${et},${it}`;return console.log("urlTimestap",st),on.Texture.fromLoader(nt,st,v,{pixiIdPrefix:v,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(dt=>{dt&&(o(dt),f.current=dt.baseTexture.resource.source,f.current.id=v,f.current.addEventListener("loadedmetadata",Y),f.current.addEventListener("ended",X),f.current.addEventListener("loadstart",$),f.current.addEventListener("canplaythrough",V),f.current.addEventListener("stalled",tt))}),()=>{f.current&&(f.current.pause(),f.current.removeEventListener("loadedmetadata",Y),f.current.removeEventListener("ended",X),f.current.removeEventListener("loadstart",$),f.current.removeEventListener("canplaythrough",V),f.current.removeEventListener("stalled",tt))}},[z,v,w,T,nt]),re.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,children:re.jsx(ye.Container,{ref:u,children:i&&re.jsx(ye.Sprite,{texture:i,width:I,height:A,anchor:.5,x,y:S,ref:l,interactive:!0,pointerdown:R,filters:[P,M,F,Z,...C>0?[q]:[]]})})})});var xv=(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))(xv||{}),wv=(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))(wv||{});se.Animations=xv,se.BlendModes=wv,se.Events=ke,se.GsapPixieContext=ti,se.GsapPixieContextProvider=hy,se.PixiAnimatedSprite=yv,se.PixiAudioSprite=IS,se.PixiGifSprite=hN,se.PixiImageSprite=qE,se.PixiSvgPathSprite=eS,se.PixiTextSprite=vN,se.PixiVideoSprite=mN,se.emitCustomEvent=Jn,se.newCustomEventEmitter=cy,se.useCustomEventListener=mr,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
1999
+ `)){var pt=nt.offsetHeight+parseFloat(Y(nt).marginTop)+parseFloat(Y(nt).marginBottom);nt.nextElementSibling.offsetTop>nt.offsetTop+pt*1.5&&lt.insert(`
2000
+ `)}return lt}function ee(nt,lt){var pt={},vt=nt.style||{};return vt.fontStyle&&Y(nt).fontStyle==="italic"&&(pt.italic=!0),vt.fontWeight&&(Y(nt).fontWeight.startsWith("bold")||parseInt(Y(nt).fontWeight)>=700)&&(pt.bold=!0),Object.keys(pt).length>0&&(lt=G(lt,pt)),parseFloat(vt.textIndent||0)>0&&(lt=new d.default().insert(" ").concat(lt)),lt}function Ut(nt,lt){var pt=nt.data;if(nt.parentNode.tagName==="O:P")return lt.insert(pt.trim());if(pt.trim().length===0&&nt.parentNode.classList.contains("ql-clipboard"))return lt;if(!Y(nt.parentNode).whiteSpace.startsWith("pre")){var vt=function(Pt,Lt){return Lt=Lt.replace(/[^\u00a0]/g,""),Lt.length<1&&Pt?" ":Lt};pt=pt.replace(/\r\n/g," ").replace(/\n/g," "),pt=pt.replace(/\s\s+/g,vt.bind(vt,!0)),(nt.previousSibling==null&&$(nt.parentNode)||nt.previousSibling!=null&&$(nt.previousSibling))&&(pt=pt.replace(/^\s+/,vt.bind(vt,!1))),(nt.nextSibling==null&&$(nt.parentNode)||nt.nextSibling!=null&&$(nt.nextSibling))&&(pt=pt.replace(/\s+$/,vt.bind(vt,!1)))}return lt.insert(pt)}n.default=j,n.matchAttributor=et,n.matchBlot=rt,n.matchNewline=yt,n.matchSpacing=St,n.matchText=Ut},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(y,_){for(var b=0;b<_.length;b++){var w=_[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,_,b){return _&&m(y.prototype,_),b&&m(y,b),y}}(),l=function m(y,_,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,_);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,_,b)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(b)}},u=i(6),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(){return p(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,[{key:"optimize",value:function(b){l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"optimize",this).call(this,b),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return l(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),y}(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 it=P[Symbol.iterator](),W;!(q=(W=it.next()).done)&&(F.push(W.value),!(M&&F.length===M));q=!0);}catch(D){Z=!0,z=D}finally{try{!q&&it.return&&it.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")}}(),l=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=b(u),h=i(0),p=b(h),d=i(5),c=b(d),v=i(10),m=b(v),y=i(9),_=b(y);function b(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 S(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,m.default)("quill:toolbar"),A=function(C){S(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(it){q.addHandler(it,q.options.handlers[it])}),[].forEach.call(q.container.querySelectorAll("button, select"),function(it){q.attach(it)}),q.quill.on(c.default.events.EDITOR_CHANGE,function(it,W){it===c.default.events.SELECTION_CHANGE&&q.update(W)}),q.quill.on(c.default.events.SCROLL_OPTIMIZE,function(){var it=q.quill.selection.getRange(),W=o(it,1),D=W[0];q.update(D)}),q}return l(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(it){return it.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(p.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(it){var W=void 0;if(F.tagName==="SELECT"){if(F.selectedIndex<0)return;var D=F.options[F.selectedIndex];D.hasAttribute("selected")?W=!1:W=D.value||!1}else F.classList.contains("ql-active")?W=!1:W=F.value||!F.hasAttribute("value"),it.preventDefault();q.quill.focus();var k=q.quill.selection.getRange(),j=o(k,1),G=j[0];if(q.handlers[Z]!=null)q.handlers[Z].call(q,W);else if(p.default.query(Z).prototype instanceof p.default.Embed){if(W=prompt("Enter "+Z),!W)return;q.quill.updateContents(new f.default().retain(G.index).delete(G.length).insert(w({},Z,W)),c.default.sources.USER)}else q.quill.format(Z,W,c.default.sources.USER);q.update(G)}),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),it=z[0],W=z[1];if(W.tagName==="SELECT"){var D=void 0;if(F==null)D=null;else if(q[it]==null)D=W.querySelector("option[selected]");else if(!Array.isArray(q[it])){var k=q[it];typeof k=="string"&&(k=k.replace(/\"/g,'\\"')),D=W.querySelector('option[value="'+k+'"]')}D==null?(W.value="",W.selectedIndex=-1):D.selected=!0}else if(F==null)W.classList.remove("ql-active");else if(W.hasAttribute("value")){var j=q[it]===W.getAttribute("value")||q[it]!=null&&q[it].toString()===W.getAttribute("value")||q[it]==null&&!W.getAttribute("value");W.classList.toggle("ql-active",j)}else W.classList.toggle("ql-active",q[it]!=null)})}}]),P}(_.default);A.DEFAULTS={};function O(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")O(F,q);else{var Z=Object.keys(q)[0],z=q[Z];Array.isArray(z)?R(F,Z,z):O(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)}A.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){p.default.query(q,p.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=A,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 m(y,_){for(var b=0;b<_.length;b++){var w=_[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,_,b){return _&&m(y.prototype,_),b&&m(y,b),y}}(),l=function m(y,_,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,_);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,_,b)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(b)}},u=i(28),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(_,b){p(this,y);var w=d(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,_));return w.label.innerHTML=b,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(y,[{key:"buildItem",value:function(b){var w=l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"buildItem",this).call(this,b);return w.style.backgroundColor=b.getAttribute("value")||"",w}},{key:"selectItem",value:function(b,w){l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"selectItem",this).call(this,b,w);var T=this.label.querySelector(".ql-color-label"),x=b&&b.getAttribute("data-value")||"";T&&(T.tagName==="line"?T.style.stroke=x:T.style.fill=x)}}]),y}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(y,_){for(var b=0;b<_.length;b++){var w=_[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,_,b){return _&&m(y.prototype,_),b&&m(y,b),y}}(),l=function m(y,_,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,_);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,_,b)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(b)}},u=i(28),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(_,b){p(this,y);var w=d(this,(y.__proto__||Object.getPrototypeOf(y)).call(this,_));return w.container.classList.add("ql-icon-picker"),[].forEach.call(w.container.querySelectorAll(".ql-picker-item"),function(T){T.innerHTML=b[T.getAttribute("data-value")||""]}),w.defaultItem=w.container.querySelector(".ql-selected"),w.selectItem(w.defaultItem),w}return o(y,[{key:"selectItem",value:function(b,w){l(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"selectItem",this).call(this,b,w),b=b||this.defaultItem,this.label.innerHTML=b.innerHTML}}]),y}(f.default);n.default=v},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function f(h,p){for(var d=0;d<p.length;d++){var c=p[d];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(h,c.key,c)}}return function(h,p,d){return p&&f(h.prototype,p),d&&f(h,d),h}}();function l(f,h){if(!(f instanceof h))throw new TypeError("Cannot call a class as a function")}var u=function(){function f(h,p){var d=this;l(this,f),this.quill=h,this.boundsContainer=p||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(){d.root.style.marginTop=-1*d.quill.root.scrollTop+"px"}),this.hide()}return o(f,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(p){var d=p.left+p.width/2-this.root.offsetWidth/2,c=p.bottom+this.quill.root.scrollTop;this.root.style.left=d+"px",this.root.style.top=c+"px",this.root.classList.remove("ql-flip");var v=this.boundsContainer.getBoundingClientRect(),m=this.root.getBoundingClientRect(),y=0;if(m.right>v.right&&(y=v.right-m.right,this.root.style.left=d+y+"px"),m.left<v.left&&(y=v.left-m.left,this.root.style.left=d+y+"px"),m.bottom>v.bottom){var _=m.bottom-m.top,b=p.bottom-p.top+_;this.root.style.top=c-b+"px",this.root.classList.add("ql-flip")}return y}},{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](),it;!(F=(it=z.next()).done)&&(M.push(it.value),!(P&&M.length===P));F=!0);}catch(W){q=!0,Z=W}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")}}(),l=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),p=i(8),d=T(p),c=i(43),v=T(c),m=i(27),y=T(m),_=i(15),b=i(41),w=T(b);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 S(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 A=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],O=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=A);var F=S(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);O.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=S(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;l(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,d.default.sources.USER),delete M.linkRange}F.preventDefault(),M.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(F,q,Z){if(F!=null){if(F.length===0&&Z===d.default.sources.USER){var z=M.quill.scroll.descendant(y.default,F.index),it=o(z,2),W=it[0],D=it[1];if(W!=null){M.linkRange=new _.Range(F.index-D,W.length());var k=y.default.formats(W.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(){l(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=O},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(29),l=ht(o),u=i(36),f=i(38),h=i(64),p=i(65),d=ht(p),c=i(66),v=ht(c),m=i(67),y=ht(m),_=i(37),b=i(26),w=i(39),T=i(40),x=i(56),S=ht(x),I=i(68),A=ht(I),O=i(27),L=ht(O),R=i(69),C=ht(R),P=i(70),M=ht(P),F=i(71),q=ht(F),Z=i(72),z=ht(Z),it=i(73),W=ht(it),D=i(13),k=ht(D),j=i(74),G=ht(j),Y=i(75),X=ht(Y),$=i(57),V=ht($),tt=i(41),et=ht(tt),rt=i(28),ot=ht(rt),ct=i(59),gt=ht(ct),yt=i(60),St=ht(yt),ee=i(61),Ut=ht(ee),nt=i(108),lt=ht(nt),pt=i(62),vt=ht(pt);function ht(Pt){return Pt&&Pt.__esModule?Pt:{default:Pt}}l.default.register({"attributors/attribute/direction":f.DirectionAttribute,"attributors/class/align":u.AlignClass,"attributors/class/background":_.BackgroundClass,"attributors/class/color":b.ColorClass,"attributors/class/direction":f.DirectionClass,"attributors/class/font":w.FontClass,"attributors/class/size":T.SizeClass,"attributors/style/align":u.AlignStyle,"attributors/style/background":_.BackgroundStyle,"attributors/style/color":b.ColorStyle,"attributors/style/direction":f.DirectionStyle,"attributors/style/font":w.FontStyle,"attributors/style/size":T.SizeStyle},!0),l.default.register({"formats/align":u.AlignClass,"formats/direction":f.DirectionClass,"formats/indent":h.IndentClass,"formats/background":_.BackgroundStyle,"formats/color":b.ColorStyle,"formats/font":w.FontClass,"formats/size":T.SizeClass,"formats/blockquote":d.default,"formats/code-block":k.default,"formats/header":v.default,"formats/list":y.default,"formats/bold":S.default,"formats/code":D.Code,"formats/italic":A.default,"formats/link":L.default,"formats/script":C.default,"formats/strike":M.default,"formats/underline":q.default,"formats/image":z.default,"formats/video":W.default,"formats/list/item":m.ListItem,"modules/formula":G.default,"modules/syntax":X.default,"modules/toolbar":V.default,"themes/bubble":lt.default,"themes/snow":vt.default,"ui/icons":et.default,"ui/picker":ot.default,"ui/icon-picker":St.default,"ui/color-picker":gt.default,"ui/tooltip":Ut.default},!0),n.default=l.default},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.IndentClass=void 0;var o=function(){function y(_,b){for(var w=0;w<b.length;w++){var T=b[w];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(_,T.key,T)}}return function(_,b,w){return b&&y(_.prototype,b),w&&y(_,w),_}}(),l=function y(_,b,w){_===null&&(_=Function.prototype);var T=Object.getOwnPropertyDescriptor(_,b);if(T===void 0){var x=Object.getPrototypeOf(_);return x===null?void 0:y(x,b,w)}else{if("value"in T)return T.value;var S=T.get;return S===void 0?void 0:S.call(w)}},u=i(0),f=h(u);function h(y){return y&&y.__esModule?y:{default:y}}function p(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function d(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 p(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return o(_,[{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):l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"add",this).call(this,w,T)}},{key:"canAdd",value:function(w,T){return l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,T)||l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"canAdd",this).call(this,w,parseInt(T))}},{key:"value",value:function(w){return parseInt(l(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,w))||void 0}}]),_}(f.default.Attributor.Class),m=new v("indent","ql-indent",{scope:f.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});n.IndentClass=m},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(4),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="blockquote",d.tagName="blockquote",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function v(m,y){for(var _=0;_<y.length;_++){var b=y[_];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(m,b.key,b)}}return function(m,y,_){return y&&v(m.prototype,y),_&&v(m,_),m}}(),l=i(4),u=f(l);function f(v){return v&&v.__esModule?v:{default:v}}function h(v,m){if(!(v instanceof m))throw new TypeError("Cannot call a class as a function")}function p(v,m){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:v}function d(v,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);v.prototype=Object.create(m&&m.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(v,m):v.__proto__=m)}var c=function(v){d(m,v);function m(){return h(this,m),p(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return o(m,null,[{key:"formats",value:function(_){return this.tagName.indexOf(_.tagName)+1}}]),m}(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(S,I){for(var A=0;A<I.length;A++){var O=I[A];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(S,O.key,O)}}return function(S,I,A){return I&&x(S.prototype,I),A&&x(S,A),S}}(),l=function x(S,I,A){S===null&&(S=Function.prototype);var O=Object.getOwnPropertyDescriptor(S,I);if(O===void 0){var L=Object.getPrototypeOf(S);return L===null?void 0:x(L,I,A)}else{if("value"in O)return O.value;var R=O.get;return R===void 0?void 0:R.call(A)}},u=i(0),f=v(u),h=i(4),p=v(h),d=i(25),c=v(d);function v(x){return x&&x.__esModule?x:{default:x}}function m(x,S,I){return S in x?Object.defineProperty(x,S,{value:I,enumerable:!0,configurable:!0,writable:!0}):x[S]=I,x}function y(x,S){if(!(x instanceof S))throw new TypeError("Cannot call a class as a function")}function _(x,S){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:x}function b(x,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);x.prototype=Object.create(S&&S.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(x,S):x.__proto__=S)}var w=function(x){b(S,x);function S(){return y(this,S),_(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}return o(S,[{key:"format",value:function(A,O){A===T.blotName&&!O?this.replaceWith(f.default.create(this.statics.scope)):l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"format",this).call(this,A,O)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(A,O){return this.parent.isolate(this.offset(this.parent),this.length()),A===this.parent.statics.blotName?(this.parent.replaceWith(A,O),this):(this.parent.unwrap(),l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replaceWith",this).call(this,A,O))}}],[{key:"formats",value:function(A){return A.tagName===this.tagName?void 0:l(S.__proto__||Object.getPrototypeOf(S),"formats",this).call(this,A)}}]),S}(p.default);w.blotName="list-item",w.tagName="LI";var T=function(x){b(S,x),o(S,null,[{key:"create",value:function(A){var O=A==="ordered"?"OL":"UL",L=l(S.__proto__||Object.getPrototypeOf(S),"create",this).call(this,O);return(A==="checked"||A==="unchecked")&&L.setAttribute("data-checked",A==="checked"),L}},{key:"formats",value:function(A){if(A.tagName==="OL")return"ordered";if(A.tagName==="UL")return A.hasAttribute("data-checked")?A.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function S(I){y(this,S);var A=_(this,(S.__proto__||Object.getPrototypeOf(S)).call(this,I)),O=function(R){if(R.target.parentNode===I){var C=A.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",O),I.addEventListener("mousedown",O),A}return o(S,[{key:"format",value:function(A,O){this.children.length>0&&this.children.tail.format(A,O)}},{key:"formats",value:function(){return m({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,O){if(A instanceof w)l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"insertBefore",this).call(this,A,O);else{var L=O==null?this.length():O.offset(this),R=this.split(L);R.parent.insertBefore(A,R)}}},{key:"optimize",value:function(A){l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"optimize",this).call(this,A);var O=this.next;O!=null&&O.prev===this&&O.statics.blotName===this.statics.blotName&&O.domNode.tagName===this.domNode.tagName&&O.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(O.moveChildren(this),O.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var O=f.default.create(this.statics.defaultChild);A.moveChildren(O),this.appendChild(O)}l(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"replace",this).call(this,A)}}]),S}(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),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="italic",d.tagName=["EM","I"],n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function m(y,_){for(var b=0;b<_.length;b++){var w=_[b];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(y,w.key,w)}}return function(y,_,b){return _&&m(y.prototype,_),b&&m(y,b),y}}(),l=function m(y,_,b){y===null&&(y=Function.prototype);var w=Object.getOwnPropertyDescriptor(y,_);if(w===void 0){var T=Object.getPrototypeOf(y);return T===null?void 0:m(T,_,b)}else{if("value"in w)return w.value;var x=w.get;return x===void 0?void 0:x.call(b)}},u=i(6),f=h(u);function h(m){return m&&m.__esModule?m:{default:m}}function p(m,y){if(!(m instanceof y))throw new TypeError("Cannot call a class as a function")}function d(m,y){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:m}function c(m,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);m.prototype=Object.create(y&&y.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(m,y):m.__proto__=y)}var v=function(m){c(y,m);function y(){return p(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return o(y,null,[{key:"create",value:function(b){return b==="super"?document.createElement("sup"):b==="sub"?document.createElement("sub"):l(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,b)}},{key:"formats",value:function(b){if(b.tagName==="SUB")return"sub";if(b.tagName==="SUP")return"super"}}]),y}(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),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="strike",d.tagName="S",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=i(6),l=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 p(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 d=function(c){p(v,c);function v(){return f(this,v),h(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v}(l.default);d.blotName="underline",d.tagName="U",n.default=d},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(b,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(b,x.key,x)}}return function(b,w,T){return w&&_(b.prototype,w),T&&_(b,T),b}}(),l=function _(b,w,T){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,w);if(x===void 0){var S=Object.getPrototypeOf(b);return S===null?void 0:_(S,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=p(u),h=i(27);function p(_){return _&&_.__esModule?_:{default:_}}function d(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function c(_,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 v(_,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 m=["alt","height","width"],y=function(_){v(b,_);function b(){return d(this,b),c(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"format",value:function(T,x){m.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=l(b.__proto__||Object.getPrototypeOf(b),"create",this).call(this,T);return typeof T=="string"&&x.setAttribute("src",this.sanitize(T)),x}},{key:"formats",value:function(T){return m.reduce(function(x,S){return T.hasAttribute(S)&&(x[S]=T.getAttribute(S)),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")}}]),b}(f.default.Embed);y.blotName="image",y.tagName="IMG",n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function _(b,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(b,x.key,x)}}return function(b,w,T){return w&&_(b.prototype,w),T&&_(b,T),b}}(),l=function _(b,w,T){b===null&&(b=Function.prototype);var x=Object.getOwnPropertyDescriptor(b,w);if(x===void 0){var S=Object.getPrototypeOf(b);return S===null?void 0:_(S,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=p(f);function p(_){return _&&_.__esModule?_:{default:_}}function d(_,b){if(!(_ instanceof b))throw new TypeError("Cannot call a class as a function")}function c(_,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 v(_,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 m=["height","width"],y=function(_){v(b,_);function b(){return d(this,b),c(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return o(b,[{key:"format",value:function(T,x){m.indexOf(T)>-1?x?this.domNode.setAttribute(T,x):this.domNode.removeAttribute(T):l(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"format",this).call(this,T,x)}}],[{key:"create",value:function(T){var x=l(b.__proto__||Object.getPrototypeOf(b),"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 m.reduce(function(x,S){return T.hasAttribute(S)&&(x[S]=T.getAttribute(S)),x},{})}},{key:"sanitize",value:function(T){return h.default.sanitize(T)}},{key:"value",value:function(T){return T.getAttribute("src")}}]),b}(u.BlockEmbed);y.blotName="video",y.className="ql-video",y.tagName="IFRAME",n.default=y},function(r,n,i){Object.defineProperty(n,"__esModule",{value:!0}),n.default=n.FormulaBlot=void 0;var o=function(){function T(x,S){for(var I=0;I<S.length;I++){var A=S[I];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(x,A.key,A)}}return function(x,S,I){return S&&T(x.prototype,S),I&&T(x,I),x}}(),l=function T(x,S,I){x===null&&(x=Function.prototype);var A=Object.getOwnPropertyDescriptor(x,S);if(A===void 0){var O=Object.getPrototypeOf(x);return O===null?void 0:T(O,S,I)}else{if("value"in A)return A.value;var L=A.get;return L===void 0?void 0:L.call(I)}},u=i(35),f=v(u),h=i(5),p=v(h),d=i(9),c=v(d);function v(T){return T&&T.__esModule?T:{default:T}}function m(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(){return m(this,x),y(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return o(x,null,[{key:"create",value:function(I){var A=l(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,I);return typeof I=="string"&&(window.katex.render(I,A,{throwOnError:!1,errorColor:"#f00"}),A.setAttribute("data-value",I)),A}},{key:"value",value:function(I){return I.getAttribute("data-value")}}]),x}(f.default);b.blotName="formula",b.className="ql-formula",b.tagName="SPAN";var w=function(T){_(x,T),o(x,null,[{key:"register",value:function(){p.default.register(b,!0)}}]);function x(){m(this,x);var S=y(this,(x.__proto__||Object.getPrototypeOf(x)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return S}return x}(c.default);n.FormulaBlot=b,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(A,O){for(var L=0;L<O.length;L++){var R=O[L];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(A,R.key,R)}}return function(A,O,L){return O&&I(A.prototype,O),L&&I(A,L),A}}(),l=function I(A,O,L){A===null&&(A=Function.prototype);var R=Object.getOwnPropertyDescriptor(A,O);if(R===void 0){var C=Object.getPrototypeOf(A);return C===null?void 0:I(C,O,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=y(u),h=i(5),p=y(h),d=i(9),c=y(d),v=i(13),m=y(v);function y(I){return I&&I.__esModule?I:{default:I}}function _(I,A){if(!(I instanceof A))throw new TypeError("Cannot call a class as a function")}function b(I,A){if(!I)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:I}function w(I,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);I.prototype=Object.create(A&&A.prototype,{constructor:{value:I,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(I,A):I.__proto__=A)}var T=function(I){w(A,I);function A(){return _(this,A),b(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}return o(A,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),l(A.prototype.__proto__||Object.getPrototypeOf(A.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)}}]),A}(m.default);T.className="ql-syntax";var x=new f.default.Attributor.Class("token","hljs",{scope:f.default.Scope.INLINE}),S=function(I){w(A,I),o(A,null,[{key:"register",value:function(){p.default.register(x,!0),p.default.register(T,!0)}}]);function A(O,L){_(this,A);var R=b(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,O,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(p.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(C),C=setTimeout(function(){R.highlight(),C=null},R.options.interval)}),R.highlight(),R}return o(A,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(p.default.sources.USER);var R=this.quill.getSelection();this.quill.scroll.descendants(T).forEach(function(C){C.highlight(L.options.highlight)}),this.quill.update(p.default.sources.SILENT),R!=null&&this.quill.setSelection(R,p.default.sources.SILENT)}}}]),A}(c.default);S.DEFAULTS={highlight:function(){return window.hljs==null?null:function(I){var A=window.hljs.highlightAuto(I);return A.value}}(),interval:1e3},n.CodeBlock=T,n.CodeToken=x,n.default=S},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 A(O,L,R){O===null&&(O=Function.prototype);var C=Object.getOwnPropertyDescriptor(O,L);if(C===void 0){var P=Object.getPrototypeOf(O);return P===null?void 0:A(P,L,R)}else{if("value"in C)return C.value;var M=C.get;return M===void 0?void 0:M.call(R)}},l=function(){function A(O,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(O,C.key,C)}}return function(O,L,R){return L&&A(O.prototype,L),R&&A(O,R),O}}(),u=i(3),f=_(u),h=i(8),p=_(h),d=i(43),c=_(d),v=i(15),m=i(41),y=_(m);function _(A){return A&&A.__esModule?A:{default:A}}function b(A,O){if(!(A instanceof O))throw new TypeError("Cannot call a class as a function")}function w(A,O){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O&&(typeof O=="object"||typeof O=="function")?O:A}function T(A,O){if(typeof O!="function"&&O!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof O);A.prototype=Object.create(O&&O.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),O&&(Object.setPrototypeOf?Object.setPrototypeOf(A,O):A.__proto__=O)}var x=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],S=function(A){T(O,A);function O(L,R){b(this,O),R.modules.toolbar!=null&&R.modules.toolbar.container==null&&(R.modules.toolbar.container=x);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.container.classList.add("ql-bubble"),C}return l(O,[{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")),y.default),this.buildPickers([].slice.call(R.container.querySelectorAll("select")),y.default)}}]),O}(c.default);S.DEFAULTS=(0,f.default)(!0,{},c.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(O){O?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var I=function(A){T(O,A);function O(L,R){b(this,O);var C=w(this,(O.__proto__||Object.getPrototypeOf(O)).call(this,L,R));return C.quill.on(p.default.events.EDITOR_CHANGE,function(P,M,F,q){if(P===p.default.events.SELECTION_CHANGE)if(M!=null&&M.length>0&&q===p.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],it=C.quill.getIndex(z),W=Math.min(z.length()-1,M.index+M.length-it),D=C.quill.getBounds(new v.Range(it,W));C.position(D)}}else document.activeElement!==C.textbox&&C.quill.hasFocus()&&C.hide()}),C}return l(O,[{key:"listen",value:function(){var R=this;o(O.prototype.__proto__||Object.getPrototypeOf(O.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){R.root.classList.remove("ql-editing")}),this.quill.on(p.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(O.prototype.__proto__||Object.getPrototypeOf(O.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"}}]),O}(d.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=S},function(r,n,i){r.exports=i(63)}]).default})})(wv);var mN=wv.exports;const yN=En(mN),sB="",_N=Et.forwardRef((e,t)=>{const[r,n]=_t.useState(!1),i=300,o=_t.useRef(null),l=_t.useRef(0),u=_t.useRef(null),f=_t.useRef(null),h=_t.useRef(null),p=_t.useRef(16),d=_t.useRef(null),c=_t.useRef(null),{uniqueId:v,text:m,disabled:y,transformation:_,onTextUpdate:b,pointerdown:w,onExitQuillEditor:T}=e,{x,y:S,fontFamily:I="Arial",fontWeight:A="normal",fontStyle:O="normal",fontSize:L=16,fontVariant:R="normal",fill:C="black",stroke:P,strokeThickness:M=0,blurRadius:F=0,blurEnabled:q=!1,dropShadowColor:Z=null,dropShadow:z=!1,dropShadowBlur:it=0,wordWrapWidth:W=5e7,leading:D=0,letterSpacing:k,colorCorrection:j={}}=_,{temperatureFilter:G,sharpnessFilter:Y,hueFilter:X,blurFilter:$,adjustmentFilter:V}=_s(j),{blurRadius:tt=0}=j;Et.useEffect(()=>{p.current=Number(L)},[L]);const et=["italic","oblique"].includes(O)?O:void 0,rt=["small-caps"].includes(R),ot=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,ct=Number(k)>0?k:void 0,gt=Et.useMemo(()=>new zr.TextStyle({fontFamily:I,fontSize:L,fill:C||"white",...P&&M>0&&{stroke:P,strokeThickness:M},...et&&{fontStyle:et},...rt&&{fontVariant:rt},...ot&&{fontWeight:ot},...ct&&{letterSpacing:ct},...q&&{dropShadow:!0,dropShadowBlur:Number(F),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...z&&{dropShadow:!0,dropShadowBlur:Number(it),dropShadowColor:(Z==null?void 0:Z.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:W||500,leading:D||0}),[q,F,C,I,L,O,D,et,ot,rt,ct,Z,P,M,W,z,it]);Et.useEffect(()=>{d.current={..._}},[_]);const yt=()=>{console.log("double click triggered"),n(!0)},St=()=>{const nt=new Date().getTime();nt-l.current<i?yt():w&&w(),l.current=nt},ee=nt=>{b&&b({text:nt,uniqueId:v})},Ut=()=>{n(!1),T&&T()};return Et.useEffect(()=>{if(r&&f.current){let nt=document.getElementById("note-editor");if(nt){nt.style.position="absolute",nt.style.display="block",nt.style.zIndex="10",nt.style.left=x+"px",nt.style.top=S+"px",nt.style.backgroundColor="var(--chakra-color-darkShark)",nt.style.transform="scale(1.5)",nt.style.width="300px",nt.style.height="100px",nt.style.color="#fff",nt.style.fontSize="20px",nt.style.border="1px solid #CBCEE0";const lt={esc:{key:27,handler:function(){Ut()}},enter:{key:13,handler:function(){Ut()}}};if(c.current=new yN("#note-editor",{modules:{toolbar:!1,keyboard:{bindings:{...lt}}},placeholder:"Compose your text here...",theme:"snow"}),c.current){c.current.on("text-change",function(){c.current&&ee(c.current.root.innerText)}),c.current.setText(m),c.current.focus(),c.current.off("text-change",()=>{console.log("removed")}),c.current.hasFocus()||(nt.style.display="none");const pt=document.createElement("button");pt.innerHTML="&#10006;",pt.style.position="absolute",pt.style.bottom="-14px",pt.style.left="-3px",pt.style.cursor="pointer",pt.addEventListener("click",()=>{Ut()}),pt.style.border="none",pt.style.borderRadius="50%",pt.style.width="15px",pt.style.height="15px",pt.style.backgroundColor="#f8f8f8",pt.style.color="#333",pt.style.fontSize="10px",nt.appendChild(pt)}}}else if(c.current){let nt=document.getElementById("note-editor");nt&&nt.hasChildNodes()&&(nt.removeChild(nt.firstChild),nt.removeAttribute("class"),nt.removeAttribute("style")),c.current.off("text-change",()=>{console.log("removed")})}return()=>{c.current&&c.current.off("text-change",()=>{})}},[x,S,r]),Et.useEffect(()=>{if(!r){const nt=document.getElementById("note-editor");nt&&(nt.style.display="none")}},[r]),Yt.jsx(ii,{...e,ref:t,isText:!0,onDoubleClick:yt,isTextEditMode:r,children:Yt.jsxs(me.Container,{ref:o,children:[r&&Yt.jsx(me.Container,{ref:f}),Yt.jsx(me.Container,{alpha:r?0:1,ref:h,children:Yt.jsx(me.Text,{style:gt,x,y:S,anchor:.5,text:m,...!r&&!y&&{interactive:!0,buttonMode:!0,pointerdown:St},ref:u,filters:[G,Y,X,V,...tt>0?[$]:[]]})})]})})}),bN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},xN=Et.forwardRef((e,t)=>{const[,r]=Et.useState(!1),[,n]=Et.useState({isWaiting:!1,isStalled:!1}),[i,o]=Et.useState(),l=_t.useRef(null),u=_t.useRef(null),f=_t.useRef(null),h=_t.useRef(bN),p=_t.useRef(),{tl:d,isDragging:c}=_t.useContext(ti),{uniqueId:v,mute:m=!1,src:y,startAt:_,endAt:b,frameStartAt:w,frameEndAt:T,transformation:{x,y:S,width:I,height:A,animation:O,colorCorrection:L={}},pointerdown:R}=e,{blurRadius:C=0}=L,{temperatureFilter:P,sharpnessFilter:M,hueFilter:F,blurFilter:q,adjustmentFilter:Z}=_s(L),z=y||"",it=Et.useMemo(()=>{const G=document.createElement("video");return G.src=y,G.crossOrigin="Anonymus",G.autoplay=!1,G.currentTime=w===0?.001:w,G},[y,w]);mr(ke.PAUSE,()=>{if(f.current){const G=f.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&f.current.pause(),h.current.isPlaying=!1}}),Et.useEffect(()=>{f.current&&(c?(f.current.pause(),h.current.isPlaying=!1,h.current.isDragging=!0):h.current.isDragging=!1,f.current.muted=m)},[m,c]);const W=G=>{f.current&&(f.current.currentTime=Number(G),c||(f.current.currentTime=Number(G),f.current.play(),h.current.isPlaying=!0))},D=()=>{if(f.current){const G=f.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&f.current.pause(),h.current.isPlaying=!1}},k=()=>{},j=()=>{var G;if(f.current&&p.current){const Y=w+((G=p.current)==null?void 0:G.time());Math.abs(f.current.currentTime-Y);const X=f.current,$=X.currentTime>0&&!X.paused&&!X.ended&&X.readyState>X.HAVE_CURRENT_DATA;h.current.isDragging?(f.current.currentTime=Y,f.current.play(),setTimeout(()=>{h.current.isPlaying=!1,f.current&&f.current.pause()},300),h.current.isPlaying=!1):h.current.isPlaying||($||f.current.play(),h.current.isPlaying=!0)}};return _t.useEffect(()=>{let G=Te.context(()=>{});if(u.current&&d.current){const Y={duration:Number(T)-Number(w),onStart:W,onComplete:D,onStartParams:[w,T],onCompleteParams:[],onInterrupt:k,onUpdate:j,onUpdateParams:[w,T]};p.current&&p.current.kill(),G=Te.context(()=>{p.current=Te.from(u.current,Y,w),d.current.add(p.current,_)})}return()=>{p.current&&(p.current.kill(),Te.killTweensOf(p.current)),G.revert()}},[O,_,b,w,T]),Et.useEffect(()=>{u.current&&r(!0)},[]),Et.useEffect(()=>{f.current&&(f.current.muted=m)},[m]),Et.useEffect(()=>{if(f.current){const G=f.current;G.currentTime>0&&!G.paused&&!G.ended&&G.readyState>G.HAVE_CURRENT_DATA&&c&&(f.current.pause(),h.current.isPlaying=!1)}},[c]),Et.useEffect(()=>{const G=Math.round((Number(w)+Number.EPSILON)*100)/100,Y=function(){f.current&&(f.current.currentTime=G)},X=function(){if(f.current){const ct=f.current;ct.currentTime>0&&!ct.paused&&!ct.ended&&ct.readyState>ct.HAVE_CURRENT_DATA&&f.current.pause()}n({isWaiting:!1,isStalled:!1})},$=function(){f.current&&f.current.pause(),n({isWaiting:!0,isStalled:!1})},V=function(){n({isWaiting:!1,isStalled:!1})},tt=function(){n({isWaiting:!1,isStalled:!0})},et=Math.round((Number(w)+Number.EPSILON)*100)/100,rt=Math.round((Number(T)+Number.EPSILON)*100)/100,ot=`${z}#t=${et},${rt}`;return console.log("urlTimestap",ot),zr.Texture.fromLoader(it,ot,v,{pixiIdPrefix:v,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(ct=>{ct&&(o(ct),f.current=ct.baseTexture.resource.source,f.current.id=v,f.current.addEventListener("loadedmetadata",Y),f.current.addEventListener("ended",X),f.current.addEventListener("loadstart",$),f.current.addEventListener("canplaythrough",V),f.current.addEventListener("stalled",tt))}),()=>{f.current&&(f.current.pause(),f.current.removeEventListener("loadedmetadata",Y),f.current.removeEventListener("ended",X),f.current.removeEventListener("loadstart",$),f.current.removeEventListener("canplaythrough",V),f.current.removeEventListener("stalled",tt))}},[z,v,w,T,it]),Yt.jsx(ii,{...e,ref:t,ignoreTlForVideo:!0,children:Yt.jsx(me.Container,{ref:u,children:i&&Yt.jsx(me.Sprite,{texture:i,width:I,height:A,anchor:.5,x,y:S,ref:l,interactive:!0,pointerdown:R,filters:[P,M,F,Z,...C>0?[q]:[]]})})})});var Tv=(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))(Tv||{}),Ev=(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))(Ev||{});se.Animations=Tv,se.BlendModes=Ev,se.Events=ke,se.GsapPixieContext=ti,se.GsapPixieContextProvider=py,se.PixiAnimatedSprite=bv,se.PixiAudioSprite=kS,se.PixiGifSprite=gN,se.PixiImageSprite=WE,se.PixiSvgPathSprite=sS,se.PixiTextSprite=_N,se.PixiVideoSprite=xN,se.emitCustomEvent=Jn,se.newCustomEventEmitter=dy,se.useCustomEventListener=mr,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});