{"ast":null,"code":"const getMoveTranslate = direction => {\n  const value = '100%';\n  return {\n    left: `translateX(-${value})`,\n    right: `translateX(${value})`,\n    top: `translateY(-${value})`,\n    bottom: `translateY(${value})`\n  }[direction];\n};\nconst getEnterLeaveStyle = (startStyle, endStyle) => ({\n  '&-enter, &-appear': Object.assign(Object.assign({}, startStyle), {\n    '&-active': endStyle\n  }),\n  '&-leave': Object.assign(Object.assign({}, endStyle), {\n    '&-active': startStyle\n  })\n});\nconst getFadeStyle = (from, duration) => Object.assign({\n  '&-enter, &-appear, &-leave': {\n    '&-start': {\n      transition: 'none'\n    },\n    '&-active': {\n      transition: `all ${duration}`\n    }\n  }\n}, getEnterLeaveStyle({\n  opacity: from\n}, {\n  opacity: 1\n}));\nconst getPanelMotionStyles = (direction, duration) => [getFadeStyle(0.7, duration), getEnterLeaveStyle({\n  transform: getMoveTranslate(direction)\n}, {\n  transform: 'none'\n})];\nconst genMotionStyle = token => {\n  const {\n    componentCls,\n    motionDurationSlow\n  } = token;\n  return {\n    [componentCls]: {\n      // ======================== Mask ========================\n      [`${componentCls}-mask-motion`]: getFadeStyle(0, motionDurationSlow),\n      // ======================= Panel ========================\n      [`${componentCls}-panel-motion`]: ['left', 'right', 'top', 'bottom'].reduce((obj, direction) => Object.assign(Object.assign({}, obj), {\n        [`&-${direction}`]: getPanelMotionStyles(direction, motionDurationSlow)\n      }), {})\n    }\n  };\n};\nexport default genMotionStyle;","map":{"version":3,"names":["getMoveTranslate","direction","value","left","right","top","bottom","getEnterLeaveStyle","startStyle","endStyle","Object","assign","getFadeStyle","from","duration","transition","opacity","getPanelMotionStyles","transform","genMotionStyle","token","componentCls","motionDurationSlow","reduce","obj"],"sources":["/var/www/gavt/node_modules/antd/es/drawer/style/motion.js"],"sourcesContent":["const getMoveTranslate = direction => {\n  const value = '100%';\n  return {\n    left: `translateX(-${value})`,\n    right: `translateX(${value})`,\n    top: `translateY(-${value})`,\n    bottom: `translateY(${value})`\n  }[direction];\n};\nconst getEnterLeaveStyle = (startStyle, endStyle) => ({\n  '&-enter, &-appear': Object.assign(Object.assign({}, startStyle), {\n    '&-active': endStyle\n  }),\n  '&-leave': Object.assign(Object.assign({}, endStyle), {\n    '&-active': startStyle\n  })\n});\nconst getFadeStyle = (from, duration) => Object.assign({\n  '&-enter, &-appear, &-leave': {\n    '&-start': {\n      transition: 'none'\n    },\n    '&-active': {\n      transition: `all ${duration}`\n    }\n  }\n}, getEnterLeaveStyle({\n  opacity: from\n}, {\n  opacity: 1\n}));\nconst getPanelMotionStyles = (direction, duration) => [getFadeStyle(0.7, duration), getEnterLeaveStyle({\n  transform: getMoveTranslate(direction)\n}, {\n  transform: 'none'\n})];\nconst genMotionStyle = token => {\n  const {\n    componentCls,\n    motionDurationSlow\n  } = token;\n  return {\n    [componentCls]: {\n      // ======================== Mask ========================\n      [`${componentCls}-mask-motion`]: getFadeStyle(0, motionDurationSlow),\n      // ======================= Panel ========================\n      [`${componentCls}-panel-motion`]: ['left', 'right', 'top', 'bottom'].reduce((obj, direction) => Object.assign(Object.assign({}, obj), {\n        [`&-${direction}`]: getPanelMotionStyles(direction, motionDurationSlow)\n      }), {})\n    }\n  };\n};\nexport default genMotionStyle;"],"mappings":"AAAA,MAAMA,gBAAgB,GAAGC,SAAS,IAAI;EACpC,MAAMC,KAAK,GAAG,MAAM;EACpB,OAAO;IACLC,IAAI,EAAG,eAAcD,KAAM,GAAE;IAC7BE,KAAK,EAAG,cAAaF,KAAM,GAAE;IAC7BG,GAAG,EAAG,eAAcH,KAAM,GAAE;IAC5BI,MAAM,EAAG,cAAaJ,KAAM;EAC9B,CAAC,CAACD,SAAS,CAAC;AACd,CAAC;AACD,MAAMM,kBAAkB,GAAGA,CAACC,UAAU,EAAEC,QAAQ,MAAM;EACpD,mBAAmB,EAAEC,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEH,UAAU,CAAC,EAAE;IAChE,UAAU,EAAEC;EACd,CAAC,CAAC;E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