{"ast":null,"code":"import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { initZoomMotion } from '../../style/motion';\nimport getArrowStyle, { getArrowOffsetToken, MAX_VERTICAL_CONTENT_RADIUS } from '../../style/placementArrow';\nimport { getArrowToken } from '../../style/roundedArrow';\nimport { genPresetColor, genStyleHooks, mergeToken } from '../../theme/internal';\nconst genTooltipStyle = token => {\n  const {\n    componentCls,\n    // ant-tooltip\n    tooltipMaxWidth,\n    tooltipColor,\n    tooltipBg,\n    tooltipBorderRadius,\n    zIndexPopup,\n    controlHeight,\n    boxShadowSecondary,\n    paddingSM,\n    paddingXS\n  } = token;\n  return [{\n    [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, resetComponent(token)), {\n      position: 'absolute',\n      zIndex: zIndexPopup,\n      display: 'block',\n      width: 'max-content',\n      maxWidth: tooltipMaxWidth,\n      visibility: 'visible',\n      transformOrigin: `var(--arrow-x, 50%) var(--arrow-y, 50%)`,\n      '&-hidden': {\n        display: 'none'\n      },\n      '--antd-arrow-background-color': tooltipBg,\n      // Wrapper for the tooltip content\n      [`${componentCls}-inner`]: {\n        minWidth: controlHeight,\n        minHeight: controlHeight,\n        padding: `${unit(token.calc(paddingSM).div(2).equal())} ${unit(paddingXS)}`,\n        color: tooltipColor,\n        textAlign: 'start',\n        textDecoration: 'none',\n        wordWrap: 'break-word',\n        backgroundColor: tooltipBg,\n        borderRadius: tooltipBorderRadius,\n        boxShadow: boxShadowSecondary,\n        boxSizing: 'border-box'\n      },\n      // Limit left and right placement radius\n      [[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(',')]: {\n        [`${componentCls}-inner`]: {\n          borderRadius: token.min(tooltipBorderRadius, MAX_VERTICAL_CONTENT_RADIUS)\n        }\n      },\n      [`${componentCls}-content`]: {\n        position: 'relative'\n      }\n    }), genPresetColor(token, (colorKey, _ref) => {\n      let {\n        darkColor\n      } = _ref;\n      return {\n        [`&${componentCls}-${colorKey}`]: {\n          [`${componentCls}-inner`]: {\n            backgroundColor: darkColor\n          },\n          [`${componentCls}-arrow`]: {\n            '--antd-arrow-background-color': darkColor\n          }\n        }\n      };\n    })), {\n      // RTL\n      '&-rtl': {\n        direction: 'rtl'\n      }\n    })\n  },\n  // Arrow Style\n  getArrowStyle(token, 'var(--antd-arrow-background-color)'),\n  // Pure Render\n  {\n    [`${componentCls}-pure`]: {\n      position: 'relative',\n      maxWidth: 'none',\n      margin: token.sizePopupArrow\n    }\n  }];\n};\n// ============================== Export ==============================\nexport const prepareComponentToken = token => Object.assign(Object.assign({\n  zIndexPopup: token.zIndexPopupBase + 70\n}, getArrowOffsetToken({\n  contentRadius: token.borderRadius,\n  limitVerticalRadius: true\n})), getArrowToken(mergeToken(token, {\n  borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)\n})));\nexport default (function (prefixCls) {\n  let injectStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  const useStyle = genStyleHooks('Tooltip', token => {\n    const {\n      borderRadius,\n      colorTextLightSolid,\n      colorBgSpotlight\n    } = token;\n    const TooltipToken = mergeToken(token, {\n      // default variables\n      tooltipMaxWidth: 250,\n      tooltipColor: colorTextLightSolid,\n      tooltipBorderRadius: borderRadius,\n      tooltipBg: colorBgSpotlight\n    });\n    return [genTooltipStyle(TooltipToken), initZoomMotion(token, 'zoom-big-fast')];\n  }, prepareComponentToken, {\n    resetStyle: false,\n    // Popover use Tooltip as internal component. We do not need to handle this.\n    injectStyle\n  });\n  return useStyle(prefixCls);\n});","map":{"version":3,"names":["unit","resetComponent","initZoomMotion","getArrowStyle","getArrowOffsetToken","MAX_VERTICAL_CONTENT_RADIUS","getArrowToken","genPresetColor","genStyleHooks","mergeToken","genTooltipStyle","token","componentCls","tooltipMaxWidth","tooltipColor","tooltipBg","tooltipBorderRadius","zIndexPopup","controlHeight","boxShadowSecondary","paddingSM","paddingXS","Object","assign","position","zIndex","display","width","maxWidth","visibility","transformOrigin","minWidth","minHeight","padding","calc","div","equal","color","textAlign","textDecoration","wordWrap","backgroundColor","borderRadius","boxShadow","boxSizing","join","min","colorKey","_ref","darkColor","direction","margin","sizePopupArrow","prepareComponentToken","zIndexPopupBase","contentRadius","limitVerticalRadius","borderRadiusOuter","Math","prefixCls","injectStyle","arguments","length","undefined","useStyle","colorTextLightSolid","colorBgSpotlight","TooltipToken","resetStyle"],"sources":["/var/www/gavt/react-demo/node_modules/antd/es/tooltip/style/index.js"],"sourcesContent":["import { unit } from '@ant-design/cssinjs';\nimport { resetComponent } from '../../style';\nimport { initZoomMotion } from '../../style/motion';\nimport getArrowStyle, { getArrowOffsetToken, MAX_VERTICAL_CONTENT_RADIUS } from '../../style/placementArrow';\nimport { getArrowToken } from '../../style/roundedArrow';\nimport { genPresetColor, genStyleHooks, mergeToken } from '../../theme/internal';\nconst genTooltipStyle = token => {\n  const {\n    componentCls,\n    // ant-tooltip\n    tooltipMaxWidth,\n    tooltipColor,\n    tooltipBg,\n    tooltipBorderRadius,\n    zIndexPopup,\n    controlHeight,\n    boxShadowSecondary,\n    paddingSM,\n    paddingXS\n  } = token;\n  return [{\n    [componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, resetComponent(token)), {\n      position: 'absolute',\n      zIndex: zIndexPopup,\n      display: 'block',\n      width: 'max-content',\n      maxWidth: tooltipMaxWidth,\n      visibility: 'visible',\n      transformOrigin: `var(--arrow-x, 50%) var(--arrow-y, 50%)`,\n      '&-hidden': {\n        display: 'none'\n      },\n      '--antd-arrow-background-color': tooltipBg,\n      // Wrapper for the tooltip content\n      [`${componentCls}-inner`]: {\n        minWidth: controlHeight,\n        minHeight: controlHeight,\n        padding: `${unit(token.calc(paddingSM).div(2).equal())} ${unit(paddingXS)}`,\n        color: tooltipColor,\n        textAlign: 'start',\n        textDecoration: 'none',\n        wordWrap: 'break-word',\n        backgroundColor: tooltipBg,\n        borderRadius: tooltipBorderRadius,\n        boxShadow: boxShadowSecondary,\n        boxSizing: 'border-box'\n      },\n      // Limit left and right placement radius\n      [[`&-placement-left`, `&-placement-leftTop`, `&-placement-leftBottom`, `&-placement-right`, `&-placement-rightTop`, `&-placement-rightBottom`].join(',')]: {\n        [`${componentCls}-inner`]: {\n          borderRadius: token.min(tooltipBorderRadius, MAX_VERTICAL_CONTENT_RADIUS)\n        }\n      },\n      [`${componentCls}-content`]: {\n        position: 'relative'\n      }\n    }), genPresetColor(token, (colorKey, _ref) => {\n      let {\n        darkColor\n      } = _ref;\n      return {\n        [`&${componentCls}-${colorKey}`]: {\n          [`${componentCls}-inner`]: {\n            backgroundColor: darkColor\n          },\n          [`${componentCls}-arrow`]: {\n            '--antd-arrow-background-color': darkColor\n          }\n        }\n      };\n    })), {\n      // RTL\n      '&-rtl': {\n        direction: 'rtl'\n      }\n    })\n  },\n  // Arrow Style\n  getArrowStyle(token, 'var(--antd-arrow-background-color)'),\n  // Pure Render\n  {\n    [`${componentCls}-pure`]: {\n      position: 'relative',\n      maxWidth: 'none',\n      margin: token.sizePopupArrow\n    }\n  }];\n};\n// ============================== Export ==============================\nexport const prepareComponentToken = token => Object.assign(Object.assign({\n  zIndexPopup: token.zIndexPopupBase + 70\n}, getArrowOffsetToken({\n  contentRadius: token.borderRadius,\n  limitVerticalRadius: true\n})), getArrowToken(mergeToken(token, {\n  borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)\n})));\nexport default (function (prefixCls) {\n  let injectStyle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n  const useStyle = genStyleHooks('Tooltip', token => {\n    const {\n      borderRadius,\n      colorTextLightSolid,\n      colorBgSpotlight\n    } = token;\n    const TooltipToken = mergeToken(token, {\n      // default variables\n      tooltipMaxWidth: 250,\n      tooltipColor: colorTextLightSolid,\n      tooltipBorderRadius: borderRadius,\n      tooltipBg: colorBgSpotlight\n    });\n    return [genTooltipStyle(TooltipToken), initZoomMotion(token, 'zoom-big-fast')];\n  }, prepareComponentToken, {\n    resetStyle: false,\n    // Popover use Tooltip as internal component. We do not need to handle this.\n    injectStyle\n  });\n  return useStyle(prefixCls);\n});"],"mappings":"AAAA,SAASA,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,cAAc,QAAQ,aAAa;AAC5C,SAASC,cAAc,QAAQ,oBAAoB;AACnD,OAAOC,aAAa,IAAIC,mBAAmB,EAAEC,2BAA2B,QAAQ,4BAA4B;AAC5G,SAASC,aAAa,QAAQ,0BAA0B;AACxD,SAASC,cAAc,EAAEC,aAAa,EAAEC,UAAU,QAAQ,sBAAsB;AAChF,MAAMC,eAAe,GAAGC,KAAK,IAAI;EAC/B,MAAM;IACJC,YAAY;IACZ;IACAC,eAAe;IACfC,YAAY;IACZC,SAAS;IACTC,mBAAmB;IACnBC,WAAW;IACXC,aAAa;IACbC,kBAAkB;IAClBC,SAAS;IACTC;EACF,CAAC,GAAGV,KAAK;EACT,OAAO,CAAC;IACN,CAACC,YAAY,GAAGU,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAACD,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEtB,cAAc,CAACU,KAAK,CAAC,CAAC,EAAE;MAClGa,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAER,WAAW;MACnBS,OAAO,EAAE,OAAO;MAChBC,KAAK,EAAE,aAAa;MACpBC,QAAQ,EAAEf,eAAe;MACzBgB,UAAU,EAAE,SAAS;MACrBC,eAAe,EAAG,yCAAwC;MAC1D,UAAU,EAAE;QACVJ,OAAO,EAAE;MACX,CAAC;MACD,+BAA+B,EAAEX,SAAS;MAC1C;MACA,CAAE,GAAEH,YAAa,QAAO,GAAG;QACzBmB,QAAQ,EAAEb,aAAa;QACvBc,SAAS,EAAEd,aAAa;QACxBe,OAAO,EAAG,GAAEjC,IAAI,CAACW,KAAK,CAACuB,IAAI,CAACd,SAAS,CAAC,CAACe,GAAG,CAAC,CAAC,CAAC,CAACC,KAAK,CAAC,CA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