Files
openapi-generator/modules/swagger-codegen/src/main/resources/htmlDocs2/js_jsonref.mustache
2016-07-25 15:36:05 +02:00

4 lines
25 KiB
Plaintext

<script>
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.JsonRefs=t()}}(function(){var t;return function e(t,n,r){function o(s,u){if(!n[s]){if(!t[s]){var a="function"==typeof require&&require;if(!u&&a)return a(s,!0);if(i)return i(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[s]={exports:{}};t[s][0].call(f.exports,function(e){var n=t[s][1][e];return o(n?n:e)},f,f.exports,e,t,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)o(r[s]);return o}({1:[function(t,e,n){"use strict";function r(t,e){var n=p[t],r=Promise.resolve(),o=-1===t.indexOf(":")?void 0:t.split(":")[0];return a.isUndefined(n)?-1!==h.indexOf(o)||a.isUndefined(o)?(r=c.load(t,e),r=r.then(e.processContent?function(n){return e.processContent(n,t)}:JSON.parse),r=r.then(function(e){return p[t]=e,e})):r=r.then(function(){return Promise.reject(new Error("Unsupported remote reference scheme: "+o))}):r=r.then(function(){return n}),r=r.then(function(t){return a.cloneDeep(t)})}function o(t,e){var n=m(t);return v(e)&&(e=-1===e.indexOf("#")?"#":e.substring(e.indexOf("#"))),d(n.concat(m(e))).replace(/\/\$ref/g,"")}function i(t,e){function n(t){".."===t?o.pop():"."!==t&&o.push(t)}var r="#"!==e.charAt(0)&&-1===e.indexOf(":"),o=[],i=(e.indexOf("#")>-1?e.split("#")[0]:e).split("/");return t&&(t.indexOf("#")>-1&&(t=t.substring(0,t.indexOf("#"))),t.length>1&&"/"===t[t.length-1]&&(t=t.substring(0,t.length-1)),t.split("#")[0].split("/").forEach(n)),r?i.forEach(n):o=i,o.join("/")}function s(t,e,n){function r(t){var e=t.slice(0,t.lastIndexOf("allOf")),o=n[d(e)];return a.isUndefined(o)?e.indexOf("allOf")>-1?r(e):void 0:d(e)}function i(t){var e=[],o=t.map(function(){var t,o=d(this.path),i=n[o];this.circular&&(e.push(o),a.isUndefined(i)&&(t=r(this.path),i=n[t]),a.isUndefined(i)||(i.circular=!0),this.update(0===u?{}:f(this.node).map(function(){this.circular&&this.parent.update({})})))});return a.each(e,function(t){var e,n=[],r=m(t),i=f(o).get(r);for(e=0;u>e;e++)n.push.apply(n,r),f(o).set(n,a.cloneDeep(i))}),o}function s(t,e){var r=o(e,"#"),i=t=-1===t.indexOf("#")?"#":t.substring(t.indexOf("#")),s=m(i),u=!c.has(s),a=c.get(s),f=m(e),p=f.slice(0,f.length-1),h=n[r]||{ref:t};u?h.missing=!0:0===p.length?(c.value===a&&(a={},h.circular=!0),c.value=a):(c.get(p)===a&&(a={},h.circular=!0),c.set(p,a)),n[r]=h}var u=a.isUndefined(e.depth)?1:e.depth,c=f(t);return a.each(y(t),function(t,e){v(t)||s(t,e)}),a.isUndefined(e.location)||a.each(n,function(t){var n=t.ref;0===n.indexOf(e.location)&&(n=n.substring(e.location.length),"/"===n.charAt(0)&&(n=n.substring(1))),t.ref=n}),{metadata:n,resolved:i(c)}}function u(t,e,n,c,p){function h(t,e,r,i,s){var u,h=r+("#"===i?"":i),l=o(n,t),d=p[l]||{},y=m(t);a.isUndefined(s)?(d.circular=!0,u=c[r].ref):(u=f(s).get(m(i)),a.isUndefined(u)?d.missing=!0:u.$ref?u=u.$ref:y.pop()),0===y.length?g.value=u:g.set(y,u),d.ref=h,p[l]=d}function l(){return{metadata:p,resolved:g.value}}var d=Promise.resolve(),g=f(t);return a.each(y(t),function(t,s){v(t)&&(d=d.then(function(){var f=i(e.location,t),l=t.split("#"),d="#"+(l[1]||"");return a.isUndefined(c[f])?r(f,e).then(function(t){return t},function(t){return t}).then(function(r){var y=l[0],v=a.cloneDeep(e),m=o(n,s);return y=y.substring(0,y.lastIndexOf("/")+1),v.location=i(e.location,y),a.isError(r)?void(p[m]={err:r,missing:!0,ref:t}):(c[f]={ref:n},u(r,v,m,c,p).then(function(e){return delete c[f],h(s,t,f,d,e.resolved),e}))}):void h(s,t,f,d)}))}),d=d.then(function(){s(g.value,e,p)}).then(l,l)}"undefined"==typeof Promise&&t("native-promise-only");var a=t("./lib/utils"),c=t("path-loader"),f=t("traverse"),p={},h=["file","http","https"];e.exports.clearCache=function(){p={}};var l=e.exports.isJsonReference=function(t){return a.isPlainObject(t)&&a.isString(t.$ref)},d=e.exports.pathToPointer=function(t){if(a.isUndefined(t))throw new Error("path is required");if(!a.isArray(t))throw new Error("path must be an array");var e="#";return t.length>0&&(e+="/"+t.map(function(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}).join("/")),e},y=e.exports.findRefs=function(t){if(a.isUndefined(t))throw new Error("json is required");if(!a.isPlainObject(t))throw new Error("json must be an object");return f(t).reduce(function(t){var e=this.node;return"$ref"===this.key&&l(this.parent.node)&&(t[d(this.path)]=e),t},{})},v=e.exports.isRemotePointer=function(t){if(a.isUndefined(t))throw new Error("ptr is required");if(!a.isString(t))throw new Error("ptr must be a string");return""!==t&&"#"!==t.charAt(0)},m=e.exports.pathFromPointer=function(t){if(a.isUndefined(t))throw new Error("ptr is required");if(!a.isString(t))throw new Error("ptr must be a string");var e=[],n=["","#","#/"];return v(t)?e=t:-1===n.indexOf(t)&&"#"===t.charAt(0)&&(e=t.substring(t.indexOf("/")).split("/").reduce(function(t,e){return""!==e&&t.push(e.replace(/~0/g,"~").replace(/~1/g,"/")),t},[])),e};e.exports.resolveRefs=function(t,e,n){var r=Promise.resolve();return 2===arguments.length&&a.isFunction(e)&&(n=e,e={}),a.isUndefined(e)&&(e={}),r=r.then(function(){if(a.isUndefined(t))throw new Error("json is required");if(!a.isPlainObject(t))throw new Error("json must be an object");if(!a.isPlainObject(e))throw new Error("options must be an object");if(!a.isUndefined(n)&&!a.isFunction(n))throw new Error("done must be a function");if(!a.isUndefined(e.processContent)&&!a.isFunction(e.processContent))throw new Error("options.processContent must be a function");if(!a.isUndefined(e.prepareRequest)&&!a.isFunction(e.prepareRequest))throw new Error("options.prepareRequest must be a function");if(!a.isUndefined(e.location)&&!a.isString(e.location))throw new Error("options.location must be a string");if(!a.isUndefined(e.depth)&&!a.isNumber(e.depth))throw new Error("options.depth must be a number");if(!a.isUndefined(e.depth)&&e.depth<0)throw new Error("options.depth must be greater or equal to zero")}),t=f(t).clone(),e=f(e).clone(),r=r.then(function(){return u(t,e,"#",{},{})}).then(function(t){return s(t.resolved,e,t.metadata)}),!a.isUndefined(n)&&a.isFunction(n)&&(r=r.then(function(t){n(void 0,t.resolved,t.metadata)},function(t){n(t)})),r}},{"./lib/utils":2,"native-promise-only":3,"path-loader":4,traverse:10}],2:[function(t,e,n){"use strict";function r(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}var o=t("traverse");e.exports.cloneDeep=function(t){return o(t).clone()};var i=e.exports.isArray=function(t){return r(t,"Array")};e.exports.isError=function(t){return r(t,"Error")},e.exports.isFunction=function(t){return r(t,"Function")},e.exports.isNumber=function(t){return r(t,"Number")};var s=e.exports.isPlainObject=function(t){return r(t,"Object")};e.exports.isString=function(t){return r(t,"String")},e.exports.isUndefined=function(t){return"undefined"==typeof t},e.exports.each=function(t,e){i(t)?t.forEach(e):s(t)&&Object.keys(t).forEach(function(n){e(t[n],n)})}},{traverse:10}],3:[function(e,n,r){(function(e){!function(e,r,o){r[e]=r[e]||o(),"undefined"!=typeof n&&n.exports?n.exports=r[e]:"function"==typeof t&&t.amd&&t(function(){return r[e]})}("Promise","undefined"!=typeof e?e:this,function(){"use strict";function t(t,e){h.add(t,e),p||(p=d(h.drain))}function e(t){var e,n=typeof t;return null==t||"object"!=n&&"function"!=n||(e=t.then),"function"==typeof e?e:!1}function n(){for(var t=0;t<this.chain.length;t++)r(this,1===this.state?this.chain[t].success:this.chain[t].failure,this.chain[t]);this.chain.length=0}function r(t,n,r){var o,i;try{n===!1?r.reject(t.msg):(o=n===!0?t.msg:n.call(void 0,t.msg),o===r.promise?r.reject(TypeError("Promise-chain cycle")):(i=e(o))?i.call(o,r.resolve,r.reject):r.resolve(o))}catch(s){r.reject(s)}}function o(r){var s,a=this;if(!a.triggered){a.triggered=!0,a.def&&(a=a.def);try{(s=e(r))?t(function(){var t=new u(a);try{s.call(r,function(){o.apply(t,arguments)},function(){i.apply(t,arguments)})}catch(e){i.call(t,e)}}):(a.msg=r,a.state=1,a.chain.length>0&&t(n,a))}catch(c){i.call(new u(a),c)}}}function i(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&t(n,r))}function s(t,e,n,r){for(var o=0;o<e.length;o++)!function(o){t.resolve(e[o]).then(function(t){n(o,t)},r)}(o)}function u(t){this.def=t,this.triggered=!1}function a(t){this.promise=t,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function c(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new a(this);this.then=function(e,o){var i={success:"function"==typeof e?e:!0,failure:"function"==typeof o?o:!1};return i.promise=new this.constructor(function(t,e){if("function"!=typeof t||"function"!=typeof e)throw TypeError("Not a function");i.resolve=t,i.reject=e}),r.chain.push(i),0!==r.state&&t(n,r),i.promise},this["catch"]=function(t){return this.then(void 0,t)};try{e.call(void 0,function(t){o.call(r,t)},function(t){i.call(r,t)})}catch(s){i.call(r,s)}}var f,p,h,l=Object.prototype.toString,d="undefined"!=typeof setImmediate?function(t){return setImmediate(t)}:setTimeout;try{Object.defineProperty({},"x",{}),f=function(t,e,n,r){return Object.defineProperty(t,e,{value:n,writable:!0,configurable:r!==!1})}}catch(y){f=function(t,e,n){return t[e]=n,t}}h=function(){function t(t,e){this.fn=t,this.self=e,this.next=void 0}var e,n,r;return{add:function(o,i){r=new t(o,i),n?n.next=r:e=r,n=r,r=void 0},drain:function(){var t=e;for(e=n=p=void 0;t;)t.fn.call(t.self),t=t.next}}}();var v=f({},"constructor",c,!1);return c.prototype=v,f(v,"__NPO__",0,!1),f(c,"resolve",function(t){var e=this;return t&&"object"==typeof t&&1===t.__NPO__?t:new e(function(e,n){if("function"!=typeof e||"function"!=typeof n)throw TypeError("Not a function");e(t)})}),f(c,"reject",function(t){return new this(function(e,n){if("function"!=typeof e||"function"!=typeof n)throw TypeError("Not a function");n(t)})}),f(c,"all",function(t){var e=this;return"[object Array]"!=l.call(t)?e.reject(TypeError("Not an array")):0===t.length?e.resolve([]):new e(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var o=t.length,i=Array(o),u=0;s(e,t,function(t,e){i[t]=e,++u===o&&n(i)},r)})}),f(c,"race",function(t){var e=this;return"[object Array]"!=l.call(t)?e.reject(TypeError("Not an array")):new e(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");s(e,t,function(t,e){n(e)},r)})}),c})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(t,e,n){"use strict";function r(t){return o[t.split(":")[0]]||i}var o={file:t("./lib/loaders/file"),http:t("./lib/loaders/http"),https:t("./lib/loaders/http")},i="object"==typeof window||"function"==typeof importScripts?o.http:o.file;"undefined"==typeof Promise&&t("native-promise-only"),e.exports.load=function(t,e,n){var o=Promise.resolve();return 2===arguments.length&&"function"==typeof e&&(n=e,e=void 0),o=o.then(function(){if("undefined"==typeof t)throw new TypeError("location is required");if("string"!=typeof t)throw new TypeError("location must be a string");if("undefined"!=typeof e){if("object"!=typeof e)throw new TypeError("options must be an object")}else e={};if("undefined"!=typeof n&&"function"!=typeof n)throw new TypeError("callback must be a function")}),o=o.then(function(){return new Promise(function(n,o){var i=r(t);i.load(t,e,function(t,e){t?o(t):n(e)})})}),"function"==typeof n&&(o=o.then(function(t){n(void 0,t)},function(t){n(t)})),o}},{"./lib/loaders/file":5,"./lib/loaders/http":6,"native-promise-only":3}],5:[function(t,e,n){"use strict";e.exports.load=function(t,e,n){n(new TypeError("The 'file' scheme is not supported in the browser"))}},{}],6:[function(t,e,n){"use strict";var r=t("superagent"),o=["delete","get","head","patch","post","put"];e.exports.load=function(t,e,n){var i,s,u=t.split("#")[0],a=e.method?e.method.toLowerCase():"get";"undefined"!=typeof e.prepareRequest&&"function"!=typeof e.prepareRequest?i=new TypeError("options.prepareRequest must be a function"):"undefined"!=typeof e.method&&("string"!=typeof e.method?i=new TypeError("options.method must be a string"):-1===o.indexOf(e.method)&&(i=new TypeError("options.method must be one of the following: "+o.slice(0,o.length-1).join(", ")+" or "+o[o.length-1]))),i?n(i):(s=r["delete"===a?"del":a](u),e.prepareRequest&&e.prepareRequest(s),"function"==typeof s.buffer&&s.buffer(!0),s.end(function(t,e){n(t,e?e.text:e)}))}},{superagent:7}],7:[function(t,e,n){function r(){}function o(t){var e={}.toString.call(t);switch(e){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function i(t){return t===Object(t)}function s(t){if(!i(t))return t;var e=[];for(var n in t)null!=t[n]&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e.join("&")}function u(t){for(var e,n,r={},o=t.split("&"),i=0,s=o.length;s>i;++i)n=o[i],e=n.split("="),r[decodeURIComponent(e[0])]=decodeURIComponent(e[1]);return r}function a(t){var e,n,r,o,i=t.split(/\r?\n/),s={};i.pop();for(var u=0,a=i.length;a>u;++u)n=i[u],e=n.indexOf(":"),r=n.slice(0,e).toLowerCase(),o=m(n.slice(e+1)),s[r]=o;return s}function c(t){return t.split(/ *; */).shift()}function f(t){return v(t.split(/ *; */),function(t,e){var n=e.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(t[r]=o),t},{})}function p(t,e){e=e||{},this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=a(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function h(t,e){var n=this;y.call(this),this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",function(){var t=null,e=null;try{e=new p(n)}catch(r){return t=new Error("Parser is unable to parse the response"),t.parse=!0,t.original=r,n.callback(t)}if(n.emit("response",e),t)return n.callback(t,e);if(e.status>=200&&e.status<300)return n.callback(t,e);var o=new Error(e.statusText||"Unsuccessful HTTP response");o.original=t,o.response=e,o.status=e.status,n.callback(o,e)})}function l(t,e){return"function"==typeof e?new h("GET",t).end(e):1==arguments.length?new h("GET",t):new h(t,e)}var d,y=t("emitter"),v=t("reduce");d="undefined"!=typeof window?window:"undefined"!=typeof self?self:this,l.getXHR=function(){if(!(!d.XMLHttpRequest||d.location&&"file:"==d.location.protocol&&d.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}return!1};var m="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};l.serializeObject=s,l.parseString=u,l.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},l.serialize={"application/x-www-form-urlencoded":s,"application/json":JSON.stringify},l.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},p.prototype.get=function(t){return this.header[t.toLowerCase()]},p.prototype.setHeaderProperties=function(t){var e=this.header["content-type"]||"";this.type=c(e);var n=f(e);for(var r in n)this[r]=n[r]},p.prototype.parse=function(t){return this.parser=t,this},p.prototype.parseBody=function(t){var e=this.parser||l.parse[this.type];return e&&t&&(t.length||t instanceof Object)?e(t):null},p.prototype.setStatusProperties=function(t){1223===t&&(t=204);var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.clientError=4==e,this.serverError=5==e,this.error=4==e||5==e?this.toError():!1,this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.notFound=404==t,this.forbidden=403==t},p.prototype.toError=function(){var t=this.req,e=t.method,n=t.url,r="cannot "+e+" "+n+" ("+this.status+")",o=new Error(r);return o.status=this.status,o.method=e,o.url=n,o},l.Response=p,y(h.prototype),h.prototype.use=function(t){return t(this),this},h.prototype.timeout=function(t){return this._timeout=t,this},h.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},h.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},h.prototype.set=function(t,e){if(i(t)){for(var n in t)this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},h.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},h.prototype.getHeader=function(t){return this._header[t.toLowerCase()]},h.prototype.type=function(t){return this.set("Content-Type",l.types[t]||t),this},h.prototype.accept=function(t){return this.set("Accept",l.types[t]||t),this},h.prototype.auth=function(t,e){var n=btoa(t+":"+e);return this.set("Authorization","Basic "+n),this},h.prototype.query=function(t){return"string"!=typeof t&&(t=s(t)),t&&this._query.push(t),this},h.prototype.field=function(t,e){return this._formData||(this._formData=new d.FormData),this._formData.append(t,e),this},h.prototype.attach=function(t,e,n){return this._formData||(this._formData=new d.FormData),this._formData.append(t,e,n),this},h.prototype.send=function(t){var e=i(t),n=this.getHeader("Content-Type");if(e&&i(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(n||this.type("form"),n=this.getHeader("Content-Type"),this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||o(t)?this:(n||this.type("json"),this)},h.prototype.callback=function(t,e){var n=this._callback;this.clearTimeout(),n(t,e)},h.prototype.crossDomainError=function(){var t=new Error("Origin is not allowed by Access-Control-Allow-Origin");t.crossDomain=!0,this.callback(t)},h.prototype.timeoutError=function(){var t=this._timeout,e=new Error("timeout of "+t+"ms exceeded");e.timeout=t,this.callback(e)},h.prototype.withCredentials=function(){return this._withCredentials=!0,this},h.prototype.end=function(t){var e=this,n=this.xhr=l.getXHR(),i=this._query.join("&"),s=this._timeout,u=this._formData||this._data;this._callback=t||r,n.onreadystatechange=function(){if(4==n.readyState){var t;try{t=n.status}catch(r){t=0}if(0==t){if(e.timedout)return e.timeoutError();if(e.aborted)return;return e.crossDomainError()}e.emit("end")}};var a=function(t){t.total>0&&(t.percent=t.loaded/t.total*100),e.emit("progress",t)};this.hasListeners("progress")&&(n.onprogress=a);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=a)}catch(c){}if(s&&!this._timer&&(this._timer=setTimeout(function(){e.timedout=!0,e.abort()},s)),i&&(i=l.serializeObject(i),this.url+=~this.url.indexOf("?")?"&"+i:"?"+i),n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof u&&!o(u)){var f=this.getHeader("Content-Type"),p=l.serialize[f?f.split(";")[0]:""];p&&(u=p(u))}for(var h in this.header)null!=this.header[h]&&n.setRequestHeader(h,this.header[h]);return this.emit("request",this),n.send(u),this},h.prototype.then=function(t,e){return this.end(function(n,r){n?e(n):t(r)})},l.Request=h,l.get=function(t,e,n){var r=l("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},l.head=function(t,e,n){var r=l("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},l.del=function(t,e){var n=l("DELETE",t);return e&&n.end(e),n},l.patch=function(t,e,n){var r=l("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},l.post=function(t,e,n){var r=l("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},l.put=function(t,e,n){var r=l("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},e.exports=l},{emitter:8,reduce:9}],8:[function(t,e,n){function r(t){return t?o(t):void 0}function o(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks[t]=this._callbacks[t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){r.off(t,n),e.apply(this,arguments)}var r=this;return this._callbacks=this._callbacks||{},n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[t];if(!n)return this;if(1==arguments.length)return delete this._callbacks[t],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===e||r.fn===e){n.splice(o,1);break}return this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),n=this._callbacks[t];if(n){n=n.slice(0);for(var r=0,o=n.length;o>r;++r)n[r].apply(this,e)}return this},r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks[t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},{}],9:[function(t,e,n){e.exports=function(t,e,n){for(var r=0,o=t.length,i=3==arguments.length?n:t[r++];o>r;)i=e.call(null,i,t[r],++r,t);return i}},{}],10:[function(t,e,n){function r(t){this.value=t}function o(t,e,n){var r=[],o=[],s=!0;return function u(t){function a(){if("object"==typeof h.node&&null!==h.node){h.keys&&h.node_===h.node||(h.keys=d(h.node)),h.isLeaf=0==h.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===t){h.circular=o[e];break}}else h.isLeaf=!0,h.keys=null;h.notLeaf=!h.isLeaf,h.notRoot=!h.isRoot}var c=n?i(t):t,f={},p=!0,h={node:c,node_:t,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){h.isRoot||(h.parent.node[h.key]=t),h.node=t,e&&(p=!1)},"delete":function(t){delete h.parent.node[h.key],t&&(p=!1)},remove:function(t){y(h.parent.node)?h.parent.node.splice(h.key,1):delete h.parent.node[h.key],t&&(p=!1)},keys:null,before:function(t){f.before=t},after:function(t){f.after=t},pre:function(t){f.pre=t},post:function(t){f.post=t},stop:function(){s=!1},block:function(){p=!1}};if(!s)return h;a();var l=e.call(h,h.node);return void 0!==l&&h.update&&h.update(l),f.before&&f.before.call(h,h.node),p?("object"!=typeof h.node||null===h.node||h.circular||(o.push(h),a(),v(h.keys,function(t,e){r.push(t),f.pre&&f.pre.call(h,h.node[t],t);var o=u(h.node[t]);n&&m.call(h.node,t)&&(h.node[t]=o.node),o.isLast=e==h.keys.length-1,o.isFirst=0==e,f.post&&f.post.call(h,o),r.pop()}),o.pop()),f.after&&f.after.call(h,h.node),h):h}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(y(t))e=[];else if(u(t))e=new Date(t.getTime?t.getTime():t);else if(a(t))e=new RegExp(t);else if(c(t))e={message:t.message};else if(f(t))e=new Boolean(t);else if(p(t))e=new Number(t);else if(h(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return v(d(t),function(n){e[n]=t[n]}),e}return t}function s(t){return Object.prototype.toString.call(t)}function u(t){return"[object Date]"===s(t)}function a(t){return"[object RegExp]"===s(t)}function c(t){return"[object Error]"===s(t)}function f(t){return"[object Boolean]"===s(t)}function p(t){return"[object Number]"===s(t)}function h(t){return"[object String]"===s(t)}var l=e.exports=function(t){return new r(t)};r.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!m.call(e,r)){e=void 0;break}e=e[r]}return e},r.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!m.call(e,r))return!1;e=e[r]}return!0},r.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var o=t[r];m.call(n,o)||(n[o]={}),n=n[o]}return n[t[r]]=e,e},r.prototype.map=function(t){return o(this.value,t,!0)},r.prototype.forEach=function(t){return this.value=o(this.value,t,!1),this.value},r.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach(function(e){this.isRoot&&n||(r=t.call(this,r,e))}),r},r.prototype.paths=function(){var t=[];return this.forEach(function(e){t.push(this.path)}),t},r.prototype.nodes=function(){var t=[];return this.forEach(function(e){t.push(this.node)}),t},r.prototype.clone=function(){var t=[],e=[];return function n(r){for(var o=0;o<t.length;o++)if(t[o]===r)return e[o];if("object"==typeof r&&null!==r){var s=i(r);return t.push(r),e.push(s),v(d(r),function(t){s[t]=n(r[t])}),t.pop(),e.pop(),s}return r}(this.value)};var d=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},y=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},v=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};v(d(r.prototype),function(t){l[t]=function(e){var n=[].slice.call(arguments,1),o=new r(e);return o[t].apply(o,n)}});var m=Object.hasOwnProperty||function(t,e){return e in t}},{}]},{},[1])(1)});
</script>