//>>built
define("dojox/mobile/Accordion","dojo/_base/array,dojo/_base/declare,dojo/_base/lang,dojo/_base/sniff,dojo/dom,dojo/dom-class,dojo/dom-construct,dijit/_Contained,dijit/_Container,dijit/_WidgetBase,./iconUtils,./lazyLoadUtils,require".split(","),function(c,f,i,l,m,d,g,j,n,h,o,p){var k=f([h,j],{label:"Label",icon1:"",icon2:"",iconPos1:"",iconPos2:"",selected:!1,baseClass:"mblAccordionTitle",buildRendering:function(){this.inherited(arguments);var a=this.anchorNode=g.create("a",{className:"mblAccordionTitleAnchor"},
this.domNode);a.href="javascript:void(0)";this.textBoxNode=g.create("div",{className:"mblAccordionTitleTextBox"},a);this.labelNode=g.create("span",{className:"mblAccordionTitleLabel",innerHTML:this._cv?this._cv(this.label):this.label},this.textBoxNode);this._isOnLine=this.inheritParams()},postCreate:function(){this._clickHandle=this.connect(this.domNode,"onclick","_onClick");m.setSelectable(this.domNode,!1)},inheritParams:function(){var a=this.getParent();if(a){if(this.icon1&&a.iconBase&&"/"===a.iconBase.charAt(a.iconBase.length-
1))this.icon1=a.iconBase+this.icon1;if(!this.icon1)this.icon1=a.iconBase;if(!this.iconPos1)this.iconPos1=a.iconPos;if(this.icon2&&a.iconBase&&"/"===a.iconBase.charAt(a.iconBase.length-1))this.icon2=a.iconBase+this.icon2;if(!this.icon2)this.icon2=a.iconBase||this.icon1;if(!this.iconPos2)this.iconPos2=a.iconPos||this.iconPos1}return!!a},_setIcon:function(a,b){this.getParent()&&(this._set("icon"+b,a),this["iconParentNode"+b]||(this["iconParentNode"+b]=g.create("div",{className:"mblAccordionIconParent mblAccordionIconParent"+
b},this.anchorNode,"first")),this["iconNode"+b]=o.setIcon(a,this["iconPos"+b],this["iconNode"+b],this.alt,this["iconParentNode"+b]),this["icon"+b]=a,d.toggle(this.domNode,"mblAccordionHasIcon",a&&"none"!==a))},_setIcon1Attr:function(a){this._setIcon(a,1)},_setIcon2Attr:function(a){this._setIcon(a,2)},startup:function(){this._started||(this._isOnLine||this.inheritParams(),this._isOnLine||this.set({icon1:this.icon1,icon2:this.icon2}),this.inherited(arguments))},_onClick:function(a){!1!==this.onClick(a)&&
(a=this.getParent(),!a.fixedHeight&&"none"!==this.contentWidget.domNode.style.display?a.collapse(this.contentWidget,!a.animation):a.expand(this.contentWidget,!a.animation))},onClick:function(){},_setSelectedAttr:function(a){d.toggle(this.domNode,"mblAccordionTitleSelected",a);this._set("selected",a)}}),f=f("dojox.mobile.Accordion",[h,n,j],{iconBase:"",iconPos:"",fixedHeight:!1,singleOpen:!1,animation:!0,roundRect:!1,duration:0.3,baseClass:"mblAccordion",_openSpace:1,startup:function(){if(!this._started){d.contains(this.domNode,
"mblAccordionRoundRect")?this.roundRect=!0:this.roundRect&&d.add(this.domNode,"mblAccordionRoundRect");if(this.fixedHeight)this.singleOpen=!0;var a=this.getChildren();c.forEach(a,this._setupChild,this);var b;c.forEach(a,function(a){a.startup();a._at.startup();this.collapse(a,!0);a.selected&&(b=a)},this);!b&&this.fixedHeight&&(b=a[a.length-1]);b?this.expand(b,!0):this._updateLast();setTimeout(i.hitch(this,function(){this.resize()}),0);this._started=!0}},_setupChild:function(a){if("hidden"!=a.domNode.style.overflow)a.domNode.style.overflow=
this.fixedHeight?"auto":"hidden";a._at=new k({label:a.label,alt:a.alt,icon1:a.icon1,icon2:a.icon2,iconPos1:a.iconPos1,iconPos2:a.iconPos2,contentWidget:a});g.place(a._at.domNode,a.domNode,"before");d.add(a.domNode,"mblAccordionPane")},addChild:function(a,b){this.inherited(arguments);this._started&&(this._setupChild(a),a._at.startup(),a.selected?(this.expand(a,!0),setTimeout(function(){a.domNode.style.height=""},0)):this.collapse(a))},removeChild:function(a){"number"==typeof a&&(a=this.getChildren()[a]);
a&&a._at.destroy();this.inherited(arguments)},getChildren:function(){return c.filter(this.inherited(arguments),function(a){return!(a instanceof k)})},getSelectedPanes:function(){return c.filter(this.getChildren(),function(a){return"none"!=a.domNode.style.display})},resize:function(){if(this.fixedHeight){var a=c.filter(this.getChildren(),function(a){return"none"!=a._at.domNode.style.display}),b=this.domNode.clientHeight;c.forEach(a,function(a){b-=a._at.domNode.offsetHeight});this._openSpace=0<b?b:
0;a=this.getSelectedPanes()[0];a.domNode.style.webkitTransition="";a.domNode.style.height=this._openSpace+"px"}},_updateLast:function(){var a=this.getChildren();c.forEach(a,function(b,c){d.toggle(b._at.domNode,"mblAccordionTitleLast",c===a.length-1&&!d.contains(b._at.domNode,"mblAccordionTitleSelected"))},this)},expand:function(a,b){if(a.lazy)p.instantiateLazyWidgets(a.containerNode,a.requires),a.lazy=!1;var d=this.getChildren();c.forEach(d,function(e){e.domNode.style.webkitTransition=b?"":"height "+
this.duration+"s linear";if(e===a){e.domNode.style.display="";var c;if(this.fixedHeight)c=this._openSpace;else if(c=parseInt(e.height||e.domNode.getAttribute("height")),!c)e.domNode.style.height="",c=e.domNode.offsetHeight,e.domNode.style.height="0px";setTimeout(function(){e.domNode.style.height=c+"px"},0);this.select(a)}else this.singleOpen&&this.collapse(e,b)},this);this._updateLast()},collapse:function(a,b){if("none"!==a.domNode.style.display){a.domNode.style.webkitTransition=b?"":"height "+this.duration+
"s linear";a.domNode.style.height="0px";if(!l("webkit")||b)a.domNode.style.display="none",this._updateLast();else{var c=this;setTimeout(function(){a.domNode.style.display="none";c._updateLast();if(!c.fixedHeight&&c.singleOpen)for(var b=c.getParent();b;b=b.getParent())if(d.contains(b.domNode,"mblView")){b&&b.resize&&b.resize();break}},1E3*this.duration)}this.deselect(a)}},select:function(a){a._at.set("selected",!0)},deselect:function(a){a._at.set("selected",!1)}});f.ChildWidgetProperties={alt:"",label:"",
icon1:"",icon2:"",iconPos1:"",iconPos2:"",selected:!1,lazy:!1};i.extend(h,f.ChildWidgetProperties);return f});