(function(g,c){g.ui=g.ui||{version:"2.0.3",guid:h,define:function(n,p,o){if(o){p.inherit=o}var m=g.ui[n]=d(function(r,q){var s=k(m.prototype,{_id:g.parsetpl(j,{name:n,id:h()})});s._createwidget.call(s,r,q,m.plugins);return s},p);return i(n,m)},iswidget:function(n,m){return n instanceof (m===c?l:g.ui[m]||f)}};var b=1,f=function(){},j="<%=name%>-<%=id%>",e="gmu-widget";function h(){return b++}function k(m,n){var o={};object.create?o=object.create(m):o.__proto__=m;return g.extend(o,n||{})}function d(m,n){if(n){a(m,n);g.extend(m.prototype,n)}return g.extend(m,{plugins:[],register:function(o){if(g.isobject(o)){g.extend(this.prototype,o);return}this.plugins.push(o)}})}function a(m,p){var n=p.inherit||l,o=n.prototype,q;q=m.prototype=k(o,{$factory:m,$super:function(r){var s=o[r];return g.isfunction(s)?s.apply(this,g.slice(arguments,1)):s}});q._data=g.extend({},o._data,p._data);delete p._data;return m}function i(m){g.fn[m]=function(p){var o,q,n=g.slice(arguments,1);g.each(this,function(r,s){q=g(s).data(e+m)||g.ui[m](s,g.extend(g.isplainobject(p)?p:{},{setup:true}));if(g.isstring(p)){o=g.isfunction(q[p])&&q[p].apply(q,n);if(p=="this"||o!==q&&o!==c){return false}o=null}});return o||(p=="this"?q:this)}}var l=function(){};g.extend(l.prototype,{_data:{status:true},data:function(m,o){var n=this._data;if(g.isobject(m)){return g.extend(n,m)}else{return !g.isundefined(o)?n[m]=o:n[m]}},_createwidget:function(o,q,m){if(g.isobject(o)){q=o||{};o=c}var r=g.extend({},this._data,q);g.extend(this,{_el:o?g(o):c,_data:r});var p=this;g.each(m,function(u,v){var s=v.apply(p);if(s&&g.isplainobject(s)){var t=p._data.disableplugin;if(!t||g.isstring(t)&&t.indexof(s.pluginname)==-1){delete s.pluginname;g.each(s,function(w,y){var x;if((x=p[w])&&g.isfunction(y)){p[w]=function(){p[w+"org"]=x;return y.apply(p,arguments)}}else{p[w]=y}})}}});if(r.setup){this._setup(o&&o.getattribute("data-mode"))}else{this._create()}this._init();var p=this,n=this.trigger("init").root();n.on("tap",function(s){(s.bubbleslist||(s.bubbleslist=[])).push(p)});n.data(e+this._id.split("-")[0],this)},_create:function(){},_setup:function(m){},root:function(m){return this._el=m||this._el},id:function(m){return this._id=m||this._id},destroy:function(){var m=this,n;g.each(this.data("components")||[],function(p,o){o.destroy()});n=this.trigger("destroy").off().root();n.find("*").off();n.removedata(e).off().remove();this.__proto__=null;g.each(this,function(o,p){delete m[o]})},component:function(m){var n=this.data("components")||this.data("components",[]);try{n.push(g.isfunction(m)?m.apply(this):m)}catch(o){}return this},on:function(m,n){this.root().on(m,g.proxy(n,this));return this},off:function(m,n){this.root().off(m,n);return this},trigger:function(n,o){n=g.isstring(n)?g.event(n):n;var p=this.data(n.type),m;if(p&&g.isfunction(p)){n.data=o;m=p.apply(this,[n].concat(o));if(m===false||n.defaultprevented){return this}}this.root().trigger(n,o);return this}})})(zepto);