forked from Gitlink/build
2 lines
9.3 KiB
JavaScript
2 lines
9.3 KiB
JavaScript
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[908],{18073:function(_,R,i){i.d(R,{Z:function(){return P}});var N=i(87462),n=i(62435),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},L=H,u=i(42135),b=function(k,j){return n.createElement(u.Z,(0,N.Z)({},k,{ref:j,icon:L}))},P=n.forwardRef(b)},25908:function(_,R,i){i.d(R,{D:function(){return G},Z:function(){return r}});var N=i(87462),n=i(62435),H={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},L=H,u=i(42135),b=function(t,c){return n.createElement(u.Z,(0,N.Z)({},t,{ref:c,icon:L}))},P=n.forwardRef(b),W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},k=W,j=function(t,c){return n.createElement(u.Z,(0,N.Z)({},t,{ref:c,icon:k}))},A=n.forwardRef(j),T=i(18073),F=i(94184),I=i.n(F),w=i(98423),Y=e=>!isNaN(parseFloat(e))&&isFinite(e),J=i(53124),K=i(84321),Q=function(e,t){var c={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&t.indexOf(l)<0&&(c[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var d=0,l=Object.getOwnPropertySymbols(e);d<l.length;d++)t.indexOf(l[d])<0&&Object.prototype.propertyIsEnumerable.call(e,l[d])&&(c[l[d]]=e[l[d]]);return c};const V={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},G=n.createContext({}),o=(()=>{let e=0;return function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e+=1,`${t}${e}`}})();var r=n.forwardRef((e,t)=>{const{prefixCls:c,className:l,trigger:d,children:m,defaultCollapsed:y=!1,theme:O="dark",style:$={},collapsible:C=!1,reverseArrow:x=!1,width:z=200,collapsedWidth:f=80,zeroWidthTriggerStyle:S,breakpoint:h,onCollapse:Z,onBreakpoint:M}=e,U=Q(e,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:B}=(0,n.useContext)(K.Gs),[v,X]=(0,n.useState)("collapsed"in e?e.collapsed:y),[ee,oe]=(0,n.useState)(!1);(0,n.useEffect)(()=>{"collapsed"in e&&X(e.collapsed)},[e.collapsed]);const te=(a,g)=>{"collapsed"in e||X(a),Z==null||Z(a,g)},ne=(0,n.useRef)();ne.current=a=>{oe(a.matches),M==null||M(a.matches),v!==a.matches&&te(a.matches,"responsive")},(0,n.useEffect)(()=>{function a(p){return ne.current(p)}let g;if(typeof window!="undefined"){const{matchMedia:p}=window;if(p&&h&&h in V){g=p(`(max-width: ${V[h]})`);try{g.addEventListener("change",a)}catch(E){g.addListener(a)}a(g)}}return()=>{try{g==null||g.removeEventListener("change",a)}catch(p){g==null||g.removeListener(a)}}},[h]),(0,n.useEffect)(()=>{const a=o("ant-sider-");return B.addSider(a),()=>B.removeSider(a)},[]);const re=()=>{te(!v,"clickTrigger")},{getPrefixCls:ae}=(0,n.useContext)(J.E_),ie=()=>{const a=ae("layout-sider",c),g=(0,w.Z)(U,["collapsed"]),p=v?f:z,E=Y(p)?`${p}px`:String(p),q=parseFloat(String(f||0))===0?n.createElement("span",{onClick:re,className:I()(`${a}-zero-width-trigger`,`${a}-zero-width-trigger-${x?"right":"left"}`),style:S},d||n.createElement(P,null)):null,se={expanded:x?n.createElement(T.Z,null):n.createElement(A,null),collapsed:x?n.createElement(A,null):n.createElement(T.Z,null)}[v?"collapsed":"expanded"],de=d!==null?q||n.createElement("div",{className:`${a}-trigger`,onClick:re,style:{width:E}},d||se):null,ce=Object.assign(Object.assign({},$),{flex:`0 0 ${E}`,maxWidth:E,minWidth:E,width:E}),ue=I()(a,`${a}-${O}`,{[`${a}-collapsed`]:!!v,[`${a}-has-trigger`]:C&&d!==null&&!q,[`${a}-below`]:!!ee,[`${a}-zero-width`]:parseFloat(E)===0},l);return n.createElement("aside",Object.assign({className:ue},g,{style:ce,ref:t}),n.createElement("div",{className:`${a}-children`},m),C||ee&&q?de:null)},le=n.useMemo(()=>({siderCollapsed:v}),[v]);return n.createElement(G.Provider,{value:le},ie())})},84321:function(_,R,i){i.d(R,{VY:function(){return V},$_:function(){return Q},h4:function(){return K},Gs:function(){return I},ZP:function(){return G}});var N=i(74902),n=i(94184),H=i.n(n),L=i(98423),u=i(62435),b=i(53124),P=i(67968),W=i(45503),j=o=>{const{componentCls:s,colorBgContainer:r,colorBgBody:e,colorText:t}=o;return{[`${s}-sider-light`]:{background:r,[`${s}-sider-trigger`]:{color:t,background:r},[`${s}-sider-zero-width-trigger`]:{color:t,background:r,border:`1px solid ${e}`,borderInlineStart:0}}}};const A=o=>{const{antCls:s,componentCls:r,colorText:e,colorTextLightSolid:t,colorBgHeader:c,colorBgBody:l,colorBgTrigger:d,layoutHeaderHeight:m,layoutHeaderPaddingInline:y,layoutHeaderColor:O,layoutFooterPadding:$,layoutTriggerHeight:C,layoutZeroTriggerSize:x,motionDurationMid:z,motionDurationSlow:f,fontSize:S,borderRadius:h}=o;return{[r]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:l,"&, *":{boxSizing:"border-box"},[`&${r}-has-sider`]:{flexDirection:"row",[`> ${r}, > ${r}-content`]:{width:0}},[`${r}-header, &${r}-footer`]:{flex:"0 0 auto"},[`${r}-sider`]:{position:"relative",minWidth:0,background:c,transition:`all ${z}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${s}-menu${s}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:C},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:C,color:t,lineHeight:`${C}px`,textAlign:"center",background:d,cursor:"pointer",transition:`all ${z}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:m,insetInlineEnd:-x,zIndex:1,width:x,height:x,color:t,fontSize:o.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:c,borderStartStartRadius:0,borderStartEndRadius:h,borderEndEndRadius:h,borderEndStartRadius:0,cursor:"pointer",transition:`background ${f} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${f}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-x,borderStartStartRadius:h,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:h}}}}},j(o)),{"&-rtl":{direction:"rtl"}}),[`${r}-header`]:{height:m,paddingInline:y,color:O,lineHeight:`${m}px`,background:c,[`${s}-menu`]:{lineHeight:"inherit"}},[`${r}-footer`]:{padding:$,color:e,fontSize:S,background:l},[`${r}-content`]:{flex:"auto",minHeight:0}}};var T=(0,P.Z)("Layout",o=>{const{colorText:s,controlHeightSM:r,controlHeight:e,controlHeightLG:t,marginXXS:c}=o,l=t*1.25,d=(0,W.TS)(o,{layoutHeaderHeight:e*2,layoutHeaderPaddingInline:l,layoutHeaderColor:s,layoutFooterPadding:`${r}px ${l}px`,layoutTriggerHeight:t+c*2,layoutZeroTriggerSize:t});return[A(d)]},o=>{const{colorBgLayout:s}=o;return{colorBgHeader:"#001529",colorBgBody:s,colorBgTrigger:"#002140"}}),F=function(o,s){var r={};for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&s.indexOf(e)<0&&(r[e]=o[e]);if(o!=null&&typeof Object.getOwnPropertySymbols=="function")for(var t=0,e=Object.getOwnPropertySymbols(o);t<e.length;t++)s.indexOf(e[t])<0&&Object.prototype.propertyIsEnumerable.call(o,e[t])&&(r[e[t]]=o[e[t]]);return r};const I=u.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function w(o){let{suffixCls:s,tagName:r,displayName:e}=o;return t=>u.forwardRef((l,d)=>u.createElement(t,Object.assign({ref:d,suffixCls:s,tagName:r},l)))}const D=u.forwardRef((o,s)=>{const{prefixCls:r,suffixCls:e,className:t,tagName:c}=o,l=F(o,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:d}=u.useContext(b.E_),m=d("layout",r),[y,O]=T(m),$=e?`${m}-${e}`:m;return y(u.createElement(c,Object.assign({className:H()(r||$,t,O),ref:s},l)))}),Y=u.forwardRef((o,s)=>{const{direction:r}=u.useContext(b.E_),[e,t]=u.useState([]),{prefixCls:c,className:l,rootClassName:d,children:m,hasSider:y,tagName:O,style:$}=o,C=F(o,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),x=(0,L.Z)(C,["suffixCls"]),{getPrefixCls:z,layout:f}=u.useContext(b.E_),S=z("layout",c),[h,Z]=T(S),M=H()(S,{[`${S}-has-sider`]:typeof y=="boolean"?y:e.length>0,[`${S}-rtl`]:r==="rtl"},f==null?void 0:f.className,l,d,Z),U=u.useMemo(()=>({siderHook:{addSider:B=>{t(v=>[].concat((0,N.Z)(v),[B]))},removeSider:B=>{t(v=>v.filter(X=>X!==B))}}}),[]);return h(u.createElement(I.Provider,{value:U},u.createElement(O,Object.assign({ref:s,className:M,style:Object.assign(Object.assign({},f==null?void 0:f.style),$)},x),m)))}),J=w({tagName:"section",displayName:"Layout"})(Y),K=w({suffixCls:"header",tagName:"header",displayName:"Header"})(D),Q=w({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(D),V=w({suffixCls:"content",tagName:"main",displayName:"Content"})(D);var G=J}}]);
|