pixivflow 2.0.38 → 2.0.39
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.
- package/dist/commands/DownloadCommand.d.ts.map +1 -1
- package/dist/commands/DownloadCommand.js +50 -2
- package/dist/commands/DownloadCommand.js.map +1 -1
- package/dist/config/validation.d.ts.map +1 -1
- package/dist/config/validation.js +11 -3
- package/dist/config/validation.js.map +1 -1
- package/dist/index.js +37 -14
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/pixiv/AuthClient.d.ts.map +1 -1
- package/dist/pixiv/AuthClient.js +56 -7
- package/dist/pixiv/AuthClient.js.map +1 -1
- package/dist/storage/Database.d.ts +22 -0
- package/dist/storage/Database.d.ts.map +1 -1
- package/dist/storage/Database.js +19 -0
- package/dist/storage/Database.js.map +1 -1
- package/dist/storage/DatabaseMigration.d.ts.map +1 -1
- package/dist/storage/DatabaseMigration.js +29 -0
- package/dist/storage/DatabaseMigration.js.map +1 -1
- package/dist/storage/repositories/TaskHistoryRepository.d.ts +61 -0
- package/dist/storage/repositories/TaskHistoryRepository.d.ts.map +1 -0
- package/dist/storage/repositories/TaskHistoryRepository.js +171 -0
- package/dist/storage/repositories/TaskHistoryRepository.js.map +1 -0
- package/dist/utils/errors.js +11 -11
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/pixiv-url-parser.d.ts +7 -1
- package/dist/utils/pixiv-url-parser.d.ts.map +1 -1
- package/dist/utils/pixiv-url-parser.js +75 -8
- package/dist/utils/pixiv-url-parser.js.map +1 -1
- package/dist/utils/token-manager.d.ts.map +1 -1
- package/dist/utils/token-manager.js +73 -5
- package/dist/utils/token-manager.js.map +1 -1
- package/dist/webui/package.json +1 -1
- package/dist/webui/routes/download.d.ts.map +1 -1
- package/dist/webui/routes/download.js +2 -0
- package/dist/webui/routes/download.js.map +1 -1
- package/dist/webui/routes/handlers/download-basic-handlers.d.ts +11 -0
- package/dist/webui/routes/handlers/download-basic-handlers.d.ts.map +1 -1
- package/dist/webui/routes/handlers/download-basic-handlers.js +199 -8
- package/dist/webui/routes/handlers/download-basic-handlers.js.map +1 -1
- package/dist/webui/services/DownloadTaskManager.d.ts.map +1 -1
- package/dist/webui/services/DownloadTaskManager.js +75 -3
- package/dist/webui/services/DownloadTaskManager.js.map +1 -1
- package/package.json +1 -1
- package/dist/webui/assets/ActionButton-DWq-fh3_.js +0 -2
- package/dist/webui/assets/ActionButton-DWq-fh3_.js.map +0 -1
- package/dist/webui/assets/CheckCircleOutlined-Can0-7ew.js +0 -2
- package/dist/webui/assets/CheckCircleOutlined-Can0-7ew.js.map +0 -1
- package/dist/webui/assets/CloseCircleOutlined-DfRmL2eG.js +0 -2
- package/dist/webui/assets/CloseCircleOutlined-DfRmL2eG.js.map +0 -1
- package/dist/webui/assets/Config-D9TWUGQR.js +0 -16
- package/dist/webui/assets/Config-D9TWUGQR.js.map +0 -1
- package/dist/webui/assets/Dashboard-CaGAH0y2.js +0 -2
- package/dist/webui/assets/Dashboard-CaGAH0y2.js.map +0 -1
- package/dist/webui/assets/DeleteOutlined-u-P2SpoK.js +0 -2
- package/dist/webui/assets/DeleteOutlined-u-P2SpoK.js.map +0 -1
- package/dist/webui/assets/Download-D9E4xrnM.js +0 -2
- package/dist/webui/assets/Download-D9E4xrnM.js.map +0 -1
- package/dist/webui/assets/Files-CKyc_PdW.js +0 -5
- package/dist/webui/assets/Files-CKyc_PdW.js.map +0 -1
- package/dist/webui/assets/PictureOutlined-C8Lbucj1.js +0 -2
- package/dist/webui/assets/PictureOutlined-C8Lbucj1.js.map +0 -1
- package/dist/webui/assets/SortDescendingOutlined-CR-hdhyW.js +0 -2
- package/dist/webui/assets/SortDescendingOutlined-CR-hdhyW.js.map +0 -1
- package/dist/webui/assets/ThunderboltOutlined-CiiB2de5.js +0 -2
- package/dist/webui/assets/ThunderboltOutlined-CiiB2de5.js.map +0 -1
- package/dist/webui/assets/UrlDownload-ClkUOXN_.js +0 -3
- package/dist/webui/assets/UrlDownload-ClkUOXN_.js.map +0 -1
- package/dist/webui/assets/dateUtils-CBk8bEa_.js +0 -2
- package/dist/webui/assets/dateUtils-CBk8bEa_.js.map +0 -1
- package/dist/webui/assets/errorCodeTranslator-DWsWq6B3.js +0 -3
- package/dist/webui/assets/errorCodeTranslator-DWsWq6B3.js.map +0 -1
- package/dist/webui/assets/index-BFgUdwJv.js +0 -214
- package/dist/webui/assets/index-BFgUdwJv.js.map +0 -1
- package/dist/webui/assets/index-CN3FylAF.js +0 -2
- package/dist/webui/assets/index-CN3FylAF.js.map +0 -1
- package/dist/webui/assets/index-CSoUPZat.js +0 -2
- package/dist/webui/assets/index-CSoUPZat.js.map +0 -1
- package/dist/webui/assets/index-CiHwNwrk.js +0 -19
- package/dist/webui/assets/index-CiHwNwrk.js.map +0 -1
- package/dist/webui/assets/index-DHwJxrFi.css +0 -1
- package/dist/webui/assets/index-DTU-FGA4.js +0 -2
- package/dist/webui/assets/index-DTU-FGA4.js.map +0 -1
- package/dist/webui/assets/index-DjpD0HQ5.js +0 -2
- package/dist/webui/assets/index-DjpD0HQ5.js.map +0 -1
- package/dist/webui/assets/index-Dycn6xoz.js +0 -2
- package/dist/webui/assets/index-Dycn6xoz.js.map +0 -1
- package/dist/webui/assets/index-G0EJCamt.js +0 -22
- package/dist/webui/assets/index-G0EJCamt.js.map +0 -1
- package/dist/webui/assets/index-WaraZQH0.js +0 -2
- package/dist/webui/assets/index-WaraZQH0.js.map +0 -1
- package/dist/webui/assets/index-k2rGFxEM.js +0 -8
- package/dist/webui/assets/index-k2rGFxEM.js.map +0 -1
- package/dist/webui/assets/index-lwTtspUb.js +0 -14
- package/dist/webui/assets/index-lwTtspUb.js.map +0 -1
- package/dist/webui/assets/index-pT0W4KjK.js +0 -47
- package/dist/webui/assets/index-pT0W4KjK.js.map +0 -1
- package/dist/webui/assets/index-wvielV9A.js +0 -2
- package/dist/webui/assets/index-wvielV9A.js.map +0 -1
- package/dist/webui/assets/row-FRqVdQDX.js +0 -20
- package/dist/webui/assets/row-FRqVdQDX.js.map +0 -1
- package/dist/webui/assets/useAuth-BMt6dHSB.js +0 -9
- package/dist/webui/assets/useAuth-BMt6dHSB.js.map +0 -1
- package/dist/webui/assets/useConfig-29Ugtjk4.js +0 -9
- package/dist/webui/assets/useConfig-29Ugtjk4.js.map +0 -1
- package/dist/webui/assets/useDownload-Dt6lsP8S.js +0 -2
- package/dist/webui/assets/useDownload-Dt6lsP8S.js.map +0 -1
- package/dist/webui/assets/useErrorHandler-DWHs3RlU.js +0 -84
- package/dist/webui/assets/useErrorHandler-DWHs3RlU.js.map +0 -1
- package/dist/webui/index.html +0 -15
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import{aY as kt,v as je,z as ie,t as Ne,x as er,y as Ot,b2 as tr,a1 as B,r as a,m as W,o as tt,g as ge,_ as we,a3 as ce,n as _e,h as he,a6 as ze,a8 as Me,af as rt,b6 as rr,ab as nt,D as It,E as zt,H as jt,J as Bt,G as Tt,K as At,q as ot,L as et,M as ut,O as Nt,i as Ee,ao as _t,l as ft,I as at,c9 as nr,bD as Mt,ad as or,a2 as pt,ak as ar,am as ir,X as it,Z as lr,aM as sr,a5 as Ht,C as cr,aC as dr}from"./index-BFgUdwJv.js";var Pt=function(t){if(kt()&&window.document.documentElement){var n=Array.isArray(t)?t:[t],r=window.document.documentElement;return n.some(function(o){return o in r.style})}return!1},ur=function(t,n){if(!Pt(t))return!1;var r=document.createElement("div"),o=r.style[t];return r.style[t]=n,r.style[t]!==o};function gt(e,t){return!Array.isArray(e)&&t!==void 0?ur(e,t):Pt(e)}function lt(e){return je(e,{inputAffixPadding:e.paddingXXS})}const st=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:o,controlHeightSM:l,controlHeightLG:i,fontSizeLG:c,lineHeightLG:f,paddingSM:s,controlPaddingHorizontalSM:u,controlPaddingHorizontal:g,colorFillAlter:d,colorPrimaryHover:O,colorPrimary:C,controlOutlineWidth:x,controlOutline:_,colorErrorOutline:S,colorWarningOutline:E,colorBgContainer:V,inputFontSize:T,inputFontSizeLG:y,inputFontSizeSM:m}=e,p=T||n,U=m||p,H=y||c,R=Math.round((t-p*r)/2*10)/10-o,P=Math.round((l-U*r)/2*10)/10-o,k=Math.ceil((i-H*f)/2*10)/10-o;return{paddingBlock:Math.max(R,0),paddingBlockSM:Math.max(P,0),paddingBlockLG:Math.max(k,0),paddingInline:s-o,paddingInlineSM:u-o,paddingInlineLG:g-o,addonBg:d,activeBorderColor:C,hoverBorderColor:O,activeShadow:`0 0 0 ${x}px ${_}`,errorActiveShadow:`0 0 0 ${x}px ${S}`,warningActiveShadow:`0 0 0 ${x}px ${E}`,hoverBg:V,activeBg:V,inputFontSize:p,inputFontSizeLG:H,inputFontSizeSM:U}},fr=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),ct=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},fr(je(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),Dt=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),mt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Dt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),pr=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Dt(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},ct(e))}),mt(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),mt(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),vt=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),gr=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},vt(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),vt(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},ct(e))}})}),mr=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${n}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${n}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${n}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},Lt=(e,t)=>{var n;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(n=t?.inputColor)!==null&&n!==void 0?n:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},bt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Lt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),vr=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Lt(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},ct(e))}),bt(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),bt(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),ht=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),br=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},ht(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),ht(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${ie(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),Wt=(e,t)=>({background:e.colorBgContainer,borderWidth:`${ie(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),xt=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Wt(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),hr=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Wt(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),xt(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),xt(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),xr=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Ft=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:o}=e;return{padding:`${ie(t)} ${ie(o)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},Vt=e=>({padding:`${ie(e.paddingBlockSM)} ${ie(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Gt=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${ie(e.paddingBlock)} ${ie(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},xr(e.colorTextPlaceholder)),{"&-lg":Object.assign({},Ft(e)),"&-sm":Object.assign({},Vt(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),Sr=e=>{const{componentCls:t,antCls:n}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},Ft(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},Vt(e)),[`&-lg ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single ${n}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${ie(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${ie(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${ie(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${ie(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${n}-cascader-picker`]:{margin:`-9px ${ie(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},tr()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
2
|
-
& > ${t}-affix-wrapper,
|
|
3
|
-
& > ${t}-number-affix-wrapper,
|
|
4
|
-
& > ${n}-picker-range
|
|
5
|
-
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${n}-select > ${n}-select-selector,
|
|
6
|
-
& > ${n}-select-auto-complete ${t},
|
|
7
|
-
& > ${n}-cascader-picker ${t},
|
|
8
|
-
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
9
|
-
& > ${n}-select:first-child > ${n}-select-selector,
|
|
10
|
-
& > ${n}-select-auto-complete:first-child ${t},
|
|
11
|
-
& > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
|
12
|
-
& > ${n}-select:last-child > ${n}-select-selector,
|
|
13
|
-
& > ${n}-cascader-picker:last-child ${t},
|
|
14
|
-
& > ${n}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${n}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},yr=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:o}=e,i=o(n).sub(o(r).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ot(e)),Gt(e)),pr(e)),vr(e)),mr(e)),hr(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:i,paddingBottom:i}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},Cr=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${ie(e.inputAffixPadding)}`}}}},$r=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:o,colorIcon:l,colorIconHover:i,iconCls:c}=e,f=`${t}-affix-wrapper`,s=`${t}-affix-wrapper-disabled`;return{[f]:Object.assign(Object.assign(Object.assign(Object.assign({},Gt(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:r,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),Cr(e)),{[`${c}${t}-password-icon`]:{color:l,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:i}}}),[`${t}-underlined`]:{borderRadius:0},[s]:{[`${c}${t}-password-icon`]:{color:l,cursor:"not-allowed","&:hover":{color:l}}}}},Er=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Ot(e)),Sr(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:n,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:r}}},gr(e)),br(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},wr=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-search`;return{[r]:{[t]:{"&:not([disabled]):hover, &:not([disabled]):focus":{[`+ ${t}-group-addon ${r}-button:not(${n}-btn-color-primary):not(${n}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${r}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${r}-button:not(${n}-btn-color-primary)`]:{color:e.colorTextDescription,"&:not([disabled]):hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${n}-btn-loading::before`]:{inset:0}}}},[`${r}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${r}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
|
|
15
|
-
> ${t},
|
|
16
|
-
${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},Rr=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Ut=Ne(["Input","Shared"],e=>{const t=je(e,lt(e));return[yr(t),$r(t)]},st,{resetFont:!1}),Or=Ne(["Input","Component"],e=>{const t=je(e,lt(e));return[Er(t),wr(t),Rr(t),er(t)]},st,{resetFont:!1});function Ir(e){return!!(e.addonBefore||e.addonAfter)}function zr(e){return!!(e.prefix||e.suffix||e.allowClear)}function St(e,t,n){var r=t.cloneNode(!0),o=Object.create(e,{target:{value:r},currentTarget:{value:r}});return r.value=n,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(r.selectionStart=t.selectionStart,r.selectionEnd=t.selectionEnd),r.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},o}function Ae(e,t,n,r){if(n){var o=t;if(t.type==="click"){o=St(t,e,""),n(o);return}if(e.type!=="file"&&r!==void 0){o=St(t,e,r),n(o);return}n(o)}}function Kt(e,t){if(e){e.focus(t);var n=t||{},r=n.cursor;if(r){var o=e.value.length;switch(r){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}}var qt=B.forwardRef(function(e,t){var n,r,o,l=e.inputElement,i=e.children,c=e.prefixCls,f=e.prefix,s=e.suffix,u=e.addonBefore,g=e.addonAfter,d=e.className,O=e.style,C=e.disabled,x=e.readOnly,_=e.focused,S=e.triggerFocus,E=e.allowClear,V=e.value,T=e.handleReset,y=e.hidden,m=e.classes,p=e.classNames,U=e.dataAttrs,H=e.styles,R=e.components,P=e.onClear,k=i??l,$=R?.affixWrapper||"span",w=R?.groupWrapper||"span",I=R?.wrapper||"span",b=R?.groupAddon||"span",A=a.useRef(null),h=function(K){var z;(z=A.current)!==null&&z!==void 0&&z.contains(K.target)&&S?.()},ee=zr(e),J=a.cloneElement(k,{value:V,className:W((n=k.props)===null||n===void 0?void 0:n.className,!ee&&p?.variant)||null}),te=a.useRef(null);if(B.useImperativeHandle(t,function(){return{nativeElement:te.current||A.current}}),ee){var F=null;if(E){var X=!C&&!x&&V,fe="".concat(c,"-clear-icon"),de=tt(E)==="object"&&E!==null&&E!==void 0&&E.clearIcon?E.clearIcon:"✖";F=B.createElement("button",{type:"button",tabIndex:-1,onClick:function(K){T?.(K),P?.()},onMouseDown:function(K){return K.preventDefault()},className:W(fe,ge(ge({},"".concat(fe,"-hidden"),!X),"".concat(fe,"-has-suffix"),!!s))},de)}var Q="".concat(c,"-affix-wrapper"),me=W(Q,ge(ge(ge(ge(ge({},"".concat(c,"-disabled"),C),"".concat(Q,"-disabled"),C),"".concat(Q,"-focused"),_),"".concat(Q,"-readonly"),x),"".concat(Q,"-input-with-clear-btn"),s&&E&&V),m?.affixWrapper,p?.affixWrapper,p?.variant),Y=(s||E)&&B.createElement("span",{className:W("".concat(c,"-suffix"),p?.suffix),style:H?.suffix},F,s);J=B.createElement($,we({className:me,style:H?.affixWrapper,onClick:h},U?.affixWrapper,{ref:A}),f&&B.createElement("span",{className:W("".concat(c,"-prefix"),p?.prefix),style:H?.prefix},f),J,Y)}if(Ir(e)){var le="".concat(c,"-group"),Z="".concat(le,"-addon"),ne="".concat(le,"-wrapper"),q=W("".concat(c,"-wrapper"),le,m?.wrapper,p?.wrapper),ae=W(ne,ge({},"".concat(ne,"-disabled"),C),m?.group,p?.groupWrapper);J=B.createElement(w,{className:ae,ref:te},B.createElement(I,{className:q},u&&B.createElement(b,{className:Z},u),J,g&&B.createElement(b,{className:Z},g)))}return B.cloneElement(J,{className:W((r=J.props)===null||r===void 0?void 0:r.className,d)||null,style:ce(ce({},(o=J.props)===null||o===void 0?void 0:o.style),O),hidden:y})}),jr=["show"];function Xt(e,t){return a.useMemo(function(){var n={};t&&(n.show=tt(t)==="object"&&t.formatter?t.formatter:!!t),n=ce(ce({},n),e);var r=n,o=r.show,l=_e(r,jr);return ce(ce({},l),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:l.strategy||function(i){return i.length}})},[e,t])}var Br=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],Tr=a.forwardRef(function(e,t){var n=e.autoComplete,r=e.onChange,o=e.onFocus,l=e.onBlur,i=e.onPressEnter,c=e.onKeyDown,f=e.onKeyUp,s=e.prefixCls,u=s===void 0?"rc-input":s,g=e.disabled,d=e.htmlSize,O=e.className,C=e.maxLength,x=e.suffix,_=e.showCount,S=e.count,E=e.type,V=E===void 0?"text":E,T=e.classes,y=e.classNames,m=e.styles,p=e.onCompositionStart,U=e.onCompositionEnd,H=_e(e,Br),R=a.useState(!1),P=he(R,2),k=P[0],$=P[1],w=a.useRef(!1),I=a.useRef(!1),b=a.useRef(null),A=a.useRef(null),h=function(j){b.current&&Kt(b.current,j)},ee=ze(e.defaultValue,{value:e.value}),J=he(ee,2),te=J[0],F=J[1],X=te==null?"":String(te),fe=a.useState(null),de=he(fe,2),Q=de[0],me=de[1],Y=Xt(S,_),le=Y.max||C,Z=Y.strategy(X),ne=!!le&&Z>le;a.useImperativeHandle(t,function(){var G;return{focus:h,blur:function(){var re;(re=b.current)===null||re===void 0||re.blur()},setSelectionRange:function(re,$e,xe){var ve;(ve=b.current)===null||ve===void 0||ve.setSelectionRange(re,$e,xe)},select:function(){var re;(re=b.current)===null||re===void 0||re.select()},input:b.current,nativeElement:((G=A.current)===null||G===void 0?void 0:G.nativeElement)||b.current}}),a.useEffect(function(){I.current&&(I.current=!1),$(function(G){return G&&g?!1:G})},[g]);var q=function(j,re,$e){var xe=re;if(!w.current&&Y.exceedFormatter&&Y.max&&Y.strategy(re)>Y.max){if(xe=Y.exceedFormatter(re,{max:Y.max}),re!==xe){var ve,be;me([((ve=b.current)===null||ve===void 0?void 0:ve.selectionStart)||0,((be=b.current)===null||be===void 0?void 0:be.selectionEnd)||0])}}else if($e.source==="compositionEnd")return;F(xe),b.current&&Ae(b.current,j,r,xe)};a.useEffect(function(){if(Q){var G;(G=b.current)===null||G===void 0||G.setSelectionRange.apply(G,Me(Q))}},[Q]);var ae=function(j){q(j,j.target.value,{source:"change"})},ue=function(j){w.current=!1,q(j,j.currentTarget.value,{source:"compositionEnd"}),U?.(j)},K=function(j){i&&j.key==="Enter"&&!I.current&&(I.current=!0,i(j)),c?.(j)},z=function(j){j.key==="Enter"&&(I.current=!1),f?.(j)},M=function(j){$(!0),o?.(j)},D=function(j){I.current&&(I.current=!1),$(!1),l?.(j)},se=function(j){F(""),h(),b.current&&Ae(b.current,j,r)},Oe=ne&&"".concat(u,"-out-of-range"),Re=function(){var j=rt(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return B.createElement("input",we({autoComplete:n},j,{onChange:ae,onFocus:M,onBlur:D,onKeyDown:K,onKeyUp:z,className:W(u,ge({},"".concat(u,"-disabled"),g),y?.input),style:m?.input,ref:b,size:d,type:V,onCompositionStart:function($e){w.current=!0,p?.($e)},onCompositionEnd:ue}))},Ie=function(){var j=Number(le)>0;if(x||Y.show){var re=Y.showFormatter?Y.showFormatter({value:X,count:Z,maxLength:le}):"".concat(Z).concat(j?" / ".concat(le):"");return B.createElement(B.Fragment,null,Y.show&&B.createElement("span",{className:W("".concat(u,"-show-count-suffix"),ge({},"".concat(u,"-show-count-has-suffix"),!!x),y?.count),style:ce({},m?.count)},re),x)}return null};return B.createElement(qt,we({},H,{prefixCls:u,className:W(O,Oe),handleReset:se,value:X,focused:k,triggerFocus:h,suffix:Ie(),disabled:g,classes:T,classNames:y,styles:m,ref:A}),Re())});const Yt=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:B.createElement(rr,null)}),t};function Ar(e,t){const n=a.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var o,l,i,c;!((o=e.current)===null||o===void 0)&&o.input&&((l=e.current)===null||l===void 0?void 0:l.input.getAttribute("type"))==="password"&&(!((i=e.current)===null||i===void 0)&&i.input.hasAttribute("value"))&&((c=e.current)===null||c===void 0||c.input.removeAttribute("value"))}))};return a.useEffect(()=>(t&&r(),()=>n.current.forEach(o=>{o&&clearTimeout(o)})),[]),r}function Nr(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var _r=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Vn=a.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:o,size:l,disabled:i,onBlur:c,onFocus:f,suffix:s,allowClear:u,addonAfter:g,addonBefore:d,className:O,style:C,styles:x,rootClassName:_,onChange:S,classNames:E,variant:V}=e,T=_r(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:y,direction:m,allowClear:p,autoComplete:U,className:H,style:R,classNames:P,styles:k}=nt("input"),$=y("input",n),w=a.useRef(null),I=It($),[b,A,h]=Ut($,_),[ee]=Or($,I),{compactSize:J,compactItemClassnames:te}=zt($,m),F=jt(D=>{var se;return(se=l??J)!==null&&se!==void 0?se:D}),X=B.useContext(Bt),fe=i??X,{status:de,hasFeedback:Q,feedbackIcon:me}=a.useContext(Tt),Y=Nt(de,o),le=Nr(e)||!!Q;a.useRef(le);const Z=Ar(w,!0),ne=D=>{Z(),c?.(D)},q=D=>{Z(),f?.(D)},ae=D=>{Z(),S?.(D)},ue=(Q||s)&&B.createElement(B.Fragment,null,s,Q&&me),K=Yt(u??p),[z,M]=At("input",V,r);return b(ee(B.createElement(Tr,Object.assign({ref:ot(t,w),prefixCls:$,autoComplete:U},T,{disabled:fe,onBlur:ne,onFocus:q,style:Object.assign(Object.assign({},R),C),styles:Object.assign(Object.assign({},k),x),suffix:ue,allowClear:K,className:W(O,_,h,I,te,H),onChange:ae,addonBefore:d&&B.createElement(ut,{form:!0,space:!0},d),addonAfter:g&&B.createElement(ut,{form:!0,space:!0},g),classNames:Object.assign(Object.assign(Object.assign({},E),P),{input:W({[`${$}-sm`]:F==="small",[`${$}-lg`]:F==="large",[`${$}-rtl`]:m==="rtl"},E?.input,P.input,A),variant:W({[`${$}-${z}`]:M},et($,Y)),affixWrapper:W({[`${$}-affix-wrapper-sm`]:F==="small",[`${$}-affix-wrapper-lg`]:F==="large",[`${$}-affix-wrapper-rtl`]:m==="rtl"},A),wrapper:W({[`${$}-group-rtl`]:m==="rtl"},A),groupWrapper:W({[`${$}-group-wrapper-sm`]:F==="small",[`${$}-group-wrapper-lg`]:F==="large",[`${$}-group-wrapper-rtl`]:m==="rtl",[`${$}-group-wrapper-${z}`]:M},et(`${$}-group-wrapper`,Y,Q),A)})}))))});var Mr=`
|
|
17
|
-
min-height:0 !important;
|
|
18
|
-
max-height:none !important;
|
|
19
|
-
height:0 !important;
|
|
20
|
-
visibility:hidden !important;
|
|
21
|
-
overflow:hidden !important;
|
|
22
|
-
position:absolute !important;
|
|
23
|
-
z-index:-1000 !important;
|
|
24
|
-
top:0 !important;
|
|
25
|
-
right:0 !important;
|
|
26
|
-
pointer-events: none !important;
|
|
27
|
-
`,Hr=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Fe={},pe;function Pr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&Fe[n])return Fe[n];var r=window.getComputedStyle(e),o=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),l=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),i=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),c=Hr.map(function(s){return"".concat(s,":").concat(r.getPropertyValue(s))}).join(";"),f={sizingStyle:c,paddingSize:l,borderSize:i,boxSizing:o};return t&&n&&(Fe[n]=f),f}function Dr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;pe||(pe=document.createElement("textarea"),pe.setAttribute("tab-index","-1"),pe.setAttribute("aria-hidden","true"),pe.setAttribute("name","hiddenTextarea"),document.body.appendChild(pe)),e.getAttribute("wrap")?pe.setAttribute("wrap",e.getAttribute("wrap")):pe.removeAttribute("wrap");var o=Pr(e,t),l=o.paddingSize,i=o.borderSize,c=o.boxSizing,f=o.sizingStyle;pe.setAttribute("style","".concat(f,";").concat(Mr)),pe.value=e.value||e.placeholder||"";var s=void 0,u=void 0,g,d=pe.scrollHeight;if(c==="border-box"?d+=i:c==="content-box"&&(d-=l),n!==null||r!==null){pe.value=" ";var O=pe.scrollHeight-l;n!==null&&(s=O*n,c==="border-box"&&(s=s+l+i),d=Math.max(s,d)),r!==null&&(u=O*r,c==="border-box"&&(u=u+l+i),g=d>u?"":"hidden",d=Math.min(u,d))}var C={height:d,overflowY:g,resize:"none"};return s&&(C.minHeight=s),u&&(C.maxHeight=u),C}var Lr=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Ve=0,Ge=1,Ue=2,Wr=a.forwardRef(function(e,t){var n=e,r=n.prefixCls,o=n.defaultValue,l=n.value,i=n.autoSize,c=n.onResize,f=n.className,s=n.style,u=n.disabled,g=n.onChange;n.onInternalAutoSize;var d=_e(n,Lr),O=ze(o,{value:l,postState:function(X){return X??""}}),C=he(O,2),x=C[0],_=C[1],S=function(X){_(X.target.value),g?.(X)},E=a.useRef();a.useImperativeHandle(t,function(){return{textArea:E.current}});var V=a.useMemo(function(){return i&&tt(i)==="object"?[i.minRows,i.maxRows]:[]},[i]),T=he(V,2),y=T[0],m=T[1],p=!!i,U=a.useState(Ue),H=he(U,2),R=H[0],P=H[1],k=a.useState(),$=he(k,2),w=$[0],I=$[1],b=function(){P(Ve)};Ee(function(){p&&b()},[l,y,m,p]),Ee(function(){if(R===Ve)P(Ge);else if(R===Ge){var F=Dr(E.current,!1,y,m);P(Ue),I(F)}},[R]);var A=a.useRef(),h=function(){ft.cancel(A.current)},ee=function(X){R===Ue&&(c?.(X),i&&(h(),A.current=ft(function(){b()})))};a.useEffect(function(){return h},[]);var J=p?w:null,te=ce(ce({},s),J);return(R===Ve||R===Ge)&&(te.overflowY="hidden",te.overflowX="hidden"),a.createElement(_t,{onResize:ee,disabled:!(i||c)},a.createElement("textarea",we({},d,{ref:E,style:te,className:W(r,f,ge({},"".concat(r,"-disabled"),u)),disabled:u,value:x,onChange:S})))}),Fr=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Vr=B.forwardRef(function(e,t){var n,r=e.defaultValue,o=e.value,l=e.onFocus,i=e.onBlur,c=e.onChange,f=e.allowClear,s=e.maxLength,u=e.onCompositionStart,g=e.onCompositionEnd,d=e.suffix,O=e.prefixCls,C=O===void 0?"rc-textarea":O,x=e.showCount,_=e.count,S=e.className,E=e.style,V=e.disabled,T=e.hidden,y=e.classNames,m=e.styles,p=e.onResize,U=e.onClear,H=e.onPressEnter,R=e.readOnly,P=e.autoSize,k=e.onKeyDown,$=_e(e,Fr),w=ze(r,{value:o,defaultValue:r}),I=he(w,2),b=I[0],A=I[1],h=b==null?"":String(b),ee=B.useState(!1),J=he(ee,2),te=J[0],F=J[1],X=B.useRef(!1),fe=B.useState(null),de=he(fe,2),Q=de[0],me=de[1],Y=a.useRef(null),le=a.useRef(null),Z=function(){var L;return(L=le.current)===null||L===void 0?void 0:L.textArea},ne=function(){Z().focus()};a.useImperativeHandle(t,function(){var oe;return{resizableTextArea:le.current,focus:ne,blur:function(){Z().blur()},nativeElement:((oe=Y.current)===null||oe===void 0?void 0:oe.nativeElement)||Z()}}),a.useEffect(function(){F(function(oe){return!V&&oe})},[V]);var q=B.useState(null),ae=he(q,2),ue=ae[0],K=ae[1];B.useEffect(function(){if(ue){var oe;(oe=Z()).setSelectionRange.apply(oe,Me(ue))}},[ue]);var z=Xt(_,x),M=(n=z.max)!==null&&n!==void 0?n:s,D=Number(M)>0,se=z.strategy(h),Oe=!!M&&se>M,Re=function(L,ye){var v=ye;!X.current&&z.exceedFormatter&&z.max&&z.strategy(ye)>z.max&&(v=z.exceedFormatter(ye,{max:z.max}),ye!==v&&K([Z().selectionStart||0,Z().selectionEnd||0])),A(v),Ae(L.currentTarget,L,c,v)},Ie=function(L){X.current=!0,u?.(L)},G=function(L){X.current=!1,Re(L,L.currentTarget.value),g?.(L)},j=function(L){Re(L,L.target.value)},re=function(L){L.key==="Enter"&&H&&H(L),k?.(L)},$e=function(L){F(!0),l?.(L)},xe=function(L){F(!1),i?.(L)},ve=function(L){A(""),ne(),Ae(Z(),L,c)},be=d,Se;z.show&&(z.showFormatter?Se=z.showFormatter({value:h,count:se,maxLength:M}):Se="".concat(se).concat(D?" / ".concat(M):""),be=B.createElement(B.Fragment,null,be,B.createElement("span",{className:W("".concat(C,"-data-count"),y?.count),style:m?.count},Se)));var De=function(L){var ye;p?.(L),(ye=Z())!==null&&ye!==void 0&&ye.style.height&&me(!0)},Le=!P&&!x&&!f;return B.createElement(qt,{ref:Y,value:h,allowClear:f,handleReset:ve,suffix:be,prefixCls:C,classNames:ce(ce({},y),{},{affixWrapper:W(y?.affixWrapper,ge(ge({},"".concat(C,"-show-count"),x),"".concat(C,"-textarea-allow-clear"),f))}),disabled:V,focused:te,className:W(S,Oe&&"".concat(C,"-out-of-range")),style:ce(ce({},E),Q&&!Le?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Se=="string"?Se:void 0}},hidden:T,readOnly:R,onClear:U},B.createElement(Wr,we({},$,{autoSize:P,maxLength:s,onKeyDown:re,onChange:j,onFocus:$e,onBlur:xe,onCompositionStart:Ie,onCompositionEnd:G,className:W(y?.textarea),style:ce(ce({},m?.textarea),{},{resize:E?.resize}),disabled:V,prefixCls:C,onResize:De,ref:le,readOnly:R})))});const Gr=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
28
|
-
&-allow-clear > ${t},
|
|
29
|
-
&-affix-wrapper${r}-has-feedback ${t}
|
|
30
|
-
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},Ur=Ne(["Input","TextArea"],e=>{const t=je(e,lt(e));return Gr(t)},st,{resetFont:!1});var Kr=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const qr=a.forwardRef((e,t)=>{var n;const{prefixCls:r,bordered:o=!0,size:l,disabled:i,status:c,allowClear:f,classNames:s,rootClassName:u,className:g,style:d,styles:O,variant:C,showCount:x,onMouseDown:_,onResize:S}=e,E=Kr(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:V,direction:T,allowClear:y,autoComplete:m,className:p,style:U,classNames:H,styles:R}=nt("textArea"),P=a.useContext(Bt),k=i??P,{status:$,hasFeedback:w,feedbackIcon:I}=a.useContext(Tt),b=Nt($,c),A=a.useRef(null);a.useImperativeHandle(t,()=>{var z;return{resizableTextArea:(z=A.current)===null||z===void 0?void 0:z.resizableTextArea,focus:M=>{var D,se;Kt((se=(D=A.current)===null||D===void 0?void 0:D.resizableTextArea)===null||se===void 0?void 0:se.textArea,M)},blur:()=>{var M;return(M=A.current)===null||M===void 0?void 0:M.blur()}}});const h=V("input",r),ee=It(h),[J,te,F]=Ut(h,u),[X]=Ur(h,ee),{compactSize:fe,compactItemClassnames:de}=zt(h,T),Q=jt(z=>{var M;return(M=l??fe)!==null&&M!==void 0?M:z}),[me,Y]=At("textArea",C,o),le=Yt(f??y),[Z,ne]=a.useState(!1),[q,ae]=a.useState(!1),ue=z=>{ne(!0),_?.(z);const M=()=>{ne(!1),document.removeEventListener("mouseup",M)};document.addEventListener("mouseup",M)},K=z=>{var M,D;if(S?.(z),Z&&typeof getComputedStyle=="function"){const se=(D=(M=A.current)===null||M===void 0?void 0:M.nativeElement)===null||D===void 0?void 0:D.querySelector("textarea");se&&getComputedStyle(se).resize==="both"&&ae(!0)}};return J(X(a.createElement(Vr,Object.assign({autoComplete:m},E,{style:Object.assign(Object.assign({},U),d),styles:Object.assign(Object.assign({},R),O),disabled:k,allowClear:le,className:W(F,ee,g,u,de,p,q&&`${h}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},s),H),{textarea:W({[`${h}-sm`]:Q==="small",[`${h}-lg`]:Q==="large"},te,s?.textarea,H.textarea,Z&&`${h}-mouse-active`),variant:W({[`${h}-${me}`]:Y},et(h,b)),affixWrapper:W(`${h}-textarea-affix-wrapper`,{[`${h}-affix-wrapper-rtl`]:T==="rtl",[`${h}-affix-wrapper-sm`]:Q==="small",[`${h}-affix-wrapper-lg`]:Q==="large",[`${h}-textarea-show-count`]:x||((n=e.count)===null||n===void 0?void 0:n.show)},te)}),prefixCls:h,suffix:w&&a.createElement("span",{className:`${h}-textarea-suffix`},I),showCount:x,ref:A,onResize:K,onMouseDown:ue}))))}),Xr=(e,t=!1)=>t&&e==null?[]:Array.isArray(e)?e:[e];var Yr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"},Zr=function(t,n){return a.createElement(at,we({},t,{ref:n,icon:Yr}))},Jr=a.forwardRef(Zr),Qr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"},kr=function(t,n){return a.createElement(at,we({},t,{ref:n,icon:Qr}))},en=a.forwardRef(kr);const tn=(e,t,n,r)=>{const{titleMarginBottom:o,fontWeightStrong:l}=r;return{marginBottom:o,color:n,fontWeight:l,fontSize:e,lineHeight:t}},rn=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[`
|
|
31
|
-
h${r}&,
|
|
32
|
-
div&-h${r},
|
|
33
|
-
div&-h${r} > textarea,
|
|
34
|
-
h${r}
|
|
35
|
-
`]=tn(e[`fontSizeHeading${r}`],e[`lineHeightHeading${r}`],e.colorTextHeading,e)}),n},nn=e=>{const{componentCls:t}=e;return{"a&, a":Object.assign(Object.assign({},Mt(e)),{userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},on=e=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",fontFamily:e.fontFamilyCode,background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:nr[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:e.fontWeightStrong},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,fontFamily:e.fontFamilyCode,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),an=e=>{const{componentCls:t,paddingSM:n}=e,r=n;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:e.calc(e.paddingSM).mul(-1).equal(),insetBlockStart:e.calc(r).div(-2).add(1).equal(),marginBottom:e.calc(r).div(2).sub(2).equal()},[`${t}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:e.calc(e.marginXS).add(2).equal(),insetBlockEnd:e.marginXS,color:e.colorIcon,fontWeight:"normal",fontSize:e.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},ln=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),sn=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-ellipsis-single-line":{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"},"> code":{paddingBlock:0,maxWidth:"calc(100% - 1.2em)",display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",verticalAlign:"bottom",boxSizing:"content-box"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),cn=e=>{const{componentCls:t,titleMarginTop:n}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger`]:{color:e.colorErrorText,"a&:active, a&:focus":{color:e.colorErrorTextActive},"a&:hover":{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},rn(e)),{[`
|
|
36
|
-
& + h1${t},
|
|
37
|
-
& + h2${t},
|
|
38
|
-
& + h3${t},
|
|
39
|
-
& + h4${t},
|
|
40
|
-
& + h5${t}
|
|
41
|
-
`]:{marginTop:n},"\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5":{"\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ":{marginTop:n}}}),on(e)),nn(e)),{[`
|
|
42
|
-
${t}-expand,
|
|
43
|
-
${t}-collapse,
|
|
44
|
-
${t}-edit,
|
|
45
|
-
${t}-copy
|
|
46
|
-
`]:Object.assign(Object.assign({},Mt(e)),{marginInlineStart:e.marginXXS})}),an(e)),ln(e)),sn()),{"&-rtl":{direction:"rtl"}})}},dn=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),Zt=Ne("Typography",cn,dn),un=e=>{const{prefixCls:t,"aria-label":n,className:r,style:o,direction:l,maxLength:i,autoSize:c=!0,value:f,onSave:s,onCancel:u,onEnd:g,component:d,enterIcon:O=a.createElement(en,null)}=e,C=a.useRef(null),x=a.useRef(!1),_=a.useRef(null),[S,E]=a.useState(f);a.useEffect(()=>{E(f)},[f]),a.useEffect(()=>{var w;if(!((w=C.current)===null||w===void 0)&&w.resizableTextArea){const{textArea:I}=C.current.resizableTextArea;I.focus();const{length:b}=I.value;I.setSelectionRange(b,b)}},[]);const V=({target:w})=>{E(w.value.replace(/[\n\r]/g,""))},T=()=>{x.current=!0},y=()=>{x.current=!1},m=({keyCode:w})=>{x.current||(_.current=w)},p=()=>{s(S.trim())},U=({keyCode:w,ctrlKey:I,altKey:b,metaKey:A,shiftKey:h})=>{_.current!==w||x.current||I||b||A||h||(w===pt.ENTER?(p(),g?.()):w===pt.ESC&&u())},H=()=>{p()},[R,P,k]=Zt(t),$=W(t,`${t}-edit-content`,{[`${t}-rtl`]:l==="rtl",[`${t}-${d}`]:!!d},r,P,k);return R(a.createElement("div",{className:$,style:o},a.createElement(qr,{ref:C,maxLength:i,value:S,onChange:V,onKeyDown:m,onKeyUp:U,onCompositionStart:T,onCompositionEnd:y,onBlur:H,"aria-label":n,rows:1,autoSize:c}),O!==null?or(O,{className:`${t}-edit-content-confirm`}):null))};var Ke,yt;function fn(){return yt||(yt=1,Ke=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(o){e.addRange(o)}),t&&t.focus()}}),Ke}var qe,Ct;function pn(){if(Ct)return qe;Ct=1;var e=fn(),t={"text/plain":"Text","text/html":"Url",default:"Text"},n="Copy to clipboard: #{key}, Enter";function r(l){var i=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return l.replace(/#{\s*key\s*}/g,i)}function o(l,i){var c,f,s,u,g,d,O=!1;i||(i={}),c=i.debug||!1;try{s=e(),u=document.createRange(),g=document.getSelection(),d=document.createElement("span"),d.textContent=l,d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(x){if(x.stopPropagation(),i.format)if(x.preventDefault(),typeof x.clipboardData>"u"){c&&console.warn("unable to use e.clipboardData"),c&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var _=t[i.format]||t.default;window.clipboardData.setData(_,l)}else x.clipboardData.clearData(),x.clipboardData.setData(i.format,l);i.onCopy&&(x.preventDefault(),i.onCopy(x.clipboardData))}),document.body.appendChild(d),u.selectNodeContents(d),g.addRange(u);var C=document.execCommand("copy");if(!C)throw new Error("copy command was unsuccessful");O=!0}catch(x){c&&console.error("unable to copy using execCommand: ",x),c&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(i.format||"text",l),i.onCopy&&i.onCopy(window.clipboardData),O=!0}catch(_){c&&console.error("unable to copy using clipboardData: ",_),c&&console.error("falling back to prompt"),f=r("message"in i?i.message:n),window.prompt(f,l)}}finally{g&&(typeof g.removeRange=="function"?g.removeRange(u):g.removeAllRanges()),d&&document.body.removeChild(d),s()}return O}return qe=o,qe}var gn=pn();const mn=ar(gn);var vn=function(e,t,n,r){function o(l){return l instanceof n?l:new n(function(i){i(l)})}return new(n||(n=Promise))(function(l,i){function c(u){try{s(r.next(u))}catch(g){i(g)}}function f(u){try{s(r.throw(u))}catch(g){i(g)}}function s(u){u.done?l(u.value):o(u.value).then(c,f)}s((r=r.apply(e,t||[])).next())})};const bn=({copyConfig:e,children:t})=>{const[n,r]=a.useState(!1),[o,l]=a.useState(!1),i=a.useRef(null),c=()=>{i.current&&clearTimeout(i.current)},f={};e.format&&(f.format=e.format),a.useEffect(()=>c,[]);const s=ir(u=>vn(void 0,void 0,void 0,function*(){var g;u?.preventDefault(),u?.stopPropagation(),l(!0);try{const d=typeof e.text=="function"?yield e.text():e.text;mn(d||Xr(t,!0).join("")||"",f),l(!1),r(!0),c(),i.current=setTimeout(()=>{r(!1)},3e3),(g=e.onCopy)===null||g===void 0||g.call(e,u)}catch(d){throw l(!1),d}}));return{copied:n,copyLoading:o,onClick:s}};function Xe(e,t){return a.useMemo(()=>{const n=!!e;return[n,Object.assign(Object.assign({},t),n&&typeof e=="object"?e:null)]},[e])}const hn=e=>{const t=a.useRef(void 0);return a.useEffect(()=>{t.current=e}),t.current},xn=(e,t,n)=>a.useMemo(()=>e===!0?{title:t??n}:a.isValidElement(e)?{title:e}:typeof e=="object"?Object.assign({title:t??n},e):{title:e},[e,t,n]);var Sn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Jt=a.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:o,rootClassName:l,setContentRef:i,children:c,direction:f,style:s}=e,u=Sn(e,["prefixCls","component","className","rootClassName","setContentRef","children","direction","style"]),{getPrefixCls:g,direction:d,className:O,style:C}=nt("typography"),x=f??d,_=i?ot(t,i):t,S=g("typography",n),[E,V,T]=Zt(S),y=W(S,O,{[`${S}-rtl`]:x==="rtl"},o,l,V,T),m=Object.assign(Object.assign({},C),s);return E(a.createElement(r,Object.assign({className:y,style:m,ref:_},u),c))});var yn={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"},Cn=function(t,n){return a.createElement(at,we({},t,{ref:n,icon:yn}))},$n=a.forwardRef(Cn);function $t(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Ye(e,t,n){return e===!0||e===void 0?t:e||n&&t}function En(e){const t=document.createElement("em");e.appendChild(t);const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return e.removeChild(t),n.left>r.left||r.right>n.right||n.top>r.top||r.bottom>n.bottom}const dt=e=>["string","number"].includes(typeof e),wn=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:o,icon:l,tabIndex:i,onCopy:c,loading:f})=>{const s=$t(o),u=$t(l),{copied:g,copy:d}=n??{},O=t?g:d,C=Ye(s[t?1:0],O),x=typeof C=="string"?C:O;return a.createElement(it,{title:C},a.createElement("button",{type:"button",className:W(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:c,"aria-label":x,tabIndex:i},t?Ye(u[1],a.createElement(lr,null),!0):Ye(u[0],f?a.createElement(sr,null):a.createElement($n,null),!0)))},Be=a.forwardRef(({style:e,children:t},n)=>{const r=a.useRef(null);return a.useImperativeHandle(n,()=>({isExceed:()=>{const o=r.current;return o.scrollHeight>o.clientHeight},getHeight:()=>r.current.clientHeight})),a.createElement("span",{"aria-hidden":!0,ref:r,style:Object.assign({position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)"},e)},t)}),Rn=e=>e.reduce((t,n)=>t+(dt(n)?String(n).length:1),0);function Et(e,t){let n=0;const r=[];for(let o=0;o<e.length;o+=1){if(n===t)return r;const l=e[o],c=dt(l)?String(l).length:1,f=n+c;if(f>t){const s=t-n;return r.push(String(l).slice(0,s)),r}r.push(l),n=f}return e}const Ze=0,Je=1,Qe=2,ke=3,wt=4,Te={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function On(e){const{enableMeasure:t,width:n,text:r,children:o,rows:l,expanded:i,miscDeps:c,onEllipsis:f}=e,s=a.useMemo(()=>Ht(r),[r]),u=a.useMemo(()=>Rn(s),[r]),g=a.useMemo(()=>o(s,!1),[r]),[d,O]=a.useState(null),C=a.useRef(null),x=a.useRef(null),_=a.useRef(null),S=a.useRef(null),E=a.useRef(null),[V,T]=a.useState(!1),[y,m]=a.useState(Ze),[p,U]=a.useState(0),[H,R]=a.useState(null);Ee(()=>{m(t&&n&&u?Je:Ze)},[n,r,l,t,s]),Ee(()=>{var w,I,b,A;if(y===Je){m(Qe);const h=x.current&&getComputedStyle(x.current).whiteSpace;R(h)}else if(y===Qe){const h=!!(!((w=_.current)===null||w===void 0)&&w.isExceed());m(h?ke:wt),O(h?[0,u]:null),T(h);const ee=((I=_.current)===null||I===void 0?void 0:I.getHeight())||0,J=l===1?0:((b=S.current)===null||b===void 0?void 0:b.getHeight())||0,te=((A=E.current)===null||A===void 0?void 0:A.getHeight())||0,F=Math.max(ee,J+te);U(F+1),f(h)}},[y]);const P=d?Math.ceil((d[0]+d[1])/2):0;Ee(()=>{var w;const[I,b]=d||[0,0];if(I!==b){const h=(((w=C.current)===null||w===void 0?void 0:w.getHeight())||0)>p;let ee=P;b-I===1&&(ee=h?I:b),O(h?[I,ee]:[ee,b])}},[d,P]);const k=a.useMemo(()=>{if(!t)return o(s,!1);if(y!==ke||!d||d[0]!==d[1]){const w=o(s,!1);return[wt,Ze].includes(y)?w:a.createElement("span",{style:Object.assign(Object.assign({},Te),{WebkitLineClamp:l})},w)}return o(i?s:Et(s,d[0]),V)},[i,y,d,s].concat(Me(c))),$={width:n,margin:0,padding:0,whiteSpace:H==="nowrap"?"normal":"inherit"};return a.createElement(a.Fragment,null,k,y===Qe&&a.createElement(a.Fragment,null,a.createElement(Be,{style:Object.assign(Object.assign(Object.assign({},$),Te),{WebkitLineClamp:l}),ref:_},g),a.createElement(Be,{style:Object.assign(Object.assign(Object.assign({},$),Te),{WebkitLineClamp:l-1}),ref:S},g),a.createElement(Be,{style:Object.assign(Object.assign(Object.assign({},$),Te),{WebkitLineClamp:1}),ref:E},o([],!0))),y===ke&&d&&d[0]!==d[1]&&a.createElement(Be,{style:Object.assign(Object.assign({},$),{top:400}),ref:C},o(Et(s,P),!0)),y===Je&&a.createElement("span",{style:{whiteSpace:"inherit"},ref:x}))}const In=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!r?.title||!e?n:a.createElement(it,Object.assign({open:t?void 0:!1},r),n);var zn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function jn({mark:e,code:t,underline:n,delete:r,strong:o,keyboard:l,italic:i},c){let f=c;function s(u,g){g&&(f=a.createElement(u,{},f))}return s("strong",o),s("u",n),s("del",r),s("code",t),s("mark",e),s("kbd",l),s("i",i),f}const Bn="...",Rt=["delete","mark","code","underline","strong","keyboard","italic"],He=a.forwardRef((e,t)=>{var n;const{prefixCls:r,className:o,style:l,type:i,disabled:c,children:f,ellipsis:s,editable:u,copyable:g,component:d,title:O}=e,C=zn(e,["prefixCls","className","style","type","disabled","children","ellipsis","editable","copyable","component","title"]),{getPrefixCls:x,direction:_}=a.useContext(cr),[S]=dr("Text"),E=a.useRef(null),V=a.useRef(null),T=x("typography",r),y=rt(C,Rt),[m,p]=Xe(u),[U,H]=ze(!1,{value:p.editing}),{triggerType:R=["icon"]}=p,P=v=>{var N;v&&((N=p.onStart)===null||N===void 0||N.call(p)),H(v)},k=hn(U);Ee(()=>{var v;!U&&k&&((v=V.current)===null||v===void 0||v.focus())},[U]);const $=v=>{v?.preventDefault(),P(!0)},w=v=>{var N;(N=p.onChange)===null||N===void 0||N.call(p,v),P(!1)},I=()=>{var v;(v=p.onCancel)===null||v===void 0||v.call(p),P(!1)},[b,A]=Xe(g),{copied:h,copyLoading:ee,onClick:J}=bn({copyConfig:A,children:f}),[te,F]=a.useState(!1),[X,fe]=a.useState(!1),[de,Q]=a.useState(!1),[me,Y]=a.useState(!1),[le,Z]=a.useState(!0),[ne,q]=Xe(s,{expandable:!1,symbol:v=>v?S?.collapse:S?.expand}),[ae,ue]=ze(q.defaultExpanded||!1,{value:q.expanded}),K=ne&&(!ae||q.expandable==="collapsible"),{rows:z=1}=q,M=a.useMemo(()=>K&&(q.suffix!==void 0||q.onEllipsis||q.expandable||m||b),[K,q,m,b]);Ee(()=>{ne&&!M&&(F(gt("webkitLineClamp")),fe(gt("textOverflow")))},[M,ne]);const[D,se]=a.useState(K),Oe=a.useMemo(()=>M?!1:z===1?X:te,[M,X,te]);Ee(()=>{se(Oe&&K)},[Oe,K]);const Re=K&&(D?me:de),Ie=K&&z===1&&D,G=K&&z>1&&D,j=(v,N)=>{var Ce;ue(N.expanded),(Ce=q.onExpand)===null||Ce===void 0||Ce.call(q,v,N)},[re,$e]=a.useState(0),xe=({offsetWidth:v})=>{$e(v)},ve=v=>{var N;Q(v),de!==v&&((N=q.onEllipsis)===null||N===void 0||N.call(q,v))};a.useEffect(()=>{const v=E.current;if(ne&&D&&v){const N=En(v);me!==N&&Y(N)}},[ne,D,f,G,le,re]),a.useEffect(()=>{const v=E.current;if(typeof IntersectionObserver>"u"||!v||!D||!K)return;const N=new IntersectionObserver(()=>{Z(!!v.offsetParent)});return N.observe(v),()=>{N.disconnect()}},[D,K]);const be=xn(q.tooltip,p.text,f),Se=a.useMemo(()=>{if(!(!ne||D))return[p.text,f,O,be.title].find(dt)},[ne,D,O,be.title,Re]);if(U)return a.createElement(un,{value:(n=p.text)!==null&&n!==void 0?n:typeof f=="string"?f:"",onSave:w,onCancel:I,onEnd:p.onEnd,prefixCls:T,className:o,style:l,direction:_,component:d,maxLength:p.maxLength,autoSize:p.autoSize,enterIcon:p.enterIcon});const De=()=>{const{expandable:v,symbol:N}=q;return v?a.createElement("button",{type:"button",key:"expand",className:`${T}-${ae?"collapse":"expand"}`,onClick:Ce=>j(Ce,{expanded:!ae}),"aria-label":ae?S.collapse:S?.expand},typeof N=="function"?N(ae):N):null},Le=()=>{if(!m)return;const{icon:v,tooltip:N,tabIndex:Ce}=p,We=Ht(N)[0]||S?.edit,Qt=typeof We=="string"?We:"";return R.includes("icon")?a.createElement(it,{key:"edit",title:N===!1?"":We},a.createElement("button",{type:"button",ref:V,className:`${T}-edit`,onClick:$,"aria-label":Qt,tabIndex:Ce},v||a.createElement(Jr,{role:"button"}))):null},oe=()=>b?a.createElement(wn,Object.assign({key:"copy"},A,{prefixCls:T,copied:h,locale:S,onCopy:J,loading:ee,iconOnly:f==null})):null,L=v=>[v&&De(),Le(),oe()],ye=v=>[v&&!ae&&a.createElement("span",{"aria-hidden":!0,key:"ellipsis"},Bn),q.suffix,L(v)];return a.createElement(_t,{onResize:xe,disabled:!K},v=>a.createElement(In,{tooltipProps:be,enableEllipsis:K,isEllipsis:Re},a.createElement(Jt,Object.assign({className:W({[`${T}-${i}`]:i,[`${T}-disabled`]:c,[`${T}-ellipsis`]:ne,[`${T}-ellipsis-single-line`]:Ie,[`${T}-ellipsis-multiple-line`]:G},o),prefixCls:r,style:Object.assign(Object.assign({},l),{WebkitLineClamp:G?z:void 0}),component:d,ref:ot(v,E,t),direction:_,onClick:R.includes("text")?$:void 0,"aria-label":Se?.toString(),title:O},y),a.createElement(On,{enableMeasure:K&&!D,text:f,rows:z,width:re,onEllipsis:ve,expanded:ae,miscDeps:[h,ae,ee,m,b,S].concat(Me(Rt.map(N=>e[N])))},(N,Ce)=>jn(e,a.createElement(a.Fragment,null,N.length>0&&Ce&&!ae&&Se?a.createElement("span",{key:"show-content","aria-hidden":!0},N):N,ye(Ce)))))))});var Tn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const An=a.forwardRef((e,t)=>{const{ellipsis:n,rel:r,children:o,navigate:l}=e,i=Tn(e,["ellipsis","rel","children","navigate"]),c=Object.assign(Object.assign({},i),{rel:r===void 0&&i.target==="_blank"?"noopener noreferrer":r});return a.createElement(He,Object.assign({},c,{ref:t,ellipsis:!!n,component:"a"}),o)});var Nn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const _n=a.forwardRef((e,t)=>{const{children:n}=e,r=Nn(e,["children"]);return a.createElement(He,Object.assign({ref:t},r,{component:"div"}),n)});var Mn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Hn=(e,t)=>{const{ellipsis:n,children:r}=e,o=Mn(e,["ellipsis","children"]),l=a.useMemo(()=>n&&typeof n=="object"?rt(n,["expandable","rows"]):n,[n]);return a.createElement(He,Object.assign({ref:t},o,{ellipsis:l,component:"span"}),r)},Pn=a.forwardRef(Hn);var Dn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const Ln=[1,2,3,4,5],Wn=a.forwardRef((e,t)=>{const{level:n=1,children:r}=e,o=Dn(e,["level","children"]),l=Ln.includes(n)?`h${n}`:"h1";return a.createElement(He,Object.assign({ref:t},o,{component:l}),r)}),Pe=Jt;Pe.Text=Pn;Pe.Link=An;Pe.Title=Wn;Pe.Paragraph=_n;export{qt as B,Vn as I,$n as R,Pe as T,lt as a,pr as b,vr as c,hr as d,mr as e,xr as f,Gt as g,Sr as h,st as i,gr as j,br as k,Jr as l,gt as m,Dt as n,ct as o,Vt as p,Ar as q,qr as r,Kt as t,Or as u};
|
|
47
|
-
//# sourceMappingURL=index-pT0W4KjK.js.map
|