PATH:
home
/
ajwellnessmassag
/
angelictravels.online
/
wp-content
/
plugins
/
templately
/
assets
/
js
/
chunks
(globalThis.webpackChunktemplately=globalThis.webpackChunktemplately||[]).push([[969],{9696(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Animation=void 0;const r=n(8871),i=n(4060),a=r.glob.performance&&r.glob.performance.now?function(){return r.glob.performance.now()}:function(){return(new Date).getTime()};class s{constructor(t,e){this.id=s.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:a(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){let e=[];return t&&(e=Array.isArray(t)?t:[t]),this.layers=e,this}getLayers(){return this.layers}addLayer(t){const e=this.layers,n=e.length;for(let r=0;r<n;r++)if(e[r]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){const t=s.animations,e=t.length;for(let n=0;n<e;n++)if(t[n].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=a(),s._addAnimation(this),this}stop(){return s._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){const e=t.id,n=this.animations,r=n.length;for(let t=0;t<r;t++)if(n[t].id===e){this.animations.splice(t,1);break}}static _runFrames(){const t={},e=this.animations;for(let n=0;n<e.length;n++){const r=e[n],i=r.layers,s=r.func;r._updateFrameObject(a());const o=i.length;let l;if(l=!s||!1!==s.call(r,r.frame),l)for(let e=0;e<o;e++){const n=i[e];void 0!==n._id&&(t[n._id]=n)}}for(const e in t)t.hasOwnProperty(e)&&t[e].batchDraw()}static _animationLoop(){const t=s;t.animations.length?(t._runFrames(),i.Util.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,i.Util.requestAnimFrame(this._animationLoop))}}e.Animation=s,s.animations=[],s.animIdCounter=0,s.animRunning=!1},5570(t,e){"use strict";function n(t,e,n){const i=r(1,n,t),a=r(1,n,e),s=i*i+a*a;return Math.sqrt(s)}Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]],e.getCubicArcLength=(t,r,i)=>{let a,s;const o=i/2;a=0;for(let i=0;i<20;i++)s=o*e.tValues[20][i]+o,a+=e.cValues[20][i]*n(t,r,s);return o*a},e.getQuadraticArcLength=(t,e,n)=>{void 0===n&&(n=1);const r=t[0]-2*t[1]+t[2],i=e[0]-2*e[1]+e[2],a=2*t[1]-2*t[0],s=2*e[1]-2*e[0],o=4*(r*r+i*i),l=4*(r*a+i*s),h=a*a+s*s;if(0===o)return n*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));const c=l/(2*o),u=n+c,d=h/o-c*c,f=u*u+d>0?Math.sqrt(u*u+d):0,g=c*c+d>0?Math.sqrt(c*c+d):0,p=c+Math.sqrt(c*c+d)!==0?d*Math.log(Math.abs((u+f)/(c+g))):0;return Math.sqrt(o)/2*(u*f-c*g+p)};const r=(t,n,i)=>{const a=i.length-1;let s,o;if(0===a)return 0;if(0===t){o=0;for(let t=0;t<=a;t++)o+=e.binomialCoefficients[a][t]*Math.pow(1-n,a-t)*Math.pow(n,t)*i[t];return o}s=new Array(a);for(let t=0;t<a;t++)s[t]=a*(i[t+1]-i[t]);return r(t-1,n,s)};e.t2length=(t,e,n)=>{let r=1,i=t/e,a=(t-n(i))/e,s=0;for(;r>.001;){const o=n(i+a),l=Math.abs(t-o)/e;if(l<r)r=l,i+=a;else{const s=n(i-a),o=Math.abs(t-s)/e;o<r?(r=o,i-=a):a/=2}if(s++,s>500)break}return i}},8604(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HitCanvas=e.SceneCanvas=e.Canvas=void 0;const r=n(4060),i=n(9869),a=n(8871);let s;class o{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;const e=(t||{}).pixelRatio||a.Konva.pixelRatio||function(){if(s)return s;const t=r.Util.createCanvasElement(),e=t.getContext("2d");return s=(a.Konva._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),r.Util.releaseCanvas(t),s}();this.pixelRatio=e,this._canvas=r.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){const e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";const e=this.pixelRatio;this.getContext()._context.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";const e=this.pixelRatio;this.getContext()._context.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return r.Util.error("Unable to get data URL. "+t.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}e.Canvas=o,e.SceneCanvas=class extends o{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new i.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}},e.HitCanvas=class extends o{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new i.HitContext(this),this.setSize(t.width,t.height)}}},4473(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;const r=n(4892),i=n(6536),a=n(5483);class s extends i.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){const e=this.children||[];return t?e.filter(t):e}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(0===t.length)return this;if(t.length>1){for(let e=0;e<t.length;e++)this.add(t[e]);return this}const e=t[0];return e.getParent()?(e.moveTo(this),this):(this._validateAdd(e),e.index=this.getChildren().length,e.parent=this,e._clearCaches(),this.getChildren().push(e),this._fire("add",{child:e}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){const e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){const n=[];return this._descendants(r=>{const i=r._isMatch(t);return i&&n.push(r),!(!i||!e)}),n}_descendants(t){let e=!1;const n=this.getChildren();for(const r of n){if(e=t(r),e)return!0;if(r.hasChildren()&&(e=r._descendants(t),e))return!0}return!1}toObject(){const t=i.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach(e=>{t.children.push(e.toObject())}),t}isAncestorOf(t){let e=t.getParent();for(;e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){const e=i.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(t){e.add(t.clone())}),e}getAllIntersections(t){const e=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(t)&&e.push(n)}),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),this.isCached()||null===(e=this.children)||void 0===e||e.forEach(function(e){e._clearSelfAndDescendantCache(t)})}_setChildrenIndices(){var t;null===(t=this.children)||void 0===t||t.forEach(function(t,e){t.index=e}),this._requestDraw()}drawScene(t,e,n){const r=this.getLayer(),i=t||r&&r.getCanvas(),a=i&&i.getContext(),s=this._getCanvasCache(),o=s&&s.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(o){a.save();const t=this.getAbsoluteTransform(e).getMatrix();a.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",i,e,n);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;const n=this.getLayer(),r=t||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCanvasCache();if(a&&a.hit){i.save();const t=this.getAbsoluteTransform(e).getMatrix();i.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren("drawHit",r,e);return this}_drawChildren(t,e,n,r){var i;const a=e&&e.getContext(),s=this.clipWidth(),o=this.clipHeight(),l=this.clipFunc(),h="number"==typeof s&&"number"==typeof o||l,c=n===this;if(h){a.save();const t=this.getAbsoluteTransform(n);let e,r=t.getMatrix();if(a.transform(r[0],r[1],r[2],r[3],r[4],r[5]),a.beginPath(),l)e=l.call(this,a,this);else{const t=this.clipX(),e=this.clipY();a.rect(t||0,e||0,s,o)}a.clip.apply(a,e),r=t.copy().invert().getMatrix(),a.transform(r[0],r[1],r[2],r[3],r[4],r[5])}const u=!c&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;u&&(a.save(),a._applyGlobalCompositeOperation(this)),null===(i=this.children)||void 0===i||i.forEach(function(i){i[t](e,n,r)}),u&&a.restore(),h&&a.restore()}getClientRect(t={}){var e;const n=t.skipTransform,r=t.relativeTo;let i,a,s,o,l={x:1/0,y:1/0,width:0,height:0};const h=this;null===(e=this.children)||void 0===e||e.forEach(function(e){if(!e.visible())return;const n=e.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});0===n.width&&0===n.height||(void 0===i?(i=n.x,a=n.y,s=n.x+n.width,o=n.y+n.height):(i=Math.min(i,n.x),a=Math.min(a,n.y),s=Math.max(s,n.x+n.width),o=Math.max(o,n.y+n.height)))});const c=this.find("Shape");let u=!1;for(let t=0;t<c.length;t++)if(c[t]._isVisible(this)){u=!0;break}return l=u&&void 0!==i?{x:i,y:a,width:s-i,height:o-a}:{x:0,y:0,width:0,height:0},n?l:this._transformedRect(l,r)}}e.Container=s,r.Factory.addComponentsGetterSetter(s,"clip",["x","y","width","height"]),r.Factory.addGetterSetter(s,"clipX",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"clipY",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"clipWidth",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"clipHeight",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"clipFunc")},9869(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HitContext=e.SceneContext=e.Context=void 0;const r=n(4060),i=n(8871),a=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class s{constructor(t){this.canvas=t,i.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,e){let n,i,a,s,o=this.traceArr,l=o.length,h="";for(n=0;n<l;n++)i=o[n],a=i.method,a?(s=i.args,h+=a,t?h+="()":r.Util._isArray(s[0])?h+="(["+s.join(",")+"])":(e&&(s=s.map(t=>"number"==typeof t?Math.floor(t):t)),h+="("+s.join(",")+")")):(h+=i.property,t||(h+="="+i.val)),h+=";";return h}clearTrace(){this.traceArr=[]}_trace(t){let e,n=this.traceArr;n.push(t),e=n.length,e>=100&&n.shift()}reset(){const t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){const e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){const e=t.attrs.lineCap;e&&this.setAttr("lineCap",e)}_applyOpacity(t){const e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){const e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,n,r,i,a){this._context.arc(t,e,n,r,i,a)}arcTo(t,e,n,r,i){this._context.arcTo(t,e,n,r,i)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,n,r,i,a){this._context.bezierCurveTo(t,e,n,r,i,a)}clearRect(t,e,n,r){this._context.clearRect(t,e,n,r)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,e){const n=arguments;return 2===n.length?this._context.createImageData(t,e):1===n.length?this._context.createImageData(t):void 0}createLinearGradient(t,e,n,r){return this._context.createLinearGradient(t,e,n,r)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,n,r,i,a){return this._context.createRadialGradient(t,e,n,r,i,a)}drawImage(t,e,n,r,i,a,s,o,l){const h=arguments,c=this._context;3===h.length?c.drawImage(t,e,n):5===h.length?c.drawImage(t,e,n,r,i):9===h.length&&c.drawImage(t,e,n,r,i,a,s,o,l)}ellipse(t,e,n,r,i,a,s,o){this._context.ellipse(t,e,n,r,i,a,s,o)}isPointInPath(t,e,n,r){return n?this._context.isPointInPath(n,t,e,r):this._context.isPointInPath(t,e,r)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,e,n,r){this._context.fillRect(t,e,n,r)}strokeRect(t,e,n,r){this._context.strokeRect(t,e,n,r)}fillText(t,e,n,r){r?this._context.fillText(t,e,n,r):this._context.fillText(t,e,n)}measureText(t){return this._context.measureText(t)}getImageData(t,e,n,r){return this._context.getImageData(t,e,n,r)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,n,r){this._context.rect(t,e,n,r)}roundRect(t,e,n,r,i){this._context.roundRect(t,e,n,r,i)}putImageData(t,e,n){this._context.putImageData(t,e,n)}quadraticCurveTo(t,e,n,r){this._context.quadraticCurveTo(t,e,n,r)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,e,n,r,i,a){this._context.setTransform(t,e,n,r,i,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,n,r){this._context.strokeText(t,e,n,r)}transform(t,e,n,r,i,a){this._context.transform(t,e,n,r,i,a)}translate(t,e){this._context.translate(t,e)}_enableTrace(){let t,e,n=this,i=a.length,s=this.setAttr;const o=function(t){let i,a=n[t];n[t]=function(){return e=function(t){const e=[],n=t.length,i=r.Util;for(let r=0;r<n;r++){let n=t[r];i._isNumber(n)?n=Math.round(1e3*n)/1e3:i._isString(n)||(n+=""),e.push(n)}return e}(Array.prototype.slice.call(arguments,0)),i=a.apply(n,arguments),n._trace({method:t,args:e}),i}};for(t=0;t<i;t++)o(a[t]);n.setAttr=function(){s.apply(n,arguments);const t=arguments[0];let e=arguments[1];"shadowOffsetX"!==t&&"shadowOffsetY"!==t&&"shadowBlur"!==t||(e/=this.canvas.getPixelRatio()),n._trace({property:t,val:e})}}_applyGlobalCompositeOperation(t){const e=t.attrs.globalCompositeOperation;!e||"source-over"===e||this.setAttr("globalCompositeOperation",e)}}e.Context=s,["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"].forEach(function(t){Object.defineProperty(s.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})}),e.SceneContext=class extends s{constructor(t,{willReadFrequently:e=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:e})}_fillColor(t){const e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){const e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){const e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){const e=t.fill(),n=t.getFillPriority();if(e&&"color"===n)return void this._fillColor(t);const r=t.getFillPatternImage();if(r&&"pattern"===n)return void this._fillPattern(t);const i=t.getFillLinearGradientColorStops();if(i&&"linear-gradient"===n)return void this._fillLinearGradient(t);const a=t.getFillRadialGradientColorStops();a&&"radial-gradient"===n?this._fillRadialGradient(t):e?this._fillColor(t):r?this._fillPattern(t):i?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){const e=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),r=t.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(e.x,e.y,n.x,n.y);if(r){for(let t=0;t<r.length;t+=2)i.addColorStop(r[t],r[t+1]);this.setAttr("strokeStyle",i)}}_stroke(t){const e=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();const t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),n||this.restore()}}_applyShadow(t){var e,n,r;const i=null!==(e=t.getShadowRGBA())&&void 0!==e?e:"black",a=null!==(n=t.getShadowBlur())&&void 0!==n?n:5,s=null!==(r=t.getShadowOffset())&&void 0!==r?r:{x:0,y:0},o=t.getAbsoluteScale(),l=this.canvas.getPixelRatio(),h=o.x*l,c=o.y*l;this.setAttr("shadowColor",i),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(c))),this.setAttr("shadowOffsetX",s.x*h),this.setAttr("shadowOffsetY",s.y*c)}},e.HitContext=class extends s{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){const e=t.getStrokeScaleEnabled();if(!e){this.save();const t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(t);const n=t.hitStrokeWidth(),r="auto"===n?t.strokeWidth():n;this.setAttr("lineWidth",r),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}}},663(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var r=n(680);Object.defineProperty(e,"Konva",{enumerable:!0,get:function(){return r.Konva}});const i=n(680);t.exports=i.Konva},1268(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const r=n(8871),i=n(4060);e.DD={get isDragging(){let t=!1;return e.DD._dragElements.forEach(e=>{"dragging"===e.dragStatus&&(t=!0)}),t},justDragged:!1,get node(){let t;return e.DD._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){const n=[];e.DD._dragElements.forEach((e,r)=>{const{node:a}=e,s=a.getStage();s.setPointersPositions(t),void 0===e.pointerId&&(e.pointerId=i.Util._getFirstPointerId(t));const o=s._changedPointerPositions.find(t=>t.id===e.pointerId);if(o){if("dragging"!==e.dragStatus){const n=a.dragDistance();if(Math.max(Math.abs(o.x-e.startPointerPos.x),Math.abs(o.y-e.startPointerPos.y))<n)return;if(a.startDrag({evt:t}),!a.isDragging())return}a._setDragPosition(t,e),n.push(a)}}),n.forEach(e=>{e.fire("dragmove",{type:"dragmove",target:e,evt:t},!0)})},_endDragBefore(t){const n=[];e.DD._dragElements.forEach(i=>{const{node:a}=i,s=a.getStage();if(t&&s.setPointersPositions(t),!s._changedPointerPositions.find(t=>t.id===i.pointerId))return;"dragging"!==i.dragStatus&&"stopped"!==i.dragStatus||(e.DD.justDragged=!0,r.Konva._mouseListenClick=!1,r.Konva._touchListenClick=!1,r.Konva._pointerListenClick=!1,i.dragStatus="stopped");const o=i.node.getLayer()||i.node instanceof r.Konva.Stage&&i.node;o&&-1===n.indexOf(o)&&n.push(o)}),n.forEach(t=>{t.draw()})},_endDragAfter(t){e.DD._dragElements.forEach((n,r)=>{"stopped"===n.dragStatus&&n.node.fire("dragend",{type:"dragend",target:n.node,evt:t},!0),"dragging"!==n.dragStatus&&e.DD._dragElements.delete(r)})}},r.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))},4892(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const r=n(4060),i=n(5483),a="get",s="set";e.Factory={addGetterSetter(t,n,r,i,a){e.Factory.addGetter(t,n,r),e.Factory.addSetter(t,n,i,a),e.Factory.addOverloadedGetterSetter(t,n)},addGetter(t,e,n){const i=a+r.Util._capitalize(e);t.prototype[i]=t.prototype[i]||function(){const t=this.attrs[e];return void 0===t?n:t}},addSetter(t,n,i,a){const o=s+r.Util._capitalize(n);t.prototype[o]||e.Factory.overWriteSetter(t,n,i,a)},overWriteSetter(t,e,n,i){const a=s+r.Util._capitalize(e);t.prototype[a]=function(t){return n&&null!=t&&(t=n.call(this,t,e)),this._setAttr(e,t),i&&i.call(this),this}},addComponentsGetterSetter(t,n,o,l,h){const c=o.length,u=r.Util._capitalize,d=a+u(n),f=s+u(n);t.prototype[d]=function(){const t={};for(let e=0;e<c;e++){const r=o[e];t[r]=this.getAttr(n+u(r))}return t};const g=(0,i.getComponentValidator)(o);t.prototype[f]=function(t){const e=this.attrs[n];l&&(t=l.call(this,t,n)),g&&g.call(this,t,n);for(const e in t)t.hasOwnProperty(e)&&this._setAttr(n+u(e),t[e]);return t||o.forEach(t=>{this._setAttr(n+u(t),void 0)}),this._fireChangeEvent(n,e,t),h&&h.call(this),this},e.Factory.addOverloadedGetterSetter(t,n)},addOverloadedGetterSetter(t,e){const n=r.Util._capitalize(e),i=s+n,o=a+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[o]()}},addDeprecatedGetterSetter(t,n,i,s){r.Util.error("Adding deprecated "+n);const o=a+r.Util._capitalize(n),l=n+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[o]=function(){r.Util.error(l);const t=this.attrs[n];return void 0===t?i:t},e.Factory.addSetter(t,n,s,function(){r.Util.error(l)}),e.Factory.addOverloadedGetterSetter(t,n)},backCompat(t,e){r.Util.each(e,function(e,n){const i=t.prototype[n],o=a+r.Util._capitalize(e),l=s+r.Util._capitalize(e);function h(){i.apply(this,arguments),r.Util.error('"'+e+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}t.prototype[e]=h,t.prototype[o]=h,t.prototype[l]=h})},afterSetFilter(){this._filterUpToDate=!1}}},7457(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastLayer=void 0;const r=n(4060),i=n(6267),a=n(8871);class s extends i.Layer{constructor(t){super(t),this.listening(!1),r.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}e.FastLayer=s,s.prototype.nodeType="FastLayer",(0,a._registerNode)(s)},8871(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const n=Math.PI/180;e.glob="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{},e.Konva={_global:e.glob,version:"9.3.22",isBrowser:"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),isUnminified:/param/.test(function(t){}.toString()),dblClickWindow:400,getAngle:t=>e.Konva.angleDeg?t*n:t,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>e.Konva.DD.isDragging,isTransforming(){var t;return null===(t=e.Konva.Transformer)||void 0===t?void 0:t.isTransforming()},isDragReady:()=>!!e.Konva.DD.node,releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(t){e.glob.Konva=t}},e._registerNode=t=>{e.Konva[t.prototype.getClassName()]=t},e.Konva._injectGlobal(e.Konva)},7949(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;const r=n(4060),i=n(4473),a=n(8871);class s extends i.Container{_validateAdd(t){const e=t.getType();"Group"!==e&&"Shape"!==e&&r.Util.throw("You may only add groups and shapes to groups.")}}e.Group=s,s.prototype.nodeType="Group",(0,a._registerNode)(s)},6267(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Layer=void 0;const r=n(4060),i=n(4473),a=n(6536),s=n(4892),o=n(8604),l=n(5483),h=n(4723),c=n(8871),u=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],d=u.length;class f extends i.Container{constructor(t){super(t),this.canvas=new o.SceneCanvas,this.hitCanvas=new o.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);const e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){a.Node.prototype.moveToTop.call(this);const t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!a.Node.prototype.moveUp.call(this))return!1;const t=this.getStage();return!(!t||!t.content||(t.content.removeChild(this.getNativeCanvasElement()),this.index<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[this.index+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement()),0))}moveDown(){if(a.Node.prototype.moveDown.call(this)){const t=this.getStage();if(t){const e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(a.Node.prototype.moveToBottom.call(this)){const t=this.getStage();if(t){const e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){const t=this.getNativeCanvasElement();return a.Node.prototype.remove.call(this),t&&t.parentNode&&r.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){const e=t.getType();"Group"!==e&&"Shape"!==e&&r.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return(t=t||{}).width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=void 0!==t.x?t.x:this.x(),t.y=void 0!==t.y?t.y:this.y(),a.Node.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){const t=this.visible();this.canvas._canvas.style.display=t?"block":"none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){r.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){r.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,r.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let e=1,n=!1;for(;;){for(let r=0;r<d;r++){const i=u[r],a=this._getIntersection({x:t.x+i.x*e,y:t.y+i.y*e}),s=a.shape;if(s)return s;if(n=!!a.antialiased,!a.antialiased)break}if(!n)return null;e+=1}}_getIntersection(t){const e=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,i=n[3];if(255===i){const t=r.Util._rgbToHex(n[0],n[1],n[2]),e=h.shapes["#"+t];return e?{shape:e}:{antialiased:!0}}return i>0?{antialiased:!0}:{}}drawScene(t,e,n){const r=this.getLayer(),a=t||r&&r.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&a.getContext().clear(),i.Container.prototype.drawScene.call(this,a,e,n),this._fire("draw",{node:this}),this}drawHit(t,e){const n=this.getLayer(),r=t||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),i.Container.prototype.drawHit.call(this,r,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const t=this.parent;this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return r.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}e.Layer=f,f.prototype.nodeType="Layer",(0,c._registerNode)(f),s.Factory.addGetterSetter(f,"imageSmoothingEnabled",!0),s.Factory.addGetterSetter(f,"clearBeforeDraw",!0),s.Factory.addGetterSetter(f,"hitGraphEnabled",!0,(0,l.getBooleanValidator)())},6536(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const r=n(8604),i=n(1268),a=n(4892),s=n(8871),o=n(4060),l=n(5483),h="absoluteOpacity",c="allEventListeners",u="absoluteTransform",d="absoluteScale",f="canvas",g="listening",p="Shape",m=" ",y="stage",v="transform",b="visible",_=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(m);let S=1;class x{constructor(t){this._id=S++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){t!==v&&t!==u||!this._cache.get(t)?t?this._cache.delete(t):this._cache.clear():this._cache.get(t).dirty=!0}_getCache(t,e){let n=this._cache.get(t);return(void 0===n||(t===v||t===u)&&!0===n.dirty)&&(n=e.call(this),this._cache.set(t,n)),n}_calculate(t,e,n){if(!this._attachedDepsListeners.get(t)){const n=e.map(t=>t+"Change.konva").join(m);this.on(n,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,n)}_getCanvasCache(){return this._cache.get(f)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===u&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(f)){const{scene:t,filter:e,hit:n,buffer:r}=this._cache.get(f);o.Util.releaseCanvas(t,e,n,r),this._cache.delete(f)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){const e=t||{};let n={};void 0!==e.x&&void 0!==e.y&&void 0!==e.width&&void 0!==e.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let i=Math.ceil(e.width||n.width),a=Math.ceil(e.height||n.height),s=e.pixelRatio,l=void 0===e.x?Math.floor(n.x):e.x,c=void 0===e.y?Math.floor(n.y):e.y,u=e.offset||0,g=e.drawBorder||!1,p=e.hitCanvasPixelRatio||1;if(!i||!a)return void o.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");i+=2*u+(Math.abs(Math.round(n.x)-l)>.5?1:0),a+=2*u+(Math.abs(Math.round(n.y)-c)>.5?1:0),l-=u,c-=u;const m=new r.SceneCanvas({pixelRatio:s,width:i,height:a}),y=new r.SceneCanvas({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),v=new r.HitCanvas({pixelRatio:p,width:i,height:a}),b=m.getContext(),_=v.getContext(),S=new r.SceneCanvas({width:m.width/m.pixelRatio+Math.abs(l),height:m.height/m.pixelRatio+Math.abs(c),pixelRatio:m.pixelRatio}),x=S.getContext();return v.isCache=!0,m.isCache=!0,this._cache.delete(f),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(m.getContext()._context.imageSmoothingEnabled=!1,y.getContext()._context.imageSmoothingEnabled=!1),b.save(),_.save(),x.save(),b.translate(-l,-c),_.translate(-l,-c),x.translate(-l,-c),S.x=l,S.y=c,this._isUnderCache=!0,this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(d),this.drawScene(m,this,S),this.drawHit(v,this),this._isUnderCache=!1,b.restore(),_.restore(),g&&(b.save(),b.beginPath(),b.rect(0,0,i,a),b.closePath(),b.setAttr("strokeStyle","red"),b.setAttr("lineWidth",5),b.stroke(),b.restore()),this._cache.set(f,{scene:m,filter:y,hit:v,buffer:S,x:l,y:c}),this._requestDraw(),this}isCached(){return this._cache.has(f)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){const n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}];let r=1/0,i=1/0,a=-1/0,s=-1/0;const o=this.getAbsoluteTransform(e);return n.forEach(function(t){const e=o.point(t);void 0===r&&(r=a=e.x,i=s=e.y),r=Math.min(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.x),s=Math.max(s,e.y)}),{x:r,y:i,width:a-r,height:s-i}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);const n=this._getCachedSceneCanvas(),r=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/r,n.height/r),t.restore()}_drawCachedHitCanvas(t){const e=this._getCanvasCache(),n=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t,e,n,r,i=this.filters(),a=this._getCanvasCache(),s=a.scene,l=a.filter,h=l.getContext();if(i){if(!this._filterUpToDate){const a=s.pixelRatio;l.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio);try{for(t=i.length,h.clear(),h.drawImage(s._canvas,0,0,s.getWidth()/a,s.getHeight()/a),e=h.getImageData(0,0,l.getWidth(),l.getHeight()),n=0;n<t;n++)r=i[n],"function"==typeof r?(r.call(this,e),h.putImageData(e,0,0)):o.Util.error("Filter should be type of function, but got "+typeof r+" instead. Please check correct filters")}catch(t){o.Util.error("Unable to apply filter. "+t.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return l}return s}on(t,e){if(this._cache&&this._cache.delete(c),3===arguments.length)return this._delegate.apply(this,arguments);const n=t.split(m);for(let t=0;t<n.length;t++){const r=n[t].split("."),i=r[0],a=r[1]||"";this.eventListeners[i]||(this.eventListeners[i]=[]),this.eventListeners[i].push({name:a,handler:e})}return this}off(t,e){let n,r,i,a,s,o,l=(t||"").split(m),h=l.length;if(this._cache&&this._cache.delete(c),!t)for(r in this.eventListeners)this._off(r);for(n=0;n<h;n++)if(i=l[n],a=i.split("."),s=a[0],o=a[1],s)this.eventListeners[s]&&this._off(s,o,e);else for(r in this.eventListeners)this._off(r,o,e);return this}dispatchEvent(t){const e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(t){e.call(this,t.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,n){const r=this;this.on(t,function(t){const i=t.target.findAncestors(e,!0,r);for(let e=0;e<i.length;e++)(t=o.Util.cloneObject(t)).currentTarget=i[e],n.call(i[e],t)})}remove(){return this.isDragging()&&this.stopDrag(),i.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(d),this._clearSelfAndDescendantCache(y),this._clearSelfAndDescendantCache(b),this._clearSelfAndDescendantCache(g)}_remove(){this._clearCaches();const t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){const e="get"+o.Util._capitalize(t);return o.Util._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){let t=this.getParent(),e=[];for(;t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let e,n;if(!t)return this;for(e in t)"children"!==e&&(n="set"+o.Util._capitalize(e),o.Util._isFunction(this[n])?this[n](t[e]):this._setAttr(e,t[e]))}),this}isListening(){return this._getCache(g,this._isListening)}_isListening(t){if(!this.listening())return!1;const e=this.getParent();return!e||e===t||this===t||e._isListening(t)}isVisible(){return this._getCache(b,this._isVisible)}_isVisible(t){if(!this.visible())return!1;const e=this.getParent();return!e||e===t||this===t||e._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);const n=this.getLayer();let r=!1;i.DD._dragElements.forEach(t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType||t.node.getLayer()===n)&&(r=!0)});const a=!e&&!s.Konva.hitOnDragEnabled&&(r||s.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!a}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t,e,n,r,i=this.getDepth(),a=this,s=0;const o=this.getStage();return"Stage"!==a.nodeType&&o&&function o(l){for(t=[],e=l.length,n=0;n<e;n++)r=l[n],s++,r.nodeType!==p&&(t=t.concat(r.getChildren().slice())),r._id===a._id&&(n=e);t.length>0&&t[0].getDepth()<=i&&o(t)}(o.getChildren()),s}getDepth(){let t=0,e=this.parent;for(;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(v),this._clearSelfAndDescendantCache(u)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const t=this.getStage();if(!t)return null;const e=t.getPointerPosition();if(!e)return null;const n=this.getAbsoluteTransform().copy();return n.invert(),n.point(e)}getAbsolutePosition(t){let e=!1,n=this.parent;for(;n;){if(n.isCached()){e=!0;break}n=n.parent}e&&!t&&(t=!0);const r=this.getAbsoluteTransform(t).getMatrix(),i=new o.Transform,a=this.offset();return i.m=r.slice(),i.translate(a.x,a.y),i.getTranslation()}setAbsolutePosition(t){const{x:e,y:n,...r}=this._clearTransform();this.attrs.x=e,this.attrs.y=n,this._clearCache(v);const i=this._getAbsoluteTransform().copy();return i.invert(),i.translate(t.x,t.y),t={x:this.attrs.x+i.getTranslation().x,y:this.attrs.y+i.getTranslation().y},this._setTransform(r),this.setPosition({x:t.x,y:t.y}),this._clearCache(v),this._clearSelfAndDescendantCache(u),this}_setTransform(t){let e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){const t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let e=t.x,n=t.y,r=this.x(),i=this.y();return void 0!==e&&(r+=e),void 0!==n&&(i+=n),this.setPosition({x:r,y:i}),this}_eachAncestorReverse(t,e){let n,r,i=[],a=this.getParent();if(!e||e._id!==this._id){for(i.unshift(this);a&&(!e||a._id!==e._id);)i.unshift(a),a=a.parent;for(n=i.length,r=0;r<n;r++)t(i[r])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return o.Util.warn("Node has no parent. moveToTop function is ignored."),!1;const t=this.index;return t<this.parent.getChildren().length-1&&(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return o.Util.warn("Node has no parent. moveUp function is ignored."),!1;const t=this.index;return t<this.parent.getChildren().length-1&&(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return o.Util.warn("Node has no parent. moveDown function is ignored."),!1;const t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return o.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(t){if(!this.parent)return o.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&o.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(h,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity();const e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t,e,n,r,i,a=this.getAttrs();const s={attrs:{},className:this.getClassName()};for(t in a)e=a[t],i=o.Util.isObject(e)&&!o.Util._isPlainObject(e)&&!o.Util._isArray(e),i||(n="function"==typeof this[t]&&this[t],delete a[t],r=n?n.call(this):null,a[t]=e,r!==e&&(s.attrs[t]=e));return o.Util._prepareToStringify(s)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,n){const r=[];e&&this._isMatch(t)&&r.push(this);let i=this.parent;for(;i;){if(i===n)return r;i._isMatch(t)&&r.push(i),i=i.parent}return r}isAncestorOf(t){return!1}findAncestor(t,e,n){return this.findAncestors(t,e,n)[0]}_isMatch(t){if(!t)return!1;if("function"==typeof t)return t(this);let e,n,r=t.replace(/ /g,"").split(","),i=r.length;for(e=0;e<i;e++)if(n=r[e],o.Util.isValidSelector(n)||(o.Util.warn('Selector "'+n+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),o.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),o.Util.warn("Konva is awesome, right?")),"#"===n.charAt(0)){if(this.id()===n.slice(1))return!0}else if("."===n.charAt(0)){if(this.hasName(n.slice(1)))return!0}else if(this.className===n||this.nodeType===n)return!0;return!1}getLayer(){const t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(y,this._getStage)}_getStage(){const t=this.getParent();return t?t.getStage():null}fire(t,e={},n){return e.target=e.target||this,n?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(u,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let e;if(t)return e=new o.Transform,this._eachAncestorReverse(function(t){const n=t.transformsEnabled();"all"===n?e.multiply(t.getTransform()):"position"===n&&e.translate(t.x()-t.offsetX(),t.y()-t.offsetY())},t),e;{e=this._cache.get(u)||new o.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();const t=this.transformsEnabled();if("all"===t)e.multiply(this.getTransform());else if("position"===t){const t=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,i=this.attrs.offsetY||0;e.translate(t-r,n-i)}return e.dirty=!1,e}}getAbsoluteScale(t){let e=this;for(;e;)e._isUnderCache&&(t=e),e=e.getParent();const n=this.getAbsoluteTransform(t).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(v,this._getTransform)}_getTransform(){var t,e;const n=this._cache.get(v)||new o.Transform;n.reset();const r=this.x(),i=this.y(),a=s.Konva.getAngle(this.rotation()),l=null!==(t=this.attrs.scaleX)&&void 0!==t?t:1,h=null!==(e=this.attrs.scaleY)&&void 0!==e?e:1,c=this.attrs.skewX||0,u=this.attrs.skewY||0,d=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===r&&0===i||n.translate(r,i),0!==a&&n.rotate(a),0===c&&0===u||n.skew(c,u),1===l&&1===h||n.scale(l,h),0===d&&0===f||n.translate(-1*d,-1*f),n.dirty=!1,n}clone(t){let e,n,r,i,a,s=o.Util.cloneObject(this.attrs);for(e in t)s[e]=t[e];const l=new this.constructor(s);for(e in this.eventListeners)for(n=this.eventListeners[e],r=n.length,i=0;i<r;i++)a=n[i],a.name.indexOf("konva")<0&&(l.eventListeners[e]||(l.eventListeners[e]=[]),l.eventListeners[e].push(a));return l}_toKonvaCanvas(t){t=t||{};const e=this.getClientRect(),n=this.getStage(),i=void 0!==t.x?t.x:Math.floor(e.x),a=void 0!==t.y?t.y:Math.floor(e.y),s=t.pixelRatio||1,o=new r.SceneCanvas({width:t.width||Math.ceil(e.width)||(n?n.width():0),height:t.height||Math.ceil(e.height)||(n?n.height():0),pixelRatio:s}),l=o.getContext(),h=new r.SceneCanvas({width:o.width/o.pixelRatio+Math.abs(i),height:o.height/o.pixelRatio+Math.abs(a),pixelRatio:o.pixelRatio});return!1===t.imageSmoothingEnabled&&(l._context.imageSmoothingEnabled=!1),l.save(),(i||a)&&l.translate(-1*i,-1*a),this.drawScene(o,void 0,h),l.restore(),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){const e=(t=t||{}).mimeType||null,n=t.quality||null,r=this._toKonvaCanvas(t).toDataURL(e,n);return t.callback&&t.callback(r),r}toImage(t){return new Promise((e,n)=>{try{const n=null==t?void 0:t.callback;n&&delete t.callback,o.Util._urlToImage(this.toDataURL(t),function(t){e(t),null==n||n(t)})}catch(t){n(t)}})}toBlob(t){return new Promise((e,n)=>{try{const n=null==t?void 0:t.callback;n&&delete t.callback,this.toCanvas(t).toBlob(t=>{e(t),null==n||n(t)},null==t?void 0:t.mimeType,null==t?void 0:t.quality)}catch(t){n(t)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():s.Konva.dragDistance}_off(t,e,n){let r,i,a,s=this.eventListeners[t];for(r=0;r<s.length;r++)if(i=s[r].name,a=s[r].handler,!("konva"===i&&"konva"!==e||e&&i!==e||n&&n!==a)){if(s.splice(r,1),0===s.length){delete this.eventListeners[t];break}r--}}_fireChangeEvent(t,e,n){this._fire(t+"Change",{oldVal:e,newVal:n})}addName(t){if(!this.hasName(t)){const e=this.name(),n=e?e+" "+t:t;this.name(n)}return this}hasName(t){if(!t)return!1;const e=this.name();return!!e&&-1!==(e||"").split(/\s/g).indexOf(t)}removeName(t){const e=(this.name()||"").split(/\s/g),n=e.indexOf(t);return-1!==n&&(e.splice(n,1),this.name(e.join(" "))),this}setAttr(t,e){const n=this["set"+o.Util._capitalize(t)];return o.Util._isFunction(n)?n.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(s.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();null==t||t.batchDraw()}}_setAttr(t,e){const n=this.attrs[t];(n!==e||o.Util.isObject(e))&&(null==e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,e),this._requestDraw())}_setComponentAttr(t,e,n){let r;void 0!==n&&(r=this.attrs[t],r||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=n,this._fireChangeEvent(t,r,n))}_fireAndBubble(t,e,n){e&&this.nodeType===p&&(e.target=this);const r=["mouseenter","mouseleave","pointerenter","pointerleave","touchenter","touchleave"];if(-1===r.indexOf(t)||!(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||"Stage"===this.nodeType&&!n)){this._fire(t,e);const i=-1!==r.indexOf(t)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!i&&(n&&n.parent?this._fireAndBubble.call(this.parent,t,e,n):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){var e,n,r;const i=null!==(e=this._cache.get(c))&&void 0!==e?e:{};let a=null==i?void 0:i[t];if(void 0===a){a=[];let e=Object.getPrototypeOf(this);for(;e;){const i=null!==(r=null===(n=e.eventListeners)||void 0===n?void 0:n[t])&&void 0!==r?r:[];a.push(...i),e=Object.getPrototypeOf(e)}i[t]=a,this._cache.set(c,i)}return a}_fire(t,e){(e=e||{}).currentTarget=this,e.type=t;const n=this._getProtoListeners(t);if(n)for(let t=0;t<n.length;t++)n[t].handler.call(this,e);const r=this.eventListeners[t];if(r)for(let t=0;t<r.length;t++)r[t].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){const e=t?t.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition();if(!n)return;const a=n._getPointerById(e)||n._changedPointerPositions[0]||r;i.DD._dragElements.set(this._id,{node:this,startPointerPos:a,offset:{x:a.x-r.x,y:a.y-r.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){i.DD._dragElements.has(this._id)||this._createDragElement(t),i.DD._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){const n=this.getStage()._getPointerById(e.pointerId);if(!n)return;let r={x:n.x-e.offset.x,y:n.y-e.offset.y};const i=this.dragBoundFunc();if(void 0!==i){const e=i.call(this,r,t);e?r=e:o.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}stopDrag(t){const e=i.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),i.DD._endDragBefore(t),i.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=i.DD._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(void 0===t.evt.button||s.Konva.dragButtons.indexOf(t.evt.button)>=0))return;if(this.isDragging())return;let e=!1;i.DD._dragElements.forEach(t=>{this.isAncestorOf(t.node)&&(e=!0)}),e||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const t=i.DD._dragElements.get(this._id),e=t&&"dragging"===t.dragStatus,n=t&&"ready"===t.dragStatus;e?this.stopDrag():n&&i.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const e=this.getStage();if(!e)return!1;const n={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return o.Util.haveIntersection(n,this.getClientRect())}static create(t,e){return o.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){let n,r,i,a=x.prototype.getClassName.call(t),l=t.children;if(e&&(t.attrs.container=e),s.Konva[a]||(o.Util.warn('Can not find a node with class name "'+a+'". Fallback to "Shape".'),a="Shape"),n=new(0,s.Konva[a])(t.attrs),l)for(r=l.length,i=0;i<r;i++)n.add(x._createNode(l[i]));return n}}e.Node=x,x.prototype.nodeType="Node",x.prototype._attrsAffectingSize=[],x.prototype.eventListeners={},x.prototype.on.call(x.prototype,_,function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(v),this._clearSelfAndDescendantCache(u))}),x.prototype.on.call(x.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(b)}),x.prototype.on.call(x.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(g)}),x.prototype.on.call(x.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(h)});const w=a.Factory.addGetterSetter;w(x,"zIndex"),w(x,"absolutePosition"),w(x,"position"),w(x,"x",0,(0,l.getNumberValidator)()),w(x,"y",0,(0,l.getNumberValidator)()),w(x,"globalCompositeOperation","source-over",(0,l.getStringValidator)()),w(x,"opacity",1,(0,l.getNumberValidator)()),w(x,"name","",(0,l.getStringValidator)()),w(x,"id","",(0,l.getStringValidator)()),w(x,"rotation",0,(0,l.getNumberValidator)()),a.Factory.addComponentsGetterSetter(x,"scale",["x","y"]),w(x,"scaleX",1,(0,l.getNumberValidator)()),w(x,"scaleY",1,(0,l.getNumberValidator)()),a.Factory.addComponentsGetterSetter(x,"skew",["x","y"]),w(x,"skewX",0,(0,l.getNumberValidator)()),w(x,"skewY",0,(0,l.getNumberValidator)()),a.Factory.addComponentsGetterSetter(x,"offset",["x","y"]),w(x,"offsetX",0,(0,l.getNumberValidator)()),w(x,"offsetY",0,(0,l.getNumberValidator)()),w(x,"dragDistance",void 0,(0,l.getNumberValidator)()),w(x,"width",0,(0,l.getNumberValidator)()),w(x,"height",0,(0,l.getNumberValidator)()),w(x,"listening",!0,(0,l.getBooleanValidator)()),w(x,"preventDefault",!0,(0,l.getBooleanValidator)()),w(x,"filters",void 0,function(t){return this._filterUpToDate=!1,t}),w(x,"visible",!0,(0,l.getBooleanValidator)()),w(x,"transformsEnabled","all",(0,l.getStringValidator)()),w(x,"size"),w(x,"dragBoundFunc"),w(x,"draggable",!1,(0,l.getBooleanValidator)()),a.Factory.backCompat(x,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"})},8722(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCapturedShape=function(t){return i.get(t)},e.createEvent=s,e.hasPointerCapture=function(t,e){return i.get(t)===e},e.setPointerCapture=function(t,e){o(t),e.getStage()&&(i.set(t,e),a&&e._fire("gotpointercapture",s(new PointerEvent("gotpointercapture"))))},e.releaseCapture=o;const r=n(8871),i=new Map,a=void 0!==r.Konva._global.PointerEvent;function s(t){return{evt:t,pointerId:t.pointerId}}function o(t,e){const n=i.get(t);if(!n)return;const r=n.getStage();r&&r.content,i.delete(t),a&&n._fire("lostpointercapture",s(new PointerEvent("lostpointercapture")))}},4723(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const r=n(8871),i=n(4060),a=n(4892),s=n(6536),o=n(5483),l=n(8871),h=n(8722),c="hasShadow",u="shadowRGBA",d="patternImage",f="linearGradient",g="radialGradient";let p;function m(){return p||(p=i.Util.createCanvasElement().getContext("2d"),p)}e.shapes={};class y extends s.Node{constructor(t){let n;for(super(t);n=i.Util.getRandomColor(),!n||n in e.shapes;);this.colorKey=n,e.shapes[n]=this}getContext(){return i.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return i.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(d,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const t=m().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(t&&t.setTransform){const e=new i.Transform;e.translate(this.fillPatternX(),this.fillPatternY()),e.rotate(r.Konva.getAngle(this.fillPatternRotation())),e.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),e.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const n=e.getMatrix(),a="undefined"==typeof DOMMatrix?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);t.setTransform(a)}return t}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){const t=this.fillLinearGradientColorStops();if(t){const e=m(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=e.createLinearGradient(n.x,n.y,r.x,r.y);for(let e=0;e<t.length;e+=2)i.addColorStop(t[e],t[e+1]);return i}}_getRadialGradient(){return this._getCache(g,this.__getRadialGradient)}__getRadialGradient(){const t=this.fillRadialGradientColorStops();if(t){const e=m(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=e.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius());for(let e=0;e<t.length;e+=2)i.addColorStop(t[e],t[e+1]);return i}}getShadowRGBA(){return this._getCache(u,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;const t=i.Util.colorToRGBA(this.shadowColor());return t?"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")":void 0}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops()))}hasHitStroke(){const t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){const e=this.getStage();if(!e)return!1;const n=e.bufferHitCanvas;return n.getContext().clear(),this.drawHit(n,void 0,!0),n.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return s.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;if(null!==(e=this.attrs.perfectDrawEnabled)&&void 0!==e&&!e)return!1;const n=t||this.hasFill(),r=this.hasStroke(),i=1!==this.getAbsoluteOpacity();if(n&&r&&i)return!0;const a=this.hasShadow(),s=this.shadowForStrokeEnabled();return!!(n&&r&&a&&s)}setStrokeHitEnabled(t){i.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){const t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let e=!1,n=this.getParent();for(;n;){if(n.isCached()){e=!0;break}n=n.getParent()}const r=t.skipTransform,i=t.relativeTo||e&&this.getStage()||void 0,a=this.getSelfRect(),s=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,o=a.width+s,l=a.height+s,h=!t.skipShadow&&this.hasShadow(),c=h?this.shadowOffsetX():0,u=h?this.shadowOffsetY():0,d=o+Math.abs(c),f=l+Math.abs(u),g=h&&this.shadowBlur()||0,p={width:d+2*g,height:f+2*g,x:-(s/2+g)+Math.min(c,0)+a.x,y:-(s/2+g)+Math.min(u,0)+a.y};return r?p:this._transformedRect(p,i)}drawScene(t,e,n){const r=this.getLayer(),i=(t||r.getCanvas()).getContext(),a=this._getCanvasCache(),s=this.getSceneFunc(),o=this.hasShadow();let l;const h=e===this;if(!this.isVisible()&&!h)return this;if(a){i.save();const t=this.getAbsoluteTransform(e).getMatrix();return i.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedSceneCanvas(i),i.restore(),this}if(!s)return this;if(i.save(),this._useBufferCanvas()){l=this.getStage();const t=n||l.bufferCanvas,r=t.getContext();r.clear(),r.save(),r._applyLineJoin(this);const a=this.getAbsoluteTransform(e).getMatrix();r.transform(a[0],a[1],a[2],a[3],a[4],a[5]),s.call(this,r,this),r.restore();const h=t.pixelRatio;o&&i._applyShadow(this),i._applyOpacity(this),i._applyGlobalCompositeOperation(this),i.drawImage(t._canvas,t.x||0,t.y||0,t.width/h,t.height/h)}else{if(i._applyLineJoin(this),!h){const t=this.getAbsoluteTransform(e).getMatrix();i.transform(t[0],t[1],t[2],t[3],t[4],t[5]),i._applyOpacity(this),i._applyGlobalCompositeOperation(this)}o&&i._applyShadow(this),s.call(this,i,this)}return i.restore(),this}drawHit(t,e,n=!1){if(!this.shouldDrawHit(e,n))return this;const r=this.getLayer(),a=t||r.hitCanvas,s=a&&a.getContext(),o=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),h=l&&l.hit;if(this.colorKey||i.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),h){s.save();const t=this.getAbsoluteTransform(e).getMatrix();return s.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedHitCanvas(s),s.restore(),this}if(!o)return this;if(s.save(),s._applyLineJoin(this),this!==e){const t=this.getAbsoluteTransform(e).getMatrix();s.transform(t[0],t[1],t[2],t[3],t[4],t[5])}return o.call(this,s,this),s.restore(),this}drawHitFromCache(t=0){const e=this._getCanvasCache(),n=this._getCachedSceneCanvas(),r=e.hit,a=r.getContext(),s=r.getWidth(),o=r.getHeight();a.clear(),a.drawImage(n._canvas,0,0,s,o);try{const e=a.getImageData(0,0,s,o),n=e.data,r=n.length,l=i.Util._hexToRgb(this.colorKey);for(let e=0;e<r;e+=4)n[e+3]>t?(n[e]=l.r,n[e+1]=l.g,n[e+2]=l.b,n[e+3]=255):n[e+3]=0;a.putImageData(e,0,0)}catch(t){i.Util.error("Unable to draw hit graph from cached scene canvas. "+t.message)}return this}hasPointerCapture(t){return h.hasPointerCapture(t,this)}setPointerCapture(t){h.setPointerCapture(t,this)}releaseCapture(t){h.releaseCapture(t,this)}}e.Shape=y,y.prototype._fillFunc=function(t){const e=this.attrs.fillRule;e?t.fill(e):t.fill()},y.prototype._strokeFunc=function(t){t.stroke()},y.prototype._fillFuncHit=function(t){const e=this.attrs.fillRule;e?t.fill(e):t.fill()},y.prototype._strokeFuncHit=function(t){t.stroke()},y.prototype._centroid=!1,y.prototype.nodeType="Shape",(0,l._registerNode)(y),y.prototype.eventListeners={},y.prototype.on.call(y.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(c)}),y.prototype.on.call(y.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(u)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",function(){this._clearCache(d)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",function(){this._clearCache(f)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",function(){this._clearCache(g)}),a.Factory.addGetterSetter(y,"stroke",void 0,(0,o.getStringOrGradientValidator)()),a.Factory.addGetterSetter(y,"strokeWidth",2,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"fillAfterStrokeEnabled",!1),a.Factory.addGetterSetter(y,"hitStrokeWidth","auto",(0,o.getNumberOrAutoValidator)()),a.Factory.addGetterSetter(y,"strokeHitEnabled",!0,(0,o.getBooleanValidator)()),a.Factory.addGetterSetter(y,"perfectDrawEnabled",!0,(0,o.getBooleanValidator)()),a.Factory.addGetterSetter(y,"shadowForStrokeEnabled",!0,(0,o.getBooleanValidator)()),a.Factory.addGetterSetter(y,"lineJoin"),a.Factory.addGetterSetter(y,"lineCap"),a.Factory.addGetterSetter(y,"sceneFunc"),a.Factory.addGetterSetter(y,"hitFunc"),a.Factory.addGetterSetter(y,"dash"),a.Factory.addGetterSetter(y,"dashOffset",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"shadowColor",void 0,(0,o.getStringValidator)()),a.Factory.addGetterSetter(y,"shadowBlur",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"shadowOpacity",1,(0,o.getNumberValidator)()),a.Factory.addComponentsGetterSetter(y,"shadowOffset",["x","y"]),a.Factory.addGetterSetter(y,"shadowOffsetX",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"shadowOffsetY",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"fillPatternImage"),a.Factory.addGetterSetter(y,"fill",void 0,(0,o.getStringOrGradientValidator)()),a.Factory.addGetterSetter(y,"fillPatternX",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"fillPatternY",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"fillLinearGradientColorStops"),a.Factory.addGetterSetter(y,"strokeLinearGradientColorStops"),a.Factory.addGetterSetter(y,"fillRadialGradientStartRadius",0),a.Factory.addGetterSetter(y,"fillRadialGradientEndRadius",0),a.Factory.addGetterSetter(y,"fillRadialGradientColorStops"),a.Factory.addGetterSetter(y,"fillPatternRepeat","repeat"),a.Factory.addGetterSetter(y,"fillEnabled",!0),a.Factory.addGetterSetter(y,"strokeEnabled",!0),a.Factory.addGetterSetter(y,"shadowEnabled",!0),a.Factory.addGetterSetter(y,"dashEnabled",!0),a.Factory.addGetterSetter(y,"strokeScaleEnabled",!0),a.Factory.addGetterSetter(y,"fillPriority","color"),a.Factory.addComponentsGetterSetter(y,"fillPatternOffset",["x","y"]),a.Factory.addGetterSetter(y,"fillPatternOffsetX",0,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"fillPatternOffsetY",0,(0,o.getNumberValidator)()),a.Factory.addComponentsGetterSetter(y,"fillPatternScale",["x","y"]),a.Factory.addGetterSetter(y,"fillPatternScaleX",1,(0,o.getNumberValidator)()),a.Factory.addGetterSetter(y,"fillPatternScaleY",1,(0,o.getNumberValidator)()),a.Factory.addComponentsGetterSetter(y,"fillLinearGradientStartPoint",["x","y"]),a.Factory.addComponentsGetterSetter(y,"strokeLinearGradientStartPoint",["x","y"]),a.Factory.addGetterSetter(y,"fillLinearGradientStartPointX",0),a.Factory.addGetterSetter(y,"strokeLinearGradientStartPointX",0),a.Factory.addGetterSetter(y,"fillLinearGradientStartPointY",0),a.Factory.addGetterSetter(y,"strokeLinearGradientStartPointY",0),a.Factory.addComponentsGetterSetter(y,"fillLinearGradientEndPoint",["x","y"]),a.Factory.addComponentsGetterSetter(y,"strokeLinearGradientEndPoint",["x","y"]),a.Factory.addGetterSetter(y,"fillLinearGradientEndPointX",0),a.Factory.addGetterSetter(y,"strokeLinearGradientEndPointX",0),a.Factory.addGetterSetter(y,"fillLinearGradientEndPointY",0),a.Factory.addGetterSetter(y,"strokeLinearGradientEndPointY",0),a.Factory.addComponentsGetterSetter(y,"fillRadialGradientStartPoint",["x","y"]),a.Factory.addGetterSetter(y,"fillRadialGradientStartPointX",0),a.Factory.addGetterSetter(y,"fillRadialGradientStartPointY",0),a.Factory.addComponentsGetterSetter(y,"fillRadialGradientEndPoint",["x","y"]),a.Factory.addGetterSetter(y,"fillRadialGradientEndPointX",0),a.Factory.addGetterSetter(y,"fillRadialGradientEndPointY",0),a.Factory.addGetterSetter(y,"fillPatternRotation",0),a.Factory.addGetterSetter(y,"fillRule",void 0,(0,o.getStringValidator)()),a.Factory.backCompat(y,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})},7324(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const r=n(4060),i=n(4892),a=n(4473),s=n(8871),o=n(8604),l=n(1268),h=n(8871),c=n(8722),u="mouseleave",d="mouseover",f="mouseenter",g="mousemove",p="mousedown",m="mouseup",y="pointermove",v="pointerdown",b="pointerup",_="pointercancel",S="pointerout",x="pointerleave",w="pointerover",C="pointerenter",k="contextmenu",P="touchstart",T="touchend",F="touchmove",E="touchcancel",M="wheel",N=[[f,"_pointerenter"],[p,"_pointerdown"],[g,"_pointermove"],[m,"_pointerup"],[u,"_pointerleave"],[P,"_pointerdown"],[F,"_pointermove"],[T,"_pointerup"],[E,"_pointercancel"],[d,"_pointerover"],[M,"_wheel"],[k,"_contextmenu"],[v,"_pointerdown"],[y,"_pointermove"],[b,"_pointerup"],[_,"_pointercancel"],[x,"_pointerleave"],["lostpointercapture","_lostpointercapture"]],A={mouse:{[S]:"mouseout",[x]:u,[w]:d,[C]:f,[y]:g,[v]:p,[b]:m,[_]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[S]:"touchout",[x]:"touchleave",[w]:"touchover",[C]:"touchenter",[y]:F,[v]:P,[b]:T,[_]:E,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[S]:S,[x]:x,[w]:w,[C]:C,[y]:y,[v]:v,[b]:b,[_]:_,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},R=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",D=t=>{const e=R(t);return"pointer"===e?s.Konva.pointerEventsEnabled&&A.pointer:"touch"===e?A.touch:"mouse"===e?A.mouse:void 0};function L(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&r.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}e.stages=[];class I extends a.Container{constructor(t){super(L(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{L(this.attrs)}),this._checkVisibility()}_validateAdd(t){const e="Layer"===t.getType(),n="FastLayer"===t.getType();e||n||r.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if("string"==typeof t){let e;if("."===t.charAt(0)){const e=t.slice(1);t=document.getElementsByClassName(e)[0]}else e="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(e);if(!t)throw"Can not find container in document with id "+e}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const t=this.children,e=t.length;for(let n=0;n<e;n++)t[n].clear();return this}clone(t){return t||(t={}),t.container="undefined"!=typeof document&&document.createElement("div"),a.Container.prototype.clone.call(this,t)}destroy(){super.destroy();const t=this.content;t&&r.Util._isInDocument(t)&&this.container().removeChild(t);const n=e.stages.indexOf(this);return n>-1&&e.stages.splice(n,1),r.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(r.Util.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}_getPointerById(t){return this._pointerPositions.find(e=>e.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){(t=t||{}).x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();const e=new o.SceneCanvas({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),n=e.getContext()._context,r=this.children;return(t.x||t.y)&&n.translate(-1*t.x,-1*t.y),r.forEach(function(e){if(!e.isVisible())return;const r=e._toKonvaCanvas(t);n.drawImage(r._canvas,t.x,t.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}),e}getIntersection(t){if(!t)return null;const e=this.children;for(let n=e.length-1;n>=0;n--){const r=e[n].getIntersection(t);if(r)return r}return null}_resizeDOM(){const t=this.width(),e=this.height();this.content&&(this.content.style.width=t+"px",this.content.style.height=e+"px"),this.bufferCanvas.setSize(t,e),this.bufferHitCanvas.setSize(t,e),this.children.forEach(n=>{n.setSize({width:t,height:e}),n.draw()})}add(t,...e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}super.add(t);const n=this.children.length;return n>5&&r.Util.warn("The stage has "+n+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),s.Konva.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return c.hasPointerCapture(t,this)}setPointerCapture(t){c.setPointerCapture(t,this)}releaseCapture(t){c.releaseCapture(t,this)}getLayers(){return this.children}_bindContentEvents(){s.Konva.isBrowser&&N.forEach(([t,e])=>{this.content.addEventListener(t,t=>{this[e](t)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);const e=D(t.type);e&&this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const e=D(t.type);e&&this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}_pointerleave(t){const e=D(t.type),n=R(t.type);if(!e)return;this.setPointersPositions(t);const r=this._getTargetShape(n),i=!(s.Konva.isDragging()||s.Konva.isTransforming())||s.Konva.hitOnDragEnabled;r&&i?(r._fireAndBubble(e.pointerout,{evt:t}),r._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[n+"targetShape"]=null):i&&(this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(e.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){const e=D(t.type),n=R(t.type);if(!e)return;this.setPointersPositions(t);let r=!1;this._changedPointerPositions.forEach(i=>{const a=this.getIntersection(i);if(l.DD.justDragged=!1,s.Konva["_"+n+"ListenClick"]=!0,!a||!a.isListening())return void(this[n+"ClickStartShape"]=void 0);s.Konva.capturePointerEventsEnabled&&a.setPointerCapture(i.id),this[n+"ClickStartShape"]=a,a._fireAndBubble(e.pointerdown,{evt:t,pointerId:i.id}),r=!0;const o=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&o&&t.preventDefault()}),r||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){const e=D(t.type),n=R(t.type);if(!e)return;if(s.Konva.isDragging()&&l.DD.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t),(s.Konva.isDragging()||s.Konva.isTransforming())&&!s.Konva.hitOnDragEnabled)return;const r={};let i=!1;const a=this._getTargetShape(n);this._changedPointerPositions.forEach(s=>{const o=c.getCapturedShape(s.id)||this.getIntersection(s),l=s.id,h={evt:t,pointerId:l},u=a!==o;if(u&&a&&(a._fireAndBubble(e.pointerout,{...h},o),a._fireAndBubble(e.pointerleave,{...h},o)),o){if(r[o._id])return;r[o._id]=!0}o&&o.isListening()?(i=!0,u&&(o._fireAndBubble(e.pointerover,{...h},a),o._fireAndBubble(e.pointerenter,{...h},a),this[n+"targetShape"]=o),o._fireAndBubble(e.pointermove,{...h})):a&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:l}),this[n+"targetShape"]=null)}),i||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const e=D(t.type),n=R(t.type);if(!e)return;this.setPointersPositions(t);const r=this[n+"ClickStartShape"],i=this[n+"ClickEndShape"],a={};let o=!1;this._changedPointerPositions.forEach(h=>{const u=c.getCapturedShape(h.id)||this.getIntersection(h);if(u){if(u.releaseCapture(h.id),a[u._id])return;a[u._id]=!0}const d=h.id,f={evt:t,pointerId:d};let g=!1;s.Konva["_"+n+"InDblClickWindow"]?(g=!0,clearTimeout(this[n+"DblTimeout"])):l.DD.justDragged||(s.Konva["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout(function(){s.Konva["_"+n+"InDblClickWindow"]=!1},s.Konva.dblClickWindow),u&&u.isListening()?(o=!0,this[n+"ClickEndShape"]=u,u._fireAndBubble(e.pointerup,{...f}),s.Konva["_"+n+"ListenClick"]&&r&&r===u&&(u._fireAndBubble(e.pointerclick,{...f}),g&&i&&i===u&&u._fireAndBubble(e.pointerdblclick,{...f}))):(this[n+"ClickEndShape"]=null,s.Konva["_"+n+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:d}),g&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:d}))}),o||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),s.Konva["_"+n+"ListenClick"]=!1,t.cancelable&&"touch"!==n&&"pointer"!==n&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);const e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(k,{evt:t}):this._fire(k,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);const e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(M,{evt:t}):this._fire(M,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const e=c.getCapturedShape(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(b,c.createEvent(t)),c.releaseCapture(t.pointerId)}_lostpointercapture(t){c.releaseCapture(t.pointerId)}setPointersPositions(t){const e=this._getContentPosition();let n=null,i=null;void 0!==(t=t||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,t=>{this._pointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,t=>{this._changedPointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})})):(n=(t.clientX-e.left)/e.scaleX,i=(t.clientY-e.top)/e.scaleY,this.pointerPos={x:n,y:i},this._pointerPositions=[{x:n,y:i,id:r.Util._getFirstPointerId(t)}],this._changedPointerPositions=[{x:n,y:i,id:r.Util._getFirstPointerId(t)}])}_setPointerPosition(t){r.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!s.Konva.isBrowser)return;const t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return r.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}e.Stage=I,I.prototype.nodeType="Stage",(0,h._registerNode)(I),i.Factory.addGetterSetter(I,"container"),s.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(t=>{t.batchDraw()})})},8665(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const r=n(4060),i=n(9696),a=n(6536),s=n(8871),o={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l=["fill","stroke","shadowColor"];let h=0;class c{constructor(t,e,n,r,i,a,s){this.prop=t,this.propFunc=e,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(t){const e=this[t];e&&e()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const t=this.getTimer()-this._startTime;2===this.state?this.setTime(t):3===this.state&&this.setTime(this.duration-t)}pause(){this.state=1,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class u{constructor(t){const n=this,a=t.node,l=a._id,d=t.easing||e.Easings.Linear,f=!!t.yoyo;let g,p;g=void 0===t.duration?.3:0===t.duration?.001:t.duration,this.node=a,this._id=h++;const m=a.getLayer()||(a instanceof s.Konva.Stage?a.getLayers():null);for(p in m||r.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new i.Animation(function(){n.tween.onEnterFrame()},m),this.tween=new c(p,function(t){n._tweenFunc(t)},d,0,1,1e3*g,f),this._addListeners(),u.attrs[l]||(u.attrs[l]={}),u.attrs[l][this._id]||(u.attrs[l][this._id]={}),u.tweens[l]||(u.tweens[l]={}),t)void 0===o[p]&&this._addAttr(p,t[p]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,e){const n=this.node,i=n._id;let a,s,o,h,c;const d=u.tweens[i][t];d&&delete u.attrs[i][d][t];let f=n.getAttr(t);if(r.Util._isArray(e))if(a=[],s=Math.max(e.length,f.length),"points"===t&&e.length!==f.length&&(e.length>f.length?(h=f,f=r.Util._prepareArrayForTween(f,e,n.closed())):(o=e,e=r.Util._prepareArrayForTween(e,f,n.closed()))),0===t.indexOf("fill"))for(let t=0;t<s;t++)if(t%2==0)a.push(e[t]-f[t]);else{const n=r.Util.colorToRGBA(f[t]);c=r.Util.colorToRGBA(e[t]),f[t]=n,a.push({r:c.r-n.r,g:c.g-n.g,b:c.b-n.b,a:c.a-n.a})}else for(let t=0;t<s;t++)a.push(e[t]-f[t]);else-1!==l.indexOf(t)?(f=r.Util.colorToRGBA(f),c=r.Util.colorToRGBA(e),a={r:c.r-f.r,g:c.g-f.g,b:c.b-f.b,a:c.a-f.a}):a=e-f;u.attrs[i][this._id][t]={start:f,diff:a,end:e,trueEnd:o,trueStart:h},u.tweens[i][t]=this._id}_tweenFunc(t){const e=this.node,n=u.attrs[e._id][this._id];let i,a,s,o,h,c,d,f;for(i in n){if(a=n[i],s=a.start,o=a.diff,f=a.end,r.Util._isArray(s))if(h=[],d=Math.max(s.length,f.length),0===i.indexOf("fill"))for(c=0;c<d;c++)c%2==0?h.push((s[c]||0)+o[c]*t):h.push("rgba("+Math.round(s[c].r+o[c].r*t)+","+Math.round(s[c].g+o[c].g*t)+","+Math.round(s[c].b+o[c].b*t)+","+(s[c].a+o[c].a*t)+")");else for(c=0;c<d;c++)h.push((s[c]||0)+o[c]*t);else h=-1!==l.indexOf(i)?"rgba("+Math.round(s.r+o.r*t)+","+Math.round(s.g+o.g*t)+","+Math.round(s.b+o.b*t)+","+(s.a+o.a*t)+")":s+o*t;e.setAttr(i,h)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const t=this.node,e=u.attrs[t._id][this._id];e.points&&e.points.trueEnd&&t.setAttr("points",e.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const t=this.node,e=u.attrs[t._id][this._id];e.points&&e.points.trueStart&&t.points(e.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(1e3*t),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const t=this.node._id,e=this._id,n=u.tweens[t];this.pause(),this.anim&&this.anim.stop();for(const e in n)delete u.tweens[t][e];delete u.attrs[t][e],u.tweens[t]&&(0===Object.keys(u.tweens[t]).length&&delete u.tweens[t],0===Object.keys(u.attrs[t]).length&&delete u.attrs[t])}}e.Tween=u,u.attrs={},u.tweens={},a.Node.prototype.to=function(t){const e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new u(t).play()},e.Easings={BackEaseIn(t,e,n,r){const i=1.70158;return n*(t/=r)*t*((i+1)*t-i)+e},BackEaseOut(t,e,n,r){const i=1.70158;return n*((t=t/r-1)*t*((i+1)*t+i)+1)+e},BackEaseInOut(t,e,n,r){let i=1.70158;return(t/=r/2)<1?n/2*(t*t*((1+(i*=1.525))*t-i))+e:n/2*((t-=2)*t*((1+(i*=1.525))*t+i)+2)+e},ElasticEaseIn(t,e,n,r,i,a){let s=0;return 0===t?e:1===(t/=r)?e+n:(a||(a=.3*r),!i||i<Math.abs(n)?(i=n,s=a/4):s=a/(2*Math.PI)*Math.asin(n/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/a)+e)},ElasticEaseOut(t,e,n,r,i,a){let s=0;return 0===t?e:1===(t/=r)?e+n:(a||(a=.3*r),!i||i<Math.abs(n)?(i=n,s=a/4):s=a/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*t)*Math.sin((t*r-s)*(2*Math.PI)/a)+n+e)},ElasticEaseInOut(t,e,n,r,i,a){let s=0;return 0===t?e:2==(t/=r/2)?e+n:(a||(a=r*(.3*1.5)),!i||i<Math.abs(n)?(i=n,s=a/4):s=a/(2*Math.PI)*Math.asin(n/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/a)*-.5+e:i*Math.pow(2,-10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/a)*.5+n+e)},BounceEaseOut:(t,e,n,r)=>(t/=r)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e,BounceEaseIn:(t,n,r,i)=>r-e.Easings.BounceEaseOut(i-t,0,r,i)+n,BounceEaseInOut:(t,n,r,i)=>t<i/2?.5*e.Easings.BounceEaseIn(2*t,0,r,i)+n:.5*e.Easings.BounceEaseOut(2*t-i,0,r,i)+.5*r+n,EaseIn:(t,e,n,r)=>n*(t/=r)*t+e,EaseOut:(t,e,n,r)=>-n*(t/=r)*(t-2)+e,EaseInOut:(t,e,n,r)=>(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e,StrongEaseIn:(t,e,n,r)=>n*(t/=r)*t*t*t*t+e,StrongEaseOut:(t,e,n,r)=>n*((t=t/r-1)*t*t*t*t+1)+e,StrongEaseInOut:(t,e,n,r)=>(t/=r/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e,Linear:(t,e,n,r)=>n*t/r+e}},4060(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const r=n(8871);class i{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new i(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){const e=this.m;return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}}translate(t,e){return this.m[4]+=this.m[0]*t+this.m[2]*e,this.m[5]+=this.m[1]*t+this.m[3]*e,this}scale(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this}rotate(t){const e=Math.cos(t),n=Math.sin(t),r=this.m[0]*e+this.m[2]*n,i=this.m[1]*e+this.m[3]*n,a=this.m[0]*-n+this.m[2]*e,s=this.m[1]*-n+this.m[3]*e;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,e){const n=this.m[0]+this.m[2]*e,r=this.m[1]+this.m[3]*e,i=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this}multiply(t){const e=this.m[0]*t.m[0]+this.m[2]*t.m[1],n=this.m[1]*t.m[0]+this.m[3]*t.m[1],r=this.m[0]*t.m[2]+this.m[2]*t.m[3],i=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=s,this}invert(){const t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,n=-this.m[1]*t,r=-this.m[2]*t,i=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){const t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],a=t*i-n*r,s={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=n){const e=Math.sqrt(t*t+n*n);s.rotation=n>0?Math.acos(t/e):-Math.acos(t/e),s.scaleX=e,s.scaleY=a/e,s.skewX=(t*r+n*i)/a,s.skewY=0}else if(0!=r||0!=i){const e=Math.sqrt(r*r+i*i);s.rotation=Math.PI/2-(i>0?Math.acos(-r/e):-Math.acos(r/e)),s.scaleX=a/e,s.scaleY=e,s.skewX=0,s.skewY=(t*r+n*i)/a}return s.rotation=e.Util._getRotation(s.rotation),s}}e.Transform=i;const a=Math.PI/180,s=180/Math.PI,o="Konva error: ",l={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,132,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,255,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,203],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:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],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,5]},h=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let c=[];const u="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(t){setTimeout(t,60)};e.Util={_isElement:t=>!(!t||1!=t.nodeType),_isFunction:t=>!!(t&&t.constructor&&t.call&&t.apply),_isPlainObject:t=>!!t&&t.constructor===Object,_isArray:t=>"[object Array]"===Object.prototype.toString.call(t),_isNumber:t=>"[object Number]"===Object.prototype.toString.call(t)&&!isNaN(t)&&isFinite(t),_isString:t=>"[object String]"===Object.prototype.toString.call(t),_isBoolean:t=>"[object Boolean]"===Object.prototype.toString.call(t),isObject:t=>t instanceof Object,isValidSelector(t){if("string"!=typeof t)return!1;const e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign:t=>0===t||t>0?1:-1,requestAnimFrame(t){c.push(t),1===c.length&&u(function(){const t=c;c=[],t.forEach(function(t){t()})})},createCanvasElement(){const t=document.createElement("canvas");try{t.style=t.style||{}}catch(t){}return t},createImageElement:()=>document.createElement("img"),_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,n){const r=e.Util.createImageElement();r.onload=function(){n(r)},r.src=t},_rgbToHex:(t,e,n)=>((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1),_hexToRgb(t){t=t.replace("#","");const e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor(){let t=(16777215*Math.random()|0).toString(16);for(;t.length<6;)t="0"+t;return"#"+t},getRGB(t){let e;return t in l?(e=l[t],{r:e[0],g:e[1],b:e[2]}):"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?(e=h.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA:t=>(t=t||"black",e.Util._namedColorToRBA(t)||e.Util._hex3ColorToRGBA(t)||e.Util._hex4ColorToRGBA(t)||e.Util._hex6ColorToRGBA(t)||e.Util._hex8ColorToRGBA(t)||e.Util._rgbColorToRGBA(t)||e.Util._rgbaColorToRGBA(t)||e.Util._hslColorToRGBA(t)),_namedColorToRBA(t){const e=l[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(0===t.indexOf("rgb(")){const e=(t=t.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(0===t.indexOf("rgba(")){const e=(t=t.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map((t,e)=>"%"===t.slice(-1)?3===e?parseInt(t)/100:parseInt(t)/100*255:Number(t));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex8ColorToRGBA(t){if("#"===t[0]&&9===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:parseInt(t.slice(7,9),16)/255}},_hex6ColorToRGBA(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex4ColorToRGBA(t){if("#"===t[0]&&5===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:parseInt(t[4]+t[4],16)/255}},_hex3ColorToRGBA(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){const[e,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),r=Number(n[0])/360,i=Number(n[1])/100,a=Number(n[2])/100;let s,o,l;if(0===i)return l=255*a,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};s=a<.5?a*(1+i):a+i-a*i;const h=2*a-s,c=[0,0,0];for(let t=0;t<3;t++)o=r+1/3*-(t-1),o<0&&o++,o>1&&o--,l=6*o<1?h+6*(s-h)*o:2*o<1?s:3*o<2?h+(s-h)*(2/3-o)*6:h,c[t]=255*l;return{r:Math.round(c[0]),g:Math.round(c[1]),b:Math.round(c[2]),a:1}}},haveIntersection:(t,e)=>!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y),cloneObject(t){const e={};for(const n in t)this._isPlainObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray:t=>t.slice(0),degToRad:t=>t*a,radToDeg:t=>t*s,_degToRad:t=>(e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(t)),_radToDeg:t=>(e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(t)),_getRotation:t=>r.Konva.angleDeg?e.Util.radToDeg(t):t,_capitalize:t=>t.charAt(0).toUpperCase()+t.slice(1),throw(t){throw new Error(o+t)},error(t){console.error(o+t)},warn(t){r.Konva.showWarnings&&console.warn("Konva warning: "+t)},each(t,e){for(const n in t)e(n,t[n])},_inRange:(t,e,n)=>e<=t&&t<n,_getProjectionToSegment(t,e,n,r,i,a){let s,o,l;const h=(t-n)*(t-n)+(e-r)*(e-r);if(0==h)s=t,o=e,l=(i-n)*(i-n)+(a-r)*(a-r);else{const c=((i-t)*(n-t)+(a-e)*(r-e))/h;c<0?(s=t,o=e,l=(t-i)*(t-i)+(e-a)*(e-a)):c>1?(s=n,o=r,l=(n-i)*(n-i)+(r-a)*(r-a)):(s=t+c*(n-t),o=e+c*(r-e),l=(s-i)*(s-i)+(o-a)*(o-a))}return[s,o,l]},_getProjectionToLine(t,n,r){const i=e.Util.cloneObject(t);let a=Number.MAX_VALUE;return n.forEach(function(s,o){if(!r&&o===n.length-1)return;const l=n[(o+1)%n.length],h=e.Util._getProjectionToSegment(s.x,s.y,l.x,l.y,t.x,t.y),c=h[0],u=h[1],d=h[2];d<a&&(i.x=c,i.y=u,a=d)}),i},_prepareArrayForTween(t,n,r){const i=[],a=[];if(t.length>n.length){const e=n;n=t,t=e}for(let e=0;e<t.length;e+=2)i.push({x:t[e],y:t[e+1]});for(let t=0;t<n.length;t+=2)a.push({x:n[t],y:n[t+1]});const s=[];return a.forEach(function(t){const n=e.Util._getProjectionToLine(t,i,r);s.push(n.x),s.push(n.y)}),s},_prepareToStringify(t){let n;t.visitedByCircularReferenceRemoval=!0;for(const r in t)if(t.hasOwnProperty(r)&&t[r]&&"object"==typeof t[r])if(n=Object.getOwnPropertyDescriptor(t,r),t[r].visitedByCircularReferenceRemoval||e.Util._isElement(t[r])){if(!n.configurable)return null;delete t[r]}else if(null===e.Util._prepareToStringify(t[r])){if(!n.configurable)return null;delete t[r]}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(const n in e)t[n]=e[n];return t},_getFirstPointerId:t=>t.touches?t.changedTouches[0].identifier:t.pointerId||999,releaseCanvas(...t){r.Konva.releaseCanvasOnDestroy&&t.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(t,e,n,r){let i=0,a=0,s=0,o=0;"number"==typeof r?i=a=s=o=Math.min(r,e/2,n/2):(i=Math.min(r[0]||0,e/2,n/2),a=Math.min(r[1]||0,e/2,n/2),o=Math.min(r[2]||0,e/2,n/2),s=Math.min(r[3]||0,e/2,n/2)),t.moveTo(i,0),t.lineTo(e-a,0),t.arc(e-a,a,a,3*Math.PI/2,0,!1),t.lineTo(e,n-o),t.arc(e-o,n-o,o,0,Math.PI/2,!1),t.lineTo(s,n),t.arc(s,n-s,s,Math.PI/2,Math.PI,!1),t.lineTo(0,i),t.arc(i,i,i,Math.PI,3*Math.PI/2,!1)}}},5483(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBComponent=function(t){return t>255?255:t<0?0:Math.round(t)},e.alphaComponent=function(t){return t>1?1:t<1e-4?1e-4:t},e.getNumberValidator=function(){if(r.Konva.isUnminified)return function(t,e){return i.Util._isNumber(t)||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}},e.getNumberOrArrayOfNumbersValidator=function(t){if(r.Konva.isUnminified)return function(e,n){let r=i.Util._isNumber(e),s=i.Util._isArray(e)&&e.length==t;return r||s||i.Util.warn(a(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}},e.getNumberOrAutoValidator=function(){if(r.Konva.isUnminified)return function(t,e){return i.Util._isNumber(t)||"auto"===t||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}},e.getStringValidator=function(){if(r.Konva.isUnminified)return function(t,e){return i.Util._isString(t)||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}},e.getStringOrGradientValidator=function(){if(r.Konva.isUnminified)return function(t,e){const n=i.Util._isString(t),r="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;return n||r||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}},e.getFunctionValidator=function(){if(r.Konva.isUnminified)return function(t,e){return i.Util._isFunction(t)||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a function.'),t}},e.getNumberArrayValidator=function(){if(r.Konva.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(i.Util._isArray(t)?t.forEach(function(t){i.Util._isNumber(t)||i.Util.warn('"'+e+'" attribute has non numeric element '+t+". Make sure that all elements are numbers.")}):i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}},e.getBooleanValidator=function(){if(r.Konva.isUnminified)return function(t,e){return!0===t||!1===t||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}},e.getComponentValidator=function(t){if(r.Konva.isUnminified)return function(e,n){return null==e||i.Util.isObject(e)||i.Util.warn(a(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}};const r=n(8871),i=n(4060);function a(t){return i.Util._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)||i.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}},680(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const r=n(8871),i=n(4060),a=n(6536),s=n(4473),o=n(7324),l=n(6267),h=n(7457),c=n(7949),u=n(1268),d=n(4723),f=n(9696),g=n(8665),p=n(9869),m=n(8604);e.Konva=i.Util._assign(r.Konva,{Util:i.Util,Transform:i.Transform,Node:a.Node,Container:s.Container,Stage:o.Stage,stages:o.stages,Layer:l.Layer,FastLayer:h.FastLayer,Group:c.Group,DD:u.DD,Shape:d.Shape,shapes:d.shapes,Animation:f.Animation,Tween:g.Tween,Easings:g.Easings,Context:p.Context,Canvas:m.Canvas}),e.default=e.Konva},8558(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const r=n(680),i=n(4821),a=n(9456),s=n(9729),o=n(6955),l=n(7256),h=n(6619),c=n(3443),u=n(1486),d=n(7536),f=n(9131),g=n(5451),p=n(9308),m=n(4481),y=n(9577),v=n(8137),b=n(5058),_=n(8001),S=n(6261),x=n(6627),w=n(2650),C=n(983),k=n(7928),P=n(7241),T=n(5461),F=n(4843),E=n(6564),M=n(5553),N=n(8624),A=n(5992),R=n(4943),D=n(7019),L=n(6921),I=n(3862),G=n(2512),O=n(517),z=n(661);e.Konva=r.Konva.Util._assign(r.Konva,{Arc:i.Arc,Arrow:a.Arrow,Circle:s.Circle,Ellipse:o.Ellipse,Image:l.Image,Label:h.Label,Tag:h.Tag,Line:c.Line,Path:u.Path,Rect:d.Rect,RegularPolygon:f.RegularPolygon,Ring:g.Ring,Sprite:p.Sprite,Star:m.Star,Text:y.Text,TextPath:v.TextPath,Transformer:b.Transformer,Wedge:_.Wedge,Filters:{Blur:S.Blur,Brighten:x.Brighten,Contrast:w.Contrast,Emboss:C.Emboss,Enhance:k.Enhance,Grayscale:P.Grayscale,HSL:T.HSL,HSV:F.HSV,Invert:E.Invert,Kaleidoscope:M.Kaleidoscope,Mask:N.Mask,Noise:A.Noise,Pixelate:R.Pixelate,Posterize:D.Posterize,RGB:L.RGB,RGBA:I.RGBA,Sepia:G.Sepia,Solarize:O.Solarize,Threshold:z.Threshold}})},6261(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Blur=void 0;const r=n(4892),i=n(6536),a=n(5483);function s(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const o=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];e.Blur=function(t){const e=Math.round(this.blurRadius());e>0&&function(t,e){const n=t.data,r=t.width,i=t.height;let a,h,c,u,d,f,g,p,m,y,v,b,_,S,x,w,C,k,P,T;const F=e+e+1,E=r-1,M=i-1,N=e+1,A=N*(N+1)/2,R=new s,D=o[e],L=l[e];let I=null,G=R,O=null,z=null;for(let t=1;t<F;t++)G=G.next=new s,t===N&&(I=G);G.next=R,c=h=0;for(let t=0;t<i;t++){b=_=S=x=u=d=f=g=0,p=N*(w=n[h]),m=N*(C=n[h+1]),y=N*(k=n[h+2]),v=N*(P=n[h+3]),u+=A*w,d+=A*C,f+=A*k,g+=A*P,G=R;for(let t=0;t<N;t++)G.r=w,G.g=C,G.b=k,G.a=P,G=G.next;for(let t=1;t<N;t++)a=h+((E<t?E:t)<<2),u+=(G.r=w=n[a])*(T=N-t),d+=(G.g=C=n[a+1])*T,f+=(G.b=k=n[a+2])*T,g+=(G.a=P=n[a+3])*T,b+=w,_+=C,S+=k,x+=P,G=G.next;O=R,z=I;for(let t=0;t<r;t++)n[h+3]=P=g*D>>L,0!==P?(P=255/P,n[h]=(u*D>>L)*P,n[h+1]=(d*D>>L)*P,n[h+2]=(f*D>>L)*P):n[h]=n[h+1]=n[h+2]=0,u-=p,d-=m,f-=y,g-=v,p-=O.r,m-=O.g,y-=O.b,v-=O.a,a=c+((a=t+e+1)<E?a:E)<<2,b+=O.r=n[a],_+=O.g=n[a+1],S+=O.b=n[a+2],x+=O.a=n[a+3],u+=b,d+=_,f+=S,g+=x,O=O.next,p+=w=z.r,m+=C=z.g,y+=k=z.b,v+=P=z.a,b-=w,_-=C,S-=k,x-=P,z=z.next,h+=4;c+=r}for(let t=0;t<r;t++){_=S=x=b=d=f=g=u=0,h=t<<2,p=N*(w=n[h]),m=N*(C=n[h+1]),y=N*(k=n[h+2]),v=N*(P=n[h+3]),u+=A*w,d+=A*C,f+=A*k,g+=A*P,G=R;for(let t=0;t<N;t++)G.r=w,G.g=C,G.b=k,G.a=P,G=G.next;let s=r;for(let i=1;i<=e;i++)h=s+t<<2,u+=(G.r=w=n[h])*(T=N-i),d+=(G.g=C=n[h+1])*T,f+=(G.b=k=n[h+2])*T,g+=(G.a=P=n[h+3])*T,b+=w,_+=C,S+=k,x+=P,G=G.next,i<M&&(s+=r);h=t,O=R,z=I;for(let e=0;e<i;e++)a=h<<2,n[a+3]=P=g*D>>L,P>0?(P=255/P,n[a]=(u*D>>L)*P,n[a+1]=(d*D>>L)*P,n[a+2]=(f*D>>L)*P):n[a]=n[a+1]=n[a+2]=0,u-=p,d-=m,f-=y,g-=v,p-=O.r,m-=O.g,y-=O.b,v-=O.a,a=t+((a=e+N)<M?a:M)*r<<2,u+=b+=O.r=n[a],d+=_+=O.g=n[a+1],f+=S+=O.b=n[a+2],g+=x+=O.a=n[a+3],O=O.next,p+=w=z.r,m+=C=z.g,y+=k=z.b,v+=P=z.a,b-=w,_-=C,S-=k,x-=P,z=z.next,h+=r}}(t,e)},r.Factory.addGetterSetter(i.Node,"blurRadius",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},6627(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Brighten=void 0;const r=n(4892),i=n(6536),a=n(5483);e.Brighten=function(t){const e=255*this.brightness(),n=t.data,r=n.length;for(let t=0;t<r;t+=4)n[t]+=e,n[t+1]+=e,n[t+2]+=e},r.Factory.addGetterSetter(i.Node,"brightness",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},2650(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Contrast=void 0;const r=n(4892),i=n(6536),a=n(5483);e.Contrast=function(t){const e=Math.pow((this.contrast()+100)/100,2),n=t.data,r=n.length;let i=150,a=150,s=150;for(let t=0;t<r;t+=4)i=n[t],a=n[t+1],s=n[t+2],i/=255,i-=.5,i*=e,i+=.5,i*=255,a/=255,a-=.5,a*=e,a+=.5,a*=255,s/=255,s-=.5,s*=e,s+=.5,s*=255,i=i<0?0:i>255?255:i,a=a<0?0:a>255?255:a,s=s<0?0:s>255?255:s,n[t]=i,n[t+1]=a,n[t+2]=s},r.Factory.addGetterSetter(i.Node,"contrast",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},983(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emboss=void 0;const r=n(4892),i=n(6536),a=n(4060),s=n(5483);e.Emboss=function(t){const e=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),i=this.embossBlend(),s=t.data,o=t.width,l=t.height,h=4*o;let c=0,u=0,d=l;switch(r){case"top-left":c=-1,u=-1;break;case"top":c=-1,u=0;break;case"top-right":c=-1,u=1;break;case"right":c=0,u=1;break;case"bottom-right":c=1,u=1;break;case"bottom":c=1,u=0;break;case"bottom-left":c=1,u=-1;break;case"left":c=0,u=-1;break;default:a.Util.error("Unknown emboss direction: "+r)}do{const t=(d-1)*h;let r=c;d+r<1&&(r=0),d+r>l&&(r=0);const a=(d-1+r)*o*4;let f=o;do{const r=t+4*(f-1);let l=u;f+l<1&&(l=0),f+l>o&&(l=0);const h=a+4*(f-1+l),c=s[r]-s[h],d=s[r+1]-s[h+1],g=s[r+2]-s[h+2];let p=c;const m=p>0?p:-p;if((d>0?d:-d)>m&&(p=d),(g>0?g:-g)>m&&(p=g),p*=e,i){const t=s[r]+p,e=s[r+1]+p,n=s[r+2]+p;s[r]=t>255?255:t<0?0:t,s[r+1]=e>255?255:e<0?0:e,s[r+2]=n>255?255:n<0?0:n}else{let t=n-p;t<0?t=0:t>255&&(t=255),s[r]=s[r+1]=s[r+2]=t}}while(--f)}while(--d)},r.Factory.addGetterSetter(i.Node,"embossStrength",.5,(0,s.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,(0,s.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossDirection","top-left",void 0,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossBlend",!1,void 0,r.Factory.afterSetFilter)},7928(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Enhance=void 0;const r=n(4892),i=n(6536),a=n(5483);function s(t,e,n,r,i){const a=n-e,s=i-r;if(0===a)return r+s/2;if(0===s)return r;let o=(t-e)/a;return o=s*o+r,o}e.Enhance=function(t){const e=t.data,n=e.length;let r,i,a,o=e[0],l=o,h=e[1],c=h,u=e[2],d=u;const f=this.enhance();if(0===f)return;for(let t=0;t<n;t+=4)r=e[t+0],r<o?o=r:r>l&&(l=r),i=e[t+1],i<h?h=i:i>c&&(c=i),a=e[t+2],a<u?u=a:a>d&&(d=a);let g,p,m,y,v,b;if(l===o&&(l=255,o=0),c===h&&(c=255,h=0),d===u&&(d=255,u=0),f>0)g=l+f*(255-l),p=o-f*(o-0),m=c+f*(255-c),y=h-f*(h-0),v=d+f*(255-d),b=u-f*(u-0);else{const t=.5*(l+o);g=l+f*(l-t),p=o+f*(o-t);const e=.5*(c+h);m=c+f*(c-e),y=h+f*(h-e);const n=.5*(d+u);v=d+f*(d-n),b=u+f*(u-n)}for(let t=0;t<n;t+=4)e[t+0]=s(e[t+0],o,l,p,g),e[t+1]=s(e[t+1],h,c,y,m),e[t+2]=s(e[t+2],u,d,b,v)},r.Factory.addGetterSetter(i.Node,"enhance",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},7241(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Grayscale=void 0,e.Grayscale=function(t){const e=t.data,n=e.length;for(let t=0;t<n;t+=4){const n=.34*e[t]+.5*e[t+1]+.16*e[t+2];e[t]=n,e[t+1]=n,e[t+2]=n}}},5461(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSL=void 0;const r=n(4892),i=n(6536),a=n(5483);r.Factory.addGetterSetter(i.Node,"hue",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"saturation",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"luminance",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),e.HSL=function(t){const e=t.data,n=e.length,r=Math.pow(2,this.saturation()),i=Math.abs(this.hue()+360)%360,a=127*this.luminance(),s=1*r*Math.cos(i*Math.PI/180),o=1*r*Math.sin(i*Math.PI/180),l=.299+.701*s+.167*o,h=.587-.587*s+.33*o,c=.114-.114*s-.497*o,u=.299-.299*s-.328*o,d=.587+.413*s+.035*o,f=.114-.114*s+.293*o,g=.299-.3*s+1.25*o,p=.587-.586*s-1.05*o,m=.114+.886*s-.2*o;let y,v,b,_;for(let t=0;t<n;t+=4)y=e[t+0],v=e[t+1],b=e[t+2],_=e[t+3],e[t+0]=l*y+h*v+c*b+a,e[t+1]=u*y+d*v+f*b+a,e[t+2]=g*y+p*v+m*b+a,e[t+3]=_}},4843(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSV=void 0;const r=n(4892),i=n(6536),a=n(5483);e.HSV=function(t){const e=t.data,n=e.length,r=Math.pow(2,this.value()),i=Math.pow(2,this.saturation()),a=Math.abs(this.hue()+360)%360,s=r*i*Math.cos(a*Math.PI/180),o=r*i*Math.sin(a*Math.PI/180),l=.299*r+.701*s+.167*o,h=.587*r-.587*s+.33*o,c=.114*r-.114*s-.497*o,u=.299*r-.299*s-.328*o,d=.587*r+.413*s+.035*o,f=.114*r-.114*s+.293*o,g=.299*r-.3*s+1.25*o,p=.587*r-.586*s-1.05*o,m=.114*r+.886*s-.2*o;for(let t=0;t<n;t+=4){const n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3];e[t+0]=l*n+h*r+c*i,e[t+1]=u*n+d*r+f*i,e[t+2]=g*n+p*r+m*i,e[t+3]=a}},r.Factory.addGetterSetter(i.Node,"hue",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"saturation",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"value",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},6564(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Invert=void 0,e.Invert=function(t){const e=t.data,n=e.length;for(let t=0;t<n;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]}},5553(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Kaleidoscope=void 0;const r=n(4892),i=n(6536),a=n(4060),s=n(5483);e.Kaleidoscope=function(t){const e=t.width,n=t.height;let r,i,s,o,l,h,c,u,d,f,g=Math.round(this.kaleidoscopePower());const p=Math.round(this.kaleidoscopeAngle()),m=Math.floor(e*(p%360)/360);if(g<1)return;const y=a.Util.createCanvasElement();y.width=e,y.height=n;const v=y.getContext("2d").getImageData(0,0,e,n);a.Util.releaseCanvas(y),function(t,e,n){const r=t.data,i=e.data,a=t.width,s=t.height,o=n.polarCenterX||a/2,l=n.polarCenterY||s/2;let h=Math.sqrt(o*o+l*l),c=a-o,u=s-l;const d=Math.sqrt(c*c+u*u);h=d>h?d:h;const f=s,g=a,p=360/g*Math.PI/180;for(let t=0;t<g;t+=1){const e=Math.sin(t*p),n=Math.cos(t*p);for(let s=0;s<f;s+=1){c=Math.floor(o+h*s/f*n),u=Math.floor(l+h*s/f*e);let d=4*(u*a+c);const g=r[d+0],p=r[d+1],m=r[d+2],y=r[d+3];d=4*(t+s*a),i[d+0]=g,i[d+1]=p,i[d+2]=m,i[d+3]=y}}}(t,v,{polarCenterX:e/2,polarCenterY:n/2});let b=e/Math.pow(2,g);for(;b<=8;)b*=2,g-=1;b=Math.ceil(b);let _=b,S=0,x=_,w=1;for(m+b>e&&(S=_,x=0,w=-1),i=0;i<n;i+=1)for(r=S;r!==x;r+=w)s=Math.round(r+m)%e,d=4*(e*i+s),l=v.data[d+0],h=v.data[d+1],c=v.data[d+2],u=v.data[d+3],f=4*(e*i+r),v.data[f+0]=l,v.data[f+1]=h,v.data[f+2]=c,v.data[f+3]=u;for(i=0;i<n;i+=1)for(_=Math.floor(b),o=0;o<g;o+=1){for(r=0;r<_+1;r+=1)d=4*(e*i+r),l=v.data[d+0],h=v.data[d+1],c=v.data[d+2],u=v.data[d+3],f=4*(e*i+2*_-r-1),v.data[f+0]=l,v.data[f+1]=h,v.data[f+2]=c,v.data[f+3]=u;_*=2}!function(t,e,n){const r=t.data,i=e.data,a=t.width,s=t.height,o=n.polarCenterX||a/2,l=n.polarCenterY||s/2;let h=Math.sqrt(o*o+l*l),c=a-o,u=s-l;const d=Math.sqrt(c*c+u*u);h=d>h?d:h;const f=s,g=a,p=n.polarRotation||0;let m,y;for(c=0;c<a;c+=1)for(u=0;u<s;u+=1){const t=c-o,e=u-l,n=Math.sqrt(t*t+e*e)*f/h;let s=(180*Math.atan2(e,t)/Math.PI+360+p)%360;s=s*g/360,m=Math.floor(s),y=Math.floor(n);let d=4*(y*a+m);const v=r[d+0],b=r[d+1],_=r[d+2],S=r[d+3];d=4*(u*a+c),i[d+0]=v,i[d+1]=b,i[d+2]=_,i[d+3]=S}}(v,t,{polarRotation:0})},r.Factory.addGetterSetter(i.Node,"kaleidoscopePower",2,(0,s.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"kaleidoscopeAngle",0,(0,s.getNumberValidator)(),r.Factory.afterSetFilter)},8624(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mask=void 0;const r=n(4892),i=n(6536),a=n(5483);function s(t,e,n){let r=4*(n*t.width+e);const i=[];return i.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),i}function o(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}e.Mask=function(t){let e=function(t,e){const n=s(t,0,0),r=s(t,t.width-1,0),i=s(t,0,t.height-1),a=s(t,t.width-1,t.height-1),l=e||10;if(o(n,r)<l&&o(r,a)<l&&o(a,i)<l&&o(i,n)<l){const e=function(t){const e=[0,0,0];for(let n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}([r,n,a,i]),s=[];for(let n=0;n<t.width*t.height;n++){const r=o(e,[t.data[4*n],t.data[4*n+1],t.data[4*n+2]]);s[n]=r<l?0:255}return s}}(t,this.threshold());return e&&(e=function(t,e,n){const r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),s=[];for(let o=0;o<n;o++)for(let l=0;l<e;l++){const h=o*e+l;let c=0;for(let s=0;s<i;s++)for(let h=0;h<i;h++){const u=o+s-a,d=l+h-a;if(u>=0&&u<n&&d>=0&&d<e){const n=r[s*i+h];c+=t[u*e+d]*n}}s[h]=2040===c?255:0}return s}(e,t.width,t.height),e=function(t,e,n){const r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),s=[];for(let o=0;o<n;o++)for(let l=0;l<e;l++){const h=o*e+l;let c=0;for(let s=0;s<i;s++)for(let h=0;h<i;h++){const u=o+s-a,d=l+h-a;if(u>=0&&u<n&&d>=0&&d<e){const n=r[s*i+h];c+=t[u*e+d]*n}}s[h]=c>=1020?255:0}return s}(e,t.width,t.height),e=function(t,e,n){const r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),s=[];for(let o=0;o<n;o++)for(let l=0;l<e;l++){const h=o*e+l;let c=0;for(let s=0;s<i;s++)for(let h=0;h<i;h++){const u=o+s-a,d=l+h-a;if(u>=0&&u<n&&d>=0&&d<e){const n=r[s*i+h];c+=t[u*e+d]*n}}s[h]=c}return s}(e,t.width,t.height),function(t,e){for(let n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}(t,e)),t},r.Factory.addGetterSetter(i.Node,"threshold",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},5992(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Noise=void 0;const r=n(4892),i=n(6536),a=n(5483);e.Noise=function(t){const e=255*this.noise(),n=t.data,r=n.length,i=e/2;for(let t=0;t<r;t+=4)n[t+0]+=i-2*i*Math.random(),n[t+1]+=i-2*i*Math.random(),n[t+2]+=i-2*i*Math.random()},r.Factory.addGetterSetter(i.Node,"noise",.2,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},4943(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pixelate=void 0;const r=n(4892),i=n(4060),a=n(6536),s=n(5483);e.Pixelate=function(t){let e=Math.ceil(this.pixelSize()),n=t.width,r=t.height,a=Math.ceil(n/e),s=Math.ceil(r/e),o=t.data;if(e<=0)i.Util.error("pixelSize value can not be <= 0");else for(let t=0;t<a;t+=1)for(let i=0;i<s;i+=1){let a=0,s=0,l=0,h=0;const c=t*e,u=c+e,d=i*e,f=d+e;let g=0;for(let t=c;t<u;t+=1)if(!(t>=n))for(let e=d;e<f;e+=1){if(e>=r)continue;const i=4*(n*e+t);a+=o[i+0],s+=o[i+1],l+=o[i+2],h+=o[i+3],g+=1}a/=g,s/=g,l/=g,h/=g;for(let t=c;t<u;t+=1)if(!(t>=n))for(let e=d;e<f;e+=1){if(e>=r)continue;const i=4*(n*e+t);o[i+0]=a,o[i+1]=s,o[i+2]=l,o[i+3]=h}}},r.Factory.addGetterSetter(a.Node,"pixelSize",8,(0,s.getNumberValidator)(),r.Factory.afterSetFilter)},7019(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Posterize=void 0;const r=n(4892),i=n(6536),a=n(5483);e.Posterize=function(t){const e=Math.round(254*this.levels())+1,n=t.data,r=n.length,i=255/e;for(let t=0;t<r;t+=1)n[t]=Math.floor(n[t]/i)*i},r.Factory.addGetterSetter(i.Node,"levels",.5,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},6921(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGB=void 0;const r=n(4892),i=n(6536),a=n(5483);e.RGB=function(t){const e=t.data,n=e.length,r=this.red(),i=this.green(),a=this.blue();for(let t=0;t<n;t+=4){const n=(.34*e[t]+.5*e[t+1]+.16*e[t+2])/255;e[t]=n*r,e[t+1]=n*i,e[t+2]=n*a,e[t+3]=e[t+3]}},r.Factory.addGetterSetter(i.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(i.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(i.Node,"blue",0,a.RGBComponent,r.Factory.afterSetFilter)},3862(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA=void 0;const r=n(4892),i=n(6536),a=n(5483);e.RGBA=function(t){const e=t.data,n=e.length,r=this.red(),i=this.green(),a=this.blue(),s=this.alpha();for(let t=0;t<n;t+=4){const n=1-s;e[t]=r*s+e[t]*n,e[t+1]=i*s+e[t+1]*n,e[t+2]=a*s+e[t+2]*n}},r.Factory.addGetterSetter(i.Node,"red",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(i.Node,"green",0,function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(i.Node,"blue",0,a.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"alpha",1,function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t})},2512(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sepia=void 0,e.Sepia=function(t){const e=t.data,n=e.length;for(let t=0;t<n;t+=4){const n=e[t+0],r=e[t+1],i=e[t+2];e[t+0]=Math.min(255,.393*n+.769*r+.189*i),e[t+1]=Math.min(255,.349*n+.686*r+.168*i),e[t+2]=Math.min(255,.272*n+.534*r+.131*i)}}},517(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Solarize=void 0,e.Solarize=function(t){const e=t.data,n=t.width,r=4*n;let i=t.height;do{const t=(i-1)*r;let a=n;do{const n=t+4*(a-1);let r=e[n],i=e[n+1],s=e[n+2];r>127&&(r=255-r),i>127&&(i=255-i),s>127&&(s=255-s),e[n]=r,e[n+1]=i,e[n+2]=s}while(--a)}while(--i)}},661(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Threshold=void 0;const r=n(4892),i=n(6536),a=n(5483);e.Threshold=function(t){const e=255*this.threshold(),n=t.data,r=n.length;for(let t=0;t<r;t+=1)n[t]=n[t]<e?0:255},r.Factory.addGetterSetter(i.Node,"threshold",.5,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},5778(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(8558);t.exports=r.Konva},4821(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Arc=void 0;const r=n(4892),i=n(4723),a=n(8871),s=n(5483),o=n(8871);class l extends i.Shape{_sceneFunc(t){const e=a.Konva.getAngle(this.angle()),n=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,n),t.arc(0,0,this.innerRadius(),e,0,!n),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),e=this.outerRadius(),n=this.clockwise(),r=a.Konva.getAngle(n?360-this.angle():this.angle()),i=Math.cos(Math.min(r,Math.PI)),s=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),o=Math.sin(Math.min(r,Math.PI/2)),l=i*(i>0?t:e),h=s*(s>0?t:e),c=o*(o>0?e:t);return{x:l,y:n?-1*c:h,width:1*e-l,height:c-h}}}e.Arc=l,l.prototype._centroid=!0,l.prototype.className="Arc",l.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1,(0,s.getBooleanValidator)())},9456(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Arrow=void 0;const r=n(4892),i=n(3443),a=n(5483),s=n(8871),o=n(1486);class l extends i.Line{_sceneFunc(t){super._sceneFunc(t);const e=2*Math.PI,n=this.points();let r=n;const i=0!==this.tension()&&n.length>4;i&&(r=this.getTensionPoints());const a=this.pointerLength(),s=n.length;let l,h;if(i){const t=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[s-2],n[s-1]],e=o.Path.calcLength(r[r.length-4],r[r.length-3],"C",t),i=o.Path.getPointOnQuadraticBezier(Math.min(1,1-a/e),t[0],t[1],t[2],t[3],t[4],t[5]);l=n[s-2]-i.x,h=n[s-1]-i.y}else l=n[s-2]-n[s-4],h=n[s-1]-n[s-3];const c=(Math.atan2(h,l)+e)%e,u=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[s-2],n[s-1]),t.rotate(c),t.moveTo(0,0),t.lineTo(-a,u/2),t.lineTo(-a,-u/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),i?(l=(r[0]+r[2])/2-n[0],h=(r[1]+r[3])/2-n[1]):(l=n[2]-n[0],h=n[3]-n[1]),t.rotate((Math.atan2(-h,-l)+e)%e),t.moveTo(0,0),t.lineTo(-a,u/2),t.lineTo(-a,-u/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){const e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x,y:t.y-e,width:t.width,height:t.height+2*e}}}e.Arrow=l,l.prototype.className="Arrow",(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"pointerLength",10,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(l,"pointerWidth",10,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(l,"pointerAtBeginning",!1),r.Factory.addGetterSetter(l,"pointerAtEnding",!0)},9729(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Circle=void 0;const r=n(4892),i=n(4723),a=n(5483),s=n(8871);class o extends i.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}e.Circle=o,o.prototype._centroid=!0,o.prototype.className="Circle",o.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"radius",0,(0,a.getNumberValidator)())},6955(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ellipse=void 0;const r=n(4892),i=n(4723),a=n(5483),s=n(8871);class o extends i.Shape{_sceneFunc(t){const e=this.radiusX(),n=this.radiusY();t.beginPath(),t.save(),e!==n&&t.scale(1,n/e),t.arc(0,0,e,0,2*Math.PI,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}e.Ellipse=o,o.prototype.className="Ellipse",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,s._registerNode)(o),r.Factory.addComponentsGetterSetter(o,"radius",["x","y"]),r.Factory.addGetterSetter(o,"radiusX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"radiusY",0,(0,a.getNumberValidator)())},7256(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Image=void 0;const r=n(4060),i=n(4892),a=n(4723),s=n(8871),o=n(5483);class l extends a.Shape{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",t=>{this._removeImageLoad(t.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&4===t.readyState||t&&t.addEventListener&&t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const t=!!this.cornerRadius(),e=this.hasShadow();return!(!t||!e)||super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),n=this.getHeight(),i=this.cornerRadius(),a=this.attrs.image;let s;if(a){const t=this.attrs.cropWidth,r=this.attrs.cropHeight;s=t&&r?[a,this.cropX(),this.cropY(),t,r,0,0,e,n]:[a,0,0,e,n]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?r.Util.drawRoundedRectPath(t,e,n,i):t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)),a&&(i&&t.clip(),t.drawImage.apply(t,s))}_hitFunc(t){const e=this.width(),n=this.height(),i=this.cornerRadius();t.beginPath(),i?r.Util.drawRoundedRectPath(t,e,n,i):t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width}getHeight(){var t,e;return null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height}static fromURL(t,e,n=null){const i=r.Util.createImageElement();i.onload=function(){const t=new l({image:i});e(t)},i.onerror=n,i.crossOrigin="Anonymous",i.src=t}}e.Image=l,l.prototype.className="Image",(0,s._registerNode)(l),i.Factory.addGetterSetter(l,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4)),i.Factory.addGetterSetter(l,"image"),i.Factory.addComponentsGetterSetter(l,"crop",["x","y","width","height"]),i.Factory.addGetterSetter(l,"cropX",0,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropY",0,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropWidth",0,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropHeight",0,(0,o.getNumberValidator)())},6619(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tag=e.Label=void 0;const r=n(4892),i=n(4723),a=n(7949),s=n(5483),o=n(8871),l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],h="up",c="right",u="down",d="left",f=l.length;class g extends a.Group{constructor(t){super(t),this.on("add.konva",function(t){this._addListeners(t.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let e,n=this;const r=function(){n._sync()};for(e=0;e<f;e++)t.on(l[e]+"Change.konva",r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t,e,n,r,i,a,s,o=this.getText(),l=this.getTag();if(o&&l){switch(t=o.width(),e=o.height(),n=l.pointerDirection(),r=l.pointerWidth(),s=l.pointerHeight(),i=0,a=0,n){case h:i=t/2,a=-1*s;break;case c:i=t+r,a=e/2;break;case u:i=t/2,a=e+s;break;case d:i=-1*r,a=e/2}l.setAttrs({x:-1*i,y:-1*a,width:t,height:e}),o.setAttrs({x:-1*i,y:-1*a})}}}e.Label=g,g.prototype.className="Label",(0,o._registerNode)(g);class p extends i.Shape{_sceneFunc(t){const e=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius();let o=0,l=0,f=0,g=0;"number"==typeof s?o=l=f=g=Math.min(s,e/2,n/2):(o=Math.min(s[0]||0,e/2,n/2),l=Math.min(s[1]||0,e/2,n/2),g=Math.min(s[2]||0,e/2,n/2),f=Math.min(s[3]||0,e/2,n/2)),t.beginPath(),t.moveTo(o,0),r===h&&(t.lineTo((e-i)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+i)/2,0)),t.lineTo(e-l,0),t.arc(e-l,l,l,3*Math.PI/2,0,!1),r===c&&(t.lineTo(e,(n-a)/2),t.lineTo(e+i,n/2),t.lineTo(e,(n+a)/2)),t.lineTo(e,n-g),t.arc(e-g,n-g,g,0,Math.PI/2,!1),r===u&&(t.lineTo((e+i)/2,n),t.lineTo(e/2,n+a),t.lineTo((e-i)/2,n)),t.lineTo(f,n),t.arc(f,n-f,f,Math.PI/2,Math.PI,!1),r===d&&(t.lineTo(0,(n+a)/2),t.lineTo(-1*i,n/2),t.lineTo(0,(n-a)/2)),t.lineTo(0,o),t.arc(o,o,o,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,e=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),a=this.width(),s=this.height();return i===h?(e-=r,s+=r):i===u?s+=r:i===d?(t-=1.5*n,a+=n):i===c&&(a+=1.5*n),{x:t,y:e,width:a,height:s}}}e.Tag=p,p.prototype.className="Tag",(0,o._registerNode)(p),r.Factory.addGetterSetter(p,"pointerDirection","none"),r.Factory.addGetterSetter(p,"pointerWidth",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(p,"pointerHeight",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(p,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4))},3443(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Line=void 0;const r=n(4892),i=n(8871),a=n(4723),s=n(5483);function o(t,e,n,r,i,a,s){const o=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(a-r,2)),h=s*o/(o+l),c=s*l/(o+l);return[n-h*(i-t),r-h*(a-e),n+c*(i-t),r+c*(a-e)]}function l(t,e){const n=t.length,r=[];for(let i=2;i<n-2;i+=2){const n=o(t[i-2],t[i-1],t[i],t[i+1],t[i+2],t[i+3],e);isNaN(n[0])||(r.push(n[0]),r.push(n[1]),r.push(t[i]),r.push(t[i+1]),r.push(n[2]),r.push(n[3]))}return r}class h extends a.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){const e=this.points(),n=e.length,r=this.tension(),i=this.closed(),a=this.bezier();if(!n)return;let s=0;if(t.beginPath(),t.moveTo(e[0],e[1]),0!==r&&n>4){const r=this.getTensionPoints(),a=r.length;for(s=i?0:4,i||t.quadraticCurveTo(r[0],r[1],r[2],r[3]);s<a-2;)t.bezierCurveTo(r[s++],r[s++],r[s++],r[s++],r[s++],r[s++]);i||t.quadraticCurveTo(r[a-2],r[a-1],e[n-2],e[n-1])}else if(a)for(s=2;s<n;)t.bezierCurveTo(e[s++],e[s++],e[s++],e[s++],e[s++],e[s++]);else for(s=2;s<n;s+=2)t.lineTo(e[s],e[s+1]);i?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():l(this.points(),this.tension())}_getTensionPointsClosed(){const t=this.points(),e=t.length,n=this.tension(),r=o(t[e-2],t[e-1],t[0],t[1],t[2],t[3],n),i=o(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],n),a=l(t,n);return[r[2],r[3]].concat(a).concat([i[0],i[1],t[e-2],t[e-1],i[2],i[3],r[0],r[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};t=0!==this.tension()?[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:this.points();let e,n,r=t[0],i=t[0],a=t[1],s=t[1];for(let o=0;o<t.length/2;o++)e=t[2*o],n=t[2*o+1],r=Math.min(r,e),i=Math.max(i,e),a=Math.min(a,n),s=Math.max(s,n);return{x:r,y:a,width:i-r,height:s-a}}}e.Line=h,h.prototype.className="Line",h.prototype._attrsAffectingSize=["points","bezier","tension"],(0,i._registerNode)(h),r.Factory.addGetterSetter(h,"closed",!1),r.Factory.addGetterSetter(h,"bezier",!1),r.Factory.addGetterSetter(h,"tension",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(h,"points",[],(0,s.getNumberArrayValidator)())},1486(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Path=void 0;const r=n(4892),i=n(8871),a=n(4723),s=n(5570);class o extends a.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=o.parsePathData(this.data()),this.pathLength=o.getPathLength(this.dataArray)}_sceneFunc(t){const e=this.dataArray;t.beginPath();let n=!1;for(let r=0;r<e.length;r++){const i=e[r].command,a=e[r].points;switch(i){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":const e=a[0],r=a[1],i=a[2],s=a[3],o=a[4],l=a[5],h=a[6],c=a[7],u=i>s?i:s,d=i>s?1:i/s,f=i>s?s/i:1;t.translate(e,r),t.rotate(h),t.scale(d,f),t.arc(0,0,u,o,o+l,1-c),t.scale(1/d,1/f),t.rotate(-h),t.translate(-e,-r);break;case"z":n=!0,t.closePath()}}n||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){let t=[];this.dataArray.forEach(function(e){if("A"===e.command){const n=e.points[4],r=e.points[5],i=e.points[4]+r;let a=Math.PI/180;if(Math.abs(n-i)<a&&(a=Math.abs(n-i)),r<0)for(let r=n-a;r>i;r-=a){const n=o.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],r,0);t.push(n.x,n.y)}else for(let r=n+a;r<i;r+=a){const n=o.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],r,0);t.push(n.x,n.y)}}else if("C"===e.command)for(let n=0;n<=1;n+=.01){const r=o.getPointOnCubicBezier(n,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3],e.points[4],e.points[5]);t.push(r.x,r.y)}else t=t.concat(e.points)});let e,n,r=t[0],i=t[0],a=t[1],s=t[1];for(let o=0;o<t.length/2;o++)e=t[2*o],n=t[2*o+1],isNaN(e)||(r=Math.min(r,e),i=Math.max(i,e)),isNaN(n)||(a=Math.min(a,n),s=Math.max(s,n));return{x:r,y:a,width:i-r,height:s-a}}getLength(){return this.pathLength}getPointAtLength(t){return o.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}static getPathLength(t){let e=0;for(let n=0;n<t.length;++n)e+=t[n].pathLength;return e}static getPointAtLengthOfDataArray(t,e){let n,r=0,i=e.length;if(!i)return null;for(;r<i&&t>e[r].pathLength;)t-=e[r].pathLength,++r;if(r===i)return n=e[r-1].points.slice(-2),{x:n[0],y:n[1]};if(t<.01)return"M"===e[r].command?(n=e[r].points.slice(0,2),{x:n[0],y:n[1]}):{x:e[r].start.x,y:e[r].start.y};const a=e[r],l=a.points;switch(a.command){case"L":return o.getPointOnLine(t,a.start.x,a.start.y,l[0],l[1]);case"C":return o.getPointOnCubicBezier((0,s.t2length)(t,o.getPathLength(e),t=>(0,s.getCubicArcLength)([a.start.x,l[0],l[2],l[4]],[a.start.y,l[1],l[3],l[5]],t)),a.start.x,a.start.y,l[0],l[1],l[2],l[3],l[4],l[5]);case"Q":return o.getPointOnQuadraticBezier((0,s.t2length)(t,o.getPathLength(e),t=>(0,s.getQuadraticArcLength)([a.start.x,l[0],l[2]],[a.start.y,l[1],l[3]],t)),a.start.x,a.start.y,l[0],l[1],l[2],l[3]);case"A":const n=l[0],r=l[1],i=l[2],h=l[3],c=l[5],u=l[6];let d=l[4];return d+=c*t/a.pathLength,o.getPointOnEllipticalArc(n,r,i,h,d,u)}return null}static getPointOnLine(t,e,n,r,i,a,s){a=null!=a?a:e,s=null!=s?s:n;const o=this.getLineLength(e,n,r,i);if(o<1e-10)return{x:e,y:n};if(r===e)return{x:a,y:s+(i>n?t:-t)};const l=(i-n)/(r-e),h=Math.sqrt(t*t/(1+l*l))*(r<e?-1:1),c=l*h;if(Math.abs(s-n-l*(a-e))<1e-10)return{x:a+h,y:s+c};const u=((a-e)*(r-e)+(s-n)*(i-n))/(o*o),d=e+u*(r-e),f=n+u*(i-n),g=this.getLineLength(a,s,d,f),p=Math.sqrt(t*t-g*g),m=Math.sqrt(p*p/(1+l*l))*(r<e?-1:1);return{x:d+m,y:f+l*m}}static getPointOnCubicBezier(t,e,n,r,i,a,s,o,l){function h(t){return t*t*t}function c(t){return 3*t*t*(1-t)}function u(t){return 3*t*(1-t)*(1-t)}function d(t){return(1-t)*(1-t)*(1-t)}return{x:o*h(t)+a*c(t)+r*u(t)+e*d(t),y:l*h(t)+s*c(t)+i*u(t)+n*d(t)}}static getPointOnQuadraticBezier(t,e,n,r,i,a,s){function o(t){return t*t}function l(t){return 2*t*(1-t)}function h(t){return(1-t)*(1-t)}return{x:a*o(t)+r*l(t)+e*h(t),y:s*o(t)+i*l(t)+n*h(t)}}static getPointOnEllipticalArc(t,e,n,r,i,a){const s=Math.cos(a),o=Math.sin(a),l=n*Math.cos(i),h=r*Math.sin(i);return{x:t+(l*s-h*o),y:e+(l*o+h*s)}}static parsePathData(t){if(!t)return[];let e=t;const n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(let t=0;t<n.length;t++)e=e.replace(new RegExp(n[t],"g"),"|"+n[t]);const r=e.split("|"),i=[],a=[];let s=0,o=0;const l=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;let h;for(let t=1;t<r.length;t++){let e=r[t],n=e.charAt(0);for(e=e.slice(1),a.length=0;h=l.exec(e);)a.push(h[0]);const c=[];for(let t=0,e=a.length;t<e;t++){if("00"===a[t]){c.push(0,0);continue}const e=parseFloat(a[t]);isNaN(e)?c.push(0):c.push(e)}for(;c.length>0&&!isNaN(c[0]);){let t="",e=[];const r=s,a=o;let l,h,u,d,f,g,p,m,y,v;switch(n){case"l":s+=c.shift(),o+=c.shift(),t="L",e.push(s,o);break;case"L":s=c.shift(),o=c.shift(),e.push(s,o);break;case"m":const r=c.shift(),a=c.shift();if(s+=r,o+=a,t="M",i.length>2&&"z"===i[i.length-1].command)for(let t=i.length-2;t>=0;t--)if("M"===i[t].command){s=i[t].points[0]+r,o=i[t].points[1]+a;break}e.push(s,o),n="l";break;case"M":s=c.shift(),o=c.shift(),t="M",e.push(s,o),n="L";break;case"h":s+=c.shift(),t="L",e.push(s,o);break;case"H":s=c.shift(),t="L",e.push(s,o);break;case"v":o+=c.shift(),t="L",e.push(s,o);break;case"V":o=c.shift(),t="L",e.push(s,o);break;case"C":e.push(c.shift(),c.shift(),c.shift(),c.shift()),s=c.shift(),o=c.shift(),e.push(s,o);break;case"c":e.push(s+c.shift(),o+c.shift(),s+c.shift(),o+c.shift()),s+=c.shift(),o+=c.shift(),t="C",e.push(s,o);break;case"S":h=s,u=o,l=i[i.length-1],"C"===l.command&&(h=s+(s-l.points[2]),u=o+(o-l.points[3])),e.push(h,u,c.shift(),c.shift()),s=c.shift(),o=c.shift(),t="C",e.push(s,o);break;case"s":h=s,u=o,l=i[i.length-1],"C"===l.command&&(h=s+(s-l.points[2]),u=o+(o-l.points[3])),e.push(h,u,s+c.shift(),o+c.shift()),s+=c.shift(),o+=c.shift(),t="C",e.push(s,o);break;case"Q":e.push(c.shift(),c.shift()),s=c.shift(),o=c.shift(),e.push(s,o);break;case"q":e.push(s+c.shift(),o+c.shift()),s+=c.shift(),o+=c.shift(),t="Q",e.push(s,o);break;case"T":h=s,u=o,l=i[i.length-1],"Q"===l.command&&(h=s+(s-l.points[0]),u=o+(o-l.points[1])),s=c.shift(),o=c.shift(),t="Q",e.push(h,u,s,o);break;case"t":h=s,u=o,l=i[i.length-1],"Q"===l.command&&(h=s+(s-l.points[0]),u=o+(o-l.points[1])),s+=c.shift(),o+=c.shift(),t="Q",e.push(h,u,s,o);break;case"A":d=c.shift(),f=c.shift(),g=c.shift(),p=c.shift(),m=c.shift(),y=s,v=o,s=c.shift(),o=c.shift(),t="A",e=this.convertEndpointToCenterParameterization(y,v,s,o,p,m,d,f,g);break;case"a":d=c.shift(),f=c.shift(),g=c.shift(),p=c.shift(),m=c.shift(),y=s,v=o,s+=c.shift(),o+=c.shift(),t="A",e=this.convertEndpointToCenterParameterization(y,v,s,o,p,m,d,f,g)}i.push({command:t||n,points:e,start:{x:r,y:a},pathLength:this.calcLength(r,a,t||n,e)})}"z"!==n&&"Z"!==n||i.push({command:"z",points:[],start:void 0,pathLength:0})}return i}static calcLength(t,e,n,r){let i,a,l,h;const c=o;switch(n){case"L":return c.getLineLength(t,e,r[0],r[1]);case"C":return(0,s.getCubicArcLength)([t,r[0],r[2],r[4]],[e,r[1],r[3],r[5]],1);case"Q":return(0,s.getQuadraticArcLength)([t,r[0],r[2]],[e,r[1],r[3]],1);case"A":i=0;const n=r[4],o=r[5],u=r[4]+o;let d=Math.PI/180;if(Math.abs(n-u)<d&&(d=Math.abs(n-u)),a=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],n,0),o<0)for(h=n-d;h>u;h-=d)l=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),i+=c.getLineLength(a.x,a.y,l.x,l.y),a=l;else for(h=n+d;h<u;h+=d)l=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),i+=c.getLineLength(a.x,a.y,l.x,l.y),a=l;return l=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],u,0),i+=c.getLineLength(a.x,a.y,l.x,l.y),i}return 0}static convertEndpointToCenterParameterization(t,e,n,r,i,a,s,o,l){const h=l*(Math.PI/180),c=Math.cos(h)*(t-n)/2+Math.sin(h)*(e-r)/2,u=-1*Math.sin(h)*(t-n)/2+Math.cos(h)*(e-r)/2,d=c*c/(s*s)+u*u/(o*o);d>1&&(s*=Math.sqrt(d),o*=Math.sqrt(d));let f=Math.sqrt((s*s*(o*o)-s*s*(u*u)-o*o*(c*c))/(s*s*(u*u)+o*o*(c*c)));i===a&&(f*=-1),isNaN(f)&&(f=0);const g=f*s*u/o,p=f*-o*c/s,m=(t+n)/2+Math.cos(h)*g-Math.sin(h)*p,y=(e+r)/2+Math.sin(h)*g+Math.cos(h)*p,v=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},b=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(v(t)*v(e))},_=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(b(t,e))},S=_([1,0],[(c-g)/s,(u-p)/o]),x=[(c-g)/s,(u-p)/o],w=[(-1*c-g)/s,(-1*u-p)/o];let C=_(x,w);return b(x,w)<=-1&&(C=Math.PI),b(x,w)>=1&&(C=0),0===a&&C>0&&(C-=2*Math.PI),1===a&&C<0&&(C+=2*Math.PI),[m,y,s,o,S,C,h,a]}}e.Path=o,o.prototype.className="Path",o.prototype._attrsAffectingSize=["data"],(0,i._registerNode)(o),r.Factory.addGetterSetter(o,"data")},7536(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rect=void 0;const r=n(4892),i=n(4723),a=n(8871),s=n(4060),o=n(5483);class l extends i.Shape{_sceneFunc(t){const e=this.cornerRadius(),n=this.width(),r=this.height();t.beginPath(),e?s.Util.drawRoundedRectPath(t,n,r,e):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}}e.Rect=l,l.prototype.className="Rect",(0,a._registerNode)(l),r.Factory.addGetterSetter(l,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4))},9131(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegularPolygon=void 0;const r=n(4892),i=n(4723),a=n(5483),s=n(8871);class o extends i.Shape{_sceneFunc(t){const e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(let n=1;n<e.length;n++)t.lineTo(e[n].x,e[n].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,e=this.attrs.radius||0,n=[];for(let r=0;r<t;r++)n.push({x:e*Math.sin(2*r*Math.PI/t),y:-1*e*Math.cos(2*r*Math.PI/t)});return n}getSelfRect(){const t=this._getPoints();let e=t[0].x,n=t[0].y,r=t[0].x,i=t[0].y;return t.forEach(t=>{e=Math.min(e,t.x),n=Math.max(n,t.x),r=Math.min(r,t.y),i=Math.max(i,t.y)}),{x:e,y:r,width:n-e,height:i-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}e.RegularPolygon=o,o.prototype.className="RegularPolygon",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"radius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"sides",0,(0,a.getNumberValidator)())},5451(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ring=void 0;const r=n(4892),i=n(4723),a=n(5483),s=n(8871),o=2*Math.PI;class l extends i.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,o,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),o,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}e.Ring=l,l.prototype.className="Ring",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,a.getNumberValidator)())},9308(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sprite=void 0;const r=n(4892),i=n(4723),a=n(9696),s=n(5483),o=n(8871);class l extends i.Shape{constructor(t){super(t),this._updated=!0,this.anim=new a.Animation(()=>{const t=this._updated;return this._updated=!1,t}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){const e=this.animation(),n=this.frameIndex(),r=4*n,i=this.animations()[e],a=this.frameOffsets(),s=i[r+0],o=i[r+1],l=i[r+2],h=i[r+3],c=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,l,h),t.closePath(),t.fillStrokeShape(this)),c)if(a){const r=a[e],i=2*n;t.drawImage(c,s,o,l,h,r[i+0],r[i+1],l,h)}else t.drawImage(c,s,o,l,h,0,0,l,h)}_hitFunc(t){const e=this.animation(),n=this.frameIndex(),r=4*n,i=this.animations()[e],a=this.frameOffsets(),s=i[r+2],o=i[r+3];if(t.beginPath(),a){const r=a[e],i=2*n;t.rect(r[i+0],r[i+1],s,o)}else t.rect(0,0,s,o);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const t=this.frameIndex(),e=this.animation();t<this.animations()[e].length/4-1?this.frameIndex(t+1):this.frameIndex(0)}}e.Sprite=l,l.prototype.className="Sprite",(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"animation"),r.Factory.addGetterSetter(l,"animations"),r.Factory.addGetterSetter(l,"frameOffsets"),r.Factory.addGetterSetter(l,"image"),r.Factory.addGetterSetter(l,"frameIndex",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(l,"frameRate",17,(0,s.getNumberValidator)()),r.Factory.backCompat(l,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"})},4481(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Star=void 0;const r=n(4892),i=n(4723),a=n(5483),s=n(8871);class o extends i.Shape{_sceneFunc(t){const e=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(let i=1;i<2*r;i++){const a=i%2==0?n:e,s=a*Math.sin(i*Math.PI/r),o=-1*a*Math.cos(i*Math.PI/r);t.lineTo(s,o)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}e.Star=o,o.prototype.className="Star",o.prototype._centroid=!0,o.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(o),r.Factory.addGetterSetter(o,"numPoints",5,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"innerRadius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"outerRadius",0,(0,a.getNumberValidator)())},9577(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0,e.stringToArray=h;const r=n(4060),i=n(4892),a=n(4723),s=n(8871),o=n(5483),l=n(8871);function h(t){return[...t].reduce((t,e,n,r)=>{if(/\p{Emoji}/u.test(e)){const i=r[n+1];i&&/\p{Emoji_Modifier}|\u200D/u.test(i)?(t.push(e+i),r[n+1]=""):t.push(e)}else/\p{Regional_Indicator}{2}/u.test(e+(r[n+1]||""))?t.push(e+r[n+1]):n>0&&/\p{Mn}|\p{Me}|\p{Mc}/u.test(e)?t[t.length-1]+=e:e&&t.push(e);return t},[])}const c="auto",u="inherit",d="justify",f="left",g="middle",p="normal",m=" ",y="none",v=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],b=v.length;let _;function S(){return _||(_=r.Util.createCanvasElement().getContext("2d"),_)}class x extends a.Shape{constructor(t){super(function(t){return(t=t||{}).fillLinearGradientColorStops||t.fillRadialGradientColorStops||t.fillPatternImage||(t.fill=t.fill||"black"),t}(t)),this._partialTextX=0,this._partialTextY=0;for(let t=0;t<b;t++)this.on(v[t]+"Change.konva",this._setTextData);this._setTextData()}_sceneFunc(t){const e=this.textArr,n=e.length;if(!this.text())return;let r,i=this.padding(),a=this.fontSize(),o=this.lineHeight()*a,l=this.verticalAlign(),c=this.direction(),p=0,m=this.align(),y=this.getWidth(),v=this.letterSpacing(),b=this.fill(),_=this.textDecoration(),S=-1!==_.indexOf("underline"),x=-1!==_.indexOf("line-through");c=c===u?t.direction:c;let w=o/2,C=g;if(s.Konva._fixTextRendering){const t=this.measureSize("M");C="alphabetic",w=(t.fontBoundingBoxAscent-t.fontBoundingBoxDescent)/2+o/2}for("rtl"===c&&t.setAttr("direction",c),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",C),t.setAttr("textAlign",f),l===g?p=(this.getHeight()-n*o-2*i)/2:"bottom"===l&&(p=this.getHeight()-n*o-2*i),t.translate(i,p+i),r=0;r<n;r++){let l=0,u=0;const f=e[r],g=f.text,p=f.width,_=f.lastInParagraph;if(t.save(),"right"===m?l+=y-p-2*i:"center"===m&&(l+=(y-p-2*i)/2),S){t.save(),t.beginPath();const e=l,n=w+u+(s.Konva._fixTextRendering?Math.round(a/4):Math.round(a/2));t.moveTo(e,n);const r=m!==d||_?p:y-2*i;t.lineTo(e+Math.round(r),n),t.lineWidth=a/15;const o=this._getLinearGradient();t.strokeStyle=o||b,t.stroke(),t.restore()}if(x){t.save(),t.beginPath();const e=s.Konva._fixTextRendering?-Math.round(a/4):0;t.moveTo(l,w+u+e);const n=m!==d||_?p:y-2*i;t.lineTo(l+Math.round(n),w+u+e),t.lineWidth=a/15;const r=this._getLinearGradient();t.strokeStyle=r||b,t.stroke(),t.restore()}if("rtl"===c||0===v&&m!==d)0!==v&&t.setAttr("letterSpacing",`${v}px`),this._partialTextX=l,this._partialTextY=w+u,this._partialText=g,t.fillStrokeShape(this);else{const e=g.split(" ").length-1,n=h(g);for(let r=0;r<n.length;r++){const a=n[r];" "!==a||_||m!==d||(l+=(y-2*i-p)/e),this._partialTextX=l,this._partialTextY=w+u,this._partialText=a,t.fillStrokeShape(this),l+=this.measureSize(a).width+v}}t.restore(),n>1&&(w+=o)}}_hitFunc(t){const e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}setText(t){const e=r.Util._isString(t)?t:null==t?"":t+"";return this._setAttr("text",e),this}getWidth(){return this.attrs.width===c||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===c||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return r.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e,n,r,i,a,s,o,l,h,c,u;let d,f=S(),g=this.fontSize();f.save(),f.font=this._getContextFont(),d=f.measureText(t),f.restore();const p=g/100;return{actualBoundingBoxAscent:null!==(e=d.actualBoundingBoxAscent)&&void 0!==e?e:71.58203125*p,actualBoundingBoxDescent:null!==(n=d.actualBoundingBoxDescent)&&void 0!==n?n:0,actualBoundingBoxLeft:null!==(r=d.actualBoundingBoxLeft)&&void 0!==r?r:-7.421875*p,actualBoundingBoxRight:null!==(i=d.actualBoundingBoxRight)&&void 0!==i?i:75.732421875*p,alphabeticBaseline:null!==(a=d.alphabeticBaseline)&&void 0!==a?a:0,emHeightAscent:null!==(s=d.emHeightAscent)&&void 0!==s?s:100*p,emHeightDescent:null!==(o=d.emHeightDescent)&&void 0!==o?o:-20*p,fontBoundingBoxAscent:null!==(l=d.fontBoundingBoxAscent)&&void 0!==l?l:91*p,fontBoundingBoxDescent:null!==(h=d.fontBoundingBoxDescent)&&void 0!==h?h:21*p,hangingBaseline:null!==(c=d.hangingBaseline)&&void 0!==c?c:72.80000305175781*p,ideographicBaseline:null!==(u=d.ideographicBaseline)&&void 0!==u?u:-21*p,width:d.width,height:g}}_getContextFont(){return this.fontStyle()+m+this.fontVariant()+m+(this.fontSize()+"px ")+this.fontFamily().split(",").map(t=>{const e=(t=t.trim()).indexOf(" ")>=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!n&&(t=`"${t}"`),t}).join(", ")}_addTextLine(t){this.align()===d&&(t=t.trim());const e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){const e=this.letterSpacing(),n=t.length;return S().measureText(t).width+e*n}_setTextData(){let t=this.text().split("\n"),e=+this.fontSize(),n=0,r=this.lineHeight()*e,i=this.attrs.width,a=this.attrs.height,s=i!==c&&void 0!==i,o=a!==c&&void 0!==a,l=this.padding(),u=i-2*l,d=a-2*l,f=0,g=this.wrap(),p="char"!==g&&g!==y,v=this.ellipsis();this.textArr=[],S().font=this._getContextFont();const b=v?this._getTextWidth("…"):0;for(let e=0,i=t.length;e<i;++e){let a=t[e],l=this._getTextWidth(a);if(s&&l>u)for(;a.length>0;){let t=0,e=h(a).length,i="",s=0;for(;t<e;){const n=t+e>>>1,l=h(a).slice(0,n+1).join(""),c=this._getTextWidth(l);(v&&o&&f+r>d?c+b:c)<=u?(t=n+1,i=l,s=c):e=n}if(!i)break;if(p){const e=h(a),n=h(i),r=e[n.length];let o;if((r===m||"-"===r)&&s<=u)o=n.length;else{const t=n.lastIndexOf(m),e=n.lastIndexOf("-");o=Math.max(t,e)+1}o>0&&(t=o,i=e.slice(0,t).join(""),s=this._getTextWidth(i))}if(i=i.trimRight(),this._addTextLine(i),n=Math.max(n,s),f+=r,this._shouldHandleEllipsis(f)){this._tryToAddEllipsisToLastLine();break}if(a=h(a).slice(t).join("").trimLeft(),a.length>0&&(l=this._getTextWidth(a),l<=u)){this._addTextLine(a),f+=r,n=Math.max(n,l);break}}else this._addTextLine(a),f+=r,n=Math.max(n,l),this._shouldHandleEllipsis(f)&&e<i-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),o&&f+r>d)break}this.textHeight=e,this.textWidth=n}_shouldHandleEllipsis(t){const e=+this.fontSize(),n=this.lineHeight()*e,r=this.attrs.height,i=r!==c&&void 0!==r,a=r-2*this.padding();return!(this.wrap()!==y)||i&&t+n>a}_tryToAddEllipsisToLastLine(){const t=this.attrs.width,e=t!==c&&void 0!==t,n=t-2*this.padding(),r=this.ellipsis(),i=this.textArr[this.textArr.length-1];i&&r&&(e&&(this._getTextWidth(i.text+"…")<n||(i.text=i.text.slice(0,i.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(i.text+"…"))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){const t=-1!==this.textDecoration().indexOf("underline")||-1!==this.textDecoration().indexOf("line-through"),e=this.hasShadow();return!(!t||!e)||super._useBufferCanvas()}}e.Text=x,x.prototype._fillFunc=function(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)},x.prototype._strokeFunc=function(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)},x.prototype.className="Text",x.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,l._registerNode)(x),i.Factory.overWriteSetter(x,"width",(0,o.getNumberOrAutoValidator)()),i.Factory.overWriteSetter(x,"height",(0,o.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(x,"direction",u),i.Factory.addGetterSetter(x,"fontFamily","Arial"),i.Factory.addGetterSetter(x,"fontSize",12,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(x,"fontStyle",p),i.Factory.addGetterSetter(x,"fontVariant",p),i.Factory.addGetterSetter(x,"padding",0,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(x,"align",f),i.Factory.addGetterSetter(x,"verticalAlign","top"),i.Factory.addGetterSetter(x,"lineHeight",1,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(x,"wrap","word"),i.Factory.addGetterSetter(x,"ellipsis",!1,(0,o.getBooleanValidator)()),i.Factory.addGetterSetter(x,"letterSpacing",0,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(x,"text","",(0,o.getStringValidator)()),i.Factory.addGetterSetter(x,"textDecoration","")},8137(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextPath=void 0;const r=n(4060),i=n(4892),a=n(4723),s=n(1486),o=n(9577),l=n(5483),h=n(8871),c="normal";function u(t){t.fillText(this.partialText,0,0)}function d(t){t.strokeText(this.partialText,0,0)}class f extends a.Shape{constructor(t){super(t),this.dummyCanvas=r.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return s.Path.getPathLength(this.dataArray)}_getPointAtLength(t){return this.attrs.data?t-1>this.pathLength?null:s.Path.getPointAtLengthOfDataArray(t,this.dataArray):null}_readDataAttribute(){this.dataArray=s.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();const e=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;"underline"===e&&t.beginPath();for(let n=0;n<i.length;n++){t.save();const a=i[n].p0;t.translate(a.x,a.y),t.rotate(i[n].rotation),this.partialText=i[n].text,t.fillStrokeShape(this),"underline"===e&&(0===n&&t.moveTo(0,r/2+1),t.lineTo(r,r/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=n,t.lineWidth=r/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();const e=this.glyphInfo;if(e.length>=1){const n=e[0].p0;t.moveTo(n.x,n.y)}for(let n=0;n<e.length;n++){const r=e[n].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return r.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return o.Text.prototype.setText.call(this,t)}_getContextFont(){return o.Text.prototype._getContextFont.call(this)}_getTextSize(t){const e=this.dummyCanvas.getContext("2d");e.save(),e.font=this._getContextFont();const n=e.measureText(t);return e.restore(),{width:n.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){const{width:t,height:e}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=e,this.glyphInfo=[],!this.attrs.data)return null;const n=this.letterSpacing(),r=this.align(),i=this.kerningFunc(),a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);let l=0;"center"===r&&(l=Math.max(0,this.pathLength/2-a/2)),"right"===r&&(l=Math.max(0,this.pathLength-a));const h=(0,o.stringToArray)(this.text());let c=l;for(let t=0;t<h.length;t++){const e=this._getPointAtLength(c);if(!e)return;let o=this._getTextSize(h[t]).width+n;if(" "===h[t]&&"justify"===r){const t=this.text().split(" ").length-1;o+=(this.pathLength-a)/t}const l=this._getPointAtLength(c+o);if(!l)return;const u=s.Path.getLineLength(e.x,e.y,l.x,l.y);let d=0;if(i)try{d=i(h[t-1],h[t])*this.fontSize()}catch(t){d=0}e.x+=d,l.x+=d,this.textWidth+=d;const f=s.Path.getPointOnLine(d+u/2,e.x,e.y,l.x,l.y),g=Math.atan2(l.y-e.y,l.x-e.x);this.glyphInfo.push({transposeX:f.x,transposeY:f.y,text:h[t],rotation:g,p0:e,p1:l}),c+=o}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};const t=[];this.glyphInfo.forEach(function(e){t.push(e.p0.x),t.push(e.p0.y),t.push(e.p1.x),t.push(e.p1.y)});let e,n,r=t[0]||0,i=t[0]||0,a=t[1]||0,s=t[1]||0;for(let o=0;o<t.length/2;o++)e=t[2*o],n=t[2*o+1],r=Math.min(r,e),i=Math.max(i,e),a=Math.min(a,n),s=Math.max(s,n);const o=this.fontSize();return{x:r-o/2,y:a-o/2,width:i-r+o,height:s-a+o}}destroy(){return r.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}e.TextPath=f,f.prototype._fillFunc=u,f.prototype._strokeFunc=d,f.prototype._fillFuncHit=u,f.prototype._strokeFuncHit=d,f.prototype.className="TextPath",f.prototype._attrsAffectingSize=["text","fontSize","data"],(0,h._registerNode)(f),i.Factory.addGetterSetter(f,"data"),i.Factory.addGetterSetter(f,"fontFamily","Arial"),i.Factory.addGetterSetter(f,"fontSize",12,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(f,"fontStyle",c),i.Factory.addGetterSetter(f,"align","left"),i.Factory.addGetterSetter(f,"letterSpacing",0,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(f,"textBaseline","middle"),i.Factory.addGetterSetter(f,"fontVariant",c),i.Factory.addGetterSetter(f,"text",""),i.Factory.addGetterSetter(f,"textDecoration",""),i.Factory.addGetterSetter(f,"kerningFunc",void 0)},5058(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Transformer=void 0;const r=n(4060),i=n(4892),a=n(6536),s=n(4723),o=n(7536),l=n(7949),h=n(8871),c=n(5483),u=n(8871),d="tr-konva",f=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${d}`).join(" "),g="nodesRect",p=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],m={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},y="ontouchstart"in h.Konva._global,v=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function b(t,e,n){const r=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),i=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:r,y:i}}let _=0;class S extends l.Group{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(f,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return r.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return d+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();const e=t.filter(t=>!t.isAncestorOf(this)||(r.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1));return this._nodes=t=e,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(t=>{const e=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()};if(t._attrsAffectingSize.length){const n=t._attrsAffectingSize.map(t=>t+"Change."+this._getEventNamespace()).join(" ");t.on(n,e)}t.on(p.map(t=>t+`.${this._getEventNamespace()}`).join(" "),e),t.on(`absoluteTransformChange.${this._getEventNamespace()}`,e),this._proxyDrag(t)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,n=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(n,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!e)return;const r=t.getAbsolutePosition(),i=r.x-e.x,a=r.y-e.y;this.nodes().forEach(e=>{if(e===t)return;if(e.isDragging())return;const r=e.getAbsolutePosition();e.setAbsolutePosition({x:r.x+i,y:r.y+a}),e.startDrag(n)}),e=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(g),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(g,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),n){const r=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=t.getAbsoluteScale(n),a=t.getAbsolutePosition(n),s=r.x*i.x-t.offsetX()*i.x,o=r.y*i.y-t.offsetY()*i.y,l=(h.Konva.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return b({x:a.x+s*Math.cos(l)+o*Math.sin(-l),y:a.y+o*Math.cos(l)+s*Math.sin(l),width:r.width*i.x,height:r.height*i.y,rotation:l},-h.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const t=[];this.nodes().map(e=>{const n=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],i=e.getAbsoluteTransform();r.forEach(function(e){const n=i.point(e);t.push(n)})});const e=new r.Transform;e.rotate(-h.Konva.getAngle(this.rotation()));let n=1/0,i=1/0,a=-1/0,s=-1/0;t.forEach(function(t){const r=e.point(t);void 0===n&&(n=a=r.x,i=s=r.y),n=Math.min(n,r.x),i=Math.min(i,r.y),a=Math.max(a,r.x),s=Math.max(s,r.y)}),e.invert();const o=e.point({x:n,y:i});return{x:o.x,y:o.y,width:a-n,height:s-i,rotation:h.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),v.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){const e=new o.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:y?10:"auto"}),n=this;e.on("mousedown touchstart",function(t){n._handleMouseDown(t)}),e.on("dragstart",t=>{e.stopDrag(),t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),e.on("mouseenter",()=>{const n=h.Konva.getAngle(this.rotation()),i=this.rotateAnchorCursor(),a=function(t,e,n){if("rotater"===t)return n;e+=r.Util.degToRad(m[t]||0);const i=(r.Util.radToDeg(e)%360+360)%360;return r.Util._inRange(i,337.5,360)||r.Util._inRange(i,0,22.5)?"ns-resize":r.Util._inRange(i,22.5,67.5)?"nesw-resize":r.Util._inRange(i,67.5,112.5)?"ew-resize":r.Util._inRange(i,112.5,157.5)?"nwse-resize":r.Util._inRange(i,157.5,202.5)?"ns-resize":r.Util._inRange(i,202.5,247.5)?"nesw-resize":r.Util._inRange(i,247.5,292.5)?"ew-resize":r.Util._inRange(i,292.5,337.5)?"nwse-resize":(r.Util.error("Transformer has unknown angle for cursor detection: "+i),"pointer")}(t,n,i);e.getStage().content&&(e.getStage().content.style.cursor=a),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){const t=new s.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(t,e){const n=e.getParent(),i=n.padding();t.beginPath(),t.rect(-i,-i,e.width()+2*i,e.height()+2*i),t.moveTo(e.width()/2,-i),n.rotateEnabled()&&n.rotateLineVisible()&&t.lineTo(e.width()/2,-n.rotateAnchorOffset()*r.Util._sign(e.height())-i),t.fillStrokeShape(e)},hitFunc:(t,e)=>{if(!this.shouldOverdrawWholeArea())return;const n=this.padding();t.beginPath(),t.rect(-n,-n,e.width()+2*n,e.height()+2*n),t.fillStrokeShape(e)}});this.add(t),this._proxyDrag(t),t.on("dragstart",t=>{t.cancelBubble=!0}),t.on("dragmove",t=>{t.cancelBubble=!0}),t.on("dragend",t=>{t.cancelBubble=!0}),this.on("dragmove",t=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];const e=this._getNodeRect(),n=e.width,r=e.height,i=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/i),this.cos=Math.abs(n/i),"undefined"!=typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},_++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(e=>{e._fire("transformstart",{evt:t.evt,target:e})})}_handleMouseMove(t){let e,n,r;const i=this.findOne("."+this._movingAnchorName),a=i.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let o={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const l=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(o=this.anchorDragBoundFunc()(l,o,t)),i.setAbsolutePosition(o);const c=i.getAbsolutePosition();if(l.x===c.x&&l.y===c.y)return;if("rotater"===this._movingAnchorName){const r=this._getNodeRect();e=i.x()-r.width/2,n=-i.y()+r.height/2;let a=Math.atan2(-n,e)+Math.PI/2;r.height<0&&(a-=Math.PI);const s=h.Konva.getAngle(this.rotation())+a,o=h.Konva.getAngle(this.rotationSnapTolerance()),l=function(t,e,n){let r=e;for(let i=0;i<t.length;i++){const a=h.Konva.getAngle(t[i]),s=Math.abs(a-e)%(2*Math.PI);Math.min(s,2*Math.PI-s)<n&&(r=a)}return r}(this.rotationSnaps(),s,o),c=function(t,e){const n=function(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}(t);return b(t,e,n)}(r,l-r.rotation);return void this._fitNodesInto(c,t)}const u=this.shiftBehavior();let d;d="inverted"===u?this.keepRatio()&&!t.shiftKey:"none"===u?this.keepRatio():this.keepRatio()||t.shiftKey;let f=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(d){const t=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(t.x-i.x(),2)+Math.pow(t.y-i.y(),2));const a=this.findOne(".top-left").x()>t.x?-1:1,s=this.findOne(".top-left").y()>t.y?-1:1;e=r*this.cos*a,n=r*this.sin*s,this.findOne(".top-left").x(t.x-e),this.findOne(".top-left").y(t.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(i.y());else if("top-right"===this._movingAnchorName){if(d){const t=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(i.x()-t.x,2)+Math.pow(t.y-i.y(),2));const a=this.findOne(".top-right").x()<t.x?-1:1,s=this.findOne(".top-right").y()>t.y?-1:1;e=r*this.cos*a,n=r*this.sin*s,this.findOne(".top-right").x(t.x+e),this.findOne(".top-right").y(t.y-n)}var g=i.position();this.findOne(".top-left").y(g.y),this.findOne(".bottom-right").x(g.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(i.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(i.x());else if("bottom-left"===this._movingAnchorName){if(d){const t=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(t.x-i.x(),2)+Math.pow(i.y()-t.y,2));const a=t.x<i.x()?-1:1,s=i.y()<t.y?-1:1;e=r*this.cos*a,n=r*this.sin*s,i.x(t.x-e),i.y(t.y+n)}g=i.position(),this.findOne(".top-left").x(g.x),this.findOne(".bottom-right").y(g.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(i.y());else if("bottom-right"===this._movingAnchorName){if(d){const t=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};r=Math.sqrt(Math.pow(i.x()-t.x,2)+Math.pow(i.y()-t.y,2));const a=this.findOne(".bottom-right").x()<t.x?-1:1,s=this.findOne(".bottom-right").y()<t.y?-1:1;e=r*this.cos*a,n=r*this.sin*s,this.findOne(".bottom-right").x(t.x+e),this.findOne(".bottom-right").y(t.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(f=this.centeredScaling()||t.altKey,f){const t=this.findOne(".top-left"),e=this.findOne(".bottom-right"),n=t.x(),r=t.y(),i=this.getWidth()-e.x(),a=this.getHeight()-e.y();e.move({x:-n,y:-r}),t.move({x:i,y:a})}const p=this.findOne(".top-left").getAbsolutePosition();e=p.x,n=p.y;const m=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),y=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:n,width:m,height:y,rotation:h.Konva.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var e;if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));const n=this.getNode();_--,this._fire("transformend",{evt:t,target:n}),null===(e=this.getLayer())||void 0===e||e.batchDraw(),n&&this._nodes.forEach(e=>{var n;e._fire("transformend",{evt:t,target:e}),null===(n=e.getLayer())||void 0===n||n.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,e){const n=this._getNodeRect();if(r.Util._inRange(t.width,2*-this.padding()-1,1))return void this.update();if(r.Util._inRange(t.height,2*-this.padding()-1,1))return void this.update();const i=new r.Transform;if(i.rotate(h.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const e=i.point({x:2*-this.padding(),y:0});t.x+=e.x,t.y+=e.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const e=i.point({x:2*this.padding(),y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.width+=2*this.padding()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const e=i.point({x:0,y:2*-this.padding()});t.x+=e.x,t.y+=e.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const e=i.point({x:0,y:2*this.padding()});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}if(this.boundBoxFunc()){const e=this.boundBoxFunc()(n,t);e?t=e:r.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const a=1e7,s=new r.Transform;s.translate(n.x,n.y),s.rotate(n.rotation),s.scale(n.width/a,n.height/a);const o=new r.Transform,l=t.width/a,c=t.height/a;!1===this.flipEnabled()?(o.translate(t.x,t.y),o.rotate(t.rotation),o.translate(t.width<0?t.width:0,t.height<0?t.height:0),o.scale(Math.abs(l),Math.abs(c))):(o.translate(t.x,t.y),o.rotate(t.rotation),o.scale(l,c));const u=o.multiply(s.invert());this._nodes.forEach(t=>{var e;const n=t.getParent().getAbsoluteTransform(),i=t.getTransform().copy();i.translate(t.offsetX(),t.offsetY());const a=new r.Transform;a.multiply(n.copy().invert()).multiply(u).multiply(n).multiply(i);const s=a.decompose();t.setAttrs(s),null===(e=t.getLayer())||void 0===e||e.batchDraw()}),this.rotation(r.Util._getRotation(t.rotation)),this._nodes.forEach(t=>{this._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var t;const e=this._getNodeRect();this.rotation(r.Util._getRotation(e.rotation));const n=e.width,i=e.height,a=this.enabledAnchors(),s=this.resizeEnabled(),o=this.padding(),l=this.anchorSize(),h=this.find("._anchor");h.forEach(t=>{t.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+o,offsetY:l/2+o,visible:s&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:l/2+o,visible:s&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:l/2-o,offsetY:l/2+o,visible:s&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+o,visible:s&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:i/2,offsetX:l/2-o,visible:s&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+o,offsetY:l/2-o,visible:s&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:i,offsetY:l/2-o,visible:s&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:i,offsetX:l/2-o,offsetY:l/2-o,visible:s&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*r.Util._sign(i)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const c=this.anchorStyleFunc();c&&h.forEach(t=>{c(t)}),null===(t=this.getLayer())||void 0===t||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),l.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return a.Node.prototype.toObject.call(this)}clone(t){return a.Node.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}e.Transformer=S,S.isTransforming=()=>_>0,S.prototype.className="Transformer",(0,u._registerNode)(S),i.Factory.addGetterSetter(S,"enabledAnchors",v,function(t){return t instanceof Array||r.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(t){-1===v.indexOf(t)&&r.Util.warn("Unknown anchor name: "+t+". Available names are: "+v.join(", "))}),t||[]}),i.Factory.addGetterSetter(S,"flipEnabled",!0,(0,c.getBooleanValidator)()),i.Factory.addGetterSetter(S,"resizeEnabled",!0),i.Factory.addGetterSetter(S,"anchorSize",10,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(S,"rotateEnabled",!0),i.Factory.addGetterSetter(S,"rotateLineVisible",!0),i.Factory.addGetterSetter(S,"rotationSnaps",[]),i.Factory.addGetterSetter(S,"rotateAnchorOffset",50,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(S,"rotateAnchorCursor","crosshair"),i.Factory.addGetterSetter(S,"rotationSnapTolerance",5,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(S,"borderEnabled",!0),i.Factory.addGetterSetter(S,"anchorStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(S,"anchorStrokeWidth",1,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(S,"anchorFill","white"),i.Factory.addGetterSetter(S,"anchorCornerRadius",0,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(S,"borderStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(S,"borderStrokeWidth",1,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(S,"borderDash"),i.Factory.addGetterSetter(S,"keepRatio",!0),i.Factory.addGetterSetter(S,"shiftBehavior","default"),i.Factory.addGetterSetter(S,"centeredScaling",!1),i.Factory.addGetterSetter(S,"ignoreStroke",!1),i.Factory.addGetterSetter(S,"padding",0,(0,c.getNumberValidator)()),i.Factory.addGetterSetter(S,"nodes"),i.Factory.addGetterSetter(S,"node"),i.Factory.addGetterSetter(S,"boundBoxFunc"),i.Factory.addGetterSetter(S,"anchorDragBoundFunc"),i.Factory.addGetterSetter(S,"anchorStyleFunc"),i.Factory.addGetterSetter(S,"shouldOverdrawWholeArea",!1),i.Factory.addGetterSetter(S,"useSingleNodeRotation",!0),i.Factory.backCompat(S,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"})},8001(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Wedge=void 0;const r=n(4892),i=n(4723),a=n(8871),s=n(5483),o=n(8871);class l extends i.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,a.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}e.Wedge=l,l.prototype.className="Wedge",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"radius",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,s.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1),r.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})},2518(t,e,n){"use strict";n.r(e),n.d(e,{Arc:()=>Gt,Arrow:()=>Bt,Circle:()=>Tt,Ellipse:()=>Ft,FastLayer:()=>wt,Group:()=>Ct,Image:()=>At,KonvaRenderer:()=>Wt,Label:()=>kt,Layer:()=>xt,Line:()=>Mt,Path:()=>zt,Rect:()=>Pt,RegularPolygon:()=>Ut,Ring:()=>It,Shape:()=>Ht,Sprite:()=>Nt,Stage:()=>Kt,Star:()=>Lt,Tag:()=>Ot,Text:()=>Rt,TextPath:()=>Dt,Transformer:()=>jt,Wedge:()=>Et,useContextBridge:()=>_t,useStrictMode:()=>Yt,version:()=>Vt});var r={};n.r(r),n.d(r,{appendChild:()=>j,appendChildToContainer:()=>V,appendInitialChild:()=>w,cancelTimeout:()=>G,clearContainer:()=>nt,commitMount:()=>Q,commitTextUpdate:()=>X,commitUpdate:()=>$,createInstance:()=>C,createTextInstance:()=>k,detachDeletedInstance:()=>rt,finalizeInitialChildren:()=>P,getChildHostContext:()=>L,getCurrentEventPriority:()=>it,getPublicInstance:()=>T,getRootHostContext:()=>D,hideInstance:()=>J,hideTextInstance:()=>Z,idlePriority:()=>_.unstable_IdlePriority,insertBefore:()=>W,insertInContainerBefore:()=>K,isPrimaryRenderer:()=>U,noTimeout:()=>O,now:()=>_.unstable_now,prepareForCommit:()=>F,preparePortalMount:()=>E,prepareUpdate:()=>M,removeChild:()=>Y,removeChildFromContainer:()=>q,resetAfterCommit:()=>N,resetTextContent:()=>A,run:()=>_.unstable_runWithPriority,scheduleTimeout:()=>I,shouldDeprioritizeSubtree:()=>R,shouldSetTextContent:()=>z,supportsMutation:()=>H,unhideInstance:()=>tt,unhideTextInstance:()=>et,warnsIfNotActing:()=>B}),n(5778);var i=n(1609),a=n.n(i),s=n(663),o=n.n(s),l=n(2935),h=n.n(l),c=n(735),u=n(8871);const d={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let f=!1,g=!1;const p=".react-konva-event";let m=!1;const y={};function v(t,e,n=y){if(!f&&"zIndex"in e&&(console.warn('ReactKonva: You are using "zIndex" attribute for a Konva node.\nreact-konva may get confused with ordering. Just define correct order of elements in your render function of a component.\nFor more info see: https://github.com/konvajs/react-konva/issues/194\n'),f=!0),!g&&e.draggable){var r=void 0!==e.x||void 0!==e.y,i=e.onDragEnd||e.onDragMove;r&&!i&&(console.warn("ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.\nPosition of a node will be changed during drag&drop, so you should update state of the react app as well.\nConsider to add onDragMove or onDragEnd events.\nFor more info see: https://github.com/konvajs/react-konva/issues/256\n"),g=!0)}for(var a in n)if(!d[a]){var s="on"===a.slice(0,2),o=n[a]!==e[a];s&&o&&("content"===(_=a.substr(2).toLowerCase()).substr(0,7)&&(_="content"+_.substr(7,1).toUpperCase()+_.substr(8)),t.off(_,n[a])),!e.hasOwnProperty(a)&&t.setAttr(a,void 0)}var l=m||e._useStrictMode,h={},c=!1;const u={};for(var a in e)if(!d[a]){s="on"===a.slice(0,2);var v=n[a]!==e[a];s&&v&&("content"===(_=a.substr(2).toLowerCase()).substr(0,7)&&(_="content"+_.substr(7,1).toUpperCase()+_.substr(8)),e[a]&&(u[_]=e[a])),!s&&(e[a]!==n[a]||l&&e[a]!==t.getAttr(a))&&(c=!0,h[a]=e[a])}for(var _ in c&&(t.setAttrs(h),b(t)),u)t.on(_+p,u[_])}function b(t){if(!u.Konva.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}var _=n(9982);const S={},x={};function w(t,e){"string"!=typeof e?(t.add(e),b(t)):console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`)}function C(t,e,n){let r=o()[t];r||(console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=o().Group);const i={},a={};for(var s in e)"on"===s.slice(0,2)?a[s]=e[s]:i[s]=e[s];const l=new r(i);return v(l,a),l}function k(t,e,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function P(t,e,n){return!1}function T(t){return t}function F(){return null}function E(){return null}function M(t,e,n,r){return x}function N(){}function A(t){}function R(t,e){return!1}function D(){return S}function L(){return S}o().Node.prototype._applyProps=v;const I=setTimeout,G=clearTimeout,O=-1;function z(t,e){return!1}const U=!1,B=!0,H=!0;function j(t,e){e.parent===t?e.moveToTop():t.add(e),b(t)}function V(t,e){e.parent===t?e.moveToTop():t.add(e),b(t)}function W(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),b(t)}function K(t,e,n){W(t,e,n)}function Y(t,e){e.destroy(),e.off(p),b(t)}function q(t,e){e.destroy(),e.off(p),b(t)}function X(t,e,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function Q(t,e,n){}function $(t,e,n,r,i){v(t,i,r)}function J(t){t.hide(),b(t)}function Z(t){}function tt(t,e){(null==e.visible||e.visible)&&t.show()}function et(t,e){}function nt(t){}function rt(){}const it=()=>c.c8;var at,st,ot=Object.defineProperty,lt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,ct=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable,ft=(t,e,n)=>e in t?ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gt=(t,e)=>{for(var n in e||(e={}))ut.call(e,n)&&ft(t,n,e[n]);if(ct)for(var n of ct(e))dt.call(e,n)&&ft(t,n,e[n]);return t};function pt(t,e,n){if(!t)return;if(!0===n(t))return t;let r=e?t.return:t.child;for(;r;){const t=pt(r,e,n);if(t)return t;r=e?null:r.sibling}}function mt(t){try{return Object.defineProperties(t,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(e){return t}}"undefined"==typeof window||!(null==(at=window.document)?void 0:at.createElement)&&"ReactNative"!==(null==(st=window.navigator)?void 0:st.product)?i.useEffect:i.useLayoutEffect;const yt=console.error;console.error=function(){const t=[...arguments].join("");if(!(null==t?void 0:t.startsWith("Warning:"))||!t.includes("useContext"))return yt.apply(this,arguments);console.error=yt};const vt=mt(i.createContext(null));class bt extends i.Component{render(){return i.createElement(vt.Provider,{value:this._reactInternals},this.props.children)}}function _t(){const t=function(){const t=function(){const t=i.useContext(vt);if(null===t)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=i.useId();return i.useMemo(()=>{for(const n of[t,null==t?void 0:t.alternate]){if(!n)continue;const t=pt(n,!1,t=>{let n=t.memoizedState;for(;n;){if(n.memoizedState===e)return!0;n=n.next}});if(t)return t}},[t,e])}(),[e]=i.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&"object"==typeof n.type){const t=void 0===n.type._context&&n.type.Provider===n.type?n.type:n.type._context;t&&t!==vt&&!e.has(t)&&e.set(t,i.useContext(mt(t)))}n=n.return}return e}();return i.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>{return i.createElement(e,null,i.createElement(n.Provider,(a=gt({},r),s={value:t.get(n)},lt(a,ht(s)))));var a,s},t=>i.createElement(bt,gt({},t))),[t])}const St=t=>{const e=a().useRef(null),n=a().useRef(null),r=a().useRef(null),i=function(t){const e=a().useRef({});return a().useLayoutEffect(()=>{e.current=t}),a().useLayoutEffect(()=>()=>{e.current={}},[]),e.current}(t),s=_t(),l=e=>{const{forwardedRef:n}=t;n&&("function"==typeof n?n(e):n.current=e)};return a().useLayoutEffect(()=>(n.current=new(o().Stage)({width:t.width,height:t.height,container:e.current}),l(n.current),r.current=Wt.createContainer(n.current,c.AU,!1,null),Wt.updateContainer(a().createElement(s,{},t.children),r.current),()=>{o().isBrowser&&(l(null),Wt.updateContainer(null,r.current,null),n.current.destroy())}),[]),a().useLayoutEffect(()=>{l(n.current),v(n.current,t,i),Wt.updateContainer(a().createElement(s,{},t.children),r.current,null)}),a().createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},xt="Layer",wt="FastLayer",Ct="Group",kt="Label",Pt="Rect",Tt="Circle",Ft="Ellipse",Et="Wedge",Mt="Line",Nt="Sprite",At="Image",Rt="Text",Dt="TextPath",Lt="Star",It="Ring",Gt="Arc",Ot="Tag",zt="Path",Ut="RegularPolygon",Bt="Arrow",Ht="Shape",jt="Transformer",Vt="18.2.13",Wt=h()(r);Wt.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:a().version,rendererPackageName:"react-konva"});const Kt=a().forwardRef((t,e)=>a().createElement(bt,{},a().createElement(St,{...t,forwardedRef:e}))),Yt=function(t){m=t}},735(t,e){"use strict";e.c8=16,e.AU=0},2935(t,e,n){t.exports=function(t){var e={},r=n(1609),i=n(9982),a=Object.assign;function s(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),h=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),g=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),b=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var _=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var S=Symbol.iterator;function x(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=S&&t[S]||t["@@iterator"])?t:null}function w(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case c:return"Fragment";case h:return"Portal";case d:return"Profiler";case u:return"StrictMode";case m:return"Suspense";case y:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case g:return(t.displayName||"Context")+".Consumer";case f:return(t._context.displayName||"Context")+".Provider";case p:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case v:return null!==(e=t.displayName||null)?e:w(t.type)||"Memo";case b:e=t._payload,t=t._init;try{return w(t(e))}catch(t){}}return null}function C(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=e.render).displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return w(e);case 8:return e===u?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e}return null}function k(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do{!!(4098&(e=t).flags)&&(n=e.return),t=e.return}while(t)}return 3===e.tag?n:null}function P(t){if(k(t)!==t)throw Error(s(188))}function T(t){var e=t.alternate;if(!e){if(null===(e=k(t)))throw Error(s(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return P(i),t;if(a===r)return P(i),e;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=a;break}if(l===r){o=!0,r=i,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,r=i;break}if(l===r){o=!0,r=a,n=i;break}l=l.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?t:e}function F(t){return null!==(t=T(t))?E(t):null}function E(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var e=E(t);if(null!==e)return e;t=t.sibling}return null}function M(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){if(4!==t.tag){var e=M(t);if(null!==e)return e}t=t.sibling}return null}var N,A=Array.isArray,R=t.getPublicInstance,D=t.getRootHostContext,L=t.getChildHostContext,I=t.prepareForCommit,G=t.resetAfterCommit,O=t.createInstance,z=t.appendInitialChild,U=t.finalizeInitialChildren,B=t.prepareUpdate,H=t.shouldSetTextContent,j=t.createTextInstance,V=t.scheduleTimeout,W=t.cancelTimeout,K=t.noTimeout,Y=t.isPrimaryRenderer,q=t.supportsMutation,X=t.supportsPersistence,Q=t.supportsHydration,$=t.getInstanceFromNode,J=t.preparePortalMount,Z=t.getCurrentEventPriority,tt=t.detachDeletedInstance,et=t.supportsMicrotasks,nt=t.scheduleMicrotask,rt=t.supportsTestSelectors,it=t.findFiberRoot,at=t.getBoundingRect,st=t.getTextContent,ot=t.isHiddenSubtree,lt=t.matchAccessibilityRole,ht=t.setFocusIfFocusable,ct=t.setupIntersectionObserver,ut=t.appendChild,dt=t.appendChildToContainer,ft=t.commitTextUpdate,gt=t.commitMount,pt=t.commitUpdate,mt=t.insertBefore,yt=t.insertInContainerBefore,vt=t.removeChild,bt=t.removeChildFromContainer,_t=t.resetTextContent,St=t.hideInstance,xt=t.hideTextInstance,wt=t.unhideInstance,Ct=t.unhideTextInstance,kt=t.clearContainer,Pt=t.cloneInstance,Tt=t.createContainerChildSet,Ft=t.appendChildToContainerChildSet,Et=t.finalizeContainerChildren,Mt=t.replaceContainerChildren,Nt=t.cloneHiddenInstance,At=t.cloneHiddenTextInstance,Rt=t.canHydrateInstance,Dt=t.canHydrateTextInstance,Lt=t.canHydrateSuspenseInstance,It=t.isSuspenseInstancePending,Gt=t.isSuspenseInstanceFallback,Ot=t.getSuspenseInstanceFallbackErrorDetails,zt=t.registerSuspenseInstanceRetry,Ut=t.getNextHydratableSibling,Bt=t.getFirstHydratableChild,Ht=t.getFirstHydratableChildWithinContainer,jt=t.getFirstHydratableChildWithinSuspenseInstance,Vt=t.hydrateInstance,Wt=t.hydrateTextInstance,Kt=t.hydrateSuspenseInstance,Yt=t.getNextHydratableInstanceAfterSuspenseInstance,qt=t.commitHydratedContainer,Xt=t.commitHydratedSuspenseInstance,Qt=t.clearSuspenseBoundary,$t=t.clearSuspenseBoundaryFromContainer,Jt=t.shouldDeleteUnhydratedTailInstances,Zt=t.didNotMatchHydratedContainerTextInstance,te=t.didNotMatchHydratedTextInstance;function ee(t){if(void 0===N)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);N=e&&e[1]||""}return"\n"+N+t}var ne=!1;function re(t,e){if(!t||ne)return"";ne=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var r=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){r=t}t.call(e.prototype)}else{try{throw Error()}catch(t){r=t}t()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),a=r.stack.split("\n"),s=i.length-1,o=a.length-1;1<=s&&0<=o&&i[s]!==a[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==a[o]){if(1!==s||1!==o)do{if(s--,0>--o||i[s]!==a[o]){var l="\n"+i[s].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}}while(1<=s&&0<=o);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ee(t):""}var ie=Object.prototype.hasOwnProperty,ae=[],se=-1;function oe(t){return{current:t}}function le(t){0>se||(t.current=ae[se],ae[se]=null,se--)}function he(t,e){se++,ae[se]=t.current,t.current=e}var ce={},ue=oe(ce),de=oe(!1),fe=ce;function ge(t,e){var n=t.type.contextTypes;if(!n)return ce;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=a),a}function pe(t){return null!=t.childContextTypes}function me(){le(de),le(ue)}function ye(t,e,n){if(ue.current!==ce)throw Error(s(168));he(ue,e),he(de,n)}function ve(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(s(108,C(t)||"Unknown",i));return a({},n,r)}function be(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ce,fe=ue.current,he(ue,t),he(de,de.current),!0}function _e(t,e,n){var r=t.stateNode;if(!r)throw Error(s(169));n?(t=ve(t,e,fe),r.__reactInternalMemoizedMergedChildContext=t,le(de),le(ue),he(ue,t)):le(de),he(de,n)}var Se=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(xe(t)/we|0)|0},xe=Math.log,we=Math.LN2,Ce=64,ke=4194304;function Pe(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Te(t,e){var n=t.pendingLanes;if(0===n)return 0;var r=0,i=t.suspendedLanes,a=t.pingedLanes,s=268435455&n;if(0!==s){var o=s&~i;0!==o?r=Pe(o):0!==(a&=s)&&(r=Pe(a))}else 0!==(s=n&~i)?r=Pe(s):0!==a&&(r=Pe(a));if(0===r)return 0;if(0!==e&&e!==r&&0===(e&i)&&((i=r&-r)>=(a=e&-e)||16===i&&4194240&a))return e;if(4&r&&(r|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0<e;)i=1<<(n=31-Se(e)),r|=t[n],e&=~i;return r}function Fe(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;default:return-1}}function Ee(t){return 0!=(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function Me(){var t=Ce;return!(4194240&(Ce<<=1))&&(Ce=64),t}function Ne(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Ae(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-Se(e)]=n}function Re(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-Se(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var De=0;function Le(t){return 1<(t&=-t)?4<t?268435455&t?16:536870912:4:1}var Ie=i.unstable_scheduleCallback,Ge=i.unstable_cancelCallback,Oe=i.unstable_shouldYield,ze=i.unstable_requestPaint,Ue=i.unstable_now,Be=i.unstable_ImmediatePriority,He=i.unstable_UserBlockingPriority,je=i.unstable_NormalPriority,Ve=i.unstable_IdlePriority,We=null,Ke=null,Ye="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},qe=null,Xe=!1,Qe=!1;function $e(t){null===qe?qe=[t]:qe.push(t)}function Je(){if(!Qe&&null!==qe){Qe=!0;var t=0,e=De;try{var n=qe;for(De=1;t<n.length;t++){var r=n[t];do{r=r(!0)}while(null!==r)}qe=null,Xe=!1}catch(e){throw null!==qe&&(qe=qe.slice(t+1)),Ie(Be,Je),e}finally{De=e,Qe=!1}}return null}var Ze=[],tn=0,en=null,nn=0,rn=[],an=0,sn=null,on=1,ln="";function hn(t,e){Ze[tn++]=nn,Ze[tn++]=en,en=t,nn=e}function cn(t,e,n){rn[an++]=on,rn[an++]=ln,rn[an++]=sn,sn=t;var r=on;t=ln;var i=32-Se(r)-1;r&=~(1<<i),n+=1;var a=32-Se(e)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,on=1<<32-Se(e)+i|n<<i|r,ln=a+t}else on=1<<a|n<<i|r,ln=t}function un(t){null!==t.return&&(hn(t,1),cn(t,1,0))}function dn(t){for(;t===en;)en=Ze[--tn],Ze[tn]=null,nn=Ze[--tn],Ze[tn]=null;for(;t===sn;)sn=rn[--an],rn[an]=null,ln=rn[--an],rn[an]=null,on=rn[--an],rn[an]=null}var fn=null,gn=null,pn=!1,mn=!1,yn=null;function vn(t,e){var n=so(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,null===(e=t.deletions)?(t.deletions=[n],t.flags|=16):e.push(n)}function bn(t,e){switch(t.tag){case 5:return null!==(e=Rt(e,t.type,t.pendingProps))&&(t.stateNode=e,fn=t,gn=Bt(e),!0);case 6:return null!==(e=Dt(e,t.pendingProps))&&(t.stateNode=e,fn=t,gn=null,!0);case 13:if(null!==(e=Lt(e))){var n=null!==sn?{id:on,overflow:ln}:null;return t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},(n=so(18,null,null,0)).stateNode=e,n.return=t,t.child=n,fn=t,gn=null,!0}return!1;default:return!1}}function Sn(t){return!(!(1&t.mode)||128&t.flags)}function xn(t){if(pn){var e=gn;if(e){var n=e;if(!bn(t,e)){if(Sn(t))throw Error(s(418));e=Ut(n);var r=fn;e&&bn(t,e)?vn(r,n):(t.flags=-4097&t.flags|2,pn=!1,fn=t)}}else{if(Sn(t))throw Error(s(418));t.flags=-4097&t.flags|2,pn=!1,fn=t}}}function wn(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;fn=t}function Cn(t){if(!Q||t!==fn)return!1;if(!pn)return wn(t),pn=!0,!1;if(3!==t.tag&&(5!==t.tag||Jt(t.type)&&!H(t.type,t.memoizedProps))){var e=gn;if(e){if(Sn(t))throw kn(),Error(s(418));for(;e;)vn(t,e),e=Ut(e)}}if(wn(t),13===t.tag){if(!Q)throw Error(s(316));if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(s(317));gn=Yt(t)}else gn=fn?Ut(t.stateNode):null;return!0}function kn(){for(var t=gn;t;)t=Ut(t)}function Pn(){Q&&(gn=fn=null,mn=pn=!1)}function Tn(t){null===yn?yn=[t]:yn.push(t)}var Fn=o.ReactCurrentBatchConfig;function En(t,e){if(Ye(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ie.call(e,i)||!Ye(t[i],e[i]))return!1}return!0}function Mn(t){switch(t.tag){case 5:return ee(t.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return re(t.type,!1);case 11:return re(t.type.render,!1);case 1:return re(t.type,!0);default:return""}}function Nn(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,t));var i=r,a=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===a?e.ref:(e=function(t){var e=i.refs;null===t?delete e[a]:e[a]=t},e._stringRef=a,e)}if("string"!=typeof t)throw Error(s(284));if(!n._owner)throw Error(s(290,t))}return t}function An(t,e){throw t=Object.prototype.toString.call(e),Error(s(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Rn(t){return(0,t._init)(t._payload)}function Dn(t){function e(e,n){if(t){var r=e.deletions;null===r?(e.deletions=[n],e.flags|=16):r.push(n)}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=lo(t,e)).index=0,t.sibling=null,t}function a(e,n,r){return e.index=r,t?null!==(r=e.alternate)?(r=r.index)<n?(e.flags|=2,n):r:(e.flags|=2,n):(e.flags|=1048576,n)}function o(e){return t&&null===e.alternate&&(e.flags|=2),e}function u(t,e,n,r){return null===e||6!==e.tag?((e=fo(n,t.mode,r)).return=t,e):((e=i(e,n)).return=t,e)}function d(t,e,n,r){var a=n.type;return a===c?g(t,e,n.props.children,r,n.key):null!==e&&(e.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===b&&Rn(a)===e.type)?((r=i(e,n.props)).ref=Nn(t,e,n),r.return=t,r):((r=ho(n.type,n.key,n.props,null,t.mode,r)).ref=Nn(t,e,n),r.return=t,r)}function f(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=go(n,t.mode,r)).return=t,e):((e=i(e,n.children||[])).return=t,e)}function g(t,e,n,r,a){return null===e||7!==e.tag?((e=co(n,t.mode,r,a)).return=t,e):((e=i(e,n)).return=t,e)}function p(t,e,n){if("string"==typeof e&&""!==e||"number"==typeof e)return(e=fo(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case l:return(n=ho(e.type,e.key,e.props,null,t.mode,n)).ref=Nn(t,null,e),n.return=t,n;case h:return(e=go(e,t.mode,n)).return=t,e;case b:return p(t,(0,e._init)(e._payload),n)}if(A(e)||x(e))return(e=co(e,t.mode,n,null)).return=t,e;An(t,e)}return null}function m(t,e,n,r){var i=null!==e?e.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:u(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===i?d(t,e,n,r):null;case h:return n.key===i?f(t,e,n,r):null;case b:return m(t,e,(i=n._init)(n._payload),r)}if(A(n)||x(n))return null!==i?null:g(t,e,n,r,null);An(t,n)}return null}function y(t,e,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return u(e,t=t.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case l:return d(e,t=t.get(null===r.key?n:r.key)||null,r,i);case h:return f(e,t=t.get(null===r.key?n:r.key)||null,r,i);case b:return y(t,e,n,(0,r._init)(r._payload),i)}if(A(r)||x(r))return g(e,t=t.get(n)||null,r,i,null);An(e,r)}return null}function v(i,s,o,l){for(var h=null,c=null,u=s,d=s=0,f=null;null!==u&&d<o.length;d++){u.index>d?(f=u,u=null):f=u.sibling;var g=m(i,u,o[d],l);if(null===g){null===u&&(u=f);break}t&&u&&null===g.alternate&&e(i,u),s=a(g,s,d),null===c?h=g:c.sibling=g,c=g,u=f}if(d===o.length)return n(i,u),pn&&hn(i,d),h;if(null===u){for(;d<o.length;d++)null!==(u=p(i,o[d],l))&&(s=a(u,s,d),null===c?h=u:c.sibling=u,c=u);return pn&&hn(i,d),h}for(u=r(i,u);d<o.length;d++)null!==(f=y(u,i,d,o[d],l))&&(t&&null!==f.alternate&&u.delete(null===f.key?d:f.key),s=a(f,s,d),null===c?h=f:c.sibling=f,c=f);return t&&u.forEach(function(t){return e(i,t)}),pn&&hn(i,d),h}function _(i,o,l,h){var c=x(l);if("function"!=typeof c)throw Error(s(150));if(null==(l=c.call(l)))throw Error(s(151));for(var u=c=null,d=o,f=o=0,g=null,v=l.next();null!==d&&!v.done;f++,v=l.next()){d.index>f?(g=d,d=null):g=d.sibling;var b=m(i,d,v.value,h);if(null===b){null===d&&(d=g);break}t&&d&&null===b.alternate&&e(i,d),o=a(b,o,f),null===u?c=b:u.sibling=b,u=b,d=g}if(v.done)return n(i,d),pn&&hn(i,f),c;if(null===d){for(;!v.done;f++,v=l.next())null!==(v=p(i,v.value,h))&&(o=a(v,o,f),null===u?c=v:u.sibling=v,u=v);return pn&&hn(i,f),c}for(d=r(i,d);!v.done;f++,v=l.next())null!==(v=y(d,i,f,v.value,h))&&(t&&null!==v.alternate&&d.delete(null===v.key?f:v.key),o=a(v,o,f),null===u?c=v:u.sibling=v,u=v);return t&&d.forEach(function(t){return e(i,t)}),pn&&hn(i,f),c}return function t(r,a,s,u){if("object"==typeof s&&null!==s&&s.type===c&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case l:t:{for(var d=s.key,f=a;null!==f;){if(f.key===d){if((d=s.type)===c){if(7===f.tag){n(r,f.sibling),(a=i(f,s.props.children)).return=r,r=a;break t}}else if(f.elementType===d||"object"==typeof d&&null!==d&&d.$$typeof===b&&Rn(d)===f.type){n(r,f.sibling),(a=i(f,s.props)).ref=Nn(r,f,s),a.return=r,r=a;break t}n(r,f);break}e(r,f),f=f.sibling}s.type===c?((a=co(s.props.children,r.mode,u,s.key)).return=r,r=a):((u=ho(s.type,s.key,s.props,null,r.mode,u)).ref=Nn(r,a,s),u.return=r,r=u)}return o(r);case h:t:{for(f=s.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(r,a.sibling),(a=i(a,s.children||[])).return=r,r=a;break t}n(r,a);break}e(r,a),a=a.sibling}(a=go(s,r.mode,u)).return=r,r=a}return o(r);case b:return t(r,a,(f=s._init)(s._payload),u)}if(A(s))return v(r,a,s,u);if(x(s))return _(r,a,s,u);An(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,s)).return=r,r=a):(n(r,a),(a=fo(s,r.mode,u)).return=r,r=a),o(r)):n(r,a)}}var Ln=Dn(!0),In=Dn(!1),Gn=oe(null),On=null,zn=null,Un=null;function Bn(){Un=zn=On=null}function Hn(t,e,n){Y?(he(Gn,e._currentValue),e._currentValue=n):(he(Gn,e._currentValue2),e._currentValue2=n)}function jn(t){var e=Gn.current;le(Gn),Y?t._currentValue=e:t._currentValue2=e}function Vn(t,e,n){for(;null!==t;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,null!==r&&(r.childLanes|=e)):null!==r&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Wn(t,e){On=t,Un=zn=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!==(t.lanes&e)&&(Di=!0),t.firstContext=null)}function Kn(t){var e=Y?t._currentValue:t._currentValue2;if(Un!==t)if(t={context:t,memoizedValue:e,next:null},null===zn){if(null===On)throw Error(s(308));zn=t,On.dependencies={lanes:0,firstContext:t}}else zn=zn.next=t;return e}var Yn=null;function qn(t){null===Yn?Yn=[t]:Yn.push(t)}function Xn(t,e,n,r){var i=e.interleaved;return null===i?(n.next=n,qn(e)):(n.next=i.next,i.next=n),e.interleaved=n,Qn(t,r)}function Qn(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}var $n=!1;function Jn(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zn(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function tr(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function er(t,e,n){var r=t.updateQueue;if(null===r)return null;if(r=r.shared,2&ns){var i=r.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Qn(t,n)}return null===(i=r.interleaved)?(e.next=e,qn(r)):(e.next=i.next,i.next=e),r.interleaved=e,Qn(t,n)}function nr(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,4194240&n)){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,Re(t,n)}}function rr(t,e){var n=t.updateQueue,r=t.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=s:a=a.next=s,n=n.next}while(null!==n);null===a?i=a=e:a=a.next=e}else i=a=e;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function ir(t,e,n,r){var i=t.updateQueue;$n=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var h=l,c=h.next;h.next=null,null===o?s=c:o.next=c,o=h;var u=t.alternate;null!==u&&(l=(u=u.updateQueue).lastBaseUpdate)!==o&&(null===l?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=h)}if(null!==s){var d=i.baseState;for(o=0,u=c=h=null,l=s;;){var f=l.lane,g=l.eventTime;if((r&f)===f){null!==u&&(u=u.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});t:{var p=t,m=l;switch(f=e,g=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(g,d,f);break t}d=p;break t;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(g,d,f):p))break t;d=a({},d,f);break t;case 2:$n=!0}}null!==l.callback&&0!==l.lane&&(t.flags|=64,null===(f=i.effects)?i.effects=[l]:f.push(l))}else g={eventTime:g,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===u?(c=u=g,h=d):u=u.next=g,o|=f;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(f=l).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===u&&(h=d),i.baseState=h,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(e=i.shared.interleaved)){i=e;do{o|=i.lane,i=i.next}while(i!==e)}else null===s&&(i.shared.lanes=0);cs|=o,t.lanes=o,t.memoizedState=d}}function ar(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(s(191,i));i.call(r)}}}var sr={},or=oe(sr),lr=oe(sr),hr=oe(sr);function cr(t){if(t===sr)throw Error(s(174));return t}function ur(t,e){he(hr,e),he(lr,t),he(or,sr),t=D(e),le(or),he(or,t)}function dr(){le(or),le(lr),le(hr)}function fr(t){var e=cr(hr.current),n=cr(or.current);n!==(e=L(n,t.type,e))&&(he(lr,t),he(or,e))}function gr(t){lr.current===t&&(le(or),le(lr))}var pr=oe(0);function mr(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||It(n)||Gt(n)))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(128&e.flags)return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var yr=[];function vr(){for(var t=0;t<yr.length;t++){var e=yr[t];Y?e._workInProgressVersionPrimary=null:e._workInProgressVersionSecondary=null}yr.length=0}var br=o.ReactCurrentDispatcher,_r=o.ReactCurrentBatchConfig,Sr=0,xr=null,wr=null,Cr=null,kr=!1,Pr=!1,Tr=0,Fr=0;function Er(){throw Error(s(321))}function Mr(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!Ye(t[n],e[n]))return!1;return!0}function Nr(t,e,n,r,i,a){if(Sr=a,xr=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,br.current=null===t||null===t.memoizedState?gi:pi,t=n(r,i),Pr){a=0;do{if(Pr=!1,Tr=0,25<=a)throw Error(s(301));a+=1,Cr=wr=null,e.updateQueue=null,br.current=mi,t=n(r,i)}while(Pr)}if(br.current=fi,e=null!==wr&&null!==wr.next,Sr=0,Cr=wr=xr=null,kr=!1,e)throw Error(s(300));return t}function Ar(){var t=0!==Tr;return Tr=0,t}function Rr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Cr?xr.memoizedState=Cr=t:Cr=Cr.next=t,Cr}function Dr(){if(null===wr){var t=xr.alternate;t=null!==t?t.memoizedState:null}else t=wr.next;var e=null===Cr?xr.memoizedState:Cr.next;if(null!==e)Cr=e,wr=t;else{if(null===t)throw Error(s(310));t={memoizedState:(wr=t).memoizedState,baseState:wr.baseState,baseQueue:wr.baseQueue,queue:wr.queue,next:null},null===Cr?xr.memoizedState=Cr=t:Cr=Cr.next=t}return Cr}function Lr(t,e){return"function"==typeof e?e(t):e}function Ir(t){var e=Dr(),n=e.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=t;var r=wr,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=o=null,h=null,c=a;do{var u=c.lane;if((Sr&u)===u)null!==h&&(h=h.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===h?(l=h=d,o=r):h=h.next=d,xr.lanes|=u,cs|=u}c=c.next}while(null!==c&&c!==a);null===h?o=r:h.next=l,Ye(r,e.memoizedState)||(Di=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=h,n.lastRenderedState=r}if(null!==(t=n.interleaved)){i=t;do{a=i.lane,xr.lanes|=a,cs|=a,i=i.next}while(i!==t)}else null===i&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Gr(t){var e=Dr(),n=e.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,a=e.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{a=t(a,o.action),o=o.next}while(o!==i);Ye(a,e.memoizedState)||(Di=!0),e.memoizedState=a,null===e.baseQueue&&(e.baseState=a),n.lastRenderedState=a}return[a,r]}function Or(){}function zr(t,e){var n=xr,r=Dr(),i=e(),a=!Ye(r.memoizedState,i);if(a&&(r.memoizedState=i,Di=!0),r=r.queue,$r(Hr.bind(null,n,r,t),[t]),r.getSnapshot!==e||a||null!==Cr&&1&Cr.memoizedState.tag){if(n.flags|=2048,Kr(9,Br.bind(null,n,r,i,e),void 0,null),null===rs)throw Error(s(349));30&Sr||Ur(n,e,i)}return i}function Ur(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=xr.updateQueue)?(e={lastEffect:null,stores:null},xr.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function Br(t,e,n,r){e.value=n,e.getSnapshot=r,jr(e)&&Vr(t)}function Hr(t,e,n){return n(function(){jr(e)&&Vr(t)})}function jr(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Ye(t,n)}catch(t){return!0}}function Vr(t){var e=Qn(t,1);null!==e&&As(e,t,1,-1)}function Wr(t){var e=Rr();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Lr,lastRenderedState:t},e.queue=t,t=t.dispatch=hi.bind(null,xr,t),[e.memoizedState,t]}function Kr(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=xr.updateQueue)?(e={lastEffect:null,stores:null},xr.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function Yr(){return Dr().memoizedState}function qr(t,e,n,r){var i=Rr();xr.flags|=t,i.memoizedState=Kr(1|e,n,void 0,void 0===r?null:r)}function Xr(t,e,n,r){var i=Dr();r=void 0===r?null:r;var a=void 0;if(null!==wr){var s=wr.memoizedState;if(a=s.destroy,null!==r&&Mr(r,s.deps))return void(i.memoizedState=Kr(e,n,a,r))}xr.flags|=t,i.memoizedState=Kr(1|e,n,a,r)}function Qr(t,e){return qr(8390656,8,t,e)}function $r(t,e){return Xr(2048,8,t,e)}function Jr(t,e){return Xr(4,2,t,e)}function Zr(t,e){return Xr(4,4,t,e)}function ti(t,e){return"function"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function ei(t,e,n){return n=null!=n?n.concat([t]):null,Xr(4,4,ti.bind(null,e,t),n)}function ni(){}function ri(t,e){var n=Dr();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Mr(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function ii(t,e){var n=Dr();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Mr(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function ai(t,e,n){return 21&Sr?(Ye(n,e)||(n=Me(),xr.lanes|=n,cs|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Di=!0),t.memoizedState=n)}function si(t,e){var n=De;De=0!==n&&4>n?n:4,t(!0);var r=_r.transition;_r.transition={};try{t(!1),e()}finally{De=n,_r.transition=r}}function oi(){return Dr().memoizedState}function li(t,e,n){var r=Ns(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ci(t)?ui(e,n):null!==(n=Xn(t,e,n,r))&&(As(n,t,r,Ms()),di(n,e,r))}function hi(t,e,n){var r=Ns(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ci(t))ui(e,i);else{var a=t.alternate;if(0===t.lanes&&(null===a||0===a.lanes)&&null!==(a=e.lastRenderedReducer))try{var s=e.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,Ye(o,s)){var l=e.interleaved;return null===l?(i.next=i,qn(e)):(i.next=l.next,l.next=i),void(e.interleaved=i)}}catch(t){}null!==(n=Xn(t,e,i,r))&&(As(n,t,r,i=Ms()),di(n,e,r))}}function ci(t){var e=t.alternate;return t===xr||null!==e&&e===xr}function ui(t,e){Pr=kr=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function di(t,e,n){if(4194240&n){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,Re(t,n)}}var fi={readContext:Kn,useCallback:Er,useContext:Er,useEffect:Er,useImperativeHandle:Er,useInsertionEffect:Er,useLayoutEffect:Er,useMemo:Er,useReducer:Er,useRef:Er,useState:Er,useDebugValue:Er,useDeferredValue:Er,useTransition:Er,useMutableSource:Er,useSyncExternalStore:Er,useId:Er,unstable_isNewReconciler:!1},gi={readContext:Kn,useCallback:function(t,e){return Rr().memoizedState=[t,void 0===e?null:e],t},useContext:Kn,useEffect:Qr,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,qr(4194308,4,ti.bind(null,e,t),n)},useLayoutEffect:function(t,e){return qr(4194308,4,t,e)},useInsertionEffect:function(t,e){return qr(4,2,t,e)},useMemo:function(t,e){var n=Rr();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Rr();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=li.bind(null,xr,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},Rr().memoizedState=t},useState:Wr,useDebugValue:ni,useDeferredValue:function(t){return Rr().memoizedState=t},useTransition:function(){var t=Wr(!1),e=t[0];return t=si.bind(null,t[1]),Rr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=xr,i=Rr();if(pn){if(void 0===n)throw Error(s(407));n=n()}else{if(n=e(),null===rs)throw Error(s(349));30&Sr||Ur(r,e,n)}i.memoizedState=n;var a={value:n,getSnapshot:e};return i.queue=a,Qr(Hr.bind(null,r,a,t),[t]),r.flags|=2048,Kr(9,Br.bind(null,r,a,n,e),void 0,null),n},useId:function(){var t=Rr(),e=rs.identifierPrefix;if(pn){var n=ln;e=":"+e+"R"+(n=(on&~(1<<32-Se(on)-1)).toString(32)+n),0<(n=Tr++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=Fr++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},pi={readContext:Kn,useCallback:ri,useContext:Kn,useEffect:$r,useImperativeHandle:ei,useInsertionEffect:Jr,useLayoutEffect:Zr,useMemo:ii,useReducer:Ir,useRef:Yr,useState:function(){return Ir(Lr)},useDebugValue:ni,useDeferredValue:function(t){return ai(Dr(),wr.memoizedState,t)},useTransition:function(){return[Ir(Lr)[0],Dr().memoizedState]},useMutableSource:Or,useSyncExternalStore:zr,useId:oi,unstable_isNewReconciler:!1},mi={readContext:Kn,useCallback:ri,useContext:Kn,useEffect:$r,useImperativeHandle:ei,useInsertionEffect:Jr,useLayoutEffect:Zr,useMemo:ii,useReducer:Gr,useRef:Yr,useState:function(){return Gr(Lr)},useDebugValue:ni,useDeferredValue:function(t){var e=Dr();return null===wr?e.memoizedState=t:ai(e,wr.memoizedState,t)},useTransition:function(){return[Gr(Lr)[0],Dr().memoizedState]},useMutableSource:Or,useSyncExternalStore:zr,useId:oi,unstable_isNewReconciler:!1};function yi(t,e){if(t&&t.defaultProps){for(var n in e=a({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}function vi(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:a({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var bi={isMounted:function(t){return!!(t=t._reactInternals)&&k(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Ms(),i=Ns(t),a=tr(r,i);a.payload=e,null!=n&&(a.callback=n),null!==(e=er(t,a,i))&&(As(e,t,i,r),nr(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Ms(),i=Ns(t),a=tr(r,i);a.tag=1,a.payload=e,null!=n&&(a.callback=n),null!==(e=er(t,a,i))&&(As(e,t,i,r),nr(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Ms(),r=Ns(t),i=tr(n,r);i.tag=2,null!=e&&(i.callback=e),null!==(e=er(t,i,r))&&(As(e,t,r,n),nr(e,t,r))}};function _i(t,e,n,r,i,a,s){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,a,s):!(e.prototype&&e.prototype.isPureReactComponent&&En(n,r)&&En(i,a))}function Si(t,e,n){var r=!1,i=ce,a=e.contextType;return"object"==typeof a&&null!==a?a=Kn(a):(i=pe(e)?fe:ue.current,a=(r=null!=(r=e.contextTypes))?ge(t,i):ce),e=new e(n,a),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=bi,t.stateNode=e,e._reactInternals=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function xi(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&bi.enqueueReplaceState(e,e.state,null)}function wi(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},Jn(t);var a=e.contextType;"object"==typeof a&&null!==a?i.context=Kn(a):(a=pe(e)?fe:ue.current,i.context=ge(t,a)),i.state=t.memoizedState,"function"==typeof(a=e.getDerivedStateFromProps)&&(vi(t,e,a,n),i.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(e=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&bi.enqueueReplaceState(i,i.state,null),ir(t,n,i,r),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308)}function Ci(t,e){try{var n="",r=e;do{n+=Mn(r),r=r.return}while(r);var i=n}catch(t){i="\nError generating stack: "+t.message+"\n"+t.stack}return{value:t,source:e,stack:i,digest:null}}function ki(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}function Pi(t,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var Ti="function"==typeof WeakMap?WeakMap:Map;function Fi(t,e,n){(n=tr(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){_s||(_s=!0,Ss=r),Pi(0,e)},n}function Ei(t,e,n){(n=tr(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Pi(0,e)}}var a=t.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){Pi(0,e),"function"!=typeof r&&(null===xs?xs=new Set([this]):xs.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function Mi(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new Ti;var i=new Set;r.set(e,i)}else void 0===(i=r.get(e))&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=to.bind(null,t,e,n),e.then(t,t))}function Ni(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function Ai(t,e,n,r,i){return 1&t.mode?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=tr(-1,1)).tag=2,er(n,e,1))),n.lanes|=1),t)}var Ri=o.ReactCurrentOwner,Di=!1;function Li(t,e,n,r){e.child=null===t?In(e,null,n,r):Ln(e,t.child,n,r)}function Ii(t,e,n,r,i){n=n.render;var a=e.ref;return Wn(e,i),r=Nr(t,e,n,r,a,i),n=Ar(),null===t||Di?(pn&&n&&un(e),e.flags|=1,Li(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,aa(t,e,i))}function Gi(t,e,n,r,i){if(null===t){var a=n.type;return"function"!=typeof a||oo(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=ho(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Oi(t,e,a,r,i))}if(a=t.child,0===(t.lanes&i)){var s=a.memoizedProps;if((n=null!==(n=n.compare)?n:En)(s,r)&&t.ref===e.ref)return aa(t,e,i)}return e.flags|=1,(t=lo(a,r)).ref=e.ref,t.return=e,e.child=t}function Oi(t,e,n,r,i){if(null!==t){var a=t.memoizedProps;if(En(a,r)&&t.ref===e.ref){if(Di=!1,e.pendingProps=r=a,0===(t.lanes&i))return e.lanes=t.lanes,aa(t,e,i);131072&t.flags&&(Di=!0)}}return Bi(t,e,n,r,i)}function zi(t,e,n){var r=e.pendingProps,i=r.children,a=null!==t?t.memoizedState:null;if("hidden"===r.mode)if(1&e.mode){if(!(1073741824&n))return t=null!==a?a.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,he(os,ss),ss|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,he(os,ss),ss|=r}else e.memoizedState={baseLanes:0,cachePool:null,transitions:null},he(os,ss),ss|=n;else null!==a?(r=a.baseLanes|n,e.memoizedState=null):r=n,he(os,ss),ss|=r;return Li(t,e,i,n),e.child}function Ui(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Bi(t,e,n,r,i){var a=pe(n)?fe:ue.current;return a=ge(e,a),Wn(e,i),n=Nr(t,e,n,r,a,i),r=Ar(),null===t||Di?(pn&&r&&un(e),e.flags|=1,Li(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,aa(t,e,i))}function Hi(t,e,n,r,i){if(pe(n)){var a=!0;be(e)}else a=!1;if(Wn(e,i),null===e.stateNode)ia(t,e),Si(e,n,r),wi(e,n,r,i),r=!0;else if(null===t){var s=e.stateNode,o=e.memoizedProps;s.props=o;var l=s.context,h=n.contextType;h="object"==typeof h&&null!==h?Kn(h):ge(e,h=pe(n)?fe:ue.current);var c=n.getDerivedStateFromProps,u="function"==typeof c||"function"==typeof s.getSnapshotBeforeUpdate;u||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==r||l!==h)&&xi(e,s,r,h),$n=!1;var d=e.memoizedState;s.state=d,ir(e,r,s,i),l=e.memoizedState,o!==r||d!==l||de.current||$n?("function"==typeof c&&(vi(e,n,c,r),l=e.memoizedState),(o=$n||_i(e,n,o,r,d,l,h))?(u||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(e.flags|=4194308)):("function"==typeof s.componentDidMount&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),s.props=r,s.state=l,s.context=h,r=o):("function"==typeof s.componentDidMount&&(e.flags|=4194308),r=!1)}else{s=e.stateNode,Zn(t,e),o=e.memoizedProps,h=e.type===e.elementType?o:yi(e.type,o),s.props=h,u=e.pendingProps,d=s.context,l="object"==typeof(l=n.contextType)&&null!==l?Kn(l):ge(e,l=pe(n)?fe:ue.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==u||d!==l)&&xi(e,s,r,l),$n=!1,d=e.memoizedState,s.state=d,ir(e,r,s,i);var g=e.memoizedState;o!==u||d!==g||de.current||$n?("function"==typeof f&&(vi(e,n,f,r),g=e.memoizedState),(h=$n||_i(e,n,h,r,d,g,l)||!1)?(c||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,g,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,g,l)),"function"==typeof s.componentDidUpdate&&(e.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof s.componentDidUpdate||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),s.props=r,s.state=g,s.context=l,r=h):("function"!=typeof s.componentDidUpdate||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return ji(t,e,n,r,a,i)}function ji(t,e,n,r,i,a){Ui(t,e);var s=!!(128&e.flags);if(!r&&!s)return i&&_e(e,n,!1),aa(t,e,a);r=e.stateNode,Ri.current=e;var o=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&s?(e.child=Ln(e,t.child,null,a),e.child=Ln(e,null,o,a)):Li(t,e,o,a),e.memoizedState=r.state,i&&_e(e,n,!0),e.child}function Vi(t){var e=t.stateNode;e.pendingContext?ye(0,e.pendingContext,e.pendingContext!==e.context):e.context&&ye(0,e.context,!1),ur(t,e.containerInfo)}function Wi(t,e,n,r,i){return Pn(),Tn(i),e.flags|=256,Li(t,e,n,r),e.child}var Ki,Yi,qi,Xi,Qi={dehydrated:null,treeContext:null,retryLane:0};function $i(t){return{baseLanes:t,cachePool:null,transitions:null}}function Ji(t,e,n){var r,i=e.pendingProps,a=pr.current,o=!1,l=!!(128&e.flags);if((r=l)||(r=(null===t||null!==t.memoizedState)&&!!(2&a)),r?(o=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(a|=1),he(pr,1&a),null===t)return xn(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(1&e.mode?Gt(t)?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(l=i.children,t=i.fallback,o?(i=e.mode,o=e.child,l={mode:"hidden",children:l},1&i||null===o?o=uo(l,i,0,null):(o.childLanes=0,o.pendingProps=l),t=co(t,i,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=$i(n),e.memoizedState=Qi,t):Zi(e,l));if(null!==(a=t.memoizedState)&&null!==(r=a.dehydrated))return function(t,e,n,r,i,a,o){if(n)return 256&e.flags?(e.flags&=-257,ta(t,e,o,r=ki(Error(s(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(a=r.fallback,i=e.mode,r=uo({mode:"visible",children:r.children},i,0,null),(a=co(a,i,o,null)).flags|=2,r.return=e,a.return=e,r.sibling=a,e.child=r,1&e.mode&&Ln(e,t.child,null,o),e.child.memoizedState=$i(o),e.memoizedState=Qi,a);if(!(1&e.mode))return ta(t,e,o,null);if(Gt(i))return r=Ot(i).digest,ta(t,e,o,r=ki(a=Error(s(419)),r,void 0));if(n=0!==(o&t.childLanes),Di||n){if(null!==(r=rs)){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|o))?0:i)&&i!==a.retryLane&&(a.retryLane=i,Qn(t,i),As(r,t,i,-1))}return Vs(),ta(t,e,o,r=ki(Error(s(421))))}return It(i)?(e.flags|=128,e.child=t.child,e=no.bind(null,t),zt(i,e),null):(t=a.treeContext,Q&&(gn=jt(i),fn=e,pn=!0,yn=null,mn=!1,null!==t&&(rn[an++]=on,rn[an++]=ln,rn[an++]=sn,on=t.id,ln=t.overflow,sn=e)),(e=Zi(e,r.children)).flags|=4096,e)}(t,e,l,i,r,a,n);if(o){o=i.fallback,l=e.mode,r=(a=t.child).sibling;var h={mode:"hidden",children:i.children};return 1&l||e.child===a?(i=lo(a,h)).subtreeFlags=14680064&a.subtreeFlags:((i=e.child).childLanes=0,i.pendingProps=h,e.deletions=null),null!==r?o=lo(r,o):(o=co(o,l,n,null)).flags|=2,o.return=e,i.return=e,i.sibling=o,e.child=i,i=o,o=e.child,l=null===(l=t.child.memoizedState)?$i(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=t.childLanes&~n,e.memoizedState=Qi,i}return t=(o=t.child).sibling,i=lo(o,{mode:"visible",children:i.children}),!(1&e.mode)&&(i.lanes=n),i.return=e,i.sibling=null,null!==t&&(null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function Zi(t,e){return(e=uo({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function ta(t,e,n,r){return null!==r&&Tn(r),Ln(e,t.child,null,n),(t=Zi(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function ea(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),Vn(t.return,e,n)}function na(t,e,n,r,i){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ra(t,e,n){var r=e.pendingProps,i=r.revealOrder,a=r.tail;if(Li(t,e,r.children,n),2&(r=pr.current))r=1&r|2,e.flags|=128;else{if(null!==t&&128&t.flags)t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&ea(t,n,e);else if(19===t.tag)ea(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(he(pr,r),1&e.mode)switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===mr(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),na(e,!1,i,n,a);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===mr(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}na(e,!0,n,null,a);break;case"together":na(e,!1,null,null,void 0);break;default:e.memoizedState=null}else e.memoizedState=null;return e.child}function ia(t,e){!(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function aa(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),cs|=e.lanes,0===(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(s(153));if(null!==e.child){for(n=lo(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=lo(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function sa(t){t.flags|=4}function oa(t,e){if(null!==t&&t.child===e.child)return!0;if(16&e.flags)return!1;for(t=e.child;null!==t;){if(12854&t.flags||12854&t.subtreeFlags)return!1;t=t.sibling}return!0}if(q)Ki=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)z(t,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Yi=function(){},qi=function(t,e,n,r,i){if((t=t.memoizedProps)!==r){var a=e.stateNode,s=cr(or.current);n=B(a,n,t,r,i,s),(e.updateQueue=n)&&sa(e)}},Xi=function(t,e,n,r){n!==r&&sa(e)};else if(X){Ki=function(t,e,n,r){for(var i=e.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Nt(a,i.type,i.memoizedProps,i)),z(t,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=At(a,i.memoizedProps,i)),z(t,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),Ki(t,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var la=function(t,e,n,r){for(var i=e.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Nt(a,i.type,i.memoizedProps,i)),Ft(t,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=At(a,i.memoizedProps,i)),Ft(t,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),la(t,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};Yi=function(t,e){var n=e.stateNode;if(!oa(t,e)){t=n.containerInfo;var r=Tt(t);la(r,e,!1,!1),n.pendingChildren=r,sa(e),Et(t,r)}},qi=function(t,e,n,r,i){var a=t.stateNode,s=t.memoizedProps;if((t=oa(t,e))&&s===r)e.stateNode=a;else{var o=e.stateNode,l=cr(or.current),h=null;s!==r&&(h=B(o,n,s,r,i,l)),t&&null===h?e.stateNode=a:(a=Pt(a,h,n,s,r,e,t,o),U(a,n,r,i,l)&&sa(e),e.stateNode=a,t?sa(e):Ki(a,e,!1,!1))}},Xi=function(t,e,n,r){n!==r?(t=cr(hr.current),n=cr(or.current),e.stateNode=j(r,t,n,e),sa(e)):e.stateNode=t.stateNode}}else Yi=function(){},qi=function(){},Xi=function(){};function ha(t,e){if(!pn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function ca(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=t,i=i.sibling;else for(i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function ua(t,e,n){var r=e.pendingProps;switch(dn(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ca(e),null;case 1:case 17:return pe(e.type)&&me(),ca(e),null;case 3:return n=e.stateNode,dr(),le(de),le(ue),vr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||(Cn(e)?sa(e):null===t||t.memoizedState.isDehydrated&&!(256&e.flags)||(e.flags|=1024,null!==yn&&(Is(yn),yn=null))),Yi(t,e),ca(e),null;case 5:gr(e),n=cr(hr.current);var i=e.type;if(null!==t&&null!=e.stateNode)qi(t,e,i,r,n),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(null===e.stateNode)throw Error(s(166));return ca(e),null}if(t=cr(or.current),Cn(e)){if(!Q)throw Error(s(175));t=Vt(e.stateNode,e.type,e.memoizedProps,n,t,e,!mn),e.updateQueue=t,null!==t&&sa(e)}else{var a=O(i,r,n,t,e);Ki(a,e,!1,!1),e.stateNode=a,U(a,i,r,n,t)&&sa(e)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return ca(e),null;case 6:if(t&&null!=e.stateNode)Xi(t,e,t.memoizedProps,r);else{if("string"!=typeof r&&null===e.stateNode)throw Error(s(166));if(t=cr(hr.current),n=cr(or.current),Cn(e)){if(!Q)throw Error(s(176));if(t=e.stateNode,n=e.memoizedProps,(r=Wt(t,n,e,!mn))&&null!==(i=fn))switch(i.tag){case 3:Zt(i.stateNode.containerInfo,t,n,!!(1&i.mode));break;case 5:te(i.type,i.memoizedProps,i.stateNode,t,n,!!(1&i.mode))}r&&sa(e)}else e.stateNode=j(r,t,n,e)}return ca(e),null;case 13:if(le(pr),r=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(pn&&null!==gn&&1&e.mode&&!(128&e.flags))kn(),Pn(),e.flags|=98560,i=!1;else if(i=Cn(e),null!==r&&null!==r.dehydrated){if(null===t){if(!i)throw Error(s(318));if(!Q)throw Error(s(344));if(!(i=null!==(i=e.memoizedState)?i.dehydrated:null))throw Error(s(317));Kt(i,e)}else Pn(),!(128&e.flags)&&(e.memoizedState=null),e.flags|=4;ca(e),i=!1}else null!==yn&&(Is(yn),yn=null),i=!0;if(!i)return 65536&e.flags?e:null}return 128&e.flags?(e.lanes=n,e):((n=null!==r)!=(null!==t&&null!==t.memoizedState)&&n&&(e.child.flags|=8192,1&e.mode&&(null===t||1&pr.current?0===ls&&(ls=3):Vs())),null!==e.updateQueue&&(e.flags|=4),ca(e),null);case 4:return dr(),Yi(t,e),null===t&&J(e.stateNode.containerInfo),ca(e),null;case 10:return jn(e.type._context),ca(e),null;case 19:if(le(pr),null===(i=e.memoizedState))return ca(e),null;if(r=!!(128&e.flags),null===(a=i.rendering))if(r)ha(i,!1);else{if(0!==ls||null!==t&&128&t.flags)for(t=e.child;null!==t;){if(null!==(a=mr(t))){for(e.flags|=128,ha(i,!1),null!==(t=a.updateQueue)&&(e.updateQueue=t,e.flags|=4),e.subtreeFlags=0,t=n,n=e.child;null!==n;)i=t,(r=n).flags&=14680066,null===(a=r.alternate)?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=a.childLanes,r.lanes=a.lanes,r.child=a.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=a.memoizedProps,r.memoizedState=a.memoizedState,r.updateQueue=a.updateQueue,r.type=a.type,i=a.dependencies,r.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext}),n=n.sibling;return he(pr,1&pr.current|2),e.child}t=t.sibling}null!==i.tail&&Ue()>ms&&(e.flags|=128,r=!0,ha(i,!1),e.lanes=4194304)}else{if(!r)if(null!==(t=mr(a))){if(e.flags|=128,r=!0,null!==(t=t.updateQueue)&&(e.updateQueue=t,e.flags|=4),ha(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!pn)return ca(e),null}else 2*Ue()-i.renderingStartTime>ms&&1073741824!==n&&(e.flags|=128,r=!0,ha(i,!1),e.lanes=4194304);i.isBackwards?(a.sibling=e.child,e.child=a):(null!==(t=i.last)?t.sibling=a:e.child=a,i.last=a)}return null!==i.tail?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ue(),e.sibling=null,t=pr.current,he(pr,r?1&t|2:1&t),e):(ca(e),null);case 22:case 23:return Us(),n=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==n&&(e.flags|=8192),n&&1&e.mode?!!(1073741824&ss)&&(ca(e),q&&6&e.subtreeFlags&&(e.flags|=8192)):ca(e),null;case 24:case 25:return null}throw Error(s(156,e.tag))}function da(t,e){switch(dn(e),e.tag){case 1:return pe(e.type)&&me(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return dr(),le(de),le(ue),vr(),65536&(t=e.flags)&&!(128&t)?(e.flags=-65537&t|128,e):null;case 5:return gr(e),null;case 13:if(le(pr),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(s(340));Pn()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return le(pr),null;case 4:return dr(),null;case 10:return jn(e.type._context),null;case 22:case 23:return Us(),null;default:return null}}var fa=!1,ga=!1,pa="function"==typeof WeakSet?WeakSet:Set,ma=null;function ya(t,e){var n=t.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Zs(t,e,n)}else n.current=null}function va(t,e,n){try{n()}catch(n){Zs(t,e,n)}}var ba=!1;function _a(t,e,n){var r=e.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,void 0!==a&&va(e,n,a)}i=i.next}while(i!==r)}}function Sa(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function xa(t){var e=t.ref;if(null!==e){var n=t.stateNode;t=5===t.tag?R(n):n,"function"==typeof e?e(t):e.current=t}}function wa(t){var e=t.alternate;null!==e&&(t.alternate=null,wa(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(e=t.stateNode)&&tt(e),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Ca(t){return 5===t.tag||3===t.tag||4===t.tag}function ka(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||Ca(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function Pa(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?yt(n,t,e):dt(n,t);else if(4!==r&&null!==(t=t.child))for(Pa(t,e,n),t=t.sibling;null!==t;)Pa(t,e,n),t=t.sibling}function Ta(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?mt(n,t,e):ut(n,t);else if(4!==r&&null!==(t=t.child))for(Ta(t,e,n),t=t.sibling;null!==t;)Ta(t,e,n),t=t.sibling}var Fa=null,Ea=!1;function Ma(t,e,n){for(n=n.child;null!==n;)Na(t,e,n),n=n.sibling}function Na(t,e,n){if(Ke&&"function"==typeof Ke.onCommitFiberUnmount)try{Ke.onCommitFiberUnmount(We,n)}catch(t){}switch(n.tag){case 5:ga||ya(n,e);case 6:if(q){var r=Fa,i=Ea;Fa=null,Ma(t,e,n),Ea=i,null!==(Fa=r)&&(Ea?bt(Fa,n.stateNode):vt(Fa,n.stateNode))}else Ma(t,e,n);break;case 18:q&&null!==Fa&&(Ea?$t(Fa,n.stateNode):Qt(Fa,n.stateNode));break;case 4:q?(r=Fa,i=Ea,Fa=n.stateNode.containerInfo,Ea=!0,Ma(t,e,n),Fa=r,Ea=i):(X&&(r=n.stateNode.containerInfo,i=Tt(r),Mt(r,i)),Ma(t,e,n));break;case 0:case 11:case 14:case 15:if(!ga&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,void 0!==s&&(2&a||4&a)&&va(n,e,s),i=i.next}while(i!==r)}Ma(t,e,n);break;case 1:if(!ga&&(ya(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){Zs(n,e,t)}Ma(t,e,n);break;case 21:Ma(t,e,n);break;case 22:1&n.mode?(ga=(r=ga)||null!==n.memoizedState,Ma(t,e,n),ga=r):Ma(t,e,n);break;default:Ma(t,e,n)}}function Aa(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new pa),e.forEach(function(e){var r=ro.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))})}}function Ra(t,e){var n=e.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=t,o=e;if(q){var l=o;t:for(;null!==l;){switch(l.tag){case 5:Fa=l.stateNode,Ea=!1;break t;case 3:case 4:Fa=l.stateNode.containerInfo,Ea=!0;break t}l=l.return}if(null===Fa)throw Error(s(160));Na(a,o,i),Fa=null,Ea=!1}else Na(a,o,i);var h=i.alternate;null!==h&&(h.return=null),i.return=null}catch(t){Zs(i,e,t)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)Da(e,t),e=e.sibling}function Da(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ra(e,t),La(t),4&r){try{_a(3,t,t.return),Sa(3,t)}catch(e){Zs(t,t.return,e)}try{_a(5,t,t.return)}catch(e){Zs(t,t.return,e)}}break;case 1:Ra(e,t),La(t),512&r&&null!==n&&ya(n,n.return);break;case 5:if(Ra(e,t),La(t),512&r&&null!==n&&ya(n,n.return),q){if(32&t.flags){var i=t.stateNode;try{_t(i)}catch(e){Zs(t,t.return,e)}}if(4&r&&null!=(i=t.stateNode)){var a=t.memoizedProps;if(n=null!==n?n.memoizedProps:a,r=t.type,e=t.updateQueue,t.updateQueue=null,null!==e)try{pt(i,e,r,n,a,t)}catch(e){Zs(t,t.return,e)}}}break;case 6:if(Ra(e,t),La(t),4&r&&q){if(null===t.stateNode)throw Error(s(162));i=t.stateNode,a=t.memoizedProps,n=null!==n?n.memoizedProps:a;try{ft(i,n,a)}catch(e){Zs(t,t.return,e)}}break;case 3:if(Ra(e,t),La(t),4&r){if(q&&Q&&null!==n&&n.memoizedState.isDehydrated)try{qt(e.containerInfo)}catch(e){Zs(t,t.return,e)}if(X){i=e.containerInfo,a=e.pendingChildren;try{Mt(i,a)}catch(e){Zs(t,t.return,e)}}}break;case 4:if(Ra(e,t),La(t),4&r&&X){i=(a=t.stateNode).containerInfo,a=a.pendingChildren;try{Mt(i,a)}catch(e){Zs(t,t.return,e)}}break;case 13:Ra(e,t),La(t),8192&(i=t.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(ps=Ue())),4&r&&Aa(t);break;case 22:var o=null!==n&&null!==n.memoizedState;if(1&t.mode?(ga=(n=ga)||o,Ra(e,t),ga=n):Ra(e,t),La(t),8192&r){if(n=null!==t.memoizedState,(t.stateNode.isHidden=n)&&!o&&1&t.mode)for(ma=t,r=t.child;null!==r;){for(e=ma=r;null!==ma;){var l=(o=ma).child;switch(o.tag){case 0:case 11:case 14:case 15:_a(4,o,o.return);break;case 1:ya(o,o.return);var h=o.stateNode;if("function"==typeof h.componentWillUnmount){var c=o,u=o.return;try{var d=c;h.props=d.memoizedProps,h.state=d.memoizedState,h.componentWillUnmount()}catch(t){Zs(c,u,t)}}break;case 5:ya(o,o.return);break;case 22:if(null!==o.memoizedState){za(e);continue}}null!==l?(l.return=o,ma=l):za(e)}r=r.sibling}if(q)t:if(r=null,q)for(e=t;;){if(5===e.tag){if(null===r){r=e;try{i=e.stateNode,n?St(i):wt(e.stateNode,e.memoizedProps)}catch(e){Zs(t,t.return,e)}}}else if(6===e.tag){if(null===r)try{a=e.stateNode,n?xt(a):Ct(a,e.memoizedProps)}catch(e){Zs(t,t.return,e)}}else if((22!==e.tag&&23!==e.tag||null===e.memoizedState||e===t)&&null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;null===e.sibling;){if(null===e.return||e.return===t)break t;r===e&&(r=null),e=e.return}r===e&&(r=null),e.sibling.return=e.return,e=e.sibling}}break;case 19:Ra(e,t),La(t),4&r&&Aa(t);break;case 21:break;default:Ra(e,t),La(t)}}function La(t){var e=t.flags;if(2&e){try{if(q){t:{for(var n=t.return;null!==n;){if(Ca(n)){var r=n;break t}n=n.return}throw Error(s(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(_t(i),r.flags&=-33),Ta(t,ka(t),i);break;case 3:case 4:var a=r.stateNode.containerInfo;Pa(t,ka(t),a);break;default:throw Error(s(161))}}}catch(e){Zs(t,t.return,e)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function Ia(t,e,n){ma=t,Ga(t,e,n)}function Ga(t,e,n){for(var r=!!(1&t.mode);null!==ma;){var i=ma,a=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||fa;if(!s){var o=i.alternate,l=null!==o&&null!==o.memoizedState||ga;o=fa;var h=ga;if(fa=s,(ga=l)&&!h)for(ma=i;null!==ma;)l=(s=ma).child,22===s.tag&&null!==s.memoizedState?Ua(i):null!==l?(l.return=s,ma=l):Ua(i);for(;null!==a;)ma=a,Ga(a,e,n),a=a.sibling;ma=i,fa=o,ga=h}Oa(t)}else 8772&i.subtreeFlags&&null!==a?(a.return=i,ma=a):Oa(t)}}function Oa(t){for(;null!==ma;){var e=ma;if(8772&e.flags){var n=e.alternate;try{if(8772&e.flags)switch(e.tag){case 0:case 11:case 15:ga||Sa(5,e);break;case 1:var r=e.stateNode;if(4&e.flags&&!ga)if(null===n)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:yi(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=e.updateQueue;null!==a&&ar(e,a,r);break;case 3:var o=e.updateQueue;if(null!==o){if(n=null,null!==e.child)switch(e.child.tag){case 5:n=R(e.child.stateNode);break;case 1:n=e.child.stateNode}ar(e,o,n)}break;case 5:var l=e.stateNode;null===n&&4&e.flags&>(l,e.type,e.memoizedProps,e);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(Q&&null===e.memoizedState){var h=e.alternate;if(null!==h){var c=h.memoizedState;if(null!==c){var u=c.dehydrated;null!==u&&Xt(u)}}}break;default:throw Error(s(163))}ga||512&e.flags&&xa(e)}catch(t){Zs(e,e.return,t)}}if(e===t){ma=null;break}if(null!==(n=e.sibling)){n.return=e.return,ma=n;break}ma=e.return}}function za(t){for(;null!==ma;){var e=ma;if(e===t){ma=null;break}var n=e.sibling;if(null!==n){n.return=e.return,ma=n;break}ma=e.return}}function Ua(t){for(;null!==ma;){var e=ma;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Sa(4,e)}catch(t){Zs(e,n,t)}break;case 1:var r=e.stateNode;if("function"==typeof r.componentDidMount){var i=e.return;try{r.componentDidMount()}catch(t){Zs(e,i,t)}}var a=e.return;try{xa(e)}catch(t){Zs(e,a,t)}break;case 5:var s=e.return;try{xa(e)}catch(t){Zs(e,s,t)}}}catch(t){Zs(e,e.return,t)}if(e===t){ma=null;break}var o=e.sibling;if(null!==o){o.return=e.return,ma=o;break}ma=e.return}}var Ba=0,Ha=1,ja=2,Va=3,Wa=4;if("function"==typeof Symbol&&Symbol.for){var Ka=Symbol.for;Ba=Ka("selector.component"),Ha=Ka("selector.has_pseudo_class"),ja=Ka("selector.role"),Va=Ka("selector.test_id"),Wa=Ka("selector.text")}function Ya(t){var e=$(t);if(null!=e){if("string"!=typeof e.memoizedProps["data-testname"])throw Error(s(364));return e}if(null===(t=it(t)))throw Error(s(362));return t.stateNode.current}function qa(t,e){switch(e.$$typeof){case Ba:if(t.type===e.value)return!0;break;case Ha:t:{e=e.value,t=[t,0];for(var n=0;n<t.length;){var r=t[n++],i=t[n++],a=e[i];if(5!==r.tag||!ot(r)){for(;null!=a&&qa(r,a);)a=e[++i];if(i===e.length){e=!0;break t}for(r=r.child;null!==r;)t.push(r,i),r=r.sibling}}e=!1}return e;case ja:if(5===t.tag&<(t.stateNode,e.value))return!0;break;case Wa:if((5===t.tag||6===t.tag)&&null!==(t=st(t))&&0<=t.indexOf(e.value))return!0;break;case Va:if(5===t.tag&&"string"==typeof(t=t.memoizedProps["data-testname"])&&t.toLowerCase()===e.value.toLowerCase())return!0;break;default:throw Error(s(365))}return!1}function Xa(t){switch(t.$$typeof){case Ba:return"<"+(w(t.value)||"Unknown")+">";case Ha:return":has("+(Xa(t)||"")+")";case ja:return'[role="'+t.value+'"]';case Wa:return'"'+t.value+'"';case Va:return'[data-testname="'+t.value+'"]';default:throw Error(s(365))}}function Qa(t,e){var n=[];t=[t,0];for(var r=0;r<t.length;){var i=t[r++],a=t[r++],s=e[a];if(5!==i.tag||!ot(i)){for(;null!=s&&qa(i,s);)s=e[++a];if(a===e.length)n.push(i);else for(i=i.child;null!==i;)t.push(i,a),i=i.sibling}}return n}function $a(t,e){if(!rt)throw Error(s(363));t=Qa(t=Ya(t),e),e=[],t=Array.from(t);for(var n=0;n<t.length;){var r=t[n++];if(5===r.tag)ot(r)||e.push(r.stateNode);else for(r=r.child;null!==r;)t.push(r),r=r.sibling}return e}var Ja=Math.ceil,Za=o.ReactCurrentDispatcher,ts=o.ReactCurrentOwner,es=o.ReactCurrentBatchConfig,ns=0,rs=null,is=null,as=0,ss=0,os=oe(0),ls=0,hs=null,cs=0,us=0,ds=0,fs=null,gs=null,ps=0,ms=1/0,ys=null;function vs(){ms=Ue()+500}var bs,_s=!1,Ss=null,xs=null,ws=!1,Cs=null,ks=0,Ps=0,Ts=null,Fs=-1,Es=0;function Ms(){return 6&ns?Ue():-1!==Fs?Fs:Fs=Ue()}function Ns(t){return 1&t.mode?2&ns&&0!==as?as&-as:null!==Fn.transition?(0===Es&&(Es=Me()),Es):0!==(t=De)?t:Z():1}function As(t,e,n,r){if(50<Ps)throw Ps=0,Ts=null,Error(s(185));Ae(t,n,r),2&ns&&t===rs||(t===rs&&(!(2&ns)&&(us|=n),4===ls&&Gs(t,as)),Rs(t,r),1===n&&0===ns&&!(1&e.mode)&&(vs(),Xe&&Je()))}function Rs(t,e){var n=t.callbackNode;!function(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,a=t.pendingLanes;0<a;){var s=31-Se(a),o=1<<s,l=i[s];-1===l?0!==(o&n)&&0===(o&r)||(i[s]=Fe(o,e)):l<=e&&(t.expiredLanes|=o),a&=~o}}(t,e);var r=Te(t,t===rs?as:0);if(0===r)null!==n&&Ge(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(null!=n&&Ge(n),1===e)0===t.tag?function(t){Xe=!0,$e(t)}(Os.bind(null,t)):$e(Os.bind(null,t)),et?nt(function(){!(6&ns)&&Je()}):Ie(Be,Je),n=null;else{switch(Le(r)){case 1:n=Be;break;case 4:n=He;break;case 16:default:n=je;break;case 536870912:n=Ve}n=io(n,Ds.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Ds(t,e){if(Fs=-1,Es=0,6&ns)throw Error(s(327));var n=t.callbackNode;if($s()&&t.callbackNode!==n)return null;var r=Te(t,t===rs?as:0);if(0===r)return null;if(30&r||0!==(r&t.expiredLanes)||e)e=Ws(t,r);else{e=r;var i=ns;ns|=2;var a=js();for(rs===t&&as===e||(ys=null,vs(),Bs(t,e));;)try{Ys();break}catch(e){Hs(t,e)}Bn(),Za.current=a,ns=i,null!==is?e=0:(rs=null,as=0,e=ls)}if(0!==e){if(2===e&&0!==(i=Ee(t))&&(r=i,e=Ls(t,i)),1===e)throw n=hs,Bs(t,0),Gs(t,r),Rs(t,Ue()),n;if(6===e)Gs(t,r);else{if(i=t.current.alternate,!(30&r||function(t){for(var e=t;;){if(16384&e.flags){var n=e.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Ye(a(),i))return!1}catch(t){return!1}}}if(n=e.child,16384&e.subtreeFlags&&null!==n)n.return=e,e=n;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}(i)||(e=Ws(t,r),2===e&&(a=Ee(t),0!==a&&(r=a,e=Ls(t,a))),1!==e)))throw n=hs,Bs(t,0),Gs(t,r),Rs(t,Ue()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(s(345));case 2:case 5:Qs(t,gs,ys);break;case 3:if(Gs(t,r),(130023424&r)===r&&10<(e=ps+500-Ue())){if(0!==Te(t,0))break;if(((i=t.suspendedLanes)&r)!==r){Ms(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=V(Qs.bind(null,t,gs,ys),e);break}Qs(t,gs,ys);break;case 4:if(Gs(t,r),(4194240&r)===r)break;for(e=t.eventTimes,i=-1;0<r;){var o=31-Se(r);a=1<<o,(o=e[o])>i&&(i=o),r&=~a}if(r=i,10<(r=(120>(r=Ue()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ja(r/1960))-r)){t.timeoutHandle=V(Qs.bind(null,t,gs,ys),r);break}Qs(t,gs,ys);break;default:throw Error(s(329))}}}return Rs(t,Ue()),t.callbackNode===n?Ds.bind(null,t):null}function Ls(t,e){var n=fs;return t.current.memoizedState.isDehydrated&&(Bs(t,e).flags|=256),2!==(t=Ws(t,e))&&(e=gs,gs=n,null!==e&&Is(e)),t}function Is(t){null===gs?gs=t:gs.push.apply(gs,t)}function Gs(t,e){for(e&=~ds,e&=~us,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-Se(e),r=1<<n;t[n]=-1,e&=~r}}function Os(t){if(6&ns)throw Error(s(327));$s();var e=Te(t,0);if(!(1&e))return Rs(t,Ue()),null;var n=Ws(t,e);if(0!==t.tag&&2===n){var r=Ee(t);0!==r&&(e=r,n=Ls(t,r))}if(1===n)throw n=hs,Bs(t,0),Gs(t,e),Rs(t,Ue()),n;if(6===n)throw Error(s(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Qs(t,gs,ys),Rs(t,Ue()),null}function zs(t){null!==Cs&&0===Cs.tag&&!(6&ns)&&$s();var e=ns;ns|=1;var n=es.transition,r=De;try{if(es.transition=null,De=1,t)return t()}finally{De=r,es.transition=n,!(6&(ns=e))&&Je()}}function Us(){ss=os.current,le(os)}function Bs(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==K&&(t.timeoutHandle=K,W(n)),null!==is)for(n=is.return;null!==n;){var r=n;switch(dn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&me();break;case 3:dr(),le(de),le(ue),vr();break;case 5:gr(r);break;case 4:dr();break;case 13:case 19:le(pr);break;case 10:jn(r.type._context);break;case 22:case 23:Us()}n=n.return}if(rs=t,is=t=lo(t.current,null),as=ss=e,ls=0,hs=null,ds=us=cs=0,gs=fs=null,null!==Yn){for(e=0;e<Yn.length;e++)if(null!==(r=(n=Yn[e]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var s=a.next;a.next=i,r.next=s}n.pending=r}Yn=null}return t}function Hs(t,e){for(;;){var n=is;try{if(Bn(),br.current=fi,kr){for(var r=xr.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}kr=!1}if(Sr=0,Cr=wr=xr=null,Pr=!1,Tr=0,ts.current=null,null===n||null===n.return){ls=1,hs=e,is=null;break}t:{var a=t,o=n.return,l=n,h=e;if(e=as,l.flags|=32768,null!==h&&"object"==typeof h&&"function"==typeof h.then){var c=h,u=l,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var g=Ni(o);if(null!==g){g.flags&=-257,Ai(g,o,l,0,e),1&g.mode&&Mi(a,c,e),h=c;var p=(e=g).updateQueue;if(null===p){var m=new Set;m.add(h),e.updateQueue=m}else p.add(h);break t}if(!(1&e)){Mi(a,c,e),Vs();break t}h=Error(s(426))}else if(pn&&1&l.mode){var y=Ni(o);if(null!==y){!(65536&y.flags)&&(y.flags|=256),Ai(y,o,l,0,e),Tn(Ci(h,l));break t}}a=h=Ci(h,l),4!==ls&&(ls=2),null===fs?fs=[a]:fs.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,e&=-e,a.lanes|=e,rr(a,Fi(0,h,e));break t;case 1:l=h;var v=a.type,b=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===b||"function"!=typeof b.componentDidCatch||null!==xs&&xs.has(b)))){a.flags|=65536,e&=-e,a.lanes|=e,rr(a,Ei(a,l,e));break t}}a=a.return}while(null!==a)}Xs(n)}catch(t){e=t,is===n&&null!==n&&(is=n=n.return);continue}break}}function js(){var t=Za.current;return Za.current=fi,null===t?fi:t}function Vs(){0!==ls&&3!==ls&&2!==ls||(ls=4),null===rs||!(268435455&cs)&&!(268435455&us)||Gs(rs,as)}function Ws(t,e){var n=ns;ns|=2;var r=js();for(rs===t&&as===e||(ys=null,Bs(t,e));;)try{Ks();break}catch(e){Hs(t,e)}if(Bn(),ns=n,Za.current=r,null!==is)throw Error(s(261));return rs=null,as=0,ls}function Ks(){for(;null!==is;)qs(is)}function Ys(){for(;null!==is&&!Oe();)qs(is)}function qs(t){var e=bs(t.alternate,t,ss);t.memoizedProps=t.pendingProps,null===e?Xs(t):is=e,ts.current=null}function Xs(t){var e=t;do{var n=e.alternate;if(t=e.return,32768&e.flags){if(null!==(n=da(n,e)))return n.flags&=32767,void(is=n);if(null===t)return ls=6,void(is=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}else if(null!==(n=ua(n,e,ss)))return void(is=n);if(null!==(e=e.sibling))return void(is=e);is=e=t}while(null!==e);0===ls&&(ls=5)}function Qs(t,e,n){var r=De,i=es.transition;try{es.transition=null,De=1,function(t,e,n,r){do{$s()}while(null!==Cs);if(6&ns)throw Error(s(327));n=t.finishedWork;var i=t.finishedLanes;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(s(177));t.callbackNode=null,t.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-Se(n),a=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~a}}(t,a),t===rs&&(is=rs=null,as=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||ws||(ws=!0,io(je,function(){return $s(),null})),a=!!(15990&n.flags),15990&n.subtreeFlags||a){a=es.transition,es.transition=null;var o=De;De=1;var l=ns;ns|=4,ts.current=null,function(t,e){for(I(t.containerInfo),ma=e;null!==ma;)if(e=(t=ma).child,1028&t.subtreeFlags&&null!==e)e.return=t,ma=e;else for(;null!==ma;){t=ma;try{var n=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,a=t.stateNode,o=a.getSnapshotBeforeUpdate(t.elementType===t.type?r:yi(t.type,r),i);a.__reactInternalSnapshotBeforeUpdate=o}break;case 3:q&&kt(t.stateNode.containerInfo);break;default:throw Error(s(163))}}catch(e){Zs(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,ma=e;break}ma=t.return}n=ba,ba=!1}(t,n),Da(n,t),G(t.containerInfo),t.current=n,Ia(n,t,i),ze(),ns=l,De=o,es.transition=a}else t.current=n;if(ws&&(ws=!1,Cs=t,ks=i),0===(a=t.pendingLanes)&&(xs=null),function(t){if(Ke&&"function"==typeof Ke.onCommitFiberRoot)try{Ke.onCommitFiberRoot(We,t,void 0,!(128&~t.current.flags))}catch(t){}}(n.stateNode),Rs(t,Ue()),null!==e)for(r=t.onRecoverableError,n=0;n<e.length;n++)r((i=e[n]).value,{componentStack:i.stack,digest:i.digest});if(_s)throw _s=!1,t=Ss,Ss=null,t;!!(1&ks)&&0!==t.tag&&$s(),1&(a=t.pendingLanes)?t===Ts?Ps++:(Ps=0,Ts=t):Ps=0,Je()}(t,e,n,r)}finally{es.transition=i,De=r}return null}function $s(){if(null!==Cs){var t=Le(ks),e=es.transition,n=De;try{if(es.transition=null,De=16>t?16:t,null===Cs)var r=!1;else{if(t=Cs,Cs=null,ks=0,6&ns)throw Error(s(331));var i=ns;for(ns|=4,ma=t.current;null!==ma;){var a=ma,o=a.child;if(16&ma.flags){var l=a.deletions;if(null!==l){for(var h=0;h<l.length;h++){var c=l[h];for(ma=c;null!==ma;){var u=ma;switch(u.tag){case 0:case 11:case 15:_a(8,u,a)}var d=u.child;if(null!==d)d.return=u,ma=d;else for(;null!==ma;){var f=(u=ma).sibling,g=u.return;if(wa(u),u===c){ma=null;break}if(null!==f){f.return=g,ma=f;break}ma=g}}}var p=a.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}ma=a}}if(2064&a.subtreeFlags&&null!==o)o.return=a,ma=o;else t:for(;null!==ma;){if(2048&(a=ma).flags)switch(a.tag){case 0:case 11:case 15:_a(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,ma=v;break t}ma=a.return}}var b=t.current;for(ma=b;null!==ma;){var _=(o=ma).child;if(2064&o.subtreeFlags&&null!==_)_.return=o,ma=_;else t:for(o=b;null!==ma;){if(2048&(l=ma).flags)try{switch(l.tag){case 0:case 11:case 15:Sa(9,l)}}catch(t){Zs(l,l.return,t)}if(l===o){ma=null;break t}var S=l.sibling;if(null!==S){S.return=l.return,ma=S;break t}ma=l.return}}if(ns=i,Je(),Ke&&"function"==typeof Ke.onPostCommitFiberRoot)try{Ke.onPostCommitFiberRoot(We,t)}catch(t){}r=!0}return r}finally{De=n,es.transition=e}}return!1}function Js(t,e,n){t=er(t,e=Fi(0,e=Ci(n,e),1),1),e=Ms(),null!==t&&(Ae(t,1,e),Rs(t,e))}function Zs(t,e,n){if(3===t.tag)Js(t,t,n);else for(;null!==e;){if(3===e.tag){Js(e,t,n);break}if(1===e.tag){var r=e.stateNode;if("function"==typeof e.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===xs||!xs.has(r))){e=er(e,t=Ei(e,t=Ci(n,t),1),1),t=Ms(),null!==e&&(Ae(e,1,t),Rs(e,t));break}}e=e.return}}function to(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=Ms(),t.pingedLanes|=t.suspendedLanes&n,rs===t&&(as&n)===n&&(4===ls||3===ls&&(130023424&as)===as&&500>Ue()-ps?Bs(t,0):ds|=n),Rs(t,e)}function eo(t,e){0===e&&(1&t.mode?(e=ke,!(130023424&(ke<<=1))&&(ke=4194304)):e=1);var n=Ms();null!==(t=Qn(t,e))&&(Ae(t,e,n),Rs(t,n))}function no(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),eo(t,n)}function ro(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(s(314))}null!==r&&r.delete(e),eo(t,n)}function io(t,e){return Ie(t,e)}function ao(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function so(t,e,n,r){return new ao(t,e,n,r)}function oo(t){return!(!(t=t.prototype)||!t.isReactComponent)}function lo(t,e){var n=t.alternate;return null===n?((n=so(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&t.flags,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ho(t,e,n,r,i,a){var o=2;if(r=t,"function"==typeof t)oo(t)&&(o=1);else if("string"==typeof t)o=5;else t:switch(t){case c:return co(n.children,i,a,e);case u:o=8,i|=8;break;case d:return(t=so(12,n,e,2|i)).elementType=d,t.lanes=a,t;case m:return(t=so(13,n,e,i)).elementType=m,t.lanes=a,t;case y:return(t=so(19,n,e,i)).elementType=y,t.lanes=a,t;case _:return uo(n,i,a,e);default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case f:o=10;break t;case g:o=9;break t;case p:o=11;break t;case v:o=14;break t;case b:o=16,r=null;break t}throw Error(s(130,null==t?t:typeof t,""))}return(e=so(o,n,e,i)).elementType=t,e.type=r,e.lanes=a,e}function co(t,e,n,r){return(t=so(7,t,r,e)).lanes=n,t}function uo(t,e,n,r){return(t=so(22,t,r,e)).elementType=_,t.lanes=n,t.stateNode={isHidden:!1},t}function fo(t,e,n){return(t=so(6,t,null,e)).lanes=n,t}function go(t,e,n){return(e=so(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function po(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=K,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ne(0),this.expirationTimes=Ne(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ne(0),this.identifierPrefix=r,this.onRecoverableError=i,Q&&(this.mutableSourceEagerHydrationData=null)}function mo(t,e,n,r,i,a,s,o,l){return t=new po(t,e,n,o,l),1===e?(e=1,!0===a&&(e|=8)):e=0,a=so(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jn(a),t}function yo(t){if(!t)return ce;t:{if(k(t=t._reactInternals)!==t||1!==t.tag)throw Error(s(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break t;case 1:if(pe(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);throw Error(s(171))}if(1===t.tag){var n=t.type;if(pe(n))return ve(t,n,e)}return e}function vo(t){var e=t._reactInternals;if(void 0===e){if("function"==typeof t.render)throw Error(s(188));throw t=Object.keys(t).join(","),Error(s(268,t))}return null===(t=F(e))?null:t.stateNode}function bo(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function _o(t,e){bo(t,e),(t=t.alternate)&&bo(t,e)}function So(t){return null===(t=F(t))?null:t.stateNode}function xo(){return null}return bs=function(t,e,n){if(null!==t)if(t.memoizedProps!==e.pendingProps||de.current)Di=!0;else{if(0===(t.lanes&n)&&!(128&e.flags))return Di=!1,function(t,e,n){switch(e.tag){case 3:Vi(e),Pn();break;case 5:fr(e);break;case 1:pe(e.type)&&be(e);break;case 4:ur(e,e.stateNode.containerInfo);break;case 10:Hn(0,e.type._context,e.memoizedProps.value);break;case 13:var r=e.memoizedState;if(null!==r)return null!==r.dehydrated?(he(pr,1&pr.current),e.flags|=128,null):0!==(n&e.child.childLanes)?Ji(t,e,n):(he(pr,1&pr.current),null!==(t=aa(t,e,n))?t.sibling:null);he(pr,1&pr.current);break;case 19:if(r=0!==(n&e.childLanes),128&t.flags){if(r)return ra(t,e,n);e.flags|=128}var i=e.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),he(pr,pr.current),r)break;return null;case 22:case 23:return e.lanes=0,zi(t,e,n)}return aa(t,e,n)}(t,e,n);Di=!!(131072&t.flags)}else Di=!1,pn&&1048576&e.flags&&cn(e,nn,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ia(t,e),t=e.pendingProps;var i=ge(e,ue.current);Wn(e,n),i=Nr(null,e,r,t,i,n);var a=Ar();return e.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,pe(r)?(a=!0,be(e)):a=!1,e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Jn(e),i.updater=bi,e.stateNode=i,i._reactInternals=e,wi(e,r,t,n),e=ji(null,e,r,!0,a,n)):(e.tag=0,pn&&a&&un(e),Li(null,e,i,n),e=e.child),e;case 16:r=e.elementType;t:{switch(ia(t,e),t=e.pendingProps,r=(i=r._init)(r._payload),e.type=r,i=e.tag=function(t){if("function"==typeof t)return oo(t)?1:0;if(null!=t){if((t=t.$$typeof)===p)return 11;if(t===v)return 14}return 2}(r),t=yi(r,t),i){case 0:e=Bi(null,e,r,t,n);break t;case 1:e=Hi(null,e,r,t,n);break t;case 11:e=Ii(null,e,r,t,n);break t;case 14:e=Gi(null,e,r,yi(r.type,t),n);break t}throw Error(s(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,Bi(t,e,r,i=e.elementType===r?i:yi(r,i),n);case 1:return r=e.type,i=e.pendingProps,Hi(t,e,r,i=e.elementType===r?i:yi(r,i),n);case 3:t:{if(Vi(e),null===t)throw Error(s(387));r=e.pendingProps,i=(a=e.memoizedState).element,Zn(t,e),ir(e,r,null,n);var o=e.memoizedState;if(r=o.element,Q&&a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,256&e.flags){e=Wi(t,e,r,n,i=Ci(Error(s(423)),e));break t}if(r!==i){e=Wi(t,e,r,n,i=Ci(Error(s(424)),e));break t}for(Q&&(gn=Ht(e.stateNode.containerInfo),fn=e,pn=!0,yn=null,mn=!1),n=In(e,null,r,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Pn(),r===i){e=aa(t,e,n);break t}Li(t,e,r,n)}e=e.child}return e;case 5:return fr(e),null===t&&xn(e),r=e.type,i=e.pendingProps,a=null!==t?t.memoizedProps:null,o=i.children,H(r,i)?o=null:null!==a&&H(r,a)&&(e.flags|=32),Ui(t,e),Li(t,e,o,n),e.child;case 6:return null===t&&xn(e),null;case 13:return Ji(t,e,n);case 4:return ur(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=Ln(e,null,r,n):Li(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,Ii(t,e,r,i=e.elementType===r?i:yi(r,i),n);case 7:return Li(t,e,e.pendingProps,n),e.child;case 8:case 12:return Li(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(r=e.type._context,i=e.pendingProps,a=e.memoizedProps,Hn(0,r,o=i.value),null!==a)if(Ye(a.value,o)){if(a.children===i.children&&!de.current){e=aa(t,e,n);break t}}else for(null!==(a=e.child)&&(a.return=e);null!==a;){var l=a.dependencies;if(null!==l){o=a.child;for(var h=l.firstContext;null!==h;){if(h.context===r){if(1===a.tag){(h=tr(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?h.next=h:(h.next=u.next,u.next=h),c.pending=h}}a.lanes|=n,null!==(h=a.alternate)&&(h.lanes|=n),Vn(a.return,n,e),l.lanes|=n;break}h=h.next}}else if(10===a.tag)o=a.type===e.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(s(341));o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Vn(o,n,e),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===e){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}Li(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,Wn(e,n),r=r(i=Kn(i)),e.flags|=1,Li(t,e,r,n),e.child;case 14:return i=yi(r=e.type,e.pendingProps),Gi(t,e,r,i=yi(r.type,i),n);case 15:return Oi(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:yi(r,i),ia(t,e),e.tag=1,pe(r)?(t=!0,be(e)):t=!1,Wn(e,n),Si(e,r,i),wi(e,r,i,n),ji(null,e,r,!0,t,n);case 19:return ra(t,e,n);case 22:return zi(t,e,n)}throw Error(s(156,e.tag))},e.attemptContinuousHydration=function(t){if(13===t.tag){var e=Qn(t,134217728);null!==e&&As(e,t,134217728,Ms()),_o(t,134217728)}},e.attemptDiscreteHydration=function(t){if(13===t.tag){var e=Qn(t,1);null!==e&&As(e,t,1,Ms()),_o(t,1)}},e.attemptHydrationAtCurrentPriority=function(t){if(13===t.tag){var e=Ns(t),n=Qn(t,e);null!==n&&As(n,t,e,Ms()),_o(t,e)}},e.attemptSynchronousHydration=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Pe(e.pendingLanes);0!==n&&(Re(e,1|n),Rs(e,Ue()),!(6&ns)&&(vs(),Je()))}break;case 13:zs(function(){var e=Qn(t,1);if(null!==e){var n=Ms();As(e,t,1,n)}}),_o(t,1)}},e.batchedUpdates=function(t,e){var n=ns;ns|=1;try{return t(e)}finally{0===(ns=n)&&(vs(),Xe&&Je())}},e.createComponentSelector=function(t){return{$$typeof:Ba,value:t}},e.createContainer=function(t,e,n,r,i,a,s){return mo(t,e,!1,null,0,r,0,a,s)},e.createHasPseudoClassSelector=function(t){return{$$typeof:Ha,value:t}},e.createHydrationContainer=function(t,e,n,r,i,a,s,o,l){return(t=mo(n,r,!0,t,0,a,0,o,l)).context=yo(null),n=t.current,(a=tr(r=Ms(),i=Ns(n))).callback=null!=e?e:null,er(n,a,i),t.current.lanes=i,Ae(t,i,r),Rs(t,r),t},e.createPortal=function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:h,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}},e.createRoleSelector=function(t){return{$$typeof:ja,value:t}},e.createTestNameSelector=function(t){return{$$typeof:Va,value:t}},e.createTextSelector=function(t){return{$$typeof:Wa,value:t}},e.deferredUpdates=function(t){var e=De,n=es.transition;try{return es.transition=null,De=16,t()}finally{De=e,es.transition=n}},e.discreteUpdates=function(t,e,n,r,i){var a=De,s=es.transition;try{return es.transition=null,De=1,t(e,n,r,i)}finally{De=a,es.transition=s,0===ns&&vs()}},e.findAllNodes=$a,e.findBoundingRects=function(t,e){if(!rt)throw Error(s(363));e=$a(t,e),t=[];for(var n=0;n<e.length;n++)t.push(at(e[n]));for(e=t.length-1;0<e;e--)for(var r=(n=t[e]).x,i=r+n.width,a=n.y,o=a+n.height,l=e-1;0<=l;l--)if(e!==l){var h=t[l],c=h.x,u=c+h.width,d=h.y,f=d+h.height;if(r>=c&&a>=d&&i<=u&&o<=f){t.splice(e,1);break}if(!(r!==c||n.width!==h.width||f<a||d>o)){d>a&&(h.height+=d-a,h.y=a),f<o&&(h.height=o-d),t.splice(e,1);break}if(!(a!==d||n.height!==h.height||u<r||c>i)){c>r&&(h.width+=c-r,h.x=r),u<i&&(h.width=i-c),t.splice(e,1);break}}return t},e.findHostInstance=vo,e.findHostInstanceWithNoPortals=function(t){return null===(t=null!==(t=T(t))?M(t):null)?null:t.stateNode},e.findHostInstanceWithWarning=function(t){return vo(t)},e.flushControlled=function(t){var e=ns;ns|=1;var n=es.transition,r=De;try{es.transition=null,De=1,t()}finally{De=r,es.transition=n,0===(ns=e)&&(vs(),Je())}},e.flushPassiveEffects=$s,e.flushSync=zs,e.focusWithin=function(t,e){if(!rt)throw Error(s(363));for(e=Qa(t=Ya(t),e),e=Array.from(e),t=0;t<e.length;){var n=e[t++];if(!ot(n)){if(5===n.tag&&ht(n.stateNode))return!0;for(n=n.child;null!==n;)e.push(n),n=n.sibling}}return!1},e.getCurrentUpdatePriority=function(){return De},e.getFindAllNodesFailureDescription=function(t,e){if(!rt)throw Error(s(363));var n=0,r=[];t=[Ya(t),0];for(var i=0;i<t.length;){var a=t[i++],o=t[i++],l=e[o];if((5!==a.tag||!ot(a))&&(qa(a,l)&&(r.push(Xa(l)),++o>n&&(n=o)),o<e.length))for(a=a.child;null!==a;)t.push(a,o),a=a.sibling}if(n<e.length){for(t=[];n<e.length;n++)t.push(Xa(e[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+t.join(" > ")}return null},e.getPublicRootInstance=function(t){return(t=t.current).child?5===t.child.tag?R(t.child.stateNode):t.child.stateNode:null},e.injectIntoDevTools=function(t){if(t={bundleType:t.bundleType,version:t.version,rendererPackageName:t.rendererPackageName,rendererConfig:t.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:So,findFiberByHostInstance:t.findFiberByHostInstance||xo,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)t=!1;else{var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)t=!0;else{try{We=e.inject(t),Ke=e}catch(t){}t=!!e.checkDCE}}return t},e.isAlreadyRendering=function(){return!1},e.observeVisibleRects=function(t,e,n,r){if(!rt)throw Error(s(363));t=$a(t,e);var i=ct(t,n,r).disconnect;return{disconnect:function(){i()}}},e.registerMutableSourceForHydration=function(t,e){var n=e._getVersion;n=n(e._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[e,n]:t.mutableSourceEagerHydrationData.push(e,n)},e.runWithPriority=function(t,e){var n=De;try{return De=t,e()}finally{De=n}},e.shouldError=function(){return null},e.shouldSuspend=function(){return!1},e.updateContainer=function(t,e,n,r){var i=e.current,a=Ms(),s=Ns(i);return n=yo(n),null===e.context?e.context=n:e.pendingContext=n,(e=tr(a,s)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),null!==(t=er(i,e,s))&&(As(t,i,s,a),nr(t,i,s)),s},e}},7463(t,e){"use strict";function n(t,e){var n=t.length;t.push(e);t:for(;0<n;){var r=n-1>>>1,i=t[r];if(!(0<a(i,e)))break t;t[r]=e,t[n]=i,n=r}}function r(t){return 0===t.length?null:t[0]}function i(t){if(0===t.length)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length,s=i>>>1;r<s;){var o=2*(r+1)-1,l=t[o],h=o+1,c=t[h];if(0>a(l,n))h<i&&0>a(c,l)?(t[r]=c,t[h]=n,r=h):(t[r]=l,t[o]=n,r=o);else{if(!(h<i&&0>a(c,n)))break t;t[r]=c,t[h]=n,r=h}}}return e}function a(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var h=[],c=[],u=1,d=null,f=3,g=!1,p=!1,m=!1,y="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function _(t){for(var e=r(c);null!==e;){if(null===e.callback)i(c);else{if(!(e.startTime<=t))break;i(c),e.sortIndex=e.expirationTime,n(h,e)}e=r(c)}}function S(t){if(m=!1,_(t),!p)if(null!==r(h))p=!0,R(x);else{var e=r(c);null!==e&&D(S,e.startTime-t)}}function x(t,n){p=!1,m&&(m=!1,v(P),P=-1),g=!0;var a=f;try{for(_(n),d=r(h);null!==d&&(!(d.expirationTime>n)||t&&!E());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var o=s(d.expirationTime<=n);n=e.unstable_now(),"function"==typeof o?d.callback=o:d===r(h)&&i(h),_(n)}else i(h);d=r(h)}if(null!==d)var l=!0;else{var u=r(c);null!==u&&D(S,u.startTime-n),l=!1}return l}finally{d=null,f=a,g=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var w,C=!1,k=null,P=-1,T=5,F=-1;function E(){return!(e.unstable_now()-F<T)}function M(){if(null!==k){var t=e.unstable_now();F=t;var n=!0;try{n=k(!0,t)}finally{n?w():(C=!1,k=null)}}else C=!1}if("function"==typeof b)w=function(){b(M)};else if("undefined"!=typeof MessageChannel){var N=new MessageChannel,A=N.port2;N.port1.onmessage=M,w=function(){A.postMessage(null)}}else w=function(){y(M,0)};function R(t){k=t,C||(C=!0,w())}function D(t,n){P=y(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){p||g||(p=!0,R(x))},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<t?Math.floor(1e3/t):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(h)},e.unstable_next=function(t){switch(f){case 1:case 2:case 3:var e=3;break;default:e=f}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_scheduleCallback=function(t,i,a){var s=e.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,t){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return t={id:u++,callback:i,priorityLevel:t,startTime:a,expirationTime:o=a+o,sortIndex:-1},a>s?(t.sortIndex=a,n(c,t),null===r(h)&&t===r(c)&&(m?(v(P),P=-1):m=!0,D(S,a-s))):(t.sortIndex=o,n(h,t),p||g||(p=!0,R(x))),t},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(t){var e=f;return function(){var n=f;f=e;try{return t.apply(this,arguments)}finally{f=n}}}},9982(t,e,n){"use strict";t.exports=n(7463)}}]);
[-] react-icons-md.js
[edit]
[-] react-icons-fa6.js
[edit]
[-] react-icons-tfi.js
[edit]
[-] react-icons-io5.js
[edit]
[-] konva-vendor.js
[edit]
[+]
..