Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

swagger-client

Package Overview
Dependencies
Maintainers
1
Versions
295
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

swagger-client - npm Package Compare versions

Comparing version 3.4.3 to 3.4.4

2

dist/index.js

@@ -1,1 +0,1 @@

module.exports=function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=57)}([function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t){e.exports=require("babel-runtime/core-js/object/assign")},function(e,t){e.exports=require("babel-runtime/helpers/typeof")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.openapi;return!!t&&(0,k.default)(t,"3")}function u(e){var t=e.swagger;return!!t&&(0,k.default)(t,"2")}function o(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e&&"object"===(void 0===e?"undefined":(0,g.default)(e))?(e.operationId||"").replace(/\s/g,"").length?w(e.operationId):i(t,r):null}function i(e,t){return""+q(t)+w(e)}function s(e,t){return q(t)+"-"+e}function l(e,t){return e&&e.paths?c(e,function(e){var r=e.pathName,n=e.method,a=e.operation;if(!a||"object"!==(void 0===a?"undefined":(0,g.default)(a)))return!1;var u=a.operationId;return[o(a,r,n),s(r,n),u].some(function(e){return e&&e===t})}):null}function c(e,t){return f(e,t,!0)||null}function f(e,t,r){if(!e||"object"!==(void 0===e?"undefined":(0,g.default)(e))||!e.paths||"object"!==(0,g.default)(e.paths))return null;var n=e.paths;for(var a in n)for(var u in n[a])if("PARAMETERS"!==u.toUpperCase()){var o=n[a][u];if(o&&"object"===(void 0===o?"undefined":(0,g.default)(o))){var i={spec:e,pathName:a,method:u.toUpperCase(),operation:o},s=t(i);if(r&&s)return i}}}function d(e){var t=e.spec,r=t.paths,n={};if(!r)return e;for(var a in r){var u=r[a];if((0,x.default)(u)){var i=u.parameters;for(var s in u){(function(e){var r=u[e];if(!(0,x.default)(r))return"continue";var s=o(r,a,e);if(s&&(n[s]?n[s].push(r):n[s]=[r],(0,m.default)(n).forEach(function(e){if(n[e].length>1)n[e].forEach(function(t,r){t.__originalOperationId=t.__originalOperationId||t.operationId,t.operationId=""+e+(r+1)});else if(void 0!==r.operationId){var t=n[e][0];t.__originalOperationId=t.__originalOperationId||r.operationId,t.operationId=e}})),"parameters"!==e){var l=[],c={};for(var f in t)"produces"!==f&&"consumes"!==f&&"security"!==f||(c[f]=t[f],l.push(c));if(i&&(c.parameters=i,l.push(c)),l.length){var d=!0,p=!1,v=void 0;try{for(var y,g=(0,h.default)(l);!(d=(y=g.next()).done);d=!0){var b=y.value;for(var P in b)if(r[P]){if("parameters"===P){var k=!0,q=!1,w=void 0;try{for(var _,O=(0,h.default)(b[P]);!(k=(_=O.next()).done);k=!0)!function(){var e=_.value;r[P].some(function(t){return t.name===e.name})||r[P].push(e)}()}catch(e){q=!0,w=e}finally{try{!k&&O.return&&O.return()}finally{if(q)throw w}}}}else r[P]=b[P]}}catch(e){p=!0,v=e}finally{try{!d&&g.return&&g.return()}finally{if(p)throw v}}}}})(s)}}}return e}Object.defineProperty(t,"__esModule",{value:!0});var p=r(12),h=n(p),v=r(0),m=n(v),y=r(2),g=n(y);t.isOAS3=a,t.isSwagger2=u,t.opId=o,t.idFromPathMethod=i,t.legacyIdFromPathMethod=s,t.getOperationRaw=l,t.findOperation=c,t.eachOperation=f,t.normalizeSwagger=d;var b=r(50),x=n(b),P=r(18),k=n(P),q=function(e){return String.prototype.toLowerCase.call(e)},w=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"object"===(void 0===e?"undefined":(0,x.default)(e))&&(t=e,e=t.url),t.headers=t.headers||{},j.mergeInQueryOrForm(t),t.requestInterceptor&&(t=t.requestInterceptor(t)||t),/multipart\/form-data/i.test(t.headers["content-type"]||t.headers["Content-Type"])&&(delete t.headers["content-type"],delete t.headers["Content-Type"]),(t.userFetch||fetch)(t.url,t).then(function(r){var n=j.serializeRes(r,e,t).then(function(e){return t.responseInterceptor&&(e=t.responseInterceptor(e)||e),e});if(!r.ok){var a=new Error(r.statusText);return a.statusCode=a.status=r.status,n.then(function(e){throw a.response=e,a},function(e){throw a.responseError=e,a})}return n})}function u(e,t){return"application/json"===t?JSON.parse(e):w.default.safeLoad(e)}function o(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.loadSpec,a=void 0!==n&&n,o={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:i(e.headers)},s=o.headers["content-type"],l=a||A(s);return(l?e.text:e.blob||e.buffer).call(e).then(function(e){if(o.text=e,o.data=e,l)try{var t=u(e,s);o.body=t,o.obj=t}catch(e){o.parseError=e}return o})}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,r){void 0!==t[r]?(t[r]=Array.isArray(t[r])?t[r]:[t[r]],t[r].push(e)):t[r]=e}),t):t}function s(e){return"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,x.default)(e))&&"function"==typeof e.pipe}function l(e,t){var r=e.collectionFormat,n=e.allowEmptyValue,a="object"===(void 0===e?"undefined":(0,x.default)(e))?e.value:e,u={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};if(void 0===a&&n)return"";if(s(a)||"boolean"==typeof a)return a;var o=encodeURIComponent;return t&&(o=(0,O.default)(a)?function(e){return e}:function(e){return(0,g.default)(e)}),"object"!==(void 0===a?"undefined":(0,x.default)(a))||Array.isArray(a)?Array.isArray(a)?Array.isArray(a)&&!r?a.map(o).join(","):"multi"===r?a.map(o):a.map(o).join(u[r]):o(a):""}function c(e){var t=(0,m.default)(e).reduce(function(t,r){var n=e[r],a=!!n.skipEncoding,u=a?r:encodeURIComponent(r),o=function(e){return e&&"object"===(void 0===e?"undefined":(0,x.default)(e))}(n)&&!Array.isArray(n);return t[u]=l(o?n:{value:n},a),t},{});return k.default.stringify(t,{encode:!1,indices:!1})||""}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,a=e.query,u=e.form;if(u){var o=(0,m.default)(u).some(function(e){return s(u[e].value)}),i=e.headers["content-type"]||e.headers["Content-Type"];if(o||/multipart\/form-data/i.test(i)){var f=r(45);e.body=new f,(0,m.default)(u).forEach(function(t){e.body.append(t,l(u[t],!0))})}else e.body=c(u);delete e.form}if(a){var d=n.split("?"),p=(0,h.default)(d,2),v=p[0],y=p[1],g="";if(y){var b=k.default.parse(y);(0,m.default)(a).forEach(function(e){return delete b[e]}),g=k.default.stringify(b,{encode:!0})}var x=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(function(e){return e}).join("&");return n?"?"+n:""}(g,c(a));e.url=v+x,delete e.query}return e}function d(e,t,r){return r=r||function(e){return e},t=t||function(e){return e},function(n){return"string"==typeof n&&(n={url:n}),j.mergeInQueryOrForm(n),n=t(n),r(e(n))}}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldDownloadAsText=t.self=void 0;var p=r(37),h=n(p),v=r(0),m=n(v),y=r(6),g=n(y),b=r(2),x=n(b);t.default=a,t.serializeRes=o,t.serializeHeaders=i,t.encodeFormOrQuery=c,t.mergeInQueryOrForm=f,t.makeHttp=d,r(41);var P=r(54),k=n(P),q=r(46),w=n(q),_=r(52),O=n(_),j=t.self={serializeRes:o,mergeInQueryOrForm:f},A=t.shouldDownloadAsText=function(){return/json|xml|yaml|text/.test(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r){if(r=r||{},t=(0,H.default)({},t,{path:t.path&&u(t.path)}),"merge"===t.op){var n=i(t.path);L.default.apply(e,[n]),(0,H.default)(n.value,t.value)}else if("mergeDeep"===t.op){var a=i(t.path);L.default.apply(e,[a]);var o=(0,H.default)({},a.value);(0,G.default)(a.value,t.value);for(var s in t.value)if(Object.prototype.hasOwnProperty.call(t.value,s)){var l=t.value[s];if(Array.isArray(l)){var c=o[s]||[];a.value[s]=c.concat(l)}}}else if(L.default.apply(e,[t]),r.allowMetaPatches&&t.meta&&I(t)&&(Array.isArray(t.value)||w(t.value))){var f=i(t.path);L.default.apply(e,[f]),(0,H.default)(f.value,t.meta)}return e}function u(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function o(e,t){return{op:"add",path:e,value:t}}function i(e){return{op:"_get",path:e}}function s(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function l(e,t){return{op:"remove",path:e}}function c(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function f(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}}function d(e,t){return{type:"context",path:e,value:t}}function p(e,t){try{return v(e,y,t)}catch(e){return e}}function h(e,t){try{return v(e,m,t)}catch(e){return e}}function v(e,t,r){return q(k(e.filter(I).map(function(e){return t(e.value,r,e.path)})||[]))}function m(e,t,r){return r=r||[],Array.isArray(e)?e.map(function(e,n){return m(e,t,r.concat(n))}):w(e)?(0,z.default)(e).map(function(n){return m(e[n],t,r.concat(n))}):t(e,r[r.length-1],r)}function y(e,t,r){r=r||[];var n=[];if(r.length>0){var a=t(e,r[r.length-1],r);a&&(n=n.concat(a))}if(Array.isArray(e)){var u=e.map(function(e,n){return y(e,t,r.concat(n))});u&&(n=n.concat(u))}else if(w(e)){var o=(0,z.default)(e).map(function(n){return y(e[n],t,r.concat(n))});o&&(n=n.concat(o))}return n=k(n)}function g(e,t){if(!Array.isArray(t))return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function b(e,t){return t.reduce(function(e,t){return void 0!==t&&e?e[t]:e},e)}function x(e){return q(k(P(e)))}function P(e){return Array.isArray(e)?e:[e]}function k(e){var t;return(t=[]).concat.apply(t,(0,D.default)(e.map(function(e){return Array.isArray(e)?k(e):e})))}function q(e){return e.filter(function(e){return void 0!==e})}function w(e){return e&&"object"===(void 0===e?"undefined":(0,S.default)(e))}function _(e){return w(e)&&O(e.then)}function O(e){return e&&"function"==typeof e}function j(e){return e instanceof Error}function A(e){if(T(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function M(e){return B.default.isGeneratorFunction(e)}function E(e){return A(e)||T(e)&&"mutation"===e.type}function I(e){return E(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function C(e){return T(e)&&"context"===e.type}function T(e){return e&&"object"===(void 0===e?"undefined":(0,S.default)(e))}Object.defineProperty(t,"__esModule",{value:!0});var R=r(2),S=n(R),F=r(38),D=n(F),N=r(0),z=n(N),$=r(1),H=n($),V=r(44),L=n(V),U=r(16),B=n(U),J=r(42),G=n(J);t.default={add:o,replace:s,remove:l,merge:c,mergeDeep:f,context:d,getIn:b,applyPatch:a,parentPathMatch:g,flatten:k,fullyNormalizeArray:x,normalizeArray:P,isPromise:_,forEachNew:p,forEachNewPrimitive:h,isJsonPatch:A,isContextPatch:C,isPatch:T,isMutation:E,isAdditiveMutation:I,isGenerator:M,isFunction:O,isObject:w,isError:j}},function(e,t){e.exports=require("babel-runtime/core-js/json/stringify")},function(e,t){e.exports=require("babel-runtime/helpers/extends")},function(e,t){e.exports=require("lodash/assign")},function(e,t){e.exports=require("btoa")},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";function n(e,t){function r(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];this.message=r[0],t&&t.apply(this,r)}return r.prototype=new Error,r.prototype.name=e,r.prototype.constructor=r,r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){e.exports=require("babel-runtime/core-js/get-iterator")},function(e,t){e.exports=require("babel-runtime/core-js/promise")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/regenerator")},function(e,t){e.exports=require("lodash/get")},function(e,t){e.exports=require("lodash/startsWith")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?r.url=e:r=e,!(this instanceof a))return new a(r);(0,l.default)(this,r);var n=this.resolve().then(function(){return t.disableInterfaces||(0,l.default)(t,a.makeApisTagOperation(t)),t});return n.client=this,n}var u=r(7),o=n(u),i=r(47),s=(n(i),r(8)),l=n(s),c=r(18),f=n(c),d=r(10),p=n(d),h=r(4),v=n(h),m=r(27),y=n(m),g=r(26),b=r(20),x=r(3);a.http=v.default,a.makeHttp=h.makeHttp.bind(null,a.http),a.resolve=y.default,a.execute=b.execute,a.serializeRes=h.serializeRes,a.serializeHeaders=h.serializeHeaders,a.clearCache=m.clearCache,a.parameterBuilders=b.PARAMETER_BUILDERS,a.makeApisTagOperation=g.makeApisTagOperation,a.buildRequest=b.buildRequest,a.helpers={opId:x.opId},e.exports=a,a.prototype={http:v.default,execute:function(e){return this.applyDefaults(),a.execute((0,o.default)({spec:this.spec,http:this.http.bind(this),securities:{authorized:this.authorizations}},e))},resolve:function(){var e=this;return a.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},a.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&(0,f.default)(t,"http")){var r=p.default.parse(t);e.host||(e.host=r.host),e.schemes||(e.schemes=[r.protocol.replace(":","")]),e.basePath||(e.basePath="/")}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.http,r=e.fetch,n=e.spec,a=e.operationId,u=e.pathName,o=e.method,i=e.parameters,s=e.securities,l=(0,m.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]);t=t||r||R.default,u&&o&&!a&&(a=(0,B.legacyIdFromPathMethod)(u,o));var c=K.buildRequest((0,h.default)({spec:n,operationId:a,parameters:i,securities:s},l));return c.body&&((0,_.default)(c.body)||(0,j.default)(c.body))&&(c.body=(0,d.default)(c.body)),t(c)}function u(e){var t=e.spec,r=e.operationId,n=(e.securities,e.requestContentType,e.responseContentType),a=e.scheme,u=e.requestInterceptor,i=e.responseInterceptor,s=e.contextUrl,l=e.userFetch,c=(e.requestBody,e.server),f=e.serverVariables,d=e.parameters,p=e.parameterBuilders,v=(0,B.isOAS3)(t);p||(p=v?$.default:N.default);var m={url:"",credentials:"same-origin",headers:{},cookies:{}};u&&(m.requestInterceptor=u),i&&(m.responseInterceptor=i),l&&(m.userFetch=l);var y=(0,B.getOperationRaw)(t,r);if(!y)throw new G("Operation "+r+" not found");var b=y.operation,x=void 0===b?{}:b,P=y.method,k=y.pathName;if(m.url+=o({spec:t,scheme:a,contextUrl:s,server:c,serverVariables:f,pathName:k,method:P}),!r)return delete m.cookies,m;m.url+=k,m.method=(""+P).toUpperCase(),d=d||{};var q=t.paths[k]||{};n&&(m.headers.accept=n);var w=W([].concat(J(x.parameters)).concat(J(q.parameters)));w.forEach(function(e){var r=p[e.in],n=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(n=d),n=e&&e.name&&d[e.name],void 0===n?n=e&&e.name&&d[e.in+"."+e.name]:Q(e.name,w).length>1&&console.warn("Parameter '"+e.name+"' is ambiguous because the defined spec has more than one parameter with the name: '"+e.name+"' and the passed-in parameter values did not define an 'in' value."),void 0!==e.default&&void 0===n&&(n=e.default),void 0===n&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");r&&r({req:m,parameter:e,value:n,operation:x,spec:t})});var _=(0,h.default)({},e,{operation:x});if(m=v?(0,V.default)(_,m):(0,U.default)(_,m),m.cookies&&(0,g.default)(m.cookies).length){var O=(0,g.default)(m.cookies).reduce(function(e,t){var r=m.cookies[t];return e+(e?"&":"")+C.default.serialize(t,r)},"");m.headers.Cookie=O}return m.cookies&&delete m.cookies,(0,T.mergeInQueryOrForm)(m),m}function o(e){return(0,B.isOAS3)(e.spec)?i(e):c(e)}function i(e){var t=e.spec,r=e.pathName,n=e.method,a=e.server,u=e.contextUrl,o=e.serverVariables,i=void 0===o?{}:o,c=(0,q.default)(t,["paths",r,(n||"").toLowerCase(),"servers"])||(0,q.default)(t,["paths",r,"servers"])||(0,q.default)(t,["servers"]),f="",d=null;if(a&&c){var p=c.map(function(e){return e.url});p.indexOf(a)>-1&&(f=a,d=c[p.indexOf(a)])}if(!f&&c&&(f=c[0].url,d=c[0]),f.indexOf("{")>-1){l(f).forEach(function(e){if(d.variables&&d.variables[e]){var t=d.variables[e],r=i[e]||t.default,n=new RegExp("{"+e+"}","g");f=f.replace(n,r)}})}return s(f,u)}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=E.default.parse(e),n=E.default.parse(t),a=Y(r.protocol)||Y(n.protocol)||"",u=r.host||n.host,o=r.pathname||"",i=void 0;return i=a&&u?a+"://"+(u+o):o,"/"===i[i.length-1]?i.slice(0,-1):i}function l(e){for(var t=[],r=/{([^}]+)}/g,n=void 0;n=r.exec(e);)t.push(n[1]);return t}function c(e){var t=e.spec,r=e.scheme,n=e.contextUrl,a=void 0===n?"":n,u=E.default.parse(a),o=Array.isArray(t.schemes)?t.schemes[0]:null,i=r||o||Y(u.protocol)||"http",s=t.host||u.host||"",l=t.basePath||"",c=void 0;return c=i&&s?i+"://"+(s+l):l,"/"===c[c.length-1]?c.slice(0,-1):c}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var f=r(6),d=n(f),p=r(7),h=n(p),v=r(36),m=n(v),y=r(0),g=n(y),b=r(1),x=n(b);t.execute=a,t.buildRequest=u,t.baseUrl=o;var P=r(8),k=(n(P),r(17)),q=n(k),w=r(51),_=n(w),O=r(49),j=n(O),A=r(9),M=(n(A),r(10)),E=n(M),I=r(39),C=n(I),T=r(4),R=n(T),S=r(11),F=n(S),D=r(25),N=n(D),z=r(22),$=n(z),H=r(21),V=n(H),L=r(24),U=n(L),B=r(3),J=function(e){return Array.isArray(e)?e:[]},G=(0,F.default)("OperationNotFoundError",function(e,t,r){this.originalError=r,(0,x.default)(this,t||{})}),Q=function(e,t){return t.filter(function(t){return t.name===e})},W=function(e){var t={};e.forEach(function(e){t[e.in]||(t[e.in]={}),t[e.in][e.name]=e});var r=[];return(0,g.default)(t).forEach(function(e){(0,g.default)(t[e]).forEach(function(n){r.push(t[e][n])})}),r},K=t.self={buildRequest:u},Y=function(e){return e?e.replace(/\W/g,""):null}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,a=e.operation,u=void 0===a?{}:a,o=e.spec,i=(0,d.default)({},t),s=n.authorized,l=void 0===s?{}:s,f=u.security||o.security||[],p=l&&!!(0,c.default)(l).length,v=(0,h.default)(o,["components","securitySchemes"])||{};return i.headers=i.headers||{},i.query=i.query||{},(0,c.default)(n).length&&p&&f&&(!Array.isArray(u.security)||u.security.length)?(f.forEach(function(e,t){for(var r in e){var n=l[r],a=v[r];if(n){var u=n.value||n,o=a.type;if(n)if("apiKey"===o)"query"===a.in&&(i.query[a.name]=u),"header"===a.in&&(i.headers[a.name]=u),"cookie"===a.in&&(i.cookies[a.name]=u);else if("http"===o){if("basic"===a.scheme){var s=u.username,c=u.password,f=(0,m.default)(s+":"+c);i.headers.Authorization="Basic "+f}"bearer"===a.scheme&&(i.headers.Authorization="Bearer "+u)}else if("oauth2"===o){var d=n.token||{},p=d.access_token,h=d.token_type;h&&"bearer"!==h.toLowerCase()||(h="Bearer"),i.headers.Authorization=h+" "+p}}}}),i):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(6),o=n(u),i=r(2),s=n(i),l=r(0),c=n(l);t.default=function(e,t){var r=e.operation,n=e.requestBody,u=e.securities,i=e.spec,l=e.requestContentType;t=a({request:t,securities:u,operation:r,spec:i});var f=r.requestBody||{},d=(0,c.default)(f.content||{});if(n){var p=l&&d.indexOf(l)>-1;if(l&&p)t.headers["Content-Type"]=l;else if(!l){var h=d[0];h&&(t.headers["Content-Type"]=h,l=h)}}return n&&(l?d.indexOf(l)>-1&&("application/x-www-form-urlencoded"===l?"object"===(void 0===n?"undefined":(0,s.default)(n))?(t.form={},(0,c.default)(n).forEach(function(e){var r=n[e];t.form[e]={value:"object"===(void 0===r?"undefined":(0,s.default)(r))?(0,o.default)(r):r}})):t.form=n:t.body=n):t.body=n),t},t.applySecurities=a;var f=r(8),d=n(f),p=r(17),h=n(p),v=r(9),m=n(v)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.req,r=e.value,n=e.parameter,a=n.name,u=n.style,o=n.explode,i=(0,p.default)({key:n.name,value:r,style:u||"simple",explode:o||!1,escape:!1});t.url=t.url.replace("{"+a+"}",i)}function u(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&(r="false"),0===r&&(r="0"),r){var a=void 0===r?"undefined":(0,f.default)(r);if("deepObject"===n.style){(0,l.default)(r).forEach(function(e){var a=r[e];t.query[n.name+"["+e+"]"]={value:(0,p.default)({key:e,value:a,style:"deepObject",escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}})}else if("object"!==a||Array.isArray(r)||"form"!==n.style&&n.style||!n.explode&&void 0!==n.explode)t.query[n.name]={value:(0,p.default)({key:n.name,value:r,style:n.style||"form",explode:void 0===n.explode||n.explode,escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0};else{var u=(0,l.default)(r);u.forEach(function(e){var a=r[e];t.query[e]={value:(0,p.default)({key:e,value:a,style:n.style||"form",escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}})}}else if(n.allowEmptyValue){var o=n.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}}function o(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},h.indexOf(r.name.toLowerCase())>-1||void 0!==n&&(t.headers[r.name]=(0,p.default)({key:r.name,value:n,style:r.style||"simple",explode:void 0!==r.explode&&r.explode,escape:!1}))}function i(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{};var a=void 0===n?"undefined":(0,f.default)(n);if("undefined"!==a){var u="object"===a&&!Array.isArray(n)&&r.explode?"":r.name+"=";t.headers.Cookie=u+(0,p.default)({key:r.name,value:n,escape:!1,style:r.style||"form",explode:void 0!==r.explode&&r.explode})}}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),l=n(s),c=r(2),f=n(c),d=r(23),p=n(d);t.default={path:a,query:u,header:o,cookie:i};var h=["accept","authorization","content-type"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.escape;return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&r?(0,v.stringToCharArray)(e).map(function(e){return y(e)?e:m(e)&&"unsafe"===r?e:((0,h.default)(e)||[]).map(function(e){return e.toString(16).toUpperCase()}).map(function(e){return"%"+e}).join("")}).join(""):e}function u(e){var t=e.key,r=e.value,n=e.style,u=e.explode,o=e.escape,i=function(e){return a(e,{escape:o})};if("simple"===n)return r.map(function(e){return i(e)}).join(",");if("label"===n)return"."+r.map(function(e){return i(e)}).join(".");if("matrix"===n)return r.map(function(e){return i(e)}).reduce(function(e,r){return!e||u?(e||"")+";"+t+"="+r:e+","+r},"");if("form"===n){var s=u?"&"+t+"=":",";return r.map(function(e){return i(e)}).join(s)}if("spaceDelimited"===n){var l=u?t+"=":"";return r.map(function(e){return i(e)}).join(" "+l)}if("pipeDelimited"===n){var c=u?t+"=":"";return r.map(function(e){return i(e)}).join("|"+c)}}function o(e){var t=e.key,r=e.value,n=e.style,u=e.explode,o=e.escape,i=function(e){return a(e,{escape:o})},s=(0,l.default)(r);return"simple"===n?s.reduce(function(e,t){var n=i(r[t]),a=u?"=":",";return(e?e+",":"")+t+a+n},""):"label"===n?s.reduce(function(e,t){var n=i(r[t]),a=u?"=":".";return(e?e+".":".")+t+a+n},""):"matrix"===n&&u?s.reduce(function(e,t){var n=i(r[t]);return(e?e+";":";")+t+"="+n},""):"matrix"===n?s.reduce(function(e,n){var a=i(r[n]);return(e?e+",":";"+t+"=")+n+","+a},""):"form"===n?s.reduce(function(e,t){var n=i(r[t]);return(e?e+(u?"&":","):"")+t+(u?"=":",")+n},""):void 0}function i(e){var t=e.key,r=e.value,n=e.style,u=e.escape,o=function(e){return a(e,{escape:u})};return"simple"===n?o(r):"label"===n?"."+o(r):"matrix"===n?";"+t+"="+o(r):"form"===n?o(r):"deepObject"===n?o(r):void 0}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),l=n(s),c=r(2),f=n(c);t.encodeDisallowedCharacters=a,t.default=function(e){var t=e.value;return Array.isArray(t)?u(e):"object"===(void 0===t?"undefined":(0,f.default)(t))?o(e):i(e)};var d=r(43),p=(n(d),r(55)),h=n(p),v=r(56),m=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},y=function(e){return/^[a-z0-9\-._~]+$/i.test(e)}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,a=e.operation,u=void 0===a?{}:a,i=e.spec,l=(0,c.default)({},t),f=n.authorized,d=void 0===f?{}:f,p=n.specSecurity,h=void 0===p?[]:p,v=u.security||h,m=d&&!!(0,o.default)(d).length,y=i.securityDefinitions;return l.headers=l.headers||{},l.query=l.query||{},(0,o.default)(n).length&&m&&v&&(!Array.isArray(u.security)||u.security.length)?(v.forEach(function(e,t){for(var r in e){var n=d[r];if(n){var a=n.token,u=n.value||n,o=y[r],i=o.type,c=a&&a.access_token,f=a&&a.token_type;if(n)if("apiKey"===i){var p="query"===o.in?"query":"headers";l[p]=l[p]||{},l[p][o.name]=u}else"basic"===i?u.header?l.headers.authorization=u.header:(u.base64=(0,s.default)(u.username+":"+u.password),l.headers.authorization="Basic "+u.base64):"oauth2"===i&&c&&(f=f&&"bearer"!==f.toLowerCase()?f:"Bearer",l.headers.authorization=f+" "+c)}}}),l):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(0),o=n(u);t.default=function(e,t){var r=e.spec,n=e.operation,u=e.securities,o=e.requestContentType;return t=a({request:t,securities:u,operation:n,spec:r}),(t.body||t.form)&&(o?t.headers["Content-Type"]=o:Array.isArray(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:Array.isArray(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:n.parameters&&n.parameters.filter(function(e){return"file"===e.type}).length?t.headers["Content-Type"]="multipart/form-data":n.parameters&&n.parameters.filter(function(e){return"formData"===e.in}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded")),t},t.applySecurities=a;var i=r(9),s=n(i),l=r(8),c=n(l),f=r(4);n(f)},function(e,t,r){"use strict";function n(e){var t=e.req,r=e.value;t.body=r}function a(e){var t=e.req,r=e.value,n=e.parameter;t.form=t.form||{},(r||n.allowEmptyValue)&&(t.form[n.name]={value:r,allowEmptyValue:n.allowEmptyValue,collectionFormat:n.collectionFormat})}function u(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},void 0!==n&&(t.headers[r.name]=n)}function o(e){var t=e.req,r=e.value,n=e.parameter;t.url=t.url.replace("{"+n.name+"}",encodeURIComponent(r))}function i(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&"boolean"===n.type&&(r="false"),0===r&&["number","integer"].indexOf(n.type)>-1&&(r="0"),r)t.query[n.name]={collectionFormat:n.collectionFormat,value:r};else if(n.allowEmptyValue){var a=n.name;t.query[a]=t.query[a]||{},t.query[a].allowEmptyValue=!0}}Object.defineProperty(t,"__esModule",{value:!0}),t.default={body:n,header:u,query:i,path:o,formData:a}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.pathName,n=t.method,a=t.operationId;return function(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,l.default)({spec:e.spec},(0,f.default)(e,"requestInterceptor","responseInterceptor","userFetch"),{pathName:r,method:n,parameters:t,operationId:a},u))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v.makeExecute(e),r=v.mapTagOperations({spec:e.spec,cb:t}),n={};for(var a in r){n[a]={operations:{}};for(var u in r[a])n[a].operations[u]={execute:r[a][u]}}return{apis:n}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v.makeExecute(e);return{apis:v.mapTagOperations({spec:e.spec,cb:t})}}function i(e){var t=e.spec,r=e.cb,n=void 0===r?p:r,a=e.defaultTag,u=void 0===a?"default":a,o={},i={};return(0,d.eachOperation)(t,function(e){var r=e.pathName,a=e.method,s=e.operation;(s.tags?h(s.tags):[u]).forEach(function(e){if("string"==typeof e){var u=i[e]=i[e]||{},l=(0,d.opId)(s,r,a),c=n({spec:t,pathName:r,method:a,operation:s,operationId:l});if(o[l])o[l]++,u[""+l+o[l]]=c;else if(void 0!==u[l]){var f=o[l]||1;o[l]=f+1,u[""+l+o[l]]=c;var p=u[l];delete u[l],u[""+l+f]=p}else u[l]=c}})}),i}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var s=r(7),l=n(s);t.makeExecute=a,t.makeApisTagOperationsOperationExecute=u,t.makeApisTagOperation=o,t.mapTagOperations=i;var c=r(53),f=n(c),d=r(3),p=function(){return null},h=function(e){return Array.isArray(e)?e:[e]},v=t.self={mapTagOperations:i,makeExecute:a}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requestInterceptor,n=t.responseInterceptor;return function(t){return e({url:t,loadSpec:!0,requestInterceptor:r,responseInterceptor:n,headers:{Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.body})}}function u(){l.plugins.refs.clearCache()}function o(e){function t(e){g&&(l.plugins.refs.docCache[g]=e),l.plugins.refs.fetchJSON=a(y,{requestInterceptor:v,responseInterceptor:m});var t=[l.plugins.refs];return"function"==typeof h&&t.push(l.plugins.parameters),"function"==typeof p&&t.push(l.plugins.properties),"strict"!==o&&t.push(l.plugins.allOf),(0,c.default)({spec:e,context:{baseDoc:g},plugins:t,allowMetaPatches:d,parameterMacro:h,modelPropertyMacro:p}).then(f.normalizeSwagger)}var r=e.fetch,n=e.spec,u=e.url,o=e.mode,i=e.allowMetaPatches,d=void 0===i||i,p=e.modelPropertyMacro,h=e.parameterMacro,v=e.requestInterceptor,m=e.responseInterceptor,y=e.http,g=e.baseDoc;return g=g||u,y=r||y||s.default,n?t(n):a(y,{requestInterceptor:v,responseInterceptor:m})(g).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.makeFetchJSON=a,t.clearCache=u,t.default=o;var i=r(4),s=n(i),l=r(28),c=n(l),f=r(3)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return new D(e).dispatch()}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var u=r(6),o=n(u),i=r(13),s=n(i),l=r(16),c=n(l),f=r(0),d=n(f),p=r(12),h=n(p),v=r(34),m=n(v),y=r(1),g=n(y),b=r(14),x=n(b),P=r(15),k=n(P);t.default=a;var q=r(48),w=n(q),_=r(5),O=n(_),j=r(33),A=n(j),M=r(29),E=n(M),I=r(31),C=n(I),T=r(32),R=n(T),S=r(30),F=n(S),D=function(){function e(t){(0,x.default)(this,e),(0,g.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new F.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,g.default)((0,m.default)(this),O.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(O.default.isFunction),this.patches.push(O.default.add([],this.spec)),this.patches.push(O.default.context([],this.context)),this.updatePatches(this.patches)}return(0,k.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t=console).log.apply(t,n)}}},{key:"verbose",value:function(e){if("verbose"===this.debugLevel){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t=console).log.apply(t,["["+e+"] "].concat(n))}}},{key:"wrapPlugin",value:function(e,t){var r=null,n=void 0;return e[this.pluginProp]?(r=e,n=e[this.pluginProp]):O.default.isFunction(e)?n=e:O.default.isObject(e)&&(n=function(e){return c.default.mark(function t(r,n){var a,u,o,i,s,l,f,p,v;return c.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:v=function t(r,o,i){var s,l,f,p,v,m,y,g,b,x,P,k,q,w,_;return c.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(O.default.isObject(r)){a.next=6;break}if(e.key!==o[o.length-1]){a.next=4;break}return a.next=4,e.plugin(r,e.key,o,n);case 4:a.next=46;break;case 6:s=o.length-1,l=o[s],f=o.indexOf("properties"),p="properties"===l&&s===f,v=n.allowMetaPatches&&u[r.$$ref],m=!0,y=!1,g=void 0,a.prev=14,b=(0,h.default)((0,d.default)(r));case 16:if(m=(x=b.next()).done){a.next=32;break}if(P=x.value,k=r[P],q=o.concat(P),w=O.default.isObject(k),_=r.$$ref,v){a.next=26;break}if(!w){a.next=26;break}return n.allowMetaPatches&&_&&(u[_]=!0),a.delegateYield(t(k,q,i),"t0",26);case 26:if(p||P!==e.key){a.next=29;break}return a.next=29,e.plugin(k,P,q,n,i);case 29:m=!0,a.next=16;break;case 32:a.next=38;break;case 34:a.prev=34,a.t1=a.catch(14),y=!0,g=a.t1;case 38:a.prev=38,a.prev=39,!m&&b.return&&b.return();case 41:if(a.prev=41,!y){a.next=44;break}throw g;case 44:return a.finish(41);case 45:return a.finish(38);case 46:case"end":return a.stop()}},a,this,[[14,34,38,46],[39,,41,45]])},a=c.default.mark(v),u={},o=!0,i=!1,s=void 0,t.prev=6,l=(0,h.default)(r.filter(O.default.isAdditiveMutation));case 8:if(o=(f=l.next()).done){t.next=14;break}return p=f.value,t.delegateYield(v(p.value,p.path,p),"t0",11);case 11:o=!0,t.next=8;break;case 14:t.next=20;break;case 16:t.prev=16,t.t1=t.catch(6),i=!0,s=t.t1;case 20:t.prev=20,t.prev=21,!o&&l.return&&l.return();case 23:if(t.prev=23,!i){t.next=26;break}throw s;case 26:return t.finish(23);case 27:return t.finish(20);case 28:case"end":return t.stop()}},t,this,[[6,16,20,28],[21,,23,27]])})}(e)),(0,g.default)(n.bind(r),{pluginName:e.name||t,isGenerator:O.default.isGenerator(n)})}},{key:"nextPlugin",value:function(){var e=this;return(0,w.default)(this.wrappedPlugins,function(t){return e.getMutationsForPlugin(t).length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return s.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var r=this.getPluginName(e);(this.pluginHistory[r]=this.pluginHistory[r]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var r=this;O.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)return void r.errors.push(e);try{if(!O.default.isObject(e))return void r.debug("updatePatches","Got a non-object patch",e);if(r.showDebug&&r.allPatches.push(e),O.default.isPromise(e.value))return r.promisedPatches.push(e),void r.promisedPatchThen(e);if(O.default.isContextPatch(e))return void r.setContext(e.path,e.value);if(O.default.isMutation(e))return void r.updateMutations(e)}catch(e){r.errors.push(e)}})}},{key:"updateMutations",value:function(e){O.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches})&&this.mutations.push(e)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);if(t<0)return void this.debug("Tried to remove a promisedPatch that isn't there!");this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(r){var n=(0,g.default)({},e,{value:r});t.removePromisedPatch(e),t.updatePatches(n)}).catch(function(r){t.removePromisedPatch(e),t.updatePatches(r)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return O.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,o.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=O.default.fullyNormalizeArray(e),r.updatePatches(e,n))}var t=this,r=this,n=this.nextPlugin();if(!n){var a=this.nextPromisedPatch();if(a)return a.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var u={spec:this.state,errors:this.errors};return this.showDebug&&(u.patches=this.allPatches),s.default.resolve(u)}if(r.pluginCount=r.pluginCount||{},r.pluginCount[n]=(r.pluginCount[n]||0)+1,r.pluginCount[n]>100)return s.default.resolve({spec:r.state,errors:r.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(n!==this.currentPlugin&&this.promisedPatches.length){var o=this.promisedPatches.map(function(e){return e.value});return s.default.all(o.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){r.currentPlugin=n;var t=r.getCurrentMutations(),a=r.mutations.length-1;try{if(n.isGenerator){var u=!0,o=!1,i=void 0;try{for(var s,l=(0,h.default)(n(t,r.getLib()));!(u=(s=l.next()).done);u=!0){e(s.value)}}catch(e){o=!0,i=e}finally{try{!u&&l.return&&l.return()}finally{if(o)throw i}}}else{e(n(t,r.getLib()))}}catch(t){e([(0,g.default)((0,m.default)(t),{plugin:n})])}finally{r.updatePluginHistory(n,{mutationIndex:a})}return r.dispatch()}()}}]),e}(),N={refs:A.default,allOf:E.default,parameters:C.default,properties:R.default};t.SpecMap=D,t.plugins=N},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),a=function(e){return e&&e.__esModule?e:{default:e}}(n);t.default={key:"allOf",plugin:function(e,t,r,n,u){if(!u.meta||!u.meta.$$ref){if(!Array.isArray(e)){var o=new TypeError("allOf must be an array");return o.fullPath=r,o}var i=r.slice(0,-1),s=!1,l=u.value;i.forEach(function(e){l=l[e]}),l=(0,a.default)({},l),delete l.allOf;var c=[n.replace(i,{})].concat(e.map(function(e,t){if(!n.isObject(e)){if(s)return null;s=!0;var a=new TypeError("Elements in allOf must be objects");return a.fullPath=r,a}return n.mergeDeep(i,e)}));return c.push(n.mergeDeep(i,l)),l.$$ref||c.push(n.remove([].concat(i,"$$ref"))),c}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return u({children:{}},e,t)}function u(e,t,r){return e.value=t||{},e.protoValue=r?(0,l.default)({},r.protoValue,e.value):e.value,(0,i.default)(e.children).forEach(function(t){var r=e.children[t];e.children[t]=u(r,r.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=n(o),s=r(7),l=n(s),c=r(14),f=n(c),d=r(15),p=n(d),h=function(){function e(t){(0,f.default)(this,e),this.root=a(t||{})}return(0,p.default)(e,[{key:"set",value:function(e,t){var r=this.getParent(e,!0);if(!r)return void u(this.root,t,null);var n=e[e.length-1],o=r.children;if(o[n])return void u(o[n],t,r);o[n]=a(t,r)}},{key:"get",value:function(e){if(e=e||[],e.length<1)return this.root.value;for(var t=this.root,r=void 0,n=void 0,a=0;a<e.length&&(n=e[a],r=t.children,r[n]);a++)t=r[n];return t&&t.protoValue}},{key:"getParent",value:function(e,t){return!e||e.length<1?null:e.length<2?this.root:e.slice(0,-1).reduce(function(e,r){if(!e)return e;var n=e.children;return!n[r]&&t&&(n[r]=a(null,e)),n[r]},this.root)}}]),e}();t.default=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),u=n(a),o=r(5),i=n(o);t.default={key:"parameters",plugin:function(e,t,r,n,a){if(Array.isArray(e)&&e.length){var o=(0,u.default)([],e),s=r.slice(0,-1),l=(0,u.default)({},i.default.getIn(n.spec,s));return e.forEach(function(e,t){try{o[t].default=n.parameterMacro(l,e)}catch(e){var a=new Error(e);return a.fullPath=r,a}}),i.default.replace(r,o)}return i.default.replace(r,e)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),u=n(a),o=r(5),i=n(o);t.default={key:"properties",plugin:function(e,t,r,n){var a=(0,u.default)({},e);for(var o in e)try{a[o].default=n.modelPropertyMacro(a[o])}catch(e){var s=new Error(e);return s.fullPath=r,s}return i.default.replace(r,a)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!F.test(e)){if(!t)throw new D("Tried to resolve a relative URL, without having a basePath. path: '"+e+"' basePath: '"+t+"'");return I.default.resolve(t,e)}return e}function u(e,t){return new D("Could not resolve reference because of: "+e.message,t,e)}function o(e){return(e+"").split("#")}function i(e,t){var r=N[e];if(r&&!T.default.isPromise(r))try{var n=f(t,r);return(0,A.default)(w.default.resolve(n),{__value:n})}catch(e){return w.default.reject(e)}return l(e).then(function(e){return f(t,e)})}function s(e){void 0!==e?delete N[e]:(0,k.default)(N).forEach(function(e){delete N[e]})}function l(e){var t=N[e];return t?T.default.isPromise(t)?t:w.default.resolve(t):(N[e]=H.fetchJSON(e).then(function(t){return N[e]=t,t}),N[e])}function c(e){return(0,M.fetch)(e,{headers:{Accept:"application/json"},loadSpec:!0}).then(function(e){return e.json()})}function f(e,t){var r=d(e);if(r.length<1)return t;var n=T.default.getIn(t,r);if(void 0===n)throw new D("Could not resolve pointer: "+e+" does not exist in document",{pointer:e});return n}function d(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+(void 0===e?"undefined":(0,x.default)(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(p)}function p(e){return"string"!=typeof e?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}function h(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function v(e){return 0===e.length?"":"/"+e.map(h).join("/")}function m(e,t){if(V(t))return!0;var r=e.charAt(t.length);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)}function y(e,t,r,n){var a=z.get(n);a||(a={},z.set(n,a));var u=v(r),o=(t||"<specmap-base>")+"#"+e;if(t==n.contextTree.get([]).baseDoc&&m(u,e))return!0;var i="";if(r.some(function(e){return i=i+"/"+h(e),a[i]&&a[i].some(function(e){return m(e,o)||m(o,e)})}))return!0;a[u]=(a[u]||[]).concat(o)}function g(e,t){function r(e){return T.default.isObject(e)&&(n.indexOf(e)>=0||(0,k.default)(e).some(function(t){return r(e[t])}))}var n=[e];return t.path.reduce(function(e,t){return n.push(e[t]),e[t]},e),r(t.value)}Object.defineProperty(t,"__esModule",{value:!0});var b=r(2),x=n(b),P=r(0),k=n(P),q=r(13),w=n(q),_=r(35),O=n(_),j=r(1),A=n(j),M=r(40),E=r(10),I=n(E),C=r(5),T=n(C),R=r(11),S=n(R),F=new RegExp("^([a-z]+://|//)","i"),D=(0,S.default)("JSONRefError",function(e,t,r){this.originalError=r,(0,A.default)(this,t||{})}),N={},z=new O.default,$={key:"$ref",plugin:function(e,t,r,n){var s=r.slice(0,-1),l=n.getContext(r).baseDoc;if("string"!=typeof e)return new D("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:l,fullPath:r});var c=o(e),f=c[0],p=c[1]||"",h=void 0;try{h=l||f?a(f,l):null}catch(t){return u(t,{pointer:p,$ref:e,basePath:h,fullPath:r})}var v=void 0,m=void 0;if(!y(p,h,s,n)){if(null==h?(m=d(p),void 0===(v=n.get(m))&&(v=new D("Could not resolve reference: "+e,{pointer:p,$ref:e,baseDoc:l,fullPath:r}))):(v=i(h,p),v=null!=v.__value?v.__value:v.catch(function(t){throw u(t,{pointer:p,$ref:e,baseDoc:l,fullPath:r})})),v instanceof Error)return[T.default.remove(r),v];var b=T.default.replace(s,v,{$$ref:e});return h&&h!==l?[b,T.default.context(s,{baseDoc:h})]:g(n.state,b)?void 0:b}}},H=(0,A.default)($,{docCache:N,absoluteify:a,clearCache:s,JSONRefError:D,wrapError:u,getDoc:l,split:o,extractFromDoc:i,fetchJSON:c,extract:f,jsonPointerToArray:d,unescapeJsonPointerToken:p});t.default=H;var V=function(e){return!e||"/"===e||"#"===e}},function(e,t){e.exports=require("babel-runtime/core-js/object/create")},function(e,t){e.exports=require("babel-runtime/core-js/weak-map")},function(e,t){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,t){e.exports=require("babel-runtime/helpers/slicedToArray")},function(e,t){e.exports=require("babel-runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("cookie")},function(e,t){e.exports=require("cross-fetch")},function(e,t){e.exports=require("cross-fetch/polyfill")},function(e,t){e.exports=require("deep-extend")},function(e,t){e.exports=require("encode-3986")},function(e,t){e.exports=require("fast-json-patch")},function(e,t){e.exports=require("isomorphic-form-data")},function(e,t){e.exports=require("js-yaml")},function(e,t){e.exports=require("lodash/cloneDeep")},function(e,t){e.exports=require("lodash/find")},function(e,t){e.exports=require("lodash/isArray")},function(e,t){e.exports=require("lodash/isObject")},function(e,t){e.exports=require("lodash/isPlainObject")},function(e,t){e.exports=require("lodash/isString")},function(e,t){e.exports=require("lodash/pick")},function(e,t){e.exports=require("qs")},function(e,t){e.exports=require("utf8-bytes")},function(e,t){e.exports=require("utfstring")},function(e,t,r){e.exports=r(19)}]);
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=58)}([function(e,t){e.exports=require("babel-runtime/core-js/object/keys")},function(e,t){e.exports=require("babel-runtime/core-js/object/assign")},function(e,t){e.exports=require("babel-runtime/helpers/typeof")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.openapi;return!!t&&(0,k.default)(t,"3")}function u(e){var t=e.swagger;return!!t&&(0,k.default)(t,"2")}function o(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return e&&"object"===(void 0===e?"undefined":(0,g.default)(e))?(e.operationId||"").replace(/\s/g,"").length?_(e.operationId):i(t,r):null}function i(e,t){return""+q(t)+_(e)}function s(e,t){return q(t)+"-"+e}function l(e,t){return e&&e.paths?c(e,function(e){var r=e.pathName,n=e.method,a=e.operation;if(!a||"object"!==(void 0===a?"undefined":(0,g.default)(a)))return!1;var u=a.operationId;return[o(a,r,n),s(r,n),u].some(function(e){return e&&e===t})}):null}function c(e,t){return f(e,t,!0)||null}function f(e,t,r){if(!e||"object"!==(void 0===e?"undefined":(0,g.default)(e))||!e.paths||"object"!==(0,g.default)(e.paths))return null;var n=e.paths;for(var a in n)for(var u in n[a])if("PARAMETERS"!==u.toUpperCase()){var o=n[a][u];if(o&&"object"===(void 0===o?"undefined":(0,g.default)(o))){var i={spec:e,pathName:a,method:u.toUpperCase(),operation:o},s=t(i);if(r&&s)return i}}}function d(e){var t=e.spec,r=t.paths,n={};if(!r)return e;for(var a in r){var u=r[a];if((0,x.default)(u)){var i=u.parameters;for(var s in u){(function(e){var r=u[e];if(!(0,x.default)(r))return"continue";var s=o(r,a,e);if(s&&(n[s]?n[s].push(r):n[s]=[r],(0,m.default)(n).forEach(function(e){if(n[e].length>1)n[e].forEach(function(t,r){t.__originalOperationId=t.__originalOperationId||t.operationId,t.operationId=""+e+(r+1)});else if(void 0!==r.operationId){var t=n[e][0];t.__originalOperationId=t.__originalOperationId||r.operationId,t.operationId=e}})),"parameters"!==e){var l=[],c={};for(var f in t)"produces"!==f&&"consumes"!==f&&"security"!==f||(c[f]=t[f],l.push(c));if(i&&(c.parameters=i,l.push(c)),l.length){var d=!0,p=!1,v=void 0;try{for(var y,g=(0,h.default)(l);!(d=(y=g.next()).done);d=!0){var b=y.value;for(var P in b)if(r[P]){if("parameters"===P){var k=!0,q=!1,_=void 0;try{for(var w,O=(0,h.default)(b[P]);!(k=(w=O.next()).done);k=!0)!function(){var e=w.value;r[P].some(function(t){return t.name===e.name})||r[P].push(e)}()}catch(e){q=!0,_=e}finally{try{!k&&O.return&&O.return()}finally{if(q)throw _}}}}else r[P]=b[P]}}catch(e){p=!0,v=e}finally{try{!d&&g.return&&g.return()}finally{if(p)throw v}}}}})(s)}}}return e}Object.defineProperty(t,"__esModule",{value:!0});var p=r(13),h=n(p),v=r(0),m=n(v),y=r(2),g=n(y);t.isOAS3=a,t.isSwagger2=u,t.opId=o,t.idFromPathMethod=i,t.legacyIdFromPathMethod=s,t.getOperationRaw=l,t.findOperation=c,t.eachOperation=f,t.normalizeSwagger=d;var b=r(51),x=n(b),P=r(19),k=n(P),q=function(e){return String.prototype.toLowerCase.call(e)},_=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"object"===(void 0===e?"undefined":(0,x.default)(e))&&(t=e,e=t.url),t.headers=t.headers||{},j.mergeInQueryOrForm(t),t.requestInterceptor&&(t=t.requestInterceptor(t)||t),/multipart\/form-data/i.test(t.headers["content-type"]||t.headers["Content-Type"])&&(delete t.headers["content-type"],delete t.headers["Content-Type"]),(t.userFetch||fetch)(t.url,t).then(function(r){var n=j.serializeRes(r,e,t).then(function(e){return t.responseInterceptor&&(e=t.responseInterceptor(e)||e),e});if(!r.ok){var a=new Error(r.statusText);return a.statusCode=a.status=r.status,n.then(function(e){throw a.response=e,a},function(e){throw a.responseError=e,a})}return n})}function u(e,t){return"application/json"===t?JSON.parse(e):_.default.safeLoad(e)}function o(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.loadSpec,a=void 0!==n&&n,o={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:i(e.headers)},s=o.headers["content-type"],l=a||A(s);return(l?e.text:e.blob||e.buffer).call(e).then(function(e){if(o.text=e,o.data=e,l)try{var t=u(e,s);o.body=t,o.obj=t}catch(e){o.parseError=e}return o})}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,r){void 0!==t[r]?(t[r]=Array.isArray(t[r])?t[r]:[t[r]],t[r].push(e)):t[r]=e}),t):t}function s(e){return"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,x.default)(e))&&"function"==typeof e.pipe}function l(e,t){var r=e.collectionFormat,n=e.allowEmptyValue,a="object"===(void 0===e?"undefined":(0,x.default)(e))?e.value:e,u={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};if(void 0===a&&n)return"";if(s(a)||"boolean"==typeof a)return a;var o=encodeURIComponent;return t&&(o=(0,O.default)(a)?function(e){return e}:function(e){return(0,g.default)(e)}),"object"!==(void 0===a?"undefined":(0,x.default)(a))||Array.isArray(a)?Array.isArray(a)?Array.isArray(a)&&!r?a.map(o).join(","):"multi"===r?a.map(o):a.map(o).join(u[r]):o(a):""}function c(e){var t=(0,m.default)(e).reduce(function(t,r){var n=e[r],a=!!n.skipEncoding,u=a?r:encodeURIComponent(r),o=function(e){return e&&"object"===(void 0===e?"undefined":(0,x.default)(e))}(n)&&!Array.isArray(n);return t[u]=l(o?n:{value:n},a),t},{});return k.default.stringify(t,{encode:!1,indices:!1})||""}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,a=e.query,u=e.form;if(u){var o=(0,m.default)(u).some(function(e){return s(u[e].value)}),i=e.headers["content-type"]||e.headers["Content-Type"];if(o||/multipart\/form-data/i.test(i)){var f=r(46);e.body=new f,(0,m.default)(u).forEach(function(t){e.body.append(t,l(u[t],!0))})}else e.body=c(u);delete e.form}if(a){var d=n.split("?"),p=(0,h.default)(d,2),v=p[0],y=p[1],g="";if(y){var b=k.default.parse(y);(0,m.default)(a).forEach(function(e){return delete b[e]}),g=k.default.stringify(b,{encode:!0})}var x=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(function(e){return e}).join("&");return n?"?"+n:""}(g,c(a));e.url=v+x,delete e.query}return e}function d(e,t,r){return r=r||function(e){return e},t=t||function(e){return e},function(n){return"string"==typeof n&&(n={url:n}),j.mergeInQueryOrForm(n),n=t(n),r(e(n))}}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldDownloadAsText=t.self=void 0;var p=r(38),h=n(p),v=r(0),m=n(v),y=r(6),g=n(y),b=r(2),x=n(b);t.default=a,t.serializeRes=o,t.serializeHeaders=i,t.encodeFormOrQuery=c,t.mergeInQueryOrForm=f,t.makeHttp=d,r(42);var P=r(55),k=n(P),q=r(47),_=n(q),w=r(53),O=n(w),j=t.self={serializeRes:o,mergeInQueryOrForm:f},A=t.shouldDownloadAsText=function(){return/json|xml|yaml|text/.test(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t,r){if(r=r||{},t=(0,H.default)({},t,{path:t.path&&u(t.path)}),"merge"===t.op){var n=i(t.path);L.default.apply(e,[n]),(0,H.default)(n.value,t.value)}else if("mergeDeep"===t.op){var a=i(t.path);L.default.apply(e,[a]);var o=(0,H.default)({},a.value);(0,G.default)(a.value,t.value);for(var s in t.value)if(Object.prototype.hasOwnProperty.call(t.value,s)){var l=t.value[s];if(Array.isArray(l)){var c=o[s]||[];a.value[s]=c.concat(l)}}}else if(L.default.apply(e,[t]),r.allowMetaPatches&&t.meta&&I(t)&&(Array.isArray(t.value)||_(t.value))){var f=i(t.path);L.default.apply(e,[f]),(0,H.default)(f.value,t.meta)}return e}function u(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function o(e,t){return{op:"add",path:e,value:t}}function i(e){return{op:"_get",path:e}}function s(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function l(e,t){return{op:"remove",path:e}}function c(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function f(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}}function d(e,t){return{type:"context",path:e,value:t}}function p(e,t){try{return v(e,y,t)}catch(e){return e}}function h(e,t){try{return v(e,m,t)}catch(e){return e}}function v(e,t,r){return q(k(e.filter(I).map(function(e){return t(e.value,r,e.path)})||[]))}function m(e,t,r){return r=r||[],Array.isArray(e)?e.map(function(e,n){return m(e,t,r.concat(n))}):_(e)?(0,z.default)(e).map(function(n){return m(e[n],t,r.concat(n))}):t(e,r[r.length-1],r)}function y(e,t,r){r=r||[];var n=[];if(r.length>0){var a=t(e,r[r.length-1],r);a&&(n=n.concat(a))}if(Array.isArray(e)){var u=e.map(function(e,n){return y(e,t,r.concat(n))});u&&(n=n.concat(u))}else if(_(e)){var o=(0,z.default)(e).map(function(n){return y(e[n],t,r.concat(n))});o&&(n=n.concat(o))}return n=k(n)}function g(e,t){if(!Array.isArray(t))return!1;for(var r=0,n=t.length;r<n;r++)if(t[r]!==e[r])return!1;return!0}function b(e,t){return t.reduce(function(e,t){return void 0!==t&&e?e[t]:e},e)}function x(e){return q(k(P(e)))}function P(e){return Array.isArray(e)?e:[e]}function k(e){var t;return(t=[]).concat.apply(t,(0,D.default)(e.map(function(e){return Array.isArray(e)?k(e):e})))}function q(e){return e.filter(function(e){return void 0!==e})}function _(e){return e&&"object"===(void 0===e?"undefined":(0,S.default)(e))}function w(e){return _(e)&&O(e.then)}function O(e){return e&&"function"==typeof e}function j(e){return e instanceof Error}function A(e){if(T(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function M(e){return B.default.isGeneratorFunction(e)}function E(e){return A(e)||T(e)&&"mutation"===e.type}function I(e){return E(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function C(e){return T(e)&&"context"===e.type}function T(e){return e&&"object"===(void 0===e?"undefined":(0,S.default)(e))}Object.defineProperty(t,"__esModule",{value:!0});var R=r(2),S=n(R),N=r(39),D=n(N),F=r(0),z=n(F),$=r(1),H=n($),V=r(45),L=n(V),U=r(17),B=n(U),J=r(43),G=n(J);t.default={add:o,replace:s,remove:l,merge:c,mergeDeep:f,context:d,getIn:b,applyPatch:a,parentPathMatch:g,flatten:k,fullyNormalizeArray:x,normalizeArray:P,isPromise:w,forEachNew:p,forEachNewPrimitive:h,isJsonPatch:A,isContextPatch:C,isPatch:T,isMutation:E,isAdditiveMutation:I,isGenerator:M,isFunction:O,isObject:_,isError:j}},function(e,t){e.exports=require("babel-runtime/core-js/json/stringify")},function(e,t){e.exports=require("babel-runtime/helpers/extends")},function(e,t){e.exports=require("lodash/assign")},function(e,t){e.exports=require("btoa")},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.freelyNamedKeyParents=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"]},function(e,t,r){"use strict";function n(e,t){function r(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];this.message=r[0],t&&t.apply(this,r)}return r.prototype=new Error,r.prototype.name=e,r.prototype.constructor=r,r}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t){e.exports=require("babel-runtime/core-js/get-iterator")},function(e,t){e.exports=require("babel-runtime/core-js/promise")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/regenerator")},function(e,t){e.exports=require("lodash/get")},function(e,t){e.exports=require("lodash/startsWith")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?r.url=e:r=e,!(this instanceof a))return new a(r);(0,l.default)(this,r);var n=this.resolve().then(function(){return t.disableInterfaces||(0,l.default)(t,a.makeApisTagOperation(t)),t});return n.client=this,n}var u=r(7),o=n(u),i=r(48),s=(n(i),r(8)),l=n(s),c=r(19),f=n(c),d=r(10),p=n(d),h=r(4),v=n(h),m=r(28),y=n(m),g=r(27),b=r(21),x=r(3);a.http=v.default,a.makeHttp=h.makeHttp.bind(null,a.http),a.resolve=y.default,a.execute=b.execute,a.serializeRes=h.serializeRes,a.serializeHeaders=h.serializeHeaders,a.clearCache=m.clearCache,a.parameterBuilders=b.PARAMETER_BUILDERS,a.makeApisTagOperation=g.makeApisTagOperation,a.buildRequest=b.buildRequest,a.helpers={opId:x.opId},e.exports=a,a.prototype={http:v.default,execute:function(e){return this.applyDefaults(),a.execute((0,o.default)({spec:this.spec,http:this.http.bind(this),securities:{authorized:this.authorizations}},e))},resolve:function(){var e=this;return a.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},a.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&(0,f.default)(t,"http")){var r=p.default.parse(t);e.host||(e.host=r.host),e.schemes||(e.schemes=[r.protocol.replace(":","")]),e.basePath||(e.basePath="/")}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.http,r=e.fetch,n=e.spec,a=e.operationId,u=e.pathName,o=e.method,i=e.parameters,s=e.securities,l=(0,m.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]);t=t||r||R.default,u&&o&&!a&&(a=(0,B.legacyIdFromPathMethod)(u,o));var c=W.buildRequest((0,h.default)({spec:n,operationId:a,parameters:i,securities:s},l));return c.body&&((0,w.default)(c.body)||(0,j.default)(c.body))&&(c.body=(0,d.default)(c.body)),t(c)}function u(e){var t=e.spec,r=e.operationId,n=(e.securities,e.requestContentType,e.responseContentType),a=e.scheme,u=e.requestInterceptor,i=e.responseInterceptor,s=e.contextUrl,l=e.userFetch,c=(e.requestBody,e.server),f=e.serverVariables,d=e.parameters,p=e.parameterBuilders,v=(0,B.isOAS3)(t);p||(p=v?$.default:F.default);var m={url:"",credentials:"same-origin",headers:{},cookies:{}};u&&(m.requestInterceptor=u),i&&(m.responseInterceptor=i),l&&(m.userFetch=l);var y=(0,B.getOperationRaw)(t,r);if(!y)throw new G("Operation "+r+" not found");var b=y.operation,x=void 0===b?{}:b,P=y.method,k=y.pathName;if(m.url+=o({spec:t,scheme:a,contextUrl:s,server:c,serverVariables:f,pathName:k,method:P}),!r)return delete m.cookies,m;m.url+=k,m.method=(""+P).toUpperCase(),d=d||{};var q=t.paths[k]||{};n&&(m.headers.accept=n);var _=K([].concat(J(x.parameters)).concat(J(q.parameters)));_.forEach(function(e){var r=p[e.in],n=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(n=d),n=e&&e.name&&d[e.name],void 0===n?n=e&&e.name&&d[e.in+"."+e.name]:Q(e.name,_).length>1&&console.warn("Parameter '"+e.name+"' is ambiguous because the defined spec has more than one parameter with the name: '"+e.name+"' and the passed-in parameter values did not define an 'in' value."),void 0!==e.default&&void 0===n&&(n=e.default),void 0===n&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");r&&r({req:m,parameter:e,value:n,operation:x,spec:t})});var w=(0,h.default)({},e,{operation:x});if(m=v?(0,V.default)(w,m):(0,U.default)(w,m),m.cookies&&(0,g.default)(m.cookies).length){var O=(0,g.default)(m.cookies).reduce(function(e,t){var r=m.cookies[t];return e+(e?"&":"")+C.default.serialize(t,r)},"");m.headers.Cookie=O}return m.cookies&&delete m.cookies,(0,T.mergeInQueryOrForm)(m),m}function o(e){return(0,B.isOAS3)(e.spec)?i(e):c(e)}function i(e){var t=e.spec,r=e.pathName,n=e.method,a=e.server,u=e.contextUrl,o=e.serverVariables,i=void 0===o?{}:o,c=(0,q.default)(t,["paths",r,(n||"").toLowerCase(),"servers"])||(0,q.default)(t,["paths",r,"servers"])||(0,q.default)(t,["servers"]),f="",d=null;if(a&&c){var p=c.map(function(e){return e.url});p.indexOf(a)>-1&&(f=a,d=c[p.indexOf(a)])}if(!f&&c&&(f=c[0].url,d=c[0]),f.indexOf("{")>-1){l(f).forEach(function(e){if(d.variables&&d.variables[e]){var t=d.variables[e],r=i[e]||t.default,n=new RegExp("{"+e+"}","g");f=f.replace(n,r)}})}return s(f,u)}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=E.default.parse(e),n=E.default.parse(t),a=Y(r.protocol)||Y(n.protocol)||"",u=r.host||n.host,o=r.pathname||"",i=void 0;return i=a&&u?a+"://"+(u+o):o,"/"===i[i.length-1]?i.slice(0,-1):i}function l(e){for(var t=[],r=/{([^}]+)}/g,n=void 0;n=r.exec(e);)t.push(n[1]);return t}function c(e){var t=e.spec,r=e.scheme,n=e.contextUrl,a=void 0===n?"":n,u=E.default.parse(a),o=Array.isArray(t.schemes)?t.schemes[0]:null,i=r||o||Y(u.protocol)||"http",s=t.host||u.host||"",l=t.basePath||"",c=void 0;return c=i&&s?i+"://"+(s+l):l,"/"===c[c.length-1]?c.slice(0,-1):c}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var f=r(6),d=n(f),p=r(7),h=n(p),v=r(37),m=n(v),y=r(0),g=n(y),b=r(1),x=n(b);t.execute=a,t.buildRequest=u,t.baseUrl=o;var P=r(8),k=(n(P),r(18)),q=n(k),_=r(52),w=n(_),O=r(50),j=n(O),A=r(9),M=(n(A),r(10)),E=n(M),I=r(40),C=n(I),T=r(4),R=n(T),S=r(12),N=n(S),D=r(26),F=n(D),z=r(23),$=n(z),H=r(22),V=n(H),L=r(25),U=n(L),B=r(3),J=function(e){return Array.isArray(e)?e:[]},G=(0,N.default)("OperationNotFoundError",function(e,t,r){this.originalError=r,(0,x.default)(this,t||{})}),Q=function(e,t){return t.filter(function(t){return t.name===e})},K=function(e){var t={};e.forEach(function(e){t[e.in]||(t[e.in]={}),t[e.in][e.name]=e});var r=[];return(0,g.default)(t).forEach(function(e){(0,g.default)(t[e]).forEach(function(n){r.push(t[e][n])})}),r},W=t.self={buildRequest:u},Y=function(e){return e?e.replace(/\W/g,""):null}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,a=e.operation,u=void 0===a?{}:a,o=e.spec,i=(0,d.default)({},t),s=n.authorized,l=void 0===s?{}:s,f=u.security||o.security||[],p=l&&!!(0,c.default)(l).length,v=(0,h.default)(o,["components","securitySchemes"])||{};return i.headers=i.headers||{},i.query=i.query||{},(0,c.default)(n).length&&p&&f&&(!Array.isArray(u.security)||u.security.length)?(f.forEach(function(e,t){for(var r in e){var n=l[r],a=v[r];if(n){var u=n.value||n,o=a.type;if(n)if("apiKey"===o)"query"===a.in&&(i.query[a.name]=u),"header"===a.in&&(i.headers[a.name]=u),"cookie"===a.in&&(i.cookies[a.name]=u);else if("http"===o){if("basic"===a.scheme){var s=u.username,c=u.password,f=(0,m.default)(s+":"+c);i.headers.Authorization="Basic "+f}"bearer"===a.scheme&&(i.headers.Authorization="Bearer "+u)}else if("oauth2"===o){var d=n.token||{},p=d.access_token,h=d.token_type;h&&"bearer"!==h.toLowerCase()||(h="Bearer"),i.headers.Authorization=h+" "+p}}}}),i):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(6),o=n(u),i=r(2),s=n(i),l=r(0),c=n(l);t.default=function(e,t){var r=e.operation,n=e.requestBody,u=e.securities,i=e.spec,l=e.requestContentType;t=a({request:t,securities:u,operation:r,spec:i});var f=r.requestBody||{},d=(0,c.default)(f.content||{});if(n){var p=l&&d.indexOf(l)>-1;if(l&&p)t.headers["Content-Type"]=l;else if(!l){var h=d[0];h&&(t.headers["Content-Type"]=h,l=h)}}return n&&(l?d.indexOf(l)>-1&&("application/x-www-form-urlencoded"===l?"object"===(void 0===n?"undefined":(0,s.default)(n))?(t.form={},(0,c.default)(n).forEach(function(e){var r=n[e];t.form[e]={value:"object"===(void 0===r?"undefined":(0,s.default)(r))?(0,o.default)(r):r}})):t.form=n:t.body=n):t.body=n),t},t.applySecurities=a;var f=r(8),d=n(f),p=r(18),h=n(p),v=r(9),m=n(v)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.req,r=e.value,n=e.parameter,a=n.name,u=n.style,o=n.explode,i=(0,p.default)({key:n.name,value:r,style:u||"simple",explode:o||!1,escape:!1});t.url=t.url.replace("{"+a+"}",i)}function u(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&(r="false"),0===r&&(r="0"),r){var a=void 0===r?"undefined":(0,f.default)(r);if("deepObject"===n.style){(0,l.default)(r).forEach(function(e){var a=r[e];t.query[n.name+"["+e+"]"]={value:(0,p.default)({key:e,value:a,style:"deepObject",escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}})}else if("object"!==a||Array.isArray(r)||"form"!==n.style&&n.style||!n.explode&&void 0!==n.explode)t.query[n.name]={value:(0,p.default)({key:n.name,value:r,style:n.style||"form",explode:void 0===n.explode||n.explode,escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0};else{var u=(0,l.default)(r);u.forEach(function(e){var a=r[e];t.query[e]={value:(0,p.default)({key:e,value:a,style:n.style||"form",escape:n.allowReserved?"unsafe":"reserved"}),skipEncoding:!0}})}}else if(n.allowEmptyValue){var o=n.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}}function o(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},h.indexOf(r.name.toLowerCase())>-1||void 0!==n&&(t.headers[r.name]=(0,p.default)({key:r.name,value:n,style:r.style||"simple",explode:void 0!==r.explode&&r.explode,escape:!1}))}function i(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{};var a=void 0===n?"undefined":(0,f.default)(n);if("undefined"!==a){var u="object"===a&&!Array.isArray(n)&&r.explode?"":r.name+"=";t.headers.Cookie=u+(0,p.default)({key:r.name,value:n,escape:!1,style:r.style||"form",explode:void 0!==r.explode&&r.explode})}}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),l=n(s),c=r(2),f=n(c),d=r(24),p=n(d);t.default={path:a,query:u,header:o,cookie:i};var h=["accept","authorization","content-type"]},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.escape;return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&r?(0,v.stringToCharArray)(e).map(function(e){return y(e)?e:m(e)&&"unsafe"===r?e:((0,h.default)(e)||[]).map(function(e){return e.toString(16).toUpperCase()}).map(function(e){return"%"+e}).join("")}).join(""):e}function u(e){var t=e.key,r=e.value,n=e.style,u=e.explode,o=e.escape,i=function(e){return a(e,{escape:o})};if("simple"===n)return r.map(function(e){return i(e)}).join(",");if("label"===n)return"."+r.map(function(e){return i(e)}).join(".");if("matrix"===n)return r.map(function(e){return i(e)}).reduce(function(e,r){return!e||u?(e||"")+";"+t+"="+r:e+","+r},"");if("form"===n){var s=u?"&"+t+"=":",";return r.map(function(e){return i(e)}).join(s)}if("spaceDelimited"===n){var l=u?t+"=":"";return r.map(function(e){return i(e)}).join(" "+l)}if("pipeDelimited"===n){var c=u?t+"=":"";return r.map(function(e){return i(e)}).join("|"+c)}}function o(e){var t=e.key,r=e.value,n=e.style,u=e.explode,o=e.escape,i=function(e){return a(e,{escape:o})},s=(0,l.default)(r);return"simple"===n?s.reduce(function(e,t){var n=i(r[t]),a=u?"=":",";return(e?e+",":"")+t+a+n},""):"label"===n?s.reduce(function(e,t){var n=i(r[t]),a=u?"=":".";return(e?e+".":".")+t+a+n},""):"matrix"===n&&u?s.reduce(function(e,t){var n=i(r[t]);return(e?e+";":";")+t+"="+n},""):"matrix"===n?s.reduce(function(e,n){var a=i(r[n]);return(e?e+",":";"+t+"=")+n+","+a},""):"form"===n?s.reduce(function(e,t){var n=i(r[t]);return(e?e+(u?"&":","):"")+t+(u?"=":",")+n},""):void 0}function i(e){var t=e.key,r=e.value,n=e.style,u=e.escape,o=function(e){return a(e,{escape:u})};return"simple"===n?o(r):"label"===n?"."+o(r):"matrix"===n?";"+t+"="+o(r):"form"===n?o(r):"deepObject"===n?o(r):void 0}Object.defineProperty(t,"__esModule",{value:!0});var s=r(0),l=n(s),c=r(2),f=n(c);t.encodeDisallowedCharacters=a,t.default=function(e){var t=e.value;return Array.isArray(t)?u(e):"object"===(void 0===t?"undefined":(0,f.default)(t))?o(e):i(e)};var d=r(44),p=(n(d),r(56)),h=n(p),v=r(57),m=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},y=function(e){return/^[a-z0-9\-._~]+$/i.test(e)}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=e.request,r=e.securities,n=void 0===r?{}:r,a=e.operation,u=void 0===a?{}:a,i=e.spec,l=(0,c.default)({},t),f=n.authorized,d=void 0===f?{}:f,p=n.specSecurity,h=void 0===p?[]:p,v=u.security||h,m=d&&!!(0,o.default)(d).length,y=i.securityDefinitions;return l.headers=l.headers||{},l.query=l.query||{},(0,o.default)(n).length&&m&&v&&(!Array.isArray(u.security)||u.security.length)?(v.forEach(function(e,t){for(var r in e){var n=d[r];if(n){var a=n.token,u=n.value||n,o=y[r],i=o.type,c=a&&a.access_token,f=a&&a.token_type;if(n)if("apiKey"===i){var p="query"===o.in?"query":"headers";l[p]=l[p]||{},l[p][o.name]=u}else"basic"===i?u.header?l.headers.authorization=u.header:(u.base64=(0,s.default)(u.username+":"+u.password),l.headers.authorization="Basic "+u.base64):"oauth2"===i&&c&&(f=f&&"bearer"!==f.toLowerCase()?f:"Bearer",l.headers.authorization=f+" "+c)}}}),l):t}Object.defineProperty(t,"__esModule",{value:!0});var u=r(0),o=n(u);t.default=function(e,t){var r=e.spec,n=e.operation,u=e.securities,o=e.requestContentType;return t=a({request:t,securities:u,operation:n,spec:r}),(t.body||t.form)&&(o?t.headers["Content-Type"]=o:Array.isArray(n.consumes)?t.headers["Content-Type"]=n.consumes[0]:Array.isArray(r.consumes)?t.headers["Content-Type"]=r.consumes[0]:n.parameters&&n.parameters.filter(function(e){return"file"===e.type}).length?t.headers["Content-Type"]="multipart/form-data":n.parameters&&n.parameters.filter(function(e){return"formData"===e.in}).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded")),t},t.applySecurities=a;var i=r(9),s=n(i),l=r(8),c=n(l),f=r(4);n(f)},function(e,t,r){"use strict";function n(e){var t=e.req,r=e.value;t.body=r}function a(e){var t=e.req,r=e.value,n=e.parameter;t.form=t.form||{},(r||n.allowEmptyValue)&&(t.form[n.name]={value:r,allowEmptyValue:n.allowEmptyValue,collectionFormat:n.collectionFormat})}function u(e){var t=e.req,r=e.parameter,n=e.value;t.headers=t.headers||{},void 0!==n&&(t.headers[r.name]=n)}function o(e){var t=e.req,r=e.value,n=e.parameter;t.url=t.url.replace("{"+n.name+"}",encodeURIComponent(r))}function i(e){var t=e.req,r=e.value,n=e.parameter;if(t.query=t.query||{},!1===r&&"boolean"===n.type&&(r="false"),0===r&&["number","integer"].indexOf(n.type)>-1&&(r="0"),r)t.query[n.name]={collectionFormat:n.collectionFormat,value:r};else if(n.allowEmptyValue){var a=n.name;t.query[a]=t.query[a]||{},t.query[a].allowEmptyValue=!0}}Object.defineProperty(t,"__esModule",{value:!0}),t.default={body:n,header:u,query:i,path:o,formData:a}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.pathName,n=t.method,a=t.operationId;return function(t){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,l.default)({spec:e.spec},(0,f.default)(e,"requestInterceptor","responseInterceptor","userFetch"),{pathName:r,method:n,parameters:t,operationId:a},u))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v.makeExecute(e),r=v.mapTagOperations({spec:e.spec,cb:t}),n={};for(var a in r){n[a]={operations:{}};for(var u in r[a])n[a].operations[u]={execute:r[a][u]}}return{apis:n}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v.makeExecute(e);return{apis:v.mapTagOperations({spec:e.spec,cb:t})}}function i(e){var t=e.spec,r=e.cb,n=void 0===r?p:r,a=e.defaultTag,u=void 0===a?"default":a,o={},i={};return(0,d.eachOperation)(t,function(e){var r=e.pathName,a=e.method,s=e.operation;(s.tags?h(s.tags):[u]).forEach(function(e){if("string"==typeof e){var u=i[e]=i[e]||{},l=(0,d.opId)(s,r,a),c=n({spec:t,pathName:r,method:a,operation:s,operationId:l});if(o[l])o[l]++,u[""+l+o[l]]=c;else if(void 0!==u[l]){var f=o[l]||1;o[l]=f+1,u[""+l+o[l]]=c;var p=u[l];delete u[l],u[""+l+f]=p}else u[l]=c}})}),i}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var s=r(7),l=n(s);t.makeExecute=a,t.makeApisTagOperationsOperationExecute=u,t.makeApisTagOperation=o,t.mapTagOperations=i;var c=r(54),f=n(c),d=r(3),p=function(){return null},h=function(e){return Array.isArray(e)?e:[e]},v=t.self={mapTagOperations:i,makeExecute:a}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.requestInterceptor,n=t.responseInterceptor;return function(t){return e({url:t,loadSpec:!0,requestInterceptor:r,responseInterceptor:n,headers:{Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.body})}}function u(){l.plugins.refs.clearCache()}function o(e){function t(e){g&&(l.plugins.refs.docCache[g]=e),l.plugins.refs.fetchJSON=a(y,{requestInterceptor:v,responseInterceptor:m});var t=[l.plugins.refs];return"function"==typeof h&&t.push(l.plugins.parameters),"function"==typeof p&&t.push(l.plugins.properties),"strict"!==o&&t.push(l.plugins.allOf),(0,c.default)({spec:e,context:{baseDoc:g},plugins:t,allowMetaPatches:d,parameterMacro:h,modelPropertyMacro:p}).then(f.normalizeSwagger)}var r=e.fetch,n=e.spec,u=e.url,o=e.mode,i=e.allowMetaPatches,d=void 0===i||i,p=e.modelPropertyMacro,h=e.parameterMacro,v=e.requestInterceptor,m=e.responseInterceptor,y=e.http,g=e.baseDoc;return g=g||u,y=r||y||s.default,n?t(n):a(y,{requestInterceptor:v,responseInterceptor:m})(g).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.makeFetchJSON=a,t.clearCache=u,t.default=o;var i=r(4),s=n(i),l=r(29),c=n(l),f=r(3)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e){return new D(e).dispatch()}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var u=r(6),o=n(u),i=r(14),s=n(i),l=r(17),c=n(l),f=r(0),d=n(f),p=r(13),h=n(p),v=r(35),m=n(v),y=r(1),g=n(y),b=r(15),x=n(b),P=r(16),k=n(P);t.default=a;var q=r(49),_=n(q),w=r(5),O=n(w),j=r(34),A=n(j),M=r(30),E=n(M),I=r(32),C=n(I),T=r(33),R=n(T),S=r(31),N=n(S),D=function(){function e(t){(0,x.default)(this,e),(0,g.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new N.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,g.default)((0,m.default)(this),O.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(O.default.isFunction),this.patches.push(O.default.add([],this.spec)),this.patches.push(O.default.context([],this.context)),this.updatePatches(this.patches)}return(0,k.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t=console).log.apply(t,n)}}},{key:"verbose",value:function(e){if("verbose"===this.debugLevel){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];(t=console).log.apply(t,["["+e+"] "].concat(n))}}},{key:"wrapPlugin",value:function(e,t){var r=null,n=void 0;return e[this.pluginProp]?(r=e,n=e[this.pluginProp]):O.default.isFunction(e)?n=e:O.default.isObject(e)&&(n=function(e){return c.default.mark(function t(r,n){var a,u,o,i,s,l,f,p,v;return c.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:v=function t(r,o,i){var s,l,f,p,v,m,y,g,b,x,P,k,q,_,w;return c.default.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(O.default.isObject(r)){a.next=6;break}if(e.key!==o[o.length-1]){a.next=4;break}return a.next=4,e.plugin(r,e.key,o,n);case 4:a.next=46;break;case 6:s=o.length-1,l=o[s],f=o.indexOf("properties"),p="properties"===l&&s===f,v=n.allowMetaPatches&&u[r.$$ref],m=!0,y=!1,g=void 0,a.prev=14,b=(0,h.default)((0,d.default)(r));case 16:if(m=(x=b.next()).done){a.next=32;break}if(P=x.value,k=r[P],q=o.concat(P),_=O.default.isObject(k),w=r.$$ref,v){a.next=26;break}if(!_){a.next=26;break}return n.allowMetaPatches&&w&&(u[w]=!0),a.delegateYield(t(k,q,i),"t0",26);case 26:if(p||P!==e.key){a.next=29;break}return a.next=29,e.plugin(k,P,q,n,i);case 29:m=!0,a.next=16;break;case 32:a.next=38;break;case 34:a.prev=34,a.t1=a.catch(14),y=!0,g=a.t1;case 38:a.prev=38,a.prev=39,!m&&b.return&&b.return();case 41:if(a.prev=41,!y){a.next=44;break}throw g;case 44:return a.finish(41);case 45:return a.finish(38);case 46:case"end":return a.stop()}},a,this,[[14,34,38,46],[39,,41,45]])},a=c.default.mark(v),u={},o=!0,i=!1,s=void 0,t.prev=6,l=(0,h.default)(r.filter(O.default.isAdditiveMutation));case 8:if(o=(f=l.next()).done){t.next=14;break}return p=f.value,t.delegateYield(v(p.value,p.path,p),"t0",11);case 11:o=!0,t.next=8;break;case 14:t.next=20;break;case 16:t.prev=16,t.t1=t.catch(6),i=!0,s=t.t1;case 20:t.prev=20,t.prev=21,!o&&l.return&&l.return();case 23:if(t.prev=23,!i){t.next=26;break}throw s;case 26:return t.finish(23);case 27:return t.finish(20);case 28:case"end":return t.stop()}},t,this,[[6,16,20,28],[21,,23,27]])})}(e)),(0,g.default)(n.bind(r),{pluginName:e.name||t,isGenerator:O.default.isGenerator(n)})}},{key:"nextPlugin",value:function(){var e=this;return(0,_.default)(this.wrappedPlugins,function(t){return e.getMutationsForPlugin(t).length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return s.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var r=this.getPluginName(e);(this.pluginHistory[r]=this.pluginHistory[r]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var r=this;O.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)return void r.errors.push(e);try{if(!O.default.isObject(e))return void r.debug("updatePatches","Got a non-object patch",e);if(r.showDebug&&r.allPatches.push(e),O.default.isPromise(e.value))return r.promisedPatches.push(e),void r.promisedPatchThen(e);if(O.default.isContextPatch(e))return void r.setContext(e.path,e.value);if(O.default.isMutation(e))return void r.updateMutations(e)}catch(e){r.errors.push(e)}})}},{key:"updateMutations",value:function(e){O.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches})&&this.mutations.push(e)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);if(t<0)return void this.debug("Tried to remove a promisedPatch that isn't there!");this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(r){var n=(0,g.default)({},e,{value:r});t.removePromisedPatch(e),t.updatePatches(n)}).catch(function(r){t.removePromisedPatch(e),t.updatePatches(r)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return O.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,o.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=O.default.fullyNormalizeArray(e),r.updatePatches(e,n))}var t=this,r=this,n=this.nextPlugin();if(!n){var a=this.nextPromisedPatch();if(a)return a.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var u={spec:this.state,errors:this.errors};return this.showDebug&&(u.patches=this.allPatches),s.default.resolve(u)}if(r.pluginCount=r.pluginCount||{},r.pluginCount[n]=(r.pluginCount[n]||0)+1,r.pluginCount[n]>100)return s.default.resolve({spec:r.state,errors:r.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(n!==this.currentPlugin&&this.promisedPatches.length){var o=this.promisedPatches.map(function(e){return e.value});return s.default.all(o.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){r.currentPlugin=n;var t=r.getCurrentMutations(),a=r.mutations.length-1;try{if(n.isGenerator){var u=!0,o=!1,i=void 0;try{for(var s,l=(0,h.default)(n(t,r.getLib()));!(u=(s=l.next()).done);u=!0){e(s.value)}}catch(e){o=!0,i=e}finally{try{!u&&l.return&&l.return()}finally{if(o)throw i}}}else{e(n(t,r.getLib()))}}catch(t){e([(0,g.default)((0,m.default)(t),{plugin:n})])}finally{r.updatePluginHistory(n,{mutationIndex:a})}return r.dispatch()}()}}]),e}(),F={refs:A.default,allOf:E.default,parameters:C.default,properties:R.default};t.SpecMap=D,t.plugins=F},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),a=function(e){return e&&e.__esModule?e:{default:e}}(n),u=r(11);t.default={key:"allOf",plugin:function(e,t,r,n,o){if(!o.meta||!o.meta.$$ref){var i=r.slice(0,-1),s=i.join("/");if(!(u.freelyNamedKeyParents.indexOf(s)>-1)){if(!Array.isArray(e)){var l=new TypeError("allOf must be an array");return l.fullPath=r,l}var c=!1,f=o.value;i.forEach(function(e){f=f[e]}),f=(0,a.default)({},f),delete f.allOf;var d=[n.replace(i,{})].concat(e.map(function(e,t){if(!n.isObject(e)){if(c)return null;c=!0;var a=new TypeError("Elements in allOf must be objects");return a.fullPath=r,a}return n.mergeDeep(i,e)}));return d.push(n.mergeDeep(i,f)),f.$$ref||d.push(n.remove([].concat(i,"$$ref"))),d}}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return u({children:{}},e,t)}function u(e,t,r){return e.value=t||{},e.protoValue=r?(0,l.default)({},r.protoValue,e.value):e.value,(0,i.default)(e.children).forEach(function(t){var r=e.children[t];e.children[t]=u(r,r.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(0),i=n(o),s=r(7),l=n(s),c=r(15),f=n(c),d=r(16),p=n(d),h=function(){function e(t){(0,f.default)(this,e),this.root=a(t||{})}return(0,p.default)(e,[{key:"set",value:function(e,t){var r=this.getParent(e,!0);if(!r)return void u(this.root,t,null);var n=e[e.length-1],o=r.children;if(o[n])return void u(o[n],t,r);o[n]=a(t,r)}},{key:"get",value:function(e){if(e=e||[],e.length<1)return this.root.value;for(var t=this.root,r=void 0,n=void 0,a=0;a<e.length&&(n=e[a],r=t.children,r[n]);a++)t=r[n];return t&&t.protoValue}},{key:"getParent",value:function(e,t){return!e||e.length<1?null:e.length<2?this.root:e.slice(0,-1).reduce(function(e,r){if(!e)return e;var n=e.children;return!n[r]&&t&&(n[r]=a(null,e)),n[r]},this.root)}}]),e}();t.default=h},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),u=n(a),o=r(5),i=n(o);t.default={key:"parameters",plugin:function(e,t,r,n,a){if(Array.isArray(e)&&e.length){var o=(0,u.default)([],e),s=r.slice(0,-1),l=(0,u.default)({},i.default.getIn(n.spec,s));return e.forEach(function(e,t){try{o[t].default=n.parameterMacro(l,e)}catch(e){var a=new Error(e);return a.fullPath=r,a}}),i.default.replace(r,o)}return i.default.replace(r,e)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(1),u=n(a),o=r(5),i=n(o);t.default={key:"properties",plugin:function(e,t,r,n){var a=(0,u.default)({},e);for(var o in e)try{a[o].default=n.modelPropertyMacro(a[o])}catch(e){var s=new Error(e);return s.fullPath=r,s}return i.default.replace(r,a)}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!D.test(e)){if(!t)throw new F("Tried to resolve a relative URL, without having a basePath. path: '"+e+"' basePath: '"+t+"'");return I.default.resolve(t,e)}return e}function u(e,t){return new F("Could not resolve reference because of: "+e.message,t,e)}function o(e){return(e+"").split("#")}function i(e,t){var r=z[e];if(r&&!T.default.isPromise(r))try{var n=f(t,r);return(0,A.default)(_.default.resolve(n),{__value:n})}catch(e){return _.default.reject(e)}return l(e).then(function(e){return f(t,e)})}function s(e){void 0!==e?delete z[e]:(0,k.default)(z).forEach(function(e){delete z[e]})}function l(e){var t=z[e];return t?T.default.isPromise(t)?t:_.default.resolve(t):(z[e]=V.fetchJSON(e).then(function(t){return z[e]=t,t}),z[e])}function c(e){return(0,M.fetch)(e,{headers:{Accept:"application/json"},loadSpec:!0}).then(function(e){return e.json()})}function f(e,t){var r=d(e);if(r.length<1)return t;var n=T.default.getIn(t,r);if(void 0===n)throw new F("Could not resolve pointer: "+e+" does not exist in document",{pointer:e});return n}function d(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+(void 0===e?"undefined":(0,x.default)(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(p)}function p(e){return"string"!=typeof e?e:e.replace(/~1/g,"/").replace(/~0/g,"~")}function h(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function v(e){return 0===e.length?"":"/"+e.map(h).join("/")}function m(e,t){if(L(t))return!0;var r=e.charAt(t.length);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)}function y(e,t,r,n){var a=$.get(n);a||(a={},$.set(n,a));var u=v(r),o=(t||"<specmap-base>")+"#"+e;if(t==n.contextTree.get([]).baseDoc&&m(u,e))return!0;var i="";if(r.some(function(e){return i=i+"/"+h(e),a[i]&&a[i].some(function(e){return m(e,o)||m(o,e)})}))return!0;a[u]=(a[u]||[]).concat(o)}function g(e,t){function r(e){return T.default.isObject(e)&&(n.indexOf(e)>=0||(0,k.default)(e).some(function(t){return r(e[t])}))}var n=[e];return t.path.reduce(function(e,t){return n.push(e[t]),e[t]},e),r(t.value)}Object.defineProperty(t,"__esModule",{value:!0});var b=r(2),x=n(b),P=r(0),k=n(P),q=r(14),_=n(q),w=r(36),O=n(w),j=r(1),A=n(j),M=r(41),E=r(10),I=n(E),C=r(5),T=n(C),R=r(12),S=n(R),N=r(11),D=new RegExp("^([a-z]+://|//)","i"),F=(0,S.default)("JSONRefError",function(e,t,r){this.originalError=r,(0,A.default)(this,t||{})}),z={},$=new O.default,H={key:"$ref",plugin:function(e,t,r,n){var s=r.slice(0,-1),l=s.join("/"),c=n.getContext(r).baseDoc;if(!(N.freelyNamedKeyParents.indexOf(l)>-1)){if("string"!=typeof e)return new F("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:c,fullPath:r});var f=o(e),p=f[0],h=f[1]||"",v=void 0;try{v=c||p?a(p,c):null}catch(t){return u(t,{pointer:h,$ref:e,basePath:v,fullPath:r})}var m=void 0,b=void 0;if(!y(h,v,s,n)){if(null==v?(b=d(h),void 0===(m=n.get(b))&&(m=new F("Could not resolve reference: "+e,{pointer:h,$ref:e,baseDoc:c,fullPath:r}))):(m=i(v,h),m=null!=m.__value?m.__value:m.catch(function(t){throw u(t,{pointer:h,$ref:e,baseDoc:c,fullPath:r})})),m instanceof Error)return[T.default.remove(r),m];var x=T.default.replace(s,m,{$$ref:e});return v&&v!==c?[x,T.default.context(s,{baseDoc:v})]:g(n.state,x)?void 0:x}}}},V=(0,A.default)(H,{docCache:z,absoluteify:a,clearCache:s,JSONRefError:F,wrapError:u,getDoc:l,split:o,extractFromDoc:i,fetchJSON:c,extract:f,jsonPointerToArray:d,unescapeJsonPointerToken:p});t.default=V;var L=function(e){return!e||"/"===e||"#"===e}},function(e,t){e.exports=require("babel-runtime/core-js/object/create")},function(e,t){e.exports=require("babel-runtime/core-js/weak-map")},function(e,t){e.exports=require("babel-runtime/helpers/objectWithoutProperties")},function(e,t){e.exports=require("babel-runtime/helpers/slicedToArray")},function(e,t){e.exports=require("babel-runtime/helpers/toConsumableArray")},function(e,t){e.exports=require("cookie")},function(e,t){e.exports=require("cross-fetch")},function(e,t){e.exports=require("cross-fetch/polyfill")},function(e,t){e.exports=require("deep-extend")},function(e,t){e.exports=require("encode-3986")},function(e,t){e.exports=require("fast-json-patch")},function(e,t){e.exports=require("isomorphic-form-data")},function(e,t){e.exports=require("js-yaml")},function(e,t){e.exports=require("lodash/cloneDeep")},function(e,t){e.exports=require("lodash/find")},function(e,t){e.exports=require("lodash/isArray")},function(e,t){e.exports=require("lodash/isObject")},function(e,t){e.exports=require("lodash/isPlainObject")},function(e,t){e.exports=require("lodash/isString")},function(e,t){e.exports=require("lodash/pick")},function(e,t){e.exports=require("qs")},function(e,t){e.exports=require("utf8-bytes")},function(e,t){e.exports=require("utfstring")},function(e,t,r){e.exports=r(20)}]);
{
"name": "swagger-client",
"version": "3.4.3",
"version": "3.4.4",
"description": "SwaggerJS - a collection of interfaces for OAI specs",

@@ -24,3 +24,3 @@ "main": "dist/index.js",

"test": "npm run just-test && npm run lint",
"just-test": "cross-env NODE_ENV=test node ./node_modules/.bin/_mocha --recursive --compilers js:babel-core/register",
"just-test": "cross-env NODE_ENV=test node ./node_modules/mocha/bin/_mocha --recursive --compilers js:babel-core/register",
"test:watch": "npm run test -- -w",

@@ -27,0 +27,0 @@ "lint": "eslint src/ test/",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc