{"version":3,"file":"index-D78trW2r.cjs","sources":["../../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.5_@types+react@19.2.14_react@19.2.5/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../node_modules/.pnpm/@radix-ui+react-slot@1.3.3_@types+react@19.2.14_react@19.2.5/node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n  if (typeof ref === \"function\") {\n    return ref(value);\n  } else if (ref !== null && ref !== void 0) {\n    ref.current = value;\n  }\n}\n__name(setRef, \"setRef\");\nfunction composeRefs(...refs) {\n  return (node) => {\n    let hasCleanup = false;\n    const cleanups = refs.map((ref) => {\n      const cleanup = setRef(ref, node);\n      if (!hasCleanup && typeof cleanup == \"function\") {\n        hasCleanup = true;\n      }\n      return cleanup;\n    });\n    if (hasCleanup) {\n      return () => {\n        for (let i = 0; i < cleanups.length; i++) {\n          const cleanup = cleanups[i];\n          if (typeof cleanup == \"function\") {\n            cleanup();\n          } else {\n            setRef(refs[i], null);\n          }\n        }\n      };\n    }\n  };\n}\n__name(composeRefs, \"composeRefs\");\nfunction useComposedRefs(...refs) {\n  return React.useCallback(composeRefs(...refs), refs);\n}\n__name(useComposedRefs, \"useComposedRefs\");\nexport {\n  composeRefs,\n  useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","var __defProp = Object.defineProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\n\n// src/slot.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n  const Slot2 = React.forwardRef((props, forwardedRef) => {\n    let { children, ...slotProps } = props;\n    let slottableElement = null;\n    let hasSlottable = false;\n    const newChildren = [];\n    if (isLazyComponent(children) && typeof use === \"function\") {\n      children = use(children._payload);\n    }\n    React.Children.forEach(children, (maybeSlottable) => {\n      if (isSlottable(maybeSlottable)) {\n        hasSlottable = true;\n        const slottable = maybeSlottable;\n        let child = \"child\" in slottable.props ? slottable.props.child : slottable.props.children;\n        if (isLazyComponent(child) && typeof use === \"function\") {\n          child = use(child._payload);\n        }\n        slottableElement = getSlottableElementFromSlottable(slottable, child);\n        newChildren.push(slottableElement?.props?.children);\n      } else {\n        newChildren.push(maybeSlottable);\n      }\n    });\n    if (slottableElement) {\n      slottableElement = React.cloneElement(slottableElement, void 0, newChildren);\n    } else if (\n      // A `Slottable` was found but it didn't resolve to a single element (e.g.\n      // it wrapped multiple elements, text, or a render-prop `child` that\n      // wasn't an element). Don't fall back to treating the `Slottable` wrapper\n      // itself as the slot target — throw a descriptive error below instead.\n      !hasSlottable && React.Children.count(children) === 1 && React.isValidElement(children)\n    ) {\n      slottableElement = children;\n    }\n    const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;\n    const composedRef = useComposedRefs(forwardedRef, slottableElementRef);\n    if (!slottableElement) {\n      if (children || children === 0) {\n        throw new Error(\n          hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName)\n        );\n      }\n      return children;\n    }\n    const mergedProps = mergeProps(slotProps, slottableElement.props ?? {});\n    if (slottableElement.type !== React.Fragment) {\n      mergedProps.ref = forwardedRef ? composedRef : slottableElementRef;\n    }\n    return React.cloneElement(slottableElement, mergedProps);\n  });\n  Slot2.displayName = `${ownerName}.Slot`;\n  return Slot2;\n}\n__name(createSlot, \"createSlot\");\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\nvar SLOTTABLE_IDENTIFIER = Symbol.for(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n  const Slottable2 = /* @__PURE__ */ __name((props) => \"child\" in props ? props.children(props.child) : props.children, \"Slottable\");\n  Slottable2.displayName = `${ownerName}.Slottable`;\n  Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n  return Slottable2;\n}\n__name(createSlottable, \"createSlottable\");\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nvar getSlottableElementFromSlottable = /* @__PURE__ */ __name((slottable, child) => {\n  if (\"child\" in slottable.props) {\n    const child2 = slottable.props.child;\n    if (!React.isValidElement(child2)) return null;\n    return React.cloneElement(child2, void 0, slottable.props.children(child2.props.children));\n  }\n  return React.isValidElement(child) ? child : null;\n}, \"getSlottableElementFromSlottable\");\nfunction mergeProps(slotProps, childProps) {\n  const overrideProps = { ...childProps };\n  for (const propName in childProps) {\n    const slotPropValue = slotProps[propName];\n    const childPropValue = childProps[propName];\n    const isHandler = /^on[A-Z]/.test(propName);\n    if (isHandler) {\n      if (slotPropValue && childPropValue) {\n        overrideProps[propName] = (...args) => {\n          const result = childPropValue(...args);\n          slotPropValue(...args);\n          return result;\n        };\n      } else if (slotPropValue) {\n        overrideProps[propName] = slotPropValue;\n      }\n    } else if (propName === \"style\") {\n      overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n    } else if (propName === \"className\") {\n      overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n    }\n  }\n  return { ...slotProps, ...overrideProps };\n}\n__name(mergeProps, \"mergeProps\");\nfunction getElementRef(element) {\n  let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n  let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n  if (mayWarn) {\n    return element.ref;\n  }\n  getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n  mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n  if (mayWarn) {\n    return element.props.ref;\n  }\n  return element.props.ref || element.ref;\n}\n__name(getElementRef, \"getElementRef\");\nfunction isSlottable(child) {\n  return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\n__name(isSlottable, \"isSlottable\");\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nfunction isLazyComponent(element) {\n  return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n__name(isLazyComponent, \"isLazyComponent\");\nfunction isPromiseLike(value) {\n  return typeof value === \"object\" && value !== null && \"then\" in value;\n}\n__name(isPromiseLike, \"isPromiseLike\");\nvar createSlotError = /* @__PURE__ */ __name((ownerName) => {\n  return `${ownerName} failed to slot onto its children. Expected a single React element child or \\`Slottable\\`.`;\n}, \"createSlotError\");\nvar createSlottableError = /* @__PURE__ */ __name((ownerName) => {\n  return `${ownerName} failed to slot onto its \\`Slottable\\`. Expected \\`Slottable\\` to receive a single React element child.`;\n}, \"createSlottableError\");\nvar use = React[\" use \".trim().toString()];\nexport {\n  Slot as Root,\n  Slot,\n  Slottable,\n  createSlot,\n  createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["__defProp","__name","target","value","setRef","ref","composeRefs","refs","node","hasCleanup","cleanups","cleanup","i","useComposedRefs","React","createSlot","ownerName","Slot2","props","forwardedRef","children","slotProps","slottableElement","hasSlottable","newChildren","isLazyComponent","use","maybeSlottable","isSlottable","slottable","child","getSlottableElementFromSlottable","_a","slottableElementRef","getElementRef","composedRef","createSlottableError","createSlotError","mergedProps","mergeProps","Slot","SLOTTABLE_IDENTIFIER","createSlottable","Slottable2","child2","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn","_b","REACT_LAZY_TYPE","isPromiseLike"],"mappings":"6UAAA,IAAIA,EAAY,OAAO,eACnBC,EAAS,CAACC,EAAQC,IAAUH,EAAUE,EAAQ,OAAQ,CAAE,MAAAC,EAAO,aAAc,GAAM,EAIvF,SAASC,EAAOC,EAAKF,EAAO,CAC1B,GAAI,OAAOE,GAAQ,WACjB,OAAOA,EAAIF,CAAK,EACPE,GAAQ,OACjBA,EAAI,QAAUF,EAElB,CACAF,EAAOG,EAAQ,QAAQ,EACvB,SAASE,KAAeC,E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