text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41677aad"],{"017e":function(e,r,a){"use strict";a("a4d3"),a("e01a"),a("99af"),a("a15b"),a("d81d"),a("b0c0"),a("4ec9"),a("7a82"),a("4fad"),a("b64b"),a("d3b7"),a("3ca3"),a("ddb0");var t=a("6374"),n=a("278c");Object.defineProperty(r,"__esModule",{value:!0}),r.genJsDoc=r.genJsDocTypeDef=void 0;var _=a("3e47"),o=a("a1f6"),s=function(e){var r=e.name,a=e.props,t=e.code;return t||"/**\n * @typedef {\n *   {\n".concat(a&&Object.entries(a).map((function(e){var r=n(e,2),a=r[0],t=r[1];return" *     '".concat(a,"': ").concat(t.formatType,"\n")})).join("")," *   }\n * } ").concat(r,"\n**/\n")};r.genJsDocTypeDef=s;var c=function(e){return!e||o.isEmpty(e)?"":_.isParsedSchemaObject(e)?e.formatType:"{\n    ".concat(Object.entries(e).map((function(e,r){var a=n(e,2),t=a[0],_=a[1];return"".concat(0!==r?"    ":"",'"').concat(t,'": ').concat(_.formatType)})).join("\n"),"\n}")},i=function(e){var r=e.queryParamsInterface,a=e.bodyParamsInterface,_=e.pathParamsInterface,o=e.deprecated,s=e.summary,i={IQueryParams:c(r),IBodyParams:c(a),IPathParams:c(_)},u=i.IBodyParams,p=i.IQueryParams,d=i.IPathParams,m=d?"\n * @param {Object} pathParams\n".concat(Object.entries(_).map((function(e){var r=n(e,2),a=r[0],t=r[1];return" * @param {".concat(t.formatType,"} pathParams.").concat(a," ").concat(t.description?"-".concat(t.description):"")})).join("\n")):"",f=function(e){var r=e.IQueryParams,a=e.IBodyParams;return r&&a},l=(new Map).set((function(e){var r=e.IQueryParams,a=e.IBodyParams;return r&&!a}),(function(e){var r=e.IQueryParams,a=e.queryDescription;return"\n * @param {".concat(r,"} params ").concat(a)})).set((function(e){var r=e.IQueryParams,a=e.IBodyParams;return a&&!r}),(function(e){var r=e.IBodyParams,a=e.bodyDescription;return"\n * @param {".concat(r,"} params ").concat(a)})).set(f,(function(e){var r=e.IQueryParams,a=e.queryDescription;return"\n * @param {".concat(r,"} queryParams ").concat(a)})).set((function(e){var r=e.IQueryParams,a=e.pathParams,t=e.IBodyParams;return!t&&!r&&a.length}),"\n * @param {Object} _NOOP -never").set((function(e){var r=e.pathParams;return r.length}),(function(){return m})),P=(new Map).set((function(e){var r=e.pathParams;return r.length}),(function(){return m})).set(f,"\n * @param {Object} _NOOP -never"),y=(new Map).set(f,(function(e){var r=e.IBodyParams,a=e.bodyDescription;return"\n * @param {".concat(r,"} bodyParams ").concat(a)})),b=function(e){var o,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=s,i=t(e.entries());try{for(i.s();!(o=i.n()).done;){var m=n(o.value,2),f=m[0],l=m[1],P=r.description?"-".concat(r.description):"",y=a.description?"-".concat(a.description):"",b=Object.keys(_),h=f({IQueryParams:p,IBodyParams:u,pathParams:b});if(h){c="string"===typeof l?l:l({IQueryParams:p,IBodyParams:u,IPathParams:d,pathParams:b,queryDescription:P,bodyDescription:y});break}}}catch(g){i.e(g)}finally{i.f()}return c};return"/** ".concat(o?"\n * @deprecated":"","\n * @description ").concat(s," ").concat(b(l)," ").concat(b(P)," ").concat(b(y)," \n**/\n")};r.genJsDoc=i},"0529":function(e,r,a){"use strict";a("7a82"),Object.defineProperty(r,"__esModule",{value:!0}),r.tsTemplate=r.jsTemplate=void 0,r.jsTemplate="({\n  url,            // 完整路径 {string}\n  summary,        // 注释 {string}\n  method,         // 请求方法 {string}\n  name,           // api 函数名 {string}\n  responseType,   // 响应值种类，同 axios responseType {string}\n  pathParams,     // 路径参数 {Array<string>}\n  IQueryParams,   // 请求查询参数 ts 类型\n  IBodyParams,    // 请求体参数 ts 类型\n  IPathParams     // 请求路径参数 ts 类型\n}) => {\n  /**\n   * js 代码模版\n  **/ \n  \n  // debugger\n  // 可通过 debugger 调试模版\n\n  // 处理路径参数 `/pet/{id}` => `/pet/${id}`\n  const parsedUrl = url.replace(/{(.*?)}/g, '${$1}'); \n\n  // 有 query 和 body 参数\n  const multipleParamsCondition = ({ IQueryParams, IBodyParams }) =>\n    IQueryParams && IBodyParams\n    \n  const firstParamCodeMap = new Map()\n    // 只有 query 参数，可能有 path 参数\n    .set(\n      ({ IQueryParams, IBodyParams }) => IQueryParams && !IBodyParams,\n       `params,`\n    )\n    // 只有 body 参数，可能有 path 参数\n    .set(\n      ({ IQueryParams, IBodyParams }) => IBodyParams && !IQueryParams,\n       `params,`\n    )\n    // 有 query 和 body 参数，可能有 path 参数\n    .set(\n      multipleParamsCondition,\n      () => `queryParams,`\n    )\n     // 没有 query body 参数，有 path 参数\n    .set(\n      ({ IQueryParams,pathParams,IBodyParams }) => !IBodyParams && !IQueryParams && pathParams.length,\n      '_NOOP,'\n    )  \n    // 只有 path 参数\n    .set(\n      ({ pathParams }) => pathParams.length,\n      ({ pathParams }) =>\n        `{${pathParams.join(',')}},`\n    )\n    \n  const secondParamCodeMap = new Map()\n    // 有 path 参数\n    .set(\n      ({ pathParams }) => pathParams.length,\n      ({ pathParams }) =>\n        `{${pathParams.join(',')}},`\n    )\n    // 有 query 和 body 参数，有 path 参数\n    .set(multipleParamsCondition, `_NOOP,`)\n    \n  const thirdParamCodeMap = new Map()\n    // 有 query 和 body 参数，有 path 参数\n    .set(\n      multipleParamsCondition,\n      `bodyParams,`\n    )\n    \n  const paramCodeMap = new Map()\n    .set(multipleParamsCondition, 'queryParams,')\n    .set(({ IQueryParams }) => !!IQueryParams, 'params,')\n    \n  const dataCodeMap = new Map()\n    .set(multipleParamsCondition, 'bodyParams,')\n    .set(({ IBodyParams }) => !!IBodyParams, 'params,')\n\n  const createParamCode = (conditionMap, defaultCode = '') => {\n    let code = defaultCode\n    for (const [condition, codeFunction] of conditionMap.entries()) {\n      const res = condition({\n        IQueryParams,\n        IBodyParams,\n        pathParams,\n      })\n      if (res) {\n        code =\n          typeof codeFunction === 'string'\n            ? codeFunction\n            : codeFunction({\n                IQueryParams,\n                IBodyParams,\n                IPathParams,\n                pathParams,\n              })\n        break\n      }\n    }\n    return code\n  }\n \n  return `\n  export const ${name} = (\n    ${createParamCode(firstParamCodeMap) /* query | body | NOOP */}\n    ${createParamCode(secondParamCodeMap) /* path | null */}\n    ${createParamCode(thirdParamCodeMap) /* body | null */}\n) => axios.request({\n         url: \\`${parsedUrl}\\`,\n         method: \"${method}\",\n         params: ${createParamCode(paramCodeMap, '{},')}\n         data: ${createParamCode(dataCodeMap, '{},')}\n         ${responseType === \"json\" ? \"\" : `responseType: ${responseType},`}\n })`;\n}\n",r.tsTemplate="({\n  url,            // 完整路径 {string}\n  summary,        // 注释 {string}\n  method,         // 请求方法 {string}\n  name,           // api 函数名 {string}\n  responseType,   // 响应值种类，同 axios responseType {string}\n  pathParams,     // 路径参数 {Array<string>}\n  IQueryParams,   // 请求查询参数 ts 类型\n  IBodyParams,    // 请求体参数 ts 类型\n  IPathParams,    // 请求路径参数 ts 类型\n  IResponse,      // 响应参数 ts 类型\n}) => {\n  /**\n   * ts 代码模版\n  **/ \n  \n  // debugger\n  // 可通过 debugger 调试模版\n  \n  // 处理路径参数 `/pet/{id}` => `/pet/${id}`\n  const parsedUrl = url.replace(/{(.*?)}/g, '${$1}'); \n \n  // 有 query 和 body 参数\n  const multipleParamsCondition = ({ IQueryParams, IBodyParams }) =>\n    IQueryParams && IBodyParams\n    \n  const firstParamCodeMap = new Map()\n    // 只有 query 参数，可能有 path 参数\n    .set(\n      ({ IQueryParams, IBodyParams }) => IQueryParams && !IBodyParams,\n      ({ IQueryParams }) => `params: ${IQueryParams},`\n    )\n    // 只有 body 参数，可能有 path 参数\n    .set(\n      ({ IQueryParams, IBodyParams }) => IBodyParams && !IQueryParams,\n      ({ IBodyParams }) => `params: ${IBodyParams},`\n    )\n    // 有 query 和 body 参数，可能有 path 参数\n    .set(\n      multipleParamsCondition,\n      ({ IQueryParams }) => `queryParams: ${IQueryParams},`\n    )\n    // 没有 query body 参数，有 path 参数\n    .set(\n      ({ IQueryParams,pathParams,IBodyParams }) => !IBodyParams && !IQueryParams && pathParams.length,\n      '_NOOP: Record<string,never>,'\n    )\n     // 只有 path 参数\n    .set(\n      ({ pathParams }) => pathParams.length,\n      ({ pathParams, IPathParams }) =>\n        `{${pathParams.join(',')}}: ${IPathParams},`\n    )\n    \n  const secondParamCodeMap = new Map()\n    // 有 path 参数\n    .set(\n      ({ pathParams }) => pathParams.length,\n      ({ pathParams, IPathParams }) =>\n        `{${pathParams.join(',')}}: ${IPathParams},`\n    )\n    // 有 query 和 body 参数，有 path 参数\n    .set(multipleParamsCondition, `_NOOP:{[key:string]: never},`)\n    \n  const thirdParamCodeMap = new Map()\n    // 有 query 和 body 参数，有 path 参数\n    .set(\n      multipleParamsCondition,\n      ({ IBodyParams }) => `bodyParams: ${IBodyParams},`\n    )\n    \n  const paramCodeMap = new Map()\n    .set(multipleParamsCondition, 'queryParams,')\n    .set(({ IQueryParams }) => !!IQueryParams, 'params,')\n    \n  const dataCodeMap = new Map()\n    .set(multipleParamsCondition, 'bodyParams,')\n    .set(({ IBodyParams }) => !!IBodyParams, 'params,')\n\n  const createParamCode = (conditionMap, defaultCode = '') => {\n    let code = defaultCode\n    for (const [condition, codeFunction] of conditionMap.entries()) {\n      const res = condition({\n        IQueryParams,\n        IBodyParams,\n        pathParams,\n      })\n      if (res) {\n        code =\n          typeof codeFunction === 'string'\n            ? codeFunction\n            : codeFunction({\n                IQueryParams,\n                IBodyParams,\n                IPathParams,\n                pathParams,\n              })\n        break\n      }\n    }\n    return code\n  }\n \n  return `\n  ${summary ? `/** ${summary} */` : \"\"}\n  export const ${name} = (\n    ${createParamCode(firstParamCodeMap) /* query | body | NOOP */}\n    ${createParamCode(secondParamCodeMap) /* path | null */}\n    ${createParamCode(thirdParamCodeMap) /* body | null */}\n) => axios.request<${IResponse || \"any\"}>({\n         url: \\`${parsedUrl}\\`,\n         method: \"${method}\",\n         params: ${createParamCode(paramCodeMap, '{},')}\n         data: ${createParamCode(dataCodeMap, '{},')}\n         ${responseType === \"json\" ? \"\" : `responseType: ${responseType},`}\n })`;\n}\n"},"0646":function(e,r,a){"use strict";a("99af"),a("a15b"),a("d81d"),a("45fc"),a("b0c0"),a("7a82"),a("4fad"),a("b64b"),a("498a");var t=a("278c"),n=a("7037");Object.defineProperty(r,"__esModule",{value:!0}),r.isParsedSchemaObject=r.genPath=void 0;var _=a("a1f6"),o=function(e){return Object.keys(e).some((function(r){return"object"!==n(e[r])}))};r.isParsedSchemaObject=o;var s=function(e){return!e||_.isEmpty(e)?"":o(e)?e.formatType:"{\n    ".concat(Object.entries(e).map((function(e){var r=t(e,2),a=r[0],n=r[1];return'\n          "'.concat(a,'"').concat(n.required?"":"?",": ").concat(n.formatType)})).join(","),"\n      }")},c=function(e,r){var a={IQueryParams:s(e.queryParamsInterface),IBodyParams:s(e.bodyParamsInterface),IPathParams:s(e.pathParamsInterface)},t=a.IPathParams,n=a.IBodyParams,_=a.IQueryParams;return"".concat(r.templateFunction({name:e.name,method:e.method,url:e.url,responseType:e.responseInterface.isBinary?"blob":"json",deprecated:e.deprecated,summary:e.summary,IResponse:e.responseInterface.formatType,pathParams:Object.keys(e.pathParamsInterface),IQueryParams:_,IBodyParams:n,IPathParams:t}).trim(),"\n")};r.genPath=c},10:function(e,r){},11:function(e,r){},12:function(e,r){},13:function(e,r){},14:function(e,r){},15:function(e,r){},16:function(e,r){},17:function(e,r){},18:function(e,r){},19:function(e,r){},"1ea9":function(e,r,a){"use strict";a("99af"),a("4160"),a("277d"),a("a15b"),a("baa5"),a("d81d"),a("13d5"),a("fb6a"),a("7a82"),a("4fad"),a("159b");var t=a("278c"),n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.SPECIAL_CHARACTERS_MAP_CLOSE=r.SPECIAL_CHARACTERS_MAP_OPEN=r.TYPE_MAP=r.traverseTree=r.schemaToTsType=r.isRef=r.extractInterfaceNameByRef=r.getRef=r.formatGenericInterface=r.formatCode=void 0;var _=n(a("24bc")),o=n(a("5b18")),s=n(a("3f7c")),c=a("8fe6");Object.defineProperty(r,"formatGenericInterface",{enumerable:!0,get:function(){return c.formatGenericInterface}});var i=a("2fb5"),u={"«":"<","[":"<","{":"<","<":"<"};r.SPECIAL_CHARACTERS_MAP_OPEN=u;var p={"»":">","]":">","}":">",">":">"};r.SPECIAL_CHARACTERS_MAP_CLOSE=p;var d={boolean:"boolean",bool:"boolean",Boolean:"boolean",long:"number",double:"number",Int64:"number",integer:"number",number:"number",string:"string",bigdecimal:"string",LocalDate:"string",file:"Blob",formData:"FormData",Void:"void",object:"Record<string | number | symbol, any>",array:"Array<any>"};r.TYPE_MAP=d;var m=function(e,r){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"generics",t=e,n=0,_=function e(r,a){var _=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"generics";a(r,n,t),n++,r[_]&&r[_].forEach((function(r){e(r,a,_)}))};_(e,r,a)};r.traverseTree=m;var f=function(e){return i.normalizeDefinitionName(e.slice(e.lastIndexOf("/")+1))};r.extractInterfaceNameByRef=f;var l=function(e){var r=f(e);return c.formatGenericInterface(r)};r.getRef=l;var P=function(e){return e&&!!e.$ref};r.isRef=P;var y=function(e){var r;if(!e)return{type:"any",ref:"",formatType:"any",isBinary:!1,required:!1,description:""};var a=function e(r){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return r.$ref?a?l(r.$ref):f(r.$ref):r.type?Array.isArray(r.type)?JSON.stringify(r.type):a?"array"===r.type&&r.items?r.items["enum"]?"(".concat(e(r.items,a),")[]"):"".concat(e(r.items,a),"[]"):"object"===r.type?r.properties?"{".concat(Object.entries(r.properties).reduce((function(r,n){var _=t(n,2),o=_[0],s=_[1];return"".concat(r).concat(o,": ").concat(e(s,a),";")}),""),"}"):"Record<string | number | symbol, any>":r["enum"]?r["enum"].map((function(e){return'"'.concat(e,'"')})).join(" | "):d[r.type]:r.type:"any"},n="";return"array"===e.type&&(null===(r=e.items)||void 0===r?void 0:r.$ref)?n=f(e.items.$ref):e.$ref&&(n=f(e.$ref)),{type:a(e,!1),formatType:a(e),ref:n,isBinary:"file"===e.type,required:!1,description:""}};r.schemaToTsType=y;var b=function(e){return function(r){return _["default"].format(r,{plugins:[s["default"],o["default"]],printWidth:120,tabWidth:2,parser:"ts"===e?"typescript":"babel",trailingComma:"none"})}};r.formatCode=b},20:function(e,r){},"2fb5":function(module,exports,__webpack_require__){"use strict";__webpack_require__("a4d3"),__webpack_require__("e01a"),__webpack_require__("99af"),__webpack_require__("4de4"),__webpack_require__("d81d"),__webpack_require__("6eba"),__webpack_require__("0d03"),__webpack_require__("7a82"),__webpack_require__("07ac"),__webpack_require__("ac1f"),__webpack_require__("5319"),__webpack_require__("bb97");var _asyncToGenerator=__webpack_require__("c973"),_objectSpread=__webpack_require__("ded3"),__importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.createDefaultHeadCode=exports.mergeDefaultParams=exports.transformSource=exports.normalizeSource=exports.normalizeDefinitions=exports.normalizeDefinitionName=exports.createTagsByPaths=void 0;var template_1=__webpack_require__("0529"),lodash_1=__webpack_require__("a1f6"),dayjs_1=__importDefault(__webpack_require__("6065")),api_spec_converter_1=__importDefault(__webpack_require__("7fda"));exports.createTagsByPaths=function(e){return lodash_1.sortBy(lodash_1.uniq(lodash_1.flattenDeep(Object.values(e).map((function(e){return Object.values(e).map((function(e){return e.tags}))}))).filter(Boolean))).map((function(e){return{name:e}}))},exports.normalizeDefinitionName=function(e){return lodash_1.upperFirst(e.replace(/\.(\w)/g,(function(e,r){return r.toUpperCase()})))},exports.normalizeDefinitions=function(e){return lodash_1.mapKeys(e,(function(e,r){return exports.normalizeDefinitionName(r)}))},exports.normalizeSource=function(e){var r;return _objectSpread(_objectSpread({},e),{},{tags:null!==(r=e.tags)&&void 0!==r?r:exports.createTagsByPaths(e.paths),definitions:exports.normalizeDefinitions(e.definitions)})},exports.transformSource=function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!r.openapi){e.next=6;break}return e.next=3,api_spec_converter_1["default"].convert({from:"openapi_3",to:"swagger_2",source:r});case 3:return e.abrupt("return",e.sent.spec);case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),exports.mergeDefaultParams=function(){var _ref2=_asyncToGenerator(regeneratorRuntime.mark((function _callee2(config){var normalizedSource;return regeneratorRuntime.wrap((function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:return _context2.t0=exports,_context2.next=3,exports.transformSource(config.source);case 3:return _context2.t1=_context2.sent,normalizedSource=_context2.t0.normalizeSource.call(_context2.t0,_context2.t1),_context2.abrupt("return",_objectSpread(_objectSpread({jsDoc:!0,interface:!1,typedef:!1,recursive:!1,lang:"js",templateFunction:"ts"===config.lang?eval(template_1.tsTemplate):eval(template_1.jsTemplate)},config),{},{source:normalizedSource}));case 6:case"end":return _context2.stop()}}),_callee2)})));return function(e){return _ref2.apply(this,arguments)}}(),exports.createDefaultHeadCode=function(e){var r=e.url,a=e.description,t=e.title,n=e.version,_=e.fileDescription;return"/* eslint-disable */\n// @ts-nocheck\n\n/**\n * generated by free-swagger\n * @see https://www.npmjs.com/package/free-swagger\n".concat(t?" * @title ".concat(t,"\n"):"").concat(a?" * @description ".concat(a,"\n"):"").concat(_?" * @fileDescription ".concat(_,"\n"):"").concat(r?" * @host ".concat(r,"\n"):"").concat(n?" * @version ".concat(n,"\n"):""," * @date ").concat(dayjs_1["default"](Date.now()).format("YYYY-MM-DD HH:mm"),"\n**/")}},"3b29":function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,"state",(function(){return state})),__webpack_require__.d(__webpack_exports__,"handleCopyType",(function(){return handleCopyType})),__webpack_require__.d(__webpack_exports__,"handleCopyApi",(function(){return handleCopyApi})),__webpack_require__.d(__webpack_exports__,"handleCopyPath",(function(){return handleCopyPath})),__webpack_require__.d(__webpack_exports__,"handleCopyFake",(function(){return handleCopyFake})),__webpack_require__.d(__webpack_exports__,"handleCopyInterface",(function(){return handleCopyInterface})),__webpack_require__.d(__webpack_exports__,"handleCopyJsDocTypeDef",(function(){return handleCopyJsDocTypeDef}));var core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("a4d3"),core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(core_js_modules_es_symbol_js__WEBPACK_IMPORTED_MODULE_0__),core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("e01a"),core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(core_js_modules_es_symbol_description_js__WEBPACK_IMPORTED_MODULE_1__),core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("99af"),core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(core_js_modules_es_array_concat_js__WEBPACK_IMPORTED_MODULE_2__),core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("4160"),core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(core_js_modules_es_array_for_each_js__WEBPACK_IMPORTED_MODULE_3__),core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("b64b"),core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_4__),core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("07ac"),core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(core_js_modules_es_object_values_js__WEBPACK_IMPORTED_MODULE_5__),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("ac1f"),core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6___default=__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_6__),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("5319"),core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(core_js_modules_es_string_replace_js__WEBPACK_IMPORTED_MODULE_7__),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("159b"),core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_8__),element_ui_lib_theme_chalk_message_css__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("0fb7"),element_ui_lib_theme_chalk_message_css__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(element_ui_lib_theme_chalk_message_css__WEBPACK_IMPORTED_MODULE_9__),element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__("450d"),element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_10__),element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__("f529"),element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11__),regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__("96cf"),regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(regenerator_runtime_runtime_js__WEBPACK_IMPORTED_MODULE_12__),_Users_yeyan1996_Desktop_free_swagger_packages_userscript_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__("1da1"),vue__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__("2b0e"),_utils_dom_utils__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__("4f0c"),lodash_es__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__("8637"),lodash_es__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__("a474"),lodash_es__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__("e247"),free_swagger_core__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__("3e47"),free_swagger_core__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(free_swagger_core__WEBPACK_IMPORTED_MODULE_19__),_utils__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__("ed08"),json_schema_faker__WEBPACK_IMPORTED_MODULE_21__=__webpack_require__("e08d"),json_schema_faker__WEBPACK_IMPORTED_MODULE_21___default=__webpack_require__.n(json_schema_faker__WEBPACK_IMPORTED_MODULE_21__),STORAGE_KEY="SWAGGER-USERSCRIPT",SUCCESS_CODE="200",state=new vue__WEBPACK_IMPORTED_MODULE_14__["default"]({data:function(){return{url:"",dialog:!1,key:"",currentApi:{key:"",path:"",method:"",collection:{controller:{},operationId:""}},storage:{jsTemplate:free_swagger_core__WEBPACK_IMPORTED_MODULE_19__["jsTemplate"],tsTemplate:free_swagger_core__WEBPACK_IMPORTED_MODULE_19__["tsTemplate"],jsDoc:!0,interface:!1,typedef:!1,recursive:!1,exportLanguage:"js",currentLanguage:"js"},isNewUi:null,swagger:null,parsedSwagger:null}},computed:{options:function(){if(!this.swagger)return[];var e=[],r=this.swagger.paths;return Object.keys(r).forEach((function(a){Object.keys(r[a]).forEach((function(t){var n=r[a][t],_=n.tags,o=n.summary,s=n.description,c=n.operationId;e.push({path:a,method:t,key:"".concat(t," ").concat(a," ").concat(o),tag:_[_.length-1],collection:{controller:_[_.length-1],summary:o,description:s,operationId:c}})}))})),Object(lodash_es__WEBPACK_IMPORTED_MODULE_16__["a"])(Object.values(Object(lodash_es__WEBPACK_IMPORTED_MODULE_17__["a"])(e,(function(e){return e.tag}))))}},watch:{storage:{handler:function(e){localStorage.setItem(STORAGE_KEY,JSON.stringify(e))},deep:!0}},created:function(){var e=this,r=localStorage.getItem(STORAGE_KEY)?JSON.parse(localStorage.getItem(STORAGE_KEY)):{};this.storage=Object(lodash_es__WEBPACK_IMPORTED_MODULE_18__["a"])(r,this.storage,(function(e,r){if(""===e)return r})),Object(_utils__WEBPACK_IMPORTED_MODULE_20__["a"])({cb:function(){window.SwaggerBootstrapUi?e.isNewUi=!0:window.ui&&(e.isNewUi=!1)},endCondition:function(){return null!=e.isNewUi}})}}),handleCopyType=function(){var _ref=Object(_Users_yeyan1996_Desktop_free_swagger_packages_userscript_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_13__["a"])(regeneratorRuntime.mark((function _callee(){var path,method,source,storage,isJS,isTS,codeFragment,_args=arguments;return regeneratorRuntime.wrap((function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(path=_args.length>0&&void 0!==_args[0]?_args[0]:state.currentApi.path,method=_args.length>1&&void 0!==_args[1]?_args[1]:state.currentApi.method,source=_args.length>2&&void 0!==_args[2]?_args[2]:state.swagger,_context.prev=3,path){_context.next=6;break}throw new Error("请选择 path");case 6:return storage=state.storage,isJS="js"===storage.currentLanguage,isTS="ts"===storage.currentLanguage,_context.next=11,free_swagger_core__WEBPACK_IMPORTED_MODULE_19___default()({source:source,lang:storage.currentLanguage,jsDoc:storage.jsDoc,typedef:isJS,interface:isTS,recursive:storage.recursive,templateFunction:eval(isJS?storage.jsTemplate:storage.tsTemplate)},path,method);case 11:if(codeFragment=_context.sent,codeFragment){_context.next=15;break}return element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11___default.a.warning("没有可生成的类型代码"),_context.abrupt("return");case 15:Object(_utils_dom_utils__WEBPACK_IMPORTED_MODULE_15__["a"])(codeFragment),_context.next=22;break;case 18:_context.prev=18,_context.t0=_context["catch"](3),element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11___default.a.error("复制失败，请检查选择的 api 或模版"),console.log(_context.t0);case 22:case"end":return _context.stop()}}),_callee,null,[[3,18]])})));return function(){return _ref.apply(this,arguments)}}(),handleCopyApi=function(){var _ref2=Object(_Users_yeyan1996_Desktop_free_swagger_packages_userscript_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_13__["a"])(regeneratorRuntime.mark((function _callee2(){var path,method,source,storage,codeFragment,_args2=arguments;return regeneratorRuntime.wrap((function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(path=_args2.length>0&&void 0!==_args2[0]?_args2[0]:state.currentApi.path,method=_args2.length>1&&void 0!==_args2[1]?_args2[1]:state.currentApi.method,source=_args2.length>2&&void 0!==_args2[2]?_args2[2]:state.swagger,_context2.prev=3,path){_context2.next=6;break}throw new Error;case 6:return storage=state.storage,_context2.next=9,free_swagger_core__WEBPACK_IMPORTED_MODULE_19___default()({source:source,lang:storage.currentLanguage,jsDoc:storage.jsDoc,templateFunction:eval("js"===storage.currentLanguage?storage.jsTemplate:storage.tsTemplate)},path,method);case 9:codeFragment=_context2.sent,Object(_utils_dom_utils__WEBPACK_IMPORTED_MODULE_15__["a"])(codeFragment),_context2.next=17;break;case 13:_context2.prev=13,_context2.t0=_context2["catch"](3),element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11___default.a.error("复制失败，请检查选择的 api 或模版"),console.log(_context2.t0);case 17:case"end":return _context2.stop()}}),_callee2,null,[[3,13]])})));return function(){return _ref2.apply(this,arguments)}}(),handleCopyPath=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:state.currentApi.path,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:state.currentApi.method;try{var a=e.replace(/{(.*?)}/g,":$1");Object(_utils_dom_utils__WEBPACK_IMPORTED_MODULE_15__["a"])('"'.concat(r.toUpperCase()," ").concat(a,'"'))}catch(t){element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11___default.a.error("复制失败，请检查选择的 api 或模版"),console.log(t)}},handleCopyFake=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:state.currentApi.path,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:state.currentApi.method,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:state.parsedSwagger;Object(json_schema_faker__WEBPACK_IMPORTED_MODULE_21__["option"])({useExamplesValue:!0,useDefaultValue:!0,alwaysFakeOptionals:!0,refDepthMax:2,maxItems:1,failOnInvalidTypes:!1});try{var t,n,_,o=null===(t=a.paths[e][r].responses)||void 0===t||null===(n=t[SUCCESS_CODE])||void 0===n?void 0:n.schema;o?(_=Object(json_schema_faker__WEBPACK_IMPORTED_MODULE_21__["generate"])(o),_.code&&(_.code=SUCCESS_CODE)):_={code:SUCCESS_CODE,msg:"ok",data:{}},Object(_utils_dom_utils__WEBPACK_IMPORTED_MODULE_15__["a"])(_)}catch(s){console.log(s),element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11___default.a.error("复制失败，请检查选择的 api 或模版")}},handleCopyInterface=function(){var e=Object(_Users_yeyan1996_Desktop_free_swagger_packages_userscript_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_13__["a"])(regeneratorRuntime.mark((function e(){var r,a,t,n,_,o=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=o.length>0&&void 0!==o[0]?o[0]:state.swagger,a=o.length>1&&void 0!==o[1]?o[1]:state.url,t=o.length>2?o[2]:void 0,e.prev=3,e.next=6,Object(free_swagger_core__WEBPACK_IMPORTED_MODULE_19__["compileInterfaces"])({source:r,interfaceName:t,url:a});case 6:n=e.sent,_=n.code,Object(_utils_dom_utils__WEBPACK_IMPORTED_MODULE_15__["a"])(_),e.next=15;break;case 11:e.prev=11,e.t0=e["catch"](3),console.log(e.t0),element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11___default.a.error("复制失败，请检查选择的 api");case 15:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(){return e.apply(this,arguments)}}(),handleCopyJsDocTypeDef=function(){var e=Object(_Users_yeyan1996_Desktop_free_swagger_packages_userscript_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_13__["a"])(regeneratorRuntime.mark((function e(){var r,a,t,n,_,o=arguments;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return r=o.length>0&&void 0!==o[0]?o[0]:state.swagger,a=o.length>1&&void 0!==o[1]?o[1]:state.url,t=o.length>2?o[2]:void 0,e.prev=3,e.next=6,Object(free_swagger_core__WEBPACK_IMPORTED_MODULE_19__["compileJsDocTypedefs"])({source:r,interfaceName:t,url:a});case 6:n=e.sent,_=n.code,Object(_utils_dom_utils__WEBPACK_IMPORTED_MODULE_15__["a"])(_),e.next=15;break;case 11:e.prev=11,e.t0=e["catch"](3),console.log(e.t0),element_ui_lib_message__WEBPACK_IMPORTED_MODULE_11___default.a.error("复制失败，请检查选择的 api");case 15:case"end":return e.stop()}}),e,null,[[3,11]])})));return function(){return e.apply(this,arguments)}}()},"3e47":function(e,r,a){"use strict";a("4de4"),a("a15b"),a("b8bf"),a("7a82"),a("bb97");var t=a("c973"),n=this&&this.__createBinding||(Object.create?function(e,r,a,t){void 0===t&&(t=a),Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[a]}})}:function(e,r,a,t){void 0===t&&(t=a),e[t]=r[a]}),_=this&&this.__exportStar||function(e,r){for(var a in e)"default"===a||r.hasOwnProperty(a)||n(r,e,a)};Object.defineProperty(r,"__esModule",{value:!0});var o=a("2fb5"),s=a("caee"),c=function(){var e=t(regeneratorRuntime.mark((function e(r,a,t){var n,_,c,i,u,p,d,m,f,l,P,y;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=!a||!t,!n){e.next=3;break}return e.abrupt("return","");case 3:return e.next=5,o.mergeDefaultParams(r);case 5:return _=e.sent,e.next=8,s.compilePath(_,a,t);case 8:if(c=e.sent,i=c.jsDocCode,u=c.code,p=c.queryInterfaceCode,d=c.bodyInterfaceCode,m=c.pathInterfaceCode,f=c.responseInterfaceCode,l=c.queryJsDocCode,P=c.bodyJsDocCode,y=c.pathJsDocCode,!r.typedef||"js"!==r.lang){e.next=20;break}return e.abrupt("return",[l,P,y].filter(Boolean).join("\n"));case 20:if(!r["interface"]||"ts"!==r.lang){e.next=22;break}return e.abrupt("return",[p,d,m,f].filter(Boolean).join("\n"));case 22:if(!r.jsDoc||"js"!==r.lang){e.next=24;break}return e.abrupt("return",i+u);case 24:return e.abrupt("return",u);case 25:case"end":return e.stop()}}),e)})));return function(r,a,t){return e.apply(this,arguments)}}();r["default"]=c,_(a("0529"),r),_(a("2fb5"),r),_(a("1ea9"),r),_(a("0646"),r),_(a("017e"),r),_(a("d657"),r),_(a("8fe6"),r),_(a("5dbb"),r),_(a("93ac"),r),_(a("caee"),r)},4:function(e,r){},"473c":function(e,r,a){"use strict";a("7a82"),Object.defineProperty(r,"__esModule",{value:!0}),r.getResponseType=void 0;var t=a("1ea9"),n=200,_=function(e){if(!(null===e||void 0===e?void 0:e[n]))return{responseInterface:{ref:"",type:"",formatType:"",required:!1,description:"",isBinary:!1}};var r=e[n].schema;return{responseInterface:t.schemaToTsType(r)}};r.getResponseType=_},5:function(e,r){},"5dbb":function(e,r,a){"use strict";a("7a82");var t=a("ded3");Object.defineProperty(r,"__esModule",{value:!0}),r.compileInterfaces=void 0;var n=a("7550"),_=function(e){return n.compileTypes(t(t({},e),{},{type:"interface"}))};r.compileInterfaces=_},6:function(e,r){},"6e17":function(e,r,a){"use strict";a("a4d3"),a("e01a"),a("99af"),a("d81d"),a("7a82"),a("4fad");var t=a("278c");Object.defineProperty(r,"__esModule",{value:!0}),r.genInterface=void 0;var n=function(e){var r=e.formatName,a=e.props,n=e.code;return n||"export interface ".concat(r," {\n        ").concat(a&&Object.entries(a).map((function(e){var r=t(e,2),a=r[0],n=r[1];return"".concat(n.description?"\n/** ".concat(n.description," */"):"","\n            '").concat(a,"' ").concat(n.required?"":"?",": ").concat(n.formatType,"\n            ")})),"\n      }\n")};r.genInterface=n},7:function(e,r){},7550:function(e,r,a){"use strict";a("a4d3"),a("e01a"),a("99af"),a("4de4"),a("13d5"),a("b0c0"),a("4ec9"),a("7a82"),a("b64b"),a("d3b7"),a("07ac"),a("3ca3"),a("498a"),a("ddb0"),a("bb97");var t=a("c973"),n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.compileTypes=void 0;var _=a("8fe6"),o=a("1ea9"),s=a("6e17"),c=a("2fb5"),i=a("3e47"),u=n(a("bb6a")),p="undefined"===typeof window,d=function e(r){var a=r.source,t=r.interfaceName,n=r.contextMap,c=r.type,d=void 0===c?"interface":c,m=r.recursive,f=r.imports;if(!a.definitions[t])return{code:"",imports:f};var l=_.parseInterface(a.definitions,t,d),P="";try{return o.traverseTree(l,(function(r){n.has(r.name)||(n.set(r.name,r),r.code?P+="".concat("interface"===d?o.formatCode("ts")(s.genInterface(r)):i.genJsDocTypeDef(r),"\n"):!o.TYPE_MAP[r.name]&&r.props&&(m&&(P+=Object.values(r.props).filter((function(e){return e.ref})).reduce((function(r,t){var _=e({source:a,interfaceName:t.ref,contextMap:n,type:d,recursive:m,imports:f}),o=_.code;return o?"".concat(r+o,"\n"):r}),"")),P+="".concat("interface"===d?o.formatCode("ts")(s.genInterface(r)):i.genJsDocTypeDef(r),"\n")))})),{code:P?"".concat(P.trim(),"\n"):P,imports:_.uniqInterfaceNameImports(f)}}catch(b){var y="".concat("interface"===d?"interfaceName":"jsDoc",": ").concat(t," 生成失败，检查是否符合 swagger 规范");return p?console.log(u["default"].yellow(y)):(console.warn(y),console.warn(b)),{code:"// ".concat("interface"===d?"interfaceName":"jsDoc",": ").concat(t," 生成失败，检查是否符合 swagger 规范\n    \n"),imports:_.uniqInterfaceNameImports(f)}}},m=function(){var e=t(regeneratorRuntime.mark((function e(r){var a,t,n,s,i,u,p,m,f,l,P,y,b,h,g;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=r.source,t=r.interfaceName,n=r.type,s=void 0===n?"interface":n,i=r.contextMap,u=r.recursive,p=r.url,e.t0=c,e.next=4,c.transformSource(a);case 4:if(e.t1=e.sent,m=e.t0.normalizeSource.call(e.t0,e.t1),f=[],m.definitions){e.next=9;break}return e.abrupt("return",{code:"",imports:f});case 9:if(!t){e.next=16;break}return l=null!==i&&void 0!==i?i:new Map,P=c.normalizeDefinitionName(t),f.push(P),e.abrupt("return",d({recursive:u,source:m,interfaceName:P,imports:f,type:s,contextMap:l}));case 16:return y=new Map,b=Object.keys(m.definitions).reduce((function(e,r){f.push(r);var a=d({recursive:u,source:m,interfaceName:r,contextMap:y,imports:f,type:s}),t=a.code;return t?"".concat(e+t,"\n"):e}),""),h="".concat(c.createDefaultHeadCode({url:p,description:a.info.description,title:a.info.title,version:a.info.version}),"\n\n").concat(b),g="interface"===s?o.formatCode("ts")(h):h,e.abrupt("return",{code:g.trim(),imports:_.uniqInterfaceNameImports(f)});case 21:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}();r.compileTypes=m},8:function(e,r){},"8fe6":function(e,r,a){"use strict";a("a4d3"),a("e01a"),a("99af"),a("4de4"),a("7db0"),a("c740"),a("4160"),a("caad"),a("a15b"),a("d81d"),a("45fc"),a("b0c0"),a("7a82"),a("b64b"),a("07ac"),a("ac1f"),a("2532"),a("1276"),a("2ca0"),a("159b");var t=a("ded3"),n=a("278c"),_=a("6374");Object.defineProperty(r,"__esModule",{value:!0}),r.uniqInterfaceNameImports=r.formatGenericInterface=r.flatInterfaceName=r.parseInterface=r.parseInterfaceName=r.buildInInterfaces=void 0;var o=a("1ea9"),s=a("a1f6"),c=/^\w*$/,i=["T","U","V"],u={Map:{name:"Map",formatName:"JavaMap",code:"\n   export type JavaMap<T extends string | symbol | number, U> = Record<T, U>\n  ",jsDocCode:"\n/**\n * @typedef {object} JavaMap\n **/"},List:{name:"List",formatName:"JavaList",code:"\n   export type JavaList<T> = Array<T>\n  ",jsDocCode:"\n/**\n * @typedef {Array} JavaList\n **/"}};r.buildInInterfaces=u;var p=function(e){var r,a=[],t="",n=function(e){return Object.keys(o.SPECIAL_CHARACTERS_MAP_OPEN).includes(e)},s=function(e){return Object.keys(o.SPECIAL_CHARACTERS_MAP_CLOSE).includes(e)},c=_(e.split(""));try{for(c.s();!(r=c.n()).done;){var i=r.value;if(n(i))a.push(t),t="",a.push(i);else if(","===i)t&&(a.push(t),t="");else if(s(i)){t&&(a.push(t),t="");var u=void 0,p=[];while(!n(u)&&a.length>0)u=a.pop(),"string"!==typeof u||n(u)?n(u)||p.unshift(u):p.unshift({name:u,formatName:u});if(a.length){var d=a.pop();"string"===typeof d&&a.push({name:d,formatName:d,generics:p})}if(1===a.length)return a[0]}else t+=i}}catch(m){c.e(m)}finally{c.f()}return{name:t,formatName:t}};r.parseInterfaceName=p;var d=function e(r){return r.generics?"".concat(r.formatName,"<").concat(r.generics.map((function(r){return e(r)})).join(","),">"):r.formatName},m=function(e){var r=[];return o.traverseTree(p(e),(function(e){r.push(e.name)})),r};r.flatInterfaceName=m;var f=function(e){return s.uniq(s.flatten(e.map((function(e){return m(e).filter((function(e){return!Object.values(o.TYPE_MAP).includes(e)})).filter((function(e){return c.test(e)})).map((function(e){return u[e]?u[e].formatName:e}))}))))};r.uniqInterfaceNameImports=f;var l=function(e,r){return Object.keys(e).filter((function(e){return e.startsWith(r)})).some((function(e){var a=m(e),t=n(a,1),_=t[0];return r===_}))},P=function(e){return u[e]?u[e].formatName:o.TYPE_MAP[e]?o.TYPE_MAP[e]:e},y=function(e){var r=p(e);return o.traverseTree(r,(function(e){e.formatName=P(e.name)})),d(r)};r.formatGenericInterface=y;var b=function(e,r){var a={};return Object.keys(e).forEach((function(t){var n=e[t],_=o.schemaToTsType(n),s=_.type,c=_.formatType,i=_.ref;a[t]={type:s,formatType:c,ref:i,required:(null===r||void 0===r?void 0:r.includes(t))||!1,description:n.description||""}})),a},h=function(e,r){var a,t=[],n=Object.keys(e),_=function(e){return o.TYPE_MAP[e]};return null===(a=r.generics)||void 0===a||a.forEach((function(r){var a=d(r);if(_(r.name)){var s=n.findIndex((function(a){return e[a].type===r.name}));if(s<0)return;t.push(n[s])}else if("List"===r.name){var c=n.findIndex((function(a){var t,n,_,s;return null!==(s="array"===e[a].type&&o.extractInterfaceNameByRef(null!==(n=null===(t=e[a].items)||void 0===t?void 0:t.$ref)&&void 0!==n?n:"")===(null===(_=r.generics)||void 0===_?void 0:_[0].name))&&void 0!==s?s:""}));if(c<0)return;t.push(n[c])}else{var i=n.findIndex((function(r){var t,n,_;return o.getRef(null!==(t=e[r].$ref)&&void 0!==t?t:"")===a||o.getRef(null!==(_=null===(n=e[r].items)||void 0===n?void 0:n.$ref)&&void 0!==_?_:"")===a}));if(i<0)return;t.push(n[i])}})),t},g=function(e,r,a){var t=s.cloneDeep(b(e,a));return r.forEach((function(r,n){t[r]={type:e[r].type,formatType:"array"===e[r].type?"".concat(i[n],"[]"):i[n],ref:t[r].ref,required:(null===a||void 0===a?void 0:a.includes(r))||!1,description:e[r].description||""}})),t},v=function(e,r,a){var n,_,s,c=p(r),d=e[r],m=d.properties,f=d.allOf,y=d.required,b=u[c.name];if(b)return t({code:"interface"===a?b.code:b.jsDocCode},c);var v=null!==(_=null===(n=null===f||void 0===f?void 0:f.find((function(e){return e.type})))||void 0===n?void 0:n.properties)&&void 0!==_?_:m;return v?((null===(s=c.generics)||void 0===s?void 0:s.length)?o.traverseTree(c,(function(t,n){var _,o,s=u[t.name];if(s)t.code="interface"===a?s.code:s.jsDocCode;else if(e[t.name]){var p=0===n&&e[r]?e[r]:e[t.name],d=p.properties,m=p.required;if(!d)return;t.props=g(d,h(d,c),m)}else l(e,t.name)&&(t.props=g(v,h(v,c),y));t.formatName="".concat(P(t.name)).concat((null===(_=t.generics)||void 0===_?void 0:_.length)?"<".concat(null===(o=t.generics)||void 0===o?void 0:o.map((function(e,r){return i[r]})).join(","),">"):"")})):c.props=g(v,[],y),c):t("interface"===a?{code:"export type ".concat(r," = ").concat(o.schemaToTsType(e[r]).formatType)}:{code:"/**\n  * @typedef {(".concat(o.schemaToTsType(e[r]).formatType,")} ").concat(r,"\n**/")},c)};r.parseInterface=v},9:function(e,r){},"93ac":function(e,r,a){"use strict";a("7a82");var t=a("ded3");Object.defineProperty(r,"__esModule",{value:!0}),r.compileJsDocTypedefs=void 0;var n=a("7550"),_=function(e){return n.compileTypes(t(t({},e),{},{type:"jsDoc"}))};r.compileJsDocTypedefs=_},"9c0e6":function(e,r,a){"use strict";a("a4d3"),a("e01a"),a("4160"),a("45fc"),a("b0c0"),a("7a82"),a("159b"),Object.defineProperty(r,"__esModule",{value:!0}),r.getRequestType=void 0;var t=a("1ea9"),n=function(e){var r=e.type,a="",n=!1,_="";if(e.schema||e.items){var o=t.schemaToTsType(e.schema||e.items);r=o.type,_=o.ref,a=o.formatType,n=!!o.isBinary}else a=t.TYPE_MAP[e.type];return{type:r,ref:_,formatType:a,isBinary:n,description:e.description||"",required:e.required||!1}},_=function(e){if(!e||e.some(t.isRef))return{pathParamsInterface:{},queryParamsInterface:{},bodyParamsInterface:{}};var r={},a={},_={};return e.forEach((function(e){switch(e["in"]){case"path":r[e.name]=n(e);break;case"query":a[e.name]=n(e);break;case"formData":_={type:e.type,formatType:"FormData",ref:"",isBinary:!0,description:"",required:!0};break;case"body":_=n(e);break;default:return}})),{pathParamsInterface:r,bodyParamsInterface:_,queryParamsInterface:a}};r.getRequestType=_},caee:function(e,r,a){"use strict";a("99af"),a("4ec9"),a("7a82"),a("d3b7"),a("ac1f"),a("3ca3"),a("1276"),a("ddb0");var t=a("448a");a("bb97");var n=a("c973"),_=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0}),r.compilePath=r.createDefaultApiName=void 0;var o=a("3e47"),s=a("a1f6"),c=a("93ac"),i=a("5dbb"),u=_(a("bc83"));r.createDefaultApiName=function(e,r){var a;return"".concat(u["default"](null!==(a=s.last(e.split("/")))&&void 0!==a?a:""),"By").concat(s.capitalize(r))};var p=function(){var e=n(regeneratorRuntime.mark((function e(a,_,u){var p,d,m,f,l,P,y,b,h,g,v,E,I,O,D,M,T,C,j,w,k,x,B,R,A;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return d=a.source,m=d.definitions,f=d.paths,l=d.basePath,P=f[_][u],y=null!==(p=P.operationId)&&void 0!==p?p:r.createDefaultApiName(_,u),b=o.parsePath(y,"".concat(l).concat(_),u,f[_][u]),h=o.genPath(b,a),g=o.genJsDoc(b),v=s.isString(b.queryParamsInterface.type)?b.queryParamsInterface.type:"",E=s.isString(b.bodyParamsInterface.type)?b.bodyParamsInterface.type:"",I=s.isString(b.pathParamsInterface.type)?b.pathParamsInterface.type:"",O=s.isString(b.responseInterface.type)?b.responseInterface.type:"",D=new Map,M=[],T=function(){var e=n(regeneratorRuntime.mark((function e(r){var n,o,s;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!m[r]){e.next=10;break}return e.next=3,i.compileInterfaces({source:d,url:_,interfaceName:r,contextMap:D,recursive:a.recursive});case 3:return n=e.sent,o=n.code,s=n.imports,M.push.apply(M,t(s)),e.abrupt("return",o);case 10:return e.abrupt("return","");case 11:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}(),e.next=16,T(v);case 16:return C=e.sent,e.next=19,T(I);case 19:return j=e.sent,e.next=22,T(E);case 22:return w=e.sent,e.next=25,T(O);case 25:if(k=e.sent,x=new Map,!m[v]){e.next=33;break}return e.next=30,c.compileJsDocTypedefs({source:d,interfaceName:v,contextMap:x,recursive:a.recursive});case 30:e.t0=e.sent.code,e.next=34;break;case 33:e.t0="";case 34:if(B=e.t0,!m[E]){e.next=41;break}return e.next=38,c.compileJsDocTypedefs({source:d,interfaceName:E,contextMap:x,recursive:a.recursive});case 38:e.t1=e.sent.code,e.next=42;break;case 41:e.t1="";case 42:if(R=e.t1,!m[I]){e.next=49;break}return e.next=46,c.compileJsDocTypedefs({source:d,interfaceName:I,contextMap:x,recursive:a.recursive});case 46:e.t2=e.sent.code,e.next=50;break;case 49:e.t2="";case 50:return A=e.t2,e.abrupt("return",{code:o.formatCode(a.lang)(h),imports:s.uniq(M),jsDocCode:g,parsedApi:b,queryInterfaceCode:C,bodyInterfaceCode:w,pathInterfaceCode:j,responseInterfaceCode:k,queryJsDocCode:B,bodyJsDocCode:R,pathJsDocCode:A});case 52:case"end":return e.stop()}}),e)})));return function(r,a,t){return e.apply(this,arguments)}}();r.compilePath=p},d657:function(e,r,a){"use strict";a("7a82"),Object.defineProperty(r,"__esModule",{value:!0}),r.parsePath=void 0;var t=a("473c"),n=a("9c0e6"),_=function(e,r,a,_){var o=_.parameters,s=_.summary,c=void 0===s?"":s,i=_.responses,u=_.deprecated,p=void 0!==u&&u,d=n.getRequestType(o),m=d.bodyParamsInterface,f=d.queryParamsInterface,l=d.pathParamsInterface,P=t.getResponseType(i),y=P.responseInterface;return{summary:c,deprecated:p,url:r,name:e,method:a,bodyParamsInterface:m,queryParamsInterface:f,pathParamsInterface:l,responseInterface:y}};r.parsePath=_}}]);