File manager - Edit - /home/jardides/www/Jardi-design/j37/plugins/fabrik_element/fileupload/lib/plupload/js/plupload.full-min.js
Back
/*! Fabrik */ !function(){function a(){this.returnValue=!1}function b(){this.cancelBubble=!0}var c,d,e=0,f=[],g={},h={},i={"<":"lt",">":"gt","&":"amp",'"':"quot","'":"#39"},j=/[<>&\"\']/g,k=window.setTimeout,l={};!function(a){var b,c,d,e=a.split(/,/);for(b=0;b<e.length;b+=2)for(d=e[b+1].split(/ /),c=0;c<d.length;c++)h[d[c]]=e[b]}("application/msword,doc dot,application/pdf,pdf,application/pgp-signature,pgp,application/postscript,ps ai eps,application/rtf,rtf,application/vnd.ms-excel,xls xlb,application/vnd.ms-powerpoint,ppt pps pot,application/zip,zip,application/x-shockwave-flash,swf swfl,application/vnd.openxmlformats,docx pptx xlsx,audio/mpeg,mpga mpega mp2 mp3,audio/x-wav,wav,audio/mp4,m4a,image/bmp,bmp,image/gif,gif,image/jpeg,jpeg jpg jpe,image/photoshop,psd,image/png,png,image/svg+xml,svg svgz,image/tiff,tiff tif,text/html,htm html xhtml,text/rtf,rtf,video/mpeg,mpeg mpg mpe,video/quicktime,qt mov,video/mp4,mp4,video/x-m4v,m4v,video/x-flv,flv,video/x-ms-wmv,wmv,video/avi,avi,video/webm,webm,video/vnd.rn-realvideo,rv,text/csv,csv,text/plain,asc txt text diff log,application/octet-stream,exe");var m={VERSION:"1.5.1.1",STOPPED:1,STARTED:2,QUEUED:1,UPLOADING:2,FAILED:4,DONE:5,GENERIC_ERROR:-100,HTTP_ERROR:-200,IO_ERROR:-300,SECURITY_ERROR:-400,INIT_ERROR:-500,FILE_SIZE_ERROR:-600,FILE_EXTENSION_ERROR:-601,IMAGE_FORMAT_ERROR:-700,IMAGE_MEMORY_ERROR:-701,IMAGE_DIMENSIONS_ERROR:-702,mimeTypes:h,ua:function(){var a,b,c,d=navigator,e=d.userAgent,f=d.vendor;return a=/WebKit/.test(e),c=a&&-1!==f.indexOf("Apple"),b=window.opera&&window.opera.buildNumber,{windows:-1!==navigator.platform.indexOf("Win"),ie:!a&&!b&&/MSIE/gi.test(e)&&/Explorer/gi.test(d.appName),webkit:a,gecko:!a&&/Gecko/.test(e),safari:c,opera:!!b}}(),extend:function(a){return m.each(arguments,function(b,c){c>0&&m.each(b,function(b,c){a[c]=b})}),a},cleanName:function(a){var b,c;for(c=[/[\300-\306]/g,"A",/[\340-\346]/g,"a",/\307/g,"C",/\347/g,"c",/[\310-\313]/g,"E",/[\350-\353]/g,"e",/[\314-\317]/g,"I",/[\354-\357]/g,"i",/\321/g,"N",/\361/g,"n",/[\322-\330]/g,"O",/[\362-\370]/g,"o",/[\331-\334]/g,"U",/[\371-\374]/g,"u"],b=0;b<c.length;b+=2)a=a.replace(c[b],c[b+1]);return a=a.replace(/\s+/g,"_"),a=a.replace(/[^a-z0-9_\-\.]+/gi,"")},addRuntime:function(a,b){return b.name=a,f[a]=b,f.push(b),b},guid:function(){var a,b=(new Date).getTime().toString(32);for(a=0;5>a;a++)b+=Math.floor(65535*Math.random()).toString(32);return(m.guidPrefix||"p")+b+(e++).toString(32)},buildUrl:function(a,b){var c="";return m.each(b,function(a,b){c+=(c?"&":"")+encodeURIComponent(b)+"="+encodeURIComponent(a)}),c&&(a+=(a.indexOf("?")>0?"&":"?")+c),a},each:function(a,b){var d,e,f;if(a)if(d=a.length,d===c){for(e in a)if(a.hasOwnProperty(e)&&b(a[e],e)===!1)return}else for(f=0;d>f;f++)if(b(a[f],f)===!1)return},formatSize:function(a){return a===c||/\D/.test(a)?m.translate("N/A"):a>1073741824?Math.round(a/1073741824,1)+" GB":a>1048576?Math.round(a/1048576,1)+" MB":a>1024?Math.round(a/1024,1)+" KB":a+" b"},getPos:function(a,b){function c(a){var b,c,d=0,e=0;return a&&(c=a.getBoundingClientRect(),b="CSS1Compat"===i.compatMode?i.documentElement:i.body,d=c.left+b.scrollLeft,e=c.top+b.scrollTop),{x:d,y:e}}var d,e,f,g=0,h=0,i=document;if(a=a,b=b||i.body,a&&a.getBoundingClientRect&&navigator.userAgent.indexOf("MSIE")>0&&8!==i.documentMode)return e=c(a),f=c(b),{x:e.x-f.x,y:e.y-f.y};for(d=a;d&&d!=b&&d.nodeType;)g+=d.offsetLeft||0,h+=d.offsetTop||0,d=d.offsetParent;for(d=a.parentNode;d&&d!=b&&d.nodeType;)g-=d.scrollLeft||0,h-=d.scrollTop||0,d=d.parentNode;return{x:g,y:h}},getSize:function(a){return{w:a.offsetWidth||a.clientWidth,h:a.offsetHeight||a.clientHeight}},parseSize:function(a){var b;return"string"==typeof a&&(a=/^([0-9]+)([mgk]?)$/.exec(a.toLowerCase().replace(/[^0-9mkg]/g,"")),b=a[2],a=+a[1],"g"==b&&(a*=1073741824),"m"==b&&(a*=1048576),"k"==b&&(a*=1024)),a},xmlEncode:function(a){return a?(""+a).replace(j,function(a){return i[a]?"&"+i[a]+";":a}):a},toArray:function(a){var b,c=[];for(b=0;b<a.length;b++)c[b]=a[b];return c},addI18n:function(a){return m.extend(g,a)},translate:function(a){return g[a]||a},isEmptyObj:function(a){if(a===c)return!0;for(var b in a)return!1;return!0},hasClass:function(a,b){var c;return""==a.className?!1:(c=new RegExp("(^|\\s+)"+b+"(\\s+|$)"),c.test(a.className))},addClass:function(a,b){m.hasClass(a,b)||(a.className=""==a.className?b:a.className.replace(/\s+$/,"")+" "+b)},removeClass:function(a,b){var c=new RegExp("(^|\\s+)"+b+"(\\s+|$)");a.className=a.className.replace(c,function(a,b,c){return" "===b&&" "===c?" ":""})},getStyle:function(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null)[b]:void 0},addEvent:function(e,f,g){var h,i,j;j=arguments[3],f=f.toLowerCase(),d===c&&(d="Plupload_"+m.guid()),e.addEventListener?(h=g,e.addEventListener(f,h,!1)):e.attachEvent&&(h=function(){var c=window.event;c.target||(c.target=c.srcElement),c.preventDefault=a,c.stopPropagation=b,g(c)},e.attachEvent("on"+f,h)),e[d]===c&&(e[d]=m.guid()),l.hasOwnProperty(e[d])||(l[e[d]]={}),i=l[e[d]],i.hasOwnProperty(f)||(i[f]=[]),i[f].push({func:h,orig:g,key:j})},removeEvent:function(a,b){var e,f,g;if("function"==typeof arguments[2]?f=arguments[2]:g=arguments[2],b=b.toLowerCase(),a[d]&&l[a[d]]&&l[a[d]][b]){e=l[a[d]][b];for(var h=e.length-1;h>=0&&(e[h].key!==g&&e[h].orig!==f||(a.detachEvent?a.detachEvent("on"+b,e[h].func):a.removeEventListener&&a.removeEventListener(b,e[h].func,!1),e[h].orig=null,e[h].func=null,e.splice(h,1),f===c));h--);if(e.length||delete l[a[d]][b],m.isEmptyObj(l[a[d]])){delete l[a[d]];try{delete a[d]}catch(i){a[d]=c}}}},removeAllEvents:function(a){var b=arguments[1];a[d]!==c&&a[d]&&m.each(l[a[d]],function(c,d){m.removeEvent(a,d,b)})}};m.Uploader=function(a){function b(){var a,b,c=0;if(this.state==m.STARTED){for(b=0;b<i.length;b++)a||i[b].status!=m.QUEUED?c++:(a=i[b],a.status=m.UPLOADING,this.trigger("BeforeUpload",a)&&this.trigger("UploadFile",a));c==i.length&&(this.stop(),this.trigger("UploadComplete",i))}}function d(){var a,b;for(e.reset(),a=0;a<i.length;a++)b=i[a],b.size!==c?(e.size+=b.size,e.loaded+=b.loaded):e.size=c,b.status==m.DONE?e.uploaded++:b.status==m.FAILED?e.failed++:e.queued++;e.size===c?e.percent=i.length>0?Math.ceil(e.uploaded/i.length*100):0:(e.bytesPerSec=Math.ceil(e.loaded/((+new Date-g||1)/1e3)),e.percent=e.size>0?Math.ceil(e.loaded/e.size*100):0)}var e,g,h={},i=[];e=new m.QueueProgress,a=m.extend({chunk_size:0,multipart:!0,multi_selection:!0,file_data_name:"file",filters:[]},a),m.extend(this,{state:m.STOPPED,runtime:"",features:{},files:i,settings:a,total:e,id:m.guid(),init:function(){function e(){var a,b,c,d=j[o++];if(d){if(a=d.getFeatures(),b=n.settings.required_features)for(b=b.split(","),c=0;c<b.length;c++)if(!a[b[c]])return void e();d.init(n,function(b){b&&b.success?(n.features=a,n.runtime=d.name,n.trigger("Init",{runtime:d.name}),n.trigger("PostInit"),n.refresh()):e()})}else n.trigger("Error",{code:m.INIT_ERROR,message:m.translate("Init error.")})}var h,j,l,n=this,o=0;if("function"==typeof a.preinit?a.preinit(n):m.each(a.preinit,function(a,b){n.bind(b,a)}),a.page_url=a.page_url||document.location.pathname.replace(/\/[^\/]+$/g,"/"),/^(\w+:\/\/|\/)/.test(a.url)||(a.url=a.page_url+a.url),a.chunk_size=m.parseSize(a.chunk_size),a.max_file_size=m.parseSize(a.max_file_size),n.bind("FilesAdded",function(b,d){var e,f,g,h=0,j=a.filters;for(j&&j.length&&(g=[],m.each(j,function(a){m.each(a.extensions.split(/,/),function(a){g.push(/^\s*\*\s*$/.test(a)?"\\.*":"\\."+a.replace(new RegExp("["+"/^$.*+?|()[]{}\\".replace(/./g,"\\$&")+"]","g"),"\\$&"))})}),g=new RegExp(g.join("|")+"$","i")),e=0;e<d.length;e++)f=d[e],f.loaded=0,f.percent=0,f.status=m.QUEUED,!g||g.test(f.name)?f.size!==c&&f.size>a.max_file_size?b.trigger("Error",{code:m.FILE_SIZE_ERROR,message:m.translate("File size error."),file:f}):(i.push(f),h++):b.trigger("Error",{code:m.FILE_EXTENSION_ERROR,message:m.translate("File extension error."),file:f});return h?void k(function(){n.trigger("QueueChanged"),n.refresh()},1):!1}),a.unique_names&&n.bind("UploadFile",function(a,b){var c=b.name.match(/\.([^.]+)$/),d="tmp";c&&(d=c[1]),b.target_name=b.id+"."+d}),n.bind("UploadProgress",function(a,b){b.percent=b.size>0?Math.ceil(b.loaded/b.size*100):100,d()}),n.bind("StateChanged",function(a){if(a.state==m.STARTED)g=+new Date;else if(a.state==m.STOPPED)for(h=a.files.length-1;h>=0;h--)a.files[h].status==m.UPLOADING&&(a.files[h].status=m.QUEUED,d())}),n.bind("QueueChanged",d),n.bind("Error",function(a,c){c.file&&(c.file.status=m.FAILED,d(),a.state==m.STARTED&&k(function(){b.call(n)},1))}),n.bind("FileUploaded",function(a,c){c.status=m.DONE,c.loaded=c.size,a.trigger("UploadProgress",c),k(function(){b.call(n)},1)}),a.runtimes)for(j=[],l=a.runtimes.split(/\s?,\s?/),h=0;h<l.length;h++)f[l[h]]&&j.push(f[l[h]]);else j=f;e(),"function"==typeof a.init?a.init(n):m.each(a.init,function(a,b){n.bind(b,a)})},refresh:function(){this.trigger("Refresh")},start:function(){this.state!=m.STARTED&&(this.state=m.STARTED,this.trigger("StateChanged"),b.call(this))},stop:function(){this.state!=m.STOPPED&&(this.state=m.STOPPED,this.trigger("StateChanged"))},getFile:function(a){var b;for(b=i.length-1;b>=0;b--)if(i[b].id===a)return i[b]},removeFile:function(a){var b;for(b=i.length-1;b>=0;b--)if(i[b].id===a.id)return this.splice(b,1)[0]},splice:function(a,b){var d;return d=i.splice(a===c?0:a,b===c?i.length:b),this.trigger("FilesRemoved",d),this.trigger("QueueChanged"),d},trigger:function(a){var b,c,d=h[a.toLowerCase()];if(d)for(c=Array.prototype.slice.call(arguments),c[0]=this,b=0;b<d.length;b++)if(d[b].func.apply(d[b].scope,c)===!1)return!1;return!0},hasEventListener:function(a){return!!h[a.toLowerCase()]},bind:function(a,b,c){var d;a=a.toLowerCase(),d=h[a]||[],d.push({func:b,scope:c||this}),h[a]=d},unbind:function(a){a=a.toLowerCase();var b,d=h[a],e=arguments[1];if(d){if(e!==c){for(b=d.length-1;b>=0;b--)if(d[b].func===e){d.splice(b,1);break}}else d=[];d.length||delete h[a]}},unbindAll:function(){var a=this;m.each(h,function(b,c){a.unbind(c)})},destroy:function(){this.trigger("Destroy"),this.unbindAll()}})},m.File=function(a,b,c){var d=this;d.id=a,d.name=b,d.size=c,d.loaded=0,d.percent=0,d.status=0},m.Runtime=function(){this.getFeatures=function(){},this.init=function(){}},m.QueueProgress=function(){var a=this;a.size=0,a.loaded=0,a.uploaded=0,a.failed=0,a.queued=0,a.percent=0,a.bytesPerSec=0,a.reset=function(){a.size=a.loaded=a.uploaded=a.failed=a.queued=a.percent=a.bytesPerSec=0}},m.runtimes={},window.plupload=m}(),function(){if(!window.google||!google.gears){var a=null;if("undefined"!=typeof GearsFactory)a=new GearsFactory;else try{a=new ActiveXObject("Gears.Factory"),-1!=a.getBuildInfo().indexOf("ie_mobile")&&a.privateSetGlobalObject(this)}catch(b){"undefined"!=typeof navigator.mimeTypes&&navigator.mimeTypes["application/x-googlegears"]&&(a=document.createElement("object"),a.style.display="none",a.width=0,a.height=0,a.type="application/x-googlegears",document.documentElement.appendChild(a))}a&&(window.google||(window.google={}),google.gears||(google.gears={factory:a}))}}(),function(a,b,c){function d(a,b,c){var d,e;d=google.gears.factory.create("beta.canvas");try{if(d.decode(a),b.width||(b.width=d.width),b.height||(b.height=d.height),e=Math.min(width/d.width,height/d.height),1>e||1===e&&"image/jpeg"===c)return d.resize(Math.round(d.width*e),Math.round(d.height*e)),b.quality?d.encode(c,{quality:b.quality/100}):d.encode(c)}catch(f){}return a}var e={};c.runtimes.Gears=c.addRuntime("gears",{getFeatures:function(){return{dragdrop:!0,jpgresize:!0,pngresize:!0,chunks:!0,progress:!0,multipart:!0,multi_selection:!0}},init:function(f,g){function h(a){var b,d,g,h=[];for(d=0;d<a.length;d++)b=a[d],g=c.guid(),e[g]=b.blob,h.push(new c.File(g,b.name,b.blob.length));f.trigger("FilesAdded",h)}var i;if(!a.google||!google.gears)return g({success:!1});try{i=google.gears.factory.create("beta.desktop")}catch(j){return g({success:!1})}f.bind("PostInit",function(){var a=f.settings,d=b.getElementById(a.drop_element);d&&(c.addEvent(d,"dragover",function(a){i.setDropEffect(a,"copy"),a.preventDefault()},f.id),c.addEvent(d,"drop",function(a){var b=i.getDragData(a,"application/x-gears-files");b&&h(b.files),a.preventDefault()},f.id),d=0),c.addEvent(b.getElementById(a.browse_button),"click",function(b){var c,d,e,f=[];b.preventDefault();a:for(c=0;c<a.filters.length;c++)for(e=a.filters[c].extensions.split(","),d=0;d<e.length;d++){if("*"===e[d]){f=[];break a}f.push("."+e[d])}i.openFiles(h,{singleFile:!a.multi_selection,filter:f})},f.id)}),f.bind("UploadFile",function(a,b){function f(){function d(d){var e,f,g,h="----pluploadboundary"+c.guid(),i="--",j="\r\n";n&&(l.setRequestHeader("Content-Type","multipart/form-data; boundary="+h),e=google.gears.factory.create("beta.blobbuilder"),c.each(c.extend(p,a.settings.multipart_params),function(a,b){e.append(i+h+j+'Content-Disposition: form-data; name="'+b+'"'+j+j),e.append(a+j)}),g=c.mimeTypes[b.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",e.append(i+h+j+'Content-Disposition: form-data; name="'+a.settings.file_data_name+'"; filename="'+b.name+'"'+j+"Content-Type: "+g+j+j),e.append(d),e.append(j+i+h+i+j),f=e.getAsBlob(),o=f.length-d.length,d=f),l.send(d)}var l,m,n=a.settings.multipart,o=0,p={name:b.target_name||b.name},q=a.settings.url;b.status!=c.DONE&&b.status!=c.FAILED&&a.state!=c.STOPPED&&(i&&(p.chunk=j,p.chunks=g),m=Math.min(h,b.size-j*h),n||(q=c.buildUrl(a.settings.url,p)),l=google.gears.factory.create("beta.httprequest"),l.open("POST",q),n||(l.setRequestHeader("Content-Disposition",'attachment; filename="'+b.name+'"'),l.setRequestHeader("Content-Type","application/octet-stream")),c.each(a.settings.headers,function(a,b){l.setRequestHeader(b,a)}),l.upload.onprogress=function(c){b.loaded=k+c.loaded-o,a.trigger("UploadProgress",b)},l.onreadystatechange=function(){var d;if(4==l.readyState)if(200==l.status){if(d={chunk:j,chunks:g,response:l.responseText,status:l.status},a.trigger("ChunkUploaded",b,d),d.cancelled)return void(b.status=c.FAILED);k+=m,++j>=g?(b.status=c.DONE,a.trigger("FileUploaded",b,{response:l.responseText,status:l.status})):f()}else a.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:b,chunk:j,chunks:g,status:l.status})},g>j&&d(e[b.id].slice(j*h,m)))}var g,h,i,j=0,k=0,l=a.settings.resize;l&&/\.(png|jpg|jpeg)$/i.test(b.name)&&(e[b.id]=d(e[b.id],l,/\.png$/i.test(b.name)?"image/png":"image/jpeg")),b.size=e[b.id].length,h=a.settings.chunk_size,i=h>0,g=Math.ceil(b.size/h),i||(h=b.size,g=1),f()}),f.bind("Destroy",function(a){var d,e,f={browseButton:a.settings.browse_button,dropElm:a.settings.drop_element};for(d in f)e=b.getElementById(f[d]),e&&c.removeAllEvents(e,a.id)}),g({success:!0})}})}(window,document,plupload),function(a,b,c,d){function e(a){var b,c,f,g,h=typeof a;if(a===d||null===a)return"null";if("string"===h)return b="\bb t\nn\ff\rr\"\"''\\\\",'"'+a.replace(/([\u0080-\uFFFF\x00-\x1f\"])/g,function(a,c){var d=b.indexOf(c);return d+1?"\\"+b.charAt(d+1):(a=c.charCodeAt().toString(16),"\\u"+"0000".substring(a.length)+a)})+'"';if("object"==h){if(c=a.length!==d,b="",c){for(f=0;f<a.length;f++)b&&(b+=","),b+=e(a[f]);b="["+b+"]"}else{for(g in a)a.hasOwnProperty(g)&&(b&&(b+=","),b+=e(g)+":"+e(a[g]));b="{"+b+"}"}return b}return""+a}function f(a){var b,c,d,e,f,g=!1,h=null,i=0;try{try{h=new ActiveXObject("AgControl.AgControl"),h.IsVersionSupported(a)&&(g=!0),h=null}catch(j){var k=navigator.plugins["Silverlight Plug-In"];if(k){for(b=k.description,"1.0.30226.2"===b&&(b="2.0.30226.2"),c=b.split(".");c.length>3;)c.pop();for(;c.length<4;)c.push(0);for(d=a.split(".");d.length>4;)d.pop();do e=parseInt(d[i],10),f=parseInt(c[i],10),i++;while(i<d.length&&e===f);f>=e&&!isNaN(e)&&(g=!0)}}}catch(l){g=!1}return g}var g={},h={};c.silverlight={trigger:function(a,b){var d,e=g[a];e&&(d=c.toArray(arguments).slice(1),d[0]="Silverlight:"+b,setTimeout(function(){e.trigger.apply(e,d)},0))}},c.runtimes.Silverlight=c.addRuntime("silverlight",{getFeatures:function(){return{jpgresize:!0,pngresize:!0,chunks:!0,progress:!0,multipart:!0,multi_selection:!0}},init:function(d,i){function j(){return b.getElementById(d.id+"_silverlight").content.Upload}var k,l,m="",n=d.settings.filters,o=b.body;if(!f("2.0.31005.0")||a.opera&&a.opera.buildNumber)return void i({success:!1});for(h[d.id]=!1,g[d.id]=d,k=b.createElement("div"),k.id=d.id+"_silverlight_container",c.extend(k.style,{position:"absolute",top:"0px",background:d.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100px",height:"100px",overflow:"hidden",opacity:d.settings.shim_bgcolor||b.documentMode>8?"":.01}),k.className="plupload silverlight",d.settings.container&&(o=b.getElementById(d.settings.container),"static"===c.getStyle(o,"position")&&(o.style.position="relative")),o.appendChild(k),l=0;l<n.length;l++)m+=(""!=m?"|":"")+n[l].title+" | *."+n[l].extensions.replace(/,/g,";*.");k.innerHTML='<object id="'+d.id+'_silverlight" data="data:application/x-silverlight," type="application/x-silverlight-2" style="outline:none;" width="1024" height="1024"><param name="source" value="'+d.settings.silverlight_xap_url+'"/><param name="background" value="Transparent"/><param name="windowless" value="true"/><param name="enablehtmlaccess" value="true"/><param name="initParams" value="id='+d.id+",filter="+m+",multiselect="+d.settings.multi_selection+'"/></object>',d.bind("Silverlight:Init",function(){var a,f={};h[d.id]||(h[d.id]=!0,d.bind("Silverlight:StartSelectFiles",function(){a=[]}),d.bind("Silverlight:SelectFile",function(b,d,e,g){var h;h=c.guid(),f[h]=d,f[d]=h,a.push(new c.File(h,e,g))}),d.bind("Silverlight:SelectSuccessful",function(){a.length&&d.trigger("FilesAdded",a)}),d.bind("Silverlight:UploadChunkError",function(a,b,e,g,h){d.trigger("Error",{code:c.IO_ERROR,message:"IO Error.",details:h,file:a.getFile(f[b])})}),d.bind("Silverlight:UploadFileProgress",function(a,b,d,e){var g=a.getFile(f[b]);g.status!=c.FAILED&&(g.size=e,g.loaded=d,a.trigger("UploadProgress",g))}),d.bind("Refresh",function(a){var d,e,f;d=b.getElementById(a.settings.browse_button),d&&(e=c.getPos(d,b.getElementById(a.settings.container)),f=c.getSize(d),c.extend(b.getElementById(a.id+"_silverlight_container").style,{top:e.y+"px",left:e.x+"px",width:f.w+"px",height:f.h+"px"}))}),d.bind("Silverlight:UploadChunkSuccessful",function(a,b,d,e,g){var h,i=a.getFile(f[b]);h={chunk:d,chunks:e,response:g},a.trigger("ChunkUploaded",i,h),i.status!=c.FAILED&&j().UploadNextChunk(),d==e-1&&(i.status=c.DONE,a.trigger("FileUploaded",i,{response:g}))}),d.bind("Silverlight:UploadSuccessful",function(a,b,d){var e=a.getFile(f[b]);e.status=c.DONE,a.trigger("FileUploaded",e,{response:d})}),d.bind("FilesRemoved",function(a,b){var c;for(c=0;c<b.length;c++)j().RemoveFile(f[b[c].id])}),d.bind("UploadFile",function(a,b){var d=a.settings,g=d.resize||{};j().UploadFile(f[b.id],a.settings.url,e({name:b.target_name||b.name,mime:c.mimeTypes[b.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:d.chunk_size,image_width:g.width,image_height:g.height,image_quality:g.quality||90,multipart:!!d.multipart,multipart_params:d.multipart_params||{},file_data_name:d.file_data_name,headers:d.headers}))}),d.bind("Silverlight:MouseEnter",function(a){var e,f;e=b.getElementById(d.settings.browse_button),f=a.settings.browse_button_hover,e&&f&&c.addClass(e,f)}),d.bind("Silverlight:MouseLeave",function(a){var e,f;e=b.getElementById(d.settings.browse_button),f=a.settings.browse_button_hover,e&&f&&c.removeClass(e,f)}),d.bind("Silverlight:MouseLeftButtonDown",function(a){var e,f;e=b.getElementById(d.settings.browse_button),f=a.settings.browse_button_active,e&&f&&(c.addClass(e,f),c.addEvent(b.body,"mouseup",function(){c.removeClass(e,f)}))}),d.bind("Sliverlight:StartSelectFiles",function(a){var e,f;e=b.getElementById(d.settings.browse_button),f=a.settings.browse_button_active,e&&f&&c.removeClass(e,f)}),d.bind("Destroy",function(a){var d;c.removeAllEvents(b.body,a.id),delete h[a.id],delete g[a.id],d=b.getElementById(a.id+"_silverlight_container"),d&&o.removeChild(d)}),i({success:!0}))})}})}(window,document,plupload),function(a,b,c){function d(){var a;try{a=navigator.plugins["Shockwave Flash"],a=a.description}catch(b){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version")}catch(c){a="0.0"}}return a=a.match(/\d+/g),parseFloat(a[0]+"."+a[1])}var e={},f={};c.flash={trigger:function(a,b,c){setTimeout(function(){var d=e[a];d&&d.trigger("Flash:"+b,c)},0)}},c.runtimes.Flash=c.addRuntime("flash",{getFeatures:function(){return{jpgresize:!0,pngresize:!0,maxWidth:8091,maxHeight:8091,chunks:!0,progress:!0,multipart:!0,multi_selection:!0}},init:function(a,g){function h(){return b.getElementById(a.id+"_flash")}function i(){return l++>5e3?void g({success:!1}):void(f[a.id]||setTimeout(i,1))}var j,k,l=0,m=b.body;return d()<10?void g({success:!1}):(f[a.id]=!1,e[a.id]=a,j=b.getElementById(a.settings.browse_button),k=b.createElement("div"),k.id=a.id+"_flash_container",c.extend(k.style,{position:"absolute",top:"0px",background:a.settings.shim_bgcolor||"transparent",zIndex:99999,width:"100%",height:"100%"}),k.className="plupload flash",a.settings.container&&(m=b.getElementById(a.settings.container),"static"===c.getStyle(m,"position")&&(m.style.position="relative")),m.appendChild(k),function(){var d,e;d='<object id="'+a.id+'_flash" type="application/x-shockwave-flash" data="'+a.settings.flash_swf_url+'" ',c.ua.ie&&(d+='classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '),d+='width="100%" height="100%" style="outline:0"><param name="movie" value="'+a.settings.flash_swf_url+'" /><param name="flashvars" value="id='+escape(a.id)+'" /><param name="wmode" value="transparent" /><param name="allowscriptaccess" value="always" /></object>',c.ua.ie?(e=b.createElement("div"),k.appendChild(e),e.outerHTML=d,e=null):k.innerHTML=d}(),i(),j=k=null,void a.bind("Flash:Init",function(){var d={};h().setFileFilters(a.settings.filters,a.settings.multi_selection),f[a.id]||(f[a.id]=!0,a.bind("UploadFile",function(b,e){var f=b.settings,g=a.settings.resize||{};h().uploadFile(d[e.id],f.url,{name:e.target_name||e.name,mime:c.mimeTypes[e.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",chunk_size:f.chunk_size,width:g.width,height:g.height,quality:g.quality,multipart:f.multipart,multipart_params:f.multipart_params||{},file_data_name:f.file_data_name,format:/\.(jpg|jpeg)$/i.test(e.name)?"jpg":"png",headers:f.headers,urlstream_upload:f.urlstream_upload})}),a.bind("Flash:UploadProcess",function(a,b){var e=a.getFile(d[b.id]);e.status!=c.FAILED&&(e.loaded=b.loaded,e.size=b.size,a.trigger("UploadProgress",e))}),a.bind("Flash:UploadChunkComplete",function(a,b){var e,f=a.getFile(d[b.id]);e={chunk:b.chunk,chunks:b.chunks,response:b.text},a.trigger("ChunkUploaded",f,e),f.status!=c.FAILED&&h().uploadNextChunk(),b.chunk==b.chunks-1&&(f.status=c.DONE,a.trigger("FileUploaded",f,{response:b.text}))}),a.bind("Flash:SelectFiles",function(b,e){var f,g,h,i=[];for(g=0;g<e.length;g++)f=e[g],h=c.guid(),d[h]=f.id,d[f.id]=h,i.push(new c.File(h,f.name,f.size));i.length&&a.trigger("FilesAdded",i)}),a.bind("Flash:SecurityError",function(b,e){a.trigger("Error",{code:c.SECURITY_ERROR,message:c.translate("Security error."),details:e.message,file:a.getFile(d[e.id])})}),a.bind("Flash:GenericError",function(b,e){a.trigger("Error",{code:c.GENERIC_ERROR,message:c.translate("Generic error."),details:e.message,file:a.getFile(d[e.id])})}),a.bind("Flash:IOError",function(b,e){a.trigger("Error",{code:c.IO_ERROR,message:c.translate("IO error."),details:e.message,file:a.getFile(d[e.id])})}),a.bind("Flash:ImageError",function(b,e){a.trigger("Error",{code:parseInt(e.code,10),message:c.translate("Image error."),file:a.getFile(d[e.id])})}),a.bind("Flash:StageEvent:rollOver",function(d){var e,f;e=b.getElementById(a.settings.browse_button),f=d.settings.browse_button_hover,e&&f&&c.addClass(e,f)}),a.bind("Flash:StageEvent:rollOut",function(d){var e,f;e=b.getElementById(a.settings.browse_button),f=d.settings.browse_button_hover,e&&f&&c.removeClass(e,f)}),a.bind("Flash:StageEvent:mouseDown",function(d){var e,f;e=b.getElementById(a.settings.browse_button),f=d.settings.browse_button_active,e&&f&&(c.addClass(e,f),c.addEvent(b.body,"mouseup",function(){c.removeClass(e,f)},d.id))}),a.bind("Flash:StageEvent:mouseUp",function(d){var e,f;e=b.getElementById(a.settings.browse_button),f=d.settings.browse_button_active,e&&f&&c.removeClass(e,f)}),a.bind("Flash:ExifData",function(b,c){a.trigger("ExifData",a.getFile(d[c.id]),c.data)}),a.bind("Flash:GpsData",function(b,c){a.trigger("GpsData",a.getFile(d[c.id]),c.data)}),a.bind("QueueChanged",function(){a.refresh()}),a.bind("FilesRemoved",function(a,b){var c;for(c=0;c<b.length;c++)h().removeFile(d[b[c].id])}),a.bind("StateChanged",function(){a.refresh()}),a.bind("Refresh",function(d){var e,f,g;h().setFileFilters(a.settings.filters,a.settings.multi_selection),e=b.getElementById(d.settings.browse_button),e&&(f=c.getPos(e,b.getElementById(d.settings.container)),g=c.getSize(e),c.extend(b.getElementById(d.id+"_flash_container").style,{top:f.y+"px",left:f.x+"px",width:g.w+"px",height:g.h+"px"}))}),a.bind("Destroy",function(a){var d;c.removeAllEvents(b.body,a.id),delete f[a.id],delete e[a.id],d=b.getElementById(a.id+"_flash_container"),d&&m.removeChild(d)}),g({success:!0}))}))}})}(window,document,plupload),function(a){a.runtimes.BrowserPlus=a.addRuntime("browserplus",{getFeatures:function(){return{dragdrop:!0,jpgresize:!0,pngresize:!0,chunks:!0,progress:!0,multipart:!0,multi_selection:!0}},init:function(b,c){function d(c){var d,e,f,h=[];for(d=0;d<c.length;d++)e=c[d],f=a.guid(),g[f]=e,h.push(new a.File(f,e.name,e.size));d&&b.trigger("FilesAdded",h)}function e(){b.bind("PostInit",function(){function c(a,b){f.DragAndDrop.AddDropTarget({id:a},function(){f.DragAndDrop.AttachCallbacks({id:a,hover:function(a){!a&&b&&b()},drop:function(a){b&&b(),d(a)}},function(){})})}function e(){document.getElementById(j).style.top="-1000px"}var g,i=h.drop_element,j=b.id+"_droptarget",k=document.getElementById(i);k&&(document.attachEvent&&/MSIE/gi.test(navigator.userAgent)?(g=document.createElement("div"),g.setAttribute("id",j),a.extend(g.style,{position:"absolute",top:"-1000px",background:"red",filter:"alpha(opacity=0)",opacity:0}),document.body.appendChild(g),a.addEvent(k,"dragenter",function(){var b,c;b=document.getElementById(i),c=a.getPos(b),a.extend(document.getElementById(j).style,{top:c.y+"px",left:c.x+"px",width:b.offsetWidth+"px",height:b.offsetHeight+"px"})}),c(j,e)):c(i)),a.addEvent(document.getElementById(h.browse_button),"click",function(b){var c,e,g,i=[],j=h.filters;b.preventDefault();a:for(c=0;c<j.length;c++)for(g=j[c].extensions.split(","),e=0;e<g.length;e++){if("*"===g[e]){i=[];break a}i.push(a.mimeTypes[g[e]])}f.FileBrowse.OpenBrowseDialog({mimeTypes:i},function(a){a.success&&d(a.value)})}),k=g=null}),b.bind("UploadFile",function(b,c){function d(e,g){var i;c.status!=a.FAILED&&(k.name=c.target_name||c.name,l&&(k.chunk=""+e,k.chunks=""+g),i=m.shift(),f.Uploader.upload({url:b.settings.url,files:{file:i},cookies:document.cookies,postvars:a.extend(k,b.settings.multipart_params),progressCallback:function(a){var d,f=0;for(h[e]=parseInt(a.filePercent*i.size/100,10),d=0;d<h.length;d++)f+=h[d];c.loaded=f,b.trigger("UploadProgress",c)}},function(f){var h;f.success?(h=f.value.statusCode,l&&b.trigger("ChunkUploaded",c,{chunk:e,chunks:g,response:f.value.body,status:h}),m.length>0?d(++e,g):(c.status=a.DONE,b.trigger("FileUploaded",c,{response:f.value.body,status:h}),h>=400&&b.trigger("Error",{code:a.HTTP_ERROR,message:a.translate("HTTP Error."),file:c,status:h}))):b.trigger("Error",{code:a.GENERIC_ERROR,message:a.translate("Generic Error."),file:c,details:f.error})}))}function e(a){c.size=a.size,l?f.FileAccess.chunk({file:a,chunkSize:l},function(a){if(a.success){var b=a.value,c=b.length;h=Array(c);for(var e=0;c>e;e++)h[e]=0,m.push(b[e]);d(0,c)}}):(h=Array(1),m.push(a),d(0,1))}var h,j=g[c.id],k={},l=b.settings.chunk_size,m=[];i&&/\.(png|jpg|jpeg)$/i.test(c.name)?BrowserPlus.ImageAlter.transform({file:j,quality:i.quality||90,actions:[{scale:{maxwidth:i.width,maxheight:i.height}}]},function(a){a.success&&e(a.value.file)}):e(j)}),c({success:!0})}var f=window.BrowserPlus,g={},h=b.settings,i=h.resize;f?f.init(function(a){var b=[{service:"Uploader",version:"3"},{service:"DragAndDrop",version:"1"},{service:"FileBrowse",version:"1"},{service:"FileAccess",version:"2"}];i&&b.push({service:"ImageAlter",version:"4"}),a.success?f.require({services:b},function(a){a.success?e():c()}):c()}):c()}})}(plupload),function(a,b,c,d){function e(b,c){var d;return"FileReader"in a?(d=new FileReader,d.readAsDataURL(b),d.onload=function(){c(d.result)},void 0):c(b.getAsDataURL())}function f(b,c){var d;return"FileReader"in a?(d=new FileReader,d.readAsBinaryString(b),d.onload=function(){c(d.result)},void 0):c(b.getAsBinary())}function g(a,c,d,f){var g,h,i,l,n=this;e(m[a.id],function(e){g=b.createElement("canvas"),g.style.display="none",b.body.appendChild(g),h=g.getContext("2d"),i=new Image,i.onerror=i.onabort=function(){f({success:!1})},i.onload=function(){var b,m,o,p;if(c.width||(c.width=i.width),c.height||(c.height=i.height),l=Math.min(c.width/i.width,c.height/i.height),1>l||1===l&&"image/jpeg"===d){if(b=Math.round(i.width*l),m=Math.round(i.height*l),g.width=b,g.height=m,h.drawImage(i,0,0,b,m),"image/jpeg"===d){if(o=new j(atob(e.substring(e.indexOf("base64,")+7))),o.headers&&o.headers.length&&(p=new k,p.init(o.get("exif")[0])&&(p.setExif("PixelXDimension",b),p.setExif("PixelYDimension",m),o.set("exif",p.getBinary()),n.hasEventListener("ExifData")&&n.trigger("ExifData",a,p.EXIF()),n.hasEventListener("GpsData")&&n.trigger("GpsData",a,p.GPS()))),c.quality)try{e=g.toDataURL(d,c.quality/100)}catch(q){e=g.toDataURL(d)}}else e=g.toDataURL(d);e=e.substring(e.indexOf("base64,")+7),e=atob(e),o&&o.headers&&o.headers.length&&(e=o.restore(e),o.purge()),g.parentNode.removeChild(g),f({success:!0,data:e})}else f({success:!1})},i.src=e})}function h(){function a(a,b){var c,d=f?0:-8*(b-1),g=0;for(c=0;b>c;c++)g|=e.charCodeAt(a+c)<<Math.abs(d+8*c);return g}function b(a,b,c){var c=3===arguments.length?c:e.length-b-1;e=e.substr(0,b)+a+e.substr(c+b)}function c(a,c,d){var e,g="",h=f?0:-8*(d-1);for(e=0;d>e;e++)g+=String.fromCharCode(c>>Math.abs(h+8*e)&255);b(g,a,d)}var e,f=!1;return{II:function(a){return a===d?f:void(f=a)},init:function(a){f=!1,e=a},SEGMENT:function(a,c,d){switch(arguments.length){case 1:return e.substr(a,e.length-a-1);case 2:return e.substr(a,c);case 3:b(d,a,c);break;default:return e}},BYTE:function(b){return a(b,1)},SHORT:function(b){return a(b,2)},LONG:function(b,e){return e===d?a(b,4):void c(b,e,4)},SLONG:function(b){var c=a(b,4);return c>2147483647?c-4294967296:c},STRING:function(b,c){var d="";for(c+=b;c>b;b++)d+=String.fromCharCode(a(b,1));return d}}}function j(a){var b,c,e,f={65505:{app:"EXIF",name:"APP1",signature:"Exif\x00"},65506:{app:"ICC",name:"APP2",signature:"ICC_PROFILE\x00"},65517:{app:"IPTC",name:"APP13",signature:"Photoshop 3.0\x00"}},g=[],i=d,k=0;if(b=new h,b.init(a),65496===b.SHORT(0)){for(c=2,e=Math.min(1048576,a.length);e>=c;)if(i=b.SHORT(c),i>=65488&&65495>=i)c+=2;else{if(65498===i||65497===i)break;k=b.SHORT(c+2)+2,f[i]&&b.STRING(c+4,f[i].signature.length)===f[i].signature&&g.push({hex:i,app:f[i].app.toUpperCase(),name:f[i].name.toUpperCase(),start:c,length:k,segment:b.SEGMENT(c,k)}),c+=k}return b.init(null),{headers:g,restore:function(a){b.init(a);var d=new j(a);if(!d.headers)return!1;for(var e=d.headers.length;e>0;e--){var f=d.headers[e-1];b.SEGMENT(f.start,f.length,"")}d.purge(),c=65504==b.SHORT(2)?4+b.SHORT(4):2;for(var e=0,h=g.length;h>e;e++)b.SEGMENT(c,0,g[e].segment),c+=g[e].length;return b.SEGMENT()},get:function(a){for(var b=[],c=0,d=g.length;d>c;c++)g[c].app===a.toUpperCase()&&b.push(g[c].segment);return b},set:function(a,b){var c=[];"string"==typeof b?c.push(b):c=b;for(var d=ii=0,e=g.length;e>d&&(g[d].app===a.toUpperCase()&&(g[d].segment=c[ii], g[d].length=c[ii].length,ii++),!(ii>=c.length));d++);},purge:function(){g=[],b.init(null)}}}}function k(){function a(a,b){var c,f,h,i,k,l,m,n,o=e.SHORT(a),p=[],q={};for(c=0;o>c;c++)if(m=l=a+12*c+2,h=b[e.SHORT(m)],h!==d){switch(i=e.SHORT(m+=2),k=e.LONG(m+=2),m+=4,p=[],i){case 1:case 7:for(k>4&&(m=e.LONG(m)+j.tiffHeader),f=0;k>f;f++)p[f]=e.BYTE(m+f);break;case 2:k>4&&(m=e.LONG(m)+j.tiffHeader),q[h]=e.STRING(m,k-1);continue;case 3:for(k>2&&(m=e.LONG(m)+j.tiffHeader),f=0;k>f;f++)p[f]=e.SHORT(m+2*f);break;case 4:for(k>1&&(m=e.LONG(m)+j.tiffHeader),f=0;k>f;f++)p[f]=e.LONG(m+4*f);break;case 5:for(m=e.LONG(m)+j.tiffHeader,f=0;k>f;f++)p[f]=e.LONG(m+4*f)/e.LONG(m+4*f+4);break;case 9:for(m=e.LONG(m)+j.tiffHeader,f=0;k>f;f++)p[f]=e.SLONG(m+4*f);break;case 10:for(m=e.LONG(m)+j.tiffHeader,f=0;k>f;f++)p[f]=e.SLONG(m+4*f)/e.SLONG(m+4*f+4);break;default:continue}n=1==k?p[0]:p,q[h]=g.hasOwnProperty(h)&&"object"!=typeof n?g[h][n]:n}return q}function b(){var b=d,c=j.tiffHeader;return e.II(18761==e.SHORT(c)),42!==e.SHORT(c+=2)?!1:(j.IFD0=j.tiffHeader+e.LONG(c+=2),b=a(j.IFD0,f.tiff),j.exifIFD="ExifIFDPointer"in b?j.tiffHeader+b.ExifIFDPointer:d,j.gpsIFD="GPSInfoIFDPointer"in b?j.tiffHeader+b.GPSInfoIFDPointer:d,!0)}function c(a,b,c){var d,g,h,k=0;if("string"==typeof b){var l=f[a.toLowerCase()];for(hex in l)if(l[hex]===b){b=hex;break}}for(d=j[a.toLowerCase()+"IFD"],g=e.SHORT(d),i=0;i<g;i++)if(h=d+12*i+2,e.SHORT(h)==b){k=h+8;break}return k?(e.LONG(k,c),!0):!1}var e,f,g,j={};return e=new h,f={tiff:{274:"Orientation",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer"},exif:{36864:"ExifVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",36867:"DateTimeOriginal",33434:"ExposureTime",33437:"FNumber",34855:"ISOSpeedRatings",37377:"ShutterSpeedValue",37378:"ApertureValue",37383:"MeteringMode",37384:"LightSource",37385:"Flash",41986:"ExposureMode",41987:"WhiteBalance",41990:"SceneCaptureType",41988:"DigitalZoomRatio",41992:"Contrast",41993:"Saturation",41994:"Sharpness"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude"}},g={ColorSpace:{1:"sRGB",0:"Uncalibrated"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{1:"Daylight",2:"Fliorescent",3:"Tungsten",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 -5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire.",1:"Flash fired.",5:"Strobe return light not detected.",7:"Strobe return light detected.",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},ExposureMode:{0:"Auto exposure",1:"Manual exposure",2:"Auto bracket"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},GPSLatitudeRef:{N:"North latitude",S:"South latitude"},GPSLongitudeRef:{E:"East longitude",W:"West longitude"}},{init:function(a){return j={tiffHeader:10},a!==d&&a.length?(e.init(a),65505===e.SHORT(0)&&"EXIF\x00"===e.STRING(4,5).toUpperCase()?b():!1):!1},EXIF:function(){var b;return b=a(j.exifIFD,f.exif),b.ExifVersion&&(b.ExifVersion=String.fromCharCode(b.ExifVersion[0],b.ExifVersion[1],b.ExifVersion[2],b.ExifVersion[3])),b},GPS:function(){var b;return b=a(j.gpsIFD,f.gps),b.GPSVersionID&&(b.GPSVersionID=b.GPSVersionID.join(".")),b},setExif:function(a,b){return"PixelXDimension"!==a&&"PixelYDimension"!==a?!1:c("exif",a,b)},getBinary:function(){return e.SEGMENT()}}}var l,m={};c.runtimes.Html5=c.addRuntime("html5",{getFeatures:function(){var d,e,f,g,h,i;return e=f=h=i=!1,a.XMLHttpRequest&&(d=new XMLHttpRequest,f=!!d.upload,e=!(!d.sendAsBinary&&!d.upload)),e&&(g=!!(d.sendAsBinary||a.Uint8Array&&a.ArrayBuffer),h=!(!File||!File.prototype.getAsDataURL&&!a.FileReader||!g),i=!(!File||!(File.prototype.mozSlice||File.prototype.webkitSlice||File.prototype.slice))),l=c.ua.safari&&c.ua.windows,{html5:e,dragdrop:function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a}(),jpgresize:h,pngresize:h,multipart:h||!!a.FileReader||!!a.FormData,canSendBinary:g,cantSendBlobInFormData:!(!(c.ua.gecko&&a.FormData&&a.FileReader)||FileReader.prototype.readAsArrayBuffer),progress:f,chunks:i,multi_selection:!(c.ua.safari&&c.ua.windows),triggerDialog:c.ua.gecko&&a.FormData||c.ua.webkit}},init:function(d,e){function h(a){var b,e,f,g=[],h={};for(e=0;e<a.length;e++)b=a[e],h[b.name]||(h[b.name]=!0,f=c.guid(),m[f]=b,g.push(new c.File(f,b.fileName||b.name,b.fileSize||b.size)));g.length&&d.trigger("FilesAdded",g)}var i;return i=this.getFeatures(),i.html5?(d.bind("Init",function(a){var e,f,g,i,j,k,l,m=[],n=a.settings.filters,o=b.body;e=b.createElement("div"),e.id=a.id+"_html5_container",c.extend(e.style,{position:"absolute",background:d.settings.shim_bgcolor||"transparent",width:"100px",height:"100px",overflow:"hidden",zIndex:99999,opacity:d.settings.shim_bgcolor?"":0}),e.className="plupload html5",d.settings.container&&(o=b.getElementById(d.settings.container),"static"===c.getStyle(o,"position")&&(o.style.position="relative")),o.appendChild(e);a:for(g=0;g<n.length;g++)for(j=n[g].extensions.split(/,/),i=0;i<j.length;i++){if("*"===j[i]){m=[];break a}k=c.mimeTypes[j[i]],k&&m.push(k)}if(e.innerHTML='<input id="'+d.id+'_html5" style="font-size:999px" type="file" accept="'+m.join(",")+'" '+(d.settings.multi_selection&&d.features.multi_selection?'multiple="multiple"':"")+" />",e.scrollTop=100,l=b.getElementById(d.id+"_html5"),a.features.triggerDialog?c.extend(l.style,{position:"absolute",width:"100%",height:"100%"}):c.extend(l.style,{cssFloat:"right",styleFloat:"right"}),l.onchange=function(){h(this.files),this.value=""},f=b.getElementById(a.settings.browse_button)){var p=a.settings.browse_button_hover,q=a.settings.browse_button_active,r=a.features.triggerDialog?f:e;p&&(c.addEvent(r,"mouseover",function(){c.addClass(f,p)},a.id),c.addEvent(r,"mouseout",function(){c.removeClass(f,p)},a.id)),q&&(c.addEvent(r,"mousedown",function(){c.addClass(f,q)},a.id),c.addEvent(b.body,"mouseup",function(){c.removeClass(f,q)},a.id)),a.features.triggerDialog&&c.addEvent(f,"click",function(c){b.getElementById(a.id+"_html5").click(),c.preventDefault()},a.id)}}),d.bind("PostInit",function(){var a=b.getElementById(d.settings.drop_element);if(a){if(l)return void c.addEvent(a,"dragenter",function(){var e,f,g;e=b.getElementById(d.id+"_drop"),e||(e=b.createElement("input"),e.setAttribute("type","file"),e.setAttribute("id",d.id+"_drop"),e.setAttribute("multiple","multiple"),c.addEvent(e,"change",function(){h(this.files),c.removeEvent(e,"change",d.id),e.parentNode.removeChild(e)},d.id),a.appendChild(e)),f=c.getPos(a,b.getElementById(d.settings.container)),g=c.getSize(a),"static"===c.getStyle(a,"position")&&c.extend(a.style,{position:"relative"}),c.extend(e.style,{position:"absolute",display:"block",top:0,left:0,width:g.w+"px",height:g.h+"px",opacity:0})},d.id);c.addEvent(a,"dragover",function(a){a.preventDefault()},d.id),c.addEvent(a,"drop",function(a){var b=a.dataTransfer;b&&b.files&&h(b.files),a.preventDefault()},d.id)}}),d.bind("Refresh",function(a){var e,f,g,h,i;e=b.getElementById(d.settings.browse_button),e&&(f=c.getPos(e,b.getElementById(a.settings.container)),g=c.getSize(e),h=b.getElementById(d.id+"_html5_container"),c.extend(h.style,{top:f.y+"px",left:f.x+"px",width:g.w+"px",height:g.h+"px"}),d.features.triggerDialog&&("static"===c.getStyle(e,"position")&&c.extend(e.style,{position:"relative"}),i=parseInt(c.getStyle(e,"z-index"),10),isNaN(i)&&(i=0),c.extend(e.style,{zIndex:i}),c.extend(h.style,{zIndex:i-1})))}),d.bind("UploadFile",function(b,d){function e(a,b,c){var d;if(!File.prototype.slice)return(d=File.prototype.webkitSlice||File.prototype.mozSlice)?d.call(a,b,c):null;try{return a.slice(),a.slice(b,c)}catch(e){return a.slice(b,c-b)}}function h(f){function g(){function m(e){var f,k=0,l=new XMLHttpRequest,m=l.upload,u="----pluploadboundary"+c.guid(),v="--",w="\r\n",x="";if(m&&(m.onprogress=function(a){d.loaded=Math.min(d.size,j+a.loaded-k),b.trigger("UploadProgress",d)}),l.onreadystatechange=function(){var a,i;if(4==l.readyState){try{a=l.status}catch(k){a=0}if(a>=400)b.trigger("Error",{code:c.HTTP_ERROR,message:c.translate("HTTP Error."),file:d,status:a});else{if(o){if(i={chunk:h,chunks:o,response:l.responseText,status:a},b.trigger("ChunkUploaded",d,i),j+=r,i.cancelled)return void(d.status=c.FAILED);d.loaded=Math.min(d.size,(h+1)*q)}else d.loaded=d.size;b.trigger("UploadProgress",d),e=n=f=x=null,!o||++h>=o?(d.status=c.DONE,b.trigger("FileUploaded",d,{response:l.responseText,status:a})):g()}l=null}},b.settings.multipart&&i.multipart){if(p.name=d.target_name||d.name,l.open("post",t,!0),c.each(b.settings.headers,function(a,b){l.setRequestHeader(b,a)}),"string"!=typeof e&&a.FormData)return f=new FormData,c.each(c.extend(p,b.settings.multipart_params),function(a,b){f.append(b,a)}),f.append(b.settings.file_data_name,e),void l.send(f);if("string"==typeof e){if(l.setRequestHeader("Content-Type","multipart/form-data; boundary="+u),c.each(c.extend(p,b.settings.multipart_params),function(a,b){x+=v+u+w+'Content-Disposition: form-data; name="'+b+'"'+w+w,x+=unescape(encodeURIComponent(a))+w}),s=c.mimeTypes[d.name.replace(/^.+\.([^.]+)/,"$1").toLowerCase()]||"application/octet-stream",x+=v+u+w+'Content-Disposition: form-data; name="'+b.settings.file_data_name+'"; filename="'+unescape(encodeURIComponent(d.name))+'"'+w+"Content-Type: "+s+w+w+e+w+v+u+v+w,k=x.length-e.length,e=x,l.sendAsBinary)l.sendAsBinary(e);else if(i.canSendBinary){for(var y=new Uint8Array(e.length),z=0;z<e.length;z++)y[z]=255&e.charCodeAt(z);l.send(y.buffer)}return}}t=c.buildUrl(b.settings.url,c.extend(p,b.settings.multipart_params)),l.open("post",t,!0),l.setRequestHeader("Content-Type","application/octet-stream"),c.each(b.settings.headers,function(a,b){l.setRequestHeader(b,a)}),l.send(e)}var n,o,p,q,r,s,t=b.settings.url;d.status!=c.DONE&&d.status!=c.FAILED&&b.state!=c.STOPPED&&(p={name:d.target_name||d.name},k.chunk_size&&d.size>k.chunk_size&&(i.chunks||"string"==typeof f)?(q=k.chunk_size,o=Math.ceil(d.size/q),r=Math.min(q,d.size-h*q),n="string"==typeof f?f.substring(h*q,h*q+r):e(f,h*q,h*q+r),p.chunk=h,p.chunks=o):(r=d.size,n=f),"string"!=typeof n&&l&&i.cantSendBlobInFormData&&i.chunks&&b.settings.chunk_size?(l.onload=function(){m(l.result)},l.readAsBinaryString(n)):m(n))}var h=0,j=0,l="FileReader"in a?new FileReader:null;g()}var j,k=b.settings;j=m[d.id],i.jpgresize&&b.settings.resize&&/\.(png|jpg|jpeg)$/i.test(d.name)?g.call(b,d,b.settings.resize,/\.png$/i.test(d.name)?"image/png":"image/jpeg",function(a){a.success?(d.size=a.data.length,h(a.data)):h(j)}):!i.chunks&&i.jpgresize?f(j,h):h(j)}),d.bind("Destroy",function(a){var d,e,f=b.body,g={inputContainer:a.id+"_html5_container",inputFile:a.id+"_html5",browseButton:a.settings.browse_button,dropElm:a.settings.drop_element};for(d in g)e=b.getElementById(g[d]),e&&c.removeAllEvents(e,a.id);c.removeAllEvents(b.body,a.id),a.settings.container&&(f=b.getElementById(a.settings.container)),f.removeChild(b.getElementById(g.inputContainer))}),void e({success:!0})):void e({success:!1})}})}(window,document,plupload),function(a,b,c){function d(a){return b.getElementById(a)}c.runtimes.Html4=c.addRuntime("html4",{getFeatures:function(){return{multipart:!0,triggerDialog:c.ua.gecko&&a.FormData||c.ua.webkit}},init:function(e,f){e.bind("Init",function(f){function g(){var a,h,i,j;k=c.guid(),r.push(k),a=b.createElement("form"),a.setAttribute("id","form_"+k),a.setAttribute("method","post"),a.setAttribute("enctype","multipart/form-data"),a.setAttribute("encoding","multipart/form-data"),a.setAttribute("target",f.id+"_iframe"),a.style.position="absolute",h=b.createElement("input"),h.setAttribute("id","input_"+k),h.setAttribute("type","file"),h.setAttribute("accept",t),h.setAttribute("size",1),j=d(f.settings.browse_button),f.features.triggerDialog&&j&&c.addEvent(d(f.settings.browse_button),"click",function(a){h.click(),a.preventDefault()},f.id),c.extend(h.style,{width:"100%",height:"100%",opacity:0,fontSize:"999px"}),c.extend(a.style,{overflow:"hidden"}),i=f.settings.shim_bgcolor,i&&(a.style.background=i),s&&c.extend(h.style,{filter:"alpha(opacity=0)"}),c.addEvent(h,"change",function(b){var i,l=b.target,m=[];l.value&&(d("form_"+k).style.top="-1048575px",i=l.value.replace(/\\/g,"/"),i=i.substring(i.length,i.lastIndexOf("/")+1),m.push(new c.File(k,i)),f.features.triggerDialog?c.removeEvent(j,"click",f.id):c.removeAllEvents(a,f.id),c.removeEvent(h,"change",f.id),g(),m.length&&e.trigger("FilesAdded",m))},f.id),a.appendChild(h),p.appendChild(a),f.refresh()}function h(){var d=b.createElement("div");d.innerHTML='<iframe id="'+f.id+'_iframe" name="'+f.id+'_iframe" src="'+q+':""" style="display:none"></iframe>',i=d.firstChild,p.appendChild(i),c.addEvent(i,"load",function(b){var d,e,g=b.target;if(j){try{d=g.contentWindow.document||g.contentDocument||a.frames[g.id].document}catch(h){return void f.trigger("Error",{code:c.SECURITY_ERROR,message:c.translate("Security error."),file:j})}e=d.body.innerHTML,e&&(j.status=c.DONE,j.loaded=1025,j.percent=100,f.trigger("UploadProgress",j),f.trigger("FileUploaded",j,{response:e}))}},f.id)}var i,j,k,l,m,n,o,p=b.body,q="javascript",r=[],s=/MSIE/.test(navigator.userAgent),t=[],u=f.settings.filters;a:for(l=0;l<u.length;l++)for(m=u[l].extensions.split(/,/),o=0;o<m.length;o++){if("*"===m[o]){t=[];break a}n=c.mimeTypes[m[o]],n&&t.push(n)}t=t.join(","),f.settings.container&&(p=d(f.settings.container),"static"===c.getStyle(p,"position")&&(p.style.position="relative")),f.bind("UploadFile",function(a,e){var f,g;e.status!=c.DONE&&e.status!=c.FAILED&&a.state!=c.STOPPED&&(f=d("form_"+e.id),g=d("input_"+e.id),g.setAttribute("name",a.settings.file_data_name),f.setAttribute("action",a.settings.url),c.each(c.extend({name:e.target_name||e.name},a.settings.multipart_params),function(a,d){var e=b.createElement("input");c.extend(e,{type:"hidden",name:d,value:a}),f.insertBefore(e,f.firstChild)}),j=e,d("form_"+k).style.top="-1048575px",f.submit(),f.parentNode.removeChild(f))}),f.bind("FileUploaded",function(a){a.refresh()}),f.bind("StateChanged",function(b){b.state==c.STARTED&&h(),b.state==c.STOPPED&&a.setTimeout(function(){c.removeEvent(i,"load",b.id),i.parentNode&&i.parentNode.removeChild(i)},0)}),f.bind("Refresh",function(a){var e,f,g,h,i,j,l,m,n;e=d(a.settings.browse_button),e&&(i=c.getPos(e,d(a.settings.container)),j=c.getSize(e),l=d("form_"+k),m=d("input_"+k),c.extend(l.style,{top:i.y+"px",left:i.x+"px",width:j.w+"px",height:j.h+"px"}),a.features.triggerDialog&&("static"===c.getStyle(e,"position")&&c.extend(e.style,{position:"relative"}),n=parseInt(e.style.zIndex,10),isNaN(n)&&(n=0),c.extend(e.style,{zIndex:n}),c.extend(l.style,{zIndex:n-1})),g=a.settings.browse_button_hover,h=a.settings.browse_button_active,f=a.features.triggerDialog?e:l,g&&(c.addEvent(f,"mouseover",function(){c.addClass(e,g)},a.id),c.addEvent(f,"mouseout",function(){c.removeClass(e,g)},a.id)),h&&(c.addEvent(f,"mousedown",function(){c.addClass(e,h)},a.id),c.addEvent(b.body,"mouseup",function(){c.removeClass(e,h)},a.id)))}),e.bind("FilesRemoved",function(a,b){var c,e;for(c=0;c<b.length;c++)e=d("form_"+b[c].id),e&&e.parentNode.removeChild(e)}),e.bind("Destroy",function(a){var e,f,g,h={inputContainer:"form_"+k,inputFile:"input_"+k,browseButton:a.settings.browse_button};for(e in h)f=d(h[e]),f&&c.removeAllEvents(f,a.id);c.removeAllEvents(b.body,a.id),c.each(r,function(a){g=d("form_"+a),g&&p.removeChild(g)})}),g()}),f({success:!0})}})}(window,document,plupload);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings