//>>built
define("mill/jssupport/jsApplication/controlSet/ControlSet","dojo/_base/declare dojo/_base/lang dojo/_base/array dijit/registry dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/_Container mill/jssupport/jsApplication/controls/fileEditor/FileEditor mill/jssupport/jsApplication/controls/editorControl/EditorControl mill/jssupport/jsApplication/controls/treeSelect/TreeSelectWidget mill/jssupport/jsApplication/controlSet/_ControlSetFullScreenModeMixin mill/jssupport/_TranslationMixin".split(" "),
function(p,g,e,q,r,t,u,v,k,w,x,y,z){return mill.registerAlias("app.view.ControlSet",p("mill.jssupport.jsApplication.controlSet.ControlSet",[r,t,u,v,y,z],{controlSetID:null,controlNames:null,controlWidgets:null,idPostfix:null,closeIconNode:null,postMixInProperties:function(){this.inherited(arguments);"string"===typeof this.controlNames&&(this.controlNames=this.controlNames.split(","));g.isFunction(this.id)&&(this.id=this.id());var c=this.id.match(/_\d+$/);this.idPostfix=c?c[0]:""},_getControlWidgetsAttr:function(){return function(){g.isArray(this.controlWidgets)||
(this.controlWidgets=e.map(this.controlNames,function(c){return q.byId(c+this.idPostfix)},this));return this.controlWidgets}}(),initControls:function(){},_onInit:function(){window.app.preventSelfInvoking(function(){this.onInit.apply(this,this.get("controlWidgets"))}.bind(this))},onInit:function(){},_onChange:function(c,b,a){window.app.preventSelfInvoking(function(){this.onChange.apply(this,[c,b,a].concat(this.get("controlWidgets")))}.bind(this))},onChange:function(){},_onValidate:function(){return window.app.preventSelfInvoking(function(){var c=
this.onValidate.apply(this,this.get("controlWidgets"));c&&e.forEach(window.app.getControlNestedControlSetGroup(this),function(b){e.forEach(window.app.getControlNestedControlSet(b),function(a){a.onValidate.apply(a,a.get("controlWidgets"))||(c=!1)})});return c}.bind(this))},onValidate:function(){},_onSaveData:function(){return window.app.preventSelfInvoking(function(){return this.onSaveData.apply(this,this.get("controlWidgets"))}.bind(this))},onSaveData:function(){},_onTranslate:function(){window.app.preventSelfInvoking(function(){this.onTranslate.apply(this,
this.get("controlWidgets"))}.bind(this))},onTranslate:function(){},startup:function(){this.inherited(arguments);var c=this.get("controlWidgets");this.initControls.apply(this,c);var b=this;e.forEach(c,function(a){if(a.isInstanceOf(w)||a.isInstanceOf(x))dojo.connect(a,"onChange",function(d){b._onChange(a,"undefined",d)});else{var f=["value","checked","text"];a.isInstanceOf(k)&&(f=["fileName"]);e.forEach(f,function(d){a.watch(d,function(h,l,m){b._onChange(a,l,m);("value"===d||"checked"===d||"fileName"===
d)&&(g.isFunction(a.isValid)&&a.isValid()||a.isInstanceOf(k))&&window.app.validateWidgets(a)})});a.watch("disabled",function(){var d=window.app.getControlField(a),h=a.get("required");return function(l,m,n){d&&d.set("required",n?!1:h);a.set("required",n?!1:h)}}())}});this.initWidget();this.fullScreenMode&&this.initFullScreenMode()},initWidget:function(){this._onInit();this._onChange(null,null,null);e.forEach(window.app.getControlNestedControlSetGroup(this),function(c){e.forEach(window.app.getControlNestedControlSet(c),
function(b){b.initWidget.bind(b)()})})},translate:function(){this.inherited(arguments);var c=this.get("controlWidgets");this._onTranslate();e.forEach(c,function(b){if(b.get("store")){var a=b.get("value");if(a){var f={};f[b.store.idProperty]=parseInt(a,10);(a=b.store.query(f)[0])&&(a.hasOwnProperty(b.searchAttr)?b.set("value",a[b.searchAttr]?b.get("value"):""):b.set("value",""))}}});e.forEach(window.app.getControlNestedControlSetGroup(this),function(b){if(!b.get("changeMode")){var a=[];e.forEach(b.getChildren(),
function(f){f.hasOwnProperty("savedValueNode")&&a.push(f);f.getChildren()&&f.getChildren().length&&e.forEach(f.getChildren(),function(d){d.hasOwnProperty("savedValueNode")&&a.push(d)})});window.app.hideForValue(a)}})},destroyRecursive:function(){var c=window.app.getControlParentControlSet(this);this.inherited(arguments);c&&c._onChange(null,null,null)}}))});