(this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[]).push([[0],{17:function(e,t,n){e.exports={poButton:"style_poButton__3x8Ka"}},18:function(e,t,n){e.exports=n(26)},26:function(e,t,n){"use strict";n.r(t);var o=n(8),s=n.n(o),i=n(15),a=n.n(i),r=n(6),l=n(0),c=n(1),u=n(2),p=n(3),d=n(13),m=n(17),f=n.n(m),y=function(e){Object(u.a)(n,e);var t=Object(p.a)(n);function n(e){var o;Object(l.a)(this,n),(o=t.call(this,e)).render=function(){return s.a.createElement("span",null,s.a.createElement("button",{className:f.a.poButton,onClick:o._onClicked,disabled:o.props.disabled,onFocus:o._onFocus,onBlur:o._onBlur},s.a.createElement("span",null,s.a.createElement("img",{style:{margin:"0px 3px 2px 0px"},src:"./img/pollination.png",alt:"logo"})),"Get ",o.state.isPollinationModel?"Pollination Model":"Geometry",Boolean(o.props.args.syncToken)&&" (Sync)"))},o._setStateNow=function(e){o.setState((function(t){return Object(r.a)(Object(r.a)({},t),{},{geometry:e.geometry,identifier:e.identifier,isPollinationModel:e.isPollinationModel,syncToken:e.syncToken})}),(function(){return d.a.setComponentValue(o.state.geometry)})),console.log("[POLLINATION-DEBUG]: JSON string sent.")},o._dotNetRun=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("undefined"!=typeof window.parent.chrome){if("undefined"==typeof window.parent.chrome.webview)return console.log("[POLLINATION-DEBUG]: webview not found."),o.state;var t=null;if(null==(t=o.props.args.isPollinationModel?window.parent.chrome.webview.hostObjects.sync.hbjson.PassPollinationModel(e):window.parent.chrome.webview.hostObjects.sync.geometry.PassJsonGeometry(o.props.args.key,e)))return o.state;var n={geometry:t.Geometry,identifier:t.Identifier,isPollinationModel:o.props.args.isPollinationModel,syncToken:o.props.args.syncToken};return n}return console.log("[POLLINATION-DEBUG]: chrome not found."),o.state},o._onClicked=function(){var e=o._dotNetRun(!0);o._setStateNow(e)},o._onFocus=function(){o.setState({isFocused:!0})},o._onBlur=function(){o.setState({isFocused:!1})};var i={geometry:"",identifier:"",isPollinationModel:o.props.args.isPollinationModel};return o.state=Object(r.a)({},i),o}return Object(c.a)(n,[{key:"componentDidUpdate",value:function(){if(""!==this.state.identifier&&this.props.args.syncToken!==this.state.syncToken){var e=JSON.parse(this.state.identifier);if(e){var t=this.props.args.syncToken.split(":",1)[0];if(e.includes(t)&&this.state.syncToken!==this.props.args.syncToken){var n=this._dotNetRun();this._setStateNow(n),console.log("[POLLINATION-DEBUG]: auto-update.")}}}}}]),n}(d.b),g=Object(d.c)(y);a.a.render(s.a.createElement(s.a.StrictMode,null,s.a.createElement(g,null)),document.getElementById("root"))}},[[18,1,2]]]);
//# sourceMappingURL=main.b26eb8dd.chunk.js.map