//>>built
define("dijit/layout/utils",["dojo/_base/array","dojo/dom-class","dojo/dom-geometry","dojo/dom-style","dojo/_base/lang"],function(p,q,l,r,g){function t(c,a){var e=c.resize?c.resize(a):l.setMarginBox(c.domNode,a);e?g.mixin(c,e):(g.mixin(c,l.getMarginBox(c.domNode)),g.mixin(c,a))}var u={marginBox2contentBox:function(c,a){var e=r.getComputedStyle(c),h=l.getMarginExtents(c,e),m=l.getPadBorderExtents(c,e);return{l:r.toPixelValue(c,e.paddingLeft),t:r.toPixelValue(c,e.paddingTop),w:a.w-(h.w+m.w),h:a.h-(h.h+
m.h)}},layoutChildren:function(c,a,e,h,m){a=g.mixin({},a);q.add(c,"dijitLayoutContainer");e=p.filter(e,function(b){return"center"!=b.region&&"client"!=b.layoutAlign}).concat(p.filter(e,function(b){return"center"==b.region||"client"==b.layoutAlign}));p.forEach(e,function(b){var f=b.domNode,d=b.region||b.layoutAlign;if(!d)throw Error("No region setting for "+b.id);var k=f.style;k.left=a.l+"px";k.top=a.t+"px";k.position="absolute";var v=q.add;var n=d;n=n.substring(0,1).toUpperCase()+n.substring(1);v.call(q,
f,"dijitAlign"+n);f={};h&&h==b.id&&(f["top"==b.region||"bottom"==b.region?"h":"w"]=m);"leading"==d&&(d=b.isLeftToRight()?"left":"right");"trailing"==d&&(d=b.isLeftToRight()?"right":"left");"top"==d||"bottom"==d?(f.w=a.w,t(b,f),a.h-=b.h,"top"==d?a.t+=b.h:k.top=a.t+a.h+"px"):"left"==d||"right"==d?(f.h=a.h,t(b,f),a.w-=b.w,"left"==d?a.l+=b.w:k.left=a.l+a.w+"px"):"client"!=d&&"center"!=d||t(b,a)})}};g.setObject("dijit.layout.utils",u);return u});