(function() {var h,ba=ba||{},k=this,ca=function(){},da=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&& !a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},l=function(a){return void 0!==a},n=function(a){return"array"==da(a)},ea=function(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},q=function(a){return"number"==typeof a},r=function(a){return"function"==da(a)},s=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},fa=function(a, b,c){return a.call.apply(a.bind,arguments)},ga=function(a,b,c){if(!a)throw Error();if(2b?e+="000":256>b?e+="00":4096>b&&(e+="0");return wa[a]= e+b.toString(16)}),'"')};var ya=function(a){Error.captureStackTrace?Error.captureStackTrace(this,ya):this.stack=Error().stack||"";a&&(this.message=String(a))};v(ya,Error);ya.prototype.name="CustomError";var za=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1")&&(a=a.replace(Da,">"));-1!=a.indexOf('"')&&(a=a.replace(Ea,"""));-1!=a.indexOf("'")&&(a=a.replace(Fa,"'"));return a},Ba=/&/g,Ca=//g,Ea=/"/g,Fa=/'/g,Aa=/[&<>"']/,Ha=function(a, b){return ab?1:0};var Ia=function(a,b){b.unshift(a);ya.call(this,za.apply(null,b));b.shift()};v(Ia,ya);Ia.prototype.name="AssertionError";var y=function(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b)var e=e+(": "+b),f=d;throw new Ia(""+e,f||[]);}return a},Ja=function(a,b){throw new Ia("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var B=Array.prototype,Ka=B.indexOf?function(a,b,c){y(null!=a.length);return B.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?null:p(a)?a.charAt(b):a[b]},Oa=function(a,b){var c=Ka(a,b),d;if(d=0<=c)y(null!=a.length),B.splice.call(a,c,1);return d},Pa=function(a){return B.concat.apply(B,arguments)},Qa=function(a,b){for(var c=1;c=arguments.length?B.slice.call(a,b):B.slice.call(a,b,c)},Ta=function(a){var b=["properties"];if(!ea(a)||!ea(b)||a.length!=b.length)return!1;for(var c=a.length,d=Sa,e=0;eparseFloat(hb)){gb=String(lb);break t}}gb=hb} var nb=gb,ob={},D=function(a){var b;if(!(b=ob[a])){b=0;for(var c=String(nb).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(c.length,d.length),f=0;0==b&&f++d,"infinite loop")}c=this.Qa;d=a.type||a;if(p(a))a=new Va(a,c);else if(a instanceof Va)a.target=a.target||c;else{var e=a;a=new Va(d,c);ra(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Y&&0<=g;g--)f=a.currentTarget=b[g],e=wb(f,d,!0,a)&&e;a.Y||(f=a.currentTarget=c,e=wb(f,d,!0,a)&&e,a.Y||(e=wb(f,d,!1,a)&&e));if(b)for(g=0;!a.Y&&g=c.length)throw xb;var g=c[b++];return a?g:d[g]}};return g};var Ab=function(a){if("function"==typeof a.n)return a.n();if(p(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;db.length){c.push(Eb(a)+"(");for(var d=a.arguments,e=0;e=Nb(this).value)for(r(b)&&(b=b()),a=this.Ta(a,b,c),b="log:"+a.Pa,k.console&&(k.console.timeStamp?k.console.timeStamp(b):k.console.markTimeline&&k.console.markTimeline(b)),k.msWriteProfilerMark&&k.msWriteProfilerMark(b),b=this;b;){c=b;var d=a;if(c.Ba)for(var e=0,f=void 0;f=c.Ba[e];e++)f(d);b=b.getParent()}}; F.prototype.Ta=function(a,b,c){var d=new Gb(a,String(b),this.L);if(c){d.xa=c;var e;var f=arguments.callee.caller;try{var g;var m;e:{for(var w=["window","location","href"],A=k,z;z=w.shift();)if(null!=A[z])A=A[z];else{m=null;break e}m=A}if(p(c))g={message:c,name:"Unknown error",lineNumber:"Not available",fileName:m,stack:"Not available"};else{var Z,aa,w=!1;try{Z=c.lineNumber||c.ub||"Not available"}catch(re){Z="Not available",w=!0}try{aa=c.fileName||c.filename||c.sourceURL||k.$googDebugFname||m}catch(se){aa= "Not available",w=!0}g=!w&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||"Not available",name:c.name||"UnknownError",lineNumber:Z,fileName:aa,stack:c.stack||"Not available"}}e="Message: "+Ga(g.message)+'\nUrl: '+g.fileName+"\nLine: "+g.lineNumber+"\n\nBrowser stack:\n"+Ga(g.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Ga(Db(f)+"-> ")}catch(ae){e="Exception trying to expose exception! You win, we lose. "+ae}d.wa=e}return d}; var Ob={},Pb=null,Qb=function(a){Pb||(Pb=new F(""),Ob[""]=Pb,Pb.za(Lb));var b;if(!(b=Ob[a])){b=new F(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Qb(a.substr(0,c));c.qa||(c.qa={});c.qa[d]=b;b.X=c;Ob[a]=b}return b};var G=function(a,b){a&&a.log(Mb,b,void 0)};var Rb=function(a,b,c){if(r(a))c&&(a=t(a,c));else if(a&&"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647b&&(b+=e);return[sc,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var xc=function(a,b){a=x(a);a.json_format="v2";return J("/value",vc(a),b)};u("ee.data.getValue",xc);var yc=function(a,b){a=x(a);a.json_format="v2";n(a.size)&&(a.size=a.size.join("x"));var c=vc(a).add("getid","1");return J("/thumb",c,b)};u("ee.data.getThumbId",yc); var zc=function(a){return sc+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};u("ee.data.makeThumbUrl",zc);var Ac=function(a,b){a=x(a);a.json_format="v2";return J("/download",vc(a),b)};u("ee.data.getDownloadId",Ac);var Bc=function(a){return sc+"/api/download?docid="+a.docid+"&token="+a.token};u("ee.data.makeDownloadUrl",Bc);u("ee.data.createAsset",function(a,b,c){a={value:a,json_format:"v2"};void 0!==b&&(a.id=b);return J("/create",vc(a),c)}); u("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return J("/newtaskid",vc(c),b)});u("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid task_id: expected a string or an array of strings.");return J("/taskstatus?q="+a.join(),null,b,"GET")});u("ee.data.prepareValue",function(a,b,c){b=x(b);b.tid=a;return J("/prepare",vc(b),c)});u("ee.data.startProcessing",function(a,b,c){b=x(b);b.id=a;return J("/processingrequest",vc(b),c)}); var J=function(a,b,c,d){function e(a,b){var c=!1;try{var d=sa(a),e=d.data}catch(f){c=!0}var aa=void 0;c||!("data"in d||"error"in d)?aa="Malformed response: "+a:"error"in d&&(aa=d.error.message);if(b)b(e,aa);else{if(!aa)return e;throw Error(aa);}}uc();d=d||"POST";a=rc+a;b=b?b.toString():"";if(c)ec(a,function(a){var b;a=a.target;try{b=a.a?a.a.responseText:""}catch(d){G(a.h,"Can not get responseText: "+d.message),b=""}return e(b,c)},d,b);else{var f=H();f.open(d,a,!1);f.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");f.send(b);return e(f.responseText,null)}},vc=function(a){var b=new oc,c;for(c in a)b.set(c,a[c]);return b};var Cc=function(){};var Dc=function(){};var Ec=function(){this.b=Array(4);this.Ma=Array(64);this.W=this.J=0;this.reset()};v(Ec,Dc);Ec.prototype.reset=function(){this.b[0]=1732584193;this.b[1]=4023233417;this.b[2]=2562383102;this.b[3]=271733878;this.W=this.J=0}; var Fc=function(a,b,c){c||(c=0);var d=Array(16);if(p(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.b[0];c=a.b[1];var e=a.b[2],f=a.b[3],g=0,g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e& (f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g= e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295| g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295| g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295| g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^ b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295; f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+ (g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295; c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.b[0]=a.b[0]+b&4294967295;a.b[1]=a.b[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.b[2]=a.b[2]+e&4294967295;a.b[3]=a.b[3]+f&4294967295}; Ec.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-64,d=this.Ma,e=this.J,f=0;fa.J?64:128)-a.J);b[0]=128;for(var c=1;cc;++c)for(var e=0;32>e;e+=8)b[d++]=a.b[c]>>>e&255;return b};var Ic=function(a){this.T="__ee_hash__";this.ga=!1!==a;this.D=[];this.r={}};u("ee.Serializer",Ic);var Jc=new ta,Gc=new Ec,Lc=function(a){return Kc(new Ic(!0),a)};u("ee.Serializer.encode",Lc);var Mc=function(a){return Jc.g(Lc(a))};u("ee.Serializer.toJSON",Mc);var Nc=function(a){a=Kc(new Ic(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Jc.g(a)};u("ee.Serializer.toReadableJSON",Nc); var Kc=function(a,b){var c=a.U(b);if(a.ga){c=s(c)&&"ValueRef"==c.type&&1==a.D.length?a.D[0][1]:{type:"CompoundValue",scope:a.D,value:c};a.D=[];for(var d in a.r)delete a.r[d].object[a.T];a.r={}}return c}; Ic.prototype.U=function(a){if(!l(a))throw Error("Can't encode an undefined value.");var b,c=s(a)?a[this.T]:null;if(this.ga&&null!=c&&this.r[c])return{type:"ValueRef",value:this.r[c].name};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(s(a)&&"function"==typeof a.getFullYear)return{type:"Date",value:Math.floor(1E3*a.getTime())};if(a instanceof Cc){if(b=a.d(t(this.U,this)),!s(b)||"ArgumentRef"==b.type)return b}else if(n(a))b=C(a,function(a){return this.U(a)},this);else if(s(a)&&!r(a))b=la(a, function(a){if(!r(a))return this.U(a)},this),oa(b,this.T),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.ga){Gc.reset();Gc.update(Jc.g(b));var c=Hc(),d;this.r[c]?d=this.r[c].name:(d=String(this.D.length),this.D.push([d,b]),this.r[c]={name:d,object:a});a[this.T]=c;return{type:"ValueRef",value:d}}return b};var K=function(a,b){if(!(this instanceof K))return new K(a,b);this.e=a;this.j=b};v(K,Cc);u("ee.ComputedObject",K);K.prototype.i=function(a){return xc({json:this.g()},a)};u("ee.ComputedObject.prototype.getInfo",K.prototype.i);K.prototype.d=function(a){var b={},c;for(c in this.j)l(this.j[c])&&(b[c]=a(this.j[c]));b={type:"Invocation",arguments:b};a=a(this.e);b[p(a)?"functionName":"function"]=a;return b};K.prototype.g=function(){return Mc(this)};u("ee.ComputedObject.prototype.serialize",K.prototype.g); K.prototype.toString=function(){return"ee."+this.name()+"("+Nc(this)+")"};u("ee.ComputedObject.prototype.toString",K.prototype.toString);K.prototype.name=function(){return"ComputedObject"};var L=function(){if(!(this instanceof L))return new L};v(L,Cc);u("ee.Function",L);var Oc=function(a){return a};L.prototype.call=function(a){return this.apply(Pc(this,Array.prototype.slice.call(arguments,0)))};u("ee.Function.prototype.call",L.prototype.call);L.prototype.apply=function(a){a=new K(this,Qc(this,a));return Oc(a,this.p().returns)};u("ee.Function.prototype.apply",L.prototype.apply); var Qc=function(a,b){for(var c=a.p().args,d={},e={},f=0;f/,"");for(var c=0;c/,"");return new M(b,a)}),a&&a())};a?J("/algorithms",null,c,"GET"):c(J("/algorithms",null,void 0,"GET"))}},O=function(a,b,c,d){ad();var e=d||"";ia(ja,function(d,g){var m=g.split(".");if(2==m.length&&m[0]==b){var w=e+m[1],A=d.p();$c[g]=!0;var z=!1;A.args.length&&(m=A.args[0].type,z="Object"!=m&&Uc(m, c));m=z?a.prototype:a;w in m&&(w+="_");m[w]=function(a){var b=Array.prototype.slice.call(arguments,0);if(1==b.length&&Xc(b[0])){if(b=x(b[0]),z){var c=A.args[0].name;if(c in b)throw Error("Named args for "+w+" can't contain keyword "+c);b[c]=this}}else b=Pc(d,z?[this].concat(b):b);return d.apply(b)};m[w].toString=t(d.toString,d,w,z);m[w].signature=A}})},P=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var dd=function(a,b){if(!(this instanceof dd))return new dd(a,b);for(var c=[],d=a.args,e=0;eb||4/,"");c[f]=!0}var a=["List"],g;for(g in a)b[g]&&delete b[g];var m=k.ee,w;for(w in b)w in c&&!(w in m)&&(m[w]=pe(w),ne.push(w));Rc=m;qe()}catch(A){me(A);return}ie="ready";for(je=[];0