(this.webpackJsonptorahstream=this.webpackJsonptorahstream||[]).push([[0],{119:function(e,t,a){e.exports=a(153)},124:function(e,t,a){},153:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a.n(n),l=a(10),c=a.n(l),o=(a(124),a(30)),i=a(36),s=a.n(i),m=a(96),u=a.n(m),d={caseSensitive:!1,shouldSort:!0,threshold:.6,location:0,distance:100,maxPatternLength:32,minMatchCharLength:2,keys:["title"]},h=Object(n.createContext)(),p=function(e){var t=e.children,a=Object(n.useState)({series:[],index:!1}),l=Object(o.a)(a,2),c=l[0],i=l[1];return Object(n.useEffect)((function(){s.a.get("/Rabbi_Viener/topics.json").then((function(e){i({series:e.data,index:new u.a(e.data,d)})}))}),[]),r.a.createElement(h.Provider,{value:c},t)},E=a(188),f=a(193),v=a(207),b=a(191),g=a(51),y=a(192),w=a(23),x=a(33),N=Object(x.f)((function(e){var t=e.history,a=["/shiurim","/about"].includes(t.location.pathname)?t.location.pathname:"/"===t.location.pathname&&"/about";return r.a.createElement("nav",{style:{flexGrow:1}},r.a.createElement(E.a,null,r.a.createElement(b.a,{style:{display:"flex"}},r.a.createElement(y.a,null,r.a.createElement(g.a,{component:"span",display:"inline",gutterBottom:!0,noWrap:!0,variant:"h6"},"TorahStream")),r.a.createElement("div",{style:{display:"inline-flex",marginLeft:"auto"}},r.a.createElement(v.a,{value:a},r.a.createElement(f.a,{component:w.a,label:"Shiurim",to:"/shiurim",value:"/shiurim"}),r.a.createElement(f.a,{component:w.a,label:"About",to:"/about",value:"/about"}))))))})),j=function(e){return r.a.createElement(b.a,null,r.a.createElement(N,null),r.a.createElement("h1",{className:"text-5xl py-8"},"Welcome to TorahStream "),r.a.createElement("div",{className:"flex mb-10 flex-col md:flex-row"},r.a.createElement("div",{className:"w-2/3 mr-20 rounded-md"},r.a.createElement("img",{alt:"Rav Viener",id:"rav-viener-picture",src:"assets/rabbi_viener.jpg",className:"w-96"})),r.a.createElement("div",{className:"text-xl"},r.a.createElement("div",null,"Rabbi Yosef Viener, author of"," ",r.a.createElement(w.a,{to:"http://www.artscroll.com/Books/cqhh.html"}," ","Contemporary Questions in Halachah and Hashkafah"),", has inspired and enlightened listeners worldwide with his shiurim on Halachah and Hashkafah - crystallizing the Torah's timeless wisdom and applying to our daily lives. TorahStream.org is proud to bring you"," ",r.a.createElement(w.a,{to:"/shiurim"},"these fascinating lectures")," so you too can benefit from his Torah knowledge and practical life guidance at the time and place of your convenience."),r.a.createElement("div",{className:"pt-6"},r.a.createElement("a",{href:"/shiurim",className:"bg-blue-400 p-3 my-5 rounded-md"},"Go To Shiurim")))),r.a.createElement("div",{className:"grid grid-cols-2 md:grid-cols-4 mb-10"},r.a.createElement("div",{className:"flex flex-col"},r.a.createElement("img",{className:"lg:w-2/3 w-full p-5 mx-auto",src:"https://cdn.shopify.com/s/files/1/0093/3625/8657/products/138-8_6be6977d-80d2-4360-b721-bac44a64643a_500x.jpg?v=1635954806"}),r.a.createElement("div",{className:"mx-auto"},r.a.createElement("a",{href:"https://www.artscroll.com/Books/9781422611388.html",className:"bg-blue-400 p-3 my-5 rounded-md"},"Buy Now"))),r.a.createElement("div",{className:"flex flex-col"},r.a.createElement("img",{className:"lg:w-2/3 w-full p-5 mx-auto",src:"assets/2023-06-19_21-59.png"}),r.a.createElement("div",{className:"mx-auto"},"Available in many seforim stores. (Also at ZBerman) If you cannot find it near you, you can reach out to:",r.a.createElement("br",null),r.a.createElement("span",{className:"email mr-5","data-email":"seforim@torahstream.org"})," ",r.a.createElement("br",null),r.a.createElement("span",{className:"email","data-email":"chukoseyhem@torahstream.org"}))),r.a.createElement("div",{className:"flex flex-col p-2"},r.a.createElement("img",{className:"lg:w-2/3 w-full p-5 mx-auto",src:"https://judaicaplaza.com/cdn/shop/products/6197067_600x.jpg?v=1689778722"}),r.a.createElement("div",{className:"mx-auto"},"Torah 2 Go: R' Yosef Viener Nisyonos, Bitachon, and Tefilah Series (USB)",r.a.createElement("div",{className:"pt-5 text-center"},r.a.createElement("a",{href:"https://judaicaplaza.com/products/6197067?_pos=3&_sid=60577d0f7&_ss=r",className:"bg-blue-400 p-3 my-5 rounded-md"},"Buy Now")))),r.a.createElement("div",{className:"flex flex-col p-2"},r.a.createElement("img",{className:"lg:w-2/3 w-full p-5 mx-auto",src:"https://judaicaplaza.com/cdn/shop/products/6197066_500x.jpg?v=1689778719"}),r.a.createElement("div",{className:"mx-auto"},"Torah 2 Go: R' Yosef Viener Inyunei Mishpacha Shiurim (USB)",r.a.createElement("div",{className:"pt-5 text-center"},r.a.createElement("a",{href:"https://judaicaplaza.com/products/6197066",className:"bg-blue-400 p-3 my-5 rounded-md"},"Buy Now"))))))},k=a(60),S=a(61),O=a(66),T=a(65),C=a(194),I=a(206),B=a(21),P=a(62),_=a.n(P),F=a(63),V=a.n(F),z=function(e){var t=e.data;return r.a.createElement(r.a.Fragment,null,r.a.createElement(I.a,{mb:2},r.a.createElement(g.a,{gutterBottom:!0,variant:"h4"},"".concat(t.title," (").concat(t.count,")")),r.a.createElement(C.a,{color:"primary",component:"a",href:t.podcast,onClick:function(){B.a.event({category:"Clicked on Podcast",action:"Podcast link: ".concat(t.title)})},startIcon:r.a.createElement(_.a,null),variant:"contained"},"Audio Podcast")," ",t.vodcast&&r.a.createElement(C.a,{color:"secondary",component:"a",href:t.vodcast,onClick:function(){B.a.event({category:"Clicked on Vodcast",action:"Vodcast link: ".concat(t.title)})},startIcon:r.a.createElement(V.a,null),variant:"contained"},"Video Podcast")))},R=a(195),A=a(198),W=a(196),q=a(197),M=a(208),D=a(101),G=a.n(D),H=a(103),L=a.n(H),U=a(102),Y=a.n(U),J=function(e){return" ,.'\":;_?!$@#%^&*()[]{}-".split("").reduce((function(e,t){return e.replaceAll(t,"-")}),e).toLowerCase()},Q=function(e){var t=e.match(/(\d{4}-\d{2}-\d{2}) (.*)/);if(t){var a=t[1],n="-"===t[2][0]?t[2].substr(2):t[2];return r.a.createElement(r.a.Fragment,null,n.split("
").map((function(e,t){return r.a.createElement(g.a,{display:"inline",variant:"h5"},e,r.a.createElement("br",null))}))," ",r.a.createElement(g.a,{color:"textSecondary",display:"inline",variant:"subtitle1"},a))}return r.a.createElement(r.a.Fragment,null,e.split("
").map((function(e,t){return r.a.createElement(g.a,{display:"inline",variant:"h5"},e,r.a.createElement("br",null))})))},$=function(e){var t,a,l=e.shiur,c=e.shiurId,i=Object(n.useState)(!1),s=Object(o.a)(i,2),m=s[0],u=s[1];return r.a.createElement(I.a,{mb:1},r.a.createElement(R.a,null,r.a.createElement(W.a,{subheader:r.a.createElement(r.a.Fragment,null,l.video&&r.a.createElement(q.a,{control:r.a.createElement(M.a,{checked:m,onChange:function(){return u(!m)},value:"video"}),label:"Show Video"}),r.a.createElement(g.a,{component:"span",display:"inline",variant:"body1"}," ",r.a.createElement(C.a,{color:"secondary",component:"a",download:!0,href:m?l.video:l.audio,onClick:function(){B.a.event({category:"Download a Shiur",action:"Shiur downloaded: ".concat(l.Title)})},size:"small",startIcon:r.a.createElement(Y.a,null),variant:"outlined"},"Download"))),title:r.a.createElement("a",{href:(t=c,a=J(l.Title),"".concat(window.location.origin,"/shiur/").concat(t,"/").concat(a))},Q(l.Title))}),r.a.createElement(A.a,null,r.a.createElement(G.a,{controls:!0,height:m?"100%":"2.5rem",light:!0,onPlay:function(){B.a.event({category:"Play Shiur",action:"Shiur played: ".concat(l.Title)})},playbackRate:1,playIcon:r.a.createElement(L.a,{fontSize:"large"}),url:m?l.video:l.audio,width:"100%"}))))},Z=a(210),K=a(104),X=a.n(K),ee=a(105),te=a.n(ee),ae=function(e){var t=e.items,a=e.numPerPage,l=e.renderFunction,c=Object(n.useState)(0),i=Object(o.a)(c,2),s=i[0],m=i[1],u=Math.ceil(t.length/a);return r.a.createElement(r.a.Fragment,null,r.a.createElement(Z.a,{activeStep:s,backButton:r.a.createElement(C.a,{disabled:0===s,onClick:function(){m(s-1)},size:"small"},r.a.createElement(X.a,null),"Back"),nextButton:r.a.createElement(C.a,{disabled:s===u-1,onClick:function(){m(s+1)},size:"small"},"Next",r.a.createElement(te.a,null)),position:"static",steps:u,variant:"text"}),r.a.createElement("br",null),l(function(e){return e.slice(s*a,s*a+a)}(t)))},ne=a(199),re=function(e){Object(O.a)(a,e);var t=Object(T.a)(a);function a(e){var n;return Object(k.a)(this,a),(n=t.call(this,e)).reverseOrder=function(){n.setState((function(e){return{orderNewestFirst:!e.orderNewestFirst,episodes:e.episodes.reverse()}}))},n.fetchShiurim=function(e){s.a.get("/Rabbi_Viener/".concat(e,"/episodes.json")).then((function(e){return n.setState({episodes:e.data})})),s.a.get("/Rabbi_Viener/".concat(e,"/topic.json")).then((function(e){return n.setState({topic:e.data})}))},n.state={episodes:[],topic:!1,shiurId:null,orderNewestFirst:!1},n}return Object(S.a)(a,[{key:"componentDidMount",value:function(){var e=this.props.match.params.shiurId;this.fetchShiurim(e),this.setState({shiurId:e})}},{key:"render",value:function(){var e=this;return r.a.createElement(b.a,{maxWidth:"md"},this.state.episodes.length>0&&this.state.topic?r.a.createElement(r.a.Fragment,null,r.a.createElement(z,{data:this.state.topic}),r.a.createElement(q.a,{control:r.a.createElement(M.a,{checked:this.state.orderNewestFirst,color:"primary",onChange:function(){return e.reverseOrder()},size:"medium",value:"order"}),label:"Show Newest First"}),r.a.createElement("hr",null),r.a.createElement(ae,{items:this.state.episodes,numPerPage:5,renderFunction:function(t){return t.map((function(t,a){return r.a.createElement($,{key:t.Title,shiur:t,shiurId:e.state.shiurId})}))}})):r.a.createElement(I.a,{mt:20},r.a.createElement(g.a,{align:"center",component:"div"},r.a.createElement(ne.a,{color:"primary",size:100,thickness:2}))))}}]),a}(n.Component),le=Object(x.f)(re),ce=a(75),oe=a(200),ie=a(201),se=a(203),me=a(202),ue=function(e){var t=e.series,a=void 0===t?[]:t;return r.a.createElement(oe.a,null,a.map((function(e){return r.a.createElement(ie.a,{component:w.a,divider:!0,key:e.id,style:{textTransform:"none"},to:"/shiurim/".concat(e.id)},r.a.createElement(me.a,null,r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,null)," ",e.vodcast&&r.a.createElement(V.a,null))),e.id.replace(/_/g," "),r.a.createElement(se.a,null,e.count))})))},de=a(204),he=function(e){var t=Object(n.useState)({query:""}),a=Object(o.a)(t,2),l=a[0],c=a[1],i=Object(n.useContext)(h);return r.a.createElement(b.a,{maxWidth:"md"},r.a.createElement(g.a,{gutterBottom:!0,variant:"h4"},"Choose A Topic"),r.a.createElement(de.a,{fullWidth:!0,onChange:function(e){return c(Object(ce.a)(Object(ce.a)({},l),{},{query:e.target.value}))},placeholder:"Search...",type:"text",value:l.query,variant:"outlined"}),r.a.createElement("br",null),r.a.createElement("br",null),i.series.length>0?r.a.createElement(ue,{series:i.index&&l.query.length>0?i.index.search(l.query):i.series}):r.a.createElement(I.a,{mt:20},r.a.createElement(g.a,{align:"center",component:"div"},r.a.createElement(ne.a,{color:"primary",size:100,thickness:2}))))},pe=function(e){Object(O.a)(a,e);var t=Object(T.a)(a);function a(e){var n;return Object(k.a)(this,a),(n=t.call(this,e)).fetchEpisode=function(e,t){s.a.get("/Rabbi_Viener/".concat(e,"/episodes.json")).then((function(e){console.log(e);var a=e.data;console.log(a);var r=t.replaceAll("_"," ");console.log(r);var l=a.find((function(e){return J(e.Title)===r}));n.setState({episode:l})}))},n.state={episode:{Title:"",audio:"",video:""}},n}return Object(S.a)(a,[{key:"componentDidMount",value:function(){var e=this.props.match.params,t=e.shiurId,a=e.episodeId;this.fetchEpisode(t,a)}},{key:"render",value:function(){var e=this.state.episode;return r.a.createElement(b.a,{maxWidth:"md"},r.a.createElement(g.a,{variant:"h2"},this.state.episode.Title),e.video?r.a.createElement("video",{controls:!0,onPlay:function(){B.a.event({category:"Play Shiur",action:"Shiur played: ".concat(e.Title)})},src:e.video,style:{width:"100%",margin:"2em 0 0 0"}}):r.a.createElement("audio",{onPlay:function(){B.a.event({category:"Play Shiur",action:"Shiur played: ".concat(e.Title)})},controls:!0,src:e.audio,style:{width:"100%",margin:"5em 0 0 0"}}))}}]),a}(n.Component),Ee=Object(x.f)(pe),fe=function(){return r.a.createElement(x.c,null,r.a.createElement(x.a,{component:j,path:"/about"}),r.a.createElement(x.a,{component:Ee,path:"/shiur/:shiurId/:episodeId"}),r.a.createElement(x.a,{component:le,path:"/shiurim/:shiurId"}),r.a.createElement(x.a,{component:he,path:"/shiurim"}),r.a.createElement(x.a,{component:j,path:""}))},ve=function(){return r.a.createElement("footer",{className:"footer"},r.a.createElement(b.a,null,r.a.createElement(g.a,{align:"center",variant:"body2"},"Questions or comments? Please, contact the"," ",r.a.createElement("a",{href:"mailto:webmaster.torahstream at gmail dot com",rel:"tooltip",title:"Click to email the webmaster, make sure to edit the e-mail address prior to sending."},"webmaster")," ","or"," ",r.a.createElement("a",{href:"mailto:yv at torahstream dot org",rel:"tooltip",title:"Click to email Rabbi Viener, make sure to edit the e-mail address prior to sending."},"Rabbi Viener"),".")))},be=a(17);B.a.initialize("UA-33191551-1");var ge=Object(be.a)();ge.listen((function(e){B.a.set({page:e.pathname}),B.a.pageview(e.pathname)}));var ye=function(){return r.a.createElement(p,null,r.a.createElement("div",{className:"app"},r.a.createElement("div",{className:"content-wrap"},r.a.createElement(x.b,{history:ge},r.a.createElement(N,null),r.a.createElement(I.a,{mt:10},r.a.createElement(fe,null)))),r.a.createElement(ve,null)))};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));c.a.render(r.a.createElement(ye,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()}))}},[[119,1,2]]]); //# sourceMappingURL=main.a655e742.chunk.js.map