diff --git a/src/renderer/public/pdfjs-dist/web/pdfjs-qinqing-custome/pdfjs-qinqing-custome.js b/src/renderer/public/pdfjs-dist/web/pdfjs-qinqing-custome/pdfjs-qinqing-custome.js index 9df5efd..3827486 100644 --- a/src/renderer/public/pdfjs-dist/web/pdfjs-qinqing-custome/pdfjs-qinqing-custome.js +++ b/src/renderer/public/pdfjs-dist/web/pdfjs-qinqing-custome/pdfjs-qinqing-custome.js @@ -1,2 +1,2 @@ /*! For license information please see pdfjs-qinqing-custome.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.PdfjsAnnotationExtension=t():e.PdfjsAnnotationExtension=t()}(self,(()=>(()=>{var e,t,n={8075:(e,t,n)=>{"use strict";var r=n(453),o=n(487),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},487:(e,t,n)=>{"use strict";var r=n(6743),o=n(453),i=n(6897),A=n(9675),a=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),l=o("%Reflect.apply%",!0)||r.call(s,a),c=n(655),u=o("%Math.max%");e.exports=function(e){if("function"!=typeof e)throw new A("a function is required");var t=l(r,s,arguments);return i(t,1+u(0,e.length-(arguments.length-1)),!0)};var d=function(){return l(r,a,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d},6766:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1601),o=n.n(r),i=n(6314),A=n.n(i)()(o());A.push([e.id,".commentcon{width:100%;height:auto}.commentcon-tit{font-size:14px;font-weight:bold;color:#414141}.commentcon-list{width:100%;height:auto;padding-top:1px}.commentcon-list-mine{width:100%;height:auto;border-top:1px solid #e1e1e1;margin-top:16px}.commentcon-list-mine-head{display:flex;justify-content:flex-start;align-items:center}.commentcon-list-mine-head-icon{width:30px;height:30px}.commentcon-list-mine-head-name,.commentcon-list-mine-head-time{font-size:12px;color:#828282;margin-left:6px}.commentcon-list-mine-mid{padding:16px;font-size:14px;color:#414141}.commentcon-list-mine-operate{width:100%;height:auto;display:flex;justify-content:space-around;align-items:center}.commentcon-list-mine-operate-left{display:flex;align-items:center}.commentcon-list-mine-operate-left-likes{height:32px;border-radius:16px;border:1px solid #e1e1e1;display:flex;align-items:center;padding:0 16px}.commentcon-list-mine-operate-left-likes-ico{width:30px;height:30px}.commentcon-list-mine-operate-left-likes-num{font-size:12px;color:#414141;margin-left:6px}.commentcon-list-mine-operate-left-comment{padding:0 16px;height:32px;border-radius:16px;border:1px solid #e1e1e1;font-size:12px;color:#414141;line-height:32px;margin-left:6px}.commentcon-list-mine-operate-right{display:flex;align-items:center}.commentcon-list-add{width:100%;height:auto;margin-top:20px;border-top:1px dashed #333;padding-top:20px}.commentcon-list-add-btn{display:flex;justify-content:flex-end;align-items:center;margin-top:8px}",""]);const a=A},4619:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1601),o=n.n(r),i=n(6314),A=n.n(i)()(o());A.push([e.id,".CustomPopbar{width:max-content;position:absolute;top:0;left:0;background-color:#000;box-shadow:4px 6px 6px var(--doorhanger-border-color);font:message-box;border-radius:6px}.CustomPopbar .buttons{display:flex;padding:0;margin:0;list-style:none;gap:3px;user-select:none}.CustomPopbar .buttons li{align-items:center;height:100%;text-align:center;border:1px solid rgba(0,0,0,0);color:var(--main-color);cursor:default;width:70px}.CustomPopbar .buttons li .icon{font-size:14px;padding:5px 10px 0 10px;border-bottom:1px solid rgba(0,0,0,0);color:#fff;opacity:.8}.CustomPopbar .buttons li .name{font-size:14px;padding:1px 10px 2px 10px;opacity:.8;color:#fff}.CustomPopbar .buttons li:hover .name{opacity:1}.CustomPopbar .buttons li:hover .icon{opacity:1}.CustomPopbar.show{z-index:999;display:block}.CustomPopbar.hide{display:none}",""]);const a=A},8508:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1601),o=n.n(r),i=n(6314),A=n.n(i)()(o());A.push([e.id,'.CustomToolbar{width:100%;height:32px;display:flex;justify-content:center;align-items:center}.CustomToolbar .buttons{display:flex;padding:0;margin:0;list-style:none;gap:3px;user-select:none}.CustomToolbar .buttons li{align-items:center;height:100%;text-align:center;border:1px solid rgba(0,0,0,0);border-radius:3px;color:var(--main-color);transition:background-color .3s}.CustomToolbar .buttons li .ant-upload-wrapper{line-height:normal}.CustomToolbar .buttons li .icon{font-size:18px;padding:5px 10px 3px 10px;border-bottom:1px solid rgba(0,0,0,0);opacity:.8}.CustomToolbar .buttons li .name{font-size:14px;padding:1px 10px 2px 10px}.CustomToolbar .buttons li:hover{background-color:var(--button-hover-color)}.CustomToolbar .buttons li.selected{border:1px solid var(--toolbar-border-color);background-color:var(--toolbar-border-color)}.CustomToolbar .buttons li.disabled{opacity:.5}.CustomToolbar .buttons li.disabled:hover{background-color:rgba(0,0,0,0)}.CustomToolbar .splitToolbarButtonSeparator{height:51px;margin:0 10px}.SignatureTool{margin:0 auto}.SignatureTool-Container{background-color:#eee;border:1px solid #ccc;position:relative;margin:0 auto}.SignatureTool-Container .konvajs-content{z-index:99;cursor:crosshair}.SignatureTool-Container::after{content:"签名处...";font-size:20px;z-index:0;color:#ccc;position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);text-align:center}.SignatureTool-Toolbar{border:1px solid #ccc;border-top:0;display:flex;justify-content:space-between;margin:0 auto}.SignatureTool-Toolbar .colorPalette{display:flex;margin:8px}.SignatureTool-Toolbar .colorPalette .cell{cursor:pointer;width:22px;height:22px;margin-right:10px;border-radius:100px;display:flex;align-items:center;justify-content:center;border:1px solid #fff}.SignatureTool-Toolbar .colorPalette .cell span{width:12px;height:12px;display:inline-block;border-radius:100px}.SignatureTool-Toolbar .colorPalette .active{border:1px solid #bbb}.SignatureTool-Toolbar .clear{padding:8px;cursor:pointer}.SignatureTool-Toolbar .clear:hover{text-decoration:underline}.SignaturePop .ant-popover-inner{padding:5px}.SignaturePop ul,.SignaturePop li{margin:0;list-style:none;padding:0}.SignaturePop ul img:hover,.SignaturePop li img:hover{background-color:#ccc}.SignaturePop li{display:flex;margin:5px;justify-content:center;align-items:center}.SignaturePop li span{margin-left:5px;cursor:pointer}.SignaturePop-Toolbar{padding:5px}.StampTool{position:relative}.StampTool input{position:absolute;width:100%;height:100%;top:0;left:0;z-index:1;opacity:0}',""]);const a=A},1665:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1601),o=n.n(r),i=n(6314),A=n.n(i)()(o());A.push([e.id,".PdfjsAnnotationExtension_painter_wrapper{position:absolute;text-align:initial;top:0;inset:0;overflow:hidden;line-height:1;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:1}.PdfjsAnnotationExtension_selector_hover .PdfjsAnnotationExtension_painter_wrapper{cursor:pointer !important}.PdfjsAnnotationExtension_is_painting .PdfjsAnnotationExtension_painter_wrapper{z-index:999}.PdfjsAnnotationExtension_painting_type_1 .textLayer:not(.free) span,.PdfjsAnnotationExtension_painting_type_2 .textLayer:not(.free) span,.PdfjsAnnotationExtension_painting_type_3 .textLayer:not(.free) span{cursor:var(--editorHighlight-editing-cursor)}.PdfjsAnnotationExtension_painting_type_4 .PdfjsAnnotationExtension_painter_wrapper,.PdfjsAnnotationExtension_painting_type_5 .PdfjsAnnotationExtension_painter_wrapper,.PdfjsAnnotationExtension_painting_type_6 .PdfjsAnnotationExtension_painter_wrapper{cursor:crosshair}.PdfjsAnnotationExtension_painting_type_7 .PdfjsAnnotationExtension_painter_wrapper{cursor:var(--editorInk-editing-cursor)}.PdfjsAnnotationExtension_painting_type_8 .PdfjsAnnotationExtension_painter_wrapper{cursor:var(--editorFreeHighlight-editing-cursor)}.PdfjsAnnotationExtension_painting_type_9 .PdfjsAnnotationExtension_painter_wrapper,.PdfjsAnnotationExtension_painting_type_10 .PdfjsAnnotationExtension_painter_wrapper{cursor:var(--PdfjsAnnotationExtension-image-cursor)}.PdfjsAnnotationExtension_free_text_input{width:auto;position:absolute;z-index:999;padding:0px;overflow:hidden;background:#fff;outline:none;overflow-wrap:break-word;white-space:pre-wrap;user-select:text;word-break:normal;font-weight:normal;font-style:normal}",""]);const a=A},8307:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(1601),o=n.n(r),i=n(6314),A=n.n(i)()(o());A.push([e.id,".PdfjsAnnotationExtension .textLayer{z-index:9 !important}.PdfjsAnnotationExtension #viewerContainer{top:36px !important}.PdfjsAnnotationExtension #sidebarContainer{top:36px !important}.PdfjsAnnotationExtension #toolbarContainer{height:36px}.antd-message{z-index:999999 !important}",""]);const a=A},6314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var A={};if(r)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},1601:e=>{"use strict";e.exports=function(e){return e[1]}},41:(e,t,n)=>{"use strict";var r=n(655),o=n(8068),i=n(9675),A=n(5795);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],u=!!A&&A(e,t);if(r)r(e,t,{configurable:null===l&&u?u.configurable:!l,enumerable:null===a&&u?u.enumerable:!a,value:n,writable:null===s&&u?u.writable:!s});else{if(!c&&(a||s||l))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},655:(e,t,n)=>{"use strict";var r=n(453)("%Object.defineProperty%",!0)||!1;if(r)try{r({},"a",{value:1})}catch(e){r=!1}e.exports=r},1237:e=>{"use strict";e.exports=EvalError},9383:e=>{"use strict";e.exports=Error},9290:e=>{"use strict";e.exports=RangeError},9538:e=>{"use strict";e.exports=ReferenceError},8068:e=>{"use strict";e.exports=SyntaxError},9675:e=>{"use strict";e.exports=TypeError},5345:e=>{"use strict";e.exports=URIError},9353:e=>{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},453:(e,t,n)=>{"use strict";var r,o=n(9383),i=n(1237),A=n(9290),a=n(9538),s=n(8068),l=n(9675),c=n(5345),u=Function,d=function(e){try{return u('"use strict"; return ('+e+").constructor;")()}catch(e){}},f=Object.getOwnPropertyDescriptor;if(f)try{f({},"")}catch(e){f=null}var h=function(){throw new l},p=f?function(){try{return h}catch(e){try{return f(arguments,"callee").get}catch(e){return h}}}():h,g=n(4039)(),m=n(24)(),v=Object.getPrototypeOf||(m?function(e){return e.__proto__}:null),y={},w="undefined"!=typeof Uint8Array&&v?v(Uint8Array):r,b={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":g&&v?v([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&v?v(v([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&v?v((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":A,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&v?v((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&v?v(""[Symbol.iterator]()):r,"%Symbol%":g?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":p,"%TypedArray%":w,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":c,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(v)try{null.error}catch(e){var B=v(v(e));b["%Error.prototype%"]=B}var C=function e(t){var n;if("%AsyncFunction%"===t)n=d("async function () {}");else if("%GeneratorFunction%"===t)n=d("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=d("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(n=v(o.prototype))}return b[t]=n,n},x={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},S=n(6743),E=n(9957),F=S.call(Function.call,Array.prototype.concat),Q=S.call(Function.apply,Array.prototype.splice),U=S.call(Function.call,String.prototype.replace),k=S.call(Function.call,String.prototype.slice),I=S.call(Function.call,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g,T=function(e,t){var n,r=e;if(E(x,r)&&(r="%"+(n=x[r])[0]+"%"),E(b,r)){var o=b[r];if(o===y&&(o=C(r)),void 0===o&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new s("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,e))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=k(e,0,1),n=k(e,-1);if("%"===t&&"%"!==n)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new s("invalid intrinsic syntax, expected opening `%`");var r=[];return U(e,O,(function(e,t,n,o){r[r.length]=n?U(o,P,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=T("%"+r+"%",t),i=o.name,A=o.value,a=!1,c=o.alias;c&&(r=c[0],Q(n,F([0,1],c)));for(var u=1,d=!0;u=n.length){var m=f(A,h);A=(d=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:A[h]}else d=E(A,h),A=A[h];d&&!a&&(b[i]=A)}}return A}},5795:(e,t,n)=>{"use strict";var r=n(453)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},592:(e,t,n)=>{"use strict";var r=n(655),o=function(){return!!r};o.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},24:e=>{"use strict";var t={__proto__:null,foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!(t instanceof n)}},4039:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(1333);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},1333:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9957:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=n(6743);e.exports=i.call(r,o)},9696:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Animation=void 0;const r=n(8871),o=n(4060),i=r.glob.performance&&r.glob.performance.now?function(){return r.glob.performance.now()}:function(){return(new Date).getTime()};class A{constructor(e,t){this.id=A.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:i(),frameRate:0},this.func=e,this.setLayers(t)}setLayers(e){let t=[];return e&&(t=Array.isArray(e)?e:[e]),this.layers=t,this}getLayers(){return this.layers}addLayer(e){const t=this.layers,n=t.length;for(let r=0;r{"use strict";function n(e,t,n){const o=r(1,n,e),i=r(1,n,t),A=o*o+i*i;return Math.sqrt(A)}Object.defineProperty(t,"__esModule",{value:!0}),t.t2length=t.getQuadraticArcLength=t.getCubicArcLength=t.binomialCoefficients=t.cValues=t.tValues=void 0,t.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],t.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],t.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]],t.getCubicArcLength=(e,r,o)=>{let i,A,a;i=o/2,A=0;for(let o=0;o<20;o++)a=i*t.tValues[20][o]+i,A+=t.cValues[20][o]*n(e,r,a);return i*A},t.getQuadraticArcLength=(e,t,n)=>{void 0===n&&(n=1);const r=e[0]-2*e[1]+e[2],o=t[0]-2*t[1]+t[2],i=2*e[1]-2*e[0],A=2*t[1]-2*t[0],a=4*(r*r+o*o),s=4*(r*i+o*A),l=i*i+A*A;if(0===a)return n*Math.sqrt(Math.pow(e[2]-e[0],2)+Math.pow(t[2]-t[0],2));const c=s/(2*a),u=n+c,d=l/a-c*c,f=u*u+d>0?Math.sqrt(u*u+d):0,h=c*c+d>0?Math.sqrt(c*c+d):0,p=c+Math.sqrt(c*c+d)!==0?d*Math.log(Math.abs((u+f)/(c+h))):0;return Math.sqrt(a)/2*(u*f-c*h+p)};const r=(e,n,o)=>{const i=o.length-1;let A,a;if(0===i)return 0;if(0===e){a=0;for(let e=0;e<=i;e++)a+=t.binomialCoefficients[i][e]*Math.pow(1-n,i-e)*Math.pow(n,e)*o[e];return a}A=new Array(i);for(let e=0;e{let r=1,o=e/t,i=(e-n(o))/t,A=0;for(;r>.001;){const a=n(o+i),s=Math.abs(e-a)/t;if(s500)break}return o}},8604:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HitCanvas=t.SceneCanvas=t.Canvas=void 0;const r=n(4060),o=n(9869),i=n(8871),A=n(4892),a=n(5483);var s;class l{constructor(e){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var t=(e||{}).pixelRatio||i.Konva.pixelRatio||function(){if(s)return s;var e=r.Util.createCanvasElement(),t=e.getContext("2d");return s=(i.Konva._global.devicePixelRatio||1)/(t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1),r.Util.releaseCanvas(e),s}();this.pixelRatio=t,this._canvas=r.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(e){var t=this.pixelRatio;this.pixelRatio=e,this.setSize(this.getWidth()/t,this.getHeight()/t)}setWidth(e){this.width=this._canvas.width=e*this.pixelRatio,this._canvas.style.width=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}setHeight(e){this.height=this._canvas.height=e*this.pixelRatio,this._canvas.style.height=e+"px";var t=this.pixelRatio;this.getContext()._context.scale(t,t)}getWidth(){return this.width}getHeight(){return this.height}setSize(e,t){this.setWidth(e||0),this.setHeight(t||0)}toDataURL(e,t){try{return this._canvas.toDataURL(e,t)}catch(e){try{return this._canvas.toDataURL()}catch(e){return r.Util.error("Unable to get data URL. "+e.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}t.Canvas=l,A.Factory.addGetterSetter(l,"pixelRatio",void 0,(0,a.getNumberValidator)()),t.SceneCanvas=class extends l{constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this.context=new o.SceneContext(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}},t.HitCanvas=class extends l{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new o.HitContext(this),this.setSize(e.width,e.height)}}},4473:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Container=void 0;const r=n(4892),o=n(6536),i=n(5483);class A extends o.Node{constructor(){super(...arguments),this.children=[]}getChildren(e){if(!e)return this.children||[];const t=this.children||[];var n=[];return t.forEach((function(t){e(t)&&n.push(t)})),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach((e=>{e.parent=null,e.index=0,e.remove()})),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach((e=>{e.parent=null,e.index=0,e.destroy()})),this.children=[],this._requestDraw(),this}add(...e){if(0===e.length)return this;if(e.length>1){for(var t=0;t0?t[0]:void 0}_generalFind(e,t){var n=[];return this._descendants((r=>{const o=r._isMatch(e);return o&&n.push(r),!(!o||!t)})),n}_descendants(e){let t=!1;const n=this.getChildren();for(const r of n){if(t=e(r),t)return!0;if(r.hasChildren()&&(t=r._descendants(e),t))return!0}return!1}toObject(){var e=o.Node.prototype.toObject.call(this);return e.children=[],this.getChildren().forEach((t=>{e.children.push(t.toObject())})),e}isAncestorOf(e){for(var t=e.getParent();t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){var t=o.Node.prototype.clone.call(this,e);return this.getChildren().forEach((function(e){t.add(e.clone())})),t}getAllIntersections(e){var t=[];return this.find("Shape").forEach((n=>{n.isVisible()&&n.intersects(e)&&t.push(n)})),t}_clearSelfAndDescendantCache(e){var t;super._clearSelfAndDescendantCache(e),this.isCached()||null===(t=this.children)||void 0===t||t.forEach((function(t){t._clearSelfAndDescendantCache(e)}))}_setChildrenIndices(){var e;null===(e=this.children)||void 0===e||e.forEach((function(e,t){e.index=t})),this._requestDraw()}drawScene(e,t,n){var r=this.getLayer(),o=e||r&&r.getCanvas(),i=o&&o.getContext(),A=this._getCanvasCache(),a=A&&A.scene,s=o&&o.isCache;if(!this.isVisible()&&!s)return this;if(a){i.save();var l=this.getAbsoluteTransform(t).getMatrix();i.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",o,t,n);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;var n=this.getLayer(),r=e||n&&n.hitCanvas,o=r&&r.getContext(),i=this._getCanvasCache();if(i&&i.hit){o.save();var A=this.getAbsoluteTransform(t).getMatrix();o.transform(A[0],A[1],A[2],A[3],A[4],A[5]),this._drawCachedHitCanvas(o),o.restore()}else this._drawChildren("drawHit",r,t);return this}_drawChildren(e,t,n,r){var o,i=t&&t.getContext(),A=this.clipWidth(),a=this.clipHeight(),s=this.clipFunc(),l="number"==typeof A&&"number"==typeof a||s;const c=n===this;if(l){i.save();var u=this.getAbsoluteTransform(n),d=u.getMatrix();let e;if(i.transform(d[0],d[1],d[2],d[3],d[4],d[5]),i.beginPath(),s)e=s.call(this,i,this);else{var f=this.clipX(),h=this.clipY();i.rect(f||0,h||0,A,a)}i.clip.apply(i,e),d=u.copy().invert().getMatrix(),i.transform(d[0],d[1],d[2],d[3],d[4],d[5])}var p=!c&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===e;p&&(i.save(),i._applyGlobalCompositeOperation(this)),null===(o=this.children)||void 0===o||o.forEach((function(o){o[e](t,n,r)})),p&&i.restore(),l&&i.restore()}getClientRect(e={}){var t,n,r,o,i,A,a=e.skipTransform,s=e.relativeTo,l=this;null===(t=this.children)||void 0===t||t.forEach((function(t){if(t.visible()){var A=t.getClientRect({relativeTo:l,skipShadow:e.skipShadow,skipStroke:e.skipStroke});0===A.width&&0===A.height||(void 0===n?(n=A.x,r=A.y,o=A.x+A.width,i=A.y+A.height):(n=Math.min(n,A.x),r=Math.min(r,A.y),o=Math.max(o,A.x+A.width),i=Math.max(i,A.y+A.height)))}}));for(var c=this.find("Shape"),u=!1,d=0;d{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HitContext=t.SceneContext=t.Context=void 0;const r=n(4060),o=n(8871);var i=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class A{constructor(e){this.canvas=e,o.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(e){e.fillEnabled()&&this._fill(e)}_fill(e){}strokeShape(e){e.hasStroke()&&this._stroke(e)}_stroke(e){}fillStrokeShape(e){e.attrs.fillAfterStrokeEnabled?(this.strokeShape(e),this.fillShape(e)):(this.fillShape(e),this.strokeShape(e))}getTrace(e,t){var n,o,i,A,a=this.traceArr,s=a.length,l="";for(n=0;n"number"==typeof e?Math.floor(e):e))),l+="("+A.join(",")+")")):(l+=o.property,e||(l+="="+o.val)),l+=";";return l}clearTrace(){this.traceArr=[]}_trace(e){var t=this.traceArr;t.push(e),t.length>=100&&t.shift()}reset(){var e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){var t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_applyLineCap(e){const t=e.attrs.lineCap;t&&this.setAttr("lineCap",t)}_applyOpacity(e){var t=e.getAbsoluteOpacity();1!==t&&this.setAttr("globalAlpha",t)}_applyLineJoin(e){const t=e.attrs.lineJoin;t&&this.setAttr("lineJoin",t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,o,i){this._context.arc(e,t,n,r,o,i)}arcTo(e,t,n,r,o){this._context.arcTo(e,t,n,r,o)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,o,i){this._context.bezierCurveTo(e,t,n,r,o,i)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,t){var n=arguments;return 2===n.length?this._context.createImageData(e,t):1===n.length?this._context.createImageData(e):void 0}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,o,i){return this._context.createRadialGradient(e,t,n,r,o,i)}drawImage(e,t,n,r,o,i,A,a,s){var l=arguments,c=this._context;3===l.length?c.drawImage(e,t,n):5===l.length?c.drawImage(e,t,n,r,o):9===l.length&&c.drawImage(e,t,n,r,o,i,A,a,s)}ellipse(e,t,n,r,o,i,A,a){this._context.ellipse(e,t,n,r,o,i,A,a)}isPointInPath(e,t,n,r){return n?this._context.isPointInPath(n,e,t,r):this._context.isPointInPath(e,t,r)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}roundRect(e,t,n,r,o){this._context.roundRect(e,t,n,r,o)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash?this._context.setLineDash(e):"mozDash"in this._context?this._context.mozDash=e:"webkitLineDash"in this._context&&(this._context.webkitLineDash=e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,o,i){this._context.setTransform(e,t,n,r,o,i)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,o,i){this._context.transform(e,t,n,r,o,i)}translate(e,t){this._context.translate(e,t)}_enableTrace(){var e,t,n=this,o=i.length,A=this.setAttr,a=function(e){var o,i=n[e];n[e]=function(){return t=function(e){var t,n,o=[],i=e.length,A=r.Util;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DD=void 0;const r=n(8871),o=n(4060);t.DD={get isDragging(){var e=!1;return t.DD._dragElements.forEach((t=>{"dragging"===t.dragStatus&&(e=!0)})),e},justDragged:!1,get node(){var e;return t.DD._dragElements.forEach((t=>{e=t.node})),e},_dragElements:new Map,_drag(e){const n=[];t.DD._dragElements.forEach(((t,r)=>{const{node:i}=t,A=i.getStage();A.setPointersPositions(e),void 0===t.pointerId&&(t.pointerId=o.Util._getFirstPointerId(e));const a=A._changedPointerPositions.find((e=>e.id===t.pointerId));if(a){if("dragging"!==t.dragStatus){var s=i.dragDistance();if(Math.max(Math.abs(a.x-t.startPointerPos.x),Math.abs(a.y-t.startPointerPos.y)){t.fire("dragmove",{type:"dragmove",target:t,evt:e},!0)}))},_endDragBefore(e){const n=[];t.DD._dragElements.forEach((o=>{const{node:i}=o,A=i.getStage();if(e&&A.setPointersPositions(e),!A._changedPointerPositions.find((e=>e.id===o.pointerId)))return;"dragging"!==o.dragStatus&&"stopped"!==o.dragStatus||(t.DD.justDragged=!0,r.Konva._mouseListenClick=!1,r.Konva._touchListenClick=!1,r.Konva._pointerListenClick=!1,o.dragStatus="stopped");const a=o.node.getLayer()||o.node instanceof r.Konva.Stage&&o.node;a&&-1===n.indexOf(a)&&n.push(a)})),n.forEach((e=>{e.draw()}))},_endDragAfter(e){t.DD._dragElements.forEach(((n,r)=>{"stopped"===n.dragStatus&&n.node.fire("dragend",{type:"dragend",target:n.node,evt:e},!0),"dragging"!==n.dragStatus&&t.DD._dragElements.delete(r)}))}},r.Konva.isBrowser&&(window.addEventListener("mouseup",t.DD._endDragBefore,!0),window.addEventListener("touchend",t.DD._endDragBefore,!0),window.addEventListener("mousemove",t.DD._drag),window.addEventListener("touchmove",t.DD._drag),window.addEventListener("mouseup",t.DD._endDragAfter,!1),window.addEventListener("touchend",t.DD._endDragAfter,!1))},4892:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Factory=void 0;const r=n(4060),o=n(5483);var i="get",A="set";t.Factory={addGetterSetter(e,n,r,o,i){t.Factory.addGetter(e,n,r),t.Factory.addSetter(e,n,o,i),t.Factory.addOverloadedGetterSetter(e,n)},addGetter(e,t,n){var o=i+r.Util._capitalize(t);e.prototype[o]=e.prototype[o]||function(){var e=this.attrs[t];return void 0===e?n:e}},addSetter(e,n,o,i){var a=A+r.Util._capitalize(n);e.prototype[a]||t.Factory.overWriteSetter(e,n,o,i)},overWriteSetter(e,t,n,o){var i=A+r.Util._capitalize(t);e.prototype[i]=function(e){return n&&null!=e&&(e=n.call(this,e,t)),this._setAttr(t,e),o&&o.call(this),this}},addComponentsGetterSetter(e,n,a,s,l){var c,u,d=a.length,f=r.Util._capitalize,h=i+f(n),p=A+f(n);e.prototype[h]=function(){var e={};for(c=0;c{this._setAttr(n+f(e),void 0)})),this._fireChangeEvent(n,r,e),l&&l.call(this),this},t.Factory.addOverloadedGetterSetter(e,n)},addOverloadedGetterSetter(e,t){var n=r.Util._capitalize(t),o=A+n,a=i+n;e.prototype[t]=function(){return arguments.length?(this[o](arguments[0]),this):this[a]()}},addDeprecatedGetterSetter(e,n,o,A){r.Util.error("Adding deprecated "+n);var a=i+r.Util._capitalize(n),s=n+" property is deprecated and will be removed soon. Look at Konva change log for more information.";e.prototype[a]=function(){r.Util.error(s);var e=this.attrs[n];return void 0===e?o:e},t.Factory.addSetter(e,n,A,(function(){r.Util.error(s)})),t.Factory.addOverloadedGetterSetter(e,n)},backCompat(e,t){r.Util.each(t,(function(t,n){var o=e.prototype[n],a=i+r.Util._capitalize(t),s=A+r.Util._capitalize(t);function l(){o.apply(this,arguments),r.Util.error('"'+t+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}e.prototype[t]=l,e.prototype[a]=l,e.prototype[s]=l}))},afterSetFilter(){this._filterUpToDate=!1}}},7457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FastLayer=void 0;const r=n(4060),o=n(6267),i=n(8871);class A extends o.Layer{constructor(e){super(e),this.listening(!1),r.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}t.FastLayer=A,A.prototype.nodeType="FastLayer",(0,i._registerNode)(A)},8871:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._registerNode=t.Konva=t.glob=void 0;const r=Math.PI/180;t.glob=void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{},t.Konva={_global:t.glob,version:"9.3.14",isBrowser:"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle:e=>t.Konva.angleDeg?e*r:e,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>t.Konva.DD.isDragging,isTransforming(){var e;return null===(e=t.Konva.Transformer)||void 0===e?void 0:e.isTransforming()},isDragReady:()=>!!t.Konva.DD.node,releaseCanvasOnDestroy:!0,document:t.glob.document,_injectGlobal(e){t.glob.Konva=e}},t._registerNode=e=>{t.Konva[e.prototype.getClassName()]=e},t.Konva._injectGlobal(t.Konva)},7949:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Group=void 0;const r=n(4060),o=n(4473),i=n(8871);class A extends o.Container{_validateAdd(e){var t=e.getType();"Group"!==t&&"Shape"!==t&&r.Util.throw("You may only add groups and shapes to groups.")}}t.Group=A,A.prototype.nodeType="Group",(0,i._registerNode)(A)},6267:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Layer=void 0;const r=n(4060),o=n(4473),i=n(6536),A=n(4892),a=n(8604),s=n(5483),l=n(4723),c=n(8871);var u=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],d=u.length;class f extends o.Container{constructor(e){super(e),this.canvas=new a.SceneCanvas,this.hitCanvas=new a.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e{this.draw(),this._waitingForDraw=!1}))),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;for(var t=1,n=!1;;){for(let r=0;r0?{antialiased:!0}:{}}drawScene(e,t){var n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),o.Container.prototype.drawScene.call(this,r,t),this._fire("draw",{node:this}),this}drawHit(e,t){var n=this.getLayer(),r=e||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),o.Container.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(e)}getHitGraphEnabled(e){return r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent.content){var e=this.parent;this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}}destroy(){return r.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}t.Layer=f,f.prototype.nodeType="Layer",(0,c._registerNode)(f),A.Factory.addGetterSetter(f,"imageSmoothingEnabled",!0),A.Factory.addGetterSetter(f,"clearBeforeDraw",!0),A.Factory.addGetterSetter(f,"hitGraphEnabled",!0,(0,s.getBooleanValidator)())},6536:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Node=void 0;const r=n(4060),o=n(4892),i=n(8604),A=n(8871),a=n(1268),s=n(5483);var l="absoluteOpacity",c="allEventListeners",u="absoluteTransform",d="absoluteScale",f="canvas",h="listening",p="mouseenter",g="mouseleave",m="Shape",v=" ",y="stage",w="transform",b="visible",B=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(v);let C=1;class x{constructor(e){this._id=C++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(e),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(e){e!==w&&e!==u||!this._cache.get(e)?e?this._cache.delete(e):this._cache.clear():this._cache.get(e).dirty=!0}_getCache(e,t){var n=this._cache.get(e);return(void 0===n||(e===w||e===u)&&!0===n.dirty)&&(n=t.call(this),this._cache.set(e,n)),n}_calculate(e,t,n){if(!this._attachedDepsListeners.get(e)){const n=t.map((e=>e+"Change.konva")).join(v);this.on(n,(()=>{this._clearCache(e)})),this._attachedDepsListeners.set(e,!0)}return this._getCache(e,n)}_getCanvasCache(){return this._cache.get(f)}_clearSelfAndDescendantCache(e){this._clearCache(e),e===u&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(f)){const{scene:e,filter:t,hit:n}=this._cache.get(f);r.Util.releaseCanvas(e,t,n),this._cache.delete(f)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){var t=e||{},n={};void 0!==t.x&&void 0!==t.y&&void 0!==t.width&&void 0!==t.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));var o=Math.ceil(t.width||n.width),A=Math.ceil(t.height||n.height),a=t.pixelRatio,s=void 0===t.x?Math.floor(n.x):t.x,c=void 0===t.y?Math.floor(n.y):t.y,u=t.offset||0,h=t.drawBorder||!1,p=t.hitCanvasPixelRatio||1;if(o&&A){o+=2*u+(Math.abs(Math.round(n.x)-s)>.5?1:0),A+=2*u+(Math.abs(Math.round(n.y)-c)>.5?1:0),s-=u,c-=u;var g=new i.SceneCanvas({pixelRatio:a,width:o,height:A}),m=new i.SceneCanvas({pixelRatio:a,width:0,height:0,willReadFrequently:!0}),v=new i.HitCanvas({pixelRatio:p,width:o,height:A}),y=g.getContext(),w=v.getContext();return v.isCache=!0,g.isCache=!0,this._cache.delete(f),this._filterUpToDate=!1,!1===t.imageSmoothingEnabled&&(g.getContext()._context.imageSmoothingEnabled=!1,m.getContext()._context.imageSmoothingEnabled=!1),y.save(),w.save(),y.translate(-s,-c),w.translate(-s,-c),this._isUnderCache=!0,this._clearSelfAndDescendantCache(l),this._clearSelfAndDescendantCache(d),this.drawScene(g,this),this.drawHit(v,this),this._isUnderCache=!1,y.restore(),w.restore(),h&&(y.save(),y.beginPath(),y.rect(0,0,o,A),y.closePath(),y.setAttr("strokeStyle","red"),y.setAttr("lineWidth",5),y.stroke(),y.restore()),this._cache.set(f,{scene:g,filter:m,hit:v,x:s,y:c}),this._requestDraw(),this}r.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(f)}getClientRect(e){throw new Error('abstract "getClientRect" method call')}_transformedRect(e,t){var n=[{x:e.x,y:e.y},{x:e.x+e.width,y:e.y},{x:e.x+e.width,y:e.y+e.height},{x:e.x,y:e.y+e.height}],r=1/0,o=1/0,i=-1/0,A=-1/0,a=this.getAbsoluteTransform(t);return n.forEach((function(e){var t=a.point(e);void 0===r&&(r=i=t.x,o=A=t.y),r=Math.min(r,t.x),o=Math.min(o,t.y),i=Math.max(i,t.x),A=Math.max(A,t.y)})),{x:r,y:o,width:i-r,height:A-o}}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);const t=this._getCanvasCache();e.translate(t.x,t.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e){var t=this._getCanvasCache(),n=t.hit;e.save(),e.translate(t.x,t.y),e.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),e.restore()}_getCachedSceneCanvas(){var e,t,n,o,i=this.filters(),A=this._getCanvasCache(),a=A.scene,s=A.filter,l=s.getContext();if(i){if(!this._filterUpToDate){var c=a.pixelRatio;s.setSize(a.width/a.pixelRatio,a.height/a.pixelRatio);try{for(e=i.length,l.clear(),l.drawImage(a._canvas,0,0,a.getWidth()/c,a.getHeight()/c),t=l.getImageData(0,0,s.getWidth(),s.getHeight()),n=0;n{var t,n;if(!e)return this;for(t in e)"children"!==t&&(n="set"+r.Util._capitalize(t),r.Util._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))})),this}isListening(){return this._getCache(h,this._isListening)}_isListening(e){if(!this.listening())return!1;const t=this.getParent();return!t||t===e||this===e||t._isListening(e)}isVisible(){return this._getCache(b,this._isVisible)}_isVisible(e){if(!this.visible())return!1;const t=this.getParent();return!t||t===e||this===e||t._isVisible(e)}shouldDrawHit(e,t=!1){if(e)return this._isVisible(e)&&this._isListening(e);var n=this.getLayer(),r=!1;a.DD._dragElements.forEach((e=>{"dragging"===e.dragStatus&&("Stage"===e.node.nodeType||e.node.getLayer()===n)&&(r=!0)}));var o=!t&&!A.Konva.hitOnDragEnabled&&(r||A.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!o}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var e,t,n,r,o=this.getDepth(),i=this,A=0;const a=this.getStage();return"Stage"!==i.nodeType&&a&&function a(s){for(e=[],t=s.length,n=0;n0&&e[0].getDepth()<=o&&a(e)}(a.getChildren()),A}getDepth(){for(var e=0,t=this.parent;t;)e++,t=t.parent;return e}_batchTransformChanges(e){this._batchingTransformChange=!0,e(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(w),this._clearSelfAndDescendantCache(u)),this._needClearTransformCache=!1}setPosition(e){return this._batchTransformChanges((()=>{this.x(e.x),this.y(e.y)})),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const e=this.getStage();if(!e)return null;var t=e.getPointerPosition();if(!t)return null;var n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(e){let t=!1,n=this.parent;for(;n;){if(n.isCached()){t=!0;break}n=n.parent}t&&!e&&(e=!0);var o=this.getAbsoluteTransform(e).getMatrix(),i=new r.Transform,A=this.offset();return i.m=o.slice(),i.translate(A.x,A.y),i.getTranslation()}setAbsolutePosition(e){const{x:t,y:n,...r}=this._clearTransform();this.attrs.x=t,this.attrs.y=n,this._clearCache(w);var o=this._getAbsoluteTransform().copy();return o.invert(),o.translate(e.x,e.y),e={x:this.attrs.x+o.getTranslation().x,y:this.attrs.y+o.getTranslation().y},this._setTransform(r),this.setPosition({x:e.x,y:e.y}),this._clearCache(w),this._clearSelfAndDescendantCache(u),this}_setTransform(e){var t;for(t in e)this.attrs[t]=e[t]}_clearTransform(){var e={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,e}move(e){var t=e.x,n=e.y,r=this.x(),o=this.y();return void 0!==t&&(r+=t),void 0!==n&&(o+=n),this.setPosition({x:r,y:o}),this}_eachAncestorReverse(e,t){var n,r,o=[],i=this.getParent();if(!t||t._id!==this._id){for(o.unshift(this);i&&(!t||i._id!==t._id);)o.unshift(i),i=i.parent;for(n=o.length,r=0;r0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return r.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(e){if(!this.parent)return r.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(e<0||e>=this.parent.children.length)&&r.Util.warn("Unexpected value "+e+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(l,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){var e,t,n,o,i=this.getAttrs();const A={attrs:{},className:this.getClassName()};for(e in i)t=i[e],r.Util.isObject(t)&&!r.Util._isPlainObject(t)&&!r.Util._isArray(t)||(n="function"==typeof this[e]&&this[e],delete i[e],o=n?n.call(this):null,i[e]=t,o!==t&&(A.attrs[e]=t));return r.Util._prepareToStringify(A)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){var r=[];t&&this._isMatch(e)&&r.push(this);for(var o=this.parent;o;){if(o===n)return r;o._isMatch(e)&&r.push(o),o=o.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if("function"==typeof e)return e(this);var t,n,o=e.replace(/ /g,"").split(","),i=o.length;for(t=0;t{try{const n=null==e?void 0:e.callback;n&&delete e.callback,r.Util._urlToImage(this.toDataURL(e),(function(e){t(e),null==n||n(e)}))}catch(e){n(e)}}))}toBlob(e){return new Promise(((t,n)=>{try{const n=null==e?void 0:e.callback;n&&delete e.callback,this.toCanvas(e).toBlob((e=>{t(e),null==n||n(e)}),null==e?void 0:e.mimeType,null==e?void 0:e.quality)}catch(e){n(e)}}))}setSize(e){return this.width(e.width),this.height(e.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():A.Konva.dragDistance}_off(e,t,n){var r,o,i,A=this.eventListeners[e];for(r=0;r=0)&&!this.isDragging()){var t=!1;a.DD._dragElements.forEach((e=>{this.isAncestorOf(e.node)&&(t=!0)})),t||this._createDragElement(e)}}))}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const e=a.DD._dragElements.get(this._id),t=e&&"dragging"===e.dragStatus,n=e&&"ready"===e.dragStatus;t?this.stopDrag():n&&a.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(e={x:0,y:0}){const t=this.getStage();if(!t)return!1;const n={x:-e.x,y:-e.y,width:t.width()+2*e.x,height:t.height()+2*e.y};return r.Util.haveIntersection(n,this.getClientRect())}static create(e,t){return r.Util._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(e,t){var n,o,i,a=x.prototype.getClassName.call(e),s=e.children;if(t&&(e.attrs.container=t),A.Konva[a]||(r.Util.warn('Can not find a node with class name "'+a+'". Fallback to "Shape".'),a="Shape"),n=new(0,A.Konva[a])(e.attrs),s)for(o=s.length,i=0;i{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.releaseCapture=t.setPointerCapture=t.hasPointerCapture=t.createEvent=t.getCapturedShape=void 0;const r=n(8871),o=new Map,i=void 0!==r.Konva._global.PointerEvent;function A(e){return{evt:e,pointerId:e.pointerId}}function a(e,t){const n=o.get(e);if(!n)return;const r=n.getStage();r&&r.content,o.delete(e),i&&n._fire("lostpointercapture",A(new PointerEvent("lostpointercapture")))}t.getCapturedShape=function(e){return o.get(e)},t.createEvent=A,t.hasPointerCapture=function(e,t){return o.get(e)===t},t.setPointerCapture=function(e,t){a(e),t.getStage()&&(o.set(e,t),i&&t._fire("gotpointercapture",A(new PointerEvent("gotpointercapture"))))},t.releaseCapture=a},4723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Shape=t.shapes=void 0;const r=n(8871),o=n(4060),i=n(4892),A=n(6536),a=n(5483),s=n(8871),l=n(8722);var c="hasShadow",u="shadowRGBA",d="patternImage",f="linearGradient",h="radialGradient";let p;function g(){return p||(p=o.Util.createCanvasElement().getContext("2d"),p)}t.shapes={};class m extends A.Node{constructor(e){let n;for(super(e);n=o.Util.getRandomColor(),!n||n in t.shapes;);this.colorKey=n,t.shapes[n]=this}getContext(){return o.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return o.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(c,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(d,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const e=g().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){const t=new o.Transform;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(r.Konva.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const n=t.getMatrix(),i="undefined"==typeof DOMMatrix?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);e.setTransform(i)}return e}}_getLinearGradient(){return this._getCache(f,this.__getLinearGradient)}__getLinearGradient(){var e=this.fillLinearGradientColorStops();if(e){for(var t=g(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),o=t.createLinearGradient(n.x,n.y,r.x,r.y),i=0;ithis.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops())))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],(()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops())))}hasHitStroke(){const e=this.hitStrokeWidth();return"auto"===e?this.hasStroke():this.strokeEnabled()&&!!e}intersects(e){var t=this.getStage();if(!t)return!1;const n=t.bufferHitCanvas;return n.getContext().clear(),this.drawHit(n,void 0,!0),n.context.getImageData(Math.round(e.x),Math.round(e.y),1,1).data[3]>0}destroy(){return A.Node.prototype.destroy.call(this),delete t.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e){var t;if(null!==(t=this.attrs.perfectDrawEnabled)&&void 0!==t&&!t)return!1;const n=e||this.hasFill(),r=this.hasStroke(),o=1!==this.getAbsoluteOpacity();if(n&&r&&o)return!0;const i=this.hasShadow(),A=this.shadowForStrokeEnabled();return!!(n&&r&&i&&A)}setStrokeHitEnabled(e){o.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),e?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var e=this.size();return{x:this._centroid?-e.width/2:0,y:this._centroid?-e.height/2:0,width:e.width,height:e.height}}getClientRect(e={}){let t=!1,n=this.getParent();for(;n;){if(n.isCached()){t=!0;break}n=n.getParent()}const r=e.skipTransform,o=e.relativeTo||t&&this.getStage()||void 0,i=this.getSelfRect(),A=!e.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,a=i.width+A,s=i.height+A,l=!e.skipShadow&&this.hasShadow(),c=l?this.shadowOffsetX():0,u=l?this.shadowOffsetY():0,d=a+Math.abs(c),f=s+Math.abs(u),h=l&&this.shadowBlur()||0,p={width:d+2*h,height:f+2*h,x:-(A/2+h)+Math.min(c,0)+i.x,y:-(A/2+h)+Math.min(u,0)+i.y};return r?p:this._transformedRect(p,o)}drawScene(e,t,n){var r,o,i=this.getLayer(),A=e||i.getCanvas(),a=A.getContext(),s=this._getCanvasCache(),l=this.getSceneFunc(),c=this.hasShadow(),u=A.isCache,d=t===this;if(!this.isVisible()&&!d)return this;if(s){a.save();var f=this.getAbsoluteTransform(t).getMatrix();return a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!l)return this;if(a.save(),this._useBufferCanvas()&&!u){r=this.getStage();const e=n||r.bufferCanvas;(o=e.getContext()).clear(),o.save(),o._applyLineJoin(this);var h=this.getAbsoluteTransform(t).getMatrix();o.transform(h[0],h[1],h[2],h[3],h[4],h[5]),l.call(this,o,this),o.restore();var p=e.pixelRatio;c&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(e._canvas,0,0,e.width/p,e.height/p)}else a._applyLineJoin(this),d||(h=this.getAbsoluteTransform(t).getMatrix(),a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)),c&&a._applyShadow(this),l.call(this,a,this);return a.restore(),this}drawHit(e,t,n=!1){if(!this.shouldDrawHit(t,n))return this;var r=this.getLayer(),i=e||r.hitCanvas,A=i&&i.getContext(),a=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),l=s&&s.hit;if(this.colorKey||o.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),l){A.save();var c=this.getAbsoluteTransform(t).getMatrix();return A.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedHitCanvas(A),A.restore(),this}if(!a)return this;if(A.save(),A._applyLineJoin(this),this!==t){var u=this.getAbsoluteTransform(t).getMatrix();A.transform(u[0],u[1],u[2],u[3],u[4],u[5])}return a.call(this,A,this),A.restore(),this}drawHitFromCache(e=0){var t,n,r,i,A,a=this._getCanvasCache(),s=this._getCachedSceneCanvas(),l=a.hit,c=l.getContext(),u=l.getWidth(),d=l.getHeight();c.clear(),c.drawImage(s._canvas,0,0,u,d);try{for(r=(n=(t=c.getImageData(0,0,u,d)).data).length,i=o.Util._hexToRgb(this.colorKey),A=0;Ae?(n[A]=i.r,n[A+1]=i.g,n[A+2]=i.b,n[A+3]=255):n[A+3]=0;c.putImageData(t,0,0)}catch(e){o.Util.error("Unable to draw hit graph from cached scene canvas. "+e.message)}return this}hasPointerCapture(e){return l.hasPointerCapture(e,this)}setPointerCapture(e){l.setPointerCapture(e,this)}releaseCapture(e){l.releaseCapture(e,this)}}t.Shape=m,m.prototype._fillFunc=function(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()},m.prototype._strokeFunc=function(e){e.stroke()},m.prototype._fillFuncHit=function(e){const t=this.attrs.fillRule;t?e.fill(t):e.fill()},m.prototype._strokeFuncHit=function(e){e.stroke()},m.prototype._centroid=!1,m.prototype.nodeType="Shape",(0,s._registerNode)(m),m.prototype.eventListeners={},m.prototype.on.call(m.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(c)})),m.prototype.on.call(m.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(u)})),m.prototype.on.call(m.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",(function(){this._clearCache(d)})),m.prototype.on.call(m.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",(function(){this._clearCache(f)})),m.prototype.on.call(m.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",(function(){this._clearCache(h)})),i.Factory.addGetterSetter(m,"stroke",void 0,(0,a.getStringOrGradientValidator)()),i.Factory.addGetterSetter(m,"strokeWidth",2,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"fillAfterStrokeEnabled",!1),i.Factory.addGetterSetter(m,"hitStrokeWidth","auto",(0,a.getNumberOrAutoValidator)()),i.Factory.addGetterSetter(m,"strokeHitEnabled",!0,(0,a.getBooleanValidator)()),i.Factory.addGetterSetter(m,"perfectDrawEnabled",!0,(0,a.getBooleanValidator)()),i.Factory.addGetterSetter(m,"shadowForStrokeEnabled",!0,(0,a.getBooleanValidator)()),i.Factory.addGetterSetter(m,"lineJoin"),i.Factory.addGetterSetter(m,"lineCap"),i.Factory.addGetterSetter(m,"sceneFunc"),i.Factory.addGetterSetter(m,"hitFunc"),i.Factory.addGetterSetter(m,"dash"),i.Factory.addGetterSetter(m,"dashOffset",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"shadowColor",void 0,(0,a.getStringValidator)()),i.Factory.addGetterSetter(m,"shadowBlur",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"shadowOpacity",1,(0,a.getNumberValidator)()),i.Factory.addComponentsGetterSetter(m,"shadowOffset",["x","y"]),i.Factory.addGetterSetter(m,"shadowOffsetX",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"shadowOffsetY",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"fillPatternImage"),i.Factory.addGetterSetter(m,"fill",void 0,(0,a.getStringOrGradientValidator)()),i.Factory.addGetterSetter(m,"fillPatternX",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"fillPatternY",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"fillLinearGradientColorStops"),i.Factory.addGetterSetter(m,"strokeLinearGradientColorStops"),i.Factory.addGetterSetter(m,"fillRadialGradientStartRadius",0),i.Factory.addGetterSetter(m,"fillRadialGradientEndRadius",0),i.Factory.addGetterSetter(m,"fillRadialGradientColorStops"),i.Factory.addGetterSetter(m,"fillPatternRepeat","repeat"),i.Factory.addGetterSetter(m,"fillEnabled",!0),i.Factory.addGetterSetter(m,"strokeEnabled",!0),i.Factory.addGetterSetter(m,"shadowEnabled",!0),i.Factory.addGetterSetter(m,"dashEnabled",!0),i.Factory.addGetterSetter(m,"strokeScaleEnabled",!0),i.Factory.addGetterSetter(m,"fillPriority","color"),i.Factory.addComponentsGetterSetter(m,"fillPatternOffset",["x","y"]),i.Factory.addGetterSetter(m,"fillPatternOffsetX",0,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"fillPatternOffsetY",0,(0,a.getNumberValidator)()),i.Factory.addComponentsGetterSetter(m,"fillPatternScale",["x","y"]),i.Factory.addGetterSetter(m,"fillPatternScaleX",1,(0,a.getNumberValidator)()),i.Factory.addGetterSetter(m,"fillPatternScaleY",1,(0,a.getNumberValidator)()),i.Factory.addComponentsGetterSetter(m,"fillLinearGradientStartPoint",["x","y"]),i.Factory.addComponentsGetterSetter(m,"strokeLinearGradientStartPoint",["x","y"]),i.Factory.addGetterSetter(m,"fillLinearGradientStartPointX",0),i.Factory.addGetterSetter(m,"strokeLinearGradientStartPointX",0),i.Factory.addGetterSetter(m,"fillLinearGradientStartPointY",0),i.Factory.addGetterSetter(m,"strokeLinearGradientStartPointY",0),i.Factory.addComponentsGetterSetter(m,"fillLinearGradientEndPoint",["x","y"]),i.Factory.addComponentsGetterSetter(m,"strokeLinearGradientEndPoint",["x","y"]),i.Factory.addGetterSetter(m,"fillLinearGradientEndPointX",0),i.Factory.addGetterSetter(m,"strokeLinearGradientEndPointX",0),i.Factory.addGetterSetter(m,"fillLinearGradientEndPointY",0),i.Factory.addGetterSetter(m,"strokeLinearGradientEndPointY",0),i.Factory.addComponentsGetterSetter(m,"fillRadialGradientStartPoint",["x","y"]),i.Factory.addGetterSetter(m,"fillRadialGradientStartPointX",0),i.Factory.addGetterSetter(m,"fillRadialGradientStartPointY",0),i.Factory.addComponentsGetterSetter(m,"fillRadialGradientEndPoint",["x","y"]),i.Factory.addGetterSetter(m,"fillRadialGradientEndPointX",0),i.Factory.addGetterSetter(m,"fillRadialGradientEndPointY",0),i.Factory.addGetterSetter(m,"fillPatternRotation",0),i.Factory.addGetterSetter(m,"fillRule",void 0,(0,a.getStringValidator)()),i.Factory.backCompat(m,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})},7324:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stage=t.stages=void 0;const r=n(4060),o=n(4892),i=n(4473),A=n(8871),a=n(8604),s=n(1268),l=n(8871),c=n(8722);var u="mouseleave",d="mouseover",f="mouseenter",h="mousemove",p="mousedown",g="mouseup",m="pointermove",v="pointerdown",y="pointerup",w="pointercancel",b="pointerout",B="pointerleave",C="pointerover",x="pointerenter",S="contextmenu",E="touchstart",F="touchend",Q="touchmove",U="touchcancel",k="wheel",I=[[f,"_pointerenter"],[p,"_pointerdown"],[h,"_pointermove"],[g,"_pointerup"],[u,"_pointerleave"],[E,"_pointerdown"],[Q,"_pointermove"],[F,"_pointerup"],[U,"_pointercancel"],[d,"_pointerover"],[k,"_wheel"],[S,"_contextmenu"],[v,"_pointerdown"],[m,"_pointermove"],[y,"_pointerup"],[w,"_pointercancel"],["lostpointercapture","_lostpointercapture"]];const O={mouse:{[b]:"mouseout",[B]:u,[C]:d,[x]:f,[m]:h,[v]:p,[y]:g,[w]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[b]:"touchout",[B]:"touchleave",[C]:"touchover",[x]:"touchenter",[m]:Q,[v]:E,[y]:F,[w]:U,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[b]:b,[B]:B,[C]:C,[x]:x,[m]:m,[v]:v,[y]:y,[w]:w,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},P=e=>e.indexOf("pointer")>=0?"pointer":e.indexOf("touch")>=0?"touch":"mouse",T=e=>{const t=P(e);return"pointer"===t?A.Konva.pointerEventsEnabled&&O.pointer:"touch"===t?O.touch:"mouse"===t?O.mouse:void 0};function H(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&r.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),e}t.stages=[];class L extends i.Container{constructor(e){super(H(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),t.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(()=>{H(this.attrs)})),this._checkVisibility()}_validateAdd(e){const t="Layer"===e.getType(),n="FastLayer"===e.getType();t||n||r.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const e=this.visible()?"":"none";this.content.style.display=e}setContainer(e){if("string"==typeof e){if("."===e.charAt(0)){var t=e.slice(1);e=document.getElementsByClassName(t)[0]}else{var n;n="#"!==e.charAt(0)?e:e.slice(1),e=document.getElementById(n)}if(!e)throw"Can not find container in document with id "+n}return this._setAttr("container",e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var e,t=this.children,n=t.length;for(e=0;e-1&&t.stages.splice(n,1),r.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(r.Util.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}_getPointerById(e){return this._pointerPositions.find((t=>t.id===e))}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){(e=e||{}).x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();var t=new a.SceneCanvas({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach((function(t){if(t.isVisible()){var r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}})),t}getIntersection(e){if(!e)return null;var t,n=this.children;for(t=n.length-1;t>=0;t--){const r=n[t].getIntersection(e);if(r)return r}return null}_resizeDOM(){var e=this.width(),t=this.height();this.content&&(this.content.style.width=e+"px",this.content.style.height=t+"px"),this.bufferCanvas.setSize(e,t),this.bufferHitCanvas.setSize(e,t),this.children.forEach((n=>{n.setSize({width:e,height:t}),n.draw()}))}add(e,...t){if(arguments.length>1){for(var n=0;n5&&r.Util.warn("The stage has "+o+" 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."),e.setSize({width:this.width(),height:this.height()}),e.draw(),A.Konva.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return c.hasPointerCapture(e,this)}setPointerCapture(e){c.setPointerCapture(e,this)}releaseCapture(e){c.releaseCapture(e,this)}getLayers(){return this.children}_bindContentEvents(){A.Konva.isBrowser&&I.forEach((([e,t])=>{this.content.addEventListener(e,(e=>{this[t](e)}),{passive:!1})}))}_pointerenter(e){this.setPointersPositions(e);const t=T(e.type);t&&this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);const t=T(e.type);t&&this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_getTargetShape(e){let t=this[e+"targetShape"];return t&&!t.getStage()&&(t=null),t}_pointerleave(e){const t=T(e.type),n=P(e.type);if(t){this.setPointersPositions(e);var r=this._getTargetShape(n),o=!(A.Konva.isDragging()||A.Konva.isTransforming())||A.Konva.hitOnDragEnabled;r&&o?(r._fireAndBubble(t.pointerout,{evt:e}),r._fireAndBubble(t.pointerleave,{evt:e}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this[n+"targetShape"]=null):o&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}}_pointerdown(e){const t=T(e.type),n=P(e.type);if(t){this.setPointersPositions(e);var r=!1;this._changedPointerPositions.forEach((o=>{var i=this.getIntersection(o);if(s.DD.justDragged=!1,A.Konva["_"+n+"ListenClick"]=!0,!i||!i.isListening())return void(this[n+"ClickStartShape"]=void 0);A.Konva.capturePointerEventsEnabled&&i.setPointerCapture(o.id),this[n+"ClickStartShape"]=i,i._fireAndBubble(t.pointerdown,{evt:e,pointerId:o.id}),r=!0;const a=e.type.indexOf("touch")>=0;i.preventDefault()&&e.cancelable&&a&&e.preventDefault()})),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(e){const t=T(e.type),n=P(e.type);if(!t)return;if(A.Konva.isDragging()&&s.DD.node.preventDefault()&&e.cancelable&&e.preventDefault(),this.setPointersPositions(e),(A.Konva.isDragging()||A.Konva.isTransforming())&&!A.Konva.hitOnDragEnabled)return;var r={};let o=!1;var i=this._getTargetShape(n);this._changedPointerPositions.forEach((A=>{const a=c.getCapturedShape(A.id)||this.getIntersection(A),s=A.id,l={evt:e,pointerId:s};var u=i!==a;if(u&&i&&(i._fireAndBubble(t.pointerout,{...l},a),i._fireAndBubble(t.pointerleave,{...l},a)),a){if(r[a._id])return;r[a._id]=!0}a&&a.isListening()?(o=!0,u&&(a._fireAndBubble(t.pointerover,{...l},i),a._fireAndBubble(t.pointerenter,{...l},i),this[n+"targetShape"]=a),a._fireAndBubble(t.pointermove,{...l})):i&&(this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:s}),this[n+"targetShape"]=null)})),o||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){const t=T(e.type),n=P(e.type);if(!t)return;this.setPointersPositions(e);const r=this[n+"ClickStartShape"],o=this[n+"ClickEndShape"];var i={};let a=!1;this._changedPointerPositions.forEach((l=>{const u=c.getCapturedShape(l.id)||this.getIntersection(l);if(u){if(u.releaseCapture(l.id),i[u._id])return;i[u._id]=!0}const d=l.id,f={evt:e,pointerId:d};let h=!1;A.Konva["_"+n+"InDblClickWindow"]?(h=!0,clearTimeout(this[n+"DblTimeout"])):s.DD.justDragged||(A.Konva["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout((function(){A.Konva["_"+n+"InDblClickWindow"]=!1}),A.Konva.dblClickWindow),u&&u.isListening()?(a=!0,this[n+"ClickEndShape"]=u,u._fireAndBubble(t.pointerup,{...f}),A.Konva["_"+n+"ListenClick"]&&r&&r===u&&(u._fireAndBubble(t.pointerclick,{...f}),h&&o&&o===u&&u._fireAndBubble(t.pointerdblclick,{...f}))):(this[n+"ClickEndShape"]=null,A.Konva["_"+n+"ListenClick"]&&this._fire(t.pointerclick,{evt:e,target:this,currentTarget:this,pointerId:d}),h&&this._fire(t.pointerdblclick,{evt:e,target:this,currentTarget:this,pointerId:d}))})),a||this._fire(t.pointerup,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),A.Konva["_"+n+"ListenClick"]=!1,e.cancelable&&"touch"!==n&&e.preventDefault()}_contextmenu(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(S,{evt:e}):this._fire(S,{evt:e,target:this,currentTarget:this})}_wheel(e){this.setPointersPositions(e);var t=this.getIntersection(this.getPointerPosition());t&&t.isListening()?t._fireAndBubble(k,{evt:e}):this._fire(k,{evt:e,target:this,currentTarget:this})}_pointercancel(e){this.setPointersPositions(e);const t=c.getCapturedShape(e.pointerId)||this.getIntersection(this.getPointerPosition());t&&t._fireAndBubble(y,c.createEvent(e)),c.releaseCapture(e.pointerId)}_lostpointercapture(e){c.releaseCapture(e.pointerId)}setPointersPositions(e){var t=this._getContentPosition(),n=null,o=null;void 0!==(e=e||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,(e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})})),Array.prototype.forEach.call(e.changedTouches||e.touches,(e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))):(n=(e.clientX-t.left)/t.scaleX,o=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:o},this._pointerPositions=[{x:n,y:o,id:r.Util._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:o,id:r.Util._getFirstPointerId(e)}])}_setPointerPosition(e){r.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new a.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new a.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),A.Konva.isBrowser){var e=this.container();if(!e)throw"Stage has no container. A container is required.";e.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"),e.appendChild(this.content),this._resizeDOM()}}cache(){return r.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach((function(e){e.batchDraw()})),this}}t.Stage=L,L.prototype.nodeType="Stage",(0,l._registerNode)(L),o.Factory.addGetterSetter(L,"container"),A.Konva.isBrowser&&document.addEventListener("visibilitychange",(()=>{t.stages.forEach((e=>{e.batchDraw()}))}))},8665:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Easings=t.Tween=void 0;const r=n(4060),o=n(9696),i=n(6536),A=n(8871);var a={node:1,duration:1,easing:1,onFinish:1,yoyo:1},s=0,l=["fill","stroke","shadowColor"];class c{constructor(e,t,n,r,o,i,A){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=i,this._change=0,this.prevPos=0,this.yoyo=A,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=o-this.begin,this.pause()}fire(e){var t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return void 0===e&&(e=this._time),this.func(e,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(e){this.pause(),this._time=e,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var e=this.getTimer()-this._startTime;2===this.state?this.setTime(e):3===this.state&&this.setTime(this.duration-e)}pause(){this.state=1,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class u{constructor(e){var n,i,l=this,d=e.node,f=d._id,h=e.easing||t.Easings.Linear,p=!!e.yoyo;n=void 0===e.duration?.3:0===e.duration?.001:e.duration,this.node=d,this._id=s++;var g=d.getLayer()||(d instanceof A.Konva.Stage?d.getLayers():null);for(i in g||r.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new o.Animation((function(){l.tween.onEnterFrame()}),g),this.tween=new c(i,(function(e){l._tweenFunc(e)}),h,0,1,1e3*n,p),this._addListeners(),u.attrs[f]||(u.attrs[f]={}),u.attrs[f][this._id]||(u.attrs[f][this._id]={}),u.tweens[f]||(u.tweens[f]={}),e)void 0===a[i]&&this._addAttr(i,e[i]);this.reset(),this.onFinish=e.onFinish,this.onReset=e.onReset,this.onUpdate=e.onUpdate}_addAttr(e,t){var n,o,i,A,a,s,c,d,f=this.node,h=f._id;if((i=u.tweens[h][e])&&delete u.attrs[h][i][e],n=f.getAttr(e),r.Util._isArray(t))if(o=[],a=Math.max(t.length,n.length),"points"===e&&t.length!==n.length&&(t.length>n.length?(c=n,n=r.Util._prepareArrayForTween(n,t,f.closed())):(s=t,t=r.Util._prepareArrayForTween(t,n,f.closed()))),0===e.indexOf("fill"))for(A=0;A{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var e=this.node,t=u.attrs[e._id][this._id];t.points&&t.points.trueEnd&&e.setAttr("points",t.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var e=this.node,t=u.attrs[e._id][this._id];t.points&&t.points.trueStart&&e.points(t.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(1e3*e),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var e,t=this.node._id,n=this._id,r=u.tweens[t];for(e in this.pause(),r)delete u.tweens[t][e];delete u.attrs[t][n]}}t.Tween=u,u.attrs={},u.tweens={},i.Node.prototype.to=function(e){var t=e.onFinish;e.node=this,e.onFinish=function(){this.destroy(),t&&t()},new u(e).play()},t.Easings={BackEaseIn(e,t,n,r){var o=1.70158;return n*(e/=r)*e*((o+1)*e-o)+t},BackEaseOut(e,t,n,r){var o=1.70158;return n*((e=e/r-1)*e*((o+1)*e+o)+1)+t},BackEaseInOut(e,t,n,r){var o=1.70158;return(e/=r/2)<1?n/2*(e*e*((1+(o*=1.525))*e-o))+t:n/2*((e-=2)*e*((1+(o*=1.525))*e+o)+2)+t},ElasticEaseIn(e,t,n,r,o,i){var A=0;return 0===e?t:1==(e/=r)?t+n:(i||(i=.3*r),!o||o(e/=r)<1/2.75?n*(7.5625*e*e)+t:e<2/2.75?n*(7.5625*(e-=1.5/2.75)*e+.75)+t:e<2.5/2.75?n*(7.5625*(e-=2.25/2.75)*e+.9375)+t:n*(7.5625*(e-=2.625/2.75)*e+.984375)+t,BounceEaseIn:(e,n,r,o)=>r-t.Easings.BounceEaseOut(o-e,0,r,o)+n,BounceEaseInOut:(e,n,r,o)=>en*(e/=r)*e+t,EaseOut:(e,t,n,r)=>-n*(e/=r)*(e-2)+t,EaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t,StrongEaseIn:(e,t,n,r)=>n*(e/=r)*e*e*e*e+t,StrongEaseOut:(e,t,n,r)=>n*((e=e/r-1)*e*e*e*e+1)+t,StrongEaseInOut:(e,t,n,r)=>(e/=r/2)<1?n/2*e*e*e*e*e+t:n/2*((e-=2)*e*e*e*e+2)+t,Linear:(e,t,n,r)=>n*e/r+t}},4060:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Transform=void 0;const r=n(8871);class o{constructor(e=[1,0,0,1,0,0]){this.dirty=!1,this.m=e&&e.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 o(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){var t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){var t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,o=this.m[1]*t+this.m[3]*n,i=this.m[0]*-n+this.m[2]*t,A=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=o,this.m[2]=i,this.m[3]=A,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){var n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,o=this.m[2]+this.m[0]*e,i=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=o,this.m[3]=i,this}multiply(e){var t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],o=this.m[1]*e.m[2]+this.m[3]*e.m[3],i=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],A=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=A,this}invert(){var e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,o=this.m[0]*e,i=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),A=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=o,this.m[4]=i,this.m[5]=A,this}getMatrix(){return this.m}decompose(){var e=this.m[0],n=this.m[1],r=this.m[2],o=this.m[3],i=e*o-n*r;let A={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=e||0!=n){var a=Math.sqrt(e*e+n*n);A.rotation=n>0?Math.acos(e/a):-Math.acos(e/a),A.scaleX=a,A.scaleY=i/a,A.skewX=(e*r+n*o)/i,A.skewY=0}else if(0!=r||0!=o){var s=Math.sqrt(r*r+o*o);A.rotation=Math.PI/2-(o>0?Math.acos(-r/s):-Math.acos(r/s)),A.scaleX=i/s,A.scaleY=s,A.skewX=0,A.skewY=(e*r+n*o)/i}return A.rotation=t.Util._getRotation(A.rotation),A}}t.Transform=o;var i=Math.PI/180,A=180/Math.PI,a="Konva error: ",s={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},l=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,c=[];const u="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(e){setTimeout(e,60)};t.Util={_isElement:e=>!(!e||1!=e.nodeType),_isFunction:e=>!!(e&&e.constructor&&e.call&&e.apply),_isPlainObject:e=>!!e&&e.constructor===Object,_isArray:e=>"[object Array]"===Object.prototype.toString.call(e),_isNumber:e=>"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)&&isFinite(e),_isString:e=>"[object String]"===Object.prototype.toString.call(e),_isBoolean:e=>"[object Boolean]"===Object.prototype.toString.call(e),isObject:e=>e instanceof Object,isValidSelector(e){if("string"!=typeof e)return!1;var t=e[0];return"#"===t||"."===t||t===t.toUpperCase()},_sign:e=>0===e||e>0?1:-1,requestAnimFrame(e){c.push(e),1===c.length&&u((function(){const e=c;c=[],e.forEach((function(e){e()}))}))},createCanvasElement(){var e=document.createElement("canvas");try{e.style=e.style||{}}catch(e){}return e},createImageElement:()=>document.createElement("img"),_isInDocument(e){for(;e=e.parentNode;)if(e==document)return!0;return!1},_urlToImage(e,n){var r=t.Util.createImageElement();r.onload=function(){n(r)},r.src=e},_rgbToHex:(e,t,n)=>((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1),_hexToRgb(e){e=e.replace("#","");var t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:255&t}},getRandomColor(){for(var e=(16777215*Math.random()|0).toString(16);e.length<6;)e="0"+e;return"#"+e},getRGB(e){var t;return e in s?{r:(t=s[e])[0],g:t[1],b:t[2]}:"#"===e[0]?this._hexToRgb(e.substring(1)):"rgb("===e.substr(0,4)?(t=l.exec(e.replace(/ /g,"")),{r:parseInt(t[1],10),g:parseInt(t[2],10),b:parseInt(t[3],10)}):{r:0,g:0,b:0}},colorToRGBA:e=>(e=e||"black",t.Util._namedColorToRBA(e)||t.Util._hex3ColorToRGBA(e)||t.Util._hex4ColorToRGBA(e)||t.Util._hex6ColorToRGBA(e)||t.Util._hex8ColorToRGBA(e)||t.Util._rgbColorToRGBA(e)||t.Util._rgbaColorToRGBA(e)||t.Util._hslColorToRGBA(e)),_namedColorToRBA(e){var t=s[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:1}:null},_rgbColorToRGBA(e){if(0===e.indexOf("rgb(")){var t=(e=e.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:t[0],g:t[1],b:t[2],a:1}}},_rgbaColorToRGBA(e){if(0===e.indexOf("rgba(")){var t=(e=e.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map(((e,t)=>"%"===e.slice(-1)?3===t?parseInt(e)/100:parseInt(e)/100*255:Number(e)));return{r:t[0],g:t[1],b:t[2],a:t[3]}}},_hex8ColorToRGBA(e){if("#"===e[0]&&9===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if("#"===e[0]&&7===e.length)return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if("#"===e[0]&&5===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if("#"===e[0]&&4===e.length)return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(e)){const[t,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e),r=Number(n[0])/360,o=Number(n[1])/100,i=Number(n[2])/100;let A,a,s;if(0===o)return s=255*i,{r:Math.round(s),g:Math.round(s),b:Math.round(s),a:1};A=i<.5?i*(1+o):i+o-i*o;const l=2*i-A,c=[0,0,0];for(let e=0;e<3;e++)a=r+1/3*-(e-1),a<0&&a++,a>1&&a--,s=6*a<1?l+6*(A-l)*a:2*a<1?A:3*a<2?l+(A-l)*(2/3-a)*6:l,c[e]=255*s;return{r:Math.round(c[0]),g:Math.round(c[1]),b:Math.round(c[2]),a:1}}},haveIntersection:(e,t)=>!(t.x>e.x+e.width||t.x+t.widthe.y+e.height||t.y+t.heighte.slice(0),degToRad:e=>e*i,radToDeg:e=>e*A,_degToRad:e=>(t.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),t.Util.degToRad(e)),_radToDeg:e=>(t.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),t.Util.radToDeg(e)),_getRotation:e=>r.Konva.angleDeg?t.Util.radToDeg(e):e,_capitalize:e=>e.charAt(0).toUpperCase()+e.slice(1),throw(e){throw new Error(a+e)},error(e){console.error(a+e)},warn(e){r.Konva.showWarnings&&console.warn("Konva warning: "+e)},each(e,t){for(var n in e)t(n,e[n])},_inRange:(e,t,n)=>t<=e&&e1?(A=n,a=r,s=(n-o)*(n-o)+(r-i)*(r-i)):s=((A=e+c*(n-e))-o)*(A-o)+((a=t+c*(r-t))-i)*(a-i)}return[A,a,s]},_getProjectionToLine(e,n,r){var o=t.Util.cloneObject(e),i=Number.MAX_VALUE;return n.forEach((function(A,a){if(r||a!==n.length-1){var s=n[(a+1)%n.length],l=t.Util._getProjectionToSegment(A.x,A.y,s.x,s.y,e.x,e.y),c=l[0],u=l[1],d=l[2];dn.length){var a=n;n=e,e=a}for(o=0;oe.touches?e.changedTouches[0].identifier:e.pointerId||999,releaseCanvas(...e){r.Konva.releaseCanvasOnDestroy&&e.forEach((e=>{e.width=0,e.height=0}))},drawRoundedRectPath(e,t,n,r){let o=0,i=0,A=0,a=0;"number"==typeof r?o=i=A=a=Math.min(r,t/2,n/2):(o=Math.min(r[0]||0,t/2,n/2),i=Math.min(r[1]||0,t/2,n/2),a=Math.min(r[2]||0,t/2,n/2),A=Math.min(r[3]||0,t/2,n/2)),e.moveTo(o,0),e.lineTo(t-i,0),e.arc(t-i,i,i,3*Math.PI/2,0,!1),e.lineTo(t,n-a),e.arc(t-a,n-a,a,0,Math.PI/2,!1),e.lineTo(A,n),e.arc(A,n-A,A,Math.PI/2,Math.PI,!1),e.lineTo(0,o),e.arc(o,o,o,Math.PI,3*Math.PI/2,!1)}}},5483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getComponentValidator=t.getBooleanValidator=t.getNumberArrayValidator=t.getFunctionValidator=t.getStringOrGradientValidator=t.getStringValidator=t.getNumberOrAutoValidator=t.getNumberOrArrayOfNumbersValidator=t.getNumberValidator=t.alphaComponent=t.RGBComponent=void 0;const r=n(8871),o=n(4060);function i(e){return o.Util._isString(e)?'"'+e+'"':"[object Number]"===Object.prototype.toString.call(e)||o.Util._isBoolean(e)?e:Object.prototype.toString.call(e)}t.RGBComponent=function(e){return e>255?255:e<0?0:Math.round(e)},t.alphaComponent=function(e){return e>1?1:e<1e-4?1e-4:e},t.getNumberValidator=function(){if(r.Konva.isUnminified)return function(e,t){return o.Util._isNumber(e)||o.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a number.'),e}},t.getNumberOrArrayOfNumbersValidator=function(e){if(r.Konva.isUnminified)return function(t,n){let r=o.Util._isNumber(t),A=o.Util._isArray(t)&&t.length==e;return r||A||o.Util.warn(i(t)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array('+e+")"),t}},t.getNumberOrAutoValidator=function(){if(r.Konva.isUnminified)return function(e,t){return o.Util._isNumber(e)||"auto"===e||o.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a number or "auto".'),e}},t.getStringValidator=function(){if(r.Konva.isUnminified)return function(e,t){return o.Util._isString(e)||o.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a string.'),e}},t.getStringOrGradientValidator=function(){if(r.Konva.isUnminified)return function(e,t){const n=o.Util._isString(e),r="[object CanvasGradient]"===Object.prototype.toString.call(e)||e&&e.addColorStop;return n||r||o.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a string or a native gradient.'),e}},t.getFunctionValidator=function(){if(r.Konva.isUnminified)return function(e,t){return o.Util._isFunction(e)||o.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a function.'),e}},t.getNumberArrayValidator=function(){if(r.Konva.isUnminified)return function(e,t){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&e instanceof n||(o.Util._isArray(e)?e.forEach((function(e){o.Util._isNumber(e)||o.Util.warn('"'+t+'" attribute has non numeric element '+e+". Make sure that all elements are numbers.")})):o.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a array of numbers.')),e}},t.getBooleanValidator=function(){if(r.Konva.isUnminified)return function(e,t){return!0===e||!1===e||o.Util.warn(i(e)+' is a not valid value for "'+t+'" attribute. The value should be a boolean.'),e}},t.getComponentValidator=function(e){if(r.Konva.isUnminified)return function(t,n){return null==t||o.Util.isObject(t)||o.Util.warn(i(t)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+e),t}}},680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const r=n(8871),o=n(4060),i=n(6536),A=n(4473),a=n(7324),s=n(6267),l=n(7457),c=n(7949),u=n(1268),d=n(4723),f=n(9696),h=n(8665),p=n(9869),g=n(8604);t.Konva=o.Util._assign(r.Konva,{Util:o.Util,Transform:o.Transform,Node:i.Node,Container:A.Container,Stage:a.Stage,stages:a.stages,Layer:s.Layer,FastLayer:l.FastLayer,Group:c.Group,DD:u.DD,Shape:d.Shape,shapes:d.shapes,Animation:f.Animation,Tween:h.Tween,Easings:h.Easings,Context:p.Context,Canvas:g.Canvas}),t.default=t.Konva},8558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Konva=void 0;const r=n(680),o=n(4821),i=n(9456),A=n(9729),a=n(6955),s=n(7256),l=n(6619),c=n(3443),u=n(1486),d=n(5155),f=n(9131),h=n(5451),p=n(9308),g=n(4481),m=n(1958),v=n(8137),y=n(5058),w=n(8001),b=n(6261),B=n(6627),C=n(2650),x=n(983),S=n(7928),E=n(7241),F=n(5461),Q=n(4843),U=n(6564),k=n(5553),I=n(8624),O=n(5992),P=n(4943),T=n(7019),H=n(6921),L=n(3862),_=n(2512),R=n(517),N=n(661);t.Konva=r.Konva.Util._assign(r.Konva,{Arc:o.Arc,Arrow:i.Arrow,Circle:A.Circle,Ellipse:a.Ellipse,Image:s.Image,Label:l.Label,Tag:l.Tag,Line:c.Line,Path:u.Path,Rect:d.Rect,RegularPolygon:f.RegularPolygon,Ring:h.Ring,Sprite:p.Sprite,Star:g.Star,Text:m.Text,TextPath:v.TextPath,Transformer:y.Transformer,Wedge:w.Wedge,Filters:{Blur:b.Blur,Brighten:B.Brighten,Contrast:C.Contrast,Emboss:x.Emboss,Enhance:S.Enhance,Grayscale:E.Grayscale,HSL:F.HSL,HSV:Q.HSV,Invert:U.Invert,Kaleidoscope:k.Kaleidoscope,Mask:I.Mask,Noise:O.Noise,Pixelate:P.Pixelate,Posterize:T.Posterize,RGB:H.RGB,RGBA:L.RGBA,Sepia:_.Sepia,Solarize:R.Solarize,Threshold:N.Threshold}})},6261:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Blur=void 0;const r=n(4892),o=n(6536),i=n(5483);function A(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var a=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],s=[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];t.Blur=function(e){var t=Math.round(this.blurRadius());t>0&&function(e,t){var n,r,o,i,l,c,u,d,f,h,p,g,m,v,y,w,b,B,C,x,S,E,F,Q,U=e.data,k=e.width,I=e.height,O=t+t+1,P=k-1,T=I-1,H=t+1,L=H*(H+1)/2,_=new A,R=null,N=_,M=null,D=null,j=a[t],G=s[t];for(o=1;o>G,0!==F?(F=255/F,U[c]=(d*j>>G)*F,U[c+1]=(f*j>>G)*F,U[c+2]=(h*j>>G)*F):U[c]=U[c+1]=U[c+2]=0,d-=g,f-=m,h-=v,p-=y,g-=M.r,m-=M.g,v-=M.b,y-=M.a,i=u+((i=n+t+1)>G,F>0?(F=255/F,U[i]=(d*j>>G)*F,U[i+1]=(f*j>>G)*F,U[i+2]=(h*j>>G)*F):U[i]=U[i+1]=U[i+2]=0,d-=g,f-=m,h-=v,p-=y,g-=M.r,m-=M.g,v-=M.b,y-=M.a,i=n+((i=r+H){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Brighten=void 0;const r=n(4892),o=n(6536),i=n(5483);t.Brighten=function(e){var t,n=255*this.brightness(),r=e.data,o=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contrast=void 0;const r=n(4892),o=n(6536),i=n(5483);t.Contrast=function(e){var t,n=Math.pow((this.contrast()+100)/100,2),r=e.data,o=r.length,i=150,A=150,a=150;for(t=0;t255?255:i,A=(A*=255)<0?0:A>255?255:A,a=(a*=255)<0?0:a>255?255:a,r[t]=i,r[t+1]=A,r[t+2]=a},r.Factory.addGetterSetter(o.Node,"contrast",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter)},983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emboss=void 0;const r=n(4892),o=n(6536),i=n(4060),A=n(5483);t.Emboss=function(e){var t=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),o=this.embossBlend(),A=0,a=0,s=e.data,l=e.width,c=e.height,u=4*l,d=c;switch(r){case"top-left":A=-1,a=-1;break;case"top":A=-1,a=0;break;case"top-right":A=-1,a=1;break;case"right":A=0,a=1;break;case"bottom-right":A=1,a=1;break;case"bottom":A=1,a=0;break;case"bottom-left":A=1,a=-1;break;case"left":A=0,a=-1;break;default:i.Util.error("Unknown emboss direction: "+r)}do{var f=(d-1)*u,h=A;d+h<1&&(h=0),d+h>c&&(h=0);var p=(d-1+h)*l*4,g=l;do{var m=f+4*(g-1),v=a;g+v<1&&(v=0),g+v>l&&(v=0);var y=p+4*(g-1+v),w=s[m]-s[y],b=s[m+1]-s[y+1],B=s[m+2]-s[y+2],C=w,x=C>0?C:-C;if((b>0?b:-b)>x&&(C=b),(B>0?B:-B)>x&&(C=B),C*=t,o){var S=s[m]+C,E=s[m+1]+C,F=s[m+2]+C;s[m]=S>255?255:S<0?0:S,s[m+1]=E>255?255:E<0?0:E,s[m+2]=F>255?255:F<0?0:F}else{var Q=n-C;Q<0?Q=0:Q>255&&(Q=255),s[m]=s[m+1]=s[m+2]=Q}}while(--g)}while(--d)},r.Factory.addGetterSetter(o.Node,"embossStrength",.5,(0,A.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(o.Node,"embossWhiteLevel",.5,(0,A.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(o.Node,"embossDirection","top-left",null,r.Factory.afterSetFilter),r.Factory.addGetterSetter(o.Node,"embossBlend",!1,null,r.Factory.afterSetFilter)},7928:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Enhance=void 0;const r=n(4892),o=n(6536),i=n(5483);function A(e,t,n,r,o){var i=n-t,A=o-r;return 0===i?r+A/2:0===A?r:A*((e-t)/i)+r}t.Enhance=function(e){var t,n,r,o,i=e.data,a=i.length,s=i[0],l=s,c=i[1],u=c,d=i[2],f=d,h=this.enhance();if(0!==h){for(o=0;ol&&(l=t),(n=i[o+1])u&&(u=n),(r=i[o+2])f&&(f=r);var p,g,m,v,y,w,b,B,C;for(l===s&&(l=255,s=0),u===c&&(u=255,c=0),f===d&&(f=255,d=0),h>0?(g=l+h*(255-l),m=s-h*(s-0),y=u+h*(255-u),w=c-h*(c-0),B=f+h*(255-f),C=d-h*(d-0)):(g=l+h*(l-(p=.5*(l+s))),m=s+h*(s-p),y=u+h*(u-(v=.5*(u+c))),w=c+h*(c-v),B=f+h*(f-(b=.5*(f+d))),C=d+h*(d-b)),o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Grayscale=void 0,t.Grayscale=function(e){var t,n,r=e.data,o=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HSL=void 0;const r=n(4892),o=n(6536),i=n(5483);r.Factory.addGetterSetter(o.Node,"hue",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(o.Node,"saturation",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(o.Node,"luminance",0,(0,i.getNumberValidator)(),r.Factory.afterSetFilter),t.HSL=function(e){var t,n,r,o,i,A=e.data,a=A.length,s=Math.pow(2,this.saturation()),l=Math.abs(this.hue()+360)%360,c=127*this.luminance(),u=1*s*Math.cos(l*Math.PI/180),d=1*s*Math.sin(l*Math.PI/180),f=.299+.701*u+.167*d,h=.587-.587*u+.33*d,p=.114-.114*u-.497*d,g=.299-.299*u-.328*d,m=.587+.413*u+.035*d,v=.114-.114*u+.293*d,y=.299-.3*u+1.25*d,w=.587-.586*u-1.05*d,b=.114+.886*u-.2*d;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HSV=void 0;const r=n(4892),o=n(6536),i=n(5483);t.HSV=function(e){var t,n,r,o,i,A=e.data,a=A.length,s=Math.pow(2,this.value()),l=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,u=s*l*Math.cos(c*Math.PI/180),d=s*l*Math.sin(c*Math.PI/180),f=.299*s+.701*u+.167*d,h=.587*s-.587*u+.33*d,p=.114*s-.114*u-.497*d,g=.299*s-.299*u-.328*d,m=.587*s+.413*u+.035*d,v=.114*s-.114*u+.293*d,y=.299*s-.3*u+1.25*d,w=.587*s-.586*u-1.05*d,b=.114*s+.886*u-.2*d;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Invert=void 0,t.Invert=function(e){var t,n=e.data,r=n.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kaleidoscope=void 0;const r=n(4892),o=n(6536),i=n(4060),A=n(5483);t.Kaleidoscope=function(e){var t,n,r,o,A,a,s,l,c,u=e.width,d=e.height,f=Math.round(this.kaleidoscopePower()),h=Math.round(this.kaleidoscopeAngle()),p=Math.floor(u*(h%360)/360);if(!(f<1)){var g=i.Util.createCanvasElement();g.width=u,g.height=d;var m=g.getContext("2d").getImageData(0,0,u,d);i.Util.releaseCanvas(g),function(e,t,n){var r,o,i,A,a=e.data,s=t.data,l=e.width,c=e.height,u=n.polarCenterX||l/2,d=n.polarCenterY||c/2,f=0,h=0,p=0,g=0,m=Math.sqrt(u*u+d*d);o=l-u,i=c-d,m=(A=Math.sqrt(o*o+i*i))>m?A:m;var v,y,w,b,B=c,C=l,x=360/C*Math.PI/180;for(y=0;yu&&(w=y,b=0,B=-1),n=0;ny?s:y;var w,b,B,C=d,x=u,S=n.polarRotation||0;for(o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mask=void 0;const r=n(4892),o=n(6536),i=n(5483);function A(e,t,n){var r=4*(n*e.width+t),o=[];return o.push(e.data[r++],e.data[r++],e.data[r++],e.data[r++]),o}function a(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)+Math.pow(e[2]-t[2],2))}t.Mask=function(e){var t=function(e,t){var n=A(e,0,0),r=A(e,e.width-1,0),o=A(e,0,e.height-1),i=A(e,e.width-1,e.height-1),s=t||10;if(a(n,r)=0&&f=0&&h=0&&f=0&&h=1020?255:0}return A}(t=function(e,t,n){for(var r=[1,1,1,1,0,1,1,1,1],o=Math.round(Math.sqrt(r.length)),i=Math.floor(o/2),A=[],a=0;a=0&&f=0&&h{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Noise=void 0;const r=n(4892),o=n(6536),i=n(5483);t.Noise=function(e){var t,n=255*this.noise(),r=e.data,o=r.length,i=n/2;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Pixelate=void 0;const r=n(4892),o=n(4060),i=n(6536),A=n(5483);t.Pixelate=function(e){var t,n,r,i,A,a,s,l,c,u,d,f,h,p,g=Math.ceil(this.pixelSize()),m=e.width,v=e.height,y=Math.ceil(m/g),w=Math.ceil(v/g),b=e.data;if(g<=0)o.Util.error("pixelSize value can not be <= 0");else for(f=0;f=m))for(n=u;n=v||(i+=b[0+(r=4*(m*n+t))],A+=b[r+1],a+=b[r+2],s+=b[r+3],p+=1);for(i/=p,A/=p,a/=p,s/=p,t=l;t=m))for(n=u;n=v||(b[0+(r=4*(m*n+t))]=i,b[r+1]=A,b[r+2]=a,b[r+3]=s)}},r.Factory.addGetterSetter(i.Node,"pixelSize",8,(0,A.getNumberValidator)(),r.Factory.afterSetFilter)},7019:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Posterize=void 0;const r=n(4892),o=n(6536),i=n(5483);t.Posterize=function(e){var t,n=Math.round(254*this.levels())+1,r=e.data,o=r.length,i=255/n;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RGB=void 0;const r=n(4892),o=n(6536),i=n(5483);t.RGB=function(e){var t,n,r=e.data,o=r.length,i=this.red(),A=this.green(),a=this.blue();for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(o.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(o.Node,"blue",0,i.RGBComponent,r.Factory.afterSetFilter)},3862:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RGBA=void 0;const r=n(4892),o=n(6536),i=n(5483);t.RGBA=function(e){var t,n,r=e.data,o=r.length,i=this.red(),A=this.green(),a=this.blue(),s=this.alpha();for(t=0;t255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(o.Node,"green",0,(function(e){return this._filterUpToDate=!1,e>255?255:e<0?0:Math.round(e)})),r.Factory.addGetterSetter(o.Node,"blue",0,i.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(o.Node,"alpha",1,(function(e){return this._filterUpToDate=!1,e>1?1:e<0?0:e}))},2512:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sepia=void 0,t.Sepia=function(e){var t,n,r,o,i=e.data,A=i.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Solarize=void 0,t.Solarize=function(e){var t=e.data,n=e.width,r=4*n,o=e.height;do{var i=(o-1)*r,A=n;do{var a=i+4*(A-1),s=t[a],l=t[a+1],c=t[a+2];s>127&&(s=255-s),l>127&&(l=255-l),c>127&&(c=255-c),t[a]=s,t[a+1]=l,t[a+2]=c}while(--A)}while(--o)}},661:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Threshold=void 0;const r=n(4892),o=n(6536),i=n(5483);t.Threshold=function(e){var t,n=255*this.threshold(),r=e.data,o=r.length;for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8558);e.exports=r.Konva},4821:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Arc=void 0;const r=n(4892),o=n(4723),i=n(8871),A=n(5483),a=n(8871);class s extends o.Shape{_sceneFunc(e){var t=i.Konva.getAngle(this.angle()),n=this.clockwise();e.beginPath(),e.arc(0,0,this.outerRadius(),0,t,n),e.arc(0,0,this.innerRadius(),t,0,!n),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}getSelfRect(){const e=this.innerRadius(),t=this.outerRadius(),n=this.clockwise(),r=i.Konva.getAngle(n?360-this.angle():this.angle()),o=Math.cos(Math.min(r,Math.PI)),A=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),a=Math.sin(Math.min(r,Math.PI/2)),s=o*(o>0?e:t),l=A*(A>0?e:t),c=a*(a>0?t:e);return{x:s,y:n?-1*c:l,width:1*t-s,height:c-l}}}t.Arc=s,s.prototype._centroid=!0,s.prototype.className="Arc",s.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,a._registerNode)(s),r.Factory.addGetterSetter(s,"innerRadius",0,(0,A.getNumberValidator)()),r.Factory.addGetterSetter(s,"outerRadius",0,(0,A.getNumberValidator)()),r.Factory.addGetterSetter(s,"angle",0,(0,A.getNumberValidator)()),r.Factory.addGetterSetter(s,"clockwise",!1,(0,A.getBooleanValidator)())},9456:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Arrow=void 0;const r=n(4892),o=n(3443),i=n(5483),A=n(8871),a=n(1486);class s extends o.Line{_sceneFunc(e){super._sceneFunc(e);var t=2*Math.PI,n=this.points(),r=n,o=0!==this.tension()&&n.length>4;o&&(r=this.getTensionPoints());var i,A,s=this.pointerLength(),l=n.length;if(o){const e=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[l-2],n[l-1]],t=a.Path.calcLength(r[r.length-4],r[r.length-3],"C",e),o=a.Path.getPointOnQuadraticBezier(Math.min(1,1-s/t),e[0],e[1],e[2],e[3],e[4],e[5]);i=n[l-2]-o.x,A=n[l-1]-o.y}else i=n[l-2]-n[l-4],A=n[l-1]-n[l-3];var c=(Math.atan2(A,i)+t)%t,u=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(n[l-2],n[l-1]),e.rotate(c),e.moveTo(0,0),e.lineTo(-s,u/2),e.lineTo(-s,-u/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(n[0],n[1]),o?(i=(r[0]+r[2])/2-n[0],A=(r[1]+r[3])/2-n[1]):(i=n[2]-n[0],A=n[3]-n[1]),e.rotate((Math.atan2(-A,-i)+t)%t),e.moveTo(0,0),e.lineTo(-s,u/2),e.lineTo(-s,-u/2),e.closePath(),e.restore(),this.__fillStroke(e))}__fillStroke(e){var t=this.dashEnabled();t&&(this.attrs.dashEnabled=!1,e.setLineDash([])),e.fillStrokeShape(this),t&&(this.attrs.dashEnabled=!0)}getSelfRect(){const e=super.getSelfRect(),t=this.pointerWidth()/2;return{x:e.x-t,y:e.y-t,width:e.width+2*t,height:e.height+2*t}}}t.Arrow=s,s.prototype.className="Arrow",(0,A._registerNode)(s),r.Factory.addGetterSetter(s,"pointerLength",10,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"pointerWidth",10,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"pointerAtBeginning",!1),r.Factory.addGetterSetter(s,"pointerAtEnding",!0)},9729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Circle=void 0;const r=n(4892),o=n(4723),i=n(5483),A=n(8871);class a extends o.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius()!==e/2&&this.radius(e/2)}setHeight(e){this.radius()!==e/2&&this.radius(e/2)}}t.Circle=a,a.prototype._centroid=!0,a.prototype.className="Circle",a.prototype._attrsAffectingSize=["radius"],(0,A._registerNode)(a),r.Factory.addGetterSetter(a,"radius",0,(0,i.getNumberValidator)())},6955:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ellipse=void 0;const r=n(4892),o=n(4723),i=n(5483),A=n(8871);class a extends o.Shape{_sceneFunc(e){var t=this.radiusX(),n=this.radiusY();e.beginPath(),e.save(),t!==n&&e.scale(1,n/t),e.arc(0,0,t,0,2*Math.PI,!1),e.restore(),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(e){this.radiusX(e/2)}setHeight(e){this.radiusY(e/2)}}t.Ellipse=a,a.prototype.className="Ellipse",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,A._registerNode)(a),r.Factory.addComponentsGetterSetter(a,"radius",["x","y"]),r.Factory.addGetterSetter(a,"radiusX",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(a,"radiusY",0,(0,i.getNumberValidator)())},7256:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;const r=n(4060),o=n(4892),i=n(4723),A=n(8871),a=n(5483);class s extends i.Shape{constructor(e){super(e),this.on("imageChange.konva",(()=>{this._setImageLoad()})),this._setImageLoad()}_setImageLoad(){const e=this.image();e&&e.complete||e&&4===e.readyState||e&&e.addEventListener&&e.addEventListener("load",(()=>{this._requestDraw()}))}_useBufferCanvas(){const e=!!this.cornerRadius(),t=this.hasShadow();return!(!e||!t)||super._useBufferCanvas(!0)}_sceneFunc(e){const t=this.getWidth(),n=this.getHeight(),o=this.cornerRadius(),i=this.attrs.image;let A;if(i){const e=this.attrs.cropWidth,r=this.attrs.cropHeight;A=e&&r?[i,this.cropX(),this.cropY(),e,r,0,0,t,n]:[i,0,0,t,n]}(this.hasFill()||this.hasStroke()||o)&&(e.beginPath(),o?r.Util.drawRoundedRectPath(e,t,n,o):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),i&&(o&&e.clip(),e.drawImage.apply(e,A))}_hitFunc(e){var t=this.width(),n=this.height(),o=this.cornerRadius();e.beginPath(),o?r.Util.drawRoundedRectPath(e,t,n,o):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){var e,t;return null!==(e=this.attrs.width)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.width}getHeight(){var e,t;return null!==(e=this.attrs.height)&&void 0!==e?e:null===(t=this.image())||void 0===t?void 0:t.height}static fromURL(e,t,n=null){var o=r.Util.createImageElement();o.onload=function(){var e=new s({image:o});t(e)},o.onerror=n,o.crossOrigin="Anonymous",o.src=e}}t.Image=s,s.prototype.className="Image",(0,A._registerNode)(s),o.Factory.addGetterSetter(s,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4)),o.Factory.addGetterSetter(s,"image"),o.Factory.addComponentsGetterSetter(s,"crop",["x","y","width","height"]),o.Factory.addGetterSetter(s,"cropX",0,(0,a.getNumberValidator)()),o.Factory.addGetterSetter(s,"cropY",0,(0,a.getNumberValidator)()),o.Factory.addGetterSetter(s,"cropWidth",0,(0,a.getNumberValidator)()),o.Factory.addGetterSetter(s,"cropHeight",0,(0,a.getNumberValidator)())},6619:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Tag=t.Label=void 0;const r=n(4892),o=n(4723),i=n(7949),A=n(5483),a=n(8871);var s=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],l="up",c="right",u="down",d="left",f=s.length;class h extends i.Group{constructor(e){super(e),this.on("add.konva",(function(e){this._addListeners(e.child),this._sync()}))}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(e){var t,n=this,r=function(){n._sync()};for(t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Line=void 0;const r=n(4892),o=n(4723),i=n(5483),A=n(8871);function a(e,t,n,r,o,i,A){var a=Math.sqrt(Math.pow(n-e,2)+Math.pow(r-t,2)),s=Math.sqrt(Math.pow(o-n,2)+Math.pow(i-r,2)),l=A*a/(a+s),c=A*s/(a+s);return[n-l*(o-e),r-l*(i-t),n+c*(o-e),r+c*(i-t)]}function s(e,t){var n,r,o=e.length,i=[];for(n=2;n4){for(n=(t=this.getTensionPoints()).length,r=a?0:4,a||e.quadraticCurveTo(t[0],t[1],t[2],t[3]);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Path=void 0;const r=n(4892),o=n(4723),i=n(8871),A=n(5570);class a extends o.Shape{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",(function(){this._readDataAttribute()}))}_readDataAttribute(){this.dataArray=a.parsePathData(this.data()),this.pathLength=a.getPathLength(this.dataArray)}_sceneFunc(e){var t=this.dataArray;e.beginPath();for(var n=!1,r=0;rl?s:l,p=s>l?1:s/l,g=s>l?l/s:1;e.translate(A,a),e.rotate(d),e.scale(p,g),e.arc(0,0,h,c,c+u,1-f),e.scale(1/p,1/g),e.rotate(-d),e.translate(-A,-a);break;case"z":n=!0,e.closePath()}}n||this.hasFill()?e.fillStrokeShape(this):e.strokeShape(this)}getSelfRect(){var e=[];this.dataArray.forEach((function(t){if("A"===t.command){var n=t.points[4],r=t.points[5],o=t.points[4]+r,i=Math.PI/180;if(Math.abs(n-o)o;r-=i){const n=a.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);e.push(n.x,n.y)}else for(let r=n+i;rt[r].pathLength;)e-=t[r].pathLength,++r;if(r===o)return{x:(n=t[r-1].points.slice(-2))[0],y:n[1]};if(e<.01)return{x:(n=t[r].points.slice(0,2))[0],y:n[1]};var i=t[r],s=i.points;switch(i.command){case"L":return a.getPointOnLine(e,i.start.x,i.start.y,s[0],s[1]);case"C":return a.getPointOnCubicBezier((0,A.t2length)(e,a.getPathLength(t),(e=>(0,A.getCubicArcLength)([i.start.x,s[0],s[2],s[4]],[i.start.y,s[1],s[3],s[5]],e))),i.start.x,i.start.y,s[0],s[1],s[2],s[3],s[4],s[5]);case"Q":return a.getPointOnQuadraticBezier((0,A.t2length)(e,a.getPathLength(t),(e=>(0,A.getQuadraticArcLength)([i.start.x,s[0],s[2]],[i.start.y,s[1],s[3]],e))),i.start.x,i.start.y,s[0],s[1],s[2],s[3]);case"A":var l=s[0],c=s[1],u=s[2],d=s[3],f=s[4],h=s[5],p=s[6];return f+=h*e/i.pathLength,a.getPointOnEllipticalArc(l,c,u,d,f,p)}return null}static getPointOnLine(e,t,n,r,o,i,A){i=null!=i?i:t,A=null!=A?A:n;const a=this.getLineLength(t,n,r,o);if(a<1e-10)return{x:t,y:n};if(r===t)return{x:i,y:A+(o>n?e:-e)};const s=(o-n)/(r-t),l=Math.sqrt(e*e/(1+s*s))*(r0&&!isNaN(f[0]);){var m,v,y,w,b,B,C,x,S,E,F="",Q=[],U=s,k=l;switch(d){case"l":s+=f.shift(),l+=f.shift(),F="L",Q.push(s,l);break;case"L":s=f.shift(),l=f.shift(),Q.push(s,l);break;case"m":var I=f.shift(),O=f.shift();if(s+=I,l+=O,F="M",A.length>2&&"z"===A[A.length-1].command)for(var P=A.length-2;P>=0;P--)if("M"===A[P].command){s=A[P].points[0]+I,l=A[P].points[1]+O;break}Q.push(s,l),d="l";break;case"M":s=f.shift(),l=f.shift(),F="M",Q.push(s,l),d="L";break;case"h":s+=f.shift(),F="L",Q.push(s,l);break;case"H":s=f.shift(),F="L",Q.push(s,l);break;case"v":l+=f.shift(),F="L",Q.push(s,l);break;case"V":l=f.shift(),F="L",Q.push(s,l);break;case"C":Q.push(f.shift(),f.shift(),f.shift(),f.shift()),s=f.shift(),l=f.shift(),Q.push(s,l);break;case"c":Q.push(s+f.shift(),l+f.shift(),s+f.shift(),l+f.shift()),s+=f.shift(),l+=f.shift(),F="C",Q.push(s,l);break;case"S":v=s,y=l,"C"===(m=A[A.length-1]).command&&(v=s+(s-m.points[2]),y=l+(l-m.points[3])),Q.push(v,y,f.shift(),f.shift()),s=f.shift(),l=f.shift(),F="C",Q.push(s,l);break;case"s":v=s,y=l,"C"===(m=A[A.length-1]).command&&(v=s+(s-m.points[2]),y=l+(l-m.points[3])),Q.push(v,y,s+f.shift(),l+f.shift()),s+=f.shift(),l+=f.shift(),F="C",Q.push(s,l);break;case"Q":Q.push(f.shift(),f.shift()),s=f.shift(),l=f.shift(),Q.push(s,l);break;case"q":Q.push(s+f.shift(),l+f.shift()),s+=f.shift(),l+=f.shift(),F="Q",Q.push(s,l);break;case"T":v=s,y=l,"Q"===(m=A[A.length-1]).command&&(v=s+(s-m.points[0]),y=l+(l-m.points[1])),s=f.shift(),l=f.shift(),F="Q",Q.push(v,y,s,l);break;case"t":v=s,y=l,"Q"===(m=A[A.length-1]).command&&(v=s+(s-m.points[0]),y=l+(l-m.points[1])),s+=f.shift(),l+=f.shift(),F="Q",Q.push(v,y,s,l);break;case"A":w=f.shift(),b=f.shift(),B=f.shift(),C=f.shift(),x=f.shift(),S=s,E=l,s=f.shift(),l=f.shift(),F="A",Q=this.convertEndpointToCenterParameterization(S,E,s,l,C,x,w,b,B);break;case"a":w=f.shift(),b=f.shift(),B=f.shift(),C=f.shift(),x=f.shift(),S=s,E=l,s+=f.shift(),l+=f.shift(),F="A",Q=this.convertEndpointToCenterParameterization(S,E,s,l,C,x,w,b,B)}A.push({command:F||d,points:Q,start:{x:U,y:k},pathLength:this.calcLength(U,k,F||d,Q)})}"z"!==d&&"Z"!==d||A.push({command:"z",points:[],start:void 0,pathLength:0})}return A}static calcLength(e,t,n,r){var o,i,s,l,c=a;switch(n){case"L":return c.getLineLength(e,t,r[0],r[1]);case"C":return(0,A.getCubicArcLength)([e,r[0],r[2],r[4]],[t,r[1],r[3],r[5]],1);case"Q":return(0,A.getQuadraticArcLength)([e,r[0],r[2]],[t,r[1],r[3]],1);case"A":o=0;var u=r[4],d=r[5],f=r[4]+d,h=Math.PI/180;if(Math.abs(u-f)f;l-=h)s=c.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),o+=c.getLineLength(i.x,i.y,s.x,s.y),i=s;else for(l=u+h;l1&&(A*=Math.sqrt(d),a*=Math.sqrt(d));var f=Math.sqrt((A*A*(a*a)-A*A*(u*u)-a*a*(c*c))/(A*A*(u*u)+a*a*(c*c)));o===i&&(f*=-1),isNaN(f)&&(f=0);var h=f*A*u/a,p=f*-a*c/A,g=(e+n)/2+Math.cos(l)*h-Math.sin(l)*p,m=(t+r)/2+Math.sin(l)*h+Math.cos(l)*p,v=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},y=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(v(e)*v(t))},w=function(e,t){return(e[0]*t[1]=1&&(x=0),0===i&&x>0&&(x-=2*Math.PI),1===i&&x<0&&(x+=2*Math.PI),[g,m,A,a,b,x,l,i]}}t.Path=a,a.prototype.className="Path",a.prototype._attrsAffectingSize=["data"],(0,i._registerNode)(a),r.Factory.addGetterSetter(a,"data")},5155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Rect=void 0;const r=n(4892),o=n(4723),i=n(8871),A=n(4060),a=n(5483);class s extends o.Shape{_sceneFunc(e){var t=this.cornerRadius(),n=this.width(),r=this.height();e.beginPath(),t?A.Util.drawRoundedRectPath(e,n,r,t):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}}t.Rect=s,s.prototype.className="Rect",(0,i._registerNode)(s),r.Factory.addGetterSetter(s,"cornerRadius",0,(0,a.getNumberOrArrayOfNumbersValidator)(4))},9131:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegularPolygon=void 0;const r=n(4892),o=n(4723),i=n(5483),A=n(8871);class a extends o.Shape{_sceneFunc(e){const t=this._getPoints();e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),o=Math.max(o,e.y)})),{x:t,y:r,width:n-t,height:o-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}t.RegularPolygon=a,a.prototype.className="RegularPolygon",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["radius"],(0,A._registerNode)(a),r.Factory.addGetterSetter(a,"radius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(a,"sides",0,(0,i.getNumberValidator)())},5451:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Ring=void 0;const r=n(4892),o=n(4723),i=n(5483),A=n(8871);var a=2*Math.PI;class s extends o.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.innerRadius(),0,a,!1),e.moveTo(this.outerRadius(),0),e.arc(0,0,this.outerRadius(),a,0,!0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}t.Ring=s,s.prototype.className="Ring",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,A._registerNode)(s),r.Factory.addGetterSetter(s,"innerRadius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(s,"outerRadius",0,(0,i.getNumberValidator)())},9308:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sprite=void 0;const r=n(4892),o=n(4723),i=n(9696),A=n(5483),a=n(8871);class s extends o.Shape{constructor(e){super(e),this._updated=!0,this.anim=new i.Animation((()=>{var e=this._updated;return this._updated=!1,e})),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(e){var t=this.animation(),n=this.frameIndex(),r=4*n,o=this.animations()[t],i=this.frameOffsets(),A=o[r+0],a=o[r+1],s=o[r+2],l=o[r+3],c=this.image();if((this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(0,0,s,l),e.closePath(),e.fillStrokeShape(this)),c)if(i){var u=i[t],d=2*n;e.drawImage(c,A,a,s,l,u[d+0],u[d+1],s,l)}else e.drawImage(c,A,a,s,l,0,0,s,l)}_hitFunc(e){var t=this.animation(),n=this.frameIndex(),r=4*n,o=this.animations()[t],i=this.frameOffsets(),A=o[r+2],a=o[r+3];if(e.beginPath(),i){var s=i[t],l=2*n;e.rect(s[l+0],s[l+1],A,a)}else e.rect(0,0,A,a);e.closePath(),e.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var e=this;this.interval=setInterval((function(){e._updateIndex()}),1e3/this.frameRate())}start(){if(!this.isRunning()){var e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var e=this.frameIndex(),t=this.animation();e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Star=void 0;const r=n(4892),o=n(4723),i=n(5483),A=n(8871);class a extends o.Shape{_sceneFunc(e){var t=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();e.beginPath(),e.moveTo(0,0-n);for(var o=1;o<2*r;o++){var i=o%2==0?n:t,A=i*Math.sin(o*Math.PI/r),a=-1*i*Math.cos(o*Math.PI/r);e.lineTo(A,a)}e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}}t.Star=a,a.prototype.className="Star",a.prototype._centroid=!0,a.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,A._registerNode)(a),r.Factory.addGetterSetter(a,"numPoints",5,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(a,"innerRadius",0,(0,i.getNumberValidator)()),r.Factory.addGetterSetter(a,"outerRadius",0,(0,i.getNumberValidator)())},1958:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Text=t.stringToArray=void 0;const r=n(4060),o=n(4892),i=n(4723),A=n(8871),a=n(5483),s=n(8871);function l(e){return Array.from(e)}t.stringToArray=l;var c,u="auto",d="inherit",f="justify",h="left",p="middle",g="normal",m=" ",v="none",y=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],w=y.length;function b(){return c||(c=r.Util.createCanvasElement().getContext("2d"))}class B extends i.Shape{constructor(e){super(function(e){return(e=e||{}).fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage||(e.fill=e.fill||"black"),e}(e)),this._partialTextX=0,this._partialTextY=0;for(var t=0;t1&&(C+=a)}}}_hitFunc(e){var t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){var t=r.Util._isString(e)?e:null==e?"":e+"";return this._setAttr("text",t),this}getWidth(){return this.attrs.width===u||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===u||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return r.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(e){var t,n,r,o,i,A,a,s,l,c,u,d,f=b(),h=this.fontSize();f.save(),f.font=this._getContextFont(),d=f.measureText(e),f.restore();const p=h/100;return{actualBoundingBoxAscent:null!==(t=d.actualBoundingBoxAscent)&&void 0!==t?t:71.58203125*p,actualBoundingBoxDescent:null!==(n=d.actualBoundingBoxDescent)&&void 0!==n?n:0,actualBoundingBoxLeft:null!==(r=d.actualBoundingBoxLeft)&&void 0!==r?r:-7.421875*p,actualBoundingBoxRight:null!==(o=d.actualBoundingBoxRight)&&void 0!==o?o:75.732421875*p,alphabeticBaseline:null!==(i=d.alphabeticBaseline)&&void 0!==i?i:0,emHeightAscent:null!==(A=d.emHeightAscent)&&void 0!==A?A:100*p,emHeightDescent:null!==(a=d.emHeightDescent)&&void 0!==a?a:-20*p,fontBoundingBoxAscent:null!==(s=d.fontBoundingBoxAscent)&&void 0!==s?s:91*p,fontBoundingBoxDescent:null!==(l=d.fontBoundingBoxDescent)&&void 0!==l?l:21*p,hangingBaseline:null!==(c=d.hangingBaseline)&&void 0!==c?c:72.80000305175781*p,ideographicBaseline:null!==(u=d.ideographicBaseline)&&void 0!==u?u:-21*p,width:d.width,height:h}}_getContextFont(){return this.fontStyle()+m+this.fontVariant()+m+(this.fontSize()+"px ")+this.fontFamily().split(",").map((e=>{const t=(e=e.trim()).indexOf(" ")>=0,n=e.indexOf('"')>=0||e.indexOf("'")>=0;return t&&!n&&(e=`"${e}"`),e})).join(", ")}_addTextLine(e){this.align()===f&&(e=e.trim());var t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e){var t=this.letterSpacing(),n=e.length;return b().measureText(e).width+(n?t*(n-1):0)}_setTextData(){var e=this.text().split("\n"),t=+this.fontSize(),n=0,r=this.lineHeight()*t,o=this.attrs.width,i=this.attrs.height,A=o!==u&&void 0!==o,a=i!==u&&void 0!==i,s=this.padding(),l=o-2*s,c=i-2*s,d=0,f=this.wrap(),h="char"!==f&&f!==v,p=this.ellipsis();this.textArr=[],b().font=this._getContextFont();for(var g=p?this._getTextWidth("…"):0,y=0,w=e.length;yl)for(;B.length>0;){for(var x=0,S=B.length,E="",F=0;x>>1,U=B.slice(0,Q+1),k=this._getTextWidth(U)+g;k<=l?(x=Q+1,E=U,F=k):S=Q}if(!E)break;if(h){var I,O=B[E.length];(I=(O===m||"-"===O)&&F<=l?E.length:Math.max(E.lastIndexOf(m),E.lastIndexOf("-"))+1)>0&&(x=I,E=E.slice(0,x),F=this._getTextWidth(E))}if(E=E.trimRight(),this._addTextLine(E),n=Math.max(n,F),d+=r,this._shouldHandleEllipsis(d)){this._tryToAddEllipsisToLastLine();break}if((B=(B=B.slice(x)).trimLeft()).length>0&&(C=this._getTextWidth(B))<=l){this._addTextLine(B),d+=r,n=Math.max(n,C);break}}else this._addTextLine(B),d+=r,n=Math.max(n,C),this._shouldHandleEllipsis(d)&&yc)break}this.textHeight=t,this.textWidth=n}_shouldHandleEllipsis(e){var t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,o=r!==u&&void 0!==r,i=r-2*this.padding();return!(this.wrap()!==v)||o&&e+n>i}_tryToAddEllipsisToLastLine(){var e=this.attrs.width,t=e!==u&&void 0!==e,n=e-2*this.padding(),r=this.ellipsis(),o=this.textArr[this.textArr.length-1];o&&r&&(t&&(this._getTextWidth(o.text+"…"){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextPath=void 0;const r=n(4060),o=n(4892),i=n(4723),A=n(1486),a=n(1958),s=n(5483),l=n(8871);var c="normal";function u(e){e.fillText(this.partialText,0,0)}function d(e){e.strokeText(this.partialText,0,0)}class f extends i.Shape{constructor(e){super(e),this.dummyCanvas=r.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",(function(){this._readDataAttribute(),this._setTextData()})),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return A.Path.getPathLength(this.dataArray)}_getPointAtLength(e){return this.attrs.data?e-1>this.pathLength?null:A.Path.getPointAtLengthOfDataArray(e,this.dataArray):null}_readDataAttribute(){this.dataArray=A.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr("font",this._getContextFont()),e.setAttr("textBaseline",this.textBaseline()),e.setAttr("textAlign","left"),e.save();var t=this.textDecoration(),n=this.fill(),r=this.fontSize(),o=this.glyphInfo;"underline"===t&&e.beginPath();for(var i=0;i=1){var n=t[0].p0;e.moveTo(n.x,n.y)}for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transformer=void 0;const r=n(4060),o=n(4892),i=n(6536),A=n(4723),a=n(5155),s=n(7949),l=n(8871),c=n(5483),u=n(8871);var d="tr-konva",f=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map((e=>e+`.${d}`)).join(" "),h="nodesRect",p=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],g={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135};const m="ontouchstart"in l.Konva._global;var v=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function y(e,t,n){const r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),o=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:o}}let w=0;class b extends s.Group{constructor(e){super(e),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(f,this.update),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return r.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return d+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();const t=e.filter((e=>!e.isAncestorOf(this)||(r.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1)));return this._nodes=e=t,1===e.length&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((e=>{const t=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},n=e._attrsAffectingSize.map((e=>e+"Change."+this._getEventNamespace())).join(" ");e.on(n,t),e.on(p.map((e=>e+`.${this._getEventNamespace()}`)).join(" "),t),e.on(`absoluteTransformChange.${this._getEventNamespace()}`,t),this._proxyDrag(e)})),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,(n=>{t=e.getAbsolutePosition(),this.isDragging()||e===this.findOne(".back")||this.startDrag(n,!1)})),e.on(`dragmove.${this._getEventNamespace()}`,(n=>{if(!t)return;const r=e.getAbsolutePosition(),o=r.x-t.x,i=r.y-t.y;this.nodes().forEach((t=>{if(t===e)return;if(t.isDragging())return;const r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+o,y:r.y+i}),t.startDrag(n)})),t=null}))}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach((e=>{e.off("."+this._getEventNamespace())})),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(h),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(h,this.__getNodeRect)}__getNodeShape(e,t=this.rotation(),n){var r=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),o=e.getAbsoluteScale(n),i=e.getAbsolutePosition(n),A=r.x*o.x-e.offsetX()*o.x,a=r.y*o.y-e.offsetY()*o.y;const s=(l.Konva.getAngle(e.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return y({x:i.x+A*Math.cos(s)+a*Math.sin(-s),y:i.y+a*Math.cos(s)+A*Math.sin(s),width:r.width*o.x,height:r.height*o.y,rotation:s},-l.Konva.getAngle(t),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const e=[];this.nodes().map((t=>{const n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],o=t.getAbsoluteTransform();r.forEach((function(t){var n=o.point(t);e.push(n)}))}));const t=new r.Transform;t.rotate(-l.Konva.getAngle(this.rotation()));var n=1/0,o=1/0,i=-1/0,A=-1/0;e.forEach((function(e){var r=t.point(e);void 0===n&&(n=i=r.x,o=A=r.y),n=Math.min(n,r.x),o=Math.min(o,r.y),i=Math.max(i,r.x),A=Math.max(A,r.y)})),t.invert();const a=t.point({x:n,y:o});return{x:a.x,y:a.y,width:i-n,height:A-o,rotation:l.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),v.forEach((e=>{this._createAnchor(e)})),this._createAnchor("rotater")}_createAnchor(e){var t=new a.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:e+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:m?10:"auto"}),n=this;t.on("mousedown touchstart",(function(e){n._handleMouseDown(e)})),t.on("dragstart",(e=>{t.stopDrag(),e.cancelBubble=!0})),t.on("dragend",(e=>{e.cancelBubble=!0})),t.on("mouseenter",(()=>{var n=l.Konva.getAngle(this.rotation()),o=this.rotateAnchorCursor(),i=function(e,t,n){if("rotater"===e)return n;t+=r.Util.degToRad(g[e]||0);var o=(r.Util.radToDeg(t)%360+360)%360;return r.Util._inRange(o,337.5,360)||r.Util._inRange(o,0,22.5)?"ns-resize":r.Util._inRange(o,22.5,67.5)?"nesw-resize":r.Util._inRange(o,67.5,112.5)?"ew-resize":r.Util._inRange(o,112.5,157.5)?"nwse-resize":r.Util._inRange(o,157.5,202.5)?"ns-resize":r.Util._inRange(o,202.5,247.5)?"nesw-resize":r.Util._inRange(o,247.5,292.5)?"ew-resize":r.Util._inRange(o,292.5,337.5)?"nwse-resize":(r.Util.error("Transformer has unknown angle for cursor detection: "+o),"pointer")}(e,n,o);t.getStage().content&&(t.getStage().content.style.cursor=i),this._cursorChange=!0})),t.on("mouseout",(()=>{t.getStage().content&&(t.getStage().content.style.cursor=""),this._cursorChange=!1})),this.add(t)}_createBack(){var e=new A.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(e,t){var n=t.getParent(),o=n.padding();e.beginPath(),e.rect(-o,-o,t.width()+2*o,t.height()+2*o),e.moveTo(t.width()/2,-o),n.rotateEnabled()&&n.rotateLineVisible()&&e.lineTo(t.width()/2,-n.rotateAnchorOffset()*r.Util._sign(t.height())-o),e.fillStrokeShape(t)},hitFunc:(e,t)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+2*n,t.height()+2*n),e.fillStrokeShape(t)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",(e=>{e.cancelBubble=!0})),e.on("dragmove",(e=>{e.cancelBubble=!0})),e.on("dragend",(e=>{e.cancelBubble=!0})),this.on("dragmove",(e=>{this.update()}))}_handleMouseDown(e){if(!this._transforming){this._movingAnchorName=e.target.name().split(" ")[0];var t=this._getNodeRect(),n=t.width,r=t.height,o=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/o),this.cos=Math.abs(n/o),"undefined"!=typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var i=e.target.getAbsolutePosition(),A=e.target.getStage().getPointerPosition();this._anchorDragOffset={x:A.x-i.x,y:A.y-i.y},w++,this._fire("transformstart",{evt:e.evt,target:this.getNode()}),this._nodes.forEach((t=>{t._fire("transformstart",{evt:e.evt,target:t})}))}}_handleMouseMove(e){var t,n,r,o=this.findOne("."+this._movingAnchorName),i=o.getStage();i.setPointersPositions(e);const A=i.getPointerPosition();let a={x:A.x-this._anchorDragOffset.x,y:A.y-this._anchorDragOffset.y};const s=o.getAbsolutePosition();this.anchorDragBoundFunc()&&(a=this.anchorDragBoundFunc()(s,a,e)),o.setAbsolutePosition(a);const c=o.getAbsolutePosition();if(s.x!==c.x||s.y!==c.y)if("rotater"!==this._movingAnchorName){var u,d=this.shiftBehavior();u="inverted"===d?this.keepRatio()&&!e.shiftKey:"none"===d?this.keepRatio():this.keepRatio()||e.shiftKey;var f=this.centeredScaling()||e.altKey;if("top-left"===this._movingAnchorName){if(u){var h=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(h.x-o.x(),2)+Math.pow(h.y-o.y(),2));var p=this.findOne(".top-left").x()>h.x?-1:1,g=this.findOne(".top-left").y()>h.y?-1:1;t=r*this.cos*p,n=r*this.sin*g,this.findOne(".top-left").x(h.x-t),this.findOne(".top-left").y(h.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(o.y());else if("top-right"===this._movingAnchorName){u&&(h=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()},r=Math.sqrt(Math.pow(o.x()-h.x,2)+Math.pow(h.y-o.y(),2)),p=this.findOne(".top-right").x()h.y?-1:1,t=r*this.cos*p,n=r*this.sin*g,this.findOne(".top-right").x(h.x+t),this.findOne(".top-right").y(h.y-n));var m=o.position();this.findOne(".top-left").y(m.y),this.findOne(".bottom-right").x(m.x)}else"middle-left"===this._movingAnchorName?this.findOne(".top-left").x(o.x()):"middle-right"===this._movingAnchorName?this.findOne(".bottom-right").x(o.x()):"bottom-left"===this._movingAnchorName?(u&&(h=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()},r=Math.sqrt(Math.pow(h.x-o.x(),2)+Math.pow(o.y()-h.y,2)),p=h.x{var n;t._fire("transformend",{evt:e,target:t}),null===(n=t.getLayer())||void 0===n||n.batchDraw()})),this._movingAnchorName=null}}_fitNodesInto(e,t){var n=this._getNodeRect();if(r.Util._inRange(e.width,2*-this.padding()-1,1))return void this.update();if(r.Util._inRange(e.height,2*-this.padding()-1,1))return void this.update();var o=new r.Transform;if(o.rotate(l.Konva.getAngle(this.rotation())),this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("left")>=0){const t=o.point({x:2*-this.padding(),y:0});e.x+=t.x,e.y+=t.y,e.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf("right")>=0){const t=o.point({x:2*this.padding(),y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.width+=2*this.padding()}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("top")>=0){const t=o.point({x:0,y:2*-this.padding()});e.x+=t.x,e.y+=t.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding()}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const t=o.point({x:0,y:2*this.padding()});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=t.x,this._anchorDragOffset.y-=t.y,e.height+=2*this.padding()}if(this.boundBoxFunc()){const t=this.boundBoxFunc()(n,e);t?e=t:r.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const i=1e7,A=new r.Transform;A.translate(n.x,n.y),A.rotate(n.rotation),A.scale(n.width/i,n.height/i);const a=new r.Transform,s=e.width/i,c=e.height/i;!1===this.flipEnabled()?(a.translate(e.x,e.y),a.rotate(e.rotation),a.translate(e.width<0?e.width:0,e.height<0?e.height:0),a.scale(Math.abs(s),Math.abs(c))):(a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(s,c));const u=a.multiply(A.invert());this._nodes.forEach((e=>{var t;const n=e.getParent().getAbsoluteTransform(),o=e.getTransform().copy();o.translate(e.offsetX(),e.offsetY());const i=new r.Transform;i.multiply(n.copy().invert()).multiply(u).multiply(n).multiply(o);const A=i.decompose();e.setAttrs(A),null===(t=e.getLayer())||void 0===t||t.batchDraw()})),this.rotation(r.Util._getRotation(e.rotation)),this._nodes.forEach((e=>{this._fire("transform",{evt:t,target:e}),e._fire("transform",{evt:t,target:e})})),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(e,t){this.findOne(e).setAttrs(t)}update(){var e,t=this._getNodeRect();this.rotation(r.Util._getRotation(t.rotation));var n=t.width,o=t.height,i=this.enabledAnchors(),A=this.resizeEnabled(),a=this.padding(),s=this.anchorSize();const l=this.find("._anchor");l.forEach((e=>{e.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})})),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:s/2+a,offsetY:s/2+a,visible:A&&i.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:s/2+a,visible:A&&i.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:s/2-a,offsetY:s/2+a,visible:A&&i.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:o/2,offsetX:s/2+a,visible:A&&i.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:o/2,offsetX:s/2-a,visible:A&&i.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:o,offsetX:s/2+a,offsetY:s/2-a,visible:A&&i.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:o,offsetY:s/2-a,visible:A&&i.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:o,offsetX:s/2-a,offsetY:s/2-a,visible:A&&i.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*r.Util._sign(o)-a,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:o,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const c=this.anchorStyleFunc();c&&l.forEach((e=>{c(e)})),null===(e=this.getLayer())||void 0===e||e.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var e=this.findOne("."+this._movingAnchorName);e&&e.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),s.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return i.Node.prototype.toObject.call(this)}clone(e){return i.Node.prototype.clone.call(this,e)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}t.Transformer=b,b.isTransforming=()=>w>0,b.prototype.className="Transformer",(0,u._registerNode)(b),o.Factory.addGetterSetter(b,"enabledAnchors",v,(function(e){return e instanceof Array||r.Util.warn("enabledAnchors value should be an array"),e instanceof Array&&e.forEach((function(e){-1===v.indexOf(e)&&r.Util.warn("Unknown anchor name: "+e+". Available names are: "+v.join(", "))})),e||[]})),o.Factory.addGetterSetter(b,"flipEnabled",!0,(0,c.getBooleanValidator)()),o.Factory.addGetterSetter(b,"resizeEnabled",!0),o.Factory.addGetterSetter(b,"anchorSize",10,(0,c.getNumberValidator)()),o.Factory.addGetterSetter(b,"rotateEnabled",!0),o.Factory.addGetterSetter(b,"rotateLineVisible",!0),o.Factory.addGetterSetter(b,"rotationSnaps",[]),o.Factory.addGetterSetter(b,"rotateAnchorOffset",50,(0,c.getNumberValidator)()),o.Factory.addGetterSetter(b,"rotateAnchorCursor","crosshair"),o.Factory.addGetterSetter(b,"rotationSnapTolerance",5,(0,c.getNumberValidator)()),o.Factory.addGetterSetter(b,"borderEnabled",!0),o.Factory.addGetterSetter(b,"anchorStroke","rgb(0, 161, 255)"),o.Factory.addGetterSetter(b,"anchorStrokeWidth",1,(0,c.getNumberValidator)()),o.Factory.addGetterSetter(b,"anchorFill","white"),o.Factory.addGetterSetter(b,"anchorCornerRadius",0,(0,c.getNumberValidator)()),o.Factory.addGetterSetter(b,"borderStroke","rgb(0, 161, 255)"),o.Factory.addGetterSetter(b,"borderStrokeWidth",1,(0,c.getNumberValidator)()),o.Factory.addGetterSetter(b,"borderDash"),o.Factory.addGetterSetter(b,"keepRatio",!0),o.Factory.addGetterSetter(b,"shiftBehavior","default"),o.Factory.addGetterSetter(b,"centeredScaling",!1),o.Factory.addGetterSetter(b,"ignoreStroke",!1),o.Factory.addGetterSetter(b,"padding",0,(0,c.getNumberValidator)()),o.Factory.addGetterSetter(b,"node"),o.Factory.addGetterSetter(b,"nodes"),o.Factory.addGetterSetter(b,"boundBoxFunc"),o.Factory.addGetterSetter(b,"anchorDragBoundFunc"),o.Factory.addGetterSetter(b,"anchorStyleFunc"),o.Factory.addGetterSetter(b,"shouldOverdrawWholeArea",!1),o.Factory.addGetterSetter(b,"useSingleNodeRotation",!0),o.Factory.backCompat(b,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"})},8001:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wedge=void 0;const r=n(4892),o=n(4723),i=n(8871),A=n(5483),a=n(8871);class s extends o.Shape{_sceneFunc(e){e.beginPath(),e.arc(0,0,this.radius(),0,i.Konva.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}}t.Wedge=s,s.prototype.className="Wedge",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radius"],(0,a._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,A.getNumberValidator)()),r.Factory.addGetterSetter(s,"angle",0,(0,A.getNumberValidator)()),r.Factory.addGetterSetter(s,"clockwise",!1),r.Factory.backCompat(s,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})},8859:(e,t,n)=>{var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,A=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&s&&"function"==typeof s.get?s.get:null,c=a&&Set.prototype.forEach,u="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,p=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,w=String.prototype.toUpperCase,b=String.prototype.toLowerCase,B=RegExp.prototype.test,C=Array.prototype.concat,x=Array.prototype.join,S=Array.prototype.slice,E=Math.floor,F="function"==typeof BigInt?BigInt.prototype.valueOf:null,Q=Object.getOwnPropertySymbols,U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,k="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,O=Object.prototype.propertyIsEnumerable,P=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function T(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||B.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-E(-e):E(e);if(r!==e){var o=String(r),i=v.call(t,o.length+1);return y.call(o,n,"$&_")+"."+y.call(y.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var H=n(2634),L=H.custom,_=j(L)?L:null;function R(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function N(e){return y.call(String(e),/"/g,""")}function M(e){return!("[object Array]"!==V(e)||I&&"object"==typeof e&&I in e)}function D(e){return!("[object RegExp]"!==V(e)||I&&"object"==typeof e&&I in e)}function j(e){if(k)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!U)return!1;try{return U.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,a){var s=r||{};if(K(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(K(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var p=!K(s,"customInspect")||s.customInspect;if("boolean"!=typeof p&&"symbol"!==p)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(K(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(K(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return W(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var B=String(t);return w?T(t,B):B}if("bigint"==typeof t){var E=String(t)+"n";return w?T(t,E):E}var Q=void 0===s.depth?5:s.depth;if(void 0===o&&(o=0),o>=Q&&Q>0&&"object"==typeof t)return M(t)?"[Array]":"[Object]";var L,G=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=x.call(Array(e.indent+1)," ")}return{base:n,prev:x.call(Array(t+1),n)}}(s,o);if(void 0===a)a=[];else if(z(a,t)>=0)return"[Circular]";function X(t,n,r){if(n&&(a=S.call(a)).push(n),r){var i={depth:s.depth};return K(s,"quoteStyle")&&(i.quoteStyle=s.quoteStyle),e(t,i,o+1,a)}return e(t,s,o+1,a)}if("function"==typeof t&&!D(t)){var ee=function(e){if(e.name)return e.name;var t=m.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=Z(t,X);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+x.call(te,", ")+" }":"")}if(j(t)){var ne=k?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):U.call(t);return"object"!=typeof t||k?ne:$(ne)}if((L=t)&&"object"==typeof L&&("undefined"!=typeof HTMLElement&&L instanceof HTMLElement||"string"==typeof L.nodeName&&"function"==typeof L.getAttribute)){for(var re="<"+b.call(String(t.nodeName)),oe=t.attributes||[],ie=0;ie"}if(M(t)){if(0===t.length)return"[]";var Ae=Z(t,X);return G&&!function(e){for(var t=0;t=0)return!1;return!0}(Ae)?"["+q(Ae,G)+"]":"[ "+x.call(Ae,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||I&&"object"==typeof e&&I in e)}(t)){var ae=Z(t,X);return"cause"in Error.prototype||!("cause"in t)||O.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+x.call(ae,", ")+" }":"{ ["+String(t)+"] "+x.call(C.call("[cause]: "+X(t.cause),ae),", ")+" }"}if("object"==typeof t&&p){if(_&&"function"==typeof t[_]&&H)return H(t,{depth:Q-o});if("symbol"!==p&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var se=[];return A&&A.call(t,(function(e,n){se.push(X(n,t,!0)+" => "+X(e,t))})),J("Map",i.call(t),se,G)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var le=[];return c&&c.call(t,(function(e){le.push(X(e,t))})),J("Set",l.call(t),le,G)}if(function(e){if(!u||!e||"object"!=typeof e)return!1;try{u.call(e,u);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Y("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{u.call(e,u)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==V(e)||I&&"object"==typeof e&&I in e)}(t))return $(X(Number(t)));if(function(e){if(!e||"object"!=typeof e||!F)return!1;try{return F.call(e),!0}catch(e){}return!1}(t))return $(X(F.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||I&&"object"==typeof e&&I in e)}(t))return $(h.call(t));if(function(e){return!("[object String]"!==V(e)||I&&"object"==typeof e&&I in e)}(t))return $(X(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==n.g&&t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==V(e)||I&&"object"==typeof e&&I in e)}(t)&&!D(t)){var ce=Z(t,X),ue=P?P(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",fe=!ue&&I&&Object(t)===t&&I in t?v.call(V(t),8,-1):de?"Object":"",he=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||de?"["+x.call(C.call([],fe||[],de||[]),": ")+"] ":"");return 0===ce.length?he+"{}":G?he+"{"+q(ce,G)+"}":he+"{ "+x.call(ce,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function K(e,t){return G.call(e,t)}function V(e){return p.call(e)}function z(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return W(v.call(e,0,t.maxStringLength),t)+r}return R(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",t)}function X(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function $(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function J(e,t,n,r){return e+" ("+t+") {"+(r?q(n,r):x.call(n,", "))+"}"}function q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+x.call(e,","+n)+"\n"+t.prev}function Z(e,t){var n=M(e),r=[];if(n){r.length=e.length;for(var o=0;o{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},5373:(e,t,n)=>{"use strict";var r=n(8636),o=n(2642),i=n(4765);e.exports={formats:i,parse:o,stringify:r}},2642:(e,t,n)=>{"use strict";var r=n(7720),o=Object.prototype.hasOwnProperty,i=Array.isArray,A={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,A=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=a?i.slice(0,a.index):i,c=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var u=0;n.depth>0&&null!==(a=A.exec(i))&&u=0;--i){var A,a=e[i];if("[]"===a&&n.parseArrays)A=n.allowEmptyArrays&&(""===o||n.strictNullHandling&&null===o)?[]:[].concat(o);else{A=n.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&a!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(A=[])[u]=o:"__proto__"!==c&&(A[c]=o):A={0:o}}o=A}return o}(c,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return A;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?A.charset:e.charset,n=void 0===e.duplicates?A.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||A.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:A.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:A.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:A.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:A.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:A.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:A.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:A.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:A.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:A.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:A.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:A.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:A.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:A.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:A.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:A.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var c="string"==typeof e?function(e,t){var n={__proto__:null},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;l=l.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var c,u=t.parameterLimit===1/0?void 0:t.parameterLimit,d=l.split(t.delimiter,u),f=-1,h=t.charset;if(t.charsetSentinel)for(c=0;c-1&&(g=i(g)?[g]:g);var w=o.call(n,p);w&&"combine"===t.duplicates?n[p]=r.combine(n[p],g):w&&"last"!==t.duplicates||(n[p]=g)}return n}(e,n):e,u=n.plainObjects?Object.create(null):{},d=Object.keys(c),f=0;f{"use strict";var r=n(920),o=n(7720),i=n(4765),A=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,l=Array.prototype.push,c=function(e,t){l.apply(e,s(t)?t:[t])},u=Date.prototype.toISOString,d=i.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:o.encode,encodeValuesOnly:!1,format:d,formatter:i.formatters[d],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},h={},p=function e(t,n,i,A,a,l,u,d,p,g,m,v,y,w,b,B,C,x){for(var S,E=t,F=x,Q=0,U=!1;void 0!==(F=F.get(h))&&!U;){var k=F.get(t);if(Q+=1,void 0!==k){if(k===Q)throw new RangeError("Cyclic object value");U=!0}void 0===F.get(h)&&(Q=0)}if("function"==typeof g?E=g(n,E):E instanceof Date?E=y(E):"comma"===i&&s(E)&&(E=o.maybeMap(E,(function(e){return e instanceof Date?y(e):e}))),null===E){if(l)return p&&!B?p(n,f.encoder,C,"key",w):n;E=""}if("string"==typeof(S=E)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||o.isBuffer(E))return p?[b(B?n:p(n,f.encoder,C,"key",w))+"="+b(p(E,f.encoder,C,"value",w))]:[b(n)+"="+b(String(E))];var I,O=[];if(void 0===E)return O;if("comma"===i&&s(E))B&&p&&(E=o.maybeMap(E,p)),I=[{value:E.length>0?E.join(",")||null:void 0}];else if(s(g))I=g;else{var P=Object.keys(E);I=m?P.sort(m):P}var T=d?n.replace(/\./g,"%2E"):n,H=A&&s(E)&&1===E.length?T+"[]":T;if(a&&s(E)&&0===E.length)return H+"[]";for(var L=0;L0?w+y:""}},7720:(e,t,n)=>{"use strict";var r=n(4765),o=Object.prototype.hasOwnProperty,i=Array.isArray,A=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o=s?a.slice(c,c+s):a,d=[],f=0;f=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||i===r.RFC1738&&(40===h||41===h)?d[d.length]=u.charAt(f):h<128?d[d.length]=A[h]:h<2048?d[d.length]=A[192|h>>6]+A[128|63&h]:h<55296||h>=57344?d[d.length]=A[224|h>>12]+A[128|h>>6&63]+A[128|63&h]:(f+=1,h=65536+((1023&h)<<10|1023&u.charCodeAt(f)),d[d.length]=A[240|h>>18]+A[128|h>>12&63]+A[128|h>>6&63]+A[128|63&h])}l+=d.join("")}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy");Symbol.for("react.offscreen");function p(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case A:case i:case u:case d:return e;default:switch(e=e&&e.$$typeof){case l:case s:case c:case h:case f:case a:return e;default:return t}}case r:return t}}}Symbol.for("react.module.reference"),t.ForwardRef=c,t.isFragment=function(e){return p(e)===o},t.isMemo=function(e){return p(e)===f}},6351:(e,t,n)=>{"use strict";e.exports=n(7787)},2551:(e,t,n)=>{"use strict";var r=n(6540),o=n(9982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n