1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6170],{16745:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Animation=void 0;const r=n(54417),i=n(68588),a=r.glob.performance&&r.glob.performance.now?function(){return r.glob.performance.now()}:function(){return(new Date).getTime()};class o{constructor(t,e){this.id=o.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=o.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(),o._addAnimation(this),this}stop(){return o._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 i=0;i<r;i++)if(n[i].id===e){this.animations.splice(i,1);break}}static _runFrames(){const t={},e=this.animations;for(let n=0;n<e.length;n++){const r=e[n],i=r.layers,o=r.func;r._updateFrameObject(a());const s=i.length;let l;if(l=!o||!1!==o.call(r,r.frame),l)for(let e=0;e<s;e++){const n=i[e];void 0!==n._id&&(t[n._id]=n)}}for(let n in t)t.hasOwnProperty(n)&&t[n].batchDraw()}static _animationLoop(){const t=o;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=o,o.animations=[],o.animIdCounter=0,o.animRunning=!1},54135:function(t,e){"use strict";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,
1-.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,.122555206
171147846,.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,o,s;a=i/2,o=0;for(let l=0;l<20;l++)s=a*e.tValues[20][l]+a,o+=e.cValues[20][l]*n(t,r,s);return a*o};function n(t,e,n){const i=r(1,n,t),a=r(1,n,e),o=i*i+a*a;return Math.sqrt(o)}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],o=2*e[1]-2*e[0],s=4*(r*r+i*i),l=4*(r*a+i*o),h=a*a+o*o;if(0===s)return n*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));const u=l/(2*s),c=n+u,d=h/s-u*u,f=c*c+d>0?Math.sqrt(c*c+d):0,g=u*u+d>0?Math.sqrt(u*u+d):0,p=u+Math.sqrt(u*u+d)!==0?d*Math.log(Math.abs((c+f)/(u+g))):0;return Math.sqrt(s)/2*(c*f-u*g+p)};const r=(t,n,i)=>{const a=i.length-1;let o,s;if(0===a)return 0;if(0===t){s=0;for(let t=0;t<=a;t++)s+=e.binomialCoefficients[a][t]*Math.pow(1-n,a-t)*Math.pow(n,t)*i[t];return s}o=new Array(a);for(let e=0;e<a;e++)o[e]=a*(i[e+1]-i[e]);return r(t-1,n,o)};e.t2length=(t,e,n)=>{let r=1,i=t/e,a=(t-n(i))/e,o=0;for(;r>.001;){const s=n(i+a),l=Math.abs(t-s)/e;if(l<r)r=l,i+=a;else{const o=n(i-a),s=Math.abs(t-o)/e;s<r?(r=s,i-=a):a/=2}if(o++,o>500)break}return i}},34842:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HitCanvas=e.SceneCanvas=e.Canvas=void 0;const r=n(68588),i=n(23442),a=n(54417),o=n(1455),s=n(53774);var l;class h{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var e=(t||{}).pixelRatio||a.Konva.pixelRatio||function(){if(l)return l;var t=r.Util.createCanvasElement(),e=t.getContext("2d");return l=(a.Konva._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),r.Util.releaseCanvas(t),l}();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){var 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";var 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";var e=this.pixelRatio;this.getContext()._context.scale(e,e)}getWidth(){return this.width}
1getHeight(){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(n){try{return this._canvas.toDataURL()}catch(i){return r.Util.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}e.Canvas=h,o.Factory.addGetterSetter(h,"pixelRatio",void 0,(0,s.getNumberValidator)());e.SceneCanvas=class extends h{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 h{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new i.HitContext(this),this.setSize(t.width,t.height)}}},28783:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;const r=n(1455),i=n(77939),a=n(53774);class o extends i.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const e=this.children||[];var n=[];return e.forEach((function(e){t(e)&&n.push(e)})),n}hasChildren(){return this.getChildren().length>0}
1removeChildren(){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(var e=0;e<t.length;e++)this.add(t[e]);return this}const n=t[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){var 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(){var t=i.Node.prototype.toObject.call(this);
1return t.children=[],this.getChildren().forEach((e=>{t.children.push(e.toObject())})),t}isAncestorOf(t){for(var e=t.getParent();e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){var e=i.Node.prototype.clone.call(this,t);return this.getChildren().forEach((function(t){e.add(t.clone())})),e}getAllIntersections(t){var 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){var n=this.getLayer(),r=t||n&&n.getCanvas(),i=r&&r.getContext(),a=this._getCanvasCache(),o=a&&a.scene,s=r&&r.isCache;if(!this.isVisible()&&!s)return this;if(o){i.save();var l=this.getAbsoluteTransform(e).getMatrix();i.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",r,e);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;var n=this.getLayer(),r=t||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCanvasCache();if(a&&a.hit){i.save();var o=this.getAbsoluteTransform(e).getMatrix();i.transform(o[0],o[1],o[2],o[3],o[4],o[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren("drawHit",r,e);return this}_drawChildren(t,e,n){var r,i=e&&e.getContext(),a=this.clipWidth(),o=this.clipHeight(),s=this.clipFunc(),l=a&&o||s;const h=n===this;if(l){i.save();var u=this.getAbsoluteTransform(n),c=u.getMatrix();let t;if(i.transform(c[0],c[1],c[2],c[3],c[4],c[5]),i.beginPath(),s)t=s.call(this,i,this);else{var d=this.clipX(),f=this.clipY();i.rect(d,f,a,o)}i.clip.apply(i,t),c=u.copy().invert().getMatrix(),i.transform(c[0],c[1],c[2],c[3],c[4],c[5])}var g=!h&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;g&&(i.save(),i._applyGlobalCompositeOperation(this)),null===(r=this.children)||void 0===r||r.forEach((function(r){r[t](e,n)})),g&&i.restore(),l&&i.restore()}getClientRect(t={}){var e,n,r,i,a,o=t.skipTransform,s=t.relativeTo,l={x:1/0,y:1/0,width:0,height:0},h=this;null===(e=this.children)||void 0===e||e.forEach((function(e){if(e.visible()){var o=e.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});0===o.width&&0===o.height||(void 0===n?(n=o.x,r=o.y,i=o.x+o.width,a=o.y+o.height):(n=Math.min(n,o.x),r=Math.min(r,o.y),i=Math.max(i,o.x+o.width),a=Math.max(a,o.y+o.height)))}}));for(var u=this.find("Shape"),c=!1,d=0;d<u.length;d++){if(u[d]._isVisible(this)){c=!0;break}}return l=c&&void 0!==n?{x:n,y:r,width:i-n,height:a-r}:{x:0,y:0,width:0,height:0},o?l:this._transformedRect(l,s)}}e.Container=o,r.Factory.addComponentsGetterSetter(o,"clip",["x","y","width","height"]),r.Factory.addGetterSetter(o,"clipX",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"clipY",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"clipWidth",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"clipHeight",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"clipFunc")},23442:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HitContext=e.SceneContext=e.Context=void 0;const r=n(68588),i=n(54417);function a(t){var e,n,i=[],a=t.length,o=r.Util;for(e=0;e<a;e++)n=t[e],o._isNumber(n)?n=Math.round(1e3*n)/1e3:o._isString(n)||(n+=""),i.push(n);return i}var o=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","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){var n,i,a,o,s=this.traceArr,l=s.length,h="";for(n=0;n<l;n++)(a=(i=s[n]).method)?(o=i.args,h+=a,t?h+="()":r.Util._isArray(o[0])?h+="(["+o.join(",")+"])":(e&&(o=o.map((t=>"number"===typeof t?Math.floor(t):t))),h+="("+o.join(",")+")")):(h+=i.property,t||(h+="="+i.val)),h+=";";return h}clearTrace(){this.traceArr=[]}_trace(t){var e=this.traceArr;e.push(t),e.length>=100&&e.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var 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){var 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){var 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,o,s,l){var h=arguments,u=this._context;3===h.length?u.drawImage(t,e,n):5===h.length?u.drawImage(t,e,n,r,i):9===h.length&&u.drawImage(t,e,n,r,i,a,o,s,l)}ellipse(t,e,n,r,i,a,o,s){this._context.ellipse(t,e,n,r,i,a,o,s)}
1isPointInPath(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)}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(){var t,e,n=this,r=o.length,i=this.setAttr,s=function(t){var r,i=n[t];n[t]=function(){return e=a(Array.prototype.slice.call(arguments,0)),r=i.apply(n,arguments),n._trace({method:t,args:e}),r}};for(t=0;t<r;t++)s(o[t]);n.setAttr=function(){i.apply(n,arguments);var t=arguments[0],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){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var 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(var a=0;a<r.length;a+=2)i.addColorStop(r[a],r[a+1]);this.setAttr("strokeStyle",i)}}_stroke(t){var e=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,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(
1)}}_applyShadow(t){var e,n,r,i=null!==(e=t.getShadowRGBA())&&void 0!==e?e:"black",a=null!==(n=t.getShadowBlur())&&void 0!==n?n:5,o=null!==(r=t.getShadowOffset())&&void 0!==r?r:{x:0,y:0},s=t.getAbsoluteScale(),l=this.canvas.getPixelRatio(),h=s.x*l,u=s.y*l;this.setAttr("shadowColor",i),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(u))),this.setAttr("shadowOffsetX",o.x*h),this.setAttr("shadowOffsetY",o.y*u)}};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 i=t.getStrokeScaleEnabled();if(!i){this.save();var e=this.getCanvas().getPixelRatio();this.setTransform(e,0,0,e,0,0)}this._applyLineCap(t);var n=t.hitStrokeWidth(),r="auto"===n?t.strokeWidth():n;this.setAttr("lineWidth",r),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),i||this.restore()}}}},87185:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var r=n(3986);Object.defineProperty(e,"Konva",{enumerable:!0,get:function(){return r.Konva}});const i=n(3986);t.exports=i.Konva},70210:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;const r=n(54417),i=n(68588);e.DD={get isDragging(){var t=!1;return e.DD._dragElements.forEach((e=>{"dragging"===e.dragStatus&&(t=!0)})),t},justDragged:!1,get node(){var 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,o=a.getStage();o.setPointersPositions(t),void 0===e.pointerId&&(e.pointerId=i.Util._getFirstPointerId(t));const s=o._changedPointerPositions.find((t=>t.id===e.pointerId));if(s){if("dragging"!==e.dragStatus){var l=a.dragDistance();if(Math.max(Math.abs(s.x-e.startPointerPos.x),Math.abs(s.y-e.startPointerPos.y))<l)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,o=a.getStage();t&&o.setPointersPositions(t);if(!o._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 s=i.node.getLayer()||i.node instanceof r.Konva.Stage&&i.node;s&&-1===n.indexOf(s)&&n.push(s)})),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("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))},1455:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const r=n(68588),i=n(53774);var a="get",o="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){var i=a+r.Util._capitalize(e);t.prototype[i]=t.prototype[i]||function(){var t=this.attrs[e];return void 0===t?n:t}},addSetter(t,n,i,a){var s=o+r.Util._capitalize(n);t.prototype[s]||e.Factory.overWriteSetter(t,n,i,a)},overWriteSetter(t,e,n,i){var a=o+r.Util._capitalize(e);t.prototype[a]=function(t){return n&&void 0!==t&&null!==t&&(t=n.call(this,t,e)),this._setAttr(e,t),i&&i.call(this),this}},addComponentsGetterSetter(t,n,s,l,h){var u,c,d=s.length,f=r.Util._capitalize,g=a+f(n),p=o+f(n);t.prototype[g]=function(){var t={};for(u=0;u<d;u++)t[c=s[u]]=this.getAttr(n+f(c));return t};var v=(0,i.getComponentValidator)(s);t.prototype[p]=function(t){var e,r=this.attrs[n];for(e in l&&(t=l.call(this,t)),v&&v.call(this,t,n),t)t.hasOwnProperty(e)&&this._setAttr(n+f(e),t[e]);
1return t||s.forEach((t=>{this._setAttr(n+f(t),void 0)})),this._fireChangeEvent(n,r,t),h&&h.call(this),this},e.Factory.addOverloadedGetterSetter(t,n)},addOverloadedGetterSetter(t,e){var n=r.Util._capitalize(e),i=o+n,s=a+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[s]()}},addDeprecatedGetterSetter(t,n,i,o){r.Util.error("Adding deprecated "+n);var s=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[s]=function(){r.Util.error(l);var t=this.attrs[n];return void 0===t?i:t},e.Factory.addSetter(t,n,o,(function(){r.Util.error(l)})),e.Factory.addOverloadedGetterSetter(t,n)},backCompat(t,e){r.Util.each(e,(function(e,n){var i=t.prototype[n],s=a+r.Util._capitalize(e),l=o+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[s]=h,t.prototype[l]=h}))},afterSetFilter(){this._filterUpToDate=!1}}},73980:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastLayer=void 0;const r=n(68588),i=n(44415),a=n(54417);class o 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=o,o.prototype.nodeType="FastLayer",(0,a._registerNode)(o)},54417:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const r=Math.PI/180;e.glob="undefined"!==typeof n.g?n.g:"undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope?self:{},e.Konva={_global:e.glob,version:"9.2.2",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*r: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,pixelRatio:"undefined"!==typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>e.Konva.DD.isDragging,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)},58985:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;const r=n(68588),i=n(28783),a=n(54417);class o extends i.Container{_validateAdd(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&r.Util.throw("You may only add groups and shapes to groups.")}}e.Group=o,o.prototype.nodeType="Group",(0,a._registerNode)(o)},44415:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Layer=void 0;const r=n(68588),i=n(28783),a=n(77939),o=n(1455),s=n(34842),l=n(53774),h=n(97955),u=n(54417);var c=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],d=c.length;
1class f extends i.Container{constructor(t){super(t),this.canvas=new s.SceneCanvas,this.hitCanvas=new s.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);var 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);var 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;var 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)){var t=this.getStage();if(t){var 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)){var t=this.getStage();if(t){var 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(){var 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){var 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;for(var e=1,n=!1;;){for(let r=0;r<d;r++){const i=c[r],a=this._getIntersection({x:t.x+i.x*e,y:t.y+i.y*e}),o=a.shape;if(o)return o;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){var n=this.getLayer(),r=t||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),i.Container.prototype.drawScene.call(this,r,e),this._fire("draw",{node:this}),this}drawHit(t,e){var 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){var 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,u._registerNode)(f),o.Factory.addGetterSetter(f,"imageSmoothingEnabled",!0),o.Factory.addGetterSetter(f,"clearBeforeDraw",!0),o.Factory.addGetterSetter(f,"hitGraphEnabled",!0,(0,l.getBooleanValidator)())},77939:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;const r=n(68588),i=n(1455),a=n(34842),o=n(54417),s=n(70210),l=n(53774);var h="absoluteOpacity",u="allEventListeners",c="absoluteTransform",d="absoluteScale",f="canvas",g="listening",p="mouseenter",v="mouseleave",m="Shape",y=" ",b="stage",_="transform",S="visible",x=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(y);let C=1;class w{constructor(t){this._id=C++,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!==_&&t!==c||!this._cache.get(t)?t?this._cache.delete(t):this._cache.clear():this._cache.get(t).dirty=!0}_getCache(t,e){var n=this._cache.get(t);return(void 0===n||(t===_||t===c)&&!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(y);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===c&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(f)){const{scene:t,filter:e,hit:n}=this._cache.get(f);r.Util.releaseCanvas(t,e,n),this._cache.delete(f)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var e=t||{},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}));var i=Math.ceil(e.width||n.width),o=Math.ceil(e.height||n.height),s=e.pixelRatio,l=void 0===e.x?Math.floor(n.x):e.x,u=void 0===e.y?Math.floor(n.y):e.y,c=e.offset||0,g=e.drawBorder||!1,p=e.hitCanvasPixelRatio||1;if(i&&o){i+=2*c+1,o+=2*c+1,l-=c,u-=c;var v=new a.SceneCanvas({pixelRatio:s,width:i,height:o}),m=new a.SceneCanvas({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),y=new a.HitCanvas({pixelRatio:p,width:i,height:o}),b=v.getContext(),_=y.getContext();return y.isCache=!0,v.isCache=!0,this._cache.delete(f),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(v.getContext()._context.imageSmoothingEnabled=!1,m.getContext()._context.imageSmoothingEnabled=!1),b.save(),_.save(),b.translate(-l,-u),_.translate(-l,-u),this._isUnderCache=!0,this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(d),this.drawScene(v,this),this.drawHit(y,this),this._isUnderCache=!1,b.restore(),_.restore(),g&&(b.save(),b.beginPath(),b.rect(0,0,i,o),b.closePath(),b.setAttr("strokeStyle","red"),b.setAttr("lineWidth",5),b.stroke(),b.restore()),this._cache.set(f,{scene:v,filter:m,hit:y,x:l,y:u}),this._requestDraw(),this}r.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(f)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){var 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}],r=1/0,i=1/0,a=-1/0,o=-1/0,s=this.getAbsoluteTransform(e);return n.forEach((function(t){var e=s.point(t);void 0===r&&(r=a=e.x,i=o=e.y),r=Math.min(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.x),o=Math.max(o,e.y)})),{x:r,y:i,width:a-r,height:o-i}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/r,n.height/r),t.restore()}_drawCachedHitCanvas(t){var 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(
1)}_getCachedSceneCanvas(){var t,e,n,i,a=this.filters(),o=this._getCanvasCache(),s=o.scene,l=o.filter,h=l.getContext();if(a){if(!this._filterUpToDate){var u=s.pixelRatio;l.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio);try{for(t=a.length,h.clear(),h.drawImage(s._canvas,0,0,s.getWidth()/u,s.getHeight()/u),e=h.getImageData(0,0,l.getWidth(),l.getHeight()),n=0;n<t;n++)"function"===typeof(i=a[n])?(i.call(this,e),h.putImageData(e,0,0)):r.Util.error("Filter should be type of function, but got "+typeof i+" instead. Please check correct filters")}catch(c){r.Util.error("Unable to apply filter. "+c.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(u),3===arguments.length)return this._delegate.apply(this,arguments);var n,r,i,a,o=t.split(y),s=o.length;for(n=0;n<s;n++)i=(r=o[n].split("."))[0],a=r[1]||"",this.eventListeners[i]||(this.eventListeners[i]=[]),this.eventListeners[i].push({name:a,handler:e});return this}off(t,e){var n,r,i,a,o,s=(t||"").split(y),l=s.length;if(this._cache&&this._cache.delete(u),!t)for(r in this.eventListeners)this._off(r);for(n=0;n<l;n++)if(a=(i=s[n].split("."))[0],o=i[1],a)this.eventListeners[a]&&this._off(a,o,e);else for(r in this.eventListeners)this._off(r,o,e);return this}dispatchEvent(t){var 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){var i=this;this.on(t,(function(t){for(var a=t.target.findAncestors(e,!0,i),o=0;o<a.length;o++)(t=r.Util.cloneObject(t)).currentTarget=a[o],n.call(a[o],t)}))}
1remove(){return this.isDragging()&&this.stopDrag(),s.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(d),this._clearSelfAndDescendantCache(b),this._clearSelfAndDescendantCache(S),this._clearSelfAndDescendantCache(g)}_remove(){this._clearCaches();var 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){var e="get"+r.Util._capitalize(t);return r.Util._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){for(var t=this.getParent(),e=[];t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges((()=>{var e,n;if(!t)return this;for(e in t)"children"!==e&&(n="set"+r.Util._capitalize(e),r.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(S,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);var n=this.getLayer(),r=!1;s.DD._dragElements.forEach((t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType||t.node.getLayer()===n)&&(r=!0)}));var i=!e&&!o.Konva.hitOnDragEnabled&&r;return this.isListening()&&this.isVisible()&&!i}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t,e,n,r,i=this.getDepth(),a=this,o=0;const s=this.getStage();return"Stage"!==a.nodeType&&s&&function s(l){for(t=[],e=l.length,n=0;n<e;n++)r=l[n],o++,r.nodeType!==m&&(t=t.concat(r.getChildren().slice())),r._id===a._id&&(n=e);t.length>0&&t[0].getDepth()<=i&&s(t)}(s.getChildren()),o}getDepth(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(_),this._clearSelfAndDescendantCache(c)),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;var e=t.getPointerPosition();if(!e)return null;var 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);var i=this.getAbsoluteTransform(t).getMatrix(),a=new r.Transform,o=this.offset();return a.m=i.slice(),a.translate(o.x,o.y),a.getTranslation()}setAbsolutePosition(t){const{x:e,y:n,...r}=this._clearTransform();this.attrs.x=e,this.attrs.y=n,this._clearCache(_);var 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(_),this._clearSelfAndDescendantCache(c),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var 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){var 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){var 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 r.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var 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 r.Util.warn("Node has no parent. moveUp function is ignored."),!1;var 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 r.Util.warn("Node has no parent. moveDown function is ignored."),!1;var 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 r.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var 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 r.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&r.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)+".");var 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(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t,e,n,i,a={},o=this.getAttrs();for(t in a.attrs={},o)e=o[t],r.Util.isObject(e)&&!r.Util._isPlainObject(e)&&!r.Util._isArray(e)||(n="function"===typeof this[t]&&this[t],delete o[t],i=n?n.call(this):null,o[t]=e,i!==e&&(a.attrs[t]=e));return a.className=this.getClassName(),r.Util._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,n){var r=[];e&&this._isMatch(t)&&r.push(this);for(var i=this.parent;i;){if(i===n)return r;i._isMatch(t)&&r.push(i),i=i.parent}return r}isAncestorOf(t){return!1}
1findAncestor(t,e,n){return this.findAncestors(t,e,n)[0]}_isMatch(t){if(!t)return!1;if("function"===typeof t)return t(this);var e,n,i=t.replace(/ /g,"").split(","),a=i.length;for(e=0;e<a;e++)if(n=i[e],r.Util.isValidSelector(n)||(r.Util.warn('Selector "'+n+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),r.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),r.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(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(b,this._getStage)}_getStage(){var 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(c,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var e;if(t)return e=new r.Transform,this._eachAncestorReverse((function(t){var 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(c)||new r.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();var n=this.transformsEnabled();if("all"===n)e.multiply(this.getTransform());else if("position"===n){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){for(var e=this;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(_,this._getTransform)}_getTransform(){var t,e,n=this._cache.get(_)||new r.Transform;n.reset();var i=this.x(),a=this.y(),s=o.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,u=this.attrs.skewX||0,c=this.attrs.skewY||0,d=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===i&&0===a||n.translate(i,a),0!==s&&n.rotate(s),0===u&&0===c||n.skew(u,c),1===l&&1===h||n.scale(l,h),0===d&&0===f||n.translate(-1*d,-1*f),n.dirty=!1,n}clone(t){var e,n,i,a,o,s=r.Util.cloneObject(this.attrs);for(e in t)s[e]=t[e];var l=new this.constructor(s);for(e in this.eventListeners)for(i=(n=this.eventListeners[e]).length,a=0;a<i;a++)(o=n[a]).name.indexOf("konva")<0&&(l.eventListeners[e]||(l.eventListeners[e]=[]),l.eventListeners[e].push(o));return l}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),n=this.getStage(),r=void 0!==t.x?t.x:Math.floor(e.x),i=void 0!==t.y?t.y:Math.floor(e.y),o=t.pixelRatio||1,s=new a.SceneCanvas({width:t.width||Math.ceil(e.width)||(n?n.width():0),height:t.height||Math.ceil(e.height)||(n?n.height():0),pixelRatio:o}),l=s.getContext();return!1===t.imageSmoothingEnabled&&(l._context.imageSmoothingEnabled=!1),l.save(),(r||i)&&l.translate(-1*r,-1*i),this.drawScene(s),l.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){var 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?void 0:t.callback;n&&delete t.callback,r.Util._urlToImage(this.toDataURL(t),(function(t){e(t),null===n||void 0===n||n(t)}))}catch(i){n(i)}}))}toBlob(t){return new Promise(((e,n)=>{try{const n=null===t||void 0===t?void 0:t.callback;n&&delete t.callback,this.toCanvas(t).toBlob((t=>{e(t),null===n||void 0===n||n(t)}))}catch(r){n(r)}}))}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():o.Konva.dragDistance}_off(t,e,n){var r,i,a,o=this.eventListeners[t];for(r=0;r<o.length;r++)if(i=o[r].name,a=o[r].handler,("konva"!==i||"konva"===e)&&(!e||i===e)&&(!n||n===a)){if(o.splice(r,1),0===o.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)){var 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){var e=(this.name()||"").split(/\s/g),n=e.indexOf(t);return-1!==n&&(e.splice(n,1),this.name(e.join(" "))),this}
1setAttr(t,e){var n=this["set"+r.Util._capitalize(t)];return r.Util._isFunction(n)?n.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(o.Konva.autoDrawEnabled){const t=this.getLayer()||this.getStage();null===t||void 0===t||t.batchDraw()}}_setAttr(t,e){var n=this.attrs[t];(n!==e||r.Util.isObject(e))&&(void 0===e||null===e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,e),this._requestDraw())}_setComponentAttr(t,e,n){var r;void 0!==n&&((r=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=n,this._fireChangeEvent(t,r,n))}_fireAndBubble(t,e,n){if(e&&this.nodeType===m&&(e.target=this),!((t===p||t===v)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||"Stage"===this.nodeType&&!n))){this._fire(t,e);var r=(t===p||t===v)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!r&&(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(u))&&void 0!==e?e:{};let a=null===i||void 0===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(u,i)}return a}_fire(t,e){(e=e||{}).currentTarget=this,e.type=t;const n=this._getProtoListeners(t);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,e);const i=this.eventListeners[t];if(i)for(r=0;r<i.length;r++)i[r].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition();if(n){var i=n._getPointerById(e)||n._changedPointerPositions[0]||r;s.DD._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-r.x,y:i.y-r.y},dragStatus:"ready",pointerId:e})}}startDrag(t,e=!0){s.DD._dragElements.has(this._id)||this._createDragElement(t);s.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){var i={x:n.x-e.offset.x,y:n.y-e.offset.y},a=this.dragBoundFunc();if(void 0!==a){const e=a.call(this,i,t);e?i=e:r.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===i.x&&this._lastPos.y===i.y||(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const e=s.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),s.DD._endDragBefore(t),s.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=s.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)||o.Konva.dragButtons.indexOf(t.evt.button)>=0)&&!this.isDragging()){var e=!1;s.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=s.DD._dragElements.get(this._id),e=t&&"dragging"===t.dragStatus,n=t&&"ready"===t.dragStatus;
1e?this.stopDrag():n&&s.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 r.Util.haveIntersection(n,this.getClientRect())}static create(t,e){return r.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){var n,i,a,s=w.prototype.getClassName.call(t),l=t.children;e&&(t.attrs.container=e),o.Konva[s]||(r.Util.warn('Can not find a node with class name "'+s+'". Fallback to "Shape".'),s="Shape");if(n=new(0,o.Konva[s])(t.attrs),l)for(i=l.length,a=0;a<i;a++)n.add(w._createNode(l[a]));return n}}e.Node=w,w.prototype.nodeType="Node",w.prototype._attrsAffectingSize=[],w.prototype.eventListeners={},w.prototype.on.call(w.prototype,x,(function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(_),this._clearSelfAndDescendantCache(c))})),w.prototype.on.call(w.prototype,"visibleChange.konva",(function(){this._clearSelfAndDescendantCache(S)})),w.prototype.on.call(w.prototype,"listeningChange.konva",(function(){this._clearSelfAndDescendantCache(g)})),w.prototype.on.call(w.prototype,"opacityChange.konva",(function(){this._clearSelfAndDescendantCache(h)}));const k=i.Factory.addGetterSetter;k(w,"zIndex"),k(w,"absolutePosition"),k(w,"position"),k(w,"x",0,(0,l.getNumberValidator)()),k(w,"y",0,(0,l.getNumberValidator)()),k(w,"globalCompositeOperation","source-over",(0,l.getStringValidator)()),k(w,"opacity",1,(0,l.getNumberValidator)()),k(w,"name","",(0,l.getStringValidator)()),k(w,"id","",(0,l.getStringValidator)()),k(w,"rotation",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(w,"scale",["x","y"]),k(w,"scaleX",1,(0,l.getNumberValidator)()),k(w,"scaleY",1,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(w,"skew",["x","y"]),k(w,"skewX",0,(0,l.getNumberValidator)()),k(w,"skewY",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(w,"offset",["x","y"]),k(w,"offsetX",0,(0,l.getNumberValidator)()),k(w,"offsetY",0,(0,l.getNumberValidator)()),k(w,"dragDistance",null,(0,l.getNumberValidator)()),k(w,"width",0,(0,l.getNumberValidator)()),k(w,"height",0,(0,l.getNumberValidator)()),k(w,"listening",!0,(0,l.getBooleanValidator)()),k(w,"preventDefault",!0,(0,l.getBooleanValidator)()),k(w,"filters",null,(function(t){return this._filterUpToDate=!1,t})),k(w,"visible",!0,(0,l.getBooleanValidator)()),k(w,"transformsEnabled","all",(0,l.getStringValidator)()),k(w,"size"),k(w,"dragBoundFunc"),k(w,"draggable",!1,(0,l.getBooleanValidator)()),i.Factory.backCompat(w,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"})},98479:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.releaseCapture=e.setPointerCapture=e.hasPointerCapture=e.createEvent=e.getCapturedShape=void 0;const r=n(54417),i=new Map,a=void 0!==r.Konva._global.PointerEvent;function o(t){return{evt:t,pointerId:t.pointerId}}function s(t,e){const n=i.get(t);if(!n)return;const r=n.getStage();r&&r.content,i.delete(t),a&&n._fire("lostpointercapture",o(new PointerEvent("lostpointercapture")))}e.getCapturedShape=function(t){return i.get(t)},e.createEvent=o,e.hasPointerCapture=function(t,e){return i.get(t)===e},e.setPointerCapture=function(t,e){s(t),e.getStage()&&(i.set(t,e),a&&e._fire("gotpointercapture",o(new PointerEvent("gotpointercapture"))))},e.releaseCapture=s},97955:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const r=n(54417),i=n(68588),a=n(1455),o=n(77939),s=n(53774),l=n(54417),h=n(98479);var u="hasShadow",c="shadowRGBA",d="patternImage",f="linearGradient",g="radialGradient";let p;function v(){return p||(p=i.Util.createCanvasElement().getContext("2d"),p)}e.shapes={};class m extends o.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(u,this._hasShadow)}
1_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=v().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(){var t=this.fillLinearGradientColorStops();if(t){for(var e=v(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=e.createLinearGradient(n.x,n.y,r.x,r.y),a=0;a<t.length;
1a+=2)i.addColorStop(t[a],t[a+1]);return i}}_getRadialGradient(){return this._getCache(g,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var e=v(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=e.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),a=0;a<t.length;a+=2)i.addColorStop(t[a],t[a+1]);return i}}getShadowRGBA(){return this._getCache(c,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var 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){var e=this.getStage();if(!e)return!1;const n=e.bufferHitCanvas;n.getContext().clear(),this.drawHit(n,void 0,!0);return n.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return o.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;if(!this.getStage())return!1;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(),o=this.shadowForStrokeEnabled();return!!(n&&r&&a&&o)}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(){var 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={}){const e=t.skipTransform,n=t.relativeTo,r=this.getSelfRect(),i=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,a=r.width+i,o=r.height+i,s=!t.skipShadow&&this.hasShadow(),l=s?this.shadowOffsetX():0,h=s?this.shadowOffsetY():0,u=a+Math.abs(l),c=o+Math.abs(h),d=s&&this.shadowBlur()||0,f={width:u+2*d,height:c+2*d,x:-(i/2+d)+Math.min(l,0)+r.x,y:-(i/2+d)+Math.min(h,0)+r.y};return e?f:this._transformedRect(f,n)}drawScene(t,e){var n,r,i=this.getLayer(),a=t||i.getCanvas(),o=a.getContext(),s=this._getCanvasCache(),l=this.getSceneFunc(),h=this.hasShadow(),u=a.isCache,c=e===this;if(!this.isVisible()&&!c)return this;if(s){o.save();var d=this.getAbsoluteTransform(e).getMatrix();return o.transform(d[0],d[1],d[2],d[3],d[4],d[5]),this._drawCachedSceneCanvas(o),o.restore(),this}if(!l)return this;if(o.save(),this._useBufferCanvas()&&!u){(r=(n=this.getStage().bufferCanvas).getContext()).clear(),r.save(),r._applyLineJoin(this);var f=this.getAbsoluteTransform(e).getMatrix();r.transform(f[0],f[1],f[2],f[3],f[4],f[5]),l.call(this,r,this),r.restore();var g=n.pixelRatio;h&&o._applyShadow(this),o._applyOpacity(this),o._applyGlobalCompositeOperation(this),o.drawImage(n._canvas,0,0,n.width/g,n.height/g)}else{if(o._applyLineJoin(this),!c){f=this.getAbsoluteTransform(e).getMatrix();o.transform(f[0],f[1],f[2],f[3],f[4],f[5]),o._applyOpacity(this),o._applyGlobalCompositeOperation(this)}h&&o._applyShadow(this),l.call(this,o,this)}
1return o.restore(),this}drawHit(t,e,n=!1){if(!this.shouldDrawHit(e,n))return this;var r=this.getLayer(),a=t||r.hitCanvas,o=a&&a.getContext(),s=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){o.save();var u=this.getAbsoluteTransform(e).getMatrix();return o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(o),o.restore(),this}if(!s)return this;o.save(),o._applyLineJoin(this);if(!(this===e)){var c=this.getAbsoluteTransform(e).getMatrix();o.transform(c[0],c[1],c[2],c[3],c[4],c[5])}return s.call(this,o,this),o.restore(),this}drawHitFromCache(t=0){var e,n,r,a,o,s=this._getCanvasCache(),l=this._getCachedSceneCanvas(),h=s.hit,u=h.getContext(),c=h.getWidth(),d=h.getHeight();u.clear(),u.drawImage(l._canvas,0,0,c,d);try{for(r=(n=(e=u.getImageData(0,0,c,d)).data).length,a=i.Util._hexToRgb(this.colorKey),o=0;o<r;o+=4)n[o+3]>t?(n[o]=a.r,n[o+1]=a.g,n[o+2]=a.b,n[o+3]=255):n[o+3]=0;u.putImageData(e,0,0)}catch(f){i.Util.error("Unable to draw hit graph from cached scene canvas. "+f.message)}return this}hasPointerCapture(t){return h.hasPointerCapture(t,this)}setPointerCapture(t){h.setPointerCapture(t,this)}releaseCapture(t){h.releaseCapture(t,this)}}e.Shape=m,m.prototype._fillFunc=function(t){const e=this.attrs.fillRule;e?t.fill(e):t.fill()},m.prototype._strokeFunc=function(t){t.stroke()},m.prototype._fillFuncHit=function(t){t.fill()},m.prototype._strokeFuncHit=function(t){t.stroke()},m.prototype._centroid=!1,m.prototype.nodeType="Shape",(0,l._registerNode)(m),m.prototype.eventListeners={},m.prototype.on.call(m.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(u)})),m.prototype.on.call(m.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(c)})),m.prototype.on.call(m.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)})),m.prototype.on.call(m.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",(function(){this._clearCache(f)})),m.prototype.on.call(m.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",(function(){this._clearCache(g)})),a.Factory.addGetterSetter(m,"stroke",void 0,(0,s.getStringOrGradientValidator)()),a.Factory.addGetterSetter(m,"strokeWidth",2,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"fillAfterStrokeEnabled",!1),a.Factory.addGetterSetter(m,"hitStrokeWidth","auto",(0,s.getNumberOrAutoValidator)()),a.Factory.addGetterSetter(m,"strokeHitEnabled",!0,(0,s.getBooleanValidator)()),a.Factory.addGetterSetter(m,"perfectDrawEnabled",!0,(0,s.getBooleanValidator)()),a.Factory.addGetterSetter(m,"shadowForStrokeEnabled",!0,(0,s.getBooleanValidator)()),a.Factory.addGetterSetter(m,"lineJoin"),a.Factory.addGetterSetter(m,"lineCap"),a.Factory.addGetterSetter(m,"sceneFunc"),a.Factory.addGetterSetter(m,"hitFunc"),a.Factory.addGetterSetter(m,"dash"),a.Factory.addGetterSetter(m,"dashOffset",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"shadowColor",void 0,(0,s.getStringValidator)()),a.Factory.addGetterSetter(m,"shadowBlur",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"shadowOpacity",1,(0,s.getNumberValidator)()),a.Factory.addComponentsGetterSetter(m,"shadowOffset",["x","y"]),a.Factory.addGetterSetter(m,"shadowOffsetX",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"shadowOffsetY",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"fillPatternImage"),a.Factory.addGetterSetter(m,"fill",void 0,(0,s.getStringOrGradientValidator)()),a.Factory.addGetterSetter(m,"fillPatternX",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"fillPatternY",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"fillLinearGradientColorStops"),a.Factory.addGetterSetter(m,"strokeLinearGradientColorStops"),a.Factory.addGetterSetter(m,"fillRadialGradientStartRadius",0),a.Factory.addGetterSetter(m,"fillRadialGradientEndRadius",0),a.Factory.addGetterSetter(m,"fillRadialGradientColorStops"),a.Factory.addGetterSetter(m,"fillPatternRepeat","repeat"),a.Factory.addGetterSetter(m,"fillEnabled",!0),a.Factory.addGetterSetter(m,"strokeEnabled",!0),a.Factory.addGetterSetter(m,"shadowEnabled",!0),a.Factory.addGetterSetter(m,"dashEnabled",!0),a.Factory.addGetterSetter(m,"strokeScaleEnabled",!0),a.Factory.addGetterSetter(m,"fillPriority","color"),a.Factory.addComponentsGetterSetter(m,"fillPatternOffset",["x","y"]),a.Factory.addGetterSetter(m,"fillPatternOffsetX",0,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"fillPatternOffsetY",0,(0,s.getNumberValidator)()),a.Factory.addComponentsGetterSetter(m,"fillPatternScale",["x","y"]),a.Factory.addGetterSetter(m,"fillPatternScaleX",1,(0,s.getNumberValidator)()),a.Factory.addGetterSetter(m,"fillPatternScaleY",1,(0,s.getNumberValidator)()),a.Factory.addComponentsGetterSetter(m,"fillLinearGradientStartPoint",["x","y"]),a.Factory.addComponentsGetterSetter(m,"strokeLinearGradientStartPoint",["x","y"]),a.Factory.addGetterSetter(m,"fillLinearGradientStartPointX",0),a.Factory.addGetterSetter(m,"strokeLinearGradientStartPointX",0),a.Factory.addGetterSetter(m,"fillLinearGradientStartPointY",0),a.Factory.addGetterSetter(m,"strokeLinearGradientStartPointY",0),a.Factory.addComponentsGetterSetter(m,"fillLinearGradientEndPoint",["x","y"]),a.Factory.addComponentsGetterSetter(m,"strokeLinearGradientEndPoint",["x","y"]),a.Factory.addGetterSetter(m,"fillLinearGradientEndPointX",0),a.Factory.addGetterSetter(m,"strokeLinearGradientEndPointX",0),a.Factory.addGetterSetter(m,"fillLinearGradientEndPointY",0),a.Factory.addGetterSetter(m,"strokeLinearGradientEndPointY",0),a.Factory.addComponentsGetterSetter(m,"fillRadialGradientStartPoint",["x","y"]),a.Factory.addGetterSetter(m,"fillRadialGradientStartPointX",0),a.Factory.addGetterSetter(m,"fillRadialGradientStartPointY",0),a.Factory.addComponentsGetterSetter(m,"fillRadialGradientEndPoint",["x","y"]),a.Factory.addGetterSetter(m,"fillRadialGradientEndPointX",0),a.Factory.addGetterSetter(m,"fillRadialGradientEndPointY",0),a.Factory.addGetterSetter(m,"fillPatternRotation",0),a.Factory.addGetterSetter(m,"fillRule",void 0,(0,s.getStringValidator)()),a.Factory.backCompat(m,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})},28342:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;const r=n(68588),i=n(1455),a=n(28783),o=n(54417),s=n(34842),l=n(70210),h=n(54417),u=n(98479);var c="mouseleave",d="mouseover",f="mouseenter",g="mousemove",p="mousedown",v="mouseup",m="pointermove",y="pointerdown",b="pointerup",_="pointercancel",S="pointerout",x="pointerleave",C="pointerover",w="pointerenter",k="contextmenu",P="touchstart",T="touchend",E="touchmove",F="touchcancel",N="wheel",M=[[f,"_pointerenter"],[p,"_pointerdown"],[g,"_pointermove"],[v,"_pointerup"],[c,"_pointerleave"],[P,"_pointerdown"],[E,"_pointermove"],[T,"_pointerup"],[F,"_pointercancel"],[d,"_pointerover"],[N,"_wheel"],[k,"_contextmenu"],[y,"_pointerdown"],[m,"_pointermove"],[b,"_pointerup"],[_,"_pointercancel"],["lostpointercapture","_lostpointercapture"]];const A={mouse:{[S]:"mouseout",[x]:c,[C]:d,[w]:f,[m]:g,[y]:p,[b]:v,[_]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[S]:"touchout",[x]:"touchleave",[C]:"touchover",[w]:"touchenter",[m]:E,[y]:P,[b]:T,[_]:F,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[S]:S,[x]:x,[C]:C,[w]:w,[m]:m,[y]:y,[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?o.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=[];
1class 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){if("."===t.charAt(0)){var e=t.slice(1);t=document.getElementsByClassName(e)[0]}else{var n;n="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(n)}if(!t)throw"Can not find container in document with id "+n}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(){var t,e=this.children,n=e.length;for(t=0;t<n;t++)e[t].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();var t=this.content;t&&r.Util._isInDocument(t)&&this.container().removeChild(t);var 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();var e=new s.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()){var 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;var e,n=this.children;for(e=n.length-1;e>=0;e--){const r=n[e].getIntersection(t);if(r)return r}return null}_resizeDOM(){var 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(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}super.add(t);var i=this.children.length;return i>5&&r.Util.warn("The stage has "+i+" 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(),o.Konva.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return u.hasPointerCapture(t,this)}setPointerCapture(t){u.setPointerCapture(t,this)}releaseCapture(t){u.releaseCapture(t,this)}getLayers(){return this.children}_bindContentEvents(){o.Konva.isBrowser&&M.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){this.setPointersPositions(t);var r=this._getTargetShape(n),i=!l.DD.isDragging||o.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){this.setPointersPositions(t);var r=!1;this._changedPointerPositions.forEach((i=>{var a=this.getIntersection(i);if(l.DD.justDragged=!1,o.Konva["_"+n+"ListenClick"]=!0,!a||!a.isListening())return;o.Konva.capturePointerEventsEnabled&&a.setPointerCapture(i.id),this[n+"ClickStartShape"]=a,a._fireAndBubble(e.pointerdown,{evt:t,pointerId:i.id}),r=!0;const s=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&s&&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(l.DD.isDragging&&l.DD.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t),!(!l.DD.isDragging||o.Konva.hitOnDragEnabled))return;var r={};let i=!1;var a=this._getTargetShape(n);this._changedPointerPositions.forEach((o=>{const s=u.getCapturedShape(o.id)||this.getIntersection(o),l=o.id,h={evt:t,pointerId:l};var c=a!==s;if(c&&a&&(a._fireAndBubble(e.pointerout,{...h},s),a._fireAndBubble(e.pointerleave,{...h},s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(i=!0,c&&(s._fireAndBubble(e.pointerover,{...h},a),s._fireAndBubble(e.pointerenter,{...h},a),this[n+"targetShape"]=s),s._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"];var a={};let s=!1;this._changedPointerPositions.forEach((h=>{const c=u.getCapturedShape(h.id)||this.getIntersection(h);if(c){if(c.releaseCapture(h.id),a[c._id])return;a[c._id]=!0}const d=h.id,f={evt:t,pointerId:d};let g=!1;o.Konva["_"+n+"InDblClickWindow"]?(g=!0,clearTimeout(this[n+"DblTimeout"])):l.DD.justDragged||(o.Konva["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout((function(){o.Konva["_"+n+"InDblClickWindow"]=!1}
1),o.Konva.dblClickWindow),c&&c.isListening()?(s=!0,this[n+"ClickEndShape"]=c,c._fireAndBubble(e.pointerup,{...f}),o.Konva["_"+n+"ListenClick"]&&r&&r===c&&(c._fireAndBubble(e.pointerclick,{...f}),g&&i&&i===c&&c._fireAndBubble(e.pointerdblclick,{...f}))):(this[n+"ClickEndShape"]=null,o.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}))})),s||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o.Konva["_"+n+"ListenClick"]=!1,t.cancelable&&"touch"!==n&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var 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);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(N,{evt:t}):this._fire(N,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const e=u.getCapturedShape(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(b,u.createEvent(t)),u.releaseCapture(t.pointerId)}_lostpointercapture(t){u.releaseCapture(t.pointerId)}setPointersPositions(t){var e=this._getContentPosition(),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};var 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 s.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),o.Konva.isBrowser){var 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}
1batchDraw(){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")},48017:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;const r=n(68588),i=n(16745),a=n(77939),o=n(54417);var s={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l=0,h=["fill","stroke","shadowColor"];class u{constructor(t,e,n,r,i,a,o){this.prop=t,this.propFunc=e,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(t){var 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(){var 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 c{constructor(t){var n,a,h=this,d=t.node,f=d._id,g=t.easing||e.Easings.Linear,p=!!t.yoyo;n="undefined"===typeof t.duration?.3:0===t.duration?.001:t.duration,this.node=d,this._id=l++;var v=d.getLayer()||(d instanceof o.Konva.Stage?d.getLayers():null);for(a in v||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(){h.tween.onEnterFrame()}),v),this.tween=new u(a,(function(t){h._tweenFunc(t)}),g,0,1,1e3*n,p),this._addListeners(),c.attrs[f]||(c.attrs[f]={}),c.attrs[f][this._id]||(c.attrs[f][this._id]={}),c.tweens[f]||(c.tweens[f]={}),t)void 0===s[a]&&this._addAttr(a,t[a]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,e){var n,i,a,o,s,l,u,d,f=this.node,g=f._id;if((a=c.tweens[g][t])&&delete c.attrs[g][a][t],n=f.getAttr(t),r.Util._isArray(e))if(i=[],s=Math.max(e.length,n.length),"points"===t&&e.length!==n.length&&(e.length>n.length?(u=n,n=r.Util._prepareArrayForTween(n,e,f.closed())):(l=e,e=r.Util._prepareArrayForTween(e,n,f.closed()))),0===t.indexOf("fill"))for(o=0;o<s;o++)if(o%2===0)i.push(e[o]-n[o]);else{var p=r.Util.colorToRGBA(n[o]);d=r.Util.colorToRGBA(e[o]),n[o]=p,i.push({r:d.r-p.r,g:d.g-p.g,b:d.b-p.b,a:d.a-p.a})}else for(o=0;o<s;o++)i.push(e[o]-n[o]);else-1!==h.indexOf(t)?(n=r.Util.colorToRGBA(n),i={r:(d=r.Util.colorToRGBA(e)).r-n.r,g:d.g-n.g,b:d.b-n.b,a:d.a-n.a}):i=e-n;c.attrs[g][this._id][t]={start:n,diff:i,end:e,trueEnd:l,trueStart:u},c.tweens[g][t]=this._id}_tweenFunc(t){var e,n,i,a,o,s,l,u,d=this.node,f=c.attrs[d._id][this._id];for(e in f){if(i=(n=f[e]).start,a=n.diff,u=n.end,r.Util._isArray(i))if(o=[],l=Math.max(i.length,u.length),0===e.indexOf("fill"))for(s=0;s<l;s++)s%2===0?o.push((i[s]||0)+a[s]*t):o.push("rgba("+Math.round(i[s].r+a[s].r*t)+","+Math.round(i[s].g+a[s].g*t)+","+Math.round(i[s].b+a[s].b*t)+","+(i[s].a+a[s].a*t)+")");else for(s=0;s<l;s++)o.push((i[s]||0)+a[s]*t);else o=-1!==h.indexOf(e)?"rgba("+Math.round(i.r+a.r*t)+","+Math.round(i.g+a.g*t)+","+Math.round(i.b+a.b*t)+","+(i.a+a.a*t)+")":i+a*t;d.setAttr(e,o)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,e=c.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=()=>{var t=this.node,e=c.attrs[t._id][this._id];e.points&&e.points.trueStart&&t.points(e.points.trueStart),this.onReset&&this.onReset()}
1,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(){var t,e=this.node._id,n=this._id,r=c.tweens[e];for(t in this.pause(),r)delete c.tweens[e][t];delete c.attrs[e][n]}}e.Tween=c,c.attrs={},c.tweens={},a.Node.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new c(t).play()},e.Easings={BackEaseIn(t,e,n,r){var i=1.70158;return n*(t/=r)*t*((i+1)*t-i)+e},BackEaseOut(t,e,n,r){var i=1.70158;return n*((t=t/r-1)*t*((i+1)*t+i)+1)+e},BackEaseInOut(t,e,n,r){var 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){var o=0;return 0===t?e:1===(t/=r)?e+n:(a||(a=.3*r),!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t*r-o)*(2*Math.PI)/a)+e)},ElasticEaseOut(t,e,n,r,i,a){var o=0;return 0===t?e:1===(t/=r)?e+n:(a||(a=.3*r),!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*t)*Math.sin((t*r-o)*(2*Math.PI)/a)+n+e)},ElasticEaseInOut(t,e,n,r,i,a){var o=0;return 0===t?e:2===(t/=r/2)?e+n:(a||(a=r*(.3*1.5)),!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t*r-o)*(2*Math.PI)/a)*-.5+e:i*Math.pow(2,-10*(t-=1))*Math.sin((t*r-o)*(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}},68588:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const r=n(54417);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){var 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){var 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,o=this.m[1]*-n+this.m[3]*e;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,e){var 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){var 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],o=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]=o,this}invert(){var 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]),o=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]=o,this}getMatrix(){return this.m}decompose(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],a=t*i-n*r;let o={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=n){var s=Math.sqrt(t*t+n*n);o.rotation=n>0?Math.acos(t/s):-Math.acos(t/s),o.scaleX=s,o.scaleY=a/s,o.skewX=(t*r+n*i)/a,o.skewY=0}else if(0!=r||0!=i){var l=Math.sqrt(r*r+i*i);o.rotation=Math.PI/2-(i>0?Math.acos(-r/l):-Math.acos(r/l)),o.scaleX=a/l,o.scaleY=l,o.skewX=0,o.skewY=(t*r+n*i)/a}return o.rotation=e.Util._getRotation(o.rotation),o}}e.Transform=i;var a=Math.PI/180,o=180/Math.PI,s="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],ol
1ive:[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})\)/,u=[];const c="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;var e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign:t=>0===t||t>0?1:-1,requestAnimFrame(t){u.push(t),1===u.length&&c((function(){const t=u;u=[],t.forEach((function(t){t()}))}))},createCanvasElement(){var t=document.createElement("canvas");try{t.style=t.style||{}}catch(e){}return t},createImageElement:()=>document.createElement("img"),_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,n){var 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("#","");var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor(){for(var t=(16777215*Math.random()<<0).toString(16);t.length<6;)t="0"+t;return"#"+t},getRGB(t){var e;return t in l?{r:(e=l[t])[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){var 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(")){var 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(")){var 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 o,s,l;if(0===i)return l=255*a,{r:Math.round(l),g:Math.round(l),b:Math.round(l),a:1};o=a<.5?a*(1+i):a+i-a*i;const h=2*a-o,u=[0,0,0];for(let t=0;t<3;t++)s=r+1/3*-(t-1),s<0&&s++,s>
11&&s--,l=6*s<1?h+6*(o-h)*s:2*s<1?o:3*s<2?h+(o-h)*(2/3-s)*6:h,u[t]=255*l;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[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){var e={};for(var 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*o,_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(s+t)},error(t){console.error(s+t)},warn(t){r.Konva.showWarnings&&console.warn("Konva warning: "+t)},each(t,e){for(var n in t)e(n,t[n])},_inRange:(t,e,n)=>e<=t&&t<n,_getProjectionToSegment(t,e,n,r,i,a){var o,s,l,h=(t-n)*(t-n)+(e-r)*(e-r);if(0==h)o=t,s=e,l=(i-n)*(i-n)+(a-r)*(a-r);else{var u=((i-t)*(n-t)+(a-e)*(r-e))/h;u<0?(o=t,s=e,l=(t-i)*(t-i)+(e-a)*(e-a)):u>1?(o=n,s=r,l=(n-i)*(n-i)+(r-a)*(r-a)):l=((o=t+u*(n-t))-i)*(o-i)+((s=e+u*(r-e))-a)*(s-a)}return[o,s,l]},_getProjectionToLine(t,n,r){var i=e.Util.cloneObject(t),a=Number.MAX_VALUE;return n.forEach((function(o,s){if(r||s!==n.length-1){var l=n[(s+1)%n.length],h=e.Util._getProjectionToSegment(o.x,o.y,l.x,l.y,t.x,t.y),u=h[0],c=h[1],d=h[2];d<a&&(i.x=u,i.y=c,a=d)}})),i},_prepareArrayForTween(t,n,r){var i,a=[],o=[];if(t.length>n.length){var s=n;n=t,t=s}for(i=0;i<t.length;i+=2)a.push({x:t[i],y:t[i+1]});for(i=0;i<n.length;i+=2)o.push({x:n[i],y:n[i+1]});var l=[];return o.forEach((function(t){var n=e.Util._getProjectionToLine(t,a,r);l.push(n.x),l.push(n.y)})),l},_prepareToStringify(t){var n;for(var r in t.visitedByCircularReferenceRemoval=!0,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(var 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,o=0,s=0;"number"===typeof r?i=a=o=s=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),s=Math.min(r[2]||0,e/2,n/2),o=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-s),t.arc(e-s,n-s,s,0,Math.PI/2,!1),t.lineTo(o,n),t.arc(o,n-o,o,Math.PI/2,Math.PI,!1),t.lineTo(0,i),t.arc(i,i,i,Math.PI,3*Math.PI/2,!1)}}},53774:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getComponentValidator=e.getBooleanValidator=e.getNumberArrayValidator=e.getFunctionValidator=e.getStringOrGradientValidator=e.getStringValidator=e.getNumberOrAutoValidator=e.getNumberOrArrayOfNumbersValidator=e.getNumberValidator=e.alphaComponent=e.RGBComponent=void 0;const r=n(54417),i=n(68588);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)}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 val
1id 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),o=i.Util._isArray(e)&&e.length==t;return r||o||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 val
1id 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 void 0===e||null===e||i.Util.isObject(e)||i.Util.warn(a(e)+' is a not val
1id value for "'+n+'" attribute. The value should be an object with properties '+t),e}}},3986:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const r=n(54417),i=n(68588),a=n(77939),o=n(28783),s=n(28342),l=n(44415),h=n(73980),u=n(58985),c=n(70210),d=n(97955),f=n(16745),g=n(48017),p=n(23442),v=n(34842);e.Konva=i.Util._assign(r.Konva,{Util:i.Util,Transform:i.Transform,Node:a.Node,Container:o.Container,Stage:s.Stage,stages:s.stages,Layer:l.Layer,FastLayer:h.FastLayer,Group:u.Group,DD:c.DD,Shape:d.Shape,shapes:d.shapes,Animation:f.Animation,Tween:g.Tween,Easings:g.Easings,Context:p.Context,Canvas:v.Canvas}),e.default=e.Konva},52076:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;const r=n(3986),i=n(90119),a=n(22064),o=n(7643),s=n(30535),l=n(71298),h=n(56067),u=n(27149),c=n(87339),d=n(75244),f=n(31785),g=n(60657),p=n(88986),v=n(71964),m=n(23787),y=n(82831),b=n(29516),_=n(29846),S=n(52527),x=n(6672),C=n(35309),w=n(71695),k=n(89621),P=n(61179),T=n(67194),E=n(3925),F=n(15751),N=n(66588),M=n(73565),A=n(25929),R=n(47233),D=n(18590),L=n(18280),I=n(3438),O=n(36703),G=n(71665),z=n(31863);e.Konva=r.Konva.Util._assign(r.Konva,{Arc:i.Arc,Arrow:a.Arrow,Circle:o.Circle,Ellipse:s.Ellipse,Image:l.Image,Label:h.Label,Tag:h.Tag,Line:u.Line,Path:c.Path,Rect:d.Rect,RegularPolygon:f.RegularPolygon,Ring:g.Ring,Sprite:p.Sprite,Star:v.Star,Text:m.Text,TextPath:y.TextPath,Transformer:b.Transformer,Wedge:_.Wedge,Filters:{Blur:S.Blur,Brighten:x.Brighten,Contrast:C.Contrast,Emboss:w.Emboss,Enhance:k.Enhance,Grayscale:P.Grayscale,HSL:T.HSL,HSV:E.HSV,Invert:F.Invert,Kaleidoscope:N.Kaleidoscope,Mask:M.Mask,Noise:A.Noise,Pixelate:R.Pixelate,Posterize:D.Posterize,RGB:L.RGB,RGBA:I.RGBA,Sepia:O.Sepia,Solarize:G.Solarize,Threshold:z.Threshold}})},52527:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Blur=void 0;const r=n(1455),i=n(77939),a=n(53774);function o(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var s=[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,39
16,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){var e=Math.round(this.blurRadius());e>0&&function(t,e){var n,r,i,a,h,u,c,d,f,g,p,v,m,y,b,_,S,x,C,w,k,P,T,E,F=t.data,N=t.width,M=t.height,A=e+e+1,R=N-1,D=M-1,L=e+1,I=L*(L+1)/2,O=new o,G=null,z=O,U=null,B=null,H=s[e],V=l[e];for(i=1;i<A;i++)z=z.next=new o,i===L&&(G=z);for(z.next=O,c=u=0,r=0;r<M;r++){for(_=S=x=C=d=f=g=p=0,v=L*(w=F[u]),m=L*(k=F[u+1]),y=L*(P=F[u+2]),b=L*(T=F[u+3]),d+=I*w,f+=I*k,g+=I*P,p+=I*T,z=O,i=0;i<L;i++)z.r=w,z.g=k,z.b=P,z.a=T,z=z.next;for(i=1;i<L;i++)a=u+((R<i?R:i)<<2),d+=(z.r=w=F[a])*(E=L-i),f+=(z.g=k=F[a+1])*E,g+=(z.b=P=F[a+2])*E,p+=(z.a=T=F[a+3])*E,_+=w,S+=k,x+=P,C+=T,z=z.next;for(U=O,B=G,n=0;n<N;n++)F[u+3]=T=p*H>>V,0!==T?(T=255/T,F[u]=(d*H>>V)*T,F[u+1]=(f*H>>V)*T,F[u+2]=(g*H>>V)*T):F[u]=F[u+1]=F[u+2]=0,d-=v,f-=m,g-=y,p-=b,v-=U.r,m-=U.g,y-=U.b,b-=U.a,a=c+((a=n+e+1)<R?a:R)<<2,d+=_+=U.r=F[a],f+=S+=U.g=F[a+1],g+=x+=U.b=F[a+2],p+=C+=U.a=F[a+3],U=U.next,v+=w=B.r,m+=k=B.g,y+=P=B.b,b+=T=B.a,_-=w,S-=k,x-=P,C-=T,B=B.next,u+=4;c+=N}for(n=0;n<N;n++){for(S=x=C=_=f=g=p=d=0,v=L*(w=F[u=n<<2]),m=L*(k=F[u+1]),y=L*(P=F[u+2]),b=L*(T=F[u+3]),d+=I*w,f+=I*k,g+=I*P,p+=I*T,z=O,i=0;i<L;i++)z.r=w,z.g=k,z.b=P,z.a=T,z=z.next;for(h=N,i=1;i<=e;i++)u=h+n<<2,d+=(z.r=w=F[u])*(E=L-i),f+=(z.g=k=F[u+1])*E,g+=(z.b=P=F[u+2])*E,p+=(z.a=T=F[u+3])*E,_+=w,S+=k,x+=P,C+=T,z=z.next,i<D&&(h+=N);for(u=n,U=O,B=G,r=0;r<M;r++)F[3+(a=u<<2)]=T=p*H>>V,T>0?(T=255/T,F[a]=(d*H>>V)*T,F[a+1]=(f*H>>V)*T,F[a+2]=(g*H>>V)*T):F[a]=F[a+1]=F[a+2]=0,d-=v,f-=m,g-=y,p-=b,v-=U.r,m-=U.g,y-=U.b,b-=U.a,a=n+((a=r+L)<D?a:D)*N<<2,d+=_+=U.r=F[a],f+=S+=U.g=F[a+1],g+=x+=U.b=F[a+2],p+=C+=U.a=F[a+3],U=U.next,v+=w=B.r,m+=k=B.g,y+=P=B.b,b+=T=B.a,_-=w,S-=k,x-=P,C-=T,B=B.next,u+=N}}(t,e)},r.Factory.addGetterSetter(i.Node,"blurRadius",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},6672:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Brighten=void 0;const r=n(1455),i=n(77939),a=n(53774);e.Brighten=function(t){var e,n=255*this.brightness(),r=t.data,i=r.length;for(e=0;e<i;e+=4)r[e]+=n,r[e+1]+=n,r[e+2]+=n},r.Factory.addGetterSetter(i.Node,"brightness",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},35309:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Contrast=void 0;const r=n(1455),i=n(77939),a=n(53774);e.Contrast=function(t){var e,n=Math.pow((this.contrast()+100)/100,2),r=t.data,i=r.length,a=150,o=150,s=150;for(e=0;e<i;e+=4)a=r[e],o=r[e+1],s=r[e+2],a/=255,a-=.5,a*=n,a+=.5,o/=255,o-=.5,o*=n,o+=.5,s/=255,s-=.5,s*=n,s+=.5,a=(a*=255)<0?0:a>255?255:a,o=(o*=255)<0?0:o>255?255:o,s=(s*=255)<0?0:s>255?255:s,r[e]=a,r[e+1]=o,r[e+2]=s},r.Factory.addGetterSetter(i.Node,"contrast",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},71695:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emboss=void 0;const r=n(1455),i=n(77939),a=n(68588),o=n(53774);e.Emboss=function(t){var e=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),i=this.embossBlend(),o=0,s=0,l=t.data,h=t.width,u=t.height,c=4*h,d=u;switch(r){case"top-left":o=-1,s=-1;break;case"top":o=-1,s=0;break;case"top-right":o=-1,s=1;break;case"right":o=0,s=1;break;case"bottom-right":o=1,s=1;break;case"bottom":o=1,s=0;break;case"bottom-left":o=1,s=-1;break;case"left":o=0,s=-1;break;default:a.Util.error("Unknown emboss direction: "+r)}do{var f=(d-1)*c,g=o;d+g<1&&(g=0),d+g>u&&(g=0);var p=(d-1+g)*h*4,v=h;do{var m=f+4*(v-1),y=s;v+y<1&&(y=0),v+y>h&&(y=0);var b=p+4*(v-1+y),_=l[m]-l[b],S=l[m+1]-l[b+1],x=l[m+2]-l[b+2],C=_,w=C>0?C:-C;if((S>0?S:-S)>w&&(C=S),(x>0?x:-x)>w&&(C=x),C*=e,i){var k=l[m]+C,P=l[m+1]+C,T=l[m+2]+C;l[m]=k>255?255:k<0?0:k,l[m+1]=P>255?255:P<0?0:P,l[m+2]=T>255?255:T<0?0:T}else{var E=n-C;E<0?E=0:E>255&&(E=255),l[m]=l[m+1]=l[m+2]=E}}while(--v)}while(--d)},r.Factory.addGetterSetter(i.Node,"embossStrength",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossDirection","top-left",null,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossBlend",!1,null,r.Factory.afterSetFilter)}
1,89621:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Enhance=void 0;const r=n(1455),i=n(77939),a=n(53774);function o(t,e,n,r,i){var a=n-e,o=i-r;return 0===a?r+o/2:0===o?r:o*((t-e)/a)+r}e.Enhance=function(t){var e,n,r,i,a=t.data,s=a.length,l=a[0],h=l,u=a[1],c=u,d=a[2],f=d,g=this.enhance();if(0!==g){for(i=0;i<s;i+=4)(e=a[i+0])<l?l=e:e>h&&(h=e),(n=a[i+1])<u?u=n:n>c&&(c=n),(r=a[i+2])<d?d=r:r>f&&(f=r);var p,v,m,y,b,_,S,x,C;for(h===l&&(h=255,l=0),c===u&&(c=255,u=0),f===d&&(f=255,d=0),g>0?(v=h+g*(255-h),m=l-g*(l-0),b=c+g*(255-c),_=u-g*(u-0),x=f+g*(255-f),C=d-g*(d-0)):(v=h+g*(h-(p=.5*(h+l))),m=l+g*(l-p),b=c+g*(c-(y=.5*(c+u))),_=u+g*(u-y),x=f+g*(f-(S=.5*(f+d))),C=d+g*(d-S)),i=0;i<s;i+=4)a[i+0]=o(a[i+0],l,h,m,v),a[i+1]=o(a[i+1],u,c,_,b),a[i+2]=o(a[i+2],d,f,C,x)}},r.Factory.addGetterSetter(i.Node,"enhance",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},61179:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Grayscale=void 0;e.Grayscale=function(t){var e,n,r=t.data,i=r.length;for(e=0;e<i;e+=4)n=.34*r[e]+.5*r[e+1]+.16*r[e+2],r[e]=n,r[e+1]=n,r[e+2]=n}},67194:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSL=void 0;const r=n(1455),i=n(77939),a=n(53774);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){var e,n,r,i,a,o=t.data,s=o.length,l=Math.pow(2,this.saturation()),h=Math.abs(this.hue()+360)%360,u=127*this.luminance(),c=1*l*Math.cos(h*Math.PI/180),d=1*l*Math.sin(h*Math.PI/180),f=.299+.701*c+.167*d,g=.587-.587*c+.33*d,p=.114-.114*c-.497*d,v=.299-.299*c-.328*d,m=.587+.413*c+.035*d,y=.114-.114*c+.293*d,b=.299-.3*c+1.25*d,_=.587-.586*c-1.05*d,S=.114+.886*c-.2*d;for(e=0;e<s;e+=4)n=o[e+0],r=o[e+1],i=o[e+2],a=o[e+3],o[e+0]=f*n+g*r+p*i+u,o[e+1]=v*n+m*r+y*i+u,o[e+2]=b*n+_*r+S*i+u,o[e+3]=a}},3925:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSV=void 0;const r=n(1455),i=n(77939),a=n(53774);e.HSV=function(t){var e,n,r,i,a,o=t.data,s=o.length,l=Math.pow(2,this.value()),h=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,c=l*h*Math.cos(u*Math.PI/180),d=l*h*Math.sin(u*Math.PI/180),f=.299*l+.701*c+.167*d,g=.587*l-.587*c+.33*d,p=.114*l-.114*c-.497*d,v=.299*l-.299*c-.328*d,m=.587*l+.413*c+.035*d,y=.114*l-.114*c+.293*d,b=.299*l-.3*c+1.25*d,_=.587*l-.586*c-1.05*d,S=.114*l+.886*c-.2*d;for(e=0;e<s;e+=4)n=o[e+0],r=o[e+1],i=o[e+2],a=o[e+3],o[e+0]=f*n+g*r+p*i,o[e+1]=v*n+m*r+y*i,o[e+2]=b*n+_*r+S*i,o[e+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)},15751:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Invert=void 0;e.Invert=function(t){var e,n=t.data,r=n.length;for(e=0;e<r;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2]}},66588:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Kaleidoscope=void 0;const r=n(1455),i=n(77939),a=n(68588),o=n(53774);e.Kaleidoscope=function(t){var e,n,r,i,o,s,l,h,u,c=t.width,d=t.height,f=Math.round(this.kaleidoscopePower()),g=Math.round(this.kaleidoscopeAngle()),p=Math.floor(c*(g%360)/360);if(!(f<1)){var v=a.Util.createCanvasElement();v.width=c,v.height=d;var m=v.getContext("2d").getImageData(0,0,c,d);a.Util.releaseCanvas(v),function(t,e,n){var r,i,a,o,s=t.data,l=e.data,h=t.width,u=t.height,c=n.polarCenterX||h/2,d=n.polarCenterY||u/2,f=0,g=0,p=0,v=0,m=Math.sqrt(c*c+d*d);i=h-c,a=u-d,m=(o=Math.sqrt(i*i+a*a))>m?o:m;var y,b,_,S,x=u,C=h,w=360/C*Math.PI/180;for(b=0;b<C;b+=1)for(_=Math.sin(b*w),S=Math.cos(b*w),y=0;y<x;y+=1)i=Math.floor(c+m*y/x*S),f=s[0+(r=4*((a=Math.floor(d+m*y/x*_))*h+i))],g=s[r+1],p=s[r+2],v=s[r+3],l[0+(r=4*(b+y*h))]=f,l[r+1]=g,l[r+2]=p,l[r+3]=v}(t,m,{polarCenterX:c/2,polarCenterY:d/2});for(var y=c/Math.pow(2,f);y<=8;)y*=2,f-=1;var b=y=Math.ceil(y),_=0,S=b,x=1;for(p+y>c&&(_=b,S=0,x=-1),n=0;n<d;n+=1)for(e=_;e!==S;e+=x)h=4*(c*n+Math.round(e+p)%c),i=m.data[h+0],o=m.data[h+1],s=m.data[h+2],l=m.data[h+3],u=4*(c*n+e),m.data[u+0]=i,m.data[u+1]=o,m.data[u+2]=s,m.data[u+3]=l;for(n=0;n<d;n+=1)for(b=Math.floor(y),r=0;r<f;r+=1){for(e=0;e<b+1;e+=1)h=4*(c*n+e),i=m.data[h+0],o=m.data[h+1],s=m.data[h+2],l=m.data[h+3],u=4*(c*n+2*b-e-1),m.data[u+0]=i,m.data[u+1]=o,m.data[u+2]=s,m.data[u+3]=l;b*=2}!function(t,e,n){var r,i,a,o,s,l,h=t.data,u=e.data,c=t.width,d=t.height,f=n.polarCenterX||c/2,g=n.polarCenterY||d/2,p=0,v=0,m=0,y=0,b=Math.sqrt(f*f+g*g);i=c-f,a=d-g,b=(l=Math.sqrt(i*i+a*a))>b?l:b;var _,S,x,C=d,w=c,k=n.polarRotation||0;for(i=0;i<c;i+=1)for(a=0;a<d;a+=1)o=i-f,s=a-g,_=Math.sqrt(o*o+s*s)*C/b,S=(S=(180*Math.atan2(s,o)/Math.PI+360+k)%360)*w/360,x=Math.floor(S),p=h[0+(r=4*(Math.floor(_)*c+x))],v=h[r+1],m=h[r+2],y=h[r+3],u[0+(r=4*(a*c+i))]=p,u[r+1]=v,u[r+2]=m,u[r+3]=y}(m,t,{polarRotation:0})}},r.Factory.addGetterSetter(i.Node,"kaleidoscopePower",2,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"kaleidoscopeAngle",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},73565:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Mask=void 0;const r=n(1455),i=n(77939),a=n(53774);function o(t,e,n){var r=4*(n*t.width+e),i=[];return i.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),i}function s(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){var e=function(t,e){var n=o(t,0,0),r=o(t,t.width-1,0),i=o(t,0,t.height-1),a=o(t,t.width-1,t.height-1),l=e||10;if(s(n,r)<l&&s(r,a)<l&&s(a,i)<l&&s(i,n)<l){for(var h=function(t){for(var e=[0,0,0],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]),u=[],c=0;c<t.width*t.height;c++){var d=s(h,[t.data[4*c],t.data[4*c+1],t.data[4*c+2]]);u[c]=d<l?0:255}return u}}(t,this.threshold());return e&&function(t,e){for(var n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}(t,e=function(t,e,n){for(var 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),o=[],s=0;s<n;s++)for(var l=0;l<e;l++){for(var h=s*e+l,u=0,c=0;c<i;c++)for(var d=0;d<i;d++){var f=s+c-a,g=l+d-a;if(f>=0&&f<n&&g>=0&&g<e){var p=r[c*i+d];u+=t[f*e+g]*p}}o[h]=u}return o}(e=function(t,e,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var l=0;l<e;l++){for(var h=s*e+l,u=0,c=0;c<i;c++)for(var d=0;d<i;d++){var f=s+c-a,g=l+d-a;if(f>=0&&f<n&&g>=0&&g<e){var p=r[c*i+d];u+=t[f*e+g]*p}}o[h]=u>=1020?255:0}return o}(e=function(t,e,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[],s=0;s<n;s++)for(var l=0;l<e;l++){for(var h=s*e+l,u=0,c=0;c<i;c++)for(var d=0;d<i;d++){var f=s+c-a,g=l+d-a;if(f>=0&&f<n&&g>=0&&g<e){var p=r[c*i+d];u+=t[f*e+g]*p}}o[h]=2040===u?255:0}return o}(e,t.width,t.height),t.width,t.height),t.width,t.height)),t},r.Factory.addGetterSetter(i.Node,"threshold",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},25929:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Noise=void 0;const r=n(1455),i=n(77939),a=n(53774);e.Noise=function(t){var e,n=255*this.noise(),r=t.data,i=r.length,a=n/2;for(e=0;e<i;e+=4)r[e+0]+=a-2*a*Math.random(),r[e+1]+=a-2*a*Math.random(),r[e+2]+=a-2*a*Math.random()},r.Factory.addGetterSetter(i.Node,"noise",.2,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},47233:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pixelate=void 0;const r=n(1455),i=n(68588),a=n(77939),o=n(53774);e.Pixelate=function(t){var e,n,r,a,o,s,l,h,u,c,d,f,g,p,v=Math.ceil(this.pixelSize()),m=t.width,y=t.height,b=Math.ceil(m/v),_=Math.ceil(y/v),S=t.data;if(v<=0)i.Util.error("pixelSize value can not be <= 0");else for(f=0;f<b;f+=1)for(g=0;g<_;g+=1){for(a=0,o=0,s=0,l=0,u=(h=f*v)+v,d=(c=g*v)+v,p=0,e=h;e<u;e+=1)if(!(e>=m))for(n=c;n<d;n+=1)n>=y||(a+=S[(r=4*(m*n+e))+0],o+=S[r+1],s+=S[r+2],l+=S[r+3],p+=1);for(a/=p,o/=p,s/=p,l/=p,e=h;e<u;e+=1)if(!(e>=m))for(n=c;n<d;n+=1)n>=y||(S[(r=4*(m*n+e))+0]=a,S[r+1]=o,S[r+2]=s,S[r+3]=l)}},r.Factory.addGetterSetter(a.Node,"pixelSize",8,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},18590:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Posterize=void 0;const r=n(1455),i=n(77939),a=n(53774);e.Posterize=function(t){var e,n=Math.round(254*this.levels())+1,r=t.data,i=r.length,a=255/n;for(e=0;e<i;e+=1)r[e]=Math.floor(r[e]/a)*a},r.Factory.addGetterSetter(i.Node,"levels",.5,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},18280:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGB=void 0;const r=n(1455),i=n(77939),a=n(53774);e.RGB=function(t){var e,n,r=t.data,i=r.length,a=this.red(),o=this.green(),s=this.blue();for(e=0;e<i;e+=4)n=(.34*r[e]+.5*r[e+1]+.16*r[e+2])/255,r[e]=n*a,r[e+1]=n*o,r[e+2]=n*s,r[e+3]=r[e+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)},3438:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA=void 0;const r=n(1455),i=n(77939),a=n(53774);e.RGBA=function(t){var e,n,r=t.data,i=r.length,a=this.red(),o=this.green(),s=this.blue(),l=this.alpha();for(e=0;e<i;e+=4)n=1-l,r[e]=a*l+r[e]*n,r[e+1]=o*l+r[e+1]*n,r[e+2]=s*l+r[e+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}))},36703:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sepia=void 0;e.Sepia=function(t){var e,n,r,i,a=t.data,o=a.length;for(e=0;e<o;e+=4)n=a[e+0],r=a[e+1],i=a[e+2],a[e+0]=Math.min(255,.393*n+.769*r+.189*i),a[e+1]=Math.min(255,.349*n+.686*r+.168*i),a[e+2]=Math.min(255,.272*n+.534*r+.131*i)}},71665:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Solarize=void 0;e.Solarize=function(t){var e=t.data,n=t.width,r=4*n,i=t.height;do{var a=(i-1)*r,o=n;do{var s=a+4*(o-1),l=e[s],h=e[s+1],u=e[s+2];l>127&&(l=255-l),h>127&&(h=255-h),u>127&&(u=255-u),e[s]=l,e[s+1]=h,e[s+2]=u}while(--o)}while(--i)}},31863:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Threshold=void 0;const r=n(1455),i=n(77939),a=n(53774);e.Threshold=function(t){var e,n=255*this.threshold(),r=t.data,i=r.length;for(e=0;e<i;e+=1)r[e]=r[e]<n?0:255},r.Factory.addGetterSetter(i.Node,"threshold",.5,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},20185:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=n(52076);t.exports=r.Konva},90119:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Arc=void 0;const r=n(1455),i=n(97955),a=n(54417),o=n(53774),s=n(54417);class l extends i.Shape{_sceneFunc(t){var 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)),o=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),s=Math.sin(Math.min(r,Math.PI/2)),l=i*(i>0?t:e),h=o*(o>0?t:e),u=s*(s>0?e:t);return{x:l,y:n?-1*u:h,width:1*e-l,height:u-h}}}e.Arc=l,l.prototype._centroid=!0,l.prototype.className="Arc",l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1,(0,o.getBooleanValidator)())},22064:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Arrow=void 0;const r=n(1455),i=n(27149),a=n(53774),o=n(54417),s=n(87339);class l extends i.Line{_sceneFunc(t){super._sceneFunc(t);var e=2*Math.PI,n=this.points(),r=n,i=0!==this.tension()&&n.length>4;i&&(r=this.getTensionPoints());var a,o,l=this.pointerLength(),h=n.length;if(i){const t=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[h-2],n[h-1]],e=s.Path.calcLength(r[r.length-4],r[r.length-3],"C",t),i=s.Path.getPointOnQuadraticBezier(Math.min(1,1-l/e),t[0],t[1],t[2],t[3],t[4],t[5]);a=n[h-2]-i.x,o=n[h-1]-i.y}else a=n[h-2]-n[h-4],o=n[h-1]-n[h-3];var u=(Math.atan2(o,a)+e)%e,c=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[h-2],n[h-1]),t.rotate(u),t.moveTo(0,0),t.lineTo(-l,c/2),t.lineTo(-l,-c/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),i?(a=(r[0]+r[2])/2-n[0],o=(r[1]+r[3])/2-n[1]):(a=n[2]-n[0],o=n[3]-n[1]),t.rotate((Math.atan2(-o,-a)+e)%e),t.moveTo(0,0),t.lineTo(-l,c/2),t.lineTo(-l,-c/2),t.closePath(),t.restore(
1),this.__fillStroke(t))}__fillStroke(t){var 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-e,y:t.y-e,width:t.width+2*e,height:t.height+2*e}}}e.Arrow=l,l.prototype.className="Arrow",(0,o._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)},7643:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Circle=void 0;const r=n(1455),i=n(97955),a=n(53774),o=n(54417);class s 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=s,s.prototype._centroid=!0,s.prototype.className="Circle",s.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,a.getNumberValidator)())},30535:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ellipse=void 0;const r=n(1455),i=n(97955),a=n(53774),o=n(54417);class s extends i.Shape{_sceneFunc(t){var 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=s,s.prototype.className="Ellipse",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,o._registerNode)(s),r.Factory.addComponentsGetterSetter(s,"radius",["x","y"]),r.Factory.addGetterSetter(s,"radiusX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"radiusY",0,(0,a.getNumberValidator)())},71298:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Image=void 0;const r=n(68588),i=n(1455),a=n(97955),o=n(54417),s=n(53774);class l extends a.Shape{constructor(t){super(t),this.on("imageChange.konva",(()=>{this._setImageLoad()})),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&4===t.readyState||t&&t.addEventListener&&t.addEventListener("load",(()=>{this._requestDraw()}))}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),n=this.getHeight(),i=this.cornerRadius(),a=this.attrs.image;let o;if(a){const t=this.attrs.cropWidth,r=this.attrs.cropHeight;o=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,o))}_hitFunc(t){var 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){var i=r.Util.createImageElement();i.onload=function(){var t=new l({image:i});e(t)},i.onerror=n,i.crossOrigin="Anonymous",i.src=t}}e.Image=l,l.prototype.className="Image",(0,o._registerNode)(l),i.Factory.addGetterSetter(l,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4)),i.Factory.addGetterSetter(l,"image"),i.Factory.addComponentsGetterSetter(l,"crop",["x","y","width","height"]),i.Factory.addGetterSetter(l,"cropX",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropY",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropWidth",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropHeight",0,(0,s.getNumberValidator)())},56067:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Tag=e.Label=void 0;const r=n(1455),i=n(97955),a=n(58985),o=n(53774),s=n(54417);var l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],h="up",u="right",c="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){var e,n=this,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(){var t,e,n,r,i,a,o,s=this.getText(),l=this.getTag();if(s&&l){switch(t=s.width(),e=s.height(),n=l.pointerDirection(),r=l.pointerWidth(),o=l.pointerHeight(),i=0,a=0,n){case h:i=t/2,a=-1*o;break;case u:i=t+r,a=e/2;break;case c:i=t/2,a=e+o;break;case d:i=-1*r,a=e/2}l.setAttrs({x:-1*i,y:-1*a,width:t,height:e}),s.setAttrs({x:-1*i,y:-1*a})}}}e.Label=g,g.prototype.className="Label",(0,s._registerNode)(g);class p extends i.Shape{_sceneFunc(t){var e=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let s=0,l=0,f=0,g=0;"number"===typeof o?s=l=f=g=Math.min(o,e/2,n/2):(s=Math.min(o[0]||0,e/2,n/2),l=Math.min(o[1]||0,e/2,n/2),g=Math.min(o[2]||0,e/2,n/2),f=Math.min(o[3]||0,e/2,n/2)),t.beginPath(),t.moveTo(s,0),r===h&&(t.lineTo((e-i)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+i)/2,0)
1),t.lineTo(e-l,0),t.arc(e-l,l,l,3*Math.PI/2,0,!1),r===u&&(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===c&&(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,s),t.arc(s,s,s,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,e=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),a=this.width(),o=this.height();return i===h?(e-=r,o+=r):i===c?o+=r:i===d?(t-=1.5*n,a+=n):i===u&&(a+=1.5*n),{x:t,y:e,width:a,height:o}}}e.Tag=p,p.prototype.className="Tag",(0,s._registerNode)(p),r.Factory.addGetterSetter(p,"pointerDirection","none"),r.Factory.addGetterSetter(p,"pointerWidth",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(p,"pointerHeight",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(p,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4))},27149:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Line=void 0;const r=n(1455),i=n(97955),a=n(53774),o=n(54417);function s(t,e,n,r,i,a,o){var s=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=o*s/(s+l),u=o*l/(s+l);return[n-h*(i-t),r-h*(a-e),n+u*(i-t),r+u*(a-e)]}function l(t,e){var n,r,i=t.length,a=[];for(n=2;n<i-2;n+=2)r=s(t[n-2],t[n-1],t[n],t[n+1],t[n+2],t[n+3],e),isNaN(r[0])||(a.push(r[0]),a.push(r[1]),a.push(t[n]),a.push(t[n+1]),a.push(r[2]),a.push(r[3]));return a}class h extends i.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",(function(){this._clearCache("tensionPoints")}))}_sceneFunc(t){var e,n,r,i=this.points(),a=i.length,o=this.tension(),s=this.closed(),l=this.bezier();if(a){if(t.beginPath(),t.moveTo(i[0],i[1]),0!==o&&a>4){for(n=(e=this.getTensionPoints()).length,r=s?0:4,s||t.quadraticCurveTo(e[0],e[1],e[2],e[3]);r<n-2;)t.bezierCurveTo(e[r++],e[r++],e[r++],e[r++],e[r++],e[r++]);s||t.quadraticCurveTo(e[n-2],e[n-1],i[a-2],i[a-1])}else if(l)for(r=2;r<a;)t.bezierCurveTo(i[r++],i[r++],i[r++],i[r++],i[r++],i[r++]);else for(r=2;r<a;r+=2)t.lineTo(i[r],i[r+1]);s?(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(){var t=this.points(),e=t.length,n=this.tension(),r=s(t[e-2],t[e-1],t[0],t[1],t[2],t[3],n),i=s(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(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};for(var e,n,r=(t=0!==this.tension()?[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:this.points())[0],i=t[0],a=t[1],o=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],r=Math.min(r,e),i=Math.max(i,e),a=Math.min(a,n),o=Math.max(o,n);return{x:r,y:a,width:i-r,height:o-a}}}e.Line=h,h.prototype.className="Line",h.prototype._attrsAffectingSize=["points","bezier","tension"],(0,o._registerNode)(h),r.Factory.addGetterSetter(h,"closed",!1),r.Factory.addGetterSetter(h,"bezier",!1),r.Factory.addGetterSetter(h,"tension",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(h,"points",[],(0,a.getNumberArrayValidator)())},87339:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Path=void 0;const r=n(1455),i=n(97955),a=n(54417),o=n(54135);class s extends i.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",(function(){this._readDataAttribute()}))}_readDataAttribute(){this.dataArray=s.parsePathData(this.data()),this.pathLength=s.getPathLength(this.dataArray)}_sceneFunc(t){var e=this.dataArray;t.beginPath();for(var n=!1,r=0;r<e.length;r++){var 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":var o=a[0],s=a[1],l=a[2],h=a[3],u=a[4],c=a[5],d=a[6],f=a[7],g=l>h?l:h,p=l>h?1:l/h,v=l>h?h/l:1;t.translate(o,s),t.rotate(d),t.scale(p,v),t.arc(0,0,g,u,u+c,1-f),t.scale(1/p,1/v),t.rotate(-d),t.translate(-o,-s);break;case"z":n=!0,t.closePath()}}n||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach((function(e){if("A"===e.command){var n=e.points[4],r=e.points[5],i=e.points[4]+r,a=Math.PI/180;
1if(Math.abs(n-i)<a&&(a=Math.abs(n-i)),r<0)for(let r=n-a;r>i;r-=a){const n=s.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=s.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 o=0;o<=1;o+=.01){const n=s.getPointOnCubicBezier(o,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(n.x,n.y)}else t=t.concat(e.points)}));for(var e,n,r=t[0],i=t[0],a=t[1],o=t[1],l=0;l<t.length/2;l++)e=t[2*l],n=t[2*l+1],isNaN(e)||(r=Math.min(r,e),i=Math.max(i,e)),isNaN(n)||(a=Math.min(a,n),o=Math.max(o,n));return{x:r,y:a,width:i-r,height:o-a}}getLength(){return this.pathLength}getPointAtLength(t){return s.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(var n=0;n<t.length;++n)e+=t[n].pathLength;return e}static getPointAtLengthOfDataArray(t,e){var 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{x:(n=e[r-1].points.slice(-2))[0],y:n[1]};if(t<.01)return{x:(n=e[r].points.slice(0,2))[0],y:n[1]};var a=e[r],l=a.points;switch(a.command){case"L":return s.getPointOnLine(t,a.start.x,a.start.y,l[0],l[1]);case"C":return s.getPointOnCubicBezier((0,o.t2length)(t,s.getPathLength(e),(t=>(0,o.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 s.getPointOnQuadraticBezier((0,o.t2length)(t,s.getPathLength(e),(t=>(0,o.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":var h=l[0],u=l[1],c=l[2],d=l[3],f=l[4],g=l[5],p=l[6];return f+=g*t/a.pathLength,s.getPointOnEllipticalArc(h,u,c,d,f,p)}return null}static getPointOnLine(t,e,n,r,i,a,o){void 0===a&&(a=e),void 0===o&&(o=n);var s=(i-n)/(r-e+1e-8),l=Math.sqrt(t*t/(1+s*s));r<e&&(l*=-1);var h,u=s*l;if(r===e)h={x:a,y:o+u};else if((o-n)/(a-e+1e-8)===s)h={x:a+l,y:o+u};else{var c,d,f=this.getLineLength(e,n,r,i),g=(a-e)*(r-e)+(o-n)*(i-n);c=e+(g/=f*f)*(r-e),d=n+g*(i-n);var p=this.getLineLength(a,o,c,d),v=Math.sqrt(t*t-p*p);l=Math.sqrt(v*v/(1+s*s)),r<e&&(l*=-1),h={x:c+l,y:d+(u=s*l)}}return h}static getPointOnCubicBezier(t,e,n,r,i,a,o,s,l){function h(t){return t*t*t}function u(t){return 3*t*t*(1-t)}function c(t){return 3*t*(1-t)*(1-t)}function d(t){return(1-t)*(1-t)*(1-t)}return{x:s*h(t)+a*u(t)+r*c(t)+e*d(t),y:l*h(t)+o*u(t)+i*c(t)+n*d(t)}}static getPointOnQuadraticBezier(t,e,n,r,i,a,o){function s(t){return t*t}function l(t){return 2*t*(1-t)}function h(t){return(1-t)*(1-t)}return{x:a*s(t)+r*l(t)+e*h(t),y:o*s(t)+i*l(t)+n*h(t)}}static getPointOnEllipticalArc(t,e,n,r,i,a){var o=Math.cos(a),s=Math.sin(a),l=n*Math.cos(i),h=r*Math.sin(i);return{x:t+(l*o-h*s),y:e+(l*s+h*o)}}static parsePathData(t){if(!t)return[];var e=t,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(var r=0;r<n.length;r++)e=e.replace(new RegExp(n[r],"g"),"|"+n[r]);var i,a=e.split("|"),o=[],s=[],l=0,h=0,u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(r=1;r<a.length;r++){var c=a[r],d=c.charAt(0);for(c=c.slice(1),s.length=0;i=u.exec(c);)s.push(i[0]);for(var f=[],g=0,p=s.length;g<p;g++)if("00"!==s[g]){var v=parseFloat(s[g]);isNaN(v)?f.push(0):f.push(v)}else f.push(0,0);for(;f.length>0&&!isNaN(f[0]);){var m,y,b,_,S,x,C,w,k,P,T="",E=[],F=l,N=h;switch(d){case"l":l+=f.shift(),h+=f.shift(),T="L",E.push(l,h);break;case"L":l=f.shift(),h=f.shift(),E.push(l,h);break;case"m":var M=f.shift(),A=f.shift();if(l+=M,h+=A,T="M",o.length>2&&"z"===o[o.length-1].command)for(var R=o.length-2;R>=0;R--)if("M"===o[R].command){l=o[R].points[0]+M,h=o[R].points[1]+A;break}E.push(l,h),d="l";break;case"M":l=f.shift(),h=f.shift(),T="M",E.push(l,h),d="L";break;case"h":l+=f.shift(),T="L",E.push(l,h);break;case"H":l=f.shift(),T="L",E.push(l,h);break;case"v":h+=f.shift(),T="L",E.push(l,h);break;case"V":h=f.shift(),T="L",E.push(l,h);break;case"C":E.push(f.shift(),f.shift(),f.shift(),f.shift()),l=f.shift(),h=f.shift(),E.push(l,h);break;case"c":E.push(l+f.shift(),h+f.shift(),l+f.shift(),h+f.shift()),l+=f.shift(),h+=f.shift(),T="C",E.push(l,h);break;case"S":y=l,b=h,"C"===(m=o[o.length-1]).command&&(y=l+(l-m.points[2]),b=h+(h-m.points[3])),E.push(y,b,f.shift(),f.shift()),l=f.shift(),h=f.shift(),T="C",E.push(l,h);break;case"s":y=l,b=h,"C"===(m=o[o.length-1]).command&&(y=l+(l-m.points[2]),b=h+(h-m.points[3])),E.push(y,b,l+f.shift(),h+f.shift()),l+=f.shift(),h+=f.shift(),T="C",E.push(l,h);break;case"Q":E.push(f.shift(),f.shift()),l=f.shift(),h=f.shift(),E.push(l,h);break;case"q":E.push(l+f.shift(),h+f.shift()),l+=f.shift(),h+=f.shift(),T="Q",E.push(l,h);break;case"T":y=l,b=h,"Q"===(m=o[o.length-1]).command&&(y=l+(l-m.points[0]),b=h+(h-m.points[1])),l=f.shift(),h=f.shift(),T="Q",E.push(y,b,l,h);break;case"t":y=l,b=h,"Q"===(m=o[o.length-1]).command&&(y=l+(l-m.points[0]),b=h+(h-m.points[1])),l+=f.shift(),h+=f.shift(),T="Q",E.push(y,b,l,h);break;case"A":_=f.shift(),S=f.shift(),x=f.shift(),C=f.shift(),w=f.shift(),k=l,P=h,l=f.shift(),h=f.shift(),T="A",E=this.convertEndpointToCenterParameterization(k,P,l,h,C,w,_,S,x);break;case"a":_=f.shift(),S=f.shift(),x=f.shift(),C=f.shift(),w=f.shift(),k=l,P=h,l+=f.shift(),h+=f.shift(),T="A",E=this.convertEndpointToCenterParameterization(k,P,l,h,C,w,_,S,x)}o.push({command:T||d,points:E,start:{x:F,y:N},pathLength:this.calcLength(F,N,T||d,E)})}"z"!==d&&"Z"!==d||o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,e,n,r){var i,a,l,h,u=s;switch(n){case"L":return u.getLineLength(t,e,r[0],r[1]);case"C":return(0,o.getCubicArcLength)([t,r[0],r[2],r[4]],[e,r[1],r[3],r[5]],1);case"Q":return(0,o.getQuadraticArcLength)([t,r[0],r[2]],[e,r[1],r[3]],1);case"A":i=0;var c=r[4],d=r[5],f=r[4]+d,g=Math.PI/180;
1if(Math.abs(c-f)<g&&(g=Math.abs(c-f)),a=u.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),d<0)for(h=c-g;h>f;h-=g)l=u.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),i+=u.getLineLength(a.x,a.y,l.x,l.y),a=l;else for(h=c+g;h<f;h+=g)l=u.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),i+=u.getLineLength(a.x,a.y,l.x,l.y),a=l;return l=u.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],f,0),i+=u.getLineLength(a.x,a.y,l.x,l.y)}return 0}static convertEndpointToCenterParameterization(t,e,n,r,i,a,o,s,l){var h=l*(Math.PI/180),u=Math.cos(h)*(t-n)/2+Math.sin(h)*(e-r)/2,c=-1*Math.sin(h)*(t-n)/2+Math.cos(h)*(e-r)/2,d=u*u/(o*o)+c*c/(s*s);d>1&&(o*=Math.sqrt(d),s*=Math.sqrt(d));var f=Math.sqrt((o*o*(s*s)-o*o*(c*c)-s*s*(u*u))/(o*o*(c*c)+s*s*(u*u)));i===a&&(f*=-1),isNaN(f)&&(f=0);var g=f*o*c/s,p=f*-s*u/o,v=(t+n)/2+Math.cos(h)*g-Math.sin(h)*p,m=(e+r)/2+Math.sin(h)*g+Math.cos(h)*p,y=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])/(y(t)*y(e))},_=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(b(t,e))},S=_([1,0],[(u-g)/o,(c-p)/s]),x=[(u-g)/o,(c-p)/s],C=[(-1*u-g)/o,(-1*c-p)/s],w=_(x,C);return b(x,C)<=-1&&(w=Math.PI),b(x,C)>=1&&(w=0),0===a&&w>0&&(w-=2*Math.PI),1===a&&w<0&&(w+=2*Math.PI),[v,m,o,s,S,w,h,a]}}e.Path=s,s.prototype.className="Path",s.prototype._attrsAffectingSize=["data"],(0,a._registerNode)(s),r.Factory.addGetterSetter(s,"data")},75244:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rect=void 0;const r=n(1455),i=n(97955),a=n(54417),o=n(68588),s=n(53774);class l extends i.Shape{_sceneFunc(t){var e=this.cornerRadius(),n=this.width(),r=this.height();t.beginPath(),e?o.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,s.getNumberOrArrayOfNumbersValidator)(4))},31785:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegularPolygon=void 0;const r=n(1455),i=n(97955),a=n(53774),o=n(54417);class s extends i.Shape{_sceneFunc(t){const e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var 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(var 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();var 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=s,s.prototype.className="RegularPolygon",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"sides",0,(0,a.getNumberValidator)())},60657:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ring=void 0;const r=n(1455),i=n(97955),a=n(53774),o=n(54417);var s=2*Math.PI;class l extends i.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,s,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),s,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,o._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,a.getNumberValidator)())},88986:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sprite=void 0;const r=n(1455),i=n(97955),a=n(16745),o=n(53774),s=n(54417);class l extends i.Shape{constructor(t){super(t),this._updated=!0,this.anim=new a.Animation((()=>{var 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){var e=this.animation(),n=this.frameIndex(),r=4*n,i=this.animations()[e],a=this.frameOffsets(),o=i[r+0],s=i[r+1],l=i[r+2],h=i[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,l,h),t.closePath(),t.fillStrokeShape(this)),u)if(a){var c=a[e],d=2*n;t.drawImage(u,o,s,l,h,c[d+0],c[d+1],l,h)}else t.drawImage(u,o,s,l,h,0,0,l,h)}_hitFunc(t){var e=this.animation(),n=this.frameIndex(),r=4*n,i=this.animations()[e],a=this.frameOffsets(),o=i[r+2],s=i[r+3];if(t.beginPath(),a){var l=a[e],h=2*n;t.rect(l[h+0],l[h+1],o,s)}else t.rect(0,0,o,s);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval((function(){t._updateIndex()}),1e3/this.frameRate())}
1start(){if(!this.isRunning()){var 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(){var 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,s._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,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"frameRate",17,(0,o.getNumberValidator)()),r.Factory.backCompat(l,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"})},71964:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Star=void 0;const r=n(1455),i=n(97955),a=n(53774),o=n(54417);class s extends i.Shape{_sceneFunc(t){var e=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(var i=1;i<2*r;i++){var a=i%2===0?n:e,o=a*Math.sin(i*Math.PI/r),s=-1*a*Math.cos(i*Math.PI/r);t.lineTo(o,s)}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=s,s.prototype.className="Star",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"numPoints",5,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"innerRadius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"outerRadius",0,(0,a.getNumberValidator)())},23787:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Text=e.stringToArray=void 0;const r=n(68588),i=n(1455),a=n(97955),o=n(53774),s=n(54417);function l(t){return Array.from(t)}e.stringToArray=l;var h,u="auto",c="inherit",d="justify",f="left",g="middle",p="normal",v=" ",m="none",y=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],b=y.length;function _(){return h||(h=r.Util.createCanvasElement().getContext("2d"))}class S 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(var e=0;e<b;e++)this.on(y[e]+"Change.konva",this._setTextData);this._setTextData()}_sceneFunc(t){var e=this.textArr,n=e.length;if(this.text()){var r,i=this.padding(),a=this.fontSize(),o=this.lineHeight()*a,s=this.verticalAlign(),h=this.direction(),u=0,p=this.align(),v=this.getWidth(),m=this.letterSpacing(),y=this.fill(),b=this.textDecoration(),_=-1!==b.indexOf("underline"),S=-1!==b.indexOf("line-through"),x=0,C=(x=o/2,0),w=0;for("rtl"===(h=h===c?t.direction:h)&&t.setAttr("direction",h),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",g),t.setAttr("textAlign",f),s===g?u=(this.getHeight()-n*o-2*i)/2:"bottom"===s&&(u=this.getHeight()-n*o-2*i),t.translate(i,u+i),r=0;r<n;r++){C=0,w=0;var k,P,T,E=e[r],F=E.text,N=E.width,M=E.lastInParagraph;if(t.save(),"right"===p?C+=v-N-2*i:"center"===p&&(C+=(v-N-2*i)/2),_){t.save(),t.beginPath(),t.moveTo(C,x+w+Math.round(a/2)),P=0===(k=F.split(" ").length-1),T=p!==d||M?N:v-2*i,t.lineTo(C+Math.round(T),x+w+Math.round(a/2)),t.lineWidth=a/15;const e=this._getLinearGradient();t.strokeStyle=e||y,t.stroke(),t.restore()}if(S){t.save(),t.beginPath(),t.moveTo(C,x+w),P=0===(k=F.split(" ").length-1),T=p===d&&M&&!P?v-2*i:N,t.lineTo(C+Math.round(T),x+w),t.lineWidth=a/15;const e=this._getLinearGradient();t.strokeStyle=e||y,t.stroke(),t.restore()}if("rtl"===h||0===m&&p!==d)0!==m&&t.setAttr("letterSpacing",`${m}px`),this._partialTextX=C,this._partialTextY=x+w,this._partialText=F,t.fillStrokeShape(this);else{k=F.split(" ").length-1;for(var A=l(F),R=0;R<A.length;R++){var D=A[R];" "!==D||M||p!==d||(C+=(v-2*i-N)/k),this._partialTextX=C,this._partialTextY=x+w,this._partialText=D,t.fillStrokeShape(this),C+=this.measureSize(D).width+m}}
1t.restore(),n>1&&(x+=o)}}}_hitFunc(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}setText(t){var e=r.Util._isString(t)?t:null===t||void 0===t?"":t+"";return this._setAttr("text",e),this}getWidth(){return this.attrs.width===u||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===u||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=this.fontSize();return n.save(),n.font=this._getContextFont(),e=n.measureText(t),n.restore(),{width:e.width,height:r}}_getContextFont(){return this.fontStyle()+v+this.fontVariant()+v+(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());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){var e=this.letterSpacing(),n=t.length;return _().measureText(t).width+(n?e*(n-1):0)}_setTextData(){var t=this.text().split("\n"),e=+this.fontSize(),n=0,r=this.lineHeight()*e,i=this.attrs.width,a=this.attrs.height,o=i!==u&&void 0!==i,s=a!==u&&void 0!==a,l=this.padding(),h=i-2*l,c=a-2*l,d=0,f=this.wrap(),g="char"!==f&&f!==m,p=this.ellipsis();this.textArr=[],_().font=this._getContextFont();for(var y=p?this._getTextWidth("\u2026"):0,b=0,S=t.length;b<S;++b){var x=t[b],C=this._getTextWidth(x);if(o&&C>h)for(;x.length>0;){for(var w=0,k=x.length,P="",T=0;w<k;){var E=w+k>>>1,F=x.slice(0,E+1),N=this._getTextWidth(F)+y;N<=h?(w=E+1,P=F,T=N):k=E}if(!P)break;if(g){var M,A=x[P.length];(M=(A===v||"-"===A)&&T<=h?P.length:Math.max(P.lastIndexOf(v),P.lastIndexOf("-"))+1)>0&&(w=M,P=P.slice(0,w),T=this._getTextWidth(P))}if(P=P.trimRight(),this._addTextLine(P),n=Math.max(n,T),d+=r,this._shouldHandleEllipsis(d)){this._tryToAddEllipsisToLastLine();break}if((x=(x=x.slice(w)).trimLeft()).length>0&&(C=this._getTextWidth(x))<=h){this._addTextLine(x),d+=r,n=Math.max(n,C);break}}else this._addTextLine(x),d+=r,n=Math.max(n,C),this._shouldHandleEllipsis(d)&&b<S-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),s&&d+r>c)break}this.textHeight=e,this.textWidth=n}_shouldHandleEllipsis(t){var e=+this.fontSize(),n=this.lineHeight()*e,r=this.attrs.height,i=r!==u&&void 0!==r,a=r-2*this.padding();return!(this.wrap()!==m)||i&&t+n>a}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,e=t!==u&&void 0!==t,n=t-2*this.padding(),r=this.ellipsis(),i=this.textArr[this.textArr.length-1];if(i&&r){if(e)this._getTextWidth(i.text+"\u2026")<n||(i.text=i.text.slice(0,i.text.length-3));this.textArr.splice(this.textArr.length-1,1),this._addTextLine(i.text+"\u2026")}}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=S,S.prototype._fillFunc=function(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)},S.prototype._strokeFunc=function(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)},S.prototype.className="Text",S.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,s._registerNode)(S),i.Factory.overWriteSetter(S,"width",(0,o.getNumberOrAutoValidator)()),i.Factory.overWriteSetter(S,"height",(0,o.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(S,"direction",c),i.Factory.addGetterSetter(S,"fontFamily","Arial"),i.Factory.addGetterSetter(S,"fontSize",12,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(S,"fontStyle",p),i.Factory.addGetterSetter(S,"fontVariant",p),i.Factory.addGetterSetter(S,"padding",0,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(S,"align",f),i.Factory.addGetterSetter(S,"verticalAlign","top"),i.Factory.addGetterSetter(S,"lineHeight",1,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(S,"wrap","word"),i.Factory.addGetterSetter(S,"ellipsis",!1,(0,o.getBooleanValidator)()),i.Factory.addGetterSetter(S,"letterSpacing",0,(0,o.getNumberValidator)()),i.Factory.addGetterSetter(S,"text","",(0,o.getStringValidator)()),i.Factory.addGetterSetter(S,"textDecoration","")},82831:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.TextPath=void 0;const r=n(68588),i=n(1455),a=n(97955),o=n(87339),s=n(23787),l=n(53774),h=n(54417);var u="normal";function c(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 o.Path.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;return t-1>this.pathLength?null:o.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=o.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();var e=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;"underline"===e&&t.beginPath();for(var a=0;a<i.length;a++){t.save();var o=i[a].p0;t.translate(o.x,o.y),t.rotate(i[a].rotation),this.partialText=i[a].text,t.fillStrokeShape(this),"underline"===e&&(0===a&&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();var e=this.glyphInfo;if(e.length>=1){var n=e[0].p0;t.moveTo(n.x,n.y)}for(var r=0;r<e.length;r++){var i=e[r].p1;t.lineTo(i.x,i.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 s.Text.prototype.setText.call(this,t)}_getContextFont(){return s.Text.prototype._getContextFont.call(this)}_getTextSize(t){var e=this.dummyCanvas.getContext("2d");e.save(),e.font=this._getContextFont();var 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,s.stringToArray)(this.text());let u=l;for(var c=0;c<h.length;c++){const t=this._getPointAtLength(u);if(!t)return;let e=this._getTextSize(h[c]).width+n;if(" "===h[c]&&"justify"===r){const t=this.text().split(" ").length-1;e+=(this.pathLength-a)/t}const s=this._getPointAtLength(u+e);if(!s)return;const l=o.Path.getLineLength(t.x,t.y,s.x,s.y);let f=0;if(i)try{f=i(h[c-1],h[c])*this.fontSize()}catch(d){f=0}t.x+=f,s.x+=f,this.textWidth+=f;const g=o.Path.getPointOnLine(f+l/2,t.x,t.y,s.x,s.y),p=Math.atan2(s.y-t.y,s.x-t.x);this.glyphInfo.push({transposeX:g.x,transposeY:g.y,text:h[c],rotation:p,p0:t,p1:s}),u+=e}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var 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)}));for(var e,n,r=t[0]||0,i=t[0]||0,a=t[1]||0,o=t[1]||0,s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],r=Math.min(r,e),i=Math.max(i,e),a=Math.min(a,n),o=Math.max(o,n);var l=this.fontSize();return{x:r-l/2,y:a-l/2,width:i-r+l,height:o-a+l}}destroy(){return r.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}e.TextPath=f,f.prototype._fillFunc=c,f.prototype._strokeFunc=d,f.prototype._fillFuncHit=c,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",u),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",u),i.Factory.addGetterSetter(f,"text",""),i.Factory.addGetterSetter(f,"textDecoration",null),i.Factory.addGetterSetter(f,"kerningFunc",null)},29516:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Transformer=void 0;const r=n(68588),i=n(1455),a=n(77939),o=n(97955),s=n(75244),l=n(58985),h=n(54417),u=n(53774),c=n(54417);var d="tr-konva",f=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map((t=>t+".tr-konva")).join(" "),g="nodesRect",p=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],v={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const m="ontouchstart"in h.Konva._global;var y=["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}}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)}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()},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){var r=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=t.getAbsoluteScale(n),a=t.getAbsolutePosition(n),o=r.x*i.x-t.offsetX()*i.x,s=r.y*i.y-t.offsetY()*i.y;const l=(h.Konva.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return b({x:a.x+o*Math.cos(l)+s*Math.sin(-l),y:a.y+s*Math.cos(l)+o*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()});var 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){var n=i.point(e);t.push(n)}))}));const e=new r.Transform;e.rotate(-h.Konva.getAngle(this.rotation()));var n=1/0,i=1/0,a=-1/0,o=-1/0;t.forEach((function(t){var r=e.point(t);
1void 0===n&&(n=a=r.x,i=o=r.y),n=Math.min(n,r.x),i=Math.min(i,r.y),a=Math.max(a,r.x),o=Math.max(o,r.y)})),e.invert();const s=e.point({x:n,y:i});return{x:s.x,y:s.y,width:a-n,height:o-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(),y.forEach((t=>{this._createAnchor(t)})),this._createAnchor("rotater")}_createAnchor(t){var e=new s.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:m?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",(()=>{var n=h.Konva.getAngle(this.rotation()),i=this.rotateAnchorCursor(),a=function(t,e,n){if("rotater"===t)return n;e+=r.Util.degToRad(v[t]||0);var 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(){var t=new o.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(t,e){var 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()&&t.lineTo(e.width()/2,-n.rotateAnchorOffset()*r.Util._sign(e.height())-i),t.fillStrokeShape(e)},hitFunc:(t,e)=>{if(this.shouldOverdrawWholeArea()){var 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){this._movingAnchorName=t.target.name().split(" ")[0];var 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;var a=t.target.getAbsolutePosition(),o=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.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){var e,n,r,i=this.findOne("."+this._movingAnchorName),a=i.getStage();a.setPointersPositions(t);const o=a.getPointerPosition();let s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y};const l=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(l,s,t)),i.setAbsolutePosition(s);const u=i.getAbsolutePosition();if(l.x!==u.x||l.y!==u.y)if("rotater"!==this._movingAnchorName){var c,d=this.shiftBehavior();c="inverted"===d?this.keepRatio()&&!t.shiftKey:"none"===d?this.keepRatio():this.keepRatio()||t.shiftKey;var f=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(c){var g=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(g.x-i.x(),2)+Math.pow(g.y-i.y(),2));var p=this.findOne(".top-left").x()>g.x?-1:1,v=this.findOne(".top-left").y()>g.y?-1:1;e=r*this.cos*p,n=r*this.sin*v,this.findOne(".top-left").x(g.x-e),this.findOne(".top-left").y(g.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(i.y());else if("top-right"===this._movingAnchorName){if(c){g=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()-g.x,2)+Math.pow(g.y-i.y(),2));p=this.findOne(".top-right").x()<g.x?-1:1,v=this.findOne(".top-right").y()>g.y?-1:1;e=r*this.cos*p,n=r*this.sin*v,this.findOne(".top-right").x(g.x+e),this.findOne(".top-right").y(g.y-n)}var m=i.position();this.findOne(".top-left").y(m.y),this.findOne(".bottom-right").x(m.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(c){g=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(g.x-i.x(),2)+Math.pow(i.y()-g.y,2));p=g.x<i.x()?-1:1,v=i.y()<g.y?-1:1;e=r*this.cos*p,n=r*this.sin*v,i.x(g.x-e),i.y(g.y+n)}m=i.position(),this.findOne(".top-left").x(m.x),this.findOne(".bottom-right").y(m.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(i.y());else if("bottom-right"===this._movingAnchorName){if(c){g=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()-g.x,2)+Math.pow(i.y()-g.y,2));p=this.findOne(".bottom-right").x()<g.x?-1:1,v=this.findOne(".bottom-right").y()<g.y?-1:1;e=r*this.cos*p,n=r*this.sin*v,this.findOne(".bottom-right").x(g.x+e),this.findOne(".bottom-right").y(g.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(f=this.centeredScaling()||t.altKey){var y=this.findOne(".top-left"),b=this.findOne(".bottom-right"),S=y.x(),x=y.y(),C=this.getWidth()-b.x(),w=this.getHeight()-b.y();b.move({x:-S,y:-x}),y.move({x:C,y:w})}var k=this.findOne(".top-left").getAbsolutePosition();e=k.x,n=k.y;var P=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),T=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:n,width:P,height:T,rotation:h.Konva.getAngle(this.rotation())},t)}else{var E=this._getNodeRect();e=i.x()-E.width/2,n=-i.y()+E.height/2;let r=Math.atan2(-n,e)+Math.PI/2;E.height<0&&(r-=Math.PI);const a=h.Konva.getAngle(this.rotation())+r,o=h.Konva.getAngle(this.rotationSnapTolerance()),s=function(t,e,n){let r=e;for(let i=0;i<t.length;i++){const a=h.Konva.getAngle(t[i]),o=Math.abs(a-e)%(2*Math.PI);Math.min(o,2*Math.PI-o)<n&&(r=a)}return r}(this.rotationSnaps(),a,o),l=_(E,s-E.rotation);this._fitNodesInto(l,t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){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));var e=this.getNode();this._fire("transformend",{evt:t,target:e}
1),e&&this._nodes.forEach((e=>{e._fire("transformend",{evt:t,target:e})})),this._movingAnchorName=null}}_fitNodesInto(t,e){var 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=this.flipEnabled();var a=new r.Transform;if(a.rotate(h.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const e=a.point({x:2*-this.padding(),y:0});if(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,!i)return void this.update()}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const e=a.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.width+=2*this.padding(),!i)return void this.update()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const e=a.point({x:0,y:2*-this.padding()});if(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(),!i)return void this.update()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const e=a.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding(),!i)return void this.update()}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 o=1e7,s=new r.Transform;s.translate(n.x,n.y),s.rotate(n.rotation),s.scale(n.width/o,n.height/o);const l=new r.Transform;l.translate(t.x,t.y),l.rotate(t.rotation),l.scale(t.width/o,t.height/o);const u=l.multiply(s.invert());this._nodes.forEach((t=>{var n;const i=t.getParent().getAbsoluteTransform(),a=t.getTransform().copy();a.translate(t.offsetX(),t.offsetY());const o=new r.Transform;o.multiply(i.copy().invert()).multiply(u).multiply(i).multiply(a);const s=o.decompose();t.setAttrs(s),this._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t}),null===(n=t.getLayer())||void 0===n||n.batchDraw()})),this.rotation(r.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var t,e=this._getNodeRect();this.rotation(r.Util._getRotation(e.rotation));var n=e.width,i=e.height,a=this.enabledAnchors(),o=this.resizeEnabled(),s=this.padding(),l=this.anchorSize();const 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+s,offsetY:l/2+s,visible:o&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:l/2+s,visible:o&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:o&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:o&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:i/2,offsetX:l/2-s,visible:o&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:o&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:i,offsetY:l/2-s,visible:o&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:o&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*r.Util._sign(i)-s,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 u=this.anchorStyleFunc();u&&h.forEach((t=>{u(t)})),null===(t=this.getLayer())||void 0===t||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);
1t&&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.prototype.className="Transformer",(0,c._registerNode)(S),i.Factory.addGetterSetter(S,"enabledAnchors",y,(function(t){return t instanceof Array||r.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach((function(t){-1===y.indexOf(t)&&r.Util.warn("Unknown anchor name: "+t+". Available names are: "+y.join(", "))})),t||[]})),i.Factory.addGetterSetter(S,"flipEnabled",!0,(0,u.getBooleanValidator)()),i.Factory.addGetterSetter(S,"resizeEnabled",!0),i.Factory.addGetterSetter(S,"anchorSize",10,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"rotateEnabled",!0),i.Factory.addGetterSetter(S,"rotationSnaps",[]),i.Factory.addGetterSetter(S,"rotateAnchorOffset",50,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"rotateAnchorCursor","crosshair"),i.Factory.addGetterSetter(S,"rotationSnapTolerance",5,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"borderEnabled",!0),i.Factory.addGetterSetter(S,"anchorStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(S,"anchorStrokeWidth",1,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"anchorFill","white"),i.Factory.addGetterSetter(S,"anchorCornerRadius",0,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"borderStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(S,"borderStrokeWidth",1,(0,u.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,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"node"),i.Factory.addGetterSetter(S,"nodes"),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",enabledH
1andlers:"enabledAnchors"})},29846:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Wedge=void 0;const r=n(1455),i=n(97955),a=n(54417),o=n(53774),s=n(54417);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,s._registerNode)(l),r.Factory.addGetterSetter(l,"radius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1),r.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})},6170:function(t,e,n){"use strict";n.d(e,{Vt:function(){return s},h_:function(){return l},d9:function(){return u()}});var r=n(67294),i=n(20745),a=n(32237),o=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};const s=({children:t,groupProps:e,divProps:n,transform:s,transformFunc:l})=>{const h=r.useRef(null),[u]=(r.useRef(),r.useState((()=>document.createElement("div")))),c=r.useMemo((()=>i.createRoot(u)),[u]),d=null===s||void 0===s||s,f=function(t=(()=>{})){const e=r.useRef(t);return e.current=t,r.useCallback(((...t)=>e.current.apply(null,t)),[])}((()=>{if(d&&h.current){let t=h.current.getAbsoluteTransform().decompose();l&&(t=l(t)),u.style.position="absolute",u.style.zIndex="10",u.style.top="0px",u.style.left="0px",u.style.transform=`translate(${t.x}px, ${t.y}px) rotate(${t.rotation}deg) scaleX(${t.scaleX}) scaleY(${t.scaleY})`,u.style.transformOrigin="top left"}else u.style.position="",u.style.zIndex="",u.style.top="",u.style.left="",u.style.transform="",u.style.transformOrigin="";const t=n||{},{style:e}=t,r=o(t,["style"]);Object.assign(u.style,e),Object.assign(u,r)}));return r.useLayoutEffect((()=>{var t;const e=h.current;if(!e)return;const n=null===(t=e.getStage())||void 0===t?void 0:t.container();return n?(n.appendChild(u),d&&(t=>{const e=window.getComputedStyle(t).position;return!("absolute"===e||"relative"===e)})(n)&&(n.style.position="relative"),e.on("absoluteTransformChange",f),f(),()=>{var t;e.off("absoluteTransformChange",f),null===(t=u.parentNode)||void 0===t||t.removeChild(u)}):void 0}),[d]),r.useLayoutEffect((()=>{f()}),[n,l]),r.useLayoutEffect((()=>{c.render(t)})),r.useLayoutEffect((()=>()=>{setTimeout((()=>{c.unmount()}))}),[]),r.createElement(a.ZA,Object.assign({ref:h},e))},l=({selector:t,enabled:e,children:n})=>{const i=r.useRef(null),o=r.useRef(null),s=r.useRef(),l=null===e||void 0===e||e;return r.useLayoutEffect((()=>{if(!i.current||!o.current)return;s.current=o.current;const e=i.current.getStage().findOne(t);l&&e?o.current.moveTo(e):o.current.moveTo(i.current);const n=i.current.getLayer();if(n&&(n.batchDraw(),e)){const t=e.getLayer();if(!t)return;t.batchDraw()}}),[t,l]),r.useEffect((()=>()=>{var t;null===(t=s.current)||void 0===t||t.destroy()}),[]),r.createElement(a.ZA,{name:"_outer_portal",ref:i},r.createElement(a.ZA,{name:"_inner_portal",ref:o},n))};var h=n(84420),u=n.n(h)},32237:function(t,e,n){"use strict";n.d(e,{ZA:function(){return xt},Ee:function(){return kt},mh:function(){return St},x1:function(){return wt},UL:function(){return Ct},Hf:function(){return Ft},xv:function(){return Pt},$T:function(){return Tt}});var r={};n.r(r),n.d(r,{appendChild:function(){return H},appendChildToContainer:function(){return V},appendInitialChild:function(){return x},cancelTimeout:function(){return I},clearContainer:function(){return et},commitMount:function(){return q},commitTextUpdate:function(){return X},commitUpdate:function(){return Q},createInstance:function(){return C},createTextInstance:function(){return w},detachDeletedInstance:function(){return nt},finalizeInitialChildren:function(){return k},getChildHostContext:function(){return D},getCurrentEventPriority:function(){return rt},getPublicInstance:function(){return P},getRootHostContext:function(){return R},hideInstance:function(){return $},hideTextInstance:function(){return Z},idlePriority:function(){return b.unstable_IdlePriority},insertBefore:function(){return j},insertInContainerBefore:function(){return W},isPrimaryRenderer:function(){return z},noTimeout:function(){return O},now:function(){return b.unstable_now},prepareForCommit:function(){return T},preparePortalMount:function(){return E},prepareUpdate:function(){return F},removeChild:function(){return K},removeChildFromContainer:function(){return Y},resetAfterCommit:function(){return N},resetTextContent:function(){return M},run:function(){return b.unstable_runWithPriority},scheduleTimeout:function(){return L},shouldDeprioritizeSubtree:function(){return A},shouldSetTextContent:function(){return G},supportsMutation:function(){return B},unhideInstance:function(){return J},unhideTextInstance:function(){return tt},warnsIfNotActing:function(){return U}});n(20185);var i=n(67294),a=n(87185),o=n.n(a),s=n(76525),l=n.n(s),h=n(32576),u=n(54417);const c={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0};let d=!1,f=!1;const g=".react-konva-event";let p=!1;const v={};function m(t,e,n=v){if(!d&&"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'),d=!0),!f&&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"),f=!0)}for(var a in n)if(!c[a]){var o="on"===a.slice(0,2),s=n[a]!==e[a];if(o&&s)"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=p||e._useStrictMode,h={},u=!1;const m={};for(var a in e)if(!c[a]){o="on"===a.slice(0,2);var b=n[a]!==e[a];if(o&&b)"content"===(_=a.substr(2).toLowerCase()).substr(0,7)&&(_="content"+_.substr(7,1).toUpperCase()+_.substr(8)),e[a]&&(m[_]=e[a]);!o&&(e[a]!==n[a]||l&&e[a]!==t.getAttr(a))&&(u=!0,h[a]=e[a])}for(var _ in u&&(t.setAttrs(h),y(t)),m)t.on(_+g,m[_])}function y(t){if(!u.Konva.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}var b=n(63840);const _={},S={};function x(t,e){"string"!==typeof e?(t.add(e),y(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 m(l,a),l}function w(t,e,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function k(t,e,n){return!1}function P(t){return t}function T(){return null}function E(){return null}function F(t,e,n,r){return S}function N(){}function M(t){}function A(t,e){return!1}function R(){return _}function D(){return _}o().Node.prototype._applyProps=m;const L=setTimeout,I=clearTimeout,O=-1;function G(t,e){return!1}const z=!1,U=!0,B=!0;function H(t,e){e.parent===t?e.moveToTop():t.add(e),y(t)}function V(t,e){e.parent===t?e.moveToTop():t.add(e),y(t)}function j(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),y(t)}function W(t,e,n){j(t,e,n)}function K(t,e){e.destroy(),e.off(g),y(t)}function Y(t,e){e.destroy(),e.off(g),y(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 Q(t,e,n,r,i){m(t,i,r)}function $(t){t.hide(),y(t)}function Z(t){}function J(t,e){(null==e.visible||e.visible)&&t.show()}function tt(t,e){}function et(t){}function nt(){}const rt=()=>h.DefaultEventPriority;var it=Object.defineProperty,at=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,st=Object.getOwnPropertySymbols,lt=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,ut=(t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ct=(t,e)=>{for(var n in e||(e={}))lt.call(e,n)&&ut(t,n,e[n]);if(st)for(var n of st(e))ht.call(e,n)&&ut(t,n,e[n]);return t};function dt(t,e,n){if(!t)return;if(!0===n(t))return t;let r=e?t.return:t.child;for(;r;){const t=dt(r,e,n);if(t)return t;r=e?null:r.sibling}}function ft(t){try{return Object.defineProperties(t,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(e){return t}}const gt=ft(i.createContext(null));class pt extends i.Component{render(){return i.createElement(gt.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:vt,ReactCurrentDispatcher:mt}
1=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function yt(){const t=i.useContext(gt);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[null==vt?void 0:vt.current,t,null==t?void 0:t.alternate]){if(!n)continue;const t=dt(n,!1,(t=>{let n=t.memoizedState;for(;n;){if(n.memoizedState===e)return!0;n=n.next}}));if(t)return t}}),[t,e])}function bt(){const t=function(){var t,e;const n=yt(),[r]=i.useState((()=>new Map));r.clear();let a=n;for(;a;){const n=null==(t=a.type)?void 0:t._context;n&&n!==gt&&!r.has(n)&&r.set(n,null==(e=null==mt?void 0:mt.current)?void 0:e.readContext(ft(n))),a=a.return}return r}();return i.useMemo((()=>Array.from(t.keys()).reduce(((e,n)=>r=>{return i.createElement(e,null,i.createElement(n.Provider,(a=ct({},r),o={value:t.get(n)},at(a,ot(o)))));var a,o}),(t=>i.createElement(pt,ct({},t))))),[t])}const _t=t=>{const e=i.useRef(),n=i.useRef(),r=i.useRef(),a=function(t){const e=i.useRef({});return i.useLayoutEffect((()=>{e.current=t})),i.useLayoutEffect((()=>()=>{e.current={}}),[]),e.current}(t),s=bt(),l=e=>{const{forwardedRef:n}=t;n&&("function"===typeof n?n(e):n.current=e)};return i.useLayoutEffect((()=>(n.current=new(o().Stage)({width:t.width,height:t.height,container:e.current}),l(n.current),r.current=Et.createContainer(n.current,h.LegacyRoot,!1,null),Et.updateContainer(i.createElement(s,{},t.children),r.current),()=>{o().isBrowser&&(l(null),Et.updateContainer(null,r.current,null),n.current.destroy())})),[]),i.useLayoutEffect((()=>{l(n.current),m(n.current,t,a),Et.updateContainer(i.createElement(s,{},t.children),r.current,null)})),i.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})},St="Layer",xt="Group",Ct="Rect",wt="Line",kt="Image",Pt="Text",Tt="Transformer",Et=l()(r);Et.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:i.version,rendererPackageName:"react-konva"});const Ft=i.forwardRef(((t,e)=>i.createElement(pt,{},i.createElement(_t,{...t,forwardedRef:e}))))},46511:function(t,e){"use strict";e.DefaultEventPriority=16,e.LegacyRoot=0},67287:function(t,e,n){t.exports=function(t){var e={},r=n(67294),i=n(63840),a=Object.assign;function o(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 s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),h=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),c=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"),v=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),y=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 C(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 u:return"Fragment";case h:return"Portal";case d:return"Profiler";case c:return"StrictMode";case v:return"Suspense";case m: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 y:return null!==(e=t.displayName||null)?e:C(t.type)||"Memo";case b:e=t._payload,t=t._init;try{return C(t(e))}catch(n){}}return null}function w(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 C(e);case 8:return e===c?"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{0!==(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(o(188))}function T(t){var e=t.alternate;if(!e){if(null===(e=k(t)))throw Error(o(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(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?t:e}function E(t){return null!==(t=T(t))?F(t):null}function F(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var e=F(t);if(null!==e)return e;t=t.sibling}return null}function N(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){if(4!==t.tag){var e=N(t);
vendor: 7,093 bytes, line 1
1if(null!==e)return e}t=t.sibling}return null}var M,A=Array.isArray,R=t.getPublicInstance,D=t.getRootHostContext,L=t.getChildHostContext,I=t.prepareForCommit,O=t.resetAfterCommit,G=t.createInstance,z=t.appendInitialChild,U=t.finalizeInitialChildren,B=t.prepareUpdate,H=t.shouldSetTextContent,V=t.createTextInstance,j=t.scheduleTimeout,W=t.cancelTimeout,K=t.noTimeout,Y=t.isPrimaryRenderer,X=t.supportsMutation,q=t.supportsPersistence,Q=t.supportsHydration,$=t.getInstanceFromNode,Z=t.preparePortalMount,J=t.getCurrentEventPriority,tt=t.detachDeletedInstance,et=t.supportsMicrotasks,nt=t.scheduleMicrotask,rt=t.supportsTestSelectors,it=t.findFiberRoot,at=t.getBoundingRect,ot=t.getTextContent,st=t.isHiddenSubtree,lt=t.matchAccessibilityRole,ht=t.setFocusIfFocusable,ut=t.setupIntersectionObserver,ct=t.appendChild,dt=t.appendChildToContainer,ft=t.commitTextUpdate,gt=t.commitMount,pt=t.commitUpdate,vt=t.insertBefore,mt=t.insertInContainerBefore,yt=t.removeChild,bt=t.removeChildFromContainer,_t=t.resetTextContent,St=t.hideInstance,xt=t.hideTextInstance,Ct=t.unhideInstance,wt=t.unhideTextInstance,kt=t.clearContainer,Pt=t.cloneInstance,Tt=t.createContainerChildSet,Et=t.appendChildToContainerChildSet,Ft=t.finalizeContainerChildren,Nt=t.replaceContainerChildren,Mt=t.cloneHiddenInstance,At=t.cloneHiddenTextInstance,Rt=t.canHydrateInstance,Dt=t.canHydrateTextInstance,Lt=t.canHydrateSuspenseInstance,It=t.isSuspenseInstancePending,Ot=t.isSuspenseInstanceFallback,Gt=t.getSuspenseInstanceFallbackErrorDetails,zt=t.registerSuspenseInstanceRetry,Ut=t.getNextHydratableSibling,Bt=t.getFirstHydratableChild,Ht=t.getFirstHydratableChildWithinContainer,Vt=t.getFirstHydratableChildWithinSuspenseInstance,jt=t.hydrateInstance,Wt=t.hydrateTextInstance,Kt=t.hydrateSuspenseInstance,Yt=t.getNextHydratableInstanceAfterSuspenseInstance,Xt=t.commitHydratedContainer,qt=t.commitHydratedSuspenseInstance,Qt=t.clearSuspenseBoundary,$t=t.clearSuspenseBoundaryFromContainer,Zt=t.shouldDeleteUnhydratedTailInstances,Jt=t.didNotMatchHydratedContainerTextInstance,te=t.didNotMatchHydratedTextInstance;function ee(t){if(void 0===M)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);M=e&&e[1]||""}return"\n"+M+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(h){var r=h}Reflect.construct(t,[],e)}else{try{e.call()}catch(h){r=h}t.call(e.prototype)}else{try{throw Error()}catch(h){r=h}t()}}catch(h){if(h&&r&&"string"===typeof h.stack){for(var i=h.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}}while(1<=o&&0<=s);break}}}finally{ne=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ee(t):""}var ie=Object.prototype.hasOwnProperty,ae=[],oe=-1;function se(t){return{current:t}}function le(t){0>oe||(t.current=ae[oe],ae[oe]=null,oe--)}function he(t,e){oe++,ae[oe]=t.current,t.current=e}var ue={},ce=se(ue),de=se(!1),fe=ue;function ge(t,e){var n=t.type.contextTypes;if(!n)return ue;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=t.childContextTypes)&&void 0!==t}function ve(){le(de),le(ce)}function me(t,e,n){if(ce.current!==ue)throw Error(o(168));he(ce,e),he(de,n)}function ye(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(o(108,w(t)||"Unknown",i));return a({},n,r)}function be(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ue,fe=ce.current,he(ce,t),he(de,de.current),!0}function _e(t,e,n){var r=t.stateNode;if(!r)throw Error(o(169));n?(t=ye(t,e,fe),r.__reactInternalMemoizedMergedChildContext=t,le(de),le(ce),he(ce,t)):le(de),he(de,n)}var Se=Math.clz32?Math.clz32:function(t){return 0===(t>>>=0)?32:31-(xe(t)/Ce|0)|0},xe=Math.log,Ce=Math.LN2;var we=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,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=Pe(s):0!==(a&=o)&&(r=Pe(a))}else 0!==(o=n&~i)?r=Pe(o):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&&0!==(4194240&a)))return e;if(0!==(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 Ee(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 Fe(t){return 0!==(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function Ne(){var t=we;return 0===(4194240&(we<<=1))&&(we=64),t}function Me(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?0!==(268435455&t)?16:536870912:4:1}var Ie=i.unstable_scheduleCallback,Oe=i.unstable_cancelCallback,Ge=i.unstable_shouldYield,ze=i.unstable_requestPaint,Ue=i.unstable_now,Be=i.unstable_ImmediatePriority,He=i.unstable_UserBlockingPriority,Ve=i.unstable_NormalPriority,je=i.unstable_IdlePriority,We=null,Ke=null;var Ye="function"===typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t===1/e)||t!==t&&e!==e},Xe=null,qe=!1,Qe=!1;function $e(t){null===Xe?Xe=[t]:Xe.push(t)}function Ze(){if(!Qe&&null!==Xe){Qe=!0;var t=0,e=De;try{var n=Xe;for(De=1;t<n.length;t++){var r=n[t];do{r=r(!0)}while(null!==r)}Xe=null,qe=!1}catch(i){throw null!==Xe&&(Xe=Xe.slice(t+1)),Ie(Be,Ze),i}finally{De=e,Qe=!1}}return null}var Je=[],tn=0,en=null,nn=0,rn=[],an=0,on=null,sn=1,ln="";function hn(t,e){Je[tn++]=nn,Je[tn++]=en,en=t,nn=e}
1function un(t,e,n){rn[an++]=sn,rn[an++]=ln,rn[an++]=on,on=t;var r=sn;t=ln;var i=32-Se(r)-1;r&=~(1<<i),n+=1;var a=32-Se(e)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,sn=1<<32-Se(e)+i|n<<i|r,ln=a+t}else sn=1<<a|n<<i|r,ln=t}function cn(t){null!==t.return&&(hn(t,1),un(t,1,0))}function dn(t){for(;t===en;)en=Je[--tn],Je[tn]=null,nn=Je[--tn],Je[tn]=null;for(;t===on;)on=rn[--an],rn[an]=null,ln=rn[--an],rn[an]=null,sn=rn[--an],rn[an]=null}var fn=null,gn=null,pn=!1,vn=!1,mn=null;function yn(t,e){var n=ss(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!==on?{id:sn,overflow:ln}:null;return t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},(n=ss(18,null,null,0)).stateNode=e,n.return=t,t.child=n,fn=t,gn=null,!0}return!1;default:return!1}}function _n(t){return 0!==(1&t.mode)&&0===(128&t.flags)}function Sn(t){if(pn){var e=gn;if(e){var n=e;if(!bn(t,e)){if(_n(t))throw Error(o(418));e=Ut(n);var r=fn;e&&bn(t,e)?yn(r,n):(t.flags=-4097&t.flags|2,pn=!1,fn=t)}}else{if(_n(t))throw Error(o(418));t.flags=-4097&t.flags|2,pn=!1,fn=t}}}function xn(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 xn(t),pn=!0,!1;if(3!==t.tag&&(5!==t.tag||Zt(t.type)&&!H(t.type,t.memoizedProps))){var e=gn;if(e){if(_n(t))throw wn(),Error(o(418));for(;e;)yn(t,e),e=Ut(e)}}if(xn(t),13===t.tag){if(!Q)throw Error(o(316));if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(o(317));gn=Yt(t)}else gn=fn?Ut(t.stateNode):null;return!0}function wn(){for(var t=gn;t;)t=Ut(t)}function kn(){Q&&(gn=fn=null,vn=pn=!1)}function Pn(t){null===mn?mn=[t]:mn.push(t)}var Tn=s.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 Fn(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 t=re(t.type,!1);case 11:return t=re(t.type.render,!1);case 1:return t=re(t.type,!0);default:return""}}function Nn(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}var Mn=se(null),An=null,Rn=null,Dn=null;function Ln(){Dn=Rn=An=null}function In(t,e,n){Y?(he(Mn,e._currentValue),e._currentValue=n):(he(Mn,e._currentValue2),e._currentValue2=n)}function On(t){var e=Mn.current;le(Mn),Y?t._currentValue=e:t._currentValue2=e}function Gn(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 zn(t,e){An=t,Dn=Rn=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!==(t.lanes&e)&&(Di=!0),t.firstContext=null)}function Un(t){var e=Y?t._currentValue:t._currentValue2;if(Dn!==t)if(t={context:t,memoizedValue:e,next:null},null===Rn){if(null===An)throw Error(o(308));Rn=t,An.dependencies={lanes:0,firstContext:t}}else Rn=Rn.next=t;return e}var Bn=null;function Hn(t){null===Bn?Bn=[t]:Bn.push(t)}function Vn(t,e,n,r){var i=e.interleaved;return null===i?(n.next=n,Hn(e)):(n.next=i.next,i.next=n),e.interleaved=n,jn(t,r)}function jn(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 Wn=!1;function Kn(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Yn(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 Xn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function qn(t,e,n){var r=t.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&no)){var i=r.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),r.pending=e,jn(t,n)}return null===(i=r.interleaved)?(e.next=e,Hn(r)):(e.next=i.next,i.next=e),r.interleaved=e,jn(t,n)}function Qn(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,0!==(4194240&n))){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,Re(t,n)}}function $n(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 o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,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 Zn(t,e,n,r){var i=t.updateQueue;Wn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var h=l,u=h.next;h.next=null,null===s?o=u:s.next=u,s=h;var c=t.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=h))}if(null!==o){var d=i.baseState;for(s=0,c=u=h=null,l=o;;){var f=l.lane,g=l.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:g,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});t:{var p=t,v=l;switch(f=e,g=n,v.tag){case 1:if("function"===typeof(p=v.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=v.payload)?p.call(g,d,f):p)||void 0===f)break t;d=a({},d,f);break t;case 2:Wn=!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===c?(u=c=g,h=d):c=c.next=g,s|=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===c&&(h=d),i.baseState=h,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(e=i.shared.interleaved)){i=e;do{s|=i.lane,i=i.next}while(i!==e)}else null===o&&(i.shared.lanes=0);uo|=s,t.lanes=s,t.memoizedState=d}}function Jn(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(o(191,i));i.call(r)}}}var tr=(new r.Component).refs;function er(t,e,n,r){n=null===(n=n(r,e=t.memoizedState))||void 0===n?e:a({}
1,e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var nr={isMounted:function(t){return!!(t=t._reactInternals)&&k(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Mo(),i=Ao(t),a=Xn(r,i);a.payload=e,void 0!==n&&null!==n&&(a.callback=n),null!==(e=qn(t,a,i))&&(Ro(e,t,i,r),Qn(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Mo(),i=Ao(t),a=Xn(r,i);a.tag=1,a.payload=e,void 0!==n&&null!==n&&(a.callback=n),null!==(e=qn(t,a,i))&&(Ro(e,t,i,r),Qn(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Mo(),r=Ao(t),i=Xn(n,r);i.tag=2,void 0!==e&&null!==e&&(i.callback=e),null!==(e=qn(t,i,r))&&(Ro(e,t,r,n),Qn(e,t,r))}};function rr(t,e,n,r,i,a,o){return"function"===typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,a,o):!e.prototype||!e.prototype.isPureReactComponent||(!En(n,r)||!En(i,a))}function ir(t,e,n){var r=!1,i=ue,a=e.contextType;return"object"===typeof a&&null!==a?a=Un(a):(i=pe(e)?fe:ce.current,a=(r=null!==(r=e.contextTypes)&&void 0!==r)?ge(t,i):ue),e=new e(n,a),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=nr,t.stateNode=e,e._reactInternals=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function ar(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&&nr.enqueueReplaceState(e,e.state,null)}function or(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs=tr,Kn(t);var a=e.contextType;"object"===typeof a&&null!==a?i.context=Un(a):(a=pe(e)?fe:ce.current,i.context=ge(t,a)),i.state=t.memoizedState,"function"===typeof(a=e.getDerivedStateFromProps)&&(er(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&&nr.enqueueReplaceState(i,i.state,null),Zn(t,n,i,r),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.flags|=4194308)}function sr(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(o(309));var r=n.stateNode}if(!r)throw Error(o(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;e===tr&&(e=i.refs={}),null===t?delete e[a]:e[a]=t},e._stringRef=a,e)}if("string"!==typeof t)throw Error(o(284));if(!n._owner)throw Error(o(290,t))}return t}function lr(t,e){throw t=Object.prototype.toString.call(e),Error(o(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function hr(t){return(0,t._init)(t._payload)}function ur(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=hs(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 s(e){return t&&null===e.alternate&&(e.flags|=2),e}function c(t,e,n,r){return null===e||6!==e.tag?((e=fs(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===u?g(t,e,n.props.children,r,n.key):null!==e&&(e.elementType===a||"object"===typeof a&&null!==a&&a.$$typeof===b&&hr(a)===e.type)?((r=i(e,n.props)).ref=sr(t,e,n),r.return=t,r):((r=us(n.type,n.key,n.props,null,t.mode,r)).ref=sr(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=gs(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=cs(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=fs(""+e,t.mode,n)).return=t,e;if("object"===typeof e&&null!==e){switch(e.$$typeof){case l:return(n=us(e.type,e.key,e.props,null,t.mode,n)).ref=sr(t,null,e),n.return=t,n;case h:return(e=gs(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=cs(e,t.mode,n,null)).return=t,e;lr(t,e)}return null}function v(t,e,n,r){var i=null!==e?e.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==i?null:c(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 v(t,e,(i=n._init)(n._payload),r)}if(A(n)||x(n))return null!==i?null:g(t,e,n,r,null);lr(t,n)}return null}function m(t,e,n,r,i){if("string"===typeof r&&""!==r||"number"===typeof r)return c(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 m(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);lr(e,r)}return null}function y(i,o,s,l){for(var h=null,u=null,c=o,d=o=0,f=null;null!==c&&d<s.length;d++){c.index>d?(f=c,c=null):f=c.sibling;var g=v(i,c,s[d],l);if(null===g){null===c&&(c=f);break}t&&c&&null===g.alternate&&e(i,c),o=a(g,o,d),null===u?h=g:u.sibling=g,u=g,c=f}if(d===s.length)return n(i,c),pn&&hn(i,d),h;if(null===c){for(;d<s.length;d++)null!==(c=p(i,s[d],l))&&(o=a(c,o,d),null===u?h=c:u.sibling=c,u=c);return pn&&hn(i,d),h}for(c=r(i,c);d<s.length;d++)null!==(f=m(c,i,d,s[d],l))&&(t&&null!==f.alternate&&c.delete(null===f.key?d:f.key),o=a(f,o,d),null===u?h=f:u.sibling=f,u=f);
vendor: 14,894 bytes, line 1
1return t&&c.forEach((function(t){return e(i,t)})),pn&&hn(i,d),h}function _(i,s,l,h){var u=x(l);if("function"!==typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var c=u=null,d=s,f=s=0,g=null,y=l.next();null!==d&&!y.done;f++,y=l.next()){d.index>f?(g=d,d=null):g=d.sibling;var b=v(i,d,y.value,h);if(null===b){null===d&&(d=g);break}t&&d&&null===b.alternate&&e(i,d),s=a(b,s,f),null===c?u=b:c.sibling=b,c=b,d=g}if(y.done)return n(i,d),pn&&hn(i,f),u;if(null===d){for(;!y.done;f++,y=l.next())null!==(y=p(i,y.value,h))&&(s=a(y,s,f),null===c?u=y:c.sibling=y,c=y);return pn&&hn(i,f),u}for(d=r(i,d);!y.done;f++,y=l.next())null!==(y=m(d,i,f,y.value,h))&&(t&&null!==y.alternate&&d.delete(null===y.key?f:y.key),s=a(y,s,f),null===c?u=y:c.sibling=y,c=y);return t&&d.forEach((function(t){return e(i,t)})),pn&&hn(i,f),u}return function t(r,a,o,c){if("object"===typeof o&&null!==o&&o.type===u&&null===o.key&&(o=o.props.children),"object"===typeof o&&null!==o){switch(o.$$typeof){case l:t:{for(var d=o.key,f=a;null!==f;){if(f.key===d){if((d=o.type)===u){if(7===f.tag){n(r,f.sibling),(a=i(f,o.props.children)).return=r,r=a;break t}}else if(f.elementType===d||"object"===typeof d&&null!==d&&d.$$typeof===b&&hr(d)===f.type){n(r,f.sibling),(a=i(f,o.props)).ref=sr(r,f,o),a.return=r,r=a;break t}n(r,f);break}e(r,f),f=f.sibling}o.type===u?((a=cs(o.props.children,r.mode,c,o.key)).return=r,r=a):((c=us(o.type,o.key,o.props,null,r.mode,c)).ref=sr(r,a,o),c.return=r,r=c)}return s(r);case h:t:{for(f=o.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break t}n(r,a);break}e(r,a),a=a.sibling}(a=gs(o,r.mode,c)).return=r,r=a}return s(r);case b:return t(r,a,(f=o._init)(o._payload),c)}if(A(o))return y(r,a,o,c);if(x(o))return _(r,a,o,c);lr(r,o)}return"string"===typeof o&&""!==o||"number"===typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=fs(o,r.mode,c)).return=r,r=a),s(r)):n(r,a)}}var cr=ur(!0),dr=ur(!1),fr={},gr=se(fr),pr=se(fr),vr=se(fr);function mr(t){if(t===fr)throw Error(o(174));return t}function yr(t,e){he(vr,e),he(pr,t),he(gr,fr),t=D(e),le(gr),he(gr,t)}function br(){le(gr),le(pr),le(vr)}function _r(t){var e=mr(vr.current),n=mr(gr.current);n!==(e=L(n,t.type,e))&&(he(pr,t),he(gr,e))}function Sr(t){pr.current===t&&(le(gr),le(pr))}var xr=se(0);function Cr(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||It(n)||Ot(n)))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!==(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 wr=[];function kr(){for(var t=0;t<wr.length;t++){var e=wr[t];Y?e._workInProgressVersionPrimary=null:e._workInProgressVersionSecondary=null}wr.length=0}var Pr=s.ReactCurrentDispatcher,Tr=s.ReactCurrentBatchConfig,Er=0,Fr=null,Nr=null,Mr=null,Ar=!1,Rr=!1,Dr=0,Lr=0;function Ir(){throw Error(o(321))}function Or(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 Gr(t,e,n,r,i,a){if(Er=a,Fr=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Pr.current=null===t||null===t.memoizedState?Si:xi,t=n(r,i),Rr){a=0;do{if(Rr=!1,Dr=0,25<=a)throw Error(o(301));a+=1,Mr=Nr=null,e.updateQueue=null,Pr.current=Ci,t=n(r,i)}while(Rr)}if(Pr.current=_i,e=null!==Nr&&null!==Nr.next,Er=0,Mr=Nr=Fr=null,Ar=!1,e)throw Error(o(300));return t}function zr(){var t=0!==Dr;return Dr=0,t}function Ur(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Mr?Fr.memoizedState=Mr=t:Mr=Mr.next=t,Mr}function Br(){if(null===Nr){var t=Fr.alternate;t=null!==t?t.memoizedState:null}else t=Nr.next;var e=null===Mr?Fr.memoizedState:Mr.next;if(null!==e)Mr=e,Nr=t;else{if(null===t)throw Error(o(310));t={memoizedState:(Nr=t).memoizedState,baseState:Nr.baseState,baseQueue:Nr.baseQueue,queue:Nr.queue,next:null},null===Mr?Fr.memoizedState=Mr=t:Mr=Mr.next=t}return Mr}function Hr(t,e){return"function"===typeof e?e(t):e}function Vr(t){var e=Br(),n=e.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=t;var r=Nr,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,h=null,u=a;do{var c=u.lane;if((Er&c)===c)null!==h&&(h=h.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===h?(l=h=d,s=r):h=h.next=d,Fr.lanes|=c,uo|=c}u=u.next}while(null!==u&&u!==a);null===h?s=r:h.next=l,Ye(r,e.memoizedState)||(Di=!0),e.memoizedState=r,e.baseState=s,e.baseQueue=h,n.lastRenderedState=r}if(null!==(t=n.interleaved)){i=t;do{a=i.lane,Fr.lanes|=a,uo|=a,i=i.next}while(i!==t)}else null===i&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function jr(t){var e=Br(),n=e.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,a=e.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=t(a,s.action),s=s.next}while(s!==i);Ye(a,e.memoizedState)||(Di=!0),e.memoizedState=a,null===e.baseQueue&&(e.baseState=a),n.lastRenderedState=a}return[a,r]}function Wr(){}function Kr(t,e){var n=Fr,r=Br(),i=e(),a=!Ye(r.memoizedState,i);if(a&&(r.memoizedState=i,Di=!0),r=r.queue,ii(qr.bind(null,n,r,t),[t]),r.getSnapshot!==e||a||null!==Mr&&1&Mr.memoizedState.tag){if(n.flags|=2048,Jr(9,Xr.bind(null,n,r,i,e),void 0,null),null===ro)throw Error(o(349));0!==(30&Er)||Yr(n,e,i)}return i}function Yr(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=Fr.updateQueue)?(e={lastEffect:null,stores:null},Fr.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function Xr(t,e,n,r){e.value=n,e.getSnapshot=r,Qr(e)&&$r(t)}function qr(t,e,n){return n((function(){Qr(e)&&$r(t)}))}function Qr(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Ye(t,n)}catch(r){return!0}}function $r(t){var e=jn(t,1);null!==e&&Ro(e,t,1,-1)}function Zr(t){var e=Ur();return"function"===typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:t},e.queue=t,t=t.dispatch=vi.bind(null,Fr,t),[e.memoizedState,t]}function Jr(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Fr.updateQueue)?(e={lastEffect:null,stores:null},Fr.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 ti(){return Br().memoizedState}function ei(t,e,n,r){var i=Ur();Fr.flags|=t,i.memoizedState=Jr(1|e,n,void 0,void 0===r?null:r)}function ni(t,e,n,r){var i=Br();r=void 0===r?null:r;var a=void 0;if(null!==Nr){var o=Nr.memoizedState;if(a=o.destroy,null!==r&&Or(r,o.deps))return void(i.memoizedState=Jr(e,n,a,r))}Fr.flags|=t,i.memoizedState=Jr(1|e,n,a,r)}function ri(t,e){return ei(8390656,8,t,e)}function ii(t,e){return ni(2048,8,t,e)}function ai(t,e){return ni(4,2,t,e)}function oi(t,e){return ni(4,4,t,e)}function si(t,e){return"function"===typeof e?(t=t(),e(t),function(){e(null)}):null!==e&&void 0!==e?(t=t(),e.current=t,function(){e.current=null}):void 0}function li(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ni(4,4,si.bind(null,e,t),n)}function hi(){}function ui(t,e){var n=Br();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Or(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function ci(t,e){var n=Br();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Or(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function di(t,e,n){return 0===(21&Er)?(t.baseState&&(t.baseState=!1,Di=!0),t.memoizedState=n):(Ye(n,e)||(n=Ne(),Fr.lanes|=n,uo|=n,t.baseState=!0),e)}function fi(t,e){var n=De;De=0!==n&&4>n?n:4,t(!0);var r=Tr.transition;Tr.transition={};try{t(!1),e()}finally{De=n,Tr.transition=r}}function gi(){return Br().memoizedState}function pi(t,e,n){var r=Ao(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mi(t))yi(e,n);else if(null!==(n=Vn(t,e,n,r))){Ro(n,t,r,Mo()),bi(n,e,r)}}function vi(t,e,n){var r=Ao(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mi(t))yi(e,i);else{var a=t.alternate;if(0===t.lanes&&(null===a||0===a.lanes)&&null!==(a=e.lastRenderedReducer))try{var o=e.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Ye(s,o)){var l=e.interleaved;return null===l?(i.next=i,Hn(e)):(i.next=l.next,l.next=i),void(e.interleaved=i)}}catch(h){}null!==(n=Vn(t,e,i,r))&&(Ro(n,t,r,i=Mo()),bi(n,e,r))}}function mi(t){var e=t.alternate;return t===Fr||null!==e&&e===Fr}function yi(t,e){Rr=Ar=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function bi(t,e,n){if(0!==(4194240&n)){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,Re(t,n)}}var _i={readContext:Un,useCallback:Ir,useContext:Ir,useEffect:Ir,useImperativeHandle:Ir,useInsertionEffect:Ir,useLayoutEffect:Ir,useMemo:Ir,useReducer:Ir,useRef:Ir,useState:Ir,useDebugValue:Ir,useDeferredValue:Ir,useTransition:Ir,useMutableSource:Ir,useSyncExternalStore:Ir,useId:Ir,unstable_isNewReconciler:!1},Si={readContext:Un,useCallback:function(t,e){return Ur().memoizedState=[t,void 0===e?null:e],t},useContext:Un,useEffect:ri,useImperativeHandle:function(t,e,n){return n=null!==n&&void 0!==n?n.concat([t]):null,ei(4194308,4,si.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ei(4194308,4,t,e)},useInsertionEffect:function(t,e){return ei(4,2,t,e)},useMemo:function(t,e){var n=Ur();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ur();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=pi.bind(null,Fr,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},Ur().memoizedState=t},useState:Zr,useDebugValue:hi,useDeferredValue:function(t){return Ur().memoizedState=t},useTransition:function(){var t=Zr(!1),e=t[0];return t=fi.bind(null,t[1]),Ur().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Fr,i=Ur();if(pn){if(void 0===n)throw Error(o(407));n=n()}else{if(n=e(),null===ro)throw Error(o(349));0!==(30&Er)||Yr(r,e,n)}i.memoizedState=n;var a={value:n,getSnapshot:e};return i.queue=a,ri(qr.bind(null,r,a,t),[t]),r.flags|=2048,Jr(9,Xr.bind(null,r,a,n,e),void 0,null),n},useId:function(){var t=Ur(),e=ro.identifierPrefix;if(pn){var n=ln;e=":"+e+"R"+(n=(sn&~(1<<32-Se(sn)-1)).toString(32)+n),0<(n=Dr++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=Lr++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},xi={readContext:Un,useCallback:ui,useContext:Un,useEffect:ii,useImperativeHandle:li,useInsertionEffect:ai,useLayoutEffect:oi,useMemo:ci,useReducer:Vr,useRef:ti,useState:function(){return Vr(Hr)},useDebugValue:hi,useDeferredValue:function(t){return di(Br(),Nr.memoizedState,t)},useTransition:function(){return[Vr(Hr)[0],Br().memoizedState]},useMutableSource:Wr,useSyncExternalStore:Kr,useId:gi,unstable_isNewReconciler:!1},Ci={readContext:Un,useCallback:ui,useContext:Un,useEffect:ii,useImperativeHandle:li,useInsertionEffect:ai,useLayoutEffect:oi,useMemo:ci,useReducer:jr,useRef:ti,useState:function(){return jr(Hr)},useDebugValue:hi,useDeferredValue:function(t){var e=Br();return null===Nr?e.memoizedState=t:di(e,Nr.memoizedState,t)},useTransition:function(){return[jr(Hr)[0],Br().memoizedState]},useMutableSource:Wr,useSyncExternalStore:Kr,useId:gi,unstable_isNewReconciler:!1};function wi(t,e){try{var n="",r=e;do{n+=Fn(r),r=r.return}while(r);var i=n}catch(a){i="\nError generating stack: "+a.message+"\n"+a.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(n){setTimeout((function(){throw n}))}}var Ti="function"===typeof WeakMap?WeakMap:Map;function Ei(t,e,n){(n=Xn(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){So||(So=!0,xo=r),Pi(0,e)},n}function Fi(t,e,n){(n=Xn(-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===Co?Co=new Set([this]):Co.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function Ni(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=es.bind(null,t,e,n),e.then(t,t))}function Mi(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 0===(1&t.mode)?(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=Xn(-1,1)).tag=2,qn(n,e,1))),n.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}var Ri=s.ReactCurrentOwner,Di=!1;function Li(t,e,n,r){e.child=null===t?dr(e,null,n,r):cr(e,t.child,n,r)}function Ii(t,e,n,r,i){n=n.render;var a=e.ref;return zn(e,i),r=Gr(t,e,n,r,a,i),n=zr(),null===t||Di?(pn&&n&&cn(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 Oi(t,e,n,r,i){if(null===t){var a=n.type;return"function"!==typeof a||ls(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=us(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,Gi(t,e,a,r,i))}if(a=t.child,0===(t.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:En)(o,r)&&t.ref===e.ref)return aa(t,e,i)}return e.flags|=1,(t=hs(a,r)).ref=e.ref,t.return=e,e.child=t}function Gi(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);0!==(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(0===(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},he(so,oo),oo|=n;else{if(0===(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(so,oo),oo|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,he(so,oo),oo|=r}else null!==a?(r=a.baseLanes|n,e.memoizedState=null):r=n,he(so,oo),oo|=r;
1return 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:ce.current;return a=ge(e,a),zn(e,i),n=Gr(t,e,n,r,a,i),r=zr(),null===t||Di?(pn&&r&&cn(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(zn(e,i),null===e.stateNode)ia(t,e),ir(e,n,r),or(e,n,r,i),r=!0;else if(null===t){var o=e.stateNode,s=e.memoizedProps;o.props=s;var l=o.context,h=n.contextType;"object"===typeof h&&null!==h?h=Un(h):h=ge(e,h=pe(n)?fe:ce.current);var u=n.getDerivedStateFromProps,c="function"===typeof u||"function"===typeof o.getSnapshotBeforeUpdate;c||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==r||l!==h)&&ar(e,o,r,h),Wn=!1;var d=e.memoizedState;o.state=d,Zn(e,r,o,i),l=e.memoizedState,s!==r||d!==l||de.current||Wn?("function"===typeof u&&(er(e,n,u,r),l=e.memoizedState),(s=Wn||rr(e,n,s,r,d,l,h))?(c||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||("function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"===typeof o.componentDidMount&&(e.flags|=4194308)):("function"===typeof o.componentDidMount&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=h,r=s):("function"===typeof o.componentDidMount&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,Yn(t,e),s=e.memoizedProps,h=e.type===e.elementType?s:Nn(e.type,s),o.props=h,c=e.pendingProps,d=o.context,"object"===typeof(l=n.contextType)&&null!==l?l=Un(l):l=ge(e,l=pe(n)?fe:ce.current);var f=n.getDerivedStateFromProps;(u="function"===typeof f||"function"===typeof o.getSnapshotBeforeUpdate)||"function"!==typeof o.UNSAFE_componentWillReceiveProps&&"function"!==typeof o.componentWillReceiveProps||(s!==c||d!==l)&&ar(e,o,r,l),Wn=!1,d=e.memoizedState,o.state=d,Zn(e,r,o,i);var g=e.memoizedState;s!==c||d!==g||de.current||Wn?("function"===typeof f&&(er(e,n,f,r),g=e.memoizedState),(h=Wn||rr(e,n,h,r,d,g,l)||!1)?(u||"function"!==typeof o.UNSAFE_componentWillUpdate&&"function"!==typeof o.componentWillUpdate||("function"===typeof o.componentWillUpdate&&o.componentWillUpdate(r,g,l),"function"===typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,g,l)),"function"===typeof o.componentDidUpdate&&(e.flags|=4),"function"===typeof o.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!==typeof o.componentDidUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=h):("function"!==typeof o.componentDidUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!==typeof o.getSnapshotBeforeUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return Vi(t,e,n,r,a,i)}function Vi(t,e,n,r,i,a){Ui(t,e);var o=0!==(128&e.flags);if(!r&&!o)return i&&_e(e,n,!1),aa(t,e,a);r=e.stateNode,Ri.current=e;var s=o&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&o?(e.child=cr(e,t.child,null,a),e.child=cr(e,null,s,a)):Li(t,e,s,a),e.memoizedState=r.state,i&&_e(e,n,!0),e.child}function ji(t){var e=t.stateNode;e.pendingContext?me(0,e.pendingContext,e.pendingContext!==e.context):e.context&&me(0,e.context,!1),yr(t,e.containerInfo)}function Wi(t,e,n,r,i){return kn(),Pn(i),e.flags|=256,Li(t,e,n,r),e.child}var Ki,Yi,Xi,qi,Qi={dehydrated:null,treeContext:null,retryLane:0};function $i(t){return{baseLanes:t,cachePool:null,transitions:null}}function Zi(t,e,n){var r,i=e.pendingProps,a=xr.current,s=!1,l=0!==(128&e.flags);if((r=l)||(r=(null===t||null!==t.memoizedState)&&0!==(2&a)),r?(s=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(a|=1),he(xr,1&a),null===t)return Sn(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0===(1&e.mode)?e.lanes=1:Ot(t)?e.lanes=8:e.lanes=1073741824,null):(l=i.children,t=i.fallback,s?(i=e.mode,s=e.child,l={mode:"hidden",children:l},0===(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=ds(l,i,0,null),t=cs(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=$i(n),e.memoizedState=Qi,t):Ji(e,l));if(null!==(a=t.memoizedState)&&null!==(r=a.dehydrated))return function(t,e,n,r,i,a,s){if
1(n)return 256&e.flags?(e.flags&=-257,ta(t,e,s,r=ki(Error(o(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(a=r.fallback,i=e.mode,r=ds({mode:"visible",children:r.children},i,0,null),(a=cs(a,i,s,null)).flags|=2,r.return=e,a.return=e,r.sibling=a,e.child=r,0!==(1&e.mode)&&cr(e,t.child,null,s),e.child.memoizedState=$i(s),e.memoizedState=Qi,a);if(0===(1&e.mode))return ta(t,e,s,null);if(Ot(i))return r=Gt(i).digest,a=Error(o(419)),r=ki(a,r,void 0),ta(t,e,s,r);if(n=0!==(s&t.childLanes),Di||n){if(null!==(r=ro)){switch(s&-s){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|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,jn(t,i),Ro(r,t,i,-1))}return Wo(),ta(t,e,s,r=ki(Error(o(421))))}return It(i)?(e.flags|=128,e.child=t.child,e=rs.bind(null,t),zt(i,e),null):(t=a.treeContext,Q&&(gn=Vt(i),fn=e,pn=!0,mn=null,vn=!1,null!==t&&(rn[an++]=sn,rn[an++]=ln,rn[an++]=on,sn=t.id,ln=t.overflow,on=e)),(e=Ji(e,r.children)).flags|=4096,e)}(t,e,l,i,r,a,n);if(s){s=i.fallback,l=e.mode,r=(a=t.child).sibling;var h={mode:"hidden",children:i.children};return 0===(1&l)&&e.child!==a?((i=e.child).childLanes=0,i.pendingProps=h,e.deletions=null):(i=hs(a,h)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=hs(r,s):(s=cs(s,l,n,null)).flags|=2,s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,l=null===(l=t.child.memoizedState)?$i(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=t.childLanes&~n,e.memoizedState=Qi,i}return t=(s=t.child).sibling,i=hs(s,{mode:"visible",children:i.children}),0===(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 Ji(t,e){return(e=ds({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function ta(t,e,n,r){return null!==r&&Pn(r),cr(e,t.child,null,n),(t=Ji(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),Gn(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),0!==(2&(r=xr.current)))r=1&r|2,e.flags|=128;else{if(null!==t&&0!==(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(xr,r),0===(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===Cr(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===Cr(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}return e.child}function ia(t,e){0===(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),uo|=e.lanes,0===(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(o(153));if(null!==e.child){for(n=hs(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=hs(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function oa(t){t.flags|=4}function sa(t,e){if(null!==t&&t.child===e.child)return!0;if(0!==(16&e.flags))return!1;for(t=e.child;null!==t;){if(0!==(12854&t.flags)||0!==(12854&t.subtreeFlags))return!1;t=t.sibling}return!0}if(X)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(){},Xi=function(t,e,n,r,i){if((t=t.memoizedProps)!==r){var a=e.stateNode,o=mr(gr.current);n=B(a,n,t,r,i,o),(e.updateQueue=n)&&oa(e)}},qi=function(t,e,n,r){n!==r&&oa(e)};else if(q){Ki=function(t,e,n,r){for(var i=e.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Mt(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=Mt(a,i.type,i.memoizedProps,i)),Et(t,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=At(a,i.memoizedProps,i)),Et(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(!sa(t,e)){t=n.containerInfo;var r=Tt(t);la(r,e,!1,!1),n.pendingChildren=r,oa(e),Ft(t,r)}},Xi=function(t,e,n,r,i){var a=t.stateNode,o=t.memoizedProps;if((t=sa(t,e))&&o===r)e.stateNode=a;else{var s=e.stateNode,l=mr(gr.current),h=null;o!==r&&(h=B(s,n,o,r,i,l)),t&&null===h?e.stateNode=a:(a=Pt(a,h,n,o,r,e,t,s),U(a,n,r,i,l)&&oa(e),e.stateNode=a,t?oa(e):Ki(a,e,!1,!1))}},qi=function(t,e,n,r){n!==r?(t=mr(vr.current),n=mr(gr.current),e.stateNode=V(r,t,n,e),oa(e)):e.stateNode=t.stateNode}}else Yi=function(){},Xi=function(){},qi=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;
1null===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 ua(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 ca(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 ua(e),null;case 1:case 17:return pe(e.type)&&ve(),ua(e),null;case 3:return n=e.stateNode,br(),le(de),le(ce),kr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||(Cn(e)?oa(e):null===t||t.memoizedState.isDehydrated&&0===(256&e.flags)||(e.flags|=1024,null!==mn&&(Oo(mn),mn=null))),Yi(t,e),ua(e),null;case 5:Sr(e),n=mr(vr.current);var i=e.type;if(null!==t&&null!=e.stateNode)Xi(t,e,i,r,n),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(null===e.stateNode)throw Error(o(166));return ua(e),null}if(t=mr(gr.current),Cn(e)){if(!Q)throw Error(o(175));t=jt(e.stateNode,e.type,e.memoizedProps,n,t,e,!vn),e.updateQueue=t,null!==t&&oa(e)}else{var a=G(i,r,n,t,e);Ki(a,e,!1,!1),e.stateNode=a,U(a,i,r,n,t)&&oa(e)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return ua(e),null;case 6:if(t&&null!=e.stateNode)qi(t,e,t.memoizedProps,r);else{if("string"!==typeof r&&null===e.stateNode)throw Error(o(166));if(t=mr(vr.current),n=mr(gr.current),Cn(e)){if(!Q)throw Error(o(176));if(t=e.stateNode,n=e.memoizedProps,(r=Wt(t,n,e,!vn))&&null!==(i=fn))switch(i.tag){case 3:Jt(i.stateNode.containerInfo,t,n,0!==(1&i.mode));break;case 5:te(i.type,i.memoizedProps,i.stateNode,t,n,0!==(1&i.mode))}r&&oa(e)}else e.stateNode=V(r,t,n,e)}return ua(e),null;case 13:if(le(xr),r=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(pn&&null!==gn&&0!==(1&e.mode)&&0===(128&e.flags))wn(),kn(),e.flags|=98560,i=!1;else if(i=Cn(e),null!==r&&null!==r.dehydrated){if(null===t){if(!i)throw Error(o(318));if(!Q)throw Error(o(344));if(!(i=null!==(i=e.memoizedState)?i.dehydrated:null))throw Error(o(317));Kt(i,e)}else kn(),0===(128&e.flags)&&(e.memoizedState=null),e.flags|=4;ua(e),i=!1}else null!==mn&&(Oo(mn),mn=null),i=!0;if(!i)return 65536&e.flags?e:null}return 0!==(128&e.flags)?(e.lanes=n,e):((n=null!==r)!==(null!==t&&null!==t.memoizedState)&&n&&(e.child.flags|=8192,0!==(1&e.mode)&&(null===t||0!==(1&xr.current)?0===lo&&(lo=3):Wo())),null!==e.updateQueue&&(e.flags|=4),ua(e),null);case 4:return br(),Yi(t,e),null===t&&Z(e.stateNode.containerInfo),ua(e),null;case 10:return On(e.type._context),ua(e),null;case 19:if(le(xr),null===(i=e.memoizedState))return ua(e),null;if(r=0!==(128&e.flags),null===(a=i.rendering))if(r)ha(i,!1);else{if(0!==lo||null!==t&&0!==(128&t.flags))for(t=e.child;null!==t;){if(null!==(a=Cr(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(xr,1&xr.current|2),e.child}t=t.sibling}null!==i.tail&&Ue()>mo&&(e.flags|=128,r=!0,ha(i,!1),e.lanes=4194304)}else{if(!r)if(null!==(t=Cr(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 ua(e),null}else 2*Ue()-i.renderingStartTime>mo&&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=xr.current,he(xr,r?1&t|2:1&t),e):(ua(e),null);case 22:case 23:return Bo(),n=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==n&&(e.flags|=8192),n&&0!==(1&e.mode)?0!==(1073741824&oo)&&(ua(e),X&&6&e.subtreeFlags&&(e.flags|=8192)):ua(e),null;case 24:case 25:return null}throw Error(o(156,e.tag))}function da(t,e){switch(dn(e),e.tag){case 1:return pe(e.type)&&ve(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return br(),le(de),le(ce),kr(),0!==(65536&(t=e.flags))&&0===(128&t)?(e.flags=-65537&t|128,e):null;case 5:return Sr(e),null;case 13:if(le(xr),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(o(340));kn()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return le(xr),null;case 4:return br(),null;
1case 10:return On(e.type._context),null;case 22:case 23:return Bo(),null;default:return null}}var fa=!1,ga=!1,pa="function"===typeof WeakSet?WeakSet:Set,va=null;function ma(t,e){var n=t.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){ts(t,e,r)}else n.current=null}function ya(t,e,n){try{n()}catch(r){ts(t,e,r)}}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&&ya(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;if(5===t.tag)t=R(n);else t=n;"function"===typeof e?e(t):e.current=t}}function Ca(t){var e=t.alternate;null!==e&&(t.alternate=null,Ca(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 wa(t){return 5===t.tag||3===t.tag||4===t.tag}function ka(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||wa(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?mt(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?vt(n,t,e):ct(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 Ea=null,Fa=!1;function Na(t,e,n){for(n=n.child;null!==n;)Ma(t,e,n),n=n.sibling}function Ma(t,e,n){if(Ke&&"function"===typeof Ke.onCommitFiberUnmount)try{Ke.onCommitFiberUnmount(We,n)}catch(s){}switch(n.tag){case 5:ga||ma(n,e);case 6:if(X){var r=Ea,i=Fa;Ea=null,Na(t,e,n),Fa=i,null!==(Ea=r)&&(Fa?bt(Ea,n.stateNode):yt(Ea,n.stateNode))}else Na(t,e,n);break;case 18:X&&null!==Ea&&(Fa?$t(Ea,n.stateNode):Qt(Ea,n.stateNode));break;case 4:X?(r=Ea,i=Fa,Ea=n.stateNode.containerInfo,Fa=!0,Na(t,e,n),Ea=r,Fa=i):(q&&(r=n.stateNode.containerInfo,i=Tt(r),Nt(r,i)),Na(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,o=a.destroy;a=a.tag,void 0!==o&&(0!==(2&a)||0!==(4&a))&&ya(n,e,o),i=i.next}while(i!==r)}Na(t,e,n);break;case 1:if(!ga&&(ma(n,e),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ts(n,e,s)}Na(t,e,n);break;case 21:Na(t,e,n);break;case 22:1&n.mode?(ga=(r=ga)||null!==n.memoizedState,Na(t,e,n),ga=r):Na(t,e,n);break;default:Na(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=is.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,s=e;if(X){var l=s;t:for(;null!==l;){switch(l.tag){case 5:Ea=l.stateNode,Fa=!1;break t;case 3:case 4:Ea=l.stateNode.containerInfo,Fa=!0;break t}l=l.return}if(null===Ea)throw Error(o(160));Ma(a,s,i),Ea=null,Fa=!1}else Ma(a,s,i);var h=i.alternate;null!==h&&(h.return=null),i.return=null}catch(u){ts(i,e,u)}}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(f){ts(t,t.return,f)}try{_a(5,t,t.return)}catch(f){ts(t,t.return,f)}}break;case 1:Ra(e,t),La(t),512&r&&null!==n&&ma(n,n.return);break;case 5:if(Ra(e,t),La(t),512&r&&null!==n&&ma(n,n.return),X){if(32&t.flags){var i=t.stateNode;try{_t(i)}catch(f){ts(t,t.return,f)}}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(f){ts(t,t.return,f)}}}break;case 6:if(Ra(e,t),La(t),4&r&&X){if(null===t.stateNode)throw Error(o(162));i=t.stateNode,a=t.memoizedProps,n=null!==n?n.memoizedProps:a;try{ft(i,n,a)}catch(f){ts(t,t.return,f)}}break;case 3:if(Ra(e,t),La(t),4&r){if(X&&Q&&null!==n&&n.memoizedState.isDehydrated)try{Xt(e.containerInfo)}catch(f){ts(t,t.return,f)}if(q){i=e.containerInfo,a=e.pendingChildren;try{Nt(i,a)}catch(f){ts(t,t.return,f)}}}break;case 4:if(Ra(e,t),La(t),4&r&&q){i=(a=t.stateNode).containerInfo,a=a.pendingChildren;try{Nt(i,a)}catch(f){ts(t,t.return,f)}}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||(vo=Ue()
1)),4&r&&Aa(t);break;case 22:var s=null!==n&&null!==n.memoizedState;if(1&t.mode?(ga=(n=ga)||s,Ra(e,t),ga=n):Ra(e,t),La(t),8192&r){if(n=null!==t.memoizedState,(t.stateNode.isHidden=n)&&!s&&0!==(1&t.mode))for(va=t,r=t.child;null!==r;){for(e=va=r;null!==va;){var l=(s=va).child;switch(s.tag){case 0:case 11:case 14:case 15:_a(4,s,s.return);break;case 1:ma(s,s.return);var h=s.stateNode;if("function"===typeof h.componentWillUnmount){var u=s,c=s.return;try{var d=u;h.props=d.memoizedProps,h.state=d.memoizedState,h.componentWillUnmount()}catch(f){ts(u,c,f)}}break;case 5:ma(s,s.return);break;case 22:if(null!==s.memoizedState){za(e);continue}}null!==l?(l.return=s,va=l):za(e)}r=r.sibling}if(X)t:if(r=null,X)for(e=t;;){if(5===e.tag){if(null===r){r=e;try{i=e.stateNode,n?St(i):Ct(e.stateNode,e.memoizedProps)}catch(f){ts(t,t.return,f)}}}else if(6===e.tag){if(null===r)try{a=e.stateNode,n?xt(a):wt(a,e.memoizedProps)}catch(f){ts(t,t.return,f)}}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(X){t:{for(var n=t.return;null!==n;){if(wa(n)){var r=n;break t}n=n.return}throw Error(o(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(o(161))}}}catch(s){ts(t,t.return,s)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function Ia(t,e,n){va=t,Oa(t,e,n)}function Oa(t,e,n){for(var r=0!==(1&t.mode);null!==va;){var i=va,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||fa;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||ga;s=fa;var h=ga;if(fa=o,(ga=l)&&!h)for(va=i;null!==va;)l=(o=va).child,22===o.tag&&null!==o.memoizedState?Ua(i):null!==l?(l.return=o,va=l):Ua(i);for(;null!==a;)va=a,Oa(a,e,n),a=a.sibling;va=i,fa=s,ga=h}Ga(t)}else 0!==(8772&i.subtreeFlags)&&null!==a?(a.return=i,va=a):Ga(t)}}function Ga(t){for(;null!==va;){var e=va;if(0!==(8772&e.flags)){var n=e.alternate;try{if(0!==(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:Nn(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=e.updateQueue;null!==a&&Jn(e,a,r);break;case 3:var s=e.updateQueue;if(null!==s){if(n=null,null!==e.child)switch(e.child.tag){case 5:n=R(e.child.stateNode);break;case 1:n=e.child.stateNode}Jn(e,s,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 u=h.memoizedState;if(null!==u){var c=u.dehydrated;null!==c&&qt(c)}}}break;default:throw Error(o(163))}ga||512&e.flags&&xa(e)}catch(d){ts(e,e.return,d)}}if(e===t){va=null;break}if(null!==(n=e.sibling)){n.return=e.return,va=n;break}va=e.return}}function za(t){for(;null!==va;){var e=va;if(e===t){va=null;break}var n=e.sibling;if(null!==n){n.return=e.return,va=n;break}va=e.return}}function Ua(t){for(;null!==va;){var e=va;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Sa(4,e)}catch(l){ts(e,n,l)}break;case 1:var r=e.stateNode;if("function"===typeof r.componentDidMount){var i=e.return;try{r.componentDidMount()}catch(l){ts(e,i,l)}}var a=e.return;try{xa(e)}catch(l){ts(e,a,l)}break;case 5:var o=e.return;try{xa(e)}catch(l){ts(e,o,l)}}}catch(l){ts(e,e.return,l)}if(e===t){va=null;break}var s=e.sibling;if(null!==s){s.return=e.return,va=s;break}va=e.return}}var Ba=0,Ha=1,Va=2,ja=3,Wa=4;if("function"===typeof Symbol&&Symbol.for){var Ka=Symbol.for;Ba=Ka("selector.component"),Ha=Ka("selector.has_pseudo_class"),Va=Ka("selector.role"),ja=Ka("selector.test_id"),Wa=Ka("selector.text")}
1function Ya(t){var e=$(t);if(null!=e){if("string"!==typeof e.memoizedProps["data-testname"])throw Error(o(364));return e}if(null===(t=it(t)))throw Error(o(362));return t.stateNode.current}function Xa(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||!st(r)){for(;null!=a&&Xa(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 Va:if(5===t.tag&<(t.stateNode,e.value))return!0;break;case Wa:if((5===t.tag||6===t.tag)&&(null!==(t=ot(t))&&0<=t.indexOf(e.value)))return!0;break;case ja:if(5===t.tag&&("string"===typeof(t=t.memoizedProps["data-testname"])&&t.toLowerCase()===e.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function qa(t){switch(t.$$typeof){case Ba:return"<"+(C(t.value)||"Unknown")+">";case Ha:return":has("+(qa(t)||"")+")";case Va:return'[role="'+t.value+'"]';case Wa:return'"'+t.value+'"';case ja:return'[data-testname="'+t.value+'"]';default:throw Error(o(365))}}function Qa(t,e){var n=[];t=[t,0];for(var r=0;r<t.length;){var i=t[r++],a=t[r++],o=e[a];if(5!==i.tag||!st(i)){for(;null!=o&&Xa(i,o);)o=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(o(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)st(r)||e.push(r.stateNode);else for(r=r.child;null!==r;)t.push(r),r=r.sibling}return e}var Za=Math.ceil,Ja=s.ReactCurrentDispatcher,to=s.ReactCurrentOwner,eo=s.ReactCurrentBatchConfig,no=0,ro=null,io=null,ao=0,oo=0,so=se(0),lo=0,ho=null,uo=0,co=0,fo=0,go=null,po=null,vo=0,mo=1/0,yo=null;function bo(){mo=Ue()+500}var _o,So=!1,xo=null,Co=null,wo=!1,ko=null,Po=0,To=0,Eo=null,Fo=-1,No=0;function Mo(){return 0!==(6&no)?Ue():-1!==Fo?Fo:Fo=Ue()}function Ao(t){return 0===(1&t.mode)?1:0!==(2&no)&&0!==ao?ao&-ao:null!==Tn.transition?(0===No&&(No=Ne()),No):0!==(t=De)?t:J()}function Ro(t,e,n,r){if(50<To)throw To=0,Eo=null,Error(o(185));Ae(t,n,r),0!==(2&no)&&t===ro||(t===ro&&(0===(2&no)&&(co|=n),4===lo&&Go(t,ao)),Do(t,r),1===n&&0===no&&0===(1&e.mode)&&(bo(),qe&&Ze()))}function Do(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 o=31-Se(a),s=1<<o,l=i[o];-1===l?0!==(s&n)&&0===(s&r)||(i[o]=Ee(s,e)):l<=e&&(t.expiredLanes|=s),a&=~s}}(t,e);var r=Te(t,t===ro?ao:0);if(0===r)null!==n&&Oe(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(null!=n&&Oe(n),1===e)0===t.tag?function(t){qe=!0,$e(t)}(zo.bind(null,t)):$e(zo.bind(null,t)),et?nt((function(){0===(6&no)&&Ze()})):Ie(Be,Ze),n=null;else{switch(Le(r)){case 1:n=Be;break;case 4:n=He;break;case 16:default:n=Ve;break;case 536870912:n=je}n=as(n,Lo.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Lo(t,e){if(Fo=-1,No=0,0!==(6&no))throw Error(o(327));var n=t.callbackNode;if(Zo()&&t.callbackNode!==n)return null;var r=Te(t,t===ro?ao:0);if(0===r)return null;if(0!==(30&r)||0!==(r&t.expiredLanes)||e)e=Ko(t,r);else{e=r;var i=no;no|=2;var a=jo();for(ro===t&&ao===e||(yo=null,bo(),Ho(t,e));;)try{Xo();break}catch(l){Vo(t,l)}Ln(),Ja.current=a,no=i,null!==io?e=0:(ro=null,ao=0,e=lo)}if(0!==e){if(2===e&&(0!==(i=Fe(t))&&(r=i,e=Io(t,i))),1===e)throw n=ho,Ho(t,0),Go(t,r),Do(t,Ue()),n;if(6===e)Go(t,r);else{if(i=t.current.alternate,0===(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(s){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)&&(2===(e=Ko(t,r))&&(0!==(a=Fe(t))&&(r=a,e=Io(t,a))),1===e))throw n=ho,Ho(t,0),Go(t,r),Do(t,Ue()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(o(345));case 2:case 5:$o(t,po,yo);break;
1case 3:if(Go(t,r),(130023424&r)===r&&10<(e=vo+500-Ue())){if(0!==Te(t,0))break;if(((i=t.suspendedLanes)&r)!==r){Mo(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=j($o.bind(null,t,po,yo),e);break}$o(t,po,yo);break;case 4:if(Go(t,r),(4194240&r)===r)break;for(e=t.eventTimes,i=-1;0<r;){var s=31-Se(r);a=1<<s,(s=e[s])>i&&(i=s),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*Za(r/1960))-r)){t.timeoutHandle=j($o.bind(null,t,po,yo),r);break}$o(t,po,yo);break;default:throw Error(o(329))}}}return Do(t,Ue()),t.callbackNode===n?Lo.bind(null,t):null}function Io(t,e){var n=go;return t.current.memoizedState.isDehydrated&&(Ho(t,e).flags|=256),2!==(t=Ko(t,e))&&(e=po,po=n,null!==e&&Oo(e)),t}function Oo(t){null===po?po=t:po.push.apply(po,t)}function Go(t,e){for(e&=~fo,e&=~co,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 zo(t){if(0!==(6&no))throw Error(o(327));Zo();var e=Te(t,0);if(0===(1&e))return Do(t,Ue()),null;var n=Ko(t,e);if(0!==t.tag&&2===n){var r=Fe(t);0!==r&&(e=r,n=Io(t,r))}if(1===n)throw n=ho,Ho(t,0),Go(t,e),Do(t,Ue()),n;if(6===n)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,$o(t,po,yo),Do(t,Ue()),null}function Uo(t){null!==ko&&0===ko.tag&&0===(6&no)&&Zo();var e=no;no|=1;var n=eo.transition,r=De;try{if(eo.transition=null,De=1,t)return t()}finally{De=r,eo.transition=n,0===(6&(no=e))&&Ze()}}function Bo(){oo=so.current,le(so)}function Ho(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==K&&(t.timeoutHandle=K,W(n)),null!==io)for(n=io.return;null!==n;){var r=n;switch(dn(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&ve();break;case 3:br(),le(de),le(ce),kr();break;case 5:Sr(r);break;case 4:br();break;case 13:case 19:le(xr);break;case 10:On(r.type._context);break;case 22:case 23:Bo()}n=n.return}if(ro=t,io=t=hs(t.current,null),ao=oo=e,lo=0,ho=null,fo=co=uo=0,po=go=null,null!==Bn){for(e=0;e<Bn.length;e++)if(null!==(r=(n=Bn[e]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Bn=null}return t}function Vo(t,e){for(;;){var n=io;try{if(Ln(),Pr.current=_i,Ar){for(var r=Fr.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Ar=!1}if(Er=0,Mr=Nr=Fr=null,Rr=!1,Dr=0,to.current=null,null===n||null===n.return){lo=1,ho=e,io=null;break}t:{var a=t,s=n.return,l=n,h=e;if(e=ao,l.flags|=32768,null!==h&&"object"===typeof h&&"function"===typeof h.then){var u=h,c=l,d=c.tag;if(0===(1&c.mode)&&(0===d||11===d||15===d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var g=Mi(s);if(null!==g){g.flags&=-257,Ai(g,s,l,0,e),1&g.mode&&Ni(a,u,e),h=u;var p=(e=g).updateQueue;if(null===p){var v=new Set;v.add(h),e.updateQueue=v}else p.add(h);break t}if(0===(1&e)){Ni(a,u,e),Wo();break t}h=Error(o(426))}else if(pn&&1&l.mode){var m=Mi(s);if(null!==m){0===(65536&m.flags)&&(m.flags|=256),Ai(m,s,l,0,e),Pn(wi(h,l));break t}}a=h=wi(h,l),4!==lo&&(lo=2),null===go?go=[a]:go.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,e&=-e,a.lanes|=e,$n(a,Ei(0,h,e));break t;case 1:l=h;var y=a.type,b=a.stateNode;if(0===(128&a.flags)&&("function"===typeof y.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Co||!Co.has(b)))){a.flags|=65536,e&=-e,a.lanes|=e,$n(a,Fi(a,l,e));break t}}a=a.return}while(null!==a)}Qo(n)}catch(_){e=_,io===n&&null!==n&&(io=n=n.return);continue}break}}function jo(){var t=Ja.current;return Ja.current=_i,null===t?_i:t}function Wo(){0!==lo&&3!==lo&&2!==lo||(lo=4),null===ro||0===(268435455&uo)&&0===(268435455&co)||Go(ro,ao)}function Ko(t,e){var n=no;no|=2;var r=jo();for(ro===t&&ao===e||(yo=null,Ho(t,e));;)try{Yo();break}catch(i){Vo(t,i)}if(Ln(),no=n,Ja.current=r,null!==io)throw Error(o(261));return ro=null,ao=0,lo}function Yo(){for(;null!==io;)qo(io)}function Xo(){for(;null!==io&&!Ge();)qo(io)}function qo(t){var e=_o(t.alternate,t,oo);t.memoizedProps=t.pendingProps,null===e?Qo(t):io=e,to.current=null}function Qo(t){var e=t;do{var n=e.alternate;if(t=e.return,0===(32768&e.flags)){if(null!==(n=ca(n,e,oo)))return void(io=n)}else{if(null!==(n=da(n,e)))return n.flags&=32767,void(io=n);if(null===t)return lo=6,void(io=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}if(null!==(e=e.sibling))return void(io=e);io=e=t}while(null!==e);0===lo&&(lo=5)}function $o(t,e,n){var r=De,i=eo.transition;try{eo.transition=null,De=1,function(t,e,n,r){do{Zo()}while(null!==ko);if(0!==(6&no))throw Error(o(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(o(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===ro&&(io=ro=null,ao=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||wo||(wo=!0,as(Ve,(function(){return Zo(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=eo.transition,eo.transition=null;var s=De;De=1;var l=no;no|=4,to.current=null,function(t,e){for(I(t.containerInfo),va=e;null!==va;)if(e=(t=va).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,va=e;else for(;null!==va;){t=va;try{var n=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case
16:case 4:case 17:break;case 1:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,a=t.stateNode,s=a.getSnapshotBeforeUpdate(t.elementType===t.type?r:Nn(t.type,r),i);a.__reactInternalSnapshotBeforeUpdate=s}break;case 3:X&&kt(t.stateNode.containerInfo);break;default:throw Error(o(163))}}catch(l){ts(t,t.return,l)}if(null!==(e=t.sibling)){e.return=t.return,va=e;break}va=t.return}n=ba,ba=!1}(t,n),Da(n,t),O(t.containerInfo),t.current=n,Ia(n,t,i),ze(),no=l,De=s,eo.transition=a}else t.current=n;if(wo&&(wo=!1,ko=t,Po=i),0===(a=t.pendingLanes)&&(Co=null),function(t){if(Ke&&"function"===typeof Ke.onCommitFiberRoot)try{Ke.onCommitFiberRoot(We,t,void 0,128===(128&t.current.flags))}catch(e){}}(n.stateNode),Do(t,Ue()),null!==e)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(So)throw So=!1,t=xo,xo=null,t;0!==(1&Po)&&0!==t.tag&&Zo(),0!==(1&(a=t.pendingLanes))?t===Eo?To++:(To=0,Eo=t):To=0,Ze()}(t,e,n,r)}finally{eo.transition=i,De=r}return null}function Zo(){if(null!==ko){var t=Le(Po),e=eo.transition,n=De;try{if(eo.transition=null,De=16>t?16:t,null===ko)var r=!1;else{if(t=ko,ko=null,Po=0,0!==(6&no))throw Error(o(331));var i=no;for(no|=4,va=t.current;null!==va;){var a=va,s=a.child;if(0!==(16&va.flags)){var l=a.deletions;if(null!==l){for(var h=0;h<l.length;h++){var u=l[h];for(va=u;null!==va;){var c=va;switch(c.tag){case 0:case 11:case 15:_a(8,c,a)}var d=c.child;if(null!==d)d.return=c,va=d;else for(;null!==va;){var f=(c=va).sibling,g=c.return;if(Ca(c),c===u){va=null;break}if(null!==f){f.return=g,va=f;break}va=g}}}var p=a.alternate;if(null!==p){var v=p.child;if(null!==v){p.child=null;do{var m=v.sibling;v.sibling=null,v=m}while(null!==v)}}va=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,va=s;else t:for(;null!==va;){if(0!==(2048&(a=va).flags))switch(a.tag){case 0:case 11:case 15:_a(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,va=y;break t}va=a.return}}var b=t.current;for(va=b;null!==va;){var _=(s=va).child;if(0!==(2064&s.subtreeFlags)&&null!==_)_.return=s,va=_;else t:for(s=b;null!==va;){if(0!==(2048&(l=va).flags))try{switch(l.tag){case 0:case 11:case 15:Sa(9,l)}}catch(x){ts(l,l.return,x)}if(l===s){va=null;break t}var S=l.sibling;if(null!==S){S.return=l.return,va=S;break t}va=l.return}}if(no=i,Ze(),Ke&&"function"===typeof Ke.onPostCommitFiberRoot)try{Ke.onPostCommitFiberRoot(We,t)}catch(x){}r=!0}return r}finally{De=n,eo.transition=e}}return!1}function Jo(t,e,n){t=qn(t,e=Ei(0,e=wi(n,e),1),1),e=Mo(),null!==t&&(Ae(t,1,e),Do(t,e))}function ts(t,e,n){if(3===t.tag)Jo(t,t,n);else for(;null!==e;){if(3===e.tag){Jo(e,t,n);break}if(1===e.tag){var r=e.stateNode;if("function"===typeof e.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Co||!Co.has(r))){e=qn(e,t=Fi(e,t=wi(n,t),1),1),t=Mo(),null!==e&&(Ae(e,1,t),Do(e,t));break}}e=e.return}}function es(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=Mo(),t.pingedLanes|=t.suspendedLanes&n,ro===t&&(ao&n)===n&&(4===lo||3===lo&&(130023424&ao)===ao&&500>Ue()-vo?Ho(t,0):fo|=n),Do(t,e)}function ns(t,e){0===e&&(0===(1&t.mode)?e=1:(e=ke,0===(130023424&(ke<<=1))&&(ke=4194304)));var n=Mo();null!==(t=jn(t,e))&&(Ae(t,e,n),Do(t,n))}function rs(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),ns(t,n)}function is(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(o(314))}null!==r&&r.delete(e),ns(t,n)}function as(t,e){return Ie(t,e)}function os(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 ss(t,e,n,r){return new os(t,e,n,r)}function ls(t){return!(!(t=t.prototype)||!t.isReactComponent)}function hs(t,e){var n=t.alternate;return null===n?((n=ss(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.deleti
1ons=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 us(t,e,n,r,i,a){var s=2;if(r=t,"function"===typeof t)ls(t)&&(s=1);else if("string"===typeof t)s=5;else t:switch(t){case u:return cs(n.children,i,a,e);case c:s=8,i|=8;break;case d:return(t=ss(12,n,e,2|i)).elementType=d,t.lanes=a,t;case v:return(t=ss(13,n,e,i)).elementType=v,t.lanes=a,t;case m:return(t=ss(19,n,e,i)).elementType=m,t.lanes=a,t;case _:return ds(n,i,a,e);default:if("object"===typeof t&&null!==t)switch(t.$$typeof){case f:s=10;break t;case g:s=9;break t;case p:s=11;break t;case y:s=14;break t;case b:s=16,r=null;break t}throw Error(o(130,null==t?t:typeof t,""))}return(e=ss(s,n,e,i)).elementType=t,e.type=r,e.lanes=a,e}function cs(t,e,n,r){return(t=ss(7,t,r,e)).lanes=n,t}function ds(t,e,n,r){return(t=ss(22,t,r,e)).elementType=_,t.lanes=n,t.stateNode={isHidden:!1},t}function fs(t,e,n){return(t=ss(6,t,null,e)).lanes=n,t}function gs(t,e,n){return(e=ss(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function ps(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=Me(0),this.expirationTimes=Me(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Me(0),this.identifierPrefix=r,this.onRecoverableError=i,Q&&(this.mutableSourceEagerHydrationData=null)}function vs(t,e,n,r,i,a,o,s,l){return t=new ps(t,e,n,s,l),1===e?(e=1,!0===a&&(e|=8)):e=0,a=ss(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kn(a),t}function ms(t){if(!t)return ue;t:{if(k(t=t._reactInternals)!==t||1!==t.tag)throw Error(o(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(o(171))}if(1===t.tag){var n=t.type;if(pe(n))return ye(t,n,e)}return e}function ys(t){var e=t._reactInternals;if(void 0===e){if("function"===typeof t.render)throw Error(o(188));throw t=Object.keys(t).join(","),Error(o(268,t))}return null===(t=E(e))?null:t.stateNode}function bs(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function _s(t,e){bs(t,e),(t=t.alternate)&&bs(t,e)}function Ss(t){return null===(t=E(t))?null:t.stateNode}function xs(){return null}return _o=function(t,e,n){if(null!==t)if(t.memoizedProps!==e.pendingProps||de.current)Di=!0;else{if(0===(t.lanes&n)&&0===(128&e.flags))return Di=!1,function(t,e,n){switch(e.tag){case 3:ji(e),kn();break;case 5:_r(e);break;case 1:pe(e.type)&&be(e);break;case 4:yr(e,e.stateNode.containerInfo);break;case 10:In(0,e.type._context,e.memoizedProps.value);break;case 13:var r=e.memoizedState;if(null!==r)return null!==r.dehydrated?(he(xr,1&xr.current),e.flags|=128,null):0!==(n&e.child.childLanes)?Zi(t,e,n):(he(xr,1&xr.current),null!==(t=aa(t,e,n))?t.sibling:null);he(xr,1&xr.current);break;case 19:if(r=0!==(n&e.childLanes),0!==(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(xr,xr.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=0!==(131072&t.flags)}else Di=!1,pn&&0!==(1048576&e.flags)&&un(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,ce.current);zn(e,n),i=Gr(null,e,r,t,i,n);var a=zr();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,Kn(e),i.updater=nr,e.stateNode=i,i._reactInternals=e,or(e,r,t,n),e=Vi(null,e,r,!0,a,n)):(e.tag=0,pn&&a&&cn(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 ls(t)?1:0;if(void 0!==t&&null!==t){if((t=t.$$typeof)===p)return 11;if(t===y)return 14}return 2}(r),t=Nn(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=Oi(null,e,r,Nn(r.type,t),n);break t}throw Error(o(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,Bi(t,e,r,i=e.elementType===r?i:Nn(r,i),n);case 1:return r=e.type,i=e.pendingProps,Hi(t,e,r,i=e.elementType===r?i:Nn(r,i),n);case 3:t:{if(ji(e),null===t)throw Error(o(387));r=e.pendingProps,i=(a=e.memoizedState).element,Yn(t,e),Zn(e,r,null,n);var s=e.memoizedState;if(r=s.element,Q&&a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=a,e.memoizedState=a,256&e.flags){e=Wi(t,e,r,n,i=wi(Error(o(423)),e));break t}if(r!==i){e=Wi(t,e,r,n,i=wi(Error(o(424)),e));break t}for(Q&&(gn=Ht(e.stateNode.containerInfo),fn=e,pn=!0,mn=null,vn=!1),n=dr(e,null,r,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(kn(),r===i){e=aa(t,e,n);break t}Li(t,e,r,n)}e=e.child}return e;case 5:return _r(e),null===t&&Sn(e),r=e.type,i=e.pendingProps,a=null!==t?t.memoizedProps:null,s=i.children,H(r,i)?s=null:null!==a&&H(r,a)&&(e.flags|=32),Ui(t,e),Li(t,e,s,n),e.child;case 6:return null===t&&Sn(e),null;case 13:return Zi(t,e,n);case 4:return yr(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=cr(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:Nn(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;
1case 10:t:{if(r=e.type._context,i=e.pendingProps,a=e.memoizedProps,In(0,r,s=i.value),null!==a)if(Ye(a.value,s)){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){s=a.child;for(var h=l.firstContext;null!==h;){if(h.context===r){if(1===a.tag){(h=Xn(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?h.next=h:(h.next=c.next,c.next=h),u.pending=h}}a.lanes|=n,null!==(h=a.alternate)&&(h.lanes|=n),Gn(a.return,n,e),l.lanes|=n;break}h=h.next}}else if(10===a.tag)s=a.type===e.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Gn(s,n,e),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===e){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}Li(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,zn(e,n),r=r(i=Un(i)),e.flags|=1,Li(t,e,r,n),e.child;case 14:return i=Nn(r=e.type,e.pendingProps),Oi(t,e,r,i=Nn(r.type,i),n);case 15:return Gi(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:Nn(r,i),ia(t,e),e.tag=1,pe(r)?(t=!0,be(e)):t=!1,zn(e,n),ir(e,r,i),or(e,r,i,n),Vi(null,e,r,!0,t,n);case 19:return ra(t,e,n);case 22:return zi(t,e,n)}throw Error(o(156,e.tag))},e.attemptContinuousHydration=function(t){if(13===t.tag){var e=jn(t,134217728);if(null!==e)Ro(e,t,134217728,Mo());_s(t,134217728)}},e.attemptDiscreteHydration=function(t){if(13===t.tag){var e=jn(t,1);if(null!==e)Ro(e,t,1,Mo());_s(t,1)}},e.attemptHydrationAtCurrentPriority=function(t){if(13===t.tag){var e=Ao(t),n=jn(t,e);if(null!==n)Ro(n,t,e,Mo());_s(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),Do(e,Ue()),0===(6&no)&&(bo(),Ze()))}break;case 13:Uo((function(){var e=jn(t,1);if(null!==e){var n=Mo();Ro(e,t,1,n)}})),_s(t,1)}},e.batchedUpdates=function(t,e){var n=no;no|=1;try{return t(e)}finally{0===(no=n)&&(bo(),qe&&Ze())}},e.createComponentSelector=function(t){return{$$typeof:Ba,value:t}},e.createContainer=function(t,e,n,r,i,a,o){return vs(t,e,!1,null,0,r,0,a,o)},e.createHasPseudoClassSelector=function(t){return{$$typeof:Ha,value:t}},e.createHydrationContainer=function(t,e,n,r,i,a,o,s,l){return(t=vs(n,r,!0,t,0,a,0,s,l)).context=ms(null),n=t.current,(a=Xn(r=Mo(),i=Ao(n))).callback=void 0!==e&&null!==e?e:null,qn(n,a,i),t.current.lanes=i,Ae(t,i,r),Do(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:Va,value:t}},e.createTestNameSelector=function(t){return{$$typeof:ja,value:t}},e.createTextSelector=function(t){return{$$typeof:Wa,value:t}},e.deferredUpdates=function(t){var e=De,n=eo.transition;try{return eo.transition=null,De=16,t()}finally{De=e,eo.transition=n}},e.discreteUpdates=function(t,e,n,r,i){var a=De,o=eo.transition;try{return eo.transition=null,De=1,t(e,n,r,i)}finally{De=a,eo.transition=o,0===no&&bo()}},e.findAllNodes=$a,e.findBoundingRects=function(t,e){if(!rt)throw Error(o(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,s=a+n.height,l=e-1;0<=l;l--)if(e!==l){var h=t[l],u=h.x,c=u+h.width,d=h.y,f=d+h.height;if(r>=u&&a>=d&&i<=c&&s<=f){t.splice(e,1);break}if(!(r!==u||n.width!==h.width||f<a||d>s)){d>a&&(h.height+=d-a,h.y=a),f<s&&(h.height=s-d),t.splice(e,1);break}if(!(a!==d||n.height!==h.height||c<r||u>i)){u>r&&(h.width+=u-r,h.x=r),c<i&&(h.width=i-u),t.splice(e,1);break}}return t},e.findHostInstance=ys,e.findHostInstanceWithNoPortals=function(t){return null===(t=null!==(t=T(t))?N(t):null)?null:t.stateNode},e.findHostInstanceWithWarning=function(t){return ys(t)},e.flushControlled=function(t){var e=no;no|=1;var n=eo.transition,r=De;try{eo.transition=null,De=1,t()}finally{De=r,eo.transition=n,0===(no=e)&&(bo(),Ze())}},e.flushPassiveEffects=Zo,e.flushSync=Uo,e.focusWithin=function(t,e){if(!rt)throw Error(o(363));for(e=Qa(t=Ya(t),e),e=Array.from(e),t=0;t<e.length;){var n=e[t++];
1if(!st(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(o(363));var n=0,r=[];t=[Ya(t),0];for(var i=0;i<t.length;){var a=t[i++],s=t[i++],l=e[s];if((5!==a.tag||!st(a))&&(Xa(a,l)&&(r.push(qa(l)),++s>n&&(n=s)),s<e.length))for(a=a.child;null!==a;)t.push(a,s),a=a.sibling}if(n<e.length){for(t=[];n<e.length;n++)t.push(qa(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:s.ReactCurrentDispatcher,findHostInstanceByFiber:Ss,findFiberByHostInstance:t.findFiberByHostInstance||xs,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},"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(n){}t=!!e.checkDCE}}return t},e.isAlreadyRendering=function(){return!1},e.observeVisibleRects=function(t,e,n,r){if(!rt)throw Error(o(363));t=$a(t,e);var i=ut(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=Mo(),o=Ao(i);return n=ms(n),null===e.context?e.context=n:e.pendingContext=n,(e=Xn(a,o)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),null!==(t=qn(i,e,o))&&(Ro(t,i,o,a),Qn(t,i,o)),o},e}},32576:function(t,e,n){"use strict";t.exports=n(46511)},76525:function(t,e,n){"use strict";t.exports=n(67287)},84420:function(t,e,n){var r=n(67294);t.exports=function(t,e,n){const i=r.useRef("loading"),a=r.useRef(),[o,s]=r.useState(0),l=r.useRef(),h=r.useRef(),u=r.useRef();return l.current===t&&h.current===e&&u.current===n||(i.current="loading",a.current=void 0,l.current=t,h.current=e,u.current=n),r.useLayoutEffect((function(){if(t){var r=document.createElement("img");return r.addEventListener("load",o),r.addEventListener("error",l),e&&(r.crossOrigin=e),n&&(r.referrerPolicy=n),r.src=t,function(){r.removeEventListener("load",o),r.removeEventListener("error",l)}}function o(){i.current="loaded",a.current=r,s(Math.random())}function l(){i.current="failed",a.current=void 0,s(Math.random())}}),[t,e,n]),[a.current,i.current]}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.