!function(e,t){vari=function(){vare={};returnt.apply(e,arguments),e.moxie};"function"==typeofdefine&&define.amd?define("moxie",[],i):"object"==typeofmodule&&module.exports?module.exports=i():e.moxie=i()}(this||window,function(){!function(e,t){"use strict";functioni(e,t){for(vari,n=[],r=0;r<e.length;++r){if(i=a[e[r]]||o(e[r]),!i)throw"module definition dependecy not found: "+e[r];n.push(i)}t.apply(null,n)}functionn(e,n,r){if("string"!=typeofe)throw"invalid module definition, module id must be defined and be a string";if(n===t)throw"invalid module definition, dependencies must be specified";if(r===t)throw"invalid module definition, definition function must be specified";i(n,function(){a[e]=r.apply(null,arguments)})}functionr(e){return!!a[e]}functiono(t){for(vari=e,n=t.split(/[.\/]/),r=0;r<n.length;++r){if(!i[n[r]])return;i=i[n[r]]}returni}functions(i){for(varn=0;n<i.length;n++){for(varr=e,o=i[n],s=o.split(/[.\/]/),l=0;l<s.length-1;++l)r[s[l]]===t&&(r[s[l]]={}),r=r[s[l]];r[s[s.length-1]]=a[o]}}vara={};n("moxie/core/utils/Basic",[],function(){functione(e){vart;returne===t?"undefined":null===e?"null":e.nodeType?"node":{}.toString.call(e).match(/\s([a-z|A-Z]+)/)[1].toLowerCase()}functiont(){returns(!1,!1,arguments)}functioni(){returns(!0,!1,arguments)}functionn(){returns(!1,!0,arguments)}functionr(){returns(!0,!0,arguments)}functiono(i){switch(e(i)){case"array":returnArray.prototype.slice.call(i);case"object":returnt({},i)}returni}functions(t,i,n){varr,a=n[0];returnl(n,function(n,u){u>0&&l(n,function(n,l){varu=-1!==p(e(n),["array","object"]);return!!(n===r||t&&a[l]===r)||(u&&i&&(n=o(n)),void(e(a[l])===e(n)&&u?s(t,i,[a[l],n]):a[l]=n))})}),a}functiona(e,t){functioni(){this.constructor=e}for(varnint)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n]);returni.prototype=t.prototype,e.prototype=newi,e.__parent__=t.prototype,e}functionl(e,t){vari,n,r,o;if(e){try{i=e.length}catch(s){i=o}if(i===o||"number"!=typeofi){for(nine)if(e.hasOwnProperty(n)&&t(e[n],n)===!1)return}elsefor(r=0;i>r;r++)if(t(e[r],r)===!1)return}}functionu(t){vari;if(!t||"object"!==e(t))return!0;for(iint)return!1;return!0}functionc(t,i){functionn(r){"function"===e(t[r])&&t[r](function(e){++r<o&&!e?n(r):i(e)})}varr=0,o=t.length;"function"!==e(i)&&(i=function(){}),t&&t.length||i(),n(r)}functiond(e,t){vari=0,n=e.length,r=newArray(n);l(e,function(e,o){e(function(e){if(e)returnt(e);vars=[].slice.call(arguments);s.shift(),r[o]=s,i++,i===n&&(r.unshift(null),t.apply(this,r))})})}functionp(e,t){if(t){if(Array.prototype.indexOf)returnArray.prototype.indexOf.call(t,e);for(vari=0,n=t.length;n>i;i++)if(t[i]===e)returni}return-1}functionf(t,i){varn=[];"array"!==e(t)&&(t=[t]),"array"!==e(i)&&(i=[i]);for(varrint)-1===p(t[r],i)&&n.push(t[r]);return!!n.length&&n}functionm(e,t){vari=[];returnl(e,function(e){-1!==p(e,t)&&i.push(e)}),i.length?i:null}functionh(e){vart,i=[];for(t=0;t<e.length;t++)i[t]=e[t];returni}functiong(e){returne?String.prototype.trim?String.prototype.trim.call(e):e.toString().replace(/^\s*/,"").replace(/\s*$/,""):e}functionv(e){if("string"!=typeofe)returne;vart,i={t:1099511627776,g:1073741824,m:1048576,k:1024};returne=/^([0-9\.]+)([tmgk]?)$/.exec(e.toLowerCase().replace(/[^0-9\.tmkg]/g,"")),t=e[2],e=+e[1],i.hasOwnProperty(t)&&(e*=i[t]),Math.floor(e)}functionx(t){vari=[].slice.call(arguments,1);returnt.replace(/%[a-z]/g,function(){vart=i.shift();return"undefined"!==e(t)?t:""})}functiony(e,t){vari=this;setTimeout(function(){e.call(i)},t||1)}varE=function(){vare=0;returnfunction(t){vari,n=(newDate).getTime().toString(32);for(i=0;5>i;i++)n+=Math.floor(65535*Math.random()).toString(32);return(t||"o_")+n+(e++).toString(32)}}();return{guid:E,typeOf:e,extend:t,extendIf:i,extendImmutable:n,extendImmutableIf:r,inherit:a,each:l,isEmptyObj:u,inSeries:c,inParallel:d,inArray:p,arrayDiff:f,arrayIntersect:m,toArray:h,trim:g,sprintf:x,parseSizeStr:v,delay:y}}),n("moxie/core/utils/Encode",[],function(){vare=function(e){returnunescape(encodeURIComponent(e))},t=function(e){returndecodeURIComponent(e
if(f=i.url.replace(/^.+?\/([\w\-\.]+)$/,"$1").toLowerCase(),p=u(),p.open(i.method,i.url,i.async,i.user,i.password),rinstanceofo)r.isDetached()&&(h=!0),r=r.getSource();elseif(rinstanceofs){if(r.hasBlob())if(r.getBlob().isDetached())r=d.call(a,r),h=!0;elseif((c||m)&&"blob"===t.typeOf(r.getBlob().getSource())&&window.FileReader)returnvoide.call(a,i,r);if(rinstanceofs){varg=newwindow.FormData;r.each(function(e,t){einstanceofo?g.append(t,e.getSource()):g.append(t,e)}),r=g}}p.upload?(i.withCredentials&&(p.withCredentials=!0),p.addEventListener("load",function(e){a.trigger(e)}),p.addEventListener("error",function(e){a.trigger(e)}),p.addEventListener("progress",function(e){a.trigger(e)}),p.upload.addEventListener("progress",function(e){a.trigger({type:"UploadProgress",loaded:e.loaded,total:e.total})})):p.onreadystatechange=function(){switch(p.readyState){case1:break;case2:break;case3:vare,t;try{n.hasSameOrigin(i.url)&&(e=p.getResponseHeader("Content-Length")||0),p.responseText&&(t=p.responseText.length)}catch(r){e=t=0}a.trigger({type:"progress",lengthComputable:!!e,total:parseInt(e,10),loaded:t});break;case4:p.onreadystatechange=function(){},0===p.status?a.trigger("error"):a.trigger("load")}},t.isEmptyObj(i.headers)||t.each(i.headers,function(e,t){p.setRequestHeader(t,e)}),""!==i.responseType&&"responseType"inp&&(p.responseType="json"!==i.responseType||l.can("return_response_type","json")?i.responseType:"text"),h?p.sendAsBinary?p.sendAsBinary(r):function(){for(vare=newUint8Array(r.length),t=0;t<r.length;t++)e[t]=255&r.charCodeAt(t);p.send(e.buffer)}():p.send(r),a.trigger("loadstart")},getStatus:function(){try{if(p)returnp.status}catch(e){}return0},getResponse:function(e){vart=this.getRuntime();try{switch(e){case"blob":varn=newr(t.uid,p.response),o=p.getResponseHeader("Content-Disposition");if(o){vars=o.match(/filename=([\'\"'])([^\1]+)\1/);s&&(f=s[2])}returnn.name=f,n.type||(n.type=i.getFileMime(f)),n;case"json":returnl.can("return_response_type","json")?p.response:200===p.status&&window.JSON?JSON.parse(p.responseText):null;case"document":returnc(p);default:return""!==p.responseText?p.responseText:null}}catch(a){returnnull}},getAllResponseHeaders:function(){try{returnp.getAllResponseHeaders()}catch(e){}return""},abort:function(){p&&p.abort()},destroy:function(){m=f=null}})}returne.XMLHttpRequest=u}),n("moxie/runtime/html5/utils/BinaryReader",["moxie/core/utils/Basic"],function(e){functiont(e){einstanceofArrayBuffer?i.apply(this,arguments):n.apply(this,arguments)}functioni(t){vari=newDataView(t);e.extend(this,{readByteAt:function(e){returni.getUint8(e)},writeByteAt:function(e,t){i.setUint8(e,t)},SEGMENT:function(e,n,r){switch(arguments.length){case2:returnt.slice(e,e+n);case1:returnt.slice(e);case3:if(null===r&&(r=newArrayBuffer),rinstanceofArrayBuffer){varo=newUint8Array(this.length()-n+r.byteLength);e>0&&o.set(newUint8Array(t.slice(0,e)),0),o.set(newUint8Array(r),e),o.set(newUint8Array(t.slice(e+n)),e+r.byteLength),this.clear(),t=o.buffer,i=newDataView(t);break}default:returnt}},length:function(){returnt?t.byteLength:0},clear:function(){i=t=null}})}functionn(t){functioni(e,i,n){n=3===arguments.length?n:t.length-i-1,t=t.substr(0,i)+e+t.substr(n+i)}e.extend(this,{readByteAt:function(e){returnt.charCodeAt(e)},writeByteAt:function(e,t){i(String.fromCharCode(t),e,1)},SEGMENT:function(e,n,r){switch(arguments.length){case1:returnt.substr(e);case2:returnt.substr(e,n);case3:i(null!==r?r:"",e,n);break;default:returnt}},length:function(){returnt?t.length:0},clear:function(){t=null}})}returne.extend(t.prototype,{littleEndian:!1,read:function(e,t){vari,n,r;if(e+t>this.length())thrownewError("You are trying to read outside the source boundaries.");for(n=this.littleEndian?0:-8*(t-1),r=0,i=0;t>r;r++)i|=this.readByteAt(e+r)<<Math.abs(n+8*r);returni},write:function(e,t,i){varn,r;if(e>this.length())thrownewError("You are trying to write outside the source boundaries.");for(n=this.littleEndian?0:-8*(i-1),r=0;i>r;r++)this.writeByteAt(e+r,255&t>>Math.abs(n+8*r))},BYTE:functi