1webpackJsonp([1],{38:function(t,e,n){"use strict";var i=n(23),r=n.n(i),a=n(89),s=n(86),o=n.n(s);r.a.use(a.a),e.a=new a.a({routes:[{path:"/",name:"Game",component:o.a}]})},39:function(t,e,n){n(80);var i=n(37)(n(42),n(87),null,null);t.exports=i.exports},41:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(23),r=n.n(i),a=n(40),s=n(39),o=n.n(s),c=n(38);r.a.use(a.a),new r.a({el:"#app",router:c.a,template:"<App/>",components:{App:o.a}})},42:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"app"}},43:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(44),r=n.n(i),a=n(82),s=n.n(a);e.default={name:"game",data:function(){var t=s.a.sample("ABCDEFGHIJKLMNOPQRSTUVWXYZ");return{entries:[{city:{name:"Berlin",correct:!0,link:"https://www.wikidata.org/wiki/Q64"},country:{name:"Belgien",correct:!0,link:"https://www.wikidata.org/wiki/Q31"},river:{name:"Bröl",correct:!0,link:"https://www.wikidata.org/wiki/Q153109"},profession:{name:"Bademeister",correct:!0,link:"https://www.wikidata.org/wiki/Q2257662"},points:40}],newEntry:{city:"",country:"",river:"",profession:""},currentLetter:t,pattern:"^"+t+".*",loading:!1,visible:{entity:null,index:null}}},computed:{totalPoints:function(){return s.a.sumBy(this.entries,"points")}},methods:{check:function(){function t(){n.currentLetter=s.a.sample("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),n.pattern="^["+n.currentLetter+"].*",n.newEntry={city:"",country:"",river:"",profession:""},n.loading=!1}function e(e){function i(){n.entries.push({city:c.city,country:c.country,river:c.river,profession:c.profession,points:10*s.a.sumBy(e,function(t){return t.body.data.correct?1:0})}),t()}function a(t){c[t.body.data.entity].examples=t.body.data.examples}function o(t){s.a.forEach(t,a),i()}var c=s.a.chain(e).map("body.data").keyBy("entity").value(),l=e.filter(function(t){return!t.body.data.correct});if(l.length){var u=l.map(function(t){return n.$http.get(""+n.baseUrl+t.body.data.entity+"_examples?letter="+n.currentLetter)});r.a.all(u).then(o)}else i()}var n=this;this.baseUrl="https://stadt-land-wikidata.fly.dev/";var i=[this.$http.get(n.baseUrl+"city?name="+this.newEntry.city),this.$http.get(n.baseUrl+"country?name="+this.newEntry.country),this.$http.get(n.baseUrl+"river?name="+this.newEntry.river),this.$http.get(n.baseUrl+"profession?name="+this.newEntry.profession)];this.loading=!0,r.a.all(i).then(e)},showExamples:function(t,e){var n={entity:t,index:e};this.visible=s.a.isEqual(this.visible,n)?{}:n}}}},80:function(t,e){},81:function(t,e){},86:function(t,e,n){n(81);var i=n(37)(n(43),n(88),"data-v-cc56619e",null);t.exports=i.exports},87:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{attrs:{id:"app"}},[t._m(0),t._v(" "),n("h1",{staticClass:"ui header"},[t._v("Stadt, Land, Wikidata!")]),t._v(" "),n("router-view")],1)},staticRenderFns:[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a",{attrs:{href:"https://github.com/k-nut/stadt-land-wikidata"}},[n("img",{staticStyle:{position:"absolute",top:"0",right:"0",border:"0"},attrs:{src:"https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67",alt:"Fork me on GitHub","data-canonical-src":"https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"}})])}]}},88:function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"game"},[n("div",{staticClass:"ui padded grid"},[n("div",{staticClass:"sixteen wide column"},[n("h2",[t._v(" Aktueller Buchstabe: "),n("b",[t._v(t._s(t.currentLetter))])])]),t._v(" "),n("div",{staticClass:"sixteen wide column"},[n("form",{attrs:{action:""},on:{submit:t.check}},[n("table",{staticClass:"ui celled table"},[t._m(0),t._v(" "),n("tbody",[t._l(t.entries,function(e,i){return n("tr",[t._l(["city","country","river","profession"],function(r){return n("td",[t._v("\n "+t._s(e[r].name)+"\n "),e[r].correct?n("a",{attrs:{href:e[r].link,target:"_blank"}},[n("i",{staticClass:"green checkmark icon"})]):n("div",[n("i",{staticClass:"red close icon"}),t._v(" "),n("a",{on:{click:function(e){t.showExamples(r,i)}}},[t._v("Beispiel anzeigen")]),t._v(" "),n("ul",{directives:[{name:"show",rawName:"v-show",value:t.visible.entity===r&&t.visible.index===i,expression:"visible.entity === entity && visible.index === index"}]},t._l(e[r].examples,function(e){return n("li",[n("a",{attrs:{href:e.item.value,target:"_blank"}},[t._v(t._s(e.itemLabel.value))])])}))])])}),t._v(" "),n("td",[t._v(t._s(e.points))])],2)}),t._v(" "),n("tr",[n("td",[n("div",{staticClass:"ui input"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.newEntry.city,expression:"newEntry.city"}],attrs:{type:"text",placeholder:"Stadt",pattern:t.pattern},domProps:{value:t.newEntry.city},on:{input:function(e){e.target.composing||t.$set(t.newEntry,"city",e.target.value)}}})])]),t._v(" "),n("td",[n("div",{staticClass:"ui input"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.newEntry.country,expression:"newEntry.country"}],attrs:{type:"text",placeholder:"Land",pattern:t.pattern},domProps:{value:t.newEntry.country},on:{input:function(e){e.target.composing||t.$set(t.newEntry,"country",e.target.value)}}})])]),t._v(" "),n("td",[n("div",{staticClass:"ui input"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.newEntry.river,expression:"newEntry.river"}],attrs:{type:"text",placeholder:"Fluss",pattern:t.pattern},domProps:{value:t.newEntry.river},on:{input:function(e){e.target.composing||t.$set(t.newEntry,"river",e.target.value)}}})])]),t._v(" "),n("td",[n("div",{staticClass:"ui input"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.newEntry.profession,expression:"newEntry.profession"}],attrs:{type:"text",placeholder:"Beruf",pattern:t.pattern},domProps:{value:t.newEntry.profession},on:{input:function(e){e.target.composing||t.$set(t.newEntry,"profession",e.target.value)}}})])]),t._v(" "),t._m(1)])],2),t._v(" "),n("tfoot",[n("tr",[n("th",{attrs:{colspan:"4"}}),t._v(" "),n("th",[t._v(t._s(t.totalPoints))])])])])])]),t._v(" "),t.loading?n("div",{staticClass:"ui active inverted dimmer"},[n("div",{staticClass:"ui loader"})]):t._e()])])},staticRenderFns:[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("thead",[n("tr",[n("th",[t._v("Stadt")]),t._v(" "),n("th",[t._v("Land")]),t._v(" "),n("th",[t._v("Fluss")]),t._v(" "),n("th",[t._v("Beruf")]),t._v(" "),n("th",[t._v("Punkte")])])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("td",[n("button",{staticClass:"ui green labeled icon button",attrs:{type:"submit"}},[n("i",{staticClass:"checkmark icon"}),t._v("\n Check\n ")])])}]}},92:function(t,e){}},[41]); 2//# sourceMappingURL=app.daf3dc4469ed1c1bdba1.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.