//>>built
define("dojox/form/uploader/_Flash","dojo/dom-form dojo/dom-style dojo/dom-construct dojo/dom-attr dojo/_base/declare dojo/_base/config dojo/_base/connect dojo/_base/lang dojo/_base/array dojox/embed/Flash".split(" "),function(r,g,h,k,l,m,n,d,p,q){return l("dojox.form.uploader._Flash",[],{swfPath:m.uploaderPath||require.toUrl("dojox/form/resources/uploader.swf"),preventCache:!0,skipServerCheck:!0,serverTimeout:2E3,isDebug:!1,devMode:!1,deferredUploading:0,postMixInProperties:function(){"flash"===
this.uploadType&&(this._files=[],this._fileMap={},this._createInput=this._createFlashUploader,this.getFileList=this.getFlashFileList,this.reset=this.flashReset,this.upload=this.uploadFlash,this.fieldname="flashUploadFiles");this.inherited(arguments)},onReady:function(a){},onLoad:function(a){},onFileChange:function(a){},onFileProgress:function(a){},getFlashFileList:function(){return this._files},flashReset:function(){this.flashMovie.reset();this._files=[];this._fileMap={}},uploadFlash:function(a){this.onBegin(this.getFileList());
a=a||{};a.returnType="F";a.uploadType=this.uploadType;this.flashMovie.doUpload(a)},_change:function(a){this._files=this._files.concat(a);p.forEach(a,function(b){b.bytesLoaded=0;b.bytesTotal=b.size;this._fileMap[b.name+"_"+b.size]=b},this);this.onChange(this._files);this.onFileChange(a)},_complete:function(a){this._getCustomEvent().type="load";this.onComplete(a)},_progress:function(a){this._fileMap[a.name+"_"+a.bytesTotal].bytesLoaded=a.bytesLoaded;var b=this._getCustomEvent();this.onFileProgress(a);
this.onProgress(b)},_error:function(a){this.onError(a)},_onFlashBlur:function(a){},_getCustomEvent:function(){var a={bytesLoaded:0,bytesTotal:0,type:"progress",timeStamp:(new Date).getTime()},b;for(b in this._fileMap)a.bytesTotal+=this._fileMap[b].bytesTotal,a.bytesLoaded+=this._fileMap[b].bytesLoaded;a.decimal=a.bytesLoaded/a.bytesTotal;a.percent=Math.ceil(a.bytesLoaded/a.bytesTotal*100)+"%";return a},_connectFlash:function(){this._subs=[];this._cons=[];var a=d.hitch(this,function(b,c){this._subs.push(n.subscribe(this.id+
b,this,c))});a("/filesSelected","_change");a("/filesUploaded","_complete");a("/filesProgress","_progress");a("/filesError","_error");a("/filesCanceled","onCancel");a("/stageBlur","_onFlashBlur");this.connect(this.domNode,"focus",function(){this.flashMovie.focus();this.flashMovie.doFocus()});0<=this.tabIndex&&k.set(this.domNode,"tabIndex",this.tabIndex)},_createFlashUploader:function(){var a=this.btnSize.w,b=this.btnSize.h;if(a){var c=this.getUrl();if(c&&0>c.toLowerCase().indexOf("http")&&0!=c.indexOf("/")){var e=
window.location.href.split("/");e.pop();e=e.join("/")+"/";c=e+c}this.inputNode=h.create("div",{className:"dojoxFlashNode"},this.domNode,"first");g.set(this.inputNode,{position:"absolute",top:"-2px",width:a+"px",height:b+"px",opacity:0});a={expressInstall:!0,path:(this.swfPath.uri||this.swfPath)+(this.preventCache?"?cb_"+(new Date).getTime():""),width:a,height:b,allowScriptAccess:"always",allowNetworking:"all",vars:{uploadDataFieldName:this.flashFieldName||this.name+"Flash",uploadUrl:c,uploadOnSelect:this.uploadOnSelect,
deferredUploading:this.deferredUploading||0,selectMultipleFiles:this.multiple,id:this.id,isDebug:this.isDebug,noReturnCheck:this.skipServerCheck,serverTimeout:this.serverTimeout},params:{scale:"noscale",wmode:"opaque",allowScriptAccess:"always",allowNetworking:"all"}};this.flashObject=new q(a,this.inputNode);this.flashObject.onError=d.hitch(function(f){});this.flashObject.onReady=d.hitch(this,function(){this.onReady(this)});this.flashObject.onLoad=d.hitch(this,function(f){this.flashMovie=f;this.flashReady=
!0;this.onLoad(this)});this._connectFlash()}else setTimeout(dojo.hitch(this,function(){this._getButtonStyle(this.domNode);this._createFlashUploader()}),200)}})});