{"ast":null,"code":"\"use client\";\n\nimport * as React from 'react';\nimport RightOutlined from \"@ant-design/icons/es/icons/RightOutlined\";\nimport classNames from 'classnames';\nimport RcCollapse from 'rc-collapse';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport omit from \"rc-util/es/omit\";\nimport initCollapseMotion from '../_util/motion';\nimport { cloneElement } from '../_util/reactNode';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport useSize from '../config-provider/hooks/useSize';\nimport CollapsePanel from './CollapsePanel';\nimport useStyle from './style';\nconst Collapse = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n    getPrefixCls,\n    direction,\n    collapse\n  } = React.useContext(ConfigContext);\n  const {\n    prefixCls: customizePrefixCls,\n    className,\n    rootClassName,\n    style,\n    bordered = true,\n    ghost,\n    size: customizeSize,\n    expandIconPosition = 'start',\n    children,\n    expandIcon\n  } = props;\n  const mergedSize = useSize(ctx => {\n    var _a;\n    return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : ctx) !== null && _a !== void 0 ? _a : 'middle';\n  });\n  const prefixCls = getPrefixCls('collapse', customizePrefixCls);\n  const rootPrefixCls = getPrefixCls();\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  if (process.env.NODE_ENV !== 'production') {\n    const warning = devUseWarning('Collapse');\n    // Warning if use legacy type `expandIconPosition`\n    process.env.NODE_ENV !== \"production\" ? warning(expandIconPosition !== 'left' && expandIconPosition !== 'right', 'deprecated', '`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.') : void 0;\n  }\n  // Align with logic position\n  const mergedExpandIconPosition = React.useMemo(() => {\n    if (expandIconPosition === 'left') {\n      return 'start';\n    }\n    return expandIconPosition === 'right' ? 'end' : expandIconPosition;\n  }, [expandIconPosition]);\n  const renderExpandIcon = function () {\n    let panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    const icon = expandIcon ? expandIcon(panelProps) : /*#__PURE__*/React.createElement(RightOutlined, {\n      rotate: panelProps.isActive ? 90 : undefined\n    });\n    return cloneElement(icon, () => ({\n      className: classNames(icon.props.className, `${prefixCls}-arrow`)\n    }));\n  };\n  const collapseClassName = classNames(`${prefixCls}-icon-position-${mergedExpandIconPosition}`, {\n    [`${prefixCls}-borderless`]: !bordered,\n    [`${prefixCls}-rtl`]: direction === 'rtl',\n    [`${prefixCls}-ghost`]: !!ghost,\n    [`${prefixCls}-${mergedSize}`]: mergedSize !== 'middle'\n  }, collapse === null || collapse === void 0 ? void 0 : collapse.className, className, rootClassName, hashId);\n  const openMotion = Object.assign(Object.assign({}, initCollapseMotion(rootPrefixCls)), {\n    motionAppear: false,\n    leavedClassName: `${prefixCls}-content-hidden`\n  });\n  const items = React.useMemo(() => children ? toArray(children).map((child, index) => {\n    var _a, _b;\n    if ((_a = child.props) === null || _a === void 0 ? void 0 : _a.disabled) {\n      const key = (_b = child.key) !== null && _b !== void 0 ? _b : String(index);\n      const {\n        disabled,\n        collapsible\n      } = child.props;\n      const childProps = Object.assign(Object.assign({}, omit(child.props, ['disabled'])), {\n        key,\n        collapsible: collapsible !== null && collapsible !== void 0 ? collapsible : disabled ? 'disabled' : undefined\n      });\n      return cloneElement(child, childProps);\n    }\n    return child;\n  }) : null, [children]);\n  return wrapSSR( /*#__PURE__*/React.createElement(RcCollapse, Object.assign({\n    ref: ref,\n    openMotion: openMotion\n  }, omit(props, ['rootClassName']), {\n    expandIcon: renderExpandIcon,\n    prefixCls: prefixCls,\n    className: collapseClassName,\n    style: Object.assign(Object.assign({}, collapse === null || collapse === void 0 ? void 0 : collapse.style), style)\n  }), items));\n});\nif (process.env.NODE_ENV !== 'production') {\n  Collapse.displayName = 'Collapse';\n}\nexport default Object.assign(Collapse, {\n  Panel: CollapsePanel\n});","map":{"version":3,"names":["React","RightOutlined","classNames","RcCollapse","toArray","omit","initCollapseMotion","cloneElement","devUseWarning","ConfigContext","useSize","CollapsePanel","useStyle","Collapse","forwardRef","props","ref","getPrefixCls","direction","collapse","useContext","prefixCls","customizePrefixCls","className","rootClassName","style","bordered","ghost","size","customizeSize","expandIconPosition","children","expandIcon","mergedSize","ctx","_a","rootPrefixCls","wrapSSR","hashId","process","env","NODE_ENV","warning","mergedExpandIconPosition","useMemo","renderExpandIcon","panelProps","arguments","length","undefined","icon","createElement","rotate","isActive","collapseClassName","openMotion","Object","assign","motionAppear","leavedClassName","items","map","child","index","_b","disabled","key","String","collapsible","childProps","displayName","Panel"],"sources":["/Users/chrishaack/UC_Trains_Voice/react-demo/node_modules/antd/es/collapse/Collapse.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport RightOutlined from \"@ant-design/icons/es/icons/RightOutlined\";\nimport classNames from 'classnames';\nimport RcCollapse from 'rc-collapse';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport omit from \"rc-util/es/omit\";\nimport initCollapseMotion from '../_util/motion';\nimport { cloneElement } from '../_util/reactNode';\nimport { devUseWarning } from '../_util/warning';\nimport { ConfigContext } from '../config-provider';\nimport useSize from '../config-provider/hooks/useSize';\nimport CollapsePanel from './CollapsePanel';\nimport useStyle from './style';\nconst Collapse = /*#__PURE__*/React.forwardRef((props, ref) => {\n  const {\n    getPrefixCls,\n    direction,\n    collapse\n  } = React.useContext(ConfigContext);\n  const {\n    prefixCls: customizePrefixCls,\n    className,\n    rootClassName,\n    style,\n    bordered = true,\n    ghost,\n    size: customizeSize,\n    expandIconPosition = 'start',\n    children,\n    expandIcon\n  } = props;\n  const mergedSize = useSize(ctx => {\n    var _a;\n    return (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : ctx) !== null && _a !== void 0 ? _a : 'middle';\n  });\n  const prefixCls = getPrefixCls('collapse', customizePrefixCls);\n  const rootPrefixCls = getPrefixCls();\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  if (process.env.NODE_ENV !== 'production') {\n    const warning = devUseWarning('Collapse');\n    // Warning if use legacy type `expandIconPosition`\n    process.env.NODE_ENV !== \"production\" ? warning(expandIconPosition !== 'left' && expandIconPosition !== 'right', 'deprecated', '`expandIconPosition` with `left` or `right` is deprecated. Please use `start` or `end` instead.') : void 0;\n  }\n  // Align with logic position\n  const mergedExpandIconPosition = React.useMemo(() => {\n    if (expandIconPosition === 'left') {\n      return 'start';\n    }\n    return expandIconPosition === 'right' ? 'end' : expandIconPosition;\n  }, [expandIconPosition]);\n  const renderExpandIcon = function () {\n    let panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n    const icon = expandIcon ? expandIcon(panelProps) : /*#__PURE__*/React.createElement(RightOutlined, {\n      rotate: panelProps.isActive ? 90 : undefined\n    });\n    return cloneElement(icon, () => ({\n      className: classNames(icon.props.className, `${prefixCls}-arrow`)\n    }));\n  };\n  const collapseClassName = classNames(`${prefixCls}-icon-position-${mergedExpandIconPosition}`, {\n    [`${prefixCls}-borderless`]: !bordered,\n    [`${prefixCls}-rtl`]: direction === 'rtl',\n    [`${prefixCls}-ghost`]: !!ghost,\n    [`${prefixCls}-${mergedSize}`]: mergedSize !== 'middle'\n  }, collapse === null || collapse === void 0 ? void 0 : collapse.className, className, rootClassName, hashId);\n  const openMotion = Object.assign(Object.assign({}, initCollapseMotion(rootPrefixCls)), {\n    motionAppear: false,\n    leavedClassName: `${prefixCls}-content-hidden`\n  });\n  const items = React.useMemo(() => children ? toArray(children).map((child, index) => {\n    var _a, _b;\n    if ((_a = child.props) === null || _a === void 0 ? void 0 : _a.disabled) {\n      const key = (_b = child.key) !== null && _b !== void 0 ? _b : String(index);\n      const {\n        disabled,\n        collapsible\n      } = child.props;\n      const childProps = Object.assign(Object.assign({}, omit(child.props, ['disabled'])), {\n        key,\n        collapsible: collapsible !== null && collapsible !== void 0 ? collapsible : disabled ? 'disabled' : undefined\n      });\n      return cloneElement(child, childProps);\n    }\n    return child;\n  }) : null, [children]);\n  return wrapSSR( /*#__PURE__*/React.createElement(RcCollapse, Object.assign({\n    ref: ref,\n    openMotion: openMotion\n  }, omit(props, ['rootClassName']), {\n    expandIcon: renderExpandIcon,\n    prefixCls: prefixCls,\n    className: collapseClassName,\n    style: Object.assign(Object.assign({}, collapse === null || collapse === void 0 ? void 0 : collapse.style), style)\n  }), items));\n});\nif (process.env.NODE_ENV !== 'production') {\n  Collapse.displayName = 'Collapse';\n}\nexport default Object.assign(Collapse, {\n  Panel: CollapsePanel\n});"],"mappings":"AAAA,YAAY;;AAEZ,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,aAAa,MAAM,0CAA0C;AACpE,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,UAAU,MAAM,aAAa;AACpC,OAAOC,OAAO,MAAM,6BAA6B;AACjD,OAAOC,IAAI,MAAM,iBAAiB;AAClC,OAAOC,kBAAkB,MAAM,iBAAiB;AAChD,SAASC,YAAY,QAAQ,oBAAoB;AACjD,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,aAAa,QAAQ,oBAAoB;AAClD,OAAOC,OAAO,MAAM,kCAAkC;AACtD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,QAAQ,MAAM,SAAS;AAC9B,MAAMC,QAAQ,GAAG,aAAab,KAAK,CAACc,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAC7D,MAAM;IACJC,YAAY;IACZC,SAAS;IACTC;EACF,CAAC,GAAGnB,KAAK,CAACoB,UAAU,CAACX,aAAa,CAAC;EACnC,MAAM;IACJY,SAAS,EAAEC,kBAAkB;IAC7BC,SAAS;IACTC,aAAa;IACbC,KAAK;IACLC,QAAQ,GAAG,IAAI;IACfC,KAAK;IACLC,IAAI,EAAEC,aAAa;IACnBC,kBAAkB,GAAG,OAAO;IAC5BC,QAAQ;IACRC;EACF,CAAC,GAAGjB,KAAK;EACT,MAAMkB,UAAU,GAAGvB,OAAO,CAACwB,GAAG,IAAI;IAChC,IAAIC,EAAE;IACN,OAAO,CAACA,EAAE,GAAGN,aAAa,KAAK,IAAI,IAAIA,aAAa,KAAK,KAAK,CA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