/*! For license information please see dll.Wikipedia.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[150],{3308:function(e,t,n){"use strict";n.r(t);var i=n(22),a=n.n(i),r=n(3309),s={insert:"head",singleton:!1};a()(r.default,s);t.default=r.default.locals||{}},3309:function(e,t,n){"use strict";n.r(t);var i=n(23),a=n.n(i)()(!1);a.push([e.i,".wikipedia {\n\twidth: 100%;\n\theight: auto;\n\tmargin-top: 30px;\n}\n\n.wikipedia-result {\n\tmargin-top: 0px;\n\tmargin-bottom: 20px;\n\twidth: 95.3%;\n\theight: auto;\n\tbox-shadow: 2px 2px 5px darkgray;\n}\n\n.wikipedia-separator {\n\theight: 100px;\n}\n\n.wikipedia-logo {\n\twidth: 80px;\n\theight: 80px;\n\tfloat: left;\n\ttext-align: center;\n\tcursor: pointer;\n\tmargin-left: 20px;\n\tmargin-top: -20px;\n\tbackground-image: url('https://upload.wikimedia.org/wikipedia/commons/thumb/d/de/Wikipedia_Logo_1.0.png/220px-Wikipedia_Logo_1.0.png');\n\tbackground-size: 80px 100%;\n\tborder-radius: 50%;\n\topacity: 0.8;\n\tborder-color: transparent;\n}\n\n.wikipedia-logo:hover {\n\topacity: 1;\n}\n",""]),t.default=a},944:function(e,t,n){"use strict";n.r(t);var i=n(14),a=n.n(i),r=n(12),s=n.n(r),o=n(10),u=n.n(o),l=n(15),c=n.n(l),p=n(16),d=n.n(p),h=n(8),f=n.n(h),g=n(7),k=n.n(g),m=n(0),w=n.n(m),v=n(1),b=n.n(v),x=n(219),y=n(38),R=n.n(y),F=n(36);n(3308);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=f()(e);if(t){var a=f()(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return d()(this,n)}}var _=R()("isle:wikipedia"),E=function(e){c()(n,e);var t=S(n);function n(e){var i;return a()(this,n),i=t.call(this,e),k()(u()(i),"getResult",(function(e){var t="about";switch(i.props.language){case"en-US":t="about";break;case"de-DE":t="über";break;case"fr-FR":t="sur";break;default:t="about"}var n=e.search(t);if(-1!==n){_("Found a marker..."),n+=t.length+1;var a=e.substring(n,e.length);i.wikipediaIFrame(a)}else _("Marker not found, use entire text..."),i.wikipediaIFrame(e)})),k()(u()(i),"handleClick",(function(){i.getResult(i.state.text)})),k()(u()(i),"changeVoiceHandler",(function(e){i.setState({text:e})})),i.state={text:"",response:""},i}return s()(n,[{key:"trigger",value:function(e){this.getResult(e)}},{key:"wikipediaIFrame",value:function(e){this.setState({response:this.setIFrame(e)})}},{key:"setIFrame",value:function(e){_("Sets the iFrame: "+e),e=e.replace(" ","_");var t="en";switch(this.props.language){case"en-US":t="en";break;case"de-DE":t="de";break;case"fr-FR":t="fr";break;default:t="en"}return"https://"+t+".wikipedia.org/wiki/"+e}},{key:"renderSpeech",value:function(){if(!this.props.invisible)return w.a.createElement(x.default,{style:{float:"left"},language:this.props.language,onChange:this.changeVoiceHandler,onSubmit:this.getResult,onFinalText:this.getResult})}},{key:"renderLogo",value:function(){if(!this.props.invisible)return w.a.createElement("button",{onClick:this.handleClick,className:"wikipedia-logo"})}},{key:"renderResult",value:function(){return""===this.state.response?null:w.a.createElement("div",{className:"wikipedia-result"},w.a.createElement("iframe",{title:"Wikipedia Page",src:this.state.response,width:"100%",height:600}))}},{key:"render",value:function(){return w.a.createElement("div",{className:"wikipedia"},this.renderSpeech(),this.renderLogo(),w.a.createElement("div",{className:"wikipedia-separator"}),this.renderResult())}}]),n}(m.Component);E.defaultProps={invisible:!1,language:"en-US"},E.propTypes={invisible:b.a.bool,language:b.a.string},E.contextType=F.default,t.default=E}}]);