1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6273],{28771:function(t,e,i){i.d(e,{F:function(){return a},e:function(){return s}});var r=i(67294);function n(t,e){if("function"==typeof t)return t(e);null!=t&&(t.current=e)}function a(...t){return e=>{let i=!1,r=t.map(t=>{let r=n(t,e);return i||"function"!=typeof r||(i=!0),r});if(i)return()=>{for(let e=0;e<r.length;e++){let i=r[e];"function"==typeof i?i():n(t[e],null)}}}}function s(...t){return r.useCallback(a(...t),t)}},88426:function(t,e,i){i.d(e,{g7:function(){return d}});var r,n=i(67294),a=i(28771),s=i(85893),o=Symbol.for("react.lazy"),l=(r||(r=i.t(n,2)))[" use ".trim().toString()];function h(t){var e;return null!=t&&"object"==typeof t&&"$$typeof"in t&&t.$$typeof===o&&"_payload"in t&&"object"==typeof(e=t._payload)&&null!==e&&"then"in e}var d=function(t){let e=function(t){let e=n.forwardRef((t,e)=>{let{children:i,...r}=t;if(h(i)&&"function"==typeof l&&(i=l(i._payload)),n.isValidElement(i)){var s;let t,o;let l=(s=i,(t=Object.getOwnPropertyDescriptor(s.props,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?s.ref:(t=Object.getOwnPropertyDescriptor(s,"ref")?.get)&&"isReactWarning"in t&&t.isReactWarning?s.props.ref:s.props.ref||s.ref),h=function(t,e){let i={...e};for(let r in e){let n=t[r],a=e[r],s=/^on[A-Z]/.test(r);s?n&&a?i[r]=(...t)=>{let e=a(...t);return n(...t),e}:n&&(i[r]=n):"style"===r?i[r]={...n,...a}:"className"===r&&(i[r]=[n,a].filter(Boolean).join(" "))}return{...t,...i}}(r,i.props);return i.type!==n.Fragment&&(h.ref=e?(0,a.F)(e,l):l),n.cloneElement(i,h)}return n.Children.count(i)>1?n.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}(t),i=n.forwardRef((t,i)=>{let{children:r,...a}=t;h(r)&&"function"==typeof l&&(r=l(r._payload));let o=n.Children.toArray(r),d=o.find(u);if(d){let t=d.props.children,r=o.map(e=>e!==d?e:n.Children.count(t)>1?n.Children.only(null):n.isValidElement(t)?t.props.children:null);return(0,s.jsx)(e,{...a,ref:i,children:n.isValidElement(t)?n.cloneElement(t,void 0,r):null})}return(0,s.jsx)(e,{...a,ref:i,children:r})});return i.displayName=`${t}.Slot`,i}("Slot"),c=Symbol("radix.slottable");function u(t){return n.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===c}},12003:function(t,e,i){i.d(e,{j:function(){return s}});var r=i(90512);let n=t=>"boolean"==typeof t?`${t}`:0===t?"0":t,a=r.W,s=(t,e)=>i=>{var r;if((null==e?void 0:e.variants)==null)return a(t,null==i?void 0:i.class,null==i?void 0:i.className);let{variants:s,defaultVariants:o}=e,l=Object.keys(s).map(t=>{let e=null==i?void 0:i[t],r=null==o?void 0:o[t];if(null===e)return null;let a=n(e)||n(r);return s[t][a]}),h=i&&Object.entries(i).reduce((t,e)=>{let[i,r]=e;return void 0===r||(t[i]=r),t},{}),d=null==e?void 0:null===(r=e.compoundVariants)||void 0===r?void 0:r.reduce((t,e)=>{let{class:i,className:r,...n}=e;return Object.entries(n).every(t=>{let[e,i]=t;return Array.isArray(i)?i.includes({...o,...h}[e]):({...o,...h})[e]===i})?[...t,i,r]:t},[]);return a(t,l,d,null==i?void 0:i.class,null==i?void 0:i.className)}},90512:function(t,e,i){i.d(e,{W:function(){return r}});function r(){for(var t,e,i=0,r="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=function t(e){var i,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e){if(Array.isArray(e)){var a=e.length;for(i=0;i<a;i++)e[i]&&(r=t(e[i]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r)}return n}(t))&&(r&&(r+=" "),r+=e);return r}},45080:function(t,e,i){i.d(e,{f:function(){return Animation}});var r=i(36382),n=i(4391);let a=r.zA.performance&&r.zA.performance.now?function(){return r.zA.performance.now()}:function(){return new Date().getTime()};class Animation{constructor(t,e){this.id=Animation.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){let e=this.layers,i=e.length;for(let r=0;r<i;r++)if(e[r]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){let t=Animation.animations,e=t.length;for(let i=0;i<e;i++)if(t[i].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=a(),Animation._addAnimation(this),this}stop(){return Animation._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){let e=t.id,i=this.animations,r=i.length;for(let t=0;t<r;t++)if(i[t].id===e){this.animations.splice(t,1);break}}static _runFrames(){let t={},e=this.animations;for(let i=0;i<e.length;i++){let r=e[i],n=r.layers,s=r.func;r._updateFrameObject(a());let o=n.length;if(!s||!1!==s.call(r,r.frame))for(let e=0;e<o;e++){let i=n[e];void 0!==i._id&&(t[i._id]=i)}}for(let e in t)t.hasOwnProperty(e)&&t[e].batchDraw()}static _animationLoop(){Animation.animations.length?(Animation._runFrames(),n.Z.requestAnimFrame
1(Animation._animationLoop)):Animation.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,n.Z.requestAnimFrame(this._animationLoop))}}Animation.animations=[],Animation.animIdCounter=0,Animation.animRunning=!1},57044:function(t,e,i){let r;i.d(e,{RF:function(){return l},Xz:function(){return o},hh:function(){return h}});var n=i(4391),a=i(64333),s=i(36382);class o{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;let e=(t||{}).pixelRatio||s.So.pixelRatio||function(){if(r)return r;let t=n.Z.createCanvasElement(),e=t.getContext("2d");return r=function(){let t=s.So._global.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}(),n.Z.releaseCanvas(t),r}();this.pixelRatio=e,this._canvas=n.Z.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){let 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";let e=this.pixelRatio,i=this.getContext()._context;i.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";let e=this.pixelRatio,i=this.getContext()._context;i.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return n.Z.error("Unable to get data URL. "+t.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}class l extends o{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new a.xn(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}class h extends o{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new a.jR(this),this.setSize(t.width,t.height)}}},50671:function(t,e,i){i.d(e,{W:function(){return s}});var r=i(72772),n=i(17874),a=i(42513);class s extends n.N{constructor(){super(...arguments),this.children=[]}getChildren(t){let e=this.children||[];return t?e.filter(t):e}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(let e=0;e<t.length;e++)this.add(t[e]);return this}let e=t[0];return e.getParent()?e.moveTo(this):(this._validateAdd(e),e.index=this.getChildren().length,e.parent=this,e._clearCaches(),this.getChildren().push(e),this._fire("add",{child:e}),this._requestDraw()),this}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){let e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){let i=[];return this._descendants(r=>{let n=r._isMatch(t);return n&&i.push(r),!!n&&!!e}),i}_descendants(t){let e=this.getChildren();for(let i of e)if(t(i)||i.hasChildren()&&i._descendants(t))return!0;return!1}toObject(){let t=n.N.prototype.toObject.call(this);
1return t.children=[],this.getChildren().forEach(e=>{t.children.push(e.toObject())}),t}isAncestorOf(t){let e=t.getParent();for(;e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){let e=n.N.prototype.clone.call(this,t);return this.getChildren().forEach(function(t){e.add(t.clone())}),e}getAllIntersections(t){let e=[];return this.find("Shape").forEach(i=>{i.isVisible()&&i.intersects(t)&&e.push(i)}),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,i){let r=this.getLayer(),n=t||r&&r.getCanvas(),a=n&&n.getContext(),s=this._getCanvasCache(),o=s&&s.scene,l=n&&n.isCache;if(!this.isVisible()&&!l)return this;if(o){a.save();let t=this.getAbsoluteTransform(e).getMatrix();a.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",n,e,i);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;let i=this.getLayer(),r=t||i&&i.hitCanvas,n=r&&r.getContext(),a=this._getCanvasCache(),s=a&&a.hit;if(s){n.save();let t=this.getAbsoluteTransform(e).getMatrix();n.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedHitCanvas(n),n.restore()}else this._drawChildren("drawHit",r,e);return this}_drawChildren(t,e,i,r){var n;let a=e&&e.getContext(),s=this.clipWidth(),o=this.clipHeight(),l=this.clipFunc(),h="number"==typeof s&&"number"==typeof o||l,d=i===this;if(h){let t;a.save();let e=this.getAbsoluteTransform(i),r=e.getMatrix();if(a.transform(r[0],r[1],r[2],r[3],r[4],r[5]),a.beginPath(),l)t=l.call(this,a,this);else{let t=this.clipX(),e=this.clipY();a.rect(t||0,e||0,s,o)}a.clip.apply(a,t),r=e.copy().invert().getMatrix(),a.transform(r[0],r[1],r[2],r[3],r[4],r[5])}let c=!d&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;c&&(a.save(),a._applyGlobalCompositeOperation(this)),null===(n=this.children)||void 0===n||n.forEach(function(n){n[t](e,i,r)}),c&&a.restore(),h&&a.restore()}getClientRect(t={}){var e;let i,r,n,a;let s=t.skipTransform,o=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())return;let s=e.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});(0!==s.width||0!==s.height)&&(void 0===i?(i=s.x,r=s.y,n=s.x+s.width,a=s.y+s.height):(i=Math.min(i,s.x),r=Math.min(r,s.y),n=Math.max(n,s.x+s.width),a=Math.max(a,s.y+s.height)))});let d=this.find("Shape"),c=!1;for(let t=0;t<d.length;t++){let e=d[t];if(e._isVisible(this)){c=!0;break}}return(l=c&&void 0!==i?{x:i,y:r,width:n-i,height:a-r}:{x:0,y:0,width:0,height:0},s)?l:this._transformedRect(l,o)}}r.F.addComponentsGetterSetter(s,"clip",["x","y","width","height"]),r.F.addGetterSetter(s,"clipX",void 0,(0,a.Kg)()),r.F.addGetterSetter(s,"clipY",void 0,(0,a.Kg)()),r.F.addGetterSetter(s,"clipWidth",void 0,(0,a.Kg)()),r.F.addGetterSetter(s,"clipHeight",void 0,(0,a.Kg)()),r.F.addGetterSetter(s,"clipFunc")},64333:function(t,e,i){i.d(e,{II:function(){return o},_y:function(){return l},jR:function(){return d},xn:function(){return h}});var r=i(4391),n=i(36382);let a=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],s=null;function o(){if(null!==s)return s;try{let t=r.Z.createCanvasElement(),e=t.getContext("2d");if(!e)return s=!1,!1;return!!e&&"filter"in e}catch(t){return s=!1,!1}}class l{constructor(t){this.canvas=t,n.So.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,e){let i=this.traceArr,n=i.length,a="",s,o,l,h;for(s=0;s<n;s++)(l=(o=i[s]).method)?(h=o.args,a+=l,t?a+="()":r.Z._isArray(h[0])?a+="(["+h.join(",")+"])":(e&&(h=h.map(t=>"number"==typeof t?Math.floor(t):t)),a+="("+h.join(",")+")")):(a+=o.property,t||(a+="="+
1o.val)),a+=";";return a}clearTrace(){this.traceArr=[]}_trace(t){let e=this.traceArr;e.push(t),e.length>=100&&e.shift()}reset(){let t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){let 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){let e=t.attrs.lineCap;e&&this.setAttr("lineCap",e)}_applyOpacity(t){let e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){let e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}_applyMiterLimit(t){let e=t.attrs.miterLimit;null!=e&&this.setAttr("miterLimit",e)}setAttr(t,e){this._context[t]=e}arc(t,e,i,r,n,a){this._context.arc(t,e,i,r,n,a)}arcTo(t,e,i,r,n){this._context.arcTo(t,e,i,r,n)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,i,r,n,a){this._context.bezierCurveTo(t,e,i,r,n,a)}clearRect(t,e,i,r){this._context.clearRect(t,e,i,r)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,e){let i=arguments;return 2===i.length?this._context.createImageData(t,e):1===i.length?this._context.createImageData(t):void 0}createLinearGradient(t,e,i,r){return this._context.createLinearGradient(t,e,i,r)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,i,r,n,a){return this._context.createRadialGradient(t,e,i,r,n,a)}drawImage(t,e,i,r,n,a,s,o,l){let h=arguments,d=this._context;3===h.length?d.drawImage(t,e,i):5===h.length?d.drawImage(t,e,i,r,n):9===h.length&&d.drawImage(t,e,i,r,n,a,s,o,l)}ellipse(t,e,i,r,n,a,s,o){this._context.ellipse(t,e,i,r,n,a,s,o)}isPointInPath(t,e,i,r){return i?this._context.isPointInPath(i,t,e,r):this._context.isPointInPath(t,e,r)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,e,i,r){this._context.fillRect(t,e,i,r)}strokeRect(t,e,i,r){this._context.strokeRect(t,e,i,r)}fillText(t,e,i,r){r?this._context.fillText(t,e,i,r):this._context.fillText(t,e,i)}measureText(t){return this._context.measureText(t)}getImageData(t,e,i,r){return this._context.getImageData(t,e,i,r)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,i,r){this._context.rect(t,e,i,r)}roundRect(t,e,i,r,n){this._context.roundRect(t,e,i,r,n)}putImageData(t,e,i){this._context.putImageData(t,e,i)}quadraticCurveTo(t,e,i,r){this._context.quadraticCurveTo(t,e,i,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,i,r,n,a){this._context.setTransform(t,e,i,r,n,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,i,r){this._context.strokeText(t,e,i,r)}transform(t,e,i,r,n,a){this._context.transform(t,e,i,r,n,a)}translate(t,e){this._context.translate(t,e)}_enableTrace(){let t=this,e=a.length,i=this.setAttr,n,s,o=function(e){let i=t[e],n;t[e]=function(){return s=function(t){let e=[],i=t.length,n=r.Z;for(let r=0;r<i;r++){let i=t[r];n._isNumber(i)?i=Math.round(1e3*i)/1e3:n._isString(i)||(i+=""),e.push(i)}return e}(Array.prototype.slice.call(arguments,0)),n=i.apply(t,arguments),t._trace({method:e,args:s}),n}};for(n=0;n<e;n++)o(a[n]);t.setAttr=function(){i.apply(t,arguments);let e=arguments[0],r=arguments[1];("shadowOffsetX"===e||"shadowOffsetY"===e||"shadowBlur"===e)&&(r/=this.canvas.getPixelRatio()),t._trace({property:e,val:r})}}_applyGlobalCompositeOperation(t){let e=t.attrs.globalCompositeOperation,i=!e||"source-over"===e;i||this.setAttr("globalCompositeOperation",e)}}["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled","filter"].forEach(function(t){Object.defineProperty(l.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class h extends l{constructor(t,{willReadFrequently:e=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:e})}_fillColor(t){let e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}
1_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){let e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){let e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){let e=t.fill(),i=t.getFillPriority();if(e&&"color"===i){this._fillColor(t);return}let r=t.getFillPatternImage();if(r&&"pattern"===i){this._fillPattern(t);return}let n=t.getFillLinearGradientColorStops();if(n&&"linear-gradient"===i){this._fillLinearGradient(t);return}let a=t.getFillRadialGradientColorStops();if(a&&"radial-gradient"===i){this._fillRadialGradient(t);return}e?this._fillColor(t):r?this._fillPattern(t):n?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){let e=t.getStrokeLinearGradientStartPoint(),i=t.getStrokeLinearGradientEndPoint(),r=t.getStrokeLinearGradientColorStops(),n=this.createLinearGradient(e.x,e.y,i.x,i.y);if(r){for(let t=0;t<r.length;t+=2)n.addColorStop(r[t],r[t+1]);this.setAttr("strokeStyle",n)}}_stroke(t){let e=t.dash(),i=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!i){this.save();let t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");let r=t.getStrokeLinearGradientColorStops();r?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),i||this.restore()}}_applyShadow(t){var e,i,r;let n=null!==(e=t.getShadowRGBA())&&void 0!==e?e:"black",a=null!==(i=t.getShadowBlur())&&void 0!==i?i:5,s=null!==(r=t.getShadowOffset())&&void 0!==r?r:{x:0,y:0},o=t.getAbsoluteScale(),l=this.canvas.getPixelRatio(),h=o.x*l,d=o.y*l;this.setAttr("shadowColor",n),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(d))),this.setAttr("shadowOffsetX",s.x*h),this.setAttr("shadowOffsetY",s.y*d)}}class d extends l{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()){let e=t.getStrokeScaleEnabled();if(!e){this.save();let t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(t);let i=t.hitStrokeWidth(),r="auto"===i?t.strokeWidth():i;this.setAttr("lineWidth",r),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}}},44117:function(t,e,i){i.d(e,{DD:function(){return a}});var r=i(36382),n=i(4391);let a={get isDragging(){let t=!1;return a._dragElements.forEach(e=>{"dragging"===e.dragStatus&&(t=!0)}),t},justDragged:!1,get node(){let t;return a._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){let e=[];a._dragElements.forEach((i,r)=>{let{node:a}=i,s=a.getStage();s.setPointersPositions(t),void 0===i.pointerId&&(i.pointerId=n.Z._getFirstPointerId(t));let o=s._changedPointerPositions.find(t=>t.id===i.pointerId);if(o){if("dragging"!==i.dragStatus){let e=a.dragDistance(),r=Math.max(Math.abs(o.x-i.startPointerPos.x),Math.abs(o.y-i.startPointerPos.y));if(r<e||(a.startDrag({evt:t}),!a.isDragging()))return}a._setDragPosition(t,i),e.push(a)}}),e.forEach(e=>{e.fire("dragmove",{type:"dragmove",target:e,evt:t},!0)})},_endDragBefore(t){let e=[];a._dragElements.forEach(i=>{let{node:n}=i,s=n.getStage();t&&s.setPointersPositions(t);let o=s._changedPointerPositions.find(t=>t.id===i.pointerId);if(!o)return;("dragging"===i.dragStatus||"stopped"===i.dragStatus)&&(a.justDragged=!0,r.So._mouseListenClick=!1,r.So._touchListenClick=!1,r.So._pointerListenClick=!1,i.dragStatus="stopped");let l=i.node.getLayer()||i.node instanceof r.So.Stage&&i.node;l&&-1===e.indexOf(l)&&e.push(l)}),e.forEach(t=>{t.draw()})},_endDragAfter(t){a._dragElements.forEach((e,i)=>{"stopped"===e.dragStatus&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),"dragging"!==e.dragStatus&&a._dragElements.delete(i)})}};r.So.isBrowser&&(window.addEventListener("mouseup",a._endDragBefore,!0),window.addEventListener("touchend",a._endDragBefore,!0),window.addEventListener("touchcancel",a._endDragBefore,!0),window.addEventListener("mousemove",a._drag),window.addEventListener("touchmove",a._drag),window.addEventListener("mouseup",a._endDragAfter,!1),window.addEventListener("touchend",a._endDragAfter,!1),window.addEventListener("touchcancel",a._endDragAfter,!1))}
1,72772:function(t,e,i){i.d(e,{F:function(){return a}});var r=i(4391),n=i(42513);let a={addGetterSetter(t,e,i,r,n){a.addGetter(t,e,i),a.addSetter(t,e,r,n),a.addOverloadedGetterSetter(t,e)},addGetter(t,e,i){let n="get"+r.Z._capitalize(e);t.prototype[n]=t.prototype[n]||function(){let t=this.attrs[e];return void 0===t?i:t}},addSetter(t,e,i,n){let s="set"+r.Z._capitalize(e);t.prototype[s]||a.overWriteSetter(t,e,i,n)},overWriteSetter(t,e,i,n){let a="set"+r.Z._capitalize(e);t.prototype[a]=function(t){return i&&null!=t&&(t=i.call(this,t,e)),this._setAttr(e,t),n&&n.call(this),this}},addComponentsGetterSetter(t,e,i,s,o){let l=i.length,h=r.Z._capitalize,d="get"+h(e),c="set"+h(e);t.prototype[d]=function(){let t={};for(let r=0;r<l;r++){let n=i[r];t[n]=this.getAttr(e+h(n))}return t};let u=(0,n.uZ)(i);t.prototype[c]=function(t){let r=this.attrs[e];for(let i in s&&(t=s.call(this,t,e)),u&&u.call(this,t,e),t)t.hasOwnProperty(i)&&this._setAttr(e+h(i),t[i]);return t||i.forEach(t=>{this._setAttr(e+h(t),void 0)}),this._fireChangeEvent(e,r,t),o&&o.call(this),this},a.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){let i=r.Z._capitalize(e),n="set"+i,a="get"+i;t.prototype[e]=function(){return arguments.length?(this[n](arguments[0]),this):this[a]()}},addDeprecatedGetterSetter(t,e,i,n){r.Z.error("Adding deprecated "+e);let s="get"+r.Z._capitalize(e),o=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[s]=function(){r.Z.error(o);let t=this.attrs[e];return void 0===t?i:t},a.addSetter(t,e,n,function(){r.Z.error(o)}),a.addOverloadedGetterSetter(t,e)},backCompat(t,e){r.Z.each(e,function(e,i){let n=t.prototype[i],a="get"+r.Z._capitalize(e),s="set"+r.Z._capitalize(e);function o(){n.apply(this,arguments),r.Z.error('"'+e+'" method is deprecated and will be removed soon. Use ""'+i+'" instead.')}t.prototype[e]=o,t.prototype[a]=o,t.prototype[s]=o})},afterSetFilter(){this._filterUpToDate=!1}}},36382:function(t,e,i){i.d(e,{DA:function(){return s},So:function(){return a},zA:function(){return n}});let r=Math.PI/180,n="undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{},a={_global:n,version:"10.0.12",isBrowser:"undefined"!=typeof window&&("[object Window]"===({}).toString.call(window)||"[object global]"===({}).toString.call(window)),isUnminified:/param/.test((function(t){}).toString()),dblClickWindow:400,getAngle:t=>a.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,_renderBackend:"web",legacyTextRendering:!1,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>a.DD.isDragging,isTransforming(){var t,e;return null!==(e=null===(t=a.Transformer)||void 0===t?void 0:t.isTransforming())&&void 0!==e&&e},isDragReady:()=>!!a.DD.node,releaseCanvasOnDestroy:!0,document:n.document,_injectGlobal(t){void 0!==n.Konva&&console.error("Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment."),n.Konva=t}},s=t=>{a[t.prototype.getClassName()]=t};a._injectGlobal(a)},89908:function(t,e,i){i.d(e,{Z:function(){return s}});var r=i(4391),n=i(50671),a=i(36382);class s extends n.W{_validateAdd(t){let e=t.getType();"Group"!==e&&"Shape"!==e&&r.Z.throw("You may only add groups and shapes to groups.")}}s.prototype.nodeType="Group",(0,a.DA)(s)},17874:function(t,e,i){i.d(e,{N:function(){return Node}});var r=i(57044),n=i(64333),a=i(44117),s=i(72772),o=i(36382),l=i(4391),h=i(42513);let d="absoluteOpacity",c="allEventListeners",u="absoluteTransform",g="absoluteScale",f="canvas",p="listening",m="Shape",b="stage",y="transform",v="visible",x=1;class Node{constructor(t){this._id=x++,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===y||t===u)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,e){let i=this._cache.get(t),r=t===y||t===u,n=void 0===i||r&&!0===i.dirty;return n&&(i=e.call(this),this._cache.set(t,i)),i}_calculate(t,e,i){if(!this._attachedDepsListeners.get(t)){let i=e.map(t=>t+"Change.konva").join(" ");this.on(i,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,i)}_getCanvasCache(){return this._cache.get(f)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===u&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(f)){let{scene:t,filter:e,hit:i,buffer:r}=this._cache.get(f);l.Z.releaseCanvas(t,e,i,r),this._cache.delete(f)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){let e=t||{},i={};(void 0===e.x||void 0===e.y||void 0===e.width||void 0===e.height)&&(i=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let n=Math.ceil(e.width||i.width),a=Math.ceil(e.height||i.height),s=e.pixelRatio,o=void 0===e.x?Math.floor(i.x):e.x,h=void 0===e.y?Math.floor(i.y):e.y,c=e.offset||0,u=e.drawBorder||!1,p=e.hitCanvasPixelRatio||1;if(!n||!a){l.Z.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}let m=Math.abs(Math.round(i.x)-o)>.5?1:0,b=Math.abs(Math.round(i.y)-h)>.5?1:0;n+=2*c+m,a+=2*c+b,o-=c,h-=c;let y=new r.RF({pixelRatio:s,width:n,height:a}),v=new r.RF({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),x=new r.hh({pixelRatio:p,width:n,height:a}),_=y.getContext(),w=x.getContext(),S=new r.RF({width:y.width/y.pixelRatio+Math.abs(o),height:y.height/y.pixelRatio+Math.abs(h),pixelRatio:y.pixelRatio}),C=S.getContext();return x.isCache=!0,y.isCache=!0,this._cache.delete(f),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(y.getContext()._context.
1imageSmoothingEnabled=!1,v.getContext()._context.imageSmoothingEnabled=!1),_.save(),w.save(),C.save(),_.translate(-o,-h),w.translate(-o,-h),C.translate(-o,-h),S.x=o,S.y=h,this._isUnderCache=!0,this._clearSelfAndDescendantCache(d),this._clearSelfAndDescendantCache(g),this.drawScene(y,this,S),this.drawHit(x,this),this._isUnderCache=!1,_.restore(),w.restore(),u&&(_.save(),_.beginPath(),_.rect(0,0,n,a),_.closePath(),_.setAttr("strokeStyle","red"),_.setAttr("lineWidth",5),_.stroke(),_.restore()),this._cache.set(f,{scene:y,filter:v,hit:x,buffer:S,x:o,y:h}),this._requestDraw(),this}isCached(){return this._cache.has(f)}getClientRect(t){throw Error('abstract "getClientRect" method call')}_transformedRect(t,e){let i=[{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,n=1/0,a=-1/0,s=-1/0,o=this.getAbsoluteTransform(e);return i.forEach(function(t){let e=o.point(t);void 0===r&&(r=a=e.x,n=s=e.y),r=Math.min(r,e.x),n=Math.min(n,e.y),a=Math.max(a,e.x),s=Math.max(s,e.y)}),{x:r,y:n,width:a-r,height:s-n}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);let e=this._getCanvasCache();t.translate(e.x,e.y);let i=this._getCachedSceneCanvas(),r=i.pixelRatio;t.drawImage(i._canvas,0,0,i.width/r,i.height/r),t.restore()}_drawCachedHitCanvas(t){let e=this._getCanvasCache(),i=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(i._canvas,0,0,i.width/i.pixelRatio,i.height/i.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),e=this._getCanvasCache(),i=e.scene,r=e.filter,a=r.getContext(),s,h,d,c;if(!t||0===t.length)return i;if(this._filterUpToDate)return r;let u=!0;for(let e=0;e<t.length;e++)if("string"!=typeof t[e]||(0,n.II)(),"string"!=typeof t[e]||!(0,n.II)()){u=!1;break}let g=i.pixelRatio;if(r.setSize(i.width/i.pixelRatio,i.height/i.pixelRatio),u){let e=t.join(" ");return a.save(),a.setAttr("filter",e),a.drawImage(i._canvas,0,0,i.getWidth()/g,i.getHeight()/g),a.restore(),this._filterUpToDate=!0,r}try{for(s=t.length,a.clear(),a.drawImage(i._canvas,0,0,i.getWidth()/g,i.getHeight()/g),h=a.getImageData(0,0,r.getWidth(),r.getHeight()),d=0;d<s;d++)c=t[d],"string"==typeof c&&(c=function(t){let e;let i=/(\w+)\(([^)]+)\)/g;for(;null!==(e=i.exec(t));){let[,t,i]=e;switch(t){case"blur":{let t=parseFloat(i.replace("px",""));return function(e){this.blurRadius(.5*t);let i=o.So.Filters;i&&i.Blur&&i.Blur.call(this,e)}}case"brightness":{let t=i.includes("%")?parseFloat(i)/100:parseFloat(i);return function(e){this.brightness(t);let i=o.So.Filters;i&&i.Brightness&&i.Brightness.call(this,e)}}case"contrast":{let t=parseFloat(i);return function(e){let i=100*(Math.sqrt(t)-1);this.contrast(i);let r=o.So.Filters;r&&r.Contrast&&r.Contrast.call(this,e)}}case"grayscale":return function(t){let e=o.So.Filters;e&&e.Grayscale&&e.Grayscale.call(this,t)};case"sepia":return function(t){let e=o.So.Filters;e&&e.Sepia&&e.Sepia.call(this,t)};case"invert":return function(t){let e=o.So.Filters;e&&e.Invert&&e.Invert.call(this,t)};default:l.Z.warn(`CSS filter "${t}" is not supported in fallback mode. Consider using function filters for better compatibility.`)}}return()=>{}}(c)),c.call(this,h),a.putImageData(h,0,0)}catch(t){l.Z.error("Unable to apply filter. "+t.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}return this._filterUpToDate=!0,r}on(t,e){if(this._cache&&this._cache.delete(c),3==arguments.length)return this._delegate.apply(this,arguments);let i=t.split(" ");for(let t=0;t<i.length;t++){let r=i[t],n=r.split("."),a=n[0],s=n[1]||"";this.eventListeners[a]||(this.eventListeners[a]=[]),this.eventListeners[a].push({name:s,handler:e})}return this}off(t,e){let i=(t||"").split(" "),r=i.length,n,a,s,o,l;if(this._cache&&this._cache.delete(c),!t)for(a in this.eventListeners)this._off(a);for(n=0;n<r;n++)if(o=(s=i[n].split("."))[0],l=s[1],o)this.eventListeners[o]&&this._off(o,l,e);else for(a in this.eventListeners)this._off(a,l,e);return this}dispatchEvent(t){let 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,i){let r=this;
1this.on(t,function(t){let n=t.target.findAncestors(e,!0,r);for(let e=0;e<n.length;e++)(t=l.Z.cloneObject(t)).currentTarget=n[e],i.call(n[e],t)})}remove(){return this.isDragging()&&this.stopDrag(),a.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(u),this._clearSelfAndDescendantCache(d),this._clearSelfAndDescendantCache(g),this._clearSelfAndDescendantCache(b),this._clearSelfAndDescendantCache(v),this._clearSelfAndDescendantCache(p)}_remove(){this._clearCaches();let 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){let e="get"+l.Z._capitalize(t);return l.Z._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){let t=this.getParent(),e=[];for(;t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let e,i;if(!t)return this;for(e in t)"children"!==e&&(i="set"+l.Z._capitalize(e),l.Z._isFunction(this[i])?this[i](t[e]):this._setAttr(e,t[e]))}),this}isListening(){return this._getCache(p,this._isListening)}_isListening(t){let e=this.listening();if(!e)return!1;let i=this.getParent();return!i||i===t||this===t||i._isListening(t)}isVisible(){return this._getCache(v,this._isVisible)}_isVisible(t){let e=this.visible();if(!e)return!1;let i=this.getParent();return!i||i===t||this===t||i._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);let i=this.getLayer(),r=!1;a.DD._dragElements.forEach(t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType?r=!0:t.node.getLayer()===i&&(r=!0))});let n=!e&&!o.So.hitOnDragEnabled&&(r||o.So.isTransforming());return this.isListening()&&this.isVisible()&&!n}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),e=this,i=0,r,n,a,s,o=this.getStage();return"Stage"!==e.nodeType&&o&&function o(l){for(a=0,r=[],n=l.length;a<n;a++)s=l[a],i++,s.nodeType!==m&&(r=r.concat(s.getChildren().slice())),s._id===e._id&&(a=n);r.length>0&&r[0].getDepth()<=t&&o(r)}(o.getChildren()),i}getDepth(){let t=0,e=this.parent;for(;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(y),this._clearSelfAndDescendantCache(u)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){let t=this.getStage();if(!t)return null;let e=t.getPointerPosition();if(!e)return null;let i=this.getAbsoluteTransform().copy();return i.invert(),i.point(e)}getAbsolutePosition(t){let e=!1,i=this.parent;for(;i;){if(i.isCached()){e=!0;break}i=i.parent}e&&!t&&(t=!0);let r=this.getAbsoluteTransform(t).getMatrix(),n=new l.w,a=this.offset();return n.m=r.slice(),n.translate(a.x,a.y),n.getTranslation()}setAbsolutePosition(t){let{x:e,y:i,...r}=this._clearTransform();this.attrs.x=e,this.attrs.y=i,this._clearCache(y);let n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(t.x,t.y),t={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(r),this.setPosition({x:t.x,y:t.y}),this._clearCache(y),this._clearSelfAndDescendantCache(u),this}_setTransform(t){let e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){let t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let e=t.x,i=t.y,r=this.x(),n=this.y();return void 0!==e&&(r+=e),void 0!==i&&(n+=i),this.setPosition({x:r,y:n}),this}_eachAncestorReverse(t,e){let i=[],r=this.getParent(),n,a;if(!e||e._id!==this._id){for(i.unshift(this);r&&(!e||r._id!==e._id);)i.unshift(r),r=r.parent;for(a=0,n=i.length;a<n;a++)t(i[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return l.Z.warn("Node has no parent. moveToTop function is ignored."),!1;let t=this.index,e=this.parent.getChildren().length;return t<e-1&&(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return l.Z.warn("Node has no parent. moveUp function is ignored."),!1;let t=this.index,e=this.parent.getChildren().length;return t<e-1&&(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return l.Z.warn("Node has no parent. moveDown function is ignored."),!1;let 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 l.Z.warn("Node has no parent. moveToBottom function is ignored."),!1;let 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 l.Z.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&l.Z.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)+".");let 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(d,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let 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(){let t=this.getAttrs(),e,i,r,n,a={attrs:{},className:this.getClassName()};for(e in t)i=t[e],(!l.Z.isObject(i)||l.Z._isPlainObject(i)||l.Z._isArray(i))&&(r="function"==typeof this[e]&&this[e],delete t[e],n=r?r.call(this):null,t[e]=i,n!==i&&(a.attrs[e]=i));return l.Z._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,i){let r=[];e&&this._isMatch(t)&&r.push(this);let n=this.parent;for(;n&&n!==i;)n._isMatch(t)&&r.push(n),n=n.parent;return r}isAncestorOf(t){return!1}
1findAncestor(t,e,i){return this.findAncestors(t,e,i)[0]}_isMatch(t){if(!t)return!1;if("function"==typeof t)return t(this);let e=t.replace(/ /g,"").split(","),i=e.length,r,n;for(r=0;r<i;r++)if(n=e[r],l.Z.isValidSelector(n)||(l.Z.warn('Selector "'+n+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),l.Z.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),l.Z.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(){let t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(b,this._getStage)}_getStage(){let t=this.getParent();return t?t.getStage():null}fire(t,e={},i){return e.target=e.target||this,i?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(u,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let e;if(t)return e=new l.w,this._eachAncestorReverse(function(t){let i=t.transformsEnabled();"all"===i?e.multiply(t.getTransform()):"position"===i&&e.translate(t.x()-t.offsetX(),t.y()-t.offsetY())},t),e;{e=this._cache.get(u)||new l.w,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();let t=this.transformsEnabled();if("all"===t)e.multiply(this.getTransform());else if("position"===t){let t=this.attrs.x||0,i=this.attrs.y||0,r=this.attrs.offsetX||0,n=this.attrs.offsetY||0;e.translate(t-r,i-n)}return e.dirty=!1,e}}getAbsoluteScale(t){let e=this;for(;e;)e._isUnderCache&&(t=e),e=e.getParent();let i=this.getAbsoluteTransform(t),r=i.decompose();return{x:r.scaleX,y:r.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(y,this._getTransform)}_getTransform(){var t,e;let i=this._cache.get(y)||new l.w;i.reset();let r=this.x(),n=this.y(),a=o.So.getAngle(this.rotation()),s=null!==(t=this.attrs.scaleX)&&void 0!==t?t:1,h=null!==(e=this.attrs.scaleY)&&void 0!==e?e:1,d=this.attrs.skewX||0,c=this.attrs.skewY||0,u=this.attrs.offsetX||0,g=this.attrs.offsetY||0;return(0!==r||0!==n)&&i.translate(r,n),0!==a&&i.rotate(a),(0!==d||0!==c)&&i.skew(d,c),(1!==s||1!==h)&&i.scale(s,h),(0!==u||0!==g)&&i.translate(-1*u,-1*g),i.dirty=!1,i}clone(t){let e=l.Z.cloneObject(this.attrs),i,r,n,a,s;for(i in t)e[i]=t[i];let o=new this.constructor(e);for(i in this.eventListeners)for(a=0,n=(r=this.eventListeners[i]).length;a<n;a++)0>(s=r[a]).name.indexOf("konva")&&(o.eventListeners[i]||(o.eventListeners[i]=[]),o.eventListeners[i].push(s));return o}_toKonvaCanvas(t){t=t||{};let e=this.getClientRect(),i=this.getStage(),n=void 0!==t.x?t.x:Math.floor(e.x),a=void 0!==t.y?t.y:Math.floor(e.y),s=t.pixelRatio||1,o=new r.RF({width:t.width||Math.ceil(e.width)||(i?i.width():0),height:t.height||Math.ceil(e.height)||(i?i.height():0),pixelRatio:s}),l=o.getContext(),h=new r.RF({width:o.width/o.pixelRatio+Math.abs(n),height:o.height/o.pixelRatio+Math.abs(a),pixelRatio:o.pixelRatio});return!1===t.imageSmoothingEnabled&&(l._context.imageSmoothingEnabled=!1),l.save(),(n||a)&&l.translate(-1*n,-1*a),this.drawScene(o,void 0,h),l.restore(),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};let e=t.mimeType||null,i=t.quality||null,r=this._toKonvaCanvas(t).toDataURL(e,i);return t.callback&&t.callback(r),r}toImage(t){return new Promise((e,i)=>{try{let i=null==t?void 0:t.callback;i&&delete t.callback,l.Z._urlToImage(this.toDataURL(t),function(t){e(t),null==i||i(t)})}catch(t){i(t)}})}toBlob(t){return new Promise((e,i)=>{try{let i=null==t?void 0:t.callback;i&&delete t.callback,this.toCanvas(t).toBlob(t=>{e(t),null==i||i(t)},null==t?void 0:t.mimeType,null==t?void 0:t.quality)}catch(t){i(t)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.So.dragDistance}_off(t,e,i){let r=this.eventListeners[t],n,a,s;for(n=0;n<r.length;
1n++)if(a=r[n].name,s=r[n].handler,("konva"!==a||"konva"===e)&&(!e||a===e)&&(!i||i===s)){if(r.splice(n,1),0===r.length){delete this.eventListeners[t];break}n--}}_fireChangeEvent(t,e,i){this._fire(t+"Change",{oldVal:e,newVal:i})}addName(t){if(!this.hasName(t)){let e=this.name();this.name(e?e+" "+t:t)}return this}hasName(t){if(!t)return!1;let e=this.name();if(!e)return!1;let i=(e||"").split(/\s/g);return -1!==i.indexOf(t)}removeName(t){let e=(this.name()||"").split(/\s/g),i=e.indexOf(t);return -1!==i&&(e.splice(i,1),this.name(e.join(" "))),this}setAttr(t,e){let i=this["set"+l.Z._capitalize(t)];return l.Z._isFunction(i)?i.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(o.So.autoDrawEnabled){let t=this.getLayer()||this.getStage();null==t||t.batchDraw()}}_setAttr(t,e){let i=this.attrs[t];(i!==e||l.Z.isObject(e))&&(null==e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,i,e),this._requestDraw())}_setComponentAttr(t,e,i){let r;void 0!==i&&((r=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=i,this._fireChangeEvent(t,r,i))}_fireAndBubble(t,e,i){e&&this.nodeType===m&&(e.target=this);let r=["mouseenter","mouseleave","pointerenter","pointerleave","touchenter","touchleave"],n=-1!==r.indexOf(t)&&(i&&(this===i||this.isAncestorOf&&this.isAncestorOf(i))||"Stage"===this.nodeType&&!i);if(!n){this._fire(t,e);let n=-1!==r.indexOf(t)&&i&&i.isAncestorOf&&i.isAncestorOf(this)&&!i.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!n&&(i&&i.parent?this._fireAndBubble.call(this.parent,t,e,i):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){var e,i,r;let n=null!==(e=this._cache.get(c))&&void 0!==e?e:{},a=null==n?void 0:n[t];if(void 0===a){a=[];let e=Object.getPrototypeOf(this);for(;e;){let n=null!==(r=null===(i=e.eventListeners)||void 0===i?void 0:i[t])&&void 0!==r?r:[];a.push(...n),e=Object.getPrototypeOf(e)}n[t]=a,this._cache.set(c,n)}return a}_fire(t,e){(e=e||{}).currentTarget=this,e.type=t;let i=this._getProtoListeners(t);if(i)for(let t=0;t<i.length;t++)i[t].handler.call(this,e);let r=this.eventListeners[t];if(r)for(let t=0;t<r.length;t++)r[t].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){let e=t?t.pointerId:void 0,i=this.getStage(),r=this.getAbsolutePosition();if(!i)return;let n=i._getPointerById(e)||i._changedPointerPositions[0]||r;a.DD._dragElements.set(this._id,{node:this,startPointerPos:n,offset:{x:n.x-r.x,y:n.y-r.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){a.DD._dragElements.has(this._id)||this._createDragElement(t);let i=a.DD._dragElements.get(this._id);i.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){let i=this.getStage()._getPointerById(e.pointerId);if(!i)return;let r={x:i.x-e.offset.x,y:i.y-e.offset.y},n=this.dragBoundFunc();if(void 0!==n){let e=n.call(this,r,t);e?r=e:l.Z.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}stopDrag(t){let e=a.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),a.DD._endDragBefore(t),a.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){let t=a.DD._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){let e=void 0!==t.evt.button,i=!e||o.So.dragButtons.indexOf(t.evt.button)>=0;if(!i||this.isDragging())return;let r=!1;a.DD._dragElements.forEach(t=>{this.isAncestorOf(t.node)&&(r=!0)}),r||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();let t=this.getStage();if(!t)return;let e=a.DD._dragElements.get(this._id),i=e&&"dragging"===e.dragStatus,r=e&&"ready"===e.dragStatus;
1i?this.stopDrag():r&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){let e=this.getStage();if(!e)return!1;let i={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return l.Z.haveIntersection(i,this.getClientRect())}static create(t,e){return l.Z._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){let i=Node.prototype.getClassName.call(t),r=t.children,n,a,s;e&&(t.attrs.container=e),o.So[i]||(l.Z.warn('Can not find a node with class name "'+i+'". Fallback to "Shape".'),i="Shape");let h=o.So[i];if(n=new h(t.attrs),r)for(s=0,a=r.length;s<a;s++)n.add(Node._createNode(r[s]));return n}}Node.prototype.nodeType="Node",Node.prototype._attrsAffectingSize=[],Node.prototype.eventListeners={},Node.prototype.on.call(Node.prototype,"xChange.konva yChange.konva scaleXChange.konva scaleYChange.konva skewXChange.konva skewYChange.konva rotationChange.konva offsetXChange.konva offsetYChange.konva transformsEnabledChange.konva",function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(y),this._clearSelfAndDescendantCache(u)}),Node.prototype.on.call(Node.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(v)}),Node.prototype.on.call(Node.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(p)}),Node.prototype.on.call(Node.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(d)});let _=s.F.addGetterSetter;_(Node,"zIndex"),_(Node,"absolutePosition"),_(Node,"position"),_(Node,"x",0,(0,h.Kg)()),_(Node,"y",0,(0,h.Kg)()),_(Node,"globalCompositeOperation","source-over",(0,h.sY)()),_(Node,"opacity",1,(0,h.Kg)()),_(Node,"name","",(0,h.sY)()),_(Node,"id","",(0,h.sY)()),_(Node,"rotation",0,(0,h.Kg)()),s.F.addComponentsGetterSetter(Node,"scale",["x","y"]),_(Node,"scaleX",1,(0,h.Kg)()),_(Node,"scaleY",1,(0,h.Kg)()),s.F.addComponentsGetterSetter(Node,"skew",["x","y"]),_(Node,"skewX",0,(0,h.Kg)()),_(Node,"skewY",0,(0,h.Kg)()),s.F.addComponentsGetterSetter(Node,"offset",["x","y"]),_(Node,"offsetX",0,(0,h.Kg)()),_(Node,"offsetY",0,(0,h.Kg)()),_(Node,"dragDistance",void 0,(0,h.Kg)()),_(Node,"width",0,(0,h.Kg)()),_(Node,"height",0,(0,h.Kg)()),_(Node,"listening",!0,(0,h.I0)()),_(Node,"preventDefault",!0,(0,h.I0)()),_(Node,"filters",void 0,function(t){return this._filterUpToDate=!1,t}),_(Node,"visible",!0,(0,h.I0)()),_(Node,"transformsEnabled","all",(0,h.sY)()),_(Node,"size"),_(Node,"dragBoundFunc"),_(Node,"draggable",!1,(0,h.I0)()),s.F.backCompat(Node,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"})},86287:function(t,e,i){i.d(e,{I5:function(){return h},Xg:function(){return d},q0:function(){return l},rl:function(){return s},yM:function(){return o}});var r=i(36382);let n=new Map,a=void 0!==r.So._global.PointerEvent;function s(t){return n.get(t)}function o(t){return{evt:t,pointerId:t.pointerId}}function l(t,e){return n.get(t)===e}function h(t,e){d(t);let i=e.getStage();i&&(n.set(t,e),a&&e._fire("gotpointercapture",o(new PointerEvent("gotpointercapture"))))}function d(t,e){let i=n.get(t);if(!i)return;let r=i.getStage();r&&r.content,n.delete(t),a&&i._fire("lostpointercapture",o(new PointerEvent("lostpointercapture")))}},74786:function(t,e,i){let r;i.d(e,{J:function(){return m},b:function(){return b}});var n=i(36382),a=i(4391),s=i(72772),o=i(17874),l=i(42513),h=i(86287);let d="hasShadow",c="shadowRGBA",u="patternImage",g="linearGradient",f="radialGradient";function p(){return r||(r=a.Z.createCanvasElement().getContext("2d"))}let m={};class b extends o.N{constructor(t){let e;super(t);let i=0;for(;!(e=a.Z.getHitColor())||(e in m);)if(++i>=1e4){a.Z.warn("Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it."),e=a.Z.getRandomColor();break}this.colorKey=e,m[e]=this}getContext(){return a.Z.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return a.Z.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(d,this._hasShadow)}
1_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(u,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let t=p(),e=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){let t=new a.w;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(n.So.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let i=t.getMatrix(),r="undefined"==typeof DOMMatrix?{a:i[0],b:i[1],c:i[2],d:i[3],e:i[4],f:i[5]}:new DOMMatrix(i);e.setTransform(r)}return e}}_getLinearGradient(){return this._getCache(g,this.__getLinearGradient)}__getLinearGradient(){let t=this.fillLinearGradientColorStops();if(t){let e=p(),i=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),n=e.createLinearGradient(i.x,i.y,r.x,r.y);for(let e=0;e<t.length;e+=2)n.addColorStop(t[e],t[e+1]);return n}}_getRadialGradient(){return this._getCache(f,this.__getRadialGradient)}__getRadialGradient(){let t=this.fillRadialGradientColorStops();if(t){let e=p(),i=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),n=e.createRadialGradient(i.x,i.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius());for(let e=0;e<t.length;e+=2)n.addColorStop(t[e],t[e+1]);return n}}getShadowRGBA(){return this._getCache(c,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;let t=a.Z.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}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(){let t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){let e=this.getStage();if(!e)return!1;let i=e.bufferHitCanvas;i.getContext().clear(),this.drawHit(i,void 0,!0);let r=i.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data;return r[3]>0}destroy(){return o.N.prototype.destroy.call(this),delete m[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;let i=null===(e=this.attrs.perfectDrawEnabled)||void 0===e||e;if(!i)return!1;let r=t||this.hasFill(),n=this.hasStroke(),a=1!==this.getAbsoluteOpacity();if(r&&n&&a)return!0;let s=this.hasShadow(),o=this.shadowForStrokeEnabled();return!!r&&!!n&&!!s&&!!o}setStrokeHitEnabled(t){a.Z.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){let t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let e=!1,i=this.getParent();for(;i;){if(i.isCached()){e=!0;break}i=i.getParent()}let r=t.skipTransform,n=t.relativeTo||e&&this.getStage()||void 0,a=this.getSelfRect(),s=!t.skipStroke&&this.hasStroke(),o=s&&this.strokeWidth()||0,l=a.width+o,h=a.height+o,d=!t.skipShadow&&this.hasShadow(),c=d?this.shadowOffsetX():0,u=d?this.shadowOffsetY():0,g=d&&this.shadowBlur()||0,f={width:l+Math.abs(c)+2*g,height:h+Math.abs(u)+2*g,x:-(o/2+g)+Math.min(c,0)+a.x,y:-(o/2+g)+Math.min(u,0)+a.y};return r?f:this._transformedRect(f,n)}drawScene(t,e,i){let r;let n=this.getLayer(),a=t||n.getCanvas(),s=a.getContext(),o=this._getCanvasCache(),l=this.getSceneFunc(),h=this.hasShadow(),d=e===this;if(!this.isVisible()&&!d)return this;if(o){s.save();let t=this.getAbsoluteTransform(e).getMatrix();return s.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedSceneCanvas(s),s.restore(
1),this}if(!l)return this;if(s.save(),this._useBufferCanvas()){r=this.getStage();let t=i||r.bufferCanvas,n=t.getContext();n.clear(),n.save(),n._applyLineJoin(this),n._applyMiterLimit(this);let a=this.getAbsoluteTransform(e).getMatrix();n.transform(a[0],a[1],a[2],a[3],a[4],a[5]),l.call(this,n,this),n.restore();let o=t.pixelRatio;h&&s._applyShadow(this),d||(s._applyOpacity(this),s._applyGlobalCompositeOperation(this)),s.drawImage(t._canvas,t.x||0,t.y||0,t.width/o,t.height/o)}else{if(s._applyLineJoin(this),s._applyMiterLimit(this),!d){let t=this.getAbsoluteTransform(e).getMatrix();s.transform(t[0],t[1],t[2],t[3],t[4],t[5]),s._applyOpacity(this),s._applyGlobalCompositeOperation(this)}h&&s._applyShadow(this),l.call(this,s,this)}return s.restore(),this}drawHit(t,e,i=!1){if(!this.shouldDrawHit(e,i))return this;let r=this.getLayer(),n=t||r.hitCanvas,s=n&&n.getContext(),o=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),h=l&&l.hit;if(this.colorKey||a.Z.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),h){s.save();let t=this.getAbsoluteTransform(e).getMatrix();return s.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedHitCanvas(s),s.restore(),this}if(!o)return this;s.save(),s._applyLineJoin(this),s._applyMiterLimit(this);let d=this===e;if(!d){let t=this.getAbsoluteTransform(e).getMatrix();s.transform(t[0],t[1],t[2],t[3],t[4],t[5])}return o.call(this,s,this),s.restore(),this}drawHitFromCache(t=0){let e=this._getCanvasCache(),i=this._getCachedSceneCanvas(),r=e.hit,n=r.getContext(),s=r.getWidth(),o=r.getHeight();n.clear(),n.drawImage(i._canvas,0,0,s,o);try{let e=n.getImageData(0,0,s,o),i=e.data,r=i.length,l=a.Z._hexToRgb(this.colorKey);for(let e=0;e<r;e+=4){let r=i[e+3];r>t?(i[e]=l.r,i[e+1]=l.g,i[e+2]=l.b,i[e+3]=255):i[e+3]=0}n.putImageData(e,0,0)}catch(t){a.Z.error("Unable to draw hit graph from cached scene canvas. "+t.message)}return this}hasPointerCapture(t){return h.q0(t,this)}setPointerCapture(t){h.I5(t,this)}releaseCapture(t){h.Xg(t,this)}}b.prototype._fillFunc=function(t){let e=this.attrs.fillRule;e?t.fill(e):t.fill()},b.prototype._strokeFunc=function(t){t.stroke()},b.prototype._fillFuncHit=function(t){let e=this.attrs.fillRule;e?t.fill(e):t.fill()},b.prototype._strokeFuncHit=function(t){t.stroke()},b.prototype._centroid=!1,b.prototype.nodeType="Shape",(0,n.DA)(b),b.prototype.eventListeners={},b.prototype.on.call(b.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(d)}),b.prototype.on.call(b.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(c)}),b.prototype.on.call(b.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",function(){this._clearCache(u)}),b.prototype.on.call(b.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",function(){this._clearCache(g)}),b.prototype.on.call(b.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",function(){this._clearCache(f)}),s.F.addGetterSetter(b,"stroke",void 0,(0,l.if)()),s.F.addGetterSetter(b,"strokeWidth",2,(0,l.Kg)()),s.F.addGetterSetter(b,"fillAfterStrokeEnabled",!1),s.F.addGetterSetter(b,"hitStrokeWidth","auto",(0,l.hi)()),s.F.addGetterSetter(b,"strokeHitEnabled",!0,(0,l.I0)()),s.F.addGetterSetter(b,"perfectDrawEnabled",!0,(0,l.I0)()),s.F.addGetterSetter(b,"shadowForStrokeEnabled",!0,(0,l.I0)()),s.F.addGetterSetter(b,"lineJoin"),s.F.addGetterSetter(b,"lineCap"),s.F.addGetterSetter(b,"miterLimit"),s.F.addGetterSetter(b,"sceneFunc"),s.F.addGetterSetter(b,"hitFunc"),s.F.addGetterSetter(b,"dash"),s.F.addGetterSetter(b,"dashOffset",0,(0,l.Kg)()),s.F.addGetterSetter(b,"shadowColor",void 0,(0,l.sY)()),s.F.addGetterSetter(b,"shadowBlur",0,(0,l.Kg)()),s.F.addGetterSetter(b,"shadowOpacity",1,(0,l.Kg)()),s.F.addComponentsGetterSetter(b,"shadowOffset",["x","y"]),s.F.addGetterSetter(b,"shadowOffsetX",0,(0,l.Kg)()),s.F.addGetterSetter(b,"shadowOffsetY",0,(0,l.Kg)()),s.F.addGetterSetter(b,"fillPatternImage"),s.F.addGetterSetter(b,"fill",void 0,(0,l.if)()),s.F.addGetterSetter(b,"fillPatternX",0,(0,l.Kg)()),s.F.addGetterSetter(b,"fillPatternY",0,(0,l.Kg)()),s.F.addGetterSetter(b,"fillLinearGradientColorStops"),s.F.addGetterSetter(b,"strokeLinearGradientColorStops"),s.F.addGetterSetter(b,"fillRadialGradientStartRadius",0),s.F.addGetterSetter(b,"fillRadialGradientEndRadius",0),s.F.addGetterSetter(b,"fillRadialGradientColorStops"),s.F.addGetterSetter(b,"fillPatternRepeat","repeat"),s.F.addGetterSetter(b,"fillEnabled",!0),s.F.addGetterSetter(b,"strokeEnabled",!0),s.F.addGetterSetter(b,"shadowEnabled",!0),s.F.addGetterSetter(b,"dashEnabled",!0),s.F.addGetterSetter(b,"strokeScaleEnabled",!0),s.F.addGetterSetter(b,"fillPriority","color"),s.F.addComponentsGetterSetter(b,"fillPatternOffset",["x","y"]),s.F.addGetterSetter(b,"fillPatternOffsetX",0,(0,l.Kg)()),s.F.addGetterSetter(b,"fillPatternOffsetY",0,(0,l.Kg)()),s.F.addComponentsGetterSetter(b,"fillPatternScale",["x","y"]),s.F.addGetterSetter(b,"fillPatternScaleX",1,(0,l.Kg)()),s.F.addGetterSetter(b,"fillPatternScaleY",1,(0,l.Kg)()),s.F.addComponentsGetterSetter(b,"fillLinearGradientStartPoint",["x","y"]),s.F.addComponentsGetterSetter(b,"strokeLinearGradientStartPoint",["x","y"]),s.F.addGetterSetter(b,"fillLinearGradientStartPointX",0),s.F.addGetterSetter(b,"strokeLinearGradientStartPointX",0),s.F.addGetterSetter(b,"fillLinearGradientStartPointY",0),s.F.addGetterSetter(b,"strokeLinearGradientStartPointY",0),s.F.addComponentsGetterSetter(b,"fillLinearGradientEndPoint",["x","y"]),s.F.addComponentsGetterSetter(b,"strokeLinearGradientEndPoint",["x","y"]),s.F.addGetterSetter(b,"fillLinearGradientEndPointX",0),s.F.addGetterSetter(b,"strokeLinearGradientEndPointX",0),s.F.addGetterSetter(b,"fillLinearGradientEndPointY",0),s.F.addGetterSetter(b,"strokeLinearGradientEndPointY",0),s.F.addComponentsGetterSetter(b,"fillRadialGradientStartPoint",["x","y"]),s.F.addGetterSetter(b,"fillRadialGradientStartPointX",0),s.F.addGetterSetter(b,"fillRadialGradientStartPointY",0),s.F.addComponentsGetterSetter(b,"fillRadialGradientEndPoint",["x","y"]),s.F.addGetterSetter(b,"fillRadialGradientEndPointX",0),s.F.addGetterSetter(b,"fillRadialGradientEndPointY",0),s.F.addGetterSetter(b,"fillPatternRotation",0),s.F.addGetterSetter(b,"fillRule",void 0,(0,l.sY)()),s.F.backCompat(b,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})}
1,4391:function(t,e,i){i.d(e,{Z:function(){return p},w:function(){return s}});var r=i(36382);let n=`Konva.js unsupported environment. 2 3Looks like you are trying to use Konva.js in Node.js environment. because "document" object is undefined. 4 5To use Konva.js in Node.js environment, you need to use the "canvas-backend" or "skia-backend" module. 6 7bash: npm install canvas 8js: import "konva/canvas-backend"; 9 10or 11 12bash: npm install skia-canvas 13js: import "konva/skia-backend"; 14`,a=()=>{if("undefined"==typeof document)throw Error(n)};class s{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 s(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){let 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){let e=Math.cos(t),i=Math.sin(t),r=this.m[0]*e+this.m[2]*i,n=this.m[1]*e+this.m[3]*i,a=-(this.m[0]*i)+this.m[2]*e,s=-(this.m[1]*i)+this.m[3]*e;return this.m[0]=r,this.m[1]=n,this.m[2]=a,this.m[3]=s,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,e){let i=this.m[0]+this.m[2]*e,r=this.m[1]+this.m[3]*e,n=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=i,this.m[1]=r,this.m[2]=n,this.m[3]=a,this}multiply(t){let e=this.m[0]*t.m[0]+this.m[2]*t.m[1],i=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],n=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],s=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=i,this.m[2]=r,this.m[3]=n,this.m[4]=a,this.m[5]=s,this}invert(){let t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,i=-this.m[1]*t,r=-this.m[2]*t,n=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),s=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=i,this.m[2]=r,this.m[3]=n,this.m[4]=a,this.m[5]=s,this}getMatrix(){return this.m}decompose(){let t=this.m[0],e=this.m[1],i=this.m[2],r=this.m[3],n=this.m[4],a=this.m[5],s=t*r-e*i,o={x:n,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=e){let n=Math.sqrt(t*t+e*e);o.rotation=e>0?Math.acos(t/n):-Math.acos(t/n),o.scaleX=n,o.scaleY=s/n,o.skewX=(t*i+e*r)/s,o.skewY=0}else if(0!=i||0!=r){let n=Math.sqrt(i*i+r*r);o.rotation=Math.PI/2-(r>0?Math.acos(-i/n):-Math.acos(i/n)),o.scaleX=s/n,o.scaleY=n,o.skewX=0,o.skewY=(t*i+e*r)/s}return o.rotation=p._getRotation(o.rotation),o}}let o=Math.PI/180,l=180/Math.PI,h="Konva error: ",d={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
14ive:[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]},c=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,u=[],g=null,f="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(t){setTimeout(t,60)},p={_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;let e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign:t=>0===t?1:t>0?1:-1,requestAnimFrame(t){u.push(t),1===u.length&&f(function(){let t=u;u=[],t.forEach(function(t){t()})})},createCanvasElement(){a();let t=document.createElement("canvas");try{t.style=t.style||{}}catch(t){}return t},createImageElement:()=>(a(),document.createElement("img")),_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,e){let i=p.createImageElement();i.onload=function(){e(i)},i.src=t},_rgbToHex:(t,e,i)=>(16777216+(t<<16)+(e<<8)+i).toString(16).slice(1),_hexToRgb(t){t=t.replace("#","");let e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor(){let t=(16777215*Math.random()<<0).toString(16);for(;t.length<6;)t="0"+t;return"#"+t},isCanvasFarblingActive(){if(null!==g)return g;if("undefined"==typeof document)return g=!1,!1;let t=this.createCanvasElement();t.width=10,t.height=10;let e=t.getContext("2d",{willReadFrequently:!0});e.clearRect(0,0,10,10),e.fillStyle="#282828",e.fillRect(0,0,10,10);let i=e.getImageData(0,0,10,10).data,r=!1;for(let t=0;t<100;t++)if(40!==i[4*t]||40!==i[4*t+1]||40!==i[4*t+2]||255!==i[4*t+3]){r=!0;break}return g=r,this.releaseCanvas(t),g},getHitColor(){let t=this.getRandomColor();return this.isCanvasFarblingActive()?this.getSnappedHexColor(t):t},getHitColorKey(t,e,i){return this.isCanvasFarblingActive()&&(t=5*Math.round(t/5),e=5*Math.round(e/5),i=5*Math.round(i/5)),"#"+this._rgbToHex(t,e,i)},getSnappedHexColor(t){let e=this._hexToRgb(t);return"#"+this._rgbToHex(5*Math.round(e.r/5),5*Math.round(e.g/5),5*Math.round(e.b/5))},getRGB(t){let e;return t in d?{r:(e=d[t])[0],g:e[1],b:e[2]}:"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?{r:parseInt((e=c.exec(t.replace(/ /g,"")))[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}:{r:0,g:0,b:0}},colorToRGBA:t=>(t=t||"black",p._namedColorToRBA(t)||p._hex3ColorToRGBA(t)||p._hex4ColorToRGBA(t)||p._hex6ColorToRGBA(t)||p._hex8ColorToRGBA(t)||p._rgbColorToRGBA(t)||p._rgbaColorToRGBA(t)||p._hslColorToRGBA(t)),_namedColorToRBA(t){let e=d[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(0===t.indexOf("rgb(")){t=t.match(/rgb\(([^)]+)\)/)[1];let e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(0===t.indexOf("rgba(")){t=t.match(/rgba\(([^)]+)\)/)[1];let e=t.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)){let e,i,r;let[n,...a]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),s=Number(a[0])/360,o=Number(a[1])/100,l=Number(a[2])/100;if(0===o)return{r:Math.round(r=255*l),g:Math.round(r),b:Math.round(r),a:1};e=l<.5?l*(1+o):l+o-l*o;let h=2*l-e,d=[0,0,0];for(let t=0;t<3;t++)(i=s+-(1/3*(t-1)))<0&&i++,i>1&&i--,r=6*i<1?h+(e-h)*6*i:2*i<1?e:3*i<2?h+(e-h)*(2/3-i)*6:h,d[t]=255*r;return{r:Math.round(d[0]),g:Math.round(d[1]),b:Math.round(d[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){let e={};for(let i in t)this._isPlainObject(t[i])?e[i]=this.cloneObject(t[i]):this._isArray(t[i])?e[i]=this.cloneArray(t[i]):e[i]=t[i];return e},cloneArray:t=>t.slice(0),degToRad:t=>t*o,radToDeg:t=>t*l,_degToRad:t=>(p.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),p.degToRad(t)),_radToDeg:t=>(p.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),p.radToDeg(t)),_getRotation:t=>
14r.So.angleDeg?p.radToDeg(t):t,_capitalize:t=>t.charAt(0).toUpperCase()+t.slice(1),throw(t){throw Error(h+t)},error(t){console.error(h+t)},warn(t){r.So.showWarnings&&console.warn("Konva warning: "+t)},each(t,e){for(let i in t)e(i,t[i])},_inRange:(t,e,i)=>e<=t&&t<i,_getProjectionToSegment(t,e,i,r,n,a){let s,o,l;let h=(t-i)*(t-i)+(e-r)*(e-r);if(0==h)s=t,o=e,l=(n-i)*(n-i)+(a-r)*(a-r);else{let d=((n-t)*(i-t)+(a-e)*(r-e))/h;d<0?(s=t,o=e,l=(t-n)*(t-n)+(e-a)*(e-a)):d>1?(s=i,o=r,l=(i-n)*(i-n)+(r-a)*(r-a)):l=((s=t+d*(i-t))-n)*(s-n)+((o=e+d*(r-e))-a)*(o-a)}return[s,o,l]},_getProjectionToLine(t,e,i){let r=p.cloneObject(t),n=Number.MAX_VALUE;return e.forEach(function(a,s){if(!i&&s===e.length-1)return;let o=e[(s+1)%e.length],l=p._getProjectionToSegment(a.x,a.y,o.x,o.y,t.x,t.y),h=l[0],d=l[1],c=l[2];c<n&&(r.x=h,r.y=d,n=c)}),r},_prepareArrayForTween(t,e,i){let r=[],n=[];if(t.length>e.length){let i=e;e=t,t=i}for(let e=0;e<t.length;e+=2)r.push({x:t[e],y:t[e+1]});for(let t=0;t<e.length;t+=2)n.push({x:e[t],y:e[t+1]});let a=[];return n.forEach(function(t){let e=p._getProjectionToLine(t,r,i);a.push(e.x),a.push(e.y)}),a},_prepareToStringify(t){let e;for(let i in t.visitedByCircularReferenceRemoval=!0,t)if(t.hasOwnProperty(i)&&t[i]&&"object"==typeof t[i]){if(e=Object.getOwnPropertyDescriptor(t,i),t[i].visitedByCircularReferenceRemoval||p._isElement(t[i])){if(!e.configurable)return null;delete t[i]}else if(null===p._prepareToStringify(t[i])){if(!e.configurable)return null;delete t[i]}}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(let i in e)t[i]=e[i];return t},_getFirstPointerId:t=>t.touches?t.changedTouches[0].identifier:t.pointerId||999,releaseCanvas(...t){r.So.releaseCanvasOnDestroy&&t.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(t,e,i,r){let n=e<0?e:0,a=i<0?i:0;e=Math.abs(e),i=Math.abs(i);let s=0,o=0,l=0,h=0;"number"==typeof r?s=o=l=h=Math.min(r,e/2,i/2):(s=Math.min(r[0]||0,e/2,i/2),o=Math.min(r[1]||0,e/2,i/2),h=Math.min(r[2]||0,e/2,i/2),l=Math.min(r[3]||0,e/2,i/2)),t.moveTo(n+s,a),t.lineTo(n+e-o,a),t.arc(n+e-o,a+o,o,3*Math.PI/2,0,!1),t.lineTo(n+e,a+i-h),t.arc(n+e-h,a+i-h,h,0,Math.PI/2,!1),t.lineTo(n+l,a+i),t.arc(n+l,a+i-l,l,Math.PI/2,Math.PI,!1),t.lineTo(n,a+s),t.arc(n+s,a+s,s,Math.PI,3*Math.PI/2,!1)},drawRoundedPolygonPath(t,e,i,r,n){r=Math.abs(r);for(let a=0;a<i;a++){let s;let o=e[(a-1+i)%i],l=e[a],h=e[(a+1)%i],d={x:l.x-o.x,y:l.y-o.y},c={x:h.x-l.x,y:h.y-l.y},u=Math.hypot(d.x,d.y),g=Math.hypot(c.x,c.y);s="number"==typeof n?n:a<n.length?n[a]:0;let f=r*Math.cos(Math.PI/i);s=f*Math.min(1,s/r*2);let p={x:d.x/u,y:d.y/u},m={x:c.x/g,y:c.y/g},b={x:l.x-p.x*s,y:l.y-p.y*s},y={x:l.x+m.x*s,y:l.y+m.y*s};0===a?t.moveTo(b.x,b.y):t.lineTo(b.x,b.y),t.arcTo(l.x,l.y,y.x,y.y,s)}}}},42513:function(t,e,i){i.d(e,{I0:function(){return g},Jj:function(){return l},Kg:function(){return o},hi:function(){return h},if:function(){return c},q8:function(){return u},sY:function(){return d},uZ:function(){return f},xj:function(){return s}});var r=i(36382),n=i(4391);function a(t){return n.Z._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)||n.Z._isBoolean(t)?t:Object.prototype.toString.call(t)}function s(t){return t>255?255:t<0?0:Math.round(t)}function o(){if(r.So.isUnminified)return function(t,e){return n.Z._isNumber(t)||n.Z.warn(a(t)+' is a not val
14id value for "'+e+'" attribute. The value should be a number.'),t}}function l(t){if(r.So.isUnminified)return function(e,i){let r=n.Z._isNumber(e),s=n.Z._isArray(e)&&e.length==t;return r||s||n.Z.warn(a(e)+' is a not valid value for "'+i+'" attribute. The value should be a number or Array<number>('+t+")"),e}}function h(){if(r.So.isUnminified)return function(t,e){let i=n.Z._isNumber(t),r="auto"===t;return i||r||n.Z.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function d(){if(r.So.isUnminified)return function(t,e){return n.Z._isString(t)||n.Z.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function c(){if(r.So.isUnminified)return function(t,e){let i=n.Z._isString(t),r="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;return i||r||n.Z.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function u(){if(r.So.isUnminified)return function(t,e){let i=Int8Array?Object.getPrototypeOf(Int8Array):null;return i&&t instanceof i||(n.Z._isArray(t)?t.forEach(function(t){n.Z._isNumber(t)||n.Z.warn('"'+e+'" attribute has non numeric element '+t+". Make sure that all elements are numbers.")}
14):n.Z.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function g(){if(r.So.isUnminified)return function(t,e){let i=!0===t||!1===t;return i||n.Z.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function f(t){if(r.So.isUnminified)return function(e,i){return null==e||n.Z.isObject(e)||n.Z.warn(a(e)+' is a not valid value for "'+i+'" attribute. The value should be an object with properties '+t),e}}},17991:function(t,e,i){i.d(e,{S:function(){return $}});var r=i(36382),n=i(4391),Node=i(17874),a=i(50671),s=i(72772),o=i(57044),l=i(44117),h=i(86287);let d="mouseleave",c="mouseover",u="mouseenter",g="mousemove",f="mousedown",p="mouseup",m="pointermove",b="pointerdown",y="pointerup",v="pointercancel",x="pointerout",_="pointerleave",w="pointerover",S="pointerenter",C="contextmenu",k="touchstart",P="touchend",A="touchmove",T="touchcancel",F="wheel",M=[[u,"_pointerenter"],[f,"_pointerdown"],[g,"_pointermove"],[p,"_pointerup"],[d,"_pointerleave"],[k,"_pointerdown"],[A,"_pointermove"],[P,"_pointerup"],[T,"_pointercancel"],[c,"_pointerover"],[F,"_wheel"],[C,"_contextmenu"],[b,"_pointerdown"],[m,"_pointermove"],[y,"_pointerup"],[v,"_pointercancel"],[_,"_pointerleave"],["lostpointercapture","_lostpointercapture"]],E={mouse:{[x]:"mouseout",[_]:d,[w]:c,[S]:u,[m]:g,[b]:f,[y]:p,[v]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[x]:"touchout",[_]:"touchleave",[w]:"touchover",[S]:"touchenter",[m]:A,[b]:k,[y]:P,[v]:T,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[x]:x,[_]:_,[w]:w,[S]:S,[m]:m,[b]:b,[y]:y,[v]:v,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},R=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",D=t=>{let e=R(t);return"pointer"===e?r.So.pointerEventsEnabled&&E.pointer:"touch"===e?E.touch:"mouse"===e?E.mouse:void 0};function G(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&n.Z.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}let L=[];class I extends a.W{constructor(t){super(G(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),L.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{G(this.attrs)}),this._checkVisibility()}_validateAdd(t){let e="Layer"===t.getType(),i="FastLayer"===t.getType();e||i||n.Z.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;let t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if("string"==typeof t){let e;if("."===t.charAt(0)){let e=t.slice(1);t=document.getElementsByClassName(e)[0]}else e="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(e);if(!t)throw"Can not find container in document with id "+e}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){let t=this.children,e=t.length;for(let i=0;i<e;i++)t[i].clear();return this}clone(t){return t||(t={}),t.container="undefined"!=typeof document&&document.createElement("div"),a.W.prototype.clone.call(this,t)}destroy(){super.destroy();let t=this.content;t&&n.Z._isInDocument(t)&&this.container().removeChild(t);let e=L.indexOf(this);return e>-1&&L.splice(e,1),n.Z.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){let t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(n.Z.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();let e=new o.RF({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),i=e.getContext()._context,r=this.children;return(t.x||t.y)&&i.translate(-1*t.x,-1*t.y),r.forEach(function(e){if(!e.isVisible())return;let r=e._toKonvaCanvas(t);i.drawImage(r._canvas,t.x,t.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}),e}getIntersection(t){if(!t)return null;let e=this.children,i=e.length,r=i-1;for(let i=r;i>=0;i--){let r=e[i].getIntersection(t);
14if(r)return r}return null}_resizeDOM(){let 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(i=>{i.setSize({width:t,height:e}),i.draw()})}add(t,...e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}super.add(t);let i=this.children.length;return i>5&&n.Z.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(),r.So.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return h.q0(t,this)}setPointerCapture(t){h.I5(t,this)}releaseCapture(t){h.Xg(t,this)}getLayers(){return this.children}_bindContentEvents(){r.So.isBrowser&&M.forEach(([t,e])=>{this.content.addEventListener(t,t=>{this[e](t)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);let e=D(t.type);e&&this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);let 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){let e=D(t.type),i=R(t.type);if(!e)return;this.setPointersPositions(t);let n=this._getTargetShape(i),a=!(r.So.isDragging()||r.So.isTransforming())||r.So.hitOnDragEnabled;n&&a?(n._fireAndBubble(e.pointerout,{evt:t}),n._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[i+"targetShape"]=null):a&&(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){let e=D(t.type),i=R(t.type);if(!e)return;this.setPointersPositions(t);let n=!1;this._changedPointerPositions.forEach(a=>{let s=this.getIntersection(a);if(l.DD.justDragged=!1,r.So["_"+i+"ListenClick"]=!0,!s||!s.isListening()){this[i+"ClickStartShape"]=void 0;return}r.So.capturePointerEventsEnabled&&s.setPointerCapture(a.id),this[i+"ClickStartShape"]=s,s._fireAndBubble(e.pointerdown,{evt:t,pointerId:a.id}),n=!0;let o=t.type.indexOf("touch")>=0;s.preventDefault()&&t.cancelable&&o&&t.preventDefault()}),n||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){let e=D(t.type),i=R(t.type);if(!e)return;let n=t.type.indexOf("touch")>=0||"touch"===t.pointerType;r.So.isDragging()&&l.DD.node.preventDefault()&&t.cancelable&&n&&t.preventDefault(),this.setPointersPositions(t);let a=!(r.So.isDragging()||r.So.isTransforming())||r.So.hitOnDragEnabled;if(!a)return;let s={},o=!1,d=this._getTargetShape(i);this._changedPointerPositions.forEach(r=>{let n=h.rl(r.id)||this.getIntersection(r),a=r.id,l={evt:t,pointerId:a},c=d!==n;if(c&&d&&(d._fireAndBubble(e.pointerout,{...l},n),d._fireAndBubble(e.pointerleave,{...l},n)),n){if(s[n._id])return;s[n._id]=!0}n&&n.isListening()?(o=!0,c&&(n._fireAndBubble(e.pointerover,{...l},d),n._fireAndBubble(e.pointerenter,{...l},d),this[i+"targetShape"]=n),n._fireAndBubble(e.pointermove,{...l})):d&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:a}),this[i+"targetShape"]=null)}),o||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){let e=D(t.type),i=R(t.type);if(!e)return;this.setPointersPositions(t);let n=this[i+"ClickStartShape"],a=this[i+"ClickEndShape"],s={},o=!1;this._changedPointerPositions.forEach(d=>{let c=h.rl(d.id)||this.getIntersection(d);if(c){if(c.releaseCapture(d.id),s[c._id])return;s[c._id]=!0}let u=d.id,g={evt:t,pointerId:u},f=!1;r.So["_"+i+"InDblClickWindow"]?(f=!0,clearTimeout(this[i+"DblTimeout"])):l.DD.justDragged||(r.So["_"+i+"InDblClickWindow"]=!0,clearTimeout(this[i+"DblTimeout"])),this[i+"DblTimeout"]=setTimeout(function(){r.So["_"+i+"InDblClickWindow"]=!1}
14,r.So.dblClickWindow),c&&c.isListening()?(o=!0,this[i+"ClickEndShape"]=c,c._fireAndBubble(e.pointerup,{...g}),r.So["_"+i+"ListenClick"]&&n&&n===c&&(c._fireAndBubble(e.pointerclick,{...g}),f&&a&&a===c&&c._fireAndBubble(e.pointerdblclick,{...g}))):(this[i+"ClickEndShape"]=null,o||(this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o=!0),r.So["_"+i+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:u}),f&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:u}))}),o||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),r.So["_"+i+"ListenClick"]=!1,t.cancelable&&"touch"!==i&&"pointer"!==i&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);let e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(C,{evt:t}):this._fire(C,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);let e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(F,{evt:t}):this._fire(F,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);let e=h.rl(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(y,h.yM(t)),h.Xg(t.pointerId)}_lostpointercapture(t){h.Xg(t.pointerId)}setPointersPositions(t){let e=this._getContentPosition(),i=null,r=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})})):(i=(t.clientX-e.left)/e.scaleX,r=(t.clientY-e.top)/e.scaleY,this.pointerPos={x:i,y:r},this._pointerPositions=[{x:i,y:r,id:n.Z._getFirstPointerId(t)}],this._changedPointerPositions=[{x:i,y:r,id:n.Z._getFirstPointerId(t)}])}_setPointerPosition(t){n.Z.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};let t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new o.RF({width:this.width(),height:this.height()}),this.bufferHitCanvas=new o.hh({pixelRatio:1,width:this.width(),height:this.height()}),!r.So.isBrowser)return;let 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 n.Z.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}
14batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}I.prototype.nodeType="Stage",(0,r.DA)(I),s.F.addGetterSetter(I,"container"),r.So.isBrowser&&document.addEventListener("visibilitychange",()=>{L.forEach(t=>{t.batchDraw()})});var O=i(42513),N=i(74786);let B=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],z=B.length;class Z extends a.W{constructor(t){super(t),this.canvas=new o.RF,this.hitCanvas=new o.hh({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){let t=this.canvas._canvas;return t.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);let 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(){Node.N.prototype.moveToTop.call(this);let t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){let t=Node.N.prototype.moveUp.call(this);if(!t)return!1;let e=this.getStage();return!!e&&!!e.content&&(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Node.N.prototype.moveDown.call(this)){let t=this.getStage();if(t){let 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(Node.N.prototype.moveToBottom.call(this)){let t=this.getStage();if(t){let 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(){let t=this.getNativeCanvasElement();return Node.N.prototype.remove.call(this),t&&t.parentNode&&n.Z._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){let e=t.getType();"Group"!==e&&"Shape"!==e&&n.Z.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(),Node.N.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){let t=this.visible();t?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){n.Z.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){n.Z.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,n.Z.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let e=1,i=!1;for(;;){for(let r=0;r<z;r++){let n=B[r],a=this._getIntersection({x:t.x+n.x*e,y:t.y+n.y*e}),s=a.shape;if(s)return s;if(i=!!a.antialiased,!a.antialiased)break}if(!i)return null;e+=1}}_getIntersection(t){let e=this.hitCanvas.pixelRatio,i=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,r=i[3];if(255===r){let t=n.Z.getHitColorKey(i[0],i[1],i[2]),e=N.J[t];return e?{shape:e}:{antialiased:!0}}return r>0?{antialiased:!0}:{}}drawScene(t,e,i){let r=this.getLayer(),n=t||r&&r.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&n.getContext().clear(),a.W.prototype.drawScene.call(this,n,e,i),this._fire("draw",{node:this}),this}drawHit(t,e){let i=this.getLayer(),r=t||i&&i.hitCanvas;return i&&i.clearBeforeDraw()&&i.getHitCanvas().getContext().clear(),a.W.prototype.drawHit.call(this,r,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){n.Z.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return n.Z.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;let t=this.parent,e=!!this.hitCanvas._canvas.parentNode;e?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return n.Z.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}Z.prototype.nodeType="Layer",(0,r.DA)(Z),s.F.addGetterSetter(Z,"imageSmoothingEnabled",!0),s.F.addGetterSetter(Z,"clearBeforeDraw",!0),s.F.addGetterSetter(Z,"hitGraphEnabled",!0,(0,O.I0)());
14class j extends Z{constructor(t){super(t),this.listening(!1),n.Z.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}j.prototype.nodeType="FastLayer",(0,r.DA)(j);var H=i(89908),Animation=i(45080);let W={node:1,duration:1,easing:1,onFinish:1,yoyo:1},K=["fill","stroke","shadowColor"],Y=0;class X{constructor(t,e,i,r,n,a,s){this.prop=t,this.propFunc=e,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=i,this._change=n-this.begin,this.pause()}fire(t){let 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(){let 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 q{constructor(t){let e,i;let a=this,s=t.node,o=s._id,l=t.easing||U.Linear,h=!!t.yoyo;e=void 0===t.duration?.3:0===t.duration?.001:t.duration,this.node=s,this._id=Y++;let d=s.getLayer()||(s instanceof r.So.Stage?s.getLayers():null);for(i in d||n.Z.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Animation.f(function(){a.tween.onEnterFrame()},d),this.tween=new X(i,function(t){a._tweenFunc(t)},l,0,1,1e3*e,h),this._addListeners(),q.attrs[o]||(q.attrs[o]={}),q.attrs[o][this._id]||(q.attrs[o][this._id]={}),q.tweens[o]||(q.tweens[o]={}),t)void 0===W[i]&&this._addAttr(i,t[i]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,e){let i,r,a,s,o;let l=this.node,h=l._id,d=q.tweens[h][t];d&&delete q.attrs[h][d][t];let c=l.getAttr(t);if(n.Z._isArray(e)){if(i=[],r=Math.max(e.length,c.length),"points"===t&&e.length!==c.length&&(e.length>c.length?(s=c,c=n.Z._prepareArrayForTween(c,e,l.closed())):(a=e,e=n.Z._prepareArrayForTween(e,c,l.closed()))),0===t.indexOf("fill"))for(let t=0;t<r;t++)if(t%2==0)i.push(e[t]-c[t]);else{let r=n.Z.colorToRGBA(c[t]);o=n.Z.colorToRGBA(e[t]),c[t]=r,i.push({r:o.r-r.r,g:o.g-r.g,b:o.b-r.b,a:o.a-r.a})}else for(let t=0;t<r;t++)i.push(e[t]-c[t])}else -1!==K.indexOf(t)?(c=n.Z.colorToRGBA(c),i={r:(o=n.Z.colorToRGBA(e)).r-c.r,g:o.g-c.g,b:o.b-c.b,a:o.a-c.a}):i=e-c;q.attrs[h][this._id][t]={start:c,diff:i,end:e,trueEnd:a,trueStart:s},q.tweens[h][t]=this._id}_tweenFunc(t){let e,i,r,a,s,o,l,h;let d=this.node,c=q.attrs[d._id][this._id];for(e in c){if(r=(i=c[e]).start,a=i.diff,h=i.end,n.Z._isArray(r)){if(s=[],l=Math.max(r.length,h.length),0===e.indexOf("fill"))for(o=0;o<l;o++)o%2==0?s.push((r[o]||0)+a[o]*t):s.push("rgba("+Math.round(r[o].r+a[o].r*t)+","+Math.round(r[o].g+a[o].g*t)+","+Math.round(r[o].b+a[o].b*t)+","+(r[o].a+a[o].a*t)+")");else for(o=0;o<l;o++)s.push((r[o]||0)+a[o]*t)}else s=-1!==K.indexOf(e)?"rgba("+Math.round(r.r+a.r*t)+","+Math.round(r.g+a.g*t)+","+Math.round(r.b+a.b*t)+","+(r.a+a.a*t)+")":r+a*t;d.setAttr(e,s)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{let t=this.node,e=q.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=()=>{let t=this.node,e=q.attrs[t._id][this._id];e.points&&e.points.trueStart&&t.points(e.points.trueStart),this.onReset&&this.onReset()}
14,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(){let t=this.node._id,e=this._id,i=q.tweens[t];for(let e in this.pause(),this.anim&&this.anim.stop(),i)delete q.tweens[t][e];delete q.attrs[t][e],q.tweens[t]&&(0===Object.keys(q.tweens[t]).length&&delete q.tweens[t],0===Object.keys(q.attrs[t]).length&&delete q.attrs[t])}}q.attrs={},q.tweens={},Node.N.prototype.to=function(t){let e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()};let i=new q(t);i.play()};let U={BackEaseIn:(t,e,i,r)=>i*(t/=r)*t*(2.70158*t-1.70158)+e,BackEaseOut:(t,e,i,r)=>i*((t=t/r-1)*t*(2.70158*t+1.70158)+1)+e,BackEaseInOut(t,e,i,r){let n=1.70158;return(t/=r/2)<1?i/2*(t*t*(((n*=1.525)+1)*t-n))+e:i/2*((t-=2)*t*(((n*=1.525)+1)*t+n)+2)+e},ElasticEaseIn(t,e,i,r,n,a){let s=0;return 0===t?e:1==(t/=r)?e+i:(a||(a=.3*r),!n||n<Math.abs(i)?(n=i,s=a/4):s=a/(2*Math.PI)*Math.asin(i/n),-(n*Math.pow(2,10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/a))+e)},ElasticEaseOut(t,e,i,r,n,a){let s=0;return 0===t?e:1==(t/=r)?e+i:(a||(a=.3*r),!n||n<Math.abs(i)?(n=i,s=a/4):s=a/(2*Math.PI)*Math.asin(i/n),n*Math.pow(2,-10*t)*Math.sin((t*r-s)*(2*Math.PI)/a)+i+e)},ElasticEaseInOut(t,e,i,r,n,a){let s=0;return 0===t?e:2==(t/=r/2)?e+i:(a||(a=r*(.3*1.5)),!n||n<Math.abs(i)?(n=i,s=a/4):s=a/(2*Math.PI)*Math.asin(i/n),t<1)?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/a))+e:n*Math.pow(2,-10*(t-=1))*Math.sin((t*r-s)*(2*Math.PI)/a)*.5+i+e},BounceEaseOut:(t,e,i,r)=>(t/=r)<1/2.75?i*(7.5625*t*t)+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e,BounceEaseIn:(t,e,i,r)=>i-U.BounceEaseOut(r-t,0,i,r)+e,BounceEaseInOut:(t,e,i,r)=>t<r/2?.5*U.BounceEaseIn(2*t,0,i,r)+e:.5*U.BounceEaseOut(2*t-r,0,i,r)+.5*i+e,EaseIn:(t,e,i,r)=>i*(t/=r)*t+e,EaseOut:(t,e,i,r)=>-i*(t/=r)*(t-2)+e,EaseInOut:(t,e,i,r)=>(t/=r/2)<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e,StrongEaseIn:(t,e,i,r)=>i*(t/=r)*t*t*t*t+e,StrongEaseOut:(t,e,i,r)=>i*((t=t/r-1)*t*t*t*t+1)+e,StrongEaseInOut:(t,e,i,r)=>(t/=r/2)<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e,Linear:(t,e,i,r)=>i*t/r+e};var V=i(64333);let $=n.Z._assign(r.So,{Util:n.Z,Transform:n.w,Node:Node.N,Container:a.W,Stage:I,stages:L,Layer:Z,FastLayer:j,Group:H.Z,DD:l.DD,Shape:N.b,shapes:N.J,Animation:Animation.f,Tween:q,Easings:U,Context:V._y,Canvas:o.Xz})},97224:function(t,e,i){let r;i.d(e,{Z:function(){return tx}});var n=i(17991),a=i(72772),s=i(74786),o=i(36382),l=i(42513);class h extends s.b{_sceneFunc(t){let e=o.So.getAngle(this.angle()),i=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,i),t.arc(0,0,this.innerRadius(),e,0,!i),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(){let t=this.innerRadius(),e=this.outerRadius(),i=this.clockwise(),r=o.So.getAngle(i?360-this.angle():this.angle()),n=Math.cos(Math.min(r,Math.PI)),a=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),s=Math.sin(Math.min(r,Math.PI/2)),l=n*(n>0?t:e),h=a*(a>0?t:e),d=s*(s>0?e:t);return{x:l,y:i?-1*d:h,width:1*e-l,height:d-h}}}function d(t,e,i,r,n,a,s){let o=Math.sqrt(Math.pow(i-t,2)+Math.pow(r-e,2)),l=Math.sqrt(Math.pow(n-i,2)+Math.pow(a-r,2)),h=s*o/(o+l),d=s*l/(o+l);return[i-h*(n-t),r-h*(a-e),i+d*(n-t),r+d*(a-e)]}function c(t,e){let i=t.length,r=[];for(let n=2;n<i-2;n+=2){let i=d(t[n-2],t[n-1],t[n],t[n+1],t[n+2],t[n+3],e);isNaN(i[0])||(r.push(i[0]),r.push(i[1]),r.push(t[n]),r.push(t[n+1]),r.push(i[2]),r.push(i[3]))}return r}h.prototype._centroid=!0,h.prototype.className="Arc",h.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],(0,o.DA)(h),a.F.addGetterSetter(h,"innerRadius",0,(0,l.Kg)()),a.F.addGetterSetter(h,"outerRadius",0,(0,l.Kg)()),a.F.addGetterSetter(h,"angle",0,(0,l.Kg)()),a.F.addGetterSetter(h,"clockwise",!1,(0,l.I0)());class u extends s.b{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){let e=this.points(),i=e.length,r=this.tension(),n=this.closed(),a=this.bezier();if(!i)return;let s=0;if(t.beginPath(),t.moveTo(e[0],e[1]),0!==r&&i>4){let r=this.getTensionPoints(),a=r.length;for(s=n?0:4,n||t.quadraticCurveTo(r[0],r[1],r[2],r[3]);s<a-2;)t.bezierCurveTo(r[s++],r[s++],r[s++],r[s++],r[s++],r[s++]);n||t.quadraticCurveTo(r[a-2],r[a-1],e[i-2],e[i-1])}else if(a)for(s=2;s<i;)t.bezierCurveTo(e[s++],e[s++],e[s++],e[s++],e[s++],e[s++]);else for(s=2;s<i;s+=2)t.lineTo(e[s],e[s+1]);n?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():c(this.points(),this.tension())}_getTensionPointsClosed(){let t=this.points(),e=t.length,i=this.tension(),r=d(t[e-2],t[e-1],t[0],t[1],t[2],t[3],i),n=d(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],i),a=c(t,i),s=[r[2],r[3]
14].concat(a).concat([n[0],n[1],t[e-2],t[e-1],n[2],n[3],r[0],r[1],t[0],t[1]]);return s}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t,e,i=this.points();if(i.length<4)return{x:i[0]||0,y:i[1]||0,width:0,height:0};let r=(i=0!==this.tension()?[i[0],i[1],...this._getTensionPoints(),i[i.length-2],i[i.length-1]]:this.points())[0],n=i[0],a=i[1],s=i[1];for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],r=Math.min(r,t),n=Math.max(n,t),a=Math.min(a,e),s=Math.max(s,e);return{x:r,y:a,width:n-r,height:s-a}}}u.prototype.className="Line",u.prototype._attrsAffectingSize=["points","bezier","tension"],(0,o.DA)(u),a.F.addGetterSetter(u,"closed",!1),a.F.addGetterSetter(u,"bezier",!1),a.F.addGetterSetter(u,"tension",0,(0,l.Kg)()),a.F.addGetterSetter(u,"points",[],(0,l.q8)());let g=[[],[],[-.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,
14-.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]],f=[[],[],[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
1471147846,.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]],p=[[1],[1,1],[1,2,1],[1,3,3,1]],m=(t,e,i)=>{let r,n;let a=i/2;r=0;for(let i=0;i<20;i++)n=a*g[20][i]+a,r+=f[20][i]*function(t,e,i){let r=y(1,i,t),n=y(1,i,e);return Math.sqrt(r*r+n*n)}(t,e,n);return a*r},b=(t,e,i)=>{void 0===i&&(i=1);let r=t[0]-2*t[1]+t[2],n=e[0]-2*e[1]+e[2],a=2*t[1]-2*t[0],s=2*e[1]-2*e[0],o=4*(r*r+n*n);if(0===o)return i*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));let l=4*(r*a+n*s)/(2*o),h=i+l,d=(a*a+s*s)/o-l*l,c=h*h+d>0?Math.sqrt(h*h+d):0,u=l*l+d>0?Math.sqrt(l*l+d):0;return Math.sqrt(o)/2*(h*c-l*u+(l+Math.sqrt(l*l+d)!==0?d*Math.log(Math.abs((h+c)/(l+u))):0))},y=(t,e,i)=>{let r,n;let a=i.length-1;if(0===a)return 0;if(0===t){n=0;for(let t=0;t<=a;t++)n+=p[a][t]*Math.pow(1-e,a-t)*Math.pow(e,t)*i[t];return n}r=Array(a);for(let t=0;t<a;t++)r[t]=a*(i[t+1]-i[t]);return y(t-1,e,r)},v=(t,e,i)=>{let r=1,n=t/e,a=(t-i(n))/e,s=0;for(;r>.001;){let o=i(n+a),l=Math.abs(t-o)/e;if(l<r)r=l,n+=a;else{let s=i(n-a),o=Math.abs(t-s)/e;o<r?(r=o,n-=a):a/=2}if(++s>500)break}return n};class x extends s.b{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=x.parsePathData(this.data()),this.pathLength=x.getPathLength(this.dataArray)}_sceneFunc(t){let e=this.dataArray;t.beginPath();let i=!1;for(let r=0;r<e.length;r++){let n=e[r].command,a=e[r].points;switch(n){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":let s=a[0],o=a[1],l=a[2],h=a[3],d=a[4],c=a[5],u=a[6],g=a[7],f=l>h?l:h,p=l>h?1:l/h,m=l>h?h/l:1;t.translate(s,o),t.rotate(u),t.scale(p,m),t.arc(0,0,f,d,d+c,1-g),t.scale(1/p,1/m),t.rotate(-u),t.translate(-s,-o);break;case"z":i=!0,t.closePath()}}i||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){let t,e,i=[];this.dataArray.forEach(function(t){if("A"===t.command){let e=t.points[4],r=t.points[5],n=t.points[4]+r,a=Math.PI/180;
14if(Math.abs(e-n)<a&&(a=Math.abs(e-n)),r<0)for(let r=e-a;r>n;r-=a){let e=x.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);i.push(e.x,e.y)}else for(let r=e+a;r<n;r+=a){let e=x.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);i.push(e.x,e.y)}}else if("C"===t.command)for(let e=0;e<=1;e+=.01){let r=x.getPointOnCubicBezier(e,t.start.x,t.start.y,t.points[0],t.points[1],t.points[2],t.points[3],t.points[4],t.points[5]);i.push(r.x,r.y)}else i=i.concat(t.points)});let r=i[0],n=i[0],a=i[1],s=i[1];for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],isNaN(t)||(r=Math.min(r,t),n=Math.max(n,t)),isNaN(e)||(a=Math.min(a,e),s=Math.max(s,e));return{x:r,y:a,width:n-r,height:s-a}}getLength(){return this.pathLength}getPointAtLength(t){return x.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,e,i,r){return Math.sqrt((i-t)*(i-t)+(r-e)*(r-e))}static getPathLength(t){let e=0;for(let i=0;i<t.length;++i)e+=t[i].pathLength;return e}static getPointAtLengthOfDataArray(t,e){let i,r=0,n=e.length;if(!n)return null;for(;r<n&&t>e[r].pathLength;)t-=e[r].pathLength,++r;if(r===n)return{x:(i=e[r-1].points.slice(-2))[0],y:i[1]};if(t<.01){let t=e[r].command;return"M"===t?{x:(i=e[r].points.slice(0,2))[0],y:i[1]}:{x:e[r].start.x,y:e[r].start.y}}let a=e[r],s=a.points;switch(a.command){case"L":return x.getPointOnLine(t,a.start.x,a.start.y,s[0],s[1]);case"C":return x.getPointOnCubicBezier(v(t,x.getPathLength(e),t=>m([a.start.x,s[0],s[2],s[4]],[a.start.y,s[1],s[3],s[5]],t)),a.start.x,a.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return x.getPointOnQuadraticBezier(v(t,x.getPathLength(e),t=>b([a.start.x,s[0],s[2]],[a.start.y,s[1],s[3]],t)),a.start.x,a.start.y,s[0],s[1],s[2],s[3]);case"A":let o=s[0],l=s[1],h=s[2],d=s[3],c=s[5],u=s[6],g=s[4];return g+=c*t/a.pathLength,x.getPointOnEllipticalArc(o,l,h,d,g,u)}return null}static getPointOnLine(t,e,i,r,n,a,s){a=null!=a?a:e,s=null!=s?s:i;let o=this.getLineLength(e,i,r,n);if(o<1e-10)return{x:e,y:i};if(r===e)return{x:a,y:s+(n>i?t:-t)};let l=(n-i)/(r-e),h=Math.sqrt(t*t/(1+l*l))*(r<e?-1:1);if(1e-10>Math.abs(s-i-l*(a-e)))return{x:a+h,y:s+l*h};let d=((a-e)*(r-e)+(s-i)*(n-i))/(o*o),c=e+d*(r-e),u=i+d*(n-i),g=this.getLineLength(a,s,c,u),f=Math.sqrt(t*t-g*g),p=Math.sqrt(f*f/(1+l*l))*(r<e?-1:1);return{x:c+p,y:u+l*p}}static getPointOnCubicBezier(t,e,i,r,n,a,s,o,l){function h(t){return 3*t*(1-t)*(1-t)}let d=o*(t*t*t)+a*(3*t*t*(1-t))+r*h(t)+e*((1-t)*(1-t)*(1-t)),c=l*(t*t*t)+s*(3*t*t*(1-t))+n*h(t)+i*((1-t)*(1-t)*(1-t));return{x:d,y:c}}static getPointOnQuadraticBezier(t,e,i,r,n,a,s){return{x:a*(t*t)+r*(2*t*(1-t))+e*((1-t)*(1-t)),y:s*(t*t)+n*(2*t*(1-t))+i*((1-t)*(1-t))}}static getPointOnEllipticalArc(t,e,i,r,n,a){let s=Math.cos(a),o=Math.sin(a),l={x:i*Math.cos(n),y:r*Math.sin(n)};return{x:t+(l.x*s-l.y*o),y:e+(l.x*o+l.y*s)}}static parsePathData(t){let e;if(!t)return[];let i=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];i=i.replace(RegExp(" ","g"),",");for(let t=0;t<r.length;t++)i=i.replace(RegExp(r[t],"g"),"|"+r[t]);let n=i.split("|"),a=[],s=[],o=0,l=0,h=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(let t=1;t<n.length;t++){let i=n[t],r=i.charAt(0);for(i=i.slice(1),s.length=0;e=h.exec(i);)s.push(e[0]);let d=[],c="A"===r||"a"===r?0:-1;for(let t=0,e=s.length;t<e;t++){let e=s[t];if("00"===e){d.push(0,0),c>=0&&(c+=2)>=7&&(c-=7);continue}if(c>=0){if(3===c){if(/^[01]{2}\d+(?:\.\d+)?$/.test(e)){d.push(parseInt(e[0],10)),d.push(parseInt(e[1],10)),d.push(parseFloat(e.slice(2))),(c+=3)>=7&&(c-=7);continue}if("11"===e||"10"===e||"01"===e){d.push(parseInt(e[0],10)),d.push(parseInt(e[1],10)),(c+=2)>=7&&(c-=7);continue}if("0"===e||"1"===e){d.push(parseInt(e,10)),(c+=1)>=7&&(c-=7);continue}}else if(4===c){if(/^[01]\d+(?:\.\d+)?$/.test(e)){d.push(parseInt(e[0],10)),d.push(parseFloat(e.slice(1))),(c+=2)>=7&&(c-=7);continue}if("0"===e||"1"===e){d.push(parseInt(e,10)),(c+=1)>=7&&(c-=7);continue}}let t=parseFloat(e);isNaN(t)?d.push(0):d.push(t),(c+=1)>=7&&(c-=7)}else{let t=parseFloat(e);isNaN(t)?d.push(0):d.push(t)}}for(;d.length>0;){let t,e,i,n,s,h,c,u,g,f;if(isNaN(d[0]))break;let p="",m=[],b=o,y=l;switch(r){case"l":o+=d.shift(),l+=d.shift(),p="L",m.push(o,l);break;case"L":o=d.shift(),l=d.shift(),m.push(o,l);break;case"m":let v=d.shift(),x=d.shift();if(o+=v,l+=x,p="M",a.length>2&&"z"===a[a.length-1].command){for(let t=a.length-2;t>=0;t--)if("M"===a[t].command){o=a[t].points[0]+v,l=a[t].points[1]+x;break}}m.push(o,l),r="l";break;case"M":o=d.shift(),l=d.shift(),p="M",m.push(o,l),r="L";break;case"h":o+=d.shift(),p="L",m.push(o,l);break;case"H":o=d.shift(),p="L",m.push(o,l);break;case"v":l+=d.shift(),p="L",m.push(o,l);break;case"V":l=d.shift(),p="L",m.push(o,l);break;case"C":m.push(d.shift(),d.shift(),d.shift(),d.shift()),o=d.shift(),l=d.shift(),m.push(o,l);break;case"c":m.push(o+d.shift(),l+d.shift(),o+d.shift(),l+d.shift()),o+=d.shift(),l+=d.shift(),p="C",m.push(o,l);break;case"S":e=o,i=l,"C"===(t=a[a.length-1]).command&&(e=o+(o-t.points[2]),i=l+(l-t.points[3])),m.push(e,i,d.shift(),d.shift()),o=d.shift(),l=d.shift(),p="C",m.push(o,l);break;case"s":e=o,i=l,"C"===(t=a[a.length-1]).command&&(e=o+(o-t.points[2]),i=l+(l-t.points[3])),m.push(e,i,o+d.shift(),l+d.shift()),o+=d.shift(),l+=d.shift(),p="C",m.push(o,l);break;case"Q":m.push(d.shift(),d.shift()),o=d.shift(),l=d.shift(),m.push(o,l);break;
14case"q":m.push(o+d.shift(),l+d.shift()),o+=d.shift(),l+=d.shift(),p="Q",m.push(o,l);break;case"T":e=o,i=l,"Q"===(t=a[a.length-1]).command&&(e=o+(o-t.points[0]),i=l+(l-t.points[1])),o=d.shift(),l=d.shift(),p="Q",m.push(e,i,o,l);break;case"t":e=o,i=l,"Q"===(t=a[a.length-1]).command&&(e=o+(o-t.points[0]),i=l+(l-t.points[1])),o+=d.shift(),l+=d.shift(),p="Q",m.push(e,i,o,l);break;case"A":n=d.shift(),s=d.shift(),h=d.shift(),c=d.shift(),u=d.shift(),g=o,f=l,o=d.shift(),l=d.shift(),p="A",m=this.convertEndpointToCenterParameterization(g,f,o,l,c,u,n,s,h);break;case"a":n=d.shift(),s=d.shift(),h=d.shift(),c=d.shift(),u=d.shift(),g=o,f=l,o+=d.shift(),l+=d.shift(),p="A",m=this.convertEndpointToCenterParameterization(g,f,o,l,c,u,n,s,h)}a.push({command:p||r,points:m,start:{x:b,y:y},pathLength:this.calcLength(b,y,p||r,m)})}("z"===r||"Z"===r)&&a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}static calcLength(t,e,i,r){let n,a,s,o;switch(i){case"L":return x.getLineLength(t,e,r[0],r[1]);case"C":return m([t,r[0],r[2],r[4]],[e,r[1],r[3],r[5]],1);case"Q":return b([t,r[0],r[2]],[e,r[1],r[3]],1);case"A":n=0;let l=r[4],h=r[5],d=r[4]+h,c=Math.PI/180;if(Math.abs(l-d)<c&&(c=Math.abs(l-d)),a=x.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),h<0)for(o=l-c;o>d;o-=c)s=x.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],o,0),n+=x.getLineLength(a.x,a.y,s.x,s.y),a=s;else for(o=l+c;o<d;o+=c)s=x.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],o,0),n+=x.getLineLength(a.x,a.y,s.x,s.y),a=s;return s=x.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],d,0),n+=x.getLineLength(a.x,a.y,s.x,s.y)}return 0}static convertEndpointToCenterParameterization(t,e,i,r,n,a,s,o,l){let h=l*(Math.PI/180),d=Math.cos(h)*(t-i)/2+Math.sin(h)*(e-r)/2,c=-1*Math.sin(h)*(t-i)/2+Math.cos(h)*(e-r)/2,u=d*d/(s*s)+c*c/(o*o);u>1&&(s*=Math.sqrt(u),o*=Math.sqrt(u));let g=Math.sqrt((s*s*(o*o)-s*s*(c*c)-o*o*(d*d))/(s*s*(c*c)+o*o*(d*d)));n===a&&(g*=-1),isNaN(g)&&(g=0);let f=g*s*c/o,p=-(g*o)*d/s,m=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])/(m(t)*m(e))},y=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(b(t,e))},v=y([1,0],[(d-f)/s,(c-p)/o]),x=[(d-f)/s,(c-p)/o],_=[(-1*d-f)/s,(-1*c-p)/o],w=y(x,_);return -1>=b(x,_)&&(w=Math.PI),b(x,_)>=1&&(w=0),0===a&&w>0&&(w-=2*Math.PI),1===a&&w<0&&(w+=2*Math.PI),[(t+i)/2+Math.cos(h)*f-Math.sin(h)*p,(e+r)/2+Math.sin(h)*f+Math.cos(h)*p,s,o,v,w,h,a]}}x.prototype.className="Path",x.prototype._attrsAffectingSize=["data"],(0,o.DA)(x),a.F.addGetterSetter(x,"data");class _ extends u{_sceneFunc(t){let e,i;super._sceneFunc(t);let r=2*Math.PI,n=this.points(),a=n,s=0!==this.tension()&&n.length>4;s&&(a=this.getTensionPoints());let o=this.pointerLength(),l=n.length;if(s){let t=[a[a.length-4],a[a.length-3],a[a.length-2],a[a.length-1],n[l-2],n[l-1]],r=x.calcLength(a[a.length-4],a[a.length-3],"C",t),s=x.getPointOnQuadraticBezier(Math.min(1,1-o/r),t[0],t[1],t[2],t[3],t[4],t[5]);e=n[l-2]-s.x,i=n[l-1]-s.y}else e=n[l-2]-n[l-4],i=n[l-1]-n[l-3];let h=(Math.atan2(i,e)+r)%r,d=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[l-2],n[l-1]),t.rotate(h),t.moveTo(0,0),t.lineTo(-o,d/2),t.lineTo(-o,-d/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),s?(e=(a[0]+a[2])/2-n[0],i=(a[1]+a[3])/2-n[1]):(e=n[2]-n[0],i=n[3]-n[1]),t.rotate((Math.atan2(-i,-e)+r)%r),t.moveTo(0,0),t.lineTo(-o,d/2),t.lineTo(-o,-d/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){let e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){let t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x,y:t.y-e,width:t.width,height:t.height+2*e}}}_.prototype.className="Arrow",(0,o.DA)(_),a.F.addGetterSetter(_,"pointerLength",10,(0,l.Kg)()),a.F.addGetterSetter(_,"pointerWidth",10,(0,l.Kg)()),a.F.addGetterSetter(_,"pointerAtBeginning",!1),a.F.addGetterSetter(_,"pointerAtEnding",!0);class w extends s.b{_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)}}w.prototype._centroid=!0,w.prototype.className="Circle",w.prototype._attrsAffectingSize=["radiu
14s"],(0,o.DA)(w),a.F.addGetterSetter(w,"radius",0,(0,l.Kg)());class S extends s.b{_sceneFunc(t){let e=this.radiusX(),i=this.radiusY();t.beginPath(),t.save(),e!==i&&t.scale(1,i/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)}}S.prototype.className="Ellipse",S.prototype._centroid=!0,S.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,o.DA)(S),a.F.addComponentsGetterSetter(S,"radius",["x","y"]),a.F.addGetterSetter(S,"radiusX",0,(0,l.Kg)()),a.F.addGetterSetter(S,"radiusY",0,(0,l.Kg)());var C=i(4391);class Image extends s.b{constructor(t){super(t),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",t=>{this._removeImageLoad(t.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let t=this.image();t&&t.complete||t&&4===t.readyState||!t||!t.addEventListener||t.addEventListener("load",this._loadListener)}_removeImageLoad(t){t&&t.removeEventListener&&t.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){let t=!!this.cornerRadius(),e=this.hasShadow();return!!t&&!!e||super._useBufferCanvas(!0)}_sceneFunc(t){let e;let i=this.getWidth(),r=this.getHeight(),n=this.cornerRadius(),a=this.attrs.image;if(a){let t=this.attrs.cropWidth,n=this.attrs.cropHeight;e=t&&n?[a,this.cropX(),this.cropY(),t,n,0,0,i,r]:[a,0,0,i,r]}(this.hasFill()||this.hasStroke()||n)&&(t.beginPath(),n?C.Z.drawRoundedRectPath(t,i,r,n):t.rect(0,0,i,r),t.closePath(),t.fillStrokeShape(this)),a&&(n&&t.clip(),t.drawImage.apply(t,e))}_hitFunc(t){let e=this.width(),i=this.height(),r=this.cornerRadius();t.beginPath(),r?C.Z.drawRoundedRectPath(t,e,i,r):t.rect(0,0,e,i),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e,i;return null!==(i=null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width)&&void 0!==i?i:0}getHeight(){var t,e,i;return null!==(i=null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height)&&void 0!==i?i:0}static fromURL(t,e,i=null){let r=C.Z.createImageElement();r.onload=function(){let t=new Image({image:r});e(t)},r.onerror=i,r.crossOrigin="Anonymous",r.src=t}}Image.prototype.className="Image",Image.prototype._attrsAffectingSize=["image"],(0,o.DA)(Image),a.F.addGetterSetter(Image,"cornerRadius",0,(0,l.Jj)(4)),a.F.addGetterSetter(Image,"image"),a.F.addComponentsGetterSetter(Image,"crop",["x","y","width","height"]),a.F.addGetterSetter(Image,"cropX",0,(0,l.Kg)()),a.F.addGetterSetter(Image,"cropY",0,(0,l.Kg)()),a.F.addGetterSetter(Image,"cropWidth",0,(0,l.Kg)()),a.F.addGetterSetter(Image,"cropHeight",0,(0,l.Kg)());var k=i(89908);let P=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],A="right",T="down",F="left",M=P.length;class E extends k.Z{constructor(t){super(t),this.on("add.konva",function(t){this._addListeners(t.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let e=this,i,r=function(){e._sync()};for(i=0;i<M;i++)t.on(P[i]+"Change.konva",r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),e=this.getTag(),i,r,n,a,s,o,l;if(t&&e){switch(i=t.width(),r=t.height(),n=e.pointerDirection(),a=e.pointerWidth(),l=e.pointerHeight(),s=0,o=0,n){case"up":s=i/2,o=-1*l;break;case A:s=i+a,o=r/2;break;case T:s=i/2,o=r+l;break;case F:s=-1*a,o=r/2}e.setAttrs({x:-1*s,y:-1*o,width:i,height:r}),t.setAttrs({x:-1*s,y:-1*o})}}}E.prototype.className="Label",(0,o.DA)(E);class R extends s.b{_sceneFunc(t){let e=this.width(),i=this.height(),r=this.pointerDirection(),n=this.pointerWidth(),a=this.pointerHeight(),s=this.cornerRadius(),o=0,l=0,h=0,d=0;"number"==typeof s?o=l=h=d=Math.min(s,e/2,i/2):(o=Math.min(s[0]||0,e/2,i/2),l=Math.min(s[1]||0,e/2,i/2),d=Math.min(s[2]||0,e/2,i/2),h=Math.min(s[3]||0,e/2,i/2)),t.beginPath(),t.moveTo(o,0),"up"===r&&(t.lineTo((e-n)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+n)/2,0)
14),t.lineTo(e-l,0),t.arc(e-l,l,l,3*Math.PI/2,0,!1),r===A&&(t.lineTo(e,(i-a)/2),t.lineTo(e+n,i/2),t.lineTo(e,(i+a)/2)),t.lineTo(e,i-d),t.arc(e-d,i-d,d,0,Math.PI/2,!1),r===T&&(t.lineTo((e+n)/2,i),t.lineTo(e/2,i+a),t.lineTo((e-n)/2,i)),t.lineTo(h,i),t.arc(h,i-h,h,Math.PI/2,Math.PI,!1),r===F&&(t.lineTo(0,(i+a)/2),t.lineTo(-1*n,i/2),t.lineTo(0,(i-a)/2)),t.lineTo(0,o),t.arc(o,o,o,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,e=0,i=this.pointerWidth(),r=this.pointerHeight(),n=this.pointerDirection(),a=this.width(),s=this.height();return"up"===n?(e-=r,s+=r):n===T?s+=r:n===F?(t-=1.5*i,a+=i):n===A&&(a+=1.5*i),{x:t,y:e,width:a,height:s}}}R.prototype.className="Tag",(0,o.DA)(R),a.F.addGetterSetter(R,"pointerDirection","none"),a.F.addGetterSetter(R,"pointerWidth",0,(0,l.Kg)()),a.F.addGetterSetter(R,"pointerHeight",0,(0,l.Kg)()),a.F.addGetterSetter(R,"cornerRadius",0,(0,l.Jj)(4));class D extends s.b{_sceneFunc(t){let e=this.cornerRadius(),i=this.width(),r=this.height();t.beginPath(),e?C.Z.drawRoundedRectPath(t,i,r,e):t.rect(0,0,i,r),t.closePath(),t.fillStrokeShape(this)}}D.prototype.className="Rect",(0,o.DA)(D),a.F.addGetterSetter(D,"cornerRadius",0,(0,l.Jj)(4));class G extends s.b{_sceneFunc(t){let e=this._getPoints(),i=this.radius(),r=this.sides(),n=this.cornerRadius();if(t.beginPath(),n)C.Z.drawRoundedPolygonPath(t,e,r,i,n);else{t.moveTo(e[0].x,e[0].y);for(let i=1;i<e.length;i++)t.lineTo(e[i].x,e[i].y)}t.closePath(),t.fillStrokeShape(this)}_getPoints(){let t=this.attrs.sides,e=this.attrs.radius||0,i=[];for(let r=0;r<t;r++)i.push({x:e*Math.sin(2*r*Math.PI/t),y:-1*e*Math.cos(2*r*Math.PI/t)});return i}getSelfRect(){let t=this._getPoints(),e=t[0].x,i=t[0].x,r=t[0].y,n=t[0].y;return t.forEach(t=>{e=Math.min(e,t.x),i=Math.max(i,t.x),r=Math.min(r,t.y),n=Math.max(n,t.y)}),{x:e,y:r,width:i-e,height:n-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}G.prototype.className="RegularPolygon",G.prototype._centroid=!0,G.prototype._attrsAffectingSize=["radius"],(0,o.DA)(G),a.F.addGetterSetter(G,"radius",0,(0,l.Kg)()),a.F.addGetterSetter(G,"sides",0,(0,l.Kg)()),a.F.addGetterSetter(G,"cornerRadius",0,(0,l.Jj)(4));let L=2*Math.PI;class I extends s.b{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,L,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),L,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)}}I.prototype.className="Ring",I.prototype._centroid=!0,I.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o.DA)(I),a.F.addGetterSetter(I,"innerRadius",0,(0,l.Kg)()),a.F.addGetterSetter(I,"outerRadius",0,(0,l.Kg)());var Animation=i(45080);class O extends s.b{constructor(t){super(t),this._updated=!0,this.anim=new Animation.f(()=>{let 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){let e=this.animation(),i=this.frameIndex(),r=4*i,n=this.animations()[e],a=this.frameOffsets(),s=n[r+0],o=n[r+1],l=n[r+2],h=n[r+3],d=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,l,h),t.closePath(),t.fillStrokeShape(this)),d){if(a){let r=a[e],n=2*i;t.drawImage(d,s,o,l,h,r[n+0],r[n+1],l,h)}else t.drawImage(d,s,o,l,h,0,0,l,h)}}_hitFunc(t){let e=this.animation(),i=this.frameIndex(),r=4*i,n=this.animations()[e],a=this.frameOffsets(),s=n[r+2],o=n[r+3];if(t.beginPath(),a){let r=a[e],n=2*i;t.rect(r[n+0],r[n+1],s,o)}else t.rect(0,0,s,o);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){let t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;let 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(){let t=this.frameIndex(),e=this.animation(),i=this.animations(),r=i[e],n=r.length/4;t<n-1?this.frameIndex(t+1):this.frameIndex(0)}}O.prototype.className="Sprite",(0,o.DA)(O),a.F.addGetterSetter(O,"animation"),a.F.addGetterSetter(O,"animations"),a.F.addGetterSetter(O,"frameOffsets"),a.F.addGetterSetter(O,"image"),a.F.addGetterSetter(O,"frameIndex",0,(0,l.Kg)()),a.F.addGetterSetter(O,"frameRate",17,(0,l.Kg)()),a.F.backCompat(O,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class N extends s.b{_sceneFunc(t){let e=this.innerRadius(),i=this.outerRadius(),r=this.numPoints();t.beginPath(),t.moveTo(0,0-i);for(let n=1;n<2*r;n++){let a=n%2==0?i:e,s=a*Math.sin(n*Math.PI/r),o=-1*a*Math.cos(n*Math.PI/r);t.lineTo(s,o)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}function B(t){return[...t].reduce((t,e,i,r)=>{if(/\p{Emoji}/u.test(e)){let n=r[i+1];n&&/\p{Emoji_Modifier}|\u200D/u.test(n)?(t.push(e+n),r[i+1]=""):t.push(e)}else/\p{Regional_Indicator}{2}/u.test(e+(r[i+1]||""))?t.push(e+r[i+1]):i>0&&/\p{Mn}|\p{Me}|\p{Mc}/u.test(e)?t[t.length-1]+=e:e&&t.push(e);return t},[])}N.prototype.className="Star",N.prototype._centroid=!0,N.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o.DA)(N),a.F.addGetterSetter(N,"numPoints",5,(0,l.Kg)()),a.F.addGetterSetter(N,"innerRadius",0,(0,l.Kg)()),a.F.addGetterSetter(N,"outerRadius",0,(0,l.Kg)());let z="auto",Z="inherit",j="justify",H="left",W="middle",K="normal",Y="none",X=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],q=X.length;function U(){return r||(r=C.Z.createCanvasElement().getContext("2d"))}class Text extends s.b{constructor(t){var e;super(((e=(e=t)||{}).fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage||(e.fill=e.fill||"black"),e)),this._partialTextX=0,this._partialTextY=0;for(let t=0;t<q;t++)this.on(X[t]+"Change.konva",this._setTextData);this._setTextData()}_sceneFunc(t){var e,i;let r=this.textArr,n=r.length;if(!this.text())return;let a=this.padding(),s=this.fontSize(),l=this.lineHeight()*s,h=this.verticalAlign(),d=this.direction(),c=0,u=this.align(),g=this.getWidth(),f=this.letterSpacing(),p=this.charRenderFunc(),m=this.fill(),b=this.textDecoration(),y=-1!==b.indexOf("underline"),v=-1!==b.indexOf("line-through"),x;d=d===Z?t.direction:d;let _=l/2,w=W;if(!o.So.legacyTextRendering){let t=this.measureSize("M");w="alphabetic";let r=null!==(e=t.fontBoundingBoxAscent)&&void 0!==e?e:t.actualBoundingBoxAscent,n=null!==(i=t.fontBoundingBoxDescent)&&void 0!==i?i:t.actualBoundingBoxDescent;_=(r-n)/2+l/2}for("rtl"===d&&t.setAttr("direction",d),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",w),t.setAttr("textAlign",H),h===W?c=(this.getHeight()-n*l-2*a)/2:"bottom"===h&&(c=this.getHeight()-n*l-2*a),t.translate(a,c+a),x=0;x<n;x++){let e=0,i=r[x],h=i.text,c=i.width,b=i.lastInParagraph;if(t.save(),"right"===u?e+=g-c-2*a:"center"===u&&(e+=(g-c-2*a)/2),y){t.save(),t.beginPath();let i=o.So.legacyTextRendering?Math.round(s/2):Math.round(s/4),r=e,n=_+0+i;t.moveTo(r,n);let l=u!==j||b?c:g-2*a;t.lineTo(r+Math.round(l),n),t.lineWidth=s/15;let h=this._getLinearGradient();
14t.strokeStyle=h||m,t.stroke(),t.restore()}let w=e;if("rtl"!==d&&(0!==f||u===j||p)){let i=h.split(" ").length-1,n=B(h);for(let s=0;s<n.length;s++){let o=n[s];if(" "!==o||b||u!==j||(e+=(g-2*a-c)/i),this._partialTextX=e,this._partialTextY=_+0,this._partialText=o,p){t.save();let i=r.slice(0,x),n=i.reduce((t,e)=>t+B(e.text).length,0),a=s+n;p({char:o,index:a,x:e,y:_+0,lineIndex:x,column:s,isLastInLine:b,width:this.measureSize(o).width,context:t})}t.fillStrokeShape(this),p&&t.restore(),e+=this.measureSize(o).width+f}}else 0!==f&&t.setAttr("letterSpacing",`${f}px`),this._partialTextX=e,this._partialTextY=_+0,this._partialText=h,t.fillStrokeShape(this);if(v){t.save(),t.beginPath();let e=o.So.legacyTextRendering?0:-Math.round(s/4);t.moveTo(w,_+0+e);let i=u!==j||b?c:g-2*a;t.lineTo(w+Math.round(i),_+0+e),t.lineWidth=s/15;let r=this._getLinearGradient();t.strokeStyle=r||m,t.stroke(),t.restore()}t.restore(),n>1&&(_+=l)}}_hitFunc(t){let e=this.getWidth(),i=this.getHeight();t.beginPath(),t.rect(0,0,e,i),t.closePath(),t.fillStrokeShape(this)}setText(t){let e=C.Z._isString(t)?t:null==t?"":t+"";return this._setAttr("text",e),this}getWidth(){let t=this.attrs.width===z||void 0===this.attrs.width;return t?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){let t=this.attrs.height===z||void 0===this.attrs.height;return t?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return C.Z.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,i,r,n,a,s,o,l,h,d,c;let u=U(),g=this.fontSize(),f;u.save(),u.font=this._getContextFont(),f=u.measureText(t),u.restore();let p=g/100;return{actualBoundingBoxAscent:null!==(e=f.actualBoundingBoxAscent)&&void 0!==e?e:71.58203125*p,actualBoundingBoxDescent:null!==(i=f.actualBoundingBoxDescent)&&void 0!==i?i:0,actualBoundingBoxLeft:null!==(r=f.actualBoundingBoxLeft)&&void 0!==r?r:-7.421875*p,actualBoundingBoxRight:null!==(n=f.actualBoundingBoxRight)&&void 0!==n?n:75.732421875*p,alphabeticBaseline:null!==(a=f.alphabeticBaseline)&&void 0!==a?a:0,emHeightAscent:null!==(s=f.emHeightAscent)&&void 0!==s?s:100*p,emHeightDescent:null!==(o=f.emHeightDescent)&&void 0!==o?o:-20*p,fontBoundingBoxAscent:null!==(l=f.fontBoundingBoxAscent)&&void 0!==l?l:91*p,fontBoundingBoxDescent:null!==(h=f.fontBoundingBoxDescent)&&void 0!==h?h:21*p,hangingBaseline:null!==(d=f.hangingBaseline)&&void 0!==d?d:72.80000305175781*p,ideographicBaseline:null!==(c=f.ideographicBaseline)&&void 0!==c?c:-21*p,width:f.width,height:g}}_getContextFont(){return this.fontStyle()+" "+this.fontVariant()+" "+this.fontSize()+"px "+this.fontFamily().split(",").map(t=>{t=t.trim();let e=t.indexOf(" ")>=0,i=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!i&&(t=`"${t}"`),t}).join(", ")}_addTextLine(t){let e=this.align();e===j&&(t=t.trim());let i=this._getTextWidth(t);return this.textArr.push({text:t,width:i,lastInParagraph:!1})}_getTextWidth(t){let e=this.letterSpacing(),i=t.length;return U().measureText(t).width+e*i}_setTextData(){let t=this.text().split("\n"),e=+this.fontSize(),i=0,r=this.lineHeight()*e,n=this.attrs.width,a=this.attrs.height,s=n!==z&&void 0!==n,o=a!==z&&void 0!==a,l=this.padding(),h=n-2*l,d=a-2*l,c=0,u=this.wrap(),g="char"!==u&&u!==Y,f=this.ellipsis();this.textArr=[],U().font=this._getContextFont();let p=f?this._getTextWidth("…"):0;for(let e=0,n=t.length;e<n;++e){let a=t[e],l=this._getTextWidth(a);if(s&&l>h)for(;a.length>0;){let t=0,e=B(a).length,n="",s=0;for(;t<e;){let i=t+e>>>1,l=B(a),u=l.slice(0,i+1).join(""),g=this._getTextWidth(u),m=f&&o&&c+r>d,b=m?g+p:g;b<=h?(t=i+1,n=u,s=g):e=i}if(n){if(g){let e;let i=B(a),r=B(n),o=i[r.length],l=" "===o||"-"===o;if(l&&s<=h)e=r.length;else{let t=r.lastIndexOf(" "),i=r.lastIndexOf("-");e=Math.max(t,i)+1}e>0&&(t=e,n=i.slice(0,t).join(""),s=this._getTextWidth(n))}n=n.trimRight(),this._addTextLine(n),i=Math.max(i,s),c+=r;let e=this._shouldHandleEllipsis(c);if(e){this._tryToAddEllipsisToLastLine();break}let o=B(a);if((a=o.slice(t).join("").trimLeft()).length>0&&(l=this._getTextWidth(a))<=h){this._addTextLine(a),c+=r,i=Math.max(i,l);break}}else break}else this._addTextLine(a),c+=r,i=Math.max(i,l),this._shouldHandleEllipsis(c)&&e<n-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),o&&c+r>d)break}this.textHeight=e,this.textWidth=i}_shouldHandleEllipsis(t){let e=+this.fontSize(),i=this.lineHeight()*e,r=this.attrs.height,n=this.padding(),a=this.wrap();return!(a!==Y)||r!==z&&void 0!==r&&t+i>r-2*n}_tryToAddEllipsisToLastLine(){let t=this.attrs.width,e=this.padding(),i=this.ellipsis(),r=this.textArr[this.textArr.length-1];if(r&&i){if(t!==z&&void 0!==t){let i=this._getTextWidth(r.text+"…")<t-2*e;i||(r.text=r.text.slice(0,r.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(r.text
14+"…")}}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){let t=-1!==this.textDecoration().indexOf("underline")||-1!==this.textDecoration().indexOf("line-through"),e=this.hasShadow();return!!t&&!!e||super._useBufferCanvas()}}Text.prototype._fillFunc=function(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)},Text.prototype._strokeFunc=function(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)},Text.prototype.className="Text",Text.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,o.DA)(Text),a.F.overWriteSetter(Text,"width",(0,l.hi)()),a.F.overWriteSetter(Text,"height",(0,l.hi)()),a.F.addGetterSetter(Text,"direction",Z),a.F.addGetterSetter(Text,"fontFamily","Arial"),a.F.addGetterSetter(Text,"fontSize",12,(0,l.Kg)()),a.F.addGetterSetter(Text,"fontStyle",K),a.F.addGetterSetter(Text,"fontVariant",K),a.F.addGetterSetter(Text,"padding",0,(0,l.Kg)()),a.F.addGetterSetter(Text,"align",H),a.F.addGetterSetter(Text,"verticalAlign","top"),a.F.addGetterSetter(Text,"lineHeight",1,(0,l.Kg)()),a.F.addGetterSetter(Text,"wrap","word"),a.F.addGetterSetter(Text,"ellipsis",!1,(0,l.I0)()),a.F.addGetterSetter(Text,"letterSpacing",0,(0,l.Kg)()),a.F.addGetterSetter(Text,"text","",(0,l.sY)()),a.F.addGetterSetter(Text,"textDecoration",""),a.F.addGetterSetter(Text,"charRenderFunc",void 0);let V="normal";function $(t){t.fillText(this.partialText,0,0)}function J(t){t.strokeText(this.partialText,0,0)}class Q extends s.b{constructor(t){super(t),this.dummyCanvas=C.Z.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncCh
14ange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return x.getPathLength(this.dataArray)}_getPointAtLength(t){if(!this.attrs.data)return null;let e=this.pathLength;return t>e?null:x.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=x.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();let e=this.textDecoration(),i=this.fill(),r=this.fontSize(),n=this.glyphInfo,a=-1!==e.indexOf("underline"),s=-1!==e.indexOf("line-through");a&&t.beginPath();for(let e=0;e<n.length;e++){t.save();let i=n[e].p0;t.translate(i.x,i.y),t.rotate(n[e].rotation),this.partialText=n[e].text,t.fillStrokeShape(this),a&&(0===e&&t.moveTo(0,r/2+1),t.lineTo(n[e].width,r/2+1)),t.restore()}if(a&&(t.strokeStyle=i,t.lineWidth=r/20,t.stroke()),s){t.beginPath();for(let e=0;e<n.length;e++){t.save();let i=n[e].p0;t.translate(i.x,i.y),t.rotate(n[e].rotation),0===e&&t.moveTo(0,0),t.lineTo(n[e].width,0),t.restore()}t.strokeStyle=i,t.lineWidth=r/20,t.stroke()}t.restore()}_hitFunc(t){t.beginPath();let e=this.glyphInfo;if(e.length>=1){let i=e[0].p0;t.moveTo(i.x,i.y)}for(let i=0;i<e.length;i++){let r=e[i].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return C.Z.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return Text.prototype.setText.call(this,t)}_getContextFont(){return Text.prototype._getContextFont.call(this)}_getTextSize(t){let e=this.dummyCanvas,i=e.getContext("2d");i.save(),i.font=this._getContextFont();let r=i.measureText(t);return i.restore(),{width:r.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){let t=B(this.text()),e=[],i=0;for(let r=0;r<t.length;r++)e.push({char:t[r],width:this._getTextSize(t[r]).width}),i+=e[r].width;let{height:r}=this._getTextSize(this.attrs.text);if(this.textWidth=i,this.textHeight=r,this.glyphInfo=[],!this.attrs.data)return null;let n=this.letterSpacing(),a=this.align(),s=this.kerningFunc(),o=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0),l=0;"center"===a&&(l=Math.max(0,this.pathLength/2-o/2)),"right"===a&&(l=Math.max(0,this.pathLength-o));let h=l;for(let i=0;i<e.length;i++){let r=this._getPointAtLength(h);if(!r)return;let l=e[i].char,d=e[i].width+n;if(" "===l&&"justify"===a){let t=this.text().split(" ").length-1;d+=(this.pathLength-o)/t}let c=this._getPointAtLength(h+d);if(!c)return;let u=x.getLineLength(r.x,r.y,c.x,c.y),g=0;if(s)try{g=s(e[i-1].char,l)*this.fontSize()}catch(t){g=0}r.x+=g,c.x+=g,this.textWidth+=g;let f=x.getPointOnLine(g+u/2,r.x,r.y,c.x,c.y),p=Math.atan2(c.y-r.y,c.x-r.x);this.glyphInfo.push({transposeX:f.x,transposeY:f.y,text:t[i],rotation:p,p0:r,p1:c,width:u}),h+=d}}getSelfRect(){let t,e;if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};let i=[];this.glyphInfo.forEach(function(t){i.push(t.p0.x),i.push(t.p0.y),i.push(t.p1.x),i.push(t.p1.y)});let r=i[0]||0,n=i[0]||0,a=i[1]||0,s=i[1]||0;for(let o=0;o<i.length/2;o++)t=i[2*o],e=i[2*o+1],r=Math.min(r,t),n=Math.max(n,t),a=Math.min(a,e),s=Math.max(s,e);let o=this.fontSize();return{x:r-o/2,y:a-o/2,width:n-r+o,height:s-a+o}}destroy(){return C.Z.releaseCanvas(this.dummyCanvas),super.destroy()}}Q.prototype._fillFunc=$,Q.prototype._strokeFunc=J,Q.prototype._fillFuncHit=$,Q.prototype._strokeFuncHit=J,Q.prototype.className="TextPath",Q.prototype._attrsAffectingSize=["text","fontSize","data"],(0,o.DA)(Q),a.F.addGetterSetter(Q,"data"),a.F.addGetterSetter(Q,"fontFamily","Arial"),a.F.addGetterSetter(Q,"fontSize",12,(0,l.Kg)()),a.F.addGetterSetter(Q,"fontStyle",V),a.F.addGetterSetter(Q,"align","left"),a.F.addGetterSetter(Q,"letterSpacing",0,(0,l.Kg)()),a.F.addGetterSetter(Q,"textBaseline","middle"),a.F.addGetterSetter(Q,"fontVariant",V),a.F.addGetterSetter(Q,"text",""),a.F.addGetterSetter(Q,"textDecoration",""),a.F.addGetterSetter(Q,"kerningFunc",void 0);var Node=i(17874);let tt="tr-konva",te=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${tt}`).join(" "),ti="nodesRect",tr=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange","draggableChange"],tn={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},ta="ontouchstart"in o.So._global,ts=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];
14function to(t,e,i){let r=i.x+(t.x-i.x)*Math.cos(e)-(t.y-i.y)*Math.sin(e),n=i.y+(t.x-i.x)*Math.sin(e)+(t.y-i.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:r,y:n}}let tl=0;class th extends k.Z{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(te,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return C.Z.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 tt+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();let e=t.filter(t=>!t.isAncestorOf(this)||(C.Z.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1));this._nodes=t=e,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(t=>{let e=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()};if(t._attrsAffectingSize.length){let i=t._attrsAffectingSize.map(t=>t+"Change."+this._getEventNamespace()).join(" ");t.on(i,e)}t.on(tr.map(t=>t+`.${this._getEventNamespace()}`).join(" "),e),t.on(`absoluteTransformChange.${this._getEventNamespace()}`,e),this._proxyDrag(t)}),this._resetTransformCache();let i=!!this.findOne(".top-left");return i&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,i=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(i,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,i=>{if(!e)return;let r=t.getAbsolutePosition(),n=r.x-e.x,a=r.y-e.y;this.nodes().forEach(e=>{if(e===t||e.isDragging())return;let r=e.getAbsolutePosition();e.setAbsolutePosition({x:r.x+n,y:r.y+a}),e.startDrag(i)}),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(ti),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(ti,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),i){let r=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),n=t.getAbsoluteScale(i),a=t.getAbsolutePosition(i),s=r.x*n.x-t.offsetX()*n.x,l=r.y*n.y-t.offsetY()*n.y,h=(o.So.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI),d={x:a.x+s*Math.cos(h)+l*Math.sin(-h),y:a.y+l*Math.cos(h)+s*Math.sin(h),width:r.width*n.x,height:r.height*n.y,rotation:h};return to(d,-o.So.getAngle(e),{x:0,y:0})}__getNodeRect(){let t=this.getNode();if(!t)return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};let e=[];this.nodes().map(t=>{let i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=[{x:i.x,y:i.y},{x:i.x+i.width,y:i.y},{x:i.x+i.width,y:i.y+i.height},{x:i.x,y:i.y+i.height}],n=t.getAbsoluteTransform();r.forEach(function(t){let i=n.point(t);e.push(i)})});let i=new C.w;i.rotate(-o.So.getAngle(this.rotation()));let r=1/0,n=1/0,a=-1/0,s=-1/0;e.forEach(function(t){let e=i.point(t);void 0===r&&(r=a=e.x,n=s=e.y),r=Math.min(r,e.x),n=Math.min(n,e.y),a=Math.max(a,e.x),s=Math.max(s,e.y)}),i.invert();let l=i.point({x:r,y:n});return{x:l.x,y:l.y,width:a-r,height:s-n,rotation:o.So.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(),ts.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){let e=new D({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:ta?10:"auto"}),i=this;e.on("mousedown touchstart",function(t){i._handleMouseDown(t)}),e.on("dragstart",t=>
14{e.stopDrag(),t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),e.on("mouseenter",()=>{let i=o.So.getAngle(this.rotation()),r=this.rotateAnchorCursor(),n=function(t,e,i){if("rotater"===t)return i;e+=C.Z.degToRad(tn[t]||0);let r=(C.Z.radToDeg(e)%360+360)%360;if(C.Z._inRange(r,337.5,360)||C.Z._inRange(r,0,22.5))return"ns-resize";if(C.Z._inRange(r,22.5,67.5))return"nesw-resize";if(C.Z._inRange(r,67.5,112.5))return"ew-resize";if(C.Z._inRange(r,112.5,157.5))return"nwse-resize";if(C.Z._inRange(r,157.5,202.5))return"ns-resize";if(C.Z._inRange(r,202.5,247.5))return"nesw-resize";if(C.Z._inRange(r,247.5,292.5))return"ew-resize";else if(C.Z._inRange(r,292.5,337.5))return"nwse-resize";else return C.Z.error("Transformer has unknown angle for cursor detection: "+r),"pointer"}(t,i,r);e.getStage().content&&(e.getStage().content.style.cursor=n),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){let t=new s.b({name:"back",width:0,height:0,sceneFunc(t,e){let i=e.getParent(),r=i.padding();t.beginPath(),t.rect(-r,-r,e.width()+2*r,e.height()+2*r),t.moveTo(e.width()/2,-r),i.rotateEnabled()&&i.rotateLineVisible()&&t.lineTo(e.width()/2,-i.rotateAnchorOffset()*C.Z._sign(e.height())-r),t.fillStrokeShape(e)},hitFunc:(t,e)=>{if(!this.shouldOverdrawWholeArea())return;let i=this.padding();t.beginPath(),t.rect(-i,-i,e.width()+2*i,e.height()+2*i),t.fillStrokeShape(e)}});this.add(t),this._proxyDrag(t),t.on("dragstart",t=>{t.cancelBubble=!0}),t.on("dragmove",t=>{t.cancelBubble=!0}),t.on("dragend",t=>{t.cancelBubble=!0}),this.on("dragmove",t=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];let e=this._getNodeRect(),i=e.width,r=e.height,n=Math.sqrt(Math.pow(i,2)+Math.pow(r,2));this.sin=Math.abs(r/n),this.cos=Math.abs(i/n),"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;let a=t.target.getAbsolutePosition(),s=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:s.x-a.x,y:s.y-a.y},tl++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(e=>{e._fire("transformstart",{evt:t.evt,target:e})})}_handleMouseMove(t){let e,i,r,n;let a=this.findOne("."+this._movingAnchorName),s=a.getStage();s.setPointersPositions(t);let l=s.getPointerPosition(),h={x:l.x-this._anchorDragOffset.x,y:l.y-this._anchorDragOffset.y},d=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(h=this.anchorDragBoundFunc()(d,h,t)),a.setAbsolutePosition(h);let c=a.getAbsolutePosition();if(d.x===c.x&&d.y===c.y)return;if("rotater"===this._movingAnchorName){let r=this._getNodeRect();e=a.x()-r.width/2;let n=Math.atan2(-(i=-a.y()+r.height/2),e)+Math.PI/2;r.height<0&&(n-=Math.PI);let s=o.So.getAngle(this.rotation()),l=s+n,h=o.So.getAngle(this.rotationSnapTolerance()),d=function(t,e,i){let r=e;for(let n=0;n<t.length;n++){let a=o.So.getAngle(t[n]),s=Math.abs(a-e)%(2*Math.PI),l=Math.min(s,2*Math.PI-s);l<i&&(r=a)}return r}(this.rotationSnaps(),l,h),c=d-r.rotation,u=function(t,e){let i={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)};return to(t,e,i)}(r,c);this._fitNodesInto(u,t);return}let u=this.shiftBehavior();n="inverted"===u?this.keepRatio()&&!t.shiftKey:"none"===u?this.keepRatio():this.keepRatio()||t.shiftKey;let g=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(n){let t=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(t.x-a.x(),2)+Math.pow(t.y-a.y(),2));let n=this.findOne(".top-left").x()>t.x?-1:1,s=this.findOne(".top-left").y()>t.y?-1:1;e=r*this.cos*n,i=r*this.sin*s,this.findOne(".top-left").x(t.x-e),this.findOne(".top-left").y(t.y-i)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(a.y());else if("top-right"===this._movingAnchorName){if(n){let t=g?{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(a.x()-t.x,2)+Math.pow(t.y-a.y(),2));let n=this.findOne(".top-right").x()<t.x?-1:1,s=this.findOne(".top-right").y()>t.y?-1:1;e=r*this.cos*n,i=r*this.sin*s,this.findOne(".top-right").x(t.x+e),this.findOne(".top-right").y(t.y-i)}var f=a.position();this.findOne(".top-left").y(f.y),this.findOne(".bottom-right").x(f.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(a.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(a.x());else if("bottom-left"===this._movingAnchorName){if(n){let t=g?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(t.x-a.x(),2)+Math.pow(a.y()-t.y,2));let n=t.x<a.x()?-1:1,s=a.y()<t.y?-1:1;e=r*this.cos*n,i=r*this.sin*s,a.x(t.x-e),a.y(t.y+i)}f=a.position(),this.findOne(".top-left").x(f.x),this.findOne(".bottom-right").y(f.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(a.y());else if("bottom-right"===this._movingAnchorName){if(n){let t=g?{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(a.x()-t.x,2)+Math.pow(a.y()-t.y,2));let n=this.findOne(".bottom-right").x()<t.x?-1:1,s=this.findOne(".bottom-right").y()<t.y?-1:1;e=r*this.cos*n,i=r*this.sin*s,this.findOne(".bottom-right").x(t.x+e),this.findOne(".bottom-right").y(t.y+i)}}else console.error(Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(g=this.centeredScaling()||t.altKey){let t=this.findOne(".top-left"),e=this.findOne(".bottom-right"),i=t.x(),r=t.y(),n=this.getWidth()-e.x(),a=this.getHeight()-e.y();e.move({x:-i,y:-r}),t.move({x:n,y:a})}let p=this.findOne(".top-left").getAbsolutePosition();e=p.x,i=p.y;let m=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),b=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:i,width:m,height:b,rotation:o.So.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var e;if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));let i=this.getNode();tl--,this._fire("transformend",{evt:t,target:i}),null===(e=this.getLayer())||void 0===e||e.batchDraw(),i&&this._nodes.forEac
14h(e=>{var i;e._fire("transformend",{evt:t,target:e}),null===(i=e.getLayer())||void 0===i||i.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,e){let i=this._getNodeRect();if(C.Z._inRange(t.width,-(2*this.padding())-1,1)||C.Z._inRange(t.height,-(2*this.padding())-1,1)){this.update();return}let r=new C.w;if(r.rotate(o.So.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){let e=r.point({x:-(2*this.padding()),y:0});t.x+=e.x,t.y+=e.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){let e=r.point({x:2*this.padding(),y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.width+=2*this.padding()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){let e=r.point({x:0,y:-(2*this.padding())});t.x+=e.x,t.y+=e.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){let e=r.point({x:0,y:2*this.padding()});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}if(this.boundBoxFunc()){let e=this.boundBoxFunc()(i,t);e?t=e:C.Z.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}let n=new C.w;n.translate(i.x,i.y),n.rotate(i.rotation),n.scale(i.width/1e7,i.height/1e7);let a=new C.w,s=t.width/1e7,l=t.height/1e7;!1===this.flipEnabled()?(a.translate(t.x,t.y),a.rotate(t.rotation),a.translate(t.width<0?t.width:0,t.height<0?t.height:0),a.scale(Math.abs(s),Math.abs(l))):(a.translate(t.x,t.y),a.rotate(t.rotation),a.scale(s,l));let h=a.multiply(n.invert());this._nodes.forEach(t=>{var e;if(!t.getStage())return;let i=t.getParent().getAbsoluteTransform(),r=t.getTransform().copy();r.translate(t.offsetX(),t.offsetY());let n=new C.w;n.multiply(i.copy().invert()).multiply(h).multiply(i).multiply(r);let a=n.decompose();t.setAttrs(a),null===(e=t.getLayer())||void 0===e||e.batchDraw()}),this.rotation(C.Z._getRotation(t.rotation)),this._nodes.forEach(t=>{this._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){let i=this.findOne(t);i.setAttrs(e)}update(){var t;let e=this._getNodeRect();this.rotation(C.Z._getRotation(e.rotation));let i=e.width,r=e.height,n=this.enabledAnchors(),a=this.resizeEnabled(),s=this.padding(),o=this.anchorSize(),l=this.find("._anchor");l.forEach(t=>{t.setAttrs({width:o,height:o,offsetX:o/2,offsetY:o/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:o/2+s,offsetY:o/2+s,visible:a&&n.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:i/2,y:0,offsetY:o/2+s,visible:a&&n.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:i,y:0,offsetX:o/2-s,offsetY:o/2+s,visible:a&&n.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:r/2,offsetX:o/2+s,visible:a&&n.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:i,y:r/2,offsetX:o/2-s,visible:a&&n.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:r,offsetX:o/2+s,offsetY:o/2-s,visible:a&&n.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:i/2,y:r,offsetY:o/2-s,visible:a&&n.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:i,y:r,offsetX:o/2-s,offsetY:o/2-s,visible:a&&n.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:i/2,y:-this.rotateAnchorOffset()*C.Z._sign(r)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:i,height:r,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),draggable:this.nodes().some(t=>t.draggable()),x:0,y:0});let h=this.anchorStyleFunc();h&&l.forEach(t=>{h(t)}),null===(t=this.getLayer())||void 0===t||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();let t=this.findOne("."+this._movingAnchorName);
14t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),k.Z.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Node.N.prototype.toObject.call(this)}clone(t){let e=Node.N.prototype.clone.call(this,t);return e}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}th.isTransforming=()=>tl>0,th.prototype.className="Transformer",(0,o.DA)(th),a.F.addGetterSetter(th,"enabledAnchors",ts,function(t){return t instanceof Array||C.Z.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(t){-1===ts.indexOf(t)&&C.Z.warn("Unknown anchor name: "+t+". Available names are: "+ts.join(", "))}),t||[]}),a.F.addGetterSetter(th,"flipEnabled",!0,(0,l.I0)()),a.F.addGetterSetter(th,"resizeEnabled",!0),a.F.addGetterSetter(th,"anchorSize",10,(0,l.Kg)()),a.F.addGetterSetter(th,"rotateEnabled",!0),a.F.addGetterSetter(th,"rotateLineVisible",!0),a.F.addGetterSetter(th,"rotationSnaps",[]),a.F.addGetterSetter(th,"rotateAnchorOffset",50,(0,l.Kg)()),a.F.addGetterSetter(th,"rotateAnchorCursor","crosshair"),a.F.addGetterSetter(th,"rotationSnapTolerance",5,(0,l.Kg)()),a.F.addGetterSetter(th,"borderEnabled",!0),a.F.addGetterSetter(th,"anchorStroke","rgb(0, 161, 255)"),a.F.addGetterSetter(th,"anchorStrokeWidth",1,(0,l.Kg)()),a.F.addGetterSetter(th,"anchorFill","white"),a.F.addGetterSetter(th,"anchorCornerRadius",0,(0,l.Kg)()),a.F.addGetterSetter(th,"borderStroke","rgb(0, 161, 255)"),a.F.addGetterSetter(th,"borderStrokeWidth",1,(0,l.Kg)()),a.F.addGetterSetter(th,"borderDash"),a.F.addGetterSetter(th,"keepRatio",!0),a.F.addGetterSetter(th,"shiftBehavior","default"),a.F.addGetterSetter(th,"centeredScaling",!1),a.F.addGetterSetter(th,"ignoreStroke",!1),a.F.addGetterSetter(th,"padding",0,(0,l.Kg)()),a.F.addGetterSetter(th,"nodes"),a.F.addGetterSetter(th,"node"),a.F.addGetterSetter(th,"boundBoxFunc"),a.F.addGetterSetter(th,"anchorDragBoundFunc"),a.F.addGetterSetter(th,"anchorStyleFunc"),a.F.addGetterSetter(th,"shouldOverdrawWholeArea",!1),a.F.addGetterSetter(th,"useSingleNodeRotation",!0),a.F.backCompat(th,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledH
14andlers:"enabledAnchors"});class td extends s.b{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,o.So.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)}}function tc(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}td.prototype.className="Wedge",td.prototype._centroid=!0,td.prototype._attrsAffectingSize=["radius"],(0,o.DA)(td),a.F.addGetterSetter(td,"radius",0,(0,l.Kg)()),a.F.addGetterSetter(td,"angle",0,(0,l.Kg)()),a.F.addGetterSetter(td,"clockwise",!1),a.F.backCompat(td,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});let tu=[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
146,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],tg=[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];function tf(t,e,i,r,n){let a=i-e,s=n-r;return 0===a?r+s/2:0===s?r:s*((t-e)/a)+r}a.F.addGetterSetter(Node.N,"blurRadius",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"brightness",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"contrast",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"embossStrength",.5,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"embossWhiteLevel",.5,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"embossDirection","top-left",void 0,a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"embossBlend",!1,void 0,a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"enhance",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"hue",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"saturation",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"luminance",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"hue",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"saturation",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"value",0,(0,l.Kg)(),a.F.afterSetFilter);let tp=function(t,e,i){let r=t.data,n=e.data,a=t.width,s=t.height,o=i.polarCenterX||a/2,l=i.polarCenterY||s/2,h=Math.sqrt(o*o+l*l),d=a-o,c=s-l,u=Math.sqrt(d*d+c*c);h=u>h?u:h;let g=360/a*Math.PI/180;for(let t=0;t<a;t+=1){let e=Math.sin(t*g),i=Math.cos(t*g);for(let u=0;u<s;u+=1){d=Math.floor(o+h*u/s*i);let g=((c=Math.floor(l+h*u/s*e))*a+d)*4,f=r[g+0],p=r[g+1],m=r[g+2],b=r[g+3];n[(g=(t+u*a)*4)+0]=f,n[g+1]=p,n[g+2]=m,n[g+3]=b}}},tm=function(t,e,i){let r;let n=t.data,a=e.data,s=t.width,o=t.height,l=i.polarCenterX||s/2,h=i.polarCenterY||o/2,d=Math.sqrt(l*l+h*h),c=s-l,u=o-h,g=Math.sqrt(c*c+u*u);d=g>d?g:d;let f=i.polarRotation||0;for(c=0;c<s;c+=1)for(u=0;u<o;u+=1){let t=c-l,e=u-h,i=Math.sqrt(t*t+e*e)*o/d,g=(180*Math.atan2(e,t)/Math.PI+360+f)%360;r=Math.floor(g=g*s/360);let p=(Math.floor(i)*s+r)*4,m=n[p+0],b=n[p+1],y=n[p+2],v=n[p+3];a[(p=(u*s+c)*4)+0]=m,a[p+1]=b,a[p+2]=y,a[p+3]=v}};function tb(t,e,i){let r=(i*t.width+e)*4,n=[];return n.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),n}function ty(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))}a.F.addGetterSetter(Node.N,"kaleidoscopePower",2,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"kaleidoscopeAngle",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"threshold",0,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"noise",.2,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"pixelSize",8,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"levels",.5,(0,l.Kg)(),a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"red",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),a.F.addGetterSetter(Node.N,"green",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),a.F.addGetterSetter(Node.N,"blue",0,l.xj,a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"red",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),a.F.addGetterSetter(Node.N,"green",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),a.F.addGetterSetter(Node.N,"blue",0,l.xj,a.F.afterSetFilter),a.F.addGetterSetter(Node.N,"alpha",1,function(t){return(this._filterUpToDate=!1,t>1)?1:t<0?0:t}),a.F.addGetterSetter(Node.N,"threshold",.5,(0,l.Kg)(),a.F.afterSetFilter);let tv=n.S.Util._assign(n.S,{Arc:h,Arrow:_,Circle:w,Ellipse:S,Image:Image,Label:E,Tag:R,Line:u,Path:x,Rect:D,RegularPolygon:G,Ring:I,Sprite:O,Star:N,Text:Text,TextPath:Q,Transformer:th,Wedge:td,Filters:{Blur:function(t){let e=Math.round(this.blurRadius());e>0&&function(t,e){let i,r,n,a,s,o,l,h,d,c,u,g,f,p,m,b,y,v,x,_;let w=t.data,S=t.width,C=t.height,k=e+e+1,P=S-1,A=C-1,T=e+1,F=T*(T+1)/2,M=new tc,E=tu[e],R=tg[e],D=null,G=M,L=null,I=null;for(let t=1;t<k;t++)G=G.next=new tc,t===T&&(D=G);G.next=M,n=r=0;for(let t=0;t<C;t++){g=f=p=m=a=s=o=l=0,h=T*(b=w[r]),d=T*(y=w[r+1]),c=T*(v=w[r+2]),u=T*(x=w[r+3]),a+=F*b,s+=F*y,o+=F*v,l+=F*x,G=M;for(let t=0;t<T;t++)G.r=b,G.g=y,G.b=v,G.a=x,G=G.next;for(let t=1;t<T;t++)i=r+((P<t?P:t)<<2),a+=(G.r=b=w[i])*(_=T-t),s+=(G.g=y=w[i+1])*_,o+=(G.b=v=w[i+2])*_,l+=(G.a=x=w[i+3])*_,g+=b,f+=y,p+=v,m+=x,G=G.next;L=M,I=D;for(let t=0;t<S;t++)w[r+3]=x=l*E>>R,0!==x?(x=255/x,w[r]=(a*E>>R)*x,w[r+1]=(s*E>>R)*x,w[r+2]=(o*E>>R)*x):w[r]=w[r+1]=w[r+2]=0,a-=h,s-=d,o-=c,l-=u,h-=L.r,d-=L.g,c-=L.b,u-=L.a,i=n+((i=t+e+1)<P?i:P)<<2,g+=L.r=w[i],f+=L.g=w[i+1],p+=L.b=w[i+2],m+=L.a=w[i+3],a+=g,s+=f,o+=p,l+=m,L=L.next,h+=b=I.r,d+=y=I.g,c+=v=I.b,u+=x=I.a,g-=b,f-=y,p-=v,m-=x,I=I.next,r+=4;n+=S}for(let t=0;t<S;t++){f=p=m=g=s=o=l=a=0,h=T*(b=w[r=t<<2]),d=T*(y=w[r+1]),c=T*(v=w[r+2]),u=T*(x=w[r+3]),a+=F*b,s+=F*y,o+=F*v,l+=F*x,G=M;for(let t=0;t<T;t++)G.r=b,G.g=y,G.b=v,G.a=x,G=G.next;let n=S;for(let i=1;i<=e;i++)r=n+t<<2,a+=(G.r=b=w[r])*(_=T-i),s+=(G.g=y=w[r+1])*_,o+=(G.b=v=w[r+2])*_,l+=(G.a=x=w[r+3])*_,g+=b,f+=y,p+=v,m+=x,G=G.next,i<A&&(n+=S);r=t,L=M,I=D;for(let e=0;e<C;e++)w[(i=r<<2)+3]=x=l*E>>R,x>
140?(x=255/x,w[i]=(a*E>>R)*x,w[i+1]=(s*E>>R)*x,w[i+2]=(o*E>>R)*x):w[i]=w[i+1]=w[i+2]=0,a-=h,s-=d,o-=c,l-=u,h-=L.r,d-=L.g,c-=L.b,u-=L.a,i=t+((i=e+T)<A?i:A)*S<<2,a+=g+=L.r=w[i],s+=f+=L.g=w[i+1],o+=p+=L.b=w[i+2],l+=m+=L.a=w[i+3],L=L.next,h+=b=I.r,d+=y=I.g,c+=v=I.b,u+=x=I.a,g-=b,f-=y,p-=v,m-=x,I=I.next,r+=S}}(t,e)},Brightness:function(t){let e=this.brightness(),i=t.data,r=i.length;for(let t=0;t<r;t+=4)i[t]=Math.min(255,i[t]*e),i[t+1]=Math.min(255,i[t+1]*e),i[t+2]=Math.min(255,i[t+2]*e)},Brighten:function(t){let e=255*this.brightness(),i=t.data,r=i.length;for(let t=0;t<r;t+=4)i[t]+=e,i[t+1]+=e,i[t+2]+=e},Contrast:function(t){let e=Math.pow((this.contrast()+100)/100,2),i=t.data,r=i.length,n=150,a=150,s=150;for(let t=0;t<r;t+=4)n=i[t],a=i[t+1],s=i[t+2],n/=255,n-=.5,n*=e,n+=.5,n*=255,a/=255,a-=.5,a*=e,a+=.5,a*=255,s/=255,s-=.5,s*=e,s+=.5,s*=255,n=n<0?0:n>255?255:n,a=a<0?0:a>255?255:a,s=s<0?0:s>255?255:s,i[t]=n,i[t+1]=a,i[t+2]=s},Emboss:function(t){var e,i,r,n,a,s,o,l,h;let d=t.data,c=t.width,u=t.height,g=Math.min(1,Math.max(0,null!==(i=null===(e=this.embossStrength)||void 0===e?void 0:e.call(this))&&void 0!==i?i:.5)),f=Math.min(1,Math.max(0,null!==(n=null===(r=this.embossWhiteLevel)||void 0===r?void 0:r.call(this))&&void 0!==n?n:.5)),p=null!==(o=({"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0})[null!==(s=null===(a=this.embossDirection)||void 0===a?void 0:a.call(this))&&void 0!==s?s:"top-left"])&&void 0!==o?o:315,m=!!(null!==(h=null===(l=this.embossBlend)||void 0===l?void 0:l.call(this))&&void 0!==h&&h),b=255*f,y=p*Math.PI/180,v=Math.cos(y),x=Math.sin(y),_=128/1020*(10*g),w=new Uint8ClampedArray(d),S=new Float32Array(c*u);for(let t=0,e=0;e<d.length;e+=4,t++)S[t]=.2126*w[e]+.7152*w[e+1]+.0722*w[e+2];let C=[-c-1,-c,-c+1,-1,0,1,c-1,c,c+1],k=t=>t<0?0:t>255?255:t;
14for(let t=1;t<u-1;t++)for(let e=1;e<c-1;e++){let i=t*c+e,r,n=0;r=0+-1*S[i+C[0]],n+=-1*S[i+C[0]],r+=0*S[i+C[1]],n+=-2*S[i+C[1]],r+=1*S[i+C[2]],n+=-1*S[i+C[2]],r+=-2*S[i+C[3]],n+=0*S[i+C[3]],r+=2*S[i+C[5]],n+=0*S[i+C[5]],r+=-1*S[i+C[6]],n+=1*S[i+C[6]],r+=0*S[i+C[7]],n+=2*S[i+C[7]],r+=1*S[i+C[8]],n+=1*S[i+C[8]];let a=v*r+x*n,s=k(b+a*_),o=4*i;if(m){let t=s-b;d[o]=k(w[o]+t),d[o+1]=k(w[o+1]+t),d[o+2]=k(w[o+2]+t),d[o+3]=w[o+3]}else d[o]=d[o+1]=d[o+2]=s,d[o+3]=w[o+3]}for(let t=0;t<c;t++){let e=4*t,i=((u-1)*c+t)*4;d[e]=w[e],d[e+1]=w[e+1],d[e+2]=w[e+2],d[e+3]=w[e+3],d[i]=w[i],d[i+1]=w[i+1],d[i+2]=w[i+2],d[i+3]=w[i+3]}for(let t=1;t<u-1;t++){let e=t*c*4,i=(t*c+(c-1))*4;d[e]=w[e],d[e+1]=w[e+1],d[e+2]=w[e+2],d[e+3]=w[e+3],d[i]=w[i],d[i+1]=w[i+1],d[i+2]=w[i+2],d[i+3]=w[i+3]}return t},Enhance:function(t){let e,i,r,n,a,s;let o=t.data,l=o.length,h=o[0],d=h,c,u=o[1],g=u,f,p=o[2],m=p,b,y=this.enhance();if(0!==y){for(let t=0;t<l;t+=4)(c=o[t+0])<h?h=c:c>d&&(d=c),(f=o[t+1])<u?u=f:f>g&&(g=f),(b=o[t+2])<p?p=b:b>m&&(m=b);if(d===h&&(d=255,h=0),g===u&&(g=255,u=0),m===p&&(m=255,p=0),y>0)e=d+y*(255-d),i=h-y*(h-0),r=g+y*(255-g),n=u-y*(u-0),a=m+y*(255-m),s=p-y*(p-0);else{let t=(d+h)*.5;e=d+y*(d-t),i=h+y*(h-t);let o=(g+u)*.5;r=g+y*(g-o),n=u+y*(u-o);let l=(m+p)*.5;a=m+y*(m-l),s=p+y*(p-l)}for(let t=0;t<l;t+=4)o[t+0]=tf(o[t+0],h,d,i,e),o[t+1]=tf(o[t+1],u,g,n,r),o[t+2]=tf(o[t+2],p,m,s,a)}},Grayscale:function(t){let e=t.data,i=e.length;for(let t=0;t<i;t+=4){let i=.34*e[t]+.5*e[t+1]+.16*e[t+2];e[t]=i,e[t+1]=i,e[t+2]=i}},HSL:function(t){let e,i,r,n;let a=t.data,s=a.length,o=Math.pow(2,this.saturation()),l=Math.abs(this.hue()+360)%360,h=127*this.luminance(),d=1*o*Math.cos(l*Math.PI/180),c=1*o*Math.sin(l*Math.PI/180),u=.299+.701*d+.167*c,g=.587-.587*d+.33*c,f=.114-.114*d-.497*c,p=.299-.299*d-.328*c,m=.587+.413*d+.035*c,b=.114-.114*d+.293*c,y=.299-.3*d+1.25*c,v=.587-.586*d-1.05*c,x=.114+.886*d-.2*c;for(let t=0;t<s;t+=4)e=a[t+0],i=a[t+1],r=a[t+2],n=a[t+3],a[t+0]=u*e+g*i+f*r+h,a[t+1]=p*e+m*i+b*r+h,a[t+2]=y*e+v*i+x*r+h,a[t+3]=n},HSV:function(t){let e=t.data,i=e.length,r=Math.pow(2,this.value()),n=Math.pow(2,this.saturation()),a=Math.abs(this.hue()+360)%360,s=r*n*Math.cos(a*Math.PI/180),o=r*n*Math.sin(a*Math.PI/180),l=.299*r+.701*s+.167*o,h=.587*r-.587*s+.33*o,d=.114*r-.114*s-.497*o,c=.299*r-.299*s-.328*o,u=.587*r+.413*s+.035*o,g=.114*r-.114*s+.293*o,f=.299*r-.3*s+1.25*o,p=.587*r-.586*s-1.05*o,m=.114*r+.886*s-.2*o;for(let t=0;t<i;t+=4){let i=e[t+0],r=e[t+1],n=e[t+2],a=e[t+3];e[t+0]=l*i+h*r+d*n,e[t+1]=c*i+u*r+g*n,e[t+2]=f*i+p*r+m*n,e[t+3]=a}},Invert:function(t){let e=t.data,i=e.length;for(let t=0;t<i;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]},Kaleidoscope:function(t){let e,i,r,n,a,s,o,l,h,d;let c=t.width,u=t.height,g=Math.round(this.kaleidoscopePower()),f=Math.round(this.kaleidoscopeAngle()),p=Math.floor(c*(f%360)/360);if(g<1)return;let m=C.Z.createCanvasElement();m.width=c,m.height=u;let b=m.getContext("2d").getImageData(0,0,c,u);C.Z.releaseCanvas(m),tp(t,b,{polarCenterX:c/2,polarCenterY:u/2});let y=c/Math.pow(2,g);for(;y<=8;)y*=2,g-=1;let v=y=Math.ceil(y),x=0,_=v,w=1;for(p+y>c&&(x=v,_=0,w=-1),i=0;i<u;i+=1)for(e=x;e!==_;e+=w)r=Math.round(e+p)%c,h=(c*i+r)*4,a=b.data[h+0],s=b.data[h+1],o=b.data[h+2],l=b.data[h+3],d=(c*i+e)*4,b.data[d+0]=a,b.data[d+1]=s,b.data[d+2]=o,b.data[d+3]=l;for(i=0;i<u;i+=1)for(n=0,v=Math.floor(y);n<g;n+=1){for(e=0;e<v+1;e+=1)h=(c*i+e)*4,a=b.data[h+0],s=b.data[h+1],o=b.data[h+2],l=b.data[h+3],d=(c*i+2*v-e-1)*4,b.data[d+0]=a,b.data[d+1]=s,b.data[d+2]=o,b.data[d+3]=l;v*=2}tm(b,t,{polarRotation:0})},Mask:function(t){let e=this.threshold(),i=function(t,e){let i=tb(t,0,0),r=tb(t,t.width-1,0),n=tb(t,0,t.height-1),a=tb(t,t.width-1,t.height-1),s=e||10;if(ty(i,r)<s&&ty(r,a)<s&&ty(a,n)<s&&ty(n,i)<s){let e=function(t){let e=[0,0,0];for(let i=0;i<t.length;i++)e[0]+=t[i][0],e[1]+=t[i][1],e[2]+=t[i][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}([r,i,a,n]),o=[];for(let i=0;i<t.width*t.height;i++){let r=ty(e,[t.data[4*i],t.data[4*i+1],t.data[4*i+2]]);o[i]=r<s?0:255}return o}}(t,e);return i&&(i=function(t,e,i){let r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],n=Math.round(Math.sqrt(r.length)),a=Math.floor(n/2),s=[];for(let o=0;o<i;o++)for(let l=0;l<e;l++){let h=o*e+l,d=0;for(let s=0;s<n;s++)for(let h=0;h<n;h++){let c=o+s-a,u=l+h-a;if(c>=0&&c<i&&u>=0&&u<e){let i=c*e+u,a=r[s*n+h];d+=t[i]*a}}s[h]=d}return s}
14(i=function(t,e,i){let r=[1,1,1,1,1,1,1,1,1],n=Math.round(Math.sqrt(r.length)),a=Math.floor(n/2),s=[];for(let o=0;o<i;o++)for(let l=0;l<e;l++){let h=o*e+l,d=0;for(let s=0;s<n;s++)for(let h=0;h<n;h++){let c=o+s-a,u=l+h-a;if(c>=0&&c<i&&u>=0&&u<e){let i=c*e+u,a=r[s*n+h];d+=t[i]*a}}s[h]=d>=1020?255:0}return s}(i=function(t,e,i){let r=[1,1,1,1,0,1,1,1,1],n=Math.round(Math.sqrt(r.length)),a=Math.floor(n/2),s=[];for(let o=0;o<i;o++)for(let l=0;l<e;l++){let h=o*e+l,d=0;for(let s=0;s<n;s++)for(let h=0;h<n;h++){let c=o+s-a,u=l+h-a;if(c>=0&&c<i&&u>=0&&u<e){let i=c*e+u,a=r[s*n+h];d+=t[i]*a}}s[h]=2040===d?255:0}return s}(i,t.width,t.height),t.width,t.height),t.width,t.height),function(t,e){for(let i=0;i<t.width*t.height;i++)t.data[4*i+3]=e[i]}(t,i)),t},Noise:function(t){let e=255*this.noise(),i=t.data,r=i.length,n=e/2;for(let t=0;t<r;t+=4)i[t+0]+=n-2*n*Math.random(),i[t+1]+=n-2*n*Math.random(),i[t+2]+=n-2*n*Math.random()},Pixelate:function(t){let e=Math.ceil(this.pixelSize()),i=t.width,r=t.height,n=Math.ceil(i/e),a=Math.ceil(r/e),s=t.data;if(e<=0){C.Z.error("pixelSize value can not be <= 0");return}for(let t=0;t<n;t+=1)for(let n=0;n<a;n+=1){let a=0,o=0,l=0,h=0,d=t*e,c=d+e,u=n*e,g=u+e,f=0;for(let t=d;t<c;t+=1)if(!(t>=i))for(let e=u;e<g;e+=1){if(e>=r)continue;let n=(i*e+t)*4;a+=s[n+0],o+=s[n+1],l+=s[n+2],h+=s[n+3],f+=1}a/=f,o/=f,l/=f,h/=f;for(let t=d;t<c;t+=1)if(!(t>=i))for(let e=u;e<g;e+=1){if(e>=r)continue;let n=(i*e+t)*4;s[n+0]=a,s[n+1]=o,s[n+2]=l,s[n+3]=h}}},Posterize:function(t){let e=Math.round(254*this.levels())+1,i=t.data,r=i.length,n=255/e;for(let t=0;t<r;t+=1)i[t]=Math.floor(i[t]/n)*n},RGB:function(t){let e=t.data,i=e.length,r=this.red(),n=this.green(),a=this.blue();for(let t=0;t<i;t+=4){let i=(.34*e[t]+.5*e[t+1]+.16*e[t+2])/255;e[t]=i*r,e[t+1]=i*n,e[t+2]=i*a,e[t+3]=e[t+3]}},RGBA:function(t){let e=t.data,i=e.length,r=this.red(),n=this.green(),a=this.blue(),s=this.alpha();for(let t=0;t<i;t+=4){let i=1-s;e[t]=r*s+e[t]*i,e[t+1]=n*s+e[t+1]*i,e[t+2]=a*s+e[t+2]*i}},Sepia:function(t){let e=t.data,i=e.length;for(let t=0;t<i;t+=4){let i=e[t+0],r=e[t+1],n=e[t+2];e[t+0]=Math.min(255,.393*i+.769*r+.189*n),e[t+1]=Math.min(255,.349*i+.686*r+.168*n),e[t+2]=Math.min(255,.272*i+.534*r+.131*n)}},Solarize:function(t){let e=t.data;for(let t=0;t<e.length;t+=4){let i=e[t],r=e[t+1],n=e[t+2],a=.2126*i+.7152*r+.0722*n;a>=128&&(e[t]=255-i,e[t+1]=255-r,e[t+2]=255-n)}return t},Threshold:function(t){let e=255*this.threshold(),i=t.data,r=i.length;for(let t=0;t<r;t+=1)i[t]=i[t]<e?0:255}}});var tx=tv},64712:function(t,e,i){i.d(e,{Am:function(){return y},x7:function(){return S}});var r=i(67294),n=i(73935);let a=t=>{switch(t){case"success":return l;case"info":return d;case"warning":return h;case"error":return c;default:return null}},s=Array(12).fill(0),o=({visible:t,className:e})=>r.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},r.createElement("div",{className:"sonner-spinner"},s.map((t,e)=>r.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${e}`})))),l=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),h=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),d=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),c=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},r.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),u=r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},r.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),g=()=>{let[t,e]=r.useState(document.hidden);return r.useEffect(()=>{let t=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",t),()=>window.removeEventListener("visibilitychange",t)},[]),t},f=1;class p{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>
14{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:i,...r}=t,n="number"==typeof(null==t?void 0:t.id)||(null==(e=t.id)?void 0:e.length)>0?t.id:f++,a=this.toasts.find(t=>t.id===n),s=void 0===t.dismissible||t.dismissible;return this.dismissedToasts.has(n)&&this.dismissedToasts.delete(n),a?this.toasts=this.toasts.map(e=>e.id===n?(this.publish({...e,...t,id:n,title:i}),{...e,...t,id:n,dismissible:s,title:i}):e):this.addToast({title:i,...r,dismissible:s,id:n}),n},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(e=>e({id:t,dismiss:!0})))):this.toasts.forEach(t=>{this.subscribers.forEach(e=>e({id:t.id,dismiss:!0}))}),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{let i,n;if(!e)return;void 0!==e.loading&&(n=this.create({...e,promise:t,type:"loading",message:e.loading,description:"function"!=typeof e.description?e.description:void 0}));
14let a=Promise.resolve(t instanceof Function?t():t),s=void 0!==n,o=a.then(async t=>{i=["resolve",t];let a=r.isValidElement(t);if(a)s=!1,this.create({id:n,type:"default",message:t});else if(b(t)&&!t.ok){s=!1;let i="function"==typeof e.error?await e.error(`HTTP error! status: ${t.status}`):e.error,a="function"==typeof e.description?await e.description(`HTTP error! status: ${t.status}`):e.description,o="object"==typeof i&&!r.isValidElement(i),l=o?i:{message:i};this.create({id:n,type:"error",description:a,...l})}else if(t instanceof Error){s=!1;let i="function"==typeof e.error?await e.error(t):e.error,a="function"==typeof e.description?await e.description(t):e.description,o="object"==typeof i&&!r.isValidElement(i),l=o?i:{message:i};this.create({id:n,type:"error",description:a,...l})}else if(void 0!==e.success){s=!1;let i="function"==typeof e.success?await e.success(t):e.success,a="function"==typeof e.description?await e.description(t):e.description,o="object"==typeof i&&!r.isValidElement(i),l=o?i:{message:i};this.create({id:n,type:"success",description:a,...l})}}).catch(async t=>{if(i=["reject",t],void 0!==e.error){s=!1;let i="function"==typeof e.error?await e.error(t):e.error,a="function"==typeof e.description?await e.description(t):e.description,o="object"==typeof i&&!r.isValidElement(i),l=o?i:{message:i};this.create({id:n,type:"error",description:a,...l})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),null==e.finally||e.finally.call(e)}),l=()=>new Promise((t,e)=>o.then(()=>"reject"===i[0]?e(i[1]):t(i[1])).catch(e));return"string"!=typeof n&&"number"!=typeof n?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(t,e)=>{let i=(null==e?void 0:e.id)||f++;return this.create({jsx:t(i),id:i,...e}),i},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}let m=new p,b=t=>t&&"object"==typeof t&&"ok"in t&&"boolean"==typeof t.ok&&"status"in t&&"number"==typeof t.status,y=Object.assign((t,e)=>{let i=(null==e?void 0:e.id)||f++;return m.addToast({title:t,...e,id:i}),i},{success:m.success,info:m.info,warning:m.warning,error:m.error,custom:m.custom,message:m.message,promise:m.promise,dismiss:m.dismiss,loading:m.loading},{getHistory:()=>m.toasts,getToasts:()=>m.getActiveToasts()});function v(t){return void 0!==t.label}function x(...t){return t.filter(Boolean).join(" ")}!function(t){if(!t||"undefined"==typeof document)return;let e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",e.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
14left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}
14[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);
14--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let _=t=>{var e,i,n,s,l,h,d,c,f,p,m,b,y;let{invert:_,toast:w,unstyled:S,interacting:C,setHeights:k,visibleToasts:P,heights:A,index:T,toasts:F,expanded:M,removeToast:E,defaultRichColors:R,closeButton:D,style:G,cancelButtonStyle:L,actionButtonStyle:I,className:O="",descriptionClassName:N="",duration:B,position:z,gap:Z,expandByDefault:j,classNames:H,icons:W,closeButtonAriaLabel:K="Close toast"}=t,[Y,X]=r.useState(null),[q,U]=r.useState(null),[V,$]=r.useState(!1),[J,Q]=r.useState(!1),[tt,te]=r.useState(!1),[ti,tr]=r.useState(!1),[tn,ta]=r.useState(!1),[ts,to]=r.useState(0),[tl,th]=r.useState(0),td=r.useRef(w.duration||B||4e3),tc=r.useRef(null),tu=r.useRef(null),tg=0===T,tf
14=T+1<=P,tp=w.type,tm=!1!==w.dismissible,tb=w.className||"",ty=w.descriptionClassName||"",tv=r.useMemo(()=>A.findIndex(t=>t.toastId===w.id)||0,[A,w.id]),tx=r.useMemo(()=>{var t;return null!=(t=w.closeButton)?t:D},[w.closeButton,D]),t_=r.useMemo(()=>w.duration||B||4e3,[w.duration,B]),tw=r.useRef(0),tS=r.useRef(0),tC=r.useRef(0),tk=r.useRef(null),[tP,tA]=z.split("-"),tT=r.useMemo(()=>A.reduce((t,e,i)=>i>=tv?t:t+e.height,0),[A,tv]),tF=g(),tM=w.invert||_,tE="loading"===tp;tS.current=r.useMemo(()=>tv*Z+tT,[tv,tT]),r.useEffect(()=>{td.current=t_},[t_]),r.useEffect(()=>{$(!0)},[]),r.useEffect(()=>{let t=tu.current;if(t){let e=t.getBoundingClientRect().height;return th(e),k(t=>[{toastId:w.id,height:e,position:w.position},...t]),()=>k(t=>t.filter(t=>t.toastId!==w.id))}},[k,w.id]),r.useLayoutEffect(()=>{if(!V)return;let t=tu.current,e=t.style.height;t.style.height="auto";let i=t.getBoundingClientRect().height;t.style.height=e,th(i),k(t=>{let e=t.find(t=>t.toastId===w.id);return e?t.map(t=>t.toastId===w.id?{...t,height:i}:t):[{toastId:w.id,height:i,position:w.position},...t]})},[V,w.title,w.description,k,w.id,w.jsx,w.action,w.cancel]);let tR=r.useCallback(()=>{Q(!0),to(tS.current),k(t=>t.filter(t=>t.toastId!==w.id)),setTimeout(()=>{E(w)},200)},[w,E,k,tS]);r.useEffect(()=>{let t;if((!w.promise||"loading"!==tp)&&w.duration!==1/0&&"loading"!==w.type)return M||C||tF?(()=>{if(tC.current<tw.current){let t=new Date().getTime()-tw.current;td.current=td.current-t}tC.current=new Date().getTime()})():td.current!==1/0&&(tw.current=new Date().getTime(),t=setTimeout(()=>{null==w.onAutoClose||w.onAutoClose.call(w,w),tR()},td.current)),()=>clearTimeout(t)},[M,C,w,tp,tF,tR]),r.useEffect(()=>{w.delete&&(tR(),null==w.onDismiss||w.onDismiss.call(w,w))},[tR,w.delete]);let tD=w.icon||(null==W?void 0:W[tp])||a(tp);return r.createElement("li",{tabIndex:0,ref:tu,className:x(O,tb,null==H?void 0:H.toast,null==w?void 0:null==(e=w.classNames)?void 0:e.toast,null==H?void 0:H.default,null==H?void 0:H[tp],null==w?void 0:null==(i=w.classNames)?void 0:i[tp]),"data-sonner-toast":"","data-rich-colors":null!=(p=w.richColors)?p:R,"data-styled":!(w.jsx||w.unstyled||S),"data-mounted":V,"data-promise":!!w.promise,"data-swiped":tn,"data-removed":J,"data-visible":tf,"data-y-position":tP,"data-x-position":tA,"data-index":T,"data-front":tg,"data-swiping":tt,"data-dismissible":tm,"data-type":tp,"data-invert":tM,"data-swipe-out":ti,"data-swipe-direction":q,"data-expanded":!!(M||j&&V),"data-testid":w.testId,style:{"--index":T,"--toasts-before":T,"--z-index":F.length-T,"--offset":`${J?ts:tS.current}px`,"--initial-height":j?"auto":`${tl}px`,...G,...w.style},onDragEnd:()=>{te(!1),X(null),tk.current=null},onPointerDown:t=>{2!==t.button&&!tE&&tm&&(tc.current=new Date,to(tS.current),t.target.setPointerCapture(t.pointerId),"BUTTON"!==t.target.tagName&&(te(!0),tk.current={x:t.clientX,y:t.clientY}))},onPointerUp:()=>{var t,e,i,r,n;if(ti||!tm)return;tk.current=null;let a=Number((null==(t=tu.current)?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),s=Number((null==(e=tu.current)?void 0:e.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),o=new Date().getTime()-(null==(i=tc.current)?void 0:i.getTime()),l="x"===Y?a:s;if(Math.abs(l)>=45||Math.abs(l)/o>.11){to(tS.current),null==w.onDismiss||w.onDismiss.call(w,w),"x"===Y?U(a>0?"right":"left"):U(s>0?"down":"up"),tR(),tr(!0);return}null==(r=tu.current)||r.style.setProperty("--swipe-amount-x","0px"),null==(n=tu.current)||n.style.setProperty("--swipe-amount-y","0px"),ta(!1),te(!1),X(null)},onPointerMove:e=>{var i,r,n,a;if(!tk.current||!tm)return;let s=(null==(i=window.getSelection())?void 0:i.toString().length)>0;if(s)return;let o=e.clientY-tk.current.y,l=e.clientX-tk.current.x,h=null!=(a=t.swipeDirections)?a:function(t){let[e,i]=t.split("-"),r=[];return e&&r.push(e),i&&r.push(i),r}(z);!Y&&(Math.abs(l)>1||Math.abs(o)>1)&&X(Math.abs(l)>Math.abs(o)?"x":"y");let d={x:0,y:0},c=t=>1/(1.5+Math.abs(t)/20);if("y"===Y){if(h.includes("top")||h.includes("bottom")){if(h.includes("top")&&o<0||h.includes("bottom")&&o>0)d.y=o;else{let t=o*c(o);d.y=Math.abs(t)<Math.abs(o)?t:o}}}else if("x"===Y&&(h.includes("left")||h.includes("right"))){if(h.includes("left")&&l<0||h.includes("right")&&l>0)d.x=l;else{let t=l*c(l);d.x=Math.abs(t)<Math.abs(l)?t:l}}(Math.abs(d.x)>0||Math.abs(d.y)>0)&&ta(!0),null==(r=tu.current)||r.style.setProperty("--swipe-amount-x",`${d.x}px`),null==(n=tu.current)||n.style.setProperty("--swipe-amount-y",`${d.y}px`)}},tx&&!w.jsx&&"loading"!==tp?r.createElement("button",{"aria-label":K,"data-disabled":tE,"data-close-button":!0,onClick:tE||!tm?()=>{}:()=>{tR(),null==w.onDismiss||w.onDismiss.call(w,w)},className:x(null==H?void 0:H.closeButton,null==w?void 0:null==(n=w.classNames)?void 0:n.closeButton)},null!=(m=null==W?void 0:W.close)?m:u):null,(tp||w.icon||w.promise)&&null!==w.icon&&((null==W?void 0:W[tp])!==null||w.icon)?r.createElement("div",{"data-icon":"",className:x(null==H?void 0:H.icon,null==w?void 0:null==(s=w.classNames)?void 0:s.icon)},w.promise||"loading"===w.type&&!w.icon?w.icon||((null==W?void 0:W.loading)?r.createElement("div",{className:x(null==H?void 0:H.loader,null==w?void 0:null==(y=w.classNames)?void 0:y.loader,"sonner-loader"),"data-visible":"loading"===tp},W.loading):r.createElement(o,{className:x(null==H?void 0:H.loader,null==w?void 0:null==(b=w.classNames)?void 0:b.loader),visible:"loading"===tp}
14)):null,"loading"!==w.type?tD:null):null,r.createElement("div",{"data-content":"",className:x(null==H?void 0:H.content,null==w?void 0:null==(l=w.classNames)?void 0:l.content)},r.createElement("div",{"data-title":"",className:x(null==H?void 0:H.title,null==w?void 0:null==(h=w.classNames)?void 0:h.title)},w.jsx?w.jsx:"function"==typeof w.title?w.title():w.title),w.description?r.createElement("div",{"data-description":"",className:x(N,ty,null==H?void 0:H.description,null==w?void 0:null==(d=w.classNames)?void 0:d.description)},"function"==typeof w.description?w.description():w.description):null),r.isValidElement(w.cancel)?w.cancel:w.cancel&&v(w.cancel)?r.createElement("button",{"data-button":!0,"data-cancel":!0,style:w.cancelButtonStyle||L,onClick:t=>{v(w.cancel)&&tm&&(null==w.cancel.onClick||w.cancel.onClick.call(w.cancel,t),tR())},className:x(null==H?void 0:H.cancelButton,null==w?void 0:null==(c=w.classNames)?void 0:c.cancelButton)},w.cancel.label):null,r.isValidElement(w.action)?w.action:w.action&&v(w.action)?r.createElement("button",{"data-button":!0,"data-action":!0,style:w.actionButtonStyle||I,onClick:t=>{v(w.action)&&(null==w.action.onClick||w.action.onClick.call(w.action,t),t.defaultPrevented||tR())},className:x(null==H?void 0:H.actionButton,null==w?void 0:null==(f=w.classNames)?void 0:f.actionButton)},w.action.label):null)};function w(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";let t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?t:window.getComputedStyle(document.documentElement).direction}let S=r.forwardRef(function(t,e){let{id:i,invert:a,position:s="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:h,className:d,offset:c,mobileOffset:u,theme:g="light",richColors:f,duration:p,style:b,visibleToasts:y=3,toastOptions:v,dir:x=w(),gap:S=14,icons:C,containerAriaLabel:k="Notifications"}=t,[P,A]=r.useState([]),T=r.useMemo(()=>i?P.filter(t=>t.toasterId===i):P.filter(t=>!t.toasterId),[P,i]),F=r.useMemo(()=>Array.from(new Set([s].concat(T.filter(t=>t.position).map(t=>t.position)))),[T,s]),[M,E]=r.useState([]),[R,D]=r.useState(!1),[G,L]=r.useState(!1),[I,O]=r.useState("system"!==g?g:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=r.useRef(null),B=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=r.useRef(null),Z=r.useRef(!1),j=r.useCallback(t=>{A(e=>{var i;return(null==(i=e.find(e=>e.id===t.id))?void 0:i.delete)||m.dismiss(t.id),e.filter(({id:e})=>e!==t.id)})},[]);return r.useEffect(()=>m.subscribe(t=>{if(t.dismiss){requestAnimationFrame(()=>{A(e=>e.map(e=>e.id===t.id?{...e,delete:!0}:e))});return}setTimeout(()=>{n.flushSync(()=>{A(e=>{let i=e.findIndex(e=>e.id===t.id);return -1!==i?[...e.slice(0,i),{...e[i],...t},...e.slice(i+1)]:[t,...e]})})})}),[P]),r.useEffect(()=>{if("system"!==g){O(g);return}if("system"===g&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),"undefined"==typeof window)return;let t=window.matchMedia("(prefers-color-scheme: dark)");try{t.addEventListener("change",({matches:t})=>{t?O("dark"):O("light")})}catch(e){t.addListener(({matches:t})=>{try{t?O("dark"):O("light")}catch(t){console.error(t)}})}},[g]),r.useEffect(()=>{P.length<=1&&D(!1)},[P]),r.useEffect(()=>{let t=t=>{var e,i;let r=o.every(e=>t[e]||t.code===e);r&&(D(!0),null==(i=N.current)||i.focus()),"Escape"===t.code&&(document.activeElement===N.current||(null==(e=N.current)?void 0:e.contains(document.activeElement)))&&D(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[o]),r.useEffect(()=>{if(N.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,Z.current=!1)}},[N.current]),r.createElement("section",{ref:e,"aria-label":`${k} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},F.map((e,i)=>{var n;let[s,o]=e.split("-");return T.length?r.createElement("ol",{key:e,dir:"auto"===x?w():x,tabIndex:-1,ref:N,className:d,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":s,"data-x-position":o,style:{"--front-toast-height":`${(null==(n=M[0])?void 0:n.height)||0}px`,"--width":"356px","--gap":`${S}px`,...b,...function(t,e){let i={};return[t,e].forEach((t,e)=>{let r=1===e,n=r?"--mobile-offset":"--offset",a=r?"16px":"24px";
14function s(t){["top","right","bottom","left"].forEach(e=>{i[`${n}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?s(t):"object"==typeof t?["top","right","bottom","left"].forEach(e=>{void 0===t[e]?i[`${n}-${e}`]=a:i[`${n}-${e}`]="number"==typeof t[e]?`${t[e]}px`:t[e]}):s(a)}),i}(c,u)},onBlur:t=>{Z.current&&!t.currentTarget.contains(t.relatedTarget)&&(Z.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:t=>{let e=t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible;e||Z.current||(Z.current=!0,z.current=t.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{G||D(!1)},onDragEnd:()=>D(!1),onPointerDown:t=>{let e=t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissible;e||L(!0)},onPointerUp:()=>L(!1)},T.filter(t=>!t.position&&0===i||t.position===e).map((i,n)=>{var s,o;return r.createElement(_,{key:i.id,icons:C,index:n,toast:i,defaultRichColors:f,duration:null!=(s=null==v?void 0:v.duration)?s:p,className:null==v?void 0:v.className,descriptionClassName:null==v?void 0:v.descriptionClassName,invert:a,visibleToasts:y,closeButton:null!=(o=null==v?void 0:v.closeButton)?o:h,interacting:G,position:e,style:null==v?void 0:v.style,unstyled:null==v?void 0:v.unstyled,classNames:null==v?void 0:v.classNames,cancelButtonStyle:null==v?void 0:v.cancelButtonStyle,actionButtonStyle:null==v?void 0:v.actionButtonStyle,closeButtonAriaLabel:null==v?void 0:v.closeButtonAriaLabel,removeToast:j,toasts:T.filter(t=>t.position==i.position),heights:M.filter(t=>t.position==i.position),setHeights:E,expandByDefault:l,gap:S,expanded:R,swipeDirections:t.swipeDirections})})):null}))})},98388:function(t,e,i){i.d(e,{m6:function(){return tv}});let r=(t,e)=>{let i=Array(t.length+e.length);for(let e=0;e<t.length;e++)i[e]=t[e];for(let r=0;r<e.length;r++)i[t.length+r]=e[r];return i},n=(t,e)=>({classGroupId:t,validator:e}),a=(t=new Map,e=null,i)=>({nextPart:t,validators:e,classGroupId:i}),s=[],o=t=>{let e=d(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:t=>{if(t.startsWith("[")&&t.endsWith("]"))return h(t);let i=t.split("-"),r=""===i[0]&&i.length>1?1:0;return l(i,r,e)},getConflictingClassGroupIds:(t,e)=>{if(e){let e=n[t],a=i[t];return e?a?r(a,e):e:a||s}return i[t]||s}}},l=(t,e,i)=>{let r=t.length-e;if(0===r)return i.classGroupId;let n=t[e],a=i.nextPart.get(n);if(a){let i=l(t,e+1,a);if(i)return i}let s=i.validators;if(null===s)return;let o=0===e?t.join("-"):t.slice(e).join("-"),h=s.length;for(let t=0;t<h;t++){let e=s[t];if(e.validator(o))return e.classGroupId}},h=t=>-1===t.slice(1,-1).indexOf(":")?void 0:(()=>{let e=t.slice(1,-1),i=e.indexOf(":"),r=e.slice(0,i);return r?"arbitrary.."+r:void 0})(),d=t=>{let{theme:e,classGroups:i}=t;return c(i,e)},c=(t,e)=>{let i=a();for(let r in t){let n=t[r];u(n,i,r,e)}return i},u=(t,e,i,r)=>{let n=t.length;for(let a=0;a<n;a++){let n=t[a];g(n,e,i,r)}},g=(t,e,i,r)=>{if("string"==typeof t){f(t,e,i);return}if("function"==typeof t){p(t,e,i,r);return}m(t,e,i,r)},f=(t,e,i)=>{let r=""===t?e:b(e,t);r.classGroupId=i},p=(t,e,i,r)=>{if(y(t)){u(t(r),e,i,r);return}null===e.validators&&(e.validators=[]),e.validators.push(n(i,t))},m=(t,e,i,r)=>{let n=Object.entries(t),a=n.length;for(let t=0;t<a;t++){let[a,s]=n[t];u(s,b(e,a),i,r)}},b=(t,e)=>{let i=t,r=e.split("-"),n=r.length;for(let t=0;t<n;t++){let e=r[t],n=i.nextPart.get(e);n||(n=a(),i.nextPart.set(e,n)),i=n}return i},y=t=>"isThemeGetter"in t&&!0===t.isThemeGetter,v=t=>{if(t<1)return{get:()=>void 0,set:()=>{}};let e=0,i=Object.create(null),r=Object.create(null),n=(n,a)=>{i[n]=a,++e>t&&(e=0,r=i,i=Object.create(null))};return{get(t){let e=i[t];return void 0!==e?e:void 0!==(e=r[t])?(n(t,e),e):void 0},set(t,e){t in i?i[t]=e:n(t,e)}}},x=[],_=(t,e,i,r,n)=>({modifiers:t,hasImportantModifier:e,baseClassName:i,maybePostfixModifierPosition:r,isExternal:n}),w=t=>{let{prefix:e,experimentalParseClassName:i}=t,r=t=>{let e;let i=[],r=0,n=0,a=0,s=t.length;for(let o=0;o<s;o++){let s=t[o];if(0===r&&0===n){if(":"===s){i.push(t.slice(a,o)),a=o+1;continue}if("/"===s){e=o;continue}}"["===s?r++:"]"===s?r--:"("===s?n++:")"===s&&n--}let o=0===i.length?t:t.slice(a),l=o,h=!1;o.endsWith("!")?(l=o.slice(0,-1),h=!0):o.startsWith("!")&&(l=o.slice(1),h=!0);let d=e&&e>a?e-a:void 0;return _(i,h,l,d)};if(e){let t=e+":",i=r;r=e=>e.startsWith(t)?i(e.slice(t.length)):_(x,!1,e,void 0,!0)}if(i){let t=r;r=e=>i({className:e,parseClassName:t})}return r},S=t=>{let e=new Map;
14return t.orderSensitiveModifiers.forEach((t,i)=>{e.set(t,1e6+i)}),t=>{let i=[],r=[];for(let n=0;n<t.length;n++){let a=t[n],s="["===a[0],o=e.has(a);s||o?(r.length>0&&(r.sort(),i.push(...r),r=[]),i.push(a)):r.push(a)}return r.length>0&&(r.sort(),i.push(...r)),i}},C=t=>({cache:v(t.cacheSize),parseClassName:w(t),sortModifiers:S(t),...o(t)}),k=/\s+/,P=(t,e)=>{let{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:a}=e,s=[],o=t.trim().split(k),l="";for(let t=o.length-1;t>=0;t-=1){let e=o[t],{isExternal:h,modifiers:d,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:g}=i(e);if(h){l=e+(l.length>0?" "+l:l);continue}let f=!!g,p=r(f?u.substring(0,g):u);if(!p){if(!f||!(p=r(u))){l=e+(l.length>0?" "+l:l);continue}f=!1}let m=0===d.length?"":1===d.length?d[0]:a(d).join(":"),b=c?m+"!":m,y=b+p;if(s.indexOf(y)>-1)continue;s.push(y);let v=n(p,f);for(let t=0;t<v.length;++t){let e=v[t];s.push(b+e)}l=e+(l.length>0?" "+l:l)}return l},A=(...t)=>{let e,i,r=0,n="";for(;r<t.length;)(e=t[r++])&&(i=T(e))&&(n&&(n+=" "),n+=i);return n},T=t=>{let e;if("string"==typeof t)return t;let i="";for(let r=0;r<t.length;r++)t[r]&&(e=T(t[r]))&&(i&&(i+=" "),i+=e);return i},F=[],M=t=>{let e=e=>e[t]||F;return e.isThemeGetter=!0,e},E=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,R=/^\((?:(\w[\w-]*):)?(.+)\)$/i,D=/^\d+\/\d+$/,G=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,L=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,I=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,O=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,N=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,B=t=>D.test(t),z=t=>!!t&&!Number.isNaN(Number(t)),Z=t=>!!t&&Number.isInteger(Number(t)),j=t=>t.endsWith("%")&&z(t.slice(0,-1)),H=t=>G.test(t),W=()=>!0,K=t=>L.test(t)&&!I.test(t),Y=()=>!1,X=t=>O.test(t),q=t=>N.test(t),U=t=>!$(t)&&!tr(t),V=t=>td(t,tf,Y),$=t=>E.test(t),J=t=>td(t,tp,K),Q=t=>td(t,tm,z),tt=t=>td(t,tu,Y),te=t=>td(t,tg,q),ti=t=>td(t,ty,X),tr=t=>R.test(t),tn=t=>tc(t,tp),ta=t=>tc(t,tb),ts=t=>tc(t,tu),to=t=>tc(t,tf),tl=t=>tc(t,tg),th=t=>tc(t,ty,!0),td=(t,e,i)=>{let r=E.exec(t);return!!r&&(r[1]?e(r[1]):i(r[2]))},tc=(t,e,i=!1)=>{let r=R.exec(t);return!!r&&(r[1]?e(r[1]):i)},tu=t=>"position"===t||"percentage"===t,tg=t=>"image"===t||"url"===t,tf=t=>"length"===t||"size"===t||"bg-size"===t,tp=t=>"length"===t,tm=t=>"number"===t,tb=t=>"family-name"===t,ty=t=>"shadow"===t,tv=(t=>{let e,i,r,n;let a=t=>{let n=i(t);if(n)return n;let a=P(t,e);return r(t,a),a};return n=s=>{let o=[].reduce((t,e)=>e(t),t());return i=(e=C(o)).cache.get,r=e.cache.set,n=a,a(s)},(...t)=>n(A(...t))})(()=>{let t=M("color"),e=M("font"),i=M("text"),r=M("font-weight"),n=M("tracking"),a=M("leading"),s=M("breakpoint"),o=M("container"),l=M("spacing"),h=M("radius"),d=M("shadow"),c=M("inset-shadow"),u=M("text-shadow"),g=M("drop-shadow"),f=M("blur"),p=M("perspective"),m=M("aspect"),b=M("ease"),y=M("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...x(),tr,$],w=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],C=()=>[tr,$,l],k=()=>[B,"full","auto",...C()],P=()=>[Z,"none","subgrid",tr,$],A=()=>["auto",{span:["full",Z,tr,$]},Z,tr,$],T=()=>[Z,"auto",tr,$],F=()=>["auto","min","max","fr",tr,$],E=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],R=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...C()],G=()=>[B,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],L=()=>[t,tr,$],I=()=>[...x(),ts,tt,{position:[tr,$]}],O=()=>["no-repeat",{repeat:["","x","y","space","round"]}],N=()=>["auto","cover","contain",to,V,{size:[tr,$]}],K=()=>[j,tn,J],Y=()=>["","none","full",h,tr,$],X=()=>["",z,tn,J],q=()=>["solid","dashed","dotted","double"],td=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],tc=()=>[z,j,ts,tt],tu=()=>["","none",f,tr,$],tg=()=>["none",z,tr,$],tf=()=>["none",z,tr,$],tp=()=>[z,tr,$],tm=()=>[B,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[H],breakpoint:[H],color:[W],container:[H],"drop-shadow":[H],ease:["in","out","in-out"],font:[U],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[H],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[H],shadow:[H],spacing:["px",z],text:[H],"text-shadow":[H],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",B,$,tr,m]}
vendor: 12,752 bytes, line 14
14],container:["container"],columns:[{columns:[z,$,tr,o]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[Z,"auto",tr,$]}],basis:[{basis:[B,"full","auto",o,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[z,B,"auto","initial","none",$]}],grow:[{grow:["",z,tr,$]}],shrink:[{shrink:["",z,tr,$]}],order:[{order:[Z,"first","last","none",tr,$]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...E(),"normal"]}],"justify-items":[{"justify-items":[...R(),"normal"]}],"justify-self":[{"justify-self":["auto",...R()]}],"align-content":[{content:["normal",...E()]}],"align-items":[{items:[...R(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...R(),{baseline:["","last"]}]}],"place-content":[{"place-content":E()}],"place-items":[{"place-items":[...R(),"baseline"]}],"place-self":[{"place-self":["auto",...R()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[o,"screen",...G()]}],"min-w":[{"min-w":[o,"screen","none",...G()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",i,tn,J]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,tr,Q]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",j,$]}],"font-family":[{font:[ta,$,e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,tr,$]}],"line-clamp":[{"line-clamp":[z,"none",tr,Q]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":["none",tr,$]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",tr,$]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[z,"from-font","auto",tr,J]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[z,"auto",tr,$]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",tr,$]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",tr,$]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:O()}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Z,tr,$],radial:["",tr,$],conic:[Z,tr,$]},tl,te]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:K()}],"gradient-via-pos":[{via:K()}],"gradient-to-pos":[{to:K()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[z,tr,$]}],"outline-w":[{outline:["",z,tn,J]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",d,th,ti]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",c,th,ti]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[z,J]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",u,th,ti]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[z,tr,$]}],"mix-blend":[{"mix-blend":[...td(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":td()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[z]}],"mask-image-linear-from-pos":[{"mask-linear-from":tc()}],"mask-image-linear-to-pos":[{"mask-linear-to":tc()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":tc()}],"mask-image-t-to-pos":[{"mask-t-to":tc()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":tc()}],"mask-image-r-to-pos":[{"mask-r-to":tc()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":tc()}],"mask-image-b-to-pos":[{"mask-b-to":tc()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":tc()}],"mask-image-l-to-pos":[{"mask-l-to":tc()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":tc()}],"mask-image-x-to-pos":[{"mask-x-to":tc()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":tc()}],"mask-image-y-to-pos":[{"mask-y-to":tc()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[tr,$]}],"mask-image-radial-from-pos":[{"mask-radial-from":tc()}],"mask-image-radial-to-pos":[{"mask-radial-to":tc()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[z]}],"mask-image-conic-from-pos":[{"mask-conic-from":tc()}],"mask-image-conic-to-pos":[{"mask-conic-to":tc()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:O()}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",tr,$]}],filter:[{filter:["","none",tr,$]}],blur:[{blur:tu()}],brightness:[{brightness:[z,tr,$]}],contrast:[{contrast:[z,tr,$]}],"drop-shadow":[{"drop-shadow":["","none",g,th,ti]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",z,tr,$]}],"hue-rotate":[{"hue-rotate":[z,tr,$]}],invert:[{invert:["",z,tr,$]}],saturate:[{saturate:[z,tr,$]}],sepia:[{sepia:["",z,tr,$]}],"backdrop-filter":[{"backdrop-filter":["","none",tr,$]}],"backdrop-blur":[{"backdrop-blur":tu()}],"backdrop-brightness":[{"backdrop-brightness":[z,tr,$]}],"backdrop-contrast":[{"backdrop-contrast":[z,tr,$]}],"backdrop-grayscale":[{"backdrop-grayscale":["",z,tr,$]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[z,tr,$]}],"backdrop-invert":[{"backdrop-invert":["",z,tr,$]}],"backdrop-opacity":[{"backdrop-opacity":[z,tr,$]}],"backdrop-saturate":[{"backdrop-saturate":[z,tr,$]}],"backdrop-sepia":[{"backdrop-sepia":["",z,tr,$]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",tr,$]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[z,"initial",tr,$]}],ease:[{ease:["linear","initial",b,tr,$]}],delay:[{delay:[z,tr,$]}],animate:[{animate:["none",y,tr,$]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,tr,$]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:tg()}],"rotate-x":[{"rotate-x":tg()}],"rotate-y":[{"rotate-y":tg()}],"rotate-z":[{"rotate-z":tg()}],scale:[{scale:tf()}],"scale-x":[{"scale-x":tf()}],"scale-y":[{"scale-y":tf()}],"scale-z":[{"scale-z":tf()}],"scale-3d":["scale-3d"],skew:[{skew:tp()}],"skew-x":[{"skew-x":tp()}],"skew-y":[{"skew-y":tp()}],transform:[{transform:[tr,$,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:tm()}],"translate-x":[{"translate-x":tm()}],"translate-y":[{"translate-y":tm()}],"translate-z":[{"translate-z":tm()}],"translate-none":["translate-none"],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}
vendor: 4,421 bytes, line 14
14],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",tr,$]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",tr,$]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[z,tn,J,Q]}],stroke:[{stroke:["none",...L()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}})}
14,782:function(t,e,i){i.d(e,{XR:function(){return r}});let r=t=>(e,i,r)=>{let n=r.subscribe;r.subscribe=(t,e,i)=>{let a=t;if(e){let n=(null==i?void 0:i.equalityFn)||Object.is,s=t(r.getState());a=i=>{let r=t(i);if(!n(s,r)){let t=s;e(s=r,t)}},(null==i?void 0:i.fireImmediately)&&e(s,s)}return n(a)};let a=t(e,i,r);return a}},31993:function(t,e,i){i.d(e,{U:function(){return l}});var r=i(67294);let n=t=>{let e;let i=new Set,r=(t,r)=>{let n="function"==typeof t?t(e):t;if(!Object.is(n,e)){let t=e;e=(null!=r?r:"object"!=typeof n||null===n)?n:Object.assign({},e,n),i.forEach(i=>i(e,t))}},n=()=>e,a={setState:r,getState:n,getInitialState:()=>s,subscribe:t=>(i.add(t),()=>i.delete(t))},s=e=t(r,n,a);return a},a=t=>t?n(t):n,s=t=>t,o=t=>{let e=a(t),i=t=>(function(t,e=s){let i=r.useSyncExternalStore(t.subscribe,r.useCallback(()=>e(t.getState()),[t,e]),r.useCallback(()=>e(t.getInitialState()),[t,e]));return r.useDebugValue(i),i})(e,t);return Object.assign(i,e),i},l=t=>t?o(t):o}}]);
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.