Files
the-office/dist/static/js/app.cc2221b5.js

2 lines
14 KiB
JavaScript

(function(t){function e(e){for(var a,o,i=e[0],c=e[1],l=e[2],d=0,p=[];d<i.length;d++)o=i[d],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&p.push(n[o][0]),n[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);u&&u(e);while(p.length)p.shift()();return r.push.apply(r,l||[]),s()}function s(){for(var t,e=0;e<r.length;e++){for(var s=r[e],a=!0,i=1;i<s.length;i++){var c=s[i];0!==n[c]&&(a=!1)}a&&(r.splice(e--,1),t=o(o.s=s[0]))}return t}var a={},n={app:0},r=[];function o(e){if(a[e])return a[e].exports;var s=a[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=t,o.c=a,o.d=function(t,e,s){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(o.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)o.d(s,a,function(e){return t[e]}.bind(null,a));return s},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/";var i=window["webpackJsonp"]=window["webpackJsonp"]||[],c=i.push.bind(i);i.push=e,i=i.slice();for(var l=0;l<i.length;l++)e(i[l]);var u=c;r.push([0,"chunk-vendors"]),s()})({0:function(t,e,s){t.exports=s("56d7")},"0745":function(t,e,s){"use strict";var a=s("b9dd"),n=s.n(a);n.a},"409b":function(t,e,s){"use strict";var a=s("6767"),n=s.n(a);n.a},4251:function(t,e,s){},"44e5":function(t,e,s){"use strict";var a=s("6a61"),n=s.n(a);n.a},"513c":function(t,e,s){"use strict";var a=s("e18f"),n=s.n(a);n.a},"564b":function(t,e,s){"use strict";var a=s("64af"),n=s.n(a);n.a},"56d7":function(t,e,s){"use strict";s.r(e);s("b0c0"),s("e260"),s("e6cf"),s("cca6"),s("a79d"),s("f9e3");var a=s("2b0e"),n=s("5f5b"),r=s("b1e0"),o=s("0756"),i=s("4eb5"),c=s.n(i),l=s("f13c"),u=s.n(l),d=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"app"}},[s("b-navbar",[s("b-navbar-brand",[s("router-link",{staticClass:"no-link",attrs:{to:{name:"Home"}}},[t._v(" The Office Quotes ")])],1),s("b-collapse",{attrs:{id:"nav-collapse","is-nav":""}},[s("b-navbar-nav",[s("b-nav-item",{attrs:{href:"#"}},[s("router-link",{staticClass:"no-link",attrs:{to:{name:"Home"}}},[t._v(" Home ")])],1),s("b-nav-item",{attrs:{href:"#"}},[s("router-link",{staticClass:"no-link",attrs:{to:{name:"Home"}}},[t._v(" About ")])],1)],1)],1)],1),s("ais-instant-search",{attrs:{"index-name":"prod_THEOFFICEQUOTES","search-client":t.searchClient,"insights-client":t.insightsClient}},[s("b-container",{staticClass:"py-2 px-lg-5 px-md-4",attrs:{fluid:!0}},[s("b-row",{staticClass:"my-3 pl-1"},[s("b-col",{attrs:{lg:"3",xl:"2",md:"12"}},[s("ais-search-box",{ref:"searchbox",attrs:{placeholder:"Search here…"},nativeOn:{keydown:function(e){return t.showResults(e)}}})],1)],1),s("b-row",[s("b-col",{attrs:{lg:"3",xl:"2",md:"12"}},[s("SeasonList")],1),s("b-col",{staticClass:"pt-md-2 pt-lg-0"},[s("router-view")],1),s("b-col",{attrs:{md:"0",lg:"0",xl:"2"}})],1)],1),s("ais-configure",{attrs:{clickAnalytics:!0}})],1)],1)},p=[],h=s("1320"),f=s.n(h),m=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"accordion",attrs:{role:"tablist"}},t._l(t.seasons,(function(e){return s("b-card",{key:e.season_id,staticClass:"season-item"},[s("b-card-header",{directives:[{name:"b-toggle",rawName:"v-b-toggle",value:"accordion-"+e.season_id,expression:"'accordion-' + season.season_id"}],attrs:{"header-tag":"header",role:"tab"}},[s("a",{staticClass:"no-link align-items-center justify-content-between d-flex"},[s("h5",{staticClass:"mb-0 pu-0 mu-0 season-title"},[t._v(" Season "+t._s(e.season_id)+" ")]),s("b-icon",{attrs:{icon:"chevron-down"}})],1)]),s("b-collapse",{attrs:{id:"accordion-"+e.season_id,accordion:"accordion-season-list"}},[s("b-card-body",{staticClass:"h-100 px-0"},[s("b-list-group",[t._l(e.episodes,(function(a){return[s("b-list-group-item",{key:"rl-"+a.episode_id,staticClass:"no-link episode-item",attrs:{id:"s-"+e.season_id+"-ep-"+a.episode_id,to:{name:"Episode",params:{season:e.season_id,episode:a.episode_id}}}},[t._v(" Episode "+t._s(a.episode_id)+' - "'+t._s(a.title)+'" ')]),s("b-popover",{key:"bpop-"+a.episode_id,attrs:{show:"",variant:"secondary",delay:"25",target:"s-"+e.season_id+"-ep-"+a.episode_id,triggers:"hover",placement:"right"},scopedSlots:t._u([{key:"title",fn:function(){return[t._v(t._s(a.title))]},proxy:!0}],null,!0)},[t._v(" "+t._s(a.description)+" ")])]}))],2)],1)],1)],1)})),1)},b=[],_=s("bc3a"),v=s.n(_),x={name:"SeasonList",data:function(){return{seasons:[]}},methods:{getSeasons:function(){var t=this,e="".concat("http://192.168.2.35:5000","/api/episodes/");v.a.get(e).then((function(e){t.seasons=e.data})).catch((function(t){console.error(t)}))}},created:function(){this.getSeasons()}},g=x,y=(s("513c"),s("2877")),C=Object(y["a"])(g,m,b,!1,null,null,null),k=C.exports,w=(s("c2ca"),{name:"App",components:{SeasonList:k},data:function(){return{searchClient:f()("W6VCX4QD3K","b71249cd1a242dc10b8dee9d285d7d0b"),insightsClient:window.aa}},methods:{showResults:function(){""!==this.$refs.searchbox.currentRefinement&&"/search_results"!==this.$route.path&&this.$router.push({name:"SearchResults"})}}}),q=w,S=(s("5c0b"),Object(y["a"])(q,d,p,!1,null,null,null)),$=S.exports,E=s("8c4f"),O=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("b-card",{attrs:{title:"The Office Quotes"}},[s("b-card-text",[t._v(" A Vue.js application serving you "+t._s(t.stats.totals.quote)+" quotes from your favorite show - The Office. "),s("br"),t._v(" Click on a Season and Episode on the left-hand sidebar to view quotes. Search for quotes with the instant searchbox. ")])],1)},j=[],T={name:"Home",data:function(){return{stats:null}},methods:{getStats:function(){var t=this,e="".concat("http://192.168.2.35:5000","/api/stats/");v.a.get(e).then((function(e){t.stats=e.data})).catch((function(t){console.error(t)}))}},created:function(){this.getStats()}},H=T,L=(s("dbc2"),Object(y["a"])(H,O,j,!1,null,null,null)),R=L.exports,P=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("b-card",{staticClass:"mb-4",attrs:{title:"Season "+this.$route.params.season+" Episode "+this.$route.params.episode+" - "+(null!=t.episode?t.episode.title:"")}},[t.episode?s("span",[t._v(" "+t._s(t.episode.description)+" ")]):t._e(),t.episode&&t.episode.characters?s("CharacterList",{attrs:{characters:t.episode.characters}}):t._e()],1),null!=t.episode?s("div",t._l(t.episode.scenes,(function(e,a){return s("b-card",{key:"scene-"+a,staticClass:"mb-1",attrs:{"body-class":"p-0"}},[s("b-card-text",{staticClass:"my-2"},[s("QuoteList",{attrs:{quotes:e.quotes,sceneIndex:a}}),e.deleted?s("span",{staticClass:"mt-n2 mb-4 text-muted deleted-scene pl-2",attrs:{footer:"Deleted Scene "+e.deleted}},[t._v(" Deleted Scene "+t._s(e.deleted)+" ")]):t._e()],1)],1)})),1):t._e()],1)},Q=[],I=(s("99af"),function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("table",{staticClass:"quote-list px-3 w-100"},t._l(t.quotes,(function(e,a){return s("tr",{key:"quote-"+a,class:null!==t.$route.hash&&t.$route.hash.substring(1)===t.sceneIndex+"-"+a?"highlight":"",attrs:{id:t.sceneIndex+"-"+a}},[e.speaker?s("td",{staticClass:"quote-speaker pl-3"},[s("span",{staticClass:"my-3"},[t._v(" "+t._s(e.speaker)+" ")])]):t._e(),s("td",{staticClass:"quote-text w-100 pr-3"},[t._v(t._s(e.text))]),s("td",{staticClass:"px-1 pl-2"},[s("a",{staticClass:"no-link",attrs:{href:t.quote_link(a)},on:{click:function(e){return t.copy(a)}}},[s("b-icon",{attrs:{icon:"link45deg"}})],1)])])})),0)}),M=[],A=(s("a9e3"),{props:{sceneIndex:{required:!0,type:Number},quotes:{required:!0,type:Array}},methods:{quote_link:function(t){return"/".concat(this.$route.params.season,"/").concat(this.$route.params.episode,"#").concat(this.sceneIndex,"-").concat(t)},copy:function(t){this.$copyText("http://192.168.2.35:5000"+this.quote_link(t))}}}),D=A,B=(s("0745"),Object(y["a"])(D,I,M,!1,null,null,null)),F=B.exports,J=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.characters?s("div",{staticClass:"pt-2",attrs:{fluid:!0}},t._l(t.characters,(function(e){return s("b-button",{key:e.name,staticClass:"mx-2 my-1 character-button",attrs:{squared:"",size:"sm",id:"character-"+e.id,title:e.appearances+" Quote"+(e.appearances>1?"s":""),to:{name:"Character",params:{character:e.id}}}},[t._v(" "+t._s(e.name)+" "),s("b-badge",{staticClass:"ml-1"},[t._v(t._s(e.appearances))])],1)})),1):t._e()},N=[],V={name:"CharacterList",props:["characters"]},z=V,K=(s("409b"),Object(y["a"])(z,J,N,!1,null,null,null)),U=K.exports,W={name:"Episode",components:{QuoteList:F,CharacterList:U},data:function(){return{episode:null}},methods:{getEpisode:function(){var t=this,e="".concat("http://192.168.2.35:5000","/api/episode/").concat(this.$route.params.season,"/").concat(this.$route.params.episode,"/");v.a.get(e).then((function(e){t.episode=e.data,t.$route.hash&&t.$nextTick((function(){var e=document.getElementById(t.$route.hash.substring(1));t.$scrollTo(e,500,{easing:"ease-in"})}))})).catch((function(t){console.error(t)}))}},created:function(){this.getEpisode()},watch:{$route:function(){this.getEpisode()}}},X=W,G=(s("876f"),Object(y["a"])(X,P,Q,!1,null,null,null)),Y=G.exports,Z=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("ais-hits",{scopedSlots:t._u([{key:"default",fn:function(e){var a=e.items;return s("div",{},t._l(a,(function(t){return s("SearchResult",{key:t.objectID,attrs:{item:t}})})),1)}}])})],1)},tt=[],et=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("b-card",{staticClass:"mb-1",class:[t.expanded?"expanded":""],attrs:{"body-class":"p-0 expandable-result","footer-class":"my-1"},on:{mouseover:t.hover,click:t.toggleExpansion}},[s("b-card-text",{staticClass:"mu-2 py-1 mb-1"},[t.expanded?s("table",{staticClass:"quote-list px-3 py-1 w-100"},[t._l(t.above,(function(e,a){return s("tr",{key:"quote-a-"+a,staticClass:"secondary"},[s("td",{staticClass:"quote-speaker my-3 pl-3"},[s("div",[t._v(t._s(e.speaker))])]),s("td",{staticClass:"quote-text w-100 pr-3"},[s("div",[t._v(t._s(e.text))])])])})),s("tr",[s("td",{staticClass:"quote-speaker my-3 pl-3",domProps:{innerHTML:t._s(t.item._highlightResult.speaker.value)}}),s("td",{staticClass:"quote-text w-100 pr-3",domProps:{innerHTML:t._s(t.item._highlightResult.text.value)}})]),t._l(t.below,(function(e,a){return s("tr",{key:"quote-b-"+a,staticClass:"secondary"},[s("td",{staticClass:"quote-speaker my-3 pl-3"},[s("div",[t._v(t._s(e.speaker))])]),s("td",{staticClass:"quote-text w-100 pr-3"},[s("div",[t._v(t._s(e.text))])])])}))],2):s("table",{staticClass:"quote-list px-3 py-1 w-100"},[s("tr",[s("td",{staticClass:"quote-speaker my-3 pl-3",domProps:{innerHTML:t._s(t.item._highlightResult.speaker.value)}}),s("td",{staticClass:"quote-text w-100 pr-3",domProps:{innerHTML:t._s(t.item._highlightResult.text.value)}})])]),t.expanded?s("router-link",{staticClass:"no-link search-result-link w-100 text-muted mb-2 ml-2",attrs:{to:{name:"Episode",params:{season:t.item.season,episode:t.item.episode_rel},hash:"#"+(t.item.section_rel-1)+"-"+(t.item.quote_rel-1)}}},[t._v(" Season "+t._s(t.item.season)+" Episode "+t._s(t.item.episode_rel)+" Scene "+t._s(t.item.section_rel)+" ")]):t._e()],1)],1)},st=[],at={props:["item"],data:function(){return{expanded:!1,fetching:!1,above:null,below:null}},computed:{fetched:function(){return null!==this.above||null!==this.below}},methods:{toggleExpansion:function(){this.expanded=!this.expanded,this.fetchQuotes()||(this.hasExpanded=!0,this.fetchQuotes())},hover:function(){this.fetched||this.fetching||(this.fetching=!0,this.fetchQuotes(),this.fetching=!1)},fetchQuotes:function(){var t=this,e="".concat("http://192.168.2.35:5000","/api/quote_surround?season=").concat(this.item.season,"&episode=").concat(this.item.episode_rel,"&scene=").concat(this.item.section_rel,"&quote=").concat(this.item.quote_rel);v.a.get(e).then((function(e){t.above=e.data.above,t.below=e.data.below})).catch((function(t){console.error(t)}))}}},nt=at,rt=(s("a219"),Object(y["a"])(nt,et,st,!1,null,null,null)),ot=rt.exports,it={name:"SearchResults",components:{SearchResult:ot}},ct=it,lt=(s("44e5"),Object(y["a"])(ct,Z,tt,!1,null,null,null)),ut=lt.exports,dt=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("b-breadcrumb",{attrs:{items:t.breadcrumbs}}),s("b-card",[t.character?s("h4",[t._v(t._s(this.$route.params.character))]):s("Skeleton",{staticStyle:{"max-width":"30%"}})],1)],1)},pt=[],ht=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"skeleton"})},ft=[],mt=(s("c842"),{}),bt=Object(y["a"])(mt,ht,ft,!1,null,"7b060982",null),_t=bt.exports,vt={data:function(){return{character:null}},components:{Skeleton:_t},computed:{breadcrumbs:function(){return[{text:"Home",to:{name:"Home"}},{text:"Characters",to:{name:"Home"}},{text:null!==this.character?this.character.name:this.$route.params.character,active:!0}]}},methods:{}},xt=vt,gt=(s("564b"),Object(y["a"])(xt,dt,pt,!1,null,"38a7c021",null)),yt=gt.exports;a["default"].use(E["a"]);var Ct=new E["a"]({mode:"history",base:"http://192.168.2.35:5000",routes:[{path:"/",name:"Home",component:R},{path:"/character/:character",name:"Character",component:yt},{path:"/:season/:episode",name:"Episode",component:Y},{path:"/search_results",name:"SearchResults",component:ut},{path:"*"}],scrollBehavior:function(t,e,s){return t.hash?{selector:t.hash}:s||{x:0,y:0}}}),kt=s("2f62");a["default"].use(kt["a"]);var wt=new kt["a"].Store({state:{episodeCount:[6,22,23,14,26,24,24,24,23]},mutations:{},actions:{}});a["default"].use(u.a),a["default"].use(n["a"]),a["default"].use(r["a"]),a["default"].use(o["a"]),a["default"].use(c.a),a["default"].config.productionTip=!1,Ct.beforeEach((function(t,e,s){null!==e.name&&t.name,s()})),new a["default"]({router:Ct,store:wt,render:function(t){return t($)}}).$mount("#app")},"5c0b":function(t,e,s){"use strict";var a=s("9c0c"),n=s.n(a);n.a},"64af":function(t,e,s){},6767:function(t,e,s){},"6a61":function(t,e,s){},"876f":function(t,e,s){"use strict";var a=s("e8e0"),n=s.n(a);n.a},"9c0c":function(t,e,s){},a219:function(t,e,s){"use strict";var a=s("b6f6"),n=s.n(a);n.a},b6f6:function(t,e,s){},b9dd:function(t,e,s){},c842:function(t,e,s){"use strict";var a=s("e8e8"),n=s.n(a);n.a},dbc2:function(t,e,s){"use strict";var a=s("4251"),n=s.n(a);n.a},e18f:function(t,e,s){},e8e0:function(t,e,s){},e8e8:function(t,e,s){}});
//# sourceMappingURL=app.cc2221b5.js.map