import{d as w,$ as W,L as _,G as I,f as d,a5 as c,ax as P,be as D,z as X,B as j,U as T,Z as V,bE as G,aS as R,d2 as Q,N as z,Q as B}from"./outputWidgets.3c34606b.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},i=new Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="5ad6124b-2558-4b9b-9fc1-f6c8812194b1",e._sentryDebugIdIdentifier="sentry-dbid-5ad6124b-2558-4b9b-9fc1-f6c8812194b1")}catch{}})();const U=()=>({prefixCls:String,color:String,dot:c.any,pending:P(),position:c.oneOf(D("left","right","")).def(""),label:c.any}),Z=w({compatConfig:{MODE:3},name:"ATimelineItem",props:W(U(),{color:"blue",pending:!1}),slots:Object,setup(e,i){let{slots:l}=i;const{prefixCls:a}=_("timeline",e),t=I(()=>({[`${a.value}-item`]:!0,[`${a.value}-item-pending`]:e.pending})),u=I(()=>/blue|red|green|gray/.test(e.color||"")?void 0:e.color||"blue"),S=I(()=>({[`${a.value}-item-head`]:!0,[`${a.value}-item-head-${e.color||"blue"}`]:!u.value}));return()=>{var g,p,r;const{label:o=(g=l.label)===null||g===void 0?void 0:g.call(l),dot:n=(p=l.dot)===null||p===void 0?void 0:p.call(l)}=e;return d("li",{class:t.value},[o&&d("div",{class:`${a.value}-item-label`},[o]),d("div",{class:`${a.value}-item-tail`},null),d("div",{class:[S.value,!!n&&`${a.value}-item-head-custom`],style:{borderColor:u.value,color:u.value}},[n]),d("div",{class:`${a.value}-item-content`},[(r=l.default)===null||r===void 0?void 0:r.call(l)])])}}}),q=e=>{const{componentCls:i}=e;return{[i]:T(T({},V(e)),{margin:0,padding:0,listStyle:"none",[`${i}-item`]:{position:"relative",margin:0,paddingBottom:e.timeLineItemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize,insetInlineStart:(e.timeLineItemHeadSize-e.timeLineItemTailWidth)/2,height:`calc(100% - ${e.timeLineItemHeadSize}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px ${e.lineType} ${e.colorSplit}`},"&-pending":{[`${i}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${i}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.timeLineItemHeadSize,height:e.timeLineItemHeadSize,backgroundColor:e.colorBgContainer,border:`${e.timeLineHeadBorderWidth}px ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:e.timeLineItemHeadSize/2,insetInlineStart:e.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.lineWidth,marginInlineStart:e.margin+e.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${i}-item-tail`]:{display:"none"},[`> ${i}-item-content`]:{minHeight:e.controlHeightLG*1.2}}},[`&${i}-alternate,
        &${i}-right,
        &${i}-label`]:{[`${i}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${e.marginXXS}px`,"&-custom":{marginInlineStart:e.timeLineItemTailWidth/2}},"&-left":{[`${i}-item-content`]:{insetInlineStart:`calc(50% - ${e.marginXXS}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}},"&-right":{[`${i}-item-content`]:{width:`calc(50% - ${e.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${i}-right`]:{[`${i}-item-right`]:{[`${i}-item-tail,
            ${i}-item-head,
            ${i}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(e.timeLineItemHeadSize+e.timeLineItemTailWidth)/2}px)`},[`${i}-item-content`]:{width:`calc(100% - ${e.timeLineItemHeadSize+e.marginXS}px)`}}},[`&${i}-pending
        ${i}-item-last
        ${i}-item-tail`]:{display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`&${i}-reverse
        ${i}-item-last
        ${i}-item-tail`]:{display:"none"},[`&${i}-reverse ${i}-item-pending`]:{[`${i}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${e.margin}px)`,borderInlineStart:`${e.timeLineItemTailWidth}px dotted ${e.colorSplit}`},[`${i}-item-content`]:{minHeight:e.controlHeightLG*1.2}},[`&${i}-label`]:{[`${i}-item-label`]:{position:"absolute",insetBlockStart:-(e.fontSize*e.lineHeight-e.fontSize)+e.timeLineItemTailWidth,width:`calc(50% - ${e.marginSM}px)`,textAlign:"end"},[`${i}-item-right`]:{[`${i}-item-label`]:{insetInlineStart:`calc(50% + ${e.marginSM}px)`,width:`calc(50% - ${e.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${i}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},F=X("Timeline",e=>{const i=j(e,{timeLineItemPaddingBottom:e.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:e.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:e.lineWidthBold,timeLineHeadBorderWidth:e.wireframe?e.lineWidthBold:e.lineWidth*3});return[q(i)]}),J=()=>({prefixCls:String,pending:c.any,pendingDot:c.any,reverse:P(),mode:c.oneOf(D("left","alternate","right",""))}),Y=w({compatConfig:{MODE:3},name:"ATimeline",inheritAttrs:!1,props:W(J(),{reverse:!1,mode:""}),slots:Object,setup(e,i){let{slots:l,attrs:a}=i;const{prefixCls:t,direction:u}=_("timeline",e),[S,g]=F(t),p=(r,o)=>{const n=r.props||{};return e.mode==="alternate"?n.position==="right"?`${t.value}-item-right`:n.position==="left"?`${t.value}-item-left`:o%2===0?`${t.value}-item-left`:`${t.value}-item-right`:e.mode==="left"?`${t.value}-item-left`:e.mode==="right"?`${t.value}-item-right`:n.position==="right"?`${t.value}-item-right`:""};return()=>{var r,o,n;const{pending:m=(r=l.pending)===null||r===void 0?void 0:r.call(l),pendingDot:A=(o=l.pendingDot)===null||o===void 0?void 0:o.call(l),reverse:b,mode:y}=e,E=typeof m=="boolean"?null:m,f=G((n=l.default)===null||n===void 0?void 0:n.call(l)),L=m?d(Z,{pending:!!m,dot:A||d(R,null,null)},{default:()=>[E]}):null;L&&f.push(L);const v=b?f.reverse():f,C=v.length,x=`${t.value}-item-last`,M=v.map(($,s)=>{const h=s===C-2?x:"",O=s===C-1?x:"";return Q($,{class:z([!b&&!!m?h:O,p($,s)])})}),H=v.some($=>{var s,h;return!!(((s=$.props)===null||s===void 0?void 0:s.label)||((h=$.children)===null||h===void 0?void 0:h.label))}),N=z(t.value,{[`${t.value}-pending`]:!!m,[`${t.value}-reverse`]:!!b,[`${t.value}-${y}`]:!!y&&!H,[`${t.value}-label`]:H,[`${t.value}-rtl`]:u.value==="rtl"},a.class,g.value);return S(d("ul",B(B({},a),{},{class:N}),[M]))}}});export{Z as A,Y as T};
//# sourceMappingURL=Timeline.8bb71266.js.map
