2025-07-27 10:51:22 +03:30
|
|
|
import{C as p,ba as re,d as Z,r as ne,o as de,e as Me,aQ as R,db as et,aK as he,aR as w,aU as K,aW as G,aS as z,aT as Y,bD as ce,aI as O,s as te,a1 as ze,aL as we,k as oe,bs as tt,U as nt,a7 as Be,a8 as He,b7 as ot,dc as rt,br as it,bt as at,av as xe,bb as lt,ax as Pe,aZ as st,bF as Ne,cz as Xe,bf as Ve,cy as ct,bc as dt,bd as ut,be as pt,b2 as ft,bY as mt,cU as pe,bo as gt,bp as vt,aP as k,bT as ht}from"./vNwORUzZ.js";import{c as wt}from"./BZRFmnEH.js";import{E as bt}from"./BwPyxH4J.js";import{_ as yt}from"./CwW7ictx.js";import{_ as $t}from"./C_XLlL-m.js";import{c as It,g as St}from"./B7EYj09j.js";import{u as Ot}from"./Bm2ySzQc.js";import"./BS3cW_7I.js";import{u as Ct}from"./C1A0Ol0M.js";var xt=wt(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]}),Pt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},o=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),o.forEach(function(r){Ft(e,r,n[r])})}return e}function Ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be=function(t,n){var o=Fe({},t,n.attrs);return p(re,Fe({},o,{icon:Pt}),null)};be.displayName="DeleteOutlined";be.inheritAttrs=!1;function Dt(e,t){const n=`cannot ${e.method} ${e.action} ${t.status}'`,o=new Error(n);return o.status=t.status,o.method=e.method,o.url=e.action,o}function De(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function Rt(e){const t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(a){a.total>0&&(a.percent=a.loaded/a.total*100),e.onProgress(a)});const n=new FormData;e.data&&Object.keys(e.data).forEach(r=>{const a=e.data[r];if(Array.isArray(a)){a.forEach(i=>{n.append(`${r}[]`,i)});return}n.append(r,a)}),e.file instanceof Blob?n.append(e.filename,e.file,e.file.name):n.append(e.filename,e.file),t.onerror=function(a){e.onError(a)},t.onload=function(){return t.status<200||t.status>=300?e.onError(Dt(e,t),De(t)):e.onSuccess(De(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};return o["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(r=>{o[r]!==null&&t.setRequestHeader(r,o[r])}),t.send(n),{abort(){t.abort()}}}const Tt=+new Date;let _t=0;function fe(){return`vc-upload-${Tt}-${++_t}`}const me=(e,t)=>{if(e&&t){const n=Array.isArray(t)?t:t.split(","),o=e.name||"",r=e.type||"",a=r.replace(/\/.*$/,"");return n.some(i=>{const s=i.trim();if(/^\*(\/\*)?$/.test(i))return!0;if(s.charAt(0)==="."){const I=o.toLowerCase(),x=s.toLowerCase();let g=[x];return(x===".jpg"||x===".jpeg")&&(g=[".jpg",".jpeg"]),g.some(T=>I.endsWith(T))}return/\/\*$/.test(s)?a===s.replace(/\/.*$/,""):!!(r===s||/^\w+$/.test(s))})}return!0};function jt(e,t){const n=e.createReader();let o=[];function r(){n.readEntries(a=>{const i=Array.prototype.slice.apply(a);o=o.concat(i),!i.length?t(o):r()})}r()}const Lt=(e,t,n)=>{const o=(r,a)=>{r.path=a||"",r.isFile?r.file(i=>{n(i)&&(r.fullPath&&!i.webkitRelativePath&&(Object.defineProperties(i,{webkitRelativePath:{writable:!0}}),i.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(i,{webkitRelativePath:{writable:!1}})),t([i]))}):r.isDirectory&&jt(r,i=>{i.forEach(s=>{o(s,`${a}${r.name}/`)})})};e.forEach(r=>{o(r.webkitGetAsEntry())})},qe=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,d
|
2025-07-26 22:08:43 +03:30
|
|
|
p${t}-text,
|
|
|
|
|
p${t}-hint
|
|
|
|
|
`]:{color:e.colorTextDisabled}}}}}},nn=e=>{const{componentCls:t,antCls:n,iconCls:o,fontSize:r,lineHeight:a}=e,i=`${t}-list-item`,s=`${i}-actions`,I=`${i}-action`,x=Math.round(r*a);return{[`${t}-wrapper`]:{[`${t}-list`]:O(O({},Ne()),{lineHeight:e.lineHeight,[i]:{position:"relative",height:e.lineHeight*r,marginTop:e.marginXS,fontSize:r,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,"&:hover":{backgroundColor:e.controlItemBgHover},[`${i}-name`]:O(O({},Xe),{padding:`0 ${e.paddingXS}px`,lineHeight:a,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[s]:{[I]:{opacity:0},[`${I}${n}-btn-sm`]:{height:x,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[`
|
|
|
|
|
${I}:focus,
|
|
|
|
|
&.picture ${I}
|
|
|
|
|
`]:{opacity:1},[o]:{color:e.colorTextDescription,transition:`all ${e.motionDurationSlow}`},[`&:hover ${o}`]:{color:e.colorText}},[`${t}-icon ${o}`]:{color:e.colorTextDescription,fontSize:r},[`${i}-progress`]:{position:"absolute",bottom:-e.uploadProgressOffset,width:"100%",paddingInlineStart:r+e.paddingXS,fontSize:r,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${i}:hover ${I}`]:{opacity:1,color:e.colorText},[`${i}-error`]:{color:e.colorError,[`${i}-name, ${t}-icon ${o}`]:{color:e.colorError},[s]:{[`${o}, ${o}:hover`]:{color:e.colorError},[I]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},Ue=new Ve("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),Ae=new Ve("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),on=e=>{const{componentCls:t}=e,n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:Ue},[`${n}-leave`]:{animationName:Ae}}},Ue,Ae]},rn=e=>{const{componentCls:t,iconCls:n,uploadThumbnailSize:o,uploadProgressOffset:r}=e,a=`${t}-list`,i=`${a}-item`;return{[`${t}-wrapper`]:{[`${a}${a}-picture, ${a}${a}-picture-card`]:{[i]:{position:"relative",height:o+e.lineWidth*2+e.paddingXS*2,padding:e.paddingXS,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${i}-thumbnail`]:O(O({},Xe),{width:o,height:o,lineHeight:`${o+e.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${i}-progress`]:{bottom:r,width:`calc(100% - ${e.paddingSM*2}px)`,marginTop:0,paddingInlineStart:o+e.paddingXS}},[`${i}-error`]:{borderColor:e.colorError,[`${i}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:e.colorErrorBg},"svg path[fill='#1890ff']":{fill:e.colorError}}},[`${i}-uploading`]:{borderStyle:"dashed",[`${i}-name`]:{marginBottom:r}}}}}},an=e=>{const{componentCls:t,iconCls:n,fontSizeLG:o,colorTextLightSolid:r}=e,a=`${t}-list`,i=`${a}-item`,s=e.uploadPicCardSize;return{[`${t}-wrapper${t}-picture-card-wrapper`]:O(O({},Ne()),{display:"inline-block",width:"100%",[`${t}${t}-select`]:{width:s,height:s,marginInlineEnd:e.marginXS,marginBottom:e.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${e.lineWidth}px dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card`]:{[`${a}-item-container`]:{display:"inline-block",width:s,height:s,marginBlock:`0 ${e.marginXS}px`,marginInline:`0 ${e.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[i]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${e.paddingXS*2}px)`,height:`calc(100% - ${e.paddingXS*2}px)`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${i}:hover`]:{[`&::before, ${i}-actions`]:{opacity:1}},[`${i}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:o,margin:`0 ${e.marginXXS}px`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`}},[`${i}-actions, ${i}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new ct(r).setAlpha(.65).toRgbString(),"&:hover":{color:r}}},[`${i}-thumbnail, ${i}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${i}-name`]:{display:"none",textAlign:"c
|