gtsoft-snail-job-server/snail-job-server/snail-job-server-starter/src/main/resources/admin/assets/download-Cm66Rkpl.js

278 lines
58 KiB
JavaScript
Raw Normal View History

2024-06-03 00:12:29 +08:00
import{d3 as Ke,am as te,an as n,d as Q,c0 as Qe,aG as ve,ar as Pe,bD as Pt,bE as Et,d4 as Bt,ax as U,ay as b,d5 as Ae,aA as Dt,aC as Ut,aJ as S,p as $,aE as Mt,W as zt,d6 as ye,d7 as ue,bk as et,au as ne,a as j,aD as pe,aN as tt,aO as At,aS as M,d8 as Ft,aU as Fe,d9 as jt,T as Re,Q as he,da as $t,A as Nt,a4 as Vt,db as Ht,bO as Se,aM as Ee,cI as Zt,i as je,b2 as Ie,at as me,b0 as Wt,bJ as Xt,c4 as ot,c1 as Yt,B as le,dc as Gt,bY as qt,b4 as Jt,az as V,c5 as $e,aB as K,c6 as Kt,dd as Qt,aF as eo,aK as to,de as oo,aW as Ne,aL as no,o as Be,b as nt,e as rt,c as ro,w as _e,f as Ve,g as io,t as ao,h as lo,$ as ge,bi as so,df as uo,q as He}from"./index-CHgAHQIl.js";import{_ as co}from"./Progress-Ba5RQgAV.js";import{f as it}from"./Grid-DHGKk79k.js";function fo(e,t,o,r){for(var l=-1,i=e==null?0:e.length;++l<i;)o=t(o,e[l],l,e);return o}function ho(e){return function(t){return e==null?void 0:e[t]}}var go={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},vo=ho(go),po=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mo="\\u0300-\\u036f",wo="\\ufe20-\\ufe2f",bo="\\u20d0-\\u20ff",xo=mo+wo+bo,Co="["+xo+"]",yo=RegExp(Co,"g");function Ro(e){return e=Ke(e),e&&e.replace(po,vo).replace(yo,"")}var _o=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function To(e){return e.match(_o)||[]}var Oo=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Lo(e){return Oo.test(e)}var at="\\ud800-\\udfff",So="\\u0300-\\u036f",Io="\\ufe20-\\ufe2f",ko="\\u20d0-\\u20ff",Po=So+Io+ko,lt="\\u2700-\\u27bf",st="a-z\\xdf-\\xf6\\xf8-\\xff",Eo="\\xac\\xb1\\xd7\\xf7",Bo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Do="\\u2000-\\u206f",Uo=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",dt="A-Z\\xc0-\\xd6\\xd8-\\xde",Mo="\\ufe0e\\ufe0f",ut=Eo+Bo+Do+Uo,ct="[']",Ze="["+ut+"]",zo="["+Po+"]",ft="\\d+",Ao="["+lt+"]",ht="["+st+"]",gt="[^"+at+ut+ft+lt+st+dt+"]",Fo="\\ud83c[\\udffb-\\udfff]",jo="(?:"+zo+"|"+Fo+")",$o="[^"+at+"]",vt="(?:\\ud83c[\\udde6-\\uddff]){2}",pt="[\\ud800-\\udbff][\\udc00-\\udfff]",ie="["+dt+"]",No="\\u200d",We="(?:"+ht+"|"+gt+")",Vo="(?:"+ie+"|"+gt+")",Xe="(?:"+ct+"(?:d|ll|m|re|s|t|ve))?",Ye="(?:"+ct+"(?:D|LL|M|RE|S|T|VE))?",mt=jo+"?",wt="["+Mo+"]?",Ho="(?:"+No+"(?:"+[$o,vt,pt].join("|")+")"+wt+mt+")*",Zo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xo=wt+mt+Ho,Yo="(?:"+[Ao,vt,pt].join("|")+")"+Xo,Go=RegExp([ie+"?"+ht+"+"+Xe+"(?="+[Ze,ie,"$"].join("|")+")",Vo+"+"+Ye+"(?="+[Ze,ie+We,"$"].join("|")+")",ie+"?"+We+"+"+Xe,ie+"+"+Ye,Wo,Zo,ft,Yo].join("|"),"g");function qo(e){return e.match(Go)||[]}function Jo(e,t,o){return e=Ke(e),t=t,t===void 0?Lo(e)?qo(e):To(e):e.match(t)||[]}var Ko="[']",Qo=Reg
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
`),b("image-preview-overlay",`
z-index: -1;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, .3);
`,[Ae()]),b("image-preview-toolbar",`
z-index: 1;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: var(--n-toolbar-border-radius);
height: 48px;
bottom: 40px;
padding: 0 12px;
background: var(--n-toolbar-color);
box-shadow: var(--n-toolbar-box-shadow);
color: var(--n-toolbar-icon-color);
transition: color .3s var(--n-bezier);
display: flex;
align-items: center;
`,[b("base-icon",`
padding: 0 8px;
font-size: 28px;
cursor: pointer;
`),Ae()]),b("image-preview-wrapper",`
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
pointer-events: none;
`,[Dt()]),b("image-preview",`
user-select: none;
-webkit-user-select: none;
pointer-events: all;
margin: auto;
max-height: calc(100vh - 32px);
max-width: calc(100vw - 32px);
transition: transform .3s var(--n-bezier);
`),b("image",`
display: inline-flex;
max-height: 100%;
max-width: 100%;
`,[Ut("preview-disabled",`
cursor: pointer;
`),U("img",`
border-radius: inherit;
`)])]),ce=32,Ct=Q({name:"ImagePreview",props:Object.assign(Object.assign({},De),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const t=ve("Image","-image",xn,pn,e,S(e,"clsPrefix"));let o=null;const r=$(null),l=$(null),i=$(void 0),u=$(!1),c=$(!1),{localeRef:d}=Mt("Image");function a(){const{value:h}=l;if(!o||!h)return;const{style:m}=h,g=o.getBoundingClientRect(),O=g.left+g.width/2,L=g.top+g.height/2;m.transformOrigin=`${O}px ${L}px`}function s(h){var m,g;switch(h.key){case" ":h.preventDefault();break;case"ArrowLeft":(m=e.onPrev)===null||m===void 0||m.call(e);break;case"ArrowRight":(g=e.onNext)===null||g===void 0||g.call(e);break;case"Escape":Ue();break}}zt(u,h=>{h?ye("keydown",document,s):ue("keydown",document,s)}),et(()=>{ue("keydown",document,s)});let f=0,C=0,w=0,x=0,A=0,Z=0,F=0,N=0,X=!1;function I(h){const{clientX:m,clientY:g}=h;w=m-f,x=g-C,Ht(q)}function p(h){const{mouseUpClientX:m,mouseUpClientY:g,mouseDownClientX:O,mouseDownClientY:L}=h,H=O-m,G=L-g,J=`vertical${G>0?"Top":"Bottom"}`,oe=`horizontal${H>0?"Left":"Right"}`;return{moveVerticalDirection:J,moveHorizontalDirection:oe,deltaHorizontal:H,deltaVertical:G}}function y(h){const{value:m}=r;if(!m)return{offsetX:0,offsetY:0};const g=m.getBoundingClientRect(),{moveVerticalDirection:O,moveHorizontalDirection:L,deltaHorizontal:H,deltaVertical:G}=h||{};let J=0,oe=0;return g.width<=window.innerWidth?J=0:g.left>0?J=(g.width-window.innerWidth)/2:g.right<window.innerWidth?J=-(g.width-window.innerWidth)/2:L==="horizontalRight"?J=Math.min((g.width-window.innerWidth)/2,A-(H??0)):J=Math.max(-((g.width-window.innerWidth)/2),A-(H??0)),g.height<=window.innerHeight?oe=0:g.top>0?oe=(g.height-window.innerHeight)/2:g.bottom<window.innerHeight?oe=-(g.height-window.innerHeight)/2:O==="verticalBottom"?oe=Math.min((g.height-window.innerHeight)/2,Z-(G??0)):oe=Math.max(-((g.height-window.innerHeight)/2),Z-(G??0)),{offsetX:J,offsetY:oe}}function R(h){ue("mousemove",document,I),ue("mouseup",document,R);const{clientX:m,clientY:g}=h;X=!1;const O=p({mouseUpClientX:m,mouseUpClientY:g,mouseDownClientX:F,mouseDownClientY:N}),L=y(O);w=L.offsetX,x=L.offsetY,q()}const E=ne(xt,null);function v(h){var m,g;if((g=(m=E==null?void 0:E.previewedImgPropsRef.value)===null||m===void 0?void 0:m.onMousedown)===null||g===void 0||g.call(m,h),h.button!==0)return;const{clientX:O,clientY:L}=h;X=!0,f=O-w,C=L-x,A=w,Z=x,F=O,N=L,q(),ye("mousemove",document,I),ye("mouseup",document,R)}function k(h){var m,g;(g=(m=E==null?void 0:E.previewedImgPropsRef.value)===null||m===void 0?void 0:m.onDblclick)===null||g===void 0||g.call(m,h);const O=de();_=_===O?1:O,q()}const T=1.5;let z=0,_=1,B=0;function D(){_=1,z=0}function P(){var h;D(),B=0,(h=e.onPrev)===null||h===void 0||h.call(e)}function Y(){var h;D(),B=0,(h=e.onNext)===null||h===void 0||h.call(e)}function W(){B-=90,q()}function ee(){B+=90,q()}function we(){const{value:h}=r;if(!h)return 1;const{innerWidth:m,innerHeight:g}=window,O=Math.max(1,h.naturalHeight/(g-ce)),L=Math.max(1,h.naturalWidth/(m-ce));return Math.max(3,O*2,L*2)}function de(){const{value:h}=r;if(!h)return 1;const{innerWidth:m,innerHeight:g}=window,O=h.naturalHeight/(g-ce),L=h.naturalWidth/(m-ce);return O<1&&L<1?1:Math.max(O,L)}function be(){const h=we();_<h&&(z+=1,_=Math.min(h,Math.pow(T,z)),q())}function xe(){if(_>.5){const h=_;z-=1,_=Math.max(.5,Math.pow(T,z));const m=h-_;q(!1);const g=y();_+=m,q(!1),_-=m,w=g.offsetX,x=g.offsetY,q()}}function Ce(){const h=i.value;h&&it(h,void 0)}function q(h=!0){var m;const{value:g}=r;if(!g)return;const{style:O}=g,L=Nt((m=E==null?void 0:E.previewedImgPropsRef.value)===null||m===void 0?void 0:m.style);let H="";if(typeof L=="string")H=L+";";else for(const J in L)H+=`${tn(J)}: ${L[J]};`;const G=`transform-origin: center; transform: translateX(${w}px) translateY(${x}px) rotate(${B}deg) scale(${_});`;X?O.cssText=H+"cursor: grabbing; transition: none;"+G:O.cssText=H+"cursor: grab;"+G+(h?"":"transition: none;"),h||g.offsetHeight}function Ue(){u.value=!u.value,c.value=!0}function St(){_=de(),z=Math.ceil(Math.log(_)/Math.log(T)),w=0,x=0,q()}const It={setPr
display: block;
`)]),V("drag-over",[b("upload-dragger",`
border: var(--n-dragger-border-hover);
`)])]),b("upload-dragger",`
cursor: pointer;
box-sizing: border-box;
width: 100%;
text-align: center;
border-radius: var(--n-border-radius);
padding: 24px;
opacity: 1;
transition:
opacity .3s var(--n-bezier),
border-color .3s var(--n-bezier),
background-color .3s var(--n-bezier);
background-color: var(--n-dragger-color);
border: var(--n-dragger-border);
`,[U("&:hover",`
border: var(--n-dragger-border-hover);
`),V("disabled",`
cursor: not-allowed;
`)]),b("upload-trigger",`
display: inline-block;
box-sizing: border-box;
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[U("+",[b("upload-file-list","margin-top: 8px;")]),V("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`),V("image-card",`
width: 96px;
height: 96px;
`,[b("base-icon",`
font-size: 24px;
`),b("upload-dragger",`
padding: 0;
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
`)])]),b("upload-file-list",`
line-height: var(--n-line-height);
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[U("a, img","outline: none;"),V("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`,[b("upload-file","cursor: not-allowed;")]),V("grid",`
display: grid;
grid-template-columns: repeat(auto-fill, 96px);
grid-gap: 8px;
margin-top: 0;
`),b("upload-file",`
display: block;
box-sizing: border-box;
cursor: default;
padding: 0px 12px 0 6px;
transition: background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
`,[$e(),b("progress",[$e({foldPadding:!0})]),U("&:hover",`
background-color: var(--n-item-color-hover);
`,[b("upload-file-info",[K("action",`
opacity: 1;
`)])]),V("image-type",`
border-radius: var(--n-border-radius);
text-decoration: underline;
text-decoration-color: #0000;
`,[b("upload-file-info",`
padding-top: 0px;
padding-bottom: 0px;
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 6px 0;
`,[b("progress",`
padding: 2px 0;
margin-bottom: 0;
`),K("name",`
padding: 0 8px;
`),K("thumbnail",`
width: 32px;
height: 32px;
font-size: 28px;
display: flex;
justify-content: center;
align-items: center;
`,[U("img",`
width: 100%;
`)])])]),V("text-type",[b("progress",`
box-sizing: border-box;
padding-bottom: 6px;
margin-bottom: 6px;
`)]),V("image-card-type",`
position: relative;
width: 96px;
height: 96px;
border: var(--n-item-border-image-card);
border-radius: var(--n-border-radius);
padding: 0;
display: flex;
align-items: center;
justify-content: center;
transition: border-color .3s var(--n-bezier), background-color .3s var(--n-bezier);
border-radius: var(--n-border-radius);
overflow: hidden;
`,[b("progress",`
position: absolute;
left: 8px;
bottom: 8px;
right: 8px;
width: unset;
`),b("upload-file-info",`
padding: 0;
width: 100%;
height: 100%;
`,[K("thumbnail",`
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 36px;
`,[U("img",`
width: 100%;
`)])]),U("&::before",`
position: absolute;
z-index: 1;
left: 0;
right: 0;
top: 0;
bottom: 0;
border-radius: inherit;
opacity: 0;
transition: opacity .2s var(--n-bezier);
content: "";
`),U("&:hover",[U("&::before","opacity: 1;"),b("upload-file-info",[K("thumbnail","opacity: .12;")])])]),V("error-status",[U("&:hover",`
background-color: var(--n-item-color-hover-error);
`),b("upload-file-info",[K("name","color: var(--n-item-text-color-error);"),K("thumbnail","color: var(--n-item-text-color-error);")]),V("image-card-type",`
border: var(--n-item-border-image-card-error);
`)]),V("with-url",`
cursor: pointer;
`,[b("upload-file-info",[K("name",`
color: var(--n-item-text-color-success);
text-decoration-color: var(--n-item-text-color-success);
`,[U("a",`
text-decoration: underline;
`)])])]),b("upload-file-info",`
position: relative;
padding-top: 6px;
padding-bottom: 6px;
display: flex;
flex-wrap: nowrap;
`,[K("thumbnail",`
font-size: 18px;
opacity: 1;
transition: opacity .2s var(--n-bezier);
color: var(--n-item-icon-color);
`,[b("base-icon",`
margin-right: 2px;
vertical-align: middle;
transition: color .3s var(--n-bezier);
`)]),K("action",`
padding-top: inherit;
padding-bottom: inherit;
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 80px;
display: flex;
align-items: center;
transition: opacity .2s var(--n-bezier);
justify-content: flex-end;
opacity: 0;
`,[b("button",[U("&:not(:last-child)",{marginRight:"4px"}),b("base-icon",[U("svg",[Kt()])])]),V("image-type",`
position: relative;
max-width: 80px;
width: auto;
`),V("image-card-type",`
z-index: 2;
position: absolute;
width: 100%;
height: 100%;
left: 0;
right: 0;
bottom: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
`)]),K("name",`
color: var(--n-item-text-color);
flex: 1;
display: flex;
justify-content: center;
text-overflow: ellipsis;
overflow: hidden;
flex-direction: column;
text-decoration-color: #0000;
font-size: var(--n-font-size);
transition:
color .3s var(--n-bezier),
text-decoration-color .3s var(--n-bezier);
`,[U("a",`
color: inherit;
text-decoration: underline;
`)])])])]),b("upload-file-input",`
display: none;
width: 0;
height: 0;
opacity: 0;
`)]);var Je=function(e,t,o,r){function l(i){return i instanceof o?i:new o(function(u){u(i)})}return new(o||(o=Promise))(function(i,u){function c(s){try{a(r.next(s))}catch(f){u(f)}}function d(s){try{a(r.throw(s))}catch(f){u(f)}}function a(s){s.done?i(s.value):l(s.value).then(c,d)}a((r=r.apply(e,t||[])).next())})};function Fn(e,t,o){const{doChange:r,xhrMap:l}=e;let i=0;function u(d){var a;let s=Object.assign({},t,{status:"error",percentage:i});l.delete(t.id),s=se(((a=e.onError)===null||a===void 0?void 0:a.call(e,{file:s,event:d}))||s),r(s,d)}function c(d){var a;if(e.isErrorState){if(e.isErrorState(o)){u(d);return}}else if(o.status<200||o.status>=300){u(d);return}let s=Object.assign({},t,{status:"finished",percentage:i});l.delete(t.id),s=se(((a=e.onFinish)===null||a===void 0?void 0:a.call(e,{file:s,event:d}))||s),r(s,d)}return{handleXHRLoad:c,handleXHRError:u,handleXHRAbort(d){const a=Object.assign({},t,{status:"removed",file:null,percentage:i});l.delete(t.id),r(a,d)},handleXHRProgress(d){const a=Object.assign({},t,{status:"uploading"});if(d.lengthComputable){const s=Math.ceil(d.loaded/d.total*100);a.percentage=s,i=s}r(a,d)}}}function jn(e){const{inst:t,file:o,data:r,headers:l,withCredentials:i,action:u,customRequest:c}=e,{doChange:d}=e.inst;let a=0;c({file:o,data:r,headers:l,withCredentials:i,action:u,onProgress(s){const f=Object.assign({},o,{status:"uploading"}),C=s.percent;f.percentage=C,a=C,d(f)},onFinish(){var s;let f=Object.assign({},o,{status:"finished",percentage:a});f=se(((s=t.onFinish)===null||s===void 0?void 0:s.call(t,{file:f}))||f),d(f)},onError(){var s;let f=Object.assign({},o,{status:"error",percentage:a});f=se(((s=t.onError)===null||s===void 0?void 0:s.call(t,{file:f}))||f),d(f)}})}function $n(e,t,o){const r=Fn(e,t,o);o.onabort=r.handleXHRAbort,o.onerror=r.handleXHRError,o.onload=r.handleXHRLoad,o.upload&&(o.upload.onprogress=r.handleXHRProgress)}function Lt(e,t){return typeof e=="function"?e({file:t}):e||{}}function Nn(e,t,o){const r=Lt(t,o);r&&Object.keys(r).forEach(l=>{e.setRequestHeader(l,r[l])})}function Vn(e,t,o){const r=Lt(t,o);r&&Object.keys(r).forEach(l=>{e.append(l,r[l])})}function Hn(e,t,o,{method:r,action:l,withCredentials:i,responseType:u,headers:c,data:d}){const a=new XMLHttpRequest;a.responseType=u,e.xhrMap.set(o.id,a),a.withCredentials=i;const s=new FormData;if(Vn(s,d,o),o.file!==null&&s.append(t,o.file),$n(e,o,a),l!==void 0){a.open(r.toUpperCase(),l),Nn(a,c,o),a.send(s);const f=Object.assign({},o,{status:"uploading"});e.doChange(f)}}const Zn=Object.assign(Object.assign({},ve.props),{name:{type:String,default:"file"},accept:String,action:String,customRequest:Function,directory:Boolean,directoryDnd:{type:Boolean,default:void 0},method:{type:String,default:"POST"},multiple:Boolean,showFileList:{type:Boolean,default:!0},data:[Object,Function],headers:[Object,Function],withCredentials:Boolean,responseType:{type:String,default:""},disabled:{type:Boolean,default:void 0},onChange:Function,onRemove:Function,onFinish:Function,onError:Function,onBeforeUpload:Function,isErrorState:Function,onDownload:Function,defaultUpload:{type:Boolean,default:!0},fileList:Array,"onUpdate:fileList":[Function,Array],onUpdateFileList:[Function,Array],fileListClass:String,fileListStyle:[String,Object],defaultFileList:{type:Array,default:()=>[]},showCancelButton:{type:Boolean,default:!0},showRemoveButton:{type:Boolean,default:!0},showDownloadButton:Boolean,showRetryButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},listType:{type:String,default:"text"},onPreview:Function,shouldUseThumbnailUrl:{type:Function,default:e=>Ln?Tt(e):!1},createThumbnailUrl:Function,abstract:Boolean,max:Number,showTrigger:{type:Boolean,default:!0},imageGroupProps:Object,inputProps:Object,triggerClass:String,triggerStyle:[String,Object],renderIcon:Function}),Wn=Q({name:"Upload",props:Zn,setup(e){e.abstract&&e.listType==="image-card"&&me("upload","when the list-type is image-card, abstract is not supported.");const{mergedClsPrefixRef:t,inlineThemeDisabled:o}=pe(e),r=ve("Upload","-upload",An,Qt,e,t),l=eo(e),i=j(()=>{const{
"demo": "http://localhost:9529"
}`,BASE_URL:"/snail-job",MODE:"prod",DEV:!1,PROD:!0,SSR:!1};const{baseURL:nr}=uo(or);function rr(e,t,o=!0){var r,l;try{let i=t;o&&(i=`${t}-${new Date().getTime()}.json`),ir(e,i)}catch{(r=window.$message)==null||r.error(ge("common.downloadFail"))}finally{(l=window.$loading)==null||l.endLoading()}}function ir(e,t){const o=[e],r=new Blob(o,{type:"application/octet-stream"}),l=window.URL.createObjectURL(r),i=document.createElement("a");i.style.display="none",i.href=l,i.setAttribute("download",t),typeof i.download>"u"&&i.setAttribute("target","_blank"),document.body.appendChild(i),i.click(),document.body.removeChild(i),window.URL.revokeObjectURL(l)}const cr=(e,t,o)=>{var i;(i=window.$loading)==null||i.startLoading();const r=He.get("token"),l=He.get("namespaceId");fetch(`${nr}${e}?t=${new Date().getTime()}`,{method:"post",body:JSON.stringify(t),headers:{"SNAIL-JOB-AUTH":r,"SNAIL-JOB-NAMESPACE-ID":l,"Content-Type":"application/json;charset=utf-8;"}}).then(async u=>u.blob()).then(u=>rr(u,o)).catch(()=>{var u;return(u=window.$message)==null?void 0:u.error(ge("common.downloadFail"))}).finally(()=>{var u;return(u=window.$loading)==null?void 0:u.endLoading()})};export{ur as _,dr as a,cr as d};