(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1184:function(t,e,i){"use strict";i.r(e),i.d(e,"vegaLiteSchema",(function(){return s}));var a=function(){var t=this.$createElement,e=this._self._c||t;return e("div",[this.specValidation.valid?e("div",{attrs:{id:this.id}}):!1===this.specValidation.valid?e("p",[this._v("Invalid Vega-Lite specification.")]):this._e()])};a._withStripped=!0;var s=i(408),n=i(1140),c=i(337),p=i(744),o={data:()=>({id:"vega-lite",specValidation:{}}),props:{spec:{type:Object,default:()=>null},dataname:{type:String,default:()=>null},data:{type:Array,default:()=>null}},created(){this.onSpecChange=Object(c.a)(this.processSpec,300),this.onSpecChange()},methods:{async plotSpec(){if(!document.body.contains(this.$el))return;const t=await Object(n.a)("#"+this.id,this.spec,{});if(this.data){const e=this.dataname||((this.spec||{}).data||{}).name||"source";t.view.insert(e,this.data).resize().run()}this.$emit("new-vega-view",t.view)},validateSpec(){const t=Object(p.validate)(this.spec,s);t.valid?console.debug("spec checks out",t):console.warn("Invalid spec",t),this.specValidation=t},processSpec(){this.validateSpec(),this.specValidation.valid&&this.plotSpec()}},watch:{spec(){this.onSpecChange()}}},l=i(1),d=Object(l.a)(o,a,[],!1,null,null,null);d.options.__file="js/whyis_vue/components/vega-lite-wrapper.vue";e.default=d.exports},337:function(t,e,i){"use strict";function a(t,e){let i;return function(...a){clearTimeout(i),i=setTimeout(()=>t.apply(this,a),e)}}i.d(e,"a",(function(){return a}))}}]);