(function e(b,g,d){function c(m,j){if(!g[m]){if(!b[m]){var i=typeof require=="function"&&require;if(!j&&i){return i(m,!0)}if(a){return a(m,!0)}var k=new Error("Cannot find module '"+m+"'");throw k.code="MODULE_NOT_FOUND",k}var h=g[m]={exports:{}};b[m][0].call(h.exports,function(l){var o=b[m][1][l];return c(o?o:l)},h,h.exports,e,b,g,d)}return g[m].exports}var a=typeof require=="function"&&require;for(var f=0;f1){for(var p=1;p0){m=this.composeFormData(this.uploadFiles,n)}else{l=this.lightHttpLib.stringifyParam(n)}if(s==="POST"){v.open(s,j,o);this.setHeaders(v,q);if(m){v.send(m)}else{v.setRequestHeader("Content-type","application/x-www-form-urlencoded");v.send(l)}}else{if(l){if(j.match(/\?/)){j+="&"+l}else{j+="?"+l}}v.open(s,j,o);this.setHeaders(v,q);v.send()}this.clear();if(true===p){return i.promise}};h.instantiateRequest=function(){var k;if(window.XMLHttpRequest){k=new XMLHttpRequest();if(k.overrideMimeType){k.overrideMimeType("text/xml")}}else{if(window.ActiveXObject){try{k=new ActiveXObject("Msxml2.XMLHTTP")}catch(j){try{k=new ActiveXObject("Microsoft.XMLHTTP")}catch(i){}}}}return k};h.responseHandler=function(j){var l="",i={},k;k=j.xhr;if(k.readyState==4){i=k;l=k.responseText;if(true===j.isPromise){j.defer.resolve(l,i)}else{if(j.callback){j.callback(l,i)}}}};h.setHeaders=function(k,j){for(var i in j){k.setRequestHeader(i,j[i])}};h.timeoutHandler=function(i){};h.jsonpHandler=function(){};h.cleanJsonpCallback=function(){var i;for(i in this.jsonpCallbackList){if(this.jsonpCallbackList[i]===1){try{delete window[i]}catch(j){}}}};window.lightHttp=g;if(c){c=c.exports=new g();c.constructor=g}}())},{"./lib.js":2,q:4}],4:[function(b,c,a){(function(d){ /*! * * Copyright 2009-2012 Kris Kowal under the terms of the MIT * license found at http://github.com/kriskowal/q/raw/master/LICENSE * * With parts by Tyler Close * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found * at http://www.opensource.org/licenses/mit-license.html * Forked at ref_send.js version: 2009-05-11 * * With parts by Mark Miller * Copyright (C) 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ (function(f){if(typeof bootstrap==="function"){bootstrap("promise",f)}else{if(typeof a==="object"&&typeof c==="object"){c.exports=f()}else{if(typeof define==="function"&&define.amd){define(f)}else{if(typeof ses!=="undefined"){if(!ses.ok()){return}else{ses.makeQ=f}}else{if(typeof window!=="undefined"||typeof self!=="undefined"){var h=typeof window!=="undefined"?window:self;var g=h.Q;h.Q=f();h.Q.noConflict=function(){h.Q=g;return this}}else{throw new Error("This environment was not anticipated by Q. Please file a bug.")}}}}}})(function(){var I=false;try{throw new Error()}catch(an){I=!!an.stack}var y=ab();var n;var aj=function(){};var ao=(function(){var ay={task:void 0,next:null};var aw=ay;var ar=false;var at=void 0;var Q=false;var au=[];function az(){var aB,aC;while(ay.next){ay=ay.next;aB=ay.task;ay.task=void 0;aC=ay.domain;if(aC){ay.domain=void 0;aC.enter()}aA(aB,aC)}while(au.length){aB=au.pop();aA(aB)}ar=false}function aA(aB,aC){try{aB()}catch(aD){if(Q){if(aC){aC.exit()}setTimeout(az,0);if(aC){aC.enter()}throw aD}else{setTimeout(function(){throw aD},0)}}if(aC){aC.exit()}}ao=function(aB){aw=aw.next={task:aB,domain:Q&&d.domain,next:null};if(!ar){ar=true;at()}};if(typeof d==="object"&&d.toString()==="[object process]"&&d.nextTick){Q=true;at=function(){d.nextTick(az)}}else{if(typeof setImmediate==="function"){if(typeof window!=="undefined"){at=setImmediate.bind(window,az)}else{at=function(){setImmediate(az)}}}else{if(typeof MessageChannel!=="undefined"){var av=new MessageChannel();av.port1.onmessage=function(){at=ax;av.port1.onmessage=az;az()};var ax=function(){av.port2.postMessage(0)};at=function(){setTimeout(az,0);ax()}}else{at=function(){setTimeout(az,0)}}}}ao.runAfter=function(aB){au.push(aB);if(!ar){ar=true;at()}};return ao})();var f=Function.call;function t(Q){return function(){return f.apply(Q,arguments)}}var ag=t(Array.prototype.slice);var h=t(Array.prototype.reduce||function(au,at){var Q=0,ar=this.length;if(arguments.length===1){do{if(Q in this){at=this[Q++];break}if(++Q>=ar){throw new TypeError()}}while(1)}for(;Q=y&&Q<=w}function ab(){if(!I){return}try{throw new Error()}catch(au){var Q=au.stack.split("\n");var ar=Q[0].indexOf("@")>0?Q[1]:Q[2];var at=al(ar);if(!at){return}n=at[0];return at[1]}}function G(at,Q,ar){return function(){if(typeof console!=="undefined"&&typeof console.warn==="function"){console.warn(Q+" is deprecated, use "+ar+" instead.",new Error("").stack)}return at.apply(at,arguments)}}function p(Q){if(Q instanceof T){return Q}if(S(Q)){return R(Q)}else{return D(Q)}}p.resolve=p;p.nextTick=ao;p.longStackSupport=false;if(typeof d==="object"&&d&&d.env&&d.env.Q_DEBUG){p.longStackSupport=true}p.defer=l;function l(){var at=[],av=[],au;var Q=L(l.prototype);var ax=L(T.prototype);ax.promiseDispatch=function(aA,aB,az){var ay=ag(arguments);if(at){at.push(ay);if(aB==="when"&&az[1]){av.push(az[1])}}else{p.nextTick(function(){au.promiseDispatch.apply(au,ay)})}};ax.valueOf=function(){if(at){return ax}var ay=N(au);if(C(ay)){au=ay}return ay};ax.inspect=function(){if(!au){return{state:"pending"}}return au.inspect()};if(p.longStackSupport&&I){try{throw new Error()}catch(aw){ax.stack=aw.stack.substring(aw.stack.indexOf("\n")+1)}}function ar(ay){au=ay;ax.source=ay;h(at,function(aA,az){p.nextTick(function(){ay.promiseDispatch.apply(ay,az)})},void 0);at=void 0;av=void 0}Q.promise=ax;Q.resolve=function(ay){if(au){return}ar(p(ay))};Q.fulfill=function(ay){if(au){return}ar(D(ay))};Q.reject=function(ay){if(au){return}ar(H(ay))};Q.notify=function(ay){if(au){return}h(av,function(aA,az){p.nextTick(function(){az(ay)})},void 0)};return Q}l.prototype.makeNodeResolver=function(){var Q=this;return function(ar,at){if(ar){Q.reject(ar)}else{if(arguments.length>2){Q.resolve(ag(arguments,1))}else{Q.resolve(at)}}}};p.Promise=Y;p.promise=Y;function Y(at){if(typeof at!=="function"){throw new TypeError("resolver must be a function.")}var Q=l();try{at(Q.resolve,Q.reject,Q.notify)}catch(ar){Q.reject(ar)}return Q.promise}Y.race=r;Y.all=B;Y.reject=H;Y.resolve=p;p.passByCopy=function(Q){return Q};T.prototype.passByCopy=function(){return this};p.join=function(Q,ar){return p(Q).join(ar)};T.prototype.join=function(Q){return p([this,Q]).spread(function(ar,at){if(ar===at){return ar}else{throw new Error("Can't join: not the same: "+ar+" "+at)}})};p.race=r;function r(Q){return Y(function(av,au){for(var at=0,ar=Q.length;at