System.register(["./p-24afd2bd.system.js","./p-71a7e6d9.system.js"],(function(t){"use strict";var e,o,n,l,i,r,a;return{setters:[function(t){e=t.r;o=t.f;n=t.h;l=t.c;i=t.e},function(t){r=t.c;a=t.i}],execute:function(){var s="application/vnd.plotly.v1+json";var d=".sc-stencila-image-plotly-default-h{display:block}.sc-stencila-image-plotly-default-h.imgHidden.sc-stencila-image-plotly-default-s>picture>:not(.js-plotly-plot){display:none}";var p=".sc-stencila-image-plotly-material-h{display:block}.sc-stencila-image-plotly-material-h.imgHidden.sc-stencila-image-plotly-material-s>picture>:not(.js-plotly-plot){display:none}";var c="https://cdn.plot.ly/plotly-latest.min.js";var u;var y=t("stencila_image_plotly",function(){function t(t){var n=this;e(this,t);this.plotlyLoad=o(this,"stencila-plotly-load",7);this.plotIsRendered=false;this.renderPlot=function(){var t,e,o;var l=(t=n.getPlotContent())!==null&&t!==void 0?t:{},i=l.data,a=l.layout,s=a===void 0?n.layout:a,d=l.config,p=d===void 0?n.config:d;if(!i)return;n.plotContainer=(e=n.plotContainer)!==null&&e!==void 0?e:r(n.el);(o=window.Plotly)===null||o===void 0?void 0:o.react(n.plotContainer,i,s,p).then((function(){if(!n.plotIsRendered){n.plotIsRendered=true}})).catch((function(t){console.error("Failed to render plot",t)}))};this.getPlotContent=function(){if(n.data){return{data:n.data,layout:n.layout,config:n.config}}var t=n.el.querySelector('[type="'+s+'"]');if(t){try{var e=t.textContent;var o=JSON.parse(e!==null&&e!==void 0?e:"");return Array.isArray(o)?{data:o}:o}catch(l){console.error("Could not parse plot data")}}return undefined}}t.prototype.onPlotlyLoad=function(){if(!this.plotIsRendered){this.renderPlot()}};t.prototype.componentWillLoad=function(){var t=this;if(!this.plotIsRendered&&u){this.renderPlot()}else{a({src:c,onLoad:function(){u=true;t.plotlyLoad.emit()}})}};t.prototype.componentShouldUpdate=function(t,e,o){if(o==="plotIsRendered"&&e===t){return false}return true};t.prototype.componentWillUpdate=function(){this.renderPlot()};t.prototype.render=function(){return n(i,{class:{imgHidden:this.plotIsRendered}})};Object.defineProperty(t.prototype,"el",{get:function(){return l(this)},enumerable:false,configurable:true});return t}());y.style={default:d,material:p}}}}));
//# sourceMappingURL=p-e9b4cfcd.system.entry.js.map