@konfuzio/document-validation-ui 0.1.35 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,5 +43,5 @@ var i=Object.freeze({}),r=Array.isArray;function a(t){return void 0===t||null===
43
43
  * (c) 2021 Evan You
44
44
  * @license MIT
45
45
  */
46
- function i(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:i});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[i].concat(t.init):i,n.call(this,t)}}function i(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}n.d(e,{Se:()=>N,ZP:()=>X,nv:()=>$,rn:()=>R});var r="undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:{},a=r.__VUE_DEVTOOLS_GLOBAL_HOOK__;function o(t){a&&(t._devtoolHook=a,a.emit("vuex:init",t),a.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){a.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){a.emit("vuex:action",t,e)}),{prepend:!0}))}function s(t,e){return t.filter(e)[0]}function c(t,e){if(void 0===e&&(e=[]),null===t||"object"!==typeof t)return t;var n=s(e,(function(e){return e.original===t}));if(n)return n.copy;var i=Array.isArray(t)?[]:{};return e.push({original:t,copy:i}),Object.keys(t).forEach((function(n){i[n]=c(t[n],e)})),i}function l(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function u(t){return null!==t&&"object"===typeof t}function h(t){return t&&"function"===typeof t.then}function d(t,e){return function(){return t(e)}}var f=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},p={namespaced:{configurable:!0}};p.namespaced.get=function(){return!!this._rawModule.namespaced},f.prototype.addChild=function(t,e){this._children[t]=e},f.prototype.removeChild=function(t){delete this._children[t]},f.prototype.getChild=function(t){return this._children[t]},f.prototype.hasChild=function(t){return t in this._children},f.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},f.prototype.forEachChild=function(t){l(this._children,t)},f.prototype.forEachGetter=function(t){this._rawModule.getters&&l(this._rawModule.getters,t)},f.prototype.forEachAction=function(t){this._rawModule.actions&&l(this._rawModule.actions,t)},f.prototype.forEachMutation=function(t){this._rawModule.mutations&&l(this._rawModule.mutations,t)},Object.defineProperties(f.prototype,p);var v=function(t){this.register([],t,!1)};function m(t,e,n){if(e.update(n),n.modules)for(var i in n.modules){if(!e.getChild(i))return void 0;m(t.concat(i),e.getChild(i),n.modules[i])}}v.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},v.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},v.prototype.update=function(t){m([],this.root,t)},v.prototype.register=function(t,e,n){var i=this;void 0===n&&(n=!0);var r=new f(e,n);if(0===t.length)this.root=r;else{var a=this.get(t.slice(0,-1));a.addChild(t[t.length-1],r)}e.modules&&l(e.modules,(function(e,r){i.register(t.concat(r),e,n)}))},v.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],i=e.getChild(n);i&&i.runtime&&e.removeChild(n)},v.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var g;var y=function(t){var e=this;void 0===t&&(t={}),!g&&"undefined"!==typeof window&&window.Vue&&M(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var i=t.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new v(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new g,this._makeLocalGettersCache=Object.create(null);var r=this,a=this,s=a.dispatch,c=a.commit;this.dispatch=function(t,e){return s.call(r,t,e)},this.commit=function(t,e,n){return c.call(r,t,e,n)},this.strict=i;var l=this._modules.root.state;S(this,l,[],this._modules.root),k(this,l),n.forEach((function(t){return t(e)}));var u=void 0!==t.devtools?t.devtools:g.config.devtools;u&&o(this)},b={state:{configurable:!0}};function _(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function w(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;S(t,n,[],t._modules.root,!0),k(t,n,e)}function k(t,e,n){var i=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var r=t._wrappedGetters,a={};l(r,(function(e,n){a[n]=d(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var o=g.config.silent;g.config.silent=!0,t._vm=new g({data:{$$state:e},computed:a}),g.config.silent=o,t.strict&&E(t),i&&(n&&t._withCommit((function(){i._data.$$state=null})),g.nextTick((function(){return i.$destroy()})))}function S(t,e,n,i,r){var a=!n.length,o=t._modules.getNamespace(n);if(i.namespaced&&(t._modulesNamespaceMap[o],t._modulesNamespaceMap[o]=i),!a&&!r){var s=A(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){g.set(s,c,i.state)}))}var l=i.context=x(t,o,n);i.forEachMutation((function(e,n){var i=o+n;D(t,i,e,l)})),i.forEachAction((function(e,n){var i=e.root?n:o+n,r=e.handler||e;T(t,i,r,l)})),i.forEachGetter((function(e,n){var i=o+n;O(t,i,e,l)})),i.forEachChild((function(i,a){S(t,e,n.concat(a),i,r)}))}function x(t,e,n){var i=""===e,r={dispatch:i?t.dispatch:function(n,i,r){var a=P(n,i,r),o=a.payload,s=a.options,c=a.type;return s&&s.root||(c=e+c),t.dispatch(c,o)},commit:i?t.commit:function(n,i,r){var a=P(n,i,r),o=a.payload,s=a.options,c=a.type;s&&s.root||(c=e+c),t.commit(c,o,s)}};return Object.defineProperties(r,{getters:{get:i?function(){return t.getters}:function(){return C(t,e)}},state:{get:function(){return A(t.state,n)}}}),r}function C(t,e){if(!t._makeLocalGettersCache[e]){var n={},i=e.length;Object.keys(t.getters).forEach((function(r){if(r.slice(0,i)===e){var a=r.slice(i);Object.defineProperty(n,a,{get:function(){return t.getters[r]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function D(t,e,n,i){var r=t._mutations[e]||(t._mutations[e]=[]);r.push((function(e){n.call(t,i.state,e)}))}function T(t,e,n,i){var r=t._actions[e]||(t._actions[e]=[]);r.push((function(e){var r=n.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e);return h(r)||(r=Promise.resolve(r)),t._devtoolHook?r.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):r}))}function O(t,e,n,i){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(i.state,i.getters,t.state,t.getters)})}function E(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function A(t,e){return e.reduce((function(t,e){return t[e]}),t)}function P(t,e,n){return u(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function M(t){g&&t===g||(g=t,i(g))}b.state.get=function(){return this._vm._data.$$state},b.state.set=function(t){0},y.prototype.commit=function(t,e,n){var i=this,r=P(t,e,n),a=r.type,o=r.payload,s=(r.options,{type:a,payload:o}),c=this._mutations[a];c&&(this._withCommit((function(){c.forEach((function(t){t(o)}))})),this._subscribers.slice().forEach((function(t){return t(s,i.state)})))},y.prototype.dispatch=function(t,e){var n=this,i=P(t,e),r=i.type,a=i.payload,o={type:r,payload:a},s=this._actions[r];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(o,n.state)}))}catch(l){0}var c=s.length>1?Promise.all(s.map((function(t){return t(a)}))):s[0](a);return new Promise((function(t,e){c.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(o,n.state)}))}catch(l){0}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(o,n.state,t)}))}catch(l){0}e(t)}))}))}},y.prototype.subscribe=function(t,e){return _(t,this._subscribers,e)},y.prototype.subscribeAction=function(t,e){var n="function"===typeof t?{before:t}:t;return _(n,this._actionSubscribers,e)},y.prototype.watch=function(t,e,n){var i=this;return this._watcherVM.$watch((function(){return t(i.state,i.getters)}),e,n)},y.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},y.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),S(this,this.state,t,this._modules.get(t),n.preserveState),k(this,this.state)},y.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=A(e.state,t.slice(0,-1));g.delete(n,t[t.length-1])})),w(this)},y.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},y.prototype.hotUpdate=function(t){this._modules.update(t),w(this,!0)},y.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(y.prototype,b);var R=j((function(t,e){var n={};return F(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var i=z(this.$store,"mapState",t);if(!i)return;e=i.context.state,n=i.context.getters}return"function"===typeof r?r.call(this,e,n):e[r]},n[i].vuex=!0})),n})),I=j((function(t,e){var n={};return F(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var i=this.$store.commit;if(t){var a=z(this.$store,"mapMutations",t);if(!a)return;i=a.context.commit}return"function"===typeof r?r.apply(this,[i].concat(e)):i.apply(this.$store,[r].concat(e))}})),n})),N=j((function(t,e){var n={};return F(e).forEach((function(e){var i=e.key,r=e.val;r=t+r,n[i]=function(){if(!t||z(this.$store,"mapGetters",t))return this.$store.getters[r]},n[i].vuex=!0})),n})),$=j((function(t,e){var n={};return F(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var i=this.$store.dispatch;if(t){var a=z(this.$store,"mapActions",t);if(!a)return;i=a.context.dispatch}return"function"===typeof r?r.apply(this,[i].concat(e)):i.apply(this.$store,[r].concat(e))}})),n})),L=function(t){return{mapState:R.bind(null,t),mapGetters:N.bind(null,t),mapMutations:I.bind(null,t),mapActions:$.bind(null,t)}};function F(t){return B(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function B(t){return Array.isArray(t)||u(t)}function j(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function z(t,e,n){var i=t._modulesNamespaceMap[n];return i}function H(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var i=t.transformer;void 0===i&&(i=function(t){return t});var r=t.mutationTransformer;void 0===r&&(r=function(t){return t});var a=t.actionFilter;void 0===a&&(a=function(t,e){return!0});var o=t.actionTransformer;void 0===o&&(o=function(t){return t});var s=t.logMutations;void 0===s&&(s=!0);var l=t.logActions;void 0===l&&(l=!0);var u=t.logger;return void 0===u&&(u=console),function(t){var h=c(t.state);"undefined"!==typeof u&&(s&&t.subscribe((function(t,a){var o=c(a);if(n(t,h,o)){var s=W(),l=r(t),d="mutation "+t.type+s;V(u,d,e),u.log("%c prev state","color: #9E9E9E; font-weight: bold",i(h)),u.log("%c mutation","color: #03A9F4; font-weight: bold",l),u.log("%c next state","color: #4CAF50; font-weight: bold",i(o)),G(u)}h=o})),l&&t.subscribeAction((function(t,n){if(a(t,n)){var i=W(),r=o(t),s="action "+t.type+i;V(u,s,e),u.log("%c action","color: #03A9F4; font-weight: bold",r),G(u)}})))}}function V(t,e,n){var i=n?t.groupCollapsed:t.group;try{i.call(t,e)}catch(r){t.log(e)}}function G(t){try{t.groupEnd()}catch(e){t.log("—— log end ——")}}function W(){var t=new Date;return" @ "+Y(t.getHours(),2)+":"+Y(t.getMinutes(),2)+":"+Y(t.getSeconds(),2)+"."+Y(t.getMilliseconds(),3)}function U(t,e){return new Array(e+1).join(t)}function Y(t,e){return U("0",e-t.toString().length)+t}var q={Store:y,install:M,version:"3.6.2",mapState:R,mapMutations:I,mapGetters:N,mapActions:$,createNamespacedHelpers:L,createLogger:H};const X=q},636:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){return f(t)||v(t,e)||m(t,e)||b()}function h(t){return d(t)||p(t)||m(t)||y()}function d(t){if(Array.isArray(t))return g(t)}function f(t){if(Array.isArray(t))return t}function p(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function v(t,e){var n=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(i=n.next()).done);o=!0)if(a.push(i.value),e&&a.length===e)break}catch(c){s=!0,r=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(s)throw r}}return a}}function m(t,e){if(t){if("string"===typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Qc:()=>hi,fL:()=>fi,qv:()=>di,vI:()=>ui,vc:()=>li});var _=function(){},w={},k={},S=null,x={mark:_,measure:_};try{"undefined"!==typeof window&&(w=window),"undefined"!==typeof document&&(k=document),"undefined"!==typeof MutationObserver&&(S=MutationObserver),"undefined"!==typeof performance&&(x=performance)}catch(pi){}var C,D,T,O,E,A=w.navigator||{},P=A.userAgent,M=void 0===P?"":P,R=w,I=k,N=S,$=x,L=(R.document,!!I.documentElement&&!!I.head&&"function"===typeof I.addEventListener&&"function"===typeof I.createElement),F=~M.indexOf("MSIE")||~M.indexOf("Trident/"),B="___FONT_AWESOME___",j=16,z="fa",H="svg-inline--fa",V="data-fa-i2svg",G="data-fa-pseudo-element",W="data-fa-pseudo-element-pending",U="data-prefix",Y="data-icon",q="fontawesome-i2svg",X="async",K=["HTML","HEAD","STYLE","SCRIPT"],J=function(){try{return!0}catch(pi){return!1}}(),Z="classic",Q="sharp",tt=[Z,Q];function et(t){return new Proxy(t,{get:function(t,e){return e in t?t[e]:t[Z]}})}var nt=et((C={},l(C,Z,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit"}),l(C,Q,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular"}),C)),it=et((D={},l(D,Z,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),l(D,Q,{solid:"fass",regular:"fasr"}),D)),rt=et((T={},l(T,Z,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),l(T,Q,{fass:"fa-solid",fasr:"fa-regular"}),T)),at=et((O={},l(O,Z,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),l(O,Q,{"fa-solid":"fass","fa-regular":"fasr"}),O)),ot=/fa(s|r|l|t|d|b|k|ss|sr)?[\-\ ]/,st="fa-layers-text",ct=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,lt=et((E={},l(E,Z,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),l(E,Q,{900:"fass",400:"fasr"}),E)),ut=[1,2,3,4,5,6,7,8,9,10],ht=ut.concat([11,12,13,14,15,16,17,18,19,20]),dt=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],ft={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},pt=new Set;Object.keys(it[Z]).map(pt.add.bind(pt)),Object.keys(it[Q]).map(pt.add.bind(pt));var vt=[].concat(tt,h(pt),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",ft.GROUP,ft.SWAP_OPACITY,ft.PRIMARY,ft.SECONDARY]).concat(ut.map((function(t){return"".concat(t,"x")}))).concat(ht.map((function(t){return"w-".concat(t)}))),mt=R.FontAwesomeConfig||{};function gt(t){var e=I.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}function yt(t){return""===t||"false"!==t&&("true"===t||t)}if(I&&"function"===typeof I.querySelector){var bt=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];bt.forEach((function(t){var e=u(t,2),n=e[0],i=e[1],r=yt(gt(n));void 0!==r&&null!==r&&(mt[i]=r)}))}var _t={styleDefault:"solid",familyDefault:"classic",cssPrefix:z,replacementClass:H,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};mt.familyPrefix&&(mt.cssPrefix=mt.familyPrefix);var wt=r(r({},_t),mt);wt.autoReplaceSvg||(wt.observeMutations=!1);var kt={};Object.keys(_t).forEach((function(t){Object.defineProperty(kt,t,{enumerable:!0,set:function(e){wt[t]=e,St.forEach((function(t){return t(kt)}))},get:function(){return wt[t]}})})),Object.defineProperty(kt,"familyPrefix",{enumerable:!0,set:function(t){wt.cssPrefix=t,St.forEach((function(t){return t(kt)}))},get:function(){return wt.cssPrefix}}),R.FontAwesomeConfig=kt;var St=[];function xt(t){return St.push(t),function(){St.splice(St.indexOf(t),1)}}var Ct=j,Dt={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Tt(t){if(t&&L){var e=I.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var n=I.head.childNodes,i=null,r=n.length-1;r>-1;r--){var a=n[r],o=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(i=a)}return I.head.insertBefore(e,i),t}}var Ot="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Et(){var t=12,e="";while(t-- >0)e+=Ot[62*Math.random()|0];return e}function At(t){for(var e=[],n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function Pt(t){return t.classList?At(t.classList):(t.getAttribute("class")||"").split(" ").filter((function(t){return t}))}function Mt(t){return"".concat(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Rt(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,'="').concat(Mt(t[n]),'" ')}),"").trim()}function It(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,": ").concat(t[n].trim(),";")}),"")}function Nt(t){return t.size!==Dt.size||t.x!==Dt.x||t.y!==Dt.y||t.rotate!==Dt.rotate||t.flipX||t.flipY}function $t(t){var e=t.transform,n=t.containerWidth,i=t.iconWidth,r={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(32*e.x,", ").concat(32*e.y,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),s="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(a," ").concat(o," ").concat(s)},l={transform:"translate(".concat(i/2*-1," -256)")};return{outer:r,inner:c,path:l}}function Lt(t){var e=t.transform,n=t.width,i=void 0===n?j:n,r=t.height,a=void 0===r?j:r,o=t.startCentered,s=void 0!==o&&o,c="";return c+=s&&F?"translate(".concat(e.x/Ct-i/2,"em, ").concat(e.y/Ct-a/2,"em) "):s?"translate(calc(-50% + ".concat(e.x/Ct,"em), calc(-50% + ").concat(e.y/Ct,"em)) "):"translate(".concat(e.x/Ct,"em, ").concat(e.y/Ct,"em) "),c+="scale(".concat(e.size/Ct*(e.flipX?-1:1),", ").concat(e.size/Ct*(e.flipY?-1:1),") "),c+="rotate(".concat(e.rotate,"deg) "),c}var Ft=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';function Bt(){var t=z,e=H,n=kt.cssPrefix,i=kt.replacementClass,r=Ft;if(n!==t||i!==e){var a=new RegExp("\\.".concat(t,"\\-"),"g"),o=new RegExp("\\--".concat(t,"\\-"),"g"),s=new RegExp("\\.".concat(e),"g");r=r.replace(a,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(s,".".concat(i))}return r}var jt=!1;function zt(){kt.autoAddCss&&!jt&&(Tt(Bt()),jt=!0)}var Ht={mixout:function(){return{dom:{css:Bt,insertCss:zt}}},hooks:function(){return{beforeDOMElementCreation:function(){zt()},beforeI2svg:function(){zt()}}}},Vt=R||{};Vt[B]||(Vt[B]={}),Vt[B].styles||(Vt[B].styles={}),Vt[B].hooks||(Vt[B].hooks={}),Vt[B].shims||(Vt[B].shims=[]);var Gt=Vt[B],Wt=[],Ut=function t(){I.removeEventListener("DOMContentLoaded",t),Yt=1,Wt.map((function(t){return t()}))},Yt=!1;function qt(t){L&&(Yt?setTimeout(t,0):Wt.push(t))}function Xt(t){var e=t.tag,n=t.attributes,i=void 0===n?{}:n,r=t.children,a=void 0===r?[]:r;return"string"===typeof t?Mt(t):"<".concat(e," ").concat(Rt(i),">").concat(a.map(Xt).join(""),"</").concat(e,">")}function Kt(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}L&&(Yt=(I.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(I.readyState),Yt||I.addEventListener("DOMContentLoaded",Ut));var Jt=function(t,e){return function(n,i,r,a){return t.call(e,n,i,r,a)}},Zt=function(t,e,n,i){var r,a,o,s=Object.keys(t),c=s.length,l=void 0!==i?Jt(e,i):e;for(void 0===n?(r=1,o=t[s[0]]):(r=0,o=n);r<c;r++)a=s[r],o=l(o,t[a],a,t);return o};function Qt(t){var e=[],n=0,i=t.length;while(n<i){var r=t.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){var a=t.charCodeAt(n++);56320==(64512&a)?e.push(((1023&r)<<10)+(1023&a)+65536):(e.push(r),n--)}else e.push(r)}return e}function te(t){var e=Qt(t);return 1===e.length?e[0].toString(16):null}function ee(t,e){var n,i=t.length,r=t.charCodeAt(e);return r>=55296&&r<=56319&&i>e+1&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?1024*(r-55296)+n-56320+65536:r}function ne(t){return Object.keys(t).reduce((function(e,n){var i=t[n],r=!!i.icon;return r?e[i.iconName]=i.icon:e[n]=i,e}),{})}function ie(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.skipHooks,a=void 0!==i&&i,o=ne(e);"function"!==typeof Gt.hooks.addPack||a?Gt.styles[t]=r(r({},Gt.styles[t]||{}),o):Gt.hooks.addPack(t,ne(e)),"fas"===t&&ie("fa",e)}var re,ae,oe,se=Gt.styles,ce=Gt.shims,le=(re={},l(re,Z,Object.values(rt[Z])),l(re,Q,Object.values(rt[Q])),re),ue=null,he={},de={},fe={},pe={},ve={},me=(ae={},l(ae,Z,Object.keys(nt[Z])),l(ae,Q,Object.keys(nt[Q])),ae);function ge(t){return~vt.indexOf(t)}function ye(t,e){var n=e.split("-"),i=n[0],r=n.slice(1).join("-");return i!==t||""===r||ge(r)?null:r}var be=function(){var t=function(t){return Zt(se,(function(e,n,i){return e[i]=Zt(n,t,{}),e}),{})};he=t((function(t,e,n){if(e[3]&&(t[e[3]]=n),e[2]){var i=e[2].filter((function(t){return"number"===typeof t}));i.forEach((function(e){t[e.toString(16)]=n}))}return t})),de=t((function(t,e,n){if(t[n]=n,e[2]){var i=e[2].filter((function(t){return"string"===typeof t}));i.forEach((function(e){t[e]=n}))}return t})),ve=t((function(t,e,n){var i=e[2];return t[n]=n,i.forEach((function(e){t[e]=n})),t}));var e="far"in se||kt.autoFetchSvg,n=Zt(ce,(function(t,n){var i=n[0],r=n[1],a=n[2];return"far"!==r||e||(r="fas"),"string"===typeof i&&(t.names[i]={prefix:r,iconName:a}),"number"===typeof i&&(t.unicodes[i.toString(16)]={prefix:r,iconName:a}),t}),{names:{},unicodes:{}});fe=n.names,pe=n.unicodes,ue=Te(kt.styleDefault,{family:kt.familyDefault})};function _e(t,e){return(he[t]||{})[e]}function we(t,e){return(de[t]||{})[e]}function ke(t,e){return(ve[t]||{})[e]}function Se(t){return fe[t]||{prefix:null,iconName:null}}function xe(t){var e=pe[t],n=_e("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Ce(){return ue}xt((function(t){ue=Te(t.styleDefault,{family:kt.familyDefault})})),be();var De=function(){return{prefix:null,iconName:null,rest:[]}};function Te(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.family,i=void 0===n?Z:n,r=nt[i][t],a=it[i][t]||it[i][r],o=t in Gt.styles?t:null;return a||o||null}var Oe=(oe={},l(oe,Z,Object.keys(rt[Z])),l(oe,Q,Object.keys(rt[Q])),oe);function Ee(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.skipLookups,r=void 0!==i&&i,a=(e={},l(e,Z,"".concat(kt.cssPrefix,"-").concat(Z)),l(e,Q,"".concat(kt.cssPrefix,"-").concat(Q)),e),o=null,s=Z;(t.includes(a[Z])||t.some((function(t){return Oe[Z].includes(t)})))&&(s=Z),(t.includes(a[Q])||t.some((function(t){return Oe[Q].includes(t)})))&&(s=Q);var c=t.reduce((function(t,e){var n=ye(kt.cssPrefix,e);if(se[e]?(e=le[s].includes(e)?at[s][e]:e,o=e,t.prefix=e):me[s].indexOf(e)>-1?(o=e,t.prefix=Te(e,{family:s})):n?t.iconName=n:e!==kt.replacementClass&&e!==a[Z]&&e!==a[Q]&&t.rest.push(e),!r&&t.prefix&&t.iconName){var i="fa"===o?Se(t.iconName):{},c=ke(t.prefix,t.iconName);i.prefix&&(o=null),t.iconName=i.iconName||c||t.iconName,t.prefix=i.prefix||t.prefix,"far"!==t.prefix||se["far"]||!se["fas"]||kt.autoFetchSvg||(t.prefix="fas")}return t}),De());return(t.includes("fa-brands")||t.includes("fab"))&&(c.prefix="fab"),(t.includes("fa-duotone")||t.includes("fad"))&&(c.prefix="fad"),c.prefix||s!==Q||!se["fass"]&&!kt.autoFetchSvg||(c.prefix="fass",c.iconName=ke(c.prefix,c.iconName)||c.iconName),"fa"!==c.prefix&&"fa"!==o||(c.prefix=Ce()||"fas"),c}var Ae=function(){function t(){o(this,t),this.definitions={}}return c(t,[{key:"add",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var a=n.reduce(this._pullDefinitions,{});Object.keys(a).forEach((function(e){t.definitions[e]=r(r({},t.definitions[e]||{}),a[e]),ie(e,a[e]);var n=rt[Z][e];n&&ie(n,a[e]),be()}))}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(t,e){var n=e.prefix&&e.iconName&&e.icon?{0:e}:e;return Object.keys(n).map((function(e){var i=n[e],r=i.prefix,a=i.iconName,o=i.icon,s=o[2];t[r]||(t[r]={}),s.length>0&&s.forEach((function(e){"string"===typeof e&&(t[r][e]=o)})),t[r][a]=o})),t}}]),t}(),Pe=[],Me={},Re={},Ie=Object.keys(Re);function Ne(t,e){var n=e.mixoutsTo;return Pe=t,Me={},Object.keys(Re).forEach((function(t){-1===Ie.indexOf(t)&&delete Re[t]})),Pe.forEach((function(t){var e=t.mixout?t.mixout():{};if(Object.keys(e).forEach((function(t){"function"===typeof e[t]&&(n[t]=e[t]),"object"===a(e[t])&&Object.keys(e[t]).forEach((function(i){n[t]||(n[t]={}),n[t][i]=e[t][i]}))})),t.hooks){var i=t.hooks();Object.keys(i).forEach((function(t){Me[t]||(Me[t]=[]),Me[t].push(i[t])}))}t.provides&&t.provides(Re)})),n}function $e(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var a=Me[t]||[];return a.forEach((function(t){e=t.apply(null,[e].concat(i))})),e}function Le(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=Me[t]||[];r.forEach((function(t){t.apply(null,n)}))}function Fe(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return Re[t]?Re[t].apply(null,e):void 0}function Be(t){"fa"===t.prefix&&(t.prefix="fas");var e=t.iconName,n=t.prefix||Ce();if(e)return e=ke(n,e)||e,Kt(je.definitions,n,e)||Kt(Gt.styles,n,e)}var je=new Ae,ze=function(){kt.autoReplaceSvg=!1,kt.observeMutations=!1,Le("noAuto")},He={i2svg:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return L?(Le("beforeI2svg",t),Fe("pseudoElements2svg",t),Fe("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.autoReplaceSvgRoot;!1===kt.autoReplaceSvg&&(kt.autoReplaceSvg=!0),kt.observeMutations=!0,qt((function(){We({autoReplaceSvgRoot:e}),Le("watch",t)}))}},Ve={icon:function(t){if(null===t)return null;if("object"===a(t)&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:ke(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&2===t.length){var e=0===t[1].indexOf("fa-")?t[1].slice(3):t[1],n=Te(t[0]);return{prefix:n,iconName:ke(n,e)||e}}if("string"===typeof t&&(t.indexOf("".concat(kt.cssPrefix,"-"))>-1||t.match(ot))){var i=Ee(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Ce(),iconName:ke(i.prefix,i.iconName)||i.iconName}}if("string"===typeof t){var r=Ce();return{prefix:r,iconName:ke(r,t)||t}}}},Ge={noAuto:ze,config:kt,dom:He,parse:Ve,library:je,findIconDefinition:Be,toHtml:Xt},We=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.autoReplaceSvgRoot,n=void 0===e?I:e;(Object.keys(Gt.styles).length>0||kt.autoFetchSvg)&&L&&kt.autoReplaceSvg&&Ge.dom.i2svg({node:n})};function Ue(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map((function(t){return Xt(t)}))}}),Object.defineProperty(t,"node",{get:function(){if(L){var e=I.createElement("div");return e.innerHTML=t.html,e.children}}}),t}function Ye(t){var e=t.children,n=t.main,i=t.mask,a=t.attributes,o=t.styles,s=t.transform;if(Nt(s)&&n.found&&!i.found){var c=n.width,l=n.height,u={x:c/l/2,y:.5};a["style"]=It(r(r({},o),{},{"transform-origin":"".concat(u.x+s.x/16,"em ").concat(u.y+s.y/16,"em")}))}return[{tag:"svg",attributes:a,children:e}]}function qe(t){var e=t.prefix,n=t.iconName,i=t.children,a=t.attributes,o=t.symbol,s=!0===o?"".concat(e,"-").concat(kt.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:r(r({},a),{},{id:s}),children:i}]}]}function Xe(t){var e=t.icons,n=e.main,i=e.mask,a=t.prefix,o=t.iconName,s=t.transform,c=t.symbol,l=t.title,u=t.maskId,h=t.titleId,d=t.extra,f=t.watchable,p=void 0!==f&&f,v=i.found?i:n,m=v.width,g=v.height,y="fak"===a,b=[kt.replacementClass,o?"".concat(kt.cssPrefix,"-").concat(o):""].filter((function(t){return-1===d.classes.indexOf(t)})).filter((function(t){return""!==t||!!t})).concat(d.classes).join(" "),_={children:[],attributes:r(r({},d.attributes),{},{"data-prefix":a,"data-icon":o,class:b,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(m," ").concat(g)})},w=y&&!~d.classes.indexOf("fa-fw")?{width:"".concat(m/g*16*.0625,"em")}:{};p&&(_.attributes[V]=""),l&&(_.children.push({tag:"title",attributes:{id:_.attributes["aria-labelledby"]||"title-".concat(h||Et())},children:[l]}),delete _.attributes.title);var k=r(r({},_),{},{prefix:a,iconName:o,main:n,mask:i,maskId:u,transform:s,symbol:c,styles:r(r({},w),d.styles)}),S=i.found&&n.found?Fe("generateAbstractMask",k)||{children:[],attributes:{}}:Fe("generateAbstractIcon",k)||{children:[],attributes:{}},x=S.children,C=S.attributes;return k.children=x,k.attributes=C,c?qe(k):Ye(k)}function Ke(t){var e=t.content,n=t.width,i=t.height,a=t.transform,o=t.title,s=t.extra,c=t.watchable,l=void 0!==c&&c,u=r(r(r({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(u[V]="");var h=r({},s.styles);Nt(a)&&(h["transform"]=Lt({transform:a,startCentered:!0,width:n,height:i}),h["-webkit-transform"]=h["transform"]);var d=It(h);d.length>0&&(u["style"]=d);var f=[];return f.push({tag:"span",attributes:u,children:[e]}),o&&f.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),f}function Je(t){var e=t.content,n=t.title,i=t.extra,a=r(r(r({},i.attributes),n?{title:n}:{}),{},{class:i.classes.join(" ")}),o=It(i.styles);o.length>0&&(a["style"]=o);var s=[];return s.push({tag:"span",attributes:a,children:[e]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var Ze=Gt.styles;function Qe(t){var e=t[0],n=t[1],i=t.slice(4),r=u(i,1),a=r[0],o=null;return o=Array.isArray(a)?{tag:"g",attributes:{class:"".concat(kt.cssPrefix,"-").concat(ft.GROUP)},children:[{tag:"path",attributes:{class:"".concat(kt.cssPrefix,"-").concat(ft.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(kt.cssPrefix,"-").concat(ft.PRIMARY),fill:"currentColor",d:a[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:e,height:n,icon:o}}var tn={found:!1,width:512,height:512};function en(t,e){J||kt.showMissingIcons||!t||console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function nn(t,e){var n=e;return"fa"===e&&null!==kt.styleDefault&&(e=Ce()),new Promise((function(i,a){Fe("missingIconAbstract");if("fa"===n){var o=Se(t)||{};t=o.iconName||t,e=o.prefix||e}if(t&&e&&Ze[e]&&Ze[e][t]){var s=Ze[e][t];return i(Qe(s))}en(t,e),i(r(r({},tn),{},{icon:kt.showMissingIcons&&t&&Fe("missingIconAbstract")||{}}))}))}var rn=function(){},an=kt.measurePerformance&&$&&$.mark&&$.measure?$:{mark:rn,measure:rn},on='FA "6.3.0"',sn=function(t){return an.mark("".concat(on," ").concat(t," begins")),function(){return cn(t)}},cn=function(t){an.mark("".concat(on," ").concat(t," ends")),an.measure("".concat(on," ").concat(t),"".concat(on," ").concat(t," begins"),"".concat(on," ").concat(t," ends"))},ln={begin:sn,end:cn},un=function(){};function hn(t){var e=t.getAttribute?t.getAttribute(V):null;return"string"===typeof e}function dn(t){var e=t.getAttribute?t.getAttribute(U):null,n=t.getAttribute?t.getAttribute(Y):null;return e&&n}function fn(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(kt.replacementClass)}function pn(){if(!0===kt.autoReplaceSvg)return bn.replace;var t=bn[kt.autoReplaceSvg];return t||bn.replace}function vn(t){return I.createElementNS("http://www.w3.org/2000/svg",t)}function mn(t){return I.createElement(t)}function gn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.ceFn,i=void 0===n?"svg"===t.tag?vn:mn:n;if("string"===typeof t)return I.createTextNode(t);var r=i(t.tag);Object.keys(t.attributes||[]).forEach((function(e){r.setAttribute(e,t.attributes[e])}));var a=t.children||[];return a.forEach((function(t){r.appendChild(gn(t,{ceFn:i}))})),r}function yn(t){var e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var bn={replace:function(t){var e=t[0];if(e.parentNode)if(t[1].forEach((function(t){e.parentNode.insertBefore(gn(t),e)})),null===e.getAttribute(V)&&kt.keepOriginalSource){var n=I.createComment(yn(e));e.parentNode.replaceChild(n,e)}else e.remove()},nest:function(t){var e=t[0],n=t[1];if(~Pt(e).indexOf(kt.replacementClass))return bn.replace(t);var i=new RegExp("".concat(kt.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var r=n[0].attributes.class.split(" ").reduce((function(t,e){return e===kt.replacementClass||e.match(i)?t.toSvg.push(e):t.toNode.push(e),t}),{toNode:[],toSvg:[]});n[0].attributes.class=r.toSvg.join(" "),0===r.toNode.length?e.removeAttribute("class"):e.setAttribute("class",r.toNode.join(" "))}var a=n.map((function(t){return Xt(t)})).join("\n");e.setAttribute(V,""),e.innerHTML=a}};function _n(t){t()}function wn(t,e){var n="function"===typeof e?e:un;if(0===t.length)n();else{var i=_n;kt.mutateApproach===X&&(i=R.requestAnimationFrame||_n),i((function(){var e=pn(),i=ln.begin("mutate");t.map(e),i(),n()}))}}var kn=!1;function Sn(){kn=!0}function xn(){kn=!1}var Cn=null;function Dn(t){if(N&&kt.observeMutations){var e=t.treeCallback,n=void 0===e?un:e,i=t.nodeCallback,r=void 0===i?un:i,a=t.pseudoElementsCallback,o=void 0===a?un:a,s=t.observeMutationsRoot,c=void 0===s?I:s;Cn=new N((function(t){if(!kn){var e=Ce();At(t).forEach((function(t){if("childList"===t.type&&t.addedNodes.length>0&&!hn(t.addedNodes[0])&&(kt.searchPseudoElements&&o(t.target),n(t.target)),"attributes"===t.type&&t.target.parentNode&&kt.searchPseudoElements&&o(t.target.parentNode),"attributes"===t.type&&hn(t.target)&&~dt.indexOf(t.attributeName))if("class"===t.attributeName&&dn(t.target)){var i=Ee(Pt(t.target)),a=i.prefix,s=i.iconName;t.target.setAttribute(U,a||e),s&&t.target.setAttribute(Y,s)}else fn(t.target)&&r(t.target)}))}})),L&&Cn.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Tn(){Cn&&Cn.disconnect()}function On(t){var e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce((function(t,e){var n=e.split(":"),i=n[0],r=n.slice(1);return i&&r.length>0&&(t[i]=r.join(":").trim()),t}),{})),n}function En(t){var e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),i=void 0!==t.innerText?t.innerText.trim():"",r=Ee(Pt(t));return r.prefix||(r.prefix=Ce()),e&&n&&(r.prefix=e,r.iconName=n),r.iconName&&r.prefix||(r.prefix&&i.length>0&&(r.iconName=we(r.prefix,t.innerText)||_e(r.prefix,te(t.innerText))),!r.iconName&&kt.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(r.iconName=t.firstChild.data)),r}function An(t){var e=At(t.attributes).reduce((function(t,e){return"class"!==t.name&&"style"!==t.name&&(t[e.name]=e.value),t}),{}),n=t.getAttribute("title"),i=t.getAttribute("data-fa-title-id");return kt.autoA11y&&(n?e["aria-labelledby"]="".concat(kt.replacementClass,"-title-").concat(i||Et()):(e["aria-hidden"]="true",e["focusable"]="false")),e}function Pn(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Dt,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Mn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=En(t),i=n.iconName,a=n.prefix,o=n.rest,s=An(t),c=$e("parseNodeAttributes",{},t),l=e.styleParser?On(t):[];return r({iconName:i,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:a,transform:Dt,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},c)}var Rn=Gt.styles;function In(t){var e="nest"===kt.autoReplaceSvg?Mn(t,{styleParser:!1}):Mn(t);return~e.extra.classes.indexOf(st)?Fe("generateLayersText",t,e):Fe("generateSvgReplacementMutation",t,e)}var Nn=new Set;function $n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!L)return Promise.resolve();var n=I.documentElement.classList,i=function(t){return n.add("".concat(q,"-").concat(t))},r=function(t){return n.remove("".concat(q,"-").concat(t))},a=kt.autoFetchSvg?Nn:tt.map((function(t){return"fa-".concat(t)})).concat(Object.keys(Rn));a.includes("fa")||a.push("fa");var o=[".".concat(st,":not([").concat(V,"])")].concat(a.map((function(t){return".".concat(t,":not([").concat(V,"])")}))).join(", ");if(0===o.length)return Promise.resolve();var s=[];try{s=At(t.querySelectorAll(o))}catch(pi){}if(!(s.length>0))return Promise.resolve();i("pending"),r("complete");var c=ln.begin("onTree"),l=s.reduce((function(t,e){try{var n=In(e);n&&t.push(n)}catch(pi){J||"MissingIcon"===pi.name&&console.error(pi)}return t}),[]);return new Promise((function(t,n){Promise.all(l).then((function(n){wn(n,(function(){i("active"),i("complete"),r("pending"),"function"===typeof e&&e(),c(),t()}))})).catch((function(t){c(),n(t)}))}))}function Ln(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;In(t).then((function(t){t&&wn([t],e)}))}function Fn(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(e||{}).icon?e:Be(e||{}),a=n.mask;return a&&(a=(a||{}).icon?a:Be(a||{})),t(i,r(r({},n),{},{mask:a}))}}tt.map((function(t){Nn.add("fa-".concat(t))})),Object.keys(nt[Z]).map(Nn.add.bind(Nn)),Object.keys(nt[Q]).map(Nn.add.bind(Nn)),Nn=h(Nn);var Bn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,i=void 0===n?Dt:n,a=e.symbol,o=void 0!==a&&a,s=e.mask,c=void 0===s?null:s,l=e.maskId,u=void 0===l?null:l,h=e.title,d=void 0===h?null:h,f=e.titleId,p=void 0===f?null:f,v=e.classes,m=void 0===v?[]:v,g=e.attributes,y=void 0===g?{}:g,b=e.styles,_=void 0===b?{}:b;if(t){var w=t.prefix,k=t.iconName,S=t.icon;return Ue(r({type:"icon"},t),(function(){return Le("beforeDOMElementCreation",{iconDefinition:t,params:e}),kt.autoA11y&&(d?y["aria-labelledby"]="".concat(kt.replacementClass,"-title-").concat(p||Et()):(y["aria-hidden"]="true",y["focusable"]="false")),Xe({icons:{main:Qe(S),mask:c?Qe(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:w,iconName:k,transform:r(r({},Dt),i),symbol:o,title:d,maskId:u,titleId:p,extra:{attributes:y,styles:_,classes:m}})}))}},jn={mixout:function(){return{icon:Fn(Bn)}},hooks:function(){return{mutationObserverCallbacks:function(t){return t.treeCallback=$n,t.nodeCallback=Ln,t}}},provides:function(t){t.i2svg=function(t){var e=t.node,n=void 0===e?I:e,i=t.callback,r=void 0===i?function(){}:i;return $n(n,r)},t.generateSvgReplacementMutation=function(t,e){var n=e.iconName,i=e.title,r=e.titleId,a=e.prefix,o=e.transform,s=e.symbol,c=e.mask,l=e.maskId,h=e.extra;return new Promise((function(e,d){Promise.all([nn(n,a),c.iconName?nn(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then((function(c){var d=u(c,2),f=d[0],p=d[1];e([t,Xe({icons:{main:f,mask:p},prefix:a,iconName:n,transform:o,symbol:s,maskId:l,title:i,titleId:r,extra:h,watchable:!0})])})).catch(d)}))},t.generateAbstractIcon=function(t){var e,n=t.children,i=t.attributes,r=t.main,a=t.transform,o=t.styles,s=It(o);return s.length>0&&(i["style"]=s),Nt(a)&&(e=Fe("generateAbstractTransformGrouping",{main:r,transform:a,containerWidth:r.width,iconWidth:r.width})),n.push(e||r.icon),{children:n,attributes:i}}}},zn={mixout:function(){return{layer:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.classes,i=void 0===n?[]:n;return Ue({type:"layer"},(function(){Le("beforeDOMElementCreation",{assembler:t,params:e});var n=[];return t((function(t){Array.isArray(t)?t.map((function(t){n=n.concat(t.abstract)})):n=n.concat(t.abstract)})),[{tag:"span",attributes:{class:["".concat(kt.cssPrefix,"-layers")].concat(h(i)).join(" ")},children:n}]}))}}}},Hn={mixout:function(){return{counter:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.title,i=void 0===n?null:n,r=e.classes,a=void 0===r?[]:r,o=e.attributes,s=void 0===o?{}:o,c=e.styles,l=void 0===c?{}:c;return Ue({type:"counter",content:t},(function(){return Le("beforeDOMElementCreation",{content:t,params:e}),Je({content:t.toString(),title:i,extra:{attributes:s,styles:l,classes:["".concat(kt.cssPrefix,"-layers-counter")].concat(h(a))}})}))}}}},Vn={mixout:function(){return{text:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,i=void 0===n?Dt:n,a=e.title,o=void 0===a?null:a,s=e.classes,c=void 0===s?[]:s,l=e.attributes,u=void 0===l?{}:l,d=e.styles,f=void 0===d?{}:d;return Ue({type:"text",content:t},(function(){return Le("beforeDOMElementCreation",{content:t,params:e}),Ke({content:t,transform:r(r({},Dt),i),title:o,extra:{attributes:u,styles:f,classes:["".concat(kt.cssPrefix,"-layers-text")].concat(h(c))}})}))}}},provides:function(t){t.generateLayersText=function(t,e){var n=e.title,i=e.transform,r=e.extra,a=null,o=null;if(F){var s=parseInt(getComputedStyle(t).fontSize,10),c=t.getBoundingClientRect();a=c.width/s,o=c.height/s}return kt.autoA11y&&!n&&(r.attributes["aria-hidden"]="true"),Promise.resolve([t,Ke({content:t.innerHTML,width:a,height:o,transform:i,title:n,extra:r,watchable:!0})])}}},Gn=new RegExp('"',"ug"),Wn=[1105920,1112319];function Un(t){var e=t.replace(Gn,""),n=ee(e,0),i=n>=Wn[0]&&n<=Wn[1],r=2===e.length&&e[0]===e[1];return{value:te(r?e[0]:e),isSecondary:i||r}}function Yn(t,e){var n="".concat(W).concat(e.replace(":","-"));return new Promise((function(i,a){if(null!==t.getAttribute(n))return i();var o=At(t.children),s=o.filter((function(t){return t.getAttribute(G)===e}))[0],c=R.getComputedStyle(t,e),l=c.getPropertyValue("font-family").match(ct),u=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(s&&!l)return t.removeChild(s),i();if(l&&"none"!==h&&""!==h){var d=c.getPropertyValue("content"),f=~["Sharp"].indexOf(l[2])?Q:Z,p=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?it[f][l[2].toLowerCase()]:lt[f][u],v=Un(d),m=v.value,g=v.isSecondary,y=l[0].startsWith("FontAwesome"),b=_e(p,m),_=b;if(y){var w=xe(m);w.iconName&&w.prefix&&(b=w.iconName,p=w.prefix)}if(!b||g||s&&s.getAttribute(U)===p&&s.getAttribute(Y)===_)i();else{t.setAttribute(n,_),s&&t.removeChild(s);var k=Pn(),S=k.extra;S.attributes[G]=e,nn(b,p).then((function(a){var o=Xe(r(r({},k),{},{icons:{main:a,mask:De()},prefix:p,iconName:_,extra:S,watchable:!0})),s=I.createElement("svg");"::before"===e?t.insertBefore(s,t.firstChild):t.appendChild(s),s.outerHTML=o.map((function(t){return Xt(t)})).join("\n"),t.removeAttribute(n),i()})).catch(a)}}else i()}))}function qn(t){return Promise.all([Yn(t,"::before"),Yn(t,"::after")])}function Xn(t){return t.parentNode!==document.head&&!~K.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(G)&&(!t.parentNode||"svg"!==t.parentNode.tagName)}function Kn(t){if(L)return new Promise((function(e,n){var i=At(t.querySelectorAll("*")).filter(Xn).map(qn),r=ln.begin("searchPseudoElements");Sn(),Promise.all(i).then((function(){r(),xn(),e()})).catch((function(){r(),xn(),n()}))}))}var Jn={hooks:function(){return{mutationObserverCallbacks:function(t){return t.pseudoElementsCallback=Kn,t}}},provides:function(t){t.pseudoElements2svg=function(t){var e=t.node,n=void 0===e?I:e;kt.searchPseudoElements&&Kn(n)}}},Zn=!1,Qn={mixout:function(){return{dom:{unwatch:function(){Sn(),Zn=!0}}}},hooks:function(){return{bootstrap:function(){Dn($e("mutationObserverCallbacks",{}))},noAuto:function(){Tn()},watch:function(t){var e=t.observeMutationsRoot;Zn?xn():Dn($e("mutationObserverCallbacks",{observeMutationsRoot:e}))}}}},ti=function(t){var e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce((function(t,e){var n=e.toLowerCase().split("-"),i=n[0],r=n.slice(1).join("-");if(i&&"h"===r)return t.flipX=!0,t;if(i&&"v"===r)return t.flipY=!0,t;if(r=parseFloat(r),isNaN(r))return t;switch(i){case"grow":t.size=t.size+r;break;case"shrink":t.size=t.size-r;break;case"left":t.x=t.x-r;break;case"right":t.x=t.x+r;break;case"up":t.y=t.y-r;break;case"down":t.y=t.y+r;break;case"rotate":t.rotate=t.rotate+r;break}return t}),e)},ei={mixout:function(){return{parse:{transform:function(t){return ti(t)}}}},hooks:function(){return{parseNodeAttributes:function(t,e){var n=e.getAttribute("data-fa-transform");return n&&(t.transform=ti(n)),t}}},provides:function(t){t.generateAbstractTransformGrouping=function(t){var e=t.main,n=t.transform,i=t.containerWidth,a=t.iconWidth,o={transform:"translate(".concat(i/2," 256)")},s="translate(".concat(32*n.x,", ").concat(32*n.y,") "),c="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),u={transform:"".concat(s," ").concat(c," ").concat(l)},h={transform:"translate(".concat(a/2*-1," -256)")},d={outer:o,inner:u,path:h};return{tag:"g",attributes:r({},d.outer),children:[{tag:"g",attributes:r({},d.inner),children:[{tag:e.icon.tag,children:e.icon.children,attributes:r(r({},e.icon.attributes),d.path)}]}]}}}},ni={x:0,y:0,width:"100%",height:"100%"};function ii(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function ri(t){return"g"===t.tag?t.children:[t]}var ai={hooks:function(){return{parseNodeAttributes:function(t,e){var n=e.getAttribute("data-fa-mask"),i=n?Ee(n.split(" ").map((function(t){return t.trim()}))):De();return i.prefix||(i.prefix=Ce()),t.mask=i,t.maskId=e.getAttribute("data-fa-mask-id"),t}}},provides:function(t){t.generateAbstractMask=function(t){var e=t.children,n=t.attributes,i=t.main,a=t.mask,o=t.maskId,s=t.transform,c=i.width,l=i.icon,u=a.width,h=a.icon,d=$t({transform:s,containerWidth:u,iconWidth:c}),f={tag:"rect",attributes:r(r({},ni),{},{fill:"white"})},p=l.children?{children:l.children.map(ii)}:{},v={tag:"g",attributes:r({},d.inner),children:[ii(r({tag:l.tag,attributes:r(r({},l.attributes),d.path)},p))]},m={tag:"g",attributes:r({},d.outer),children:[v]},g="mask-".concat(o||Et()),y="clip-".concat(o||Et()),b={tag:"mask",attributes:r(r({},ni),{},{id:g,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,m]},_={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:ri(h)},b]};return e.push(_,{tag:"rect",attributes:r({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(g,")")},ni)}),{children:e,attributes:n}}}},oi={provides:function(t){var e=!1;R.matchMedia&&(e=R.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var t=[],n={fill:"currentColor"},i={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};t.push({tag:"path",attributes:r(r({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=r(r({},i),{},{attributeName:"opacity"}),o={tag:"circle",attributes:r(r({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return e||o.children.push({tag:"animate",attributes:r(r({},i),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:r(r({},a),{},{values:"1;0;1;1;0;1;"})}),t.push(o),t.push({tag:"path",attributes:r(r({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:e?[]:[{tag:"animate",attributes:r(r({},a),{},{values:"1;0;0;0;0;1;"})}]}),e||t.push({tag:"path",attributes:r(r({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:r(r({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:t}}}},si={hooks:function(){return{parseNodeAttributes:function(t,e){var n=e.getAttribute("data-fa-symbol"),i=null!==n&&(""===n||n);return t["symbol"]=i,t}}}},ci=[Ht,jn,zn,Hn,Vn,Jn,Qn,ei,ai,oi,si];Ne(ci,{mixoutsTo:Ge});Ge.noAuto;var li=Ge.config,ui=Ge.library,hi=(Ge.dom,Ge.parse),di=(Ge.findIconDefinition,Ge.toHtml,Ge.icon),fi=(Ge.layer,Ge.text);Ge.counter},417:(t,e,n)=>{"use strict";n.d(e,{DBf:()=>h,EQg:()=>i,EdJ:()=>c,EyR:()=>C,FPD:()=>b,LM3:()=>x,Uwo:()=>f,XTR:()=>k,acZ:()=>u,eFW:()=>s,g82:()=>w,gc2:()=>v,jHE:()=>o,lUd:()=>l,nNP:()=>m,onQ:()=>S,paY:()=>d,q7m:()=>p,r8p:()=>_,wn1:()=>y,xHz:()=>r,yOZ:()=>a});var i={prefix:"fas",iconName:"scissors",icon:[512,512,[9984,9986,9988,"cut"],"f0c4","M256 192l-39.5-39.5c4.9-12.6 7.5-26.2 7.5-40.5C224 50.1 173.9 0 112 0S0 50.1 0 112s50.1 112 112 112c14.3 0 27.9-2.7 40.5-7.5L192 256l-39.5 39.5c-12.6-4.9-26.2-7.5-40.5-7.5C50.1 288 0 338.1 0 400s50.1 112 112 112s112-50.1 112-112c0-14.3-2.7-27.9-7.5-40.5L499.2 76.8c7.1-7.1 7.1-18.5 0-25.6c-28.3-28.3-74.1-28.3-102.4 0L256 192zm22.6 150.6L396.8 460.8c28.3 28.3 74.1 28.3 102.4 0c7.1-7.1 7.1-18.5 0-25.6L342.6 278.6l-64 64zM64 112a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm48 240a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},r={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},a={prefix:"fas",iconName:"angle-right",icon:[256,512,[8250],"f105","M246.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 41.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"]},o={prefix:"fas",iconName:"repeat",icon:[512,512,[128257],"f363","M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.6 160-160z"]},s={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},c={prefix:"fas",iconName:"floppy-disk",icon:[448,512,[128190,128426,"save"],"f0c7","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"]},l={prefix:"fas",iconName:"arrow-rotate-right",icon:[512,512,[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],"f01e","M370.3 160H320c-17.7 0-32 14.3-32 32s14.3 32 32 32H448c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.2L398.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L370.3 160z"]},u={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},h={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},d={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M109.7 160H160c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V64C0 46.3 14.3 32 32 32s32 14.3 32 32v51.2L81.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L109.7 160z"]},f={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M56 472a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0-160a56 56 0 1 1 0-112 56 56 0 1 1 0 112zM0 96a56 56 0 1 1 112 0A56 56 0 1 1 0 96z"]},p={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},v={prefix:"fas",iconName:"angle-down",icon:[384,512,[8964],"f107","M169.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 274.7 54.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},m={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M562.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L405.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C189.5 251.2 196 330 246 380c56.5 56.5 148 56.5 204.5 0L562.8 267.7zM43.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C57 372 57 321 88.5 289.5L200.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C416.5 260.8 410 182 360 132c-56.5-56.5-148-56.5-204.5 0L43.2 244.3z"]},g={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},y=g,b={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},_={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M240 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H32c-17.7 0-32 14.3-32 32s14.3 32 32 32H176V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H384c17.7 0 32-14.3 32-32s-14.3-32-32-32H240V80z"]},w={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"]},k={prefix:"fas",iconName:"trash-arrow-up",icon:[448,512,["trash-restore"],"f829","M163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3C140.6 6.8 151.7 0 163.8 0zM32 128H416L394.8 467c-1.6 25.3-22.6 45-47.9 45H101.1c-25.3 0-46.3-19.7-47.9-45L32 128zm192 64c-6.4 0-12.5 2.5-17 7l-80 80c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39V408c0 13.3 10.7 24 24 24s24-10.7 24-24V273.9l39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-4.5-4.5-10.6-7-17-7z"]},S={prefix:"fas",iconName:"angle-up",icon:[384,512,[8963],"f106","M169.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L192 205.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z"]},x={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zm0 416c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM48 304c26.5 0 48-21.5 48-48s-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48zm464-48c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM142.9 437c18.7-18.7 18.7-49.1 0-67.9s-49.1-18.7-67.9 0s-18.7 49.1 0 67.9s49.1 18.7 67.9 0zm0-294.2c18.7-18.7 18.7-49.1 0-67.9S93.7 56.2 75 75s-18.7 49.1 0 67.9s49.1 18.7 67.9 0zM369.1 437c18.7 18.7 49.1 18.7 67.9 0s18.7-49.1 0-67.9s-49.1-18.7-67.9 0s-18.7 49.1 0 67.9z"]},C={prefix:"fas",iconName:"angle-left",icon:[256,512,[8249],"f104","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]}},154:(t,e,n)=>{"use strict";function i(t,e){return function(){return t.apply(e,arguments)}}n.d(e,{Z:()=>Be});const{toString:r}=Object.prototype,{getPrototypeOf:a}=Object,o=(t=>e=>{const n=r.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),s=t=>(t=t.toLowerCase(),e=>o(e)===t),c=t=>e=>typeof e===t,{isArray:l}=Array,u=c("undefined");function h(t){return null!==t&&!u(t)&&null!==t.constructor&&!u(t.constructor)&&v(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const d=s("ArrayBuffer");function f(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&d(t.buffer),e}const p=c("string"),v=c("function"),m=c("number"),g=t=>null!==t&&"object"===typeof t,y=t=>!0===t||!1===t,b=t=>{if("object"!==o(t))return!1;const e=a(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},_=s("Date"),w=s("File"),k=s("Blob"),S=s("FileList"),x=t=>g(t)&&v(t.pipe),C=t=>{let e;return t&&("function"===typeof FormData&&t instanceof FormData||v(t.append)&&("formdata"===(e=o(t))||"object"===e&&v(t.toString)&&"[object FormData]"===t.toString()))},D=s("URLSearchParams"),T=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function O(t,e,{allOwnKeys:n=!1}={}){if(null===t||"undefined"===typeof t)return;let i,r;if("object"!==typeof t&&(t=[t]),l(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),a=r.length;let o;for(i=0;i<a;i++)o=r[i],e.call(null,t[o],o,t)}}function E(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;while(r-- >0)if(i=n[r],e===i.toLowerCase())return i;return null}const A=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),P=t=>!u(t)&&t!==A;function M(){const{caseless:t}=P(this)&&this||{},e={},n=(n,i)=>{const r=t&&E(e,i)||i;b(e[r])&&b(n)?e[r]=M(e[r],n):b(n)?e[r]=M({},n):l(n)?e[r]=n.slice():e[r]=n};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&O(arguments[i],n);return e}const R=(t,e,n,{allOwnKeys:r}={})=>(O(e,((e,r)=>{n&&v(e)?t[r]=i(e,n):t[r]=e}),{allOwnKeys:r}),t),I=t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),N=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},$=(t,e,n,i)=>{let r,o,s;const c={};if(e=e||{},null==t)return e;do{r=Object.getOwnPropertyNames(t),o=r.length;while(o-- >0)s=r[o],i&&!i(s,t,e)||c[s]||(e[s]=t[s],c[s]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},L=(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},F=t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!m(e))return null;const n=new Array(e);while(e-- >0)n[e]=t[e];return n},B=(t=>e=>t&&e instanceof t)("undefined"!==typeof Uint8Array&&a(Uint8Array)),j=(t,e)=>{const n=t&&t[Symbol.iterator],i=n.call(t);let r;while((r=i.next())&&!r.done){const n=r.value;e.call(t,n[0],n[1])}},z=(t,e)=>{let n;const i=[];while(null!==(n=t.exec(e)))i.push(n);return i},H=s("HTMLFormElement"),V=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),G=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),W=s("RegExp"),U=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};O(n,((n,r)=>{let a;!1!==(a=e(n,r,t))&&(i[r]=a||n)})),Object.defineProperties(t,i)},Y=t=>{U(t,((e,n)=>{if(v(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];v(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},q=(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?i(t):i(String(t).split(e)),n},X=()=>{},K=(t,e)=>(t=+t,Number.isFinite(t)?t:e),J="abcdefghijklmnopqrstuvwxyz",Z="0123456789",Q={DIGIT:Z,ALPHA:J,ALPHA_DIGIT:J+J.toUpperCase()+Z},tt=(t=16,e=Q.ALPHA_DIGIT)=>{let n="";const{length:i}=e;while(t--)n+=e[Math.random()*i|0];return n};function et(t){return!!(t&&v(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])}const nt=t=>{const e=new Array(10),n=(t,i)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=l(t)?[]:{};return O(t,((t,e)=>{const a=n(t,i+1);!u(a)&&(r[e]=a)})),e[i]=void 0,r}}return t};return n(t,0)},it=s("AsyncFunction"),rt=t=>t&&(g(t)||v(t))&&v(t.then)&&v(t.catch),at={isArray:l,isArrayBuffer:d,isBuffer:h,isFormData:C,isArrayBufferView:f,isString:p,isNumber:m,isBoolean:y,isObject:g,isPlainObject:b,isUndefined:u,isDate:_,isFile:w,isBlob:k,isRegExp:W,isFunction:v,isStream:x,isURLSearchParams:D,isTypedArray:B,isFileList:S,forEach:O,merge:M,extend:R,trim:T,stripBOM:I,inherits:N,toFlatObject:$,kindOf:o,kindOfTest:s,endsWith:L,toArray:F,forEachEntry:j,matchAll:z,isHTMLForm:H,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:U,freezeMethods:Y,toObjectSet:q,toCamelCase:V,noop:X,toFiniteNumber:K,findKey:E,global:A,isContextDefined:P,ALPHABET:Q,generateString:tt,isSpecCompliantForm:et,toJSONObject:nt,isAsyncFn:it,isThenable:rt};function ot(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}at.inherits(ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:at.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const st=ot.prototype,ct={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ct[t]={value:t}})),Object.defineProperties(ot,ct),Object.defineProperty(st,"isAxiosError",{value:!0}),ot.from=(t,e,n,i,r,a)=>{const o=Object.create(st);return at.toFlatObject(t,o,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ot.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};const lt=ot,ut=null;function ht(t){return at.isPlainObject(t)||at.isArray(t)}function dt(t){return at.endsWith(t,"[]")?t.slice(0,-2):t}function ft(t,e,n){return t?t.concat(e).map((function(t,e){return t=dt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}function pt(t){return at.isArray(t)&&!t.some(ht)}const vt=at.toFlatObject(at,{},null,(function(t){return/^is[A-Z]/.test(t)}));function mt(t,e,n){if(!at.isObject(t))throw new TypeError("target must be an object");e=e||new(ut||FormData),n=at.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!at.isUndefined(e[t])}));const i=n.metaTokens,r=n.visitor||u,a=n.dots,o=n.indexes,s=n.Blob||"undefined"!==typeof Blob&&Blob,c=s&&at.isSpecCompliantForm(e);if(!at.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(at.isDate(t))return t.toISOString();if(!c&&at.isBlob(t))throw new lt("Blob is not supported. Use a Buffer instead.");return at.isArrayBuffer(t)||at.isTypedArray(t)?c&&"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,r){let s=t;if(t&&!r&&"object"===typeof t)if(at.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(at.isArray(t)&&pt(t)||(at.isFileList(t)||at.endsWith(n,"[]"))&&(s=at.toArray(t)))return n=dt(n),s.forEach((function(t,i){!at.isUndefined(t)&&null!==t&&e.append(!0===o?ft([n],i,a):null===o?n:n+"[]",l(t))})),!1;return!!ht(t)||(e.append(ft(r,n,a),l(t)),!1)}const h=[],d=Object.assign(vt,{defaultVisitor:u,convertValue:l,isVisitable:ht});function f(t,n){if(!at.isUndefined(t)){if(-1!==h.indexOf(t))throw Error("Circular reference detected in "+n.join("."));h.push(t),at.forEach(t,(function(t,i){const a=!(at.isUndefined(t)||null===t)&&r.call(e,t,at.isString(i)?i.trim():i,n,d);!0===a&&f(t,n?n.concat(i):[i])})),h.pop()}}if(!at.isObject(t))throw new TypeError("data must be an object");return f(t),e}const gt=mt;function yt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function bt(t,e){this._pairs=[],t&&gt(t,this,e)}const _t=bt.prototype;_t.append=function(t,e){this._pairs.push([t,e])},_t.toString=function(t){const e=t?function(e){return t.call(this,e,yt)}:yt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const wt=bt;function kt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function St(t,e,n){if(!e)return t;const i=n&&n.encode||kt,r=n&&n.serialize;let a;if(a=r?r(e,n):at.isURLSearchParams(e)?e.toString():new wt(e,n).toString(i),a){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+a}return t}class xt{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){at.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Ct=xt,Dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt="undefined"!==typeof URLSearchParams?URLSearchParams:wt,Ot="undefined"!==typeof FormData?FormData:null,Et="undefined"!==typeof Blob?Blob:null,At=(()=>{let t;return("undefined"===typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!==typeof window&&"undefined"!==typeof document)})(),Pt=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),Mt={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Ot,Blob:Et},isStandardBrowserEnv:At,isStandardBrowserWebWorkerEnv:Pt,protocols:["http","https","file","blob","url","data"]};function Rt(t,e){return gt(t,new Mt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return Mt.isNode&&at.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function It(t){return at.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}function Nt(t){const e={},n=Object.keys(t);let i;const r=n.length;let a;for(i=0;i<r;i++)a=n[i],e[a]=t[a];return e}function $t(t){function e(t,n,i,r){let a=t[r++];const o=Number.isFinite(+a),s=r>=t.length;if(a=!a&&at.isArray(i)?i.length:a,s)return at.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!o;i[a]&&at.isObject(i[a])||(i[a]=[]);const c=e(t,n,i[a],r);return c&&at.isArray(i[a])&&(i[a]=Nt(i[a])),!o}if(at.isFormData(t)&&at.isFunction(t.entries)){const n={};return at.forEachEntry(t,((t,i)=>{e(It(t),i,n,0)})),n}return null}const Lt=$t;function Ft(t,e,n){if(at.isString(t))try{return(e||JSON.parse)(t),at.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}const Bt={transitional:Dt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=at.isObject(t);r&&at.isHTMLForm(t)&&(t=new FormData(t));const a=at.isFormData(t);if(a)return i&&i?JSON.stringify(Lt(t)):t;if(at.isArrayBuffer(t)||at.isBuffer(t)||at.isStream(t)||at.isFile(t)||at.isBlob(t))return t;if(at.isArrayBufferView(t))return t.buffer;if(at.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Rt(t,this.formSerializer).toString();if((o=at.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return gt(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Ft(t)):t}],transformResponse:[function(t){const e=this.transitional||Bt.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&at.isString(t)&&(n&&!this.responseType||i)){const n=e&&e.silentJSONParsing,a=!n&&i;try{return JSON.parse(t)}catch(r){if(a){if("SyntaxError"===r.name)throw lt.from(r,lt.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};at.forEach(["delete","get","head","post","put","patch"],(t=>{Bt.headers[t]={}}));const jt=Bt,zt=at.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ht=t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&zt[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e},Vt=Symbol("internals");function Gt(t){return t&&String(t).trim().toLowerCase()}function Wt(t){return!1===t||null==t?t:at.isArray(t)?t.map(Wt):String(t)}function Ut(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;while(i=n.exec(t))e[i[1]]=i[2];return e}const Yt=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function qt(t,e,n,i,r){return at.isFunction(i)?i.call(this,e,n):(r&&(e=n),at.isString(e)?at.isString(i)?-1!==e.indexOf(i):at.isRegExp(i)?i.test(e):void 0:void 0)}function Xt(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function Kt(t,e){const n=at.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}class Jt{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=Gt(e);if(!r)throw new Error("header name must be a non-empty string");const a=at.findKey(i,r);(!a||void 0===i[a]||!0===n||void 0===n&&!1!==i[a])&&(i[a||e]=Wt(t))}const a=(t,e)=>at.forEach(t,((t,n)=>r(t,n,e)));return at.isPlainObject(t)||t instanceof this.constructor?a(t,e):at.isString(t)&&(t=t.trim())&&!Yt(t)?a(Ht(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=Gt(t),t){const n=at.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return Ut(t);if(at.isFunction(e))return e.call(this,t,n);if(at.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Gt(t),t){const n=at.findKey(this,t);return!(!n||void 0===this[n]||e&&!qt(this,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=Gt(t),t){const r=at.findKey(n,t);!r||e&&!qt(n,n[r],r,e)||(delete n[r],i=!0)}}return at.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;while(n--){const r=e[n];t&&!qt(this,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return at.forEach(this,((i,r)=>{const a=at.findKey(n,r);if(a)return e[a]=Wt(i),void delete e[r];const o=t?Xt(r):String(r).trim();o!==r&&delete e[r],e[o]=Wt(i),n[o]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return at.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&at.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=this[Vt]=this[Vt]={accessors:{}},n=e.accessors,i=this.prototype;function r(t){const e=Gt(t);n[e]||(Kt(i,t),n[e]=!0)}return at.isArray(t)?t.forEach(r):r(t),this}}Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),at.reduceDescriptors(Jt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),at.freezeMethods(Jt);const Zt=Jt;function Qt(t,e){const n=this||jt,i=e||n,r=Zt.from(i.headers);let a=i.data;return at.forEach(t,(function(t){a=t.call(n,a,r.normalize(),e?e.status:void 0)})),r.normalize(),a}function te(t){return!(!t||!t.__CANCEL__)}function ee(t,e,n){lt.call(this,null==t?"canceled":t,lt.ERR_CANCELED,e,n),this.name="CanceledError"}at.inherits(ee,lt,{__CANCEL__:!0});const ne=ee;function ie(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new lt("Request failed with status code "+n.status,[lt.ERR_BAD_REQUEST,lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const re=Mt.isStandardBrowserEnv?function(){return{write:function(t,e,n,i,r,a){const o=[];o.push(t+"="+encodeURIComponent(e)),at.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),at.isString(i)&&o.push("path="+i),at.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function ae(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function oe(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function se(t,e){return t&&!ae(e)?oe(t,e):e}const ce=Mt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=at.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}();function le(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ue(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,a=0,o=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),l=i[o];r||(r=c),n[a]=s,i[a]=c;let u=o,h=0;while(u!==a)h+=n[u++],u%=t;if(a=(a+1)%t,a===o&&(o=(o+1)%t),c-r<e)return;const d=l&&c-l;return d?Math.round(1e3*h/d):void 0}}const he=ue;function de(t,e){let n=0;const i=he(50,250);return r=>{const a=r.loaded,o=r.lengthComputable?r.total:void 0,s=a-n,c=i(s),l=a<=o;n=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:r};u[e?"download":"upload"]=!0,t(u)}}const fe="undefined"!==typeof XMLHttpRequest,pe=fe&&function(t){return new Promise((function(e,n){let i=t.data;const r=Zt.from(t.headers).normalize(),a=t.responseType;let o,s;function c(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}at.isFormData(i)&&(Mt.isStandardBrowserEnv||Mt.isStandardBrowserWebWorkerEnv?r.setContentType(!1):r.getContentType(/^\s*multipart\/form-data/)?at.isString(s=r.getContentType())&&r.setContentType(s.replace(/^\s*(multipart\/form-data);+/,"$1")):r.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const u=se(t.baseURL,t.url);function h(){if(!l)return;const i=Zt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),r=a&&"text"!==a&&"json"!==a?l.response:l.responseText,o={data:r,status:l.status,statusText:l.statusText,headers:i,config:t,request:l};ie((function(t){e(t),c()}),(function(t){n(t),c()}),o),l=null}if(l.open(t.method.toUpperCase(),St(u,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new lt("Request aborted",lt.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new lt("Network Error",lt.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||Dt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new lt(e,i.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,t,l)),l=null},Mt.isStandardBrowserEnv){const e=ce(u)&&t.xsrfCookieName&&re.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===i&&r.setContentType(null),"setRequestHeader"in l&&at.forEach(r.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),at.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),a&&"json"!==a&&(l.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&l.addEventListener("progress",de(t.onDownloadProgress,!0)),"function"===typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",de(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{l&&(n(!e||e.type?new ne(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const d=le(u);d&&-1===Mt.protocols.indexOf(d)?n(new lt("Unsupported protocol "+d+":",lt.ERR_BAD_REQUEST,t)):l.send(i||null)}))},ve={http:ut,xhr:pe};at.forEach(ve,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const me=t=>`- ${t}`,ge=t=>at.isFunction(t)||null===t||!1===t,ye={getAdapter:t=>{t=at.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let a=0;a<e;a++){let e;if(n=t[a],i=n,!ge(n)&&(i=ve[(e=String(n)).toLowerCase()],void 0===i))throw new lt(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+a]=i}if(!i){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(me).join("\n"):" "+me(t[0]):"as no adapter specified";throw new lt("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i},adapters:ve};function be(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ne(null,t)}function _e(t){be(t),t.headers=Zt.from(t.headers),t.data=Qt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const e=ye.getAdapter(t.adapter||jt.adapter);return e(t).then((function(e){return be(t),e.data=Qt.call(t,t.transformResponse,e),e.headers=Zt.from(e.headers),e}),(function(e){return te(e)||(be(t),e&&e.response&&(e.response.data=Qt.call(t,t.transformResponse,e.response),e.response.headers=Zt.from(e.response.headers))),Promise.reject(e)}))}const we=t=>t instanceof Zt?t.toJSON():t;function ke(t,e){e=e||{};const n={};function i(t,e,n){return at.isPlainObject(t)&&at.isPlainObject(e)?at.merge.call({caseless:n},t,e):at.isPlainObject(e)?at.merge({},e):at.isArray(e)?e.slice():e}function r(t,e,n){return at.isUndefined(e)?at.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function a(t,e){if(!at.isUndefined(e))return i(void 0,e)}function o(t,e){return at.isUndefined(e)?at.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function s(n,r,a){return a in e?i(n,r):a in t?i(void 0,n):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(t,e)=>r(we(t),we(e),!0)};return at.forEach(Object.keys(Object.assign({},t,e)),(function(i){const a=c[i]||r,o=a(t[i],e[i],i);at.isUndefined(o)&&a!==s||(n[i]=o)})),n}const Se="1.6.0",xe={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{xe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ce={};function De(t,e,n){if("object"!==typeof t)throw new lt("options must be an object",lt.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;while(r-- >0){const a=i[r],o=e[a];if(o){const e=t[a],n=void 0===e||o(e,a,t);if(!0!==n)throw new lt("option "+a+" must be "+n,lt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new lt("Unknown option "+a,lt.ERR_BAD_OPTION)}}xe.transitional=function(t,e,n){function i(t,e){return"[Axios v"+Se+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,a)=>{if(!1===t)throw new lt(i(r," has been removed"+(e?" in "+e:"")),lt.ERR_DEPRECATED);return e&&!Ce[r]&&(Ce[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}};const Te={assertOptions:De,validators:xe},Oe=Te.validators;class Ee{constructor(t){this.defaults=t,this.interceptors={request:new Ct,response:new Ct}}request(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=ke(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Te.assertOptions(n,{silentJSONParsing:Oe.transitional(Oe.boolean),forcedJSONParsing:Oe.transitional(Oe.boolean),clarifyTimeoutError:Oe.transitional(Oe.boolean)},!1),null!=i&&(at.isFunction(i)?e.paramsSerializer={serialize:i}:Te.assertOptions(i,{encode:Oe.function,serialize:Oe.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=r&&at.merge(r.common,r[e.method]);r&&at.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=Zt.concat(a,r);const o=[];let s=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let u,h=0;if(!s){const t=[_e.bind(this),void 0];t.unshift.apply(t,o),t.push.apply(t,c),u=t.length,l=Promise.resolve(e);while(h<u)l=l.then(t[h++],t[h++]);return l}u=o.length;let d=e;h=0;while(h<u){const t=o[h++],e=o[h++];try{d=t(d)}catch(f){e.call(this,f);break}}try{l=_e.call(this,d)}catch(f){return Promise.reject(f)}h=0,u=c.length;while(h<u)l=l.then(c[h++],c[h++]);return l}getUri(t){t=ke(this.defaults,t);const e=se(t.baseURL,t.url);return St(e,t.params,t.paramsSerializer)}}at.forEach(["delete","get","head","options"],(function(t){Ee.prototype[t]=function(e,n){return this.request(ke(n||{},{method:t,url:e,data:(n||{}).data}))}})),at.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(ke(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Ee.prototype[t]=e(),Ee.prototype[t+"Form"]=e(!0)}));const Ae=Ee;class Pe{constructor(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new ne(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new Pe((function(e){t=e}));return{token:e,cancel:t}}}const Me=Pe;function Re(t){return function(e){return t.apply(null,e)}}function Ie(t){return at.isObject(t)&&!0===t.isAxiosError}const Ne={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ne).forEach((([t,e])=>{Ne[e]=t}));const $e=Ne;function Le(t){const e=new Ae(t),n=i(Ae.prototype.request,e);return at.extend(n,Ae.prototype,e,{allOwnKeys:!0}),at.extend(n,e,null,{allOwnKeys:!0}),n.create=function(e){return Le(ke(t,e))},n}const Fe=Le(jt);Fe.Axios=Ae,Fe.CanceledError=ne,Fe.CancelToken=Me,Fe.isCancel=te,Fe.VERSION=Se,Fe.toFormData=gt,Fe.AxiosError=lt,Fe.Cancel=Fe.CanceledError,Fe.all=function(t){return Promise.all(t)},Fe.spread=Re,Fe.isAxiosError=Ie,Fe.mergeConfig=ke,Fe.AxiosHeaders=Zt,Fe.formToJSON=t=>Lt(at.isHTMLForm(t)?new FormData(t):t),Fe.getAdapter=ye.getAdapter,Fe.HttpStatusCode=$e,Fe.default=Fe;const Be=Fe},794:(t,e,n)=>{"use strict";n.d(e,{Z:()=>S});var i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,a=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,u=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(t){var e,n,k,S=L.prototype={constructor:L,toString:null,valueOf:null},x=new L(1),C=20,D=4,T=-7,O=21,E=-1e7,A=1e7,P=!1,M=1,R=0,I={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",$=!0;function L(t,e){var r,o,c,h,d,f,p,v,m=this;if(!(m instanceof L))return new L(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>A?m.c=m.e=null:t.e<E?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((f="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(h=0,d=t;d>=10;d/=10,h++);return void(h>A?m.c=m.e=null:(m.e=h,m.c=[t]))}v=String(t)}else{if(!i.test(v=String(t)))return k(m,v,f);m.s=45==v.charCodeAt(0)?(v=v.slice(1),-1):1}(h=v.indexOf("."))>-1&&(v=v.replace(".","")),(d=v.search(/e/i))>0?(h<0&&(h=d),h+=+v.slice(d+1),v=v.substring(0,d)):h<0&&(h=v.length)}else{if(y(e,2,N.length,"Base"),10==e&&$)return m=new L(t),z(m,C+m.e+1,D);if(v=String(t),f="number"==typeof t){if(0*t!=0)return k(m,v,f,e);if(m.s=1/t<0?(v=v.slice(1),-1):1,L.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(s+t)}else m.s=45===v.charCodeAt(0)?(v=v.slice(1),-1):1;for(r=N.slice(0,e),h=d=0,p=v.length;d<p;d++)if(r.indexOf(o=v.charAt(d))<0){if("."==o){if(d>h){h=p;continue}}else if(!c&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){c=!0,d=-1,h=0;continue}return k(m,String(t),f,e)}f=!1,v=n(v,e,10,m.s),(h=v.indexOf("."))>-1?v=v.replace(".",""):h=v.length}for(d=0;48===v.charCodeAt(d);d++);for(p=v.length;48===v.charCodeAt(--p););if(v=v.slice(d,++p)){if(p-=d,f&&L.DEBUG&&p>15&&(t>u||t!==a(t)))throw Error(s+m.s*t);if((h=h-d-1)>A)m.c=m.e=null;else if(h<E)m.c=[m.e=0];else{if(m.e=h,m.c=[],d=(h+1)%l,h<0&&(d+=l),d<p){for(d&&m.c.push(+v.slice(0,d)),p-=l;d<p;)m.c.push(+v.slice(d,d+=l));d=l-(v=v.slice(d)).length}else d-=p;for(;d--;v+="0");m.c.push(+v)}}else m.c=[m.e=0]}function F(t,e,n,i){var r,a,o,s,c;if(null==n?n=D:y(n,0,8),!t.c)return t.toString();if(r=t.c[0],o=t.e,null==e)c=m(t.c),c=1==i||2==i&&(o<=T||o>=O)?_(c,o):w(c,o,"0");else if(t=z(new L(t),e,n),a=t.e,c=m(t.c),s=c.length,1==i||2==i&&(e<=a||a<=T)){for(;s<e;c+="0",s++);c=_(c,a)}else if(e-=o,c=w(c,a,"0"),a+1>s){if(--e>0)for(c+=".";e--;c+="0");}else if(e+=a-s,e>0)for(a+1==s&&(c+=".");e--;c+="0");return t.s<0&&r?"-"+c:c}function B(t,e){for(var n,i=1,r=new L(t[0]);i<t.length;i++){if(n=new L(t[i]),!n.s){r=n;break}e.call(r,n)&&(r=n)}return r}function j(t,e,n){for(var i=1,r=e.length;!e[--r];e.pop());for(r=e[0];r>=10;r/=10,i++);return(n=i+n*l-1)>A?t.c=t.e=null:n<E?t.c=[t.e=0]:(t.e=n,t.c=e),t}function z(t,e,n,i){var o,s,u,d,f,p,v,m=t.c,g=h;if(m){t:{for(o=1,d=m[0];d>=10;d/=10,o++);if(s=e-o,s<0)s+=l,u=e,f=m[p=0],v=f/g[o-u-1]%10|0;else if(p=r((s+1)/l),p>=m.length){if(!i)break t;for(;m.length<=p;m.push(0));f=v=0,o=1,s%=l,u=s-l+1}else{for(f=d=m[p],o=1;d>=10;d/=10,o++);s%=l,u=s-l+o,v=u<0?0:f/g[o-u-1]%10|0}if(i=i||e<0||null!=m[p+1]||(u<0?f:f%g[o-u-1]),i=n<4?(v||i)&&(0==n||n==(t.s<0?3:2)):v>5||5==v&&(4==n||i||6==n&&(s>0?u>0?f/g[o-u]:0:m[p-1])%10&1||n==(t.s<0?8:7)),e<1||!m[0])return m.length=0,i?(e-=t.e+1,m[0]=g[(l-e%l)%l],t.e=-e||0):m[0]=t.e=0,t;if(0==s?(m.length=p,d=1,p--):(m.length=p+1,d=g[l-s],m[p]=u>0?a(f/g[o-u]%g[u])*d:0),i)for(;;){if(0==p){for(s=1,u=m[0];u>=10;u/=10,s++);for(u=m[0]+=d,d=1;u>=10;u/=10,d++);s!=d&&(t.e++,m[0]==c&&(m[0]=1));break}if(m[p]+=d,m[p]!=c)break;m[p--]=0,d=1}for(s=m.length;0===m[--s];m.pop());}t.e>A?t.c=t.e=null:t.e<E&&(t.c=[t.e=0])}return t}function H(t){var e,n=t.e;return null===n?t.toString():(e=m(t.c),e=n<=T||n>=O?_(e,n):w(e,n,"0"),t.s<0?"-"+e:e)}return L.clone=p,L.ROUND_UP=0,L.ROUND_DOWN=1,L.ROUND_CEIL=2,L.ROUND_FLOOR=3,L.ROUND_HALF_UP=4,L.ROUND_HALF_DOWN=5,L.ROUND_HALF_EVEN=6,L.ROUND_HALF_CEIL=7,L.ROUND_HALF_FLOOR=8,L.EUCLID=9,L.config=L.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(o+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(n=t[e],y(n,0,f,e),C=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(n=t[e],y(n,0,8,e),D=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&(n=t[e],n&&n.pop?(y(n[0],-f,0,e),y(n[1],0,f,e),T=n[0],O=n[1]):(y(n,-f,f,e),T=-(O=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if(n=t[e],n&&n.pop)y(n[0],-f,-1,e),y(n[1],1,f,e),E=n[0],A=n[1];else{if(y(n,-f,f,e),!n)throw Error(o+e+" cannot be zero: "+n);E=-(A=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if(n=t[e],n!==!!n)throw Error(o+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw P=!n,Error(o+"crypto unavailable");P=n}else P=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(n=t[e],y(n,0,9,e),M=n),t.hasOwnProperty(e="POW_PRECISION")&&(n=t[e],y(n,0,f,e),R=n),t.hasOwnProperty(e="FORMAT")){if(n=t[e],"object"!=typeof n)throw Error(o+e+" not an object: "+n);I=n}if(t.hasOwnProperty(e="ALPHABET")){if(n=t[e],"string"!=typeof n||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(o+e+" invalid: "+n);$="0123456789"==n.slice(0,10),N=n}}return{DECIMAL_PLACES:C,ROUNDING_MODE:D,EXPONENTIAL_AT:[T,O],RANGE:[E,A],CRYPTO:P,MODULO_MODE:M,POW_PRECISION:R,FORMAT:I,ALPHABET:N}},L.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!L.DEBUG)return!0;var e,n,i=t.c,r=t.e,s=t.s;t:if("[object Array]"=={}.toString.call(i)){if((1===s||-1===s)&&r>=-f&&r<=f&&r===a(r)){if(0===i[0]){if(0===r&&1===i.length)return!0;break t}if(e=(r+1)%l,e<1&&(e+=l),String(i[0]).length==e){for(e=0;e<i.length;e++)if(n=i[e],n<0||n>=c||n!==a(n))break t;if(0!==n)return!0}}}else if(null===i&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(o+"Invalid BigNumber: "+t)},L.maximum=L.max=function(){return B(arguments,S.lt)},L.minimum=L.min=function(){return B(arguments,S.gt)},L.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return a(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,i,s,c,u,d=0,p=[],v=new L(x);if(null==t?t=C:y(t,0,f),c=r(t/l),P)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(c*=2));d<c;)u=131072*n[d]+(n[d+1]>>>11),u>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),n[d]=i[0],n[d+1]=i[1]):(p.push(u%1e14),d+=2);d=c/2}else{if(!crypto.randomBytes)throw P=!1,Error(o+"crypto unavailable");for(n=crypto.randomBytes(c*=7);d<c;)u=281474976710656*(31&n[d])+1099511627776*n[d+1]+4294967296*n[d+2]+16777216*n[d+3]+(n[d+4]<<16)+(n[d+5]<<8)+n[d+6],u>=9e15?crypto.randomBytes(7).copy(n,d):(p.push(u%1e14),d+=7);d=c/7}if(!P)for(;d<c;)u=e(),u<9e15&&(p[d++]=u%1e14);for(c=p[--d],t%=l,c&&t&&(u=h[l-t],p[d]=a(c/u)*u);0===p[d];p.pop(),d--);if(d<0)p=[s=0];else{for(s=-1;0===p[0];p.splice(0,1),s-=l);for(d=1,u=p[0];u>=10;u/=10,d++);d<l&&(s-=l-d)}return v.e=s,v.c=p,v}}(),L.sum=function(){for(var t=1,e=arguments,n=new L(e[0]);t<e.length;)n=n.plus(e[t++]);return n},n=function(){var t="0123456789";function n(t,e,n,i){for(var r,a,o=[0],s=0,c=t.length;s<c;){for(a=o.length;a--;o[a]*=e);for(o[0]+=i.indexOf(t.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}return function(i,r,a,o,s){var c,l,u,h,d,f,p,v,g=i.indexOf("."),y=C,b=D;for(g>=0&&(h=R,R=0,i=i.replace(".",""),v=new L(r),f=v.pow(i.length-g),R=h,v.c=n(w(m(f.c),f.e,"0"),10,a,t),v.e=v.c.length),p=n(i,r,a,s?(c=N,t):(c=t,N)),u=h=p.length;0==p[--h];p.pop());if(!p[0])return c.charAt(0);if(g<0?--u:(f.c=p,f.e=u,f.s=o,f=e(f,v,y,b,a),p=f.c,d=f.r,u=f.e),l=u+y+1,g=p[l],h=a/2,d=d||l<0||null!=p[l+1],d=b<4?(null!=g||d)&&(0==b||b==(f.s<0?3:2)):g>h||g==h&&(4==b||d||6==b&&1&p[l-1]||b==(f.s<0?8:7)),l<1||!p[0])i=d?w(c.charAt(1),-y,c.charAt(0)):c.charAt(0);else{if(p.length=l,d)for(--a;++p[--l]>a;)p[l]=0,l||(++u,p=[1].concat(p));for(h=p.length;!p[--h];);for(g=0,i="";g<=h;i+=c.charAt(p[g++]));i=w(i,u,c.charAt(0))}return i}}(),e=function(){function t(t,e,n){var i,r,a,o,s=0,c=t.length,l=e%d,u=e/d|0;for(t=t.slice();c--;)a=t[c]%d,o=t[c]/d|0,i=u*a+o*l,r=l*a+i%d*d+s,s=(r/n|0)+(i/d|0)+u*o,t[c]=r%n;return s&&(t=[s].concat(t)),t}function e(t,e,n,i){var r,a;if(n!=i)a=n>i?1:-1;else for(r=a=0;r<n;r++)if(t[r]!=e[r]){a=t[r]>e[r]?1:-1;break}return a}function n(t,e,n,i){for(var r=0;n--;)t[n]-=r,r=t[n]<e[n]?1:0,t[n]=r*i+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(i,r,o,s,u){var h,d,f,p,m,g,y,b,_,w,k,S,x,C,D,T,O,E=i.s==r.s?1:-1,A=i.c,P=r.c;if(!A||!A[0]||!P||!P[0])return new L(i.s&&r.s&&(A?!P||A[0]!=P[0]:P)?A&&0==A[0]||!P?0*E:E/0:NaN);for(b=new L(E),_=b.c=[],d=i.e-r.e,E=o+d+1,u||(u=c,d=v(i.e/l)-v(r.e/l),E=E/l|0),f=0;P[f]==(A[f]||0);f++);if(P[f]>(A[f]||0)&&d--,E<0)_.push(1),p=!0;else{for(C=A.length,T=P.length,f=0,E+=2,m=a(u/(P[0]+1)),m>1&&(P=t(P,m,u),A=t(A,m,u),T=P.length,C=A.length),x=T,w=A.slice(0,T),k=w.length;k<T;w[k++]=0);O=P.slice(),O=[0].concat(O),D=P[0],P[1]>=u/2&&D++;do{if(m=0,h=e(P,w,T,k),h<0){if(S=w[0],T!=k&&(S=S*u+(w[1]||0)),m=a(S/D),m>1){m>=u&&(m=u-1),g=t(P,m,u),y=g.length,k=w.length;while(1==e(g,w,y,k))m--,n(g,T<y?O:P,y,u),y=g.length,h=1}else 0==m&&(h=m=1),g=P.slice(),y=g.length;if(y<k&&(g=[0].concat(g)),n(w,g,k,u),k=w.length,-1==h)while(e(P,w,T,k)<1)m++,n(w,T<k?O:P,k,u),k=w.length}else 0===h&&(m++,w=[0]);_[f++]=m,w[0]?w[k++]=A[x]||0:(w=[A[x]],k=1)}while((x++<C||null!=w[0])&&E--);p=null!=w[0],_[0]||_.splice(0,1)}if(u==c){for(f=1,E=_[0];E>=10;E/=10,f++);z(b,o+(b.e=f+d*l-1)+1,s,p)}else b.e=d,b.r=+p;return b}}(),k=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,n=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,s,c,l){var u,h=c?s:s.replace(r,"");if(i.test(h))a.s=isNaN(h)?null:h<0?-1:1;else{if(!c&&(h=h.replace(t,(function(t,e,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=u?t:e})),l&&(u=l,h=h.replace(e,"$1").replace(n,"0.$1")),s!=h))return new L(h,u);if(L.DEBUG)throw Error(o+"Not a"+(l?" base "+l:"")+" number: "+s);a.s=null}a.c=a.e=null}}(),S.absoluteValue=S.abs=function(){var t=new L(this);return t.s<0&&(t.s=1),t},S.comparedTo=function(t,e){return g(this,new L(t,e))},S.decimalPlaces=S.dp=function(t,e){var n,i,r,a=this;if(null!=t)return y(t,0,f),null==e?e=D:y(e,0,8),z(new L(a),t+a.e+1,e);if(!(n=a.c))return null;if(i=((r=n.length-1)-v(this.e/l))*l,r=n[r])for(;r%10==0;r/=10,i--);return i<0&&(i=0),i},S.dividedBy=S.div=function(t,n){return e(this,new L(t,n),C,D)},S.dividedToIntegerBy=S.idiv=function(t,n){return e(this,new L(t,n),0,1)},S.exponentiatedBy=S.pow=function(t,e){var n,i,s,c,u,h,d,f,p,v=this;if(t=new L(t),t.c&&!t.isInteger())throw Error(o+"Exponent not an integer: "+H(t));if(null!=e&&(e=new L(e)),h=t.e>14,!v.c||!v.c[0]||1==v.c[0]&&!v.e&&1==v.c.length||!t.c||!t.c[0])return p=new L(Math.pow(+H(v),h?2-b(t):+H(t))),e?p.mod(e):p;if(d=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new L(NaN);i=!d&&v.isInteger()&&e.isInteger(),i&&(v=v.mod(e))}else{if(t.e>9&&(v.e>0||v.e<-1||(0==v.e?v.c[0]>1||h&&v.c[1]>=24e7:v.c[0]<8e13||h&&v.c[0]<=9999975e7)))return c=v.s<0&&b(t)?-0:0,v.e>-1&&(c=1/c),new L(d?1/c:c);R&&(c=r(R/l+2))}for(h?(n=new L(.5),d&&(t.s=1),f=b(t)):(s=Math.abs(+H(t)),f=s%2),p=new L(x);;){if(f){if(p=p.times(v),!p.c)break;c?p.c.length>c&&(p.c.length=c):i&&(p=p.mod(e))}if(s){if(s=a(s/2),0===s)break;f=s%2}else if(t=t.times(n),z(t,t.e+1,1),t.e>14)f=b(t);else{if(s=+H(t),0===s)break;f=s%2}v=v.times(v),c?v.c&&v.c.length>c&&(v.c.length=c):i&&(v=v.mod(e))}return i?p:(d&&(p=x.div(p)),e?p.mod(e):c?z(p,R,D,u):p)},S.integerValue=function(t){var e=new L(this);return null==t?t=D:y(t,0,8),z(e,e.e+1,t)},S.isEqualTo=S.eq=function(t,e){return 0===g(this,new L(t,e))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(t,e){return g(this,new L(t,e))>0},S.isGreaterThanOrEqualTo=S.gte=function(t,e){return 1===(e=g(this,new L(t,e)))||0===e},S.isInteger=function(){return!!this.c&&v(this.e/l)>this.c.length-2},S.isLessThan=S.lt=function(t,e){return g(this,new L(t,e))<0},S.isLessThanOrEqualTo=S.lte=function(t,e){return-1===(e=g(this,new L(t,e)))||0===e},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(t,e){var n,i,r,a,o=this,s=o.s;if(t=new L(t,e),e=t.s,!s||!e)return new L(NaN);if(s!=e)return t.s=-e,o.plus(t);var u=o.e/l,h=t.e/l,d=o.c,f=t.c;if(!u||!h){if(!d||!f)return d?(t.s=-e,t):new L(f?o:NaN);if(!d[0]||!f[0])return f[0]?(t.s=-e,t):new L(d[0]?o:3==D?-0:0)}if(u=v(u),h=v(h),d=d.slice(),s=u-h){for((a=s<0)?(s=-s,r=d):(h=u,r=f),r.reverse(),e=s;e--;r.push(0));r.reverse()}else for(i=(a=(s=d.length)<(e=f.length))?s:e,s=e=0;e<i;e++)if(d[e]!=f[e]){a=d[e]<f[e];break}if(a&&(r=d,d=f,f=r,t.s=-t.s),e=(i=f.length)-(n=d.length),e>0)for(;e--;d[n++]=0);for(e=c-1;i>s;){if(d[--i]<f[i]){for(n=i;n&&!d[--n];d[n]=e);--d[n],d[i]+=c}d[i]-=f[i]}for(;0==d[0];d.splice(0,1),--h);return d[0]?j(t,d,h):(t.s=3==D?-1:1,t.c=[t.e=0],t)},S.modulo=S.mod=function(t,n){var i,r,a=this;return t=new L(t,n),!a.c||!t.s||t.c&&!t.c[0]?new L(NaN):!t.c||a.c&&!a.c[0]?new L(a):(9==M?(r=t.s,t.s=1,i=e(a,t,0,3),t.s=r,i.s*=r):i=e(a,t,0,M),t=a.minus(i.times(t)),t.c[0]||1!=M||(t.s=a.s),t)},S.multipliedBy=S.times=function(t,e){var n,i,r,a,o,s,u,h,f,p,m,g,y,b,_,w=this,k=w.c,S=(t=new L(t,e)).c;if(!k||!S||!k[0]||!S[0])return!w.s||!t.s||k&&!k[0]&&!S||S&&!S[0]&&!k?t.c=t.e=t.s=null:(t.s*=w.s,k&&S?(t.c=[0],t.e=0):t.c=t.e=null),t;for(i=v(w.e/l)+v(t.e/l),t.s*=w.s,u=k.length,p=S.length,u<p&&(y=k,k=S,S=y,r=u,u=p,p=r),r=u+p,y=[];r--;y.push(0));for(b=c,_=d,r=p;--r>=0;){for(n=0,m=S[r]%_,g=S[r]/_|0,o=u,a=r+o;a>r;)h=k[--o]%_,f=k[o]/_|0,s=g*h+f*m,h=m*h+s%_*_+y[a]+n,n=(h/b|0)+(s/_|0)+g*f,y[a--]=h%b;y[a]=n}return n?++i:y.splice(0,1),j(t,y,i)},S.negated=function(){var t=new L(this);return t.s=-t.s||null,t},S.plus=function(t,e){var n,i=this,r=i.s;if(t=new L(t,e),e=t.s,!r||!e)return new L(NaN);if(r!=e)return t.s=-e,i.minus(t);var a=i.e/l,o=t.e/l,s=i.c,u=t.c;if(!a||!o){if(!s||!u)return new L(r/0);if(!s[0]||!u[0])return u[0]?t:new L(s[0]?i:0*r)}if(a=v(a),o=v(o),s=s.slice(),r=a-o){for(r>0?(o=a,n=u):(r=-r,n=s),n.reverse();r--;n.push(0));n.reverse()}for(r=s.length,e=u.length,r-e<0&&(n=u,u=s,s=n,e=r),r=0;e;)r=(s[--e]=s[e]+u[e]+r)/c|0,s[e]=c===s[e]?0:s[e]%c;return r&&(s=[r].concat(s),++o),j(t,s,o)},S.precision=S.sd=function(t,e){var n,i,r,a=this;if(null!=t&&t!==!!t)return y(t,1,f),null==e?e=D:y(e,0,8),z(new L(a),t,e);if(!(n=a.c))return null;if(r=n.length-1,i=r*l+1,r=n[r]){for(;r%10==0;r/=10,i--);for(r=n[0];r>=10;r/=10,i++);}return t&&a.e+1>i&&(i=a.e+1),i},S.shiftedBy=function(t){return y(t,-u,u),this.times("1e"+t)},S.squareRoot=S.sqrt=function(){var t,n,i,r,a,o=this,s=o.c,c=o.s,l=o.e,u=C+4,h=new L("0.5");if(1!==c||!s||!s[0])return new L(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(c=Math.sqrt(+H(o)),0==c||c==1/0?(n=m(s),(n.length+l)%2==0&&(n+="0"),c=Math.sqrt(+n),l=v((l+1)/2)-(l<0||l%2),c==1/0?n="5e"+l:(n=c.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),i=new L(n)):i=new L(c+""),i.c[0])for(l=i.e,c=l+u,c<3&&(c=0);;)if(a=i,i=h.times(a.plus(e(o,a,u,1))),m(a.c).slice(0,c)===(n=m(i.c)).slice(0,c)){if(i.e<l&&--c,n=n.slice(c-3,c+1),"9999"!=n&&(r||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(z(i,i.e+C+2,1),t=!i.times(i).eq(o));break}if(!r&&(z(a,a.e+C+2,0),a.times(a).eq(o))){i=a;break}u+=4,c+=4,r=1}return z(i,i.e+C+1,D,t)},S.toExponential=function(t,e){return null!=t&&(y(t,0,f),t++),F(this,t,e,1)},S.toFixed=function(t,e){return null!=t&&(y(t,0,f),t=t+this.e+1),F(this,t,e)},S.toFormat=function(t,e,n){var i,r=this;if(null==n)null!=t&&e&&"object"==typeof e?(n=e,e=null):t&&"object"==typeof t?(n=t,t=e=null):n=I;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(i=r.toFixed(t,e),r.c){var a,s=i.split("."),c=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",h=s[0],d=s[1],f=r.s<0,p=f?h.slice(1):h,v=p.length;if(l&&(a=c,c=l,l=a,v-=a),c>0&&v>0){for(a=v%c||c,h=p.substr(0,a);a<v;a+=c)h+=u+p.substr(a,c);l>0&&(h+=u+p.slice(a)),f&&(h="-"+h)}i=d?h+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):h}return(n.prefix||"")+i+(n.suffix||"")},S.toFraction=function(t){var n,i,r,a,s,c,u,d,f,p,v,g,y=this,b=y.c;if(null!=t&&(u=new L(t),!u.isInteger()&&(u.c||1!==u.s)||u.lt(x)))throw Error(o+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+H(u));if(!b)return new L(y);for(n=new L(x),f=i=new L(x),r=d=new L(x),g=m(b),s=n.e=g.length-y.e-1,n.c[0]=h[(c=s%l)<0?l+c:c],t=!t||u.comparedTo(n)>0?s>0?n:f:u,c=A,A=1/0,u=new L(g),d.c[0]=0;;){if(p=e(u,n,0,1),a=i.plus(p.times(r)),1==a.comparedTo(t))break;i=r,r=a,f=d.plus(p.times(a=f)),d=a,n=u.minus(p.times(a=n)),u=a}return a=e(t.minus(i),r,0,1),d=d.plus(a.times(f)),i=i.plus(a.times(r)),d.s=f.s=y.s,s*=2,v=e(f,r,s,D).minus(y).abs().comparedTo(e(d,i,s,D).minus(y).abs())<1?[f,r]:[d,i],A=c,v},S.toNumber=function(){return+H(this)},S.toPrecision=function(t,e){return null!=t&&y(t,1,f),F(this,t,e,2)},S.toString=function(t){var e,i=this,r=i.s,a=i.e;return null===a?r?(e="Infinity",r<0&&(e="-"+e)):e="NaN":(null==t?e=a<=T||a>=O?_(m(i.c),a):w(m(i.c),a,"0"):10===t&&$?(i=z(new L(i),C+a+1,D),e=w(m(i.c),i.e,"0")):(y(t,2,N.length,"Base"),e=n(w(m(i.c),a,"0"),10,t,r,!0)),r<0&&i.c[0]&&(e="-"+e)),e},S.valueOf=S.toJSON=function(){return H(this)},S._isBigNumber=!0,S[Symbol.toStringTag]="BigNumber",S[Symbol.for("nodejs.util.inspect.custom")]=S.valueOf,null!=t&&L.set(t),L}function v(t){var e=0|t;return t>0||t===e?e:e-1}function m(t){for(var e,n,i=1,r=t.length,a=t[0]+"";i<r;){for(e=t[i++]+"",n=l-e.length;n--;e="0"+e);a+=e}for(r=a.length;48===a.charCodeAt(--r););return a.slice(0,r+1||1)}function g(t,e){var n,i,r=t.c,a=e.c,o=t.s,s=e.s,c=t.e,l=e.e;if(!o||!s)return null;if(n=r&&!r[0],i=a&&!a[0],n||i)return n?i?0:-s:o;if(o!=s)return o;if(n=o<0,i=c==l,!r||!a)return i?0:!r^n?1:-1;if(!i)return c>l^n?1:-1;for(s=(c=r.length)<(l=a.length)?c:l,o=0;o<s;o++)if(r[o]!=a[o])return r[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function y(t,e,n,i){if(t<e||t>n||t!==a(t))throw Error(o+(i||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function b(t){var e=t.c.length-1;return v(t.e/l)==e&&t.c[e]%2!=0}function _(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function w(t,e,n){var i,r;if(e<0){for(r=n+".";++e;r+=n);t=r+t}else if(i=t.length,++e>i){for(r=n,e-=i;--e;r+=n);t+=r}else e<i&&(t=t.slice(0,e)+"."+t.slice(e));return t}var k=p();const S=k},649:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>rr});var i=Math.PI/180;function r(){return"undefined"!==typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window))}const a="undefined"!==typeof global?global:"undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope?self:{},o={_global:a,version:"8.3.13",isBrowser:r(),isUnminified:/param/.test(function(t){}.toString()),dblClickWindow:400,getAngle(t){return o.angleDeg?t*i:t},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:"undefined"!==typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return o["DD"].isDragging},isDragReady(){return!!o["DD"].node},document:a.document,_injectGlobal(t){a.Konva=t}},s=t=>{o[t.prototype.getClassName()]=t};o._injectGlobal(o);class c{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new c(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var e=this.m;return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}}translate(t,e){return this.m[4]+=this.m[0]*t+this.m[2]*e,this.m[5]+=this.m[1]*t+this.m[3]*e,this}scale(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this}rotate(t){var e=Math.cos(t),n=Math.sin(t),i=this.m[0]*e+this.m[2]*n,r=this.m[1]*e+this.m[3]*n,a=this.m[0]*-n+this.m[2]*e,o=this.m[1]*-n+this.m[3]*e;return this.m[0]=i,this.m[1]=r,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,e){var n=this.m[0]+this.m[2]*e,i=this.m[1]+this.m[3]*e,r=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=i,this.m[2]=r,this.m[3]=a,this}multiply(t){var e=this.m[0]*t.m[0]+this.m[2]*t.m[1],n=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],r=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],o=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=n,this.m[2]=i,this.m[3]=r,this.m[4]=a,this.m[5]=o,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,n=-this.m[1]*t,i=-this.m[2]*t,r=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=n,this.m[2]=i,this.m[3]=r,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}decompose(){var t=this.m[0],e=this.m[1],n=this.m[2],i=this.m[3],r=this.m[4],a=this.m[5],o=t*i-e*n;let s={x:r,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=e){var c=Math.sqrt(t*t+e*e);s.rotation=e>0?Math.acos(t/c):-Math.acos(t/c),s.scaleX=c,s.scaleY=o/c,s.skewX=(t*n+e*i)/o,s.skewY=0}else if(0!=n||0!=i){var l=Math.sqrt(n*n+i*i);s.rotation=Math.PI/2-(i>0?Math.acos(-n/l):-Math.acos(n/l)),s.scaleX=o/l,s.scaleY=l,s.skewX=0,s.skewY=(t*n+e*i)/o}return s.rotation=C._getRotation(s.rotation),s}}var l="[object Array]",u="[object Number]",h="[object String]",d="[object Boolean]",f=Math.PI/180,p=180/Math.PI,v="#",m="",g="0",y="Konva warning: ",b="Konva error: ",_="rgb(",w={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]},k=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,S=[];const x="undefined"!==typeof requestAnimationFrame&&requestAnimationFrame||function(t){setTimeout(t,60)},C={_isElement(t){return!(!t||1!=t.nodeType)},_isFunction(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isPlainObject(t){return!!t&&t.constructor===Object},_isArray(t){return Object.prototype.toString.call(t)===l},_isNumber(t){return Object.prototype.toString.call(t)===u&&!isNaN(t)&&isFinite(t)},_isString(t){return Object.prototype.toString.call(t)===h},_isBoolean(t){return Object.prototype.toString.call(t)===d},isObject(t){return t instanceof Object},isValidSelector(t){if("string"!==typeof t)return!1;var e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign(t){return 0===t||t>0?1:-1},requestAnimFrame(t){S.push(t),1===S.length&&x((function(){const t=S;S=[],t.forEach((function(t){t()}))}))},createCanvasElement(){var t=document.createElement("canvas");try{t.style=t.style||{}}catch(e){}return t},createImageElement(){return document.createElement("img")},_isInDocument(t){while(t=t.parentNode)if(t==document)return!0;return!1},_urlToImage(t,e){var n=C.createImageElement();n.onload=function(){e(n)},n.src=t},_rgbToHex(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb(t){t=t.replace(v,m);var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor(){var t=(16777215*Math.random()<<0).toString(16);while(t.length<6)t=g+t;return v+t},getRGB(t){var e;return t in w?(e=w[t],{r:e[0],g:e[1],b:e[2]}):t[0]===v?this._hexToRgb(t.substring(1)):t.substr(0,4)===_?(e=k.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA(t){return t=t||"black",C._namedColorToRBA(t)||C._hex3ColorToRGBA(t)||C._hex6ColorToRGBA(t)||C._rgbColorToRGBA(t)||C._rgbaColorToRGBA(t)||C._hslColorToRGBA(t)},_namedColorToRBA(t){var e=w[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(0===t.indexOf("rgb(")){t=t.match(/rgb\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(0===t.indexOf("rgba(")){t=t.match(/rgba\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(((t,e)=>"%"===t.slice(-1)?3===e?parseInt(t)/100:parseInt(t)/100*255:Number(t)));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex6ColorToRGBA(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex3ColorToRGBA(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){const[e,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),i=Number(n[0])/360,r=Number(n[1])/100,a=Number(n[2])/100;let o,s,c;if(0===r)return c=255*a,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};o=a<.5?a*(1+r):a+r-a*r;const l=2*a-o,u=[0,0,0];for(let t=0;t<3;t++)s=i+1/3*-(t-1),s<0&&s++,s>1&&s--,c=6*s<1?l+6*(o-l)*s:2*s<1?o:3*s<2?l+(o-l)*(2/3-s)*6:l,u[t]=255*c;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection(t,e){return!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y)},cloneObject(t){var e={};for(var n in t)this._isPlainObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray(t){return t.slice(0)},degToRad(t){return t*f},radToDeg(t){return t*p},_degToRad(t){return C.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),C.degToRad(t)},_radToDeg(t){return C.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),C.radToDeg(t)},_getRotation(t){return o.angleDeg?C.radToDeg(t):t},_capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)},throw(t){throw new Error(b+t)},error(t){console.error(b+t)},warn(t){o.showWarnings&&console.warn(y+t)},each(t,e){for(var n in t)e(n,t[n])},_inRange(t,e,n){return e<=t&&t<n},_getProjectionToSegment(t,e,n,i,r,a){var o,s,c,l=(t-n)*(t-n)+(e-i)*(e-i);if(0==l)o=t,s=e,c=(r-n)*(r-n)+(a-i)*(a-i);else{var u=((r-t)*(n-t)+(a-e)*(i-e))/l;u<0?(o=t,s=e,c=(t-r)*(t-r)+(e-a)*(e-a)):u>1?(o=n,s=i,c=(n-r)*(n-r)+(i-a)*(i-a)):(o=t+u*(n-t),s=e+u*(i-e),c=(o-r)*(o-r)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(t,e,n){var i=C.cloneObject(t),r=Number.MAX_VALUE;return e.forEach((function(a,o){if(n||o!==e.length-1){var s=e[(o+1)%e.length],c=C._getProjectionToSegment(a.x,a.y,s.x,s.y,t.x,t.y),l=c[0],u=c[1],h=c[2];h<r&&(i.x=l,i.y=u,r=h)}})),i},_prepareArrayForTween(t,e,n){var i,r=[],a=[];if(t.length>e.length){var o=e;e=t,t=o}for(i=0;i<t.length;i+=2)r.push({x:t[i],y:t[i+1]});for(i=0;i<e.length;i+=2)a.push({x:e[i],y:e[i+1]});var s=[];return a.forEach((function(t){var e=C._getProjectionToLine(t,r,n);s.push(e.x),s.push(e.y)})),s},_prepareToStringify(t){var e;for(var n in t.visitedByCircularReferenceRemoval=!0,t)if(t.hasOwnProperty(n)&&t[n]&&"object"==typeof t[n])if(e=Object.getOwnPropertyDescriptor(t,n),t[n].visitedByCircularReferenceRemoval||C._isElement(t[n])){if(!e.configurable)return null;delete t[n]}else if(null===C._prepareToStringify(t[n])){if(!e.configurable)return null;delete t[n]}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(var n in e)t[n]=e[n];return t},_getFirstPointerId(t){return t.touches?t.changedTouches[0].identifier:t.pointerId||999}};function D(t){return C._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)||C._isBoolean(t)?t:Object.prototype.toString.call(t)}function T(t){return t>255?255:t<0?0:Math.round(t)}function O(){if(o.isUnminified)return function(t,e){return C._isNumber(t)||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function E(t){if(o.isUnminified)return function(e,n){let i=C._isNumber(e),r=C._isArray(e)&&e.length==t;return i||r||C.warn(D(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}}function A(){if(o.isUnminified)return function(t,e){var n=C._isNumber(t),i="auto"===t;return n||i||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function P(){if(o.isUnminified)return function(t,e){return C._isString(t)||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function M(){if(o.isUnminified)return function(t,e){const n=C._isString(t),i="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;return n||i||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function R(){if(o.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(C._isArray(t)?t.forEach((function(t){C._isNumber(t)||C.warn('"'+e+'" attribute has non numeric element '+t+". Make sure that all elements are numbers.")})):C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function I(){if(o.isUnminified)return function(t,e){var n=!0===t||!1===t;return n||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function N(t){if(o.isUnminified)return function(e,n){return void 0===e||null===e||C.isObject(e)||C.warn(D(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}var $="get",L="set";const F={addGetterSetter(t,e,n,i,r){F.addGetter(t,e,n),F.addSetter(t,e,i,r),F.addOverloadedGetterSetter(t,e)},addGetter(t,e,n){var i=$+C._capitalize(e);t.prototype[i]=t.prototype[i]||function(){var t=this.attrs[e];return void 0===t?n:t}},addSetter(t,e,n,i){var r=L+C._capitalize(e);t.prototype[r]||F.overWriteSetter(t,e,n,i)},overWriteSetter(t,e,n,i){var r=L+C._capitalize(e);t.prototype[r]=function(t){return n&&void 0!==t&&null!==t&&(t=n.call(this,t,e)),this._setAttr(e,t),i&&i.call(this),this}},addComponentsGetterSetter(t,e,n,i,r){var a,o,s=n.length,c=C._capitalize,l=$+c(e),u=L+c(e);t.prototype[l]=function(){var t={};for(a=0;a<s;a++)o=n[a],t[o]=this.getAttr(e+c(o));return t};var h=N(n);t.prototype[u]=function(t){var a,o=this.attrs[e];for(a in i&&(t=i.call(this,t)),h&&h.call(this,t,e),t)t.hasOwnProperty(a)&&this._setAttr(e+c(a),t[a]);return t||n.forEach((t=>{this._setAttr(e+c(t),void 0)})),this._fireChangeEvent(e,o,t),r&&r.call(this),this},F.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){var n=C._capitalize(e),i=L+n,r=$+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[r]()}},addDeprecatedGetterSetter(t,e,n,i){C.error("Adding deprecated "+e);var r=$+C._capitalize(e),a=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[r]=function(){C.error(a);var t=this.attrs[e];return void 0===t?n:t},F.addSetter(t,e,i,(function(){C.error(a)})),F.addOverloadedGetterSetter(t,e)},backCompat(t,e){C.each(e,(function(e,n){var i=t.prototype[n],r=$+C._capitalize(e),a=L+C._capitalize(e);function o(){i.apply(this,arguments),C.error('"'+e+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}t.prototype[e]=o,t.prototype[r]=o,t.prototype[a]=o}))},afterSetFilter(){this._filterUpToDate=!1}};function B(t){var e,n,i=[],r=t.length,a=C;for(e=0;e<r;e++)n=t[e],a._isNumber(n)?n=Math.round(1e3*n)/1e3:a._isString(n)||(n+=""),i.push(n);return i}var j=",",z="(",H=")",V="([",G="])",W=";",U="()",Y="=",q=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],X=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const K=100;class J{constructor(t){this.canvas=t,o.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,e){var n,i,r,a,o=this.traceArr,s=o.length,c="";for(n=0;n<s;n++)i=o[n],r=i.method,r?(a=i.args,c+=r,t?c+=U:C._isArray(a[0])?c+=V+a.join(j)+G:(e&&(a=a.map((t=>"number"===typeof t?Math.floor(t):t))),c+=z+a.join(j)+H)):(c+=i.property,t||(c+=Y+i.val)),c+=W;return c}clearTrace(){this.traceArr=[]}_trace(t){var e,n=this.traceArr;n.push(t),e=n.length,e>=K&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){var e=t.getLineCap();e&&this.setAttr("lineCap",e)}_applyOpacity(t){var e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){var e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,n,i,r,a){this._context.arc(t,e,n,i,r,a)}arcTo(t,e,n,i,r){this._context.arcTo(t,e,n,i,r)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,n,i,r,a){this._context.bezierCurveTo(t,e,n,i,r,a)}clearRect(t,e,n,i){this._context.clearRect(t,e,n,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,e){var n=arguments;return 2===n.length?this._context.createImageData(t,e):1===n.length?this._context.createImageData(t):void 0}createLinearGradient(t,e,n,i){return this._context.createLinearGradient(t,e,n,i)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,n,i,r,a){return this._context.createRadialGradient(t,e,n,i,r,a)}drawImage(t,e,n,i,r,a,o,s,c){var l=arguments,u=this._context;3===l.length?u.drawImage(t,e,n):5===l.length?u.drawImage(t,e,n,i,r):9===l.length&&u.drawImage(t,e,n,i,r,a,o,s,c)}ellipse(t,e,n,i,r,a,o,s){this._context.ellipse(t,e,n,i,r,a,o,s)}isPointInPath(t,e){return this._context.isPointInPath(t,e)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,e,n,i){this._context.fillRect(t,e,n,i)}strokeRect(t,e,n,i){this._context.strokeRect(t,e,n,i)}fillText(t,e,n,i){i?this._context.fillText(t,e,n,i):this._context.fillText(t,e,n)}measureText(t){return this._context.measureText(t)}getImageData(t,e,n,i){return this._context.getImageData(t,e,n,i)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,n,i){this._context.rect(t,e,n,i)}putImageData(t,e,n){this._context.putImageData(t,e,n)}quadraticCurveTo(t,e,n,i){this._context.quadraticCurveTo(t,e,n,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context["mozDash"]=t:"webkitLineDash"in this._context&&(this._context["webkitLineDash"]=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,e,n,i,r,a){this._context.setTransform(t,e,n,i,r,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,n,i){this._context.strokeText(t,e,n,i)}transform(t,e,n,i,r,a){this._context.transform(t,e,n,i,r,a)}translate(t,e){this._context.translate(t,e)}_enableTrace(){var t,e,n=this,i=q.length,r=this.setAttr,a=function(t){var i,r=n[t];n[t]=function(){return e=B(Array.prototype.slice.call(arguments,0)),i=r.apply(n,arguments),n._trace({method:t,args:e}),i}};for(t=0;t<i;t++)a(q[t]);n.setAttr=function(){r.apply(n,arguments);var t=arguments[0],e=arguments[1];"shadowOffsetX"!==t&&"shadowOffsetY"!==t&&"shadowBlur"!==t||(e/=this.canvas.getPixelRatio()),n._trace({property:t,val:e})}}_applyGlobalCompositeOperation(t){const e=t.attrs.globalCompositeOperation;var n=!e||"source-over"===e;n||this.setAttr("globalCompositeOperation",e)}}X.forEach((function(t){Object.defineProperty(J.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})}));class Z extends J{constructor(t){super(t),this._context=t._canvas.getContext("2d")}_fillColor(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){var e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){var e=t.fill(),n=t.getFillPriority();if(e&&"color"===n)this._fillColor(t);else{var i=t.getFillPatternImage();if(i&&"pattern"===n)this._fillPattern(t);else{var r=t.getFillLinearGradientColorStops();if(r&&"linear-gradient"===n)this._fillLinearGradient(t);else{var a=t.getFillRadialGradientColorStops();a&&"radial-gradient"===n?this._fillRadialGradient(t):e?this._fillColor(t):i?this._fillPattern(t):r?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}}}}_strokeLinearGradient(t){var e=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),r=this.createLinearGradient(e.x,e.y,n.x,n.y);if(i){for(var a=0;a<i.length;a+=2)r.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",r)}}_stroke(t){var e=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var r=t.getStrokeLinearGradientColorStops();r?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),n||this.restore()}}_applyShadow(t){var e,n,i,r=null!==(e=t.getShadowRGBA())&&void 0!==e?e:"black",a=null!==(n=t.getShadowBlur())&&void 0!==n?n:5,o=null!==(i=t.getShadowOffset())&&void 0!==i?i:{x:0,y:0},s=t.getAbsoluteScale(),c=this.canvas.getPixelRatio(),l=s.x*c,u=s.y*c;this.setAttr("shadowColor",r),this.setAttr("shadowBlur",a*Math.min(Math.abs(l),Math.abs(u))),this.setAttr("shadowOffsetX",o.x*l),this.setAttr("shadowOffsetY",o.y*u)}}class Q extends J{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){var e=t.getStrokeScaleEnabled();if(!e){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var i=t.hitStrokeWidth(),r="auto"===i?t.strokeWidth():i;this.setAttr("lineWidth",r),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}}var tt;function et(){if(tt)return tt;var t=C.createCanvasElement(),e=t.getContext("2d");return tt=function(){var t=o._global.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}(),tt}class nt{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var e=t||{},n=e.pixelRatio||o.pixelRatio||et();this.pixelRatio=n,this._canvas=C.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio,n=this.getContext()._context;n.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio,n=this.getContext()._context;n.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch(n){try{return this._canvas.toDataURL()}catch(i){return C.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}F.addGetterSetter(nt,"pixelRatio",void 0,O());class it extends nt{constructor(t={width:0,height:0}){super(t),this.context=new Z(this),this.setSize(t.width,t.height)}}class rt extends nt{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new Q(this),this.setSize(t.width,t.height)}}const at={get isDragging(){var t=!1;return at._dragElements.forEach((e=>{"dragging"===e.dragStatus&&(t=!0)})),t},justDragged:!1,get node(){var t;return at._dragElements.forEach((e=>{t=e.node})),t},_dragElements:new Map,_drag(t){const e=[];at._dragElements.forEach(((n,i)=>{const{node:r}=n,a=r.getStage();a.setPointersPositions(t),void 0===n.pointerId&&(n.pointerId=C._getFirstPointerId(t));const o=a._changedPointerPositions.find((t=>t.id===n.pointerId));if(o){if("dragging"!==n.dragStatus){var s=r.dragDistance(),c=Math.max(Math.abs(o.x-n.startPointerPos.x),Math.abs(o.y-n.startPointerPos.y));if(c<s)return;if(r.startDrag({evt:t}),!r.isDragging())return}r._setDragPosition(t,n),e.push(r)}})),e.forEach((e=>{e.fire("dragmove",{type:"dragmove",target:e,evt:t},!0)}))},_endDragBefore(t){const e=[];at._dragElements.forEach((n=>{const{node:i}=n,r=i.getStage();t&&r.setPointersPositions(t);const a=r._changedPointerPositions.find((t=>t.id===n.pointerId));if(!a)return;"dragging"!==n.dragStatus&&"stopped"!==n.dragStatus||(at.justDragged=!0,o._mouseListenClick=!1,o._touchListenClick=!1,o._pointerListenClick=!1,n.dragStatus="stopped");const s=n.node.getLayer()||n.node instanceof o.Stage&&n.node;s&&-1===e.indexOf(s)&&e.push(s)})),e.forEach((t=>{t.draw()}))},_endDragAfter(t){at._dragElements.forEach(((e,n)=>{"stopped"===e.dragStatus&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),"dragging"!==e.dragStatus&&at._dragElements.delete(n)}))}};o.isBrowser&&(window.addEventListener("mouseup",at._endDragBefore,!0),window.addEventListener("touchend",at._endDragBefore,!0),window.addEventListener("mousemove",at._drag),window.addEventListener("touchmove",at._drag),window.addEventListener("mouseup",at._endDragAfter,!1),window.addEventListener("touchend",at._endDragAfter,!1));var ot="absoluteOpacity",st="allEventListeners",ct="absoluteTransform",lt="absoluteScale",ut="canvas",ht="Change",dt="children",ft="konva",pt="listening",vt="mouseenter",mt="mouseleave",gt="set",yt="Shape",bt=" ",_t="stage",wt="transform",kt="Stage",St="visible",xt=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(bt);let Ct=1;class Dt{constructor(t){this._id=Ct++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){t!==wt&&t!==ct||!this._cache.get(t)?t?this._cache.delete(t):this._cache.clear():this._cache.get(t).dirty=!0}_getCache(t,e){var n=this._cache.get(t),i=t===wt||t===ct,r=void 0===n||i&&!0===n.dirty;return r&&(n=e.call(this),this._cache.set(t,n)),n}_calculate(t,e,n){if(!this._attachedDepsListeners.get(t)){const n=e.map((t=>t+"Change.konva")).join(bt);this.on(n,(()=>{this._clearCache(t)})),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,n)}_getCanvasCache(){return this._cache.get(ut)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ct&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(ut),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var e=t||{},n={};void 0!==e.x&&void 0!==e.y&&void 0!==e.width&&void 0!==e.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(e.width||n.width),r=Math.ceil(e.height||n.height),a=e.pixelRatio,o=void 0===e.x?Math.floor(n.x):e.x,s=void 0===e.y?Math.floor(n.y):e.y,c=e.offset||0,l=e.drawBorder||!1,u=e.hitCanvasPixelRatio||1;if(i&&r){i+=2*c+1,r+=2*c+1,o-=c,s-=c;var h=new it({pixelRatio:a,width:i,height:r}),d=new it({pixelRatio:a,width:0,height:0}),f=new rt({pixelRatio:u,width:i,height:r}),p=h.getContext(),v=f.getContext();return f.isCache=!0,h.isCache=!0,this._cache.delete(ut),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(h.getContext()._context.imageSmoothingEnabled=!1,d.getContext()._context.imageSmoothingEnabled=!1),p.save(),v.save(),p.translate(-o,-s),v.translate(-o,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(ot),this._clearSelfAndDescendantCache(lt),this.drawScene(h,this),this.drawHit(f,this),this._isUnderCache=!1,p.restore(),v.restore(),l&&(p.save(),p.beginPath(),p.rect(0,0,i,r),p.closePath(),p.setAttr("strokeStyle","red"),p.setAttr("lineWidth",5),p.stroke(),p.restore()),this._cache.set(ut,{scene:h,filter:d,hit:f,x:o,y:s}),this._requestDraw(),this}C.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(ut)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){var n,i,r,a,o=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=this.getAbsoluteTransform(e);return o.forEach((function(t){var e=s.point(t);void 0===n&&(n=r=e.x,i=a=e.y),n=Math.min(n,e.x),i=Math.min(i,e.y),r=Math.max(r,e.x),a=Math.max(a,e.y)})),{x:n,y:i,width:r-n,height:a-i}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);var n=this._getCachedSceneCanvas(),i=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/i,n.height/i),t.restore()}_drawCachedHitCanvas(t){var e=this._getCanvasCache(),n=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t,e,n,i,r=this.filters(),a=this._getCanvasCache(),o=a.scene,s=a.filter,c=s.getContext();if(r){if(!this._filterUpToDate){var l=o.pixelRatio;s.setSize(o.width/o.pixelRatio,o.height/o.pixelRatio);try{for(t=r.length,c.clear(),c.drawImage(o._canvas,0,0,o.getWidth()/l,o.getHeight()/l),e=c.getImageData(0,0,s.getWidth(),s.getHeight()),n=0;n<t;n++)i=r[n],"function"===typeof i?(i.call(this,e),c.putImageData(e,0,0)):C.error("Filter should be type of function, but got "+typeof i+" instead. Please check correct filters")}catch(u){C.error("Unable to apply filter. "+u.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return s}return o}on(t,e){if(this._cache&&this._cache.delete(st),3===arguments.length)return this._delegate.apply(this,arguments);var n,i,r,a,o,s=t.split(bt),c=s.length;for(n=0;n<c;n++)i=s[n],r=i.split("."),a=r[0],o=r[1]||"",this.eventListeners[a]||(this.eventListeners[a]=[]),this.eventListeners[a].push({name:o,handler:e});return this}off(t,e){var n,i,r,a,o,s,c=(t||"").split(bt),l=c.length;if(this._cache&&this._cache.delete(st),!t)for(i in this.eventListeners)this._off(i);for(n=0;n<l;n++)if(r=c[n],a=r.split("."),o=a[0],s=a[1],o)this.eventListeners[o]&&this._off(o,s,e);else for(i in this.eventListeners)this._off(i,s,e);return this}dispatchEvent(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,(function(t){e.call(this,t.evt)})),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,n){var i=this;this.on(t,(function(t){for(var r=t.target.findAncestors(e,!0,i),a=0;a<r.length;a++)t=C.cloneObject(t),t.currentTarget=r[a],n.call(r[a],t)}))}remove(){return this.isDragging()&&this.stopDrag(),at._dragElements["delete"](this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ct),this._clearSelfAndDescendantCache(ot),this._clearSelfAndDescendantCache(lt),this._clearSelfAndDescendantCache(_t),this._clearSelfAndDescendantCache(St),this._clearSelfAndDescendantCache(pt)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(t){var e="get"+C._capitalize(t);return C._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){var t=this.getParent(),e=[];while(t)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges((()=>{var e,n;if(!t)return this;for(e in t)e!==dt&&(n=gt+C._capitalize(e),C._isFunction(this[n])?this[n](t[e]):this._setAttr(e,t[e]))})),this}isListening(){return this._getCache(pt,this._isListening)}_isListening(t){const e=this.listening();if(!e)return!1;const n=this.getParent();return!n||n===t||this===t||n._isListening(t)}isVisible(){return this._getCache(St,this._isVisible)}_isVisible(t){const e=this.visible();if(!e)return!1;const n=this.getParent();return!n||n===t||this===t||n._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);var n=this.getLayer(),i=!1;at._dragElements.forEach((t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType||t.node.getLayer()===n)&&(i=!0)}));var r=!e&&!o.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!r}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t,e,n,i,r=this.getDepth(),a=this,o=0;function s(c){for(t=[],e=c.length,n=0;n<e;n++)i=c[n],o++,i.nodeType!==yt&&(t=t.concat(i.getChildren().slice())),i._id===a._id&&(n=e);t.length>0&&t[0].getDepth()<=r&&s(t)}return a.nodeType!==kt&&s(a.getStage().getChildren()),o}getDepth(){var t=0,e=this.parent;while(e)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(wt),this._clearSelfAndDescendantCache(ct)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges((()=>{this.x(t.x),this.y(t.y)})),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var e=this.getAbsoluteTransform().copy();return e.invert(),e.point(t)}getAbsolutePosition(t){let e=!1,n=this.parent;while(n){if(n.isCached()){e=!0;break}n=n.parent}e&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),r=new c,a=this.offset();return r.m=i.slice(),r.translate(a.x,a.y),r.getTranslation()}setAbsolutePosition(t){var e=this._clearTransform();this.attrs.x=e.x,this.attrs.y=e.y,delete e.x,delete e.y,this._clearCache(wt);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(t.x,t.y),t={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(e),this.setPosition({x:t.x,y:t.y}),this._clearCache(wt),this._clearSelfAndDescendantCache(ct),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var e=t.x,n=t.y,i=this.x(),r=this.y();return void 0!==e&&(i+=e),void 0!==n&&(r+=n),this.setPosition({x:i,y:r}),this}_eachAncestorReverse(t,e){var n,i,r=[],a=this.getParent();if(!e||e._id!==this._id){r.unshift(this);while(a&&(!e||a._id!==e._id))r.unshift(a),a=a.parent;for(n=r.length,i=0;i<n;i++)t(r[i])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return C.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-1&&(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return C.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-1&&(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return C.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return C.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(t){if(!this.parent)return C.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&C.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(ot,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t,e,n,i,r,a={},o=this.getAttrs();for(t in a.attrs={},o)e=o[t],r=C.isObject(e)&&!C._isPlainObject(e)&&!C._isArray(e),r||(n="function"===typeof this[t]&&this[t],delete o[t],i=n?n.call(this):null,o[t]=e,i!==e&&(a.attrs[t]=e));return a.className=this.getClassName(),C._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,n){var i=[];e&&this._isMatch(t)&&i.push(this);var r=this.parent;while(r){if(r===n)return i;r._isMatch(t)&&i.push(r),r=r.parent}return i}isAncestorOf(t){return!1}findAncestor(t,e,n){return this.findAncestors(t,e,n)[0]}_isMatch(t){if(!t)return!1;if("function"===typeof t)return t(this);var e,n,i=t.replace(/ /g,"").split(","),r=i.length;for(e=0;e<r;e++)if(n=i[e],C.isValidSelector(n)||(C.warn('Selector "'+n+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),C.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),C.warn("Konva is awesome, right?")),"#"===n.charAt(0)){if(this.id()===n.slice(1))return!0}else if("."===n.charAt(0)){if(this.hasName(n.slice(1)))return!0}else if(this.className===n||this.nodeType===n)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(_t,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():void 0}fire(t,e={},n){return e.target=e.target||this,n?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(ct,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var e;if(t)return e=new c,this._eachAncestorReverse((function(t){var n=t.transformsEnabled();"all"===n?e.multiply(t.getTransform()):"position"===n&&e.translate(t.x()-t.offsetX(),t.y()-t.offsetY())}),t),e;e=this._cache.get(ct)||new c,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();var n=this.transformsEnabled();if("all"===n)e.multiply(this.getTransform());else if("position"===n){const t=this.attrs.x||0,n=this.attrs.y||0,i=this.attrs.offsetX||0,r=this.attrs.offsetY||0;e.translate(t-i,n-r)}return e.dirty=!1,e}getAbsoluteScale(t){var e=this;while(e)e._isUnderCache&&(t=e),e=e.getParent();const n=this.getAbsoluteTransform(t),i=n.decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(wt,this._getTransform)}_getTransform(){var t,e,n=this._cache.get(wt)||new c;n.reset();var i=this.x(),r=this.y(),a=o.getAngle(this.rotation()),s=null!==(t=this.attrs.scaleX)&&void 0!==t?t:1,l=null!==(e=this.attrs.scaleY)&&void 0!==e?e:1,u=this.attrs.skewX||0,h=this.attrs.skewY||0,d=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===i&&0===r||n.translate(i,r),0!==a&&n.rotate(a),0===u&&0===h||n.skew(u,h),1===s&&1===l||n.scale(s,l),0===d&&0===f||n.translate(-1*d,-1*f),n.dirty=!1,n}clone(t){var e,n,i,r,a,o=C.cloneObject(this.attrs);for(e in t)o[e]=t[e];var s=new this.constructor(o);for(e in this.eventListeners)for(n=this.eventListeners[e],i=n.length,r=0;r<i;r++)a=n[r],a.name.indexOf(ft)<0&&(s.eventListeners[e]||(s.eventListeners[e]=[]),s.eventListeners[e].push(a));return s}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),n=this.getStage(),i=void 0!==t.x?t.x:Math.floor(e.x),r=void 0!==t.y?t.y:Math.floor(e.y),a=t.pixelRatio||1,o=new it({width:t.width||Math.ceil(e.width)||(n?n.width():0),height:t.height||Math.ceil(e.height)||(n?n.height():0),pixelRatio:a}),s=o.getContext();return!1===t.imageSmoothingEnabled&&(s._context.imageSmoothingEnabled=!1),s.save(),(i||r)&&s.translate(-1*i,-1*r),this.drawScene(o),s.restore(),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var e=t.mimeType||null,n=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(e,n);return t.callback&&t.callback(i),i}toImage(t){return new Promise(((e,n)=>{try{const n=null===t||void 0===t?void 0:t.callback;n&&delete t.callback,C._urlToImage(this.toDataURL(t),(function(t){e(t),null===n||void 0===n||n(t)}))}catch(i){n(i)}}))}toBlob(t){return new Promise(((e,n)=>{try{const n=null===t||void 0===t?void 0:t.callback;n&&delete t.callback,this.toCanvas(t).toBlob((t=>{e(t),null===n||void 0===n||n(t)}))}catch(i){n(i)}}))}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.dragDistance}_off(t,e,n){var i,r,a,o=this.eventListeners[t];for(i=0;i<o.length;i++)if(r=o[i].name,a=o[i].handler,("konva"!==r||"konva"===e)&&(!e||r===e)&&(!n||n===a)){if(o.splice(i,1),0===o.length){delete this.eventListeners[t];break}i--}}_fireChangeEvent(t,e,n){this._fire(t+ht,{oldVal:e,newVal:n})}addName(t){if(!this.hasName(t)){var e=this.name(),n=e?e+" "+t:t;this.name(n)}return this}hasName(t){if(!t)return!1;const e=this.name();if(!e)return!1;var n=(e||"").split(/\s/g);return-1!==n.indexOf(t)}removeName(t){var e=(this.name()||"").split(/\s/g),n=e.indexOf(t);return-1!==n&&(e.splice(n,1),this.name(e.join(" "))),this}setAttr(t,e){var n=this[gt+C._capitalize(t)];return C._isFunction(n)?n.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(o.autoDrawEnabled){const t=this.getLayer()||this.getStage();null===t||void 0===t||t.batchDraw()}}_setAttr(t,e){var n=this.attrs[t];(n!==e||C.isObject(e))&&(void 0===e||null===e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,e),this._requestDraw())}_setComponentAttr(t,e,n){var i;void 0!==n&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=n,this._fireChangeEvent(t,i,n))}_fireAndBubble(t,e,n){e&&this.nodeType===yt&&(e.target=this);var i=(t===vt||t===mt)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||"Stage"===this.nodeType&&!n);if(!i){this._fire(t,e);var r=(t===vt||t===mt)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,t,e,n):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){let e=this._cache.get(st);if(!e){e={};let t=Object.getPrototypeOf(this);while(t)if(t.eventListeners){for(var n in t.eventListeners){const i=t.eventListeners[n],r=e[n]||[];e[n]=i.concat(r)}t=Object.getPrototypeOf(t)}else t=Object.getPrototypeOf(t);this._cache.set(st,e)}return e[t]}_fire(t,e){e=e||{},e.currentTarget=this,e.type=t;const n=this._getProtoListeners(t);if(n)for(var i=0;i<n.length;i++)n[i].handler.call(this,e);const r=this.eventListeners[t];if(r)for(i=0;i<r.length;i++)r[i].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,n=this.getStage(),i=this.getAbsolutePosition(),r=n._getPointerById(e)||n._changedPointerPositions[0]||i;at._dragElements.set(this._id,{node:this,startPointerPos:r,offset:{x:r.x-i.x,y:r.y-i.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){at._dragElements.has(this._id)||this._createDragElement(t);const n=at._dragElements.get(this._id);n.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){const n=this.getStage()._getPointerById(e.pointerId);if(n){var i={x:n.x-e.offset.x,y:n.y-e.offset.y},r=this.dragBoundFunc();if(void 0!==r){const e=r.call(this,i,t);e?i=e:C.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===i.x&&this._lastPos.y===i.y||(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const e=at._dragElements.get(this._id);e&&(e.dragStatus="stopped"),at._endDragBefore(t),at._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=at._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",(function(t){var e=void 0!==t.evt["button"],n=!e||o.dragButtons.indexOf(t.evt["button"])>=0;if(n&&!this.isDragging()){var i=!1;at._dragElements.forEach((t=>{this.isAncestorOf(t.node)&&(i=!0)})),i||this._createDragElement(t)}}))}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const e=at._dragElements.get(this._id),n=e&&"dragging"===e.dragStatus,i=e&&"ready"===e.dragStatus;n?this.stopDrag():i&&at._dragElements["delete"](this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const e=this.getStage();if(!e)return!1;const n={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return C.haveIntersection(n,this.getClientRect())}static create(t,e){return C._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){var n,i,r,a=Dt.prototype.getClassName.call(t),s=t.children;e&&(t.attrs.container=e),o[a]||(C.warn('Can not find a node with class name "'+a+'". Fallback to "Shape".'),a="Shape");const c=o[a];if(n=new c(t.attrs),s)for(i=s.length,r=0;r<i;r++)n.add(Dt._createNode(s[r]));return n}}Dt.prototype.nodeType="Node",Dt.prototype._attrsAffectingSize=[],Dt.prototype.eventListeners={},Dt.prototype.on.call(Dt.prototype,xt,(function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(wt),this._clearSelfAndDescendantCache(ct))})),Dt.prototype.on.call(Dt.prototype,"visibleChange.konva",(function(){this._clearSelfAndDescendantCache(St)})),Dt.prototype.on.call(Dt.prototype,"listeningChange.konva",(function(){this._clearSelfAndDescendantCache(pt)})),Dt.prototype.on.call(Dt.prototype,"opacityChange.konva",(function(){this._clearSelfAndDescendantCache(ot)}));const Tt=F.addGetterSetter;Tt(Dt,"zIndex"),Tt(Dt,"absolutePosition"),Tt(Dt,"position"),Tt(Dt,"x",0,O()),Tt(Dt,"y",0,O()),Tt(Dt,"globalCompositeOperation","source-over",P()),Tt(Dt,"opacity",1,O()),Tt(Dt,"name","",P()),Tt(Dt,"id","",P()),Tt(Dt,"rotation",0,O()),F.addComponentsGetterSetter(Dt,"scale",["x","y"]),Tt(Dt,"scaleX",1,O()),Tt(Dt,"scaleY",1,O()),F.addComponentsGetterSetter(Dt,"skew",["x","y"]),Tt(Dt,"skewX",0,O()),Tt(Dt,"skewY",0,O()),F.addComponentsGetterSetter(Dt,"offset",["x","y"]),Tt(Dt,"offsetX",0,O()),Tt(Dt,"offsetY",0,O()),Tt(Dt,"dragDistance",null,O()),Tt(Dt,"width",0,O()),Tt(Dt,"height",0,O()),Tt(Dt,"listening",!0,I()),Tt(Dt,"preventDefault",!0,I()),Tt(Dt,"filters",null,(function(t){return this._filterUpToDate=!1,t})),Tt(Dt,"visible",!0,I()),Tt(Dt,"transformsEnabled","all",P()),Tt(Dt,"size"),Tt(Dt,"dragBoundFunc"),Tt(Dt,"draggable",!1,I()),F.backCompat(Dt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Ot extends Dt{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const e=this.children||[];var n=[];return e.forEach((function(e){t(e)&&n.push(e)})),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach((t=>{t.parent=null,t.index=0,t.remove()})),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach((t=>{t.parent=null,t.index=0,t.destroy()})),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}var n=t[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){var n=[];return this._descendants((i=>{const r=i._isMatch(t);return r&&n.push(i),!(!r||!e)})),n}_descendants(t){let e=!1;const n=this.getChildren();for(const i of n){if(e=t(i),e)return!0;if(i.hasChildren()&&(e=i._descendants(t),e))return!0}return!1}toObject(){var t=Dt.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach((e=>{t.children.push(e.toObject())})),t}isAncestorOf(t){var e=t.getParent();while(e){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){var e=Dt.prototype.clone.call(this,t);return this.getChildren().forEach((function(t){e.add(t.clone())})),e}getAllIntersections(t){var e=[];return this.find("Shape").forEach((function(n){n.isVisible()&&n.intersects(t)&&e.push(n)})),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),this.isCached()||null===(e=this.children)||void 0===e||e.forEach((function(e){e._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;null===(t=this.children)||void 0===t||t.forEach((function(t,e){t.index=e})),this._requestDraw()}drawScene(t,e){var n=this.getLayer(),i=t||n&&n.getCanvas(),r=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.scene,s=i&&i.isCache;if(!this.isVisible()&&!s)return this;if(o){r.save();var c=this.getAbsoluteTransform(e).getMatrix();r.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(r),r.restore()}else this._drawChildren("drawScene",i,e);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;var n=this.getLayer(),i=t||n&&n.hitCanvas,r=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.hit;if(o){r.save();var s=this.getAbsoluteTransform(e).getMatrix();r.transform(s[0],s[1],s[2],s[3],s[4],s[5]),this._drawCachedHitCanvas(r),r.restore()}else this._drawChildren("drawHit",i,e);return this}_drawChildren(t,e,n){var i,r=e&&e.getContext(),a=this.clipWidth(),o=this.clipHeight(),s=this.clipFunc(),c=a&&o||s;const l=n===this;if(c){r.save();var u=this.getAbsoluteTransform(n),h=u.getMatrix();if(r.transform(h[0],h[1],h[2],h[3],h[4],h[5]),r.beginPath(),s)s.call(this,r,this);else{var d=this.clipX(),f=this.clipY();r.rect(d,f,a,o)}r.clip(),h=u.copy().invert().getMatrix(),r.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var p=!l&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;p&&(r.save(),r._applyGlobalCompositeOperation(this)),null===(i=this.children)||void 0===i||i.forEach((function(i){i[t](e,n)})),p&&r.restore(),c&&r.restore()}getClientRect(t){var e;t=t||{};var n,i,r,a,o=t.skipTransform,s=t.relativeTo,c={x:1/0,y:1/0,width:0,height:0},l=this;null===(e=this.children)||void 0===e||e.forEach((function(e){if(e.visible()){var o=e.getClientRect({relativeTo:l,skipShadow:t.skipShadow,skipStroke:t.skipStroke});0===o.width&&0===o.height||(void 0===n?(n=o.x,i=o.y,r=o.x+o.width,a=o.y+o.height):(n=Math.min(n,o.x),i=Math.min(i,o.y),r=Math.max(r,o.x+o.width),a=Math.max(a,o.y+o.height)))}}));for(var u=this.find("Shape"),h=!1,d=0;d<u.length;d++){var f=u[d];if(f._isVisible(this)){h=!0;break}}return c=h&&void 0!==n?{x:n,y:i,width:r-n,height:a-i}:{x:0,y:0,width:0,height:0},o?c:this._transformedRect(c,s)}}F.addComponentsGetterSetter(Ot,"clip",["x","y","width","height"]),F.addGetterSetter(Ot,"clipX",void 0,O()),F.addGetterSetter(Ot,"clipY",void 0,O()),F.addGetterSetter(Ot,"clipWidth",void 0,O()),F.addGetterSetter(Ot,"clipHeight",void 0,O()),F.addGetterSetter(Ot,"clipFunc");const Et=new Map,At=void 0!==o._global.PointerEvent;function Pt(t){return Et.get(t)}function Mt(t){return{evt:t,pointerId:t.pointerId}}function Rt(t,e){return Et.get(t)===e}function It(t,e){Nt(t);const n=e.getStage();n&&(Et.set(t,e),At&&e._fire("gotpointercapture",Mt(new PointerEvent("gotpointercapture"))))}function Nt(t,e){const n=Et.get(t);if(!n)return;const i=n.getStage();i&&i.content,Et.delete(t),At&&n._fire("lostpointercapture",Mt(new PointerEvent("lostpointercapture")))}var $t="Stage",Lt="string",Ft="px",Bt="mouseout",jt="mouseleave",zt="mouseover",Ht="mouseenter",Vt="mousemove",Gt="mousedown",Wt="mouseup",Ut="pointermove",Yt="pointerdown",qt="pointerup",Xt="pointercancel",Kt="lostpointercapture",Jt="pointerout",Zt="pointerleave",Qt="pointerover",te="pointerenter",ee="contextmenu",ne="touchstart",ie="touchend",re="touchmove",ae="touchcancel",oe="wheel",se=5,ce=[[Ht,"_pointerenter"],[Gt,"_pointerdown"],[Vt,"_pointermove"],[Wt,"_pointerup"],[jt,"_pointerleave"],[ne,"_pointerdown"],[re,"_pointermove"],[ie,"_pointerup"],[ae,"_pointercancel"],[zt,"_pointerover"],[oe,"_wheel"],[ee,"_contextmenu"],[Yt,"_pointerdown"],[Ut,"_pointermove"],[qt,"_pointerup"],[Xt,"_pointercancel"],[Kt,"_lostpointercapture"]];const le={mouse:{[Jt]:Bt,[Zt]:jt,[Qt]:zt,[te]:Ht,[Ut]:Vt,[Yt]:Gt,[qt]:Wt,[Xt]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Jt]:"touchout",[Zt]:"touchleave",[Qt]:"touchover",[te]:"touchenter",[Ut]:re,[Yt]:ne,[qt]:ie,[Xt]:ae,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Jt]:Jt,[Zt]:Zt,[Qt]:Qt,[te]:te,[Ut]:Ut,[Yt]:Yt,[qt]:qt,[Xt]:Xt,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},ue=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",he=t=>{const e=ue(t);return"pointer"===e?o.pointerEventsEnabled&&le.pointer:"touch"===e?le.touch:"mouse"===e?le.mouse:void 0};function de(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&C.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}const fe="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);",pe=[];class ve extends Ot{constructor(t){super(de(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),pe.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(()=>{de(this.attrs)})),this._checkVisibility()}_validateAdd(t){const e="Layer"===t.getType(),n="FastLayer"===t.getType(),i=e||n;i||C["throw"]("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===Lt){if("."===t.charAt(0)){var e=t.slice(1);t=document.getElementsByClassName(e)[0]}else{var n;n="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(n)}if(!t)throw"Can not find container in document with id "+n}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t,e=this.children,n=e.length;for(t=0;t<n;t++)e[t].clear();return this}clone(t){return t||(t={}),t.container="undefined"!==typeof document&&document.createElement("div"),Ot.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&C._isInDocument(t)&&this.container().removeChild(t);var e=pe.indexOf(this);return e>-1&&pe.splice(e,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(C.warn(fe),null)}_getPointerById(t){return this._pointerPositions.find((e=>e.id===t))}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var e=new it({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),n=e.getContext()._context,i=this.children;return(t.x||t.y)&&n.translate(-1*t.x,-1*t.y),i.forEach((function(e){if(e.isVisible()){var i=e._toKonvaCanvas(t);n.drawImage(i._canvas,t.x,t.y,i.getWidth()/i.getPixelRatio(),i.getHeight()/i.getPixelRatio())}})),e}getIntersection(t){if(!t)return null;var e,n=this.children,i=n.length,r=i-1;for(e=r;e>=0;e--){const i=n[e].getIntersection(t);if(i)return i}return null}_resizeDOM(){var t=this.width(),e=this.height();this.content&&(this.content.style.width=t+Ft,this.content.style.height=e+Ft),this.bufferCanvas.setSize(t,e),this.bufferHitCanvas.setSize(t,e),this.children.forEach((n=>{n.setSize({width:t,height:e}),n.draw()}))}add(t,...e){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}super.add(t);var i=this.children.length;return i>se&&C.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),o.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return Rt(t,this)}setPointerCapture(t){It(t,this)}releaseCapture(t){Nt(t,this)}getLayers(){return this.children}_bindContentEvents(){o.isBrowser&&ce.forEach((([t,e])=>{this.content.addEventListener(t,(t=>{this[e](t)}),{passive:!1})}))}_pointerenter(t){this.setPointersPositions(t);const e=he(t.type);this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const e=he(t.type);this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}_pointerleave(t){const e=he(t.type),n=ue(t.type);if(e){this.setPointersPositions(t);var i=this._getTargetShape(n),r=!at.isDragging||o.hitOnDragEnabled;i&&r?(i._fireAndBubble(e.pointerout,{evt:t}),i._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[n+"targetShape"]=null):r&&(this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(e.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const e=he(t.type),n=ue(t.type);if(e){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach((r=>{var a=this.getIntersection(r);at.justDragged=!1,o["_"+n+"ListenClick"]=!0;const s=a&&a.isListening();if(!s)return;o.capturePointerEventsEnabled&&a.setPointerCapture(r.id),this[n+"ClickStartShape"]=a,a._fireAndBubble(e.pointerdown,{evt:t,pointerId:r.id}),i=!0;const c=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&c&&t.preventDefault()})),i||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const e=he(t.type),n=ue(t.type);if(!e)return;at.isDragging&&at.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!at.isDragging||o.hitOnDragEnabled;if(!i)return;var r={};let a=!1;var s=this._getTargetShape(n);this._changedPointerPositions.forEach((i=>{const o=Pt(i.id)||this.getIntersection(i),c=i.id,l={evt:t,pointerId:c};var u=s!==o;if(u&&s&&(s._fireAndBubble(e.pointerout,Object.assign({},l),o),s._fireAndBubble(e.pointerleave,Object.assign({},l),o)),o){if(r[o._id])return;r[o._id]=!0}o&&o.isListening()?(a=!0,u&&(o._fireAndBubble(e.pointerover,Object.assign({},l),s),o._fireAndBubble(e.pointerenter,Object.assign({},l),s),this[n+"targetShape"]=o),o._fireAndBubble(e.pointermove,Object.assign({},l))):s&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:c}),this[n+"targetShape"]=null)})),a||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const e=he(t.type),n=ue(t.type);if(!e)return;this.setPointersPositions(t);const i=this[n+"ClickStartShape"],r=this[n+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach((c=>{const l=Pt(c.id)||this.getIntersection(c);if(l){if(l.releaseCapture(c.id),a[l._id])return;a[l._id]=!0}const u=c.id,h={evt:t,pointerId:u};let d=!1;o["_"+n+"InDblClickWindow"]?(d=!0,clearTimeout(this[n+"DblTimeout"])):at.justDragged||(o["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout((function(){o["_"+n+"InDblClickWindow"]=!1}),o.dblClickWindow),l&&l.isListening()?(s=!0,this[n+"ClickEndShape"]=l,l._fireAndBubble(e.pointerup,Object.assign({},h)),o["_"+n+"ListenClick"]&&i&&i===l&&(l._fireAndBubble(e.pointerclick,Object.assign({},h)),d&&r&&r===l&&l._fireAndBubble(e.pointerdblclick,Object.assign({},h)))):(this[n+"ClickEndShape"]=null,o["_"+n+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:u}),d&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:u}))})),s||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o["_"+n+"ListenClick"]=!1,t.cancelable&&"touch"!==n&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(ee,{evt:t}):this._fire(ee,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(oe,{evt:t}):this._fire(oe,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const e=Pt(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(qt,Mt(t)),Nt(t.pointerId)}_lostpointercapture(t){Nt(t.pointerId)}setPointersPositions(t){var e=this._getContentPosition(),n=null,i=null;t=t||window.event,void 0!==t.touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,(t=>{this._pointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})})),Array.prototype.forEach.call(t.changedTouches||t.touches,(t=>{this._changedPointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})}))):(n=(t.clientX-e.left)/e.scaleX,i=(t.clientY-e.top)/e.scaleY,this.pointerPos={x:n,y:i},this._pointerPositions=[{x:n,y:i,id:C._getFirstPointerId(t)}],this._changedPointerPositions=[{x:n,y:i,id:C._getFirstPointerId(t)}])}_setPointerPosition(t){C.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new it({width:this.width(),height:this.height()}),this.bufferHitCanvas=new rt({pixelRatio:1,width:this.width(),height:this.height()}),o.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return C.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach((function(t){t.batchDraw()})),this}}ve.prototype.nodeType=$t,s(ve),F.addGetterSetter(ve,"container");var me="hasShadow",ge="shadowRGBA",ye="patternImage",be="linearGradient",_e="radialGradient";let we;function ke(){return we||(we=C.createCanvasElement().getContext("2d"),we)}const Se={};function xe(t){t.fill()}function Ce(t){t.stroke()}function De(t){t.fill()}function Te(t){t.stroke()}function Oe(){this._clearCache(me)}function Ee(){this._clearCache(ge)}function Ae(){this._clearCache(ye)}function Pe(){this._clearCache(be)}function Me(){this._clearCache(_e)}class Re extends Dt{constructor(t){let e;super(t);while(1)if(e=C.getRandomColor(),e&&!(e in Se))break;this.colorKey=e,Se[e]=this}getContext(){return C.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return C.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(me,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(ye,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=ke();const e=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){const t=new c;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(o.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(be,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var e=ke(),n=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),r=e.createLinearGradient(n.x,n.y,i.x,i.y),a=0;a<t.length;a+=2)r.addColorStop(t[a],t[a+1]);return r}}_getRadialGradient(){return this._getCache(_e,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var e=ke(),n=this.fillRadialGradientStartPoint(),i=this.fillRadialGradientEndPoint(),r=e.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),i.x,i.y,this.fillRadialGradientEndRadius()),a=0;a<t.length;a+=2)r.addColorStop(t[a],t[a+1]);return r}}getShadowRGBA(){return this._getCache(ge,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var t=C.colorToRGBA(this.shadowColor());return t?"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")":void 0}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],(()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops())))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],(()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops())))}hasHitStroke(){const t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var e,n=this.getStage(),i=n.bufferHitCanvas;return i.getContext().clear(),this.drawHit(i,null,!0),e=i.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,e[3]>0}destroy(){return Dt.prototype.destroy.call(this),delete Se[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;if(!this.getStage())return!1;const n=null===(e=this.attrs.perfectDrawEnabled)||void 0===e||e;if(!n)return!1;const i=t||this.hasFill(),r=this.hasStroke(),a=1!==this.getAbsoluteOpacity();if(i&&r&&a)return!0;const o=this.hasShadow(),s=this.shadowForStrokeEnabled();return!!(i&&r&&o&&s)}setStrokeHitEnabled(t){C.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const e=t.skipTransform,n=t.relativeTo,i=this.getSelfRect(),r=!t.skipStroke&&this.hasStroke(),a=r&&this.strokeWidth()||0,o=i.width+a,s=i.height+a,c=!t.skipShadow&&this.hasShadow(),l=c?this.shadowOffsetX():0,u=c?this.shadowOffsetY():0,h=o+Math.abs(l),d=s+Math.abs(u),f=c&&this.shadowBlur()||0,p=h+2*f,v=d+2*f,m={width:p,height:v,x:-(a/2+f)+Math.min(l,0)+i.x,y:-(a/2+f)+Math.min(u,0)+i.y};return e?m:this._transformedRect(m,n)}drawScene(t,e){var n,i,r,a=this.getLayer(),o=t||a.getCanvas(),s=o.getContext(),c=this._getCanvasCache(),l=this.getSceneFunc(),u=this.hasShadow(),h=o.isCache,d=e===this;if(!this.isVisible()&&!d)return this;if(c){s.save();var f=this.getAbsoluteTransform(e).getMatrix();return s.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(s),s.restore(),this}if(!l)return this;if(s.save(),this._useBufferCanvas()&&!h){n=this.getStage(),i=n.bufferCanvas,r=i.getContext(),r.clear(),r.save(),r._applyLineJoin(this);var p=this.getAbsoluteTransform(e).getMatrix();r.transform(p[0],p[1],p[2],p[3],p[4],p[5]),l.call(this,r,this),r.restore();var v=i.pixelRatio;u&&s._applyShadow(this),s._applyOpacity(this),s._applyGlobalCompositeOperation(this),s.drawImage(i._canvas,0,0,i.width/v,i.height/v)}else{if(s._applyLineJoin(this),!d){p=this.getAbsoluteTransform(e).getMatrix();s.transform(p[0],p[1],p[2],p[3],p[4],p[5]),s._applyOpacity(this),s._applyGlobalCompositeOperation(this)}u&&s._applyShadow(this),l.call(this,s,this)}return s.restore(),this}drawHit(t,e,n=!1){if(!this.shouldDrawHit(e,n))return this;var i=this.getLayer(),r=t||i.hitCanvas,a=r&&r.getContext(),o=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),c=s&&s.hit;if(this.colorKey||C.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()"),c){a.save();var l=this.getAbsoluteTransform(e).getMatrix();return a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!o)return this;a.save(),a._applyLineJoin(this);const u=this===e;if(!u){var h=this.getAbsoluteTransform(e).getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}return o.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var e,n,i,r,a,o,s=this._getCanvasCache(),c=this._getCachedSceneCanvas(),l=s.hit,u=l.getContext(),h=l.getWidth(),d=l.getHeight();u.clear(),u.drawImage(c._canvas,0,0,h,d);try{for(e=u.getImageData(0,0,h,d),n=e.data,i=n.length,r=C._hexToRgb(this.colorKey),a=0;a<i;a+=4)o=n[a+3],o>t?(n[a]=r.r,n[a+1]=r.g,n[a+2]=r.b,n[a+3]=255):n[a+3]=0;u.putImageData(e,0,0)}catch(f){C.error("Unable to draw hit graph from cached scene canvas. "+f.message)}return this}hasPointerCapture(t){return Rt(t,this)}setPointerCapture(t){It(t,this)}releaseCapture(t){Nt(t,this)}}Re.prototype._fillFunc=xe,Re.prototype._strokeFunc=Ce,Re.prototype._fillFuncHit=De,Re.prototype._strokeFuncHit=Te,Re.prototype._centroid=!1,Re.prototype.nodeType="Shape",s(Re),Re.prototype.eventListeners={},Re.prototype.on.call(Re.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Oe),Re.prototype.on.call(Re.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Ee),Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Ae),Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Pe),Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Me),F.addGetterSetter(Re,"stroke",void 0,M()),F.addGetterSetter(Re,"strokeWidth",2,O()),F.addGetterSetter(Re,"fillAfterStrokeEnabled",!1),F.addGetterSetter(Re,"hitStrokeWidth","auto",A()),F.addGetterSetter(Re,"strokeHitEnabled",!0,I()),F.addGetterSetter(Re,"perfectDrawEnabled",!0,I()),F.addGetterSetter(Re,"shadowForStrokeEnabled",!0,I()),F.addGetterSetter(Re,"lineJoin"),F.addGetterSetter(Re,"lineCap"),F.addGetterSetter(Re,"sceneFunc"),F.addGetterSetter(Re,"hitFunc"),F.addGetterSetter(Re,"dash"),F.addGetterSetter(Re,"dashOffset",0,O()),F.addGetterSetter(Re,"shadowColor",void 0,P()),F.addGetterSetter(Re,"shadowBlur",0,O()),F.addGetterSetter(Re,"shadowOpacity",1,O()),F.addComponentsGetterSetter(Re,"shadowOffset",["x","y"]),F.addGetterSetter(Re,"shadowOffsetX",0,O()),F.addGetterSetter(Re,"shadowOffsetY",0,O()),F.addGetterSetter(Re,"fillPatternImage"),F.addGetterSetter(Re,"fill",void 0,M()),F.addGetterSetter(Re,"fillPatternX",0,O()),F.addGetterSetter(Re,"fillPatternY",0,O()),F.addGetterSetter(Re,"fillLinearGradientColorStops"),F.addGetterSetter(Re,"strokeLinearGradientColorStops"),F.addGetterSetter(Re,"fillRadialGradientStartRadius",0),F.addGetterSetter(Re,"fillRadialGradientEndRadius",0),F.addGetterSetter(Re,"fillRadialGradientColorStops"),F.addGetterSetter(Re,"fillPatternRepeat","repeat"),F.addGetterSetter(Re,"fillEnabled",!0),F.addGetterSetter(Re,"strokeEnabled",!0),F.addGetterSetter(Re,"shadowEnabled",!0),F.addGetterSetter(Re,"dashEnabled",!0),F.addGetterSetter(Re,"strokeScaleEnabled",!0),F.addGetterSetter(Re,"fillPriority","color"),F.addComponentsGetterSetter(Re,"fillPatternOffset",["x","y"]),F.addGetterSetter(Re,"fillPatternOffsetX",0,O()),F.addGetterSetter(Re,"fillPatternOffsetY",0,O()),F.addComponentsGetterSetter(Re,"fillPatternScale",["x","y"]),F.addGetterSetter(Re,"fillPatternScaleX",1,O()),F.addGetterSetter(Re,"fillPatternScaleY",1,O()),F.addComponentsGetterSetter(Re,"fillLinearGradientStartPoint",["x","y"]),F.addComponentsGetterSetter(Re,"strokeLinearGradientStartPoint",["x","y"]),F.addGetterSetter(Re,"fillLinearGradientStartPointX",0),F.addGetterSetter(Re,"strokeLinearGradientStartPointX",0),F.addGetterSetter(Re,"fillLinearGradientStartPointY",0),F.addGetterSetter(Re,"strokeLinearGradientStartPointY",0),F.addComponentsGetterSetter(Re,"fillLinearGradientEndPoint",["x","y"]),F.addComponentsGetterSetter(Re,"strokeLinearGradientEndPoint",["x","y"]),F.addGetterSetter(Re,"fillLinearGradientEndPointX",0),F.addGetterSetter(Re,"strokeLinearGradientEndPointX",0),F.addGetterSetter(Re,"fillLinearGradientEndPointY",0),F.addGetterSetter(Re,"strokeLinearGradientEndPointY",0),F.addComponentsGetterSetter(Re,"fillRadialGradientStartPoint",["x","y"]),F.addGetterSetter(Re,"fillRadialGradientStartPointX",0),F.addGetterSetter(Re,"fillRadialGradientStartPointY",0),F.addComponentsGetterSetter(Re,"fillRadialGradientEndPoint",["x","y"]),F.addGetterSetter(Re,"fillRadialGradientEndPointX",0),F.addGetterSetter(Re,"fillRadialGradientEndPointY",0),F.addGetterSetter(Re,"fillPatternRotation",0),F.backCompat(Re,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Ie="#",Ne="beforeDraw",$e="draw",Le=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Fe=Le.length;class Be extends Ot{constructor(t){super(t),this.canvas=new it,this.hitCanvas=new rt({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){const t=this.canvas._canvas;return t.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Dt.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=Dt.prototype.moveUp.call(this);if(!t)return!1;var e=this.getStage();return!(!e||!e.content)&&(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Dt.prototype.moveDown.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Dt.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return Dt.prototype.remove.call(this),t&&t.parentNode&&C._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&C["throw"]("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=void 0!==t.x?t.x:this.x(),t.y=void 0!==t.y?t.y:this.y(),Dt.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){const t=this.visible();this.canvas._canvas.style.display=t?"block":"none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){C.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){C.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,C.requestAnimFrame((()=>{this.draw(),this._waitingForDraw=!1}))),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;var e=1,n=!1;while(1){for(let i=0;i<Fe;i++){const r=Le[i],a=this._getIntersection({x:t.x+r.x*e,y:t.y+r.y*e}),o=a.shape;if(o)return o;if(n=!!a.antialiased,!a.antialiased)break}if(!n)return null;e+=1}}_getIntersection(t){const e=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,i=n[3];if(255===i){const t=C._rgbToHex(n[0],n[1],n[2]),e=Se[Ie+t];return e?{shape:e}:{antialiased:!0}}return i>0?{antialiased:!0}:{}}drawScene(t,e){var n=this.getLayer(),i=t||n&&n.getCanvas();return this._fire(Ne,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Ot.prototype.drawScene.call(this,i,e),this._fire($e,{node:this}),this}drawHit(t,e){var n=this.getLayer(),i=t||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Ot.prototype.drawHit.call(this,i,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){C.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return C.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent["content"]){var t=this.parent,e=!!this.hitCanvas._canvas.parentNode;e?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}Be.prototype.nodeType="Layer",s(Be),F.addGetterSetter(Be,"imageSmoothingEnabled",!0),F.addGetterSetter(Be,"clearBeforeDraw",!0),F.addGetterSetter(Be,"hitGraphEnabled",!0,I());class je extends Be{constructor(t){super(t),this.listening(!1),C.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}je.prototype.nodeType="FastLayer",s(je);class ze extends Ot{_validateAdd(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&C["throw"]("You may only add groups and shapes to groups.")}}ze.prototype.nodeType="Group",s(ze);var He=function(){return a.performance&&a.performance.now?function(){return a.performance.now()}:function(){return(new Date).getTime()}}();class Ve{constructor(t,e){this.id=Ve.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:He(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){var e=[];return e=t?t.length>0?t:[t]:[],this.layers=e,this}getLayers(){return this.layers}addLayer(t){var e,n=this.layers,i=n.length;for(e=0;e<i;e++)if(n[e]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t,e=Ve,n=e.animations,i=n.length;for(t=0;t<i;t++)if(n[t].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=He(),Ve._addAnimation(this),this}stop(){return Ve._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var e,n=t.id,i=this.animations,r=i.length;for(e=0;e<r;e++)if(i[e].id===n){this.animations.splice(e,1);break}}static _runFrames(){var t,e,n,i,r,a,o,s,c,l={},u=this.animations;for(i=0;i<u.length;i++)if(t=u[i],e=t.layers,n=t.func,t._updateFrameObject(He()),a=e.length,c=!n||!1!==n.call(t,t.frame),c)for(r=0;r<a;r++)o=e[r],void 0!==o._id&&(l[o._id]=o);for(s in l)l.hasOwnProperty(s)&&l[s].batchDraw()}static _animationLoop(){var t=Ve;t.animations.length?(t._runFrames(),C.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,C.requestAnimFrame(this._animationLoop))}}Ve.animations=[],Ve.animIdCounter=0,Ve.animRunning=!1;var Ge={node:1,duration:1,easing:1,onFinish:1,yoyo:1},We=1,Ue=2,Ye=3,qe=0,Xe=["fill","stroke","shadowColor"];class Ke{constructor(t,e,n,i,r,a,o){this.prop=t,this.propFunc=e,this.begin=i,this._pos=i,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=r-this.begin,this.pause()}fire(t){var e=this[t];e&&e()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Ue,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=Ye,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===Ue?this.setTime(t):this.state===Ye&&this.setTime(this.duration-t)}pause(){this.state=We,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class Je{constructor(t){var e,n,i=this,r=t.node,a=r._id,s=t.easing||Ze.Linear,c=!!t.yoyo;e="undefined"===typeof t.duration?.3:0===t.duration?.001:t.duration,this.node=r,this._id=qe++;var l=r.getLayer()||(r instanceof o.Stage?r.getLayers():null);for(n in l||C.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ve((function(){i.tween.onEnterFrame()}),l),this.tween=new Ke(n,(function(t){i._tweenFunc(t)}),s,0,1,1e3*e,c),this._addListeners(),Je.attrs[a]||(Je.attrs[a]={}),Je.attrs[a][this._id]||(Je.attrs[a][this._id]={}),Je.tweens[a]||(Je.tweens[a]={}),t)void 0===Ge[n]&&this._addAttr(n,t[n]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,e){var n,i,r,a,o,s,c,l,u=this.node,h=u._id;if(r=Je.tweens[h][t],r&&delete Je.attrs[h][r][t],n=u.getAttr(t),C._isArray(e))if(i=[],o=Math.max(e.length,n.length),"points"===t&&e.length!==n.length&&(e.length>n.length?(c=n,n=C._prepareArrayForTween(n,e,u.closed())):(s=e,e=C._prepareArrayForTween(e,n,u.closed()))),0===t.indexOf("fill"))for(a=0;a<o;a++)if(a%2===0)i.push(e[a]-n[a]);else{var d=C.colorToRGBA(n[a]);l=C.colorToRGBA(e[a]),n[a]=d,i.push({r:l.r-d.r,g:l.g-d.g,b:l.b-d.b,a:l.a-d.a})}else for(a=0;a<o;a++)i.push(e[a]-n[a]);else-1!==Xe.indexOf(t)?(n=C.colorToRGBA(n),l=C.colorToRGBA(e),i={r:l.r-n.r,g:l.g-n.g,b:l.b-n.b,a:l.a-n.a}):i=e-n;Je.attrs[h][this._id][t]={start:n,diff:i,end:e,trueEnd:s,trueStart:c},Je.tweens[h][t]=this._id}_tweenFunc(t){var e,n,i,r,a,o,s,c,l=this.node,u=Je.attrs[l._id][this._id];for(e in u){if(n=u[e],i=n.start,r=n.diff,c=n.end,C._isArray(i))if(a=[],s=Math.max(i.length,c.length),0===e.indexOf("fill"))for(o=0;o<s;o++)o%2===0?a.push((i[o]||0)+r[o]*t):a.push("rgba("+Math.round(i[o].r+r[o].r*t)+","+Math.round(i[o].g+r[o].g*t)+","+Math.round(i[o].b+r[o].b*t)+","+(i[o].a+r[o].a*t)+")");else for(o=0;o<s;o++)a.push((i[o]||0)+r[o]*t);else a=-1!==Xe.indexOf(e)?"rgba("+Math.round(i.r+r.r*t)+","+Math.round(i.g+r.g*t)+","+Math.round(i.b+r.b*t)+","+(i.a+r.a*t)+")":i+r*t;l.setAttr(e,a)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,e=Je.attrs[t._id][this._id];e.points&&e.points.trueEnd&&t.setAttr("points",e.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,e=Je.attrs[t._id][this._id];e.points&&e.points.trueStart&&t.points(e.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(1e3*t),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t,e=this.node._id,n=this._id,i=Je.tweens[e];for(t in this.pause(),i)delete Je.tweens[e][t];delete Je.attrs[e][n]}}Je.attrs={},Je.tweens={},Dt.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()};var n=new Je(t);n.play()};const Ze={BackEaseIn(t,e,n,i){var r=1.70158;return n*(t/=i)*t*((r+1)*t-r)+e},BackEaseOut(t,e,n,i){var r=1.70158;return n*((t=t/i-1)*t*((r+1)*t+r)+1)+e},BackEaseInOut(t,e,n,i){var r=1.70158;return(t/=i/2)<1?n/2*(t*t*((1+(r*=1.525))*t-r))+e:n/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},ElasticEaseIn(t,e,n,i,r,a){var o=0;return 0===t?e:1===(t/=i)?e+n:(a||(a=.3*i),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)+e)},ElasticEaseOut(t,e,n,i,r,a){var o=0;return 0===t?e:1===(t/=i)?e+n:(a||(a=.3*i),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),r*Math.pow(2,-10*t)*Math.sin((t*i-o)*(2*Math.PI)/a)+n+e)},ElasticEaseInOut(t,e,n,i,r,a){var o=0;return 0===t?e:2===(t/=i/2)?e+n:(a||(a=i*(.3*1.5)),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)*-.5+e:r*Math.pow(2,-10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)*.5+n+e)},BounceEaseOut(t,e,n,i){return(t/=i)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},BounceEaseIn(t,e,n,i){return n-Ze.BounceEaseOut(i-t,0,n,i)+e},BounceEaseInOut(t,e,n,i){return t<i/2?.5*Ze.BounceEaseIn(2*t,0,n,i)+e:.5*Ze.BounceEaseOut(2*t-i,0,n,i)+.5*n+e},EaseIn(t,e,n,i){return n*(t/=i)*t+e},EaseOut(t,e,n,i){return-n*(t/=i)*(t-2)+e},EaseInOut(t,e,n,i){return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},StrongEaseIn(t,e,n,i){return n*(t/=i)*t*t*t*t+e},StrongEaseOut(t,e,n,i){return n*((t=t/i-1)*t*t*t*t+1)+e},StrongEaseInOut(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},Linear(t,e,n,i){return n*t/i+e}},Qe=C._assign(o,{Util:C,Transform:c,Node:Dt,Container:Ot,Stage:ve,stages:pe,Layer:Be,FastLayer:je,Group:ze,DD:at,Shape:Re,shapes:Se,Animation:Ve,Tween:Je,Easings:Ze,Context:J,Canvas:nt});class tn extends Re{_sceneFunc(t){var e=o.getAngle(this.angle()),n=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,n),t.arc(0,0,this.innerRadius(),e,0,!n),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),e=this.outerRadius(),n=this.clockwise(),i=o.getAngle(n?360-this.angle():this.angle()),r=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),c=Math.sin(Math.min(i,Math.PI/2)),l=r*(r>0?t:e),u=a*(a>0?e:t),h=s*(s>0?t:e),d=c*(c>0?e:t);return{x:l,y:n?-1*d:h,width:u-l,height:d-h}}}function en(t,e,n,i,r,a,o){var s=Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2)),c=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2)),l=o*s/(s+c),u=o*c/(s+c),h=n-l*(r-t),d=i-l*(a-e),f=n+u*(r-t),p=i+u*(a-e);return[h,d,f,p]}function nn(t,e){var n,i,r=t.length,a=[];for(n=2;n<r-2;n+=2)i=en(t[n-2],t[n-1],t[n],t[n+1],t[n+2],t[n+3],e),isNaN(i[0])||(a.push(i[0]),a.push(i[1]),a.push(t[n]),a.push(t[n+1]),a.push(i[2]),a.push(i[3]));return a}tn.prototype._centroid=!0,tn.prototype.className="Arc",tn.prototype._attrsAffectingSize=["innerRadius","outerRadius"],s(tn),F.addGetterSetter(tn,"innerRadius",0,O()),F.addGetterSetter(tn,"outerRadius",0,O()),F.addGetterSetter(tn,"angle",0,O()),F.addGetterSetter(tn,"clockwise",!1,I());class rn extends Re{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",(function(){this._clearCache("tensionPoints")}))}_sceneFunc(t){var e,n,i,r=this.points(),a=r.length,o=this.tension(),s=this.closed(),c=this.bezier();if(a){if(t.beginPath(),t.moveTo(r[0],r[1]),0!==o&&a>4){e=this.getTensionPoints(),n=e.length,i=s?0:4,s||t.quadraticCurveTo(e[0],e[1],e[2],e[3]);while(i<n-2)t.bezierCurveTo(e[i++],e[i++],e[i++],e[i++],e[i++],e[i++]);s||t.quadraticCurveTo(e[n-2],e[n-1],r[a-2],r[a-1])}else if(c){i=2;while(i<a)t.bezierCurveTo(r[i++],r[i++],r[i++],r[i++],r[i++],r[i++])}else for(i=2;i<a;i+=2)t.lineTo(r[i],r[i+1]);s?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():nn(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),e=t.length,n=this.tension(),i=en(t[e-2],t[e-1],t[0],t[1],t[2],t[3],n),r=en(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],n),a=nn(t,n),o=[i[2],i[3]].concat(a).concat([r[0],r[1],t[e-2],t[e-1],r[2],r[3],i[0],i[1],t[0],t[1]]);return o}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};t=0!==this.tension()?[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:this.points();for(var e,n,i=t[0],r=t[0],a=t[1],o=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],i=Math.min(i,e),r=Math.max(r,e),a=Math.min(a,n),o=Math.max(o,n);return{x:i,y:a,width:r-i,height:o-a}}}rn.prototype.className="Line",rn.prototype._attrsAffectingSize=["points","bezier","tension"],s(rn),F.addGetterSetter(rn,"closed",!1),F.addGetterSetter(rn,"bezier",!1),F.addGetterSetter(rn,"tension",0,O()),F.addGetterSetter(rn,"points",[],R());class an extends Re{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=an.parsePathData(this.data()),this.pathLength=0;for(var e=0;e<this.dataArray.length;++e)this.pathLength+=this.dataArray[e].pathLength;this.on("dataChange.konva",(function(){this.dataArray=an.parsePathData(this.data()),this.pathLength=0;for(var t=0;t<this.dataArray.length;++t)this.pathLength+=this.dataArray[t].pathLength}))}_sceneFunc(t){var e=this.dataArray;t.beginPath();for(var n=!1,i=0;i<e.length;i++){var r=e[i].command,a=e[i].points;switch(r){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],h=a[5],d=a[6],f=a[7],p=c>l?c:l,v=c>l?1:c/l,m=c>l?l/c:1;t.translate(o,s),t.rotate(d),t.scale(v,m),t.arc(0,0,p,u,u+h,1-f),t.scale(1/v,1/m),t.rotate(-d),t.translate(-o,-s);break;case"z":n=!0,t.closePath();break}}n||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach((function(e){if("A"===e.command){var n=e.points[4],i=e.points[5],r=e.points[4]+i,a=Math.PI/180;if(Math.abs(n-r)<a&&(a=Math.abs(n-r)),i<0)for(let i=n-a;i>r;i-=a){const n=an.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],i,0);t.push(n.x,n.y)}else for(let i=n+a;i<r;i+=a){const n=an.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],i,0);t.push(n.x,n.y)}}else if("C"===e.command)for(let o=0;o<=1;o+=.01){const n=an.getPointOnCubicBezier(o,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3],e.points[4],e.points[5]);t.push(n.x,n.y)}else t=t.concat(e.points)}));for(var e,n,i=t[0],r=t[0],a=t[1],o=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],isNaN(e)||(i=Math.min(i,e),r=Math.max(r,e)),isNaN(n)||(a=Math.min(a,n),o=Math.max(o,n));return{x:i,y:a,width:r-i,height:o-a}}getLength(){return this.pathLength}getPointAtLength(t){var e,n=0,i=this.dataArray.length;if(!i)return null;while(n<i&&t>this.dataArray[n].pathLength)t-=this.dataArray[n].pathLength,++n;if(n===i)return e=this.dataArray[n-1].points.slice(-2),{x:e[0],y:e[1]};if(t<.01)return e=this.dataArray[n].points.slice(0,2),{x:e[0],y:e[1]};var r=this.dataArray[n],a=r.points;switch(r.command){case"L":return an.getPointOnLine(t,r.start.x,r.start.y,a[0],a[1]);case"C":return an.getPointOnCubicBezier(t/r.pathLength,r.start.x,r.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return an.getPointOnQuadraticBezier(t/r.pathLength,r.start.x,r.start.y,a[0],a[1],a[2],a[3]);case"A":var o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],h=a[5],d=a[6];return u+=h*t/r.pathLength,an.getPointOnEllipticalArc(o,s,c,l,u,d)}return null}static getLineLength(t,e,n,i){return Math.sqrt((n-t)*(n-t)+(i-e)*(i-e))}static getPointOnLine(t,e,n,i,r,a,o){void 0===a&&(a=e),void 0===o&&(o=n);var s=(r-n)/(i-e+1e-8),c=Math.sqrt(t*t/(1+s*s));i<e&&(c*=-1);var l,u=s*c;if(i===e)l={x:a,y:o+u};else if((o-n)/(a-e+1e-8)===s)l={x:a+c,y:o+u};else{var h,d,f=this.getLineLength(e,n,i,r),p=(a-e)*(i-e)+(o-n)*(r-n);p/=f*f,h=e+p*(i-e),d=n+p*(r-n);var v=this.getLineLength(a,o,h,d),m=Math.sqrt(t*t-v*v);c=Math.sqrt(m*m/(1+s*s)),i<e&&(c*=-1),u=s*c,l={x:h+c,y:d+u}}return l}static getPointOnCubicBezier(t,e,n,i,r,a,o,s,c){function l(t){return t*t*t}function u(t){return 3*t*t*(1-t)}function h(t){return 3*t*(1-t)*(1-t)}function d(t){return(1-t)*(1-t)*(1-t)}var f=s*l(t)+a*u(t)+i*h(t)+e*d(t),p=c*l(t)+o*u(t)+r*h(t)+n*d(t);return{x:f,y:p}}static getPointOnQuadraticBezier(t,e,n,i,r,a,o){function s(t){return t*t}function c(t){return 2*t*(1-t)}function l(t){return(1-t)*(1-t)}var u=a*s(t)+i*c(t)+e*l(t),h=o*s(t)+r*c(t)+n*l(t);return{x:u,y:h}}static getPointOnEllipticalArc(t,e,n,i,r,a){var o=Math.cos(a),s=Math.sin(a),c={x:n*Math.cos(r),y:i*Math.sin(r)};return{x:t+(c.x*o-c.y*s),y:e+(c.x*s+c.y*o)}}static parsePathData(t){if(!t)return[];var e=t,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(var i=0;i<n.length;i++)e=e.replace(new RegExp(n[i],"g"),"|"+n[i]);var r,a=e.split("|"),o=[],s=[],c=0,l=0,u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(i=1;i<a.length;i++){var h=a[i],d=h.charAt(0);h=h.slice(1),s.length=0;while(r=u.exec(h))s.push(r[0]);for(var f=[],p=0,v=s.length;p<v;p++)if("00"!==s[p]){var m=parseFloat(s[p]);isNaN(m)?f.push(0):f.push(m)}else f.push(0,0);while(f.length>0){if(isNaN(f[0]))break;var g,y,b,_,w,k,S,x,C,D,T=null,O=[],E=c,A=l;switch(d){case"l":c+=f.shift(),l+=f.shift(),T="L",O.push(c,l);break;case"L":c=f.shift(),l=f.shift(),O.push(c,l);break;case"m":var P=f.shift(),M=f.shift();if(c+=P,l+=M,T="M",o.length>2&&"z"===o[o.length-1].command)for(var R=o.length-2;R>=0;R--)if("M"===o[R].command){c=o[R].points[0]+P,l=o[R].points[1]+M;break}O.push(c,l),d="l";break;case"M":c=f.shift(),l=f.shift(),T="M",O.push(c,l),d="L";break;case"h":c+=f.shift(),T="L",O.push(c,l);break;case"H":c=f.shift(),T="L",O.push(c,l);break;case"v":l+=f.shift(),T="L",O.push(c,l);break;case"V":l=f.shift(),T="L",O.push(c,l);break;case"C":O.push(f.shift(),f.shift(),f.shift(),f.shift()),c=f.shift(),l=f.shift(),O.push(c,l);break;case"c":O.push(c+f.shift(),l+f.shift(),c+f.shift(),l+f.shift()),c+=f.shift(),l+=f.shift(),T="C",O.push(c,l);break;case"S":y=c,b=l,g=o[o.length-1],"C"===g.command&&(y=c+(c-g.points[2]),b=l+(l-g.points[3])),O.push(y,b,f.shift(),f.shift()),c=f.shift(),l=f.shift(),T="C",O.push(c,l);break;case"s":y=c,b=l,g=o[o.length-1],"C"===g.command&&(y=c+(c-g.points[2]),b=l+(l-g.points[3])),O.push(y,b,c+f.shift(),l+f.shift()),c+=f.shift(),l+=f.shift(),T="C",O.push(c,l);break;case"Q":O.push(f.shift(),f.shift()),c=f.shift(),l=f.shift(),O.push(c,l);break;case"q":O.push(c+f.shift(),l+f.shift()),c+=f.shift(),l+=f.shift(),T="Q",O.push(c,l);break;case"T":y=c,b=l,g=o[o.length-1],"Q"===g.command&&(y=c+(c-g.points[0]),b=l+(l-g.points[1])),c=f.shift(),l=f.shift(),T="Q",O.push(y,b,c,l);break;case"t":y=c,b=l,g=o[o.length-1],"Q"===g.command&&(y=c+(c-g.points[0]),b=l+(l-g.points[1])),c+=f.shift(),l+=f.shift(),T="Q",O.push(y,b,c,l);break;case"A":_=f.shift(),w=f.shift(),k=f.shift(),S=f.shift(),x=f.shift(),C=c,D=l,c=f.shift(),l=f.shift(),T="A",O=this.convertEndpointToCenterParameterization(C,D,c,l,S,x,_,w,k);break;case"a":_=f.shift(),w=f.shift(),k=f.shift(),S=f.shift(),x=f.shift(),C=c,D=l,c+=f.shift(),l+=f.shift(),T="A",O=this.convertEndpointToCenterParameterization(C,D,c,l,S,x,_,w,k);break}o.push({command:T||d,points:O,start:{x:E,y:A},pathLength:this.calcLength(E,A,T||d,O)})}"z"!==d&&"Z"!==d||o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,e,n,i){var r,a,o,s,c=an;switch(n){case"L":return c.getLineLength(t,e,i[0],i[1]);case"C":for(r=0,a=c.getPointOnCubicBezier(0,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),s=.01;s<=1;s+=.01)o=c.getPointOnCubicBezier(s,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return r;case"Q":for(r=0,a=c.getPointOnQuadraticBezier(0,t,e,i[0],i[1],i[2],i[3]),s=.01;s<=1;s+=.01)o=c.getPointOnQuadraticBezier(s,t,e,i[0],i[1],i[2],i[3]),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return r;case"A":r=0;var l=i[4],u=i[5],h=i[4]+u,d=Math.PI/180;if(Math.abs(l-h)<d&&(d=Math.abs(l-h)),a=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),u<0)for(s=l-d;s>h;s-=d)o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],s,0),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;else for(s=l+d;s<h;s+=d)o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],s,0),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),r+=c.getLineLength(a.x,a.y,o.x,o.y),r}return 0}static convertEndpointToCenterParameterization(t,e,n,i,r,a,o,s,c){var l=c*(Math.PI/180),u=Math.cos(l)*(t-n)/2+Math.sin(l)*(e-i)/2,h=-1*Math.sin(l)*(t-n)/2+Math.cos(l)*(e-i)/2,d=u*u/(o*o)+h*h/(s*s);d>1&&(o*=Math.sqrt(d),s*=Math.sqrt(d));var f=Math.sqrt((o*o*(s*s)-o*o*(h*h)-s*s*(u*u))/(o*o*(h*h)+s*s*(u*u)));r===a&&(f*=-1),isNaN(f)&&(f=0);var p=f*o*h/s,v=f*-s*u/o,m=(t+n)/2+Math.cos(l)*p-Math.sin(l)*v,g=(e+i)/2+Math.sin(l)*p+Math.cos(l)*v,y=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},b=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(y(t)*y(e))},_=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(b(t,e))},w=_([1,0],[(u-p)/o,(h-v)/s]),k=[(u-p)/o,(h-v)/s],S=[(-1*u-p)/o,(-1*h-v)/s],x=_(k,S);return b(k,S)<=-1&&(x=Math.PI),b(k,S)>=1&&(x=0),0===a&&x>0&&(x-=2*Math.PI),1===a&&x<0&&(x+=2*Math.PI),[m,g,o,s,w,x,l,a]}}an.prototype.className="Path",an.prototype._attrsAffectingSize=["data"],s(an),F.addGetterSetter(an,"data");class on extends rn{_sceneFunc(t){super._sceneFunc(t);var e=2*Math.PI,n=this.points(),i=n,r=0!==this.tension()&&n.length>4;r&&(i=this.getTensionPoints());var a,o,s=this.pointerLength(),c=n.length;if(r){const t=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],n[c-2],n[c-1]],e=an.calcLength(i[i.length-4],i[i.length-3],"C",t),r=an.getPointOnQuadraticBezier(Math.min(1,1-s/e),t[0],t[1],t[2],t[3],t[4],t[5]);a=n[c-2]-r.x,o=n[c-1]-r.y}else a=n[c-2]-n[c-4],o=n[c-1]-n[c-3];var l=(Math.atan2(o,a)+e)%e,u=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[c-2],n[c-1]),t.rotate(l),t.moveTo(0,0),t.lineTo(-s,u/2),t.lineTo(-s,-u/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),r?(a=(i[0]+i[2])/2-n[0],o=(i[1]+i[3])/2-n[1]):(a=n[2]-n[0],o=n[3]-n[1]),t.rotate((Math.atan2(-o,-a)+e)%e),t.moveTo(0,0),t.lineTo(-s,u/2),t.lineTo(-s,-u/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x-e,y:t.y-e,width:t.width+2*e,height:t.height+2*e}}}on.prototype.className="Arrow",s(on),F.addGetterSetter(on,"pointerLength",10,O()),F.addGetterSetter(on,"pointerWidth",10,O()),F.addGetterSetter(on,"pointerAtBeginning",!1),F.addGetterSetter(on,"pointerAtEnding",!0);class sn extends Re{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}sn.prototype._centroid=!0,sn.prototype.className="Circle",sn.prototype._attrsAffectingSize=["radius"],s(sn),F.addGetterSetter(sn,"radius",0,O());class cn extends Re{_sceneFunc(t){var e=this.radiusX(),n=this.radiusY();t.beginPath(),t.save(),e!==n&&t.scale(1,n/e),t.arc(0,0,e,0,2*Math.PI,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}cn.prototype.className="Ellipse",cn.prototype._centroid=!0,cn.prototype._attrsAffectingSize=["radiusX","radiusY"],s(cn),F.addComponentsGetterSetter(cn,"radius",["x","y"]),F.addGetterSetter(cn,"radiusX",0,O()),F.addGetterSetter(cn,"radiusY",0,O());class ln extends Re{constructor(t){super(t),this.on("imageChange.konva",(()=>{this._setImageLoad()})),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&4===t.readyState||t&&t["addEventListener"]&&t["addEventListener"]("load",(()=>{this._requestDraw()}))}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),n=this.getHeight(),i=this.attrs.image;let r;if(i){const t=this.attrs.cropWidth,a=this.attrs.cropHeight;r=t&&a?[i,this.cropX(),this.cropY(),t,a,0,0,e,n]:[i,0,0,e,n]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,r)}_hitFunc(t){var e=this.width(),n=this.height();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width}getHeight(){var t,e;return null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height}static fromURL(t,e,n=null){var i=C.createImageElement();i.onload=function(){var t=new ln({image:i});e(t)},i.onerror=n,i.crossOrigin="Anonymous",i.src=t}}ln.prototype.className="Image",s(ln),F.addGetterSetter(ln,"image"),F.addComponentsGetterSetter(ln,"crop",["x","y","width","height"]),F.addGetterSetter(ln,"cropX",0,O()),F.addGetterSetter(ln,"cropY",0,O()),F.addGetterSetter(ln,"cropWidth",0,O()),F.addGetterSetter(ln,"cropHeight",0,O());var un=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],hn="Change.konva",dn="none",fn="up",pn="right",vn="down",mn="left",gn=un.length;class yn extends ze{constructor(t){super(t),this.on("add.konva",(function(t){this._addListeners(t.child),this._sync()}))}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var e,n=this,i=function(){n._sync()};for(e=0;e<gn;e++)t.on(un[e]+hn,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t,e,n,i,r,a,o,s=this.getText(),c=this.getTag();if(s&&c){switch(t=s.width(),e=s.height(),n=c.pointerDirection(),i=c.pointerWidth(),o=c.pointerHeight(),r=0,a=0,n){case fn:r=t/2,a=-1*o;break;case pn:r=t+i,a=e/2;break;case vn:r=t/2,a=e+o;break;case mn:r=-1*i,a=e/2;break}c.setAttrs({x:-1*r,y:-1*a,width:t,height:e}),s.setAttrs({x:-1*r,y:-1*a})}}}yn.prototype.className="Label",s(yn);class bn extends Re{_sceneFunc(t){var e=this.width(),n=this.height(),i=this.pointerDirection(),r=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let s=0,c=0,l=0,u=0;"number"===typeof o?s=c=l=u=Math.min(o,e/2,n/2):(s=Math.min(o[0]||0,e/2,n/2),c=Math.min(o[1]||0,e/2,n/2),u=Math.min(o[2]||0,e/2,n/2),l=Math.min(o[3]||0,e/2,n/2)),t.beginPath(),t.moveTo(s,0),i===fn&&(t.lineTo((e-r)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+r)/2,0)),t.lineTo(e-c,0),t.arc(e-c,c,c,3*Math.PI/2,0,!1),i===pn&&(t.lineTo(e,(n-a)/2),t.lineTo(e+r,n/2),t.lineTo(e,(n+a)/2)),t.lineTo(e,n-u),t.arc(e-u,n-u,u,0,Math.PI/2,!1),i===vn&&(t.lineTo((e+r)/2,n),t.lineTo(e/2,n+a),t.lineTo((e-r)/2,n)),t.lineTo(l,n),t.arc(l,n-l,l,Math.PI/2,Math.PI,!1),i===mn&&(t.lineTo(0,(n+a)/2),t.lineTo(-1*r,n/2),t.lineTo(0,(n-a)/2)),t.lineTo(0,s),t.arc(s,s,s,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,e=0,n=this.pointerWidth(),i=this.pointerHeight(),r=this.pointerDirection(),a=this.width(),o=this.height();return r===fn?(e-=i,o+=i):r===vn?o+=i:r===mn?(t-=1.5*n,a+=n):r===pn&&(a+=1.5*n),{x:t,y:e,width:a,height:o}}}bn.prototype.className="Tag",s(bn),F.addGetterSetter(bn,"pointerDirection",dn),F.addGetterSetter(bn,"pointerWidth",0,O()),F.addGetterSetter(bn,"pointerHeight",0,O()),F.addGetterSetter(bn,"cornerRadius",0,E(4));class _n extends Re{_sceneFunc(t){var e=this.cornerRadius(),n=this.width(),i=this.height();if(t.beginPath(),e){let r=0,a=0,o=0,s=0;"number"===typeof e?r=a=o=s=Math.min(e,n/2,i/2):(r=Math.min(e[0]||0,n/2,i/2),a=Math.min(e[1]||0,n/2,i/2),s=Math.min(e[2]||0,n/2,i/2),o=Math.min(e[3]||0,n/2,i/2)),t.moveTo(r,0),t.lineTo(n-a,0),t.arc(n-a,a,a,3*Math.PI/2,0,!1),t.lineTo(n,i-s),t.arc(n-s,i-s,s,0,Math.PI/2,!1),t.lineTo(o,i),t.arc(o,i-o,o,Math.PI/2,Math.PI,!1),t.lineTo(0,r),t.arc(r,r,r,Math.PI,3*Math.PI/2,!1)}else t.rect(0,0,n,i);t.closePath(),t.fillStrokeShape(this)}}_n.prototype.className="Rect",s(_n),F.addGetterSetter(_n,"cornerRadius",0,E(4));class wn extends Re{_sceneFunc(t){const e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var n=1;n<e.length;n++)t.lineTo(e[n].x,e[n].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,e=this.attrs.radius||0,n=[];for(var i=0;i<t;i++)n.push({x:e*Math.sin(2*i*Math.PI/t),y:-1*e*Math.cos(2*i*Math.PI/t)});return n}getSelfRect(){const t=this._getPoints();var e=t[0].x,n=t[0].y,i=t[0].x,r=t[0].y;return t.forEach((t=>{e=Math.min(e,t.x),n=Math.max(n,t.x),i=Math.min(i,t.y),r=Math.max(r,t.y)})),{x:e,y:i,width:n-e,height:r-i}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}wn.prototype.className="RegularPolygon",wn.prototype._centroid=!0,wn.prototype._attrsAffectingSize=["radius"],s(wn),F.addGetterSetter(wn,"radius",0,O()),F.addGetterSetter(wn,"sides",0,O());var kn=2*Math.PI;class Sn extends Re{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,kn,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),kn,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sn.prototype.className="Ring",Sn.prototype._centroid=!0,Sn.prototype._attrsAffectingSize=["innerRadius","outerRadius"],s(Sn),F.addGetterSetter(Sn,"innerRadius",0,O()),F.addGetterSetter(Sn,"outerRadius",0,O());class xn extends Re{constructor(t){super(t),this._updated=!0,this.anim=new Ve((()=>{var t=this._updated;return this._updated=!1,t})),this.on("animationChange.konva",(function(){this.frameIndex(0)})),this.on("frameIndexChange.konva",(function(){this._updated=!0})),this.on("frameRateChange.konva",(function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())}))}_sceneFunc(t){var e=this.animation(),n=this.frameIndex(),i=4*n,r=this.animations()[e],a=this.frameOffsets(),o=r[i+0],s=r[i+1],c=r[i+2],l=r[i+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,c,l),t.closePath(),t.fillStrokeShape(this)),u)if(a){var h=a[e],d=2*n;t.drawImage(u,o,s,c,l,h[d+0],h[d+1],c,l)}else t.drawImage(u,o,s,c,l,0,0,c,l)}_hitFunc(t){var e=this.animation(),n=this.frameIndex(),i=4*n,r=this.animations()[e],a=this.frameOffsets(),o=r[i+2],s=r[i+3];if(t.beginPath(),a){var c=a[e],l=2*n;t.rect(c[l+0],c[l+1],o,s)}else t.rect(0,0,o,s);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval((function(){t._updateIndex()}),1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),e=this.animation(),n=this.animations(),i=n[e],r=i.length/4;t<r-1?this.frameIndex(t+1):this.frameIndex(0)}}xn.prototype.className="Sprite",s(xn),F.addGetterSetter(xn,"animation"),F.addGetterSetter(xn,"animations"),F.addGetterSetter(xn,"frameOffsets"),F.addGetterSetter(xn,"image"),F.addGetterSetter(xn,"frameIndex",0,O()),F.addGetterSetter(xn,"frameRate",17,O()),F.backCompat(xn,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Cn extends Re{_sceneFunc(t){var e=this.innerRadius(),n=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(var r=1;r<2*i;r++){var a=r%2===0?n:e,o=a*Math.sin(r*Math.PI/i),s=-1*a*Math.cos(r*Math.PI/i);t.lineTo(o,s)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}function Dn(t){return Array.from(t)}Cn.prototype.className="Star",Cn.prototype._centroid=!0,Cn.prototype._attrsAffectingSize=["innerRadius","outerRadius"],s(Cn),F.addGetterSetter(Cn,"numPoints",5,O()),F.addGetterSetter(Cn,"innerRadius",0,O()),F.addGetterSetter(Cn,"outerRadius",0,O());var Tn,On="auto",En="center",An="justify",Pn="Change.konva",Mn="2d",Rn="-",In="left",Nn="text",$n="Text",Ln="top",Fn="bottom",Bn="middle",jn="normal",zn="px ",Hn=" ",Vn="right",Gn="word",Wn="char",Un="none",Yn="…",qn=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],Xn=qn.length;function Kn(t){return t.split(",").map((t=>{t=t.trim();const e=t.indexOf(" ")>=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!n&&(t=`"${t}"`),t})).join(", ")}function Jn(){return Tn||(Tn=C.createCanvasElement().getContext(Mn),Tn)}function Zn(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Qn(t){t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function ti(t){return t=t||{},t.fillLinearGradientColorStops||t.fillRadialGradientColorStops||t.fillPatternImage||(t.fill=t.fill||"black"),t}class ei extends Re{constructor(t){super(ti(t)),this._partialTextX=0,this._partialTextY=0;for(var e=0;e<Xn;e++)this.on(qn[e]+Pn,this._setTextData);this._setTextData()}_sceneFunc(t){var e=this.textArr,n=e.length;if(this.text()){var i,r=this.padding(),a=this.fontSize(),o=this.lineHeight()*a,s=this.verticalAlign(),c=0,l=this.align(),u=this.getWidth(),h=this.letterSpacing(),d=this.fill(),f=this.textDecoration(),p=-1!==f.indexOf("underline"),v=-1!==f.indexOf("line-through"),m=0,g=(m=o/2,0),y=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",Bn),t.setAttr("textAlign",In),s===Bn?c=(this.getHeight()-n*o-2*r)/2:s===Fn&&(c=this.getHeight()-n*o-2*r),t.translate(r,c+r),i=0;i<n;i++){g=0,y=0;var b,_,w,k=e[i],S=k.text,x=k.width,C=k.lastInParagraph;if(t.save(),l===Vn?g+=u-x-2*r:l===En&&(g+=(u-x-2*r)/2),p&&(t.save(),t.beginPath(),t.moveTo(g,m+y+Math.round(a/2)),b=S.split(" ").length-1,_=0===b,w=l===An&&C&&!_?u-2*r:x,t.lineTo(g+Math.round(w),m+y+Math.round(a/2)),t.lineWidth=a/15,t.strokeStyle=d,t.stroke(),t.restore()),v&&(t.save(),t.beginPath(),t.moveTo(g,m+y),b=S.split(" ").length-1,_=0===b,w=l===An&&C&&!_?u-2*r:x,t.lineTo(g+Math.round(w),m+y),t.lineWidth=a/15,t.strokeStyle=d,t.stroke(),t.restore()),0!==h||l===An){b=S.split(" ").length-1;for(var D=Dn(S),T=0;T<D.length;T++){var O=D[T];" "!==O||C||l!==An||(g+=(u-2*r-x)/b),this._partialTextX=g,this._partialTextY=m+y,this._partialText=O,t.fillStrokeShape(this),g+=this.measureSize(O).width+h}}else this._partialTextX=g,this._partialTextY=m+y,this._partialText=S,t.fillStrokeShape(this);t.restore(),n>1&&(m+=o)}}}_hitFunc(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}setText(t){var e=C._isString(t)?t:null===t||void 0===t?"":t+"";return this._setAttr(Nn,e),this}getWidth(){var t=this.attrs.width===On||void 0===this.attrs.width;return t?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){var t=this.attrs.height===On||void 0===this.attrs.height;return t?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return C.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e,n=Jn(),i=this.fontSize();return n.save(),n.font=this._getContextFont(),e=n.measureText(t),n.restore(),{width:e.width,height:i}}_getContextFont(){return this.fontStyle()+Hn+this.fontVariant()+Hn+(this.fontSize()+zn)+Kn(this.fontFamily())}_addTextLine(t){this.align()===An&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){var e=this.letterSpacing(),n=t.length;return Jn().measureText(t).width+(n?e*(n-1):0)}_setTextData(){var t=this.text().split("\n"),e=+this.fontSize(),n=0,i=this.lineHeight()*e,r=this.attrs.width,a=this.attrs.height,o=r!==On&&void 0!==r,s=a!==On&&void 0!==a,c=this.padding(),l=r-2*c,u=a-2*c,h=0,d=this.wrap(),f=d!==Un,p=d!==Wn&&f,v=this.ellipsis();this.textArr=[],Jn().font=this._getContextFont();for(var m=v?this._getTextWidth(Yn):0,g=0,y=t.length;g<y;++g){var b=t[g],_=this._getTextWidth(b);if(o&&_>l)while(b.length>0){var w=0,k=b.length,S="",x=0;while(w<k){var C=w+k>>>1,D=b.slice(0,C+1),T=this._getTextWidth(D)+m;T<=l?(w=C+1,S=D,x=T):k=C}if(!S)break;if(p){var O,E=b[S.length],A=E===Hn||E===Rn;O=A&&x<=l?S.length:Math.max(S.lastIndexOf(Hn),S.lastIndexOf(Rn))+1,O>0&&(w=O,S=S.slice(0,w),x=this._getTextWidth(S))}S=S.trimRight(),this._addTextLine(S),n=Math.max(n,x),h+=i;var P=this._shouldHandleEllipsis(h);if(P){this._tryToAddEllipsisToLastLine();break}if(b=b.slice(w),b=b.trimLeft(),b.length>0&&(_=this._getTextWidth(b),_<=l)){this._addTextLine(b),h+=i,n=Math.max(n,_);break}}else this._addTextLine(b),h+=i,n=Math.max(n,_),this._shouldHandleEllipsis(h)&&g<y-1&&this._tryToAddEllipsisToLastLine();if(s&&h+i>u)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=e,this.textWidth=n}_shouldHandleEllipsis(t){var e=+this.fontSize(),n=this.lineHeight()*e,i=this.attrs.height,r=i!==On&&void 0!==i,a=this.padding(),o=i-2*a,s=this.wrap(),c=s!==Un;return!c||r&&t+n>o}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,e=t!==On&&void 0!==t,n=this.padding(),i=t-2*n,r=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(a&&r){if(e){var o=this._getTextWidth(a.text+Yn)<i;o||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+Yn)}}getStrokeScaleEnabled(){return!0}}ei.prototype._fillFunc=Zn,ei.prototype._strokeFunc=Qn,ei.prototype.className=$n,ei.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],s(ei),F.overWriteSetter(ei,"width",A()),F.overWriteSetter(ei,"height",A()),F.addGetterSetter(ei,"fontFamily","Arial"),F.addGetterSetter(ei,"fontSize",12,O()),F.addGetterSetter(ei,"fontStyle",jn),F.addGetterSetter(ei,"fontVariant",jn),F.addGetterSetter(ei,"padding",0,O()),F.addGetterSetter(ei,"align",In),F.addGetterSetter(ei,"verticalAlign",Ln),F.addGetterSetter(ei,"lineHeight",1,O()),F.addGetterSetter(ei,"wrap",Gn),F.addGetterSetter(ei,"ellipsis",!1,I()),F.addGetterSetter(ei,"letterSpacing",0,O()),F.addGetterSetter(ei,"text","",P()),F.addGetterSetter(ei,"textDecoration","");var ni="",ii="normal";function ri(t){t.fillText(this.partialText,0,0)}function ai(t){t.strokeText(this.partialText,0,0)}class oi extends Re{constructor(t){super(t),this.dummyCanvas=C.createCanvasElement(),this.dataArray=[],this.dataArray=an.parsePathData(this.attrs.data),this.on("dataChange.konva",(function(){this.dataArray=an.parsePathData(this.attrs.data),this._setTextData()})),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var e=this.textDecoration(),n=this.fill(),i=this.fontSize(),r=this.glyphInfo;"underline"===e&&t.beginPath();for(var a=0;a<r.length;a++){t.save();var o=r[a].p0;t.translate(o.x,o.y),t.rotate(r[a].rotation),this.partialText=r[a].text,t.fillStrokeShape(this),"underline"===e&&(0===a&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=n,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var n=e[0].p0;t.moveTo(n.x,n.y)}for(var i=0;i<e.length;i++){var r=e[i].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return C.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return ei.prototype.setText.call(this,t)}_getContextFont(){return ei.prototype._getContextFont.call(this)}_getTextSize(t){var e=this.dummyCanvas,n=e.getContext("2d");n.save(),n.font=this._getContextFont();var i=n.measureText(t);return n.restore(),{width:i.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var t=this,e=this._getTextSize(this.attrs.text),n=this.letterSpacing(),i=this.align(),r=this.kerningFunc();this.textWidth=e.width,this.textHeight=e.height;var a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);this.glyphInfo=[];for(var o=0,s=0;s<t.dataArray.length;s++)t.dataArray[s].pathLength>0&&(o+=t.dataArray[s].pathLength);var c=0;"center"===i&&(c=Math.max(0,o/2-a/2)),"right"===i&&(c=Math.max(0,o-a));for(var l,u,h,d=Dn(this.text()),f=this.text().split(" ").length-1,p=-1,v=0,m=function(){v=0;for(var e=t.dataArray,n=p+1;n<e.length;n++){if(e[n].pathLength>0)return p=n,e[n];"M"===e[n].command&&(l={x:e[n].points[0],y:e[n].points[1]})}return{}},g=function(e){var r=t._getTextSize(e).width+n;" "===e&&"justify"===i&&(r+=(o-a)/f);var s=0,c=0;u=void 0;while(Math.abs(r-s)/r>.01&&c<20){c++;var d=s;while(void 0===h)h=m(),h&&d+h.pathLength<r&&(d+=h.pathLength,h=void 0);if(0===Object.keys(h).length||void 0===l)return;var p=!1;switch(h.command){case"L":an.getLineLength(l.x,l.y,h.points[0],h.points[1])>r?u=an.getPointOnLine(r,l.x,l.y,h.points[0],h.points[1],l.x,l.y):h=void 0;break;case"A":var g=h.points[4],y=h.points[5],b=h.points[4]+y;0===v?v=g+1e-8:r>s?v+=Math.PI/180*y/Math.abs(y):v-=Math.PI/360*y/Math.abs(y),(y<0&&v<b||y>=0&&v>b)&&(v=b,p=!0),u=an.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],v,h.points[6]);break;case"C":0===v?v=r>h.pathLength?1e-8:r/h.pathLength:r>s?v+=(r-s)/h.pathLength/2:v=Math.max(v-(s-r)/h.pathLength/2,0),v>1&&(v=1,p=!0),u=an.getPointOnCubicBezier(v,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3],h.points[4],h.points[5]);break;case"Q":0===v?v=r/h.pathLength:r>s?v+=(r-s)/h.pathLength:v-=(s-r)/h.pathLength,v>1&&(v=1,p=!0),u=an.getPointOnQuadraticBezier(v,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3]);break}void 0!==u&&(s=an.getLineLength(l.x,l.y,u.x,u.y)),p&&(p=!1,h=void 0)}},y="C",b=t._getTextSize(y).width+n,_=c/b-1,w=0;w<_;w++){if(g(y),void 0===l||void 0===u)break;l=u}for(var k=0;k<d.length;k++){if(g(d[k]),void 0===l||void 0===u)break;var S=an.getLineLength(l.x,l.y,u.x,u.y),x=0;if(r)try{x=r(d[k-1],d[k])*this.fontSize()}catch(T){x=0}l.x+=x,u.x+=x,this.textWidth+=x;var C=an.getPointOnLine(x+S/2,l.x,l.y,u.x,u.y),D=Math.atan2(u.y-l.y,u.x-l.x);this.glyphInfo.push({transposeX:C.x,transposeY:C.y,text:d[k],rotation:D,p0:l,p1:u}),l=u}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach((function(e){t.push(e.p0.x),t.push(e.p0.y),t.push(e.p1.x),t.push(e.p1.y)}));for(var e,n,i=t[0]||0,r=t[0]||0,a=t[1]||0,o=t[1]||0,s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],i=Math.min(i,e),r=Math.max(r,e),a=Math.min(a,n),o=Math.max(o,n);var c=this.fontSize();return{x:i-c/2,y:a-c/2,width:r-i+c,height:o-a+c}}}oi.prototype._fillFunc=ri,oi.prototype._strokeFunc=ai,oi.prototype._fillFuncHit=ri,oi.prototype._strokeFuncHit=ai,oi.prototype.className="TextPath",oi.prototype._attrsAffectingSize=["text","fontSize","data"],s(oi),F.addGetterSetter(oi,"data"),F.addGetterSetter(oi,"fontFamily","Arial"),F.addGetterSetter(oi,"fontSize",12,O()),F.addGetterSetter(oi,"fontStyle",ii),F.addGetterSetter(oi,"align","left"),F.addGetterSetter(oi,"letterSpacing",0,O()),F.addGetterSetter(oi,"textBaseline","middle"),F.addGetterSetter(oi,"fontVariant",ii),F.addGetterSetter(oi,"text",ni),F.addGetterSetter(oi,"textDecoration",null),F.addGetterSetter(oi,"kerningFunc",null);var si="tr-konva",ci=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map((t=>t+`.${si}`)).join(" "),li="nodesRect",ui=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],hi={"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 di="ontouchstart"in o._global;function fi(t,e){if("rotater"===t)return"crosshair";e+=C.degToRad(hi[t]||0);var n=(C.radToDeg(e)%360+360)%360;return C._inRange(n,337.5,360)||C._inRange(n,0,22.5)?"ns-resize":C._inRange(n,22.5,67.5)?"nesw-resize":C._inRange(n,67.5,112.5)?"ew-resize":C._inRange(n,112.5,157.5)?"nwse-resize":C._inRange(n,157.5,202.5)?"ns-resize":C._inRange(n,202.5,247.5)?"nesw-resize":C._inRange(n,247.5,292.5)?"ew-resize":C._inRange(n,292.5,337.5)?"nwse-resize":(C.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var pi=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],vi=1e8;function mi(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function gi(t,e,n){const i=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),r=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return Object.assign(Object.assign({},t),{rotation:t.rotation+e,x:i,y:r})}function yi(t,e){const n=mi(t);return gi(t,e,n)}function bi(t,e,n){let i=e;for(let r=0;r<t.length;r++){const a=o.getAngle(t[r]),s=Math.abs(a-e)%(2*Math.PI),c=Math.min(s,2*Math.PI-s);c<n&&(i=a)}return i}class _i extends ze{constructor(t){super(t),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(ci,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return C.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return si+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((t=>{const e=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},n=t._attrsAffectingSize.map((t=>t+"Change."+this._getEventNamespace())).join(" ");t.on(n,e),t.on(ui.map((t=>t+`.${this._getEventNamespace()}`)).join(" "),e),t.on(`absoluteTransformChange.${this._getEventNamespace()}`,e),this._proxyDrag(t)})),this._resetTransformCache();var e=!!this.findOne(".top-left");return e&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,(n=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(n,!1)})),t.on(`dragmove.${this._getEventNamespace()}`,(n=>{if(!e)return;const i=t.getAbsolutePosition(),r=i.x-e.x,a=i.y-e.y;this.nodes().forEach((e=>{if(e===t)return;if(e.isDragging())return;const i=e.getAbsolutePosition();e.setAbsolutePosition({x:i.x+r,y:i.y+a}),e.startDrag(n)})),e=null}))}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach((t=>{t.off("."+this._getEventNamespace())})),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(li),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(li,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),n){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=t.getAbsoluteScale(n),a=t.getAbsolutePosition(n),s=i.x*r.x-t.offsetX()*r.x,c=i.y*r.y-t.offsetY()*r.y;const l=(o.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI),u={x:a.x+s*Math.cos(l)+c*Math.sin(-l),y:a.y+c*Math.cos(l)+s*Math.sin(l),width:i.width*r.x,height:i.height*r.y,rotation:l};return gi(u,-o.getAngle(e),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-vi,y:-vi,width:0,height:0,rotation:0};const e=[];this.nodes().map((t=>{const n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var i=[{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}],r=t.getAbsoluteTransform();i.forEach((function(t){var n=r.point(t);e.push(n)}))}));const n=new c;var i,r,a,s;n.rotate(-o.getAngle(this.rotation())),e.forEach((function(t){var e=n.point(t);void 0===i&&(i=a=e.x,r=s=e.y),i=Math.min(i,e.x),r=Math.min(r,e.y),a=Math.max(a,e.x),s=Math.max(s,e.y)})),n.invert();const l=n.point({x:i,y:r});return{x:l.x,y:l.y,width:a-i,height:s-r,rotation:o.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(),pi.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var e=new _n({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:di?10:"auto"}),n=this;e.on("mousedown touchstart",(function(t){n._handleMouseDown(t)})),e.on("dragstart",(t=>{e.stopDrag(),t.cancelBubble=!0})),e.on("dragend",(t=>{t.cancelBubble=!0})),e.on("mouseenter",(()=>{var n=o.getAngle(this.rotation()),i=fi(t,n);e.getStage().content&&(e.getStage().content.style.cursor=i),this._cursorChange=!0})),e.on("mouseout",(()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1})),this.add(e)}_createBack(){var t=new Re({name:"back",width:0,height:0,draggable:!0,sceneFunc(t){var e=this.getParent(),n=e.padding();t.beginPath(),t.rect(-n,-n,this.width()+2*n,this.height()+2*n),t.moveTo(this.width()/2,-n),e.rotateEnabled()&&t.lineTo(this.width()/2,-e.rotateAnchorOffset()*C._sign(this.height())-n),t.fillStrokeShape(this)},hitFunc:(t,e)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();t.beginPath(),t.rect(-n,-n,e.width()+2*n,e.height()+2*n),t.fillStrokeShape(e)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",(t=>{t.cancelBubble=!0})),t.on("dragmove",(t=>{t.cancelBubble=!0})),t.on("dragend",(t=>{t.cancelBubble=!0})),this.on("dragmove",(t=>{this.update()}))}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var e=this._getNodeRect(),n=e.width,i=e.height,r=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));this.sin=Math.abs(i/r),this.cos=Math.abs(n/r),"undefined"!==typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),o=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach((e=>{e._fire("transformstart",{evt:t.evt,target:e})}))}_handleMouseMove(t){var e,n,i,r=this.findOne("."+this._movingAnchorName),a=r.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let c={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const l=r.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(l,c,t)),r.setAbsolutePosition(c);const u=r.getAbsolutePosition();if(l.x!==u.x||l.y!==u.y)if("rotater"!==this._movingAnchorName){var h=this.keepRatio()||t.shiftKey,d=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(h){var f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(f.x-r.x(),2)+Math.pow(f.y-r.y(),2));var p=this.findOne(".top-left").x()>f.x?-1:1,v=this.findOne(".top-left").y()>f.y?-1:1;e=i*this.cos*p,n=i*this.sin*v,this.findOne(".top-left").x(f.x-e),this.findOne(".top-left").y(f.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(r.y());else if("top-right"===this._movingAnchorName){if(h){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(r.x()-f.x,2)+Math.pow(f.y-r.y(),2));p=this.findOne(".top-right").x()<f.x?-1:1,v=this.findOne(".top-right").y()>f.y?-1:1;e=i*this.cos*p,n=i*this.sin*v,this.findOne(".top-right").x(f.x+e),this.findOne(".top-right").y(f.y-n)}var m=r.position();this.findOne(".top-left").y(m.y),this.findOne(".bottom-right").x(m.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(r.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(r.x());else if("bottom-left"===this._movingAnchorName){if(h){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(f.x-r.x(),2)+Math.pow(r.y()-f.y,2));p=f.x<r.x()?-1:1,v=r.y()<f.y?-1:1;e=i*this.cos*p,n=i*this.sin*v,r.x(f.x-e),r.y(f.y+n)}m=r.position(),this.findOne(".top-left").x(m.x),this.findOne(".bottom-right").y(m.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(r.y());else if("bottom-right"===this._movingAnchorName){if(h){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(r.x()-f.x,2)+Math.pow(r.y()-f.y,2));p=this.findOne(".bottom-right").x()<f.x?-1:1,v=this.findOne(".bottom-right").y()<f.y?-1:1;e=i*this.cos*p,n=i*this.sin*v,this.findOne(".bottom-right").x(f.x+e),this.findOne(".bottom-right").y(f.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));d=this.centeredScaling()||t.altKey;if(d){var g=this.findOne(".top-left"),y=this.findOne(".bottom-right"),b=g.x(),_=g.y(),w=this.getWidth()-y.x(),k=this.getHeight()-y.y();y.move({x:-b,y:-_}),g.move({x:w,y:k})}var S=this.findOne(".top-left").getAbsolutePosition();e=S.x,n=S.y;var x=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),C=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:n,width:x,height:C,rotation:o.getAngle(this.rotation())},t)}else{var D=this._getNodeRect();e=r.x()-D.width/2,n=-r.y()+D.height/2;let i=Math.atan2(-n,e)+Math.PI/2;D.height<0&&(i-=Math.PI);var T=o.getAngle(this.rotation());const a=T+i,s=o.getAngle(this.rotationSnapTolerance()),c=bi(this.rotationSnaps(),a,s),l=c-D.rotation,u=yi(D,l);this._fitNodesInto(u,t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,"undefined"!==typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var e=this.getNode();this._fire("transformend",{evt:t,target:e}),e&&this._nodes.forEach((e=>{e._fire("transformend",{evt:t,target:e})})),this._movingAnchorName=null}}_fitNodesInto(t,e){var n=this._getNodeRect();const i=1;if(C._inRange(t.width,2*-this.padding()-i,i))return void this.update();if(C._inRange(t.height,2*-this.padding()-i,i))return void this.update();const r=this.flipEnabled();var a=new c;if(a.rotate(o.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const e=a.point({x:2*-this.padding(),y:0});if(t.x+=e.x,t.y+=e.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,!r)return void this.update()}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const e=a.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.width+=2*this.padding(),!r)return void this.update()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const e=a.point({x:0,y:2*-this.padding()});if(t.x+=e.x,t.y+=e.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding(),!r)return void this.update()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const e=a.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding(),!r)return void this.update()}if(this.boundBoxFunc()){const e=this.boundBoxFunc()(n,t);e?t=e:C.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new c;l.translate(n.x,n.y),l.rotate(n.rotation),l.scale(n.width/s,n.height/s);const u=new c;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach((t=>{var n;const i=t.getParent().getAbsoluteTransform(),r=t.getTransform().copy();r.translate(t.offsetX(),t.offsetY());const a=new c;a.multiply(i.copy().invert()).multiply(h).multiply(i).multiply(r);const o=a.decompose();t.setAttrs(o),this._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t}),null===(n=t.getLayer())||void 0===n||n.batchDraw()})),this.rotation(C._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){const n=this.findOne(t);n.setAttrs(e)}update(){var t,e=this._getNodeRect();this.rotation(C._getRotation(e.rotation));var n=e.width,i=e.height,r=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),s=this.anchorSize();this.find("._anchor").forEach((t=>{t.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+o,offsetY:s/2+o,visible:a&&r.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:s/2+o,visible:a&&r.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:s/2-o,offsetY:s/2+o,visible:a&&r.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:s/2+o,visible:a&&r.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:i/2,offsetX:s/2-o,visible:a&&r.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:s/2+o,offsetY:s/2-o,visible:a&&r.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:i,offsetY:s/2-o,visible:a&&r.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:i,offsetX:s/2-o,offsetY:s/2-o,visible:a&&r.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*C._sign(i)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(t=this.getLayer())||void 0===t||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),ze.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Dt.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function wi(t){return t instanceof Array||C.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach((function(t){-1===pi.indexOf(t)&&C.warn("Unknown anchor name: "+t+". Available names are: "+pi.join(", "))})),t||[]}_i.prototype.className="Transformer",s(_i),F.addGetterSetter(_i,"enabledAnchors",pi,wi),F.addGetterSetter(_i,"flipEnabled",!0,I()),F.addGetterSetter(_i,"resizeEnabled",!0),F.addGetterSetter(_i,"anchorSize",10,O()),F.addGetterSetter(_i,"rotateEnabled",!0),F.addGetterSetter(_i,"rotationSnaps",[]),F.addGetterSetter(_i,"rotateAnchorOffset",50,O()),F.addGetterSetter(_i,"rotationSnapTolerance",5,O()),F.addGetterSetter(_i,"borderEnabled",!0),F.addGetterSetter(_i,"anchorStroke","rgb(0, 161, 255)"),F.addGetterSetter(_i,"anchorStrokeWidth",1,O()),F.addGetterSetter(_i,"anchorFill","white"),F.addGetterSetter(_i,"anchorCornerRadius",0,O()),F.addGetterSetter(_i,"borderStroke","rgb(0, 161, 255)"),F.addGetterSetter(_i,"borderStrokeWidth",1,O()),F.addGetterSetter(_i,"borderDash"),F.addGetterSetter(_i,"keepRatio",!0),F.addGetterSetter(_i,"centeredScaling",!1),F.addGetterSetter(_i,"ignoreStroke",!1),F.addGetterSetter(_i,"padding",0,O()),F.addGetterSetter(_i,"node"),F.addGetterSetter(_i,"nodes"),F.addGetterSetter(_i,"boundBoxFunc"),F.addGetterSetter(_i,"anchorDragBoundFunc"),F.addGetterSetter(_i,"shouldOverdrawWholeArea",!1),F.addGetterSetter(_i,"useSingleNodeRotation",!0),F.backCompat(_i,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class ki extends Re{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,o.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}function Si(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}ki.prototype.className="Wedge",ki.prototype._centroid=!0,ki.prototype._attrsAffectingSize=["radius"],s(ki),F.addGetterSetter(ki,"radius",0,O()),F.addGetterSetter(ki,"angle",0,O()),F.addGetterSetter(ki,"clockwise",!1),F.backCompat(ki,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var xi=[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],Ci=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Di(t,e){var n,i,r,a,o,s,c,l,u,h,d,f,p,v,m,g,y,b,_,w,k,S,x,C,D=t.data,T=t.width,O=t.height,E=e+e+1,A=T-1,P=O-1,M=e+1,R=M*(M+1)/2,I=new Si,N=null,$=I,L=null,F=null,B=xi[e],j=Ci[e];for(r=1;r<E;r++)$=$.next=new Si,r===M&&(N=$);for($.next=I,c=s=0,i=0;i<O;i++){for(g=y=b=_=l=u=h=d=0,f=M*(w=D[s]),p=M*(k=D[s+1]),v=M*(S=D[s+2]),m=M*(x=D[s+3]),l+=R*w,u+=R*k,h+=R*S,d+=R*x,$=I,r=0;r<M;r++)$.r=w,$.g=k,$.b=S,$.a=x,$=$.next;for(r=1;r<M;r++)a=s+((A<r?A:r)<<2),l+=($.r=w=D[a])*(C=M-r),u+=($.g=k=D[a+1])*C,h+=($.b=S=D[a+2])*C,d+=($.a=x=D[a+3])*C,g+=w,y+=k,b+=S,_+=x,$=$.next;for(L=I,F=N,n=0;n<T;n++)D[s+3]=x=d*B>>j,0!==x?(x=255/x,D[s]=(l*B>>j)*x,D[s+1]=(u*B>>j)*x,D[s+2]=(h*B>>j)*x):D[s]=D[s+1]=D[s+2]=0,l-=f,u-=p,h-=v,d-=m,f-=L.r,p-=L.g,v-=L.b,m-=L.a,a=c+((a=n+e+1)<A?a:A)<<2,g+=L.r=D[a],y+=L.g=D[a+1],b+=L.b=D[a+2],_+=L.a=D[a+3],l+=g,u+=y,h+=b,d+=_,L=L.next,f+=w=F.r,p+=k=F.g,v+=S=F.b,m+=x=F.a,g-=w,y-=k,b-=S,_-=x,F=F.next,s+=4;c+=T}for(n=0;n<T;n++){for(y=b=_=g=u=h=d=l=0,s=n<<2,f=M*(w=D[s]),p=M*(k=D[s+1]),v=M*(S=D[s+2]),m=M*(x=D[s+3]),l+=R*w,u+=R*k,h+=R*S,d+=R*x,$=I,r=0;r<M;r++)$.r=w,$.g=k,$.b=S,$.a=x,$=$.next;for(o=T,r=1;r<=e;r++)s=o+n<<2,l+=($.r=w=D[s])*(C=M-r),u+=($.g=k=D[s+1])*C,h+=($.b=S=D[s+2])*C,d+=($.a=x=D[s+3])*C,g+=w,y+=k,b+=S,_+=x,$=$.next,r<P&&(o+=T);for(s=n,L=I,F=N,i=0;i<O;i++)a=s<<2,D[a+3]=x=d*B>>j,x>0?(x=255/x,D[a]=(l*B>>j)*x,D[a+1]=(u*B>>j)*x,D[a+2]=(h*B>>j)*x):D[a]=D[a+1]=D[a+2]=0,l-=f,u-=p,h-=v,d-=m,f-=L.r,p-=L.g,v-=L.b,m-=L.a,a=n+((a=i+M)<P?a:P)*T<<2,l+=g+=L.r=D[a],u+=y+=L.g=D[a+1],h+=b+=L.b=D[a+2],d+=_+=L.a=D[a+3],L=L.next,f+=w=F.r,p+=k=F.g,v+=S=F.b,m+=x=F.a,g-=w,y-=k,b-=S,_-=x,F=F.next,s+=T}}const Ti=function(t){var e=Math.round(this.blurRadius());e>0&&Di(t,e)};F.addGetterSetter(Dt,"blurRadius",0,O(),F.afterSetFilter);const Oi=function(t){var e,n=255*this.brightness(),i=t.data,r=i.length;for(e=0;e<r;e+=4)i[e]+=n,i[e+1]+=n,i[e+2]+=n};F.addGetterSetter(Dt,"brightness",0,O(),F.afterSetFilter);const Ei=function(t){var e,n=Math.pow((this.contrast()+100)/100,2),i=t.data,r=i.length,a=150,o=150,s=150;for(e=0;e<r;e+=4)a=i[e],o=i[e+1],s=i[e+2],a/=255,a-=.5,a*=n,a+=.5,a*=255,o/=255,o-=.5,o*=n,o+=.5,o*=255,s/=255,s-=.5,s*=n,s+=.5,s*=255,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,s=s<0?0:s>255?255:s,i[e]=a,i[e+1]=o,i[e+2]=s};F.addGetterSetter(Dt,"contrast",0,O(),F.afterSetFilter);const Ai=function(t){var e=10*this.embossStrength(),n=255*this.embossWhiteLevel(),i=this.embossDirection(),r=this.embossBlend(),a=0,o=0,s=t.data,c=t.width,l=t.height,u=4*c,h=l;switch(i){case"top-left":a=-1,o=-1;break;case"top":a=-1,o=0;break;case"top-right":a=-1,o=1;break;case"right":a=0,o=1;break;case"bottom-right":a=1,o=1;break;case"bottom":a=1,o=0;break;case"bottom-left":a=1,o=-1;break;case"left":a=0,o=-1;break;default:C.error("Unknown emboss direction: "+i)}do{var d=(h-1)*u,f=a;h+f<1&&(f=0),h+f>l&&(f=0);var p=(h-1+f)*c*4,v=c;do{var m=d+4*(v-1),g=o;v+g<1&&(g=0),v+g>c&&(g=0);var y=p+4*(v-1+g),b=s[m]-s[y],_=s[m+1]-s[y+1],w=s[m+2]-s[y+2],k=b,S=k>0?k:-k,x=_>0?_:-_,D=w>0?w:-w;if(x>S&&(k=_),D>S&&(k=w),k*=e,r){var T=s[m]+k,O=s[m+1]+k,E=s[m+2]+k;s[m]=T>255?255:T<0?0:T,s[m+1]=O>255?255:O<0?0:O,s[m+2]=E>255?255:E<0?0:E}else{var A=n-k;A<0?A=0:A>255&&(A=255),s[m]=s[m+1]=s[m+2]=A}}while(--v)}while(--h)};function Pi(t,e,n,i,r){var a,o=n-e,s=r-i;return 0===o?i+s/2:0===s?i:(a=(t-e)/o,a=s*a+i,a)}F.addGetterSetter(Dt,"embossStrength",.5,O(),F.afterSetFilter),F.addGetterSetter(Dt,"embossWhiteLevel",.5,O(),F.afterSetFilter),F.addGetterSetter(Dt,"embossDirection","top-left",null,F.afterSetFilter),F.addGetterSetter(Dt,"embossBlend",!1,null,F.afterSetFilter);const Mi=function(t){var e,n,i,r,a=t.data,o=a.length,s=a[0],c=s,l=a[1],u=l,h=a[2],d=h,f=this.enhance();if(0!==f){for(r=0;r<o;r+=4)e=a[r+0],e<s?s=e:e>c&&(c=e),n=a[r+1],n<l?l=n:n>u&&(u=n),i=a[r+2],i<h?h=i:i>d&&(d=i);var p,v,m,g,y,b,_,w,k;for(c===s&&(c=255,s=0),u===l&&(u=255,l=0),d===h&&(d=255,h=0),f>0?(v=c+f*(255-c),m=s-f*(s-0),y=u+f*(255-u),b=l-f*(l-0),w=d+f*(255-d),k=h-f*(h-0)):(p=.5*(c+s),v=c+f*(c-p),m=s+f*(s-p),g=.5*(u+l),y=u+f*(u-g),b=l+f*(l-g),_=.5*(d+h),w=d+f*(d-_),k=h+f*(h-_)),r=0;r<o;r+=4)a[r+0]=Pi(a[r+0],s,c,m,v),a[r+1]=Pi(a[r+1],l,u,b,y),a[r+2]=Pi(a[r+2],h,d,k,w)}};F.addGetterSetter(Dt,"enhance",0,O(),F.afterSetFilter);const Ri=function(t){var e,n,i=t.data,r=i.length;for(e=0;e<r;e+=4)n=.34*i[e]+.5*i[e+1]+.16*i[e+2],i[e]=n,i[e+1]=n,i[e+2]=n};F.addGetterSetter(Dt,"hue",0,O(),F.afterSetFilter),F.addGetterSetter(Dt,"saturation",0,O(),F.afterSetFilter),F.addGetterSetter(Dt,"luminance",0,O(),F.afterSetFilter);const Ii=function(t){var e,n,i,r,a,o=t.data,s=o.length,c=1,l=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,h=127*this.luminance(),d=c*l*Math.cos(u*Math.PI/180),f=c*l*Math.sin(u*Math.PI/180),p=.299*c+.701*d+.167*f,v=.587*c-.587*d+.33*f,m=.114*c-.114*d-.497*f,g=.299*c-.299*d-.328*f,y=.587*c+.413*d+.035*f,b=.114*c-.114*d+.293*f,_=.299*c-.3*d+1.25*f,w=.587*c-.586*d-1.05*f,k=.114*c+.886*d-.2*f;for(e=0;e<s;e+=4)n=o[e+0],i=o[e+1],r=o[e+2],a=o[e+3],o[e+0]=p*n+v*i+m*r+h,o[e+1]=g*n+y*i+b*r+h,o[e+2]=_*n+w*i+k*r+h,o[e+3]=a},Ni=function(t){var e,n,i,r,a,o=t.data,s=o.length,c=Math.pow(2,this.value()),l=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,h=c*l*Math.cos(u*Math.PI/180),d=c*l*Math.sin(u*Math.PI/180),f=.299*c+.701*h+.167*d,p=.587*c-.587*h+.33*d,v=.114*c-.114*h-.497*d,m=.299*c-.299*h-.328*d,g=.587*c+.413*h+.035*d,y=.114*c-.114*h+.293*d,b=.299*c-.3*h+1.25*d,_=.587*c-.586*h-1.05*d,w=.114*c+.886*h-.2*d;for(e=0;e<s;e+=4)n=o[e+0],i=o[e+1],r=o[e+2],a=o[e+3],o[e+0]=f*n+p*i+v*r,o[e+1]=m*n+g*i+y*r,o[e+2]=b*n+_*i+w*r,o[e+3]=a};F.addGetterSetter(Dt,"hue",0,O(),F.afterSetFilter),F.addGetterSetter(Dt,"saturation",0,O(),F.afterSetFilter),F.addGetterSetter(Dt,"value",0,O(),F.afterSetFilter);const $i=function(t){var e,n=t.data,i=n.length;for(e=0;e<i;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2]};var Li=function(t,e,n){var i,r,a,o,s=t.data,c=e.data,l=t.width,u=t.height,h=n.polarCenterX||l/2,d=n.polarCenterY||u/2,f=0,p=0,v=0,m=0,g=Math.sqrt(h*h+d*d);r=l-h,a=u-d,o=Math.sqrt(r*r+a*a),g=o>g?o:g;var y,b,_,w,k=u,S=l,x=360/S*Math.PI/180;for(b=0;b<S;b+=1)for(_=Math.sin(b*x),w=Math.cos(b*x),y=0;y<k;y+=1)r=Math.floor(h+g*y/k*w),a=Math.floor(d+g*y/k*_),i=4*(a*l+r),f=s[i+0],p=s[i+1],v=s[i+2],m=s[i+3],i=4*(b+y*l),c[i+0]=f,c[i+1]=p,c[i+2]=v,c[i+3]=m},Fi=function(t,e,n){var i,r,a,o,s,c,l=t.data,u=e.data,h=t.width,d=t.height,f=n.polarCenterX||h/2,p=n.polarCenterY||d/2,v=0,m=0,g=0,y=0,b=Math.sqrt(f*f+p*p);r=h-f,a=d-p,c=Math.sqrt(r*r+a*a),b=c>b?c:b;var _,w,k,S,x=d,C=h,D=n.polarRotation||0;for(r=0;r<h;r+=1)for(a=0;a<d;a+=1)o=r-f,s=a-p,_=Math.sqrt(o*o+s*s)*x/b,w=(180*Math.atan2(s,o)/Math.PI+360+D)%360,w=w*C/360,k=Math.floor(w),S=Math.floor(_),i=4*(S*h+k),v=l[i+0],m=l[i+1],g=l[i+2],y=l[i+3],i=4*(a*h+r),u[i+0]=v,u[i+1]=m,u[i+2]=g,u[i+3]=y};const Bi=function(t){var e,n,i,r,a,o,s,c,l,u,h=t.width,d=t.height,f=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),v=Math.floor(h*(p%360)/360);if(!(f<1)){var m=C.createCanvasElement();m.width=h,m.height=d;var g=m.getContext("2d").getImageData(0,0,h,d);Li(t,g,{polarCenterX:h/2,polarCenterY:d/2});var y=h/Math.pow(2,f);while(y<=8)y*=2,f-=1;y=Math.ceil(y);var b=y,_=0,w=b,k=1;for(v+y>h&&(_=b,w=0,k=-1),n=0;n<d;n+=1)for(e=_;e!==w;e+=k)i=Math.round(e+v)%h,l=4*(h*n+i),a=g.data[l+0],o=g.data[l+1],s=g.data[l+2],c=g.data[l+3],u=4*(h*n+e),g.data[u+0]=a,g.data[u+1]=o,g.data[u+2]=s,g.data[u+3]=c;for(n=0;n<d;n+=1)for(b=Math.floor(y),r=0;r<f;r+=1){for(e=0;e<b+1;e+=1)l=4*(h*n+e),a=g.data[l+0],o=g.data[l+1],s=g.data[l+2],c=g.data[l+3],u=4*(h*n+2*b-e-1),g.data[u+0]=a,g.data[u+1]=o,g.data[u+2]=s,g.data[u+3]=c;b*=2}Fi(g,t,{polarRotation:0})}};function ji(t,e,n){var i=4*(n*t.width+e),r=[];return r.push(t.data[i++],t.data[i++],t.data[i++],t.data[i++]),r}function zi(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function Hi(t){for(var e=[0,0,0],n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function Vi(t,e){var n=ji(t,0,0),i=ji(t,t.width-1,0),r=ji(t,0,t.height-1),a=ji(t,t.width-1,t.height-1),o=e||10;if(zi(n,i)<o&&zi(i,a)<o&&zi(a,r)<o&&zi(r,n)<o){for(var s=Hi([i,n,a,r]),c=[],l=0;l<t.width*t.height;l++){var u=zi(s,[t.data[4*l],t.data[4*l+1],t.data[4*l+2]]);c[l]=u<o?0:255}return c}}function Gi(t,e){for(var n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}function Wi(t,e,n){for(var i=[1,1,1,1,0,1,1,1,1],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var l=s*e+c,u=0,h=0;h<r;h++)for(var d=0;d<r;d++){var f=s+h-a,p=c+d-a;if(f>=0&&f<n&&p>=0&&p<e){var v=f*e+p,m=i[h*r+d];u+=t[v]*m}}o[l]=2040===u?255:0}return o}function Ui(t,e,n){for(var i=[1,1,1,1,1,1,1,1,1],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var l=s*e+c,u=0,h=0;h<r;h++)for(var d=0;d<r;d++){var f=s+h-a,p=c+d-a;if(f>=0&&f<n&&p>=0&&p<e){var v=f*e+p,m=i[h*r+d];u+=t[v]*m}}o[l]=u>=1020?255:0}return o}function Yi(t,e,n){for(var i=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var l=s*e+c,u=0,h=0;h<r;h++)for(var d=0;d<r;d++){var f=s+h-a,p=c+d-a;if(f>=0&&f<n&&p>=0&&p<e){var v=f*e+p,m=i[h*r+d];u+=t[v]*m}}o[l]=u}return o}F.addGetterSetter(Dt,"kaleidoscopePower",2,O(),F.afterSetFilter),F.addGetterSetter(Dt,"kaleidoscopeAngle",0,O(),F.afterSetFilter);const qi=function(t){var e=this.threshold(),n=Vi(t,e);return n&&(n=Wi(n,t.width,t.height),n=Ui(n,t.width,t.height),n=Yi(n,t.width,t.height),Gi(t,n)),t};F.addGetterSetter(Dt,"threshold",0,O(),F.afterSetFilter);const Xi=function(t){var e,n=255*this.noise(),i=t.data,r=i.length,a=n/2;for(e=0;e<r;e+=4)i[e+0]+=a-2*a*Math.random(),i[e+1]+=a-2*a*Math.random(),i[e+2]+=a-2*a*Math.random()};F.addGetterSetter(Dt,"noise",.2,O(),F.afterSetFilter);const Ki=function(t){var e,n,i,r,a,o,s,c,l,u,h,d,f,p,v=Math.ceil(this.pixelSize()),m=t.width,g=t.height,y=Math.ceil(m/v),b=Math.ceil(g/v),_=t.data;if(v<=0)C.error("pixelSize value can not be <= 0");else for(d=0;d<y;d+=1)for(f=0;f<b;f+=1){for(r=0,a=0,o=0,s=0,c=d*v,l=c+v,u=f*v,h=u+v,p=0,e=c;e<l;e+=1)if(!(e>=m))for(n=u;n<h;n+=1)n>=g||(i=4*(m*n+e),r+=_[i+0],a+=_[i+1],o+=_[i+2],s+=_[i+3],p+=1);for(r/=p,a/=p,o/=p,s/=p,e=c;e<l;e+=1)if(!(e>=m))for(n=u;n<h;n+=1)n>=g||(i=4*(m*n+e),_[i+0]=r,_[i+1]=a,_[i+2]=o,_[i+3]=s)}};F.addGetterSetter(Dt,"pixelSize",8,O(),F.afterSetFilter);const Ji=function(t){var e,n=Math.round(254*this.levels())+1,i=t.data,r=i.length,a=255/n;for(e=0;e<r;e+=1)i[e]=Math.floor(i[e]/a)*a};F.addGetterSetter(Dt,"levels",.5,O(),F.afterSetFilter);const Zi=function(t){var e,n,i=t.data,r=i.length,a=this.red(),o=this.green(),s=this.blue();for(e=0;e<r;e+=4)n=(.34*i[e]+.5*i[e+1]+.16*i[e+2])/255,i[e]=n*a,i[e+1]=n*o,i[e+2]=n*s,i[e+3]=i[e+3]};F.addGetterSetter(Dt,"red",0,(function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)})),F.addGetterSetter(Dt,"green",0,(function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)})),F.addGetterSetter(Dt,"blue",0,T,F.afterSetFilter);const Qi=function(t){var e,n,i=t.data,r=i.length,a=this.red(),o=this.green(),s=this.blue(),c=this.alpha();for(e=0;e<r;e+=4)n=1-c,i[e]=a*c+i[e]*n,i[e+1]=o*c+i[e+1]*n,i[e+2]=s*c+i[e+2]*n};F.addGetterSetter(Dt,"red",0,(function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)})),F.addGetterSetter(Dt,"green",0,(function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)})),F.addGetterSetter(Dt,"blue",0,T,F.afterSetFilter),F.addGetterSetter(Dt,"alpha",1,(function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t}));const tr=function(t){var e,n,i,r,a=t.data,o=a.length;for(e=0;e<o;e+=4)n=a[e+0],i=a[e+1],r=a[e+2],a[e+0]=Math.min(255,.393*n+.769*i+.189*r),a[e+1]=Math.min(255,.349*n+.686*i+.168*r),a[e+2]=Math.min(255,.272*n+.534*i+.131*r)},er=function(t){var e=t.data,n=t.width,i=t.height,r=4*n,a=i;do{var o=(a-1)*r,s=n;do{var c=o+4*(s-1),l=e[c],u=e[c+1],h=e[c+2];l>127&&(l=255-l),u>127&&(u=255-u),h>127&&(h=255-h),e[c]=l,e[c+1]=u,e[c+2]=h}while(--s)}while(--a)},nr=function(t){var e,n=255*this.threshold(),i=t.data,r=i.length;for(e=0;e<r;e+=1)i[e]=i[e]<n?0:255};F.addGetterSetter(Dt,"threshold",.5,O(),F.afterSetFilter);const ir=Qe.Util._assign(Qe,{Arc:tn,Arrow:on,Circle:sn,Ellipse:cn,Image:ln,Label:yn,Tag:bn,Line:rn,Path:an,Rect:_n,RegularPolygon:wn,Ring:Sn,Sprite:xn,Star:Cn,Text:ei,TextPath:oi,Transformer:_i,Wedge:ki,Filters:{Blur:Ti,Brighten:Oi,Contrast:Ei,Emboss:Ai,Enhance:Mi,Grayscale:Ri,HSL:Ii,HSV:Ni,Invert:$i,Kaleidoscope:Bi,Mask:qi,Noise:Xi,Pixelate:Ki,Posterize:Ji,RGB:Zi,RGBA:Qi,Sepia:tr,Solarize:er,Threshold:nr}}),rr=ir}}]);
46
+ function i(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:i});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[i].concat(t.init):i,n.call(this,t)}}function i(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}n.d(e,{Se:()=>N,ZP:()=>X,nv:()=>$,rn:()=>R});var r="undefined"!==typeof window?window:"undefined"!==typeof n.g?n.g:{},a=r.__VUE_DEVTOOLS_GLOBAL_HOOK__;function o(t){a&&(t._devtoolHook=a,a.emit("vuex:init",t),a.on("vuex:travel-to-state",(function(e){t.replaceState(e)})),t.subscribe((function(t,e){a.emit("vuex:mutation",t,e)}),{prepend:!0}),t.subscribeAction((function(t,e){a.emit("vuex:action",t,e)}),{prepend:!0}))}function s(t,e){return t.filter(e)[0]}function c(t,e){if(void 0===e&&(e=[]),null===t||"object"!==typeof t)return t;var n=s(e,(function(e){return e.original===t}));if(n)return n.copy;var i=Array.isArray(t)?[]:{};return e.push({original:t,copy:i}),Object.keys(t).forEach((function(n){i[n]=c(t[n],e)})),i}function l(t,e){Object.keys(t).forEach((function(n){return e(t[n],n)}))}function u(t){return null!==t&&"object"===typeof t}function h(t){return t&&"function"===typeof t.then}function d(t,e){return function(){return t(e)}}var f=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"===typeof n?n():n)||{}},p={namespaced:{configurable:!0}};p.namespaced.get=function(){return!!this._rawModule.namespaced},f.prototype.addChild=function(t,e){this._children[t]=e},f.prototype.removeChild=function(t){delete this._children[t]},f.prototype.getChild=function(t){return this._children[t]},f.prototype.hasChild=function(t){return t in this._children},f.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},f.prototype.forEachChild=function(t){l(this._children,t)},f.prototype.forEachGetter=function(t){this._rawModule.getters&&l(this._rawModule.getters,t)},f.prototype.forEachAction=function(t){this._rawModule.actions&&l(this._rawModule.actions,t)},f.prototype.forEachMutation=function(t){this._rawModule.mutations&&l(this._rawModule.mutations,t)},Object.defineProperties(f.prototype,p);var v=function(t){this.register([],t,!1)};function m(t,e,n){if(e.update(n),n.modules)for(var i in n.modules){if(!e.getChild(i))return void 0;m(t.concat(i),e.getChild(i),n.modules[i])}}v.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},v.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")}),"")},v.prototype.update=function(t){m([],this.root,t)},v.prototype.register=function(t,e,n){var i=this;void 0===n&&(n=!0);var r=new f(e,n);if(0===t.length)this.root=r;else{var a=this.get(t.slice(0,-1));a.addChild(t[t.length-1],r)}e.modules&&l(e.modules,(function(e,r){i.register(t.concat(r),e,n)}))},v.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1],i=e.getChild(n);i&&i.runtime&&e.removeChild(n)},v.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];return!!e&&e.hasChild(n)};var g;var y=function(t){var e=this;void 0===t&&(t={}),!g&&"undefined"!==typeof window&&window.Vue&&M(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var i=t.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new v(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new g,this._makeLocalGettersCache=Object.create(null);var r=this,a=this,s=a.dispatch,c=a.commit;this.dispatch=function(t,e){return s.call(r,t,e)},this.commit=function(t,e,n){return c.call(r,t,e,n)},this.strict=i;var l=this._modules.root.state;S(this,l,[],this._modules.root),k(this,l),n.forEach((function(t){return t(e)}));var u=void 0!==t.devtools?t.devtools:g.config.devtools;u&&o(this)},b={state:{configurable:!0}};function _(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function w(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;S(t,n,[],t._modules.root,!0),k(t,n,e)}function k(t,e,n){var i=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var r=t._wrappedGetters,a={};l(r,(function(e,n){a[n]=d(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})}));var o=g.config.silent;g.config.silent=!0,t._vm=new g({data:{$$state:e},computed:a}),g.config.silent=o,t.strict&&E(t),i&&(n&&t._withCommit((function(){i._data.$$state=null})),g.nextTick((function(){return i.$destroy()})))}function S(t,e,n,i,r){var a=!n.length,o=t._modules.getNamespace(n);if(i.namespaced&&(t._modulesNamespaceMap[o],t._modulesNamespaceMap[o]=i),!a&&!r){var s=A(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit((function(){g.set(s,c,i.state)}))}var l=i.context=x(t,o,n);i.forEachMutation((function(e,n){var i=o+n;D(t,i,e,l)})),i.forEachAction((function(e,n){var i=e.root?n:o+n,r=e.handler||e;T(t,i,r,l)})),i.forEachGetter((function(e,n){var i=o+n;O(t,i,e,l)})),i.forEachChild((function(i,a){S(t,e,n.concat(a),i,r)}))}function x(t,e,n){var i=""===e,r={dispatch:i?t.dispatch:function(n,i,r){var a=P(n,i,r),o=a.payload,s=a.options,c=a.type;return s&&s.root||(c=e+c),t.dispatch(c,o)},commit:i?t.commit:function(n,i,r){var a=P(n,i,r),o=a.payload,s=a.options,c=a.type;s&&s.root||(c=e+c),t.commit(c,o,s)}};return Object.defineProperties(r,{getters:{get:i?function(){return t.getters}:function(){return C(t,e)}},state:{get:function(){return A(t.state,n)}}}),r}function C(t,e){if(!t._makeLocalGettersCache[e]){var n={},i=e.length;Object.keys(t.getters).forEach((function(r){if(r.slice(0,i)===e){var a=r.slice(i);Object.defineProperty(n,a,{get:function(){return t.getters[r]},enumerable:!0})}})),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function D(t,e,n,i){var r=t._mutations[e]||(t._mutations[e]=[]);r.push((function(e){n.call(t,i.state,e)}))}function T(t,e,n,i){var r=t._actions[e]||(t._actions[e]=[]);r.push((function(e){var r=n.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e);return h(r)||(r=Promise.resolve(r)),t._devtoolHook?r.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):r}))}function O(t,e,n,i){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(i.state,i.getters,t.state,t.getters)})}function E(t){t._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function A(t,e){return e.reduce((function(t,e){return t[e]}),t)}function P(t,e,n){return u(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function M(t){g&&t===g||(g=t,i(g))}b.state.get=function(){return this._vm._data.$$state},b.state.set=function(t){0},y.prototype.commit=function(t,e,n){var i=this,r=P(t,e,n),a=r.type,o=r.payload,s=(r.options,{type:a,payload:o}),c=this._mutations[a];c&&(this._withCommit((function(){c.forEach((function(t){t(o)}))})),this._subscribers.slice().forEach((function(t){return t(s,i.state)})))},y.prototype.dispatch=function(t,e){var n=this,i=P(t,e),r=i.type,a=i.payload,o={type:r,payload:a},s=this._actions[r];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(o,n.state)}))}catch(l){0}var c=s.length>1?Promise.all(s.map((function(t){return t(a)}))):s[0](a);return new Promise((function(t,e){c.then((function(e){try{n._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(o,n.state)}))}catch(l){0}t(e)}),(function(t){try{n._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(o,n.state,t)}))}catch(l){0}e(t)}))}))}},y.prototype.subscribe=function(t,e){return _(t,this._subscribers,e)},y.prototype.subscribeAction=function(t,e){var n="function"===typeof t?{before:t}:t;return _(n,this._actionSubscribers,e)},y.prototype.watch=function(t,e,n){var i=this;return this._watcherVM.$watch((function(){return t(i.state,i.getters)}),e,n)},y.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},y.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),S(this,this.state,t,this._modules.get(t),n.preserveState),k(this,this.state)},y.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var n=A(e.state,t.slice(0,-1));g.delete(n,t[t.length-1])})),w(this)},y.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},y.prototype.hotUpdate=function(t){this._modules.update(t),w(this,!0)},y.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(y.prototype,b);var R=j((function(t,e){var n={};return F(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var i=z(this.$store,"mapState",t);if(!i)return;e=i.context.state,n=i.context.getters}return"function"===typeof r?r.call(this,e,n):e[r]},n[i].vuex=!0})),n})),I=j((function(t,e){var n={};return F(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var i=this.$store.commit;if(t){var a=z(this.$store,"mapMutations",t);if(!a)return;i=a.context.commit}return"function"===typeof r?r.apply(this,[i].concat(e)):i.apply(this.$store,[r].concat(e))}})),n})),N=j((function(t,e){var n={};return F(e).forEach((function(e){var i=e.key,r=e.val;r=t+r,n[i]=function(){if(!t||z(this.$store,"mapGetters",t))return this.$store.getters[r]},n[i].vuex=!0})),n})),$=j((function(t,e){var n={};return F(e).forEach((function(e){var i=e.key,r=e.val;n[i]=function(){var e=[],n=arguments.length;while(n--)e[n]=arguments[n];var i=this.$store.dispatch;if(t){var a=z(this.$store,"mapActions",t);if(!a)return;i=a.context.dispatch}return"function"===typeof r?r.apply(this,[i].concat(e)):i.apply(this.$store,[r].concat(e))}})),n})),L=function(t){return{mapState:R.bind(null,t),mapGetters:N.bind(null,t),mapMutations:I.bind(null,t),mapActions:$.bind(null,t)}};function F(t){return B(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function B(t){return Array.isArray(t)||u(t)}function j(t){return function(e,n){return"string"!==typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function z(t,e,n){var i=t._modulesNamespaceMap[n];return i}function H(t){void 0===t&&(t={});var e=t.collapsed;void 0===e&&(e=!0);var n=t.filter;void 0===n&&(n=function(t,e,n){return!0});var i=t.transformer;void 0===i&&(i=function(t){return t});var r=t.mutationTransformer;void 0===r&&(r=function(t){return t});var a=t.actionFilter;void 0===a&&(a=function(t,e){return!0});var o=t.actionTransformer;void 0===o&&(o=function(t){return t});var s=t.logMutations;void 0===s&&(s=!0);var l=t.logActions;void 0===l&&(l=!0);var u=t.logger;return void 0===u&&(u=console),function(t){var h=c(t.state);"undefined"!==typeof u&&(s&&t.subscribe((function(t,a){var o=c(a);if(n(t,h,o)){var s=W(),l=r(t),d="mutation "+t.type+s;V(u,d,e),u.log("%c prev state","color: #9E9E9E; font-weight: bold",i(h)),u.log("%c mutation","color: #03A9F4; font-weight: bold",l),u.log("%c next state","color: #4CAF50; font-weight: bold",i(o)),G(u)}h=o})),l&&t.subscribeAction((function(t,n){if(a(t,n)){var i=W(),r=o(t),s="action "+t.type+i;V(u,s,e),u.log("%c action","color: #03A9F4; font-weight: bold",r),G(u)}})))}}function V(t,e,n){var i=n?t.groupCollapsed:t.group;try{i.call(t,e)}catch(r){t.log(e)}}function G(t){try{t.groupEnd()}catch(e){t.log("—— log end ——")}}function W(){var t=new Date;return" @ "+Y(t.getHours(),2)+":"+Y(t.getMinutes(),2)+":"+Y(t.getSeconds(),2)+"."+Y(t.getMilliseconds(),3)}function U(t,e){return new Array(e+1).join(t)}function Y(t,e){return U("0",e-t.toString().length)+t}var q={Store:y,install:M,version:"3.6.2",mapState:R,mapMutations:I,mapGetters:N,mapActions:$,createNamespacedHelpers:L,createLogger:H};const X=q},636:(t,e,n)=>{"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function c(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){return f(t)||v(t,e)||m(t,e)||b()}function h(t){return d(t)||p(t)||m(t)||y()}function d(t){if(Array.isArray(t))return g(t)}function f(t){if(Array.isArray(t))return t}function p(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function v(t,e){var n=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,r,a=[],o=!0,s=!1;try{for(n=n.call(t);!(o=(i=n.next()).done);o=!0)if(a.push(i.value),e&&a.length===e)break}catch(c){s=!0,r=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(s)throw r}}return a}}function m(t,e){if(t){if("string"===typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(e,{Qc:()=>hi,fL:()=>fi,qv:()=>di,vI:()=>ui,vc:()=>li});var _=function(){},w={},k={},S=null,x={mark:_,measure:_};try{"undefined"!==typeof window&&(w=window),"undefined"!==typeof document&&(k=document),"undefined"!==typeof MutationObserver&&(S=MutationObserver),"undefined"!==typeof performance&&(x=performance)}catch(pi){}var C,D,T,O,E,A=w.navigator||{},P=A.userAgent,M=void 0===P?"":P,R=w,I=k,N=S,$=x,L=(R.document,!!I.documentElement&&!!I.head&&"function"===typeof I.addEventListener&&"function"===typeof I.createElement),F=~M.indexOf("MSIE")||~M.indexOf("Trident/"),B="___FONT_AWESOME___",j=16,z="fa",H="svg-inline--fa",V="data-fa-i2svg",G="data-fa-pseudo-element",W="data-fa-pseudo-element-pending",U="data-prefix",Y="data-icon",q="fontawesome-i2svg",X="async",K=["HTML","HEAD","STYLE","SCRIPT"],J=function(){try{return!0}catch(pi){return!1}}(),Z="classic",Q="sharp",tt=[Z,Q];function et(t){return new Proxy(t,{get:function(t,e){return e in t?t[e]:t[Z]}})}var nt=et((C={},l(C,Z,{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fad:"duotone","fa-duotone":"duotone",fab:"brands","fa-brands":"brands",fak:"kit","fa-kit":"kit"}),l(C,Q,{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular"}),C)),it=et((D={},l(D,Z,{solid:"fas",regular:"far",light:"fal",thin:"fat",duotone:"fad",brands:"fab",kit:"fak"}),l(D,Q,{solid:"fass",regular:"fasr"}),D)),rt=et((T={},l(T,Z,{fab:"fa-brands",fad:"fa-duotone",fak:"fa-kit",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"}),l(T,Q,{fass:"fa-solid",fasr:"fa-regular"}),T)),at=et((O={},l(O,Z,{"fa-brands":"fab","fa-duotone":"fad","fa-kit":"fak","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"}),l(O,Q,{"fa-solid":"fass","fa-regular":"fasr"}),O)),ot=/fa(s|r|l|t|d|b|k|ss|sr)?[\-\ ]/,st="fa-layers-text",ct=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i,lt=et((E={},l(E,Z,{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"}),l(E,Q,{900:"fass",400:"fasr"}),E)),ut=[1,2,3,4,5,6,7,8,9,10],ht=ut.concat([11,12,13,14,15,16,17,18,19,20]),dt=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],ft={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},pt=new Set;Object.keys(it[Z]).map(pt.add.bind(pt)),Object.keys(it[Q]).map(pt.add.bind(pt));var vt=[].concat(tt,h(pt),["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",ft.GROUP,ft.SWAP_OPACITY,ft.PRIMARY,ft.SECONDARY]).concat(ut.map((function(t){return"".concat(t,"x")}))).concat(ht.map((function(t){return"w-".concat(t)}))),mt=R.FontAwesomeConfig||{};function gt(t){var e=I.querySelector("script["+t+"]");if(e)return e.getAttribute(t)}function yt(t){return""===t||"false"!==t&&("true"===t||t)}if(I&&"function"===typeof I.querySelector){var bt=[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];bt.forEach((function(t){var e=u(t,2),n=e[0],i=e[1],r=yt(gt(n));void 0!==r&&null!==r&&(mt[i]=r)}))}var _t={styleDefault:"solid",familyDefault:"classic",cssPrefix:z,replacementClass:H,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};mt.familyPrefix&&(mt.cssPrefix=mt.familyPrefix);var wt=r(r({},_t),mt);wt.autoReplaceSvg||(wt.observeMutations=!1);var kt={};Object.keys(_t).forEach((function(t){Object.defineProperty(kt,t,{enumerable:!0,set:function(e){wt[t]=e,St.forEach((function(t){return t(kt)}))},get:function(){return wt[t]}})})),Object.defineProperty(kt,"familyPrefix",{enumerable:!0,set:function(t){wt.cssPrefix=t,St.forEach((function(t){return t(kt)}))},get:function(){return wt.cssPrefix}}),R.FontAwesomeConfig=kt;var St=[];function xt(t){return St.push(t),function(){St.splice(St.indexOf(t),1)}}var Ct=j,Dt={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Tt(t){if(t&&L){var e=I.createElement("style");e.setAttribute("type","text/css"),e.innerHTML=t;for(var n=I.head.childNodes,i=null,r=n.length-1;r>-1;r--){var a=n[r],o=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(i=a)}return I.head.insertBefore(e,i),t}}var Ot="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Et(){var t=12,e="";while(t-- >0)e+=Ot[62*Math.random()|0];return e}function At(t){for(var e=[],n=(t||[]).length>>>0;n--;)e[n]=t[n];return e}function Pt(t){return t.classList?At(t.classList):(t.getAttribute("class")||"").split(" ").filter((function(t){return t}))}function Mt(t){return"".concat(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Rt(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,'="').concat(Mt(t[n]),'" ')}),"").trim()}function It(t){return Object.keys(t||{}).reduce((function(e,n){return e+"".concat(n,": ").concat(t[n].trim(),";")}),"")}function Nt(t){return t.size!==Dt.size||t.x!==Dt.x||t.y!==Dt.y||t.rotate!==Dt.rotate||t.flipX||t.flipY}function $t(t){var e=t.transform,n=t.containerWidth,i=t.iconWidth,r={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(32*e.x,", ").concat(32*e.y,") "),o="scale(".concat(e.size/16*(e.flipX?-1:1),", ").concat(e.size/16*(e.flipY?-1:1),") "),s="rotate(".concat(e.rotate," 0 0)"),c={transform:"".concat(a," ").concat(o," ").concat(s)},l={transform:"translate(".concat(i/2*-1," -256)")};return{outer:r,inner:c,path:l}}function Lt(t){var e=t.transform,n=t.width,i=void 0===n?j:n,r=t.height,a=void 0===r?j:r,o=t.startCentered,s=void 0!==o&&o,c="";return c+=s&&F?"translate(".concat(e.x/Ct-i/2,"em, ").concat(e.y/Ct-a/2,"em) "):s?"translate(calc(-50% + ".concat(e.x/Ct,"em), calc(-50% + ").concat(e.y/Ct,"em)) "):"translate(".concat(e.x/Ct,"em, ").concat(e.y/Ct,"em) "),c+="scale(".concat(e.size/Ct*(e.flipX?-1:1),", ").concat(e.size/Ct*(e.flipY?-1:1),") "),c+="rotate(".concat(e.rotate,"deg) "),c}var Ft=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse,\n.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}';function Bt(){var t=z,e=H,n=kt.cssPrefix,i=kt.replacementClass,r=Ft;if(n!==t||i!==e){var a=new RegExp("\\.".concat(t,"\\-"),"g"),o=new RegExp("\\--".concat(t,"\\-"),"g"),s=new RegExp("\\.".concat(e),"g");r=r.replace(a,".".concat(n,"-")).replace(o,"--".concat(n,"-")).replace(s,".".concat(i))}return r}var jt=!1;function zt(){kt.autoAddCss&&!jt&&(Tt(Bt()),jt=!0)}var Ht={mixout:function(){return{dom:{css:Bt,insertCss:zt}}},hooks:function(){return{beforeDOMElementCreation:function(){zt()},beforeI2svg:function(){zt()}}}},Vt=R||{};Vt[B]||(Vt[B]={}),Vt[B].styles||(Vt[B].styles={}),Vt[B].hooks||(Vt[B].hooks={}),Vt[B].shims||(Vt[B].shims=[]);var Gt=Vt[B],Wt=[],Ut=function t(){I.removeEventListener("DOMContentLoaded",t),Yt=1,Wt.map((function(t){return t()}))},Yt=!1;function qt(t){L&&(Yt?setTimeout(t,0):Wt.push(t))}function Xt(t){var e=t.tag,n=t.attributes,i=void 0===n?{}:n,r=t.children,a=void 0===r?[]:r;return"string"===typeof t?Mt(t):"<".concat(e," ").concat(Rt(i),">").concat(a.map(Xt).join(""),"</").concat(e,">")}function Kt(t,e,n){if(t&&t[e]&&t[e][n])return{prefix:e,iconName:n,icon:t[e][n]}}L&&(Yt=(I.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(I.readyState),Yt||I.addEventListener("DOMContentLoaded",Ut));var Jt=function(t,e){return function(n,i,r,a){return t.call(e,n,i,r,a)}},Zt=function(t,e,n,i){var r,a,o,s=Object.keys(t),c=s.length,l=void 0!==i?Jt(e,i):e;for(void 0===n?(r=1,o=t[s[0]]):(r=0,o=n);r<c;r++)a=s[r],o=l(o,t[a],a,t);return o};function Qt(t){var e=[],n=0,i=t.length;while(n<i){var r=t.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){var a=t.charCodeAt(n++);56320==(64512&a)?e.push(((1023&r)<<10)+(1023&a)+65536):(e.push(r),n--)}else e.push(r)}return e}function te(t){var e=Qt(t);return 1===e.length?e[0].toString(16):null}function ee(t,e){var n,i=t.length,r=t.charCodeAt(e);return r>=55296&&r<=56319&&i>e+1&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?1024*(r-55296)+n-56320+65536:r}function ne(t){return Object.keys(t).reduce((function(e,n){var i=t[n],r=!!i.icon;return r?e[i.iconName]=i.icon:e[n]=i,e}),{})}function ie(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.skipHooks,a=void 0!==i&&i,o=ne(e);"function"!==typeof Gt.hooks.addPack||a?Gt.styles[t]=r(r({},Gt.styles[t]||{}),o):Gt.hooks.addPack(t,ne(e)),"fas"===t&&ie("fa",e)}var re,ae,oe,se=Gt.styles,ce=Gt.shims,le=(re={},l(re,Z,Object.values(rt[Z])),l(re,Q,Object.values(rt[Q])),re),ue=null,he={},de={},fe={},pe={},ve={},me=(ae={},l(ae,Z,Object.keys(nt[Z])),l(ae,Q,Object.keys(nt[Q])),ae);function ge(t){return~vt.indexOf(t)}function ye(t,e){var n=e.split("-"),i=n[0],r=n.slice(1).join("-");return i!==t||""===r||ge(r)?null:r}var be=function(){var t=function(t){return Zt(se,(function(e,n,i){return e[i]=Zt(n,t,{}),e}),{})};he=t((function(t,e,n){if(e[3]&&(t[e[3]]=n),e[2]){var i=e[2].filter((function(t){return"number"===typeof t}));i.forEach((function(e){t[e.toString(16)]=n}))}return t})),de=t((function(t,e,n){if(t[n]=n,e[2]){var i=e[2].filter((function(t){return"string"===typeof t}));i.forEach((function(e){t[e]=n}))}return t})),ve=t((function(t,e,n){var i=e[2];return t[n]=n,i.forEach((function(e){t[e]=n})),t}));var e="far"in se||kt.autoFetchSvg,n=Zt(ce,(function(t,n){var i=n[0],r=n[1],a=n[2];return"far"!==r||e||(r="fas"),"string"===typeof i&&(t.names[i]={prefix:r,iconName:a}),"number"===typeof i&&(t.unicodes[i.toString(16)]={prefix:r,iconName:a}),t}),{names:{},unicodes:{}});fe=n.names,pe=n.unicodes,ue=Te(kt.styleDefault,{family:kt.familyDefault})};function _e(t,e){return(he[t]||{})[e]}function we(t,e){return(de[t]||{})[e]}function ke(t,e){return(ve[t]||{})[e]}function Se(t){return fe[t]||{prefix:null,iconName:null}}function xe(t){var e=pe[t],n=_e("fas",t);return e||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function Ce(){return ue}xt((function(t){ue=Te(t.styleDefault,{family:kt.familyDefault})})),be();var De=function(){return{prefix:null,iconName:null,rest:[]}};function Te(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.family,i=void 0===n?Z:n,r=nt[i][t],a=it[i][t]||it[i][r],o=t in Gt.styles?t:null;return a||o||null}var Oe=(oe={},l(oe,Z,Object.keys(rt[Z])),l(oe,Q,Object.keys(rt[Q])),oe);function Ee(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.skipLookups,r=void 0!==i&&i,a=(e={},l(e,Z,"".concat(kt.cssPrefix,"-").concat(Z)),l(e,Q,"".concat(kt.cssPrefix,"-").concat(Q)),e),o=null,s=Z;(t.includes(a[Z])||t.some((function(t){return Oe[Z].includes(t)})))&&(s=Z),(t.includes(a[Q])||t.some((function(t){return Oe[Q].includes(t)})))&&(s=Q);var c=t.reduce((function(t,e){var n=ye(kt.cssPrefix,e);if(se[e]?(e=le[s].includes(e)?at[s][e]:e,o=e,t.prefix=e):me[s].indexOf(e)>-1?(o=e,t.prefix=Te(e,{family:s})):n?t.iconName=n:e!==kt.replacementClass&&e!==a[Z]&&e!==a[Q]&&t.rest.push(e),!r&&t.prefix&&t.iconName){var i="fa"===o?Se(t.iconName):{},c=ke(t.prefix,t.iconName);i.prefix&&(o=null),t.iconName=i.iconName||c||t.iconName,t.prefix=i.prefix||t.prefix,"far"!==t.prefix||se["far"]||!se["fas"]||kt.autoFetchSvg||(t.prefix="fas")}return t}),De());return(t.includes("fa-brands")||t.includes("fab"))&&(c.prefix="fab"),(t.includes("fa-duotone")||t.includes("fad"))&&(c.prefix="fad"),c.prefix||s!==Q||!se["fass"]&&!kt.autoFetchSvg||(c.prefix="fass",c.iconName=ke(c.prefix,c.iconName)||c.iconName),"fa"!==c.prefix&&"fa"!==o||(c.prefix=Ce()||"fas"),c}var Ae=function(){function t(){o(this,t),this.definitions={}}return c(t,[{key:"add",value:function(){for(var t=this,e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var a=n.reduce(this._pullDefinitions,{});Object.keys(a).forEach((function(e){t.definitions[e]=r(r({},t.definitions[e]||{}),a[e]),ie(e,a[e]);var n=rt[Z][e];n&&ie(n,a[e]),be()}))}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(t,e){var n=e.prefix&&e.iconName&&e.icon?{0:e}:e;return Object.keys(n).map((function(e){var i=n[e],r=i.prefix,a=i.iconName,o=i.icon,s=o[2];t[r]||(t[r]={}),s.length>0&&s.forEach((function(e){"string"===typeof e&&(t[r][e]=o)})),t[r][a]=o})),t}}]),t}(),Pe=[],Me={},Re={},Ie=Object.keys(Re);function Ne(t,e){var n=e.mixoutsTo;return Pe=t,Me={},Object.keys(Re).forEach((function(t){-1===Ie.indexOf(t)&&delete Re[t]})),Pe.forEach((function(t){var e=t.mixout?t.mixout():{};if(Object.keys(e).forEach((function(t){"function"===typeof e[t]&&(n[t]=e[t]),"object"===a(e[t])&&Object.keys(e[t]).forEach((function(i){n[t]||(n[t]={}),n[t][i]=e[t][i]}))})),t.hooks){var i=t.hooks();Object.keys(i).forEach((function(t){Me[t]||(Me[t]=[]),Me[t].push(i[t])}))}t.provides&&t.provides(Re)})),n}function $e(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];var a=Me[t]||[];return a.forEach((function(t){e=t.apply(null,[e].concat(i))})),e}function Le(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=Me[t]||[];r.forEach((function(t){t.apply(null,n)}))}function Fe(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);return Re[t]?Re[t].apply(null,e):void 0}function Be(t){"fa"===t.prefix&&(t.prefix="fas");var e=t.iconName,n=t.prefix||Ce();if(e)return e=ke(n,e)||e,Kt(je.definitions,n,e)||Kt(Gt.styles,n,e)}var je=new Ae,ze=function(){kt.autoReplaceSvg=!1,kt.observeMutations=!1,Le("noAuto")},He={i2svg:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return L?(Le("beforeI2svg",t),Fe("pseudoElements2svg",t),Fe("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.autoReplaceSvgRoot;!1===kt.autoReplaceSvg&&(kt.autoReplaceSvg=!0),kt.observeMutations=!0,qt((function(){We({autoReplaceSvgRoot:e}),Le("watch",t)}))}},Ve={icon:function(t){if(null===t)return null;if("object"===a(t)&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:ke(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&2===t.length){var e=0===t[1].indexOf("fa-")?t[1].slice(3):t[1],n=Te(t[0]);return{prefix:n,iconName:ke(n,e)||e}}if("string"===typeof t&&(t.indexOf("".concat(kt.cssPrefix,"-"))>-1||t.match(ot))){var i=Ee(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||Ce(),iconName:ke(i.prefix,i.iconName)||i.iconName}}if("string"===typeof t){var r=Ce();return{prefix:r,iconName:ke(r,t)||t}}}},Ge={noAuto:ze,config:kt,dom:He,parse:Ve,library:je,findIconDefinition:Be,toHtml:Xt},We=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.autoReplaceSvgRoot,n=void 0===e?I:e;(Object.keys(Gt.styles).length>0||kt.autoFetchSvg)&&L&&kt.autoReplaceSvg&&Ge.dom.i2svg({node:n})};function Ue(t,e){return Object.defineProperty(t,"abstract",{get:e}),Object.defineProperty(t,"html",{get:function(){return t.abstract.map((function(t){return Xt(t)}))}}),Object.defineProperty(t,"node",{get:function(){if(L){var e=I.createElement("div");return e.innerHTML=t.html,e.children}}}),t}function Ye(t){var e=t.children,n=t.main,i=t.mask,a=t.attributes,o=t.styles,s=t.transform;if(Nt(s)&&n.found&&!i.found){var c=n.width,l=n.height,u={x:c/l/2,y:.5};a["style"]=It(r(r({},o),{},{"transform-origin":"".concat(u.x+s.x/16,"em ").concat(u.y+s.y/16,"em")}))}return[{tag:"svg",attributes:a,children:e}]}function qe(t){var e=t.prefix,n=t.iconName,i=t.children,a=t.attributes,o=t.symbol,s=!0===o?"".concat(e,"-").concat(kt.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:r(r({},a),{},{id:s}),children:i}]}]}function Xe(t){var e=t.icons,n=e.main,i=e.mask,a=t.prefix,o=t.iconName,s=t.transform,c=t.symbol,l=t.title,u=t.maskId,h=t.titleId,d=t.extra,f=t.watchable,p=void 0!==f&&f,v=i.found?i:n,m=v.width,g=v.height,y="fak"===a,b=[kt.replacementClass,o?"".concat(kt.cssPrefix,"-").concat(o):""].filter((function(t){return-1===d.classes.indexOf(t)})).filter((function(t){return""!==t||!!t})).concat(d.classes).join(" "),_={children:[],attributes:r(r({},d.attributes),{},{"data-prefix":a,"data-icon":o,class:b,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(m," ").concat(g)})},w=y&&!~d.classes.indexOf("fa-fw")?{width:"".concat(m/g*16*.0625,"em")}:{};p&&(_.attributes[V]=""),l&&(_.children.push({tag:"title",attributes:{id:_.attributes["aria-labelledby"]||"title-".concat(h||Et())},children:[l]}),delete _.attributes.title);var k=r(r({},_),{},{prefix:a,iconName:o,main:n,mask:i,maskId:u,transform:s,symbol:c,styles:r(r({},w),d.styles)}),S=i.found&&n.found?Fe("generateAbstractMask",k)||{children:[],attributes:{}}:Fe("generateAbstractIcon",k)||{children:[],attributes:{}},x=S.children,C=S.attributes;return k.children=x,k.attributes=C,c?qe(k):Ye(k)}function Ke(t){var e=t.content,n=t.width,i=t.height,a=t.transform,o=t.title,s=t.extra,c=t.watchable,l=void 0!==c&&c,u=r(r(r({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});l&&(u[V]="");var h=r({},s.styles);Nt(a)&&(h["transform"]=Lt({transform:a,startCentered:!0,width:n,height:i}),h["-webkit-transform"]=h["transform"]);var d=It(h);d.length>0&&(u["style"]=d);var f=[];return f.push({tag:"span",attributes:u,children:[e]}),o&&f.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),f}function Je(t){var e=t.content,n=t.title,i=t.extra,a=r(r(r({},i.attributes),n?{title:n}:{}),{},{class:i.classes.join(" ")}),o=It(i.styles);o.length>0&&(a["style"]=o);var s=[];return s.push({tag:"span",attributes:a,children:[e]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var Ze=Gt.styles;function Qe(t){var e=t[0],n=t[1],i=t.slice(4),r=u(i,1),a=r[0],o=null;return o=Array.isArray(a)?{tag:"g",attributes:{class:"".concat(kt.cssPrefix,"-").concat(ft.GROUP)},children:[{tag:"path",attributes:{class:"".concat(kt.cssPrefix,"-").concat(ft.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(kt.cssPrefix,"-").concat(ft.PRIMARY),fill:"currentColor",d:a[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:a}},{found:!0,width:e,height:n,icon:o}}var tn={found:!1,width:512,height:512};function en(t,e){J||kt.showMissingIcons||!t||console.error('Icon with name "'.concat(t,'" and prefix "').concat(e,'" is missing.'))}function nn(t,e){var n=e;return"fa"===e&&null!==kt.styleDefault&&(e=Ce()),new Promise((function(i,a){Fe("missingIconAbstract");if("fa"===n){var o=Se(t)||{};t=o.iconName||t,e=o.prefix||e}if(t&&e&&Ze[e]&&Ze[e][t]){var s=Ze[e][t];return i(Qe(s))}en(t,e),i(r(r({},tn),{},{icon:kt.showMissingIcons&&t&&Fe("missingIconAbstract")||{}}))}))}var rn=function(){},an=kt.measurePerformance&&$&&$.mark&&$.measure?$:{mark:rn,measure:rn},on='FA "6.3.0"',sn=function(t){return an.mark("".concat(on," ").concat(t," begins")),function(){return cn(t)}},cn=function(t){an.mark("".concat(on," ").concat(t," ends")),an.measure("".concat(on," ").concat(t),"".concat(on," ").concat(t," begins"),"".concat(on," ").concat(t," ends"))},ln={begin:sn,end:cn},un=function(){};function hn(t){var e=t.getAttribute?t.getAttribute(V):null;return"string"===typeof e}function dn(t){var e=t.getAttribute?t.getAttribute(U):null,n=t.getAttribute?t.getAttribute(Y):null;return e&&n}function fn(t){return t&&t.classList&&t.classList.contains&&t.classList.contains(kt.replacementClass)}function pn(){if(!0===kt.autoReplaceSvg)return bn.replace;var t=bn[kt.autoReplaceSvg];return t||bn.replace}function vn(t){return I.createElementNS("http://www.w3.org/2000/svg",t)}function mn(t){return I.createElement(t)}function gn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.ceFn,i=void 0===n?"svg"===t.tag?vn:mn:n;if("string"===typeof t)return I.createTextNode(t);var r=i(t.tag);Object.keys(t.attributes||[]).forEach((function(e){r.setAttribute(e,t.attributes[e])}));var a=t.children||[];return a.forEach((function(t){r.appendChild(gn(t,{ceFn:i}))})),r}function yn(t){var e=" ".concat(t.outerHTML," ");return e="".concat(e,"Font Awesome fontawesome.com "),e}var bn={replace:function(t){var e=t[0];if(e.parentNode)if(t[1].forEach((function(t){e.parentNode.insertBefore(gn(t),e)})),null===e.getAttribute(V)&&kt.keepOriginalSource){var n=I.createComment(yn(e));e.parentNode.replaceChild(n,e)}else e.remove()},nest:function(t){var e=t[0],n=t[1];if(~Pt(e).indexOf(kt.replacementClass))return bn.replace(t);var i=new RegExp("".concat(kt.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var r=n[0].attributes.class.split(" ").reduce((function(t,e){return e===kt.replacementClass||e.match(i)?t.toSvg.push(e):t.toNode.push(e),t}),{toNode:[],toSvg:[]});n[0].attributes.class=r.toSvg.join(" "),0===r.toNode.length?e.removeAttribute("class"):e.setAttribute("class",r.toNode.join(" "))}var a=n.map((function(t){return Xt(t)})).join("\n");e.setAttribute(V,""),e.innerHTML=a}};function _n(t){t()}function wn(t,e){var n="function"===typeof e?e:un;if(0===t.length)n();else{var i=_n;kt.mutateApproach===X&&(i=R.requestAnimationFrame||_n),i((function(){var e=pn(),i=ln.begin("mutate");t.map(e),i(),n()}))}}var kn=!1;function Sn(){kn=!0}function xn(){kn=!1}var Cn=null;function Dn(t){if(N&&kt.observeMutations){var e=t.treeCallback,n=void 0===e?un:e,i=t.nodeCallback,r=void 0===i?un:i,a=t.pseudoElementsCallback,o=void 0===a?un:a,s=t.observeMutationsRoot,c=void 0===s?I:s;Cn=new N((function(t){if(!kn){var e=Ce();At(t).forEach((function(t){if("childList"===t.type&&t.addedNodes.length>0&&!hn(t.addedNodes[0])&&(kt.searchPseudoElements&&o(t.target),n(t.target)),"attributes"===t.type&&t.target.parentNode&&kt.searchPseudoElements&&o(t.target.parentNode),"attributes"===t.type&&hn(t.target)&&~dt.indexOf(t.attributeName))if("class"===t.attributeName&&dn(t.target)){var i=Ee(Pt(t.target)),a=i.prefix,s=i.iconName;t.target.setAttribute(U,a||e),s&&t.target.setAttribute(Y,s)}else fn(t.target)&&r(t.target)}))}})),L&&Cn.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Tn(){Cn&&Cn.disconnect()}function On(t){var e=t.getAttribute("style"),n=[];return e&&(n=e.split(";").reduce((function(t,e){var n=e.split(":"),i=n[0],r=n.slice(1);return i&&r.length>0&&(t[i]=r.join(":").trim()),t}),{})),n}function En(t){var e=t.getAttribute("data-prefix"),n=t.getAttribute("data-icon"),i=void 0!==t.innerText?t.innerText.trim():"",r=Ee(Pt(t));return r.prefix||(r.prefix=Ce()),e&&n&&(r.prefix=e,r.iconName=n),r.iconName&&r.prefix||(r.prefix&&i.length>0&&(r.iconName=we(r.prefix,t.innerText)||_e(r.prefix,te(t.innerText))),!r.iconName&&kt.autoFetchSvg&&t.firstChild&&t.firstChild.nodeType===Node.TEXT_NODE&&(r.iconName=t.firstChild.data)),r}function An(t){var e=At(t.attributes).reduce((function(t,e){return"class"!==t.name&&"style"!==t.name&&(t[e.name]=e.value),t}),{}),n=t.getAttribute("title"),i=t.getAttribute("data-fa-title-id");return kt.autoA11y&&(n?e["aria-labelledby"]="".concat(kt.replacementClass,"-title-").concat(i||Et()):(e["aria-hidden"]="true",e["focusable"]="false")),e}function Pn(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Dt,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function Mn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=En(t),i=n.iconName,a=n.prefix,o=n.rest,s=An(t),c=$e("parseNodeAttributes",{},t),l=e.styleParser?On(t):[];return r({iconName:i,title:t.getAttribute("title"),titleId:t.getAttribute("data-fa-title-id"),prefix:a,transform:Dt,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:s}},c)}var Rn=Gt.styles;function In(t){var e="nest"===kt.autoReplaceSvg?Mn(t,{styleParser:!1}):Mn(t);return~e.extra.classes.indexOf(st)?Fe("generateLayersText",t,e):Fe("generateSvgReplacementMutation",t,e)}var Nn=new Set;function $n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!L)return Promise.resolve();var n=I.documentElement.classList,i=function(t){return n.add("".concat(q,"-").concat(t))},r=function(t){return n.remove("".concat(q,"-").concat(t))},a=kt.autoFetchSvg?Nn:tt.map((function(t){return"fa-".concat(t)})).concat(Object.keys(Rn));a.includes("fa")||a.push("fa");var o=[".".concat(st,":not([").concat(V,"])")].concat(a.map((function(t){return".".concat(t,":not([").concat(V,"])")}))).join(", ");if(0===o.length)return Promise.resolve();var s=[];try{s=At(t.querySelectorAll(o))}catch(pi){}if(!(s.length>0))return Promise.resolve();i("pending"),r("complete");var c=ln.begin("onTree"),l=s.reduce((function(t,e){try{var n=In(e);n&&t.push(n)}catch(pi){J||"MissingIcon"===pi.name&&console.error(pi)}return t}),[]);return new Promise((function(t,n){Promise.all(l).then((function(n){wn(n,(function(){i("active"),i("complete"),r("pending"),"function"===typeof e&&e(),c(),t()}))})).catch((function(t){c(),n(t)}))}))}function Ln(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;In(t).then((function(t){t&&wn([t],e)}))}function Fn(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(e||{}).icon?e:Be(e||{}),a=n.mask;return a&&(a=(a||{}).icon?a:Be(a||{})),t(i,r(r({},n),{},{mask:a}))}}tt.map((function(t){Nn.add("fa-".concat(t))})),Object.keys(nt[Z]).map(Nn.add.bind(Nn)),Object.keys(nt[Q]).map(Nn.add.bind(Nn)),Nn=h(Nn);var Bn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,i=void 0===n?Dt:n,a=e.symbol,o=void 0!==a&&a,s=e.mask,c=void 0===s?null:s,l=e.maskId,u=void 0===l?null:l,h=e.title,d=void 0===h?null:h,f=e.titleId,p=void 0===f?null:f,v=e.classes,m=void 0===v?[]:v,g=e.attributes,y=void 0===g?{}:g,b=e.styles,_=void 0===b?{}:b;if(t){var w=t.prefix,k=t.iconName,S=t.icon;return Ue(r({type:"icon"},t),(function(){return Le("beforeDOMElementCreation",{iconDefinition:t,params:e}),kt.autoA11y&&(d?y["aria-labelledby"]="".concat(kt.replacementClass,"-title-").concat(p||Et()):(y["aria-hidden"]="true",y["focusable"]="false")),Xe({icons:{main:Qe(S),mask:c?Qe(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:w,iconName:k,transform:r(r({},Dt),i),symbol:o,title:d,maskId:u,titleId:p,extra:{attributes:y,styles:_,classes:m}})}))}},jn={mixout:function(){return{icon:Fn(Bn)}},hooks:function(){return{mutationObserverCallbacks:function(t){return t.treeCallback=$n,t.nodeCallback=Ln,t}}},provides:function(t){t.i2svg=function(t){var e=t.node,n=void 0===e?I:e,i=t.callback,r=void 0===i?function(){}:i;return $n(n,r)},t.generateSvgReplacementMutation=function(t,e){var n=e.iconName,i=e.title,r=e.titleId,a=e.prefix,o=e.transform,s=e.symbol,c=e.mask,l=e.maskId,h=e.extra;return new Promise((function(e,d){Promise.all([nn(n,a),c.iconName?nn(c.iconName,c.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then((function(c){var d=u(c,2),f=d[0],p=d[1];e([t,Xe({icons:{main:f,mask:p},prefix:a,iconName:n,transform:o,symbol:s,maskId:l,title:i,titleId:r,extra:h,watchable:!0})])})).catch(d)}))},t.generateAbstractIcon=function(t){var e,n=t.children,i=t.attributes,r=t.main,a=t.transform,o=t.styles,s=It(o);return s.length>0&&(i["style"]=s),Nt(a)&&(e=Fe("generateAbstractTransformGrouping",{main:r,transform:a,containerWidth:r.width,iconWidth:r.width})),n.push(e||r.icon),{children:n,attributes:i}}}},zn={mixout:function(){return{layer:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.classes,i=void 0===n?[]:n;return Ue({type:"layer"},(function(){Le("beforeDOMElementCreation",{assembler:t,params:e});var n=[];return t((function(t){Array.isArray(t)?t.map((function(t){n=n.concat(t.abstract)})):n=n.concat(t.abstract)})),[{tag:"span",attributes:{class:["".concat(kt.cssPrefix,"-layers")].concat(h(i)).join(" ")},children:n}]}))}}}},Hn={mixout:function(){return{counter:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.title,i=void 0===n?null:n,r=e.classes,a=void 0===r?[]:r,o=e.attributes,s=void 0===o?{}:o,c=e.styles,l=void 0===c?{}:c;return Ue({type:"counter",content:t},(function(){return Le("beforeDOMElementCreation",{content:t,params:e}),Je({content:t.toString(),title:i,extra:{attributes:s,styles:l,classes:["".concat(kt.cssPrefix,"-layers-counter")].concat(h(a))}})}))}}}},Vn={mixout:function(){return{text:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.transform,i=void 0===n?Dt:n,a=e.title,o=void 0===a?null:a,s=e.classes,c=void 0===s?[]:s,l=e.attributes,u=void 0===l?{}:l,d=e.styles,f=void 0===d?{}:d;return Ue({type:"text",content:t},(function(){return Le("beforeDOMElementCreation",{content:t,params:e}),Ke({content:t,transform:r(r({},Dt),i),title:o,extra:{attributes:u,styles:f,classes:["".concat(kt.cssPrefix,"-layers-text")].concat(h(c))}})}))}}},provides:function(t){t.generateLayersText=function(t,e){var n=e.title,i=e.transform,r=e.extra,a=null,o=null;if(F){var s=parseInt(getComputedStyle(t).fontSize,10),c=t.getBoundingClientRect();a=c.width/s,o=c.height/s}return kt.autoA11y&&!n&&(r.attributes["aria-hidden"]="true"),Promise.resolve([t,Ke({content:t.innerHTML,width:a,height:o,transform:i,title:n,extra:r,watchable:!0})])}}},Gn=new RegExp('"',"ug"),Wn=[1105920,1112319];function Un(t){var e=t.replace(Gn,""),n=ee(e,0),i=n>=Wn[0]&&n<=Wn[1],r=2===e.length&&e[0]===e[1];return{value:te(r?e[0]:e),isSecondary:i||r}}function Yn(t,e){var n="".concat(W).concat(e.replace(":","-"));return new Promise((function(i,a){if(null!==t.getAttribute(n))return i();var o=At(t.children),s=o.filter((function(t){return t.getAttribute(G)===e}))[0],c=R.getComputedStyle(t,e),l=c.getPropertyValue("font-family").match(ct),u=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(s&&!l)return t.removeChild(s),i();if(l&&"none"!==h&&""!==h){var d=c.getPropertyValue("content"),f=~["Sharp"].indexOf(l[2])?Q:Z,p=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(l[2])?it[f][l[2].toLowerCase()]:lt[f][u],v=Un(d),m=v.value,g=v.isSecondary,y=l[0].startsWith("FontAwesome"),b=_e(p,m),_=b;if(y){var w=xe(m);w.iconName&&w.prefix&&(b=w.iconName,p=w.prefix)}if(!b||g||s&&s.getAttribute(U)===p&&s.getAttribute(Y)===_)i();else{t.setAttribute(n,_),s&&t.removeChild(s);var k=Pn(),S=k.extra;S.attributes[G]=e,nn(b,p).then((function(a){var o=Xe(r(r({},k),{},{icons:{main:a,mask:De()},prefix:p,iconName:_,extra:S,watchable:!0})),s=I.createElement("svg");"::before"===e?t.insertBefore(s,t.firstChild):t.appendChild(s),s.outerHTML=o.map((function(t){return Xt(t)})).join("\n"),t.removeAttribute(n),i()})).catch(a)}}else i()}))}function qn(t){return Promise.all([Yn(t,"::before"),Yn(t,"::after")])}function Xn(t){return t.parentNode!==document.head&&!~K.indexOf(t.tagName.toUpperCase())&&!t.getAttribute(G)&&(!t.parentNode||"svg"!==t.parentNode.tagName)}function Kn(t){if(L)return new Promise((function(e,n){var i=At(t.querySelectorAll("*")).filter(Xn).map(qn),r=ln.begin("searchPseudoElements");Sn(),Promise.all(i).then((function(){r(),xn(),e()})).catch((function(){r(),xn(),n()}))}))}var Jn={hooks:function(){return{mutationObserverCallbacks:function(t){return t.pseudoElementsCallback=Kn,t}}},provides:function(t){t.pseudoElements2svg=function(t){var e=t.node,n=void 0===e?I:e;kt.searchPseudoElements&&Kn(n)}}},Zn=!1,Qn={mixout:function(){return{dom:{unwatch:function(){Sn(),Zn=!0}}}},hooks:function(){return{bootstrap:function(){Dn($e("mutationObserverCallbacks",{}))},noAuto:function(){Tn()},watch:function(t){var e=t.observeMutationsRoot;Zn?xn():Dn($e("mutationObserverCallbacks",{observeMutationsRoot:e}))}}}},ti=function(t){var e={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce((function(t,e){var n=e.toLowerCase().split("-"),i=n[0],r=n.slice(1).join("-");if(i&&"h"===r)return t.flipX=!0,t;if(i&&"v"===r)return t.flipY=!0,t;if(r=parseFloat(r),isNaN(r))return t;switch(i){case"grow":t.size=t.size+r;break;case"shrink":t.size=t.size-r;break;case"left":t.x=t.x-r;break;case"right":t.x=t.x+r;break;case"up":t.y=t.y-r;break;case"down":t.y=t.y+r;break;case"rotate":t.rotate=t.rotate+r;break}return t}),e)},ei={mixout:function(){return{parse:{transform:function(t){return ti(t)}}}},hooks:function(){return{parseNodeAttributes:function(t,e){var n=e.getAttribute("data-fa-transform");return n&&(t.transform=ti(n)),t}}},provides:function(t){t.generateAbstractTransformGrouping=function(t){var e=t.main,n=t.transform,i=t.containerWidth,a=t.iconWidth,o={transform:"translate(".concat(i/2," 256)")},s="translate(".concat(32*n.x,", ").concat(32*n.y,") "),c="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),u={transform:"".concat(s," ").concat(c," ").concat(l)},h={transform:"translate(".concat(a/2*-1," -256)")},d={outer:o,inner:u,path:h};return{tag:"g",attributes:r({},d.outer),children:[{tag:"g",attributes:r({},d.inner),children:[{tag:e.icon.tag,children:e.icon.children,attributes:r(r({},e.icon.attributes),d.path)}]}]}}}},ni={x:0,y:0,width:"100%",height:"100%"};function ii(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.attributes&&(t.attributes.fill||e)&&(t.attributes.fill="black"),t}function ri(t){return"g"===t.tag?t.children:[t]}var ai={hooks:function(){return{parseNodeAttributes:function(t,e){var n=e.getAttribute("data-fa-mask"),i=n?Ee(n.split(" ").map((function(t){return t.trim()}))):De();return i.prefix||(i.prefix=Ce()),t.mask=i,t.maskId=e.getAttribute("data-fa-mask-id"),t}}},provides:function(t){t.generateAbstractMask=function(t){var e=t.children,n=t.attributes,i=t.main,a=t.mask,o=t.maskId,s=t.transform,c=i.width,l=i.icon,u=a.width,h=a.icon,d=$t({transform:s,containerWidth:u,iconWidth:c}),f={tag:"rect",attributes:r(r({},ni),{},{fill:"white"})},p=l.children?{children:l.children.map(ii)}:{},v={tag:"g",attributes:r({},d.inner),children:[ii(r({tag:l.tag,attributes:r(r({},l.attributes),d.path)},p))]},m={tag:"g",attributes:r({},d.outer),children:[v]},g="mask-".concat(o||Et()),y="clip-".concat(o||Et()),b={tag:"mask",attributes:r(r({},ni),{},{id:g,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,m]},_={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:ri(h)},b]};return e.push(_,{tag:"rect",attributes:r({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(g,")")},ni)}),{children:e,attributes:n}}}},oi={provides:function(t){var e=!1;R.matchMedia&&(e=R.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var t=[],n={fill:"currentColor"},i={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};t.push({tag:"path",attributes:r(r({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=r(r({},i),{},{attributeName:"opacity"}),o={tag:"circle",attributes:r(r({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return e||o.children.push({tag:"animate",attributes:r(r({},i),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:r(r({},a),{},{values:"1;0;1;1;0;1;"})}),t.push(o),t.push({tag:"path",attributes:r(r({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:e?[]:[{tag:"animate",attributes:r(r({},a),{},{values:"1;0;0;0;0;1;"})}]}),e||t.push({tag:"path",attributes:r(r({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:r(r({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:t}}}},si={hooks:function(){return{parseNodeAttributes:function(t,e){var n=e.getAttribute("data-fa-symbol"),i=null!==n&&(""===n||n);return t["symbol"]=i,t}}}},ci=[Ht,jn,zn,Hn,Vn,Jn,Qn,ei,ai,oi,si];Ne(ci,{mixoutsTo:Ge});Ge.noAuto;var li=Ge.config,ui=Ge.library,hi=(Ge.dom,Ge.parse),di=(Ge.findIconDefinition,Ge.toHtml,Ge.icon),fi=(Ge.layer,Ge.text);Ge.counter},417:(t,e,n)=>{"use strict";n.d(e,{DBf:()=>d,EQg:()=>i,EdJ:()=>l,EyR:()=>D,FPD:()=>_,LM3:()=>C,Uwo:()=>p,XTR:()=>S,acZ:()=>h,chG:()=>a,eFW:()=>c,g82:()=>k,gc2:()=>m,jHE:()=>s,lUd:()=>u,nNP:()=>g,onQ:()=>x,paY:()=>f,q7m:()=>v,r8p:()=>w,wn1:()=>b,xHz:()=>r,yOZ:()=>o});var i={prefix:"fas",iconName:"scissors",icon:[512,512,[9984,9986,9988,"cut"],"f0c4","M256 192l-39.5-39.5c4.9-12.6 7.5-26.2 7.5-40.5C224 50.1 173.9 0 112 0S0 50.1 0 112s50.1 112 112 112c14.3 0 27.9-2.7 40.5-7.5L192 256l-39.5 39.5c-12.6-4.9-26.2-7.5-40.5-7.5C50.1 288 0 338.1 0 400s50.1 112 112 112s112-50.1 112-112c0-14.3-2.7-27.9-7.5-40.5L499.2 76.8c7.1-7.1 7.1-18.5 0-25.6c-28.3-28.3-74.1-28.3-102.4 0L256 192zm22.6 150.6L396.8 460.8c28.3 28.3 74.1 28.3 102.4 0c7.1-7.1 7.1-18.5 0-25.6L342.6 278.6l-64 64zM64 112a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm48 240a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"]},r={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24V264c0 13.3-10.7 24-24 24s-24-10.7-24-24V152c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]},a={prefix:"fas",iconName:"square-check",icon:[448,512,[9745,9989,61510,"check-square"],"f14a","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM337 209L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]},o={prefix:"fas",iconName:"angle-right",icon:[256,512,[8250],"f105","M246.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L178.7 256 41.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"]},s={prefix:"fas",iconName:"repeat",icon:[512,512,[128257],"f363","M0 224c0 17.7 14.3 32 32 32s32-14.3 32-32c0-53 43-96 96-96H320v32c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-9.2-9.2-22.9-11.9-34.9-6.9S320 19.1 320 32V64H160C71.6 64 0 135.6 0 224zm512 64c0-17.7-14.3-32-32-32s-32 14.3-32 32c0 53-43 96-96 96H192V352c0-12.9-7.8-24.6-19.8-29.6s-25.7-2.2-34.9 6.9l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c9.2 9.2 22.9 11.9 34.9 6.9s19.8-16.6 19.8-29.6V448H352c88.4 0 160-71.6 160-160z"]},c={prefix:"fas",iconName:"arrow-right",icon:[448,512,[8594],"f061","M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]},l={prefix:"fas",iconName:"floppy-disk",icon:[448,512,[128190,128426,"save"],"f0c7","M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V173.3c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32H64zm0 96c0-17.7 14.3-32 32-32H288c17.7 0 32 14.3 32 32v64c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V128zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"]},u={prefix:"fas",iconName:"arrow-rotate-right",icon:[512,512,[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],"f01e","M370.3 160H320c-17.7 0-32 14.3-32 32s14.3 32 32 32H448c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.2L398.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L370.3 160z"]},h={prefix:"fas",iconName:"arrow-left",icon:[448,512,[8592],"f060","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]},d={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"]},f={prefix:"fas",iconName:"arrow-rotate-left",icon:[512,512,[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],"f0e2","M109.7 160H160c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32V64C0 46.3 14.3 32 32 32s32 14.3 32 32v51.2L81.6 97.6c87.5-87.5 229.3-87.5 316.8 0s87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3s-163.8-62.5-226.3 0L109.7 160z"]},p={prefix:"fas",iconName:"ellipsis-vertical",icon:[128,512,["ellipsis-v"],"f142","M56 472a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0-160a56 56 0 1 1 0-112 56 56 0 1 1 0 112zM0 96a56 56 0 1 1 112 0A56 56 0 1 1 0 96z"]},v={prefix:"fas",iconName:"download",icon:[512,512,[],"f019","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"]},m={prefix:"fas",iconName:"angle-down",icon:[384,512,[8964],"f107","M169.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 274.7 54.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]},g={prefix:"fas",iconName:"link",icon:[640,512,[128279,"chain"],"f0c1","M562.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L405.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C189.5 251.2 196 330 246 380c56.5 56.5 148 56.5 204.5 0L562.8 267.7zM43.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C57 372 57 321 88.5 289.5L200.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C416.5 260.8 410 182 360 132c-56.5-56.5-148-56.5-204.5 0L43.2 244.3z"]},y={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},b=y,_={prefix:"fas",iconName:"arrow-up",icon:[384,512,[8593],"f062","M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]},w={prefix:"fas",iconName:"plus",icon:[448,512,[10133,61543,"add"],"2b","M240 80c0-17.7-14.3-32-32-32s-32 14.3-32 32V224H32c-17.7 0-32 14.3-32 32s14.3 32 32 32H176V432c0 17.7 14.3 32 32 32s32-14.3 32-32V288H384c17.7 0 32-14.3 32-32s-14.3-32-32-32H240V80z"]},k={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"]},S={prefix:"fas",iconName:"trash-arrow-up",icon:[448,512,["trash-restore"],"f829","M163.8 0H284.2c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64S14.3 32 32 32h96l7.2-14.3C140.6 6.8 151.7 0 163.8 0zM32 128H416L394.8 467c-1.6 25.3-22.6 45-47.9 45H101.1c-25.3 0-46.3-19.7-47.9-45L32 128zm192 64c-6.4 0-12.5 2.5-17 7l-80 80c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39V408c0 13.3 10.7 24 24 24s24-10.7 24-24V273.9l39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-4.5-4.5-10.6-7-17-7z"]},x={prefix:"fas",iconName:"angle-up",icon:[384,512,[8963],"f106","M169.4 137.4c12.5-12.5 32.8-12.5 45.3 0l160 160c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L192 205.3 54.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160z"]},C={prefix:"fas",iconName:"spinner",icon:[512,512,[],"f110","M304 48c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zm0 416c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM48 304c26.5 0 48-21.5 48-48s-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48zm464-48c0-26.5-21.5-48-48-48s-48 21.5-48 48s21.5 48 48 48s48-21.5 48-48zM142.9 437c18.7-18.7 18.7-49.1 0-67.9s-49.1-18.7-67.9 0s-18.7 49.1 0 67.9s49.1 18.7 67.9 0zm0-294.2c18.7-18.7 18.7-49.1 0-67.9S93.7 56.2 75 75s-18.7 49.1 0 67.9s49.1 18.7 67.9 0zM369.1 437c18.7 18.7 49.1 18.7 67.9 0s18.7-49.1 0-67.9s-49.1-18.7-67.9 0s-18.7 49.1 0 67.9z"]},D={prefix:"fas",iconName:"angle-left",icon:[256,512,[8249],"f104","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]}},154:(t,e,n)=>{"use strict";function i(t,e){return function(){return t.apply(e,arguments)}}n.d(e,{Z:()=>Be});const{toString:r}=Object.prototype,{getPrototypeOf:a}=Object,o=(t=>e=>{const n=r.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),s=t=>(t=t.toLowerCase(),e=>o(e)===t),c=t=>e=>typeof e===t,{isArray:l}=Array,u=c("undefined");function h(t){return null!==t&&!u(t)&&null!==t.constructor&&!u(t.constructor)&&v(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const d=s("ArrayBuffer");function f(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&d(t.buffer),e}const p=c("string"),v=c("function"),m=c("number"),g=t=>null!==t&&"object"===typeof t,y=t=>!0===t||!1===t,b=t=>{if("object"!==o(t))return!1;const e=a(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},_=s("Date"),w=s("File"),k=s("Blob"),S=s("FileList"),x=t=>g(t)&&v(t.pipe),C=t=>{let e;return t&&("function"===typeof FormData&&t instanceof FormData||v(t.append)&&("formdata"===(e=o(t))||"object"===e&&v(t.toString)&&"[object FormData]"===t.toString()))},D=s("URLSearchParams"),T=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function O(t,e,{allOwnKeys:n=!1}={}){if(null===t||"undefined"===typeof t)return;let i,r;if("object"!==typeof t&&(t=[t]),l(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const r=n?Object.getOwnPropertyNames(t):Object.keys(t),a=r.length;let o;for(i=0;i<a;i++)o=r[i],e.call(null,t[o],o,t)}}function E(t,e){e=e.toLowerCase();const n=Object.keys(t);let i,r=n.length;while(r-- >0)if(i=n[r],e===i.toLowerCase())return i;return null}const A=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),P=t=>!u(t)&&t!==A;function M(){const{caseless:t}=P(this)&&this||{},e={},n=(n,i)=>{const r=t&&E(e,i)||i;b(e[r])&&b(n)?e[r]=M(e[r],n):b(n)?e[r]=M({},n):l(n)?e[r]=n.slice():e[r]=n};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&O(arguments[i],n);return e}const R=(t,e,n,{allOwnKeys:r}={})=>(O(e,((e,r)=>{n&&v(e)?t[r]=i(e,n):t[r]=e}),{allOwnKeys:r}),t),I=t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),N=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},$=(t,e,n,i)=>{let r,o,s;const c={};if(e=e||{},null==t)return e;do{r=Object.getOwnPropertyNames(t),o=r.length;while(o-- >0)s=r[o],i&&!i(s,t,e)||c[s]||(e[s]=t[s],c[s]=!0);t=!1!==n&&a(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},L=(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return-1!==i&&i===n},F=t=>{if(!t)return null;if(l(t))return t;let e=t.length;if(!m(e))return null;const n=new Array(e);while(e-- >0)n[e]=t[e];return n},B=(t=>e=>t&&e instanceof t)("undefined"!==typeof Uint8Array&&a(Uint8Array)),j=(t,e)=>{const n=t&&t[Symbol.iterator],i=n.call(t);let r;while((r=i.next())&&!r.done){const n=r.value;e.call(t,n[0],n[1])}},z=(t,e)=>{let n;const i=[];while(null!==(n=t.exec(e)))i.push(n);return i},H=s("HTMLFormElement"),V=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),G=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),W=s("RegExp"),U=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};O(n,((n,r)=>{let a;!1!==(a=e(n,r,t))&&(i[r]=a||n)})),Object.defineProperties(t,i)},Y=t=>{U(t,((e,n)=>{if(v(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=t[n];v(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},q=(t,e)=>{const n={},i=t=>{t.forEach((t=>{n[t]=!0}))};return l(t)?i(t):i(String(t).split(e)),n},X=()=>{},K=(t,e)=>(t=+t,Number.isFinite(t)?t:e),J="abcdefghijklmnopqrstuvwxyz",Z="0123456789",Q={DIGIT:Z,ALPHA:J,ALPHA_DIGIT:J+J.toUpperCase()+Z},tt=(t=16,e=Q.ALPHA_DIGIT)=>{let n="";const{length:i}=e;while(t--)n+=e[Math.random()*i|0];return n};function et(t){return!!(t&&v(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])}const nt=t=>{const e=new Array(10),n=(t,i)=>{if(g(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const r=l(t)?[]:{};return O(t,((t,e)=>{const a=n(t,i+1);!u(a)&&(r[e]=a)})),e[i]=void 0,r}}return t};return n(t,0)},it=s("AsyncFunction"),rt=t=>t&&(g(t)||v(t))&&v(t.then)&&v(t.catch),at={isArray:l,isArrayBuffer:d,isBuffer:h,isFormData:C,isArrayBufferView:f,isString:p,isNumber:m,isBoolean:y,isObject:g,isPlainObject:b,isUndefined:u,isDate:_,isFile:w,isBlob:k,isRegExp:W,isFunction:v,isStream:x,isURLSearchParams:D,isTypedArray:B,isFileList:S,forEach:O,merge:M,extend:R,trim:T,stripBOM:I,inherits:N,toFlatObject:$,kindOf:o,kindOfTest:s,endsWith:L,toArray:F,forEachEntry:j,matchAll:z,isHTMLForm:H,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:U,freezeMethods:Y,toObjectSet:q,toCamelCase:V,noop:X,toFiniteNumber:K,findKey:E,global:A,isContextDefined:P,ALPHABET:Q,generateString:tt,isSpecCompliantForm:et,toJSONObject:nt,isAsyncFn:it,isThenable:rt};function ot(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}at.inherits(ot,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:at.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const st=ot.prototype,ct={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{ct[t]={value:t}})),Object.defineProperties(ot,ct),Object.defineProperty(st,"isAxiosError",{value:!0}),ot.from=(t,e,n,i,r,a)=>{const o=Object.create(st);return at.toFlatObject(t,o,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),ot.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};const lt=ot,ut=null;function ht(t){return at.isPlainObject(t)||at.isArray(t)}function dt(t){return at.endsWith(t,"[]")?t.slice(0,-2):t}function ft(t,e,n){return t?t.concat(e).map((function(t,e){return t=dt(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}function pt(t){return at.isArray(t)&&!t.some(ht)}const vt=at.toFlatObject(at,{},null,(function(t){return/^is[A-Z]/.test(t)}));function mt(t,e,n){if(!at.isObject(t))throw new TypeError("target must be an object");e=e||new(ut||FormData),n=at.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!at.isUndefined(e[t])}));const i=n.metaTokens,r=n.visitor||u,a=n.dots,o=n.indexes,s=n.Blob||"undefined"!==typeof Blob&&Blob,c=s&&at.isSpecCompliantForm(e);if(!at.isFunction(r))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(at.isDate(t))return t.toISOString();if(!c&&at.isBlob(t))throw new lt("Blob is not supported. Use a Buffer instead.");return at.isArrayBuffer(t)||at.isTypedArray(t)?c&&"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,n,r){let s=t;if(t&&!r&&"object"===typeof t)if(at.endsWith(n,"{}"))n=i?n:n.slice(0,-2),t=JSON.stringify(t);else if(at.isArray(t)&&pt(t)||(at.isFileList(t)||at.endsWith(n,"[]"))&&(s=at.toArray(t)))return n=dt(n),s.forEach((function(t,i){!at.isUndefined(t)&&null!==t&&e.append(!0===o?ft([n],i,a):null===o?n:n+"[]",l(t))})),!1;return!!ht(t)||(e.append(ft(r,n,a),l(t)),!1)}const h=[],d=Object.assign(vt,{defaultVisitor:u,convertValue:l,isVisitable:ht});function f(t,n){if(!at.isUndefined(t)){if(-1!==h.indexOf(t))throw Error("Circular reference detected in "+n.join("."));h.push(t),at.forEach(t,(function(t,i){const a=!(at.isUndefined(t)||null===t)&&r.call(e,t,at.isString(i)?i.trim():i,n,d);!0===a&&f(t,n?n.concat(i):[i])})),h.pop()}}if(!at.isObject(t))throw new TypeError("data must be an object");return f(t),e}const gt=mt;function yt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function bt(t,e){this._pairs=[],t&&gt(t,this,e)}const _t=bt.prototype;_t.append=function(t,e){this._pairs.push([t,e])},_t.toString=function(t){const e=t?function(e){return t.call(this,e,yt)}:yt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const wt=bt;function kt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function St(t,e,n){if(!e)return t;const i=n&&n.encode||kt,r=n&&n.serialize;let a;if(a=r?r(e,n):at.isURLSearchParams(e)?e.toString():new wt(e,n).toString(i),a){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+a}return t}class xt{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){at.forEach(this.handlers,(function(e){null!==e&&t(e)}))}}const Ct=xt,Dt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt="undefined"!==typeof URLSearchParams?URLSearchParams:wt,Ot="undefined"!==typeof FormData?FormData:null,Et="undefined"!==typeof Blob?Blob:null,At=(()=>{let t;return("undefined"===typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&("undefined"!==typeof window&&"undefined"!==typeof document)})(),Pt=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),Mt={isBrowser:!0,classes:{URLSearchParams:Tt,FormData:Ot,Blob:Et},isStandardBrowserEnv:At,isStandardBrowserWebWorkerEnv:Pt,protocols:["http","https","file","blob","url","data"]};function Rt(t,e){return gt(t,new Mt.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,i){return Mt.isNode&&at.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function It(t){return at.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}function Nt(t){const e={},n=Object.keys(t);let i;const r=n.length;let a;for(i=0;i<r;i++)a=n[i],e[a]=t[a];return e}function $t(t){function e(t,n,i,r){let a=t[r++];const o=Number.isFinite(+a),s=r>=t.length;if(a=!a&&at.isArray(i)?i.length:a,s)return at.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!o;i[a]&&at.isObject(i[a])||(i[a]=[]);const c=e(t,n,i[a],r);return c&&at.isArray(i[a])&&(i[a]=Nt(i[a])),!o}if(at.isFormData(t)&&at.isFunction(t.entries)){const n={};return at.forEachEntry(t,((t,i)=>{e(It(t),i,n,0)})),n}return null}const Lt=$t;function Ft(t,e,n){if(at.isString(t))try{return(e||JSON.parse)(t),at.trim(t)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(t)}const Bt={transitional:Dt,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,r=at.isObject(t);r&&at.isHTMLForm(t)&&(t=new FormData(t));const a=at.isFormData(t);if(a)return i&&i?JSON.stringify(Lt(t)):t;if(at.isArrayBuffer(t)||at.isBuffer(t)||at.isStream(t)||at.isFile(t)||at.isBlob(t))return t;if(at.isArrayBufferView(t))return t.buffer;if(at.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Rt(t,this.formSerializer).toString();if((o=at.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return gt(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return r||i?(e.setContentType("application/json",!1),Ft(t)):t}],transformResponse:[function(t){const e=this.transitional||Bt.transitional,n=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&at.isString(t)&&(n&&!this.responseType||i)){const n=e&&e.silentJSONParsing,a=!n&&i;try{return JSON.parse(t)}catch(r){if(a){if("SyntaxError"===r.name)throw lt.from(r,lt.ERR_BAD_RESPONSE,this,null,this.response);throw r}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mt.classes.FormData,Blob:Mt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};at.forEach(["delete","get","head","post","put","patch"],(t=>{Bt.headers[t]={}}));const jt=Bt,zt=at.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ht=t=>{const e={};let n,i,r;return t&&t.split("\n").forEach((function(t){r=t.indexOf(":"),n=t.substring(0,r).trim().toLowerCase(),i=t.substring(r+1).trim(),!n||e[n]&&zt[n]||("set-cookie"===n?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)})),e},Vt=Symbol("internals");function Gt(t){return t&&String(t).trim().toLowerCase()}function Wt(t){return!1===t||null==t?t:at.isArray(t)?t.map(Wt):String(t)}function Ut(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;while(i=n.exec(t))e[i[1]]=i[2];return e}const Yt=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function qt(t,e,n,i,r){return at.isFunction(i)?i.call(this,e,n):(r&&(e=n),at.isString(e)?at.isString(i)?-1!==e.indexOf(i):at.isRegExp(i)?i.test(e):void 0:void 0)}function Xt(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}function Kt(t,e){const n=at.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+n,{value:function(t,n,r){return this[i].call(this,e,t,n,r)},configurable:!0})}))}class Jt{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function r(t,e,n){const r=Gt(e);if(!r)throw new Error("header name must be a non-empty string");const a=at.findKey(i,r);(!a||void 0===i[a]||!0===n||void 0===n&&!1!==i[a])&&(i[a||e]=Wt(t))}const a=(t,e)=>at.forEach(t,((t,n)=>r(t,n,e)));return at.isPlainObject(t)||t instanceof this.constructor?a(t,e):at.isString(t)&&(t=t.trim())&&!Yt(t)?a(Ht(t),e):null!=t&&r(e,t,n),this}get(t,e){if(t=Gt(t),t){const n=at.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return Ut(t);if(at.isFunction(e))return e.call(this,t,n);if(at.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Gt(t),t){const n=at.findKey(this,t);return!(!n||void 0===this[n]||e&&!qt(this,this[n],n,e))}return!1}delete(t,e){const n=this;let i=!1;function r(t){if(t=Gt(t),t){const r=at.findKey(n,t);!r||e&&!qt(n,n[r],r,e)||(delete n[r],i=!0)}}return at.isArray(t)?t.forEach(r):r(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;while(n--){const r=e[n];t&&!qt(this,this[r],r,t,!0)||(delete this[r],i=!0)}return i}normalize(t){const e=this,n={};return at.forEach(this,((i,r)=>{const a=at.findKey(n,r);if(a)return e[a]=Wt(i),void delete e[r];const o=t?Xt(r):String(r).trim();o!==r&&delete e[r],e[o]=Wt(i),n[o]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return at.forEach(this,((n,i)=>{null!=n&&!1!==n&&(e[i]=t&&at.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=this[Vt]=this[Vt]={accessors:{}},n=e.accessors,i=this.prototype;function r(t){const e=Gt(t);n[e]||(Kt(i,t),n[e]=!0)}return at.isArray(t)?t.forEach(r):r(t),this}}Jt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),at.reduceDescriptors(Jt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),at.freezeMethods(Jt);const Zt=Jt;function Qt(t,e){const n=this||jt,i=e||n,r=Zt.from(i.headers);let a=i.data;return at.forEach(t,(function(t){a=t.call(n,a,r.normalize(),e?e.status:void 0)})),r.normalize(),a}function te(t){return!(!t||!t.__CANCEL__)}function ee(t,e,n){lt.call(this,null==t?"canceled":t,lt.ERR_CANCELED,e,n),this.name="CanceledError"}at.inherits(ee,lt,{__CANCEL__:!0});const ne=ee;function ie(t,e,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(new lt("Request failed with status code "+n.status,[lt.ERR_BAD_REQUEST,lt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const re=Mt.isStandardBrowserEnv?function(){return{write:function(t,e,n,i,r,a){const o=[];o.push(t+"="+encodeURIComponent(e)),at.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),at.isString(i)&&o.push("path="+i),at.isString(r)&&o.push("domain="+r),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function ae(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function oe(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function se(t,e){return t&&!ae(e)?oe(t,e):e}const ce=Mt.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(n){let i=n;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(t){const e=at.isString(t)?i(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return function(){return!0}}();function le(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ue(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r,a=0,o=0;return e=void 0!==e?e:1e3,function(s){const c=Date.now(),l=i[o];r||(r=c),n[a]=s,i[a]=c;let u=o,h=0;while(u!==a)h+=n[u++],u%=t;if(a=(a+1)%t,a===o&&(o=(o+1)%t),c-r<e)return;const d=l&&c-l;return d?Math.round(1e3*h/d):void 0}}const he=ue;function de(t,e){let n=0;const i=he(50,250);return r=>{const a=r.loaded,o=r.lengthComputable?r.total:void 0,s=a-n,c=i(s),l=a<=o;n=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:r};u[e?"download":"upload"]=!0,t(u)}}const fe="undefined"!==typeof XMLHttpRequest,pe=fe&&function(t){return new Promise((function(e,n){let i=t.data;const r=Zt.from(t.headers).normalize(),a=t.responseType;let o,s;function c(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}at.isFormData(i)&&(Mt.isStandardBrowserEnv||Mt.isStandardBrowserWebWorkerEnv?r.setContentType(!1):r.getContentType(/^\s*multipart\/form-data/)?at.isString(s=r.getContentType())&&r.setContentType(s.replace(/^\s*(multipart\/form-data);+/,"$1")):r.setContentType("multipart/form-data"));let l=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";r.set("Authorization","Basic "+btoa(e+":"+n))}const u=se(t.baseURL,t.url);function h(){if(!l)return;const i=Zt.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),r=a&&"text"!==a&&"json"!==a?l.response:l.responseText,o={data:r,status:l.status,statusText:l.statusText,headers:i,config:t,request:l};ie((function(t){e(t),c()}),(function(t){n(t),c()}),o),l=null}if(l.open(t.method.toUpperCase(),St(u,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,"onloadend"in l?l.onloadend=h:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(h)},l.onabort=function(){l&&(n(new lt("Request aborted",lt.ECONNABORTED,t,l)),l=null)},l.onerror=function(){n(new lt("Network Error",lt.ERR_NETWORK,t,l)),l=null},l.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||Dt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new lt(e,i.clarifyTimeoutError?lt.ETIMEDOUT:lt.ECONNABORTED,t,l)),l=null},Mt.isStandardBrowserEnv){const e=ce(u)&&t.xsrfCookieName&&re.read(t.xsrfCookieName);e&&r.set(t.xsrfHeaderName,e)}void 0===i&&r.setContentType(null),"setRequestHeader"in l&&at.forEach(r.toJSON(),(function(t,e){l.setRequestHeader(e,t)})),at.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),a&&"json"!==a&&(l.responseType=t.responseType),"function"===typeof t.onDownloadProgress&&l.addEventListener("progress",de(t.onDownloadProgress,!0)),"function"===typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",de(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{l&&(n(!e||e.type?new ne(null,t,l):e),l.abort(),l=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const d=le(u);d&&-1===Mt.protocols.indexOf(d)?n(new lt("Unsupported protocol "+d+":",lt.ERR_BAD_REQUEST,t)):l.send(i||null)}))},ve={http:ut,xhr:pe};at.forEach(ve,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(n){}Object.defineProperty(t,"adapterName",{value:e})}}));const me=t=>`- ${t}`,ge=t=>at.isFunction(t)||null===t||!1===t,ye={getAdapter:t=>{t=at.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let a=0;a<e;a++){let e;if(n=t[a],i=n,!ge(n)&&(i=ve[(e=String(n)).toLowerCase()],void 0===i))throw new lt(`Unknown adapter '${e}'`);if(i)break;r[e||"#"+a]=i}if(!i){const t=Object.entries(r).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(me).join("\n"):" "+me(t[0]):"as no adapter specified";throw new lt("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i},adapters:ve};function be(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ne(null,t)}function _e(t){be(t),t.headers=Zt.from(t.headers),t.data=Qt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const e=ye.getAdapter(t.adapter||jt.adapter);return e(t).then((function(e){return be(t),e.data=Qt.call(t,t.transformResponse,e),e.headers=Zt.from(e.headers),e}),(function(e){return te(e)||(be(t),e&&e.response&&(e.response.data=Qt.call(t,t.transformResponse,e.response),e.response.headers=Zt.from(e.response.headers))),Promise.reject(e)}))}const we=t=>t instanceof Zt?t.toJSON():t;function ke(t,e){e=e||{};const n={};function i(t,e,n){return at.isPlainObject(t)&&at.isPlainObject(e)?at.merge.call({caseless:n},t,e):at.isPlainObject(e)?at.merge({},e):at.isArray(e)?e.slice():e}function r(t,e,n){return at.isUndefined(e)?at.isUndefined(t)?void 0:i(void 0,t,n):i(t,e,n)}function a(t,e){if(!at.isUndefined(e))return i(void 0,e)}function o(t,e){return at.isUndefined(e)?at.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function s(n,r,a){return a in e?i(n,r):a in t?i(void 0,n):void 0}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(t,e)=>r(we(t),we(e),!0)};return at.forEach(Object.keys(Object.assign({},t,e)),(function(i){const a=c[i]||r,o=a(t[i],e[i],i);at.isUndefined(o)&&a!==s||(n[i]=o)})),n}const Se="1.6.0",xe={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{xe[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ce={};function De(t,e,n){if("object"!==typeof t)throw new lt("options must be an object",lt.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;while(r-- >0){const a=i[r],o=e[a];if(o){const e=t[a],n=void 0===e||o(e,a,t);if(!0!==n)throw new lt("option "+a+" must be "+n,lt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new lt("Unknown option "+a,lt.ERR_BAD_OPTION)}}xe.transitional=function(t,e,n){function i(t,e){return"[Axios v"+Se+"] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,r,a)=>{if(!1===t)throw new lt(i(r," has been removed"+(e?" in "+e:"")),lt.ERR_DEPRECATED);return e&&!Ce[r]&&(Ce[r]=!0,console.warn(i(r," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,r,a)}};const Te={assertOptions:De,validators:xe},Oe=Te.validators;class Ee{constructor(t){this.defaults=t,this.interceptors={request:new Ct,response:new Ct}}request(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=ke(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:r}=e;void 0!==n&&Te.assertOptions(n,{silentJSONParsing:Oe.transitional(Oe.boolean),forcedJSONParsing:Oe.transitional(Oe.boolean),clarifyTimeoutError:Oe.transitional(Oe.boolean)},!1),null!=i&&(at.isFunction(i)?e.paramsSerializer={serialize:i}:Te.assertOptions(i,{encode:Oe.function,serialize:Oe.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a=r&&at.merge(r.common,r[e.method]);r&&at.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete r[t]})),e.headers=Zt.concat(a,r);const o=[];let s=!0;this.interceptors.request.forEach((function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,o.unshift(t.fulfilled,t.rejected))}));const c=[];let l;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let u,h=0;if(!s){const t=[_e.bind(this),void 0];t.unshift.apply(t,o),t.push.apply(t,c),u=t.length,l=Promise.resolve(e);while(h<u)l=l.then(t[h++],t[h++]);return l}u=o.length;let d=e;h=0;while(h<u){const t=o[h++],e=o[h++];try{d=t(d)}catch(f){e.call(this,f);break}}try{l=_e.call(this,d)}catch(f){return Promise.reject(f)}h=0,u=c.length;while(h<u)l=l.then(c[h++],c[h++]);return l}getUri(t){t=ke(this.defaults,t);const e=se(t.baseURL,t.url);return St(e,t.params,t.paramsSerializer)}}at.forEach(["delete","get","head","options"],(function(t){Ee.prototype[t]=function(e,n){return this.request(ke(n||{},{method:t,url:e,data:(n||{}).data}))}})),at.forEach(["post","put","patch"],(function(t){function e(e){return function(n,i,r){return this.request(ke(r||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Ee.prototype[t]=e(),Ee.prototype[t+"Form"]=e(!0)}));const Ae=Ee;class Pe{constructor(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;while(e-- >0)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{n.subscribe(t),e=t})).then(t);return i.cancel=function(){n.unsubscribe(e)},i},t((function(t,i,r){n.reason||(n.reason=new ne(t,i,r),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new Pe((function(e){t=e}));return{token:e,cancel:t}}}const Me=Pe;function Re(t){return function(e){return t.apply(null,e)}}function Ie(t){return at.isObject(t)&&!0===t.isAxiosError}const Ne={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ne).forEach((([t,e])=>{Ne[e]=t}));const $e=Ne;function Le(t){const e=new Ae(t),n=i(Ae.prototype.request,e);return at.extend(n,Ae.prototype,e,{allOwnKeys:!0}),at.extend(n,e,null,{allOwnKeys:!0}),n.create=function(e){return Le(ke(t,e))},n}const Fe=Le(jt);Fe.Axios=Ae,Fe.CanceledError=ne,Fe.CancelToken=Me,Fe.isCancel=te,Fe.VERSION=Se,Fe.toFormData=gt,Fe.AxiosError=lt,Fe.Cancel=Fe.CanceledError,Fe.all=function(t){return Promise.all(t)},Fe.spread=Re,Fe.isAxiosError=Ie,Fe.mergeConfig=ke,Fe.AxiosHeaders=Zt,Fe.formToJSON=t=>Lt(at.isHTMLForm(t)?new FormData(t):t),Fe.getAdapter=ye.getAdapter,Fe.HttpStatusCode=$e,Fe.default=Fe;const Be=Fe},794:(t,e,n)=>{"use strict";n.d(e,{Z:()=>S});var i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,a=Math.floor,o="[BigNumber Error] ",s=o+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,u=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,f=1e9;function p(t){var e,n,k,S=L.prototype={constructor:L,toString:null,valueOf:null},x=new L(1),C=20,D=4,T=-7,O=21,E=-1e7,A=1e7,P=!1,M=1,R=0,I={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},N="0123456789abcdefghijklmnopqrstuvwxyz",$=!0;function L(t,e){var r,o,c,h,d,f,p,v,m=this;if(!(m instanceof L))return new L(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>A?m.c=m.e=null:t.e<E?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((f="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(h=0,d=t;d>=10;d/=10,h++);return void(h>A?m.c=m.e=null:(m.e=h,m.c=[t]))}v=String(t)}else{if(!i.test(v=String(t)))return k(m,v,f);m.s=45==v.charCodeAt(0)?(v=v.slice(1),-1):1}(h=v.indexOf("."))>-1&&(v=v.replace(".","")),(d=v.search(/e/i))>0?(h<0&&(h=d),h+=+v.slice(d+1),v=v.substring(0,d)):h<0&&(h=v.length)}else{if(y(e,2,N.length,"Base"),10==e&&$)return m=new L(t),z(m,C+m.e+1,D);if(v=String(t),f="number"==typeof t){if(0*t!=0)return k(m,v,f,e);if(m.s=1/t<0?(v=v.slice(1),-1):1,L.DEBUG&&v.replace(/^0\.0*|\./,"").length>15)throw Error(s+t)}else m.s=45===v.charCodeAt(0)?(v=v.slice(1),-1):1;for(r=N.slice(0,e),h=d=0,p=v.length;d<p;d++)if(r.indexOf(o=v.charAt(d))<0){if("."==o){if(d>h){h=p;continue}}else if(!c&&(v==v.toUpperCase()&&(v=v.toLowerCase())||v==v.toLowerCase()&&(v=v.toUpperCase()))){c=!0,d=-1,h=0;continue}return k(m,String(t),f,e)}f=!1,v=n(v,e,10,m.s),(h=v.indexOf("."))>-1?v=v.replace(".",""):h=v.length}for(d=0;48===v.charCodeAt(d);d++);for(p=v.length;48===v.charCodeAt(--p););if(v=v.slice(d,++p)){if(p-=d,f&&L.DEBUG&&p>15&&(t>u||t!==a(t)))throw Error(s+m.s*t);if((h=h-d-1)>A)m.c=m.e=null;else if(h<E)m.c=[m.e=0];else{if(m.e=h,m.c=[],d=(h+1)%l,h<0&&(d+=l),d<p){for(d&&m.c.push(+v.slice(0,d)),p-=l;d<p;)m.c.push(+v.slice(d,d+=l));d=l-(v=v.slice(d)).length}else d-=p;for(;d--;v+="0");m.c.push(+v)}}else m.c=[m.e=0]}function F(t,e,n,i){var r,a,o,s,c;if(null==n?n=D:y(n,0,8),!t.c)return t.toString();if(r=t.c[0],o=t.e,null==e)c=m(t.c),c=1==i||2==i&&(o<=T||o>=O)?_(c,o):w(c,o,"0");else if(t=z(new L(t),e,n),a=t.e,c=m(t.c),s=c.length,1==i||2==i&&(e<=a||a<=T)){for(;s<e;c+="0",s++);c=_(c,a)}else if(e-=o,c=w(c,a,"0"),a+1>s){if(--e>0)for(c+=".";e--;c+="0");}else if(e+=a-s,e>0)for(a+1==s&&(c+=".");e--;c+="0");return t.s<0&&r?"-"+c:c}function B(t,e){for(var n,i=1,r=new L(t[0]);i<t.length;i++){if(n=new L(t[i]),!n.s){r=n;break}e.call(r,n)&&(r=n)}return r}function j(t,e,n){for(var i=1,r=e.length;!e[--r];e.pop());for(r=e[0];r>=10;r/=10,i++);return(n=i+n*l-1)>A?t.c=t.e=null:n<E?t.c=[t.e=0]:(t.e=n,t.c=e),t}function z(t,e,n,i){var o,s,u,d,f,p,v,m=t.c,g=h;if(m){t:{for(o=1,d=m[0];d>=10;d/=10,o++);if(s=e-o,s<0)s+=l,u=e,f=m[p=0],v=f/g[o-u-1]%10|0;else if(p=r((s+1)/l),p>=m.length){if(!i)break t;for(;m.length<=p;m.push(0));f=v=0,o=1,s%=l,u=s-l+1}else{for(f=d=m[p],o=1;d>=10;d/=10,o++);s%=l,u=s-l+o,v=u<0?0:f/g[o-u-1]%10|0}if(i=i||e<0||null!=m[p+1]||(u<0?f:f%g[o-u-1]),i=n<4?(v||i)&&(0==n||n==(t.s<0?3:2)):v>5||5==v&&(4==n||i||6==n&&(s>0?u>0?f/g[o-u]:0:m[p-1])%10&1||n==(t.s<0?8:7)),e<1||!m[0])return m.length=0,i?(e-=t.e+1,m[0]=g[(l-e%l)%l],t.e=-e||0):m[0]=t.e=0,t;if(0==s?(m.length=p,d=1,p--):(m.length=p+1,d=g[l-s],m[p]=u>0?a(f/g[o-u]%g[u])*d:0),i)for(;;){if(0==p){for(s=1,u=m[0];u>=10;u/=10,s++);for(u=m[0]+=d,d=1;u>=10;u/=10,d++);s!=d&&(t.e++,m[0]==c&&(m[0]=1));break}if(m[p]+=d,m[p]!=c)break;m[p--]=0,d=1}for(s=m.length;0===m[--s];m.pop());}t.e>A?t.c=t.e=null:t.e<E&&(t.c=[t.e=0])}return t}function H(t){var e,n=t.e;return null===n?t.toString():(e=m(t.c),e=n<=T||n>=O?_(e,n):w(e,n,"0"),t.s<0?"-"+e:e)}return L.clone=p,L.ROUND_UP=0,L.ROUND_DOWN=1,L.ROUND_CEIL=2,L.ROUND_FLOOR=3,L.ROUND_HALF_UP=4,L.ROUND_HALF_DOWN=5,L.ROUND_HALF_EVEN=6,L.ROUND_HALF_CEIL=7,L.ROUND_HALF_FLOOR=8,L.EUCLID=9,L.config=L.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(o+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(n=t[e],y(n,0,f,e),C=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(n=t[e],y(n,0,8,e),D=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&(n=t[e],n&&n.pop?(y(n[0],-f,0,e),y(n[1],0,f,e),T=n[0],O=n[1]):(y(n,-f,f,e),T=-(O=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if(n=t[e],n&&n.pop)y(n[0],-f,-1,e),y(n[1],1,f,e),E=n[0],A=n[1];else{if(y(n,-f,f,e),!n)throw Error(o+e+" cannot be zero: "+n);E=-(A=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if(n=t[e],n!==!!n)throw Error(o+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw P=!n,Error(o+"crypto unavailable");P=n}else P=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(n=t[e],y(n,0,9,e),M=n),t.hasOwnProperty(e="POW_PRECISION")&&(n=t[e],y(n,0,f,e),R=n),t.hasOwnProperty(e="FORMAT")){if(n=t[e],"object"!=typeof n)throw Error(o+e+" not an object: "+n);I=n}if(t.hasOwnProperty(e="ALPHABET")){if(n=t[e],"string"!=typeof n||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(o+e+" invalid: "+n);$="0123456789"==n.slice(0,10),N=n}}return{DECIMAL_PLACES:C,ROUNDING_MODE:D,EXPONENTIAL_AT:[T,O],RANGE:[E,A],CRYPTO:P,MODULO_MODE:M,POW_PRECISION:R,FORMAT:I,ALPHABET:N}},L.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!L.DEBUG)return!0;var e,n,i=t.c,r=t.e,s=t.s;t:if("[object Array]"=={}.toString.call(i)){if((1===s||-1===s)&&r>=-f&&r<=f&&r===a(r)){if(0===i[0]){if(0===r&&1===i.length)return!0;break t}if(e=(r+1)%l,e<1&&(e+=l),String(i[0]).length==e){for(e=0;e<i.length;e++)if(n=i[e],n<0||n>=c||n!==a(n))break t;if(0!==n)return!0}}}else if(null===i&&null===r&&(null===s||1===s||-1===s))return!0;throw Error(o+"Invalid BigNumber: "+t)},L.maximum=L.max=function(){return B(arguments,S.lt)},L.minimum=L.min=function(){return B(arguments,S.gt)},L.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return a(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,i,s,c,u,d=0,p=[],v=new L(x);if(null==t?t=C:y(t,0,f),c=r(t/l),P)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(c*=2));d<c;)u=131072*n[d]+(n[d+1]>>>11),u>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),n[d]=i[0],n[d+1]=i[1]):(p.push(u%1e14),d+=2);d=c/2}else{if(!crypto.randomBytes)throw P=!1,Error(o+"crypto unavailable");for(n=crypto.randomBytes(c*=7);d<c;)u=281474976710656*(31&n[d])+1099511627776*n[d+1]+4294967296*n[d+2]+16777216*n[d+3]+(n[d+4]<<16)+(n[d+5]<<8)+n[d+6],u>=9e15?crypto.randomBytes(7).copy(n,d):(p.push(u%1e14),d+=7);d=c/7}if(!P)for(;d<c;)u=e(),u<9e15&&(p[d++]=u%1e14);for(c=p[--d],t%=l,c&&t&&(u=h[l-t],p[d]=a(c/u)*u);0===p[d];p.pop(),d--);if(d<0)p=[s=0];else{for(s=-1;0===p[0];p.splice(0,1),s-=l);for(d=1,u=p[0];u>=10;u/=10,d++);d<l&&(s-=l-d)}return v.e=s,v.c=p,v}}(),L.sum=function(){for(var t=1,e=arguments,n=new L(e[0]);t<e.length;)n=n.plus(e[t++]);return n},n=function(){var t="0123456789";function n(t,e,n,i){for(var r,a,o=[0],s=0,c=t.length;s<c;){for(a=o.length;a--;o[a]*=e);for(o[0]+=i.indexOf(t.charAt(s++)),r=0;r<o.length;r++)o[r]>n-1&&(null==o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}return function(i,r,a,o,s){var c,l,u,h,d,f,p,v,g=i.indexOf("."),y=C,b=D;for(g>=0&&(h=R,R=0,i=i.replace(".",""),v=new L(r),f=v.pow(i.length-g),R=h,v.c=n(w(m(f.c),f.e,"0"),10,a,t),v.e=v.c.length),p=n(i,r,a,s?(c=N,t):(c=t,N)),u=h=p.length;0==p[--h];p.pop());if(!p[0])return c.charAt(0);if(g<0?--u:(f.c=p,f.e=u,f.s=o,f=e(f,v,y,b,a),p=f.c,d=f.r,u=f.e),l=u+y+1,g=p[l],h=a/2,d=d||l<0||null!=p[l+1],d=b<4?(null!=g||d)&&(0==b||b==(f.s<0?3:2)):g>h||g==h&&(4==b||d||6==b&&1&p[l-1]||b==(f.s<0?8:7)),l<1||!p[0])i=d?w(c.charAt(1),-y,c.charAt(0)):c.charAt(0);else{if(p.length=l,d)for(--a;++p[--l]>a;)p[l]=0,l||(++u,p=[1].concat(p));for(h=p.length;!p[--h];);for(g=0,i="";g<=h;i+=c.charAt(p[g++]));i=w(i,u,c.charAt(0))}return i}}(),e=function(){function t(t,e,n){var i,r,a,o,s=0,c=t.length,l=e%d,u=e/d|0;for(t=t.slice();c--;)a=t[c]%d,o=t[c]/d|0,i=u*a+o*l,r=l*a+i%d*d+s,s=(r/n|0)+(i/d|0)+u*o,t[c]=r%n;return s&&(t=[s].concat(t)),t}function e(t,e,n,i){var r,a;if(n!=i)a=n>i?1:-1;else for(r=a=0;r<n;r++)if(t[r]!=e[r]){a=t[r]>e[r]?1:-1;break}return a}function n(t,e,n,i){for(var r=0;n--;)t[n]-=r,r=t[n]<e[n]?1:0,t[n]=r*i+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(i,r,o,s,u){var h,d,f,p,m,g,y,b,_,w,k,S,x,C,D,T,O,E=i.s==r.s?1:-1,A=i.c,P=r.c;if(!A||!A[0]||!P||!P[0])return new L(i.s&&r.s&&(A?!P||A[0]!=P[0]:P)?A&&0==A[0]||!P?0*E:E/0:NaN);for(b=new L(E),_=b.c=[],d=i.e-r.e,E=o+d+1,u||(u=c,d=v(i.e/l)-v(r.e/l),E=E/l|0),f=0;P[f]==(A[f]||0);f++);if(P[f]>(A[f]||0)&&d--,E<0)_.push(1),p=!0;else{for(C=A.length,T=P.length,f=0,E+=2,m=a(u/(P[0]+1)),m>1&&(P=t(P,m,u),A=t(A,m,u),T=P.length,C=A.length),x=T,w=A.slice(0,T),k=w.length;k<T;w[k++]=0);O=P.slice(),O=[0].concat(O),D=P[0],P[1]>=u/2&&D++;do{if(m=0,h=e(P,w,T,k),h<0){if(S=w[0],T!=k&&(S=S*u+(w[1]||0)),m=a(S/D),m>1){m>=u&&(m=u-1),g=t(P,m,u),y=g.length,k=w.length;while(1==e(g,w,y,k))m--,n(g,T<y?O:P,y,u),y=g.length,h=1}else 0==m&&(h=m=1),g=P.slice(),y=g.length;if(y<k&&(g=[0].concat(g)),n(w,g,k,u),k=w.length,-1==h)while(e(P,w,T,k)<1)m++,n(w,T<k?O:P,k,u),k=w.length}else 0===h&&(m++,w=[0]);_[f++]=m,w[0]?w[k++]=A[x]||0:(w=[A[x]],k=1)}while((x++<C||null!=w[0])&&E--);p=null!=w[0],_[0]||_.splice(0,1)}if(u==c){for(f=1,E=_[0];E>=10;E/=10,f++);z(b,o+(b.e=f+d*l-1)+1,s,p)}else b.e=d,b.r=+p;return b}}(),k=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,n=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,r=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(a,s,c,l){var u,h=c?s:s.replace(r,"");if(i.test(h))a.s=isNaN(h)?null:h<0?-1:1;else{if(!c&&(h=h.replace(t,(function(t,e,n){return u="x"==(n=n.toLowerCase())?16:"b"==n?2:8,l&&l!=u?t:e})),l&&(u=l,h=h.replace(e,"$1").replace(n,"0.$1")),s!=h))return new L(h,u);if(L.DEBUG)throw Error(o+"Not a"+(l?" base "+l:"")+" number: "+s);a.s=null}a.c=a.e=null}}(),S.absoluteValue=S.abs=function(){var t=new L(this);return t.s<0&&(t.s=1),t},S.comparedTo=function(t,e){return g(this,new L(t,e))},S.decimalPlaces=S.dp=function(t,e){var n,i,r,a=this;if(null!=t)return y(t,0,f),null==e?e=D:y(e,0,8),z(new L(a),t+a.e+1,e);if(!(n=a.c))return null;if(i=((r=n.length-1)-v(this.e/l))*l,r=n[r])for(;r%10==0;r/=10,i--);return i<0&&(i=0),i},S.dividedBy=S.div=function(t,n){return e(this,new L(t,n),C,D)},S.dividedToIntegerBy=S.idiv=function(t,n){return e(this,new L(t,n),0,1)},S.exponentiatedBy=S.pow=function(t,e){var n,i,s,c,u,h,d,f,p,v=this;if(t=new L(t),t.c&&!t.isInteger())throw Error(o+"Exponent not an integer: "+H(t));if(null!=e&&(e=new L(e)),h=t.e>14,!v.c||!v.c[0]||1==v.c[0]&&!v.e&&1==v.c.length||!t.c||!t.c[0])return p=new L(Math.pow(+H(v),h?2-b(t):+H(t))),e?p.mod(e):p;if(d=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new L(NaN);i=!d&&v.isInteger()&&e.isInteger(),i&&(v=v.mod(e))}else{if(t.e>9&&(v.e>0||v.e<-1||(0==v.e?v.c[0]>1||h&&v.c[1]>=24e7:v.c[0]<8e13||h&&v.c[0]<=9999975e7)))return c=v.s<0&&b(t)?-0:0,v.e>-1&&(c=1/c),new L(d?1/c:c);R&&(c=r(R/l+2))}for(h?(n=new L(.5),d&&(t.s=1),f=b(t)):(s=Math.abs(+H(t)),f=s%2),p=new L(x);;){if(f){if(p=p.times(v),!p.c)break;c?p.c.length>c&&(p.c.length=c):i&&(p=p.mod(e))}if(s){if(s=a(s/2),0===s)break;f=s%2}else if(t=t.times(n),z(t,t.e+1,1),t.e>14)f=b(t);else{if(s=+H(t),0===s)break;f=s%2}v=v.times(v),c?v.c&&v.c.length>c&&(v.c.length=c):i&&(v=v.mod(e))}return i?p:(d&&(p=x.div(p)),e?p.mod(e):c?z(p,R,D,u):p)},S.integerValue=function(t){var e=new L(this);return null==t?t=D:y(t,0,8),z(e,e.e+1,t)},S.isEqualTo=S.eq=function(t,e){return 0===g(this,new L(t,e))},S.isFinite=function(){return!!this.c},S.isGreaterThan=S.gt=function(t,e){return g(this,new L(t,e))>0},S.isGreaterThanOrEqualTo=S.gte=function(t,e){return 1===(e=g(this,new L(t,e)))||0===e},S.isInteger=function(){return!!this.c&&v(this.e/l)>this.c.length-2},S.isLessThan=S.lt=function(t,e){return g(this,new L(t,e))<0},S.isLessThanOrEqualTo=S.lte=function(t,e){return-1===(e=g(this,new L(t,e)))||0===e},S.isNaN=function(){return!this.s},S.isNegative=function(){return this.s<0},S.isPositive=function(){return this.s>0},S.isZero=function(){return!!this.c&&0==this.c[0]},S.minus=function(t,e){var n,i,r,a,o=this,s=o.s;if(t=new L(t,e),e=t.s,!s||!e)return new L(NaN);if(s!=e)return t.s=-e,o.plus(t);var u=o.e/l,h=t.e/l,d=o.c,f=t.c;if(!u||!h){if(!d||!f)return d?(t.s=-e,t):new L(f?o:NaN);if(!d[0]||!f[0])return f[0]?(t.s=-e,t):new L(d[0]?o:3==D?-0:0)}if(u=v(u),h=v(h),d=d.slice(),s=u-h){for((a=s<0)?(s=-s,r=d):(h=u,r=f),r.reverse(),e=s;e--;r.push(0));r.reverse()}else for(i=(a=(s=d.length)<(e=f.length))?s:e,s=e=0;e<i;e++)if(d[e]!=f[e]){a=d[e]<f[e];break}if(a&&(r=d,d=f,f=r,t.s=-t.s),e=(i=f.length)-(n=d.length),e>0)for(;e--;d[n++]=0);for(e=c-1;i>s;){if(d[--i]<f[i]){for(n=i;n&&!d[--n];d[n]=e);--d[n],d[i]+=c}d[i]-=f[i]}for(;0==d[0];d.splice(0,1),--h);return d[0]?j(t,d,h):(t.s=3==D?-1:1,t.c=[t.e=0],t)},S.modulo=S.mod=function(t,n){var i,r,a=this;return t=new L(t,n),!a.c||!t.s||t.c&&!t.c[0]?new L(NaN):!t.c||a.c&&!a.c[0]?new L(a):(9==M?(r=t.s,t.s=1,i=e(a,t,0,3),t.s=r,i.s*=r):i=e(a,t,0,M),t=a.minus(i.times(t)),t.c[0]||1!=M||(t.s=a.s),t)},S.multipliedBy=S.times=function(t,e){var n,i,r,a,o,s,u,h,f,p,m,g,y,b,_,w=this,k=w.c,S=(t=new L(t,e)).c;if(!k||!S||!k[0]||!S[0])return!w.s||!t.s||k&&!k[0]&&!S||S&&!S[0]&&!k?t.c=t.e=t.s=null:(t.s*=w.s,k&&S?(t.c=[0],t.e=0):t.c=t.e=null),t;for(i=v(w.e/l)+v(t.e/l),t.s*=w.s,u=k.length,p=S.length,u<p&&(y=k,k=S,S=y,r=u,u=p,p=r),r=u+p,y=[];r--;y.push(0));for(b=c,_=d,r=p;--r>=0;){for(n=0,m=S[r]%_,g=S[r]/_|0,o=u,a=r+o;a>r;)h=k[--o]%_,f=k[o]/_|0,s=g*h+f*m,h=m*h+s%_*_+y[a]+n,n=(h/b|0)+(s/_|0)+g*f,y[a--]=h%b;y[a]=n}return n?++i:y.splice(0,1),j(t,y,i)},S.negated=function(){var t=new L(this);return t.s=-t.s||null,t},S.plus=function(t,e){var n,i=this,r=i.s;if(t=new L(t,e),e=t.s,!r||!e)return new L(NaN);if(r!=e)return t.s=-e,i.minus(t);var a=i.e/l,o=t.e/l,s=i.c,u=t.c;if(!a||!o){if(!s||!u)return new L(r/0);if(!s[0]||!u[0])return u[0]?t:new L(s[0]?i:0*r)}if(a=v(a),o=v(o),s=s.slice(),r=a-o){for(r>0?(o=a,n=u):(r=-r,n=s),n.reverse();r--;n.push(0));n.reverse()}for(r=s.length,e=u.length,r-e<0&&(n=u,u=s,s=n,e=r),r=0;e;)r=(s[--e]=s[e]+u[e]+r)/c|0,s[e]=c===s[e]?0:s[e]%c;return r&&(s=[r].concat(s),++o),j(t,s,o)},S.precision=S.sd=function(t,e){var n,i,r,a=this;if(null!=t&&t!==!!t)return y(t,1,f),null==e?e=D:y(e,0,8),z(new L(a),t,e);if(!(n=a.c))return null;if(r=n.length-1,i=r*l+1,r=n[r]){for(;r%10==0;r/=10,i--);for(r=n[0];r>=10;r/=10,i++);}return t&&a.e+1>i&&(i=a.e+1),i},S.shiftedBy=function(t){return y(t,-u,u),this.times("1e"+t)},S.squareRoot=S.sqrt=function(){var t,n,i,r,a,o=this,s=o.c,c=o.s,l=o.e,u=C+4,h=new L("0.5");if(1!==c||!s||!s[0])return new L(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(c=Math.sqrt(+H(o)),0==c||c==1/0?(n=m(s),(n.length+l)%2==0&&(n+="0"),c=Math.sqrt(+n),l=v((l+1)/2)-(l<0||l%2),c==1/0?n="5e"+l:(n=c.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),i=new L(n)):i=new L(c+""),i.c[0])for(l=i.e,c=l+u,c<3&&(c=0);;)if(a=i,i=h.times(a.plus(e(o,a,u,1))),m(a.c).slice(0,c)===(n=m(i.c)).slice(0,c)){if(i.e<l&&--c,n=n.slice(c-3,c+1),"9999"!=n&&(r||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(z(i,i.e+C+2,1),t=!i.times(i).eq(o));break}if(!r&&(z(a,a.e+C+2,0),a.times(a).eq(o))){i=a;break}u+=4,c+=4,r=1}return z(i,i.e+C+1,D,t)},S.toExponential=function(t,e){return null!=t&&(y(t,0,f),t++),F(this,t,e,1)},S.toFixed=function(t,e){return null!=t&&(y(t,0,f),t=t+this.e+1),F(this,t,e)},S.toFormat=function(t,e,n){var i,r=this;if(null==n)null!=t&&e&&"object"==typeof e?(n=e,e=null):t&&"object"==typeof t?(n=t,t=e=null):n=I;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(i=r.toFixed(t,e),r.c){var a,s=i.split("."),c=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",h=s[0],d=s[1],f=r.s<0,p=f?h.slice(1):h,v=p.length;if(l&&(a=c,c=l,l=a,v-=a),c>0&&v>0){for(a=v%c||c,h=p.substr(0,a);a<v;a+=c)h+=u+p.substr(a,c);l>0&&(h+=u+p.slice(a)),f&&(h="-"+h)}i=d?h+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):h}return(n.prefix||"")+i+(n.suffix||"")},S.toFraction=function(t){var n,i,r,a,s,c,u,d,f,p,v,g,y=this,b=y.c;if(null!=t&&(u=new L(t),!u.isInteger()&&(u.c||1!==u.s)||u.lt(x)))throw Error(o+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+H(u));if(!b)return new L(y);for(n=new L(x),f=i=new L(x),r=d=new L(x),g=m(b),s=n.e=g.length-y.e-1,n.c[0]=h[(c=s%l)<0?l+c:c],t=!t||u.comparedTo(n)>0?s>0?n:f:u,c=A,A=1/0,u=new L(g),d.c[0]=0;;){if(p=e(u,n,0,1),a=i.plus(p.times(r)),1==a.comparedTo(t))break;i=r,r=a,f=d.plus(p.times(a=f)),d=a,n=u.minus(p.times(a=n)),u=a}return a=e(t.minus(i),r,0,1),d=d.plus(a.times(f)),i=i.plus(a.times(r)),d.s=f.s=y.s,s*=2,v=e(f,r,s,D).minus(y).abs().comparedTo(e(d,i,s,D).minus(y).abs())<1?[f,r]:[d,i],A=c,v},S.toNumber=function(){return+H(this)},S.toPrecision=function(t,e){return null!=t&&y(t,1,f),F(this,t,e,2)},S.toString=function(t){var e,i=this,r=i.s,a=i.e;return null===a?r?(e="Infinity",r<0&&(e="-"+e)):e="NaN":(null==t?e=a<=T||a>=O?_(m(i.c),a):w(m(i.c),a,"0"):10===t&&$?(i=z(new L(i),C+a+1,D),e=w(m(i.c),i.e,"0")):(y(t,2,N.length,"Base"),e=n(w(m(i.c),a,"0"),10,t,r,!0)),r<0&&i.c[0]&&(e="-"+e)),e},S.valueOf=S.toJSON=function(){return H(this)},S._isBigNumber=!0,S[Symbol.toStringTag]="BigNumber",S[Symbol.for("nodejs.util.inspect.custom")]=S.valueOf,null!=t&&L.set(t),L}function v(t){var e=0|t;return t>0||t===e?e:e-1}function m(t){for(var e,n,i=1,r=t.length,a=t[0]+"";i<r;){for(e=t[i++]+"",n=l-e.length;n--;e="0"+e);a+=e}for(r=a.length;48===a.charCodeAt(--r););return a.slice(0,r+1||1)}function g(t,e){var n,i,r=t.c,a=e.c,o=t.s,s=e.s,c=t.e,l=e.e;if(!o||!s)return null;if(n=r&&!r[0],i=a&&!a[0],n||i)return n?i?0:-s:o;if(o!=s)return o;if(n=o<0,i=c==l,!r||!a)return i?0:!r^n?1:-1;if(!i)return c>l^n?1:-1;for(s=(c=r.length)<(l=a.length)?c:l,o=0;o<s;o++)if(r[o]!=a[o])return r[o]>a[o]^n?1:-1;return c==l?0:c>l^n?1:-1}function y(t,e,n,i){if(t<e||t>n||t!==a(t))throw Error(o+(i||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function b(t){var e=t.c.length-1;return v(t.e/l)==e&&t.c[e]%2!=0}function _(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function w(t,e,n){var i,r;if(e<0){for(r=n+".";++e;r+=n);t=r+t}else if(i=t.length,++e>i){for(r=n,e-=i;--e;r+=n);t+=r}else e<i&&(t=t.slice(0,e)+"."+t.slice(e));return t}var k=p();const S=k},649:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>rr});var i=Math.PI/180;function r(){return"undefined"!==typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window))}const a="undefined"!==typeof global?global:"undefined"!==typeof window?window:"undefined"!==typeof WorkerGlobalScope?self:{},o={_global:a,version:"8.3.13",isBrowser:r(),isUnminified:/param/.test(function(t){}.toString()),dblClickWindow:400,getAngle(t){return o.angleDeg?t*i:t},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,pixelRatio:"undefined"!==typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return o["DD"].isDragging},isDragReady(){return!!o["DD"].node},document:a.document,_injectGlobal(t){a.Konva=t}},s=t=>{o[t.prototype.getClassName()]=t};o._injectGlobal(o);class c{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new c(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){var e=this.m;return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}}translate(t,e){return this.m[4]+=this.m[0]*t+this.m[2]*e,this.m[5]+=this.m[1]*t+this.m[3]*e,this}scale(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this}rotate(t){var e=Math.cos(t),n=Math.sin(t),i=this.m[0]*e+this.m[2]*n,r=this.m[1]*e+this.m[3]*n,a=this.m[0]*-n+this.m[2]*e,o=this.m[1]*-n+this.m[3]*e;return this.m[0]=i,this.m[1]=r,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,e){var n=this.m[0]+this.m[2]*e,i=this.m[1]+this.m[3]*e,r=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=i,this.m[2]=r,this.m[3]=a,this}multiply(t){var e=this.m[0]*t.m[0]+this.m[2]*t.m[1],n=this.m[1]*t.m[0]+this.m[3]*t.m[1],i=this.m[0]*t.m[2]+this.m[2]*t.m[3],r=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],o=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=n,this.m[2]=i,this.m[3]=r,this.m[4]=a,this.m[5]=o,this}invert(){var t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,n=-this.m[1]*t,i=-this.m[2]*t,r=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=n,this.m[2]=i,this.m[3]=r,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}decompose(){var t=this.m[0],e=this.m[1],n=this.m[2],i=this.m[3],r=this.m[4],a=this.m[5],o=t*i-e*n;let s={x:r,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=e){var c=Math.sqrt(t*t+e*e);s.rotation=e>0?Math.acos(t/c):-Math.acos(t/c),s.scaleX=c,s.scaleY=o/c,s.skewX=(t*n+e*i)/o,s.skewY=0}else if(0!=n||0!=i){var l=Math.sqrt(n*n+i*i);s.rotation=Math.PI/2-(i>0?Math.acos(-n/l):-Math.acos(n/l)),s.scaleX=o/l,s.scaleY=l,s.skewX=0,s.skewY=(t*n+e*i)/o}return s.rotation=C._getRotation(s.rotation),s}}var l="[object Array]",u="[object Number]",h="[object String]",d="[object Boolean]",f=Math.PI/180,p=180/Math.PI,v="#",m="",g="0",y="Konva warning: ",b="Konva error: ",_="rgb(",w={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]},k=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,S=[];const x="undefined"!==typeof requestAnimationFrame&&requestAnimationFrame||function(t){setTimeout(t,60)},C={_isElement(t){return!(!t||1!=t.nodeType)},_isFunction(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isPlainObject(t){return!!t&&t.constructor===Object},_isArray(t){return Object.prototype.toString.call(t)===l},_isNumber(t){return Object.prototype.toString.call(t)===u&&!isNaN(t)&&isFinite(t)},_isString(t){return Object.prototype.toString.call(t)===h},_isBoolean(t){return Object.prototype.toString.call(t)===d},isObject(t){return t instanceof Object},isValidSelector(t){if("string"!==typeof t)return!1;var e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign(t){return 0===t||t>0?1:-1},requestAnimFrame(t){S.push(t),1===S.length&&x((function(){const t=S;S=[],t.forEach((function(t){t()}))}))},createCanvasElement(){var t=document.createElement("canvas");try{t.style=t.style||{}}catch(e){}return t},createImageElement(){return document.createElement("img")},_isInDocument(t){while(t=t.parentNode)if(t==document)return!0;return!1},_urlToImage(t,e){var n=C.createImageElement();n.onload=function(){e(n)},n.src=t},_rgbToHex(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb(t){t=t.replace(v,m);var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor(){var t=(16777215*Math.random()<<0).toString(16);while(t.length<6)t=g+t;return v+t},getRGB(t){var e;return t in w?(e=w[t],{r:e[0],g:e[1],b:e[2]}):t[0]===v?this._hexToRgb(t.substring(1)):t.substr(0,4)===_?(e=k.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA(t){return t=t||"black",C._namedColorToRBA(t)||C._hex3ColorToRGBA(t)||C._hex6ColorToRGBA(t)||C._rgbColorToRGBA(t)||C._rgbaColorToRGBA(t)||C._hslColorToRGBA(t)},_namedColorToRBA(t){var e=w[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(0===t.indexOf("rgb(")){t=t.match(/rgb\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(0===t.indexOf("rgba(")){t=t.match(/rgba\(([^)]+)\)/)[1];var e=t.split(/ *, */).map(((t,e)=>"%"===t.slice(-1)?3===e?parseInt(t)/100:parseInt(t)/100*255:Number(t)));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex6ColorToRGBA(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex3ColorToRGBA(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){const[e,...n]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),i=Number(n[0])/360,r=Number(n[1])/100,a=Number(n[2])/100;let o,s,c;if(0===r)return c=255*a,{r:Math.round(c),g:Math.round(c),b:Math.round(c),a:1};o=a<.5?a*(1+r):a+r-a*r;const l=2*a-o,u=[0,0,0];for(let t=0;t<3;t++)s=i+1/3*-(t-1),s<0&&s++,s>1&&s--,c=6*s<1?l+6*(o-l)*s:2*s<1?o:3*s<2?l+(o-l)*(2/3-s)*6:l,u[t]=255*c;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection(t,e){return!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y)},cloneObject(t){var e={};for(var n in t)this._isPlainObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray(t){return t.slice(0)},degToRad(t){return t*f},radToDeg(t){return t*p},_degToRad(t){return C.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),C.degToRad(t)},_radToDeg(t){return C.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),C.radToDeg(t)},_getRotation(t){return o.angleDeg?C.radToDeg(t):t},_capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)},throw(t){throw new Error(b+t)},error(t){console.error(b+t)},warn(t){o.showWarnings&&console.warn(y+t)},each(t,e){for(var n in t)e(n,t[n])},_inRange(t,e,n){return e<=t&&t<n},_getProjectionToSegment(t,e,n,i,r,a){var o,s,c,l=(t-n)*(t-n)+(e-i)*(e-i);if(0==l)o=t,s=e,c=(r-n)*(r-n)+(a-i)*(a-i);else{var u=((r-t)*(n-t)+(a-e)*(i-e))/l;u<0?(o=t,s=e,c=(t-r)*(t-r)+(e-a)*(e-a)):u>1?(o=n,s=i,c=(n-r)*(n-r)+(i-a)*(i-a)):(o=t+u*(n-t),s=e+u*(i-e),c=(o-r)*(o-r)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(t,e,n){var i=C.cloneObject(t),r=Number.MAX_VALUE;return e.forEach((function(a,o){if(n||o!==e.length-1){var s=e[(o+1)%e.length],c=C._getProjectionToSegment(a.x,a.y,s.x,s.y,t.x,t.y),l=c[0],u=c[1],h=c[2];h<r&&(i.x=l,i.y=u,r=h)}})),i},_prepareArrayForTween(t,e,n){var i,r=[],a=[];if(t.length>e.length){var o=e;e=t,t=o}for(i=0;i<t.length;i+=2)r.push({x:t[i],y:t[i+1]});for(i=0;i<e.length;i+=2)a.push({x:e[i],y:e[i+1]});var s=[];return a.forEach((function(t){var e=C._getProjectionToLine(t,r,n);s.push(e.x),s.push(e.y)})),s},_prepareToStringify(t){var e;for(var n in t.visitedByCircularReferenceRemoval=!0,t)if(t.hasOwnProperty(n)&&t[n]&&"object"==typeof t[n])if(e=Object.getOwnPropertyDescriptor(t,n),t[n].visitedByCircularReferenceRemoval||C._isElement(t[n])){if(!e.configurable)return null;delete t[n]}else if(null===C._prepareToStringify(t[n])){if(!e.configurable)return null;delete t[n]}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(var n in e)t[n]=e[n];return t},_getFirstPointerId(t){return t.touches?t.changedTouches[0].identifier:t.pointerId||999}};function D(t){return C._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)||C._isBoolean(t)?t:Object.prototype.toString.call(t)}function T(t){return t>255?255:t<0?0:Math.round(t)}function O(){if(o.isUnminified)return function(t,e){return C._isNumber(t)||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}}function E(t){if(o.isUnminified)return function(e,n){let i=C._isNumber(e),r=C._isArray(e)&&e.length==t;return i||r||C.warn(D(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}}function A(){if(o.isUnminified)return function(t,e){var n=C._isNumber(t),i="auto"===t;return n||i||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}}function P(){if(o.isUnminified)return function(t,e){return C._isString(t)||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}}function M(){if(o.isUnminified)return function(t,e){const n=C._isString(t),i="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;return n||i||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}}function R(){if(o.isUnminified)return function(t,e){const n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(C._isArray(t)?t.forEach((function(t){C._isNumber(t)||C.warn('"'+e+'" attribute has non numeric element '+t+". Make sure that all elements are numbers.")})):C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}}function I(){if(o.isUnminified)return function(t,e){var n=!0===t||!1===t;return n||C.warn(D(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}}function N(t){if(o.isUnminified)return function(e,n){return void 0===e||null===e||C.isObject(e)||C.warn(D(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}var $="get",L="set";const F={addGetterSetter(t,e,n,i,r){F.addGetter(t,e,n),F.addSetter(t,e,i,r),F.addOverloadedGetterSetter(t,e)},addGetter(t,e,n){var i=$+C._capitalize(e);t.prototype[i]=t.prototype[i]||function(){var t=this.attrs[e];return void 0===t?n:t}},addSetter(t,e,n,i){var r=L+C._capitalize(e);t.prototype[r]||F.overWriteSetter(t,e,n,i)},overWriteSetter(t,e,n,i){var r=L+C._capitalize(e);t.prototype[r]=function(t){return n&&void 0!==t&&null!==t&&(t=n.call(this,t,e)),this._setAttr(e,t),i&&i.call(this),this}},addComponentsGetterSetter(t,e,n,i,r){var a,o,s=n.length,c=C._capitalize,l=$+c(e),u=L+c(e);t.prototype[l]=function(){var t={};for(a=0;a<s;a++)o=n[a],t[o]=this.getAttr(e+c(o));return t};var h=N(n);t.prototype[u]=function(t){var a,o=this.attrs[e];for(a in i&&(t=i.call(this,t)),h&&h.call(this,t,e),t)t.hasOwnProperty(a)&&this._setAttr(e+c(a),t[a]);return t||n.forEach((t=>{this._setAttr(e+c(t),void 0)})),this._fireChangeEvent(e,o,t),r&&r.call(this),this},F.addOverloadedGetterSetter(t,e)},addOverloadedGetterSetter(t,e){var n=C._capitalize(e),i=L+n,r=$+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[r]()}},addDeprecatedGetterSetter(t,e,n,i){C.error("Adding deprecated "+e);var r=$+C._capitalize(e),a=e+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[r]=function(){C.error(a);var t=this.attrs[e];return void 0===t?n:t},F.addSetter(t,e,i,(function(){C.error(a)})),F.addOverloadedGetterSetter(t,e)},backCompat(t,e){C.each(e,(function(e,n){var i=t.prototype[n],r=$+C._capitalize(e),a=L+C._capitalize(e);function o(){i.apply(this,arguments),C.error('"'+e+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}t.prototype[e]=o,t.prototype[r]=o,t.prototype[a]=o}))},afterSetFilter(){this._filterUpToDate=!1}};function B(t){var e,n,i=[],r=t.length,a=C;for(e=0;e<r;e++)n=t[e],a._isNumber(n)?n=Math.round(1e3*n)/1e3:a._isString(n)||(n+=""),i.push(n);return i}var j=",",z="(",H=")",V="([",G="])",W=";",U="()",Y="=",q=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],X=["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"];const K=100;class J{constructor(t){this.canvas=t,o.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,e){var n,i,r,a,o=this.traceArr,s=o.length,c="";for(n=0;n<s;n++)i=o[n],r=i.method,r?(a=i.args,c+=r,t?c+=U:C._isArray(a[0])?c+=V+a.join(j)+G:(e&&(a=a.map((t=>"number"===typeof t?Math.floor(t):t))),c+=z+a.join(j)+H)):(c+=i.property,t||(c+=Y+i.val)),c+=W;return c}clearTrace(){this.traceArr=[]}_trace(t){var e,n=this.traceArr;n.push(t),e=n.length,e>=K&&n.shift()}reset(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){var e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){var e=t.getLineCap();e&&this.setAttr("lineCap",e)}_applyOpacity(t){var e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){var e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,n,i,r,a){this._context.arc(t,e,n,i,r,a)}arcTo(t,e,n,i,r){this._context.arcTo(t,e,n,i,r)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,n,i,r,a){this._context.bezierCurveTo(t,e,n,i,r,a)}clearRect(t,e,n,i){this._context.clearRect(t,e,n,i)}clip(){this._context.clip()}closePath(){this._context.closePath()}createImageData(t,e){var n=arguments;return 2===n.length?this._context.createImageData(t,e):1===n.length?this._context.createImageData(t):void 0}createLinearGradient(t,e,n,i){return this._context.createLinearGradient(t,e,n,i)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,n,i,r,a){return this._context.createRadialGradient(t,e,n,i,r,a)}drawImage(t,e,n,i,r,a,o,s,c){var l=arguments,u=this._context;3===l.length?u.drawImage(t,e,n):5===l.length?u.drawImage(t,e,n,i,r):9===l.length&&u.drawImage(t,e,n,i,r,a,o,s,c)}ellipse(t,e,n,i,r,a,o,s){this._context.ellipse(t,e,n,i,r,a,o,s)}isPointInPath(t,e){return this._context.isPointInPath(t,e)}fill(t){t?this._context.fill(t):this._context.fill()}fillRect(t,e,n,i){this._context.fillRect(t,e,n,i)}strokeRect(t,e,n,i){this._context.strokeRect(t,e,n,i)}fillText(t,e,n,i){i?this._context.fillText(t,e,n,i):this._context.fillText(t,e,n)}measureText(t){return this._context.measureText(t)}getImageData(t,e,n,i){return this._context.getImageData(t,e,n,i)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,n,i){this._context.rect(t,e,n,i)}putImageData(t,e,n){this._context.putImageData(t,e,n)}quadraticCurveTo(t,e,n,i){this._context.quadraticCurveTo(t,e,n,i)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context["mozDash"]=t:"webkitLineDash"in this._context&&(this._context["webkitLineDash"]=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,e,n,i,r,a){this._context.setTransform(t,e,n,i,r,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,n,i){this._context.strokeText(t,e,n,i)}transform(t,e,n,i,r,a){this._context.transform(t,e,n,i,r,a)}translate(t,e){this._context.translate(t,e)}_enableTrace(){var t,e,n=this,i=q.length,r=this.setAttr,a=function(t){var i,r=n[t];n[t]=function(){return e=B(Array.prototype.slice.call(arguments,0)),i=r.apply(n,arguments),n._trace({method:t,args:e}),i}};for(t=0;t<i;t++)a(q[t]);n.setAttr=function(){r.apply(n,arguments);var t=arguments[0],e=arguments[1];"shadowOffsetX"!==t&&"shadowOffsetY"!==t&&"shadowBlur"!==t||(e/=this.canvas.getPixelRatio()),n._trace({property:t,val:e})}}_applyGlobalCompositeOperation(t){const e=t.attrs.globalCompositeOperation;var n=!e||"source-over"===e;n||this.setAttr("globalCompositeOperation",e)}}X.forEach((function(t){Object.defineProperty(J.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})}));class Z extends J{constructor(t){super(t),this._context=t._canvas.getContext("2d")}_fillColor(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){var e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){var e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){var e=t.fill(),n=t.getFillPriority();if(e&&"color"===n)this._fillColor(t);else{var i=t.getFillPatternImage();if(i&&"pattern"===n)this._fillPattern(t);else{var r=t.getFillLinearGradientColorStops();if(r&&"linear-gradient"===n)this._fillLinearGradient(t);else{var a=t.getFillRadialGradientColorStops();a&&"radial-gradient"===n?this._fillRadialGradient(t):e?this._fillColor(t):i?this._fillPattern(t):r?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}}}}_strokeLinearGradient(t){var e=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),i=t.getStrokeLinearGradientColorStops(),r=this.createLinearGradient(e.x,e.y,n.x,n.y);if(i){for(var a=0;a<i.length;a+=2)r.addColorStop(i[a],i[a+1]);this.setAttr("strokeStyle",r)}}_stroke(t){var e=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();var i=this.getCanvas().getPixelRatio();this.setTransform(i,0,0,i,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)");var r=t.getStrokeLinearGradientColorStops();r?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),n||this.restore()}}_applyShadow(t){var e,n,i,r=null!==(e=t.getShadowRGBA())&&void 0!==e?e:"black",a=null!==(n=t.getShadowBlur())&&void 0!==n?n:5,o=null!==(i=t.getShadowOffset())&&void 0!==i?i:{x:0,y:0},s=t.getAbsoluteScale(),c=this.canvas.getPixelRatio(),l=s.x*c,u=s.y*c;this.setAttr("shadowColor",r),this.setAttr("shadowBlur",a*Math.min(Math.abs(l),Math.abs(u))),this.setAttr("shadowOffsetX",o.x*l),this.setAttr("shadowOffsetY",o.y*u)}}class Q extends J{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){var e=t.getStrokeScaleEnabled();if(!e){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var i=t.hitStrokeWidth(),r="auto"===i?t.strokeWidth():i;this.setAttr("lineWidth",r),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}}var tt;function et(){if(tt)return tt;var t=C.createCanvasElement(),e=t.getContext("2d");return tt=function(){var t=o._global.devicePixelRatio||1,n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/n}(),tt}class nt{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var e=t||{},n=e.pixelRatio||o.pixelRatio||et();this.pixelRatio=n,this._canvas=C.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio,n=this.getContext()._context;n.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio,n=this.getContext()._context;n.scale(e,e)}getWidth(){return this.width}getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch(n){try{return this._canvas.toDataURL()}catch(i){return C.error("Unable to get data URL. "+i.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}F.addGetterSetter(nt,"pixelRatio",void 0,O());class it extends nt{constructor(t={width:0,height:0}){super(t),this.context=new Z(this),this.setSize(t.width,t.height)}}class rt extends nt{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new Q(this),this.setSize(t.width,t.height)}}const at={get isDragging(){var t=!1;return at._dragElements.forEach((e=>{"dragging"===e.dragStatus&&(t=!0)})),t},justDragged:!1,get node(){var t;return at._dragElements.forEach((e=>{t=e.node})),t},_dragElements:new Map,_drag(t){const e=[];at._dragElements.forEach(((n,i)=>{const{node:r}=n,a=r.getStage();a.setPointersPositions(t),void 0===n.pointerId&&(n.pointerId=C._getFirstPointerId(t));const o=a._changedPointerPositions.find((t=>t.id===n.pointerId));if(o){if("dragging"!==n.dragStatus){var s=r.dragDistance(),c=Math.max(Math.abs(o.x-n.startPointerPos.x),Math.abs(o.y-n.startPointerPos.y));if(c<s)return;if(r.startDrag({evt:t}),!r.isDragging())return}r._setDragPosition(t,n),e.push(r)}})),e.forEach((e=>{e.fire("dragmove",{type:"dragmove",target:e,evt:t},!0)}))},_endDragBefore(t){const e=[];at._dragElements.forEach((n=>{const{node:i}=n,r=i.getStage();t&&r.setPointersPositions(t);const a=r._changedPointerPositions.find((t=>t.id===n.pointerId));if(!a)return;"dragging"!==n.dragStatus&&"stopped"!==n.dragStatus||(at.justDragged=!0,o._mouseListenClick=!1,o._touchListenClick=!1,o._pointerListenClick=!1,n.dragStatus="stopped");const s=n.node.getLayer()||n.node instanceof o.Stage&&n.node;s&&-1===e.indexOf(s)&&e.push(s)})),e.forEach((t=>{t.draw()}))},_endDragAfter(t){at._dragElements.forEach(((e,n)=>{"stopped"===e.dragStatus&&e.node.fire("dragend",{type:"dragend",target:e.node,evt:t},!0),"dragging"!==e.dragStatus&&at._dragElements.delete(n)}))}};o.isBrowser&&(window.addEventListener("mouseup",at._endDragBefore,!0),window.addEventListener("touchend",at._endDragBefore,!0),window.addEventListener("mousemove",at._drag),window.addEventListener("touchmove",at._drag),window.addEventListener("mouseup",at._endDragAfter,!1),window.addEventListener("touchend",at._endDragAfter,!1));var ot="absoluteOpacity",st="allEventListeners",ct="absoluteTransform",lt="absoluteScale",ut="canvas",ht="Change",dt="children",ft="konva",pt="listening",vt="mouseenter",mt="mouseleave",gt="set",yt="Shape",bt=" ",_t="stage",wt="transform",kt="Stage",St="visible",xt=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(bt);let Ct=1;class Dt{constructor(t){this._id=Ct++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){t!==wt&&t!==ct||!this._cache.get(t)?t?this._cache.delete(t):this._cache.clear():this._cache.get(t).dirty=!0}_getCache(t,e){var n=this._cache.get(t),i=t===wt||t===ct,r=void 0===n||i&&!0===n.dirty;return r&&(n=e.call(this),this._cache.set(t,n)),n}_calculate(t,e,n){if(!this._attachedDepsListeners.get(t)){const n=e.map((t=>t+"Change.konva")).join(bt);this.on(n,(()=>{this._clearCache(t)})),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,n)}_getCanvasCache(){return this._cache.get(ut)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===ct&&this.fire("absoluteTransformChange")}clearCache(){return this._cache.delete(ut),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){var e=t||{},n={};void 0!==e.x&&void 0!==e.y&&void 0!==e.width&&void 0!==e.height||(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()}));var i=Math.ceil(e.width||n.width),r=Math.ceil(e.height||n.height),a=e.pixelRatio,o=void 0===e.x?Math.floor(n.x):e.x,s=void 0===e.y?Math.floor(n.y):e.y,c=e.offset||0,l=e.drawBorder||!1,u=e.hitCanvasPixelRatio||1;if(i&&r){i+=2*c+1,r+=2*c+1,o-=c,s-=c;var h=new it({pixelRatio:a,width:i,height:r}),d=new it({pixelRatio:a,width:0,height:0}),f=new rt({pixelRatio:u,width:i,height:r}),p=h.getContext(),v=f.getContext();return f.isCache=!0,h.isCache=!0,this._cache.delete(ut),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(h.getContext()._context.imageSmoothingEnabled=!1,d.getContext()._context.imageSmoothingEnabled=!1),p.save(),v.save(),p.translate(-o,-s),v.translate(-o,-s),this._isUnderCache=!0,this._clearSelfAndDescendantCache(ot),this._clearSelfAndDescendantCache(lt),this.drawScene(h,this),this.drawHit(f,this),this._isUnderCache=!1,p.restore(),v.restore(),l&&(p.save(),p.beginPath(),p.rect(0,0,i,r),p.closePath(),p.setAttr("strokeStyle","red"),p.setAttr("lineWidth",5),p.stroke(),p.restore()),this._cache.set(ut,{scene:h,filter:d,hit:f,x:o,y:s}),this._requestDraw(),this}C.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}isCached(){return this._cache.has(ut)}getClientRect(t){throw new Error('abstract "getClientRect" method call')}_transformedRect(t,e){var n,i,r,a,o=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],s=this.getAbsoluteTransform(e);return o.forEach((function(t){var e=s.point(t);void 0===n&&(n=r=e.x,i=a=e.y),n=Math.min(n,e.x),i=Math.min(i,e.y),r=Math.max(r,e.x),a=Math.max(a,e.y)})),{x:n,y:i,width:r-n,height:a-i}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);const e=this._getCanvasCache();t.translate(e.x,e.y);var n=this._getCachedSceneCanvas(),i=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/i,n.height/i),t.restore()}_drawCachedHitCanvas(t){var e=this._getCanvasCache(),n=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),t.restore()}_getCachedSceneCanvas(){var t,e,n,i,r=this.filters(),a=this._getCanvasCache(),o=a.scene,s=a.filter,c=s.getContext();if(r){if(!this._filterUpToDate){var l=o.pixelRatio;s.setSize(o.width/o.pixelRatio,o.height/o.pixelRatio);try{for(t=r.length,c.clear(),c.drawImage(o._canvas,0,0,o.getWidth()/l,o.getHeight()/l),e=c.getImageData(0,0,s.getWidth(),s.getHeight()),n=0;n<t;n++)i=r[n],"function"===typeof i?(i.call(this,e),c.putImageData(e,0,0)):C.error("Filter should be type of function, but got "+typeof i+" instead. Please check correct filters")}catch(u){C.error("Unable to apply filter. "+u.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return s}return o}on(t,e){if(this._cache&&this._cache.delete(st),3===arguments.length)return this._delegate.apply(this,arguments);var n,i,r,a,o,s=t.split(bt),c=s.length;for(n=0;n<c;n++)i=s[n],r=i.split("."),a=r[0],o=r[1]||"",this.eventListeners[a]||(this.eventListeners[a]=[]),this.eventListeners[a].push({name:o,handler:e});return this}off(t,e){var n,i,r,a,o,s,c=(t||"").split(bt),l=c.length;if(this._cache&&this._cache.delete(st),!t)for(i in this.eventListeners)this._off(i);for(n=0;n<l;n++)if(r=c[n],a=r.split("."),o=a[0],s=a[1],o)this.eventListeners[o]&&this._off(o,s,e);else for(i in this.eventListeners)this._off(i,s,e);return this}dispatchEvent(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,(function(t){e.call(this,t.evt)})),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,n){var i=this;this.on(t,(function(t){for(var r=t.target.findAncestors(e,!0,i),a=0;a<r.length;a++)t=C.cloneObject(t),t.currentTarget=r[a],n.call(r[a],t)}))}remove(){return this.isDragging()&&this.stopDrag(),at._dragElements["delete"](this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ct),this._clearSelfAndDescendantCache(ot),this._clearSelfAndDescendantCache(lt),this._clearSelfAndDescendantCache(_t),this._clearSelfAndDescendantCache(St),this._clearSelfAndDescendantCache(pt)}_remove(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this}getAttr(t){var e="get"+C._capitalize(t);return C._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){var t=this.getParent(),e=[];while(t)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges((()=>{var e,n;if(!t)return this;for(e in t)e!==dt&&(n=gt+C._capitalize(e),C._isFunction(this[n])?this[n](t[e]):this._setAttr(e,t[e]))})),this}isListening(){return this._getCache(pt,this._isListening)}_isListening(t){const e=this.listening();if(!e)return!1;const n=this.getParent();return!n||n===t||this===t||n._isListening(t)}isVisible(){return this._getCache(St,this._isVisible)}_isVisible(t){const e=this.visible();if(!e)return!1;const n=this.getParent();return!n||n===t||this===t||n._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);var n=this.getLayer(),i=!1;at._dragElements.forEach((t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType||t.node.getLayer()===n)&&(i=!0)}));var r=!e&&!o.hitOnDragEnabled&&i;return this.isListening()&&this.isVisible()&&!r}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){var t,e,n,i,r=this.getDepth(),a=this,o=0;function s(c){for(t=[],e=c.length,n=0;n<e;n++)i=c[n],o++,i.nodeType!==yt&&(t=t.concat(i.getChildren().slice())),i._id===a._id&&(n=e);t.length>0&&t[0].getDepth()<=r&&s(t)}return a.nodeType!==kt&&s(a.getStage().getChildren()),o}getDepth(){var t=0,e=this.parent;while(e)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(wt),this._clearSelfAndDescendantCache(ct)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges((()=>{this.x(t.x),this.y(t.y)})),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var e=this.getAbsoluteTransform().copy();return e.invert(),e.point(t)}getAbsolutePosition(t){let e=!1,n=this.parent;while(n){if(n.isCached()){e=!0;break}n=n.parent}e&&!t&&(t=!0);var i=this.getAbsoluteTransform(t).getMatrix(),r=new c,a=this.offset();return r.m=i.slice(),r.translate(a.x,a.y),r.getTranslation()}setAbsolutePosition(t){var e=this._clearTransform();this.attrs.x=e.x,this.attrs.y=e.y,delete e.x,delete e.y,this._clearCache(wt);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(t.x,t.y),t={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(e),this.setPosition({x:t.x,y:t.y}),this._clearCache(wt),this._clearSelfAndDescendantCache(ct),this}_setTransform(t){var e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){var t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){var e=t.x,n=t.y,i=this.x(),r=this.y();return void 0!==e&&(i+=e),void 0!==n&&(r+=n),this.setPosition({x:i,y:r}),this}_eachAncestorReverse(t,e){var n,i,r=[],a=this.getParent();if(!e||e._id!==this._id){r.unshift(this);while(a&&(!e||a._id!==e._id))r.unshift(a),a=a.parent;for(n=r.length,i=0;i<n;i++)t(r[i])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return C.warn("Node has no parent. moveToTop function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-1&&(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return C.warn("Node has no parent. moveUp function is ignored."),!1;var t=this.index,e=this.parent.getChildren().length;return t<e-1&&(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return C.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return C.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(t){if(!this.parent)return C.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&C.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");var e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(ot,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){var t,e,n,i,r,a={},o=this.getAttrs();for(t in a.attrs={},o)e=o[t],r=C.isObject(e)&&!C._isPlainObject(e)&&!C._isArray(e),r||(n="function"===typeof this[t]&&this[t],delete o[t],i=n?n.call(this):null,o[t]=e,i!==e&&(a.attrs[t]=e));return a.className=this.getClassName(),C._prepareToStringify(a)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,n){var i=[];e&&this._isMatch(t)&&i.push(this);var r=this.parent;while(r){if(r===n)return i;r._isMatch(t)&&i.push(r),r=r.parent}return i}isAncestorOf(t){return!1}findAncestor(t,e,n){return this.findAncestors(t,e,n)[0]}_isMatch(t){if(!t)return!1;if("function"===typeof t)return t(this);var e,n,i=t.replace(/ /g,"").split(","),r=i.length;for(e=0;e<r;e++)if(n=i[e],C.isValidSelector(n)||(C.warn('Selector "'+n+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),C.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),C.warn("Konva is awesome, right?")),"#"===n.charAt(0)){if(this.id()===n.slice(1))return!0}else if("."===n.charAt(0)){if(this.hasName(n.slice(1)))return!0}else if(this.className===n||this.nodeType===n)return!0;return!1}getLayer(){var t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(_t,this._getStage)}_getStage(){var t=this.getParent();return t?t.getStage():void 0}fire(t,e={},n){return e.target=e.target||this,n?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(ct,this._getAbsoluteTransform)}_getAbsoluteTransform(t){var e;if(t)return e=new c,this._eachAncestorReverse((function(t){var n=t.transformsEnabled();"all"===n?e.multiply(t.getTransform()):"position"===n&&e.translate(t.x()-t.offsetX(),t.y()-t.offsetY())}),t),e;e=this._cache.get(ct)||new c,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();var n=this.transformsEnabled();if("all"===n)e.multiply(this.getTransform());else if("position"===n){const t=this.attrs.x||0,n=this.attrs.y||0,i=this.attrs.offsetX||0,r=this.attrs.offsetY||0;e.translate(t-i,n-r)}return e.dirty=!1,e}getAbsoluteScale(t){var e=this;while(e)e._isUnderCache&&(t=e),e=e.getParent();const n=this.getAbsoluteTransform(t),i=n.decompose();return{x:i.scaleX,y:i.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(wt,this._getTransform)}_getTransform(){var t,e,n=this._cache.get(wt)||new c;n.reset();var i=this.x(),r=this.y(),a=o.getAngle(this.rotation()),s=null!==(t=this.attrs.scaleX)&&void 0!==t?t:1,l=null!==(e=this.attrs.scaleY)&&void 0!==e?e:1,u=this.attrs.skewX||0,h=this.attrs.skewY||0,d=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return 0===i&&0===r||n.translate(i,r),0!==a&&n.rotate(a),0===u&&0===h||n.skew(u,h),1===s&&1===l||n.scale(s,l),0===d&&0===f||n.translate(-1*d,-1*f),n.dirty=!1,n}clone(t){var e,n,i,r,a,o=C.cloneObject(this.attrs);for(e in t)o[e]=t[e];var s=new this.constructor(o);for(e in this.eventListeners)for(n=this.eventListeners[e],i=n.length,r=0;r<i;r++)a=n[r],a.name.indexOf(ft)<0&&(s.eventListeners[e]||(s.eventListeners[e]=[]),s.eventListeners[e].push(a));return s}_toKonvaCanvas(t){t=t||{};var e=this.getClientRect(),n=this.getStage(),i=void 0!==t.x?t.x:Math.floor(e.x),r=void 0!==t.y?t.y:Math.floor(e.y),a=t.pixelRatio||1,o=new it({width:t.width||Math.ceil(e.width)||(n?n.width():0),height:t.height||Math.ceil(e.height)||(n?n.height():0),pixelRatio:a}),s=o.getContext();return!1===t.imageSmoothingEnabled&&(s._context.imageSmoothingEnabled=!1),s.save(),(i||r)&&s.translate(-1*i,-1*r),this.drawScene(o),s.restore(),o}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){t=t||{};var e=t.mimeType||null,n=t.quality||null,i=this._toKonvaCanvas(t).toDataURL(e,n);return t.callback&&t.callback(i),i}toImage(t){return new Promise(((e,n)=>{try{const n=null===t||void 0===t?void 0:t.callback;n&&delete t.callback,C._urlToImage(this.toDataURL(t),(function(t){e(t),null===n||void 0===n||n(t)}))}catch(i){n(i)}}))}toBlob(t){return new Promise(((e,n)=>{try{const n=null===t||void 0===t?void 0:t.callback;n&&delete t.callback,this.toCanvas(t).toBlob((t=>{e(t),null===n||void 0===n||n(t)}))}catch(i){n(i)}}))}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.dragDistance}_off(t,e,n){var i,r,a,o=this.eventListeners[t];for(i=0;i<o.length;i++)if(r=o[i].name,a=o[i].handler,("konva"!==r||"konva"===e)&&(!e||r===e)&&(!n||n===a)){if(o.splice(i,1),0===o.length){delete this.eventListeners[t];break}i--}}_fireChangeEvent(t,e,n){this._fire(t+ht,{oldVal:e,newVal:n})}addName(t){if(!this.hasName(t)){var e=this.name(),n=e?e+" "+t:t;this.name(n)}return this}hasName(t){if(!t)return!1;const e=this.name();if(!e)return!1;var n=(e||"").split(/\s/g);return-1!==n.indexOf(t)}removeName(t){var e=(this.name()||"").split(/\s/g),n=e.indexOf(t);return-1!==n&&(e.splice(n,1),this.name(e.join(" "))),this}setAttr(t,e){var n=this[gt+C._capitalize(t)];return C._isFunction(n)?n.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(o.autoDrawEnabled){const t=this.getLayer()||this.getStage();null===t||void 0===t||t.batchDraw()}}_setAttr(t,e){var n=this.attrs[t];(n!==e||C.isObject(e))&&(void 0===e||null===e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,e),this._requestDraw())}_setComponentAttr(t,e,n){var i;void 0!==n&&(i=this.attrs[t],i||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=n,this._fireChangeEvent(t,i,n))}_fireAndBubble(t,e,n){e&&this.nodeType===yt&&(e.target=this);var i=(t===vt||t===mt)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||"Stage"===this.nodeType&&!n);if(!i){this._fire(t,e);var r=(t===vt||t===mt)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,t,e,n):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){let e=this._cache.get(st);if(!e){e={};let t=Object.getPrototypeOf(this);while(t)if(t.eventListeners){for(var n in t.eventListeners){const i=t.eventListeners[n],r=e[n]||[];e[n]=i.concat(r)}t=Object.getPrototypeOf(t)}else t=Object.getPrototypeOf(t);this._cache.set(st,e)}return e[t]}_fire(t,e){e=e||{},e.currentTarget=this,e.type=t;const n=this._getProtoListeners(t);if(n)for(var i=0;i<n.length;i++)n[i].handler.call(this,e);const r=this.eventListeners[t];if(r)for(i=0;i<r.length;i++)r[i].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){var e=t?t.pointerId:void 0,n=this.getStage(),i=this.getAbsolutePosition(),r=n._getPointerById(e)||n._changedPointerPositions[0]||i;at._dragElements.set(this._id,{node:this,startPointerPos:r,offset:{x:r.x-i.x,y:r.y-i.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){at._dragElements.has(this._id)||this._createDragElement(t);const n=at._dragElements.get(this._id);n.dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){const n=this.getStage()._getPointerById(e.pointerId);if(n){var i={x:n.x-e.offset.x,y:n.y-e.offset.y},r=this.dragBoundFunc();if(void 0!==r){const e=r.call(this,i,t);e?i=e:C.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===i.x&&this._lastPos.y===i.y||(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}}stopDrag(t){const e=at._dragElements.get(this._id);e&&(e.dragStatus="stopped"),at._endDragBefore(t),at._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){const t=at._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",(function(t){var e=void 0!==t.evt["button"],n=!e||o.dragButtons.indexOf(t.evt["button"])>=0;if(n&&!this.isDragging()){var i=!1;at._dragElements.forEach((t=>{this.isAncestorOf(t.node)&&(i=!0)})),i||this._createDragElement(t)}}))}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{this._dragCleanup();var t=this.getStage();if(!t)return;const e=at._dragElements.get(this._id),n=e&&"dragging"===e.dragStatus,i=e&&"ready"===e.dragStatus;n?this.stopDrag():i&&at._dragElements["delete"](this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){const e=this.getStage();if(!e)return!1;const n={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return C.haveIntersection(n,this.getClientRect())}static create(t,e){return C._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){var n,i,r,a=Dt.prototype.getClassName.call(t),s=t.children;e&&(t.attrs.container=e),o[a]||(C.warn('Can not find a node with class name "'+a+'". Fallback to "Shape".'),a="Shape");const c=o[a];if(n=new c(t.attrs),s)for(i=s.length,r=0;r<i;r++)n.add(Dt._createNode(s[r]));return n}}Dt.prototype.nodeType="Node",Dt.prototype._attrsAffectingSize=[],Dt.prototype.eventListeners={},Dt.prototype.on.call(Dt.prototype,xt,(function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(wt),this._clearSelfAndDescendantCache(ct))})),Dt.prototype.on.call(Dt.prototype,"visibleChange.konva",(function(){this._clearSelfAndDescendantCache(St)})),Dt.prototype.on.call(Dt.prototype,"listeningChange.konva",(function(){this._clearSelfAndDescendantCache(pt)})),Dt.prototype.on.call(Dt.prototype,"opacityChange.konva",(function(){this._clearSelfAndDescendantCache(ot)}));const Tt=F.addGetterSetter;Tt(Dt,"zIndex"),Tt(Dt,"absolutePosition"),Tt(Dt,"position"),Tt(Dt,"x",0,O()),Tt(Dt,"y",0,O()),Tt(Dt,"globalCompositeOperation","source-over",P()),Tt(Dt,"opacity",1,O()),Tt(Dt,"name","",P()),Tt(Dt,"id","",P()),Tt(Dt,"rotation",0,O()),F.addComponentsGetterSetter(Dt,"scale",["x","y"]),Tt(Dt,"scaleX",1,O()),Tt(Dt,"scaleY",1,O()),F.addComponentsGetterSetter(Dt,"skew",["x","y"]),Tt(Dt,"skewX",0,O()),Tt(Dt,"skewY",0,O()),F.addComponentsGetterSetter(Dt,"offset",["x","y"]),Tt(Dt,"offsetX",0,O()),Tt(Dt,"offsetY",0,O()),Tt(Dt,"dragDistance",null,O()),Tt(Dt,"width",0,O()),Tt(Dt,"height",0,O()),Tt(Dt,"listening",!0,I()),Tt(Dt,"preventDefault",!0,I()),Tt(Dt,"filters",null,(function(t){return this._filterUpToDate=!1,t})),Tt(Dt,"visible",!0,I()),Tt(Dt,"transformsEnabled","all",P()),Tt(Dt,"size"),Tt(Dt,"dragBoundFunc"),Tt(Dt,"draggable",!1,I()),F.backCompat(Dt,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"});class Ot extends Dt{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];const e=this.children||[];var n=[];return e.forEach((function(e){t(e)&&n.push(e)})),n}hasChildren(){return this.getChildren().length>0}removeChildren(){return this.getChildren().forEach((t=>{t.parent=null,t.index=0,t.remove()})),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach((t=>{t.parent=null,t.index=0,t.destroy()})),this.children=[],this._requestDraw(),this}add(...t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}var n=t[0];return n.getParent()?(n.moveTo(this),this):(this._validateAdd(n),n.index=this.getChildren().length,n.parent=this,n._clearCaches(),this.getChildren().push(n),this._fire("add",{child:n}),this._requestDraw(),this)}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){var e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){var n=[];return this._descendants((i=>{const r=i._isMatch(t);return r&&n.push(i),!(!r||!e)})),n}_descendants(t){let e=!1;const n=this.getChildren();for(const i of n){if(e=t(i),e)return!0;if(i.hasChildren()&&(e=i._descendants(t),e))return!0}return!1}toObject(){var t=Dt.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach((e=>{t.children.push(e.toObject())})),t}isAncestorOf(t){var e=t.getParent();while(e){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){var e=Dt.prototype.clone.call(this,t);return this.getChildren().forEach((function(t){e.add(t.clone())})),e}getAllIntersections(t){var e=[];return this.find("Shape").forEach((function(n){n.isVisible()&&n.intersects(t)&&e.push(n)})),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),this.isCached()||null===(e=this.children)||void 0===e||e.forEach((function(e){e._clearSelfAndDescendantCache(t)}))}_setChildrenIndices(){var t;null===(t=this.children)||void 0===t||t.forEach((function(t,e){t.index=e})),this._requestDraw()}drawScene(t,e){var n=this.getLayer(),i=t||n&&n.getCanvas(),r=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.scene,s=i&&i.isCache;if(!this.isVisible()&&!s)return this;if(o){r.save();var c=this.getAbsoluteTransform(e).getMatrix();r.transform(c[0],c[1],c[2],c[3],c[4],c[5]),this._drawCachedSceneCanvas(r),r.restore()}else this._drawChildren("drawScene",i,e);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;var n=this.getLayer(),i=t||n&&n.hitCanvas,r=i&&i.getContext(),a=this._getCanvasCache(),o=a&&a.hit;if(o){r.save();var s=this.getAbsoluteTransform(e).getMatrix();r.transform(s[0],s[1],s[2],s[3],s[4],s[5]),this._drawCachedHitCanvas(r),r.restore()}else this._drawChildren("drawHit",i,e);return this}_drawChildren(t,e,n){var i,r=e&&e.getContext(),a=this.clipWidth(),o=this.clipHeight(),s=this.clipFunc(),c=a&&o||s;const l=n===this;if(c){r.save();var u=this.getAbsoluteTransform(n),h=u.getMatrix();if(r.transform(h[0],h[1],h[2],h[3],h[4],h[5]),r.beginPath(),s)s.call(this,r,this);else{var d=this.clipX(),f=this.clipY();r.rect(d,f,a,o)}r.clip(),h=u.copy().invert().getMatrix(),r.transform(h[0],h[1],h[2],h[3],h[4],h[5])}var p=!l&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;p&&(r.save(),r._applyGlobalCompositeOperation(this)),null===(i=this.children)||void 0===i||i.forEach((function(i){i[t](e,n)})),p&&r.restore(),c&&r.restore()}getClientRect(t){var e;t=t||{};var n,i,r,a,o=t.skipTransform,s=t.relativeTo,c={x:1/0,y:1/0,width:0,height:0},l=this;null===(e=this.children)||void 0===e||e.forEach((function(e){if(e.visible()){var o=e.getClientRect({relativeTo:l,skipShadow:t.skipShadow,skipStroke:t.skipStroke});0===o.width&&0===o.height||(void 0===n?(n=o.x,i=o.y,r=o.x+o.width,a=o.y+o.height):(n=Math.min(n,o.x),i=Math.min(i,o.y),r=Math.max(r,o.x+o.width),a=Math.max(a,o.y+o.height)))}}));for(var u=this.find("Shape"),h=!1,d=0;d<u.length;d++){var f=u[d];if(f._isVisible(this)){h=!0;break}}return c=h&&void 0!==n?{x:n,y:i,width:r-n,height:a-i}:{x:0,y:0,width:0,height:0},o?c:this._transformedRect(c,s)}}F.addComponentsGetterSetter(Ot,"clip",["x","y","width","height"]),F.addGetterSetter(Ot,"clipX",void 0,O()),F.addGetterSetter(Ot,"clipY",void 0,O()),F.addGetterSetter(Ot,"clipWidth",void 0,O()),F.addGetterSetter(Ot,"clipHeight",void 0,O()),F.addGetterSetter(Ot,"clipFunc");const Et=new Map,At=void 0!==o._global.PointerEvent;function Pt(t){return Et.get(t)}function Mt(t){return{evt:t,pointerId:t.pointerId}}function Rt(t,e){return Et.get(t)===e}function It(t,e){Nt(t);const n=e.getStage();n&&(Et.set(t,e),At&&e._fire("gotpointercapture",Mt(new PointerEvent("gotpointercapture"))))}function Nt(t,e){const n=Et.get(t);if(!n)return;const i=n.getStage();i&&i.content,Et.delete(t),At&&n._fire("lostpointercapture",Mt(new PointerEvent("lostpointercapture")))}var $t="Stage",Lt="string",Ft="px",Bt="mouseout",jt="mouseleave",zt="mouseover",Ht="mouseenter",Vt="mousemove",Gt="mousedown",Wt="mouseup",Ut="pointermove",Yt="pointerdown",qt="pointerup",Xt="pointercancel",Kt="lostpointercapture",Jt="pointerout",Zt="pointerleave",Qt="pointerover",te="pointerenter",ee="contextmenu",ne="touchstart",ie="touchend",re="touchmove",ae="touchcancel",oe="wheel",se=5,ce=[[Ht,"_pointerenter"],[Gt,"_pointerdown"],[Vt,"_pointermove"],[Wt,"_pointerup"],[jt,"_pointerleave"],[ne,"_pointerdown"],[re,"_pointermove"],[ie,"_pointerup"],[ae,"_pointercancel"],[zt,"_pointerover"],[oe,"_wheel"],[ee,"_contextmenu"],[Yt,"_pointerdown"],[Ut,"_pointermove"],[qt,"_pointerup"],[Xt,"_pointercancel"],[Kt,"_lostpointercapture"]];const le={mouse:{[Jt]:Bt,[Zt]:jt,[Qt]:zt,[te]:Ht,[Ut]:Vt,[Yt]:Gt,[qt]:Wt,[Xt]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[Jt]:"touchout",[Zt]:"touchleave",[Qt]:"touchover",[te]:"touchenter",[Ut]:re,[Yt]:ne,[qt]:ie,[Xt]:ae,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[Jt]:Jt,[Zt]:Zt,[Qt]:Qt,[te]:te,[Ut]:Ut,[Yt]:Yt,[qt]:qt,[Xt]:Xt,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},ue=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",he=t=>{const e=ue(t);return"pointer"===e?o.pointerEventsEnabled&&le.pointer:"touch"===e?le.touch:"mouse"===e?le.mouse:void 0};function de(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&C.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}const fe="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);",pe=[];class ve extends Ot{constructor(t){super(de(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),pe.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(()=>{de(this.attrs)})),this._checkVisibility()}_validateAdd(t){const e="Layer"===t.getType(),n="FastLayer"===t.getType(),i=e||n;i||C["throw"]("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if(typeof t===Lt){if("."===t.charAt(0)){var e=t.slice(1);t=document.getElementsByClassName(e)[0]}else{var n;n="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(n)}if(!t)throw"Can not find container in document with id "+n}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){var t,e=this.children,n=e.length;for(t=0;t<n;t++)e[t].clear();return this}clone(t){return t||(t={}),t.container="undefined"!==typeof document&&document.createElement("div"),Ot.prototype.clone.call(this,t)}destroy(){super.destroy();var t=this.content;t&&C._isInDocument(t)&&this.container().removeChild(t);var e=pe.indexOf(this);return e>-1&&pe.splice(e,1),this}getPointerPosition(){const t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(C.warn(fe),null)}_getPointerById(t){return this._pointerPositions.find((e=>e.id===t))}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){t=t||{},t.x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var e=new it({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),n=e.getContext()._context,i=this.children;return(t.x||t.y)&&n.translate(-1*t.x,-1*t.y),i.forEach((function(e){if(e.isVisible()){var i=e._toKonvaCanvas(t);n.drawImage(i._canvas,t.x,t.y,i.getWidth()/i.getPixelRatio(),i.getHeight()/i.getPixelRatio())}})),e}getIntersection(t){if(!t)return null;var e,n=this.children,i=n.length,r=i-1;for(e=r;e>=0;e--){const i=n[e].getIntersection(t);if(i)return i}return null}_resizeDOM(){var t=this.width(),e=this.height();this.content&&(this.content.style.width=t+Ft,this.content.style.height=e+Ft),this.bufferCanvas.setSize(t,e),this.bufferHitCanvas.setSize(t,e),this.children.forEach((n=>{n.setSize({width:t,height:e}),n.draw()}))}add(t,...e){if(arguments.length>1){for(var n=0;n<arguments.length;n++)this.add(arguments[n]);return this}super.add(t);var i=this.children.length;return i>se&&C.warn("The stage has "+i+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),o.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return Rt(t,this)}setPointerCapture(t){It(t,this)}releaseCapture(t){Nt(t,this)}getLayers(){return this.children}_bindContentEvents(){o.isBrowser&&ce.forEach((([t,e])=>{this.content.addEventListener(t,(t=>{this[e](t)}),{passive:!1})}))}_pointerenter(t){this.setPointersPositions(t);const e=he(t.type);this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);const e=he(t.type);this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}_pointerleave(t){const e=he(t.type),n=ue(t.type);if(e){this.setPointersPositions(t);var i=this._getTargetShape(n),r=!at.isDragging||o.hitOnDragEnabled;i&&r?(i._fireAndBubble(e.pointerout,{evt:t}),i._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[n+"targetShape"]=null):r&&(this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(e.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=void 0,this._pointerPositions=[]}}_pointerdown(t){const e=he(t.type),n=ue(t.type);if(e){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach((r=>{var a=this.getIntersection(r);at.justDragged=!1,o["_"+n+"ListenClick"]=!0;const s=a&&a.isListening();if(!s)return;o.capturePointerEventsEnabled&&a.setPointerCapture(r.id),this[n+"ClickStartShape"]=a,a._fireAndBubble(e.pointerdown,{evt:t,pointerId:r.id}),i=!0;const c=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&c&&t.preventDefault()})),i||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}_pointermove(t){const e=he(t.type),n=ue(t.type);if(!e)return;at.isDragging&&at.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t);var i=!at.isDragging||o.hitOnDragEnabled;if(!i)return;var r={};let a=!1;var s=this._getTargetShape(n);this._changedPointerPositions.forEach((i=>{const o=Pt(i.id)||this.getIntersection(i),c=i.id,l={evt:t,pointerId:c};var u=s!==o;if(u&&s&&(s._fireAndBubble(e.pointerout,Object.assign({},l),o),s._fireAndBubble(e.pointerleave,Object.assign({},l),o)),o){if(r[o._id])return;r[o._id]=!0}o&&o.isListening()?(a=!0,u&&(o._fireAndBubble(e.pointerover,Object.assign({},l),s),o._fireAndBubble(e.pointerenter,Object.assign({},l),s),this[n+"targetShape"]=o),o._fireAndBubble(e.pointermove,Object.assign({},l))):s&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:c}),this[n+"targetShape"]=null)})),a||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){const e=he(t.type),n=ue(t.type);if(!e)return;this.setPointersPositions(t);const i=this[n+"ClickStartShape"],r=this[n+"ClickEndShape"];var a={};let s=!1;this._changedPointerPositions.forEach((c=>{const l=Pt(c.id)||this.getIntersection(c);if(l){if(l.releaseCapture(c.id),a[l._id])return;a[l._id]=!0}const u=c.id,h={evt:t,pointerId:u};let d=!1;o["_"+n+"InDblClickWindow"]?(d=!0,clearTimeout(this[n+"DblTimeout"])):at.justDragged||(o["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout((function(){o["_"+n+"InDblClickWindow"]=!1}),o.dblClickWindow),l&&l.isListening()?(s=!0,this[n+"ClickEndShape"]=l,l._fireAndBubble(e.pointerup,Object.assign({},h)),o["_"+n+"ListenClick"]&&i&&i===l&&(l._fireAndBubble(e.pointerclick,Object.assign({},h)),d&&r&&r===l&&l._fireAndBubble(e.pointerdblclick,Object.assign({},h)))):(this[n+"ClickEndShape"]=null,o["_"+n+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:u}),d&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:u}))})),s||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o["_"+n+"ListenClick"]=!1,t.cancelable&&"touch"!==n&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(ee,{evt:t}):this._fire(ee,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(oe,{evt:t}):this._fire(oe,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);const e=Pt(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(qt,Mt(t)),Nt(t.pointerId)}_lostpointercapture(t){Nt(t.pointerId)}setPointersPositions(t){var e=this._getContentPosition(),n=null,i=null;t=t||window.event,void 0!==t.touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,(t=>{this._pointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})})),Array.prototype.forEach.call(t.changedTouches||t.touches,(t=>{this._changedPointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})}))):(n=(t.clientX-e.left)/e.scaleX,i=(t.clientY-e.top)/e.scaleY,this.pointerPos={x:n,y:i},this._pointerPositions=[{x:n,y:i,id:C._getFirstPointerId(t)}],this._changedPointerPositions=[{x:n,y:i,id:C._getFirstPointerId(t)}])}_setPointerPosition(t){C.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new it({width:this.width(),height:this.height()}),this.bufferHitCanvas=new rt({pixelRatio:1,width:this.width(),height:this.height()}),o.isBrowser){var t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}}cache(){return C.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach((function(t){t.batchDraw()})),this}}ve.prototype.nodeType=$t,s(ve),F.addGetterSetter(ve,"container");var me="hasShadow",ge="shadowRGBA",ye="patternImage",be="linearGradient",_e="radialGradient";let we;function ke(){return we||(we=C.createCanvasElement().getContext("2d"),we)}const Se={};function xe(t){t.fill()}function Ce(t){t.stroke()}function De(t){t.fill()}function Te(t){t.stroke()}function Oe(){this._clearCache(me)}function Ee(){this._clearCache(ge)}function Ae(){this._clearCache(ye)}function Pe(){this._clearCache(be)}function Me(){this._clearCache(_e)}class Re extends Dt{constructor(t){let e;super(t);while(1)if(e=C.getRandomColor(),e&&!(e in Se))break;this.colorKey=e,Se[e]=this}getContext(){return C.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return C.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(me,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(ye,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){var t=ke();const e=t.createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(e&&e.setTransform){const t=new c;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(o.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(be,this.__getLinearGradient)}__getLinearGradient(){var t=this.fillLinearGradientColorStops();if(t){for(var e=ke(),n=this.fillLinearGradientStartPoint(),i=this.fillLinearGradientEndPoint(),r=e.createLinearGradient(n.x,n.y,i.x,i.y),a=0;a<t.length;a+=2)r.addColorStop(t[a],t[a+1]);return r}}_getRadialGradient(){return this._getCache(_e,this.__getRadialGradient)}__getRadialGradient(){var t=this.fillRadialGradientColorStops();if(t){for(var e=ke(),n=this.fillRadialGradientStartPoint(),i=this.fillRadialGradientEndPoint(),r=e.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),i.x,i.y,this.fillRadialGradientEndRadius()),a=0;a<t.length;a+=2)r.addColorStop(t[a],t[a+1]);return r}}getShadowRGBA(){return this._getCache(ge,this._getShadowRGBA)}_getShadowRGBA(){if(this.hasShadow()){var t=C.colorToRGBA(this.shadowColor());return t?"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")":void 0}}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],(()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops())))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],(()=>this.strokeEnabled()&&this.strokeWidth()&&!(!this.stroke()&&!this.strokeLinearGradientColorStops())))}hasHitStroke(){const t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){var e,n=this.getStage(),i=n.bufferHitCanvas;return i.getContext().clear(),this.drawHit(i,null,!0),e=i.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data,e[3]>0}destroy(){return Dt.prototype.destroy.call(this),delete Se[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;if(!this.getStage())return!1;const n=null===(e=this.attrs.perfectDrawEnabled)||void 0===e||e;if(!n)return!1;const i=t||this.hasFill(),r=this.hasStroke(),a=1!==this.getAbsoluteOpacity();if(i&&r&&a)return!0;const o=this.hasShadow(),s=this.shadowForStrokeEnabled();return!!(i&&r&&o&&s)}setStrokeHitEnabled(t){C.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){const e=t.skipTransform,n=t.relativeTo,i=this.getSelfRect(),r=!t.skipStroke&&this.hasStroke(),a=r&&this.strokeWidth()||0,o=i.width+a,s=i.height+a,c=!t.skipShadow&&this.hasShadow(),l=c?this.shadowOffsetX():0,u=c?this.shadowOffsetY():0,h=o+Math.abs(l),d=s+Math.abs(u),f=c&&this.shadowBlur()||0,p=h+2*f,v=d+2*f,m={width:p,height:v,x:-(a/2+f)+Math.min(l,0)+i.x,y:-(a/2+f)+Math.min(u,0)+i.y};return e?m:this._transformedRect(m,n)}drawScene(t,e){var n,i,r,a=this.getLayer(),o=t||a.getCanvas(),s=o.getContext(),c=this._getCanvasCache(),l=this.getSceneFunc(),u=this.hasShadow(),h=o.isCache,d=e===this;if(!this.isVisible()&&!d)return this;if(c){s.save();var f=this.getAbsoluteTransform(e).getMatrix();return s.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedSceneCanvas(s),s.restore(),this}if(!l)return this;if(s.save(),this._useBufferCanvas()&&!h){n=this.getStage(),i=n.bufferCanvas,r=i.getContext(),r.clear(),r.save(),r._applyLineJoin(this);var p=this.getAbsoluteTransform(e).getMatrix();r.transform(p[0],p[1],p[2],p[3],p[4],p[5]),l.call(this,r,this),r.restore();var v=i.pixelRatio;u&&s._applyShadow(this),s._applyOpacity(this),s._applyGlobalCompositeOperation(this),s.drawImage(i._canvas,0,0,i.width/v,i.height/v)}else{if(s._applyLineJoin(this),!d){p=this.getAbsoluteTransform(e).getMatrix();s.transform(p[0],p[1],p[2],p[3],p[4],p[5]),s._applyOpacity(this),s._applyGlobalCompositeOperation(this)}u&&s._applyShadow(this),l.call(this,s,this)}return s.restore(),this}drawHit(t,e,n=!1){if(!this.shouldDrawHit(e,n))return this;var i=this.getLayer(),r=t||i.hitCanvas,a=r&&r.getContext(),o=this.hitFunc()||this.sceneFunc(),s=this._getCanvasCache(),c=s&&s.hit;if(this.colorKey||C.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()"),c){a.save();var l=this.getAbsoluteTransform(e).getMatrix();return a.transform(l[0],l[1],l[2],l[3],l[4],l[5]),this._drawCachedHitCanvas(a),a.restore(),this}if(!o)return this;a.save(),a._applyLineJoin(this);const u=this===e;if(!u){var h=this.getAbsoluteTransform(e).getMatrix();a.transform(h[0],h[1],h[2],h[3],h[4],h[5])}return o.call(this,a,this),a.restore(),this}drawHitFromCache(t=0){var e,n,i,r,a,o,s=this._getCanvasCache(),c=this._getCachedSceneCanvas(),l=s.hit,u=l.getContext(),h=l.getWidth(),d=l.getHeight();u.clear(),u.drawImage(c._canvas,0,0,h,d);try{for(e=u.getImageData(0,0,h,d),n=e.data,i=n.length,r=C._hexToRgb(this.colorKey),a=0;a<i;a+=4)o=n[a+3],o>t?(n[a]=r.r,n[a+1]=r.g,n[a+2]=r.b,n[a+3]=255):n[a+3]=0;u.putImageData(e,0,0)}catch(f){C.error("Unable to draw hit graph from cached scene canvas. "+f.message)}return this}hasPointerCapture(t){return Rt(t,this)}setPointerCapture(t){It(t,this)}releaseCapture(t){Nt(t,this)}}Re.prototype._fillFunc=xe,Re.prototype._strokeFunc=Ce,Re.prototype._fillFuncHit=De,Re.prototype._strokeFuncHit=Te,Re.prototype._centroid=!1,Re.prototype.nodeType="Shape",s(Re),Re.prototype.eventListeners={},Re.prototype.on.call(Re.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Oe),Re.prototype.on.call(Re.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",Ee),Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",Ae),Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",Pe),Re.prototype.on.call(Re.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",Me),F.addGetterSetter(Re,"stroke",void 0,M()),F.addGetterSetter(Re,"strokeWidth",2,O()),F.addGetterSetter(Re,"fillAfterStrokeEnabled",!1),F.addGetterSetter(Re,"hitStrokeWidth","auto",A()),F.addGetterSetter(Re,"strokeHitEnabled",!0,I()),F.addGetterSetter(Re,"perfectDrawEnabled",!0,I()),F.addGetterSetter(Re,"shadowForStrokeEnabled",!0,I()),F.addGetterSetter(Re,"lineJoin"),F.addGetterSetter(Re,"lineCap"),F.addGetterSetter(Re,"sceneFunc"),F.addGetterSetter(Re,"hitFunc"),F.addGetterSetter(Re,"dash"),F.addGetterSetter(Re,"dashOffset",0,O()),F.addGetterSetter(Re,"shadowColor",void 0,P()),F.addGetterSetter(Re,"shadowBlur",0,O()),F.addGetterSetter(Re,"shadowOpacity",1,O()),F.addComponentsGetterSetter(Re,"shadowOffset",["x","y"]),F.addGetterSetter(Re,"shadowOffsetX",0,O()),F.addGetterSetter(Re,"shadowOffsetY",0,O()),F.addGetterSetter(Re,"fillPatternImage"),F.addGetterSetter(Re,"fill",void 0,M()),F.addGetterSetter(Re,"fillPatternX",0,O()),F.addGetterSetter(Re,"fillPatternY",0,O()),F.addGetterSetter(Re,"fillLinearGradientColorStops"),F.addGetterSetter(Re,"strokeLinearGradientColorStops"),F.addGetterSetter(Re,"fillRadialGradientStartRadius",0),F.addGetterSetter(Re,"fillRadialGradientEndRadius",0),F.addGetterSetter(Re,"fillRadialGradientColorStops"),F.addGetterSetter(Re,"fillPatternRepeat","repeat"),F.addGetterSetter(Re,"fillEnabled",!0),F.addGetterSetter(Re,"strokeEnabled",!0),F.addGetterSetter(Re,"shadowEnabled",!0),F.addGetterSetter(Re,"dashEnabled",!0),F.addGetterSetter(Re,"strokeScaleEnabled",!0),F.addGetterSetter(Re,"fillPriority","color"),F.addComponentsGetterSetter(Re,"fillPatternOffset",["x","y"]),F.addGetterSetter(Re,"fillPatternOffsetX",0,O()),F.addGetterSetter(Re,"fillPatternOffsetY",0,O()),F.addComponentsGetterSetter(Re,"fillPatternScale",["x","y"]),F.addGetterSetter(Re,"fillPatternScaleX",1,O()),F.addGetterSetter(Re,"fillPatternScaleY",1,O()),F.addComponentsGetterSetter(Re,"fillLinearGradientStartPoint",["x","y"]),F.addComponentsGetterSetter(Re,"strokeLinearGradientStartPoint",["x","y"]),F.addGetterSetter(Re,"fillLinearGradientStartPointX",0),F.addGetterSetter(Re,"strokeLinearGradientStartPointX",0),F.addGetterSetter(Re,"fillLinearGradientStartPointY",0),F.addGetterSetter(Re,"strokeLinearGradientStartPointY",0),F.addComponentsGetterSetter(Re,"fillLinearGradientEndPoint",["x","y"]),F.addComponentsGetterSetter(Re,"strokeLinearGradientEndPoint",["x","y"]),F.addGetterSetter(Re,"fillLinearGradientEndPointX",0),F.addGetterSetter(Re,"strokeLinearGradientEndPointX",0),F.addGetterSetter(Re,"fillLinearGradientEndPointY",0),F.addGetterSetter(Re,"strokeLinearGradientEndPointY",0),F.addComponentsGetterSetter(Re,"fillRadialGradientStartPoint",["x","y"]),F.addGetterSetter(Re,"fillRadialGradientStartPointX",0),F.addGetterSetter(Re,"fillRadialGradientStartPointY",0),F.addComponentsGetterSetter(Re,"fillRadialGradientEndPoint",["x","y"]),F.addGetterSetter(Re,"fillRadialGradientEndPointX",0),F.addGetterSetter(Re,"fillRadialGradientEndPointY",0),F.addGetterSetter(Re,"fillPatternRotation",0),F.backCompat(Re,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"});var Ie="#",Ne="beforeDraw",$e="draw",Le=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],Fe=Le.length;class Be extends Ot{constructor(t){super(t),this.canvas=new it,this.hitCanvas=new rt({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){const t=this.canvas._canvas;return t.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);var e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){Dt.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){var t=Dt.prototype.moveUp.call(this);if(!t)return!1;var e=this.getStage();return!(!e||!e.content)&&(e.content.removeChild(this.getNativeCanvasElement()),this.index<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[this.index+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(Dt.prototype.moveDown.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(Dt.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){var t=this.getNativeCanvasElement();return Dt.prototype.remove.call(this),t&&t.parentNode&&C._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&C["throw"]("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return t=t||{},t.width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=void 0!==t.x?t.x:this.x(),t.y=void 0!==t.y?t.y:this.y(),Dt.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){const t=this.visible();this.canvas._canvas.style.display=t?"block":"none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){C.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){C.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,C.requestAnimFrame((()=>{this.draw(),this._waitingForDraw=!1}))),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;var e=1,n=!1;while(1){for(let i=0;i<Fe;i++){const r=Le[i],a=this._getIntersection({x:t.x+r.x*e,y:t.y+r.y*e}),o=a.shape;if(o)return o;if(n=!!a.antialiased,!a.antialiased)break}if(!n)return null;e+=1}}_getIntersection(t){const e=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,i=n[3];if(255===i){const t=C._rgbToHex(n[0],n[1],n[2]),e=Se[Ie+t];return e?{shape:e}:{antialiased:!0}}return i>0?{antialiased:!0}:{}}drawScene(t,e){var n=this.getLayer(),i=t||n&&n.getCanvas();return this._fire(Ne,{node:this}),this.clearBeforeDraw()&&i.getContext().clear(),Ot.prototype.drawScene.call(this,i,e),this._fire($e,{node:this}),this}drawHit(t,e){var n=this.getLayer(),i=t||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),Ot.prototype.drawHit.call(this,i,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){C.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return C.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(this.parent&&this.parent["content"]){var t=this.parent,e=!!this.hitCanvas._canvas.parentNode;e?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}}Be.prototype.nodeType="Layer",s(Be),F.addGetterSetter(Be,"imageSmoothingEnabled",!0),F.addGetterSetter(Be,"clearBeforeDraw",!0),F.addGetterSetter(Be,"hitGraphEnabled",!0,I());class je extends Be{constructor(t){super(t),this.listening(!1),C.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}je.prototype.nodeType="FastLayer",s(je);class ze extends Ot{_validateAdd(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&C["throw"]("You may only add groups and shapes to groups.")}}ze.prototype.nodeType="Group",s(ze);var He=function(){return a.performance&&a.performance.now?function(){return a.performance.now()}:function(){return(new Date).getTime()}}();class Ve{constructor(t,e){this.id=Ve.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:He(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){var e=[];return e=t?t.length>0?t:[t]:[],this.layers=e,this}getLayers(){return this.layers}addLayer(t){var e,n=this.layers,i=n.length;for(e=0;e<i;e++)if(n[e]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){var t,e=Ve,n=e.animations,i=n.length;for(t=0;t<i;t++)if(n[t].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=He(),Ve._addAnimation(this),this}stop(){return Ve._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){var e,n=t.id,i=this.animations,r=i.length;for(e=0;e<r;e++)if(i[e].id===n){this.animations.splice(e,1);break}}static _runFrames(){var t,e,n,i,r,a,o,s,c,l={},u=this.animations;for(i=0;i<u.length;i++)if(t=u[i],e=t.layers,n=t.func,t._updateFrameObject(He()),a=e.length,c=!n||!1!==n.call(t,t.frame),c)for(r=0;r<a;r++)o=e[r],void 0!==o._id&&(l[o._id]=o);for(s in l)l.hasOwnProperty(s)&&l[s].batchDraw()}static _animationLoop(){var t=Ve;t.animations.length?(t._runFrames(),C.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,C.requestAnimFrame(this._animationLoop))}}Ve.animations=[],Ve.animIdCounter=0,Ve.animRunning=!1;var Ge={node:1,duration:1,easing:1,onFinish:1,yoyo:1},We=1,Ue=2,Ye=3,qe=0,Xe=["fill","stroke","shadowColor"];class Ke{constructor(t,e,n,i,r,a,o){this.prop=t,this.propFunc=e,this.begin=i,this._pos=i,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=r-this.begin,this.pause()}fire(t){var e=this[t];e&&e()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=Ue,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=Ye,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){var t=this.getTimer()-this._startTime;this.state===Ue?this.setTime(t):this.state===Ye&&this.setTime(this.duration-t)}pause(){this.state=We,this.fire("onPause")}getTimer(){return(new Date).getTime()}}class Je{constructor(t){var e,n,i=this,r=t.node,a=r._id,s=t.easing||Ze.Linear,c=!!t.yoyo;e="undefined"===typeof t.duration?.3:0===t.duration?.001:t.duration,this.node=r,this._id=qe++;var l=r.getLayer()||(r instanceof o.Stage?r.getLayers():null);for(n in l||C.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Ve((function(){i.tween.onEnterFrame()}),l),this.tween=new Ke(n,(function(t){i._tweenFunc(t)}),s,0,1,1e3*e,c),this._addListeners(),Je.attrs[a]||(Je.attrs[a]={}),Je.attrs[a][this._id]||(Je.attrs[a][this._id]={}),Je.tweens[a]||(Je.tweens[a]={}),t)void 0===Ge[n]&&this._addAttr(n,t[n]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,e){var n,i,r,a,o,s,c,l,u=this.node,h=u._id;if(r=Je.tweens[h][t],r&&delete Je.attrs[h][r][t],n=u.getAttr(t),C._isArray(e))if(i=[],o=Math.max(e.length,n.length),"points"===t&&e.length!==n.length&&(e.length>n.length?(c=n,n=C._prepareArrayForTween(n,e,u.closed())):(s=e,e=C._prepareArrayForTween(e,n,u.closed()))),0===t.indexOf("fill"))for(a=0;a<o;a++)if(a%2===0)i.push(e[a]-n[a]);else{var d=C.colorToRGBA(n[a]);l=C.colorToRGBA(e[a]),n[a]=d,i.push({r:l.r-d.r,g:l.g-d.g,b:l.b-d.b,a:l.a-d.a})}else for(a=0;a<o;a++)i.push(e[a]-n[a]);else-1!==Xe.indexOf(t)?(n=C.colorToRGBA(n),l=C.colorToRGBA(e),i={r:l.r-n.r,g:l.g-n.g,b:l.b-n.b,a:l.a-n.a}):i=e-n;Je.attrs[h][this._id][t]={start:n,diff:i,end:e,trueEnd:s,trueStart:c},Je.tweens[h][t]=this._id}_tweenFunc(t){var e,n,i,r,a,o,s,c,l=this.node,u=Je.attrs[l._id][this._id];for(e in u){if(n=u[e],i=n.start,r=n.diff,c=n.end,C._isArray(i))if(a=[],s=Math.max(i.length,c.length),0===e.indexOf("fill"))for(o=0;o<s;o++)o%2===0?a.push((i[o]||0)+r[o]*t):a.push("rgba("+Math.round(i[o].r+r[o].r*t)+","+Math.round(i[o].g+r[o].g*t)+","+Math.round(i[o].b+r[o].b*t)+","+(i[o].a+r[o].a*t)+")");else for(o=0;o<s;o++)a.push((i[o]||0)+r[o]*t);else a=-1!==Xe.indexOf(e)?"rgba("+Math.round(i.r+r.r*t)+","+Math.round(i.g+r.g*t)+","+Math.round(i.b+r.b*t)+","+(i.a+r.a*t)+")":i+r*t;l.setAttr(e,a)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{var t=this.node,e=Je.attrs[t._id][this._id];e.points&&e.points.trueEnd&&t.setAttr("points",e.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{var t=this.node,e=Je.attrs[t._id][this._id];e.points&&e.points.trueStart&&t.points(e.points.trueStart),this.onReset&&this.onReset()},this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(1e3*t),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){var t,e=this.node._id,n=this._id,i=Je.tweens[e];for(t in this.pause(),i)delete Je.tweens[e][t];delete Je.attrs[e][n]}}Je.attrs={},Je.tweens={},Dt.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()};var n=new Je(t);n.play()};const Ze={BackEaseIn(t,e,n,i){var r=1.70158;return n*(t/=i)*t*((r+1)*t-r)+e},BackEaseOut(t,e,n,i){var r=1.70158;return n*((t=t/i-1)*t*((r+1)*t+r)+1)+e},BackEaseInOut(t,e,n,i){var r=1.70158;return(t/=i/2)<1?n/2*(t*t*((1+(r*=1.525))*t-r))+e:n/2*((t-=2)*t*((1+(r*=1.525))*t+r)+2)+e},ElasticEaseIn(t,e,n,i,r,a){var o=0;return 0===t?e:1===(t/=i)?e+n:(a||(a=.3*i),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),-r*Math.pow(2,10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)+e)},ElasticEaseOut(t,e,n,i,r,a){var o=0;return 0===t?e:1===(t/=i)?e+n:(a||(a=.3*i),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),r*Math.pow(2,-10*t)*Math.sin((t*i-o)*(2*Math.PI)/a)+n+e)},ElasticEaseInOut(t,e,n,i,r,a){var o=0;return 0===t?e:2===(t/=i/2)?e+n:(a||(a=i*(.3*1.5)),!r||r<Math.abs(n)?(r=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/r),t<1?r*Math.pow(2,10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)*-.5+e:r*Math.pow(2,-10*(t-=1))*Math.sin((t*i-o)*(2*Math.PI)/a)*.5+n+e)},BounceEaseOut(t,e,n,i){return(t/=i)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e},BounceEaseIn(t,e,n,i){return n-Ze.BounceEaseOut(i-t,0,n,i)+e},BounceEaseInOut(t,e,n,i){return t<i/2?.5*Ze.BounceEaseIn(2*t,0,n,i)+e:.5*Ze.BounceEaseOut(2*t-i,0,n,i)+.5*n+e},EaseIn(t,e,n,i){return n*(t/=i)*t+e},EaseOut(t,e,n,i){return-n*(t/=i)*(t-2)+e},EaseInOut(t,e,n,i){return(t/=i/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},StrongEaseIn(t,e,n,i){return n*(t/=i)*t*t*t*t+e},StrongEaseOut(t,e,n,i){return n*((t=t/i-1)*t*t*t*t+1)+e},StrongEaseInOut(t,e,n,i){return(t/=i/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},Linear(t,e,n,i){return n*t/i+e}},Qe=C._assign(o,{Util:C,Transform:c,Node:Dt,Container:Ot,Stage:ve,stages:pe,Layer:Be,FastLayer:je,Group:ze,DD:at,Shape:Re,shapes:Se,Animation:Ve,Tween:Je,Easings:Ze,Context:J,Canvas:nt});class tn extends Re{_sceneFunc(t){var e=o.getAngle(this.angle()),n=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,n),t.arc(0,0,this.innerRadius(),e,0,!n),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){const t=this.innerRadius(),e=this.outerRadius(),n=this.clockwise(),i=o.getAngle(n?360-this.angle():this.angle()),r=Math.cos(Math.min(i,Math.PI)),a=1,s=Math.sin(Math.min(Math.max(Math.PI,i),3*Math.PI/2)),c=Math.sin(Math.min(i,Math.PI/2)),l=r*(r>0?t:e),u=a*(a>0?e:t),h=s*(s>0?t:e),d=c*(c>0?e:t);return{x:l,y:n?-1*d:h,width:u-l,height:d-h}}}function en(t,e,n,i,r,a,o){var s=Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2)),c=Math.sqrt(Math.pow(r-n,2)+Math.pow(a-i,2)),l=o*s/(s+c),u=o*c/(s+c),h=n-l*(r-t),d=i-l*(a-e),f=n+u*(r-t),p=i+u*(a-e);return[h,d,f,p]}function nn(t,e){var n,i,r=t.length,a=[];for(n=2;n<r-2;n+=2)i=en(t[n-2],t[n-1],t[n],t[n+1],t[n+2],t[n+3],e),isNaN(i[0])||(a.push(i[0]),a.push(i[1]),a.push(t[n]),a.push(t[n+1]),a.push(i[2]),a.push(i[3]));return a}tn.prototype._centroid=!0,tn.prototype.className="Arc",tn.prototype._attrsAffectingSize=["innerRadius","outerRadius"],s(tn),F.addGetterSetter(tn,"innerRadius",0,O()),F.addGetterSetter(tn,"outerRadius",0,O()),F.addGetterSetter(tn,"angle",0,O()),F.addGetterSetter(tn,"clockwise",!1,I());class rn extends Re{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",(function(){this._clearCache("tensionPoints")}))}_sceneFunc(t){var e,n,i,r=this.points(),a=r.length,o=this.tension(),s=this.closed(),c=this.bezier();if(a){if(t.beginPath(),t.moveTo(r[0],r[1]),0!==o&&a>4){e=this.getTensionPoints(),n=e.length,i=s?0:4,s||t.quadraticCurveTo(e[0],e[1],e[2],e[3]);while(i<n-2)t.bezierCurveTo(e[i++],e[i++],e[i++],e[i++],e[i++],e[i++]);s||t.quadraticCurveTo(e[n-2],e[n-1],r[a-2],r[a-1])}else if(c){i=2;while(i<a)t.bezierCurveTo(r[i++],r[i++],r[i++],r[i++],r[i++],r[i++])}else for(i=2;i<a;i+=2)t.lineTo(r[i],r[i+1]);s?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():nn(this.points(),this.tension())}_getTensionPointsClosed(){var t=this.points(),e=t.length,n=this.tension(),i=en(t[e-2],t[e-1],t[0],t[1],t[2],t[3],n),r=en(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],n),a=nn(t,n),o=[i[2],i[3]].concat(a).concat([r[0],r[1],t[e-2],t[e-1],r[2],r[3],i[0],i[1],t[0],t[1]]);return o}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){var t=this.points();if(t.length<4)return{x:t[0]||0,y:t[1]||0,width:0,height:0};t=0!==this.tension()?[t[0],t[1],...this._getTensionPoints(),t[t.length-2],t[t.length-1]]:this.points();for(var e,n,i=t[0],r=t[0],a=t[1],o=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],i=Math.min(i,e),r=Math.max(r,e),a=Math.min(a,n),o=Math.max(o,n);return{x:i,y:a,width:r-i,height:o-a}}}rn.prototype.className="Line",rn.prototype._attrsAffectingSize=["points","bezier","tension"],s(rn),F.addGetterSetter(rn,"closed",!1),F.addGetterSetter(rn,"bezier",!1),F.addGetterSetter(rn,"tension",0,O()),F.addGetterSetter(rn,"points",[],R());class an extends Re{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this.dataArray=an.parsePathData(this.data()),this.pathLength=0;for(var e=0;e<this.dataArray.length;++e)this.pathLength+=this.dataArray[e].pathLength;this.on("dataChange.konva",(function(){this.dataArray=an.parsePathData(this.data()),this.pathLength=0;for(var t=0;t<this.dataArray.length;++t)this.pathLength+=this.dataArray[t].pathLength}))}_sceneFunc(t){var e=this.dataArray;t.beginPath();for(var n=!1,i=0;i<e.length;i++){var r=e[i].command,a=e[i].points;switch(r){case"L":t.lineTo(a[0],a[1]);break;case"M":t.moveTo(a[0],a[1]);break;case"C":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"Q":t.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case"A":var o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],h=a[5],d=a[6],f=a[7],p=c>l?c:l,v=c>l?1:c/l,m=c>l?l/c:1;t.translate(o,s),t.rotate(d),t.scale(v,m),t.arc(0,0,p,u,u+h,1-f),t.scale(1/v,1/m),t.rotate(-d),t.translate(-o,-s);break;case"z":n=!0,t.closePath();break}}n||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){var t=[];this.dataArray.forEach((function(e){if("A"===e.command){var n=e.points[4],i=e.points[5],r=e.points[4]+i,a=Math.PI/180;if(Math.abs(n-r)<a&&(a=Math.abs(n-r)),i<0)for(let i=n-a;i>r;i-=a){const n=an.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],i,0);t.push(n.x,n.y)}else for(let i=n+a;i<r;i+=a){const n=an.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],i,0);t.push(n.x,n.y)}}else if("C"===e.command)for(let o=0;o<=1;o+=.01){const n=an.getPointOnCubicBezier(o,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3],e.points[4],e.points[5]);t.push(n.x,n.y)}else t=t.concat(e.points)}));for(var e,n,i=t[0],r=t[0],a=t[1],o=t[1],s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],isNaN(e)||(i=Math.min(i,e),r=Math.max(r,e)),isNaN(n)||(a=Math.min(a,n),o=Math.max(o,n));return{x:i,y:a,width:r-i,height:o-a}}getLength(){return this.pathLength}getPointAtLength(t){var e,n=0,i=this.dataArray.length;if(!i)return null;while(n<i&&t>this.dataArray[n].pathLength)t-=this.dataArray[n].pathLength,++n;if(n===i)return e=this.dataArray[n-1].points.slice(-2),{x:e[0],y:e[1]};if(t<.01)return e=this.dataArray[n].points.slice(0,2),{x:e[0],y:e[1]};var r=this.dataArray[n],a=r.points;switch(r.command){case"L":return an.getPointOnLine(t,r.start.x,r.start.y,a[0],a[1]);case"C":return an.getPointOnCubicBezier(t/r.pathLength,r.start.x,r.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return an.getPointOnQuadraticBezier(t/r.pathLength,r.start.x,r.start.y,a[0],a[1],a[2],a[3]);case"A":var o=a[0],s=a[1],c=a[2],l=a[3],u=a[4],h=a[5],d=a[6];return u+=h*t/r.pathLength,an.getPointOnEllipticalArc(o,s,c,l,u,d)}return null}static getLineLength(t,e,n,i){return Math.sqrt((n-t)*(n-t)+(i-e)*(i-e))}static getPointOnLine(t,e,n,i,r,a,o){void 0===a&&(a=e),void 0===o&&(o=n);var s=(r-n)/(i-e+1e-8),c=Math.sqrt(t*t/(1+s*s));i<e&&(c*=-1);var l,u=s*c;if(i===e)l={x:a,y:o+u};else if((o-n)/(a-e+1e-8)===s)l={x:a+c,y:o+u};else{var h,d,f=this.getLineLength(e,n,i,r),p=(a-e)*(i-e)+(o-n)*(r-n);p/=f*f,h=e+p*(i-e),d=n+p*(r-n);var v=this.getLineLength(a,o,h,d),m=Math.sqrt(t*t-v*v);c=Math.sqrt(m*m/(1+s*s)),i<e&&(c*=-1),u=s*c,l={x:h+c,y:d+u}}return l}static getPointOnCubicBezier(t,e,n,i,r,a,o,s,c){function l(t){return t*t*t}function u(t){return 3*t*t*(1-t)}function h(t){return 3*t*(1-t)*(1-t)}function d(t){return(1-t)*(1-t)*(1-t)}var f=s*l(t)+a*u(t)+i*h(t)+e*d(t),p=c*l(t)+o*u(t)+r*h(t)+n*d(t);return{x:f,y:p}}static getPointOnQuadraticBezier(t,e,n,i,r,a,o){function s(t){return t*t}function c(t){return 2*t*(1-t)}function l(t){return(1-t)*(1-t)}var u=a*s(t)+i*c(t)+e*l(t),h=o*s(t)+r*c(t)+n*l(t);return{x:u,y:h}}static getPointOnEllipticalArc(t,e,n,i,r,a){var o=Math.cos(a),s=Math.sin(a),c={x:n*Math.cos(r),y:i*Math.sin(r)};return{x:t+(c.x*o-c.y*s),y:e+(c.x*s+c.y*o)}}static parsePathData(t){if(!t)return[];var e=t,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(var i=0;i<n.length;i++)e=e.replace(new RegExp(n[i],"g"),"|"+n[i]);var r,a=e.split("|"),o=[],s=[],c=0,l=0,u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(i=1;i<a.length;i++){var h=a[i],d=h.charAt(0);h=h.slice(1),s.length=0;while(r=u.exec(h))s.push(r[0]);for(var f=[],p=0,v=s.length;p<v;p++)if("00"!==s[p]){var m=parseFloat(s[p]);isNaN(m)?f.push(0):f.push(m)}else f.push(0,0);while(f.length>0){if(isNaN(f[0]))break;var g,y,b,_,w,k,S,x,C,D,T=null,O=[],E=c,A=l;switch(d){case"l":c+=f.shift(),l+=f.shift(),T="L",O.push(c,l);break;case"L":c=f.shift(),l=f.shift(),O.push(c,l);break;case"m":var P=f.shift(),M=f.shift();if(c+=P,l+=M,T="M",o.length>2&&"z"===o[o.length-1].command)for(var R=o.length-2;R>=0;R--)if("M"===o[R].command){c=o[R].points[0]+P,l=o[R].points[1]+M;break}O.push(c,l),d="l";break;case"M":c=f.shift(),l=f.shift(),T="M",O.push(c,l),d="L";break;case"h":c+=f.shift(),T="L",O.push(c,l);break;case"H":c=f.shift(),T="L",O.push(c,l);break;case"v":l+=f.shift(),T="L",O.push(c,l);break;case"V":l=f.shift(),T="L",O.push(c,l);break;case"C":O.push(f.shift(),f.shift(),f.shift(),f.shift()),c=f.shift(),l=f.shift(),O.push(c,l);break;case"c":O.push(c+f.shift(),l+f.shift(),c+f.shift(),l+f.shift()),c+=f.shift(),l+=f.shift(),T="C",O.push(c,l);break;case"S":y=c,b=l,g=o[o.length-1],"C"===g.command&&(y=c+(c-g.points[2]),b=l+(l-g.points[3])),O.push(y,b,f.shift(),f.shift()),c=f.shift(),l=f.shift(),T="C",O.push(c,l);break;case"s":y=c,b=l,g=o[o.length-1],"C"===g.command&&(y=c+(c-g.points[2]),b=l+(l-g.points[3])),O.push(y,b,c+f.shift(),l+f.shift()),c+=f.shift(),l+=f.shift(),T="C",O.push(c,l);break;case"Q":O.push(f.shift(),f.shift()),c=f.shift(),l=f.shift(),O.push(c,l);break;case"q":O.push(c+f.shift(),l+f.shift()),c+=f.shift(),l+=f.shift(),T="Q",O.push(c,l);break;case"T":y=c,b=l,g=o[o.length-1],"Q"===g.command&&(y=c+(c-g.points[0]),b=l+(l-g.points[1])),c=f.shift(),l=f.shift(),T="Q",O.push(y,b,c,l);break;case"t":y=c,b=l,g=o[o.length-1],"Q"===g.command&&(y=c+(c-g.points[0]),b=l+(l-g.points[1])),c+=f.shift(),l+=f.shift(),T="Q",O.push(y,b,c,l);break;case"A":_=f.shift(),w=f.shift(),k=f.shift(),S=f.shift(),x=f.shift(),C=c,D=l,c=f.shift(),l=f.shift(),T="A",O=this.convertEndpointToCenterParameterization(C,D,c,l,S,x,_,w,k);break;case"a":_=f.shift(),w=f.shift(),k=f.shift(),S=f.shift(),x=f.shift(),C=c,D=l,c+=f.shift(),l+=f.shift(),T="A",O=this.convertEndpointToCenterParameterization(C,D,c,l,S,x,_,w,k);break}o.push({command:T||d,points:O,start:{x:E,y:A},pathLength:this.calcLength(E,A,T||d,O)})}"z"!==d&&"Z"!==d||o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,e,n,i){var r,a,o,s,c=an;switch(n){case"L":return c.getLineLength(t,e,i[0],i[1]);case"C":for(r=0,a=c.getPointOnCubicBezier(0,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),s=.01;s<=1;s+=.01)o=c.getPointOnCubicBezier(s,t,e,i[0],i[1],i[2],i[3],i[4],i[5]),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return r;case"Q":for(r=0,a=c.getPointOnQuadraticBezier(0,t,e,i[0],i[1],i[2],i[3]),s=.01;s<=1;s+=.01)o=c.getPointOnQuadraticBezier(s,t,e,i[0],i[1],i[2],i[3]),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return r;case"A":r=0;var l=i[4],u=i[5],h=i[4]+u,d=Math.PI/180;if(Math.abs(l-h)<d&&(d=Math.abs(l-h)),a=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),u<0)for(s=l-d;s>h;s-=d)o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],s,0),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;else for(s=l+d;s<h;s+=d)o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],s,0),r+=c.getLineLength(a.x,a.y,o.x,o.y),a=o;return o=c.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),r+=c.getLineLength(a.x,a.y,o.x,o.y),r}return 0}static convertEndpointToCenterParameterization(t,e,n,i,r,a,o,s,c){var l=c*(Math.PI/180),u=Math.cos(l)*(t-n)/2+Math.sin(l)*(e-i)/2,h=-1*Math.sin(l)*(t-n)/2+Math.cos(l)*(e-i)/2,d=u*u/(o*o)+h*h/(s*s);d>1&&(o*=Math.sqrt(d),s*=Math.sqrt(d));var f=Math.sqrt((o*o*(s*s)-o*o*(h*h)-s*s*(u*u))/(o*o*(h*h)+s*s*(u*u)));r===a&&(f*=-1),isNaN(f)&&(f=0);var p=f*o*h/s,v=f*-s*u/o,m=(t+n)/2+Math.cos(l)*p-Math.sin(l)*v,g=(e+i)/2+Math.sin(l)*p+Math.cos(l)*v,y=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},b=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(y(t)*y(e))},_=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(b(t,e))},w=_([1,0],[(u-p)/o,(h-v)/s]),k=[(u-p)/o,(h-v)/s],S=[(-1*u-p)/o,(-1*h-v)/s],x=_(k,S);return b(k,S)<=-1&&(x=Math.PI),b(k,S)>=1&&(x=0),0===a&&x>0&&(x-=2*Math.PI),1===a&&x<0&&(x+=2*Math.PI),[m,g,o,s,w,x,l,a]}}an.prototype.className="Path",an.prototype._attrsAffectingSize=["data"],s(an),F.addGetterSetter(an,"data");class on extends rn{_sceneFunc(t){super._sceneFunc(t);var e=2*Math.PI,n=this.points(),i=n,r=0!==this.tension()&&n.length>4;r&&(i=this.getTensionPoints());var a,o,s=this.pointerLength(),c=n.length;if(r){const t=[i[i.length-4],i[i.length-3],i[i.length-2],i[i.length-1],n[c-2],n[c-1]],e=an.calcLength(i[i.length-4],i[i.length-3],"C",t),r=an.getPointOnQuadraticBezier(Math.min(1,1-s/e),t[0],t[1],t[2],t[3],t[4],t[5]);a=n[c-2]-r.x,o=n[c-1]-r.y}else a=n[c-2]-n[c-4],o=n[c-1]-n[c-3];var l=(Math.atan2(o,a)+e)%e,u=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[c-2],n[c-1]),t.rotate(l),t.moveTo(0,0),t.lineTo(-s,u/2),t.lineTo(-s,-u/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),r?(a=(i[0]+i[2])/2-n[0],o=(i[1]+i[3])/2-n[1]):(a=n[2]-n[0],o=n[3]-n[1]),t.rotate((Math.atan2(-o,-a)+e)%e),t.moveTo(0,0),t.lineTo(-s,u/2),t.lineTo(-s,-u/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){var e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){const t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x-e,y:t.y-e,width:t.width+2*e,height:t.height+2*e}}}on.prototype.className="Arrow",s(on),F.addGetterSetter(on,"pointerLength",10,O()),F.addGetterSetter(on,"pointerWidth",10,O()),F.addGetterSetter(on,"pointerAtBeginning",!1),F.addGetterSetter(on,"pointerAtEnding",!0);class sn extends Re{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}sn.prototype._centroid=!0,sn.prototype.className="Circle",sn.prototype._attrsAffectingSize=["radius"],s(sn),F.addGetterSetter(sn,"radius",0,O());class cn extends Re{_sceneFunc(t){var e=this.radiusX(),n=this.radiusY();t.beginPath(),t.save(),e!==n&&t.scale(1,n/e),t.arc(0,0,e,0,2*Math.PI,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}cn.prototype.className="Ellipse",cn.prototype._centroid=!0,cn.prototype._attrsAffectingSize=["radiusX","radiusY"],s(cn),F.addComponentsGetterSetter(cn,"radius",["x","y"]),F.addGetterSetter(cn,"radiusX",0,O()),F.addGetterSetter(cn,"radiusY",0,O());class ln extends Re{constructor(t){super(t),this.on("imageChange.konva",(()=>{this._setImageLoad()})),this._setImageLoad()}_setImageLoad(){const t=this.image();t&&t.complete||t&&4===t.readyState||t&&t["addEventListener"]&&t["addEventListener"]("load",(()=>{this._requestDraw()}))}_useBufferCanvas(){return super._useBufferCanvas(!0)}_sceneFunc(t){const e=this.getWidth(),n=this.getHeight(),i=this.attrs.image;let r;if(i){const t=this.attrs.cropWidth,a=this.attrs.cropHeight;r=t&&a?[i,this.cropX(),this.cropY(),t,a,0,0,e,n]:[i,0,0,e,n]}(this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)),i&&t.drawImage.apply(t,r)}_hitFunc(t){var e=this.width(),n=this.height();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width}getHeight(){var t,e;return null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height}static fromURL(t,e,n=null){var i=C.createImageElement();i.onload=function(){var t=new ln({image:i});e(t)},i.onerror=n,i.crossOrigin="Anonymous",i.src=t}}ln.prototype.className="Image",s(ln),F.addGetterSetter(ln,"image"),F.addComponentsGetterSetter(ln,"crop",["x","y","width","height"]),F.addGetterSetter(ln,"cropX",0,O()),F.addGetterSetter(ln,"cropY",0,O()),F.addGetterSetter(ln,"cropWidth",0,O()),F.addGetterSetter(ln,"cropHeight",0,O());var un=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],hn="Change.konva",dn="none",fn="up",pn="right",vn="down",mn="left",gn=un.length;class yn extends ze{constructor(t){super(t),this.on("add.konva",(function(t){this._addListeners(t.child),this._sync()}))}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){var e,n=this,i=function(){n._sync()};for(e=0;e<gn;e++)t.on(un[e]+hn,i)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){var t,e,n,i,r,a,o,s=this.getText(),c=this.getTag();if(s&&c){switch(t=s.width(),e=s.height(),n=c.pointerDirection(),i=c.pointerWidth(),o=c.pointerHeight(),r=0,a=0,n){case fn:r=t/2,a=-1*o;break;case pn:r=t+i,a=e/2;break;case vn:r=t/2,a=e+o;break;case mn:r=-1*i,a=e/2;break}c.setAttrs({x:-1*r,y:-1*a,width:t,height:e}),s.setAttrs({x:-1*r,y:-1*a})}}}yn.prototype.className="Label",s(yn);class bn extends Re{_sceneFunc(t){var e=this.width(),n=this.height(),i=this.pointerDirection(),r=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius();let s=0,c=0,l=0,u=0;"number"===typeof o?s=c=l=u=Math.min(o,e/2,n/2):(s=Math.min(o[0]||0,e/2,n/2),c=Math.min(o[1]||0,e/2,n/2),u=Math.min(o[2]||0,e/2,n/2),l=Math.min(o[3]||0,e/2,n/2)),t.beginPath(),t.moveTo(s,0),i===fn&&(t.lineTo((e-r)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+r)/2,0)),t.lineTo(e-c,0),t.arc(e-c,c,c,3*Math.PI/2,0,!1),i===pn&&(t.lineTo(e,(n-a)/2),t.lineTo(e+r,n/2),t.lineTo(e,(n+a)/2)),t.lineTo(e,n-u),t.arc(e-u,n-u,u,0,Math.PI/2,!1),i===vn&&(t.lineTo((e+r)/2,n),t.lineTo(e/2,n+a),t.lineTo((e-r)/2,n)),t.lineTo(l,n),t.arc(l,n-l,l,Math.PI/2,Math.PI,!1),i===mn&&(t.lineTo(0,(n+a)/2),t.lineTo(-1*r,n/2),t.lineTo(0,(n-a)/2)),t.lineTo(0,s),t.arc(s,s,s,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){var t=0,e=0,n=this.pointerWidth(),i=this.pointerHeight(),r=this.pointerDirection(),a=this.width(),o=this.height();return r===fn?(e-=i,o+=i):r===vn?o+=i:r===mn?(t-=1.5*n,a+=n):r===pn&&(a+=1.5*n),{x:t,y:e,width:a,height:o}}}bn.prototype.className="Tag",s(bn),F.addGetterSetter(bn,"pointerDirection",dn),F.addGetterSetter(bn,"pointerWidth",0,O()),F.addGetterSetter(bn,"pointerHeight",0,O()),F.addGetterSetter(bn,"cornerRadius",0,E(4));class _n extends Re{_sceneFunc(t){var e=this.cornerRadius(),n=this.width(),i=this.height();if(t.beginPath(),e){let r=0,a=0,o=0,s=0;"number"===typeof e?r=a=o=s=Math.min(e,n/2,i/2):(r=Math.min(e[0]||0,n/2,i/2),a=Math.min(e[1]||0,n/2,i/2),s=Math.min(e[2]||0,n/2,i/2),o=Math.min(e[3]||0,n/2,i/2)),t.moveTo(r,0),t.lineTo(n-a,0),t.arc(n-a,a,a,3*Math.PI/2,0,!1),t.lineTo(n,i-s),t.arc(n-s,i-s,s,0,Math.PI/2,!1),t.lineTo(o,i),t.arc(o,i-o,o,Math.PI/2,Math.PI,!1),t.lineTo(0,r),t.arc(r,r,r,Math.PI,3*Math.PI/2,!1)}else t.rect(0,0,n,i);t.closePath(),t.fillStrokeShape(this)}}_n.prototype.className="Rect",s(_n),F.addGetterSetter(_n,"cornerRadius",0,E(4));class wn extends Re{_sceneFunc(t){const e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var n=1;n<e.length;n++)t.lineTo(e[n].x,e[n].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){const t=this.attrs.sides,e=this.attrs.radius||0,n=[];for(var i=0;i<t;i++)n.push({x:e*Math.sin(2*i*Math.PI/t),y:-1*e*Math.cos(2*i*Math.PI/t)});return n}getSelfRect(){const t=this._getPoints();var e=t[0].x,n=t[0].y,i=t[0].x,r=t[0].y;return t.forEach((t=>{e=Math.min(e,t.x),n=Math.max(n,t.x),i=Math.min(i,t.y),r=Math.max(r,t.y)})),{x:e,y:i,width:n-e,height:r-i}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}wn.prototype.className="RegularPolygon",wn.prototype._centroid=!0,wn.prototype._attrsAffectingSize=["radius"],s(wn),F.addGetterSetter(wn,"radius",0,O()),F.addGetterSetter(wn,"sides",0,O());var kn=2*Math.PI;class Sn extends Re{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,kn,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),kn,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}Sn.prototype.className="Ring",Sn.prototype._centroid=!0,Sn.prototype._attrsAffectingSize=["innerRadius","outerRadius"],s(Sn),F.addGetterSetter(Sn,"innerRadius",0,O()),F.addGetterSetter(Sn,"outerRadius",0,O());class xn extends Re{constructor(t){super(t),this._updated=!0,this.anim=new Ve((()=>{var t=this._updated;return this._updated=!1,t})),this.on("animationChange.konva",(function(){this.frameIndex(0)})),this.on("frameIndexChange.konva",(function(){this._updated=!0})),this.on("frameRateChange.konva",(function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())}))}_sceneFunc(t){var e=this.animation(),n=this.frameIndex(),i=4*n,r=this.animations()[e],a=this.frameOffsets(),o=r[i+0],s=r[i+1],c=r[i+2],l=r[i+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,c,l),t.closePath(),t.fillStrokeShape(this)),u)if(a){var h=a[e],d=2*n;t.drawImage(u,o,s,c,l,h[d+0],h[d+1],c,l)}else t.drawImage(u,o,s,c,l,0,0,c,l)}_hitFunc(t){var e=this.animation(),n=this.frameIndex(),i=4*n,r=this.animations()[e],a=this.frameOffsets(),o=r[i+2],s=r[i+3];if(t.beginPath(),a){var c=a[e],l=2*n;t.rect(c[l+0],c[l+1],o,s)}else t.rect(0,0,o,s);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){var t=this;this.interval=setInterval((function(){t._updateIndex()}),1e3/this.frameRate())}start(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){var t=this.frameIndex(),e=this.animation(),n=this.animations(),i=n[e],r=i.length/4;t<r-1?this.frameIndex(t+1):this.frameIndex(0)}}xn.prototype.className="Sprite",s(xn),F.addGetterSetter(xn,"animation"),F.addGetterSetter(xn,"animations"),F.addGetterSetter(xn,"frameOffsets"),F.addGetterSetter(xn,"image"),F.addGetterSetter(xn,"frameIndex",0,O()),F.addGetterSetter(xn,"frameRate",17,O()),F.backCompat(xn,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"});class Cn extends Re{_sceneFunc(t){var e=this.innerRadius(),n=this.outerRadius(),i=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(var r=1;r<2*i;r++){var a=r%2===0?n:e,o=a*Math.sin(r*Math.PI/i),s=-1*a*Math.cos(r*Math.PI/i);t.lineTo(o,s)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}function Dn(t){return Array.from(t)}Cn.prototype.className="Star",Cn.prototype._centroid=!0,Cn.prototype._attrsAffectingSize=["innerRadius","outerRadius"],s(Cn),F.addGetterSetter(Cn,"numPoints",5,O()),F.addGetterSetter(Cn,"innerRadius",0,O()),F.addGetterSetter(Cn,"outerRadius",0,O());var Tn,On="auto",En="center",An="justify",Pn="Change.konva",Mn="2d",Rn="-",In="left",Nn="text",$n="Text",Ln="top",Fn="bottom",Bn="middle",jn="normal",zn="px ",Hn=" ",Vn="right",Gn="word",Wn="char",Un="none",Yn="…",qn=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],Xn=qn.length;function Kn(t){return t.split(",").map((t=>{t=t.trim();const e=t.indexOf(" ")>=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!n&&(t=`"${t}"`),t})).join(", ")}function Jn(){return Tn||(Tn=C.createCanvasElement().getContext(Mn),Tn)}function Zn(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Qn(t){t.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function ti(t){return t=t||{},t.fillLinearGradientColorStops||t.fillRadialGradientColorStops||t.fillPatternImage||(t.fill=t.fill||"black"),t}class ei extends Re{constructor(t){super(ti(t)),this._partialTextX=0,this._partialTextY=0;for(var e=0;e<Xn;e++)this.on(qn[e]+Pn,this._setTextData);this._setTextData()}_sceneFunc(t){var e=this.textArr,n=e.length;if(this.text()){var i,r=this.padding(),a=this.fontSize(),o=this.lineHeight()*a,s=this.verticalAlign(),c=0,l=this.align(),u=this.getWidth(),h=this.letterSpacing(),d=this.fill(),f=this.textDecoration(),p=-1!==f.indexOf("underline"),v=-1!==f.indexOf("line-through"),m=0,g=(m=o/2,0),y=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",Bn),t.setAttr("textAlign",In),s===Bn?c=(this.getHeight()-n*o-2*r)/2:s===Fn&&(c=this.getHeight()-n*o-2*r),t.translate(r,c+r),i=0;i<n;i++){g=0,y=0;var b,_,w,k=e[i],S=k.text,x=k.width,C=k.lastInParagraph;if(t.save(),l===Vn?g+=u-x-2*r:l===En&&(g+=(u-x-2*r)/2),p&&(t.save(),t.beginPath(),t.moveTo(g,m+y+Math.round(a/2)),b=S.split(" ").length-1,_=0===b,w=l===An&&C&&!_?u-2*r:x,t.lineTo(g+Math.round(w),m+y+Math.round(a/2)),t.lineWidth=a/15,t.strokeStyle=d,t.stroke(),t.restore()),v&&(t.save(),t.beginPath(),t.moveTo(g,m+y),b=S.split(" ").length-1,_=0===b,w=l===An&&C&&!_?u-2*r:x,t.lineTo(g+Math.round(w),m+y),t.lineWidth=a/15,t.strokeStyle=d,t.stroke(),t.restore()),0!==h||l===An){b=S.split(" ").length-1;for(var D=Dn(S),T=0;T<D.length;T++){var O=D[T];" "!==O||C||l!==An||(g+=(u-2*r-x)/b),this._partialTextX=g,this._partialTextY=m+y,this._partialText=O,t.fillStrokeShape(this),g+=this.measureSize(O).width+h}}else this._partialTextX=g,this._partialTextY=m+y,this._partialText=S,t.fillStrokeShape(this);t.restore(),n>1&&(m+=o)}}}_hitFunc(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}setText(t){var e=C._isString(t)?t:null===t||void 0===t?"":t+"";return this._setAttr(Nn,e),this}getWidth(){var t=this.attrs.width===On||void 0===this.attrs.width;return t?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){var t=this.attrs.height===On||void 0===this.attrs.height;return t?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return C.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e,n=Jn(),i=this.fontSize();return n.save(),n.font=this._getContextFont(),e=n.measureText(t),n.restore(),{width:e.width,height:i}}_getContextFont(){return this.fontStyle()+Hn+this.fontVariant()+Hn+(this.fontSize()+zn)+Kn(this.fontFamily())}_addTextLine(t){this.align()===An&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){var e=this.letterSpacing(),n=t.length;return Jn().measureText(t).width+(n?e*(n-1):0)}_setTextData(){var t=this.text().split("\n"),e=+this.fontSize(),n=0,i=this.lineHeight()*e,r=this.attrs.width,a=this.attrs.height,o=r!==On&&void 0!==r,s=a!==On&&void 0!==a,c=this.padding(),l=r-2*c,u=a-2*c,h=0,d=this.wrap(),f=d!==Un,p=d!==Wn&&f,v=this.ellipsis();this.textArr=[],Jn().font=this._getContextFont();for(var m=v?this._getTextWidth(Yn):0,g=0,y=t.length;g<y;++g){var b=t[g],_=this._getTextWidth(b);if(o&&_>l)while(b.length>0){var w=0,k=b.length,S="",x=0;while(w<k){var C=w+k>>>1,D=b.slice(0,C+1),T=this._getTextWidth(D)+m;T<=l?(w=C+1,S=D,x=T):k=C}if(!S)break;if(p){var O,E=b[S.length],A=E===Hn||E===Rn;O=A&&x<=l?S.length:Math.max(S.lastIndexOf(Hn),S.lastIndexOf(Rn))+1,O>0&&(w=O,S=S.slice(0,w),x=this._getTextWidth(S))}S=S.trimRight(),this._addTextLine(S),n=Math.max(n,x),h+=i;var P=this._shouldHandleEllipsis(h);if(P){this._tryToAddEllipsisToLastLine();break}if(b=b.slice(w),b=b.trimLeft(),b.length>0&&(_=this._getTextWidth(b),_<=l)){this._addTextLine(b),h+=i,n=Math.max(n,_);break}}else this._addTextLine(b),h+=i,n=Math.max(n,_),this._shouldHandleEllipsis(h)&&g<y-1&&this._tryToAddEllipsisToLastLine();if(s&&h+i>u)break;this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0)}this.textHeight=e,this.textWidth=n}_shouldHandleEllipsis(t){var e=+this.fontSize(),n=this.lineHeight()*e,i=this.attrs.height,r=i!==On&&void 0!==i,a=this.padding(),o=i-2*a,s=this.wrap(),c=s!==Un;return!c||r&&t+n>o}_tryToAddEllipsisToLastLine(){var t=this.attrs.width,e=t!==On&&void 0!==t,n=this.padding(),i=t-2*n,r=this.ellipsis(),a=this.textArr[this.textArr.length-1];if(a&&r){if(e){var o=this._getTextWidth(a.text+Yn)<i;o||(a.text=a.text.slice(0,a.text.length-3))}this.textArr.splice(this.textArr.length-1,1),this._addTextLine(a.text+Yn)}}getStrokeScaleEnabled(){return!0}}ei.prototype._fillFunc=Zn,ei.prototype._strokeFunc=Qn,ei.prototype.className=$n,ei.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],s(ei),F.overWriteSetter(ei,"width",A()),F.overWriteSetter(ei,"height",A()),F.addGetterSetter(ei,"fontFamily","Arial"),F.addGetterSetter(ei,"fontSize",12,O()),F.addGetterSetter(ei,"fontStyle",jn),F.addGetterSetter(ei,"fontVariant",jn),F.addGetterSetter(ei,"padding",0,O()),F.addGetterSetter(ei,"align",In),F.addGetterSetter(ei,"verticalAlign",Ln),F.addGetterSetter(ei,"lineHeight",1,O()),F.addGetterSetter(ei,"wrap",Gn),F.addGetterSetter(ei,"ellipsis",!1,I()),F.addGetterSetter(ei,"letterSpacing",0,O()),F.addGetterSetter(ei,"text","",P()),F.addGetterSetter(ei,"textDecoration","");var ni="",ii="normal";function ri(t){t.fillText(this.partialText,0,0)}function ai(t){t.strokeText(this.partialText,0,0)}class oi extends Re{constructor(t){super(t),this.dummyCanvas=C.createCanvasElement(),this.dataArray=[],this.dataArray=an.parsePathData(this.attrs.data),this.on("dataChange.konva",(function(){this.dataArray=an.parsePathData(this.attrs.data),this._setTextData()})),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var e=this.textDecoration(),n=this.fill(),i=this.fontSize(),r=this.glyphInfo;"underline"===e&&t.beginPath();for(var a=0;a<r.length;a++){t.save();var o=r[a].p0;t.translate(o.x,o.y),t.rotate(r[a].rotation),this.partialText=r[a].text,t.fillStrokeShape(this),"underline"===e&&(0===a&&t.moveTo(0,i/2+1),t.lineTo(i,i/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=n,t.lineWidth=i/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var n=e[0].p0;t.moveTo(n.x,n.y)}for(var i=0;i<e.length;i++){var r=e[i].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return C.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return ei.prototype.setText.call(this,t)}_getContextFont(){return ei.prototype._getContextFont.call(this)}_getTextSize(t){var e=this.dummyCanvas,n=e.getContext("2d");n.save(),n.font=this._getContextFont();var i=n.measureText(t);return n.restore(),{width:i.width,height:parseInt(this.attrs.fontSize,10)}}_setTextData(){var t=this,e=this._getTextSize(this.attrs.text),n=this.letterSpacing(),i=this.align(),r=this.kerningFunc();this.textWidth=e.width,this.textHeight=e.height;var a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0);this.glyphInfo=[];for(var o=0,s=0;s<t.dataArray.length;s++)t.dataArray[s].pathLength>0&&(o+=t.dataArray[s].pathLength);var c=0;"center"===i&&(c=Math.max(0,o/2-a/2)),"right"===i&&(c=Math.max(0,o-a));for(var l,u,h,d=Dn(this.text()),f=this.text().split(" ").length-1,p=-1,v=0,m=function(){v=0;for(var e=t.dataArray,n=p+1;n<e.length;n++){if(e[n].pathLength>0)return p=n,e[n];"M"===e[n].command&&(l={x:e[n].points[0],y:e[n].points[1]})}return{}},g=function(e){var r=t._getTextSize(e).width+n;" "===e&&"justify"===i&&(r+=(o-a)/f);var s=0,c=0;u=void 0;while(Math.abs(r-s)/r>.01&&c<20){c++;var d=s;while(void 0===h)h=m(),h&&d+h.pathLength<r&&(d+=h.pathLength,h=void 0);if(0===Object.keys(h).length||void 0===l)return;var p=!1;switch(h.command){case"L":an.getLineLength(l.x,l.y,h.points[0],h.points[1])>r?u=an.getPointOnLine(r,l.x,l.y,h.points[0],h.points[1],l.x,l.y):h=void 0;break;case"A":var g=h.points[4],y=h.points[5],b=h.points[4]+y;0===v?v=g+1e-8:r>s?v+=Math.PI/180*y/Math.abs(y):v-=Math.PI/360*y/Math.abs(y),(y<0&&v<b||y>=0&&v>b)&&(v=b,p=!0),u=an.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],v,h.points[6]);break;case"C":0===v?v=r>h.pathLength?1e-8:r/h.pathLength:r>s?v+=(r-s)/h.pathLength/2:v=Math.max(v-(s-r)/h.pathLength/2,0),v>1&&(v=1,p=!0),u=an.getPointOnCubicBezier(v,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3],h.points[4],h.points[5]);break;case"Q":0===v?v=r/h.pathLength:r>s?v+=(r-s)/h.pathLength:v-=(s-r)/h.pathLength,v>1&&(v=1,p=!0),u=an.getPointOnQuadraticBezier(v,h.start.x,h.start.y,h.points[0],h.points[1],h.points[2],h.points[3]);break}void 0!==u&&(s=an.getLineLength(l.x,l.y,u.x,u.y)),p&&(p=!1,h=void 0)}},y="C",b=t._getTextSize(y).width+n,_=c/b-1,w=0;w<_;w++){if(g(y),void 0===l||void 0===u)break;l=u}for(var k=0;k<d.length;k++){if(g(d[k]),void 0===l||void 0===u)break;var S=an.getLineLength(l.x,l.y,u.x,u.y),x=0;if(r)try{x=r(d[k-1],d[k])*this.fontSize()}catch(T){x=0}l.x+=x,u.x+=x,this.textWidth+=x;var C=an.getPointOnLine(x+S/2,l.x,l.y,u.x,u.y),D=Math.atan2(u.y-l.y,u.x-l.x);this.glyphInfo.push({transposeX:C.x,transposeY:C.y,text:d[k],rotation:D,p0:l,p1:u}),l=u}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach((function(e){t.push(e.p0.x),t.push(e.p0.y),t.push(e.p1.x),t.push(e.p1.y)}));for(var e,n,i=t[0]||0,r=t[0]||0,a=t[1]||0,o=t[1]||0,s=0;s<t.length/2;s++)e=t[2*s],n=t[2*s+1],i=Math.min(i,e),r=Math.max(r,e),a=Math.min(a,n),o=Math.max(o,n);var c=this.fontSize();return{x:i-c/2,y:a-c/2,width:r-i+c,height:o-a+c}}}oi.prototype._fillFunc=ri,oi.prototype._strokeFunc=ai,oi.prototype._fillFuncHit=ri,oi.prototype._strokeFuncHit=ai,oi.prototype.className="TextPath",oi.prototype._attrsAffectingSize=["text","fontSize","data"],s(oi),F.addGetterSetter(oi,"data"),F.addGetterSetter(oi,"fontFamily","Arial"),F.addGetterSetter(oi,"fontSize",12,O()),F.addGetterSetter(oi,"fontStyle",ii),F.addGetterSetter(oi,"align","left"),F.addGetterSetter(oi,"letterSpacing",0,O()),F.addGetterSetter(oi,"textBaseline","middle"),F.addGetterSetter(oi,"fontVariant",ii),F.addGetterSetter(oi,"text",ni),F.addGetterSetter(oi,"textDecoration",null),F.addGetterSetter(oi,"kerningFunc",null);var si="tr-konva",ci=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map((t=>t+`.${si}`)).join(" "),li="nodesRect",ui=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],hi={"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 di="ontouchstart"in o._global;function fi(t,e){if("rotater"===t)return"crosshair";e+=C.degToRad(hi[t]||0);var n=(C.radToDeg(e)%360+360)%360;return C._inRange(n,337.5,360)||C._inRange(n,0,22.5)?"ns-resize":C._inRange(n,22.5,67.5)?"nesw-resize":C._inRange(n,67.5,112.5)?"ew-resize":C._inRange(n,112.5,157.5)?"nwse-resize":C._inRange(n,157.5,202.5)?"ns-resize":C._inRange(n,202.5,247.5)?"nesw-resize":C._inRange(n,247.5,292.5)?"ew-resize":C._inRange(n,292.5,337.5)?"nwse-resize":(C.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}var pi=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"],vi=1e8;function mi(t){return{x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)}}function gi(t,e,n){const i=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),r=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return Object.assign(Object.assign({},t),{rotation:t.rotation+e,x:i,y:r})}function yi(t,e){const n=mi(t);return gi(t,e,n)}function bi(t,e,n){let i=e;for(let r=0;r<t.length;r++){const a=o.getAngle(t[r]),s=Math.abs(a-e)%(2*Math.PI),c=Math.min(s,2*Math.PI-s);c<n&&(i=a)}return i}class _i extends ze{constructor(t){super(t),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(ci,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return C.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return si+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach(),this._nodes=t,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((t=>{const e=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},n=t._attrsAffectingSize.map((t=>t+"Change."+this._getEventNamespace())).join(" ");t.on(n,e),t.on(ui.map((t=>t+`.${this._getEventNamespace()}`)).join(" "),e),t.on(`absoluteTransformChange.${this._getEventNamespace()}`,e),this._proxyDrag(t)})),this._resetTransformCache();var e=!!this.findOne(".top-left");return e&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,(n=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(n,!1)})),t.on(`dragmove.${this._getEventNamespace()}`,(n=>{if(!e)return;const i=t.getAbsolutePosition(),r=i.x-e.x,a=i.y-e.y;this.nodes().forEach((e=>{if(e===t)return;if(e.isDragging())return;const i=e.getAbsolutePosition();e.setAbsolutePosition({x:i.x+r,y:i.y+a}),e.startDrag(n)})),e=null}))}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach((t=>{t.off("."+this._getEventNamespace())})),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(li),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(li,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),n){var i=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=t.getAbsoluteScale(n),a=t.getAbsolutePosition(n),s=i.x*r.x-t.offsetX()*r.x,c=i.y*r.y-t.offsetY()*r.y;const l=(o.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI),u={x:a.x+s*Math.cos(l)+c*Math.sin(-l),y:a.y+c*Math.cos(l)+s*Math.sin(l),width:i.width*r.x,height:i.height*r.y,rotation:l};return gi(u,-o.getAngle(e),{x:0,y:0})}__getNodeRect(){var t=this.getNode();if(!t)return{x:-vi,y:-vi,width:0,height:0,rotation:0};const e=[];this.nodes().map((t=>{const n=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()});var i=[{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}],r=t.getAbsoluteTransform();i.forEach((function(t){var n=r.point(t);e.push(n)}))}));const n=new c;var i,r,a,s;n.rotate(-o.getAngle(this.rotation())),e.forEach((function(t){var e=n.point(t);void 0===i&&(i=a=e.x,r=s=e.y),i=Math.min(i,e.x),r=Math.min(r,e.y),a=Math.max(a,e.x),s=Math.max(s,e.y)})),n.invert();const l=n.point({x:i,y:r});return{x:l.x,y:l.y,width:a-i,height:s-r,rotation:o.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(),pi.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}_createAnchor(t){var e=new _n({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:di?10:"auto"}),n=this;e.on("mousedown touchstart",(function(t){n._handleMouseDown(t)})),e.on("dragstart",(t=>{e.stopDrag(),t.cancelBubble=!0})),e.on("dragend",(t=>{t.cancelBubble=!0})),e.on("mouseenter",(()=>{var n=o.getAngle(this.rotation()),i=fi(t,n);e.getStage().content&&(e.getStage().content.style.cursor=i),this._cursorChange=!0})),e.on("mouseout",(()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1})),this.add(e)}_createBack(){var t=new Re({name:"back",width:0,height:0,draggable:!0,sceneFunc(t){var e=this.getParent(),n=e.padding();t.beginPath(),t.rect(-n,-n,this.width()+2*n,this.height()+2*n),t.moveTo(this.width()/2,-n),e.rotateEnabled()&&t.lineTo(this.width()/2,-e.rotateAnchorOffset()*C._sign(this.height())-n),t.fillStrokeShape(this)},hitFunc:(t,e)=>{if(this.shouldOverdrawWholeArea()){var n=this.padding();t.beginPath(),t.rect(-n,-n,e.width()+2*n,e.height()+2*n),t.fillStrokeShape(e)}}});this.add(t),this._proxyDrag(t),t.on("dragstart",(t=>{t.cancelBubble=!0})),t.on("dragmove",(t=>{t.cancelBubble=!0})),t.on("dragend",(t=>{t.cancelBubble=!0})),this.on("dragmove",(t=>{this.update()}))}_handleMouseDown(t){this._movingAnchorName=t.target.name().split(" ")[0];var e=this._getNodeRect(),n=e.width,i=e.height,r=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));this.sin=Math.abs(i/r),this.cos=Math.abs(n/r),"undefined"!==typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;var a=t.target.getAbsolutePosition(),o=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach((e=>{e._fire("transformstart",{evt:t.evt,target:e})}))}_handleMouseMove(t){var e,n,i,r=this.findOne("."+this._movingAnchorName),a=r.getStage();a.setPointersPositions(t);const s=a.getPointerPosition();let c={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y};const l=r.getAbsolutePosition();this.anchorDragBoundFunc()&&(c=this.anchorDragBoundFunc()(l,c,t)),r.setAbsolutePosition(c);const u=r.getAbsolutePosition();if(l.x!==u.x||l.y!==u.y)if("rotater"!==this._movingAnchorName){var h=this.keepRatio()||t.shiftKey,d=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(h){var f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};i=Math.sqrt(Math.pow(f.x-r.x(),2)+Math.pow(f.y-r.y(),2));var p=this.findOne(".top-left").x()>f.x?-1:1,v=this.findOne(".top-left").y()>f.y?-1:1;e=i*this.cos*p,n=i*this.sin*v,this.findOne(".top-left").x(f.x-e),this.findOne(".top-left").y(f.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(r.y());else if("top-right"===this._movingAnchorName){if(h){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};i=Math.sqrt(Math.pow(r.x()-f.x,2)+Math.pow(f.y-r.y(),2));p=this.findOne(".top-right").x()<f.x?-1:1,v=this.findOne(".top-right").y()>f.y?-1:1;e=i*this.cos*p,n=i*this.sin*v,this.findOne(".top-right").x(f.x+e),this.findOne(".top-right").y(f.y-n)}var m=r.position();this.findOne(".top-left").y(m.y),this.findOne(".bottom-right").x(m.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(r.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(r.x());else if("bottom-left"===this._movingAnchorName){if(h){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};i=Math.sqrt(Math.pow(f.x-r.x(),2)+Math.pow(r.y()-f.y,2));p=f.x<r.x()?-1:1,v=r.y()<f.y?-1:1;e=i*this.cos*p,n=i*this.sin*v,r.x(f.x-e),r.y(f.y+n)}m=r.position(),this.findOne(".top-left").x(m.x),this.findOne(".bottom-right").y(m.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(r.y());else if("bottom-right"===this._movingAnchorName){if(h){f=d?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};i=Math.sqrt(Math.pow(r.x()-f.x,2)+Math.pow(r.y()-f.y,2));p=this.findOne(".bottom-right").x()<f.x?-1:1,v=this.findOne(".bottom-right").y()<f.y?-1:1;e=i*this.cos*p,n=i*this.sin*v,this.findOne(".bottom-right").x(f.x+e),this.findOne(".bottom-right").y(f.y+n)}}else console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));d=this.centeredScaling()||t.altKey;if(d){var g=this.findOne(".top-left"),y=this.findOne(".bottom-right"),b=g.x(),_=g.y(),w=this.getWidth()-y.x(),k=this.getHeight()-y.y();y.move({x:-b,y:-_}),g.move({x:w,y:k})}var S=this.findOne(".top-left").getAbsolutePosition();e=S.x,n=S.y;var x=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),C=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:n,width:x,height:C,rotation:o.getAngle(this.rotation())},t)}else{var D=this._getNodeRect();e=r.x()-D.width/2,n=-r.y()+D.height/2;let i=Math.atan2(-n,e)+Math.PI/2;D.height<0&&(i-=Math.PI);var T=o.getAngle(this.rotation());const a=T+i,s=o.getAngle(this.rotationSnapTolerance()),c=bi(this.rotationSnaps(),a,s),l=c-D.rotation,u=yi(D,l);this._fitNodesInto(u,t)}}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){if(this._transforming){this._transforming=!1,"undefined"!==typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));var e=this.getNode();this._fire("transformend",{evt:t,target:e}),e&&this._nodes.forEach((e=>{e._fire("transformend",{evt:t,target:e})})),this._movingAnchorName=null}}_fitNodesInto(t,e){var n=this._getNodeRect();const i=1;if(C._inRange(t.width,2*-this.padding()-i,i))return void this.update();if(C._inRange(t.height,2*-this.padding()-i,i))return void this.update();const r=this.flipEnabled();var a=new c;if(a.rotate(o.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){const e=a.point({x:2*-this.padding(),y:0});if(t.x+=e.x,t.y+=e.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,!r)return void this.update()}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){const e=a.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.width+=2*this.padding(),!r)return void this.update()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){const e=a.point({x:0,y:2*-this.padding()});if(t.x+=e.x,t.y+=e.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding(),!r)return void this.update()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const e=a.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding(),!r)return void this.update()}if(this.boundBoxFunc()){const e=this.boundBoxFunc()(n,t);e?t=e:C.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const s=1e7,l=new c;l.translate(n.x,n.y),l.rotate(n.rotation),l.scale(n.width/s,n.height/s);const u=new c;u.translate(t.x,t.y),u.rotate(t.rotation),u.scale(t.width/s,t.height/s);const h=u.multiply(l.invert());this._nodes.forEach((t=>{var n;const i=t.getParent().getAbsoluteTransform(),r=t.getTransform().copy();r.translate(t.offsetX(),t.offsetY());const a=new c;a.multiply(i.copy().invert()).multiply(h).multiply(i).multiply(r);const o=a.decompose();t.setAttrs(o),this._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t}),null===(n=t.getLayer())||void 0===n||n.batchDraw()})),this.rotation(C._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){const n=this.findOne(t);n.setAttrs(e)}update(){var t,e=this._getNodeRect();this.rotation(C._getRotation(e.rotation));var n=e.width,i=e.height,r=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),s=this.anchorSize();this.find("._anchor").forEach((t=>{t.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+o,offsetY:s/2+o,visible:a&&r.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:s/2+o,visible:a&&r.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:s/2-o,offsetY:s/2+o,visible:a&&r.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:s/2+o,visible:a&&r.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:i/2,offsetX:s/2-o,visible:a&&r.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:s/2+o,offsetY:s/2-o,visible:a&&r.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:i,offsetY:s/2-o,visible:a&&r.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:i,offsetX:s/2-o,offsetY:s/2-o,visible:a&&r.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*C._sign(i)-o,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(t=this.getLayer())||void 0===t||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),ze.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return Dt.prototype.toObject.call(this)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}function wi(t){return t instanceof Array||C.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach((function(t){-1===pi.indexOf(t)&&C.warn("Unknown anchor name: "+t+". Available names are: "+pi.join(", "))})),t||[]}_i.prototype.className="Transformer",s(_i),F.addGetterSetter(_i,"enabledAnchors",pi,wi),F.addGetterSetter(_i,"flipEnabled",!0,I()),F.addGetterSetter(_i,"resizeEnabled",!0),F.addGetterSetter(_i,"anchorSize",10,O()),F.addGetterSetter(_i,"rotateEnabled",!0),F.addGetterSetter(_i,"rotationSnaps",[]),F.addGetterSetter(_i,"rotateAnchorOffset",50,O()),F.addGetterSetter(_i,"rotationSnapTolerance",5,O()),F.addGetterSetter(_i,"borderEnabled",!0),F.addGetterSetter(_i,"anchorStroke","rgb(0, 161, 255)"),F.addGetterSetter(_i,"anchorStrokeWidth",1,O()),F.addGetterSetter(_i,"anchorFill","white"),F.addGetterSetter(_i,"anchorCornerRadius",0,O()),F.addGetterSetter(_i,"borderStroke","rgb(0, 161, 255)"),F.addGetterSetter(_i,"borderStrokeWidth",1,O()),F.addGetterSetter(_i,"borderDash"),F.addGetterSetter(_i,"keepRatio",!0),F.addGetterSetter(_i,"centeredScaling",!1),F.addGetterSetter(_i,"ignoreStroke",!1),F.addGetterSetter(_i,"padding",0,O()),F.addGetterSetter(_i,"node"),F.addGetterSetter(_i,"nodes"),F.addGetterSetter(_i,"boundBoxFunc"),F.addGetterSetter(_i,"anchorDragBoundFunc"),F.addGetterSetter(_i,"shouldOverdrawWholeArea",!1),F.addGetterSetter(_i,"useSingleNodeRotation",!0),F.backCompat(_i,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"});class ki extends Re{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,o.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}function Si(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}ki.prototype.className="Wedge",ki.prototype._centroid=!0,ki.prototype._attrsAffectingSize=["radius"],s(ki),F.addGetterSetter(ki,"radius",0,O()),F.addGetterSetter(ki,"angle",0,O()),F.addGetterSetter(ki,"clockwise",!1),F.backCompat(ki,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"});var xi=[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],Ci=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Di(t,e){var n,i,r,a,o,s,c,l,u,h,d,f,p,v,m,g,y,b,_,w,k,S,x,C,D=t.data,T=t.width,O=t.height,E=e+e+1,A=T-1,P=O-1,M=e+1,R=M*(M+1)/2,I=new Si,N=null,$=I,L=null,F=null,B=xi[e],j=Ci[e];for(r=1;r<E;r++)$=$.next=new Si,r===M&&(N=$);for($.next=I,c=s=0,i=0;i<O;i++){for(g=y=b=_=l=u=h=d=0,f=M*(w=D[s]),p=M*(k=D[s+1]),v=M*(S=D[s+2]),m=M*(x=D[s+3]),l+=R*w,u+=R*k,h+=R*S,d+=R*x,$=I,r=0;r<M;r++)$.r=w,$.g=k,$.b=S,$.a=x,$=$.next;for(r=1;r<M;r++)a=s+((A<r?A:r)<<2),l+=($.r=w=D[a])*(C=M-r),u+=($.g=k=D[a+1])*C,h+=($.b=S=D[a+2])*C,d+=($.a=x=D[a+3])*C,g+=w,y+=k,b+=S,_+=x,$=$.next;for(L=I,F=N,n=0;n<T;n++)D[s+3]=x=d*B>>j,0!==x?(x=255/x,D[s]=(l*B>>j)*x,D[s+1]=(u*B>>j)*x,D[s+2]=(h*B>>j)*x):D[s]=D[s+1]=D[s+2]=0,l-=f,u-=p,h-=v,d-=m,f-=L.r,p-=L.g,v-=L.b,m-=L.a,a=c+((a=n+e+1)<A?a:A)<<2,g+=L.r=D[a],y+=L.g=D[a+1],b+=L.b=D[a+2],_+=L.a=D[a+3],l+=g,u+=y,h+=b,d+=_,L=L.next,f+=w=F.r,p+=k=F.g,v+=S=F.b,m+=x=F.a,g-=w,y-=k,b-=S,_-=x,F=F.next,s+=4;c+=T}for(n=0;n<T;n++){for(y=b=_=g=u=h=d=l=0,s=n<<2,f=M*(w=D[s]),p=M*(k=D[s+1]),v=M*(S=D[s+2]),m=M*(x=D[s+3]),l+=R*w,u+=R*k,h+=R*S,d+=R*x,$=I,r=0;r<M;r++)$.r=w,$.g=k,$.b=S,$.a=x,$=$.next;for(o=T,r=1;r<=e;r++)s=o+n<<2,l+=($.r=w=D[s])*(C=M-r),u+=($.g=k=D[s+1])*C,h+=($.b=S=D[s+2])*C,d+=($.a=x=D[s+3])*C,g+=w,y+=k,b+=S,_+=x,$=$.next,r<P&&(o+=T);for(s=n,L=I,F=N,i=0;i<O;i++)a=s<<2,D[a+3]=x=d*B>>j,x>0?(x=255/x,D[a]=(l*B>>j)*x,D[a+1]=(u*B>>j)*x,D[a+2]=(h*B>>j)*x):D[a]=D[a+1]=D[a+2]=0,l-=f,u-=p,h-=v,d-=m,f-=L.r,p-=L.g,v-=L.b,m-=L.a,a=n+((a=i+M)<P?a:P)*T<<2,l+=g+=L.r=D[a],u+=y+=L.g=D[a+1],h+=b+=L.b=D[a+2],d+=_+=L.a=D[a+3],L=L.next,f+=w=F.r,p+=k=F.g,v+=S=F.b,m+=x=F.a,g-=w,y-=k,b-=S,_-=x,F=F.next,s+=T}}const Ti=function(t){var e=Math.round(this.blurRadius());e>0&&Di(t,e)};F.addGetterSetter(Dt,"blurRadius",0,O(),F.afterSetFilter);const Oi=function(t){var e,n=255*this.brightness(),i=t.data,r=i.length;for(e=0;e<r;e+=4)i[e]+=n,i[e+1]+=n,i[e+2]+=n};F.addGetterSetter(Dt,"brightness",0,O(),F.afterSetFilter);const Ei=function(t){var e,n=Math.pow((this.contrast()+100)/100,2),i=t.data,r=i.length,a=150,o=150,s=150;for(e=0;e<r;e+=4)a=i[e],o=i[e+1],s=i[e+2],a/=255,a-=.5,a*=n,a+=.5,a*=255,o/=255,o-=.5,o*=n,o+=.5,o*=255,s/=255,s-=.5,s*=n,s+=.5,s*=255,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,s=s<0?0:s>255?255:s,i[e]=a,i[e+1]=o,i[e+2]=s};F.addGetterSetter(Dt,"contrast",0,O(),F.afterSetFilter);const Ai=function(t){var e=10*this.embossStrength(),n=255*this.embossWhiteLevel(),i=this.embossDirection(),r=this.embossBlend(),a=0,o=0,s=t.data,c=t.width,l=t.height,u=4*c,h=l;switch(i){case"top-left":a=-1,o=-1;break;case"top":a=-1,o=0;break;case"top-right":a=-1,o=1;break;case"right":a=0,o=1;break;case"bottom-right":a=1,o=1;break;case"bottom":a=1,o=0;break;case"bottom-left":a=1,o=-1;break;case"left":a=0,o=-1;break;default:C.error("Unknown emboss direction: "+i)}do{var d=(h-1)*u,f=a;h+f<1&&(f=0),h+f>l&&(f=0);var p=(h-1+f)*c*4,v=c;do{var m=d+4*(v-1),g=o;v+g<1&&(g=0),v+g>c&&(g=0);var y=p+4*(v-1+g),b=s[m]-s[y],_=s[m+1]-s[y+1],w=s[m+2]-s[y+2],k=b,S=k>0?k:-k,x=_>0?_:-_,D=w>0?w:-w;if(x>S&&(k=_),D>S&&(k=w),k*=e,r){var T=s[m]+k,O=s[m+1]+k,E=s[m+2]+k;s[m]=T>255?255:T<0?0:T,s[m+1]=O>255?255:O<0?0:O,s[m+2]=E>255?255:E<0?0:E}else{var A=n-k;A<0?A=0:A>255&&(A=255),s[m]=s[m+1]=s[m+2]=A}}while(--v)}while(--h)};function Pi(t,e,n,i,r){var a,o=n-e,s=r-i;return 0===o?i+s/2:0===s?i:(a=(t-e)/o,a=s*a+i,a)}F.addGetterSetter(Dt,"embossStrength",.5,O(),F.afterSetFilter),F.addGetterSetter(Dt,"embossWhiteLevel",.5,O(),F.afterSetFilter),F.addGetterSetter(Dt,"embossDirection","top-left",null,F.afterSetFilter),F.addGetterSetter(Dt,"embossBlend",!1,null,F.afterSetFilter);const Mi=function(t){var e,n,i,r,a=t.data,o=a.length,s=a[0],c=s,l=a[1],u=l,h=a[2],d=h,f=this.enhance();if(0!==f){for(r=0;r<o;r+=4)e=a[r+0],e<s?s=e:e>c&&(c=e),n=a[r+1],n<l?l=n:n>u&&(u=n),i=a[r+2],i<h?h=i:i>d&&(d=i);var p,v,m,g,y,b,_,w,k;for(c===s&&(c=255,s=0),u===l&&(u=255,l=0),d===h&&(d=255,h=0),f>0?(v=c+f*(255-c),m=s-f*(s-0),y=u+f*(255-u),b=l-f*(l-0),w=d+f*(255-d),k=h-f*(h-0)):(p=.5*(c+s),v=c+f*(c-p),m=s+f*(s-p),g=.5*(u+l),y=u+f*(u-g),b=l+f*(l-g),_=.5*(d+h),w=d+f*(d-_),k=h+f*(h-_)),r=0;r<o;r+=4)a[r+0]=Pi(a[r+0],s,c,m,v),a[r+1]=Pi(a[r+1],l,u,b,y),a[r+2]=Pi(a[r+2],h,d,k,w)}};F.addGetterSetter(Dt,"enhance",0,O(),F.afterSetFilter);const Ri=function(t){var e,n,i=t.data,r=i.length;for(e=0;e<r;e+=4)n=.34*i[e]+.5*i[e+1]+.16*i[e+2],i[e]=n,i[e+1]=n,i[e+2]=n};F.addGetterSetter(Dt,"hue",0,O(),F.afterSetFilter),F.addGetterSetter(Dt,"saturation",0,O(),F.afterSetFilter),F.addGetterSetter(Dt,"luminance",0,O(),F.afterSetFilter);const Ii=function(t){var e,n,i,r,a,o=t.data,s=o.length,c=1,l=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,h=127*this.luminance(),d=c*l*Math.cos(u*Math.PI/180),f=c*l*Math.sin(u*Math.PI/180),p=.299*c+.701*d+.167*f,v=.587*c-.587*d+.33*f,m=.114*c-.114*d-.497*f,g=.299*c-.299*d-.328*f,y=.587*c+.413*d+.035*f,b=.114*c-.114*d+.293*f,_=.299*c-.3*d+1.25*f,w=.587*c-.586*d-1.05*f,k=.114*c+.886*d-.2*f;for(e=0;e<s;e+=4)n=o[e+0],i=o[e+1],r=o[e+2],a=o[e+3],o[e+0]=p*n+v*i+m*r+h,o[e+1]=g*n+y*i+b*r+h,o[e+2]=_*n+w*i+k*r+h,o[e+3]=a},Ni=function(t){var e,n,i,r,a,o=t.data,s=o.length,c=Math.pow(2,this.value()),l=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,h=c*l*Math.cos(u*Math.PI/180),d=c*l*Math.sin(u*Math.PI/180),f=.299*c+.701*h+.167*d,p=.587*c-.587*h+.33*d,v=.114*c-.114*h-.497*d,m=.299*c-.299*h-.328*d,g=.587*c+.413*h+.035*d,y=.114*c-.114*h+.293*d,b=.299*c-.3*h+1.25*d,_=.587*c-.586*h-1.05*d,w=.114*c+.886*h-.2*d;for(e=0;e<s;e+=4)n=o[e+0],i=o[e+1],r=o[e+2],a=o[e+3],o[e+0]=f*n+p*i+v*r,o[e+1]=m*n+g*i+y*r,o[e+2]=b*n+_*i+w*r,o[e+3]=a};F.addGetterSetter(Dt,"hue",0,O(),F.afterSetFilter),F.addGetterSetter(Dt,"saturation",0,O(),F.afterSetFilter),F.addGetterSetter(Dt,"value",0,O(),F.afterSetFilter);const $i=function(t){var e,n=t.data,i=n.length;for(e=0;e<i;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2]};var Li=function(t,e,n){var i,r,a,o,s=t.data,c=e.data,l=t.width,u=t.height,h=n.polarCenterX||l/2,d=n.polarCenterY||u/2,f=0,p=0,v=0,m=0,g=Math.sqrt(h*h+d*d);r=l-h,a=u-d,o=Math.sqrt(r*r+a*a),g=o>g?o:g;var y,b,_,w,k=u,S=l,x=360/S*Math.PI/180;for(b=0;b<S;b+=1)for(_=Math.sin(b*x),w=Math.cos(b*x),y=0;y<k;y+=1)r=Math.floor(h+g*y/k*w),a=Math.floor(d+g*y/k*_),i=4*(a*l+r),f=s[i+0],p=s[i+1],v=s[i+2],m=s[i+3],i=4*(b+y*l),c[i+0]=f,c[i+1]=p,c[i+2]=v,c[i+3]=m},Fi=function(t,e,n){var i,r,a,o,s,c,l=t.data,u=e.data,h=t.width,d=t.height,f=n.polarCenterX||h/2,p=n.polarCenterY||d/2,v=0,m=0,g=0,y=0,b=Math.sqrt(f*f+p*p);r=h-f,a=d-p,c=Math.sqrt(r*r+a*a),b=c>b?c:b;var _,w,k,S,x=d,C=h,D=n.polarRotation||0;for(r=0;r<h;r+=1)for(a=0;a<d;a+=1)o=r-f,s=a-p,_=Math.sqrt(o*o+s*s)*x/b,w=(180*Math.atan2(s,o)/Math.PI+360+D)%360,w=w*C/360,k=Math.floor(w),S=Math.floor(_),i=4*(S*h+k),v=l[i+0],m=l[i+1],g=l[i+2],y=l[i+3],i=4*(a*h+r),u[i+0]=v,u[i+1]=m,u[i+2]=g,u[i+3]=y};const Bi=function(t){var e,n,i,r,a,o,s,c,l,u,h=t.width,d=t.height,f=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),v=Math.floor(h*(p%360)/360);if(!(f<1)){var m=C.createCanvasElement();m.width=h,m.height=d;var g=m.getContext("2d").getImageData(0,0,h,d);Li(t,g,{polarCenterX:h/2,polarCenterY:d/2});var y=h/Math.pow(2,f);while(y<=8)y*=2,f-=1;y=Math.ceil(y);var b=y,_=0,w=b,k=1;for(v+y>h&&(_=b,w=0,k=-1),n=0;n<d;n+=1)for(e=_;e!==w;e+=k)i=Math.round(e+v)%h,l=4*(h*n+i),a=g.data[l+0],o=g.data[l+1],s=g.data[l+2],c=g.data[l+3],u=4*(h*n+e),g.data[u+0]=a,g.data[u+1]=o,g.data[u+2]=s,g.data[u+3]=c;for(n=0;n<d;n+=1)for(b=Math.floor(y),r=0;r<f;r+=1){for(e=0;e<b+1;e+=1)l=4*(h*n+e),a=g.data[l+0],o=g.data[l+1],s=g.data[l+2],c=g.data[l+3],u=4*(h*n+2*b-e-1),g.data[u+0]=a,g.data[u+1]=o,g.data[u+2]=s,g.data[u+3]=c;b*=2}Fi(g,t,{polarRotation:0})}};function ji(t,e,n){var i=4*(n*t.width+e),r=[];return r.push(t.data[i++],t.data[i++],t.data[i++],t.data[i++]),r}function zi(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}function Hi(t){for(var e=[0,0,0],n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}function Vi(t,e){var n=ji(t,0,0),i=ji(t,t.width-1,0),r=ji(t,0,t.height-1),a=ji(t,t.width-1,t.height-1),o=e||10;if(zi(n,i)<o&&zi(i,a)<o&&zi(a,r)<o&&zi(r,n)<o){for(var s=Hi([i,n,a,r]),c=[],l=0;l<t.width*t.height;l++){var u=zi(s,[t.data[4*l],t.data[4*l+1],t.data[4*l+2]]);c[l]=u<o?0:255}return c}}function Gi(t,e){for(var n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}function Wi(t,e,n){for(var i=[1,1,1,1,0,1,1,1,1],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var l=s*e+c,u=0,h=0;h<r;h++)for(var d=0;d<r;d++){var f=s+h-a,p=c+d-a;if(f>=0&&f<n&&p>=0&&p<e){var v=f*e+p,m=i[h*r+d];u+=t[v]*m}}o[l]=2040===u?255:0}return o}function Ui(t,e,n){for(var i=[1,1,1,1,1,1,1,1,1],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var l=s*e+c,u=0,h=0;h<r;h++)for(var d=0;d<r;d++){var f=s+h-a,p=c+d-a;if(f>=0&&f<n&&p>=0&&p<e){var v=f*e+p,m=i[h*r+d];u+=t[v]*m}}o[l]=u>=1020?255:0}return o}function Yi(t,e,n){for(var i=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],r=Math.round(Math.sqrt(i.length)),a=Math.floor(r/2),o=[],s=0;s<n;s++)for(var c=0;c<e;c++){for(var l=s*e+c,u=0,h=0;h<r;h++)for(var d=0;d<r;d++){var f=s+h-a,p=c+d-a;if(f>=0&&f<n&&p>=0&&p<e){var v=f*e+p,m=i[h*r+d];u+=t[v]*m}}o[l]=u}return o}F.addGetterSetter(Dt,"kaleidoscopePower",2,O(),F.afterSetFilter),F.addGetterSetter(Dt,"kaleidoscopeAngle",0,O(),F.afterSetFilter);const qi=function(t){var e=this.threshold(),n=Vi(t,e);return n&&(n=Wi(n,t.width,t.height),n=Ui(n,t.width,t.height),n=Yi(n,t.width,t.height),Gi(t,n)),t};F.addGetterSetter(Dt,"threshold",0,O(),F.afterSetFilter);const Xi=function(t){var e,n=255*this.noise(),i=t.data,r=i.length,a=n/2;for(e=0;e<r;e+=4)i[e+0]+=a-2*a*Math.random(),i[e+1]+=a-2*a*Math.random(),i[e+2]+=a-2*a*Math.random()};F.addGetterSetter(Dt,"noise",.2,O(),F.afterSetFilter);const Ki=function(t){var e,n,i,r,a,o,s,c,l,u,h,d,f,p,v=Math.ceil(this.pixelSize()),m=t.width,g=t.height,y=Math.ceil(m/v),b=Math.ceil(g/v),_=t.data;if(v<=0)C.error("pixelSize value can not be <= 0");else for(d=0;d<y;d+=1)for(f=0;f<b;f+=1){for(r=0,a=0,o=0,s=0,c=d*v,l=c+v,u=f*v,h=u+v,p=0,e=c;e<l;e+=1)if(!(e>=m))for(n=u;n<h;n+=1)n>=g||(i=4*(m*n+e),r+=_[i+0],a+=_[i+1],o+=_[i+2],s+=_[i+3],p+=1);for(r/=p,a/=p,o/=p,s/=p,e=c;e<l;e+=1)if(!(e>=m))for(n=u;n<h;n+=1)n>=g||(i=4*(m*n+e),_[i+0]=r,_[i+1]=a,_[i+2]=o,_[i+3]=s)}};F.addGetterSetter(Dt,"pixelSize",8,O(),F.afterSetFilter);const Ji=function(t){var e,n=Math.round(254*this.levels())+1,i=t.data,r=i.length,a=255/n;for(e=0;e<r;e+=1)i[e]=Math.floor(i[e]/a)*a};F.addGetterSetter(Dt,"levels",.5,O(),F.afterSetFilter);const Zi=function(t){var e,n,i=t.data,r=i.length,a=this.red(),o=this.green(),s=this.blue();for(e=0;e<r;e+=4)n=(.34*i[e]+.5*i[e+1]+.16*i[e+2])/255,i[e]=n*a,i[e+1]=n*o,i[e+2]=n*s,i[e+3]=i[e+3]};F.addGetterSetter(Dt,"red",0,(function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)})),F.addGetterSetter(Dt,"green",0,(function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)})),F.addGetterSetter(Dt,"blue",0,T,F.afterSetFilter);const Qi=function(t){var e,n,i=t.data,r=i.length,a=this.red(),o=this.green(),s=this.blue(),c=this.alpha();for(e=0;e<r;e+=4)n=1-c,i[e]=a*c+i[e]*n,i[e+1]=o*c+i[e+1]*n,i[e+2]=s*c+i[e+2]*n};F.addGetterSetter(Dt,"red",0,(function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)})),F.addGetterSetter(Dt,"green",0,(function(t){return this._filterUpToDate=!1,t>255?255:t<0?0:Math.round(t)})),F.addGetterSetter(Dt,"blue",0,T,F.afterSetFilter),F.addGetterSetter(Dt,"alpha",1,(function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t}));const tr=function(t){var e,n,i,r,a=t.data,o=a.length;for(e=0;e<o;e+=4)n=a[e+0],i=a[e+1],r=a[e+2],a[e+0]=Math.min(255,.393*n+.769*i+.189*r),a[e+1]=Math.min(255,.349*n+.686*i+.168*r),a[e+2]=Math.min(255,.272*n+.534*i+.131*r)},er=function(t){var e=t.data,n=t.width,i=t.height,r=4*n,a=i;do{var o=(a-1)*r,s=n;do{var c=o+4*(s-1),l=e[c],u=e[c+1],h=e[c+2];l>127&&(l=255-l),u>127&&(u=255-u),h>127&&(h=255-h),e[c]=l,e[c+1]=u,e[c+2]=h}while(--s)}while(--a)},nr=function(t){var e,n=255*this.threshold(),i=t.data,r=i.length;for(e=0;e<r;e+=1)i[e]=i[e]<n?0:255};F.addGetterSetter(Dt,"threshold",.5,O(),F.afterSetFilter);const ir=Qe.Util._assign(Qe,{Arc:tn,Arrow:on,Circle:sn,Ellipse:cn,Image:ln,Label:yn,Tag:bn,Line:rn,Path:an,Rect:_n,RegularPolygon:wn,Ring:Sn,Sprite:xn,Star:Cn,Text:ei,TextPath:oi,Transformer:_i,Wedge:ki,Filters:{Blur:Ti,Brighten:Oi,Contrast:Ei,Emboss:Ai,Enhance:Mi,Grayscale:Ri,HSL:Ii,HSV:Ni,Invert:$i,Kaleidoscope:Bi,Mask:qi,Noise:Xi,Pixelate:Ki,Posterize:Ji,RGB:Zi,RGBA:Qi,Sepia:tr,Solarize:er,Threshold:nr}}),rr=ir}}]);
47
47
  //# sourceMappingURL=chunk-vendors.js.map