!function(t){function i(n){if(e[n])return e[n].exports;var s=e[n]={exports:{},id:n,loaded:!1};return t[n].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}var e={};return i.m=t,i.c=e,i.p="",i(0)}([function(t,i){t.exports={el:"#widget-edit",mixins:[window.Widgets],data:function(){return _.merge({form:{},sections:[],active:0},window.$data)},created:function(){var t,i=[],e=_.kebabCase(this.widget.type);_.forIn(this.$options.components,function(t,e){var n=t.options||{};n.section&&i.push(_.extend({name:e,priority:0},n.section))}),i=_.sortBy(i.filter(function(n){return t=n.name.match("(.+):(.+)"),null===t?!_.find(i,{name:e+":"+n.name}):t[1]==e},this),"priority"),this.$set("sections",i)},ready:function(){var t=UIkit.tab(this.$els.tab,{connect:this.$els.content}),i=this;if(t.on("change.uk.tab",function(t,e){i.active=e.index()}),this.$watch("active",function(i){t.switcher.show(i)}),this.$state("active"),!this.widget.id){var e=new RegExp("[?&]position=([^&]*)").exec(location.search);this.widget.position=e&&decodeURIComponent(e[1].replace(/\+/g," "))||""}},methods:{save:function(){this.$broadcast("save",{widget:this.widget}),this.$resource("api/site/widget{/id}").save({id:this.widget.id},{widget:this.widget}).then(function(t){var i=t.data;this.$dispatch("saved"),this.widget.id||window.history.replaceState({},"",this.$url.route("admin/site/widget/edit",{id:i.widget.id})),this.$set("widget",i.widget),this.$notify("Widget saved.")},function(t){this.$notify(t.data,"danger")})},cancel:function(){this.$dispatch("cancel")}}},Vue.ready(t.exports)}]);