{"version":3,"sources":["MovieRow.js","App.js","serviceWorker.js","index.js"],"names":["MovieRow","url","this","props","movie","id","window","location","href","className","style","paddingLeft","paddingTop","alt","width","src","poster_src","title","overview","type","onClick","viewMovie","bind","value","React","Component","App","state","performSearch","searchTerm","console","log","urlString","$","ajax","success","searchResults","results","movieRows","forEach","poster_path","movieRow","push","setState","rows","error","xhr","status","err","event","target","display","flexDirection","justifyContent","onChange","searchChangeHandler","placeholder","Boolean","hostname","match","ReactDOM","render","document","getElementById","navigator","serviceWorker","ready","then","registration","unregister"],"mappings":"oRAiDeA,E,+JA7CX,WAGI,IAAMC,EAAM,mCAAqCC,KAAKC,MAAMC,MAAMC,GAClEC,OAAOC,SAASC,KAAOP,I,oBAG3B,WACI,OAAO,uBAEHQ,UAAW,YAFR,SAGH,gCACI,+BACI,6BACI,qBAAKC,MAAO,CACRC,YAAa,GACbC,WAAY,GAEZC,IAAI,SAASC,MAAM,MAAMC,IAAKb,KAAKC,MAAMC,MAAMY,eAEvD,+BACI,6BACKd,KAAKC,MAAMC,MAAMa,QAEtB,4BAAIf,KAAKC,MAAMC,MAAMc,WACrB,wBACAC,KAAK,SACGV,UAAU,aAUVW,QAASlB,KAAKmB,UAAUC,KAAKpB,MAAOqB,MAAM,OAZlD,2BAhBPrB,KAAKC,MAAMC,MAAMC,Q,GAVXmB,IAAMC,WC8GdC,E,kDA3Gb,WAAYvB,GAAQ,IAAD,8BACjB,cAAMA,IACDwB,MAAQ,GAkBX,EAAKC,cAAc,cApBJ,E,iDAuBnB,SAAcC,GAAa,IAAD,OACxBC,QAAQC,IAAI,uBACZ,IAAMC,EAAY,4FAA8FH,EAGhHI,IAAEC,KAAK,CACLjC,IAAK+B,EACLG,QAAS,SAACC,GACRN,QAAQC,IAAI,wBAEZ,IAAMM,EAAUD,EAAcC,QAG1BC,EAAY,GAEhBD,EAAQE,SAAQ,SAACnC,GAEfA,EAAMY,WAAY,kCAAoCZ,EAAMoC,YAC5DV,QAAQC,IAAI3B,EAAMoC,aAClB,IAAMC,EAAW,cAAC,EAAD,CAAyBrC,MAAOA,GAAjBA,EAAMC,IACtCiC,EAAUI,KAAKD,MAEjB,EAAKE,SAAS,CAACC,KAAMN,KAEvBO,MAAO,SAACC,EAAKC,EAAQC,GACnBlB,QAAQC,IAAI,6B,iCAKlB,SAAoBkB,GAClBnB,QAAQC,IAAIkB,EAAMC,OAAO3B,OACzB,IACMM,EAAaoB,EAAMC,OAAO3B,MADZrB,KAER0B,cAAcC,K,oBAG9B,WACE,OACE,sBAAKpB,UAAU,WAEfC,MAAO,CACLyC,QAAS,OACTC,cAAe,SACfC,eAAgB,UALlB,UASE,uBAAO5C,UAAU,WACjBC,MAAO,CACLyC,QAAS,OACTE,eAAgB,UAHlB,SAME,gCACE,6BAEE,6BACE,oBACA3C,MAAO,CACLC,YAAa,GAFf,kCASR,qBAAKF,UAAU,mBAAf,SACE,uBACAA,UAAU,YACV6C,SAAUpD,KAAKqD,oBAAoBjC,KAAKpB,MAAOsD,YAAY,0BAG7D,qBAAK/C,UAAU,cAAf,SACGP,KAAKyB,MAAMiB,c,GAlGFnB,aCOEgC,QACW,cAA7BnD,OAAOC,SAASmD,UAEe,UAA7BpD,OAAOC,SAASmD,UAEhBpD,OAAOC,SAASmD,SAASC,MACvB,2DCZNC,IAASC,OAAO,cAAC,EAAD,IAASC,SAASC,eAAe,SD2H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMC,MAAK,SAAAC,GACjCA,EAAaC,kB","file":"static/js/main.8af77270.chunk.js","sourcesContent":["import React from 'react';\nimport './MovieRow.css';\n\nclass MovieRow extends React.Component {\n viewMovie(){\n // console.log(\"trying to view movie\")\n // console.log(this.props.movie.title)\n const url = \"https:/www.themoviedb.org/movie/\" + this.props.movie.id\n window.location.href = url\n }\n\n render() {\n return \n \n \n \n \n \n \n
\n \"poster\"\n \n

\n {this.props.movie.title}\n

\n

{this.props.movie.overview}

\n \n
\n }\n}\n\nexport default MovieRow","import React, { Component } from 'react';\nimport './App.css';\nimport $ from 'jquery'; \nimport MovieRow from './MovieRow.js'\n\nclass App extends Component {\n constructor(props) {\n super(props) \n this.state = {} \n // console.log(\"This is my initializer\")\n\n // const movies = [\n // { id: 0, poster_src: \"https://m.media-amazon.com/images/M/MV5BMjMxNjY2MDU1OV5BMl5BanBnXkFtZTgwNzY1MTUwNTM@._V1_.jpg\" , title: \"Avengers: Infinity War\", overview: \"Lorem ipsum dolor amet taiyaki marfa schlitz sriracha bitters disrupt small batch. Distillery la croix cred, hot chicken lyft tumblr fixie. Edison bulb forage disrupt brooklyn wolf meditation. Flexitarian mlkshk chia synth crucifix irony tumblr taiyaki squid shaman chicharrones gluten-free portland farm-to-table. Four dollar toast quinoa tousled, XOXO asymmetrical poke raw denim pug succulents chartreuse affogato organic. Pitchfork pok pok street art cray. Beard kogi vexillologist retro la croix trust fund pour-over organic keffiyeh asymmetrical artisan, normcore mumblecore typewriter.\" },\n // { id: 1, poster_src: \"https://images-na.ssl-images-amazon.com/images/I/71niXI3lxlL._SY606_.jpg\", title: \"Avengers: Endgame\", overview: \"Lorem ipsum dolor amet taiyaki marfa schlitz sriracha bitters disrupt small batch. Distillery la croix cred, hot chicken lyft tumblr fixie. Edison bulb forage disrupt brooklyn wolf meditation. Flexitarian mlkshk chia synth crucifix irony tumblr taiyaki squid shaman chicharrones gluten-free portland farm-to-table. Four dollar toast quinoa tousled, XOXO asymmetrical poke raw denim pug succulents chartreuse affogato organic. Pitchfork pok pok street art cray. Beard kogi vexillologist retro la croix trust fund pour-over organic keffiyeh asymmetrical artisan, normcore mumblecore typewriter.\" },\n // ]\n \n\n // var movieRows = []\n // movies.forEach((movie) => {\n // console.log(movie.title)\n // const movieRow = \n \n // movieRows.push(movieRow)\n // })\n\n // this.state = {rows: movieRows}\n this.performSearch(\"spider-man\")\n }\n\n performSearch(searchTerm) {\n console.log(\"perform search term\")\n const urlString = \"https://api.themoviedb.org/3/search/movie?api_key=bd57c465124b01d880b8dd4d14066cc6&query=\" + searchTerm\n\n\n $.ajax({\n url: urlString,\n success: (searchResults) => {\n console.log(\"Fetched successfully\")\n //console.log(searchResults)\n const results = searchResults.results\n //console.log(results[0])\n\n var movieRows = []\n\n results.forEach((movie) => {\n \n movie.poster_src= \"https://image.tmdb.org/t/p/w185\" + movie.poster_path\n console.log(movie.poster_path)\n const movieRow = \n movieRows.push(movieRow)\n })\n this.setState({rows: movieRows})\n },\n error: (xhr, status, err) => {\n console.log(\"Failed to fetch data\")\n }\n })\n }\n\n searchChangeHandler(event) {\n console.log(event.target.value)\n const boundObject = this\n const searchTerm = event.target.value\n boundObject.performSearch(searchTerm)\n }\n\nrender() {\n return (\n
\n\n \n \n \n \n \n \n \n
\n Movie Search\n
\n
\n \n
\n \n
\n {this.state.rows}\n
\n \n\n
\n );\n}\n}\n \n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById('root'));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""}