@sbs-plugin/vue2-image-process 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["Vue2ImageProcessing"]=e():t["Vue2ImageProcessing"]=e()})(this,function(){return function(){var t={34:function(t,e,r){"use strict";var n=r(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},283:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(4901),s=r(9297),a=r(3724),c=r(350).CONFIGURABLE,u=r(3706),l=r(1181),f=l.enforce,h=l.get,d=String,p=Object.defineProperty,g=n("".slice),m=n("".replace),v=n([].join),y=a&&!i(function(){return 8!==p(function(){},"length",{value:8}).length}),b=String(String).split("String"),w=t.exports=function(t,e,r){"Symbol("===g(d(e),0,7)&&(e="["+m(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!s(t,"name")||c&&t.name!==e)&&(a?p(t,"name",{value:e,configurable:!0}):t.name=e),y&&r&&s(r,"arity")&&t.length!==r.arity&&p(t,"length",{value:r.arity});try{r&&s(r,"constructor")&&r.constructor?a&&p(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(i){}var n=f(t);return s(n,"source")||(n.source=v(b,"string"==typeof e?e:"")),t};Function.prototype.toString=w(function(){return o(this)&&h(this).source||u(this)},"toString")},350:function(t,e,r){"use strict";var n=r(3724),i=r(9297),o=Function.prototype,s=n&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!n||n&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},421:function(t){"use strict";t.exports={}},616:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},741:function(t){"use strict";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?r:e)(n)}},757:function(t,e,r){"use strict";var n=r(7751),i=r(4901),o=r(1625),s=r(7040),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return i(e)&&o(e.prototype,a(t))}},1108:function(t,e,r){"use strict";var n=r(6955);t.exports=function(t){var e=n(t);return"BigInt64Array"===e||"BigUint64Array"===e}},1181:function(t,e,r){"use strict";var n,i,o,s=r(8622),a=r(4576),c=r(34),u=r(6699),l=r(9297),f=r(7629),h=r(6119),d=r(421),p="Object already initialized",g=a.TypeError,m=a.WeakMap,v=function(t){return o(t)?i(t):n(t,{})},y=function(t){return function(e){var r;if(!c(e)||(r=i(e)).type!==t)throw new g("Incompatible receiver, "+t+" required");return r}};if(s||f.state){var b=f.state||(f.state=new m);b.get=b.get,b.has=b.has,b.set=b.set,n=function(t,e){if(b.has(t))throw new g(p);return e.facade=t,b.set(t,e),e},i=function(t){return b.get(t)||{}},o=function(t){return b.has(t)}}else{var w=h("state");d[w]=!0,n=function(t,e){if(l(t,w))throw new g(p);return e.facade=t,u(t,w,e),e},i=function(t){return l(t,w)?t[w]:{}},o=function(t){return l(t,w)}}t.exports={set:n,get:i,has:o,enforce:v,getterFor:y}},1291:function(t,e,r){"use strict";var n=r(741);t.exports=function(t){var e=+t;return e!==e||0===e?0:n(e)}},1625:function(t,e,r){"use strict";var n=r(9504);t.exports=n({}.isPrototypeOf)},1828:function(t,e,r){"use strict";var n=r(9504),i=r(9297),o=r(5397),s=r(9617).indexOf,a=r(421),c=n([].push);t.exports=function(t,e){var r,n=o(t),u=0,l=[];for(r in n)!i(a,r)&&i(n,r)&&c(l,r);while(e.length>u)i(n,r=e[u++])&&(~s(l,r)||c(l,r));return l}},2106:function(t,e,r){"use strict";var n=r(283),i=r(4913);t.exports=function(t,e,r){return r.get&&n(r.get,e,{getter:!0}),r.set&&n(r.set,e,{setter:!0}),i.f(t,e,r)}},2140:function(t,e,r){"use strict";var n=r(8227),i=n("toStringTag"),o={};o[i]="z",t.exports="[object z]"===String(o)},2195:function(t,e,r){"use strict";var n=r(9504),i=n({}.toString),o=n("".slice);t.exports=function(t){return o(i(t),8,-1)}},2211:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2777:function(t,e,r){"use strict";var n=r(9565),i=r(34),o=r(757),s=r(5966),a=r(4270),c=r(8227),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,c=s(t,l);if(c){if(void 0===e&&(e="default"),r=n(c,t,e),!i(r)||o(r))return r;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},2787:function(t,e,r){"use strict";var n=r(9297),i=r(4901),o=r(8981),s=r(6119),a=r(2211),c=s("IE_PROTO"),u=Object,l=u.prototype;t.exports=a?u.getPrototypeOf:function(t){var e=o(t);if(n(e,c))return e[c];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof u?l:null}},2796:function(t,e,r){"use strict";var n=r(9039),i=r(4901),o=/#|\.prototype\./,s=function(t,e){var r=c[a(t)];return r===l||r!==u&&(i(e)?n(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},2839:function(t,e,r){"use strict";var n=r(4576),i=n.navigator,o=i&&i.userAgent;t.exports=o?String(o):""},2967:function(t,e,r){"use strict";var n=r(6706),i=r(34),o=r(7750),s=r(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{t=n(Object.prototype,"__proto__","set"),t(r,[]),e=r instanceof Array}catch(a){}return function(r,n){return o(r),s(n),i(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0)},2992:function(t,e,r){var n,i=function(){var t=String.fromCharCode,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function i(t,e){if(!n[t]){n[t]={};for(var r=0;r<t.length;r++)n[t][t.charAt(r)]=r}return n[t][e]}var o={compressToBase64:function(t){if(null==t)return"";var r=o._compress(t,6,function(t){return e.charAt(t)});switch(r.length%4){default:case 0:return r;case 1:return r+"===";case 2:return r+"==";case 3:return r+"="}},decompressFromBase64:function(t){return null==t?"":""==t?null:o._decompress(t.length,32,function(r){return i(e,t.charAt(r))})},compressToUTF16:function(e){return null==e?"":o._compress(e,15,function(e){return t(e+32)})+" "},decompressFromUTF16:function(t){return null==t?"":""==t?null:o._decompress(t.length,16384,function(e){return t.charCodeAt(e)-32})},compressToUint8Array:function(t){for(var e=o.compress(t),r=new Uint8Array(2*e.length),n=0,i=e.length;n<i;n++){var s=e.charCodeAt(n);r[2*n]=s>>>8,r[2*n+1]=s%256}return r},decompressFromUint8Array:function(e){if(null===e||void 0===e)return o.decompress(e);for(var r=new Array(e.length/2),n=0,i=r.length;n<i;n++)r[n]=256*e[2*n]+e[2*n+1];var s=[];return r.forEach(function(e){s.push(t(e))}),o.decompress(s.join(""))},compressToEncodedURIComponent:function(t){return null==t?"":o._compress(t,6,function(t){return r.charAt(t)})},decompressFromEncodedURIComponent:function(t){return null==t?"":""==t?null:(t=t.replace(/ /g,"+"),o._decompress(t.length,32,function(e){return i(r,t.charAt(e))}))},compress:function(e){return o._compress(e,16,function(e){return t(e)})},_compress:function(t,e,r){if(null==t)return"";var n,i,o,s={},a={},c="",u="",l="",f=2,h=3,d=2,p=[],g=0,m=0;for(o=0;o<t.length;o+=1)if(c=t.charAt(o),Object.prototype.hasOwnProperty.call(s,c)||(s[c]=h++,a[c]=!0),u=l+c,Object.prototype.hasOwnProperty.call(s,u))l=u;else{if(Object.prototype.hasOwnProperty.call(a,l)){if(l.charCodeAt(0)<256){for(n=0;n<d;n++)g<<=1,m==e-1?(m=0,p.push(r(g)),g=0):m++;for(i=l.charCodeAt(0),n=0;n<8;n++)g=g<<1|1&i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i>>=1}else{for(i=1,n=0;n<d;n++)g=g<<1|i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i=0;for(i=l.charCodeAt(0),n=0;n<16;n++)g=g<<1|1&i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i>>=1}f--,0==f&&(f=Math.pow(2,d),d++),delete a[l]}else for(i=s[l],n=0;n<d;n++)g=g<<1|1&i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i>>=1;f--,0==f&&(f=Math.pow(2,d),d++),s[u]=h++,l=String(c)}if(""!==l){if(Object.prototype.hasOwnProperty.call(a,l)){if(l.charCodeAt(0)<256){for(n=0;n<d;n++)g<<=1,m==e-1?(m=0,p.push(r(g)),g=0):m++;for(i=l.charCodeAt(0),n=0;n<8;n++)g=g<<1|1&i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i>>=1}else{for(i=1,n=0;n<d;n++)g=g<<1|i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i=0;for(i=l.charCodeAt(0),n=0;n<16;n++)g=g<<1|1&i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i>>=1}f--,0==f&&(f=Math.pow(2,d),d++),delete a[l]}else for(i=s[l],n=0;n<d;n++)g=g<<1|1&i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i>>=1;f--,0==f&&(f=Math.pow(2,d),d++)}for(i=2,n=0;n<d;n++)g=g<<1|1&i,m==e-1?(m=0,p.push(r(g)),g=0):m++,i>>=1;while(1){if(g<<=1,m==e-1){p.push(r(g));break}m++}return p.join("")},decompress:function(t){return null==t?"":""==t?null:o._decompress(t.length,32768,function(e){return t.charCodeAt(e)})},_decompress:function(e,r,n){var i,o,s,a,c,u,l,f=[],h=4,d=4,p=3,g="",m=[],v={val:n(0),position:r,index:1};for(i=0;i<3;i+=1)f[i]=i;s=0,c=Math.pow(2,2),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=n(v.index++)),s|=(a>0?1:0)*u,u<<=1;switch(s){case 0:s=0,c=Math.pow(2,8),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=n(v.index++)),s|=(a>0?1:0)*u,u<<=1;l=t(s);break;case 1:s=0,c=Math.pow(2,16),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=n(v.index++)),s|=(a>0?1:0)*u,u<<=1;l=t(s);break;case 2:return""}f[3]=l,o=l,m.push(l);while(1){if(v.index>e)return"";s=0,c=Math.pow(2,p),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=n(v.index++)),s|=(a>0?1:0)*u,u<<=1;switch(l=s){case 0:s=0,c=Math.pow(2,8),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=n(v.index++)),s|=(a>0?1:0)*u,u<<=1;f[d++]=t(s),l=d-1,h--;break;case 1:s=0,c=Math.pow(2,16),u=1;while(u!=c)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=r,v.val=n(v.index++)),s|=(a>0?1:0)*u,u<<=1;f[d++]=t(s),l=d-1,h--;break;case 2:return m.join("")}if(0==h&&(h=Math.pow(2,p),p++),f[l])g=f[l];else{if(l!==d)return null;g=o+o.charAt(0)}m.push(g),f[d++]=o+g.charAt(0),h--,o=g,0==h&&(h=Math.pow(2,p),p++)}}};return o}();n=function(){return i}.call(e,r,e,t),void 0===n||(t.exports=n)},3392:function(t,e,r){"use strict";var n=r(9504),i=0,o=Math.random(),s=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},3506:function(t,e,r){"use strict";var n=r(3925),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o("Can't set "+i(t)+" as a prototype")}},3706:function(t,e,r){"use strict";var n=r(9504),i=r(4901),o=r(7629),s=n(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},3717:function(t,e){"use strict";e.f=Object.getOwnPropertySymbols},3724:function(t,e,r){"use strict";var n=r(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},3925:function(t,e,r){"use strict";var n=r(34);t.exports=function(t){return n(t)||null===t}},4055:function(t,e,r){"use strict";var n=r(4576),i=r(34),o=n.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},4114:function(t,e,r){"use strict";var n=r(6518),i=r(8981),o=r(6198),s=r(4527),a=r(6837),c=r(9039),u=c(function(){return 4294967297!==[].push.call({length:4294967296},1)}),l=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},f=u||!l();n({target:"Array",proto:!0,arity:1,forced:f},{push:function(t){var e=i(this),r=o(e),n=arguments.length;a(r+n);for(var c=0;c<n;c++)e[r]=arguments[c],r++;return s(e,r),r}})},4117:function(t){"use strict";t.exports=function(t){return null===t||void 0===t}},4270:function(t,e,r){"use strict";var n=r(9565),i=r(4901),o=r(34),s=TypeError;t.exports=function(t,e){var r,a;if("string"===e&&i(r=t.toString)&&!o(a=n(r,t)))return a;if(i(r=t.valueOf)&&!o(a=n(r,t)))return a;if("string"!==e&&i(r=t.toString)&&!o(a=n(r,t)))return a;throw new s("Can't convert object to primitive value")}},4376:function(t,e,r){"use strict";var n=r(2195);t.exports=Array.isArray||function(t){return"Array"===n(t)}},4495:function(t,e,r){"use strict";var n=r(9519),i=r(9039),o=r(4576),s=o.String;t.exports=!!Object.getOwnPropertySymbols&&!i(function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4527:function(t,e,r){"use strict";var n=r(3724),i=r(4376),o=TypeError,s=Object.getOwnPropertyDescriptor,a=n&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!s(t,"length").writable)throw new o("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},4576:function(t,e,r){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4644:function(t,e,r){"use strict";var n,i,o,s=r(7811),a=r(3724),c=r(4576),u=r(4901),l=r(34),f=r(9297),h=r(6955),d=r(6823),p=r(6699),g=r(6840),m=r(2106),v=r(1625),y=r(2787),b=r(2967),w=r(8227),x=r(3392),S=r(1181),k=S.enforce,C=S.get,E=c.Int8Array,R=E&&E.prototype,O=c.Uint8ClampedArray,A=O&&O.prototype,_=E&&y(E),T=R&&y(R),j=Object.prototype,I=c.TypeError,P=w("toStringTag"),U=x("TYPED_ARRAY_TAG"),M="TypedArrayConstructor",B=s&&!!b&&"Opera"!==h(c.opera),N=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},D={BigInt64Array:8,BigUint64Array:8},L=function(t){if(!l(t))return!1;var e=h(t);return"DataView"===e||f(F,e)||f(D,e)},$=function(t){var e=y(t);if(l(e)){var r=C(e);return r&&f(r,M)?r[M]:$(e)}},q=function(t){if(!l(t))return!1;var e=h(t);return f(F,e)||f(D,e)},z=function(t){if(q(t))return t;throw new I("Target is not a typed array")},W=function(t){if(u(t)&&(!b||v(_,t)))return t;throw new I(d(t)+" is not a typed array constructor")},H=function(t,e,r,n){if(a){if(r)for(var i in F){var o=c[i];if(o&&f(o.prototype,t))try{delete o.prototype[t]}catch(s){try{o.prototype[t]=e}catch(u){}}}T[t]&&!r||g(T,t,r?e:B&&R[t]||e,n)}},V=function(t,e,r){var n,i;if(a){if(b){if(r)for(n in F)if(i=c[n],i&&f(i,t))try{delete i[t]}catch(o){}if(_[t]&&!r)return;try{return g(_,t,r?e:B&&_[t]||e)}catch(o){}}for(n in F)i=c[n],!i||i[t]&&!r||g(i,t,e)}};for(n in F)i=c[n],o=i&&i.prototype,o?k(o)[M]=i:B=!1;for(n in D)i=c[n],o=i&&i.prototype,o&&(k(o)[M]=i);if((!B||!u(_)||_===Function.prototype)&&(_=function(){throw new I("Incorrect invocation")},B))for(n in F)c[n]&&b(c[n],_);if((!B||!T||T===j)&&(T=_.prototype,B))for(n in F)c[n]&&b(c[n].prototype,T);if(B&&y(A)!==T&&b(A,T),a&&!f(T,P))for(n in N=!0,m(T,P,{configurable:!0,get:function(){return l(this)?this[U]:void 0}}),F)c[n]&&p(c[n],U,n);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:N&&U,aTypedArray:z,aTypedArrayConstructor:W,exportTypedArrayMethod:H,exportTypedArrayStaticMethod:V,getTypedArrayConstructor:$,isView:L,isTypedArray:q,TypedArray:_,TypedArrayPrototype:T}},4901:function(t){"use strict";var e="object"==typeof document&&document.all;t.exports="undefined"==typeof e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:function(t,e,r){"use strict";var n=r(3724),i=r(5917),o=r(8686),s=r(8551),a=r(6969),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";e.f=n?o?function(t,e,r){if(s(t),e=a(e),s(r),"function"===typeof t&&"prototype"===e&&"value"in r&&d in r&&!r[d]){var n=l(t,e);n&&n[d]&&(t[e]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:f in r?r[f]:n[f],writable:!1})}return u(t,e,r)}:u:function(t,e,r){if(s(t),e=a(e),s(r),i)try{return u(t,e,r)}catch(n){}if("get"in r||"set"in r)throw new c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},5031:function(t,e,r){"use strict";var n=r(7751),i=r(9504),o=r(8480),s=r(3717),a=r(8551),c=i([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),r=s.f;return r?c(e,r(t)):e}},5397:function(t,e,r){"use strict";var n=r(7055),i=r(7750);t.exports=function(t){return n(i(t))}},5610:function(t,e,r){"use strict";var n=r(1291),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},5735:function(t){(function(e){t.exports=e()})(function(t){"use strict";var e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(t,e){var r=t[0],n=t[1],i=t[2],o=t[3];r+=(n&i|~n&o)+e[0]-680876936|0,r=(r<<7|r>>>25)+n|0,o+=(r&n|~r&i)+e[1]-389564586|0,o=(o<<12|o>>>20)+r|0,i+=(o&r|~o&n)+e[2]+606105819|0,i=(i<<17|i>>>15)+o|0,n+=(i&o|~i&r)+e[3]-1044525330|0,n=(n<<22|n>>>10)+i|0,r+=(n&i|~n&o)+e[4]-176418897|0,r=(r<<7|r>>>25)+n|0,o+=(r&n|~r&i)+e[5]+1200080426|0,o=(o<<12|o>>>20)+r|0,i+=(o&r|~o&n)+e[6]-1473231341|0,i=(i<<17|i>>>15)+o|0,n+=(i&o|~i&r)+e[7]-45705983|0,n=(n<<22|n>>>10)+i|0,r+=(n&i|~n&o)+e[8]+1770035416|0,r=(r<<7|r>>>25)+n|0,o+=(r&n|~r&i)+e[9]-1958414417|0,o=(o<<12|o>>>20)+r|0,i+=(o&r|~o&n)+e[10]-42063|0,i=(i<<17|i>>>15)+o|0,n+=(i&o|~i&r)+e[11]-1990404162|0,n=(n<<22|n>>>10)+i|0,r+=(n&i|~n&o)+e[12]+1804603682|0,r=(r<<7|r>>>25)+n|0,o+=(r&n|~r&i)+e[13]-40341101|0,o=(o<<12|o>>>20)+r|0,i+=(o&r|~o&n)+e[14]-1502002290|0,i=(i<<17|i>>>15)+o|0,n+=(i&o|~i&r)+e[15]+1236535329|0,n=(n<<22|n>>>10)+i|0,r+=(n&o|i&~o)+e[1]-165796510|0,r=(r<<5|r>>>27)+n|0,o+=(r&i|n&~i)+e[6]-1069501632|0,o=(o<<9|o>>>23)+r|0,i+=(o&n|r&~n)+e[11]+643717713|0,i=(i<<14|i>>>18)+o|0,n+=(i&r|o&~r)+e[0]-373897302|0,n=(n<<20|n>>>12)+i|0,r+=(n&o|i&~o)+e[5]-701558691|0,r=(r<<5|r>>>27)+n|0,o+=(r&i|n&~i)+e[10]+38016083|0,o=(o<<9|o>>>23)+r|0,i+=(o&n|r&~n)+e[15]-660478335|0,i=(i<<14|i>>>18)+o|0,n+=(i&r|o&~r)+e[4]-405537848|0,n=(n<<20|n>>>12)+i|0,r+=(n&o|i&~o)+e[9]+568446438|0,r=(r<<5|r>>>27)+n|0,o+=(r&i|n&~i)+e[14]-1019803690|0,o=(o<<9|o>>>23)+r|0,i+=(o&n|r&~n)+e[3]-187363961|0,i=(i<<14|i>>>18)+o|0,n+=(i&r|o&~r)+e[8]+1163531501|0,n=(n<<20|n>>>12)+i|0,r+=(n&o|i&~o)+e[13]-1444681467|0,r=(r<<5|r>>>27)+n|0,o+=(r&i|n&~i)+e[2]-51403784|0,o=(o<<9|o>>>23)+r|0,i+=(o&n|r&~n)+e[7]+1735328473|0,i=(i<<14|i>>>18)+o|0,n+=(i&r|o&~r)+e[12]-1926607734|0,n=(n<<20|n>>>12)+i|0,r+=(n^i^o)+e[5]-378558|0,r=(r<<4|r>>>28)+n|0,o+=(r^n^i)+e[8]-2022574463|0,o=(o<<11|o>>>21)+r|0,i+=(o^r^n)+e[11]+1839030562|0,i=(i<<16|i>>>16)+o|0,n+=(i^o^r)+e[14]-35309556|0,n=(n<<23|n>>>9)+i|0,r+=(n^i^o)+e[1]-1530992060|0,r=(r<<4|r>>>28)+n|0,o+=(r^n^i)+e[4]+1272893353|0,o=(o<<11|o>>>21)+r|0,i+=(o^r^n)+e[7]-155497632|0,i=(i<<16|i>>>16)+o|0,n+=(i^o^r)+e[10]-1094730640|0,n=(n<<23|n>>>9)+i|0,r+=(n^i^o)+e[13]+681279174|0,r=(r<<4|r>>>28)+n|0,o+=(r^n^i)+e[0]-358537222|0,o=(o<<11|o>>>21)+r|0,i+=(o^r^n)+e[3]-722521979|0,i=(i<<16|i>>>16)+o|0,n+=(i^o^r)+e[6]+76029189|0,n=(n<<23|n>>>9)+i|0,r+=(n^i^o)+e[9]-640364487|0,r=(r<<4|r>>>28)+n|0,o+=(r^n^i)+e[12]-421815835|0,o=(o<<11|o>>>21)+r|0,i+=(o^r^n)+e[15]+530742520|0,i=(i<<16|i>>>16)+o|0,n+=(i^o^r)+e[2]-995338651|0,n=(n<<23|n>>>9)+i|0,r+=(i^(n|~o))+e[0]-198630844|0,r=(r<<6|r>>>26)+n|0,o+=(n^(r|~i))+e[7]+1126891415|0,o=(o<<10|o>>>22)+r|0,i+=(r^(o|~n))+e[14]-1416354905|0,i=(i<<15|i>>>17)+o|0,n+=(o^(i|~r))+e[5]-57434055|0,n=(n<<21|n>>>11)+i|0,r+=(i^(n|~o))+e[12]+1700485571|0,r=(r<<6|r>>>26)+n|0,o+=(n^(r|~i))+e[3]-1894986606|0,o=(o<<10|o>>>22)+r|0,i+=(r^(o|~n))+e[10]-1051523|0,i=(i<<15|i>>>17)+o|0,n+=(o^(i|~r))+e[1]-2054922799|0,n=(n<<21|n>>>11)+i|0,r+=(i^(n|~o))+e[8]+1873313359|0,r=(r<<6|r>>>26)+n|0,o+=(n^(r|~i))+e[15]-30611744|0,o=(o<<10|o>>>22)+r|0,i+=(r^(o|~n))+e[6]-1560198380|0,i=(i<<15|i>>>17)+o|0,n+=(o^(i|~r))+e[13]+1309151649|0,n=(n<<21|n>>>11)+i|0,r+=(i^(n|~o))+e[4]-145523070|0,r=(r<<6|r>>>26)+n|0,o+=(n^(r|~i))+e[11]-1120210379|0,o=(o<<10|o>>>22)+r|0,i+=(r^(o|~n))+e[2]+718787259|0,i=(i<<15|i>>>17)+o|0,n+=(o^(i|~r))+e[9]-343485551|0,n=(n<<21|n>>>11)+i|0,t[0]=r+t[0]|0,t[1]=n+t[1]|0,t[2]=i+t[2]|0,t[3]=o+t[3]|0}function n(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return r}function i(t){var e,r=[];for(e=0;e<64;e+=4)r[e>>2]=t[e]+(t[e+1]<<8)+(t[e+2]<<16)+(t[e+3]<<24);return r}function o(t){var e,i,o,s,a,c,u=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=u;e+=64)r(l,n(t.substring(e-64,e)));for(t=t.substring(e-64),i=t.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<i;e+=1)o[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(r(l,o),e=0;e<16;e+=1)o[e]=0;return s=8*u,s=s.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,r(l,o),l}function s(t){var e,n,o,s,a,c,u=t.length,l=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=u;e+=64)r(l,i(t.subarray(e-64,e)));for(t=e-64<u?t.subarray(e-64):new Uint8Array(0),n=t.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],e=0;e<n;e+=1)o[e>>2]|=t[e]<<(e%4<<3);if(o[e>>2]|=128<<(e%4<<3),e>55)for(r(l,o),e=0;e<16;e+=1)o[e]=0;return s=8*u,s=s.toString(16).match(/(.*?)(.{0,8})$/),a=parseInt(s[2],16),c=parseInt(s[1],16)||0,o[14]=a,o[15]=c,r(l,o),l}function a(t){var r,n="";for(r=0;r<4;r+=1)n+=e[t>>8*r+4&15]+e[t>>8*r&15];return n}function c(t){var e;for(e=0;e<t.length;e+=1)t[e]=a(t[e]);return t.join("")}function u(t){return/[\u0080-\uFFFF]/.test(t)&&(t=unescape(encodeURIComponent(t))),t}function l(t,e){var r,n=t.length,i=new ArrayBuffer(n),o=new Uint8Array(i);for(r=0;r<n;r+=1)o[r]=t.charCodeAt(r);return e?o:i}function f(t){return String.fromCharCode.apply(null,new Uint8Array(t))}function h(t,e,r){var n=new Uint8Array(t.byteLength+e.byteLength);return n.set(new Uint8Array(t)),n.set(new Uint8Array(e),t.byteLength),r?n:n.buffer}function d(t){var e,r=[],n=t.length;for(e=0;e<n-1;e+=2)r.push(parseInt(t.substr(e,2),16));return String.fromCharCode.apply(String,r)}function p(){this.reset()}return"5d41402abc4b2a76b9719d911017c592"!==c(o("hello"))&&function(t,e){var r=(65535&t)+(65535&e),n=(t>>16)+(e>>16)+(r>>16);return n<<16|65535&r},"undefined"===typeof ArrayBuffer||ArrayBuffer.prototype.slice||function(){function e(t,e){return t=0|t||0,t<0?Math.max(t+e,0):Math.min(t,e)}ArrayBuffer.prototype.slice=function(r,n){var i,o,s,a,c=this.byteLength,u=e(r,c),l=c;return n!==t&&(l=e(n,c)),u>l?new ArrayBuffer(0):(i=l-u,o=new ArrayBuffer(i),s=new Uint8Array(o),a=new Uint8Array(this,u,i),s.set(a),o)}}(),p.prototype.append=function(t){return this.appendBinary(u(t)),this},p.prototype.appendBinary=function(t){this._buff+=t,this._length+=t.length;var e,i=this._buff.length;for(e=64;e<=i;e+=64)r(this._hash,n(this._buff.substring(e-64,e)));return this._buff=this._buff.substring(e-64),this},p.prototype.end=function(t){var e,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=n.charCodeAt(e)<<(e%4<<3);return this._finish(o,i),r=c(this._hash),t&&(r=d(r)),this.reset(),r},p.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},p.prototype.setState=function(t){return this._buff=t.buff,this._length=t.length,this._hash=t.hash,this},p.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},p.prototype._finish=function(t,e){var n,i,o,s=e;if(t[s>>2]|=128<<(s%4<<3),s>55)for(r(this._hash,t),s=0;s<16;s+=1)t[s]=0;n=8*this._length,n=n.toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),o=parseInt(n[1],16)||0,t[14]=i,t[15]=o,r(this._hash,t)},p.hash=function(t,e){return p.hashBinary(u(t),e)},p.hashBinary=function(t,e){var r=o(t),n=c(r);return e?d(n):n},p.ArrayBuffer=function(){this.reset()},p.ArrayBuffer.prototype.append=function(t){var e,n=h(this._buff.buffer,t,!0),o=n.length;for(this._length+=t.byteLength,e=64;e<=o;e+=64)r(this._hash,i(n.subarray(e-64,e)));return this._buff=e-64<o?new Uint8Array(n.buffer.slice(e-64)):new Uint8Array(0),this},p.ArrayBuffer.prototype.end=function(t){var e,r,n=this._buff,i=n.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<i;e+=1)o[e>>2]|=n[e]<<(e%4<<3);return this._finish(o,i),r=c(this._hash),t&&(r=d(r)),this.reset(),r},p.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},p.ArrayBuffer.prototype.getState=function(){var t=p.prototype.getState.call(this);return t.buff=f(t.buff),t},p.ArrayBuffer.prototype.setState=function(t){return t.buff=l(t.buff,!0),p.prototype.setState.call(this,t)},p.ArrayBuffer.prototype.destroy=p.prototype.destroy,p.ArrayBuffer.prototype._finish=p.prototype._finish,p.ArrayBuffer.hash=function(t,e){var r=s(new Uint8Array(t)),n=c(r);return e?d(n):n},p})},5745:function(t,e,r){"use strict";var n=r(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5854:function(t,e,r){"use strict";var n=r(2777),i=TypeError;t.exports=function(t){var e=n(t,"number");if("number"==typeof e)throw new i("Can't convert number to bigint");return BigInt(e)}},5917:function(t,e,r){"use strict";var n=r(3724),i=r(9039),o=r(4055);t.exports=!n&&!i(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},5966:function(t,e,r){"use strict";var n=r(9306),i=r(4117);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},6119:function(t,e,r){"use strict";var n=r(5745),i=r(3392),o=n("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},6198:function(t,e,r){"use strict";var n=r(8014);t.exports=function(t){return n(t.length)}},6395:function(t){"use strict";t.exports=!1},6518:function(t,e,r){"use strict";var n=r(4576),i=r(7347).f,o=r(6699),s=r(6840),a=r(9433),c=r(7740),u=r(2796);t.exports=function(t,e){var r,l,f,h,d,p,g=t.target,m=t.global,v=t.stat;if(l=m?n:v?n[g]||a(g,{}):n[g]&&n[g].prototype,l)for(f in e){if(d=e[f],t.dontCallGetSet?(p=i(l,f),h=p&&p.value):h=l[f],r=u(m?f:g+(v?".":"#")+f,t.forced),!r&&void 0!==h){if(typeof d==typeof h)continue;c(d,h)}(t.sham||h&&h.sham)&&o(d,"sham",!0),s(l,f,d,t)}}},6699:function(t,e,r){"use strict";var n=r(3724),i=r(4913),o=r(6980);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},6706:function(t,e,r){"use strict";var n=r(9504),i=r(9306);t.exports=function(t,e,r){try{return n(i(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(o){}}},6823:function(t){"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(r){return"Object"}}},6837:function(t){"use strict";var e=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw e("Maximum allowed index exceeded");return t}},6840:function(t,e,r){"use strict";var n=r(4901),i=r(4913),o=r(283),s=r(9433);t.exports=function(t,e,r,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(n(r)&&o(r,u,a),a.global)c?t[e]=r:s(e,r);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(l){}c?t[e]=r:i.f(t,e,{value:r,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},6955:function(t,e,r){"use strict";var n=r(2140),i=r(4901),o=r(2195),s=r(8227),a=s("toStringTag"),c=Object,u="Arguments"===o(function(){return arguments}()),l=function(t,e){try{return t[e]}catch(r){}};t.exports=n?o:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=l(e=c(t),a))?r:u?o(e):"Object"===(n=o(e))&&i(e.callee)?"Arguments":n}},6969:function(t,e,r){"use strict";var n=r(2777),i=r(757);t.exports=function(t){var e=n(t,"string");return i(e)?e:e+""}},6980:function(t){"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},7040:function(t,e,r){"use strict";var n=r(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:function(t,e,r){"use strict";var n=r(9504),i=r(9039),o=r(2195),s=Object,a=n("".split);t.exports=i(function(){return!s("z").propertyIsEnumerable(0)})?function(t){return"String"===o(t)?a(t,""):s(t)}:s},7347:function(t,e,r){"use strict";var n=r(3724),i=r(9565),o=r(8773),s=r(6980),a=r(5397),c=r(6969),u=r(9297),l=r(5917),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(r){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},7629:function(t,e,r){"use strict";var n=r(6395),i=r(4576),o=r(9433),s="__core-js_shared__",a=t.exports=i[s]||o(s,{});(a.versions||(a.versions=[])).push({version:"3.43.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7740:function(t,e,r){"use strict";var n=r(9297),i=r(5031),o=r(7347),s=r(4913);t.exports=function(t,e,r){for(var a=i(e),c=s.f,u=o.f,l=0;l<a.length;l++){var f=a[l];n(t,f)||r&&n(r,f)||c(t,f,u(e,f))}}},7750:function(t,e,r){"use strict";var n=r(4117),i=TypeError;t.exports=function(t){if(n(t))throw new i("Can't call method on "+t);return t}},7751:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(n[t]):n[t]&&n[t][e]}},7811:function(t){"use strict";t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},8014:function(t,e,r){"use strict";var n=r(1291),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},8227:function(t,e,r){"use strict";var n=r(4576),i=r(5745),o=r(9297),s=r(3392),a=r(4495),c=r(7040),u=n.Symbol,l=i("wks"),f=c?u["for"]||u:u&&u.withoutSetter||s;t.exports=function(t){return o(l,t)||(l[t]=a&&o(u,t)?u[t]:f("Symbol."+t)),l[t]}},8480:function(t,e,r){"use strict";var n=r(1828),i=r(8727),o=i.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},8551:function(t,e,r){"use strict";var n=r(34),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not an object")}},8622:function(t,e,r){"use strict";var n=r(4576),i=r(4901),o=n.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},8686:function(t,e,r){"use strict";var n=r(3724),i=r(9039);t.exports=n&&i(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8727:function(t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8773:function(t,e){"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function(t){var e=n(this,t);return!!e&&e.enumerable}:r},8981:function(t,e,r){"use strict";var n=r(7750),i=Object;t.exports=function(t){return i(n(t))}},9039:function(t){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},9297:function(t,e,r){"use strict";var n=r(9504),i=r(8981),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},9306:function(t,e,r){"use strict";var n=r(4901),i=r(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+" is not a function")}},9433:function(t,e,r){"use strict";var n=r(4576),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},9504:function(t,e,r){"use strict";var n=r(616),i=Function.prototype,o=i.call,s=n&&i.bind.bind(o,o);t.exports=n?s:function(t){return function(){return o.apply(t,arguments)}}},9519:function(t,e,r){"use strict";var n,i,o=r(4576),s=r(2839),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(n=l.split("."),i=n[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&s&&(n=s.match(/Edge\/(\d+)/),(!n||n[1]>=74)&&(n=s.match(/Chrome\/(\d+)/),n&&(i=+n[1]))),t.exports=i},9565:function(t,e,r){"use strict";var n=r(616),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},9577:function(t,e,r){"use strict";var n=r(9928),i=r(4644),o=r(1108),s=r(1291),a=r(5854),c=i.aTypedArray,u=i.getTypedArrayConstructor,l=i.exportTypedArrayMethod,f=function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}(),h=f&&function(){try{new Int8Array(1)["with"](-.5,1)}catch(t){return!0}}();l("with",{with:function(t,e){var r=c(this),i=s(t),l=o(r)?a(e):+e;return n(r,u(r),i,l)}}["with"],!f||h)},9617:function(t,e,r){"use strict";var n=r(5397),i=r(5610),o=r(6198),s=function(t){return function(e,r,s){var a=n(e),c=o(a);if(0===c)return!t&&-1;var u,l=i(s,c);if(t&&r!==r){while(c>l)if(u=a[l++],u!==u)return!0}else for(;c>l;l++)if((t||l in a)&&a[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},9928:function(t,e,r){"use strict";var n=r(6198),i=r(1291),o=RangeError;t.exports=function(t,e,r,s){var a=n(t),c=i(r),u=c<0?a+c:c;if(u>=a||u<0)throw new o("Incorrect index");for(var l=new e(a),f=0;f<a;f++)l[f]=f===u?s:t[f];return l}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,r),o.exports}!function(){r.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return r.d(e,{a:e}),e}}(),function(){r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})}}(),function(){r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"===typeof window)return window}}()}(),function(){r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}}(),function(){r.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}}(),function(){r.p=""}();var n={};return function(){"use strict";r.r(n),r.d(n,{default:function(){return nn}});var t={};if(r.r(t),r.d(t,{hasBrowserEnv:function(){return Lt},hasStandardBrowserEnv:function(){return qt},hasStandardBrowserWebWorkerEnv:function(){return zt},navigator:function(){return $t},origin:function(){return Wt}}),"undefined"!==typeof window){var e=window.document.currentScript,i=e&&e.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(r.p=i[1])}var o=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMask.apply(null,arguments)}}},[e("div",{staticClass:"modal-content"},[e("div",{staticClass:"modal-header"},[e("div",[t._v("AI抠图")]),e("div",{staticClass:"cancel-btn",on:{click:t.handleMask}},[t._v("关闭")])]),e("div",{staticClass:"modal-body"},[e("div",{staticClass:"container",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"title"},[t._v("*鼠标悬停并点击要抠图的部分,可智能识别要抠图的对象。抠图后,点击应用按钮")]),""==t.afterEditSrc?e("div",{staticClass:"workspace"},[e("img",{directives:[{name:"show",rawName:"v-show",value:t.path,expression:"path"}],ref:"imgRef",style:{width:t.w,height:t.h},attrs:{src:t.workspaceSrc,crossorigin:"anonymous"},on:{mousedown:t.handleMouseDown,mouseenter:function(e){t.canvasVisible=!0},mouseout:()=>{t.clicks.length||t.isEverything||(t.canvasVisible=!1)}}}),e("canvas",{directives:[{name:"show",rawName:"v-show",value:t.path&&t.canvasVisible,expression:"path && canvasVisible"}],ref:"canvasRef",attrs:{width:t.originalSize.w,height:t.originalSize.h}}),e("div",{style:{width:t.w,height:t.h},attrs:{id:"point-box"}})]):t._e(),""==t.afterEditSrc?e("div",{staticStyle:{display:"flex","justify-content":"center"}},[e("div",{staticClass:"button",on:{click:t.clearCanvas}},[t._v("重置框选")]),e("div",{staticClass:"button",on:{click:t.imageMatting}},[t._v("开始抠图")])]):t._e(),""!==t.afterEditSrc?e("div",[e("img",{staticStyle:{"min-width":"300px","min-height":"300px","max-width":"600px","max-height":"500px"},attrs:{src:t.afterEditSrc,crossorigin:"anonymous"}})]):t._e(),""!==t.afterEditSrc?e("div",{staticClass:"button",on:{click:t.handleOk}},[t._v("应用")]):t._e()]),e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"spin-mask"},[e("div",{staticClass:"spin-loading"},[e("span",{staticClass:"line-md--loading-alt-loop"}),e("div",[t._v("加载中...")])])])])],1)])])])},s=[];r(4114),r(9577);function a(t,e){return function(){return t.apply(e,arguments)}}const{toString:c}=Object.prototype,{getPrototypeOf:u}=Object,{iterator:l,toStringTag:f}=Symbol,h=(t=>e=>{const r=c.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),d=t=>(t=t.toLowerCase(),e=>h(e)===t),p=t=>e=>typeof e===t,{isArray:g}=Array,m=p("undefined");function v(t){return null!==t&&!m(t)&&null!==t.constructor&&!m(t.constructor)&&x(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const y=d("ArrayBuffer");function b(t){let e;return e="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&y(t.buffer),e}const w=p("string"),x=p("function"),S=p("number"),k=t=>null!==t&&"object"===typeof t,C=t=>!0===t||!1===t,E=t=>{if("object"!==h(t))return!1;const e=u(t);return(null===e||e===Object.prototype||null===Object.getPrototypeOf(e))&&!(f in t)&&!(l in t)},R=d("Date"),O=d("File"),A=d("Blob"),_=d("FileList"),T=t=>k(t)&&x(t.pipe),j=t=>{let e;return t&&("function"===typeof FormData&&t instanceof FormData||x(t.append)&&("formdata"===(e=h(t))||"object"===e&&x(t.toString)&&"[object FormData]"===t.toString()))},I=d("URLSearchParams"),[P,U,M,B]=["ReadableStream","Request","Response","Headers"].map(d),N=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function F(t,e,{allOwnKeys:r=!1}={}){if(null===t||"undefined"===typeof t)return;let n,i;if("object"!==typeof t&&(t=[t]),g(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,t[s],s,t)}}function D(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;while(i-- >0)if(n=r[i],e===n.toLowerCase())return n;return null}const L=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),$=t=>!m(t)&&t!==L;function q(){const{caseless:t}=$(this)&&this||{},e={},r=(r,n)=>{const i=t&&D(e,n)||n;E(e[i])&&E(r)?e[i]=q(e[i],r):E(r)?e[i]=q({},r):g(r)?e[i]=r.slice():e[i]=r};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&F(arguments[n],r);return e}const z=(t,e,r,{allOwnKeys:n}={})=>(F(e,(e,n)=>{r&&x(e)?t[n]=a(e,r):t[n]=e},{allOwnKeys:n}),t),W=t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),H=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},V=(t,e,r,n)=>{let i,o,s;const a={};if(e=e||{},null==t)return e;do{i=Object.getOwnPropertyNames(t),o=i.length;while(o-- >0)s=i[o],n&&!n(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==r&&u(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},X=(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},Y=t=>{if(!t)return null;if(g(t))return t;let e=t.length;if(!S(e))return null;const r=new Array(e);while(e-- >0)r[e]=t[e];return r},J=(t=>e=>t&&e instanceof t)("undefined"!==typeof Uint8Array&&u(Uint8Array)),K=(t,e)=>{const r=t&&t[l],n=r.call(t);let i;while((i=n.next())&&!i.done){const r=i.value;e.call(t,r[0],r[1])}},G=(t,e)=>{let r;const n=[];while(null!==(r=t.exec(e)))n.push(r);return n},Q=d("HTMLFormElement"),Z=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,e,r){return e.toUpperCase()+r}),tt=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),et=d("RegExp"),rt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};F(r,(r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)}),Object.defineProperties(t,n)},nt=t=>{rt(t,(e,r)=>{if(x(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];x(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},it=(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return g(t)?n(t):n(String(t).split(e)),r},ot=()=>{},st=(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e;function at(t){return!!(t&&x(t.append)&&"FormData"===t[f]&&t[l])}const ct=t=>{const e=new Array(10),r=(t,n)=>{if(k(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const i=g(t)?[]:{};return F(t,(t,e)=>{const o=r(t,n+1);!m(o)&&(i[e]=o)}),e[n]=void 0,i}}return t};return r(t,0)},ut=d("AsyncFunction"),lt=t=>t&&(k(t)||x(t))&&x(t.then)&&x(t.catch),ft=((t,e)=>t?setImmediate:e?((t,e)=>(L.addEventListener("message",({source:r,data:n})=>{r===L&&n===t&&e.length&&e.shift()()},!1),r=>{e.push(r),L.postMessage(t,"*")}))(`axios@${Math.random()}`,[]):t=>setTimeout(t))("function"===typeof setImmediate,x(L.postMessage)),ht="undefined"!==typeof queueMicrotask?queueMicrotask.bind(L):"undefined"!==typeof process&&process.nextTick||ft,dt=t=>null!=t&&x(t[l]);var pt={isArray:g,isArrayBuffer:y,isBuffer:v,isFormData:j,isArrayBufferView:b,isString:w,isNumber:S,isBoolean:C,isObject:k,isPlainObject:E,isReadableStream:P,isRequest:U,isResponse:M,isHeaders:B,isUndefined:m,isDate:R,isFile:O,isBlob:A,isRegExp:et,isFunction:x,isStream:T,isURLSearchParams:I,isTypedArray:J,isFileList:_,forEach:F,merge:q,extend:z,trim:N,stripBOM:W,inherits:H,toFlatObject:V,kindOf:h,kindOfTest:d,endsWith:X,toArray:Y,forEachEntry:K,matchAll:G,isHTMLForm:Q,hasOwnProperty:tt,hasOwnProp:tt,reduceDescriptors:rt,freezeMethods:nt,toObjectSet:it,toCamelCase:Z,noop:ot,toFiniteNumber:st,findKey:D,global:L,isContextDefined:$,isSpecCompliantForm:at,toJSONObject:ct,isAsyncFn:ut,isThenable:lt,setImmediate:ft,asap:ht,isIterable:dt};function gt(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}pt.inherits(gt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:pt.toJSONObject(this.config),code:this.code,status:this.status}}});const mt=gt.prototype,vt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{vt[t]={value:t}}),Object.defineProperties(gt,vt),Object.defineProperty(mt,"isAxiosError",{value:!0}),gt.from=(t,e,r,n,i,o)=>{const s=Object.create(mt);return pt.toFlatObject(t,s,function(t){return t!==Error.prototype},t=>"isAxiosError"!==t),gt.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};var yt=gt,bt=null;function wt(t){return pt.isPlainObject(t)||pt.isArray(t)}function xt(t){return pt.endsWith(t,"[]")?t.slice(0,-2):t}function St(t,e,r){return t?t.concat(e).map(function(t,e){return t=xt(t),!r&&e?"["+t+"]":t}).join(r?".":""):e}function kt(t){return pt.isArray(t)&&!t.some(wt)}const Ct=pt.toFlatObject(pt,{},null,function(t){return/^is[A-Z]/.test(t)});function Et(t,e,r){if(!pt.isObject(t))throw new TypeError("target must be an object");e=e||new(bt||FormData),r=pt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(t,e){return!pt.isUndefined(e[t])});const n=r.metaTokens,i=r.visitor||l,o=r.dots,s=r.indexes,a=r.Blob||"undefined"!==typeof Blob&&Blob,c=a&&pt.isSpecCompliantForm(e);if(!pt.isFunction(i))throw new TypeError("visitor must be a function");function u(t){if(null===t)return"";if(pt.isDate(t))return t.toISOString();if(pt.isBoolean(t))return t.toString();if(!c&&pt.isBlob(t))throw new yt("Blob is not supported. Use a Buffer instead.");return pt.isArrayBuffer(t)||pt.isTypedArray(t)?c&&"function"===typeof Blob?new Blob([t]):Buffer.from(t):t}function l(t,r,i){let a=t;if(t&&!i&&"object"===typeof t)if(pt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(pt.isArray(t)&&kt(t)||(pt.isFileList(t)||pt.endsWith(r,"[]"))&&(a=pt.toArray(t)))return r=xt(r),a.forEach(function(t,n){!pt.isUndefined(t)&&null!==t&&e.append(!0===s?St([r],n,o):null===s?r:r+"[]",u(t))}),!1;return!!wt(t)||(e.append(St(i,r,o),u(t)),!1)}const f=[],h=Object.assign(Ct,{defaultVisitor:l,convertValue:u,isVisitable:wt});function d(t,r){if(!pt.isUndefined(t)){if(-1!==f.indexOf(t))throw Error("Circular reference detected in "+r.join("."));f.push(t),pt.forEach(t,function(t,n){const o=!(pt.isUndefined(t)||null===t)&&i.call(e,t,pt.isString(n)?n.trim():n,r,h);!0===o&&d(t,r?r.concat(n):[n])}),f.pop()}}if(!pt.isObject(t))throw new TypeError("data must be an object");return d(t),e}var Rt=Et;function Ot(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(t){return e[t]})}function At(t,e){this._pairs=[],t&&Rt(t,this,e)}const _t=At.prototype;_t.append=function(t,e){this._pairs.push([t,e])},_t.toString=function(t){const e=t?function(e){return t.call(this,e,Ot)}:Ot;return this._pairs.map(function(t){return e(t[0])+"="+e(t[1])},"").join("&")};var Tt=At;function jt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function It(t,e,r){if(!e)return t;const n=r&&r.encode||jt;pt.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let o;if(o=i?i(e,r):pt.isURLSearchParams(e)?e.toString():new Tt(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}class Pt{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){pt.forEach(this.handlers,function(e){null!==e&&t(e)})}}var Ut=Pt,Mt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bt="undefined"!==typeof URLSearchParams?URLSearchParams:Tt,Nt="undefined"!==typeof FormData?FormData:null,Ft="undefined"!==typeof Blob?Blob:null,Dt={isBrowser:!0,classes:{URLSearchParams:Bt,FormData:Nt,Blob:Ft},protocols:["http","https","file","blob","url","data"]};const Lt="undefined"!==typeof window&&"undefined"!==typeof document,$t="object"===typeof navigator&&navigator||void 0,qt=Lt&&(!$t||["ReactNative","NativeScript","NS"].indexOf($t.product)<0),zt=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),Wt=Lt&&window.location.href||"http://localhost";var Ht={...t,...Dt};function Vt(t,e){return Rt(t,new Ht.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return Ht.isNode&&pt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}function Xt(t){return pt.matchAll(/\w+|\[(\w*)]/g,t).map(t=>"[]"===t[0]?"":t[1]||t[0])}function Yt(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}function Jt(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=t.length;if(o=!o&&pt.isArray(n)?n.length:o,a)return pt.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s;n[o]&&pt.isObject(n[o])||(n[o]=[]);const c=e(t,r,n[o],i);return c&&pt.isArray(n[o])&&(n[o]=Yt(n[o])),!s}if(pt.isFormData(t)&&pt.isFunction(t.entries)){const r={};return pt.forEachEntry(t,(t,n)=>{e(Xt(t),n,r,0)}),r}return null}var Kt=Jt;function Gt(t,e,r){if(pt.isString(t))try{return(e||JSON.parse)(t),pt.trim(t)}catch(n){if("SyntaxError"!==n.name)throw n}return(r||JSON.stringify)(t)}const Qt={transitional:Mt,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=pt.isObject(t);i&&pt.isHTMLForm(t)&&(t=new FormData(t));const o=pt.isFormData(t);if(o)return n?JSON.stringify(Kt(t)):t;if(pt.isArrayBuffer(t)||pt.isBuffer(t)||pt.isStream(t)||pt.isFile(t)||pt.isBlob(t)||pt.isReadableStream(t))return t;if(pt.isArrayBufferView(t))return t.buffer;if(pt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Vt(t,this.formSerializer).toString();if((s=pt.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Rt(s?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),Gt(t)):t}],transformResponse:[function(t){const e=this.transitional||Qt.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(pt.isResponse(t)||pt.isReadableStream(t))return t;if(t&&pt.isString(t)&&(r&&!this.responseType||n)){const r=e&&e.silentJSONParsing,o=!r&&n;try{return JSON.parse(t)}catch(i){if(o){if("SyntaxError"===i.name)throw yt.from(i,yt.ERR_BAD_RESPONSE,this,null,this.response);throw i}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ht.classes.FormData,Blob:Ht.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};pt.forEach(["delete","get","head","post","put","patch"],t=>{Qt.headers[t]={}});var Zt=Qt;const te=pt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var ee=t=>{const e={};let r,n,i;return t&&t.split("\n").forEach(function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&te[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};const re=Symbol("internals");function ne(t){return t&&String(t).trim().toLowerCase()}function ie(t){return!1===t||null==t?t:pt.isArray(t)?t.map(ie):String(t)}function oe(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;while(n=r.exec(t))e[n[1]]=n[2];return e}const se=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ae(t,e,r,n,i){return pt.isFunction(n)?n.call(this,e,r):(i&&(e=r),pt.isString(e)?pt.isString(n)?-1!==e.indexOf(n):pt.isRegExp(n)?n.test(e):void 0:void 0)}function ce(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,r)=>e.toUpperCase()+r)}function ue(t,e){const r=pt.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})})}class le{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=ne(e);if(!i)throw new Error("header name must be a non-empty string");const o=pt.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=ie(t))}const o=(t,e)=>pt.forEach(t,(t,r)=>i(t,r,e));if(pt.isPlainObject(t)||t instanceof this.constructor)o(t,e);else if(pt.isString(t)&&(t=t.trim())&&!se(t))o(ee(t),e);else if(pt.isObject(t)&&pt.isIterable(t)){let r,n,i={};for(const e of t){if(!pt.isArray(e))throw TypeError("Object iterator must return a key-value pair");i[n=e[0]]=(r=i[n])?pt.isArray(r)?[...r,e[1]]:[r,e[1]]:e[1]}o(i,e)}else null!=t&&i(e,t,r);return this}get(t,e){if(t=ne(t),t){const r=pt.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return oe(t);if(pt.isFunction(e))return e.call(this,t,r);if(pt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ne(t),t){const r=pt.findKey(this,t);return!(!r||void 0===this[r]||e&&!ae(this,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=ne(t),t){const i=pt.findKey(r,t);!i||e&&!ae(r,r[i],i,e)||(delete r[i],n=!0)}}return pt.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;while(r--){const i=e[r];t&&!ae(this,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return pt.forEach(this,(n,i)=>{const o=pt.findKey(r,i);if(o)return e[o]=ie(n),void delete e[i];const s=t?ce(i):String(i).trim();s!==i&&delete e[i],e[s]=ie(n),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return pt.forEach(this,(r,n)=>{null!=r&&!1!==r&&(e[n]=t&&pt.isArray(r)?r.join(", "):r)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join("\n")}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,...e){const r=new this(t);return e.forEach(t=>r.set(t)),r}static accessor(t){const e=this[re]=this[re]={accessors:{}},r=e.accessors,n=this.prototype;function i(t){const e=ne(t);r[e]||(ue(n,t),r[e]=!0)}return pt.isArray(t)?t.forEach(i):i(t),this}}le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),pt.reduceDescriptors(le.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}}),pt.freezeMethods(le);var fe=le;function he(t,e){const r=this||Zt,n=e||r,i=fe.from(n.headers);let o=n.data;return pt.forEach(t,function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function de(t){return!(!t||!t.__CANCEL__)}function pe(t,e,r){yt.call(this,null==t?"canceled":t,yt.ERR_CANCELED,e,r),this.name="CanceledError"}pt.inherits(pe,yt,{__CANCEL__:!0});var ge=pe;function me(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new yt("Request failed with status code "+r.status,[yt.ERR_BAD_REQUEST,yt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}function ve(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ye(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=n[s];i||(i=c),r[o]=a,n[o]=c;let l=s,f=0;while(l!==o)f+=r[l++],l%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const h=u&&c-u;return h?Math.round(1e3*f/h):void 0}}var be=ye;function we(t,e){let r,n,i=0,o=1e3/e;const s=(e,o=Date.now())=>{i=o,r=null,n&&(clearTimeout(n),n=null),t.apply(null,e)},a=(...t)=>{const e=Date.now(),a=e-i;a>=o?s(t,e):(r=t,n||(n=setTimeout(()=>{n=null,s(r)},o-a)))},c=()=>r&&s(r);return[a,c]}var xe=we;const Se=(t,e,r=3)=>{let n=0;const i=be(50,250);return xe(r=>{const o=r.loaded,s=r.lengthComputable?r.total:void 0,a=o-n,c=i(a),u=o<=s;n=o;const l={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&u?(s-o)/c:void 0,event:r,lengthComputable:null!=s,[e?"download":"upload"]:!0};t(l)},r)},ke=(t,e)=>{const r=null!=t;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},Ce=t=>(...e)=>pt.asap(()=>t(...e));var Ee=Ht.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,Ht.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(Ht.origin),Ht.navigator&&/(msie|trident)/i.test(Ht.navigator.userAgent)):()=>!0,Re=Ht.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const s=[t+"="+encodeURIComponent(e)];pt.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),pt.isString(n)&&s.push("path="+n),pt.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Oe(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ae(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function _e(t,e,r){let n=!Oe(e);return t&&(n||0==r)?Ae(t,e):e}const Te=t=>t instanceof fe?{...t}:t;function je(t,e){e=e||{};const r={};function n(t,e,r,n){return pt.isPlainObject(t)&&pt.isPlainObject(e)?pt.merge.call({caseless:n},t,e):pt.isPlainObject(e)?pt.merge({},e):pt.isArray(e)?e.slice():e}function i(t,e,r,i){return pt.isUndefined(e)?pt.isUndefined(t)?void 0:n(void 0,t,r,i):n(t,e,r,i)}function o(t,e){if(!pt.isUndefined(e))return n(void 0,e)}function s(t,e){return pt.isUndefined(e)?pt.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function a(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e,r)=>i(Te(t),Te(e),r,!0)};return pt.forEach(Object.keys(Object.assign({},t,e)),function(n){const o=c[n]||i,s=o(t[n],e[n],n);pt.isUndefined(s)&&o!==a||(r[n]=s)}),r}var Ie=t=>{const e=je({},t);let r,{data:n,withXSRFToken:i,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:c}=e;if(e.headers=a=fe.from(a),e.url=It(_e(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),pt.isFormData(n))if(Ht.hasStandardBrowserEnv||Ht.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[t,...e]=r?r.split(";").map(t=>t.trim()).filter(Boolean):[];a.setContentType([t||"multipart/form-data",...e].join("; "))}if(Ht.hasStandardBrowserEnv&&(i&&pt.isFunction(i)&&(i=i(e)),i||!1!==i&&Ee(e.url))){const t=o&&s&&Re.read(s);t&&a.set(o,t)}return e};const Pe="undefined"!==typeof XMLHttpRequest;var Ue=Pe&&function(t){return new Promise(function(e,r){const n=Ie(t);let i=n.data;const o=fe.from(n.headers).normalize();let s,a,c,u,l,{responseType:f,onUploadProgress:h,onDownloadProgress:d}=n;function p(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function m(){if(!g)return;const n=fe.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),i=f&&"text"!==f&&"json"!==f?g.response:g.responseText,o={data:i,status:g.status,statusText:g.statusText,headers:n,config:t,request:g};me(function(t){e(t),p()},function(t){r(t),p()},o),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(r(new yt("Request aborted",yt.ECONNABORTED,t,g)),g=null)},g.onerror=function(){r(new yt("Network Error",yt.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let e=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const i=n.transitional||Mt;n.timeoutErrorMessage&&(e=n.timeoutErrorMessage),r(new yt(e,i.clarifyTimeoutError?yt.ETIMEDOUT:yt.ECONNABORTED,t,g)),g=null},void 0===i&&o.setContentType(null),"setRequestHeader"in g&&pt.forEach(o.toJSON(),function(t,e){g.setRequestHeader(e,t)}),pt.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),f&&"json"!==f&&(g.responseType=n.responseType),d&&([c,l]=Se(d,!0),g.addEventListener("progress",c)),h&&g.upload&&([a,u]=Se(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(s=e=>{g&&(r(!e||e.type?new ge(null,t,g):e),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const v=ve(n.url);v&&-1===Ht.protocols.indexOf(v)?r(new yt("Unsupported protocol "+v+":",yt.ERR_BAD_REQUEST,t)):g.send(i||null)})};const Me=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let r,n=new AbortController;const i=function(t){if(!r){r=!0,s();const e=t instanceof Error?t:this.reason;n.abort(e instanceof yt?e:new ge(e instanceof Error?e.message:e))}};let o=e&&setTimeout(()=>{o=null,i(new yt(`timeout ${e} of ms exceeded`,yt.ETIMEDOUT))},e);const s=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(t=>{t.unsubscribe?t.unsubscribe(i):t.removeEventListener("abort",i)}),t=null)};t.forEach(t=>t.addEventListener("abort",i));const{signal:a}=n;return a.unsubscribe=()=>pt.asap(s),a}};var Be=Me;const Ne=function*(t,e){let r=t.byteLength;if(!e||r<e)return void(yield t);let n,i=0;while(i<r)n=i+e,yield t.slice(i,n),i=n},Fe=async function*(t,e){for await(const r of De(t))yield*Ne(r,e)},De=async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:r}=await e.read();if(t)break;yield r}}finally{await e.cancel()}},Le=(t,e,r,n)=>{const i=Fe(t,e);let o,s=0,a=t=>{o||(o=!0,n&&n(t))};return new ReadableStream({async pull(t){try{const{done:e,value:n}=await i.next();if(e)return a(),void t.close();let o=n.byteLength;if(r){let t=s+=o;r(t)}t.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel(t){return a(t),i.return()}},{highWaterMark:2})},$e="function"===typeof fetch&&"function"===typeof Request&&"function"===typeof Response,qe=$e&&"function"===typeof ReadableStream,ze=$e&&("function"===typeof TextEncoder?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),We=(t,...e)=>{try{return!!t(...e)}catch(r){return!1}},He=qe&&We(()=>{let t=!1;const e=new Request(Ht.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Ve=65536,Xe=qe&&We(()=>pt.isReadableStream(new Response("").body)),Ye={stream:Xe&&(t=>t.body)};$e&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ye[e]&&(Ye[e]=pt.isFunction(t[e])?t=>t[e]():(t,r)=>{throw new yt(`Response type '${e}' is not supported`,yt.ERR_NOT_SUPPORT,r)})})})(new Response);const Je=async t=>{if(null==t)return 0;if(pt.isBlob(t))return t.size;if(pt.isSpecCompliantForm(t)){const e=new Request(Ht.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return pt.isArrayBufferView(t)||pt.isArrayBuffer(t)?t.byteLength:(pt.isURLSearchParams(t)&&(t+=""),pt.isString(t)?(await ze(t)).byteLength:void 0)},Ke=async(t,e)=>{const r=pt.toFiniteNumber(t.getContentLength());return null==r?Je(e):r};var Ge=$e&&(async t=>{let{url:e,method:r,data:n,signal:i,cancelToken:o,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:h}=Ie(t);u=u?(u+"").toLowerCase():"text";let d,p=Be([i,o&&o.toAbortSignal()],s);const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(c&&He&&"get"!==r&&"head"!==r&&0!==(m=await Ke(l,n))){let t,r=new Request(e,{method:"POST",body:n,duplex:"half"});if(pt.isFormData(n)&&(t=r.headers.get("content-type"))&&l.setContentType(t),r.body){const[t,e]=ke(m,Se(Ce(c)));n=Le(r.body,Ve,t,e)}}pt.isString(f)||(f=f?"include":"omit");const i="credentials"in Request.prototype;d=new Request(e,{...h,signal:p,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:i?f:void 0});let o=await fetch(d,h);const s=Xe&&("stream"===u||"response"===u);if(Xe&&(a||s&&g)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=o[e]});const e=pt.toFiniteNumber(o.headers.get("content-length")),[r,n]=a&&ke(e,Se(Ce(a),!0))||[];o=new Response(Le(o.body,Ve,r,()=>{n&&n(),g&&g()}),t)}u=u||"text";let v=await Ye[pt.findKey(Ye,u)||"text"](o,t);return!s&&g&&g(),await new Promise((e,r)=>{me(e,r,{data:v,headers:fe.from(o.headers),status:o.status,statusText:o.statusText,config:t,request:d})})}catch(v){if(g&&g(),v&&"TypeError"===v.name&&/Load failed|fetch/i.test(v.message))throw Object.assign(new yt("Network Error",yt.ERR_NETWORK,t,d),{cause:v.cause||v});throw yt.from(v,v&&v.code,t,d)}});const Qe={http:bt,xhr:Ue,fetch:Ge};pt.forEach(Qe,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(r){}Object.defineProperty(t,"adapterName",{value:e})}});const Ze=t=>`- ${t}`,tr=t=>pt.isFunction(t)||null===t||!1===t;var er={getAdapter:t=>{t=pt.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){let e;if(r=t[o],n=r,!tr(r)&&(n=Qe[(e=String(r)).toLowerCase()],void 0===n))throw new yt(`Unknown adapter '${e}'`);if(n)break;i[e||"#"+o]=n}if(!n){const t=Object.entries(i).map(([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build"));let r=e?t.length>1?"since :\n"+t.map(Ze).join("\n"):" "+Ze(t[0]):"as no adapter specified";throw new yt("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n},adapters:Qe};function rr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ge(null,t)}function nr(t){rr(t),t.headers=fe.from(t.headers),t.data=he.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const e=er.getAdapter(t.adapter||Zt.adapter);return e(t).then(function(e){return rr(t),e.data=he.call(t,t.transformResponse,e),e.headers=fe.from(e.headers),e},function(e){return de(e)||(rr(t),e&&e.response&&(e.response.data=he.call(t,t.transformResponse,e.response),e.response.headers=fe.from(e.response.headers))),Promise.reject(e)})}const ir="1.10.0",or={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{or[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const sr={};function ar(t,e,r){if("object"!==typeof t)throw new yt("options must be an object",yt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;while(i-- >0){const o=n[i],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new yt("option "+o+" must be "+r,yt.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new yt("Unknown option "+o,yt.ERR_BAD_OPTION)}}or.transitional=function(t,e,r){function n(t,e){return"[Axios v"+ir+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new yt(n(i," has been removed"+(e?" in "+e:"")),yt.ERR_DEPRECATED);return e&&!sr[i]&&(sr[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}},or.spelling=function(t){return(e,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};var cr={assertOptions:ar,validators:or};const ur=cr.validators;class lr{constructor(t){this.defaults=t||{},this.interceptors={request:new Ut,response:new Ut}}async request(t,e){try{return await this._request(t,e)}catch(r){if(r instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const e=t.stack?t.stack.replace(/^.+\n/,""):"";try{r.stack?e&&!String(r.stack).endsWith(e.replace(/^.+\n.+\n/,""))&&(r.stack+="\n"+e):r.stack=e}catch(n){}}throw r}}_request(t,e){"string"===typeof t?(e=e||{},e.url=t):e=t||{},e=je(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&cr.assertOptions(r,{silentJSONParsing:ur.transitional(ur.boolean),forcedJSONParsing:ur.transitional(ur.boolean),clarifyTimeoutError:ur.transitional(ur.boolean)},!1),null!=n&&(pt.isFunction(n)?e.paramsSerializer={serialize:n}:cr.assertOptions(n,{encode:ur.function,serialize:ur.function},!0)),void 0!==e.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?e.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:e.allowAbsoluteUrls=!0),cr.assertOptions(e,{baseUrl:ur.spelling("baseURL"),withXsrfToken:ur.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&pt.merge(i.common,i[e.method]);i&&pt.forEach(["delete","get","head","post","put","patch","common"],t=>{delete i[t]}),e.headers=fe.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach(function(t){"function"===typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))});const c=[];let u;this.interceptors.response.forEach(function(t){c.push(t.fulfilled,t.rejected)});let l,f=0;if(!a){const t=[nr.bind(this),void 0];t.unshift.apply(t,s),t.push.apply(t,c),l=t.length,u=Promise.resolve(e);while(f<l)u=u.then(t[f++],t[f++]);return u}l=s.length;let h=e;f=0;while(f<l){const t=s[f++],e=s[f++];try{h=t(h)}catch(d){e.call(this,d);break}}try{u=nr.call(this,h)}catch(d){return Promise.reject(d)}f=0,l=c.length;while(f<l)u=u.then(c[f++],c[f++]);return u}getUri(t){t=je(this.defaults,t);const e=_e(t.baseURL,t.url,t.allowAbsoluteUrls);return It(e,t.params,t.paramsSerializer)}}pt.forEach(["delete","get","head","options"],function(t){lr.prototype[t]=function(e,r){return this.request(je(r||{},{method:t,url:e,data:(r||{}).data}))}}),pt.forEach(["post","put","patch"],function(t){function e(e){return function(r,n,i){return this.request(je(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}lr.prototype[t]=e(),lr.prototype[t+"Form"]=e(!0)});var fr=lr;class hr{constructor(t){if("function"!==typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(t){e=t});const r=this;this.promise.then(t=>{if(!r._listeners)return;let e=r._listeners.length;while(e-- >0)r._listeners[e](t);r._listeners=null}),this.promise.then=t=>{let e;const n=new Promise(t=>{r.subscribe(t),e=t}).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t(function(t,n,i){r.reason||(r.reason=new ge(t,n,i),e(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;const e=new hr(function(e){t=e});return{token:e,cancel:t}}}var dr=hr;function pr(t){return function(e){return t.apply(null,e)}}function gr(t){return pt.isObject(t)&&!0===t.isAxiosError}const mr={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(mr).forEach(([t,e])=>{mr[e]=t});var vr=mr;function yr(t){const e=new fr(t),r=a(fr.prototype.request,e);return pt.extend(r,fr.prototype,e,{allOwnKeys:!0}),pt.extend(r,e,null,{allOwnKeys:!0}),r.create=function(e){return yr(je(t,e))},r}const br=yr(Zt);br.Axios=fr,br.CanceledError=ge,br.CancelToken=dr,br.isCancel=de,br.VERSION=ir,br.toFormData=Rt,br.AxiosError=yt,br.Cancel=br.CanceledError,br.all=function(t){return Promise.all(t)},br.spread=pr,br.isAxiosError=gr,br.mergeConfig=je,br.AxiosHeaders=fe,br.formToJSON=t=>Kt(pt.isHTMLForm(t)?new FormData(t):t),br.getAdapter=er.getAdapter,br.HttpStatusCode=vr,br.default=br;var wr=br,xr=r(2992),Sr=r.n(xr);const kr={uploadImg:"https://apollo.51kandianshi.com/imageaicutout/sam/api/upload",fakeSegment:"https://apollo.51kandianshi.com/imageaicutout/sam/api/segment",API_IMG:"https://outerh5.51kandianshi.com/staticsaicoutout"};var Cr={name:"ImageMatting",props:{visible:{type:Boolean,default:!1},src:{type:String,default:""}},data(){return{workspaceSrc:this.src,path:"",loading:!1,imgRef:null,canvasRef:null,ctx:null,originalSize:{w:0,h:0},w:"0",h:"0",left:0,scale:1,clicks:[],lock:!1,canvasVisible:!0,isEverything:!1,afterEditSrc:""}},watch:{visible:async function(t){t?(await this.$nextTick(),this.ctx=this.$refs.canvasRef.getContext("2d"),this.initImage()):(this.workspaceSrc="",this.afterEditSrc="")}},methods:{close(){this.$emit("update:visible",!1)},handleMask(){this.visible&&this.close()},async initImage(){const t=await fetch(this.src),e=await t.blob(),{data:r}=await wr.post(kr.uploadImg,{file:new File([e],"image.jpg",{type:"image/jpeg"})},{headers:{"Content-Type":"multipart/form-data"}}),n=new Image;n.src=`${kr.API_IMG}/sam/api/upload/${r.filename}`,this.workspaceSrc=`${kr.API_IMG}/sam/api/upload/${r.filename}`,this.path=r.path,n.onload=()=>{let t,e,r=n.width,i=n.height,o=800,s=500;console.log(o,s);let a=r/i;a*s>o?(t=o,e=o/a):(e=s,t=a*s),this.originalSize={w:r,h:i},t=parseInt(t),e=parseInt(e),this.w=t+"px",this.h=e+"px",this.left=(o-t)/2,this.scale=t/r,this.$refs.imgRef.addEventListener("contextmenu",t=>t.preventDefault()),this.$refs.imgRef.addEventListener("mousemove",this.throttle(this.handleMouseMove,150)),this.$refs.canvasRef.style.transform=`scale(${this.scale})`}},handleMouseMove(t){if(this.isEverything)return;if(0!==this.clicks.length)return;if(this.lock)return;this.lock=!0;let e=this.getClick(t);requestIdleCallback(()=>{this.getMask([e])})},handleMouseDown(t){if(t.preventDefault(),t.stopPropagation(),1===t.button)return;if(this.isEverything)return;if(this.lock)return;this.lock=!0;let e=this.getClick(t);this.placePoint(t.offsetX,t.offsetY,e.clickType),this.clicks.push(e),requestIdleCallback(()=>{this.getMask()})},getClick(t){let e={x:t.offsetX,y:t.offsetY};const r=this.scale;return e.x/=r,e.y/=r,3===t.which?e.clickType=0:1!==t.which&&0!==t.which||(e.clickType=1),e},placePoint(t,e,r){let n=document.getElementById("point-box"),i=document.createElement("div");i.className="segment-point"+(r?"":" negative"),i.style=`position: absolute;\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: ${r?"#409EFF":"#F56C6C "};\n left: ${t-5}px;\n top: ${e-5}px`,i.id="point-"+this.clicks.length,n.appendChild(i)},getMask(t){null==t&&(t=this.clicks);const e={path:this.path,clicks:t};console.log(e),wr.post(kr.fakeSegment,e).then(t=>{const e=t.data.shape,r=Sr().decompressFromEncodedURIComponent(t.data.mask),n=this.rleFrString(r);this.drawCanvas(e,this.decodeRleCounts(e,n)),this.lock=!1}).catch(t=>{console.error(t),this.lock=!1})},drawCanvas(t,e){let r=t[0],n=t[1],i=this.ctx.getImageData(0,0,n,r),o=i.data,s=0;for(let a=0;a<n;a++)for(let t=0;t<r;t++)0===e[s++]?(o[0+4*(n*t+a)]=40,o[1+4*(n*t+a)]=40,o[2+4*(n*t+a)]=40,o[3+4*(n*t+a)]=190):o[3+4*(n*t+a)]=0;this.ctx.putImageData(i,0,0)},removePoint(t){const e="point-"+t;let r=document.getElementById(e);null!=r&&r.remove()},clearCanvas(){for(let t=0;t<this.clicks.length;t++)this.removePoint(t);this.clicks=[],this.isEverything=!1,this.ctx.clearRect(0,0,this.$refs.canvasRef.width,this.$refs.canvasRef.height)},imageMatting(){this.lock||0===this.clicks.length||this.cutOutImage(this.originalSize,this.$refs.imgRef,this.$refs.canvasRef,t=>{this.afterEditSrc=t})},handleOk(){this.$emit("update:visible",!1,this.afterEditSrc)},throttle(t,e){let r=null;return function(){const n=this,i=arguments;r||(r=setTimeout(()=>{t.apply(n,i),clearTimeout(r),r=null},e))}},rleFrString(t){let e=[],r=0;while(r<t.length){let n=0,i=0,o=1;while(o){let e=t.charCodeAt(r)-48;n|=(31&e)<<5*i,o=32&e,r++,i++,!o&&16&e&&(n|=-1<<5*i)}e.length>2&&(n+=e[e.length-2]),e.push(n)}return e},decodeRleCounts([t,e],r){let n=new Uint8Array(t*e),i=0,o=0;for(let s of r){while(s-- >0)n[i++]=o;o=(o+1)%2}return n},cutOutImage({w:t,h:e},r,n,i){const o=document.createElement("canvas"),s=o.getContext("2d",{willReadFrequently:!0}),a=n.getContext("2d",{willReadFrequently:!0});o.width=t,o.height=e,s.drawImage(r,0,0,t,e);const c=a.getImageData(0,0,t,e).data,u=s.getImageData(0,0,t,e),l=u.data;for(let S=0;S<c.length;S+=4){const t=c[S+3];0!==t&&(l[S+3]=0)}let f=t,h=e,d=0,p=0;for(let S=0;S<e;S++)for(let e=0;e<t;e++){const r=l[4*(S*t+e)+3];0!==r&&(f=Math.min(f,e),h=Math.min(h,S),d=Math.max(d,e),p=Math.max(p,S))}const g=d-f+1,m=p-h+1,v=f,y=h;s.putImageData(u,0,0);const b=document.createElement("canvas"),w=b.getContext("2d");b.width=g,b.height=m,w.drawImage(o,v,y,g,m,0,0,g,m);let x=b.toDataURL("image/png");i(x)}}},Er=Cr;function Rr(t,e,r,n,i,o,s,a){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):i&&(c=a?function(){i.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}var Or=Rr(Er,o,s,!1,null,"5caacfc0",null),Ar=Or.exports,_r=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade"}},[t.visible?e("div",{staticClass:"modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMask.apply(null,arguments)}}},[e("div",{staticClass:"modal-content"},[e("div",{staticClass:"modal-header"},[e("div",[t._v("AI超分")]),e("div",{staticClass:"cancel-btn",on:{click:t.handleMask}},[t._v("关闭")])]),e("div",{staticClass:"modal-body"},[e("div",{on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"compare-container",style:{width:t.containerWidth+"px",height:t.containerHeight+"px"},attrs:{id:"compareBox"},on:{mousemove:t.handleCompareMove,touchmove:t.handleCompareMove}},[e("img",{staticClass:"compare-img before-img",attrs:{src:t.workspaceSrc,alt:"超分前"},on:{load:t.resetBoxSize}}),""!==t.afterEditSrc?e("img",{staticClass:"compare-img after-img",attrs:{src:t.afterEditSrc,alt:"超分后"}}):t._e(),""!==t.afterEditSrc?e("div",{staticClass:"compare-slider",style:{left:t.sliderPercent+"%"},attrs:{id:"slider"}}):t._e(),e("div",{staticClass:"compare-label before-label"},[t._v("超分前")]),""!==t.afterEditSrc?e("div",{staticClass:"compare-label after-label"},[t._v("超分后")]):t._e()]),e("div",{staticClass:"button-and-group"},[e("div",{staticClass:"radiogroup",class:""!==t.afterEditSrc?"div-disabled":""},t._l(t.duration,function(r){return e("div",{key:r.value,staticClass:"radio",class:t.currentDuration==r.value?"radio-active":"",on:{click:function(e){t.currentDuration=r.value}}},[t._v(" "+t._s(r.text)+" ")])}),0),e("div",{staticClass:"button",class:""!==t.afterEditSrc?"div-disabled":"",on:{click:t.expandResolution}},[t._v("变清晰")]),e("div",{staticClass:"button",on:{click:t.handleOk}},[t._v("应用")])])]),e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"spin-mask"},[e("div",{staticClass:"spin-loading"},[e("span",{staticClass:"line-md--loading-alt-loop"}),e("div",[t._v("加载中...")])])])])],1)])]):t._e()])},Tr=[],jr=r(5735),Ir=r.n(jr);const Pr={openTask:"https://apollo.51kandianshi.com/aigc-tools/super-resolve/generate",checkTask:"https://apollo.51kandianshi.com/aigc-tools/super-resolve/query"};var Ur={name:"ExpandResolution",props:{visible:{type:Boolean,default:!1},src:{type:String,default:""}},data(){return{loading:!1,workspaceSrc:this.src,afterEditSrc:"",taskId:"",interval:null,currentDuration:"1",duration:[{text:"2倍",value:"1"},{text:"4倍",value:"2"}],sliderPercent:50,containerWidth:600,containerHeight:600}},watch:{visible(t){t?this.workspaceSrc=this.src:(this.workspaceSrc="",this.afterEditSrc="",this.taskId="",this.interval&&(clearInterval(this.interval),this.interval=null))}},methods:{close(){this.$emit("update:visible",!1)},handleMask(){this.visible&&this.close()},async checkResult(){if(""!=this.taskId)try{const t=await wr.get(`${Pr.checkTask}?taskId=${this.taskId}`,{headers:{accessToken:this.$token}});if(0==t.data.code&&1==t.data.data.status)return t.data.data.fileUrl;if(0==t.data.code&&2==t.data.data.status)return this.loading=!1,this.interval&&(clearInterval(this.interval),this.interval=null),!1}catch(t){this.loading=!1,this.interval&&(clearInterval(this.interval),this.interval=null)}},async expandResolution(){let t=await this.getImageMd5(this.workspaceSrc);this.loading=!0;try{const e=await wr.post(Pr.openTask,{fileUrl:this.workspaceSrc,md5:t,mode:1,outScale:this.currentDuration,fileType:3},{headers:{accessToken:this.$token}});0==e.data.code?(this.taskId=e.data.data.taskId,this.interval=setInterval(async()=>{let t=await this.checkResult();t&&(clearInterval(this.interval),this.interval=null,this.loading=!1,this.afterEditSrc=t)},2e3)):this.loading=!1}catch(e){this.loading=!1}},handleOk(){""==this.afterEditSrc&&(this.afterEditSrc=this.workspaceSrc),this.$emit("update:visible",!1,this.afterEditSrc)},async getImageMd5(t){try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const r=await e.blob(),n=await r.arrayBuffer(),i=new Uint8Array(n),o=new(Ir().ArrayBuffer);o.append(i);const s=o.end();return console.log("图片的 MD5 值:",s),s}catch(e){console.error("获取图片 MD5 值时出错:",e)}},handleCompareMove(t){const e=t.currentTarget,r=e.getBoundingClientRect(),n=r.width;let i="mousemove"===t.type?t.clientX:t.touches[0].clientX,o=i-r.left;o=Math.max(0,Math.min(o,n)),this.sliderPercent=o/n*100;const s=e.querySelector(".after-img");s&&(s.style.clipPath=`inset(0 0 0 ${this.sliderPercent}%)`)},resetBoxSize(t){const e=t.target,r=e.naturalWidth,n=e.naturalHeight,i=600;let o=r,s=n;if(o>i||s>i){const t=Math.min(i/o,i/s);o=Math.floor(o*t),s=Math.floor(s*t)}this.containerWidth=o,this.containerHeight=s}}},Mr=Ur,Br=Rr(Mr,_r,Tr,!1,null,"760d39ab",null),Nr=Br.exports,Fr=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMask.apply(null,arguments)}}},[e("div",{staticClass:"modal-content"},[e("div",{staticClass:"modal-header"},[e("div",[t._v("AI扩图")]),e("div",{staticClass:"cancel-btn",on:{click:t.handleMask}},[t._v("关闭")])]),e("div",{staticClass:"modal-body"},[e("div",{staticClass:"flex",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"workspace"},[e("img",{staticClass:"originalimg",attrs:{src:t.workspaceSrc,alt:"AI扩图"}})]),e("div",{staticClass:"config"},[e("div",{staticClass:"title"},[t._v("尺寸比例")]),e("div",{staticClass:"ratio"},t._l(t.ratio,function(r,n){return e("div",{key:n,staticClass:"ratio-item",on:{click:function(e){t.currentRatio=n}}},[e("img",{staticClass:"ratio-img",attrs:{src:t.currentRatio==n?r.icon_active:r.icon}})])}),0),0==t.currentRatio?e("div",{staticClass:"title"},[t._v("方位扩图百分比")]):t._e(),0==t.currentRatio?e("div",{staticClass:"position"},t._l(t.position,function(r,n){return e("div",{key:n,staticClass:"position-item"},[e("span",[t._v(t._s(r.title))]),e("div",{staticClass:"position-input"},[e("input",{directives:[{name:"model",rawName:"v-model",value:r.value,expression:"item.value"}],domProps:{value:r.value},on:{input:function(e){e.target.composing||t.$set(r,"value",e.target.value)}}}),e("span",{staticClass:"suffix"},[t._v("%")])])])}),0):t._e(),e("div",{staticClass:"button",on:{click:t.expandImg}},[t._v("扩图")]),e("div",{staticClass:"button",on:{click:t.handleOk}},[t._v("应用")])])]),e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"spin-mask"},[e("div",{staticClass:"spin-loading"},[e("span",{staticClass:"line-md--loading-alt-loop"}),e("div",[t._v("加载中...")])])])])],1)])])])},Dr=[],Lr={name:"ExpandImg",props:{visible:{type:Boolean,default:!1},src:{type:String,default:""}},data(){return{token:this.$token,requestUrl:{openTask:"https://apollo.51kandianshi.com/aigc-tools/text2pic/outPaintImage/task",checkTask:"https://apollo.51kandianshi.com/aigc-tools/text2pic/outPaintImage/info"},currentRatio:0,ratio:[{title:"自定义",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/57c2fa87-8147-4985-b877-0463e438fb9a.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/44453238-c141-4bc7-9a27-87a1520313cc.png"},{title:"16:9",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/eb51514a-b062-4fd9-94ea-63f12f1f58c6.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/2aa48c95-20d6-46bc-95b3-bd1f8996c23b.png",ratio:16/9},{title:"9:16",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/de27bc9c-247a-4e53-ab62-8c23e8acdeeb.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/40d06111-21f6-4893-aefe-2da95043647b.png",ratio:9/16},{title:"1:1",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/4493c8b5-9e44-46d0-aa14-f48fc0220cc3.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/0c0a1962-5e25-419d-8d1a-51cb974aa558.png",ratio:1},{title:"3:2",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/cf85a09f-c902-4858-b535-190353902961.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/45a1fbf6-4aaa-48da-abc7-e7ea5a875739.png",ratio:1.5},{title:"2:3",icon:"https://cre.51kandianshi.com/sbs/2025/06/24/f767a51b-9f83-4069-987a-64f2283c3883.png",icon_active:"https://cre.51kandianshi.com/sbs/2025/06/24/5e29a1ae-e0bc-4da6-92ce-6fa44e8a58a8.png",ratio:2/3}],position:[{title:"左",value:0},{title:"右",value:0},{title:"上",value:0},{title:"下",value:0}],workspaceSrc:this.src,loading:!1,taskId:"",interval:null}},methods:{close(){this.$emit("update:visible",!1)},handleMask(){this.visible&&this.close()},handleSize(){return new Promise((t,e)=>{const r=new Image;r.src=this.workspaceSrc,r.onload=()=>{const n=r.naturalWidth,i=r.naturalHeight,o=n/i;if(0==this.currentRatio)t({left:0,right:0,top:0,bottom:0,maxWidth:n,maxHeight:i});else if(o==Number(this.ratio[this.currentRatio].ratio))e(new Error("目前的比例和原图比例一致,请选择其他比例"));else if(o<this.ratio[this.currentRatio].ratio){let e=i*this.ratio[this.currentRatio].ratio,r=(e-n)/2/n;t({left:r,right:r,top:0,bottom:0,maxWidth:e,maxHeight:i})}else{let e=n/this.ratio[this.currentRatio].ratio,r=(e-i)/2/i;t({left:0,right:0,top:r,bottom:r,maxWidth:n,maxHeight:e})}}})},async checkResult(){if(""!=this.taskId)try{const t=await wr.get(`${this.requestUrl.checkTask}?taskId=${this.taskId}`,{headers:{accessToken:this.$token}});if(0==t.data.code&&1==t.data.data.status)return t.data.data.picUrl;if(0==t.data.code&&2==t.data.data.status)return this.loading=!1,clearInterval(this.interval),!1}catch(t){this.loading=!1,clearInterval(this.interval)}},async expandImg(){this.loading=!0;let t=0,e=0,r=0,n=0,i=0,o=0;try{const s=await this.handleSize();t=s.left,e=s.right,r=s.top,n=s.bottom,i=s.maxWidth,o=s.maxHeight}catch(s){return void(this.loading=!1)}0==this.currentRatio&&(t=Number(this.position[0].value)/100,e=Number(this.position[1].value)/100,r=Number(this.position[2].value)/100,n=Number(this.position[3].value)/100);try{const s=await wr.post(this.requestUrl.openTask,{imageUrl:this.workspaceSrc,left:t,right:e,top:r,bottom:n,maxWidth:2*i,maxHeight:2*o},{headers:{accessToken:this.$token}});0==s.data.code?(this.taskId=s.data.data.taskId,this.interval=setInterval(async()=>{let t=await this.checkResult();t&&(clearInterval(this.interval),this.loading=!1,this.workspaceSrc=t)},2e3)):this.loading=!1}catch(s){this.loading=!1}},handleOk(){this.$emit("update:visible",!1,this.workspaceSrc)}}},$r=Lr,qr=Rr($r,Fr,Dr,!1,null,"79c4aeb8",null),zr=qr.exports,Wr=function(){var t=this,e=t._self._c;return e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.visible,expression:"visible"}],staticClass:"modal-overlay",on:{click:function(e){return e.target!==e.currentTarget?null:t.handleMask.apply(null,arguments)}}},[e("div",{staticClass:"modal-content"},[e("div",{staticClass:"modal-header"},[e("div",[t._v("AI消除")]),e("div",{staticClass:"cancel-btn",on:{click:t.handleMask}},[t._v("关闭")])]),e("div",{staticClass:"modal-body"},[e("div",{staticClass:"container",on:{click:function(t){t.stopPropagation()}}},[e("div",{staticClass:"title"},[t._v("*框选或涂抹不需要内容,点击“开始消除”按钮自动消除并补全")]),e("div",{staticClass:"workspace"},[e("img",{ref:"imgRef",attrs:{src:t.workspaceSrc}}),e("canvas",{ref:"canvasRef",staticStyle:{"z-index":"100",position:"relative"},on:{mousedown:t.startDrawing,mousemove:t.draw,mouseup:t.stopDrawing}})]),e("div",{staticStyle:{display:"flex","align-items":"center","margin-top":"20px"}},[e("div",{staticClass:"tool",class:{active:"rectangle"===t.drawingMode},on:{click:function(e){return t.chooseCanvasMethod("rectangle")}}},[e("span",{staticClass:"hugeicons--cursor-rectangle-selection-01"}),t._v("框选")]),e("div",{staticClass:"tool",class:{active:"circle"===t.drawingMode},staticStyle:{"margin-right":"auto"},on:{click:function(e){return t.chooseCanvasMethod("circle")}}},[e("span",{staticClass:"hugeicons--cursor-circle-selection-01"}),t._v("涂抹")]),e("div",{staticClass:"button",on:{click:t.clearCanvas}},[t._v("重置")]),e("div",{staticClass:"button",on:{click:t.eraserObject}},[t._v("开始消除")]),e("div",{staticClass:"button",on:{click:t.handleOk}},[t._v("应用")])])]),e("transition",{attrs:{name:"fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.loading,expression:"loading"}],staticClass:"spin-mask"},[e("div",{staticClass:"spin-loading"},[e("span",{staticClass:"line-md--loading-alt-loop"}),e("div",[t._v("加载中...")])])])])],1)])])])},Hr=[];const Vr={openTask:"https://apollo.51kandianshi.com/aigc-tools/image-retouch/generate",checkTask:"https://apollo.51kandianshi.com/aigc-tools/image-retouch/query"};var Xr={name:"EraserObject",props:{visible:{type:Boolean,default:!1},src:{type:String,default:""}},data(){return{workspaceSrc:this.src,loading:!1,taskId:"",interval:null,imgRef:null,canvasRef:null,ctx:null,offscreenCanvas:null,offscreenCtx:null,drawing:!1,drawingMode:"rectangle",startX:0,startY:0,currentX:0,currentY:0,image:new Image,brushSize:20}},watch:{visible:async function(t){t?(this.workspaceSrc=this.src,await this.$nextTick(),this.ctx=this.$refs.canvasRef.getContext("2d"),this.initImage()):clearInterval(this.interval)}},methods:{chooseCanvasMethod(t){this.drawingMode=t},close(){this.$emit("update:visible",!1)},handleMask(){this.visible&&this.close()},initImage(){this.image.src=this.workspaceSrc,this.image.onload=()=>{this.$refs.canvasRef.width=this.$refs.imgRef.width,this.$refs.canvasRef.height=this.$refs.imgRef.height,this.offscreenCanvas=document.createElement("canvas"),this.offscreenCanvas.width=this.$refs.canvasRef.width,this.offscreenCanvas.height=this.$refs.canvasRef.height,this.offscreenCtx=this.offscreenCanvas.getContext("2d")}},startDrawing(t){this.drawing=!0,this.startX=t.offsetX,this.startY=t.offsetY,this.currentX=t.offsetX,this.currentY=t.offsetY,"circle"===this.drawingMode&&this.drawCircle(this.ctx,this.startX,this.startY,!0)},draw(t){this.drawing&&(this.currentX=t.offsetX,this.currentY=t.offsetY,this.ctx.clearRect(0,0,this.$refs.canvasRef.width,this.$refs.canvasRef.height),this.ctx.drawImage(this.offscreenCanvas,0,0),"rectangle"===this.drawingMode?this.drawRect(this.ctx,this.startX,this.startY,this.currentX-this.startX,this.currentY-this.startY):"circle"===this.drawingMode&&this.drawCircle(this.ctx,this.currentX,this.currentY))},drawRect(t,e,r,n,i,o=!1){t.setLineDash([5,5]),t.strokeStyle="rgba(104, 106, 237, 1)",t.lineWidth=2,o&&(t.fillStyle="rgba(104, 106, 237, 0.4)",t.fillRect(e,r,n,i)),t.strokeRect(e,r,n,i),t.setLineDash([])},drawCircle(t,e,r,n=!1){t.fillStyle="rgba(104, 106, 237, 0.4)",t.beginPath(),t.arc(e,r,this.brushSize/2,0,2*Math.PI),t.fill(),n||(this.offscreenCtx.fillStyle="rgba(104, 106, 237, 0.4)",this.offscreenCtx.beginPath(),this.offscreenCtx.arc(e,r,this.brushSize/2,0,2*Math.PI),this.offscreenCtx.fill())},stopDrawing(){this.drawing&&(this.drawing=!1,"rectangle"===this.drawingMode&&this.drawRect(this.offscreenCtx,this.startX,this.startY,this.currentX-this.startX,this.currentY-this.startY,!0),this.ctx.clearRect(0,0,this.$refs.canvasRef.width,this.$refs.canvasRef.height),this.ctx.drawImage(this.offscreenCanvas,0,0))},clearCanvas(){this.ctx.clearRect(0,0,this.$refs.canvasRef.width,this.$refs.canvasRef.height),this.offscreenCtx.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height)},async checkResult(){if(""!=this.taskId)try{const t=await wr.get(`${Vr.checkTask}?taskId=${this.taskId}`,{headers:{accessToken:this.$token}});if(0==t.data.code&&1==t.data.data.status)return t.data.data.fileUrl;if(0==t.data.code&&2==t.data.data.status)return this.loading=!1,clearInterval(this.interval),!1}catch(t){this.loading=!1,clearInterval(this.interval)}},async eraserObject(){let t=await this.getImageMd5(this.workspaceSrc);this.loading=!0;let e=this.buildBase64();try{const r=await wr.post(Vr.openTask,{sourceFileUrl:this.workspaceSrc,sourceMd5:t,maskFile:e},{headers:{accessToken:this.$token}});0==r.data.code?(this.taskId=r.data.data.taskId,this.interval=setInterval(async()=>{let t=await this.checkResult();t&&(clearInterval(this.interval),this.loading=!1,this.clearCanvas(),this.workspaceSrc=t)},2e3)):this.loading=!1}catch(r){this.loading=!1}},handleOk(){this.$emit("update:visible",!1,this.workspaceSrc)},async getImageMd5(t){try{const e=await fetch(t);if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const r=await e.blob(),n=await r.arrayBuffer(),i=new Uint8Array(n),o=new(Ir().ArrayBuffer);o.append(i);const s=o.end();return console.log("图片的 MD5 值:",s),s}catch(e){console.error("获取图片 MD5 值时出错:",e)}},buildBase64(){const t=this.$refs.imgRef.naturalWidth,e=this.$refs.imgRef.naturalHeight,r=this.$refs.canvasRef.width,n=this.$refs.canvasRef.height,i=t/r,o=e/n,s=document.createElement("canvas"),a=s.getContext("2d");s.width=t,s.height=e,a.fillStyle="black",a.fillRect(0,0,s.width,s.height),a.scale(i,o),a.drawImage(this.$refs.canvasRef,0,0),a.scale(1/i,1/o);const c=a.getImageData(0,0,s.width,s.height),u=c.data;for(let l=0;l<u.length;l+=4){const t=u[l],e=u[l+1],r=u[l+2];u[l+3];0===t&&0===e&&0===r||(u[l]=255,u[l+1]=255,u[l+2]=255,u[l+3]=255)}return a.putImageData(c,0,0),s.toDataURL("image/png").replace("data:image/png;base64,","")}}},Yr=Xr,Jr=Rr(Yr,Wr,Hr,!1,null,"75d125c7",null),Kr=Jr.exports;function Gr(t){let e,r,n=parseInt(t.slice(1,3),16)/255,i=parseInt(t.slice(3,5),16)/255,o=parseInt(t.slice(5,7),16)/255,s=Math.max(n,i,o),a=Math.min(n,i,o),c=(s+a)/2;if(s===a)e=r=0;else{let t=s-a;switch(r=c>.5?t/(2-s-a):t/(s+a),s){case n:e=(i-o)/t+(i<o?6:0);break;case i:e=(o-n)/t+2;break;case o:e=(n-i)/t+4;break}e/=6}return[e,r,c]}function Qr(t,e,r){let n,i,o;function s(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(0===e)n=i=o=r;else{let a=r<.5?r*(1+e):r+e-r*e,c=2*r-a;n=s(c,a,t+1/3),i=s(c,a,t),o=s(c,a,t-1/3)}const a=t=>{const e=Math.round(255*t);return e.toString(16).padStart(2,"0")};return"#"+a(n)+a(i)+a(o)}function Zr(t,e){const[r,n,i]=Gr(t),o=Math.min(1,i+e/100);return Qr(r,n,o)}const tn=[Ar,Nr,zr,Kr],en=function(t,e={}){const{theme:r,token:n}=e;en.installed||(en.installed=!0,r&&(document.documentElement.style.setProperty("--sbsplugin-primary-color",r.primaryColor||"#1677ff"),document.documentElement.style.setProperty("--sbsplugin-primary-color-hover",Zr(r.primaryColor||"#1677ff",10))),t.prototype.$token=n,tn.forEach(e=>t.component(e.name,e)))};"undefined"!==typeof window&&window.Vue&&en(window.Vue);var rn=en,nn=rn}(),n}()});
|