From f62672d779a4f877e4b2a6e6e0cfb8f4e8293570 Mon Sep 17 00:00:00 2001 From: liuxiaoqing Date: Tue, 19 Aug 2025 23:21:37 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E6=9B=B4=E6=96=B0=20Dockerfile=20?= =?UTF-8?q?=E5=B9=B6=E8=B0=83=E6=95=B4=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 Dockerfile 中的 CMD 指令 - 更新模板文件中的资源链接 - 修正检查组件的当前步骤初始值 --- .../templates/assets/{index-BKogJWAb.js => index-CZJjVKTn.js} | 2 +- .../assets/{index-DdVjXnlc.css => index-mR0T4gbb.css} | 2 +- alibabacloud_sample/templates/index.html | 4 ++-- dockerfile | 2 -- webapp/vite-project/src/components/check/index.vue | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) rename alibabacloud_sample/templates/assets/{index-BKogJWAb.js => index-CZJjVKTn.js} (99%) rename alibabacloud_sample/templates/assets/{index-DdVjXnlc.css => index-mR0T4gbb.css} (98%) diff --git a/alibabacloud_sample/templates/assets/index-BKogJWAb.js b/alibabacloud_sample/templates/assets/index-CZJjVKTn.js similarity index 99% rename from alibabacloud_sample/templates/assets/index-BKogJWAb.js rename to alibabacloud_sample/templates/assets/index-CZJjVKTn.js index 9423f12..7449a69 100644 --- a/alibabacloud_sample/templates/assets/index-BKogJWAb.js +++ b/alibabacloud_sample/templates/assets/index-CZJjVKTn.js @@ -495,5 +495,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[Q3]=this[Q3]={accessors:{}}).accessors,r=this.prototype;function i(a){const l=Rs(a);o[l]||(rge(r,a),o[l]=!0)}return Pe.isArray(t)?t.forEach(i):i(t),this}};ho.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Pe.reduceDescriptors(ho.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Pe.freezeMethods(ho);function Sm(e,t){const n=this||nd,o=t||n,r=ho.from(o.headers);let i=o.data;return Pe.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function aE(e){return!!(e&&e.__CANCEL__)}function Ss(e,t,n){mt.call(this,e??"canceled",mt.ERR_CANCELED,t,n),this.name="CanceledError"}Pe.inherits(Ss,mt,{__CANCEL__:!0});function lE(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new mt("Request failed with status code "+n.status,[mt.ERR_BAD_REQUEST,mt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ige(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function age(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,i=0,a;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=o[i];a||(a=u),n[r]=s,o[r]=u;let d=i,f=0;for(;d!==r;)f+=n[d++],d=d%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),u-a{n=c,r=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=o?a(u,c):(r=u,i||(i=setTimeout(()=>{i=null,a(r)},o-d)))},()=>r&&a(r)]}const Zh=(e,t,n=3)=>{let o=0;const r=age(50,250);return lge(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,s=a-o,u=r(s),c=a<=l;o=a;const d={loaded:a,total:l,progress:l?a/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&c?(l-a)/u:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(d)},n)},e6=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},t6=e=>(...t)=>Pe.asap(()=>e(...t)),sge=Hn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Hn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Hn.origin),Hn.navigator&&/(msie|trident)/i.test(Hn.navigator.userAgent)):()=>!0,cge=Hn.hasStandardBrowserEnv?{write(e,t,n,o,r,i){const a=[e+"="+encodeURIComponent(t)];Pe.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Pe.isString(o)&&a.push("path="+o),Pe.isString(r)&&a.push("domain="+r),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function uge(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function dge(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function sE(e,t,n){let o=!uge(t);return e&&(o||n==!1)?dge(e,t):t}const n6=e=>e instanceof ho?{...e}:e;function Va(e,t){t=t||{};const n={};function o(u,c,d,f){return Pe.isPlainObject(u)&&Pe.isPlainObject(c)?Pe.merge.call({caseless:f},u,c):Pe.isPlainObject(c)?Pe.merge({},c):Pe.isArray(c)?c.slice():c}function r(u,c,d,f){if(Pe.isUndefined(c)){if(!Pe.isUndefined(u))return o(void 0,u,d,f)}else return o(u,c,d,f)}function i(u,c){if(!Pe.isUndefined(c))return o(void 0,c)}function a(u,c){if(Pe.isUndefined(c)){if(!Pe.isUndefined(u))return o(void 0,u)}else return o(void 0,c)}function l(u,c,d){if(d in t)return o(u,c);if(d in e)return o(void 0,u)}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,c,d)=>r(n6(u),n6(c),d,!0)};return Pe.forEach(Object.keys({...e,...t}),function(c){const d=s[c]||r,f=d(e[c],t[c],c);Pe.isUndefined(f)&&d!==l||(n[c]=f)}),n}const cE=e=>{const t=Va({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:i,headers:a,auth:l}=t;t.headers=a=ho.from(a),t.url=oE(sE(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let s;if(Pe.isFormData(n)){if(Hn.hasStandardBrowserEnv||Hn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((s=a.getContentType())!==!1){const[u,...c]=s?s.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...c].join("; "))}}if(Hn.hasStandardBrowserEnv&&(o&&Pe.isFunction(o)&&(o=o(t)),o||o!==!1&&sge(t.url))){const u=r&&i&&cge.read(i);u&&a.set(r,u)}return t},fge=typeof XMLHttpRequest<"u",hge=fge&&function(e){return new Promise(function(n,o){const r=cE(e);let i=r.data;const a=ho.from(r.headers).normalize();let{responseType:l,onUploadProgress:s,onDownloadProgress:u}=r,c,d,f,h,p;function g(){h&&h(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(c),r.signal&&r.signal.removeEventListener("abort",c)}let m=new XMLHttpRequest;m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout;function S(){if(!m)return;const b=ho.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),C={data:!l||l==="text"||l==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:b,config:e,request:m};lE(function($){n($),g()},function($){o($),g()},C),m=null}"onloadend"in m?m.onloadend=S:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(S)},m.onabort=function(){m&&(o(new mt("Request aborted",mt.ECONNABORTED,e,m)),m=null)},m.onerror=function(){o(new mt("Network Error",mt.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let x=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||rE;r.timeoutErrorMessage&&(x=r.timeoutErrorMessage),o(new mt(x,C.clarifyTimeoutError?mt.ETIMEDOUT:mt.ECONNABORTED,e,m)),m=null},i===void 0&&a.setContentType(null),"setRequestHeader"in m&&Pe.forEach(a.toJSON(),function(x,C){m.setRequestHeader(C,x)}),Pe.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),l&&l!=="json"&&(m.responseType=r.responseType),u&&([f,p]=Zh(u,!0),m.addEventListener("progress",f)),s&&m.upload&&([d,h]=Zh(s),m.upload.addEventListener("progress",d),m.upload.addEventListener("loadend",h)),(r.cancelToken||r.signal)&&(c=b=>{m&&(o(!b||b.type?new Ss(null,e,m):b),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(c),r.signal&&(r.signal.aborted?c():r.signal.addEventListener("abort",c)));const y=ige(r.url);if(y&&Hn.protocols.indexOf(y)===-1){o(new mt("Unsupported protocol "+y+":",mt.ERR_BAD_REQUEST,e));return}m.send(i||null)})},pge=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const i=function(u){if(!r){r=!0,l();const c=u instanceof Error?u:this.reason;o.abort(c instanceof mt?c:new Ss(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,i(new mt(`timeout ${t} of ms exceeded`,mt.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(i):u.removeEventListener("abort",i)}),e=null)};e.forEach(u=>u.addEventListener("abort",i));const{signal:s}=o;return s.unsubscribe=()=>Pe.asap(l),s}},gge=function*(e,t){let n=e.byteLength;if(n{const r=vge(e,t);let i=0,a,l=s=>{a||(a=!0,o&&o(s))};return new ReadableStream({async pull(s){try{const{done:u,value:c}=await r.next();if(u){l(),s.close();return}let d=c.byteLength;if(n){let f=i+=d;n(f)}s.enqueue(new Uint8Array(c))}catch(u){throw l(u),u}},cancel(s){return l(s),r.return()}},{highWaterMark:2})},Dg=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uE=Dg&&typeof ReadableStream=="function",bge=Dg&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),dE=(e,...t)=>{try{return!!e(...t)}catch{return!1}},yge=uE&&dE(()=>{let e=!1;const t=new Request(Hn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),r6=64*1024,y1=uE&&dE(()=>Pe.isReadableStream(new Response("").body)),Jh={stream:y1&&(e=>e.body)};Dg&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Jh[t]&&(Jh[t]=Pe.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new mt(`Response type '${t}' is not supported`,mt.ERR_NOT_SUPPORT,o)})})})(new Response);const Sge=async e=>{if(e==null)return 0;if(Pe.isBlob(e))return e.size;if(Pe.isSpecCompliantForm(e))return(await new Request(Hn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Pe.isArrayBufferView(e)||Pe.isArrayBuffer(e))return e.byteLength;if(Pe.isURLSearchParams(e)&&(e=e+""),Pe.isString(e))return(await bge(e)).byteLength},Cge=async(e,t)=>{const n=Pe.toFiniteNumber(e.getContentLength());return n??Sge(t)},xge=Dg&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:s,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=cE(e);u=u?(u+"").toLowerCase():"text";let h=pge([r,i&&i.toAbortSignal()],a),p;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(s&&yge&&n!=="get"&&n!=="head"&&(m=await Cge(c,o))!==0){let C=new Request(t,{method:"POST",body:o,duplex:"half"}),_;if(Pe.isFormData(o)&&(_=C.headers.get("content-type"))&&c.setContentType(_),C.body){const[$,P]=e6(m,Zh(t6(s)));o=o6(C.body,r6,$,P)}}Pe.isString(d)||(d=d?"include":"omit");const S="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:o,duplex:"half",credentials:S?d:void 0});let y=await fetch(p,f);const b=y1&&(u==="stream"||u==="response");if(y1&&(l||b&&g)){const C={};["status","statusText","headers"].forEach(O=>{C[O]=y[O]});const _=Pe.toFiniteNumber(y.headers.get("content-length")),[$,P]=l&&e6(_,Zh(t6(l),!0))||[];y=new Response(o6(y.body,r6,$,()=>{P&&P(),g&&g()}),C)}u=u||"text";let x=await Jh[Pe.findKey(Jh,u)||"text"](y,e);return!b&&g&&g(),await new Promise((C,_)=>{lE(C,_,{data:x,headers:ho.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:p})})}catch(S){throw g&&g(),S&&S.name==="TypeError"&&/Load failed|fetch/i.test(S.message)?Object.assign(new mt("Network Error",mt.ERR_NETWORK,e,p),{cause:S.cause||S}):mt.from(S,S&&S.code,e,p)}}),S1={http:kpe,xhr:hge,fetch:xge};Pe.forEach(S1,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const i6=e=>`- ${e}`,wge=e=>Pe.isFunction(e)||e===null||e===!1,fE={getAdapter:e=>{e=Pe.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let i=0;i`adapter ${l} `+(s===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : `+i.map(i6).join(` `):" "+i6(i[0]):"as no adapter specified";throw new mt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:S1};function Cm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ss(null,e)}function a6(e){return Cm(e),e.headers=ho.from(e.headers),e.data=Sm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fE.getAdapter(e.adapter||nd.adapter)(e).then(function(o){return Cm(e),o.data=Sm.call(e,e.transformResponse,o),o.headers=ho.from(o.headers),o},function(o){return aE(o)||(Cm(e),o&&o.response&&(o.response.data=Sm.call(e,e.transformResponse,o.response),o.response.headers=ho.from(o.response.headers))),Promise.reject(o)})}const hE="1.11.0",Ng={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ng[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const l6={};Ng.transitional=function(t,n,o){function r(i,a){return"[Axios v"+hE+"] Transitional option '"+i+"'"+a+(o?". "+o:"")}return(i,a,l)=>{if(t===!1)throw new mt(r(a," has been removed"+(n?" in "+n:"")),mt.ERR_DEPRECATED);return n&&!l6[a]&&(l6[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}};Ng.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function $ge(e,t,n){if(typeof e!="object")throw new mt("options must be an object",mt.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const i=o[r],a=t[i];if(a){const l=e[i],s=l===void 0||a(l,i,e);if(s!==!0)throw new mt("option "+i+" must be "+s,mt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new mt("Unknown option "+i,mt.ERR_BAD_OPTION)}}const zf={assertOptions:$ge,validators:Ng},br=zf.validators;let Aa=class{constructor(t){this.defaults=t||{},this.interceptors={request:new J3,response:new J3}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+=` -`+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Va(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:i}=n;o!==void 0&&zf.assertOptions(o,{silentJSONParsing:br.transitional(br.boolean),forcedJSONParsing:br.transitional(br.boolean),clarifyTimeoutError:br.transitional(br.boolean)},!1),r!=null&&(Pe.isFunction(r)?n.paramsSerializer={serialize:r}:zf.assertOptions(r,{encode:br.function,serialize:br.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zf.assertOptions(n,{baseUrl:br.spelling("baseURL"),withXsrfToken:br.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Pe.merge(i.common,i[n.method]);i&&Pe.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=ho.concat(a,i);const l=[];let s=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(s=s&&g.synchronous,l.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,f;if(!s){const p=[a6.bind(this),void 0];for(p.unshift(...l),p.push(...u),f=p.length,c=Promise.resolve(n);d{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](r);o._listeners=null}),this.promise.then=r=>{let i;const a=new Promise(l=>{o.subscribe(l),i=l}).then(r);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,l){o.reason||(o.reason=new Ss(i,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new pE(function(r){t=r}),cancel:t}}};function Pge(e){return function(n){return e.apply(null,n)}}function Oge(e){return Pe.isObject(e)&&e.isAxiosError===!0}const C1={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(C1).forEach(([e,t])=>{C1[t]=e});function gE(e){const t=new Aa(e),n=KI(Aa.prototype.request,t);return Pe.extend(n,Aa.prototype,t,{allOwnKeys:!0}),Pe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return gE(Va(e,r))},n}const an=gE(nd);an.Axios=Aa;an.CanceledError=Ss;an.CancelToken=_ge;an.isCancel=aE;an.VERSION=hE;an.toFormData=Rg;an.AxiosError=mt;an.Cancel=an.CanceledError;an.all=function(t){return Promise.all(t)};an.spread=Pge;an.isAxiosError=Oge;an.mergeConfig=Va;an.AxiosHeaders=ho;an.formToJSON=e=>iE(Pe.isHTMLForm(e)?new FormData(e):e);an.getAdapter=fE.getAdapter;an.HttpStatusCode=C1;an.default=an;const{Axios:Qve,AxiosError:eme,CanceledError:tme,isCancel:nme,CancelToken:ome,VERSION:rme,all:ime,Cancel:ame,isAxiosError:lme,spread:sme,toFormData:cme,AxiosHeaders:ume,HttpStatusCode:dme,formToJSON:fme,getAdapter:hme,mergeConfig:pme}=an,Ra="http://101.200.148.149:8555",Qh=an.create({baseURL:Ra,timeout:5e3}),Tge=["src"],Ige=["src"],Ege=re({__name:"Check",props:{filePath:String,formState:String},emits:["update:formState"],setup(e,{emit:t}){const n=e,o=t,r=oe("img");He(()=>{n.filePath&&(r.value=n.filePath.split(".").pop()==="pdf"?"pdf":"img",Qh.get("/recognize?filePath="+encodeURIComponent(n.filePath)).then(u=>{console.log(u.data),a.value=u.data,o("update:formState",JSON.stringify(u.data))}),i.value=Ra+"/"+n.filePath)});const i=oe("");let a=oe({drawer:"",invoiceAmountPreTax:0,invoiceCode:"",invoiceDate:"",invoiceDetails:[{amount:0,itemName:"",tax:0,taxRate:0}],invoiceNumber:"",invoiceTax:0,invoiceType:"",purchaserName:"",purchaserTaxNumber:"",remarks:"",sellerBankAccountInfo:"",sellerContactInfo:"",sellerName:"",sellerTaxNumber:"",specialTag:"",title:"",totalAmount:0});const l=u=>{console.log("Success:",u)},s=u=>{console.log("Failed:",u)};return(u,c)=>{const d=vt("a-col"),f=vt("a-input"),h=vt("a-form-item"),p=vt("a-form"),g=vt("a-row"),m=vt("a-layout-content");return Rt(),vn(m,null,{default:Ve(()=>[v(g,null,{default:Ve(()=>[v(d,{span:15},{default:Ve(()=>[r.value==="img"?(Rt(),Jr("img",{key:0,src:i.value,alt:"",class:"pdf"},null,8,Tge)):gn("",!0),r.value==="pdf"?(Rt(),Jr("iframe",{key:1,src:i.value,class:"pdf"},null,8,Ige)):gn("",!0)]),_:1}),v(d,{span:8},{default:Ve(()=>[v(p,{model:Ue(a),name:"basic","label-col":{span:8},"wrapper-col":{span:16},autocomplete:"off",onFinish:l,onFinishFailed:s},{default:Ve(()=>[v(h,{label:"发票类型"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceType,"onUpdate:value":c[0]||(c[0]=S=>Ue(a).invoiceType=S)},null,8,["value"])]),_:1}),v(h,{label:"发票号码"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceNumber,"onUpdate:value":c[1]||(c[1]=S=>Ue(a).invoiceNumber=S)},null,8,["value"])]),_:1}),v(h,{label:"开票日期"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceDate,"onUpdate:value":c[2]||(c[2]=S=>Ue(a).invoiceDate=S)},null,8,["value"])]),_:1}),v(h,{label:"不含税金额"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceAmountPreTax,"onUpdate:value":c[3]||(c[3]=S=>Ue(a).invoiceAmountPreTax=S)},null,8,["value"])]),_:1}),v(h,{label:"税额"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceTax,"onUpdate:value":c[4]||(c[4]=S=>Ue(a).invoiceTax=S)},null,8,["value"])]),_:1}),v(h,{label:"价税合计"},{default:Ve(()=>[v(f,{value:Ue(a).totalAmount,"onUpdate:value":c[5]||(c[5]=S=>Ue(a).totalAmount=S)},null,8,["value"])]),_:1}),v(h,{label:"销方名称"},{default:Ve(()=>[v(f,{value:Ue(a).sellerName,"onUpdate:value":c[6]||(c[6]=S=>Ue(a).sellerName=S)},null,8,["value"])]),_:1}),v(h,{label:"销方税号"},{default:Ve(()=>[v(f,{value:Ue(a).sellerTaxNumber,"onUpdate:value":c[7]||(c[7]=S=>Ue(a).sellerTaxNumber=S)},null,8,["value"])]),_:1}),v(h,{label:"购方名称"},{default:Ve(()=>[v(f,{value:Ue(a).purchaserName,"onUpdate:value":c[8]||(c[8]=S=>Ue(a).purchaserName=S)},null,8,["value"])]),_:1}),v(h,{label:"购方税号"},{default:Ve(()=>[v(f,{value:Ue(a).purchaserTaxNumber,"onUpdate:value":c[9]||(c[9]=S=>Ue(a).purchaserTaxNumber=S)},null,8,["value"])]),_:1}),v(h,{label:"发票代码"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceCode,"onUpdate:value":c[10]||(c[10]=S=>Ue(a).invoiceCode=S)},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1})]),_:1})}}}),Cs=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Mge=Cs(Ege,[["__scopeId","data-v-63a0040f"]]),Age=re({__name:"upload",props:{filePath:String},emits:["update:filePath"],setup(e,{emit:t}){const n=oe([]),o=e,r=t,i=l=>(console.log(l),!1);console.log(o.filePath);const a=l=>{const{file:s,onSuccess:u,onError:c,onProgress:d}=l,f=new FormData;f.append("file",s);const h=new XMLHttpRequest;h.upload.onprogress=p=>{p.lengthComputable&&d({percent:p.loaded/p.total*100},s)},h.onload=()=>{if(h.status===200||h.status===201){console.log(h.responseText),u(h.responseText,s);let p=JSON.parse(h.responseText);r("update:filePath",p.file_path)}else c(new Error(`Upload failed with status ${h.status}`))},h.onerror=()=>{c(new Error("Network error"))},h.open("POST",Ra+"/upload"),h.send(f)};return(l,s)=>{const u=vt("a-button"),c=vt("a-upload"),d=vt("a-layout-content");return Rt(),vn(d,{class:"container"},{default:Ve(()=>[v(c,{"file-list":n.value,"onUpdate:fileList":s[0]||(s[0]=f=>n.value=f),customRequest:a,"list-type":"picture",class:"upload-list-inline","max-count":1,onRemove:i},{default:Ve(()=>[v(u,null,{default:Ve(()=>[v(Ue(Ig)),s[1]||(s[1]=It(" 上传发票 ",-1))]),_:1,__:[1]})]),_:1},8,["file-list"])]),_:1})}}}),Rge=Cs(Age,[["__scopeId","data-v-9f5a173f"]]),Dge={key:0},Nge={key:1},Fge=re({__name:"report",props:{filePath:String},setup(e){const t=e,n=oe("img");He(()=>{t.filePath&&(n.value=t.filePath.split(".").pop()==="pdf"?"pdf":"img",Qh.get("/verify?filePath="+encodeURIComponent(t.filePath)).then(i=>{console.log(i),r.value=i.data}),o.value=Ra+"/"+t.filePath)});const o=oe("");let r=oe({status:"",inspectionAmount:"",cyjgxx:"",verify_time:""});return(i,a)=>{const l=vt("a-result"),s=vt("a-layout-content");return Rt(),vn(s,null,{default:Ve(()=>[v(l,{status:Ue(r).status,title:Ue(r).cyjgxx},{subTitle:Ve(()=>[Ue(r).status==="success"?(Rt(),Jr("p",Dge,"查验次数: "+E1(Ue(r).inspectionAmount),1)):gn("",!0),Ue(r).status==="success"?(Rt(),Jr("p",Nge,"已存入发票库")):gn("",!0)]),_:1},8,["status","title"])]),_:1})}}}),kge=Cs(Fge,[["__scopeId","data-v-34c6f13c"]]),Bge=re({__name:"index",setup(e){const t=[{title:"上传发票",icon:Oo(Ig)},{title:"识别发票",icon:Oo(YS)},{title:"验证发票",icon:Oo(qS)}],n=oe(""),o=oe(3),r=()=>{o.value++},i=()=>{o.value--},a=()=>{console.log("保存成功")},l=oe("");return(s,u)=>{const c=vt("a-steps"),d=vt("a-layout-content"),f=vt("a-button"),h=vt("a-space"),p=vt("a-col"),g=vt("a-row"),m=vt("a-layout-footer"),S=vt("a-layout");return Rt(),Jr(ze,null,[v(c,{current:o.value,items:t},null,8,["current"]),v(S,null,{default:Ve(()=>[v(d,{class:"container"},{default:Ve(()=>[o.value==0?(Rt(),vn(Rge,{key:0,filePath:n.value,"onUpdate:filePath":u[0]||(u[0]=y=>n.value=y)},null,8,["filePath"])):gn("",!0),o.value==1?(Rt(),vn(Mge,{key:1,filePath:n.value,"onUpdate:filePath":u[1]||(u[1]=y=>n.value=y),formState:l.value,"onUpdate:formState":u[2]||(u[2]=y=>l.value=y)},null,8,["filePath","formState"])):gn("",!0),o.value==2?(Rt(),vn(kge,{key:2,filePath:n.value,"onUpdate:filePath":u[3]||(u[3]=y=>n.value=y),formState:l.value,"onUpdate:formState":u[4]||(u[4]=y=>l.value=y)},null,8,["filePath","formState"])):gn("",!0)]),_:1}),v(m,null,{default:Ve(()=>[v(g,null,{default:Ve(()=>[v(p,{span:12,offset:"16"},{default:Ve(()=>[v(h,null,{default:Ve(()=>[o.value>0?(Rt(),vn(f,{key:0,type:"default",onClick:i},{default:Ve(()=>u[5]||(u[5]=[It("上一步",-1)])),_:1,__:[5]})):gn("",!0),o.valueu[6]||(u[6]=[It("下一步",-1)])),_:1,__:[6]})):gn("",!0),o.value==t.length-1?(Rt(),vn(f,{key:2,type:"dashed",onClick:a},{default:Ve(()=>u[7]||(u[7]=[It("完成",-1)])),_:1,__:[7]})):gn("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})],64)}}}),Lge=Cs(Bge,[["__scopeId","data-v-c563b4dc"]]),Hge={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},vE={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},x1={lang:w({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},Hge),timePickerLocale:w({},vE)};x1.lang.ok="确定";const yo="${label}不是一个有效的${type}",zge={locale:"zh-cn",Pagination:dT,DatePicker:x1,TimePicker:vE,Calendar:x1,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:yo,method:yo,array:yo,object:yo,number:yo,date:yo,boolean:yo,integer:yo,float:yo,regexp:yo,email:yo,url:yo,hex:yo},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码已过期",refresh:"点击刷新",scanned:"已扫描"}};var jf={exports:{}},jge=jf.exports,s6;function Vge(){return s6||(s6=1,function(e,t){(function(n,o){e.exports=o(FP())})(jge,function(n){function o(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var r=o(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var s=100*a+l;return s<600?"凌晨":s<900?"早上":s<1100?"上午":s<1300?"中午":s<1800?"下午":"晚上"}};return r.default.locale(i,null,!0),i})}(jf)),jf.exports}Vge();const Wge={class:"table-operations"},Kge={class:"clearfix"},Gge=["src"],Uge=re({__name:"manage",setup(e){const[t,n]=Vi.useMessage(),o=[{title:"发票号码",dataIndex:"invoiceNumber",key:"invoiceNumber"},{title:"销方名称",dataIndex:"sellerName",key:"sellerName"},{title:"销方税号",dataIndex:"sellerTaxNumber",key:"sellerTaxNumber"},{title:"不含税金额",dataIndex:"invoiceAmountPreTax",key:"invoiceAmountPreTax"},{title:"税额",dataIndex:"invoiceTax",key:"invoiceTax"},{title:"价税合计",dataIndex:"totalAmount",key:"totalAmount"},{title:"开票日期",dataIndex:"invoiceDate",key:"invoiceDate"},{title:"查验结果",dataIndex:"verify_status",key:"verify_status"},{title:"查验次数",dataIndex:"inspectionAmount",key:"inspectionAmount"},{title:"查验时间",dataIndex:"verify_time",key:"verify_time"},{title:"操作",dataIndex:"action",key:"action"}];let r=oe([]),i=oe({page:1,pageSize:100,total:0,params:{verify_status:"success",value:null,verify_time:null}});const a={onChange:(P,O)=>{console.log(`selectedRowKeys: ${P}`,"selectedRows: ",O)},getCheckboxProps:P=>({disabled:P.status==="yes",name:P.status})},l=oe(!1),s=oe(""),u=oe(!1),c=oe({id:"",status:!1,desc:"",desc_files:"",fileIds:new Array}),d=()=>{u.value=!0,Qh.post("/updateInvoice",{invoiceId:c.value.id,status:c.value.status?"yes":"no",desc:c.value.desc,desc_files:c.value.fileIds.join(",")}).then(P=>{P.status==200&&(l.value=!1,u.value=!1,t.success("修改成功"))})},f=P=>{if(P.status==="yes"?s.value="备注":s.value="入账",c.value=Object.assign({},P),c.value.status=P.status==="yes",c.value.fileIds=P.desc_files.split(","),P.desc_files){let O=P.desc_files.split(",");p.value=[];for(let T=0;T{Qh.post("/listInvoice",{verify_status:i.value.params.verify_status,value:i.value.params.value,verify_time:i.value.params.verify_time}).then(P=>{console.log(P),r.value=P.data})},p=oe([]),g=oe(!1),m=oe(""),S=oe("");function y(P){return new Promise((O,T)=>{const I=new FileReader;I.readAsDataURL(P),I.onload=()=>O(I.result),I.onerror=R=>T(R)})}const b=()=>{g.value=!1,S.value=""},x=async P=>{!P.url&&!P.preview&&(P.preview=await y(P.originFileObj)),m.value=P.url||P.preview,g.value=!0,S.value=P.name||P.url.substring(P.url.lastIndexOf("/")+1)},C=P=>{P.file.status==="done"&&(P.file.uid=P.file.response.file_path,c.value.fileIds.push(P.file.response.file_path))},_=P=>{let O=c.value.fileIds.indexOf(P.uid);c.value.fileIds.splice(O,1)},$=P=>{const{file:O,onSuccess:T,onError:I,onProgress:R}=P,F=new FormData;F.append("file",O);const H=new XMLHttpRequest;H.upload.onprogress=M=>{M.lengthComputable&&R({percent:M.loaded/M.total*100},O)},H.onload=()=>{if(H.status===200||H.status===201){console.log(H.responseText),T(H.responseText,O);let M=JSON.parse(H.responseText);c.value.desc_files?c.value.desc_files+=",":c.value.desc_files="",c.value.desc_files+=M.file_path}else I(new Error(`Upload failed with status ${H.status}`))},H.onerror=()=>{I(new Error("Network error"))},H.open("POST",Ra+"/upload"),H.send(F)};return dn.locale("zh-cn"),He(()=>{h()}),(P,O)=>{const T=vt("a-range-picker"),I=vt("a-form-item"),R=vt("a-input"),F=vt("a-radio-button"),H=vt("a-radio-group"),M=vt("a-button"),B=vt("a-form"),E=vt("a-col"),A=vt("a-row"),D=vt("a-tag"),k=vt("a-image"),L=vt("a-image-preview-group"),j=vt("a-typography-title"),V=vt("a-typography-paragraph"),Y=vt("a-table"),U=vt("a-switch"),G=vt("a-textarea"),W=vt("a-upload"),J=vt("a-modal");return Rt(),Jr(ze,null,[Ur("div",Wge,[v(A,{gutter:20},{default:Ve(()=>[v(E,{span:22,align:"end",offset:"2"},{default:Ve(()=>[v(B,{value:Ue(i),"onUpdate:value":O[3]||(O[3]=Q=>tn(i)?i.value=Q:i=Q),layout:"inline"},{default:Ve(()=>[v(I,{label:"验证时间"},{default:Ve(()=>[v(T,{value:Ue(i).params.verify_time,"onUpdate:value":O[0]||(O[0]=Q=>Ue(i).params.verify_time=Q),valueFormat:"YYYY-MM-DD HH:mm:ss",locale:Ue(zge).DatePicker},null,8,["value","locale"])]),_:1}),v(I,{label:"关键字"},{default:Ve(()=>[v(R,{value:Ue(i).params.value,"onUpdate:value":O[1]||(O[1]=Q=>Ue(i).params.value=Q),"allow-clear":""},null,8,["value"])]),_:1}),v(I,{label:"验证结果"},{default:Ve(()=>[v(H,{value:Ue(i).params.verify_status,"onUpdate:value":O[2]||(O[2]=Q=>Ue(i).params.verify_status=Q)},{default:Ve(()=>[v(F,{value:"success"},{default:Ve(()=>O[9]||(O[9]=[It("正常",-1)])),_:1,__:[9]}),v(F,{value:"faild"},{default:Ve(()=>O[10]||(O[10]=[It("异常",-1)])),_:1,__:[10]})]),_:1},8,["value"])]),_:1}),v(I,null,{default:Ve(()=>[v(M,{type:"primary",icon:Oo(Ue(Qa)),onClick:h},{default:Ve(()=>O[11]||(O[11]=[It("搜索",-1)])),_:1,__:[11]},8,["icon"])]),_:1})]),_:1},8,["value"])]),_:1})]),_:1})]),v(Y,{columns:o,"data-source":Ue(r),"row-selection":a},{bodyCell:Ve(({column:Q,record:q})=>[Q.key==="verify_status"?(Rt(),Jr(ze,{key:0},[q.verify_status==="success"?(Rt(),vn(D,{key:0,color:"green"},{default:Ve(()=>O[12]||(O[12]=[It("正常",-1)])),_:1,__:[12]})):gn("",!0),q.verify_status==="fail"?(Rt(),vn(D,{key:1,color:"red"},{default:Ve(()=>O[13]||(O[13]=[It("异常",-1)])),_:1,__:[13]})):gn("",!0)],64)):gn("",!0),Q.key==="action"?(Rt(),Jr(ze,{key:1},[q.status==="yes"?(Rt(),vn(M,{key:0,type:"primary",onClick:ee=>f(q)},{default:Ve(()=>O[14]||(O[14]=[It("备注",-1)])),_:2,__:[14]},1032,["onClick"])):gn("",!0),q.status==="no"?(Rt(),vn(M,{key:1,type:"primary",onClick:ee=>f(q)},{default:Ve(()=>O[15]||(O[15]=[It("入账",-1)])),_:2,__:[15]},1032,["onClick"])):gn("",!0)],64)):gn("",!0)]),expandedRowRender:Ve(({record:Q})=>[v(A,null,{default:Ve(()=>[v(E,{span:8},{default:Ve(()=>[Q.desc_files?(Rt(),vn(L,{key:0},{default:Ve(()=>[(Rt(!0),Jr(ze,null,zM(Q.desc_files.split(","),q=>(Rt(),vn(k,{width:200,src:Ue(Ra)+"/"+q},null,8,["src"]))),256))]),_:2},1024)):gn("",!0)]),_:2},1024),v(E,{span:16},{default:Ve(()=>[v(j,{level:4},{default:Ve(()=>O[16]||(O[16]=[It("备注",-1)])),_:1,__:[16]}),v(V,null,{default:Ve(()=>[Ur("blockquote",null,E1(Q.desc)+"asdsad",1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),expandColumnTitle:Ve(()=>[v(Ue(ZS))]),_:1},8,["data-source"]),v(J,{open:l.value,"onUpdate:open":O[8]||(O[8]=Q=>l.value=Q),title:s.value,"confirm-loading":u.value,onOk:d},{default:Ve(()=>[v(B,{value:c.value,"onUpdate:value":O[7]||(O[7]=Q=>c.value=Q)},{default:Ve(()=>[v(I,{label:"是否已报销"},{default:Ve(()=>[v(U,{checked:c.value.status,"onUpdate:checked":O[4]||(O[4]=Q=>c.value.status=Q)},null,8,["checked"])]),_:1}),v(I,{label:"备注"},{default:Ve(()=>[v(G,{value:c.value.desc,"onUpdate:value":O[5]||(O[5]=Q=>c.value.desc=Q),rows:6},null,8,["value"])]),_:1}),v(I,{label:"附件"},{default:Ve(()=>[Ur("div",Kge,[v(W,{"file-list":p.value,"onUpdate:fileList":O[6]||(O[6]=Q=>p.value=Q),customRequest:$,onChange:C,onRemove:_,"list-type":"picture-card",onPreview:x},{default:Ve(()=>[Ur("div",null,[v(Ue(tg)),O[17]||(O[17]=Ur("div",{style:{"margin-top":"8px"}},"上传",-1))])]),_:1},8,["file-list"]),v(J,{open:g.value,title:S.value,footer:null,onCancel:b},{default:Ve(()=>[Ur("img",{alt:"example",style:{width:"100%"},src:m.value},null,8,Gge)]),_:1},8,["open","title"])])]),_:1})]),_:1},8,["value"])]),_:1},8,["open","title","confirm-loading"]),v(Ue(n))],64)}}}),Xge=Cs(Uge,[["__scopeId","data-v-08087e29"]]),Yge=re({__name:"App",setup(e){const t=oe(["1"]);let n=oe(1);const o=r=>{console.log("click ",r),n.value=r.key};return(r,i)=>{const a=vt("a-menu-item"),l=vt("a-menu"),s=vt("a-layout-header"),u=vt("a-layout"),c=vt("a-layout-content");return Rt(),vn(u,{class:"container"},{default:Ve(()=>[v(s,{class:"header"},{default:Ve(()=>[i[5]||(i[5]=Ur("div",{class:"logo"},null,-1)),v(l,{selectedKeys:t.value,"onUpdate:selectedKeys":i[0]||(i[0]=d=>t.value=d),theme:"dark",mode:"horizontal",style:{lineHeight:"64px"},onSelect:o},{default:Ve(()=>[v(a,{key:"1"},{default:Ve(()=>i[1]||(i[1]=[It("发票查验",-1)])),_:1,__:[1]}),v(a,{key:"2"},{default:Ve(()=>i[2]||(i[2]=[It("发票管理",-1)])),_:1,__:[2]}),v(a,{key:"3"},{default:Ve(()=>i[3]||(i[3]=[It("发票复验",-1)])),_:1,__:[3]}),v(a,{key:"4"},{default:Ve(()=>i[4]||(i[4]=[It("发票统计",-1)])),_:1,__:[4]})]),_:1},8,["selectedKeys"])]),_:1,__:[5]}),v(c,{style:{padding:"0 10px"}},{default:Ve(()=>[v(u,{style:{padding:"24px 0",background:"#fff"}},{default:Ve(()=>[Ue(n)==1?(Rt(),vn(Lge,{key:0})):gn("",!0),Ue(n)==2?(Rt(),vn(Xge,{key:1})):gn("",!0)]),_:1})]),_:1})]),_:1})}}}),qge=Cs(Yge,[["__scopeId","data-v-0093e7ee"]]);var Vf={exports:{}},Ds={},xm={},wm={},c6;function St(){return c6||(c6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof Rw<"u"?Rw:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.22",isBrowser:n(),isUnminified:/param/.test((function(r){}).toString()),dblClickWindow:400,getAngle(r){return e.Konva.angleDeg?r*t:r},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var r;return(r=e.Konva.Transformer)===null||r===void 0?void 0:r.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(r){e.glob.Konva=r}};const o=r=>{e.Konva[r.prototype.getClassName()]=r};e._registerNode=o,e.Konva._injectGlobal(e.Konva)}(wm)),wm}var $m={},u6;function Jt(){return u6||(u6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=St();class n{constructor(x=[1,0,0,1,0,0]){this.dirty=!1,this.m=x&&x.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 n(this.m)}copyInto(x){x.m[0]=this.m[0],x.m[1]=this.m[1],x.m[2]=this.m[2],x.m[3]=this.m[3],x.m[4]=this.m[4],x.m[5]=this.m[5]}point(x){const C=this.m;return{x:C[0]*x.x+C[2]*x.y+C[4],y:C[1]*x.x+C[3]*x.y+C[5]}}translate(x,C){return this.m[4]+=this.m[0]*x+this.m[2]*C,this.m[5]+=this.m[1]*x+this.m[3]*C,this}scale(x,C){return this.m[0]*=x,this.m[1]*=x,this.m[2]*=C,this.m[3]*=C,this}rotate(x){const C=Math.cos(x),_=Math.sin(x),$=this.m[0]*C+this.m[2]*_,P=this.m[1]*C+this.m[3]*_,O=this.m[0]*-_+this.m[2]*C,T=this.m[1]*-_+this.m[3]*C;return this.m[0]=$,this.m[1]=P,this.m[2]=O,this.m[3]=T,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(x,C){const _=this.m[0]+this.m[2]*C,$=this.m[1]+this.m[3]*C,P=this.m[2]+this.m[0]*x,O=this.m[3]+this.m[1]*x;return this.m[0]=_,this.m[1]=$,this.m[2]=P,this.m[3]=O,this}multiply(x){const C=this.m[0]*x.m[0]+this.m[2]*x.m[1],_=this.m[1]*x.m[0]+this.m[3]*x.m[1],$=this.m[0]*x.m[2]+this.m[2]*x.m[3],P=this.m[1]*x.m[2]+this.m[3]*x.m[3],O=this.m[0]*x.m[4]+this.m[2]*x.m[5]+this.m[4],T=this.m[1]*x.m[4]+this.m[3]*x.m[5]+this.m[5];return this.m[0]=C,this.m[1]=_,this.m[2]=$,this.m[3]=P,this.m[4]=O,this.m[5]=T,this}invert(){const x=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),C=this.m[3]*x,_=-this.m[1]*x,$=-this.m[2]*x,P=this.m[0]*x,O=x*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),T=x*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=C,this.m[1]=_,this.m[2]=$,this.m[3]=P,this.m[4]=O,this.m[5]=T,this}getMatrix(){return this.m}decompose(){const x=this.m[0],C=this.m[1],_=this.m[2],$=this.m[3],P=this.m[4],O=this.m[5],T=x*$-C*_,I={x:P,y:O,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(x!=0||C!=0){const R=Math.sqrt(x*x+C*C);I.rotation=C>0?Math.acos(x/R):-Math.acos(x/R),I.scaleX=R,I.scaleY=T/R,I.skewX=(x*_+C*$)/T,I.skewY=0}else if(_!=0||$!=0){const R=Math.sqrt(_*_+$*$);I.rotation=Math.PI/2-($>0?Math.acos(-_/R):-Math.acos(_/R)),I.scaleX=T/R,I.scaleY=R,I.skewX=0,I.skewY=(x*_+C*$)/T}return I.rotation=e.Util._getRotation(I.rotation),I}}e.Transform=n;const o="[object Array]",r="[object Number]",i="[object String]",a="[object Boolean]",l=Math.PI/180,s=180/Math.PI,u="#",c="",d="0",f="Konva warning: ",h="Konva error: ",p="rgb(",g={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]},m=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let S=[];const y=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(b){setTimeout(b,60)};e.Util={_isElement(b){return!!(b&&b.nodeType==1)},_isFunction(b){return!!(b&&b.constructor&&b.call&&b.apply)},_isPlainObject(b){return!!b&&b.constructor===Object},_isArray(b){return Object.prototype.toString.call(b)===o},_isNumber(b){return Object.prototype.toString.call(b)===r&&!isNaN(b)&&isFinite(b)},_isString(b){return Object.prototype.toString.call(b)===i},_isBoolean(b){return Object.prototype.toString.call(b)===a},isObject(b){return b instanceof Object},isValidSelector(b){if(typeof b!="string")return!1;const x=b[0];return x==="#"||x==="."||x===x.toUpperCase()},_sign(b){return b===0||b>0?1:-1},requestAnimFrame(b){S.push(b),S.length===1&&y(function(){const x=S;S=[],x.forEach(function(C){C()})})},createCanvasElement(){const b=document.createElement("canvas");try{b.style=b.style||{}}catch{}return b},createImageElement(){return document.createElement("img")},_isInDocument(b){for(;b=b.parentNode;)if(b==document)return!0;return!1},_urlToImage(b,x){const C=e.Util.createImageElement();C.onload=function(){x(C)},C.src=b},_rgbToHex(b,x,C){return((1<<24)+(b<<16)+(x<<8)+C).toString(16).slice(1)},_hexToRgb(b){b=b.replace(u,c);const x=parseInt(b,16);return{r:x>>16&255,g:x>>8&255,b:x&255}},getRandomColor(){let b=(Math.random()*16777215<<0).toString(16);for(;b.length<6;)b=d+b;return u+b},getRGB(b){let x;return b in g?(x=g[b],{r:x[0],g:x[1],b:x[2]}):b[0]===u?this._hexToRgb(b.substring(1)):b.substr(0,4)===p?(x=m.exec(b.replace(/ /g,"")),{r:parseInt(x[1],10),g:parseInt(x[2],10),b:parseInt(x[3],10)}):{r:0,g:0,b:0}},colorToRGBA(b){return b=b||"black",e.Util._namedColorToRBA(b)||e.Util._hex3ColorToRGBA(b)||e.Util._hex4ColorToRGBA(b)||e.Util._hex6ColorToRGBA(b)||e.Util._hex8ColorToRGBA(b)||e.Util._rgbColorToRGBA(b)||e.Util._rgbaColorToRGBA(b)||e.Util._hslColorToRGBA(b)},_namedColorToRBA(b){const x=g[b.toLowerCase()];return x?{r:x[0],g:x[1],b:x[2],a:1}:null},_rgbColorToRGBA(b){if(b.indexOf("rgb(")===0){b=b.match(/rgb\(([^)]+)\)/)[1];const x=b.split(/ *, */).map(Number);return{r:x[0],g:x[1],b:x[2],a:1}}},_rgbaColorToRGBA(b){if(b.indexOf("rgba(")===0){b=b.match(/rgba\(([^)]+)\)/)[1];const x=b.split(/ *, */).map((C,_)=>C.slice(-1)==="%"?_===3?parseInt(C)/100:parseInt(C)/100*255:Number(C));return{r:x[0],g:x[1],b:x[2],a:x[3]}}},_hex8ColorToRGBA(b){if(b[0]==="#"&&b.length===9)return{r:parseInt(b.slice(1,3),16),g:parseInt(b.slice(3,5),16),b:parseInt(b.slice(5,7),16),a:parseInt(b.slice(7,9),16)/255}},_hex6ColorToRGBA(b){if(b[0]==="#"&&b.length===7)return{r:parseInt(b.slice(1,3),16),g:parseInt(b.slice(3,5),16),b:parseInt(b.slice(5,7),16),a:1}},_hex4ColorToRGBA(b){if(b[0]==="#"&&b.length===5)return{r:parseInt(b[1]+b[1],16),g:parseInt(b[2]+b[2],16),b:parseInt(b[3]+b[3],16),a:parseInt(b[4]+b[4],16)/255}},_hex3ColorToRGBA(b){if(b[0]==="#"&&b.length===4)return{r:parseInt(b[1]+b[1],16),g:parseInt(b[2]+b[2],16),b:parseInt(b[3]+b[3],16),a:1}},_hslColorToRGBA(b){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(b)){const[x,...C]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(b),_=Number(C[0])/360,$=Number(C[1])/100,P=Number(C[2])/100;let O,T,I;if($===0)return I=P*255,{r:Math.round(I),g:Math.round(I),b:Math.round(I),a:1};P<.5?O=P*(1+$):O=P+$-P*$;const R=2*P-O,F=[0,0,0];for(let H=0;H<3;H++)T=_+1/3*-(H-1),T<0&&T++,T>1&&T--,6*T<1?I=R+(O-R)*6*T:2*T<1?I=O:3*T<2?I=R+(O-R)*(2/3-T)*6:I=R,F[H]=I*255;return{r:Math.round(F[0]),g:Math.round(F[1]),b:Math.round(F[2]),a:1}}},haveIntersection(b,x){return!(x.x>b.x+b.width||x.x+x.widthb.y+b.height||x.y+x.height1?(O=C,T=_,I=(C-$)*(C-$)+(_-P)*(_-P)):(O=b+F*(C-b),T=x+F*(_-x),I=(O-$)*(O-$)+(T-P)*(T-P))}return[O,T,I]},_getProjectionToLine(b,x,C){const _=e.Util.cloneObject(b);let $=Number.MAX_VALUE;return x.forEach(function(P,O){if(!C&&O===x.length-1)return;const T=x[(O+1)%x.length],I=e.Util._getProjectionToSegment(P.x,P.y,T.x,T.y,b.x,b.y),R=I[0],F=I[1],H=I[2];H<$&&(_.x=R,_.y=F,$=H)}),_},_prepareArrayForTween(b,x,C){const _=[],$=[];if(b.length>x.length){const O=x;x=b,b=O}for(let O=0;O{x.width=0,x.height=0})},drawRoundedRectPath(b,x,C,_){let $=0,P=0,O=0,T=0;typeof _=="number"?$=P=O=T=Math.min(_,x/2,C/2):($=Math.min(_[0]||0,x/2,C/2),P=Math.min(_[1]||0,x/2,C/2),T=Math.min(_[2]||0,x/2,C/2),O=Math.min(_[3]||0,x/2,C/2)),b.moveTo($,0),b.lineTo(x-P,0),b.arc(x-P,P,P,Math.PI*3/2,0,!1),b.lineTo(x,C-T),b.arc(x-T,C-T,T,0,Math.PI/2,!1),b.lineTo(O,C),b.arc(O,C-O,O,Math.PI/2,Math.PI,!1),b.lineTo(0,$),b.arc($,$,$,Math.PI,Math.PI*3/2,!1)}}}($m)),$m}var Ns={},zr={},jr={},d6;function mE(){if(d6)return jr;d6=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.HitContext=jr.SceneContext=jr.Context=void 0;const e=Jt(),t=St();function n(S){const y=[],b=S.length,x=e.Util;for(let C=0;Ctypeof I=="number"?Math.floor(I):I)),_+=r+T.join(o)+i)):(_+=P.property,y||(_+=c+P.val)),_+=s;return _}clearTrace(){this.traceArr=[]}_trace(y){let b=this.traceArr,x;b.push(y),x=b.length,x>=h&&b.shift()}reset(){const y=this.getCanvas().getPixelRatio();this.setTransform(1*y,0,0,1*y,0,0)}getCanvas(){return this.canvas}clear(y){const b=this.getCanvas();y?this.clearRect(y.x||0,y.y||0,y.width||0,y.height||0):this.clearRect(0,0,b.getWidth()/b.pixelRatio,b.getHeight()/b.pixelRatio)}_applyLineCap(y){const b=y.attrs.lineCap;b&&this.setAttr("lineCap",b)}_applyOpacity(y){const b=y.getAbsoluteOpacity();b!==1&&this.setAttr("globalAlpha",b)}_applyLineJoin(y){const b=y.attrs.lineJoin;b&&this.setAttr("lineJoin",b)}setAttr(y,b){this._context[y]=b}arc(y,b,x,C,_,$){this._context.arc(y,b,x,C,_,$)}arcTo(y,b,x,C,_){this._context.arcTo(y,b,x,C,_)}beginPath(){this._context.beginPath()}bezierCurveTo(y,b,x,C,_,$){this._context.bezierCurveTo(y,b,x,C,_,$)}clearRect(y,b,x,C){this._context.clearRect(y,b,x,C)}clip(...y){this._context.clip.apply(this._context,y)}closePath(){this._context.closePath()}createImageData(y,b){const x=arguments;if(x.length===2)return this._context.createImageData(y,b);if(x.length===1)return this._context.createImageData(y)}createLinearGradient(y,b,x,C){return this._context.createLinearGradient(y,b,x,C)}createPattern(y,b){return this._context.createPattern(y,b)}createRadialGradient(y,b,x,C,_,$){return this._context.createRadialGradient(y,b,x,C,_,$)}drawImage(y,b,x,C,_,$,P,O,T){const I=arguments,R=this._context;I.length===3?R.drawImage(y,b,x):I.length===5?R.drawImage(y,b,x,C,_):I.length===9&&R.drawImage(y,b,x,C,_,$,P,O,T)}ellipse(y,b,x,C,_,$,P,O){this._context.ellipse(y,b,x,C,_,$,P,O)}isPointInPath(y,b,x,C){return x?this._context.isPointInPath(x,y,b,C):this._context.isPointInPath(y,b,C)}fill(...y){this._context.fill.apply(this._context,y)}fillRect(y,b,x,C){this._context.fillRect(y,b,x,C)}strokeRect(y,b,x,C){this._context.strokeRect(y,b,x,C)}fillText(y,b,x,C){C?this._context.fillText(y,b,x,C):this._context.fillText(y,b,x)}measureText(y){return this._context.measureText(y)}getImageData(y,b,x,C){return this._context.getImageData(y,b,x,C)}lineTo(y,b){this._context.lineTo(y,b)}moveTo(y,b){this._context.moveTo(y,b)}rect(y,b,x,C){this._context.rect(y,b,x,C)}roundRect(y,b,x,C,_){this._context.roundRect(y,b,x,C,_)}putImageData(y,b,x){this._context.putImageData(y,b,x)}quadraticCurveTo(y,b,x,C){this._context.quadraticCurveTo(y,b,x,C)}restore(){this._context.restore()}rotate(y){this._context.rotate(y)}save(){this._context.save()}scale(y,b){this._context.scale(y,b)}setLineDash(y){this._context.setLineDash?this._context.setLineDash(y):"mozDash"in this._context?this._context.mozDash=y:"webkitLineDash"in this._context&&(this._context.webkitLineDash=y)}getLineDash(){return this._context.getLineDash()}setTransform(y,b,x,C,_,$){this._context.setTransform(y,b,x,C,_,$)}stroke(y){y?this._context.stroke(y):this._context.stroke()}strokeText(y,b,x,C){this._context.strokeText(y,b,x,C)}transform(y,b,x,C,_,$){this._context.transform(y,b,x,C,_,$)}translate(y,b){this._context.translate(y,b)}_enableTrace(){let y=this,b=d.length,x=this.setAttr,C,_;const $=function(P){let O=y[P],T;y[P]=function(){return _=n(Array.prototype.slice.call(arguments,0)),T=O.apply(y,arguments),y._trace({method:P,args:_}),T}};for(C=0;C{r.dragStatus==="dragging"&&(o=!0)}),o},justDragged:!1,get node(){let o;return e.DD._dragElements.forEach(r=>{o=r.node}),o},_dragElements:new Map,_drag(o){const r=[];e.DD._dragElements.forEach((i,a)=>{const{node:l}=i,s=l.getStage();s.setPointersPositions(o),i.pointerId===void 0&&(i.pointerId=n.Util._getFirstPointerId(o));const u=s._changedPointerPositions.find(c=>c.id===i.pointerId);if(u){if(i.dragStatus!=="dragging"){const c=l.dragDistance();if(Math.max(Math.abs(u.x-i.startPointerPos.x),Math.abs(u.y-i.startPointerPos.y)){i.fire("dragmove",{type:"dragmove",target:i,evt:o},!0)})},_endDragBefore(o){const r=[];e.DD._dragElements.forEach(i=>{const{node:a}=i,l=a.getStage();if(o&&l.setPointersPositions(o),!l._changedPointerPositions.find(c=>c.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,i.dragStatus="stopped");const u=i.node.getLayer()||i.node instanceof t.Konva.Stage&&i.node;u&&r.indexOf(u)===-1&&r.push(u)}),r.forEach(i=>{i.draw()})},_endDragAfter(o){e.DD._dragElements.forEach((r,i)=>{r.dragStatus==="stopped"&&r.node.fire("dragend",{type:"dragend",target:r.node,evt:o},!0),r.dragStatus!=="dragging"&&e.DD._dragElements.delete(i)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))}(_m)),_m}var Pm={},lo={},p6;function Pt(){if(p6)return lo;p6=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.RGBComponent=o,lo.alphaComponent=r,lo.getNumberValidator=i,lo.getNumberOrArrayOfNumbersValidator=a,lo.getNumberOrAutoValidator=l,lo.getStringValidator=s,lo.getStringOrGradientValidator=u,lo.getFunctionValidator=c,lo.getNumberArrayValidator=d,lo.getBooleanValidator=f,lo.getComponentValidator=h;const e=St(),t=Jt();function n(p){return t.Util._isString(p)?'"'+p+'"':Object.prototype.toString.call(p)==="[object Number]"||t.Util._isBoolean(p)?p:Object.prototype.toString.call(p)}function o(p){return p>255?255:p<0?0:Math.round(p)}function r(p){return p>1?1:p<1e-4?1e-4:p}function i(){if(e.Konva.isUnminified)return function(p,g){return t.Util._isNumber(p)||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a number.'),p}}function a(p){if(e.Konva.isUnminified)return function(g,m){let S=t.Util._isNumber(g),y=t.Util._isArray(g)&&g.length==p;return!S&&!y&&t.Util.warn(n(g)+' is a not valid value for "'+m+'" attribute. The value should be a number or Array('+p+")"),g}}function l(){if(e.Konva.isUnminified)return function(p,g){return t.Util._isNumber(p)||p==="auto"||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a number or "auto".'),p}}function s(){if(e.Konva.isUnminified)return function(p,g){return t.Util._isString(p)||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a string.'),p}}function u(){if(e.Konva.isUnminified)return function(p,g){const m=t.Util._isString(p),S=Object.prototype.toString.call(p)==="[object CanvasGradient]"||p&&p.addColorStop;return m||S||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a string or a native gradient.'),p}}function c(){if(e.Konva.isUnminified)return function(p,g){return t.Util._isFunction(p)||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a function.'),p}}function d(){if(e.Konva.isUnminified)return function(p,g){const m=Int8Array?Object.getPrototypeOf(Int8Array):null;return m&&p instanceof m||(t.Util._isArray(p)?p.forEach(function(S){t.Util._isNumber(S)||t.Util.warn('"'+g+'" attribute has non numeric element '+S+". Make sure that all elements are numbers.")}):t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a array of numbers.')),p}}function f(){if(e.Konva.isUnminified)return function(p,g){return p===!0||p===!1||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a boolean.'),p}}function h(p){if(e.Konva.isUnminified)return function(g,m){return g==null||t.Util.isObject(g)||t.Util.warn(n(g)+' is a not valid value for "'+m+'" attribute. The value should be an object with properties '+p),g}}return lo}var g6;function xt(){return g6||(g6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=Jt(),n=Pt(),o="get",r="set";e.Factory={addGetterSetter(i,a,l,s,u){e.Factory.addGetter(i,a,l),e.Factory.addSetter(i,a,s,u),e.Factory.addOverloadedGetterSetter(i,a)},addGetter(i,a,l){const s=o+t.Util._capitalize(a);i.prototype[s]=i.prototype[s]||function(){const u=this.attrs[a];return u===void 0?l:u}},addSetter(i,a,l,s){const u=r+t.Util._capitalize(a);i.prototype[u]||e.Factory.overWriteSetter(i,a,l,s)},overWriteSetter(i,a,l,s){const u=r+t.Util._capitalize(a);i.prototype[u]=function(c){return l&&c!==void 0&&c!==null&&(c=l.call(this,c,a)),this._setAttr(a,c),s&&s.call(this),this}},addComponentsGetterSetter(i,a,l,s,u){const c=l.length,d=t.Util._capitalize,f=o+d(a),h=r+d(a);i.prototype[f]=function(){const g={};for(let m=0;m{this._setAttr(a+d(S),void 0)}),this._fireChangeEvent(a,m,g),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(i,a)},addOverloadedGetterSetter(i,a){const l=t.Util._capitalize(a),s=r+l,u=o+l;i.prototype[a]=function(){return arguments.length?(this[s](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(i,a,l,s){t.Util.error("Adding deprecated "+a);const u=o+t.Util._capitalize(a),c=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";i.prototype[u]=function(){t.Util.error(c);const d=this.attrs[a];return d===void 0?l:d},e.Factory.addSetter(i,a,s,function(){t.Util.error(c)}),e.Factory.addOverloadedGetterSetter(i,a)},backCompat(i,a){t.Util.each(a,function(l,s){const u=i.prototype[s],c=o+t.Util._capitalize(l),d=r+t.Util._capitalize(l);function f(){u.apply(this,arguments),t.Util.error('"'+l+'" method is deprecated and will be removed soon. Use ""'+s+'" instead.')}i.prototype[l]=f,i.prototype[c]=f,i.prototype[d]=f})},afterSetFilter(){this._filterUpToDate=!1}}}(Pm)),Pm}var v6;function ln(){if(v6)return Ns;v6=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.Node=void 0;const e=Fg(),t=r2(),n=xt(),o=St(),r=Jt(),i=Pt(),a="absoluteOpacity",l="allEventListeners",s="absoluteTransform",u="absoluteScale",c="canvas",d="Change",f="children",h="konva",p="listening",g="mouseenter",m="mouseleave",S="pointerenter",y="pointerleave",b="touchenter",x="touchleave",C="set",_="Shape",$=" ",P="stage",O="transform",T="Stage",I="visible",R=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join($);let F=1,H=class w1{constructor(E){this._id=F++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(E),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(E){(E===O||E===s)&&this._cache.get(E)?this._cache.get(E).dirty=!0:E?this._cache.delete(E):this._cache.clear()}_getCache(E,A){let D=this._cache.get(E);return(D===void 0||(E===O||E===s)&&D.dirty===!0)&&(D=A.call(this),this._cache.set(E,D)),D}_calculate(E,A,D){if(!this._attachedDepsListeners.get(E)){const k=A.map(L=>L+"Change.konva").join($);this.on(k,()=>{this._clearCache(E)}),this._attachedDepsListeners.set(E,!0)}return this._getCache(E,D)}_getCanvasCache(){return this._cache.get(c)}_clearSelfAndDescendantCache(E){this._clearCache(E),E===s&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(c)){const{scene:E,filter:A,hit:D,buffer:k}=this._cache.get(c);r.Util.releaseCanvas(E,A,D,k),this._cache.delete(c)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(E){const A=E||{};let D={};(A.x===void 0||A.y===void 0||A.width===void 0||A.height===void 0)&&(D=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let k=Math.ceil(A.width||D.width),L=Math.ceil(A.height||D.height),j=A.pixelRatio,V=A.x===void 0?Math.floor(D.x):A.x,Y=A.y===void 0?Math.floor(D.y):A.y,U=A.offset||0,G=A.drawBorder||!1,W=A.hitCanvasPixelRatio||1;if(!k||!L){r.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const J=Math.abs(Math.round(D.x)-V)>.5?1:0,Q=Math.abs(Math.round(D.y)-Y)>.5?1:0;k+=U*2+J,L+=U*2+Q,V-=U,Y-=U;const q=new e.SceneCanvas({pixelRatio:j,width:k,height:L}),ee=new e.SceneCanvas({pixelRatio:j,width:0,height:0,willReadFrequently:!0}),K=new e.HitCanvas({pixelRatio:W,width:k,height:L}),Z=q.getContext(),te=K.getContext(),se=new e.SceneCanvas({width:q.width/q.pixelRatio+Math.abs(V),height:q.height/q.pixelRatio+Math.abs(Y),pixelRatio:q.pixelRatio}),ie=se.getContext();return K.isCache=!0,q.isCache=!0,this._cache.delete(c),this._filterUpToDate=!1,A.imageSmoothingEnabled===!1&&(q.getContext()._context.imageSmoothingEnabled=!1,ee.getContext()._context.imageSmoothingEnabled=!1),Z.save(),te.save(),ie.save(),Z.translate(-V,-Y),te.translate(-V,-Y),ie.translate(-V,-Y),se.x=V,se.y=Y,this._isUnderCache=!0,this._clearSelfAndDescendantCache(a),this._clearSelfAndDescendantCache(u),this.drawScene(q,this,se),this.drawHit(K,this),this._isUnderCache=!1,Z.restore(),te.restore(),G&&(Z.save(),Z.beginPath(),Z.rect(0,0,k,L),Z.closePath(),Z.setAttr("strokeStyle","red"),Z.setAttr("lineWidth",5),Z.stroke(),Z.restore()),this._cache.set(c,{scene:q,filter:ee,hit:K,buffer:se,x:V,y:Y}),this._requestDraw(),this}isCached(){return this._cache.has(c)}getClientRect(E){throw new Error('abstract "getClientRect" method call')}_transformedRect(E,A){const D=[{x:E.x,y:E.y},{x:E.x+E.width,y:E.y},{x:E.x+E.width,y:E.y+E.height},{x:E.x,y:E.y+E.height}];let k=1/0,L=1/0,j=-1/0,V=-1/0;const Y=this.getAbsoluteTransform(A);return D.forEach(function(U){const G=Y.point(U);k===void 0&&(k=j=G.x,L=V=G.y),k=Math.min(k,G.x),L=Math.min(L,G.y),j=Math.max(j,G.x),V=Math.max(V,G.y)}),{x:k,y:L,width:j-k,height:V-L}}_drawCachedSceneCanvas(E){E.save(),E._applyOpacity(this),E._applyGlobalCompositeOperation(this);const A=this._getCanvasCache();E.translate(A.x,A.y);const D=this._getCachedSceneCanvas(),k=D.pixelRatio;E.drawImage(D._canvas,0,0,D.width/k,D.height/k),E.restore()}_drawCachedHitCanvas(E){const A=this._getCanvasCache(),D=A.hit;E.save(),E.translate(A.x,A.y),E.drawImage(D._canvas,0,0,D.width/D.pixelRatio,D.height/D.pixelRatio),E.restore()}_getCachedSceneCanvas(){let E=this.filters(),A=this._getCanvasCache(),D=A.scene,k=A.filter,L=k.getContext(),j,V,Y,U;if(E){if(!this._filterUpToDate){const G=D.pixelRatio;k.setSize(D.width/D.pixelRatio,D.height/D.pixelRatio);try{for(j=E.length,L.clear(),L.drawImage(D._canvas,0,0,D.getWidth()/G,D.getHeight()/G),V=L.getImageData(0,0,k.getWidth(),k.getHeight()),Y=0;Y{let A,D;if(!E)return this;for(A in E)A!==f&&(D=C+r.Util._capitalize(A),r.Util._isFunction(this[D])?this[D](E[A]):this._setAttr(A,E[A]))}),this}isListening(){return this._getCache(p,this._isListening)}_isListening(E){if(!this.listening())return!1;const D=this.getParent();return D&&D!==E&&this!==E?D._isListening(E):!0}isVisible(){return this._getCache(I,this._isVisible)}_isVisible(E){if(!this.visible())return!1;const D=this.getParent();return D&&D!==E&&this!==E?D._isVisible(E):!0}shouldDrawHit(E,A=!1){if(E)return this._isVisible(E)&&this._isListening(E);const D=this.getLayer();let k=!1;t.DD._dragElements.forEach(j=>{j.dragStatus==="dragging"&&(j.node.nodeType==="Stage"||j.node.getLayer()===D)&&(k=!0)});const L=!A&&!o.Konva.hitOnDragEnabled&&(k||o.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!L}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let E=this.getDepth(),A=this,D=0,k,L,j,V;function Y(G){for(k=[],L=G.length,j=0;j0&&k[0].getDepth()<=E&&Y(k)}const U=this.getStage();return A.nodeType!==T&&U&&Y(U.getChildren()),D}getDepth(){let E=0,A=this.parent;for(;A;)E++,A=A.parent;return E}_batchTransformChanges(E){this._batchingTransformChange=!0,E(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(O),this._clearSelfAndDescendantCache(s)),this._needClearTransformCache=!1}setPosition(E){return this._batchTransformChanges(()=>{this.x(E.x),this.y(E.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const E=this.getStage();if(!E)return null;const A=E.getPointerPosition();if(!A)return null;const D=this.getAbsoluteTransform().copy();return D.invert(),D.point(A)}getAbsolutePosition(E){let A=!1,D=this.parent;for(;D;){if(D.isCached()){A=!0;break}D=D.parent}A&&!E&&(E=!0);const k=this.getAbsoluteTransform(E).getMatrix(),L=new r.Transform,j=this.offset();return L.m=k.slice(),L.translate(j.x,j.y),L.getTranslation()}setAbsolutePosition(E){const{x:A,y:D,...k}=this._clearTransform();this.attrs.x=A,this.attrs.y=D,this._clearCache(O);const L=this._getAbsoluteTransform().copy();return L.invert(),L.translate(E.x,E.y),E={x:this.attrs.x+L.getTranslation().x,y:this.attrs.y+L.getTranslation().y},this._setTransform(k),this.setPosition({x:E.x,y:E.y}),this._clearCache(O),this._clearSelfAndDescendantCache(s),this}_setTransform(E){let A;for(A in E)this.attrs[A]=E[A]}_clearTransform(){const E={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,E}move(E){let A=E.x,D=E.y,k=this.x(),L=this.y();return A!==void 0&&(k+=A),D!==void 0&&(L+=D),this.setPosition({x:k,y:L}),this}_eachAncestorReverse(E,A){let D=[],k=this.getParent(),L,j;if(!(A&&A._id===this._id)){for(D.unshift(this);k&&(!A||k._id!==A._id);)D.unshift(k),k=k.parent;for(L=D.length,j=0;j0?(this.parent.children.splice(E,1),this.parent.children.splice(E-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return r.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const E=this.index;return E>0?(this.parent.children.splice(E,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(E){if(!this.parent)return r.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(E<0||E>=this.parent.children.length)&&r.Util.warn("Unexpected value "+E+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const A=this.index;return this.parent.children.splice(A,1),this.parent.children.splice(E,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(a,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let E=this.opacity();const A=this.getParent();return A&&!A._isUnderCache&&(E*=A.getAbsoluteOpacity()),E}moveTo(E){return this.getParent()!==E&&(this._remove(),E.add(this)),this}toObject(){let E=this.getAttrs(),A,D,k,L,j;const V={attrs:{},className:this.getClassName()};for(A in E)D=E[A],j=r.Util.isObject(D)&&!r.Util._isPlainObject(D)&&!r.Util._isArray(D),!j&&(k=typeof this[A]=="function"&&this[A],delete E[A],L=k?k.call(this):null,E[A]=D,L!==D&&(V.attrs[A]=D));return r.Util._prepareToStringify(V)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(E,A,D){const k=[];A&&this._isMatch(E)&&k.push(this);let L=this.parent;for(;L;){if(L===D)return k;L._isMatch(E)&&k.push(L),L=L.parent}return k}isAncestorOf(E){return!1}findAncestor(E,A,D){return this.findAncestors(E,A,D)[0]}_isMatch(E){if(!E)return!1;if(typeof E=="function")return E(this);let A=E.replace(/ /g,"").split(","),D=A.length,k,L;for(k=0;k{try{const k=E?.callback;k&&delete E.callback,r.Util._urlToImage(this.toDataURL(E),function(L){A(L),k?.(L)})}catch(k){D(k)}})}toBlob(E){return new Promise((A,D)=>{try{const k=E?.callback;k&&delete E.callback,this.toCanvas(E).toBlob(L=>{A(L),k?.(L)},E?.mimeType,E?.quality)}catch(k){D(k)}})}setSize(E){return this.width(E.width),this.height(E.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.Konva.dragDistance}_off(E,A,D){let k=this.eventListeners[E],L,j,V;for(L=0;L=0)||this.isDragging())return;let k=!1;t.DD._dragElements.forEach(L=>{this.isAncestorOf(L.node)&&(k=!0)}),k||this._createDragElement(E)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const A=t.DD._dragElements.get(this._id),D=A&&A.dragStatus==="dragging",k=A&&A.dragStatus==="ready";D?this.stopDrag():k&&t.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(E={x:0,y:0}){const A=this.getStage();if(!A)return!1;const D={x:-E.x,y:-E.y,width:A.width()+2*E.x,height:A.height()+2*E.y};return r.Util.haveIntersection(D,this.getClientRect())}static create(E,A){return r.Util._isString(E)&&(E=JSON.parse(E)),this._createNode(E,A)}static _createNode(E,A){let D=w1.prototype.getClassName.call(E),k=E.children,L,j,V;A&&(E.attrs.container=A),o.Konva[D]||(r.Util.warn('Can not find a node with class name "'+D+'". Fallback to "Shape".'),D="Shape");const Y=o.Konva[D];if(L=new Y(E.attrs),k)for(j=k.length,V=0;V0}removeChildren(){return this.getChildren().forEach(i=>{i.parent=null,i.index=0,i.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(i=>{i.parent=null,i.index=0,i.destroy()}),this.children=[],this._requestDraw(),this}add(...i){if(i.length===0)return this;if(i.length>1){for(let l=0;l0?a[0]:void 0}_generalFind(i,a){const l=[];return this._descendants(s=>{const u=s._isMatch(i);return u&&l.push(s),!!(u&&a)}),l}_descendants(i){let a=!1;const l=this.getChildren();for(const s of l){if(a=i(s),a)return!0;if(s.hasChildren()&&(a=s._descendants(i),a))return!0}return!1}toObject(){const i=t.Node.prototype.toObject.call(this);return i.children=[],this.getChildren().forEach(a=>{i.children.push(a.toObject())}),i}isAncestorOf(i){let a=i.getParent();for(;a;){if(a._id===this._id)return!0;a=a.getParent()}return!1}clone(i){const a=t.Node.prototype.clone.call(this,i);return this.getChildren().forEach(function(l){a.add(l.clone())}),a}getAllIntersections(i){const a=[];return this.find("Shape").forEach(l=>{l.isVisible()&&l.intersects(i)&&a.push(l)}),a}_clearSelfAndDescendantCache(i){var a;super._clearSelfAndDescendantCache(i),!this.isCached()&&((a=this.children)===null||a===void 0||a.forEach(function(l){l._clearSelfAndDescendantCache(i)}))}_setChildrenIndices(){var i;(i=this.children)===null||i===void 0||i.forEach(function(a,l){a.index=l}),this._requestDraw()}drawScene(i,a,l){const s=this.getLayer(),u=i||s&&s.getCanvas(),c=u&&u.getContext(),d=this._getCanvasCache(),f=d&&d.scene,h=u&&u.isCache;if(!this.isVisible()&&!h)return this;if(f){c.save();const p=this.getAbsoluteTransform(a).getMatrix();c.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedSceneCanvas(c),c.restore()}else this._drawChildren("drawScene",u,a,l);return this}drawHit(i,a){if(!this.shouldDrawHit(a))return this;const l=this.getLayer(),s=i||l&&l.hitCanvas,u=s&&s.getContext(),c=this._getCanvasCache();if(c&&c.hit){u.save();const f=this.getAbsoluteTransform(a).getMatrix();u.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedHitCanvas(u),u.restore()}else this._drawChildren("drawHit",s,a);return this}_drawChildren(i,a,l,s){var u;const c=a&&a.getContext(),d=this.clipWidth(),f=this.clipHeight(),h=this.clipFunc(),p=typeof d=="number"&&typeof f=="number"||h,g=l===this;if(p){c.save();const S=this.getAbsoluteTransform(l);let y=S.getMatrix();c.transform(y[0],y[1],y[2],y[3],y[4],y[5]),c.beginPath();let b;if(h)b=h.call(this,c,this);else{const x=this.clipX(),C=this.clipY();c.rect(x||0,C||0,d,f)}c.clip.apply(c,b),y=S.copy().invert().getMatrix(),c.transform(y[0],y[1],y[2],y[3],y[4],y[5])}const m=!g&&this.globalCompositeOperation()!=="source-over"&&i==="drawScene";m&&(c.save(),c._applyGlobalCompositeOperation(this)),(u=this.children)===null||u===void 0||u.forEach(function(S){S[i](a,l,s)}),m&&c.restore(),p&&c.restore()}getClientRect(i={}){var a;const l=i.skipTransform,s=i.relativeTo;let u,c,d,f,h={x:1/0,y:1/0,width:0,height:0};const p=this;(a=this.children)===null||a===void 0||a.forEach(function(S){if(!S.visible())return;const y=S.getClientRect({relativeTo:p,skipShadow:i.skipShadow,skipStroke:i.skipStroke});y.width===0&&y.height===0||(u===void 0?(u=y.x,c=y.y,d=y.x+y.width,f=y.y+y.height):(u=Math.min(u,y.x),c=Math.min(c,y.y),d=Math.max(d,y.x+y.width),f=Math.max(f,y.y+y.height)))});const g=this.find("Shape");let m=!1;for(let S=0;SG.indexOf("pointer")>=0?"pointer":G.indexOf("touch")>=0?"touch":"mouse",j=G=>{const W=L(G);if(W==="pointer")return r.Konva.pointerEventsEnabled&&k.pointer;if(W==="touch")return k.touch;if(W==="mouse")return k.mouse};function V(G={}){return(G.clipFunc||G.clipWidth||G.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),G}const Y="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);";e.stages=[];class U extends o.Container{constructor(W){super(V(W)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{V(this.attrs)}),this._checkVisibility()}_validateAdd(W){const J=W.getType()==="Layer",Q=W.getType()==="FastLayer";J||Q||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const W=this.visible()?"":"none";this.content.style.display=W}setContainer(W){if(typeof W===c){let J;if(W.charAt(0)==="."){const Q=W.slice(1);W=document.getElementsByClassName(Q)[0]}else W.charAt(0)!=="#"?J=W:J=W.slice(1),W=document.getElementById(J);if(!W)throw"Can not find container in document with id "+J}return this._setAttr("container",W),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),W.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const W=this.children,J=W.length;for(let Q=0;Q-1&&e.stages.splice(J,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const W=this._pointerPositions[0]||this._changedPointerPositions[0];return W?{x:W.x,y:W.y}:(t.Util.warn(Y),null)}_getPointerById(W){return this._pointerPositions.find(J=>J.id===W)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(W){W=W||{},W.x=W.x||0,W.y=W.y||0,W.width=W.width||this.width(),W.height=W.height||this.height();const J=new i.SceneCanvas({width:W.width,height:W.height,pixelRatio:W.pixelRatio||1}),Q=J.getContext()._context,q=this.children;return(W.x||W.y)&&Q.translate(-1*W.x,-1*W.y),q.forEach(function(ee){if(!ee.isVisible())return;const K=ee._toKonvaCanvas(W);Q.drawImage(K._canvas,W.x,W.y,K.getWidth()/K.getPixelRatio(),K.getHeight()/K.getPixelRatio())}),J}getIntersection(W){if(!W)return null;const J=this.children,Q=J.length,q=Q-1;for(let ee=q;ee>=0;ee--){const K=J[ee].getIntersection(W);if(K)return K}return null}_resizeDOM(){const W=this.width(),J=this.height();this.content&&(this.content.style.width=W+d,this.content.style.height=J+d),this.bufferCanvas.setSize(W,J),this.bufferHitCanvas.setSize(W,J),this.children.forEach(Q=>{Q.setSize({width:W,height:J}),Q.draw()})}add(W,...J){if(arguments.length>1){for(let q=0;qA&&t.Util.warn("The stage has "+Q+" 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."),W.setSize({width:this.width(),height:this.height()}),W.draw(),r.Konva.isBrowser&&this.content.appendChild(W.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(W){return s.hasPointerCapture(W,this)}setPointerCapture(W){s.setPointerCapture(W,this)}releaseCapture(W){s.releaseCapture(W,this)}getLayers(){return this.children}_bindContentEvents(){r.Konva.isBrowser&&D.forEach(([W,J])=>{this.content.addEventListener(W,Q=>{this[J](Q)},{passive:!1})})}_pointerenter(W){this.setPointersPositions(W);const J=j(W.type);J&&this._fire(J.pointerenter,{evt:W,target:this,currentTarget:this})}_pointerover(W){this.setPointersPositions(W);const J=j(W.type);J&&this._fire(J.pointerover,{evt:W,target:this,currentTarget:this})}_getTargetShape(W){let J=this[W+"targetShape"];return J&&!J.getStage()&&(J=null),J}_pointerleave(W){const J=j(W.type),Q=L(W.type);if(!J)return;this.setPointersPositions(W);const q=this._getTargetShape(Q),ee=!(r.Konva.isDragging()||r.Konva.isTransforming())||r.Konva.hitOnDragEnabled;q&&ee?(q._fireAndBubble(J.pointerout,{evt:W}),q._fireAndBubble(J.pointerleave,{evt:W}),this._fire(J.pointerleave,{evt:W,target:this,currentTarget:this}),this[Q+"targetShape"]=null):ee&&(this._fire(J.pointerleave,{evt:W,target:this,currentTarget:this}),this._fire(J.pointerout,{evt:W,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(W){const J=j(W.type),Q=L(W.type);if(!J)return;this.setPointersPositions(W);let q=!1;this._changedPointerPositions.forEach(ee=>{const K=this.getIntersection(ee);if(a.DD.justDragged=!1,r.Konva["_"+Q+"ListenClick"]=!0,!K||!K.isListening()){this[Q+"ClickStartShape"]=void 0;return}r.Konva.capturePointerEventsEnabled&&K.setPointerCapture(ee.id),this[Q+"ClickStartShape"]=K,K._fireAndBubble(J.pointerdown,{evt:W,pointerId:ee.id}),q=!0;const Z=W.type.indexOf("touch")>=0;K.preventDefault()&&W.cancelable&&Z&&W.preventDefault()}),q||this._fire(J.pointerdown,{evt:W,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(W){const J=j(W.type),Q=L(W.type);if(!J||(r.Konva.isDragging()&&a.DD.node.preventDefault()&&W.cancelable&&W.preventDefault(),this.setPointersPositions(W),!(!(r.Konva.isDragging()||r.Konva.isTransforming())||r.Konva.hitOnDragEnabled)))return;const ee={};let K=!1;const Z=this._getTargetShape(Q);this._changedPointerPositions.forEach(te=>{const se=s.getCapturedShape(te.id)||this.getIntersection(te),ie=te.id,ae={evt:W,pointerId:ie},le=Z!==se;if(le&&Z&&(Z._fireAndBubble(J.pointerout,{...ae},se),Z._fireAndBubble(J.pointerleave,{...ae},se)),se){if(ee[se._id])return;ee[se._id]=!0}se&&se.isListening()?(K=!0,le&&(se._fireAndBubble(J.pointerover,{...ae},Z),se._fireAndBubble(J.pointerenter,{...ae},Z),this[Q+"targetShape"]=se),se._fireAndBubble(J.pointermove,{...ae})):Z&&(this._fire(J.pointerover,{evt:W,target:this,currentTarget:this,pointerId:ie}),this[Q+"targetShape"]=null)}),K||this._fire(J.pointermove,{evt:W,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(W){const J=j(W.type),Q=L(W.type);if(!J)return;this.setPointersPositions(W);const q=this[Q+"ClickStartShape"],ee=this[Q+"ClickEndShape"],K={};let Z=!1;this._changedPointerPositions.forEach(te=>{const se=s.getCapturedShape(te.id)||this.getIntersection(te);if(se){if(se.releaseCapture(te.id),K[se._id])return;K[se._id]=!0}const ie=te.id,ae={evt:W,pointerId:ie};let le=!1;r.Konva["_"+Q+"InDblClickWindow"]?(le=!0,clearTimeout(this[Q+"DblTimeout"])):a.DD.justDragged||(r.Konva["_"+Q+"InDblClickWindow"]=!0,clearTimeout(this[Q+"DblTimeout"])),this[Q+"DblTimeout"]=setTimeout(function(){r.Konva["_"+Q+"InDblClickWindow"]=!1},r.Konva.dblClickWindow),se&&se.isListening()?(Z=!0,this[Q+"ClickEndShape"]=se,se._fireAndBubble(J.pointerup,{...ae}),r.Konva["_"+Q+"ListenClick"]&&q&&q===se&&(se._fireAndBubble(J.pointerclick,{...ae}),le&&ee&&ee===se&&se._fireAndBubble(J.pointerdblclick,{...ae}))):(this[Q+"ClickEndShape"]=null,r.Konva["_"+Q+"ListenClick"]&&this._fire(J.pointerclick,{evt:W,target:this,currentTarget:this,pointerId:ie}),le&&this._fire(J.pointerdblclick,{evt:W,target:this,currentTarget:this,pointerId:ie}))}),Z||this._fire(J.pointerup,{evt:W,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),r.Konva["_"+Q+"ListenClick"]=!1,W.cancelable&&Q!=="touch"&&Q!=="pointer"&&W.preventDefault()}_contextmenu(W){this.setPointersPositions(W);const J=this.getIntersection(this.getPointerPosition());J&&J.isListening()?J._fireAndBubble(R,{evt:W}):this._fire(R,{evt:W,target:this,currentTarget:this})}_wheel(W){this.setPointersPositions(W);const J=this.getIntersection(this.getPointerPosition());J&&J.isListening()?J._fireAndBubble(E,{evt:W}):this._fire(E,{evt:W,target:this,currentTarget:this})}_pointercancel(W){this.setPointersPositions(W);const J=s.getCapturedShape(W.pointerId)||this.getIntersection(this.getPointerPosition());J&&J._fireAndBubble(C,s.createEvent(W)),s.releaseCapture(W.pointerId)}_lostpointercapture(W){s.releaseCapture(W.pointerId)}setPointersPositions(W){const J=this._getContentPosition();let Q=null,q=null;W=W||window.event,W.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(W.touches,ee=>{this._pointerPositions.push({id:ee.identifier,x:(ee.clientX-J.left)/J.scaleX,y:(ee.clientY-J.top)/J.scaleY})}),Array.prototype.forEach.call(W.changedTouches||W.touches,ee=>{this._changedPointerPositions.push({id:ee.identifier,x:(ee.clientX-J.left)/J.scaleX,y:(ee.clientY-J.top)/J.scaleY})})):(Q=(W.clientX-J.left)/J.scaleX,q=(W.clientY-J.top)/J.scaleY,this.pointerPos={x:Q,y:q},this._pointerPositions=[{x:Q,y:q,id:t.Util._getFirstPointerId(W)}],this._changedPointerPositions=[{x:Q,y:q,id:t.Util._getFirstPointerId(W)}])}_setPointerPosition(W){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(W)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const W=this.content.getBoundingClientRect();return{top:W.top,left:W.left,scaleX:W.width/this.content.clientWidth||1,scaleY:W.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new i.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new i.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!r.Konva.isBrowser)return;const W=this.container();if(!W)throw"Stage has no container. A container is required.";W.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"),W.appendChild(this.content),this._resizeDOM()}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(W){W.batchDraw()}),this}}e.Stage=U,U.prototype.nodeType=u,(0,l._registerNode)(U),n.Factory.addGetterSetter(U,"container"),r.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(G=>{G.batchDraw()})})}(Om)),Om}var ks={},Tm={},S6;function _n(){return S6||(S6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=St(),n=Jt(),o=xt(),r=ln(),i=Pt(),a=St(),l=bE(),s="hasShadow",u="shadowRGBA",c="patternImage",d="linearGradient",f="radialGradient";let h;function p(){return h||(h=n.Util.createCanvasElement().getContext("2d"),h)}e.shapes={};function g(O){const T=this.attrs.fillRule;T?O.fill(T):O.fill()}function m(O){O.stroke()}function S(O){const T=this.attrs.fillRule;T?O.fill(T):O.fill()}function y(O){O.stroke()}function b(){this._clearCache(s)}function x(){this._clearCache(u)}function C(){this._clearCache(c)}function _(){this._clearCache(d)}function $(){this._clearCache(f)}class P extends r.Node{constructor(T){super(T);let I;for(;I=n.Util.getRandomColor(),!(I&&!(I in e.shapes)););this.colorKey=I,e.shapes[I]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(s,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(c,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const I=p().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(I&&I.setTransform){const R=new n.Transform;R.translate(this.fillPatternX(),this.fillPatternY()),R.rotate(t.Konva.getAngle(this.fillPatternRotation())),R.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),R.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const F=R.getMatrix(),H=typeof DOMMatrix>"u"?{a:F[0],b:F[1],c:F[2],d:F[3],e:F[4],f:F[5]}:new DOMMatrix(F);I.setTransform(H)}return I}}_getLinearGradient(){return this._getCache(d,this.__getLinearGradient)}__getLinearGradient(){const T=this.fillLinearGradientColorStops();if(T){const I=p(),R=this.fillLinearGradientStartPoint(),F=this.fillLinearGradientEndPoint(),H=I.createLinearGradient(R.x,R.y,F.x,F.y);for(let M=0;Mthis.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 T==="auto"?this.hasStroke():this.strokeEnabled()&&!!T}intersects(T){const I=this.getStage();if(!I)return!1;const R=I.bufferHitCanvas;return R.getContext().clear(),this.drawHit(R,void 0,!0),R.context.getImageData(Math.round(T.x),Math.round(T.y),1,1).data[3]>0}destroy(){return r.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(T){var I;if(!((I=this.attrs.perfectDrawEnabled)!==null&&I!==void 0?I:!0))return!1;const F=T||this.hasFill(),H=this.hasStroke(),M=this.getAbsoluteOpacity()!==1;if(F&&H&&M)return!0;const B=this.hasShadow(),E=this.shadowForStrokeEnabled();return!!(F&&H&&B&&E)}setStrokeHitEnabled(T){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),T?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const T=this.size();return{x:this._centroid?-T.width/2:0,y:this._centroid?-T.height/2:0,width:T.width,height:T.height}}getClientRect(T={}){let I=!1,R=this.getParent();for(;R;){if(R.isCached()){I=!0;break}R=R.getParent()}const F=T.skipTransform,H=T.relativeTo||I&&this.getStage()||void 0,M=this.getSelfRect(),E=!T.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,A=M.width+E,D=M.height+E,k=!T.skipShadow&&this.hasShadow(),L=k?this.shadowOffsetX():0,j=k?this.shadowOffsetY():0,V=A+Math.abs(L),Y=D+Math.abs(j),U=k&&this.shadowBlur()||0,G=V+U*2,W=Y+U*2,J={width:G,height:W,x:-(E/2+U)+Math.min(L,0)+M.x,y:-(E/2+U)+Math.min(j,0)+M.y};return F?J:this._transformedRect(J,H)}drawScene(T,I,R){const F=this.getLayer(),H=T||F.getCanvas(),M=H.getContext(),B=this._getCanvasCache(),E=this.getSceneFunc(),A=this.hasShadow();let D;const k=I===this;if(!this.isVisible()&&!k)return this;if(B){M.save();const L=this.getAbsoluteTransform(I).getMatrix();return M.transform(L[0],L[1],L[2],L[3],L[4],L[5]),this._drawCachedSceneCanvas(M),M.restore(),this}if(!E)return this;if(M.save(),this._useBufferCanvas()){D=this.getStage();const L=R||D.bufferCanvas,j=L.getContext();j.clear(),j.save(),j._applyLineJoin(this);const V=this.getAbsoluteTransform(I).getMatrix();j.transform(V[0],V[1],V[2],V[3],V[4],V[5]),E.call(this,j,this),j.restore();const Y=L.pixelRatio;A&&M._applyShadow(this),M._applyOpacity(this),M._applyGlobalCompositeOperation(this),M.drawImage(L._canvas,L.x||0,L.y||0,L.width/Y,L.height/Y)}else{if(M._applyLineJoin(this),!k){const L=this.getAbsoluteTransform(I).getMatrix();M.transform(L[0],L[1],L[2],L[3],L[4],L[5]),M._applyOpacity(this),M._applyGlobalCompositeOperation(this)}A&&M._applyShadow(this),E.call(this,M,this)}return M.restore(),this}drawHit(T,I,R=!1){if(!this.shouldDrawHit(I,R))return this;const F=this.getLayer(),H=T||F.hitCanvas,M=H&&H.getContext(),B=this.hitFunc()||this.sceneFunc(),E=this._getCanvasCache(),A=E&&E.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),A){M.save();const k=this.getAbsoluteTransform(I).getMatrix();return M.transform(k[0],k[1],k[2],k[3],k[4],k[5]),this._drawCachedHitCanvas(M),M.restore(),this}if(!B)return this;if(M.save(),M._applyLineJoin(this),!(this===I)){const k=this.getAbsoluteTransform(I).getMatrix();M.transform(k[0],k[1],k[2],k[3],k[4],k[5])}return B.call(this,M,this),M.restore(),this}drawHitFromCache(T=0){const I=this._getCanvasCache(),R=this._getCachedSceneCanvas(),F=I.hit,H=F.getContext(),M=F.getWidth(),B=F.getHeight();H.clear(),H.drawImage(R._canvas,0,0,M,B);try{const E=H.getImageData(0,0,M,B),A=E.data,D=A.length,k=n.Util._hexToRgb(this.colorKey);for(let L=0;LT?(A[L]=k.r,A[L+1]=k.g,A[L+2]=k.b,A[L+3]=255):A[L+3]=0;H.putImageData(E,0,0)}catch(E){n.Util.error("Unable to draw hit graph from cached scene canvas. "+E.message)}return this}hasPointerCapture(T){return l.hasPointerCapture(T,this)}setPointerCapture(T){l.setPointerCapture(T,this)}releaseCapture(T){l.releaseCapture(T,this)}}e.Shape=P,P.prototype._fillFunc=g,P.prototype._strokeFunc=m,P.prototype._fillFuncHit=S,P.prototype._strokeFuncHit=y,P.prototype._centroid=!1,P.prototype.nodeType="Shape",(0,a._registerNode)(P),P.prototype.eventListeners={},P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",b),P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",x),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",C),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",_),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",$),o.Factory.addGetterSetter(P,"stroke",void 0,(0,i.getStringOrGradientValidator)()),o.Factory.addGetterSetter(P,"strokeWidth",2,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillAfterStrokeEnabled",!1),o.Factory.addGetterSetter(P,"hitStrokeWidth","auto",(0,i.getNumberOrAutoValidator)()),o.Factory.addGetterSetter(P,"strokeHitEnabled",!0,(0,i.getBooleanValidator)()),o.Factory.addGetterSetter(P,"perfectDrawEnabled",!0,(0,i.getBooleanValidator)()),o.Factory.addGetterSetter(P,"shadowForStrokeEnabled",!0,(0,i.getBooleanValidator)()),o.Factory.addGetterSetter(P,"lineJoin"),o.Factory.addGetterSetter(P,"lineCap"),o.Factory.addGetterSetter(P,"sceneFunc"),o.Factory.addGetterSetter(P,"hitFunc"),o.Factory.addGetterSetter(P,"dash"),o.Factory.addGetterSetter(P,"dashOffset",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"shadowColor",void 0,(0,i.getStringValidator)()),o.Factory.addGetterSetter(P,"shadowBlur",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"shadowOpacity",1,(0,i.getNumberValidator)()),o.Factory.addComponentsGetterSetter(P,"shadowOffset",["x","y"]),o.Factory.addGetterSetter(P,"shadowOffsetX",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"shadowOffsetY",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillPatternImage"),o.Factory.addGetterSetter(P,"fill",void 0,(0,i.getStringOrGradientValidator)()),o.Factory.addGetterSetter(P,"fillPatternX",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillPatternY",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillLinearGradientColorStops"),o.Factory.addGetterSetter(P,"strokeLinearGradientColorStops"),o.Factory.addGetterSetter(P,"fillRadialGradientStartRadius",0),o.Factory.addGetterSetter(P,"fillRadialGradientEndRadius",0),o.Factory.addGetterSetter(P,"fillRadialGradientColorStops"),o.Factory.addGetterSetter(P,"fillPatternRepeat","repeat"),o.Factory.addGetterSetter(P,"fillEnabled",!0),o.Factory.addGetterSetter(P,"strokeEnabled",!0),o.Factory.addGetterSetter(P,"shadowEnabled",!0),o.Factory.addGetterSetter(P,"dashEnabled",!0),o.Factory.addGetterSetter(P,"strokeScaleEnabled",!0),o.Factory.addGetterSetter(P,"fillPriority","color"),o.Factory.addComponentsGetterSetter(P,"fillPatternOffset",["x","y"]),o.Factory.addGetterSetter(P,"fillPatternOffsetX",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillPatternOffsetY",0,(0,i.getNumberValidator)()),o.Factory.addComponentsGetterSetter(P,"fillPatternScale",["x","y"]),o.Factory.addGetterSetter(P,"fillPatternScaleX",1,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillPatternScaleY",1,(0,i.getNumberValidator)()),o.Factory.addComponentsGetterSetter(P,"fillLinearGradientStartPoint",["x","y"]),o.Factory.addComponentsGetterSetter(P,"strokeLinearGradientStartPoint",["x","y"]),o.Factory.addGetterSetter(P,"fillLinearGradientStartPointX",0),o.Factory.addGetterSetter(P,"strokeLinearGradientStartPointX",0),o.Factory.addGetterSetter(P,"fillLinearGradientStartPointY",0),o.Factory.addGetterSetter(P,"strokeLinearGradientStartPointY",0),o.Factory.addComponentsGetterSetter(P,"fillLinearGradientEndPoint",["x","y"]),o.Factory.addComponentsGetterSetter(P,"strokeLinearGradientEndPoint",["x","y"]),o.Factory.addGetterSetter(P,"fillLinearGradientEndPointX",0),o.Factory.addGetterSetter(P,"strokeLinearGradientEndPointX",0),o.Factory.addGetterSetter(P,"fillLinearGradientEndPointY",0),o.Factory.addGetterSetter(P,"strokeLinearGradientEndPointY",0),o.Factory.addComponentsGetterSetter(P,"fillRadialGradientStartPoint",["x","y"]),o.Factory.addGetterSetter(P,"fillRadialGradientStartPointX",0),o.Factory.addGetterSetter(P,"fillRadialGradientStartPointY",0),o.Factory.addComponentsGetterSetter(P,"fillRadialGradientEndPoint",["x","y"]),o.Factory.addGetterSetter(P,"fillRadialGradientEndPointX",0),o.Factory.addGetterSetter(P,"fillRadialGradientEndPointY",0),o.Factory.addGetterSetter(P,"fillPatternRotation",0),o.Factory.addGetterSetter(P,"fillRule",void 0,(0,i.getStringValidator)()),o.Factory.backCompat(P,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})}(Tm)),Tm}var C6;function yE(){if(C6)return ks;C6=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.Layer=void 0;const e=Jt(),t=kg(),n=ln(),o=xt(),r=Fg(),i=Pt(),a=_n(),l=St(),s="#",u="beforeDraw",c="draw",d=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],f=d.length;let h=class extends t.Container{constructor(g){super(g),this.canvas=new r.SceneCanvas,this.hitCanvas=new r.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(g){return this.getContext().clear(g),this.getHitCanvas().getContext().clear(g),this}setZIndex(g){super.setZIndex(g);const m=this.getStage();return m&&m.content&&(m.content.removeChild(this.getNativeCanvasElement()),g{this.draw(),this._waitingForDraw=!1})),this}getIntersection(g){if(!this.isListening()||!this.isVisible())return null;let m=1,S=!1;for(;;){for(let y=0;y0)return{antialiased:!0};return{}}drawScene(g,m,S){const y=this.getLayer(),b=g||y&&y.getCanvas();return this._fire(u,{node:this}),this.clearBeforeDraw()&&b.getContext().clear(),t.Container.prototype.drawScene.call(this,b,m,S),this._fire(c,{node:this}),this}drawHit(g,m){const S=this.getLayer(),y=g||S&&S.hitCanvas;return S&&S.clearBeforeDraw()&&S.getHitCanvas().getContext().clear(),t.Container.prototype.drawHit.call(this,y,m),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(g){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(g)}getHitGraphEnabled(g){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const g=this.parent;!!this.hitCanvas._canvas.parentNode?g.content.removeChild(this.hitCanvas._canvas):g.content.appendChild(this.hitCanvas._canvas)}destroy(){return e.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};return ks.Layer=h,h.prototype.nodeType="Layer",(0,l._registerNode)(h),o.Factory.addGetterSetter(h,"imageSmoothingEnabled",!0),o.Factory.addGetterSetter(h,"clearBeforeDraw",!0),o.Factory.addGetterSetter(h,"hitGraphEnabled",!0,(0,i.getBooleanValidator)()),ks}var Bs={},x6;function Jge(){if(x6)return Bs;x6=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.FastLayer=void 0;const e=Jt(),t=yE(),n=St();let o=class extends t.Layer{constructor(i){super(i),this.listening(!1),e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}};return Bs.FastLayer=o,o.prototype.nodeType="FastLayer",(0,n._registerNode)(o),Bs}var Ls={},w6;function i2(){if(w6)return Ls;w6=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.Group=void 0;const e=Jt(),t=kg(),n=St();let o=class extends t.Container{_validateAdd(i){const a=i.getType();a!=="Group"&&a!=="Shape"&&e.Util.throw("You may only add groups and shapes to groups.")}};return Ls.Group=o,o.prototype.nodeType="Group",(0,n._registerNode)(o),Ls}var Hs={},$6;function a2(){if($6)return Hs;$6=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.Animation=void 0;const e=St(),t=Jt(),n=function(){return e.glob.performance&&e.glob.performance.now?function(){return e.glob.performance.now()}:function(){return new Date().getTime()}}();let o=class yl{constructor(i,a){this.id=yl.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:n(),frameRate:0},this.func=i,this.setLayers(a)}setLayers(i){let a=[];return i&&(a=Array.isArray(i)?i:[i]),this.layers=a,this}getLayers(){return this.layers}addLayer(i){const a=this.layers,l=a.length;for(let s=0;sthis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=l,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=s,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const p=this.getTimer()-this._startTime;this.state===l?this.setTime(p):this.state===s&&this.setTime(this.duration-p)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class f{constructor(p){const g=this,m=p.node,S=m._id,y=p.easing||e.Easings.Linear,b=!!p.yoyo;let x,C;typeof p.duration>"u"?x=.3:p.duration===0?x=.001:x=p.duration,this.node=m,this._id=c++;const _=m.getLayer()||(m instanceof r.Konva.Stage?m.getLayers():null);_||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){g.tween.onEnterFrame()},_),this.tween=new d(C,function($){g._tweenFunc($)},y,0,1,x*1e3,b),this._addListeners(),f.attrs[S]||(f.attrs[S]={}),f.attrs[S][this._id]||(f.attrs[S][this._id]={}),f.tweens[S]||(f.tweens[S]={});for(C in p)i[C]===void 0&&this._addAttr(C,p[C]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,g){const m=this.node,S=m._id;let y,b,x,C,_;const $=f.tweens[S][p];$&&delete f.attrs[S][$][p];let P=m.getAttr(p);if(t.Util._isArray(g))if(y=[],b=Math.max(g.length,P.length),p==="points"&&g.length!==P.length&&(g.length>P.length?(C=P,P=t.Util._prepareArrayForTween(P,g,m.closed())):(x=g,g=t.Util._prepareArrayForTween(g,P,m.closed()))),p.indexOf("fill")===0)for(let O=0;O{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const p=this.node,g=f.attrs[p._id][this._id];g.points&&g.points.trueEnd&&p.setAttr("points",g.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const p=this.node,g=f.attrs[p._id][this._id];g.points&&g.points.trueStart&&p.points(g.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(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const p=this.node._id,g=this._id,m=f.tweens[p];this.pause(),this.anim&&this.anim.stop();for(const S in m)delete f.tweens[p][S];delete f.attrs[p][g],f.tweens[p]&&(Object.keys(f.tweens[p]).length===0&&delete f.tweens[p],Object.keys(f.attrs[p]).length===0&&delete f.attrs[p])}}e.Tween=f,f.attrs={},f.tweens={},o.Node.prototype.to=function(h){const p=h.onFinish;h.node=this,h.onFinish=function(){this.destroy(),p&&p()},new f(h).play()},e.Easings={BackEaseIn(h,p,g,m){return g*(h/=m)*h*((1.70158+1)*h-1.70158)+p},BackEaseOut(h,p,g,m){return g*((h=h/m-1)*h*((1.70158+1)*h+1.70158)+1)+p},BackEaseInOut(h,p,g,m){let S=1.70158;return(h/=m/2)<1?g/2*(h*h*(((S*=1.525)+1)*h-S))+p:g/2*((h-=2)*h*(((S*=1.525)+1)*h+S)+2)+p},ElasticEaseIn(h,p,g,m,S,y){let b=0;return h===0?p:(h/=m)===1?p+g:(y||(y=m*.3),!S||S0?l:s),m=f*s,S=h*(h>0?l:s),y=p*(p>0?s:l);return{x:g,y:u?-1*y:S,width:m-g,height:y-S}}};return zs.Arc=i,i.prototype._centroid=!0,i.prototype.className="Arc",i.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],(0,r._registerNode)(i),e.Factory.addGetterSetter(i,"innerRadius",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(i,"outerRadius",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(i,"angle",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(i,"clockwise",!1,(0,o.getBooleanValidator)()),zs}var js={},Vs={},T6;function SE(){if(T6)return Vs;T6=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.Line=void 0;const e=xt(),t=St(),n=_n(),o=Pt();function r(l,s,u,c,d,f,h){const p=Math.sqrt(Math.pow(u-l,2)+Math.pow(c-s,2)),g=Math.sqrt(Math.pow(d-u,2)+Math.pow(f-c,2)),m=h*p/(p+g),S=h*g/(p+g),y=u-m*(d-l),b=c-m*(f-s),x=u+S*(d-l),C=c+S*(f-s);return[y,b,x,C]}function i(l,s){const u=l.length,c=[];for(let d=2;d4){const g=this.getTensionPoints(),m=g.length;for(p=f?0:4,f||s.quadraticCurveTo(g[0],g[1],g[2],g[3]);p{let u,c;const f=s/2;u=0;for(let h=0;h<20;h++)c=f*e.tValues[20][h]+f,u+=e.cValues[20][h]*o(a,l,c);return f*u};e.getCubicArcLength=t;const n=(a,l,s)=>{s===void 0&&(s=1);const u=a[0]-2*a[1]+a[2],c=l[0]-2*l[1]+l[2],d=2*a[1]-2*a[0],f=2*l[1]-2*l[0],h=4*(u*u+c*c),p=4*(u*d+c*f),g=d*d+f*f;if(h===0)return s*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(l[2]-l[0],2));const m=p/(2*h),S=g/h,y=s+m,b=S-m*m,x=y*y+b>0?Math.sqrt(y*y+b):0,C=m*m+b>0?Math.sqrt(m*m+b):0,_=m+Math.sqrt(m*m+b)!==0?b*Math.log(Math.abs((y+x)/(m+C))):0;return Math.sqrt(h)/2*(y*x-m*C+_)};e.getQuadraticArcLength=n;function o(a,l,s){const u=r(1,s,a),c=r(1,s,l),d=u*u+c*c;return Math.sqrt(d)}const r=(a,l,s)=>{const u=s.length-1;let c,d;if(u===0)return 0;if(a===0){d=0;for(let f=0;f<=u;f++)d+=e.binomialCoefficients[u][f]*Math.pow(1-l,u-f)*Math.pow(l,f)*s[f];return d}else{c=new Array(u);for(let f=0;f{let u=1,c=a/l,d=(a-s(c))/l,f=0;for(;u>.001;){const h=s(c+d),p=Math.abs(a-h)/l;if(p500)break}return c};e.t2length=i}(Em)),Em}var E6;function l2(){if(E6)return Ws;E6=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.Path=void 0;const e=xt(),t=St(),n=_n(),o=nve();let r=class so extends n.Shape{constructor(a){super(a),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=so.parsePathData(this.data()),this.pathLength=so.getPathLength(this.dataArray)}_sceneFunc(a){const l=this.dataArray;a.beginPath();let s=!1;for(let u=0;ug?p:g,C=p>g?1:p/g,_=p>g?g/p:1;a.translate(f,h),a.rotate(y),a.scale(C,_),a.arc(0,0,x,m,m+S,1-b),a.scale(1/C,1/_),a.rotate(-y),a.translate(-f,-h);break;case"z":s=!0,a.closePath();break}}!s&&!this.hasFill()?a.strokeShape(this):a.fillStrokeShape(this)}getSelfRect(){let a=[];this.dataArray.forEach(function(h){if(h.command==="A"){const p=h.points[4],g=h.points[5],m=h.points[4]+g;let S=Math.PI/180;if(Math.abs(p-m)m;y-=S){const b=so.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],y,0);a.push(b.x,b.y)}else for(let y=p+S;yl[u].pathLength;)a-=l[u].pathLength,++u;if(u===c)return s=l[u-1].points.slice(-2),{x:s[0],y:s[1]};if(a<.01)return l[u].command==="M"?(s=l[u].points.slice(0,2),{x:s[0],y:s[1]}):{x:l[u].start.x,y:l[u].start.y};const d=l[u],f=d.points;switch(d.command){case"L":return so.getPointOnLine(a,d.start.x,d.start.y,f[0],f[1]);case"C":return so.getPointOnCubicBezier((0,o.t2length)(a,so.getPathLength(l),x=>(0,o.getCubicArcLength)([d.start.x,f[0],f[2],f[4]],[d.start.y,f[1],f[3],f[5]],x)),d.start.x,d.start.y,f[0],f[1],f[2],f[3],f[4],f[5]);case"Q":return so.getPointOnQuadraticBezier((0,o.t2length)(a,so.getPathLength(l),x=>(0,o.getQuadraticArcLength)([d.start.x,f[0],f[2]],[d.start.y,f[1],f[3]],x)),d.start.x,d.start.y,f[0],f[1],f[2],f[3]);case"A":const h=f[0],p=f[1],g=f[2],m=f[3],S=f[5],y=f[6];let b=f[4];return b+=S*a/d.pathLength,so.getPointOnEllipticalArc(h,p,g,m,b,y)}return null}static getPointOnLine(a,l,s,u,c,d,f){d=d??l,f=f??s;const h=this.getLineLength(l,s,u,c);if(h<1e-10)return{x:l,y:s};if(u===l)return{x:d,y:f+(c>s?a:-a)};const p=(c-s)/(u-l),g=Math.sqrt(a*a/(1+p*p))*(u0&&!isNaN(b[0]);){let x="",C=[];const _=f,$=h;let P,O,T,I,R,F,H,M,B,E;switch(y){case"l":f+=b.shift(),h+=b.shift(),x="L",C.push(f,h);break;case"L":f=b.shift(),h=b.shift(),C.push(f,h);break;case"m":const A=b.shift(),D=b.shift();if(f+=A,h+=D,x="M",c.length>2&&c[c.length-1].command==="z"){for(let k=c.length-2;k>=0;k--)if(c[k].command==="M"){f=c[k].points[0]+A,h=c[k].points[1]+D;break}}C.push(f,h),y="l";break;case"M":f=b.shift(),h=b.shift(),x="M",C.push(f,h),y="L";break;case"h":f+=b.shift(),x="L",C.push(f,h);break;case"H":f=b.shift(),x="L",C.push(f,h);break;case"v":h+=b.shift(),x="L",C.push(f,h);break;case"V":h=b.shift(),x="L",C.push(f,h);break;case"C":C.push(b.shift(),b.shift(),b.shift(),b.shift()),f=b.shift(),h=b.shift(),C.push(f,h);break;case"c":C.push(f+b.shift(),h+b.shift(),f+b.shift(),h+b.shift()),f+=b.shift(),h+=b.shift(),x="C",C.push(f,h);break;case"S":O=f,T=h,P=c[c.length-1],P.command==="C"&&(O=f+(f-P.points[2]),T=h+(h-P.points[3])),C.push(O,T,b.shift(),b.shift()),f=b.shift(),h=b.shift(),x="C",C.push(f,h);break;case"s":O=f,T=h,P=c[c.length-1],P.command==="C"&&(O=f+(f-P.points[2]),T=h+(h-P.points[3])),C.push(O,T,f+b.shift(),h+b.shift()),f+=b.shift(),h+=b.shift(),x="C",C.push(f,h);break;case"Q":C.push(b.shift(),b.shift()),f=b.shift(),h=b.shift(),C.push(f,h);break;case"q":C.push(f+b.shift(),h+b.shift()),f+=b.shift(),h+=b.shift(),x="Q",C.push(f,h);break;case"T":O=f,T=h,P=c[c.length-1],P.command==="Q"&&(O=f+(f-P.points[0]),T=h+(h-P.points[1])),f=b.shift(),h=b.shift(),x="Q",C.push(O,T,f,h);break;case"t":O=f,T=h,P=c[c.length-1],P.command==="Q"&&(O=f+(f-P.points[0]),T=h+(h-P.points[1])),f+=b.shift(),h+=b.shift(),x="Q",C.push(O,T,f,h);break;case"A":I=b.shift(),R=b.shift(),F=b.shift(),H=b.shift(),M=b.shift(),B=f,E=h,f=b.shift(),h=b.shift(),x="A",C=this.convertEndpointToCenterParameterization(B,E,f,h,H,M,I,R,F);break;case"a":I=b.shift(),R=b.shift(),F=b.shift(),H=b.shift(),M=b.shift(),B=f,E=h,f+=b.shift(),h+=b.shift(),x="A",C=this.convertEndpointToCenterParameterization(B,E,f,h,H,M,I,R,F);break}c.push({command:x||y,points:C,start:{x:_,y:$},pathLength:this.calcLength(_,$,x||y,C)})}(y==="z"||y==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(a,l,s,u){let c,d,f,h;const p=so;switch(s){case"L":return p.getLineLength(a,l,u[0],u[1]);case"C":return(0,o.getCubicArcLength)([a,u[0],u[2],u[4]],[l,u[1],u[3],u[5]],1);case"Q":return(0,o.getQuadraticArcLength)([a,u[0],u[2]],[l,u[1],u[3]],1);case"A":c=0;const g=u[4],m=u[5],S=u[4]+m;let y=Math.PI/180;if(Math.abs(g-S)S;h-=y)f=p.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],h,0),c+=p.getLineLength(d.x,d.y,f.x,f.y),d=f;else for(h=g+y;h1&&(f*=Math.sqrt(y),h*=Math.sqrt(y));let b=Math.sqrt((f*f*(h*h)-f*f*(S*S)-h*h*(m*m))/(f*f*(S*S)+h*h*(m*m)));c===d&&(b*=-1),isNaN(b)&&(b=0);const x=b*f*S/h,C=b*-h*m/f,_=(a+s)/2+Math.cos(g)*x-Math.sin(g)*C,$=(l+u)/2+Math.sin(g)*x+Math.cos(g)*C,P=function(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])},O=function(M,B){return(M[0]*B[0]+M[1]*B[1])/(P(M)*P(B))},T=function(M,B){return(M[0]*B[1]=1&&(H=0),d===0&&H>0&&(H=H-2*Math.PI),d===1&&H<0&&(H=H+2*Math.PI),[_,$,f,h,I,H,g,d]}};return Ws.Path=r,r.prototype.className="Path",r.prototype._attrsAffectingSize=["data"],(0,t._registerNode)(r),e.Factory.addGetterSetter(r,"data"),Ws}var M6;function ove(){if(M6)return js;M6=1,Object.defineProperty(js,"__esModule",{value:!0}),js.Arrow=void 0;const e=xt(),t=SE(),n=Pt(),o=St(),r=l2();let i=class extends t.Line{_sceneFunc(l){super._sceneFunc(l);const s=Math.PI*2,u=this.points();let c=u;const d=this.tension()!==0&&u.length>4;d&&(c=this.getTensionPoints());const f=this.pointerLength(),h=u.length;let p,g;if(d){const y=[c[c.length-4],c[c.length-3],c[c.length-2],c[c.length-1],u[h-2],u[h-1]],b=r.Path.calcLength(c[c.length-4],c[c.length-3],"C",y),x=r.Path.getPointOnQuadraticBezier(Math.min(1,1-f/b),y[0],y[1],y[2],y[3],y[4],y[5]);p=u[h-2]-x.x,g=u[h-1]-x.y}else p=u[h-2]-u[h-4],g=u[h-1]-u[h-3];const m=(Math.atan2(g,p)+s)%s,S=this.pointerWidth();this.pointerAtEnding()&&(l.save(),l.beginPath(),l.translate(u[h-2],u[h-1]),l.rotate(m),l.moveTo(0,0),l.lineTo(-f,S/2),l.lineTo(-f,-S/2),l.closePath(),l.restore(),this.__fillStroke(l)),this.pointerAtBeginning()&&(l.save(),l.beginPath(),l.translate(u[0],u[1]),d?(p=(c[0]+c[2])/2-u[0],g=(c[1]+c[3])/2-u[1]):(p=u[2]-u[0],g=u[3]-u[1]),l.rotate((Math.atan2(-g,-p)+s)%s),l.moveTo(0,0),l.lineTo(-f,S/2),l.lineTo(-f,-S/2),l.closePath(),l.restore(),this.__fillStroke(l))}__fillStroke(l){const s=this.dashEnabled();s&&(this.attrs.dashEnabled=!1,l.setLineDash([])),l.fillStrokeShape(this),s&&(this.attrs.dashEnabled=!0)}getSelfRect(){const l=super.getSelfRect(),s=this.pointerWidth()/2;return{x:l.x,y:l.y-s,width:l.width,height:l.height+s*2}}};return js.Arrow=i,i.prototype.className="Arrow",(0,o._registerNode)(i),e.Factory.addGetterSetter(i,"pointerLength",10,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"pointerWidth",10,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"pointerAtBeginning",!1),e.Factory.addGetterSetter(i,"pointerAtEnding",!0),js}var Ks={},A6;function rve(){if(A6)return Ks;A6=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.Circle=void 0;const e=xt(),t=_n(),n=Pt(),o=St();let r=class extends t.Shape{_sceneFunc(a){a.beginPath(),a.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),a.closePath(),a.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(a){this.radius()!==a/2&&this.radius(a/2)}setHeight(a){this.radius()!==a/2&&this.radius(a/2)}};return Ks.Circle=r,r.prototype._centroid=!0,r.prototype.className="Circle",r.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(r),e.Factory.addGetterSetter(r,"radius",0,(0,n.getNumberValidator)()),Ks}var Gs={},R6;function ive(){if(R6)return Gs;R6=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.Ellipse=void 0;const e=xt(),t=_n(),n=Pt(),o=St();let r=class extends t.Shape{_sceneFunc(a){const l=this.radiusX(),s=this.radiusY();a.beginPath(),a.save(),l!==s&&a.scale(1,s/l),a.arc(0,0,l,0,Math.PI*2,!1),a.restore(),a.closePath(),a.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(a){this.radiusX(a/2)}setHeight(a){this.radiusY(a/2)}};return Gs.Ellipse=r,r.prototype.className="Ellipse",r.prototype._centroid=!0,r.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,o._registerNode)(r),e.Factory.addComponentsGetterSetter(r,"radius",["x","y"]),e.Factory.addGetterSetter(r,"radiusX",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(r,"radiusY",0,(0,n.getNumberValidator)()),Gs}var Us={},D6;function ave(){if(D6)return Us;D6=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.Image=void 0;const e=Jt(),t=xt(),n=_n(),o=St(),r=Pt();class i extends n.Shape{constructor(l){super(l),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",s=>{this._removeImageLoad(s.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const l=this.image();l&&l.complete||l&&l.readyState===4||l&&l.addEventListener&&l.addEventListener("load",this._loadListener)}_removeImageLoad(l){l&&l.removeEventListener&&l.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const l=!!this.cornerRadius(),s=this.hasShadow();return l&&s?!0:super._useBufferCanvas(!0)}_sceneFunc(l){const s=this.getWidth(),u=this.getHeight(),c=this.cornerRadius(),d=this.attrs.image;let f;if(d){const h=this.attrs.cropWidth,p=this.attrs.cropHeight;h&&p?f=[d,this.cropX(),this.cropY(),h,p,0,0,s,u]:f=[d,0,0,s,u]}(this.hasFill()||this.hasStroke()||c)&&(l.beginPath(),c?e.Util.drawRoundedRectPath(l,s,u,c):l.rect(0,0,s,u),l.closePath(),l.fillStrokeShape(this)),d&&(c&&l.clip(),l.drawImage.apply(l,f))}_hitFunc(l){const s=this.width(),u=this.height(),c=this.cornerRadius();l.beginPath(),c?e.Util.drawRoundedRectPath(l,s,u,c):l.rect(0,0,s,u),l.closePath(),l.fillStrokeShape(this)}getWidth(){var l,s;return(l=this.attrs.width)!==null&&l!==void 0?l:(s=this.image())===null||s===void 0?void 0:s.width}getHeight(){var l,s;return(l=this.attrs.height)!==null&&l!==void 0?l:(s=this.image())===null||s===void 0?void 0:s.height}static fromURL(l,s,u=null){const c=e.Util.createImageElement();c.onload=function(){const d=new i({image:c});s(d)},c.onerror=u,c.crossOrigin="Anonymous",c.src=l}}return Us.Image=i,i.prototype.className="Image",(0,o._registerNode)(i),t.Factory.addGetterSetter(i,"cornerRadius",0,(0,r.getNumberOrArrayOfNumbersValidator)(4)),t.Factory.addGetterSetter(i,"image"),t.Factory.addComponentsGetterSetter(i,"crop",["x","y","width","height"]),t.Factory.addGetterSetter(i,"cropX",0,(0,r.getNumberValidator)()),t.Factory.addGetterSetter(i,"cropY",0,(0,r.getNumberValidator)()),t.Factory.addGetterSetter(i,"cropWidth",0,(0,r.getNumberValidator)()),t.Factory.addGetterSetter(i,"cropHeight",0,(0,r.getNumberValidator)()),Us}var ca={},N6;function lve(){if(N6)return ca;N6=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.Tag=ca.Label=void 0;const e=xt(),t=_n(),n=i2(),o=Pt(),r=St(),i=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],a="Change.konva",l="none",s="up",u="right",c="down",d="left",f=i.length;let h=class extends n.Group{constructor(m){super(m),this.on("add.konva",function(S){this._addListeners(S.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(m){let S=this,y;const b=function(){S._sync()};for(y=0;y{l=Math.min(l,d.x),s=Math.max(s,d.x),u=Math.min(u,d.y),c=Math.max(c,d.y)}),{x:l,y:u,width:s-l,height:c-u}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(a){this.radius(a/2)}setHeight(a){this.radius(a/2)}};return Ys.RegularPolygon=r,r.prototype.className="RegularPolygon",r.prototype._centroid=!0,r.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(r),e.Factory.addGetterSetter(r,"radius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(r,"sides",0,(0,n.getNumberValidator)()),Ys}var qs={},B6;function cve(){if(B6)return qs;B6=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.Ring=void 0;const e=xt(),t=_n(),n=Pt(),o=St(),r=Math.PI*2;let i=class extends t.Shape{_sceneFunc(l){l.beginPath(),l.arc(0,0,this.innerRadius(),0,r,!1),l.moveTo(this.outerRadius(),0),l.arc(0,0,this.outerRadius(),r,0,!0),l.closePath(),l.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(l){this.outerRadius(l/2)}setHeight(l){this.outerRadius(l/2)}};return qs.Ring=i,i.prototype.className="Ring",i.prototype._centroid=!0,i.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(i),e.Factory.addGetterSetter(i,"innerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"outerRadius",0,(0,n.getNumberValidator)()),qs}var Zs={},L6;function uve(){if(L6)return Zs;L6=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.Sprite=void 0;const e=xt(),t=_n(),n=a2(),o=Pt(),r=St();let i=class extends t.Shape{constructor(l){super(l),this._updated=!0,this.anim=new n.Animation(()=>{const s=this._updated;return this._updated=!1,s}),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(l){const s=this.animation(),u=this.frameIndex(),c=u*4,d=this.animations()[s],f=this.frameOffsets(),h=d[c+0],p=d[c+1],g=d[c+2],m=d[c+3],S=this.image();if((this.hasFill()||this.hasStroke())&&(l.beginPath(),l.rect(0,0,g,m),l.closePath(),l.fillStrokeShape(this)),S)if(f){const y=f[s],b=u*2;l.drawImage(S,h,p,g,m,y[b+0],y[b+1],g,m)}else l.drawImage(S,h,p,g,m,0,0,g,m)}_hitFunc(l){const s=this.animation(),u=this.frameIndex(),c=u*4,d=this.animations()[s],f=this.frameOffsets(),h=d[c+2],p=d[c+3];if(l.beginPath(),f){const g=f[s],m=u*2;l.rect(g[m+0],g[m+1],h,p)}else l.rect(0,0,h,p);l.closePath(),l.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const l=this;this.interval=setInterval(function(){l._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const l=this.getLayer();this.anim.setLayers(l),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const l=this.frameIndex(),s=this.animation(),u=this.animations(),c=u[s],d=c.length/4;l{if(new RegExp("\\p{Emoji}","u").test(Y)){const W=G[U+1];W&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(W)?(V.push(Y+W),G[U+1]=""):V.push(Y)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(Y+(G[U+1]||""))?V.push(Y+G[U+1]):U>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(Y)?V[V.length-1]+=Y:Y&&V.push(Y);return V},[])}const l="auto",s="center",u="inherit",c="justify",d="Change.konva",f="2d",h="-",p="left",g="text",m="Text",S="top",y="bottom",b="middle",x="normal",C="px ",_=" ",$="right",P="rtl",O="word",T="char",I="none",R="…",F=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],H=F.length;function M(j){return j.split(",").map(V=>{V=V.trim();const Y=V.indexOf(" ")>=0,U=V.indexOf('"')>=0||V.indexOf("'")>=0;return Y&&!U&&(V=`"${V}"`),V}).join(", ")}let B;function E(){return B||(B=e.Util.createCanvasElement().getContext(f),B)}function A(j){j.fillText(this._partialText,this._partialTextX,this._partialTextY)}function D(j){j.setAttr("miterLimit",2),j.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function k(j){return j=j||{},!j.fillLinearGradientColorStops&&!j.fillRadialGradientColorStops&&!j.fillPatternImage&&(j.fill=j.fill||"black"),j}let L=class extends n.Shape{constructor(V){super(k(V)),this._partialTextX=0,this._partialTextY=0;for(let Y=0;Y1&&(he+=J)}}_hitFunc(V){const Y=this.getWidth(),U=this.getHeight();V.beginPath(),V.rect(0,0,Y,U),V.closePath(),V.fillStrokeShape(this)}setText(V){const Y=e.Util._isString(V)?V:V==null?"":V+"";return this._setAttr(g,Y),this}getWidth(){return this.attrs.width===l||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===l||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(V){var Y,U,G,W,J,Q,q,ee,K,Z,te;let se=E(),ie=this.fontSize(),ae;se.save(),se.font=this._getContextFont(),ae=se.measureText(V),se.restore();const le=ie/100;return{actualBoundingBoxAscent:(Y=ae.actualBoundingBoxAscent)!==null&&Y!==void 0?Y:71.58203125*le,actualBoundingBoxDescent:(U=ae.actualBoundingBoxDescent)!==null&&U!==void 0?U:0,actualBoundingBoxLeft:(G=ae.actualBoundingBoxLeft)!==null&&G!==void 0?G:-7.421875*le,actualBoundingBoxRight:(W=ae.actualBoundingBoxRight)!==null&&W!==void 0?W:75.732421875*le,alphabeticBaseline:(J=ae.alphabeticBaseline)!==null&&J!==void 0?J:0,emHeightAscent:(Q=ae.emHeightAscent)!==null&&Q!==void 0?Q:100*le,emHeightDescent:(q=ae.emHeightDescent)!==null&&q!==void 0?q:-20*le,fontBoundingBoxAscent:(ee=ae.fontBoundingBoxAscent)!==null&&ee!==void 0?ee:91*le,fontBoundingBoxDescent:(K=ae.fontBoundingBoxDescent)!==null&&K!==void 0?K:21*le,hangingBaseline:(Z=ae.hangingBaseline)!==null&&Z!==void 0?Z:72.80000305175781*le,ideographicBaseline:(te=ae.ideographicBaseline)!==null&&te!==void 0?te:-21*le,width:ae.width,height:ie}}_getContextFont(){return this.fontStyle()+_+this.fontVariant()+_+(this.fontSize()+C)+M(this.fontFamily())}_addTextLine(V){this.align()===c&&(V=V.trim());const U=this._getTextWidth(V);return this.textArr.push({text:V,width:U,lastInParagraph:!1})}_getTextWidth(V){const Y=this.letterSpacing(),U=V.length;return E().measureText(V).width+Y*U}_setTextData(){let V=this.text().split(` +`+i):o.stack=i}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Va(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:i}=n;o!==void 0&&zf.assertOptions(o,{silentJSONParsing:br.transitional(br.boolean),forcedJSONParsing:br.transitional(br.boolean),clarifyTimeoutError:br.transitional(br.boolean)},!1),r!=null&&(Pe.isFunction(r)?n.paramsSerializer={serialize:r}:zf.assertOptions(r,{encode:br.function,serialize:br.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zf.assertOptions(n,{baseUrl:br.spelling("baseURL"),withXsrfToken:br.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Pe.merge(i.common,i[n.method]);i&&Pe.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=ho.concat(a,i);const l=[];let s=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(s=s&&g.synchronous,l.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let c,d=0,f;if(!s){const p=[a6.bind(this),void 0];for(p.unshift(...l),p.push(...u),f=p.length,c=Promise.resolve(n);d{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](r);o._listeners=null}),this.promise.then=r=>{let i;const a=new Promise(l=>{o.subscribe(l),i=l}).then(r);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,l){o.reason||(o.reason=new Ss(i,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new pE(function(r){t=r}),cancel:t}}};function Pge(e){return function(n){return e.apply(null,n)}}function Oge(e){return Pe.isObject(e)&&e.isAxiosError===!0}const C1={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(C1).forEach(([e,t])=>{C1[t]=e});function gE(e){const t=new Aa(e),n=KI(Aa.prototype.request,t);return Pe.extend(n,Aa.prototype,t,{allOwnKeys:!0}),Pe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return gE(Va(e,r))},n}const an=gE(nd);an.Axios=Aa;an.CanceledError=Ss;an.CancelToken=_ge;an.isCancel=aE;an.VERSION=hE;an.toFormData=Rg;an.AxiosError=mt;an.Cancel=an.CanceledError;an.all=function(t){return Promise.all(t)};an.spread=Pge;an.isAxiosError=Oge;an.mergeConfig=Va;an.AxiosHeaders=ho;an.formToJSON=e=>iE(Pe.isHTMLForm(e)?new FormData(e):e);an.getAdapter=fE.getAdapter;an.HttpStatusCode=C1;an.default=an;const{Axios:Qve,AxiosError:eme,CanceledError:tme,isCancel:nme,CancelToken:ome,VERSION:rme,all:ime,Cancel:ame,isAxiosError:lme,spread:sme,toFormData:cme,AxiosHeaders:ume,HttpStatusCode:dme,formToJSON:fme,getAdapter:hme,mergeConfig:pme}=an,Ra="http://101.200.148.149:8555",Qh=an.create({baseURL:Ra,timeout:5e3}),Tge=["src"],Ige=["src"],Ege=re({__name:"Check",props:{filePath:String,formState:String},emits:["update:formState"],setup(e,{emit:t}){const n=e,o=t,r=oe("img");He(()=>{n.filePath&&(r.value=n.filePath.split(".").pop()==="pdf"?"pdf":"img",Qh.get("/recognize?filePath="+encodeURIComponent(n.filePath)).then(u=>{console.log(u.data),a.value=u.data,o("update:formState",JSON.stringify(u.data))}),i.value=Ra+"/"+n.filePath)});const i=oe("");let a=oe({drawer:"",invoiceAmountPreTax:0,invoiceCode:"",invoiceDate:"",invoiceDetails:[{amount:0,itemName:"",tax:0,taxRate:0}],invoiceNumber:"",invoiceTax:0,invoiceType:"",purchaserName:"",purchaserTaxNumber:"",remarks:"",sellerBankAccountInfo:"",sellerContactInfo:"",sellerName:"",sellerTaxNumber:"",specialTag:"",title:"",totalAmount:0});const l=u=>{console.log("Success:",u)},s=u=>{console.log("Failed:",u)};return(u,c)=>{const d=vt("a-col"),f=vt("a-input"),h=vt("a-form-item"),p=vt("a-form"),g=vt("a-row"),m=vt("a-layout-content");return Rt(),vn(m,null,{default:Ve(()=>[v(g,null,{default:Ve(()=>[v(d,{span:15},{default:Ve(()=>[r.value==="img"?(Rt(),Jr("img",{key:0,src:i.value,alt:"",class:"pdf"},null,8,Tge)):gn("",!0),r.value==="pdf"?(Rt(),Jr("iframe",{key:1,src:i.value,class:"pdf"},null,8,Ige)):gn("",!0)]),_:1}),v(d,{span:8},{default:Ve(()=>[v(p,{model:Ue(a),name:"basic","label-col":{span:8},"wrapper-col":{span:16},autocomplete:"off",onFinish:l,onFinishFailed:s},{default:Ve(()=>[v(h,{label:"发票类型"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceType,"onUpdate:value":c[0]||(c[0]=S=>Ue(a).invoiceType=S)},null,8,["value"])]),_:1}),v(h,{label:"发票号码"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceNumber,"onUpdate:value":c[1]||(c[1]=S=>Ue(a).invoiceNumber=S)},null,8,["value"])]),_:1}),v(h,{label:"开票日期"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceDate,"onUpdate:value":c[2]||(c[2]=S=>Ue(a).invoiceDate=S)},null,8,["value"])]),_:1}),v(h,{label:"不含税金额"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceAmountPreTax,"onUpdate:value":c[3]||(c[3]=S=>Ue(a).invoiceAmountPreTax=S)},null,8,["value"])]),_:1}),v(h,{label:"税额"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceTax,"onUpdate:value":c[4]||(c[4]=S=>Ue(a).invoiceTax=S)},null,8,["value"])]),_:1}),v(h,{label:"价税合计"},{default:Ve(()=>[v(f,{value:Ue(a).totalAmount,"onUpdate:value":c[5]||(c[5]=S=>Ue(a).totalAmount=S)},null,8,["value"])]),_:1}),v(h,{label:"销方名称"},{default:Ve(()=>[v(f,{value:Ue(a).sellerName,"onUpdate:value":c[6]||(c[6]=S=>Ue(a).sellerName=S)},null,8,["value"])]),_:1}),v(h,{label:"销方税号"},{default:Ve(()=>[v(f,{value:Ue(a).sellerTaxNumber,"onUpdate:value":c[7]||(c[7]=S=>Ue(a).sellerTaxNumber=S)},null,8,["value"])]),_:1}),v(h,{label:"购方名称"},{default:Ve(()=>[v(f,{value:Ue(a).purchaserName,"onUpdate:value":c[8]||(c[8]=S=>Ue(a).purchaserName=S)},null,8,["value"])]),_:1}),v(h,{label:"购方税号"},{default:Ve(()=>[v(f,{value:Ue(a).purchaserTaxNumber,"onUpdate:value":c[9]||(c[9]=S=>Ue(a).purchaserTaxNumber=S)},null,8,["value"])]),_:1}),v(h,{label:"发票代码"},{default:Ve(()=>[v(f,{value:Ue(a).invoiceCode,"onUpdate:value":c[10]||(c[10]=S=>Ue(a).invoiceCode=S)},null,8,["value"])]),_:1})]),_:1},8,["model"])]),_:1})]),_:1})]),_:1})}}}),Cs=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Mge=Cs(Ege,[["__scopeId","data-v-63a0040f"]]),Age=re({__name:"upload",props:{filePath:String},emits:["update:filePath"],setup(e,{emit:t}){const n=oe([]),o=e,r=t,i=l=>(console.log(l),!1);console.log(o.filePath);const a=l=>{const{file:s,onSuccess:u,onError:c,onProgress:d}=l,f=new FormData;f.append("file",s);const h=new XMLHttpRequest;h.upload.onprogress=p=>{p.lengthComputable&&d({percent:p.loaded/p.total*100},s)},h.onload=()=>{if(h.status===200||h.status===201){console.log(h.responseText),u(h.responseText,s);let p=JSON.parse(h.responseText);r("update:filePath",p.file_path)}else c(new Error(`Upload failed with status ${h.status}`))},h.onerror=()=>{c(new Error("Network error"))},h.open("POST",Ra+"/upload"),h.send(f)};return(l,s)=>{const u=vt("a-button"),c=vt("a-upload"),d=vt("a-layout-content");return Rt(),vn(d,{class:"container"},{default:Ve(()=>[v(c,{"file-list":n.value,"onUpdate:fileList":s[0]||(s[0]=f=>n.value=f),customRequest:a,"list-type":"picture",class:"upload-list-inline","max-count":1,onRemove:i},{default:Ve(()=>[v(u,null,{default:Ve(()=>[v(Ue(Ig)),s[1]||(s[1]=It(" 上传发票 ",-1))]),_:1,__:[1]})]),_:1},8,["file-list"])]),_:1})}}}),Rge=Cs(Age,[["__scopeId","data-v-9f5a173f"]]),Dge={key:0},Nge={key:1},Fge=re({__name:"report",props:{filePath:String},setup(e){const t=e,n=oe("img");He(()=>{t.filePath&&(n.value=t.filePath.split(".").pop()==="pdf"?"pdf":"img",Qh.get("/verify?filePath="+encodeURIComponent(t.filePath)).then(i=>{console.log(i),r.value=i.data}),o.value=Ra+"/"+t.filePath)});const o=oe("");let r=oe({status:"",inspectionAmount:"",cyjgxx:"",verify_time:""});return(i,a)=>{const l=vt("a-result"),s=vt("a-layout-content");return Rt(),vn(s,null,{default:Ve(()=>[v(l,{status:Ue(r).status,title:Ue(r).cyjgxx},{subTitle:Ve(()=>[Ue(r).status==="success"?(Rt(),Jr("p",Dge,"查验次数: "+E1(Ue(r).inspectionAmount),1)):gn("",!0),Ue(r).status==="success"?(Rt(),Jr("p",Nge,"已存入发票库")):gn("",!0)]),_:1},8,["status","title"])]),_:1})}}}),kge=Cs(Fge,[["__scopeId","data-v-34c6f13c"]]),Bge=re({__name:"index",setup(e){const t=[{title:"上传发票",icon:Oo(Ig)},{title:"识别发票",icon:Oo(YS)},{title:"验证发票",icon:Oo(qS)}],n=oe(""),o=oe(0),r=()=>{o.value++},i=()=>{o.value--},a=()=>{console.log("保存成功")},l=oe("");return(s,u)=>{const c=vt("a-steps"),d=vt("a-layout-content"),f=vt("a-button"),h=vt("a-space"),p=vt("a-col"),g=vt("a-row"),m=vt("a-layout-footer"),S=vt("a-layout");return Rt(),Jr(ze,null,[v(c,{current:o.value,items:t},null,8,["current"]),v(S,null,{default:Ve(()=>[v(d,{class:"container"},{default:Ve(()=>[o.value==0?(Rt(),vn(Rge,{key:0,filePath:n.value,"onUpdate:filePath":u[0]||(u[0]=y=>n.value=y)},null,8,["filePath"])):gn("",!0),o.value==1?(Rt(),vn(Mge,{key:1,filePath:n.value,"onUpdate:filePath":u[1]||(u[1]=y=>n.value=y),formState:l.value,"onUpdate:formState":u[2]||(u[2]=y=>l.value=y)},null,8,["filePath","formState"])):gn("",!0),o.value==2?(Rt(),vn(kge,{key:2,filePath:n.value,"onUpdate:filePath":u[3]||(u[3]=y=>n.value=y),formState:l.value,"onUpdate:formState":u[4]||(u[4]=y=>l.value=y)},null,8,["filePath","formState"])):gn("",!0)]),_:1}),v(m,null,{default:Ve(()=>[v(g,null,{default:Ve(()=>[v(p,{span:12,offset:"16"},{default:Ve(()=>[v(h,null,{default:Ve(()=>[o.value>0?(Rt(),vn(f,{key:0,type:"default",onClick:i},{default:Ve(()=>u[5]||(u[5]=[It("上一步",-1)])),_:1,__:[5]})):gn("",!0),o.valueu[6]||(u[6]=[It("下一步",-1)])),_:1,__:[6]})):gn("",!0),o.value==t.length-1?(Rt(),vn(f,{key:2,type:"dashed",onClick:a},{default:Ve(()=>u[7]||(u[7]=[It("完成",-1)])),_:1,__:[7]})):gn("",!0)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})],64)}}}),Lge=Cs(Bge,[["__scopeId","data-v-65545dab"]]),Hge={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},vE={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},x1={lang:w({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},Hge),timePickerLocale:w({},vE)};x1.lang.ok="确定";const yo="${label}不是一个有效的${type}",zge={locale:"zh-cn",Pagination:dT,DatePicker:x1,TimePicker:vE,Calendar:x1,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",filterCheckall:"全选",filterSearchPlaceholder:"在筛选项中搜索",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Tour:{Next:"下一步",Previous:"上一步",Finish:"结束导览"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:yo,method:yo,array:yo,object:yo,number:yo,date:yo,boolean:yo,integer:yo,float:yo,regexp:yo,email:yo,url:yo,hex:yo},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"},QRCode:{expired:"二维码已过期",refresh:"点击刷新",scanned:"已扫描"}};var jf={exports:{}},jge=jf.exports,s6;function Vge(){return s6||(s6=1,function(e,t){(function(n,o){e.exports=o(FP())})(jge,function(n){function o(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var r=o(n),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var s=100*a+l;return s<600?"凌晨":s<900?"早上":s<1100?"上午":s<1300?"中午":s<1800?"下午":"晚上"}};return r.default.locale(i,null,!0),i})}(jf)),jf.exports}Vge();const Wge={class:"table-operations"},Kge={class:"clearfix"},Gge=["src"],Uge=re({__name:"manage",setup(e){const[t,n]=Vi.useMessage(),o=[{title:"发票号码",dataIndex:"invoiceNumber",key:"invoiceNumber"},{title:"销方名称",dataIndex:"sellerName",key:"sellerName"},{title:"销方税号",dataIndex:"sellerTaxNumber",key:"sellerTaxNumber"},{title:"不含税金额",dataIndex:"invoiceAmountPreTax",key:"invoiceAmountPreTax"},{title:"税额",dataIndex:"invoiceTax",key:"invoiceTax"},{title:"价税合计",dataIndex:"totalAmount",key:"totalAmount"},{title:"开票日期",dataIndex:"invoiceDate",key:"invoiceDate"},{title:"查验结果",dataIndex:"verify_status",key:"verify_status"},{title:"查验次数",dataIndex:"inspectionAmount",key:"inspectionAmount"},{title:"查验时间",dataIndex:"verify_time",key:"verify_time"},{title:"操作",dataIndex:"action",key:"action"}];let r=oe([]),i=oe({page:1,pageSize:100,total:0,params:{verify_status:"success",value:null,verify_time:null}});const a={onChange:(P,O)=>{console.log(`selectedRowKeys: ${P}`,"selectedRows: ",O)},getCheckboxProps:P=>({disabled:P.status==="yes",name:P.status})},l=oe(!1),s=oe(""),u=oe(!1),c=oe({id:"",status:!1,desc:"",desc_files:"",fileIds:new Array}),d=()=>{u.value=!0,Qh.post("/updateInvoice",{invoiceId:c.value.id,status:c.value.status?"yes":"no",desc:c.value.desc,desc_files:c.value.fileIds.join(",")}).then(P=>{P.status==200&&(l.value=!1,u.value=!1,t.success("修改成功"))})},f=P=>{if(P.status==="yes"?s.value="备注":s.value="入账",c.value=Object.assign({},P),c.value.status=P.status==="yes",c.value.fileIds=P.desc_files.split(","),P.desc_files){let O=P.desc_files.split(",");p.value=[];for(let T=0;T{Qh.post("/listInvoice",{verify_status:i.value.params.verify_status,value:i.value.params.value,verify_time:i.value.params.verify_time}).then(P=>{console.log(P),r.value=P.data})},p=oe([]),g=oe(!1),m=oe(""),S=oe("");function y(P){return new Promise((O,T)=>{const I=new FileReader;I.readAsDataURL(P),I.onload=()=>O(I.result),I.onerror=R=>T(R)})}const b=()=>{g.value=!1,S.value=""},x=async P=>{!P.url&&!P.preview&&(P.preview=await y(P.originFileObj)),m.value=P.url||P.preview,g.value=!0,S.value=P.name||P.url.substring(P.url.lastIndexOf("/")+1)},C=P=>{P.file.status==="done"&&(P.file.uid=P.file.response.file_path,c.value.fileIds.push(P.file.response.file_path))},_=P=>{let O=c.value.fileIds.indexOf(P.uid);c.value.fileIds.splice(O,1)},$=P=>{const{file:O,onSuccess:T,onError:I,onProgress:R}=P,F=new FormData;F.append("file",O);const H=new XMLHttpRequest;H.upload.onprogress=M=>{M.lengthComputable&&R({percent:M.loaded/M.total*100},O)},H.onload=()=>{if(H.status===200||H.status===201){console.log(H.responseText),T(H.responseText,O);let M=JSON.parse(H.responseText);c.value.desc_files?c.value.desc_files+=",":c.value.desc_files="",c.value.desc_files+=M.file_path}else I(new Error(`Upload failed with status ${H.status}`))},H.onerror=()=>{I(new Error("Network error"))},H.open("POST",Ra+"/upload"),H.send(F)};return dn.locale("zh-cn"),He(()=>{h()}),(P,O)=>{const T=vt("a-range-picker"),I=vt("a-form-item"),R=vt("a-input"),F=vt("a-radio-button"),H=vt("a-radio-group"),M=vt("a-button"),B=vt("a-form"),E=vt("a-col"),A=vt("a-row"),D=vt("a-tag"),k=vt("a-image"),L=vt("a-image-preview-group"),j=vt("a-typography-title"),V=vt("a-typography-paragraph"),Y=vt("a-table"),U=vt("a-switch"),G=vt("a-textarea"),W=vt("a-upload"),J=vt("a-modal");return Rt(),Jr(ze,null,[Ur("div",Wge,[v(A,{gutter:20},{default:Ve(()=>[v(E,{span:22,align:"end",offset:"2"},{default:Ve(()=>[v(B,{value:Ue(i),"onUpdate:value":O[3]||(O[3]=Q=>tn(i)?i.value=Q:i=Q),layout:"inline"},{default:Ve(()=>[v(I,{label:"验证时间"},{default:Ve(()=>[v(T,{value:Ue(i).params.verify_time,"onUpdate:value":O[0]||(O[0]=Q=>Ue(i).params.verify_time=Q),valueFormat:"YYYY-MM-DD HH:mm:ss",locale:Ue(zge).DatePicker},null,8,["value","locale"])]),_:1}),v(I,{label:"关键字"},{default:Ve(()=>[v(R,{value:Ue(i).params.value,"onUpdate:value":O[1]||(O[1]=Q=>Ue(i).params.value=Q),"allow-clear":""},null,8,["value"])]),_:1}),v(I,{label:"验证结果"},{default:Ve(()=>[v(H,{value:Ue(i).params.verify_status,"onUpdate:value":O[2]||(O[2]=Q=>Ue(i).params.verify_status=Q)},{default:Ve(()=>[v(F,{value:"success"},{default:Ve(()=>O[9]||(O[9]=[It("正常",-1)])),_:1,__:[9]}),v(F,{value:"faild"},{default:Ve(()=>O[10]||(O[10]=[It("异常",-1)])),_:1,__:[10]})]),_:1},8,["value"])]),_:1}),v(I,null,{default:Ve(()=>[v(M,{type:"primary",icon:Oo(Ue(Qa)),onClick:h},{default:Ve(()=>O[11]||(O[11]=[It("搜索",-1)])),_:1,__:[11]},8,["icon"])]),_:1})]),_:1},8,["value"])]),_:1})]),_:1})]),v(Y,{columns:o,"data-source":Ue(r),"row-selection":a},{bodyCell:Ve(({column:Q,record:q})=>[Q.key==="verify_status"?(Rt(),Jr(ze,{key:0},[q.verify_status==="success"?(Rt(),vn(D,{key:0,color:"green"},{default:Ve(()=>O[12]||(O[12]=[It("正常",-1)])),_:1,__:[12]})):gn("",!0),q.verify_status==="fail"?(Rt(),vn(D,{key:1,color:"red"},{default:Ve(()=>O[13]||(O[13]=[It("异常",-1)])),_:1,__:[13]})):gn("",!0)],64)):gn("",!0),Q.key==="action"?(Rt(),Jr(ze,{key:1},[q.status==="yes"?(Rt(),vn(M,{key:0,type:"primary",onClick:ee=>f(q)},{default:Ve(()=>O[14]||(O[14]=[It("备注",-1)])),_:2,__:[14]},1032,["onClick"])):gn("",!0),q.status==="no"?(Rt(),vn(M,{key:1,type:"primary",onClick:ee=>f(q)},{default:Ve(()=>O[15]||(O[15]=[It("入账",-1)])),_:2,__:[15]},1032,["onClick"])):gn("",!0)],64)):gn("",!0)]),expandedRowRender:Ve(({record:Q})=>[v(A,null,{default:Ve(()=>[v(E,{span:8},{default:Ve(()=>[Q.desc_files?(Rt(),vn(L,{key:0},{default:Ve(()=>[(Rt(!0),Jr(ze,null,zM(Q.desc_files.split(","),q=>(Rt(),vn(k,{width:200,src:Ue(Ra)+"/"+q},null,8,["src"]))),256))]),_:2},1024)):gn("",!0)]),_:2},1024),v(E,{span:16},{default:Ve(()=>[v(j,{level:4},{default:Ve(()=>O[16]||(O[16]=[It("备注",-1)])),_:1,__:[16]}),v(V,null,{default:Ve(()=>[Ur("blockquote",null,E1(Q.desc)+"asdsad",1)]),_:2},1024)]),_:2},1024)]),_:2},1024)]),expandColumnTitle:Ve(()=>[v(Ue(ZS))]),_:1},8,["data-source"]),v(J,{open:l.value,"onUpdate:open":O[8]||(O[8]=Q=>l.value=Q),title:s.value,"confirm-loading":u.value,onOk:d},{default:Ve(()=>[v(B,{value:c.value,"onUpdate:value":O[7]||(O[7]=Q=>c.value=Q)},{default:Ve(()=>[v(I,{label:"是否已报销"},{default:Ve(()=>[v(U,{checked:c.value.status,"onUpdate:checked":O[4]||(O[4]=Q=>c.value.status=Q)},null,8,["checked"])]),_:1}),v(I,{label:"备注"},{default:Ve(()=>[v(G,{value:c.value.desc,"onUpdate:value":O[5]||(O[5]=Q=>c.value.desc=Q),rows:6},null,8,["value"])]),_:1}),v(I,{label:"附件"},{default:Ve(()=>[Ur("div",Kge,[v(W,{"file-list":p.value,"onUpdate:fileList":O[6]||(O[6]=Q=>p.value=Q),customRequest:$,onChange:C,onRemove:_,"list-type":"picture-card",onPreview:x},{default:Ve(()=>[Ur("div",null,[v(Ue(tg)),O[17]||(O[17]=Ur("div",{style:{"margin-top":"8px"}},"上传",-1))])]),_:1},8,["file-list"]),v(J,{open:g.value,title:S.value,footer:null,onCancel:b},{default:Ve(()=>[Ur("img",{alt:"example",style:{width:"100%"},src:m.value},null,8,Gge)]),_:1},8,["open","title"])])]),_:1})]),_:1},8,["value"])]),_:1},8,["open","title","confirm-loading"]),v(Ue(n))],64)}}}),Xge=Cs(Uge,[["__scopeId","data-v-08087e29"]]),Yge=re({__name:"App",setup(e){const t=oe(["1"]);let n=oe(1);const o=r=>{console.log("click ",r),n.value=r.key};return(r,i)=>{const a=vt("a-menu-item"),l=vt("a-menu"),s=vt("a-layout-header"),u=vt("a-layout"),c=vt("a-layout-content");return Rt(),vn(u,{class:"container"},{default:Ve(()=>[v(s,{class:"header"},{default:Ve(()=>[i[5]||(i[5]=Ur("div",{class:"logo"},null,-1)),v(l,{selectedKeys:t.value,"onUpdate:selectedKeys":i[0]||(i[0]=d=>t.value=d),theme:"dark",mode:"horizontal",style:{lineHeight:"64px"},onSelect:o},{default:Ve(()=>[v(a,{key:"1"},{default:Ve(()=>i[1]||(i[1]=[It("发票查验",-1)])),_:1,__:[1]}),v(a,{key:"2"},{default:Ve(()=>i[2]||(i[2]=[It("发票管理",-1)])),_:1,__:[2]}),v(a,{key:"3"},{default:Ve(()=>i[3]||(i[3]=[It("发票复验",-1)])),_:1,__:[3]}),v(a,{key:"4"},{default:Ve(()=>i[4]||(i[4]=[It("发票统计",-1)])),_:1,__:[4]})]),_:1},8,["selectedKeys"])]),_:1,__:[5]}),v(c,{style:{padding:"0 10px"}},{default:Ve(()=>[v(u,{style:{padding:"24px 0",background:"#fff"}},{default:Ve(()=>[Ue(n)==1?(Rt(),vn(Lge,{key:0})):gn("",!0),Ue(n)==2?(Rt(),vn(Xge,{key:1})):gn("",!0)]),_:1})]),_:1})]),_:1})}}}),qge=Cs(Yge,[["__scopeId","data-v-0093e7ee"]]);var Vf={exports:{}},Ds={},xm={},wm={},c6;function St(){return c6||(c6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;const t=Math.PI/180;function n(){return typeof window<"u"&&({}.toString.call(window)==="[object Window]"||{}.toString.call(window)==="[object global]")}e.glob=typeof Rw<"u"?Rw:typeof window<"u"?window:typeof WorkerGlobalScope<"u"?self:{},e.Konva={_global:e.glob,version:"9.3.22",isBrowser:n(),isUnminified:/param/.test((function(r){}).toString()),dblClickWindow:400,getAngle(r){return e.Konva.angleDeg?r*t:r},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:typeof window<"u"&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return e.Konva.DD.isDragging},isTransforming(){var r;return(r=e.Konva.Transformer)===null||r===void 0?void 0:r.isTransforming()},isDragReady(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(r){e.glob.Konva=r}};const o=r=>{e.Konva[r.prototype.getClassName()]=r};e._registerNode=o,e.Konva._injectGlobal(e.Konva)}(wm)),wm}var $m={},u6;function Jt(){return u6||(u6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;const t=St();class n{constructor(x=[1,0,0,1,0,0]){this.dirty=!1,this.m=x&&x.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 n(this.m)}copyInto(x){x.m[0]=this.m[0],x.m[1]=this.m[1],x.m[2]=this.m[2],x.m[3]=this.m[3],x.m[4]=this.m[4],x.m[5]=this.m[5]}point(x){const C=this.m;return{x:C[0]*x.x+C[2]*x.y+C[4],y:C[1]*x.x+C[3]*x.y+C[5]}}translate(x,C){return this.m[4]+=this.m[0]*x+this.m[2]*C,this.m[5]+=this.m[1]*x+this.m[3]*C,this}scale(x,C){return this.m[0]*=x,this.m[1]*=x,this.m[2]*=C,this.m[3]*=C,this}rotate(x){const C=Math.cos(x),_=Math.sin(x),$=this.m[0]*C+this.m[2]*_,P=this.m[1]*C+this.m[3]*_,O=this.m[0]*-_+this.m[2]*C,T=this.m[1]*-_+this.m[3]*C;return this.m[0]=$,this.m[1]=P,this.m[2]=O,this.m[3]=T,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(x,C){const _=this.m[0]+this.m[2]*C,$=this.m[1]+this.m[3]*C,P=this.m[2]+this.m[0]*x,O=this.m[3]+this.m[1]*x;return this.m[0]=_,this.m[1]=$,this.m[2]=P,this.m[3]=O,this}multiply(x){const C=this.m[0]*x.m[0]+this.m[2]*x.m[1],_=this.m[1]*x.m[0]+this.m[3]*x.m[1],$=this.m[0]*x.m[2]+this.m[2]*x.m[3],P=this.m[1]*x.m[2]+this.m[3]*x.m[3],O=this.m[0]*x.m[4]+this.m[2]*x.m[5]+this.m[4],T=this.m[1]*x.m[4]+this.m[3]*x.m[5]+this.m[5];return this.m[0]=C,this.m[1]=_,this.m[2]=$,this.m[3]=P,this.m[4]=O,this.m[5]=T,this}invert(){const x=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),C=this.m[3]*x,_=-this.m[1]*x,$=-this.m[2]*x,P=this.m[0]*x,O=x*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),T=x*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=C,this.m[1]=_,this.m[2]=$,this.m[3]=P,this.m[4]=O,this.m[5]=T,this}getMatrix(){return this.m}decompose(){const x=this.m[0],C=this.m[1],_=this.m[2],$=this.m[3],P=this.m[4],O=this.m[5],T=x*$-C*_,I={x:P,y:O,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(x!=0||C!=0){const R=Math.sqrt(x*x+C*C);I.rotation=C>0?Math.acos(x/R):-Math.acos(x/R),I.scaleX=R,I.scaleY=T/R,I.skewX=(x*_+C*$)/T,I.skewY=0}else if(_!=0||$!=0){const R=Math.sqrt(_*_+$*$);I.rotation=Math.PI/2-($>0?Math.acos(-_/R):-Math.acos(_/R)),I.scaleX=T/R,I.scaleY=R,I.skewX=0,I.skewY=(x*_+C*$)/T}return I.rotation=e.Util._getRotation(I.rotation),I}}e.Transform=n;const o="[object Array]",r="[object Number]",i="[object String]",a="[object Boolean]",l=Math.PI/180,s=180/Math.PI,u="#",c="",d="0",f="Konva warning: ",h="Konva error: ",p="rgb(",g={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]},m=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/;let S=[];const y=typeof requestAnimationFrame<"u"&&requestAnimationFrame||function(b){setTimeout(b,60)};e.Util={_isElement(b){return!!(b&&b.nodeType==1)},_isFunction(b){return!!(b&&b.constructor&&b.call&&b.apply)},_isPlainObject(b){return!!b&&b.constructor===Object},_isArray(b){return Object.prototype.toString.call(b)===o},_isNumber(b){return Object.prototype.toString.call(b)===r&&!isNaN(b)&&isFinite(b)},_isString(b){return Object.prototype.toString.call(b)===i},_isBoolean(b){return Object.prototype.toString.call(b)===a},isObject(b){return b instanceof Object},isValidSelector(b){if(typeof b!="string")return!1;const x=b[0];return x==="#"||x==="."||x===x.toUpperCase()},_sign(b){return b===0||b>0?1:-1},requestAnimFrame(b){S.push(b),S.length===1&&y(function(){const x=S;S=[],x.forEach(function(C){C()})})},createCanvasElement(){const b=document.createElement("canvas");try{b.style=b.style||{}}catch{}return b},createImageElement(){return document.createElement("img")},_isInDocument(b){for(;b=b.parentNode;)if(b==document)return!0;return!1},_urlToImage(b,x){const C=e.Util.createImageElement();C.onload=function(){x(C)},C.src=b},_rgbToHex(b,x,C){return((1<<24)+(b<<16)+(x<<8)+C).toString(16).slice(1)},_hexToRgb(b){b=b.replace(u,c);const x=parseInt(b,16);return{r:x>>16&255,g:x>>8&255,b:x&255}},getRandomColor(){let b=(Math.random()*16777215<<0).toString(16);for(;b.length<6;)b=d+b;return u+b},getRGB(b){let x;return b in g?(x=g[b],{r:x[0],g:x[1],b:x[2]}):b[0]===u?this._hexToRgb(b.substring(1)):b.substr(0,4)===p?(x=m.exec(b.replace(/ /g,"")),{r:parseInt(x[1],10),g:parseInt(x[2],10),b:parseInt(x[3],10)}):{r:0,g:0,b:0}},colorToRGBA(b){return b=b||"black",e.Util._namedColorToRBA(b)||e.Util._hex3ColorToRGBA(b)||e.Util._hex4ColorToRGBA(b)||e.Util._hex6ColorToRGBA(b)||e.Util._hex8ColorToRGBA(b)||e.Util._rgbColorToRGBA(b)||e.Util._rgbaColorToRGBA(b)||e.Util._hslColorToRGBA(b)},_namedColorToRBA(b){const x=g[b.toLowerCase()];return x?{r:x[0],g:x[1],b:x[2],a:1}:null},_rgbColorToRGBA(b){if(b.indexOf("rgb(")===0){b=b.match(/rgb\(([^)]+)\)/)[1];const x=b.split(/ *, */).map(Number);return{r:x[0],g:x[1],b:x[2],a:1}}},_rgbaColorToRGBA(b){if(b.indexOf("rgba(")===0){b=b.match(/rgba\(([^)]+)\)/)[1];const x=b.split(/ *, */).map((C,_)=>C.slice(-1)==="%"?_===3?parseInt(C)/100:parseInt(C)/100*255:Number(C));return{r:x[0],g:x[1],b:x[2],a:x[3]}}},_hex8ColorToRGBA(b){if(b[0]==="#"&&b.length===9)return{r:parseInt(b.slice(1,3),16),g:parseInt(b.slice(3,5),16),b:parseInt(b.slice(5,7),16),a:parseInt(b.slice(7,9),16)/255}},_hex6ColorToRGBA(b){if(b[0]==="#"&&b.length===7)return{r:parseInt(b.slice(1,3),16),g:parseInt(b.slice(3,5),16),b:parseInt(b.slice(5,7),16),a:1}},_hex4ColorToRGBA(b){if(b[0]==="#"&&b.length===5)return{r:parseInt(b[1]+b[1],16),g:parseInt(b[2]+b[2],16),b:parseInt(b[3]+b[3],16),a:parseInt(b[4]+b[4],16)/255}},_hex3ColorToRGBA(b){if(b[0]==="#"&&b.length===4)return{r:parseInt(b[1]+b[1],16),g:parseInt(b[2]+b[2],16),b:parseInt(b[3]+b[3],16),a:1}},_hslColorToRGBA(b){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(b)){const[x,...C]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(b),_=Number(C[0])/360,$=Number(C[1])/100,P=Number(C[2])/100;let O,T,I;if($===0)return I=P*255,{r:Math.round(I),g:Math.round(I),b:Math.round(I),a:1};P<.5?O=P*(1+$):O=P+$-P*$;const R=2*P-O,F=[0,0,0];for(let H=0;H<3;H++)T=_+1/3*-(H-1),T<0&&T++,T>1&&T--,6*T<1?I=R+(O-R)*6*T:2*T<1?I=O:3*T<2?I=R+(O-R)*(2/3-T)*6:I=R,F[H]=I*255;return{r:Math.round(F[0]),g:Math.round(F[1]),b:Math.round(F[2]),a:1}}},haveIntersection(b,x){return!(x.x>b.x+b.width||x.x+x.widthb.y+b.height||x.y+x.height1?(O=C,T=_,I=(C-$)*(C-$)+(_-P)*(_-P)):(O=b+F*(C-b),T=x+F*(_-x),I=(O-$)*(O-$)+(T-P)*(T-P))}return[O,T,I]},_getProjectionToLine(b,x,C){const _=e.Util.cloneObject(b);let $=Number.MAX_VALUE;return x.forEach(function(P,O){if(!C&&O===x.length-1)return;const T=x[(O+1)%x.length],I=e.Util._getProjectionToSegment(P.x,P.y,T.x,T.y,b.x,b.y),R=I[0],F=I[1],H=I[2];H<$&&(_.x=R,_.y=F,$=H)}),_},_prepareArrayForTween(b,x,C){const _=[],$=[];if(b.length>x.length){const O=x;x=b,b=O}for(let O=0;O{x.width=0,x.height=0})},drawRoundedRectPath(b,x,C,_){let $=0,P=0,O=0,T=0;typeof _=="number"?$=P=O=T=Math.min(_,x/2,C/2):($=Math.min(_[0]||0,x/2,C/2),P=Math.min(_[1]||0,x/2,C/2),T=Math.min(_[2]||0,x/2,C/2),O=Math.min(_[3]||0,x/2,C/2)),b.moveTo($,0),b.lineTo(x-P,0),b.arc(x-P,P,P,Math.PI*3/2,0,!1),b.lineTo(x,C-T),b.arc(x-T,C-T,T,0,Math.PI/2,!1),b.lineTo(O,C),b.arc(O,C-O,O,Math.PI/2,Math.PI,!1),b.lineTo(0,$),b.arc($,$,$,Math.PI,Math.PI*3/2,!1)}}}($m)),$m}var Ns={},zr={},jr={},d6;function mE(){if(d6)return jr;d6=1,Object.defineProperty(jr,"__esModule",{value:!0}),jr.HitContext=jr.SceneContext=jr.Context=void 0;const e=Jt(),t=St();function n(S){const y=[],b=S.length,x=e.Util;for(let C=0;Ctypeof I=="number"?Math.floor(I):I)),_+=r+T.join(o)+i)):(_+=P.property,y||(_+=c+P.val)),_+=s;return _}clearTrace(){this.traceArr=[]}_trace(y){let b=this.traceArr,x;b.push(y),x=b.length,x>=h&&b.shift()}reset(){const y=this.getCanvas().getPixelRatio();this.setTransform(1*y,0,0,1*y,0,0)}getCanvas(){return this.canvas}clear(y){const b=this.getCanvas();y?this.clearRect(y.x||0,y.y||0,y.width||0,y.height||0):this.clearRect(0,0,b.getWidth()/b.pixelRatio,b.getHeight()/b.pixelRatio)}_applyLineCap(y){const b=y.attrs.lineCap;b&&this.setAttr("lineCap",b)}_applyOpacity(y){const b=y.getAbsoluteOpacity();b!==1&&this.setAttr("globalAlpha",b)}_applyLineJoin(y){const b=y.attrs.lineJoin;b&&this.setAttr("lineJoin",b)}setAttr(y,b){this._context[y]=b}arc(y,b,x,C,_,$){this._context.arc(y,b,x,C,_,$)}arcTo(y,b,x,C,_){this._context.arcTo(y,b,x,C,_)}beginPath(){this._context.beginPath()}bezierCurveTo(y,b,x,C,_,$){this._context.bezierCurveTo(y,b,x,C,_,$)}clearRect(y,b,x,C){this._context.clearRect(y,b,x,C)}clip(...y){this._context.clip.apply(this._context,y)}closePath(){this._context.closePath()}createImageData(y,b){const x=arguments;if(x.length===2)return this._context.createImageData(y,b);if(x.length===1)return this._context.createImageData(y)}createLinearGradient(y,b,x,C){return this._context.createLinearGradient(y,b,x,C)}createPattern(y,b){return this._context.createPattern(y,b)}createRadialGradient(y,b,x,C,_,$){return this._context.createRadialGradient(y,b,x,C,_,$)}drawImage(y,b,x,C,_,$,P,O,T){const I=arguments,R=this._context;I.length===3?R.drawImage(y,b,x):I.length===5?R.drawImage(y,b,x,C,_):I.length===9&&R.drawImage(y,b,x,C,_,$,P,O,T)}ellipse(y,b,x,C,_,$,P,O){this._context.ellipse(y,b,x,C,_,$,P,O)}isPointInPath(y,b,x,C){return x?this._context.isPointInPath(x,y,b,C):this._context.isPointInPath(y,b,C)}fill(...y){this._context.fill.apply(this._context,y)}fillRect(y,b,x,C){this._context.fillRect(y,b,x,C)}strokeRect(y,b,x,C){this._context.strokeRect(y,b,x,C)}fillText(y,b,x,C){C?this._context.fillText(y,b,x,C):this._context.fillText(y,b,x)}measureText(y){return this._context.measureText(y)}getImageData(y,b,x,C){return this._context.getImageData(y,b,x,C)}lineTo(y,b){this._context.lineTo(y,b)}moveTo(y,b){this._context.moveTo(y,b)}rect(y,b,x,C){this._context.rect(y,b,x,C)}roundRect(y,b,x,C,_){this._context.roundRect(y,b,x,C,_)}putImageData(y,b,x){this._context.putImageData(y,b,x)}quadraticCurveTo(y,b,x,C){this._context.quadraticCurveTo(y,b,x,C)}restore(){this._context.restore()}rotate(y){this._context.rotate(y)}save(){this._context.save()}scale(y,b){this._context.scale(y,b)}setLineDash(y){this._context.setLineDash?this._context.setLineDash(y):"mozDash"in this._context?this._context.mozDash=y:"webkitLineDash"in this._context&&(this._context.webkitLineDash=y)}getLineDash(){return this._context.getLineDash()}setTransform(y,b,x,C,_,$){this._context.setTransform(y,b,x,C,_,$)}stroke(y){y?this._context.stroke(y):this._context.stroke()}strokeText(y,b,x,C){this._context.strokeText(y,b,x,C)}transform(y,b,x,C,_,$){this._context.transform(y,b,x,C,_,$)}translate(y,b){this._context.translate(y,b)}_enableTrace(){let y=this,b=d.length,x=this.setAttr,C,_;const $=function(P){let O=y[P],T;y[P]=function(){return _=n(Array.prototype.slice.call(arguments,0)),T=O.apply(y,arguments),y._trace({method:P,args:_}),T}};for(C=0;C{r.dragStatus==="dragging"&&(o=!0)}),o},justDragged:!1,get node(){let o;return e.DD._dragElements.forEach(r=>{o=r.node}),o},_dragElements:new Map,_drag(o){const r=[];e.DD._dragElements.forEach((i,a)=>{const{node:l}=i,s=l.getStage();s.setPointersPositions(o),i.pointerId===void 0&&(i.pointerId=n.Util._getFirstPointerId(o));const u=s._changedPointerPositions.find(c=>c.id===i.pointerId);if(u){if(i.dragStatus!=="dragging"){const c=l.dragDistance();if(Math.max(Math.abs(u.x-i.startPointerPos.x),Math.abs(u.y-i.startPointerPos.y)){i.fire("dragmove",{type:"dragmove",target:i,evt:o},!0)})},_endDragBefore(o){const r=[];e.DD._dragElements.forEach(i=>{const{node:a}=i,l=a.getStage();if(o&&l.setPointersPositions(o),!l._changedPointerPositions.find(c=>c.id===i.pointerId))return;(i.dragStatus==="dragging"||i.dragStatus==="stopped")&&(e.DD.justDragged=!0,t.Konva._mouseListenClick=!1,t.Konva._touchListenClick=!1,t.Konva._pointerListenClick=!1,i.dragStatus="stopped");const u=i.node.getLayer()||i.node instanceof t.Konva.Stage&&i.node;u&&r.indexOf(u)===-1&&r.push(u)}),r.forEach(i=>{i.draw()})},_endDragAfter(o){e.DD._dragElements.forEach((r,i)=>{r.dragStatus==="stopped"&&r.node.fire("dragend",{type:"dragend",target:r.node,evt:o},!0),r.dragStatus!=="dragging"&&e.DD._dragElements.delete(i)})}},t.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))}(_m)),_m}var Pm={},lo={},p6;function Pt(){if(p6)return lo;p6=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.RGBComponent=o,lo.alphaComponent=r,lo.getNumberValidator=i,lo.getNumberOrArrayOfNumbersValidator=a,lo.getNumberOrAutoValidator=l,lo.getStringValidator=s,lo.getStringOrGradientValidator=u,lo.getFunctionValidator=c,lo.getNumberArrayValidator=d,lo.getBooleanValidator=f,lo.getComponentValidator=h;const e=St(),t=Jt();function n(p){return t.Util._isString(p)?'"'+p+'"':Object.prototype.toString.call(p)==="[object Number]"||t.Util._isBoolean(p)?p:Object.prototype.toString.call(p)}function o(p){return p>255?255:p<0?0:Math.round(p)}function r(p){return p>1?1:p<1e-4?1e-4:p}function i(){if(e.Konva.isUnminified)return function(p,g){return t.Util._isNumber(p)||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a number.'),p}}function a(p){if(e.Konva.isUnminified)return function(g,m){let S=t.Util._isNumber(g),y=t.Util._isArray(g)&&g.length==p;return!S&&!y&&t.Util.warn(n(g)+' is a not valid value for "'+m+'" attribute. The value should be a number or Array('+p+")"),g}}function l(){if(e.Konva.isUnminified)return function(p,g){return t.Util._isNumber(p)||p==="auto"||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a number or "auto".'),p}}function s(){if(e.Konva.isUnminified)return function(p,g){return t.Util._isString(p)||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a string.'),p}}function u(){if(e.Konva.isUnminified)return function(p,g){const m=t.Util._isString(p),S=Object.prototype.toString.call(p)==="[object CanvasGradient]"||p&&p.addColorStop;return m||S||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a string or a native gradient.'),p}}function c(){if(e.Konva.isUnminified)return function(p,g){return t.Util._isFunction(p)||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a function.'),p}}function d(){if(e.Konva.isUnminified)return function(p,g){const m=Int8Array?Object.getPrototypeOf(Int8Array):null;return m&&p instanceof m||(t.Util._isArray(p)?p.forEach(function(S){t.Util._isNumber(S)||t.Util.warn('"'+g+'" attribute has non numeric element '+S+". Make sure that all elements are numbers.")}):t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a array of numbers.')),p}}function f(){if(e.Konva.isUnminified)return function(p,g){return p===!0||p===!1||t.Util.warn(n(p)+' is a not valid value for "'+g+'" attribute. The value should be a boolean.'),p}}function h(p){if(e.Konva.isUnminified)return function(g,m){return g==null||t.Util.isObject(g)||t.Util.warn(n(g)+' is a not valid value for "'+m+'" attribute. The value should be an object with properties '+p),g}}return lo}var g6;function xt(){return g6||(g6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;const t=Jt(),n=Pt(),o="get",r="set";e.Factory={addGetterSetter(i,a,l,s,u){e.Factory.addGetter(i,a,l),e.Factory.addSetter(i,a,s,u),e.Factory.addOverloadedGetterSetter(i,a)},addGetter(i,a,l){const s=o+t.Util._capitalize(a);i.prototype[s]=i.prototype[s]||function(){const u=this.attrs[a];return u===void 0?l:u}},addSetter(i,a,l,s){const u=r+t.Util._capitalize(a);i.prototype[u]||e.Factory.overWriteSetter(i,a,l,s)},overWriteSetter(i,a,l,s){const u=r+t.Util._capitalize(a);i.prototype[u]=function(c){return l&&c!==void 0&&c!==null&&(c=l.call(this,c,a)),this._setAttr(a,c),s&&s.call(this),this}},addComponentsGetterSetter(i,a,l,s,u){const c=l.length,d=t.Util._capitalize,f=o+d(a),h=r+d(a);i.prototype[f]=function(){const g={};for(let m=0;m{this._setAttr(a+d(S),void 0)}),this._fireChangeEvent(a,m,g),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(i,a)},addOverloadedGetterSetter(i,a){const l=t.Util._capitalize(a),s=r+l,u=o+l;i.prototype[a]=function(){return arguments.length?(this[s](arguments[0]),this):this[u]()}},addDeprecatedGetterSetter(i,a,l,s){t.Util.error("Adding deprecated "+a);const u=o+t.Util._capitalize(a),c=a+" property is deprecated and will be removed soon. Look at Konva change log for more information.";i.prototype[u]=function(){t.Util.error(c);const d=this.attrs[a];return d===void 0?l:d},e.Factory.addSetter(i,a,s,function(){t.Util.error(c)}),e.Factory.addOverloadedGetterSetter(i,a)},backCompat(i,a){t.Util.each(a,function(l,s){const u=i.prototype[s],c=o+t.Util._capitalize(l),d=r+t.Util._capitalize(l);function f(){u.apply(this,arguments),t.Util.error('"'+l+'" method is deprecated and will be removed soon. Use ""'+s+'" instead.')}i.prototype[l]=f,i.prototype[c]=f,i.prototype[d]=f})},afterSetFilter(){this._filterUpToDate=!1}}}(Pm)),Pm}var v6;function ln(){if(v6)return Ns;v6=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.Node=void 0;const e=Fg(),t=r2(),n=xt(),o=St(),r=Jt(),i=Pt(),a="absoluteOpacity",l="allEventListeners",s="absoluteTransform",u="absoluteScale",c="canvas",d="Change",f="children",h="konva",p="listening",g="mouseenter",m="mouseleave",S="pointerenter",y="pointerleave",b="touchenter",x="touchleave",C="set",_="Shape",$=" ",P="stage",O="transform",T="Stage",I="visible",R=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join($);let F=1,H=class w1{constructor(E){this._id=F++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(E),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(E){(E===O||E===s)&&this._cache.get(E)?this._cache.get(E).dirty=!0:E?this._cache.delete(E):this._cache.clear()}_getCache(E,A){let D=this._cache.get(E);return(D===void 0||(E===O||E===s)&&D.dirty===!0)&&(D=A.call(this),this._cache.set(E,D)),D}_calculate(E,A,D){if(!this._attachedDepsListeners.get(E)){const k=A.map(L=>L+"Change.konva").join($);this.on(k,()=>{this._clearCache(E)}),this._attachedDepsListeners.set(E,!0)}return this._getCache(E,D)}_getCanvasCache(){return this._cache.get(c)}_clearSelfAndDescendantCache(E){this._clearCache(E),E===s&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(c)){const{scene:E,filter:A,hit:D,buffer:k}=this._cache.get(c);r.Util.releaseCanvas(E,A,D,k),this._cache.delete(c)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(E){const A=E||{};let D={};(A.x===void 0||A.y===void 0||A.width===void 0||A.height===void 0)&&(D=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let k=Math.ceil(A.width||D.width),L=Math.ceil(A.height||D.height),j=A.pixelRatio,V=A.x===void 0?Math.floor(D.x):A.x,Y=A.y===void 0?Math.floor(D.y):A.y,U=A.offset||0,G=A.drawBorder||!1,W=A.hitCanvasPixelRatio||1;if(!k||!L){r.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}const J=Math.abs(Math.round(D.x)-V)>.5?1:0,Q=Math.abs(Math.round(D.y)-Y)>.5?1:0;k+=U*2+J,L+=U*2+Q,V-=U,Y-=U;const q=new e.SceneCanvas({pixelRatio:j,width:k,height:L}),ee=new e.SceneCanvas({pixelRatio:j,width:0,height:0,willReadFrequently:!0}),K=new e.HitCanvas({pixelRatio:W,width:k,height:L}),Z=q.getContext(),te=K.getContext(),se=new e.SceneCanvas({width:q.width/q.pixelRatio+Math.abs(V),height:q.height/q.pixelRatio+Math.abs(Y),pixelRatio:q.pixelRatio}),ie=se.getContext();return K.isCache=!0,q.isCache=!0,this._cache.delete(c),this._filterUpToDate=!1,A.imageSmoothingEnabled===!1&&(q.getContext()._context.imageSmoothingEnabled=!1,ee.getContext()._context.imageSmoothingEnabled=!1),Z.save(),te.save(),ie.save(),Z.translate(-V,-Y),te.translate(-V,-Y),ie.translate(-V,-Y),se.x=V,se.y=Y,this._isUnderCache=!0,this._clearSelfAndDescendantCache(a),this._clearSelfAndDescendantCache(u),this.drawScene(q,this,se),this.drawHit(K,this),this._isUnderCache=!1,Z.restore(),te.restore(),G&&(Z.save(),Z.beginPath(),Z.rect(0,0,k,L),Z.closePath(),Z.setAttr("strokeStyle","red"),Z.setAttr("lineWidth",5),Z.stroke(),Z.restore()),this._cache.set(c,{scene:q,filter:ee,hit:K,buffer:se,x:V,y:Y}),this._requestDraw(),this}isCached(){return this._cache.has(c)}getClientRect(E){throw new Error('abstract "getClientRect" method call')}_transformedRect(E,A){const D=[{x:E.x,y:E.y},{x:E.x+E.width,y:E.y},{x:E.x+E.width,y:E.y+E.height},{x:E.x,y:E.y+E.height}];let k=1/0,L=1/0,j=-1/0,V=-1/0;const Y=this.getAbsoluteTransform(A);return D.forEach(function(U){const G=Y.point(U);k===void 0&&(k=j=G.x,L=V=G.y),k=Math.min(k,G.x),L=Math.min(L,G.y),j=Math.max(j,G.x),V=Math.max(V,G.y)}),{x:k,y:L,width:j-k,height:V-L}}_drawCachedSceneCanvas(E){E.save(),E._applyOpacity(this),E._applyGlobalCompositeOperation(this);const A=this._getCanvasCache();E.translate(A.x,A.y);const D=this._getCachedSceneCanvas(),k=D.pixelRatio;E.drawImage(D._canvas,0,0,D.width/k,D.height/k),E.restore()}_drawCachedHitCanvas(E){const A=this._getCanvasCache(),D=A.hit;E.save(),E.translate(A.x,A.y),E.drawImage(D._canvas,0,0,D.width/D.pixelRatio,D.height/D.pixelRatio),E.restore()}_getCachedSceneCanvas(){let E=this.filters(),A=this._getCanvasCache(),D=A.scene,k=A.filter,L=k.getContext(),j,V,Y,U;if(E){if(!this._filterUpToDate){const G=D.pixelRatio;k.setSize(D.width/D.pixelRatio,D.height/D.pixelRatio);try{for(j=E.length,L.clear(),L.drawImage(D._canvas,0,0,D.getWidth()/G,D.getHeight()/G),V=L.getImageData(0,0,k.getWidth(),k.getHeight()),Y=0;Y{let A,D;if(!E)return this;for(A in E)A!==f&&(D=C+r.Util._capitalize(A),r.Util._isFunction(this[D])?this[D](E[A]):this._setAttr(A,E[A]))}),this}isListening(){return this._getCache(p,this._isListening)}_isListening(E){if(!this.listening())return!1;const D=this.getParent();return D&&D!==E&&this!==E?D._isListening(E):!0}isVisible(){return this._getCache(I,this._isVisible)}_isVisible(E){if(!this.visible())return!1;const D=this.getParent();return D&&D!==E&&this!==E?D._isVisible(E):!0}shouldDrawHit(E,A=!1){if(E)return this._isVisible(E)&&this._isListening(E);const D=this.getLayer();let k=!1;t.DD._dragElements.forEach(j=>{j.dragStatus==="dragging"&&(j.node.nodeType==="Stage"||j.node.getLayer()===D)&&(k=!0)});const L=!A&&!o.Konva.hitOnDragEnabled&&(k||o.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!L}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let E=this.getDepth(),A=this,D=0,k,L,j,V;function Y(G){for(k=[],L=G.length,j=0;j0&&k[0].getDepth()<=E&&Y(k)}const U=this.getStage();return A.nodeType!==T&&U&&Y(U.getChildren()),D}getDepth(){let E=0,A=this.parent;for(;A;)E++,A=A.parent;return E}_batchTransformChanges(E){this._batchingTransformChange=!0,E(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(O),this._clearSelfAndDescendantCache(s)),this._needClearTransformCache=!1}setPosition(E){return this._batchTransformChanges(()=>{this.x(E.x),this.y(E.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){const E=this.getStage();if(!E)return null;const A=E.getPointerPosition();if(!A)return null;const D=this.getAbsoluteTransform().copy();return D.invert(),D.point(A)}getAbsolutePosition(E){let A=!1,D=this.parent;for(;D;){if(D.isCached()){A=!0;break}D=D.parent}A&&!E&&(E=!0);const k=this.getAbsoluteTransform(E).getMatrix(),L=new r.Transform,j=this.offset();return L.m=k.slice(),L.translate(j.x,j.y),L.getTranslation()}setAbsolutePosition(E){const{x:A,y:D,...k}=this._clearTransform();this.attrs.x=A,this.attrs.y=D,this._clearCache(O);const L=this._getAbsoluteTransform().copy();return L.invert(),L.translate(E.x,E.y),E={x:this.attrs.x+L.getTranslation().x,y:this.attrs.y+L.getTranslation().y},this._setTransform(k),this.setPosition({x:E.x,y:E.y}),this._clearCache(O),this._clearSelfAndDescendantCache(s),this}_setTransform(E){let A;for(A in E)this.attrs[A]=E[A]}_clearTransform(){const E={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,E}move(E){let A=E.x,D=E.y,k=this.x(),L=this.y();return A!==void 0&&(k+=A),D!==void 0&&(L+=D),this.setPosition({x:k,y:L}),this}_eachAncestorReverse(E,A){let D=[],k=this.getParent(),L,j;if(!(A&&A._id===this._id)){for(D.unshift(this);k&&(!A||k._id!==A._id);)D.unshift(k),k=k.parent;for(L=D.length,j=0;j0?(this.parent.children.splice(E,1),this.parent.children.splice(E-1,0,this),this.parent._setChildrenIndices(),!0):!1}moveToBottom(){if(!this.parent)return r.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;const E=this.index;return E>0?(this.parent.children.splice(E,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0):!1}setZIndex(E){if(!this.parent)return r.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(E<0||E>=this.parent.children.length)&&r.Util.warn("Unexpected value "+E+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");const A=this.index;return this.parent.children.splice(A,1),this.parent.children.splice(E,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(a,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let E=this.opacity();const A=this.getParent();return A&&!A._isUnderCache&&(E*=A.getAbsoluteOpacity()),E}moveTo(E){return this.getParent()!==E&&(this._remove(),E.add(this)),this}toObject(){let E=this.getAttrs(),A,D,k,L,j;const V={attrs:{},className:this.getClassName()};for(A in E)D=E[A],j=r.Util.isObject(D)&&!r.Util._isPlainObject(D)&&!r.Util._isArray(D),!j&&(k=typeof this[A]=="function"&&this[A],delete E[A],L=k?k.call(this):null,E[A]=D,L!==D&&(V.attrs[A]=D));return r.Util._prepareToStringify(V)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(E,A,D){const k=[];A&&this._isMatch(E)&&k.push(this);let L=this.parent;for(;L;){if(L===D)return k;L._isMatch(E)&&k.push(L),L=L.parent}return k}isAncestorOf(E){return!1}findAncestor(E,A,D){return this.findAncestors(E,A,D)[0]}_isMatch(E){if(!E)return!1;if(typeof E=="function")return E(this);let A=E.replace(/ /g,"").split(","),D=A.length,k,L;for(k=0;k{try{const k=E?.callback;k&&delete E.callback,r.Util._urlToImage(this.toDataURL(E),function(L){A(L),k?.(L)})}catch(k){D(k)}})}toBlob(E){return new Promise((A,D)=>{try{const k=E?.callback;k&&delete E.callback,this.toCanvas(E).toBlob(L=>{A(L),k?.(L)},E?.mimeType,E?.quality)}catch(k){D(k)}})}setSize(E){return this.width(E.width),this.height(E.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance!==void 0?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.Konva.dragDistance}_off(E,A,D){let k=this.eventListeners[E],L,j,V;for(L=0;L=0)||this.isDragging())return;let k=!1;t.DD._dragElements.forEach(L=>{this.isAncestorOf(L.node)&&(k=!0)}),k||this._createDragElement(E)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;const A=t.DD._dragElements.get(this._id),D=A&&A.dragStatus==="dragging",k=A&&A.dragStatus==="ready";D?this.stopDrag():k&&t.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(E={x:0,y:0}){const A=this.getStage();if(!A)return!1;const D={x:-E.x,y:-E.y,width:A.width()+2*E.x,height:A.height()+2*E.y};return r.Util.haveIntersection(D,this.getClientRect())}static create(E,A){return r.Util._isString(E)&&(E=JSON.parse(E)),this._createNode(E,A)}static _createNode(E,A){let D=w1.prototype.getClassName.call(E),k=E.children,L,j,V;A&&(E.attrs.container=A),o.Konva[D]||(r.Util.warn('Can not find a node with class name "'+D+'". Fallback to "Shape".'),D="Shape");const Y=o.Konva[D];if(L=new Y(E.attrs),k)for(j=k.length,V=0;V0}removeChildren(){return this.getChildren().forEach(i=>{i.parent=null,i.index=0,i.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(i=>{i.parent=null,i.index=0,i.destroy()}),this.children=[],this._requestDraw(),this}add(...i){if(i.length===0)return this;if(i.length>1){for(let l=0;l0?a[0]:void 0}_generalFind(i,a){const l=[];return this._descendants(s=>{const u=s._isMatch(i);return u&&l.push(s),!!(u&&a)}),l}_descendants(i){let a=!1;const l=this.getChildren();for(const s of l){if(a=i(s),a)return!0;if(s.hasChildren()&&(a=s._descendants(i),a))return!0}return!1}toObject(){const i=t.Node.prototype.toObject.call(this);return i.children=[],this.getChildren().forEach(a=>{i.children.push(a.toObject())}),i}isAncestorOf(i){let a=i.getParent();for(;a;){if(a._id===this._id)return!0;a=a.getParent()}return!1}clone(i){const a=t.Node.prototype.clone.call(this,i);return this.getChildren().forEach(function(l){a.add(l.clone())}),a}getAllIntersections(i){const a=[];return this.find("Shape").forEach(l=>{l.isVisible()&&l.intersects(i)&&a.push(l)}),a}_clearSelfAndDescendantCache(i){var a;super._clearSelfAndDescendantCache(i),!this.isCached()&&((a=this.children)===null||a===void 0||a.forEach(function(l){l._clearSelfAndDescendantCache(i)}))}_setChildrenIndices(){var i;(i=this.children)===null||i===void 0||i.forEach(function(a,l){a.index=l}),this._requestDraw()}drawScene(i,a,l){const s=this.getLayer(),u=i||s&&s.getCanvas(),c=u&&u.getContext(),d=this._getCanvasCache(),f=d&&d.scene,h=u&&u.isCache;if(!this.isVisible()&&!h)return this;if(f){c.save();const p=this.getAbsoluteTransform(a).getMatrix();c.transform(p[0],p[1],p[2],p[3],p[4],p[5]),this._drawCachedSceneCanvas(c),c.restore()}else this._drawChildren("drawScene",u,a,l);return this}drawHit(i,a){if(!this.shouldDrawHit(a))return this;const l=this.getLayer(),s=i||l&&l.hitCanvas,u=s&&s.getContext(),c=this._getCanvasCache();if(c&&c.hit){u.save();const f=this.getAbsoluteTransform(a).getMatrix();u.transform(f[0],f[1],f[2],f[3],f[4],f[5]),this._drawCachedHitCanvas(u),u.restore()}else this._drawChildren("drawHit",s,a);return this}_drawChildren(i,a,l,s){var u;const c=a&&a.getContext(),d=this.clipWidth(),f=this.clipHeight(),h=this.clipFunc(),p=typeof d=="number"&&typeof f=="number"||h,g=l===this;if(p){c.save();const S=this.getAbsoluteTransform(l);let y=S.getMatrix();c.transform(y[0],y[1],y[2],y[3],y[4],y[5]),c.beginPath();let b;if(h)b=h.call(this,c,this);else{const x=this.clipX(),C=this.clipY();c.rect(x||0,C||0,d,f)}c.clip.apply(c,b),y=S.copy().invert().getMatrix(),c.transform(y[0],y[1],y[2],y[3],y[4],y[5])}const m=!g&&this.globalCompositeOperation()!=="source-over"&&i==="drawScene";m&&(c.save(),c._applyGlobalCompositeOperation(this)),(u=this.children)===null||u===void 0||u.forEach(function(S){S[i](a,l,s)}),m&&c.restore(),p&&c.restore()}getClientRect(i={}){var a;const l=i.skipTransform,s=i.relativeTo;let u,c,d,f,h={x:1/0,y:1/0,width:0,height:0};const p=this;(a=this.children)===null||a===void 0||a.forEach(function(S){if(!S.visible())return;const y=S.getClientRect({relativeTo:p,skipShadow:i.skipShadow,skipStroke:i.skipStroke});y.width===0&&y.height===0||(u===void 0?(u=y.x,c=y.y,d=y.x+y.width,f=y.y+y.height):(u=Math.min(u,y.x),c=Math.min(c,y.y),d=Math.max(d,y.x+y.width),f=Math.max(f,y.y+y.height)))});const g=this.find("Shape");let m=!1;for(let S=0;SG.indexOf("pointer")>=0?"pointer":G.indexOf("touch")>=0?"touch":"mouse",j=G=>{const W=L(G);if(W==="pointer")return r.Konva.pointerEventsEnabled&&k.pointer;if(W==="touch")return k.touch;if(W==="mouse")return k.mouse};function V(G={}){return(G.clipFunc||G.clipWidth||G.clipHeight)&&t.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),G}const Y="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);";e.stages=[];class U extends o.Container{constructor(W){super(V(W)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{V(this.attrs)}),this._checkVisibility()}_validateAdd(W){const J=W.getType()==="Layer",Q=W.getType()==="FastLayer";J||Q||t.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;const W=this.visible()?"":"none";this.content.style.display=W}setContainer(W){if(typeof W===c){let J;if(W.charAt(0)==="."){const Q=W.slice(1);W=document.getElementsByClassName(Q)[0]}else W.charAt(0)!=="#"?J=W:J=W.slice(1),W=document.getElementById(J);if(!W)throw"Can not find container in document with id "+J}return this._setAttr("container",W),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),W.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){const W=this.children,J=W.length;for(let Q=0;Q-1&&e.stages.splice(J,1),t.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){const W=this._pointerPositions[0]||this._changedPointerPositions[0];return W?{x:W.x,y:W.y}:(t.Util.warn(Y),null)}_getPointerById(W){return this._pointerPositions.find(J=>J.id===W)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(W){W=W||{},W.x=W.x||0,W.y=W.y||0,W.width=W.width||this.width(),W.height=W.height||this.height();const J=new i.SceneCanvas({width:W.width,height:W.height,pixelRatio:W.pixelRatio||1}),Q=J.getContext()._context,q=this.children;return(W.x||W.y)&&Q.translate(-1*W.x,-1*W.y),q.forEach(function(ee){if(!ee.isVisible())return;const K=ee._toKonvaCanvas(W);Q.drawImage(K._canvas,W.x,W.y,K.getWidth()/K.getPixelRatio(),K.getHeight()/K.getPixelRatio())}),J}getIntersection(W){if(!W)return null;const J=this.children,Q=J.length,q=Q-1;for(let ee=q;ee>=0;ee--){const K=J[ee].getIntersection(W);if(K)return K}return null}_resizeDOM(){const W=this.width(),J=this.height();this.content&&(this.content.style.width=W+d,this.content.style.height=J+d),this.bufferCanvas.setSize(W,J),this.bufferHitCanvas.setSize(W,J),this.children.forEach(Q=>{Q.setSize({width:W,height:J}),Q.draw()})}add(W,...J){if(arguments.length>1){for(let q=0;qA&&t.Util.warn("The stage has "+Q+" 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."),W.setSize({width:this.width(),height:this.height()}),W.draw(),r.Konva.isBrowser&&this.content.appendChild(W.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(W){return s.hasPointerCapture(W,this)}setPointerCapture(W){s.setPointerCapture(W,this)}releaseCapture(W){s.releaseCapture(W,this)}getLayers(){return this.children}_bindContentEvents(){r.Konva.isBrowser&&D.forEach(([W,J])=>{this.content.addEventListener(W,Q=>{this[J](Q)},{passive:!1})})}_pointerenter(W){this.setPointersPositions(W);const J=j(W.type);J&&this._fire(J.pointerenter,{evt:W,target:this,currentTarget:this})}_pointerover(W){this.setPointersPositions(W);const J=j(W.type);J&&this._fire(J.pointerover,{evt:W,target:this,currentTarget:this})}_getTargetShape(W){let J=this[W+"targetShape"];return J&&!J.getStage()&&(J=null),J}_pointerleave(W){const J=j(W.type),Q=L(W.type);if(!J)return;this.setPointersPositions(W);const q=this._getTargetShape(Q),ee=!(r.Konva.isDragging()||r.Konva.isTransforming())||r.Konva.hitOnDragEnabled;q&&ee?(q._fireAndBubble(J.pointerout,{evt:W}),q._fireAndBubble(J.pointerleave,{evt:W}),this._fire(J.pointerleave,{evt:W,target:this,currentTarget:this}),this[Q+"targetShape"]=null):ee&&(this._fire(J.pointerleave,{evt:W,target:this,currentTarget:this}),this._fire(J.pointerout,{evt:W,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(W){const J=j(W.type),Q=L(W.type);if(!J)return;this.setPointersPositions(W);let q=!1;this._changedPointerPositions.forEach(ee=>{const K=this.getIntersection(ee);if(a.DD.justDragged=!1,r.Konva["_"+Q+"ListenClick"]=!0,!K||!K.isListening()){this[Q+"ClickStartShape"]=void 0;return}r.Konva.capturePointerEventsEnabled&&K.setPointerCapture(ee.id),this[Q+"ClickStartShape"]=K,K._fireAndBubble(J.pointerdown,{evt:W,pointerId:ee.id}),q=!0;const Z=W.type.indexOf("touch")>=0;K.preventDefault()&&W.cancelable&&Z&&W.preventDefault()}),q||this._fire(J.pointerdown,{evt:W,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(W){const J=j(W.type),Q=L(W.type);if(!J||(r.Konva.isDragging()&&a.DD.node.preventDefault()&&W.cancelable&&W.preventDefault(),this.setPointersPositions(W),!(!(r.Konva.isDragging()||r.Konva.isTransforming())||r.Konva.hitOnDragEnabled)))return;const ee={};let K=!1;const Z=this._getTargetShape(Q);this._changedPointerPositions.forEach(te=>{const se=s.getCapturedShape(te.id)||this.getIntersection(te),ie=te.id,ae={evt:W,pointerId:ie},le=Z!==se;if(le&&Z&&(Z._fireAndBubble(J.pointerout,{...ae},se),Z._fireAndBubble(J.pointerleave,{...ae},se)),se){if(ee[se._id])return;ee[se._id]=!0}se&&se.isListening()?(K=!0,le&&(se._fireAndBubble(J.pointerover,{...ae},Z),se._fireAndBubble(J.pointerenter,{...ae},Z),this[Q+"targetShape"]=se),se._fireAndBubble(J.pointermove,{...ae})):Z&&(this._fire(J.pointerover,{evt:W,target:this,currentTarget:this,pointerId:ie}),this[Q+"targetShape"]=null)}),K||this._fire(J.pointermove,{evt:W,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(W){const J=j(W.type),Q=L(W.type);if(!J)return;this.setPointersPositions(W);const q=this[Q+"ClickStartShape"],ee=this[Q+"ClickEndShape"],K={};let Z=!1;this._changedPointerPositions.forEach(te=>{const se=s.getCapturedShape(te.id)||this.getIntersection(te);if(se){if(se.releaseCapture(te.id),K[se._id])return;K[se._id]=!0}const ie=te.id,ae={evt:W,pointerId:ie};let le=!1;r.Konva["_"+Q+"InDblClickWindow"]?(le=!0,clearTimeout(this[Q+"DblTimeout"])):a.DD.justDragged||(r.Konva["_"+Q+"InDblClickWindow"]=!0,clearTimeout(this[Q+"DblTimeout"])),this[Q+"DblTimeout"]=setTimeout(function(){r.Konva["_"+Q+"InDblClickWindow"]=!1},r.Konva.dblClickWindow),se&&se.isListening()?(Z=!0,this[Q+"ClickEndShape"]=se,se._fireAndBubble(J.pointerup,{...ae}),r.Konva["_"+Q+"ListenClick"]&&q&&q===se&&(se._fireAndBubble(J.pointerclick,{...ae}),le&&ee&&ee===se&&se._fireAndBubble(J.pointerdblclick,{...ae}))):(this[Q+"ClickEndShape"]=null,r.Konva["_"+Q+"ListenClick"]&&this._fire(J.pointerclick,{evt:W,target:this,currentTarget:this,pointerId:ie}),le&&this._fire(J.pointerdblclick,{evt:W,target:this,currentTarget:this,pointerId:ie}))}),Z||this._fire(J.pointerup,{evt:W,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),r.Konva["_"+Q+"ListenClick"]=!1,W.cancelable&&Q!=="touch"&&Q!=="pointer"&&W.preventDefault()}_contextmenu(W){this.setPointersPositions(W);const J=this.getIntersection(this.getPointerPosition());J&&J.isListening()?J._fireAndBubble(R,{evt:W}):this._fire(R,{evt:W,target:this,currentTarget:this})}_wheel(W){this.setPointersPositions(W);const J=this.getIntersection(this.getPointerPosition());J&&J.isListening()?J._fireAndBubble(E,{evt:W}):this._fire(E,{evt:W,target:this,currentTarget:this})}_pointercancel(W){this.setPointersPositions(W);const J=s.getCapturedShape(W.pointerId)||this.getIntersection(this.getPointerPosition());J&&J._fireAndBubble(C,s.createEvent(W)),s.releaseCapture(W.pointerId)}_lostpointercapture(W){s.releaseCapture(W.pointerId)}setPointersPositions(W){const J=this._getContentPosition();let Q=null,q=null;W=W||window.event,W.touches!==void 0?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(W.touches,ee=>{this._pointerPositions.push({id:ee.identifier,x:(ee.clientX-J.left)/J.scaleX,y:(ee.clientY-J.top)/J.scaleY})}),Array.prototype.forEach.call(W.changedTouches||W.touches,ee=>{this._changedPointerPositions.push({id:ee.identifier,x:(ee.clientX-J.left)/J.scaleX,y:(ee.clientY-J.top)/J.scaleY})})):(Q=(W.clientX-J.left)/J.scaleX,q=(W.clientY-J.top)/J.scaleY,this.pointerPos={x:Q,y:q},this._pointerPositions=[{x:Q,y:q,id:t.Util._getFirstPointerId(W)}],this._changedPointerPositions=[{x:Q,y:q,id:t.Util._getFirstPointerId(W)}])}_setPointerPosition(W){t.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(W)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};const W=this.content.getBoundingClientRect();return{top:W.top,left:W.left,scaleX:W.width/this.content.clientWidth||1,scaleY:W.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new i.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new i.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!r.Konva.isBrowser)return;const W=this.container();if(!W)throw"Stage has no container. A container is required.";W.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"),W.appendChild(this.content),this._resizeDOM()}cache(){return t.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(W){W.batchDraw()}),this}}e.Stage=U,U.prototype.nodeType=u,(0,l._registerNode)(U),n.Factory.addGetterSetter(U,"container"),r.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>{e.stages.forEach(G=>{G.batchDraw()})})}(Om)),Om}var ks={},Tm={},S6;function _n(){return S6||(S6=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;const t=St(),n=Jt(),o=xt(),r=ln(),i=Pt(),a=St(),l=bE(),s="hasShadow",u="shadowRGBA",c="patternImage",d="linearGradient",f="radialGradient";let h;function p(){return h||(h=n.Util.createCanvasElement().getContext("2d"),h)}e.shapes={};function g(O){const T=this.attrs.fillRule;T?O.fill(T):O.fill()}function m(O){O.stroke()}function S(O){const T=this.attrs.fillRule;T?O.fill(T):O.fill()}function y(O){O.stroke()}function b(){this._clearCache(s)}function x(){this._clearCache(u)}function C(){this._clearCache(c)}function _(){this._clearCache(d)}function $(){this._clearCache(f)}class P extends r.Node{constructor(T){super(T);let I;for(;I=n.Util.getRandomColor(),!(I&&!(I in e.shapes)););this.colorKey=I,e.shapes[I]=this}getContext(){return n.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return n.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(s,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(c,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){const I=p().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(I&&I.setTransform){const R=new n.Transform;R.translate(this.fillPatternX(),this.fillPatternY()),R.rotate(t.Konva.getAngle(this.fillPatternRotation())),R.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),R.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());const F=R.getMatrix(),H=typeof DOMMatrix>"u"?{a:F[0],b:F[1],c:F[2],d:F[3],e:F[4],f:F[5]}:new DOMMatrix(F);I.setTransform(H)}return I}}_getLinearGradient(){return this._getCache(d,this.__getLinearGradient)}__getLinearGradient(){const T=this.fillLinearGradientColorStops();if(T){const I=p(),R=this.fillLinearGradientStartPoint(),F=this.fillLinearGradientEndPoint(),H=I.createLinearGradient(R.x,R.y,F.x,F.y);for(let M=0;Mthis.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 T==="auto"?this.hasStroke():this.strokeEnabled()&&!!T}intersects(T){const I=this.getStage();if(!I)return!1;const R=I.bufferHitCanvas;return R.getContext().clear(),this.drawHit(R,void 0,!0),R.context.getImageData(Math.round(T.x),Math.round(T.y),1,1).data[3]>0}destroy(){return r.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(T){var I;if(!((I=this.attrs.perfectDrawEnabled)!==null&&I!==void 0?I:!0))return!1;const F=T||this.hasFill(),H=this.hasStroke(),M=this.getAbsoluteOpacity()!==1;if(F&&H&&M)return!0;const B=this.hasShadow(),E=this.shadowForStrokeEnabled();return!!(F&&H&&B&&E)}setStrokeHitEnabled(T){n.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),T?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){const T=this.size();return{x:this._centroid?-T.width/2:0,y:this._centroid?-T.height/2:0,width:T.width,height:T.height}}getClientRect(T={}){let I=!1,R=this.getParent();for(;R;){if(R.isCached()){I=!0;break}R=R.getParent()}const F=T.skipTransform,H=T.relativeTo||I&&this.getStage()||void 0,M=this.getSelfRect(),E=!T.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,A=M.width+E,D=M.height+E,k=!T.skipShadow&&this.hasShadow(),L=k?this.shadowOffsetX():0,j=k?this.shadowOffsetY():0,V=A+Math.abs(L),Y=D+Math.abs(j),U=k&&this.shadowBlur()||0,G=V+U*2,W=Y+U*2,J={width:G,height:W,x:-(E/2+U)+Math.min(L,0)+M.x,y:-(E/2+U)+Math.min(j,0)+M.y};return F?J:this._transformedRect(J,H)}drawScene(T,I,R){const F=this.getLayer(),H=T||F.getCanvas(),M=H.getContext(),B=this._getCanvasCache(),E=this.getSceneFunc(),A=this.hasShadow();let D;const k=I===this;if(!this.isVisible()&&!k)return this;if(B){M.save();const L=this.getAbsoluteTransform(I).getMatrix();return M.transform(L[0],L[1],L[2],L[3],L[4],L[5]),this._drawCachedSceneCanvas(M),M.restore(),this}if(!E)return this;if(M.save(),this._useBufferCanvas()){D=this.getStage();const L=R||D.bufferCanvas,j=L.getContext();j.clear(),j.save(),j._applyLineJoin(this);const V=this.getAbsoluteTransform(I).getMatrix();j.transform(V[0],V[1],V[2],V[3],V[4],V[5]),E.call(this,j,this),j.restore();const Y=L.pixelRatio;A&&M._applyShadow(this),M._applyOpacity(this),M._applyGlobalCompositeOperation(this),M.drawImage(L._canvas,L.x||0,L.y||0,L.width/Y,L.height/Y)}else{if(M._applyLineJoin(this),!k){const L=this.getAbsoluteTransform(I).getMatrix();M.transform(L[0],L[1],L[2],L[3],L[4],L[5]),M._applyOpacity(this),M._applyGlobalCompositeOperation(this)}A&&M._applyShadow(this),E.call(this,M,this)}return M.restore(),this}drawHit(T,I,R=!1){if(!this.shouldDrawHit(I,R))return this;const F=this.getLayer(),H=T||F.hitCanvas,M=H&&H.getContext(),B=this.hitFunc()||this.sceneFunc(),E=this._getCanvasCache(),A=E&&E.hit;if(this.colorKey||n.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),A){M.save();const k=this.getAbsoluteTransform(I).getMatrix();return M.transform(k[0],k[1],k[2],k[3],k[4],k[5]),this._drawCachedHitCanvas(M),M.restore(),this}if(!B)return this;if(M.save(),M._applyLineJoin(this),!(this===I)){const k=this.getAbsoluteTransform(I).getMatrix();M.transform(k[0],k[1],k[2],k[3],k[4],k[5])}return B.call(this,M,this),M.restore(),this}drawHitFromCache(T=0){const I=this._getCanvasCache(),R=this._getCachedSceneCanvas(),F=I.hit,H=F.getContext(),M=F.getWidth(),B=F.getHeight();H.clear(),H.drawImage(R._canvas,0,0,M,B);try{const E=H.getImageData(0,0,M,B),A=E.data,D=A.length,k=n.Util._hexToRgb(this.colorKey);for(let L=0;LT?(A[L]=k.r,A[L+1]=k.g,A[L+2]=k.b,A[L+3]=255):A[L+3]=0;H.putImageData(E,0,0)}catch(E){n.Util.error("Unable to draw hit graph from cached scene canvas. "+E.message)}return this}hasPointerCapture(T){return l.hasPointerCapture(T,this)}setPointerCapture(T){l.setPointerCapture(T,this)}releaseCapture(T){l.releaseCapture(T,this)}}e.Shape=P,P.prototype._fillFunc=g,P.prototype._strokeFunc=m,P.prototype._fillFuncHit=S,P.prototype._strokeFuncHit=y,P.prototype._centroid=!1,P.prototype.nodeType="Shape",(0,a._registerNode)(P),P.prototype.eventListeners={},P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",b),P.prototype.on.call(P.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",x),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",C),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",_),P.prototype.on.call(P.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",$),o.Factory.addGetterSetter(P,"stroke",void 0,(0,i.getStringOrGradientValidator)()),o.Factory.addGetterSetter(P,"strokeWidth",2,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillAfterStrokeEnabled",!1),o.Factory.addGetterSetter(P,"hitStrokeWidth","auto",(0,i.getNumberOrAutoValidator)()),o.Factory.addGetterSetter(P,"strokeHitEnabled",!0,(0,i.getBooleanValidator)()),o.Factory.addGetterSetter(P,"perfectDrawEnabled",!0,(0,i.getBooleanValidator)()),o.Factory.addGetterSetter(P,"shadowForStrokeEnabled",!0,(0,i.getBooleanValidator)()),o.Factory.addGetterSetter(P,"lineJoin"),o.Factory.addGetterSetter(P,"lineCap"),o.Factory.addGetterSetter(P,"sceneFunc"),o.Factory.addGetterSetter(P,"hitFunc"),o.Factory.addGetterSetter(P,"dash"),o.Factory.addGetterSetter(P,"dashOffset",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"shadowColor",void 0,(0,i.getStringValidator)()),o.Factory.addGetterSetter(P,"shadowBlur",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"shadowOpacity",1,(0,i.getNumberValidator)()),o.Factory.addComponentsGetterSetter(P,"shadowOffset",["x","y"]),o.Factory.addGetterSetter(P,"shadowOffsetX",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"shadowOffsetY",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillPatternImage"),o.Factory.addGetterSetter(P,"fill",void 0,(0,i.getStringOrGradientValidator)()),o.Factory.addGetterSetter(P,"fillPatternX",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillPatternY",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillLinearGradientColorStops"),o.Factory.addGetterSetter(P,"strokeLinearGradientColorStops"),o.Factory.addGetterSetter(P,"fillRadialGradientStartRadius",0),o.Factory.addGetterSetter(P,"fillRadialGradientEndRadius",0),o.Factory.addGetterSetter(P,"fillRadialGradientColorStops"),o.Factory.addGetterSetter(P,"fillPatternRepeat","repeat"),o.Factory.addGetterSetter(P,"fillEnabled",!0),o.Factory.addGetterSetter(P,"strokeEnabled",!0),o.Factory.addGetterSetter(P,"shadowEnabled",!0),o.Factory.addGetterSetter(P,"dashEnabled",!0),o.Factory.addGetterSetter(P,"strokeScaleEnabled",!0),o.Factory.addGetterSetter(P,"fillPriority","color"),o.Factory.addComponentsGetterSetter(P,"fillPatternOffset",["x","y"]),o.Factory.addGetterSetter(P,"fillPatternOffsetX",0,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillPatternOffsetY",0,(0,i.getNumberValidator)()),o.Factory.addComponentsGetterSetter(P,"fillPatternScale",["x","y"]),o.Factory.addGetterSetter(P,"fillPatternScaleX",1,(0,i.getNumberValidator)()),o.Factory.addGetterSetter(P,"fillPatternScaleY",1,(0,i.getNumberValidator)()),o.Factory.addComponentsGetterSetter(P,"fillLinearGradientStartPoint",["x","y"]),o.Factory.addComponentsGetterSetter(P,"strokeLinearGradientStartPoint",["x","y"]),o.Factory.addGetterSetter(P,"fillLinearGradientStartPointX",0),o.Factory.addGetterSetter(P,"strokeLinearGradientStartPointX",0),o.Factory.addGetterSetter(P,"fillLinearGradientStartPointY",0),o.Factory.addGetterSetter(P,"strokeLinearGradientStartPointY",0),o.Factory.addComponentsGetterSetter(P,"fillLinearGradientEndPoint",["x","y"]),o.Factory.addComponentsGetterSetter(P,"strokeLinearGradientEndPoint",["x","y"]),o.Factory.addGetterSetter(P,"fillLinearGradientEndPointX",0),o.Factory.addGetterSetter(P,"strokeLinearGradientEndPointX",0),o.Factory.addGetterSetter(P,"fillLinearGradientEndPointY",0),o.Factory.addGetterSetter(P,"strokeLinearGradientEndPointY",0),o.Factory.addComponentsGetterSetter(P,"fillRadialGradientStartPoint",["x","y"]),o.Factory.addGetterSetter(P,"fillRadialGradientStartPointX",0),o.Factory.addGetterSetter(P,"fillRadialGradientStartPointY",0),o.Factory.addComponentsGetterSetter(P,"fillRadialGradientEndPoint",["x","y"]),o.Factory.addGetterSetter(P,"fillRadialGradientEndPointX",0),o.Factory.addGetterSetter(P,"fillRadialGradientEndPointY",0),o.Factory.addGetterSetter(P,"fillPatternRotation",0),o.Factory.addGetterSetter(P,"fillRule",void 0,(0,i.getStringValidator)()),o.Factory.backCompat(P,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})}(Tm)),Tm}var C6;function yE(){if(C6)return ks;C6=1,Object.defineProperty(ks,"__esModule",{value:!0}),ks.Layer=void 0;const e=Jt(),t=kg(),n=ln(),o=xt(),r=Fg(),i=Pt(),a=_n(),l=St(),s="#",u="beforeDraw",c="draw",d=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],f=d.length;let h=class extends t.Container{constructor(g){super(g),this.canvas=new r.SceneCanvas,this.hitCanvas=new r.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(g){return this.getContext().clear(g),this.getHitCanvas().getContext().clear(g),this}setZIndex(g){super.setZIndex(g);const m=this.getStage();return m&&m.content&&(m.content.removeChild(this.getNativeCanvasElement()),g{this.draw(),this._waitingForDraw=!1})),this}getIntersection(g){if(!this.isListening()||!this.isVisible())return null;let m=1,S=!1;for(;;){for(let y=0;y0)return{antialiased:!0};return{}}drawScene(g,m,S){const y=this.getLayer(),b=g||y&&y.getCanvas();return this._fire(u,{node:this}),this.clearBeforeDraw()&&b.getContext().clear(),t.Container.prototype.drawScene.call(this,b,m,S),this._fire(c,{node:this}),this}drawHit(g,m){const S=this.getLayer(),y=g||S&&S.hitCanvas;return S&&S.clearBeforeDraw()&&S.getHitCanvas().getContext().clear(),t.Container.prototype.drawHit.call(this,y,m),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(g){e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(g)}getHitGraphEnabled(g){return e.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;const g=this.parent;!!this.hitCanvas._canvas.parentNode?g.content.removeChild(this.hitCanvas._canvas):g.content.appendChild(this.hitCanvas._canvas)}destroy(){return e.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};return ks.Layer=h,h.prototype.nodeType="Layer",(0,l._registerNode)(h),o.Factory.addGetterSetter(h,"imageSmoothingEnabled",!0),o.Factory.addGetterSetter(h,"clearBeforeDraw",!0),o.Factory.addGetterSetter(h,"hitGraphEnabled",!0,(0,i.getBooleanValidator)()),ks}var Bs={},x6;function Jge(){if(x6)return Bs;x6=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.FastLayer=void 0;const e=Jt(),t=yE(),n=St();let o=class extends t.Layer{constructor(i){super(i),this.listening(!1),e.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}};return Bs.FastLayer=o,o.prototype.nodeType="FastLayer",(0,n._registerNode)(o),Bs}var Ls={},w6;function i2(){if(w6)return Ls;w6=1,Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.Group=void 0;const e=Jt(),t=kg(),n=St();let o=class extends t.Container{_validateAdd(i){const a=i.getType();a!=="Group"&&a!=="Shape"&&e.Util.throw("You may only add groups and shapes to groups.")}};return Ls.Group=o,o.prototype.nodeType="Group",(0,n._registerNode)(o),Ls}var Hs={},$6;function a2(){if($6)return Hs;$6=1,Object.defineProperty(Hs,"__esModule",{value:!0}),Hs.Animation=void 0;const e=St(),t=Jt(),n=function(){return e.glob.performance&&e.glob.performance.now?function(){return e.glob.performance.now()}:function(){return new Date().getTime()}}();let o=class yl{constructor(i,a){this.id=yl.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:n(),frameRate:0},this.func=i,this.setLayers(a)}setLayers(i){let a=[];return i&&(a=Array.isArray(i)?i:[i]),this.layers=a,this}getLayers(){return this.layers}addLayer(i){const a=this.layers,l=a.length;for(let s=0;sthis.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():p<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=p,this.update())}getTime(){return this._time}setPosition(p){this.prevPos=this._pos,this.propFunc(p),this._pos=p}getPosition(p){return p===void 0&&(p=this._time),this.func(p,this.begin,this._change,this.duration)}play(){this.state=l,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=s,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(p){this.pause(),this._time=p,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){const p=this.getTimer()-this._startTime;this.state===l?this.setTime(p):this.state===s&&this.setTime(this.duration-p)}pause(){this.state=a,this.fire("onPause")}getTimer(){return new Date().getTime()}}class f{constructor(p){const g=this,m=p.node,S=m._id,y=p.easing||e.Easings.Linear,b=!!p.yoyo;let x,C;typeof p.duration>"u"?x=.3:p.duration===0?x=.001:x=p.duration,this.node=m,this._id=c++;const _=m.getLayer()||(m instanceof r.Konva.Stage?m.getLayers():null);_||t.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new n.Animation(function(){g.tween.onEnterFrame()},_),this.tween=new d(C,function($){g._tweenFunc($)},y,0,1,x*1e3,b),this._addListeners(),f.attrs[S]||(f.attrs[S]={}),f.attrs[S][this._id]||(f.attrs[S][this._id]={}),f.tweens[S]||(f.tweens[S]={});for(C in p)i[C]===void 0&&this._addAttr(C,p[C]);this.reset(),this.onFinish=p.onFinish,this.onReset=p.onReset,this.onUpdate=p.onUpdate}_addAttr(p,g){const m=this.node,S=m._id;let y,b,x,C,_;const $=f.tweens[S][p];$&&delete f.attrs[S][$][p];let P=m.getAttr(p);if(t.Util._isArray(g))if(y=[],b=Math.max(g.length,P.length),p==="points"&&g.length!==P.length&&(g.length>P.length?(C=P,P=t.Util._prepareArrayForTween(P,g,m.closed())):(x=g,g=t.Util._prepareArrayForTween(g,P,m.closed()))),p.indexOf("fill")===0)for(let O=0;O{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{const p=this.node,g=f.attrs[p._id][this._id];g.points&&g.points.trueEnd&&p.setAttr("points",g.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{const p=this.node,g=f.attrs[p._id][this._id];g.points&&g.points.trueStart&&p.points(g.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(p){return this.tween.seek(p*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){const p=this.node._id,g=this._id,m=f.tweens[p];this.pause(),this.anim&&this.anim.stop();for(const S in m)delete f.tweens[p][S];delete f.attrs[p][g],f.tweens[p]&&(Object.keys(f.tweens[p]).length===0&&delete f.tweens[p],Object.keys(f.attrs[p]).length===0&&delete f.attrs[p])}}e.Tween=f,f.attrs={},f.tweens={},o.Node.prototype.to=function(h){const p=h.onFinish;h.node=this,h.onFinish=function(){this.destroy(),p&&p()},new f(h).play()},e.Easings={BackEaseIn(h,p,g,m){return g*(h/=m)*h*((1.70158+1)*h-1.70158)+p},BackEaseOut(h,p,g,m){return g*((h=h/m-1)*h*((1.70158+1)*h+1.70158)+1)+p},BackEaseInOut(h,p,g,m){let S=1.70158;return(h/=m/2)<1?g/2*(h*h*(((S*=1.525)+1)*h-S))+p:g/2*((h-=2)*h*(((S*=1.525)+1)*h+S)+2)+p},ElasticEaseIn(h,p,g,m,S,y){let b=0;return h===0?p:(h/=m)===1?p+g:(y||(y=m*.3),!S||S0?l:s),m=f*s,S=h*(h>0?l:s),y=p*(p>0?s:l);return{x:g,y:u?-1*y:S,width:m-g,height:y-S}}};return zs.Arc=i,i.prototype._centroid=!0,i.prototype.className="Arc",i.prototype._attrsAffectingSize=["innerRadius","outerRadius","angle","clockwise"],(0,r._registerNode)(i),e.Factory.addGetterSetter(i,"innerRadius",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(i,"outerRadius",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(i,"angle",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(i,"clockwise",!1,(0,o.getBooleanValidator)()),zs}var js={},Vs={},T6;function SE(){if(T6)return Vs;T6=1,Object.defineProperty(Vs,"__esModule",{value:!0}),Vs.Line=void 0;const e=xt(),t=St(),n=_n(),o=Pt();function r(l,s,u,c,d,f,h){const p=Math.sqrt(Math.pow(u-l,2)+Math.pow(c-s,2)),g=Math.sqrt(Math.pow(d-u,2)+Math.pow(f-c,2)),m=h*p/(p+g),S=h*g/(p+g),y=u-m*(d-l),b=c-m*(f-s),x=u+S*(d-l),C=c+S*(f-s);return[y,b,x,C]}function i(l,s){const u=l.length,c=[];for(let d=2;d4){const g=this.getTensionPoints(),m=g.length;for(p=f?0:4,f||s.quadraticCurveTo(g[0],g[1],g[2],g[3]);p{let u,c;const f=s/2;u=0;for(let h=0;h<20;h++)c=f*e.tValues[20][h]+f,u+=e.cValues[20][h]*o(a,l,c);return f*u};e.getCubicArcLength=t;const n=(a,l,s)=>{s===void 0&&(s=1);const u=a[0]-2*a[1]+a[2],c=l[0]-2*l[1]+l[2],d=2*a[1]-2*a[0],f=2*l[1]-2*l[0],h=4*(u*u+c*c),p=4*(u*d+c*f),g=d*d+f*f;if(h===0)return s*Math.sqrt(Math.pow(a[2]-a[0],2)+Math.pow(l[2]-l[0],2));const m=p/(2*h),S=g/h,y=s+m,b=S-m*m,x=y*y+b>0?Math.sqrt(y*y+b):0,C=m*m+b>0?Math.sqrt(m*m+b):0,_=m+Math.sqrt(m*m+b)!==0?b*Math.log(Math.abs((y+x)/(m+C))):0;return Math.sqrt(h)/2*(y*x-m*C+_)};e.getQuadraticArcLength=n;function o(a,l,s){const u=r(1,s,a),c=r(1,s,l),d=u*u+c*c;return Math.sqrt(d)}const r=(a,l,s)=>{const u=s.length-1;let c,d;if(u===0)return 0;if(a===0){d=0;for(let f=0;f<=u;f++)d+=e.binomialCoefficients[u][f]*Math.pow(1-l,u-f)*Math.pow(l,f)*s[f];return d}else{c=new Array(u);for(let f=0;f{let u=1,c=a/l,d=(a-s(c))/l,f=0;for(;u>.001;){const h=s(c+d),p=Math.abs(a-h)/l;if(p500)break}return c};e.t2length=i}(Em)),Em}var E6;function l2(){if(E6)return Ws;E6=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.Path=void 0;const e=xt(),t=St(),n=_n(),o=nve();let r=class so extends n.Shape{constructor(a){super(a),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=so.parsePathData(this.data()),this.pathLength=so.getPathLength(this.dataArray)}_sceneFunc(a){const l=this.dataArray;a.beginPath();let s=!1;for(let u=0;ug?p:g,C=p>g?1:p/g,_=p>g?g/p:1;a.translate(f,h),a.rotate(y),a.scale(C,_),a.arc(0,0,x,m,m+S,1-b),a.scale(1/C,1/_),a.rotate(-y),a.translate(-f,-h);break;case"z":s=!0,a.closePath();break}}!s&&!this.hasFill()?a.strokeShape(this):a.fillStrokeShape(this)}getSelfRect(){let a=[];this.dataArray.forEach(function(h){if(h.command==="A"){const p=h.points[4],g=h.points[5],m=h.points[4]+g;let S=Math.PI/180;if(Math.abs(p-m)m;y-=S){const b=so.getPointOnEllipticalArc(h.points[0],h.points[1],h.points[2],h.points[3],y,0);a.push(b.x,b.y)}else for(let y=p+S;yl[u].pathLength;)a-=l[u].pathLength,++u;if(u===c)return s=l[u-1].points.slice(-2),{x:s[0],y:s[1]};if(a<.01)return l[u].command==="M"?(s=l[u].points.slice(0,2),{x:s[0],y:s[1]}):{x:l[u].start.x,y:l[u].start.y};const d=l[u],f=d.points;switch(d.command){case"L":return so.getPointOnLine(a,d.start.x,d.start.y,f[0],f[1]);case"C":return so.getPointOnCubicBezier((0,o.t2length)(a,so.getPathLength(l),x=>(0,o.getCubicArcLength)([d.start.x,f[0],f[2],f[4]],[d.start.y,f[1],f[3],f[5]],x)),d.start.x,d.start.y,f[0],f[1],f[2],f[3],f[4],f[5]);case"Q":return so.getPointOnQuadraticBezier((0,o.t2length)(a,so.getPathLength(l),x=>(0,o.getQuadraticArcLength)([d.start.x,f[0],f[2]],[d.start.y,f[1],f[3]],x)),d.start.x,d.start.y,f[0],f[1],f[2],f[3]);case"A":const h=f[0],p=f[1],g=f[2],m=f[3],S=f[5],y=f[6];let b=f[4];return b+=S*a/d.pathLength,so.getPointOnEllipticalArc(h,p,g,m,b,y)}return null}static getPointOnLine(a,l,s,u,c,d,f){d=d??l,f=f??s;const h=this.getLineLength(l,s,u,c);if(h<1e-10)return{x:l,y:s};if(u===l)return{x:d,y:f+(c>s?a:-a)};const p=(c-s)/(u-l),g=Math.sqrt(a*a/(1+p*p))*(u0&&!isNaN(b[0]);){let x="",C=[];const _=f,$=h;let P,O,T,I,R,F,H,M,B,E;switch(y){case"l":f+=b.shift(),h+=b.shift(),x="L",C.push(f,h);break;case"L":f=b.shift(),h=b.shift(),C.push(f,h);break;case"m":const A=b.shift(),D=b.shift();if(f+=A,h+=D,x="M",c.length>2&&c[c.length-1].command==="z"){for(let k=c.length-2;k>=0;k--)if(c[k].command==="M"){f=c[k].points[0]+A,h=c[k].points[1]+D;break}}C.push(f,h),y="l";break;case"M":f=b.shift(),h=b.shift(),x="M",C.push(f,h),y="L";break;case"h":f+=b.shift(),x="L",C.push(f,h);break;case"H":f=b.shift(),x="L",C.push(f,h);break;case"v":h+=b.shift(),x="L",C.push(f,h);break;case"V":h=b.shift(),x="L",C.push(f,h);break;case"C":C.push(b.shift(),b.shift(),b.shift(),b.shift()),f=b.shift(),h=b.shift(),C.push(f,h);break;case"c":C.push(f+b.shift(),h+b.shift(),f+b.shift(),h+b.shift()),f+=b.shift(),h+=b.shift(),x="C",C.push(f,h);break;case"S":O=f,T=h,P=c[c.length-1],P.command==="C"&&(O=f+(f-P.points[2]),T=h+(h-P.points[3])),C.push(O,T,b.shift(),b.shift()),f=b.shift(),h=b.shift(),x="C",C.push(f,h);break;case"s":O=f,T=h,P=c[c.length-1],P.command==="C"&&(O=f+(f-P.points[2]),T=h+(h-P.points[3])),C.push(O,T,f+b.shift(),h+b.shift()),f+=b.shift(),h+=b.shift(),x="C",C.push(f,h);break;case"Q":C.push(b.shift(),b.shift()),f=b.shift(),h=b.shift(),C.push(f,h);break;case"q":C.push(f+b.shift(),h+b.shift()),f+=b.shift(),h+=b.shift(),x="Q",C.push(f,h);break;case"T":O=f,T=h,P=c[c.length-1],P.command==="Q"&&(O=f+(f-P.points[0]),T=h+(h-P.points[1])),f=b.shift(),h=b.shift(),x="Q",C.push(O,T,f,h);break;case"t":O=f,T=h,P=c[c.length-1],P.command==="Q"&&(O=f+(f-P.points[0]),T=h+(h-P.points[1])),f+=b.shift(),h+=b.shift(),x="Q",C.push(O,T,f,h);break;case"A":I=b.shift(),R=b.shift(),F=b.shift(),H=b.shift(),M=b.shift(),B=f,E=h,f=b.shift(),h=b.shift(),x="A",C=this.convertEndpointToCenterParameterization(B,E,f,h,H,M,I,R,F);break;case"a":I=b.shift(),R=b.shift(),F=b.shift(),H=b.shift(),M=b.shift(),B=f,E=h,f+=b.shift(),h+=b.shift(),x="A",C=this.convertEndpointToCenterParameterization(B,E,f,h,H,M,I,R,F);break}c.push({command:x||y,points:C,start:{x:_,y:$},pathLength:this.calcLength(_,$,x||y,C)})}(y==="z"||y==="Z")&&c.push({command:"z",points:[],start:void 0,pathLength:0})}return c}static calcLength(a,l,s,u){let c,d,f,h;const p=so;switch(s){case"L":return p.getLineLength(a,l,u[0],u[1]);case"C":return(0,o.getCubicArcLength)([a,u[0],u[2],u[4]],[l,u[1],u[3],u[5]],1);case"Q":return(0,o.getQuadraticArcLength)([a,u[0],u[2]],[l,u[1],u[3]],1);case"A":c=0;const g=u[4],m=u[5],S=u[4]+m;let y=Math.PI/180;if(Math.abs(g-S)S;h-=y)f=p.getPointOnEllipticalArc(u[0],u[1],u[2],u[3],h,0),c+=p.getLineLength(d.x,d.y,f.x,f.y),d=f;else for(h=g+y;h1&&(f*=Math.sqrt(y),h*=Math.sqrt(y));let b=Math.sqrt((f*f*(h*h)-f*f*(S*S)-h*h*(m*m))/(f*f*(S*S)+h*h*(m*m)));c===d&&(b*=-1),isNaN(b)&&(b=0);const x=b*f*S/h,C=b*-h*m/f,_=(a+s)/2+Math.cos(g)*x-Math.sin(g)*C,$=(l+u)/2+Math.sin(g)*x+Math.cos(g)*C,P=function(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])},O=function(M,B){return(M[0]*B[0]+M[1]*B[1])/(P(M)*P(B))},T=function(M,B){return(M[0]*B[1]=1&&(H=0),d===0&&H>0&&(H=H-2*Math.PI),d===1&&H<0&&(H=H+2*Math.PI),[_,$,f,h,I,H,g,d]}};return Ws.Path=r,r.prototype.className="Path",r.prototype._attrsAffectingSize=["data"],(0,t._registerNode)(r),e.Factory.addGetterSetter(r,"data"),Ws}var M6;function ove(){if(M6)return js;M6=1,Object.defineProperty(js,"__esModule",{value:!0}),js.Arrow=void 0;const e=xt(),t=SE(),n=Pt(),o=St(),r=l2();let i=class extends t.Line{_sceneFunc(l){super._sceneFunc(l);const s=Math.PI*2,u=this.points();let c=u;const d=this.tension()!==0&&u.length>4;d&&(c=this.getTensionPoints());const f=this.pointerLength(),h=u.length;let p,g;if(d){const y=[c[c.length-4],c[c.length-3],c[c.length-2],c[c.length-1],u[h-2],u[h-1]],b=r.Path.calcLength(c[c.length-4],c[c.length-3],"C",y),x=r.Path.getPointOnQuadraticBezier(Math.min(1,1-f/b),y[0],y[1],y[2],y[3],y[4],y[5]);p=u[h-2]-x.x,g=u[h-1]-x.y}else p=u[h-2]-u[h-4],g=u[h-1]-u[h-3];const m=(Math.atan2(g,p)+s)%s,S=this.pointerWidth();this.pointerAtEnding()&&(l.save(),l.beginPath(),l.translate(u[h-2],u[h-1]),l.rotate(m),l.moveTo(0,0),l.lineTo(-f,S/2),l.lineTo(-f,-S/2),l.closePath(),l.restore(),this.__fillStroke(l)),this.pointerAtBeginning()&&(l.save(),l.beginPath(),l.translate(u[0],u[1]),d?(p=(c[0]+c[2])/2-u[0],g=(c[1]+c[3])/2-u[1]):(p=u[2]-u[0],g=u[3]-u[1]),l.rotate((Math.atan2(-g,-p)+s)%s),l.moveTo(0,0),l.lineTo(-f,S/2),l.lineTo(-f,-S/2),l.closePath(),l.restore(),this.__fillStroke(l))}__fillStroke(l){const s=this.dashEnabled();s&&(this.attrs.dashEnabled=!1,l.setLineDash([])),l.fillStrokeShape(this),s&&(this.attrs.dashEnabled=!0)}getSelfRect(){const l=super.getSelfRect(),s=this.pointerWidth()/2;return{x:l.x,y:l.y-s,width:l.width,height:l.height+s*2}}};return js.Arrow=i,i.prototype.className="Arrow",(0,o._registerNode)(i),e.Factory.addGetterSetter(i,"pointerLength",10,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"pointerWidth",10,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"pointerAtBeginning",!1),e.Factory.addGetterSetter(i,"pointerAtEnding",!0),js}var Ks={},A6;function rve(){if(A6)return Ks;A6=1,Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.Circle=void 0;const e=xt(),t=_n(),n=Pt(),o=St();let r=class extends t.Shape{_sceneFunc(a){a.beginPath(),a.arc(0,0,this.attrs.radius||0,0,Math.PI*2,!1),a.closePath(),a.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(a){this.radius()!==a/2&&this.radius(a/2)}setHeight(a){this.radius()!==a/2&&this.radius(a/2)}};return Ks.Circle=r,r.prototype._centroid=!0,r.prototype.className="Circle",r.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(r),e.Factory.addGetterSetter(r,"radius",0,(0,n.getNumberValidator)()),Ks}var Gs={},R6;function ive(){if(R6)return Gs;R6=1,Object.defineProperty(Gs,"__esModule",{value:!0}),Gs.Ellipse=void 0;const e=xt(),t=_n(),n=Pt(),o=St();let r=class extends t.Shape{_sceneFunc(a){const l=this.radiusX(),s=this.radiusY();a.beginPath(),a.save(),l!==s&&a.scale(1,s/l),a.arc(0,0,l,0,Math.PI*2,!1),a.restore(),a.closePath(),a.fillStrokeShape(this)}getWidth(){return this.radiusX()*2}getHeight(){return this.radiusY()*2}setWidth(a){this.radiusX(a/2)}setHeight(a){this.radiusY(a/2)}};return Gs.Ellipse=r,r.prototype.className="Ellipse",r.prototype._centroid=!0,r.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,o._registerNode)(r),e.Factory.addComponentsGetterSetter(r,"radius",["x","y"]),e.Factory.addGetterSetter(r,"radiusX",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(r,"radiusY",0,(0,n.getNumberValidator)()),Gs}var Us={},D6;function ave(){if(D6)return Us;D6=1,Object.defineProperty(Us,"__esModule",{value:!0}),Us.Image=void 0;const e=Jt(),t=xt(),n=_n(),o=St(),r=Pt();class i extends n.Shape{constructor(l){super(l),this._loadListener=()=>{this._requestDraw()},this.on("imageChange.konva",s=>{this._removeImageLoad(s.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){const l=this.image();l&&l.complete||l&&l.readyState===4||l&&l.addEventListener&&l.addEventListener("load",this._loadListener)}_removeImageLoad(l){l&&l.removeEventListener&&l.removeEventListener("load",this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(){const l=!!this.cornerRadius(),s=this.hasShadow();return l&&s?!0:super._useBufferCanvas(!0)}_sceneFunc(l){const s=this.getWidth(),u=this.getHeight(),c=this.cornerRadius(),d=this.attrs.image;let f;if(d){const h=this.attrs.cropWidth,p=this.attrs.cropHeight;h&&p?f=[d,this.cropX(),this.cropY(),h,p,0,0,s,u]:f=[d,0,0,s,u]}(this.hasFill()||this.hasStroke()||c)&&(l.beginPath(),c?e.Util.drawRoundedRectPath(l,s,u,c):l.rect(0,0,s,u),l.closePath(),l.fillStrokeShape(this)),d&&(c&&l.clip(),l.drawImage.apply(l,f))}_hitFunc(l){const s=this.width(),u=this.height(),c=this.cornerRadius();l.beginPath(),c?e.Util.drawRoundedRectPath(l,s,u,c):l.rect(0,0,s,u),l.closePath(),l.fillStrokeShape(this)}getWidth(){var l,s;return(l=this.attrs.width)!==null&&l!==void 0?l:(s=this.image())===null||s===void 0?void 0:s.width}getHeight(){var l,s;return(l=this.attrs.height)!==null&&l!==void 0?l:(s=this.image())===null||s===void 0?void 0:s.height}static fromURL(l,s,u=null){const c=e.Util.createImageElement();c.onload=function(){const d=new i({image:c});s(d)},c.onerror=u,c.crossOrigin="Anonymous",c.src=l}}return Us.Image=i,i.prototype.className="Image",(0,o._registerNode)(i),t.Factory.addGetterSetter(i,"cornerRadius",0,(0,r.getNumberOrArrayOfNumbersValidator)(4)),t.Factory.addGetterSetter(i,"image"),t.Factory.addComponentsGetterSetter(i,"crop",["x","y","width","height"]),t.Factory.addGetterSetter(i,"cropX",0,(0,r.getNumberValidator)()),t.Factory.addGetterSetter(i,"cropY",0,(0,r.getNumberValidator)()),t.Factory.addGetterSetter(i,"cropWidth",0,(0,r.getNumberValidator)()),t.Factory.addGetterSetter(i,"cropHeight",0,(0,r.getNumberValidator)()),Us}var ca={},N6;function lve(){if(N6)return ca;N6=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.Tag=ca.Label=void 0;const e=xt(),t=_n(),n=i2(),o=Pt(),r=St(),i=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],a="Change.konva",l="none",s="up",u="right",c="down",d="left",f=i.length;let h=class extends n.Group{constructor(m){super(m),this.on("add.konva",function(S){this._addListeners(S.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(m){let S=this,y;const b=function(){S._sync()};for(y=0;y{l=Math.min(l,d.x),s=Math.max(s,d.x),u=Math.min(u,d.y),c=Math.max(c,d.y)}),{x:l,y:u,width:s-l,height:c-u}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(a){this.radius(a/2)}setHeight(a){this.radius(a/2)}};return Ys.RegularPolygon=r,r.prototype.className="RegularPolygon",r.prototype._centroid=!0,r.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(r),e.Factory.addGetterSetter(r,"radius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(r,"sides",0,(0,n.getNumberValidator)()),Ys}var qs={},B6;function cve(){if(B6)return qs;B6=1,Object.defineProperty(qs,"__esModule",{value:!0}),qs.Ring=void 0;const e=xt(),t=_n(),n=Pt(),o=St(),r=Math.PI*2;let i=class extends t.Shape{_sceneFunc(l){l.beginPath(),l.arc(0,0,this.innerRadius(),0,r,!1),l.moveTo(this.outerRadius(),0),l.arc(0,0,this.outerRadius(),r,0,!0),l.closePath(),l.fillStrokeShape(this)}getWidth(){return this.outerRadius()*2}getHeight(){return this.outerRadius()*2}setWidth(l){this.outerRadius(l/2)}setHeight(l){this.outerRadius(l/2)}};return qs.Ring=i,i.prototype.className="Ring",i.prototype._centroid=!0,i.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(i),e.Factory.addGetterSetter(i,"innerRadius",0,(0,n.getNumberValidator)()),e.Factory.addGetterSetter(i,"outerRadius",0,(0,n.getNumberValidator)()),qs}var Zs={},L6;function uve(){if(L6)return Zs;L6=1,Object.defineProperty(Zs,"__esModule",{value:!0}),Zs.Sprite=void 0;const e=xt(),t=_n(),n=a2(),o=Pt(),r=St();let i=class extends t.Shape{constructor(l){super(l),this._updated=!0,this.anim=new n.Animation(()=>{const s=this._updated;return this._updated=!1,s}),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(l){const s=this.animation(),u=this.frameIndex(),c=u*4,d=this.animations()[s],f=this.frameOffsets(),h=d[c+0],p=d[c+1],g=d[c+2],m=d[c+3],S=this.image();if((this.hasFill()||this.hasStroke())&&(l.beginPath(),l.rect(0,0,g,m),l.closePath(),l.fillStrokeShape(this)),S)if(f){const y=f[s],b=u*2;l.drawImage(S,h,p,g,m,y[b+0],y[b+1],g,m)}else l.drawImage(S,h,p,g,m,0,0,g,m)}_hitFunc(l){const s=this.animation(),u=this.frameIndex(),c=u*4,d=this.animations()[s],f=this.frameOffsets(),h=d[c+2],p=d[c+3];if(l.beginPath(),f){const g=f[s],m=u*2;l.rect(g[m+0],g[m+1],h,p)}else l.rect(0,0,h,p);l.closePath(),l.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){const l=this;this.interval=setInterval(function(){l._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;const l=this.getLayer();this.anim.setLayers(l),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){const l=this.frameIndex(),s=this.animation(),u=this.animations(),c=u[s],d=c.length/4;l{if(new RegExp("\\p{Emoji}","u").test(Y)){const W=G[U+1];W&&new RegExp("\\p{Emoji_Modifier}|\\u200D","u").test(W)?(V.push(Y+W),G[U+1]=""):V.push(Y)}else new RegExp("\\p{Regional_Indicator}{2}","u").test(Y+(G[U+1]||""))?V.push(Y+G[U+1]):U>0&&new RegExp("\\p{Mn}|\\p{Me}|\\p{Mc}","u").test(Y)?V[V.length-1]+=Y:Y&&V.push(Y);return V},[])}const l="auto",s="center",u="inherit",c="justify",d="Change.konva",f="2d",h="-",p="left",g="text",m="Text",S="top",y="bottom",b="middle",x="normal",C="px ",_=" ",$="right",P="rtl",O="word",T="char",I="none",R="…",F=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],H=F.length;function M(j){return j.split(",").map(V=>{V=V.trim();const Y=V.indexOf(" ")>=0,U=V.indexOf('"')>=0||V.indexOf("'")>=0;return Y&&!U&&(V=`"${V}"`),V}).join(", ")}let B;function E(){return B||(B=e.Util.createCanvasElement().getContext(f),B)}function A(j){j.fillText(this._partialText,this._partialTextX,this._partialTextY)}function D(j){j.setAttr("miterLimit",2),j.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function k(j){return j=j||{},!j.fillLinearGradientColorStops&&!j.fillRadialGradientColorStops&&!j.fillPatternImage&&(j.fill=j.fill||"black"),j}let L=class extends n.Shape{constructor(V){super(k(V)),this._partialTextX=0,this._partialTextY=0;for(let Y=0;Y1&&(he+=J)}}_hitFunc(V){const Y=this.getWidth(),U=this.getHeight();V.beginPath(),V.rect(0,0,Y,U),V.closePath(),V.fillStrokeShape(this)}setText(V){const Y=e.Util._isString(V)?V:V==null?"":V+"";return this._setAttr(g,Y),this}getWidth(){return this.attrs.width===l||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===l||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return e.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(V){var Y,U,G,W,J,Q,q,ee,K,Z,te;let se=E(),ie=this.fontSize(),ae;se.save(),se.font=this._getContextFont(),ae=se.measureText(V),se.restore();const le=ie/100;return{actualBoundingBoxAscent:(Y=ae.actualBoundingBoxAscent)!==null&&Y!==void 0?Y:71.58203125*le,actualBoundingBoxDescent:(U=ae.actualBoundingBoxDescent)!==null&&U!==void 0?U:0,actualBoundingBoxLeft:(G=ae.actualBoundingBoxLeft)!==null&&G!==void 0?G:-7.421875*le,actualBoundingBoxRight:(W=ae.actualBoundingBoxRight)!==null&&W!==void 0?W:75.732421875*le,alphabeticBaseline:(J=ae.alphabeticBaseline)!==null&&J!==void 0?J:0,emHeightAscent:(Q=ae.emHeightAscent)!==null&&Q!==void 0?Q:100*le,emHeightDescent:(q=ae.emHeightDescent)!==null&&q!==void 0?q:-20*le,fontBoundingBoxAscent:(ee=ae.fontBoundingBoxAscent)!==null&&ee!==void 0?ee:91*le,fontBoundingBoxDescent:(K=ae.fontBoundingBoxDescent)!==null&&K!==void 0?K:21*le,hangingBaseline:(Z=ae.hangingBaseline)!==null&&Z!==void 0?Z:72.80000305175781*le,ideographicBaseline:(te=ae.ideographicBaseline)!==null&&te!==void 0?te:-21*le,width:ae.width,height:ie}}_getContextFont(){return this.fontStyle()+_+this.fontVariant()+_+(this.fontSize()+C)+M(this.fontFamily())}_addTextLine(V){this.align()===c&&(V=V.trim());const U=this._getTextWidth(V);return this.textArr.push({text:V,width:U,lastInParagraph:!1})}_getTextWidth(V){const Y=this.letterSpacing(),U=V.length;return E().measureText(V).width+Y*U}_setTextData(){let V=this.text().split(` `),Y=+this.fontSize(),U=0,G=this.lineHeight()*Y,W=this.attrs.width,J=this.attrs.height,Q=W!==l&&W!==void 0,q=J!==l&&J!==void 0,ee=this.padding(),K=W-ee*2,Z=J-ee*2,te=0,se=this.wrap(),ie=se!==I,ae=se!==T&&ie,le=this.ellipsis();this.textArr=[],E().font=this._getContextFont();const de=le?this._getTextWidth(R):0;for(let he=0,ge=V.length;heK)for(;pe.length>0;){let Ce=0,fe=a(pe).length,ue="",me=0;for(;Ce>>1,Te=a(pe),Ie=Te.slice(0,$e+1).join(""),Se=this._getTextWidth(Ie);(le&&q&&te+G>Z?Se+de:Se)<=K?(Ce=$e+1,ue=Ie,me=Se):fe=$e}if(ue){if(ae){const Ie=a(pe),Se=a(ue),we=Ie[Se.length],_e=we===_||we===h;let Ae;if(_e&&me<=K)Ae=Se.length;else{const De=Se.lastIndexOf(_),Re=Se.lastIndexOf(h);Ae=Math.max(De,Re)+1}Ae>0&&(Ce=Ae,ue=Ie.slice(0,Ce).join(""),me=this._getTextWidth(ue))}if(ue=ue.trimRight(),this._addTextLine(ue),U=Math.max(U,me),te+=G,this._shouldHandleEllipsis(te)){this._tryToAddEllipsisToLastLine();break}if(pe=a(pe).slice(Ce).join("").trimLeft(),pe.length>0&&(ve=this._getTextWidth(pe),ve<=K)){this._addTextLine(pe),te+=G,U=Math.max(U,ve);break}}else break}else this._addTextLine(pe),te+=G,U=Math.max(U,ve),this._shouldHandleEllipsis(te)&&heZ)break}this.textHeight=Y,this.textWidth=U}_shouldHandleEllipsis(V){const Y=+this.fontSize(),U=this.lineHeight()*Y,G=this.attrs.height,W=G!==l&&G!==void 0,J=this.padding(),Q=G-J*2;return!(this.wrap()!==I)||W&&V+U>Q}_tryToAddEllipsisToLastLine(){const V=this.attrs.width,Y=V!==l&&V!==void 0,U=this.padding(),G=V-U*2,W=this.ellipsis(),J=this.textArr[this.textArr.length-1];!J||!W||(Y&&(this._getTextWidth(J.text+R)p?null:o.Path.getPointAtLengthOfDataArray(h,this.dataArray)}_readDataAttribute(){this.dataArray=o.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(h){h.setAttr("font",this._getContextFont()),h.setAttr("textBaseline",this.textBaseline()),h.setAttr("textAlign","left"),h.save();const p=this.textDecoration(),g=this.fill(),m=this.fontSize(),S=this.glyphInfo;p==="underline"&&h.beginPath();for(let y=0;y=1){const g=p[0].p0;h.moveTo(g.x,g.y)}for(let g=0;gP+`.${u}`).join(" "),d="nodesRect",f=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],h={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},p="ontouchstart"in a.Konva._global;function g(P,O,T){if(P==="rotater")return T;O+=e.Util.degToRad(h[P]||0);const I=(e.Util.radToDeg(O)%360+360)%360;return e.Util._inRange(I,315+22.5,360)||e.Util._inRange(I,0,22.5)?"ns-resize":e.Util._inRange(I,45-22.5,45+22.5)?"nesw-resize":e.Util._inRange(I,90-22.5,90+22.5)?"ew-resize":e.Util._inRange(I,135-22.5,135+22.5)?"nwse-resize":e.Util._inRange(I,180-22.5,180+22.5)?"ns-resize":e.Util._inRange(I,225-22.5,225+22.5)?"nesw-resize":e.Util._inRange(I,270-22.5,270+22.5)?"ew-resize":e.Util._inRange(I,315-22.5,315+22.5)?"nwse-resize":(e.Util.error("Transformer has unknown angle for cursor detection: "+I),"pointer")}const m=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function S(P){return{x:P.x+P.width/2*Math.cos(P.rotation)+P.height/2*Math.sin(-P.rotation),y:P.y+P.height/2*Math.cos(P.rotation)+P.width/2*Math.sin(P.rotation)}}function y(P,O,T){const I=T.x+(P.x-T.x)*Math.cos(O)-(P.y-T.y)*Math.sin(O),R=T.y+(P.x-T.x)*Math.sin(O)+(P.y-T.y)*Math.cos(O);return{...P,rotation:P.rotation+O,x:I,y:R}}function b(P,O){const T=S(P);return y(P,O,T)}function x(P,O,T){let I=O;for(let R=0;RR.isAncestorOf(this)?(e.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1):!0);return this._nodes=O=T,O.length===1&&this.useSingleNodeRotation()?this.rotation(O[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(R=>{const F=()=>{this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),!this._transforming&&!this.isDragging()&&this.update()};if(R._attrsAffectingSize.length){const H=R._attrsAffectingSize.map(M=>M+"Change."+this._getEventNamespace()).join(" ");R.on(H,F)}R.on(f.map(H=>H+`.${this._getEventNamespace()}`).join(" "),F),R.on(`absoluteTransformChange.${this._getEventNamespace()}`,F),this._proxyDrag(R)}),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}_proxyDrag(O){let T;O.on(`dragstart.${this._getEventNamespace()}`,I=>{T=O.getAbsolutePosition(),!this.isDragging()&&O!==this.findOne(".back")&&this.startDrag(I,!1)}),O.on(`dragmove.${this._getEventNamespace()}`,I=>{if(!T)return;const R=O.getAbsolutePosition(),F=R.x-T.x,H=R.y-T.y;this.nodes().forEach(M=>{if(M===O||M.isDragging())return;const B=M.getAbsolutePosition();M.setAbsolutePosition({x:B.x+F,y:B.y+H}),M.startDrag(I)}),T=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(O=>{O.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(d),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(d,this.__getNodeRect)}__getNodeShape(O,T=this.rotation(),I){const R=O.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),F=O.getAbsoluteScale(I),H=O.getAbsolutePosition(I),M=R.x*F.x-O.offsetX()*F.x,B=R.y*F.y-O.offsetY()*F.y,E=(a.Konva.getAngle(O.getAbsoluteRotation())+Math.PI*2)%(Math.PI*2),A={x:H.x+M*Math.cos(E)+B*Math.sin(-E),y:H.y+B*Math.cos(E)+M*Math.sin(E),width:R.width*F.x,height:R.height*F.y,rotation:E};return y(A,-a.Konva.getAngle(T),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};const T=[];this.nodes().map(E=>{const A=E.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),D=[{x:A.x,y:A.y},{x:A.x+A.width,y:A.y},{x:A.x+A.width,y:A.y+A.height},{x:A.x,y:A.y+A.height}],k=E.getAbsoluteTransform();D.forEach(function(L){const j=k.point(L);T.push(j)})});const I=new e.Transform;I.rotate(-a.Konva.getAngle(this.rotation()));let R=1/0,F=1/0,H=-1/0,M=-1/0;T.forEach(function(E){const A=I.point(E);R===void 0&&(R=H=A.x,F=M=A.y),R=Math.min(R,A.x),F=Math.min(F,A.y),H=Math.max(H,A.x),M=Math.max(M,A.y)}),I.invert();const B=I.point({x:R,y:F});return{x:B.x,y:B.y,width:H-R,height:M-F,rotation:a.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),m.forEach(O=>{this._createAnchor(O)}),this._createAnchor("rotater")}_createAnchor(O){const T=new r.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:O+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:p?10:"auto"}),I=this;T.on("mousedown touchstart",function(R){I._handleMouseDown(R)}),T.on("dragstart",R=>{T.stopDrag(),R.cancelBubble=!0}),T.on("dragend",R=>{R.cancelBubble=!0}),T.on("mouseenter",()=>{const R=a.Konva.getAngle(this.rotation()),F=this.rotateAnchorCursor(),H=g(O,R,F);T.getStage().content&&(T.getStage().content.style.cursor=H),this._cursorChange=!0}),T.on("mouseout",()=>{T.getStage().content&&(T.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(T)}_createBack(){const O=new o.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(T,I){const R=I.getParent(),F=R.padding();T.beginPath(),T.rect(-F,-F,I.width()+F*2,I.height()+F*2),T.moveTo(I.width()/2,-F),R.rotateEnabled()&&R.rotateLineVisible()&&T.lineTo(I.width()/2,-R.rotateAnchorOffset()*e.Util._sign(I.height())-F),T.fillStrokeShape(I)},hitFunc:(T,I)=>{if(!this.shouldOverdrawWholeArea())return;const R=this.padding();T.beginPath(),T.rect(-R,-R,I.width()+R*2,I.height()+R*2),T.fillStrokeShape(I)}});this.add(O),this._proxyDrag(O),O.on("dragstart",T=>{T.cancelBubble=!0}),O.on("dragmove",T=>{T.cancelBubble=!0}),O.on("dragend",T=>{T.cancelBubble=!0}),this.on("dragmove",T=>{this.update()})}_handleMouseDown(O){if(this._transforming)return;this._movingAnchorName=O.target.name().split(" ")[0];const T=this._getNodeRect(),I=T.width,R=T.height,F=Math.sqrt(Math.pow(I,2)+Math.pow(R,2));this.sin=Math.abs(R/F),this.cos=Math.abs(I/F),typeof window<"u"&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;const H=O.target.getAbsolutePosition(),M=O.target.getStage().getPointerPosition();this._anchorDragOffset={x:M.x-H.x,y:M.y-H.y},C++,this._fire("transformstart",{evt:O.evt,target:this.getNode()}),this._nodes.forEach(B=>{B._fire("transformstart",{evt:O.evt,target:B})})}_handleMouseMove(O){let T,I,R;const F=this.findOne("."+this._movingAnchorName),H=F.getStage();H.setPointersPositions(O);const M=H.getPointerPosition();let B={x:M.x-this._anchorDragOffset.x,y:M.y-this._anchorDragOffset.y};const E=F.getAbsolutePosition();this.anchorDragBoundFunc()&&(B=this.anchorDragBoundFunc()(E,B,O)),F.setAbsolutePosition(B);const A=F.getAbsolutePosition();if(E.x===A.x&&E.y===A.y)return;if(this._movingAnchorName==="rotater"){const G=this._getNodeRect();T=F.x()-G.width/2,I=-F.y()+G.height/2;let W=Math.atan2(-I,T)+Math.PI/2;G.height<0&&(W-=Math.PI);const Q=a.Konva.getAngle(this.rotation())+W,q=a.Konva.getAngle(this.rotationSnapTolerance()),K=x(this.rotationSnaps(),Q,q)-G.rotation,Z=b(G,K);this._fitNodesInto(Z,O);return}const D=this.shiftBehavior();let k;D==="inverted"?k=this.keepRatio()&&!O.shiftKey:D==="none"?k=this.keepRatio():k=this.keepRatio()||O.shiftKey;let L=this.centeredScaling()||O.altKey;if(this._movingAnchorName==="top-left"){if(k){const G=L?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};R=Math.sqrt(Math.pow(G.x-F.x(),2)+Math.pow(G.y-F.y(),2));const W=this.findOne(".top-left").x()>G.x?-1:1,J=this.findOne(".top-left").y()>G.y?-1:1;T=R*this.cos*W,I=R*this.sin*J,this.findOne(".top-left").x(G.x-T),this.findOne(".top-left").y(G.y-I)}}else if(this._movingAnchorName==="top-center")this.findOne(".top-left").y(F.y());else if(this._movingAnchorName==="top-right"){if(k){const G=L?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};R=Math.sqrt(Math.pow(F.x()-G.x,2)+Math.pow(G.y-F.y(),2));const W=this.findOne(".top-right").x()G.y?-1:1;T=R*this.cos*W,I=R*this.sin*J,this.findOne(".top-right").x(G.x+T),this.findOne(".top-right").y(G.y-I)}var j=F.position();this.findOne(".top-left").y(j.y),this.findOne(".bottom-right").x(j.x)}else if(this._movingAnchorName==="middle-left")this.findOne(".top-left").x(F.x());else if(this._movingAnchorName==="middle-right")this.findOne(".bottom-right").x(F.x());else if(this._movingAnchorName==="bottom-left"){if(k){const G=L?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};R=Math.sqrt(Math.pow(G.x-F.x(),2)+Math.pow(F.y()-G.y,2));const W=G.x{var F;R._fire("transformend",{evt:O,target:R}),(F=R.getLayer())===null||F===void 0||F.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(O,T){const I=this._getNodeRect(),R=1;if(e.Util._inRange(O.width,-this.padding()*2-R,R)){this.update();return}if(e.Util._inRange(O.height,-this.padding()*2-R,R)){this.update();return}const F=new e.Transform;if(F.rotate(a.Konva.getAngle(this.rotation())),this._movingAnchorName&&O.width<0&&this._movingAnchorName.indexOf("left")>=0){const k=F.point({x:-this.padding()*2,y:0});O.x+=k.x,O.y+=k.y,O.width+=this.padding()*2,this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=k.x,this._anchorDragOffset.y-=k.y}else if(this._movingAnchorName&&O.width<0&&this._movingAnchorName.indexOf("right")>=0){const k=F.point({x:this.padding()*2,y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=k.x,this._anchorDragOffset.y-=k.y,O.width+=this.padding()*2}if(this._movingAnchorName&&O.height<0&&this._movingAnchorName.indexOf("top")>=0){const k=F.point({x:0,y:-this.padding()*2});O.x+=k.x,O.y+=k.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=k.x,this._anchorDragOffset.y-=k.y,O.height+=this.padding()*2}else if(this._movingAnchorName&&O.height<0&&this._movingAnchorName.indexOf("bottom")>=0){const k=F.point({x:0,y:this.padding()*2});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=k.x,this._anchorDragOffset.y-=k.y,O.height+=this.padding()*2}if(this.boundBoxFunc()){const k=this.boundBoxFunc()(I,O);k?O=k:e.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}const H=1e7,M=new e.Transform;M.translate(I.x,I.y),M.rotate(I.rotation),M.scale(I.width/H,I.height/H);const B=new e.Transform,E=O.width/H,A=O.height/H;this.flipEnabled()===!1?(B.translate(O.x,O.y),B.rotate(O.rotation),B.translate(O.width<0?O.width:0,O.height<0?O.height:0),B.scale(Math.abs(E),Math.abs(A))):(B.translate(O.x,O.y),B.rotate(O.rotation),B.scale(E,A));const D=B.multiply(M.invert());this._nodes.forEach(k=>{var L;const j=k.getParent().getAbsoluteTransform(),V=k.getTransform().copy();V.translate(k.offsetX(),k.offsetY());const Y=new e.Transform;Y.multiply(j.copy().invert()).multiply(D).multiply(j).multiply(V);const U=Y.decompose();k.setAttrs(U),(L=k.getLayer())===null||L===void 0||L.batchDraw()}),this.rotation(e.Util._getRotation(O.rotation)),this._nodes.forEach(k=>{this._fire("transform",{evt:T,target:k}),k._fire("transform",{evt:T,target:k})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(O,T){this.findOne(O).setAttrs(T)}update(){var O;const T=this._getNodeRect();this.rotation(e.Util._getRotation(T.rotation));const I=T.width,R=T.height,F=this.enabledAnchors(),H=this.resizeEnabled(),M=this.padding(),B=this.anchorSize(),E=this.find("._anchor");E.forEach(D=>{D.setAttrs({width:B,height:B,offsetX:B/2,offsetY:B/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:B/2+M,offsetY:B/2+M,visible:H&&F.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:I/2,y:0,offsetY:B/2+M,visible:H&&F.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:I,y:0,offsetX:B/2-M,offsetY:B/2+M,visible:H&&F.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:R/2,offsetX:B/2+M,visible:H&&F.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:I,y:R/2,offsetX:B/2-M,visible:H&&F.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:R,offsetX:B/2+M,offsetY:B/2-M,visible:H&&F.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:I/2,y:R,offsetY:B/2-M,visible:H&&F.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:I,y:R,offsetX:B/2-M,offsetY:B/2-M,visible:H&&F.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:I/2,y:-this.rotateAnchorOffset()*e.Util._sign(R)-M,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:I,height:R,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});const A=this.anchorStyleFunc();A&&E.forEach(D=>{A(D)}),(O=this.getLayer())===null||O===void 0||O.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();const O=this.findOne("."+this._movingAnchorName);O&&O.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),i.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return n.Node.prototype.toObject.call(this)}clone(O){return n.Node.prototype.clone.call(this,O)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}};ec.Transformer=_,_.isTransforming=()=>C>0;function $(P){return P instanceof Array||e.Util.warn("enabledAnchors value should be an array"),P instanceof Array&&P.forEach(function(O){m.indexOf(O)===-1&&e.Util.warn("Unknown anchor name: "+O+". Available names are: "+m.join(", "))}),P||[]}return _.prototype.className="Transformer",(0,s._registerNode)(_),t.Factory.addGetterSetter(_,"enabledAnchors",m,$),t.Factory.addGetterSetter(_,"flipEnabled",!0,(0,l.getBooleanValidator)()),t.Factory.addGetterSetter(_,"resizeEnabled",!0),t.Factory.addGetterSetter(_,"anchorSize",10,(0,l.getNumberValidator)()),t.Factory.addGetterSetter(_,"rotateEnabled",!0),t.Factory.addGetterSetter(_,"rotateLineVisible",!0),t.Factory.addGetterSetter(_,"rotationSnaps",[]),t.Factory.addGetterSetter(_,"rotateAnchorOffset",50,(0,l.getNumberValidator)()),t.Factory.addGetterSetter(_,"rotateAnchorCursor","crosshair"),t.Factory.addGetterSetter(_,"rotationSnapTolerance",5,(0,l.getNumberValidator)()),t.Factory.addGetterSetter(_,"borderEnabled",!0),t.Factory.addGetterSetter(_,"anchorStroke","rgb(0, 161, 255)"),t.Factory.addGetterSetter(_,"anchorStrokeWidth",1,(0,l.getNumberValidator)()),t.Factory.addGetterSetter(_,"anchorFill","white"),t.Factory.addGetterSetter(_,"anchorCornerRadius",0,(0,l.getNumberValidator)()),t.Factory.addGetterSetter(_,"borderStroke","rgb(0, 161, 255)"),t.Factory.addGetterSetter(_,"borderStrokeWidth",1,(0,l.getNumberValidator)()),t.Factory.addGetterSetter(_,"borderDash"),t.Factory.addGetterSetter(_,"keepRatio",!0),t.Factory.addGetterSetter(_,"shiftBehavior","default"),t.Factory.addGetterSetter(_,"centeredScaling",!1),t.Factory.addGetterSetter(_,"ignoreStroke",!1),t.Factory.addGetterSetter(_,"padding",0,(0,l.getNumberValidator)()),t.Factory.addGetterSetter(_,"nodes"),t.Factory.addGetterSetter(_,"node"),t.Factory.addGetterSetter(_,"boundBoxFunc"),t.Factory.addGetterSetter(_,"anchorDragBoundFunc"),t.Factory.addGetterSetter(_,"anchorStyleFunc"),t.Factory.addGetterSetter(_,"shouldOverdrawWholeArea",!1),t.Factory.addGetterSetter(_,"useSingleNodeRotation",!0),t.Factory.backCompat(_,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"}),ec}var tc={},W6;function pve(){if(W6)return tc;W6=1,Object.defineProperty(tc,"__esModule",{value:!0}),tc.Wedge=void 0;const e=xt(),t=_n(),n=St(),o=Pt(),r=St();let i=class extends t.Shape{_sceneFunc(l){l.beginPath(),l.arc(0,0,this.radius(),0,n.Konva.getAngle(this.angle()),this.clockwise()),l.lineTo(0,0),l.closePath(),l.fillStrokeShape(this)}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(l){this.radius(l/2)}setHeight(l){this.radius(l/2)}};return tc.Wedge=i,i.prototype.className="Wedge",i.prototype._centroid=!0,i.prototype._attrsAffectingSize=["radius"],(0,r._registerNode)(i),e.Factory.addGetterSetter(i,"radius",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(i,"angle",0,(0,o.getNumberValidator)()),e.Factory.addGetterSetter(i,"clockwise",!1),e.Factory.backCompat(i,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"}),tc}var nc={},K6;function gve(){if(K6)return nc;K6=1,Object.defineProperty(nc,"__esModule",{value:!0}),nc.Blur=void 0;const e=xt(),t=ln(),n=Pt();function o(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}const r=[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],i=[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 a(s,u){const c=s.data,d=s.width,f=s.height;let h,p,g,m,S,y,b,x,C,_,$,P,O,T,I,R,F,H,M,B;const E=u+u+1,A=d-1,D=f-1,k=u+1,L=k*(k+1)/2,j=new o,V=r[u],Y=i[u];let U=null,G=j,W=null,J=null;for(let Q=1;Q>Y,M!==0?(M=255/M,c[p]=(m*V>>Y)*M,c[p+1]=(S*V>>Y)*M,c[p+2]=(y*V>>Y)*M):c[p]=c[p+1]=c[p+2]=0,m-=x,S-=C,y-=_,b-=$,x-=W.r,C-=W.g,_-=W.b,$-=W.a,h=g+((h=q+u+1)>Y,M>0?(M=255/M,c[h]=(m*V>>Y)*M,c[h+1]=(S*V>>Y)*M,c[h+2]=(y*V>>Y)*M):c[h]=c[h+1]=c[h+2]=0,m-=x,S-=C,y-=_,b-=$,x-=W.r,C-=W.g,_-=W.b,$-=W.a,h=Q+((h=ee+k)0&&a(u,c)};return nc.Blur=l,e.Factory.addGetterSetter(t.Node,"blurRadius",0,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),nc}var oc={},G6;function vve(){if(G6)return oc;G6=1,Object.defineProperty(oc,"__esModule",{value:!0}),oc.Brighten=void 0;const e=xt(),t=ln(),n=Pt(),o=function(r){const i=this.brightness()*255,a=r.data,l=a.length;for(let s=0;s255?255:s,u=u<0?0:u>255?255:u,c=c<0?0:c>255?255:c,a[d]=s,a[d+1]=u,a[d+2]=c};return rc.Contrast=o,e.Factory.addGetterSetter(t.Node,"contrast",0,(0,n.getNumberValidator)(),e.Factory.afterSetFilter),rc}var ic={},X6;function bve(){if(X6)return ic;X6=1,Object.defineProperty(ic,"__esModule",{value:!0}),ic.Emboss=void 0;const e=xt(),t=ln(),n=Jt(),o=Pt(),r=function(i){const a=this.embossStrength()*10,l=this.embossWhiteLevel()*255,s=this.embossDirection(),u=this.embossBlend(),c=i.data,d=i.width,f=i.height,h=d*4;let p=0,g=0,m=f;switch(s){case"top-left":p=-1,g=-1;break;case"top":p=-1,g=0;break;case"top-right":p=-1,g=1;break;case"right":p=0,g=1;break;case"bottom-right":p=1,g=1;break;case"bottom":p=1,g=0;break;case"bottom-left":p=1,g=-1;break;case"left":p=0,g=-1;break;default:n.Util.error("Unknown emboss direction: "+s)}do{const S=(m-1)*h;let y=p;m+y<1&&(y=0),m+y>f&&(y=0);const b=(m-1+y)*d*4;let x=d;do{const C=S+(x-1)*4;let _=g;x+_<1&&(_=0),x+_>d&&(_=0);const $=b+(x-1+_)*4,P=c[C]-c[$],O=c[C+1]-c[$+1],T=c[C+2]-c[$+2];let I=P;const R=I>0?I:-I,F=O>0?O:-O,H=T>0?T:-T;if(F>R&&(I=O),H>R&&(I=T),I*=a,u){const M=c[C]+I,B=c[C+1]+I,E=c[C+2]+I;c[C]=M>255?255:M<0?0:M,c[C+1]=B>255?255:B<0?0:B,c[C+2]=E>255?255:E<0?0:E}else{let M=l-I;M<0?M=0:M>255&&(M=255),c[C]=c[C+1]=c[C+2]=M}}while(--x)}while(--m)};return ic.Emboss=r,e.Factory.addGetterSetter(t.Node,"embossStrength",.5,(0,o.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(t.Node,"embossWhiteLevel",.5,(0,o.getNumberValidator)(),e.Factory.afterSetFilter),e.Factory.addGetterSetter(t.Node,"embossDirection","top-left",void 0,e.Factory.afterSetFilter),e.Factory.addGetterSetter(t.Node,"embossBlend",!1,void 0,e.Factory.afterSetFilter),ic}var ac={},Y6;function yve(){if(Y6)return ac;Y6=1,Object.defineProperty(ac,"__esModule",{value:!0}),ac.Enhance=void 0;const e=xt(),t=ln(),n=Pt();function o(i,a,l,s,u){const c=l-a,d=u-s;if(c===0)return s+d/2;if(d===0)return s;let f=(i-a)/c;return f=d*f+s,f}const r=function(i){const a=i.data,l=a.length;let s=a[0],u=s,c,d=a[1],f=d,h,p=a[2],g=p,m;const S=this.enhance();if(S===0)return;for(let P=0;Pu&&(u=c),h=a[P+1],hf&&(f=h),m=a[P+2],mg&&(g=m);u===s&&(u=255,s=0),f===d&&(f=255,d=0),g===p&&(g=255,p=0);let y,b,x,C,_,$;if(S>0)y=u+S*(255-u),b=s-S*(s-0),x=f+S*(255-f),C=d-S*(d-0),_=g+S*(255-g),$=p-S*(p-0);else{const P=(u+s)*.5;y=u+S*(u-P),b=s+S*(s-P);const O=(f+d)*.5;x=f+S*(f-O),C=d+S*(d-O);const T=(g+p)*.5;_=g+S*(g-T),$=p+S*(p-T)}for(let P=0;Pm?b:m;const x=h,C=f,_=360/C*Math.PI/180;for(let $=0;$m?b:m;const x=h,C=f,_=0;let $,P;for(S=0;Ss&&(I=T,R=0,F=-1),d=0;d=0&&O=0&&T=0&&O=0&&T=1020?255:0}return y}function c(f,h,p){const g=[.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111,.1111111111111111],m=Math.round(Math.sqrt(g.length)),S=Math.floor(m/2),y=[];for(let b=0;b=0&&O=0&&T=l))for(let P=x;P=s)continue;const O=(l*P+$)*4;p+=d[O+0],g+=d[O+1],m+=d[O+2],S+=d[O+3],_+=1}p=p/_,g=g/_,m=m/_,S=S/_;for(let $=y;$=l))for(let P=x;P=s)continue;const O=(l*P+$)*4;d[O+0]=p,d[O+1]=g,d[O+2]=m,d[O+3]=S}}};return pc.Pixelate=r,e.Factory.addGetterSetter(n.Node,"pixelSize",8,(0,o.getNumberValidator)(),e.Factory.afterSetFilter),pc}var gc={},r8;function Tve(){if(r8)return gc;r8=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.Posterize=void 0;const e=xt(),t=ln(),n=Pt(),o=function(r){const i=Math.round(this.levels()*254)+1,a=r.data,l=a.length,s=255/i;for(let u=0;u255?255:r<0?0:Math.round(r)}),e.Factory.addGetterSetter(t.Node,"green",0,function(r){return this._filterUpToDate=!1,r>255?255:r<0?0:Math.round(r)}),e.Factory.addGetterSetter(t.Node,"blue",0,n.RGBComponent,e.Factory.afterSetFilter),vc}var mc={},a8;function Eve(){if(a8)return mc;a8=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.RGBA=void 0;const e=xt(),t=ln(),n=Pt(),o=function(r){const i=r.data,a=i.length,l=this.red(),s=this.green(),u=this.blue(),c=this.alpha();for(let d=0;d255?255:r<0?0:Math.round(r)}),e.Factory.addGetterSetter(t.Node,"green",0,function(r){return this._filterUpToDate=!1,r>255?255:r<0?0:Math.round(r)}),e.Factory.addGetterSetter(t.Node,"blue",0,n.RGBComponent,e.Factory.afterSetFilter),e.Factory.addGetterSetter(t.Node,"alpha",1,function(r){return this._filterUpToDate=!1,r>1?1:r<0?0:r}),mc}var bc={},l8;function Mve(){if(l8)return bc;l8=1,Object.defineProperty(bc,"__esModule",{value:!0}),bc.Sepia=void 0;const e=function(t){const n=t.data,o=n.length;for(let r=0;r127&&(c=255-c),d>127&&(d=255-d),f>127&&(f=255-f),n[u]=c,n[u+1]=d,n[u+2]=f}while(--s)}while(--a)};return yc.Solarize=e,yc}var Sc={},c8;function Rve(){if(c8)return Sc;c8=1,Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.Threshold=void 0;const e=xt(),t=ln(),n=Pt(),o=function(r){const i=this.threshold()*255,a=r.data,l=a.length;for(let s=0;s!!r?.hasOwnProperty("component"),n=r=>Array.isArray(r),o=r=>t(r)?[r,...o(r.children)]:n(r)?r.flatMap(o):[];return o(e.children)}function _E(e,t){const n=zve(e),o=[];n.forEach(i=>{const a=Hve(i);a&&o.push(a)});let r=!1;o.forEach((i,a)=>{i.getZIndex()!==a&&(i.setZIndex(a),r=!0)}),r&&ep(t)}const jve=re({name:"Stage",props:{config:{type:Object,default:function(){return{}}},__useStrictMode:{type:Boolean}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:o}){const r=hn();if(!r)return;const i=ft({}),a=oe(null),l=new Vt.Stage({width:e.config.width,height:e.config.height,container:document.createElement("div")});r.__konvaNode=l,c();function s(){return r?.__konvaNode}function u(){return r?.__konvaNode}function c(){if(!r)return;const d=i||{},f={...t,...e.config};wE(r,f,d,e.__useStrictMode),Object.assign(i,f)}return He(()=>{a.value&&(a.value.innerHTML="",l.container(a.value)),c()}),$n(()=>{c(),_E(r.subTree,l)}),Qe(()=>{l.destroy()}),ye(()=>e.config,c,{deep:!0}),o({getStage:u,getNode:s}),()=>Oo("div",{ref:a,style:t?.style},n.default?.())}}),Vve=".vue-konva-event",Wve={Group:!0,Layer:!0,FastLayer:!0,Label:!0};function Kve(e,t){return re({name:e,props:{config:{type:Object,default:function(){return{}}},__useStrictMode:{type:Boolean}},setup(n,{attrs:o,slots:r,expose:i}){const a=hn();if(!a)return;const l=ft({}),s=new t;a.__konvaNode=s,a.vnode.__konvaNode=s,d();function u(){return a?.__konvaNode}function c(){return a?.__konvaNode}function d(){if(!a)return;const h={};for(const m in a?.vnode.props)m.slice(0,2)==="on"&&(h[m]=a.vnode.props[m]);const p=l||{},g={...o,...n.config,...h};wE(a,g,p,n.__useStrictMode),Object.assign(l,g)}He(()=>{const h=Lve(a)?.__konvaNode;h&&"add"in h&&h.add(s),ep(s)}),Rn(()=>{ep(s),s.destroy(),s.off(Vve)}),$n(()=>{d(),_E(a.subTree,s)}),ye(()=>n.config,d,{deep:!0}),i({getStage:c,getNode:u});const f=Wve.hasOwnProperty(e);return()=>f?Oo("template",{},r.default?.()):null}})}typeof window<"u"&&!window.Konva&&require("konva");const Gve={install:(e,t)=>{const n=t?.prefix||Bve,o={Arc:Vt.Arc,Arrow:Vt.Arrow,Circle:Vt.Circle,Ellipse:Vt.Ellipse,FastLayer:Vt.FastLayer,Group:Vt.Group,Image:Vt.Image,Label:Vt.Label,Layer:Vt.Layer,Line:Vt.Line,Path:Vt.Path,Rect:Vt.Rect,RegularPolygon:Vt.RegularPolygon,Ring:Vt.Ring,Shape:Vt.Shape,Sprite:Vt.Sprite,Star:Vt.Star,Tag:Vt.Tag,Text:Vt.Text,TextPath:Vt.TextPath,Transformer:Vt.Transformer,Wedge:Vt.Wedge,...t?.customNodes};[jve,...Object.entries(o).map(([r,i])=>Kve(r,i))].forEach(r=>{e.component(`${n}${r.name}`,r)})}},s2=D5(qge);s2.use(Zhe);s2.use(Gve);s2.mount("#app")});export default Uve(); diff --git a/alibabacloud_sample/templates/assets/index-DdVjXnlc.css b/alibabacloud_sample/templates/assets/index-mR0T4gbb.css similarity index 98% rename from alibabacloud_sample/templates/assets/index-DdVjXnlc.css rename to alibabacloud_sample/templates/assets/index-mR0T4gbb.css index 08ab119..5bb4343 100644 --- a/alibabacloud_sample/templates/assets/index-DdVjXnlc.css +++ b/alibabacloud_sample/templates/assets/index-mR0T4gbb.css @@ -1 +1 @@ -:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{width:100%;height:100%;margin:0 auto;padding:2rem;text-align:center}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.pdf[data-v-63a0040f]{width:100%;height:100%}.container[data-v-9f5a173f]{margin-top:50px;height:100%}.pdf[data-v-34c6f13c]{width:100%;height:100%}.ant-steps[data-v-c563b4dc]{padding:0 20px 20px}.table-operations[data-v-08087e29]{margin-bottom:16px;text-align:right}.table-operations>button[data-v-08087e29]{margin-right:8px}#components-layout-demo-top-side .logo[data-v-0093e7ee]{float:left;height:31px;margin:16px 24px 16px 0;background:#ffffff4d}.ant-row-rtl #components-layout-demo-top-side .logo[data-v-0093e7ee]{float:right;margin:16px 0 16px 24px}.container[data-v-0093e7ee]{height:100%}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6} +:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{width:100%;height:100%;margin:0 auto;padding:2rem;text-align:center}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}.pdf[data-v-63a0040f]{width:100%;height:100%}.container[data-v-9f5a173f]{margin-top:50px;height:100%}.pdf[data-v-34c6f13c]{width:100%;height:100%}.ant-steps[data-v-65545dab]{padding:0 20px 20px}.table-operations[data-v-08087e29]{margin-bottom:16px;text-align:right}.table-operations>button[data-v-08087e29]{margin-right:8px}#components-layout-demo-top-side .logo[data-v-0093e7ee]{float:left;height:31px;margin:16px 24px 16px 0;background:#ffffff4d}.ant-row-rtl #components-layout-demo-top-side .logo[data-v-0093e7ee]{float:right;margin:16px 0 16px 24px}.container[data-v-0093e7ee]{height:100%}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}body{margin:0}[tabindex="-1"]:focus{outline:none}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{-webkit-text-decoration:underline dotted;text-decoration:underline;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6} diff --git a/alibabacloud_sample/templates/index.html b/alibabacloud_sample/templates/index.html index c570a49..2cb0d96 100644 --- a/alibabacloud_sample/templates/index.html +++ b/alibabacloud_sample/templates/index.html @@ -5,8 +5,8 @@ Vite + Vue + TS - - + +
diff --git a/dockerfile b/dockerfile index ee89b39..a4795a0 100644 --- a/dockerfile +++ b/dockerfile @@ -3,5 +3,3 @@ WORKDIR /app COPY . . RUN pip install --no-cache-dir -r requirements.txt RUN python setup.py install - -CMD ["python", "alibabacloud_sample/main.py"] \ No newline at end of file diff --git a/webapp/vite-project/src/components/check/index.vue b/webapp/vite-project/src/components/check/index.vue index 980ea40..bdee985 100644 --- a/webapp/vite-project/src/components/check/index.vue +++ b/webapp/vite-project/src/components/check/index.vue @@ -27,7 +27,7 @@ const items = [ ] as StepProps[]; // 文件路径 const filePath = ref(''); -const current = ref(3); +const current = ref(0); // 下一步 const nextPage = () => { current.value ++;