gtsoft-snail-job-server/snail-job-server/snail-job-server-ui/src/main/resources/admin/assets/download-QbMLh5-M.js

276 lines
58 KiB
JavaScript
Raw Normal View History

2025-03-23 10:26:50 +08:00
import{dt as et,cf as te,aj as n,d as Q,du as tt,a$ as Dt,dv as Mt,b4 as Ft,bI as _e,bb as ve,bp as D,b5 as b,dw as Ee,c2 as Et,bJ as jt,b6 as M,a3 as he,dx as $t,c8 as je,dy as At,U as ye,dz as Ht,bc as k,r as A,b9 as Nt,q as Vt,dA as Re,dB as ue,cz as ot,bK as ne,a as $,b8 as pe,be as nt,bU as Zt,v as Wt,a7 as Xt,cB as qt,dC as Se,bT as Be,dD as Yt,cp as rt,i as $e,cu as Pe,bq as N,dE as Ae,bv as K,dF as Gt,cq as me,cF as it,dG as He,B as le,dH as Jt,dI as Kt,bO as Qt,cw as eo,b7 as to,T as oo,dJ as no,ba as ro,bd as io,an as ao,bf as Ne,aR as at,b as lt,o as ze,e as st,c as lo,w as Le,f as Ve,g as so,t as uo,h as co,$ as ge,aP as fo,K as Ze,dK as ho}from"./index-mUIrqFZO.js";import{_ as go}from"./Progress-BXAFNvSO.js";import{i as dt}from"./Grid-BaTVMcBE.js";function vo(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 po(e){return function(t){return e==null?void 0:e[t]}}var mo={À:"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"},wo=po(mo),bo=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xo="\\u0300-\\u036f",Co="\\ufe20-\\ufe2f",yo="\\u20d0-\\u20ff",Ro=xo+Co+yo,Lo="["+Ro+"]",To=RegExp(Lo,"g");function Oo(e){return e=et(e),e&&e.replace(bo,wo).replace(To,"")}var ko=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function So(e){return e.match(ko)||[]}var Po=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Io(e){return Po.test(e)}var ut="\\ud800-\\udfff",_o="\\u0300-\\u036f",Bo="\\ufe20-\\ufe2f",zo="\\u20d0-\\u20ff",Uo=_o+Bo+zo,ct="\\u2700-\\u27bf",ft="a-z\\xdf-\\xf6\\xf8-\\xff",Do="\\xac\\xb1\\xd7\\xf7",Mo="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Fo="\\u2000-\\u206f",Eo=" \\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",ht="A-Z\\xc0-\\xd6\\xd8-\\xde",jo="\\ufe0e\\ufe0f",gt=Do+Mo+Fo+Eo,vt="[']",We="["+gt+"]",$o="["+Uo+"]",pt="\\d+",Ao="["+ct+"]",mt="["+ft+"]",wt="[^"+ut+gt+pt+ct+ft+ht+"]",Ho="\\ud83c[\\udffb-\\udfff]",No="(?:"+$o+"|"+Ho+")",Vo="[^"+ut+"]",bt="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",ie="["+ht+"]",Zo="\\u200d",Xe="(?:"+mt+"|"+wt+")",Wo="(?:"+ie+"|"+wt+")",qe="(?:"+vt+"(?:d|ll|m|re|s|t|ve))?",Ye="(?:"+vt+"(?:D|LL|M|RE|S|T|VE))?",Ct=No+"?",yt="["+jo+"]?",Xo="(?:"+Zo+"(?:"+[Vo,bt,xt].join("|")+")"+yt+Ct+")*",qo="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yo="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Go=yt+Ct+Xo,Jo="(?:"+[Ao,bt,xt].join("|")+")"+Go,Ko=RegExp([ie+"?"+mt+"+"+qe+"(?="+[We,ie,"$"].join("|")+")",Wo+"+"+Ye+"(?="+[We,ie+Xe,"$"].join("|")+")",ie+"?"+Xe+"+"+qe,ie+"+"+Ye,Yo,qo,pt,Jo].join("|"),"g");function Qo(e){return e.match(Ko)||[]}function en(e,t,o){return e=et(e),t=t,t===void 0?Io(e)?Qo(e):So(e):e.match(t)||[]}var
2025-03-15 10:09:55 +08:00
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);
`,[Ee()]),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;
`),Ee()]),b("image-preview-wrapper",`
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
pointer-events: none;
`,[Et()]),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%;
`,[jt("preview-disabled",`
cursor: pointer;
`),D("img",`
border-radius: inherit;
`)])]),ce=32,Tt=Q({name:"ImagePreview",props:Object.assign(Object.assign({},Ue),{onNext:Function,onPrev:Function,clsPrefix:{type:String,required:!0}}),setup(e){const t=ve("Image","-image",Rn,bn,e,k(e,"clsPrefix"));let o=null;const r=A(null),l=A(null),i=A(void 0),u=A(!1),c=A(!1),{localeRef:d}=Nt("Image");function a(){const{value:f}=l;if(!o||!f)return;const{style:m}=f,g=o.getBoundingClientRect(),S=g.left+g.width/2,P=g.top+g.height/2;m.transformOrigin=`${S}px ${P}px`}function s(f){var m,g;switch(f.key){case" ":f.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":De();break}}Vt(u,f=>{f?Re("keydown",document,s):ue("keydown",document,s)}),ot(()=>{ue("keydown",document,s)});let h=0,w=0,R=0,x=0,E=0,Z=0,j=0,F=0,Y=!1;function _(f){const{clientX:m,clientY:g}=f;R=m-h,x=g-w,qt(G)}function p(f){const{mouseUpClientX:m,mouseUpClientY:g,mouseDownClientX:S,mouseDownClientY:P}=f,V=S-m,q=P-g,J=`vertical${q>0?"Top":"Bottom"}`,oe=`horizontal${V>0?"Left":"Right"}`;return{moveVerticalDirection:J,moveHorizontalDirection:oe,deltaHorizontal:V,deltaVertical:q}}function y(f){const{value:m}=r;if(!m)return{offsetX:0,offsetY:0};const g=m.getBoundingClientRect(),{moveVerticalDirection:S,moveHorizontalDirection:P,deltaHorizontal:V,deltaVertical:q}=f||{};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:P==="horizontalRight"?J=Math.min((g.width-window.innerWidth)/2,E-(V??0)):J=Math.max(-((g.width-window.innerWidth)/2),E-(V??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:S==="verticalBottom"?oe=Math.min((g.height-window.innerHeight)/2,Z-(q??0)):oe=Math.max(-((g.height-window.innerHeight)/2),Z-(q??0)),{offsetX:J,offsetY:oe}}function C(f){ue("mousemove",document,_),ue("mouseup",document,C);const{clientX:m,clientY:g}=f;Y=!1;const S=p({mouseUpClientX:m,mouseUpClientY:g,mouseDownClientX:j,mouseDownClientY:F}),P=y(S);R=P.offsetX,x=P.offsetY,G()}const B=ne(Lt,null);function v(f){var m,g;if((g=(m=B==null?void 0:B.previewedImgPropsRef.value)===null||m===void 0?void 0:m.onMousedown)===null||g===void 0||g.call(m,f),f.button!==0)return;const{clientX:S,clientY:P}=f;Y=!0,h=S-R,w=P-x,E=R,Z=x,j=S,F=P,G(),Re("mousemove",document,_),Re("mouseup",document,C)}const O=1.5;let L=0,T=1,z=0;function H(f){var m,g;(g=(m=B==null?void 0:B.previewedImgPropsRef.value)===null||m===void 0?void 0:m.onDblclick)===null||g===void 0||g.call(m,f);const S=de();T=T===S?1:S,G()}function U(){T=1,L=0}function I(){var f;U(),z=0,(f=e.onPrev)===null||f===void 0||f.call(e)}function X(){var f;U(),z=0,(f=e.onNext)===null||f===void 0||f.call(e)}function W(){z-=90,G()}function ee(){z+=90,G()}function we(){const{value:f}=r;if(!f)return 1;const{innerWidth:m,innerHeight:g}=window,S=Math.max(1,f.naturalHeight/(g-ce)),P=Math.max(1,f.naturalWidth/(m-ce));return Math.max(3,S*2,P*2)}function de(){const{value:f}=r;if(!f)return 1;const{innerWidth:m,innerHeight:g}=window,S=f.naturalHeight/(g-ce),P=f.naturalWidth/(m-ce);return S<1&&P<1?1:Math.max(S,P)}function be(){const f=we();T<f&&(L+=1,T=Math.min(f,Math.pow(O,L)),G())}function xe(){if(T>.5){const f=T;L-=1,T=Math.max(.5,Math.pow(O,L));const m=f-T;G(!1);const g=y();T+=m,G(!1),T-=m,R=g.offsetX,x=g.offsetY,G()}}function Ce(){const f=i.value;f&&dt(f,void 0)}function G(f=!0){var m;const{value:g}=r;if(!g)return;const{style:S}=g,P=Wt((m=B==null?void 0:B.previewedImgPropsRef.value)===null||m===void 0?void 0:m.style);let V="";if(typeof P=="string")V=`${P};`;else for(const J in P)V+=`${rn(J)}: ${P[J]};`;const q=`transform-origin: center; transform: translateX(${R}px) translateY(${x}px) rotate(${z}deg) scale(${T});`;Y?S.cssText=`${V}cursor: grabbing; transition: none;${q}`:S.cssText=`${V}cursor: grab;${q}${f?"":"transition: none;"}`,f||g.offsetHeight}function De(){u.value=!u.value,c.value=!0}function Bt(){T=de(),L=Math.ceil(Math.log(T)/Math.log(O)),R=0,x=0,G()}const
display: block;
`)]),N("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);
`,[D("&:hover",`
border: var(--n-dragger-border-hover);
`),N("disabled",`
cursor: not-allowed;
`)]),b("upload-trigger",`
display: inline-block;
box-sizing: border-box;
opacity: 1;
transition: opacity .3s var(--n-bezier);
`,[D("+",[b("upload-file-list","margin-top: 8px;")]),N("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`),N("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);
`,[D("a, img","outline: none;"),N("disabled",`
opacity: var(--n-item-disabled-opacity);
cursor: not-allowed;
`,[b("upload-file","cursor: not-allowed;")]),N("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);
`,[Ae(),b("progress",[Ae({foldPadding:!0})]),D("&:hover",`
background-color: var(--n-item-color-hover);
`,[b("upload-file-info",[K("action",`
opacity: 1;
`)])]),N("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;
`,[D("img",`
width: 100%;
`)])])]),N("text-type",[b("progress",`
box-sizing: border-box;
padding-bottom: 6px;
margin-bottom: 6px;
`)]),N("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;
`,[D("img",`
width: 100%;
`)])]),D("&::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: "";
`),D("&:hover",[D("&::before","opacity: 1;"),b("upload-file-info",[K("thumbnail","opacity: .12;")])])]),N("error-status",[D("&: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);")]),N("image-card-type",`
border: var(--n-item-border-image-card-error);
`)]),N("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);
`,[D("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",[D("&:not(:last-child)",{marginRight:"4px"}),b("base-icon",[D("svg",[Gt()])])]),N("image-type",`
position: relative;
max-width: 80px;
width: auto;
`),N("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);
`,[D("a",`
color: inherit;
text-decoration: underline;
`)])])])]),b("upload-file-input",`
display: none;
width: 0;
height: 0;
opacity: 0;
`)]),kt="__UPLOAD_DRAGGER__",Pn=Q({name:"UploadDragger",[kt]:!0,setup(e,{slots:t}){const o=ne(ae,null);return o||me("upload-dragger","`n-upload-dragger` must be placed inside `n-upload`."),()=>{const{mergedClsPrefixRef:{value:r},mergedDisabledRef:{value:l},maxReachedRef:{value:i}}=o;return n("div",{class:[`${r}-upload-dragger`,(l||i)&&`${r}-upload-dragger--disabled`]},t)}}}),In=n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},n("g",{fill:"none"},n("path",{d:"M21.75 3A3.25 3.25 0 0 1 25 6.25v15.5A3.25 3.25 0 0 1 21.75 25H6.25A3.25 3.25 0 0 1 3 21.75V6.25A3.25 3.25 0 0 1 6.25 3h15.5zm.583 20.4l-7.807-7.68a.75.75 0 0 0-.968-.07l-.084.07l-7.808 7.68c.183.065.38.1.584.1h15.5c.204 0 .4-.035.583-.1l-7.807-7.68l7.807 7.68zM21.75 4.5H6.25A1.75 1.75 0 0 0 4.5 6.25v15.5c0 .208.036.408.103.593l7.82-7.692a2.25 2.25 0 0 1 3.026-.117l.129.117l7.82 7.692c.066-.185.102-.385.102-.593V6.25a1.75 1.75 0 0 0-1.75-1.75zm-3.25 3a2.5 2.5 0 1 1 0 5a2.5 2.5 0 0 1 0-5zm0 1.5a1 1 0 1 0 0 2a1 1 0 0 0 0-2z",fill:"currentColor"}))),_n=n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"},n("g",{fill:"none"},n("path",{d:"M6.4 2A2.4 2.4 0 0 0 4 4.4v19.2A2.4 2.4 0 0 0 6.4 26h15.2a2.4 2.4 0 0 0 2.4-2.4V11.578c0-.729-.29-1.428-.805-1.944l-6.931-6.931A2.4 2.4 0 0 0 14.567 2H6.4zm-.9 2.4a.9.9 0 0 1 .9-.9H14V10a2 2 0 0 0 2 2h6.5v11.6a.9.9 0 0 1-.9.9H6.4a.9.9 0 0 1-.9-.9V4.4zm16.44 6.1H16a.5.5 0 0 1-.5-.5V4.06l6.44 6.44z",fill:"currentColor"}))),Bn=Q({name:"UploadProgress",props:{show:Boolean,percentage:{type:Number,required:!0},status:{type:String,required:!0}},setup(){return{mergedTheme:ne(ae).mergedThemeRef}},render(){return n(it,null,{default:()=>this.show?n(go,{type:"line",showIndicator:!1,percentage:this.percentage,status:this.status,height:2,theme:this.mergedTheme.peers.Progress,themeOverrides:this.mergedTheme.peerOverrides.Progress}):null})}});var Ie=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(h){u(h)}}function d(s){try{a(r.throw(s))}catch(h){u(h)}}function a(s){s.done?i(s.value):l(s.value).then(c,d)}a((r=r.apply(e,t||[])).next())})};function St(e){return e.includes("image/")}function Ge(e=""){const t=e.split("/"),r=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]}const Je=/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i,Pt=e=>{if(e.type)return St(e.type);const t=Ge(e.name||"");if(Je.test(t))return!0;const o=e.thumbnailUrl||e.url||"",r=Ge(o);return!!(/^data:image\//.test(o)||Je.test(r))};function zn(e){return Ie(this,void 0,void 0,function*(){return yield new Promise(t=>{if(!e.type||!St(e.type)){t("");return}t(window.URL.createObjectURL(e))})})}const Un=tt&&window.FileReader&&window.File;function Dn(e){return e.isDirectory}function Mn(e){return e.isFile}function Fn(e,t){return Ie(this,void 0,void 0,function*(){const o=[];function r(l){return Ie(this,void 0,void 0,function*(){for(const i of l)if(i){if(t&&Dn(i)){const u=i.createReader();let c=[],d;try{do d=yield new Promise((a,s)=>{u.readEntries(a,s)}),c=c.concat(d);while(d.length>0)}catch(a){He("upload","error happens when handling directory upload",a)}yield r(c)}else if(Mn(i))try{const u=yield new Promise((c,d)=>{i.file(c,d)});o.push({file:u,entry:i,source:"dnd"})}catch(u){He("upload","error happens when handling file upload",u)}}})}return yield r(e),o})}function se(e){const{id:t,name:o,percentage:r,status:l,url:i,file:u,thumbnailUrl:c,type:d,fullPath:a,batchId:s}=e;return{id:t,name:o,percentage:r??null,status:l,url:i??null,file:u??null,thumbnailUrl:c??null,type:d??null,fullPath:a??null,batchId:s??null}}function En(e,t,o){return e=e.toLowerCase(),t=t.toLocaleLowerCase(),o=o.toLocaleLowerCase(),o.split(",").map(l=>l.trim()).filter(Boolean).some(l=>{if(l.startsWith(".")){if(e.endsWith(l))return!0}else if(l.includes("/")){const[i,u]=t.split("/"),[c,d]=l.split("/");if((c==="*"||i&&c&&c===i)&&(d==="*"||u&&d&&d===u))return!0}else return!0;return!1})}var Ke=function(e,t,o,r){function l(i){return i instanceof o?i:new o(function(u){u(i)})}return new(