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AQ,eAAiB","file":"/npm/react-pipeline-component@1.1.0/build/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-pipeline-component@1.1.0/build/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.createPipeline = exports.Piping = exports.Pipeline = exports.pipe = exports.Pipe = exports.usePipe = exports.PipeProvider = void 0;\r\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\r\nconst react_1 = require(\"react\");\r\n/**\r\n * The context holding the component to be rendered on {@link Pipe}.\r\n */\r\nconst PipeContext = (0, react_1.createContext)(null);\r\n/**\r\n * A provider providing the component to be rendered on {@link Pipe}.\r\n *\r\n * @since 1.0.0\r\n */\r\nfunction PipeProvider(props) {\r\n    return (0, jsx_runtime_1.jsx)(PipeContext.Provider, Object.assign({ value: props.component }, { children: props.children }));\r\n}\r\nexports.PipeProvider = PipeProvider;\r\n/**\r\n * Return the component to be rendered on {@link Pipe}.\r\n *\r\n * @since 1.0.0\r\n */\r\nfunction usePipe() {\r\n    return (0, react_1.useContext)(PipeContext);\r\n}\r\nexports.usePipe = usePipe;\r\n/**\r\n * Render the next component in the pipeline.\r\n *\r\n * @since 1.0.0\r\n */\r\nfunction Pipe() {\r\n    const pipe = usePipe();\r\n    return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: pipe });\r\n}\r\nexports.Pipe = Pipe;\r\n/**\r\n * A shortcut to pass {@code <Pipe />} as the children prop.\r\n *\r\n * @since 1.0.0\r\n */\r\nexports.pipe = {\r\n    children: (0, jsx_runtime_1.jsx)(Pipe, {})\r\n};\r\n/**\r\n * Render the provided components with the last\r\n * component's pipe being the current pipe.\r\n *\r\n * Note: this component will add the current pipe\r\n * to the components list, enabling the last given\r\n * component to render the next component in the\r\n * parent pipeline.\r\n *\r\n * @since 1.0.0\r\n */\r\nfunction Pipeline(props) {\r\n    const { components = [], children = [] } = props;\r\n    const pipe = usePipe();\r\n    return createPipeline([\r\n        ...components,\r\n        ...Array.isArray(children) ? children : [children]\r\n    ], pipe);\r\n}\r\nexports.Pipeline = Pipeline;\r\n/**\r\n * Render the provided components.\r\n *\r\n * Note: this component won't pass the current pipe.\r\n * If this was in another piping, The `<Pipe />` component\r\n * in this piping won't render the next component in the parent piping.\r\n *\r\n * @since 1.0.0\r\n */\r\nfunction Piping(props) {\r\n    const { components = [], children = [] } = props;\r\n    return createPipeline([\r\n        ...components,\r\n        ...Array.isArray(children) ? children : [children]\r\n    ], props.fallback);\r\n}\r\nexports.Piping = Piping;\r\n/**\r\n * Create a pipeline component from the provided components.\r\n *\r\n * Note: this component won't pass the current pipe.\r\n * If this was in another piping, The `<Pipe />` component\r\n * in this piping won't render the next component in the parent piping.\r\n *\r\n * @since 1.1.0\r\n */\r\nfunction createPipeline(components, fallback) {\r\n    const [currentComponent, ...nextComponents] = components;\r\n    return (0, jsx_runtime_1.jsx)(PipeContext.Provider, { value: nextComponents.length > 0 ? createPipeline(nextComponents, fallback) : fallback !== null && fallback !== void 0 ? fallback : null, children: currentComponent });\r\n}\r\nexports.createPipeline = createPipeline;\r\n"]}