"use strict";const m=require("classnames"),s=require("react"),i=require("./UrlUtils-9f8c497b.js"),c=require("dompurify");function*l(){let e=0;for(;;)yield String(e),e=(e+1)%10}function d(r,e){class a extends s.Component{constructor(t){super(t),this.refresh=()=>{this.setState({key:this.state.keygen.next().value})},this.state={keygen:l(),oldProps:t,key:"1"}}static getDerivedStateFromProps(t,n){return e(n.oldProps,t)?{key:n.keygen.next().value,oldProps:t}:null}render(){return s.createElement(r,{key:this.state.key,propsGuardRefresh:this.refresh,...this.props},this.props.children)}}return a}const b="breadcrumbs _breadcrumbs_629dc",h="breadcrumbsSeparator _breadcrumbsSeparator_f3218",o={breadcrumbs:b,breadcrumbsSeparator:h},p=()=>s.createElement("span",{className:m(o.breadcrumbsSeparator,"breadcrumbsSeparator")},"›"),y=d(r=>s.createElement("div",{className:m(o.breadcrumbs,"breadcrumb",r.className)},(s.Children.map(r.children,e=>e)||[]).reduce((e,a,u,t)=>(e.push(a),u<t.length-1&&e.push(s.createElement(p,{key:`separator-${u}`})),e),[])),(r,e)=>e.children!==r.children),_=(r,e)=>({__html:e?c.sanitize(r,e):c.sanitize(r)}),g=r=>`https://img.youtube.com/vi/${r}/hqdefault.jpg`,S=(r,e)=>{if(!e)return`https://www.youtube.com/embed/${r}`;const a=i.UrlUtils.buildURLSearchParamsFromObject({...e,autoplay:e.autoplay?"1":"",modestbranding:e.modestbranding?"1":"",mute:e.mute?"1":""});return`https://www.youtube.com/embed/${r}?${a.toString()}`};exports.Breadcrumbs=y;exports.getYoutubeEmbedUrl=S;exports.getYoutubeHqThumbnailUrl=g;exports.makeSafeReactInnerHTML=_;
