All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.webjars.js.chunk-069eb437.a0c9f0ca.js Maven / Gradle / Ivy

/*! For license information please see chunk-069eb437.a0c9f0ca.js.LICENSE.txt */
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-069eb437"],{1148:function(e,t,a){"use strict";var r=a("a691"),n=a("1d80");e.exports="".repeat||function(e){var t=String(n(this)),a="",i=r(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(a+=t);return a}},"408a":function(e,t,a){var r=a("c6b6");e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},7444:function(e,t,a){"use strict";a.r(t);var r=(a("99af"),a("4de4"),a("4160"),a("caad"),a("c975"),a("a15b"),a("b0c0"),a("b680"),a("b64b"),a("d3b7"),a("4d63"),a("ac1f"),a("25f0"),a("2532"),a("3ca3"),a("5319"),a("1276"),a("159b"),a("ddb0"),a("2b3d"),a("5530")),n=(a("8237"),a("4328")),i=a.n(n),o=a("b1c7"),s=a("1469"),l=a("5609"),u=function(e,t,a,r,n){this.groupId=n,this.cacheKey=e,this.allGroups=a,this.commands=r,this.targetValue=t||{},this.init()};u.prototype={init:function(){var e=this;o.a.arrNotEmpty(this.commands)&&this.commands.forEach((function(t){e.addValue(t.name,t.value,t.type,t.all)}))},addValue:function(e,t,a,r){var n=this;r?this.allGroups.forEach((function(r){n.addCurrentGroup(e,t,a,r)})):this.addCurrentGroup(e,t,a,this.groupId)},addCurrentGroup:function(e,t,a,r){var n=e+a,i=this.targetValue[r];o.a.arrNotEmpty(i)?i.filter((function(e){return e.pkid==n&&e.in==a})).length>0?i.forEach((function(e){e.pkid==n&&e.in==a&&(e.value=t)})):i.push({name:e,value:t,in:a,pkid:n}):(i=[]).push({name:e,value:t,in:a,pkid:n});this.targetValue[r]=i},save:function(){s.a.setItem(this.cacheKey,this.targetValue)}};var c=u,d=function(e){var t=this;this.groupid=e.groupid||"afterScriptGroup",this.commands=[],this.allgroupids=e.allgroupids||[],this.response=e.response||{data:{},headers:{}},this.global={setHeader:function(e,a){t.global.setCommon(e,a,"header",!1)},setAllHeader:function(e,a){t.global.setCommon(e,a,"header",!0)},setParameter:function(e,a){t.global.setCommon(e,a,"query",!1)},setAllParameter:function(e,a){t.global.setCommon(e,a,"query",!0)},setCommon:function(e,a,r,n){t.global.cacheCommand(e,a,r,n)},cacheCommand:function(e,a,r,n){t.commands.push({name:e,value:a,type:r,all:n})},action:function(){if(null!=t.commands&&t.commands.length>0){var e=t.commands,a=t.groupid,r=t.allgroupids;s.a.getItem(l.a.globalParameter).then((function(t){new c(l.a.globalParameter,t,r,e,a).save()}))}},executeAsyncCommon:function(e,a,r,n){var i=t.groupid,u=e+r;if(n){var c=t.allgroupids;s.a.getItem(l.a.globalParameter).then((function(t){if(o.a.checkUndefined(t)){var n={};c.forEach((function(i){var s=t[i];o.a.checkUndefined(s)||o.a.arrEmpty(s)?((s=[]).push({name:e,value:a,in:r,pkid:u}),n[i]=s):(0==s.filter((function(e){return e.pkid==u&&e.in==r})).length?s.push({name:e,value:a,in:r,pkid:u}):s.forEach((function(e){e.in==r&&e.pkid==u&&(e.value=a)})),n[i]=s)})),s.a.setItem(l.a.globalParameter,n)}else{var i=[];i.push({name:e,value:a,in:r,pkid:u});var d={};c.forEach((function(e){d[e]=i})),s.a.setItem(l.a.globalParameter,d)}}))}else s.a.getItem(l.a.globalParameter).then((function(t){var n=[],c={};if(o.a.checkUndefined(t)){for(var d in t)d==i?n=t[d]:c[d]=t[d];0==n.filter((function(e){return e.pkid==u&&e.in==r})).length?n.push({name:e,value:a,in:r,pkid:u}):n.forEach((function(e){e.in==r&&e.pkid==u&&(e.value=a)})),c[i]=n,s.a.setItem(l.a.globalParameter,c)}else n.push({name:e,value:a,in:r,pkid:u});c[i]=n,s.a.setItem(l.a.globalParameter,c)}))}}},h=a("bc3a"),m=a.n(h),p=(a("fb6a"),a("841c"),a("53ca"));function f(e){var t="    ";if(isNaN(parseInt(e)))t=e;else switch(e){case 1:t=" ";break;case 2:t="  ";break;case 3:t="   ";break;case 4:t="    ";break;case 5:t="     ";break;case 6:t="      ";break;case 7:t="       ";break;case 8:t="        ";break;case 9:t="         ";break;case 10:t="          ";break;case 11:t="           ";break;case 12:t="            "}for(var a=["\n"],r=0;r<100;r++)a.push(a[r]+t);return a}function g(){this.step="    ",this.shift=f(this.step)}function w(e,t){return t-(e.replace(/\(/g,"").length-e.replace(/\)/g,"").length)}function b(e,t){return e.replace(/\s{1,}/g," ").replace(/ AND /gi,"~::~"+t+t+"AND ").replace(/ BETWEEN /gi,"~::~"+t+"BETWEEN ").replace(/ CASE /gi,"~::~"+t+"CASE ").replace(/ ELSE /gi,"~::~"+t+"ELSE ").replace(/ END /gi,"~::~"+t+"END ").replace(/ FROM /gi,"~::~FROM ").replace(/ GROUP\s{1,}BY/gi,"~::~GROUP BY ").replace(/ HAVING /gi,"~::~HAVING ").replace(/ IN /gi," IN ").replace(/ JOIN /gi,"~::~JOIN ").replace(/ CROSS~::~{1,}JOIN /gi,"~::~CROSS JOIN ").replace(/ INNER~::~{1,}JOIN /gi,"~::~INNER JOIN ").replace(/ LEFT~::~{1,}JOIN /gi,"~::~LEFT JOIN ").replace(/ RIGHT~::~{1,}JOIN /gi,"~::~RIGHT JOIN ").replace(/ ON /gi,"~::~"+t+"ON ").replace(/ OR /gi,"~::~"+t+t+"OR ").replace(/ ORDER\s{1,}BY/gi,"~::~ORDER BY ").replace(/ OVER /gi,"~::~"+t+"OVER ").replace(/\(\s{0,}SELECT /gi,"~::~(SELECT ").replace(/\)\s{0,}SELECT /gi,")~::~SELECT ").replace(/ THEN /gi," THEN~::~"+t).replace(/ UNION /gi,"~::~UNION~::~").replace(/ USING /gi,"~::~USING ").replace(/ WHEN /gi,"~::~"+t+"WHEN ").replace(/ WHERE /gi,"~::~WHERE ").replace(/ WITH /gi,"~::~WITH ").replace(/ ALL /gi," ALL ").replace(/ AS /gi," AS ").replace(/ ASC /gi," ASC ").replace(/ DESC /gi," DESC ").replace(/ DISTINCT /gi," DISTINCT ").replace(/ EXISTS /gi," EXISTS ").replace(/ NOT /gi," NOT ").replace(/ NULL /gi," NULL ").replace(/ LIKE /gi," LIKE ").replace(/\s{0,}SELECT /gi,"SELECT ").replace(/\s{0,}UPDATE /gi,"UPDATE ").replace(/ SET /gi," SET ").replace(/~::~{1,}/g,"~::~").split("~::~")}g.prototype.xml=function(e,t){var a=e.replace(/>\s{0,}<").replace(/-1?(o+=l[i]+a[s],n=!0,(a[s].search(/-->/)>-1||a[s].search(/\]>/)>-1||a[s].search(/!DOCTYPE/)>-1)&&(n=!1)):a[s].search(/-->/)>-1||a[s].search(/\]>/)>-1?(o+=a[s],n=!1):/^<\w/.exec(a[s-1])&&/^<\/\w/.exec(a[s])&&/^<[\w:\-\.\,]+/.exec(a[s-1])==/^<\/[\w:\-\.\,]+/.exec(a[s])[0].replace("/","")?(o+=a[s],n||i--):a[s].search(/<\w/)>-1&&-1==a[s].search(/<\//)&&-1==a[s].search(/\/>/)?o=o+=n?a[s]:l[i++]+a[s]:a[s].search(/<\w/)>-1&&a[s].search(/<\//)>-1?o=o+=n?a[s]:l[i]+a[s]:a[s].search(/<\//)>-1?o=o+=n?a[s]:l[--i]+a[s]:a[s].search(/\/>/)>-1?o=o+=n?a[s]:l[i]+a[s]:a[s].search(/<\?/)>-1||a[s].search(/xmlns\:/)>-1||a[s].search(/xmlns\=/)>-1?o+=l[i]+a[s]:o+=a[s];return"\n"==o[0]?o.slice(1):o},g.prototype.json=function(e,t){return t=t||this.step,"undefined"==typeof JSON?e:"string"==typeof e?JSON.stringify(JSON.parse(e),null,t):"object"===Object(p.a)(e)?JSON.stringify(e,null,t):e},g.prototype.css=function(e,t){var a=e.replace(/\s{1,}/g," ").replace(/\{/g,"{~::~").replace(/\}/g,"~::~}~::~").replace(/\;/g,";~::~").replace(/\/\*/g,"~::~/*").replace(/\*\//g,"*/~::~").replace(/~::~\s{0,}~::~/g,"~::~").split("~::~"),r=a.length,n=0,i="",o=0,s=t?f(t):this.shift;for(o=0;o/g,"").replace(/[ \r\n\t]{1,}xmlns/g," xmlns")).replace(/>\s{0,}<")},g.prototype.jsonmin=function(e){return"undefined"==typeof JSON?e:JSON.stringify(JSON.parse(e),null,0)},g.prototype.cssmin=function(e,t){return(t?e:e.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"")).replace(/\s{1,}/g," ").replace(/\{\s{1,}/g,"{").replace(/\}\s{1,}/g,"}").replace(/\;\s{1,}/g,";").replace(/\/\*\s{1,}/g,"/*").replace(/\*\/\s{1,}/g,"*/")},g.prototype.sqlmin=function(e){return e.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")")};var F=g,y={name:"Debug",components:{EditorScript:function(){return Promise.all([a.e("chunk-3b888a65"),a.e("chunk-0fd67716"),a.e("chunk-2d22269d")]).then(a.bind(null,"cf04"))},EditorDebugShow:function(){return Promise.all([a.e("chunk-3b888a65"),a.e("chunk-0fd67716"),a.e("chunk-3ec4aaa8"),a.e("chunk-735c675c")]).then(a.bind(null,"b3ee"))},DebugResponse:function(){return a.e("chunk-589faee0").then(a.bind(null,"3c60"))}},props:{api:{type:Object,required:!0},swaggerInstance:{type:Object,required:!0}},data:function(){var e=this;return{i18n:null,bigFlag:!1,bigBlobFlag:!1,debugUrlStyle:"width: 80%",enableRequestCache:!1,enableDynamicParameter:!1,enableHost:!1,enableHostText:"",authorizeQueryParameters:[],headerColumn:[],formColumn:[],urlFormColumn:[],allowClear:!0,pagination:!1,headerAutoOptions:l.a.debugRequestHeaders,headerOptions:l.a.debugRequestHeaderOptions,headerCount:0,headerCountFlag:!1,headerSelectName:"",selectedRowKeys:[],requestParameterAllow:!0,rowSelection:{selectedRowKeys:[],onChange:function(t,a){e.rowSelection.selectedRowKeys=t}},rowFormSelection:{selectedRowKeys:[],onChange:function(t,a){e.rowFormSelection.selectedRowKeys=t}},rowRawFormSelection:{selectedRowKeys:[],onChange:function(t,a){e.rowRawFormSelection.selectedRowKeys=t}},rowUrlFormSelection:{selectedRowKeys:[],onChange:function(t,a){e.rowUrlFormSelection.selectedRowKeys=t}},headerData:[],headerTableFlag:!0,globalParameters:[],debugUrl:"",debugPathFlag:!1,debugPathParams:[],debugLoading:!1,oAuthApi:!1,debugSend:!1,formData:[],formFlag:!1,formTableFlag:!0,urlFormData:[],urlFormFlag:!1,urlFormTableFlag:!0,rawFormData:[],rawFormFlag:!1,rawFormTableFlag:!0,rawDefaultText:"Auto",rawFlag:!1,rawTypeFlag:!1,formatFlag:!1,rawText:"",rawScript:"",rawScriptMode:"javascript",rawMode:"text",rawRequestType:"application/json",requestContentType:"x-www-form-urlencoded",responseHeaders:[],responseRawText:"",responseCurlText:"",responseStatus:null,responseContent:null,responseFieldDescriptionChecked:!0,routeHeader:null,oas2:!0}},created:function(){this.routeHeader=this.swaggerInstance.header,this.oas2=this.swaggerInstance.oas2(),this.initI18n(),this.initLocalGlobalParameters(),this.initDebugUrl(),this.enableReloadCacheParameter?this.debugUrlStyle="width: 70%;":this.debugUrlStyle="width: 80%;"},computed:{language:function(){return this.$store.state.globals.language},enableAfterScript:function(){return this.$store.state.globals.enableAfterScript},enableReloadCacheParameter:function(){return this.$store.state.globals.enableReloadCacheParameter}},watch:{language:function(e,t){this.initI18n()}},methods:{reloadCacheParameter:function(){var e=this,t=[],a=this.api.instanceId;this.$localStore.getItem(l.a.globalParameter).then((function(r){null!=r&&null!=r[a]&&null!=r[a]&&(t=r[a]),o.a.arrNotEmpty(t)&&(e.reloadUpdateHeader(t),e.rawFlag?e.reloadUpdateRawForm(t):e.formFlag?e.reloadUpdateForm(t):e.urlFormFlag&&e.reloadUpdateUrlForm(t))}))},reloadUpdateCommons:function(e,t,a){var r=[],n=!1,i=!1;o.a.arrNotEmpty(t)&&t.forEach((function(t){var i=t.name+a,s=e.filter((function(e){return e.pkid==i}));if(o.a.arrNotEmpty(s)){var l=s[0],u=o.a.getValue(l,"value","",!0);t.content=u,n=!0}r.push(t)}));var s=e.filter((function(e){return e.in==a}));return o.a.arrNotEmpty(s)&&s.forEach((function(e){var t=r.filter((function(t){return t.name==e.name}));if(!o.a.arrNotEmpty(t)){var a={id:o.a.randomMd5(),name:e.name,content:e.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};r.push(a),n=!0,i=!0}})),{update:n,data:r,add:i}},reloadUpdateHeader:function(e){var t=this,a=this.reloadUpdateCommons(e,this.headerData,"header");a.update&&(this.headerData=[],setTimeout((function(){t.headerData=a.data,a.add&&(t.initSelectionHeaders(),t.headerResetCalc())}),10))},reloadUpdateUrlForm:function(e){var t=this,a=this.reloadUpdateCommons(e,this.urlFormData,"query");a.update&&(this.urlFormData=[],setTimeout((function(){t.urlFormData=a.data,a.add&&t.initUrlFormSelections()}),10))},reloadUpdateForm:function(e){var t=this,a=this.reloadUpdateCommons(e,this.formData,"query");a.update&&(this.formData=[],setTimeout((function(){t.formData=a.data,a.add&&t.initFormSelections()}),10))},reloadUpdateRawForm:function(e){var t=this,a=this.reloadUpdateCommons(e,this.rawFormData,"query");a.update&&(this.rawFormData=[],setTimeout((function(){t.rawFormData=a.data,a.add&&(t.rawFormFlag=!0,t.rawFormTableFlag=!0,t.initRawFormSelections())}),10))},getCurrentI18nInstance:function(){return this.$i18n.messages[this.language]},initI18n:function(){var e=this.getCurrentI18nInstance();this.i18n=e,this.headerColumn=e.table.debugRequestHeaderColumns,this.formColumn=e.table.debugFormDataRequestColumns,this.urlFormColumn=e.table.debugUrlFormRequestColumns},debugUrlChange:function(e){this.debugUrl=e.target.value},initDebugUrl:function(){if(this.debugUrl=this.api.url,new RegExp("{(.*?)}","ig").test(this.debugUrl)){this.debugPathFlag=!0;for(var e=null,t=new RegExp("{(.*?)}","ig");e=t.exec(this.debugUrl);)this.debugPathParams.push(e[1])}},initLocalGlobalParameters:function(){var e=this,t=this.api.instanceId;this.$localStore.getItem(l.a.globalSettingsKey).then((function(a){if(o.a.checkUndefined(a)&&(e.enableRequestCache=a.enableRequestCache,o.a.checkUndefined(a.enableDynamicParameter)&&(e.enableDynamicParameter=a.enableDynamicParameter),o.a.checkUndefined(a.enableHost))){e.enableHost=a.enableHost;var r=a.enableHostText;o.a.checkUndefined(r)?(r.startWith("http")||(r="http://"+r),e.enableHostText=r):e.enableHost=!1}e.$localStore.getItem(l.a.globalParameter).then((function(a){null!=a&&null!=a[t]&&null!=a[t]&&(e.globalParameters=a[t]);var r=l.a.debugCacheApiId+e.api.id;e.$localStore.getItem(r).then((function(t){e.initHeaderParameter(t);var a=l.a.globalSecurityParamPrefix+e.api.instanceId;e.$localStore.getItem(a).then((function(a){o.a.arrNotEmpty(a)&&a.forEach((function(t){if("query"==t.in){var a={id:o.a.randomMd5(),name:t.name,content:t.value,value:t.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};e.api.securityFlag&&e.api.securityKeys.includes(t.key)&&e.authorizeQueryParameters.push(a)}})),e.initBodyParameter(t)}))}))}))}))},initHeaderParameter:function(e){var t=this,a=this.syncFromOAuth2();if(o.a.checkUndefined(a)){this.oAuthApi=!0;var r={id:o.a.randomMd5(),name:a.name,content:a.accessToken,require:!0,description:"",enums:null,enumsMode:"default",new:!1};this.addDebugHeader(r)}this.globalParameters.forEach((function(e){if("header"==e.in){var a={id:o.a.randomMd5(),name:e.name,content:e.value,require:!1,description:"",enums:null,enumsMode:"default",new:!1};t.addDebugHeader(a)}}));var n=l.a.globalSecurityParamPrefix+this.api.instanceId;this.$localStore.getItem(n).then((function(a){o.a.arrNotEmpty(a)&&a.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,content:e.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};"header"==e.in&&t.api.securityFlag&&t.api.securityKeys.includes(e.key)&&t.addDebugHeader(a)})),t.updateHeaderFromCacheApi(e),t.addNewLineHeader(),t.initSelectionHeaders(),t.headerResetCalc()}))},updateHeaderFromCacheApi:function(e){var t=this;if(this.enableRequestCache&&o.a.checkUndefined(e)){var a=e.headerData;this.headerData.forEach((function(e){if(!o.a.strNotBlank(e.content)){var r=a.filter((function(t){return t.name==e.name}));r.length>0&&(t.oAuthApi?"Authorization"!=e.name&&(e.content=r[0].content):e.content=r[0].content)}}))}},updateUrlFormCacheApi:function(e){if(this.enableRequestCache&&o.a.checkUndefined(e)){var t=e.urlFormData;this.urlFormData.forEach((function(e){if(!o.a.strNotBlank(e.content)){var a=t.filter((function(t){return t.name==e.name}));a.length>0&&(e.content=a[0].content)}}))}},updateRawFormCacheApi:function(e){if(this.enableRequestCache&&o.a.checkUndefined(e)){var t=e.rawFormData;this.rawFormData.forEach((function(e){if(!o.a.strNotBlank(e.content)){var a=t.filter((function(t){return t.name==e.name}));a.length>0&&(e.content=a[0].content)}})),this.rawText=e.rawText}},syncFromOAuth2:function(){var e="SELFOAuth"+this.swaggerInstance.id;if(window.localStorage){var t=window.localStorage.getItem(e);if(o.a.strNotBlank(t))return o.a.json5parse(t)}return null},updateFormCacheApi:function(e){if(this.enableRequestCache&&o.a.checkUndefined(e)){var t=e.formData;this.formData.forEach((function(e){if(!o.a.strNotBlank(e.content)){var a=t.filter((function(t){return t.name==e.name}));a.length>0&&(e.content=a[0].content)}}))}},initBodyParameter:function(e){var t=this.globalParameters.filter((function(e){return"header"!=e.in})),a=this.api.parameters,r=[],n=[];if(t.length>0&&t.forEach((function(e){if(o.a.arrNotEmpty(a)){var t=!0;a.forEach((function(a){e.name==a.name&&e.in==a.in&&o.a.strNotBlank(a.txtValue)&&(t=!1)})),t&&r.push(e)}else r.push(e)})),o.a.arrNotEmpty(a)&&a.forEach((function(e){if(o.a.arrNotEmpty(t)){var a=!0;t.forEach((function(t){t.name==e.name&&t.in==e.in&&(o.a.strNotBlank(e.txtValue)||(a=!1))})),a&&n.push(e)}else n.push(e)})),o.a.arrNotEmpty(this.authorizeQueryParameters)&&this.authorizeQueryParameters.forEach((function(e){r.push(e)})),r.length,n.length,o.a.arrNotEmpty(n))if(1==n.filter((function(e){return"body"==e.in})).length){var i=n.filter((function(e){return"body"!=e.in&&"header"!=e.in}));this.addGlobalParameterToRawForm(r),i.length>0&&(this.rawFormFlag=!0,this.addApiParameterToRawForm(i)),o.a.arrNotEmpty(this.rawFormData)&&(this.rawFormFlag=!0),this.showTabRaw(),this.addApiParameterToRaw(n),this.updateRawFormCacheApi(e),this.rawFormFlag&&this.initFirstRawFormValue()}else{n.filter((function(e){return"MultipartFile"==e.schemaValue||"file"==e.schemaValue||"file"==e.type||"formData"==e.in||"formdata"==e.in})).length>0?(this.showTabForm(),this.addGlobalParameterToForm(r),this.addApiParameterToForm(n),this.updateFormCacheApi(e),this.initFirstFormValue()):(this.showTabUrlForm(),this.addGlobalParameterToUrlForm(r),this.addApiParameterToUrlForm(n),this.updateUrlFormCacheApi(e),this.initUrlFormValue())}else"raw"==this.api.contentValue?(this.showTabRaw(),this.initFirstRawFormValue()):(this.showTabUrlForm(),this.addGlobalParameterToUrlForm(r),this.addApiParameterToUrlForm(n),this.updateUrlFormCacheApi(e),this.initUrlFormValue());this.updateScriptFromCache(e),this.updateHeaderFromCacheApi(e),this.hideDynamicParameterTable()},updateScriptFromCache:function(e){o.a.checkUndefined(e)&&o.a.strNotBlank(e.rawScript)&&(this.rawScript=e.rawScript)},hideDynamicParameterTable:function(){this.enableDynamicParameter||(0==this.headerData.length?this.headerTableFlag=!1:this.headerTableFlag=!0,0==this.urlFormData.length?this.urlFormTableFlag=!1:this.urlFormTableFlag=!0,0==this.formData.length?this.formTableFlag=!1:this.formTableFlag=!0,0==this.rawFormData.length?this.rawFormTableFlag=!1:this.rawFormTableFlag=!0),this.initSelectionHeaders(),this.headerResetCalc()},addNewLineHeader:function(){if(this.enableDynamicParameter){var e={id:o.a.randomMd5(),name:"",content:"",require:!1,description:"",enums:null,enumsMode:"default",new:!0};this.addDebugHeader(e)}this.hideDynamicParameterTable()},addDebugHeader:function(e){if(o.a.strNotBlank(e.name)){var t=this.headerData.filter((function(t){return t.name==e.name}));o.a.strBlank(e.content)?0==t.length&&this.headerData.push(e):this.headerData.push(e)}else this.headerData.push(e)},initFirstFormValue:function(){this.addNewLineFormValue(),this.initFormSelections()},initFormSelections:function(e){var t=this;o.a.strNotBlank(e)?0==this.rowFormSelection.selectedRowKeys.filter((function(t){return t==e})).length&&this.rowFormSelection.selectedRowKeys.push(e):this.formData.forEach((function(e){t.rowFormSelection.selectedRowKeys.push(e.id)}))},initRawFormSelections:function(e){var t=this;o.a.strNotBlank(e)?0==this.rowRawFormSelection.selectedRowKeys.filter((function(t){return t==e})).length&&this.rowRawFormSelection.selectedRowKeys.push(e):this.rawFormData.forEach((function(e){t.rowRawFormSelection.selectedRowKeys.push(e.id)}))},initUrlFormSelections:function(e){var t=this;o.a.strNotBlank(e)?0==this.rowUrlFormSelection.selectedRowKeys.filter((function(t){return t==e})).length&&this.rowUrlFormSelection.selectedRowKeys.push(e):this.urlFormData.forEach((function(e){t.rowUrlFormSelection.selectedRowKeys.push(e.id)}))},showTabForm:function(){this.formFlag=!0,this.rawFlag=!1,this.rawTypeFlag=!1,this.formatFlag=!1,this.urlFormFlag=!1,this.requestContentType="form-data",this.toggleBeautifyButtonStatus()},showTabUrlForm:function(){this.urlFormFlag=!0,this.rawFlag=!1,this.rawTypeFlag=!1,this.formFlag=!1,this.requestContentType="x-www-form-urlencoded",this.toggleBeautifyButtonStatus()},showTabRaw:function(){this.rawFlag=!0,this.rawMode=this.api.contentMode,this.rawDefaultText=this.api.contentShowValue,this.rawTypeFlag=!0,this.formFlag=!1,this.urlFormFlag=!1,this.rawText=o.a.toString(this.api.requestValue,""),this.api.xmlRequest&&(this.rawRequestType="application/xml"),this.requestContentType="raw",this.toggleBeautifyButtonStatus()},getEnumOptions:function(e){var t=o.a.propValue("enum",e,null),a=null;if(o.a.checkUndefined(t)){var r=[];t.forEach((function(e){r.push({value:e,label:e})})),a=r}return a},addNewLineFormValue:function(){if(this.enableDynamicParameter){var e={id:o.a.randomMd5(),name:"",type:"text",require:!1,target:null,multipart:!1,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.formData.push(e)}else this.hideDynamicParameterTable()},addGlobalParameterToRawForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,type:"text",require:!1,target:null,multipart:!1,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};t.rawFormData.push(a)}))},addGlobalParameterToForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,type:"text",require:!1,target:null,multipart:!1,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};t.formData.push(a)}))},addApiParameterToRaw:function(e){var t=this;if(o.a.arrNotEmpty(e)){var a=e.filter((function(e){return"header"==e.in}));a.length>0&&a.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=a.enums&&(o.a.strNotBlank(a.content)||(a.content=a.enums[0].value)),t.addDebugHeader(a)}))}},addApiParameterToForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){if("header"==e.in){var a={id:o.a.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=a.enums&&(o.a.strNotBlank(a.content)||(a.content=a.enums[0].value)),t.addDebugHeader(a)}else{var r="text",n=!1;"MultipartFile"!=e.schemaValue&&"file"!=e.schemaValue&&"file"!=e.type||(r="file","array"==e.type&&(n=!0));var i={id:o.a.randomMd5(),name:e.name,type:r,require:e.require,target:null,multipart:n,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=i.enums&&(o.a.strNotBlank(i.content)||(i.content=i.enums[0].value)),t.formData.push(i)}}))},addGlobalParameterToUrlForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,type:"text",require:!1,target:null,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};t.urlFormData.push(a)}))},addApiParameterToRawForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){if("header"==e.in){var a={id:o.a.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=a.enums&&(o.a.strNotBlank(a.content)||(a.content=a.enums[0].value)),t.addDebugHeader(a)}else{var r={id:o.a.randomMd5(),name:e.name,type:"text",require:e.require,target:null,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=r.enums&&(o.a.strNotBlank(r.content)||(r.content=r.enums[0].value)),t.rawFormData.push(r)}}))},addApiParameterToUrlForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){if("header"==e.in){var a={id:o.a.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=a.enums&&(o.a.strNotBlank(a.content)||(a.content=a.enums[0].value)),t.addDebugHeader(a)}else{var r="default";o.a.arrNotEmpty(e.enum)&&"array"==e.type&&(r="multiple");var n={id:o.a.randomMd5(),name:e.name,type:"text",require:e.require,target:null,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:r,new:!1};null!=n.enums&&(o.a.strNotBlank(n.content)||(n.content=n.enums[0].value)),t.urlFormData.push(n)}}))},addNewLineUrlFormValue:function(){if(this.enableDynamicParameter){var e={id:o.a.randomMd5(),name:"",type:"text",require:!1,target:null,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.urlFormData.push(e)}else this.hideDynamicParameterTable()},addNewLineRawFormValue:function(){if(this.enableDynamicParameter){var e={id:o.a.randomMd5(),name:"",type:"text",require:!1,target:null,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.rawFormData.push(e)}else this.hideDynamicParameterTable()},initFirstRawFormValue:function(){this.addNewLineRawFormValue(),this.initRawFormSelections()},initUrlFormValue:function(){this.addNewLineUrlFormValue(),this.initUrlFormSelections()},initShowFormTable:function(){"x-www-form-urlencoded"==this.requestContentType?(this.urlFormFlag=!0,this.formFlag=!1,this.rawFlag=!1,this.rawTypeFlag=!1):"form-data"==this.requestContentType?(this.formFlag=!0,this.urlFormFlag=!1,this.rawFlag=!1,this.rawTypeFlag=!1):"raw"==this.requestContentType&&(this.rawFlag=!0,this.rawTypeFlag=!0,this.urlFormFlag=!1,this.formFlag=!1),this.toggleBeautifyButtonStatus()},initSelectionHeaders:function(e){var t=this;o.a.strNotBlank(e)?0==this.rowSelection.selectedRowKeys.filter((function(t){return t==e})).length&&this.rowSelection.selectedRowKeys.push(e):this.headerData.forEach((function(e){t.rowSelection.selectedRowKeys.push(e.id)}))},headerContentEnumChnage:function(e,t){var a=t.context.$attrs["data-key"];this.headerContentChnageUpdate(e,a)},headerContentChnage:function(e){var t=e.target.value,a=e.target.getAttribute("data-key");this.headerContentChnageUpdate(t,a)},headerContentChnageUpdate:function(e,t){var a=this.headerData.filter((function(e){return e.id==t}))[0];a.new?(this.headerData.forEach((function(t){t.id==a.id&&(t.content=e,t.new=!1)})),this.addNewLineHeader()):this.headerData.forEach((function(t){t.id==a.id&&(t.content=e,t.new=!1)})),this.initSelectionHeaders(a.id),this.headerResetCalc()},headerNameFilterOption:function(e,t){return t.componentOptions.children[0].text.toUpperCase().indexOf(e.toUpperCase())>=0},headerSelect:function(e,t){this.headerSelectName=e},headerSearch:function(e){this.headerSelectName=e},headerNameChange:function(e){var t=this;e.new?(this.headerData.forEach((function(a){a.id==e.id&&(a.name=t.headerSelectName,a.new=!1)})),this.addNewLineHeader()):this.headerData.forEach((function(a){a.id==e.id&&(a.name=t.headerSelectName,a.new=!1)})),this.initSelectionHeaders(e.id),this.headerResetCalc()},headerDelete:function(e){var t=[];this.headerData.forEach((function(a){a.id!=e.id&&t.push(a)})),this.headerData=t,this.headerResetCalc()},headerResetCalc:function(){var e=this.headerData.filter((function(e){return 0==e.new}));e.length>0?(this.headerCountFlag=!0,this.headerCount=e.length):(this.headerCountFlag=!1,this.headerCount=0)},requestContentTypeChange:function(e){this.requestContentType=e.target.value,this.initShowFormTable()},formDelete:function(e){var t=[];this.formData.forEach((function(a){a.id!=e.id&&t.push(a)})),this.formData=t},formFileUploadClick:function(e){document.getElementById("file"+e.id).click()},formNameChange:function(e){var t=e.target.value,a=e.target.getAttribute("data-key"),r=this.formData.filter((function(e){return e.id==a}))[0];r.new?(this.formData.forEach((function(e){e.id==r.id&&(e.name=t,e.new=!1)})),this.addNewLineFormValue()):this.formData.forEach((function(e){e.id==r.id&&(e.name=t,e.new=!1)})),this.initFormSelections(r.id)},formTypeChange:function(e,t){var a=e.split("-"),r=a[0],n=a[1];this.formData.forEach((function(e){e.id==n&&(e.content="",e.type=r)}))},formFileChange:function(e){for(var t=e.target.files,a=[],r=0;r0){var r=a.produces[0];t.Accept=r}return this.headerData.forEach((function(a){a.new||e.rowSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&o.a.strNotBlank(a.name)&&(o.a.isChinese(a.content)?t[a.name]=encodeURIComponent(a.content):t[a.name]=o.a.toString(a.content,""))})),t["Request-Origion"]="Knife4j",o.a.checkUndefined(t["Content-Type"])||(this.rawFlag?t["Content-Type"]=this.rawRequestType:this.urlFormFlag?t["Content-Type"]="application/x-www-form-urlencoded":this.formFlag&&(this.validateFormDataContaintsFile()?t["Content-Type"]="multipart/form-data":t["Content-Type"]="application/x-www-form-urlencoded")),o.a.checkUndefined(this.routeHeader)&&(t["knfie4j-gateway-request"]=this.routeHeader),this.swaggerInstance.desktop&&(t["knife4j-gateway-code"]=this.swaggerInstance.desktopCode),t},debugRawFormParams:function(){var e=this,t={};return this.rawFormData.forEach((function(a){a.new||e.rowRawFormSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&o.a.strNotBlank(a.name)&&(t[a.name]=a.content)})),t},debugUrlFormParams:function(){var e=this,t={};return this.urlFormData.forEach((function(a){a.new||e.rowUrlFormSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&o.a.strNotBlank(a.name)&&(t[a.name]=a.content)})),t},debugFormDataParams:function(e){var t=this,a={url:"",params:{}},r=this.debugUrl;if(e){var n=new FormData;this.formData.forEach((function(e){if(!e.new&&(t.rowFormSelection.selectedRowKeys.filter((function(t){return t==e.id})).length>0&&o.a.strNotBlank(e.name)))if("text"==e.type)if(t.debugPathFlag)if(-1==t.debugPathParams.indexOf(e.name))o.a.strNotBlank(e.content)&&n.append(e.name,e.content);else{var a="{"+e.name+"}";r=r.replace(a,e.content)}else o.a.strNotBlank(e.content)&&n.append(e.name,e.content);else if(o.a.checkUndefined(e.target)){var i=e.target.files;if(i.length>0)for(var s=0;s0&&o.a.strNotBlank(e.name)))if(t.debugPathFlag)if(-1==t.debugPathParams.indexOf(e.name))i[e.name]=e.content;else{var a="{"+e.name+"}";r=r.replace(a,e.content)}else i[e.name]=e.content})),a.params=i}return a.url=r,a},debugStreamFlag:function(){var e=!1,t=this.api;null!=t.produces&&null!=t.produces&&t.produces.length>0&&(t.produces[0],e=o.a.binaryContentType(t.produces,null).binary);return e},validateCommonHeaders:function(){for(var e=!0,t="",a=0;a0&&o.a.strNotBlank(r.name)&&r.require&&!o.a.strNotBlank(r.content)){e=!1,t=this.i18n.validate.header+r.name+this.i18n.validate.notEmpty;break}}return{validate:e,message:t}},validateFormData:function(){for(var e=!0,t="",a=0;a0&&o.a.strNotBlank(r.name)&&r.require)if("text"==r.type){if(!o.a.strNotBlank(r.content)){e=!1,t=r.name+this.i18n.validate.notEmpty;break}}else if(null==r.target){e=!1,t=r.name+this.i18n.validate.fileNotEmpty;break}}return{validate:e,message:t}},validateRawForm:function(){for(var e=!0,t="",a=0;a0&&o.a.strNotBlank(r.name)&&r.require&&!o.a.strNotBlank(r.content)){e=!1,t=r.name+this.i18n.validate.notEmpty;break}}return{validate:e,message:t}},validateUrlForm:function(){for(var e=!0,t="",a=0;a0&&o.a.strNotBlank(r.name)&&r.require&&!o.a.strNotBlank(r.content)){e=!1,t=r.name+this.i18n.validate.notEmpty;break}}return{validate:e,message:t}},validateFormDataContaintsFile:function(){var e=this,t=!1;return this.formData.forEach((function(a){a.new||e.rowFormSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&"file"==a.type&&(t=!0)})),t},checkUrlParams:function(e){var t=e.indexOf("?"),a={result:!1,params:{},url:e};if(t>-1){var r=e.substring(t+1);if(a.url=e.substring(0,t),a.result=!0,o.a.strNotBlank(r))r.split("&").forEach((function(e){if(o.a.strNotBlank(e)){var t=e.split("=");2==t.length&&(a.params[t[0]]=t[1])}}))}return a},debugSendHasCookie:function(e){var t=!1;if(o.a.checkUndefined(e)){var a=Object.keys(e);if(o.a.arrNotEmpty(a))if(a.filter((function(e){return"cookie"===e.toLocaleLowerCase()})).length>0){var r=e.Cookie;o.a.strNotBlank(r)&&(document.cookie=r,t=!0)}}return t},applyRequestParams:function(e,t){var a=null,r=null;return["post","put","patch"].includes(t.toLowerCase())?o.a.checkUndefined(e)&&(a=i.a.stringify(e)):r=e,{data:a,params:r}},debugCheckUrl:function(e){var t=e;try{if(new RegExp(".*?({.*?})$","ig").test(e)){var a=RegExp.$1;t=e.replace(a,"")}}catch(e){window.console}return t},debugSendUrlFormRequest:function(){var e=this,t=this.validateUrlForm();if(t.validate){this.debugLoading=!0,this.debugSend=!0;var a=this.debugHeaders(),n=this.debugUrl,i=this.api.methodType.toLowerCase(),s=this.debugUrlFormParams();if(this.debugPathFlag){var l={};for(var u in this.debugPathParams.forEach((function(e){var t="{"+e+"}",a=o.a.getValue(s,e,"",!0);n=n.replace(t,a)})),s)-1==this.debugPathParams.indexOf(u)&&(l[u]=s[u]);s=l}var c=this.checkUrlParams(n);c.result&&(n=c.url,s=Object.assign(s,c.params));var d="";this.enableHost&&(d=this.enableHostText);var h=this.applyRequestParams(s,i),p={baseURL:d,url:this.debugCheckUrl(n),method:i,headers:a,params:h.params,timeout:0,withCredentials:this.debugSendHasCookie(a),data:h.data};this.oas2?this.debugStreamFlag()&&(p=Object(r.a)(Object(r.a)({},p),{},{responseType:"blob"})):p=Object(r.a)(Object(r.a)({},p),{},{responseType:"blob"});var f=m.a.create();f.interceptors.request.use((function(e){var t=e.url;if("get"===e.method&&e.params){t+="?";for(var a=0,r=Object.keys(e.params);a1e3)n=Math.floor(i/1e3).toFixed(1)+"s";else n=i+"ms";var l=0;"blob"==r.responseType?l=r.response.size:o.a.checkUndefined(r.responseText)&&(l=r.responseText.gblen()),this.responseStatus={code:s,cost:n,size:l}}}},setResponseCurl:function(e){var t=this,a=this,r=this.debugCheckUrl(this.debugUrl),n=new Array,i="http",s=window.location.href;new RegExp("^https.*","ig").test(s)&&(i="https");var l="";l=new RegExp("^(http|https):.*","ig").test(this.api.host)?this.api.host:i+"://"+this.api.host,this.enableHost&&(l=this.enableHostText),r.startWith("/")||(l+="/"),l+=r,n.push("curl"),n.push("-X",this.api.methodType.toUpperCase());var u=this.debugHeaders(),c=[];if(c.push("knfie4j-gateway-request"),c.push("knife4j-gateway-code"),c.push("Request-Origion"),o.a.checkUndefined(u))for(var d in u)c.includes(d)||(n.push("-H "),n.push('"'+d+":"+u[d]+'"'));if(this.rawFlag){var h=this.debugRawFormParams(),m=[];if(o.a.checkUndefined(h))for(var p in h)if(a.debugPathFlag)if(-1==a.debugPathParams.indexOf(p))m.push(p+"="+o.a.toString(h[p],""));else{var f="{"+p+"}",g=o.a.toString(h[p],"");l=l.replace(f,g)}else m.push(p+"="+o.a.toString(h[p],""));var w=m.join("&");if(o.a.strNotBlank(w)&&(l=-1==l.indexOf("?")?l+"?"+w:l+"&"+w),o.a.strNotBlank(this.rawText))try{var b=JSON.parse(this.rawText),F=JSON.stringify(b).replace(/\\n/g,"").replace(/"/g,'\\"');n.push("-d"),n.push('"'+F+'"')}catch(e){F=this.rawText.replace(/\\n/g,"").replace(/"/g,'\\"'),n.push("-d"),n.push('"'+F+'"')}}else if(this.urlFormFlag){var y=this.debugUrlFormParams();if(o.a.checkUndefined(y)){for(var p in m=[],y)a.debugPathFlag?-1==a.debugPathParams.indexOf(p)?m.push(p+"="+o.a.toString(y[p],"")):(f="{"+p+"}",g=o.a.toString(y[p],""),l=l.replace(f,g)):m.push(p+"="+o.a.toString(y[p],""));w=m.join("&"),o.a.strNotBlank(w)&&("get"==this.api.methodType.toLowerCase()||"delete"==this.api.methodType.toLowerCase()?l=-1==l.indexOf("?")?l+"?"+w:l+"&"+w:(n.push("--data-urlencode "),n.push('"'+w+'"')))}}else if(this.formFlag){var v=this.debugFormCurlParams();if(o.a.checkUndefined(v))if(this.validateFormDataContaintsFile())this.formData.forEach((function(e){e.new||t.rowFormSelection.selectedRowKeys.filter((function(t){return t==e.id})).length>0&&o.a.strNotBlank(e.name)&&(n.push("-F "),"text"==e.type?n.push('"'+e.name+"="+o.a.toString(e.content,"")+'"'):n.push('"'+e.name+"=@"+e.content+'"'))}));else{for(var p in m=[],v)a.debugPathFlag?-1==a.debugPathParams.indexOf(p)?m.push(p+"="+o.a.toString(v[p],"")):(f="{"+p+"}",g=o.a.toString(v[p],""),l=l.replace(f,g)):m.push(p+"="+o.a.toString(v[p],""));w=m.join("&"),o.a.strNotBlank(w)&&("get"==this.api.methodType.toLowerCase()||"delete"==this.api.methodType.toLowerCase()?l=-1==l.indexOf("?")?l+"?"+w:l+"&"+w:(n.push("--data-urlencode "),n.push('"'+w+'"')))}}n.push('"'+encodeURI(l)+'"'),this.responseCurlText=n.join(" ")},debugFormCurlParams:function(){var e=this,t={};return this.formData.forEach((function(a){a.new||e.rowFormSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&o.a.strNotBlank(a.name)&&(t[a.name]=a.content)})),t},setResponseBody:function(e){var t=this;if(o.a.checkUndefined(e)){var a=e.request,r=e.headers;if(o.a.checkUndefined(a)){var n=o.a.propValue("content-type",r,""),i=o.a.propValue("content-disposition",r,"");if("blob"==a.responseType||o.a.strNotBlank(i))if("application/json"==e.data.type||"application/xml"==e.data.type||"text/html"==e.data.type||"text/plain"==e.data.type){var s=new FileReader;s.onload=function(e){var n={responseText:e.target.result,response:e.target.result,responseType:"",status:a.status,statusText:a.statusText,readyState:a.readyState,timeout:a.timeout,withCredentials:a.withCredentials};t.setResponseJsonBody(n,r)},s.readAsText(e.data)}else if("text/html"==n||"text/plain"==n||"application/xml"==n)this.setResponseJsonBody(a,r);else{var l="Knife4j.txt";if(o.a.strNotBlank(i)||(i=o.a.propValue("content-disposition",r,"")),o.a.strNotBlank(i))for(var u=i.split(";"),c=0;c0){var m=h[0];null!=m&&null!=m&&""!=m&&"filename"==m.toLowerCase()&&(l=decodeURIComponent(h[1]))}}}var p=!1;if(-1!=n.indexOf("image"))p=!0;else{["bmp","jpg","png","tif","gif","pcx","tga","exif","fpx","svg","psd","cdr","pcd","dxf","ufo","eps","ai","raw","WMF","webp"].forEach((function(e){-1!=l.indexOf(e)&&(p=!0)}))}var f=this.api.produces,g=!1;o.a.arrNotEmpty(f)&&f.forEach((function(e){-1!=e.indexOf("image")&&(g=!0)})),p||(p=g);var w=window.URL.createObjectURL(e.data);this.responseContent={text:"",mode:"blob",blobFlag:!0,imageFlag:p,blobFileName:l,blobUrl:w,base64:""}}else this.setResponseJsonBody(a,r)}}},setResponseJsonBody:function(e,t){var a="",r="",n=this.getContentTypeByHeaders(t);if("json"==n){var i=(e.responseText.gblen()/1024).toFixed(1);if(this.bigBlobFlag=i>300,i>150){this.bigFlag=!0;var s=this.i18n.message.debug.contentToBig;this.$message.info(s),n="text"}else if(o.a.strNotBlank(e.responseText))try{a=o.a.json5stringify(o.a.json5parse(e.responseText))}catch(t){a=e.responseText,n="text"}if(o.a.strNotBlank(e.responseText)&&!this.bigFlag&&e.responseText.indexOf("data:image")>-1)if(new RegExp('.*?"(data:image.*?base64.*?)".*',"ig").test(e.responseText))r=RegExp.$1}else if("xml"==n){var l=e.responseText;a=o.a.strNotBlank(l)?(new F).xml(l):l}else a=e.responseText;this.responseContent={text:a,mode:n,blobFlag:!1,imageFlag:!1,blobFileName:"",blobUrl:"",base64:r}},debugEditorChange:function(e){o.a.checkUndefined(this.responseContent)&&(this.responseContent.text=e)},getContentTypeByHeaders:function(e){var t="json",a=o.a.propValue("Content-Type",e,"");return o.a.strNotBlank(a)||(a=o.a.propValue("content-type",e,"")),o.a.strNotBlank(a)&&(t=a.indexOf("json")>=0?"json":a.indexOf("xml")>=0?"xml":a.indexOf("text/html")>=0?"html":"text"),t},debugShowFieldDescriptionChange:function(e){this.responseFieldDescriptionChecked=e}}},v=a("2877"),C=Object(v.a)(y,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"knife4j-debug"},[a("a-spin",{attrs:{tip:"Loading...",spinning:e.debugLoading}},[a("div",{staticClass:"spin-content"},[a("a-row",[a("a-col",{class:"knife4j-debug-api-"+e.api.methodType.toLowerCase(),attrs:{span:24}},[a("a-input-group",{attrs:{compact:""}},[a("span",{staticClass:"knife4j-api-summary-method"},[e.api.securityFlag?a("a-icon",{staticStyle:{"font-size":"16px"},attrs:{type:"unlock"}}):e._e(),e._v(" "+e._s(e.api.methodType))],1),a("a-input",{style:e.debugUrlStyle,attrs:{value:e.debugUrl},on:{change:e.debugUrlChange}}),a("a-button",{staticClass:"knife4j-api-send",attrs:{type:"primary"},domProps:{innerHTML:e._s(e.$t("debug.send"))},on:{click:e.sendRestfulApi}},[e._v("发 送")]),e.enableReloadCacheParameter?a("a-button",{on:{click:e.reloadCacheParameter}},[e._v("刷新变量")]):e._e()],1)],1)],1),a("a-row",{staticClass:"knife4j-debug-tabs"},[a("a-tabs",{attrs:{defaultActiveKey:"2"}},[a("a-tab-pane",{key:"1"},[a("template",{slot:"tab"},[a("span",[e.headerCountFlag?a("a-tag",{staticClass:"knife4j-debug-param-count"},[e._v(e._s(e.headerCount))]):e._e(),a("span",{domProps:{innerHTML:e._s(e.$t("debug.headers"))}},[e._v("请求头部")])],1)]),e.headerTableFlag?a("a-table",{attrs:{bordered:"",size:"small",rowSelection:e.rowSelection,columns:e.headerColumn,pagination:e.pagination,dataSource:e.headerData,rowKey:"id"},scopedSlots:e._u([{key:"headerName",fn:function(t,r){return[a("a-auto-complete",{staticStyle:{width:"100%"},attrs:{value:t,filterOption:e.headerNameFilterOption,allowClear:e.allowClear,dataSource:e.headerAutoOptions,placeholder:e.$t("debug.tableHeader.holderName")},on:{select:e.headerSelect,search:e.headerSearch,change:function(t){return e.headerNameChange(r)}}})]}},{key:"headerValue",fn:function(t,r){return[null!=r.enums?a("a-row",[a("a-select",{staticStyle:{width:"100%"},attrs:{mode:r.enumsMode,defaultValue:t,"data-key":r.id,options:r.enums},on:{change:e.headerContentEnumChnage}})],1):a("a-row",[a("a-input",{class:"knife4j-debug-param-require"+r.require,attrs:{placeholder:e.$t("debug.tableHeader.holderValue"),"data-key":r.id,defaultValue:t},on:{change:e.headerContentChnage}})],1)]}},{key:"operation",fn:function(t,r){return a("a-row",{},[r.new?e._e():a("a-button",{attrs:{type:"link"},domProps:{innerHTML:e._s(e.$t("debug.tableHeader.holderDel"))},on:{click:function(t){return e.headerDelete(r)}}},[e._v("删除")])],1)}}],null,!1,1327304640)}):e._e()],2),a("a-tab-pane",{key:"2",attrs:{tab:e.$t("debug.params"),forceRender:""}},[a("a-row",{staticClass:"knife4j-debug-request-type"},[a("div",{staticClass:"knife4j-debug-request-content-type-float"},[a("a-radio-group",{staticClass:"knife4j-debug-request-content-type",on:{change:e.requestContentTypeChange},model:{value:e.requestContentType,callback:function(t){e.requestContentType=t},expression:"requestContentType"}},[a("a-radio",{attrs:{value:"x-www-form-urlencoded"}},[e._v("x-www-form-urlencoded")]),a("a-radio",{attrs:{value:"form-data"}},[e._v("form-data")]),a("a-radio",{attrs:{value:"raw"}},[e._v("raw")])],1)],1),a("div",{staticClass:"knife4j-debug-request-content-type-float"},[a("div",{staticClass:"knife4j-debug-request-content-type-raw"},[e.rawTypeFlag?a("a-dropdown",{attrs:{trigger:["click"]}},[a("span",{staticClass:"knife4j-debug-raw-span"},[a("span",[e._v(e._s(e.rawDefaultText))]),a("a-icon",{attrs:{type:"down"}})],1),a("a-menu",{attrs:{slot:"overlay"},on:{click:e.rawMenuClick},slot:"overlay"},[a("a-menu-item",{key:"Auto",attrs:{"data-mode-type":"application/json","data-mode":"text"}},[e._v("Auto")]),a("a-menu-item",{key:"Text(text/plain)",attrs:{"data-mode-type":"text/plain","data-mode":"text"}},[e._v("Text(text/plain)")]),a("a-menu-item",{key:"JSON(application/json)",attrs:{"data-mode-type":"application/json","data-mode":"json"}},[e._v("JSON(application/json)")]),a("a-menu-item",{key:"Javascript(application/Javascript)",attrs:{"data-mode-type":"application/javascript","data-mode":"javascript"}},[e._v("Javascript(application/Javascript)")]),a("a-menu-item",{key:"XML(application/xml)",attrs:{"data-mode-type":"application/xml","data-mode":"xml"}},[e._v("XML(application/xml)")]),a("a-menu-item",{key:"XML(text/xml)",attrs:{"data-mode-type":"text/xml","data-mode":"xml"}},[e._v("XML(text/xml)")]),a("a-menu-item",{key:"HTML(text/html)",attrs:{"data-mode-type":"text/html","data-mode":"html"}},[e._v("HTML(text/html)")])],1)],1):e._e()],1)]),e.formatFlag?a("div",{staticClass:"knife4j-debug-request-content-type-beautify"},[a("a",{on:{click:e.beautifyJson}},[e._v("Beautify")])]):e._e()]),e.formFlag?a("a-row",[e.formTableFlag?a("a-table",{attrs:{bordered:"",size:"small",rowSelection:e.rowFormSelection,columns:e.formColumn,pagination:e.pagination,dataSource:e.formData,rowKey:"id"},scopedSlots:e._u([{key:"formName",fn:function(t,r){return[a("a-input",{attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.formNameChange}})]}},{key:"formType",fn:function(t,r){return[a("a-select",{staticStyle:{width:"100%"},attrs:{defaultValue:t+"-"+r.id},on:{change:e.formTypeChange}},[a("a-select-option",{attrs:{value:"text-"+r.id}},[a("span",{domProps:{innerHTML:e._s(e.$t("debug.form.itemText"))}},[e._v("文本")])]),a("a-select-option",{attrs:{value:"file-"+r.id}},[a("span",{domProps:{innerHTML:e._s(e.$t("debug.form.itemFile"))}},[e._v("文件")])])],1)]}},{key:"formValue",fn:function(t,r){return["text"==r.type?a("div",[null!=r.enums?a("a-row",[a("a-select",{staticStyle:{width:"100%"},attrs:{mode:r.enumsMode,defaultValue:t,"data-key":r.id,options:r.enums},on:{change:e.formContentEnumChange}})],1):a("a-row",[a("a-input",{class:"knife4j-debug-param-require"+r.require,attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.formContentChange}})],1)],1):a("div",[a("div",[r.multipart?a("div",{staticStyle:{display:"none"}},[a("input",{staticStyle:{display:"none"},attrs:{id:"file"+r.id,multiple:"",type:"file","data-key":r.id},on:{change:e.formFileChange}})]):a("div",{staticStyle:{display:"none"}},[a("input",{staticStyle:{display:"none"},attrs:{id:"file"+r.id,type:"file","data-key":r.id},on:{change:e.formFileChange}})]),a("a-input-group",{attrs:{compact:""}},[a("a-input",{class:"knife4j-debug-param-require"+r.require,staticStyle:{width:"80%"},attrs:{value:r.content,disabled:""}}),a("a-button",{staticClass:"knife4j-api-send",staticStyle:{width:"80px"},attrs:{type:"primary"},domProps:{innerHTML:e._s(e.$t("debug.form.upload"))},on:{click:function(t){return e.formFileUploadClick(r)}}},[e._v("选择文件")])],1)],1)])]}},{key:"operation",fn:function(t,r){return a("a-row",{},[r.new?e._e():a("a-button",{attrs:{type:"link"},domProps:{innerHTML:e._s(e.$t("debug.tableHeader.holderDel"))},on:{click:function(t){return e.formDelete(r)}}},[e._v("删除")])],1)}}],null,!1,2148726805)}):e._e()],1):e._e(),e.urlFormFlag?a("a-row",[e.urlFormTableFlag?a("a-table",{attrs:{bordered:"",size:"small",rowSelection:e.rowUrlFormSelection,columns:e.urlFormColumn,pagination:e.pagination,dataSource:e.urlFormData,rowKey:"id"},scopedSlots:e._u([{key:"urlFormName",fn:function(t,r){return[a("a-input",{attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.urlFormNameChange}})]}},{key:"urlFormValue",fn:function(t,r){return[null!=r.enums?a("a-row",[a("a-select",{staticStyle:{width:"100%"},attrs:{mode:r.enumsMode,defaultValue:t,"data-key":r.id,options:r.enums},on:{change:e.urlFormContentEnumChange}})],1):a("a-row",[a("a-input",{class:"knife4j-debug-param-require"+r.require,attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.urlFormContentChange}})],1)]}},{key:"operation",fn:function(t,r){return a("a-row",{},[r.new?e._e():a("a-button",{attrs:{type:"link"},domProps:{innerHTML:e._s(e.$t("debug.tableHeader.holderDel"))},on:{click:function(t){return e.urlFormDelete(r)}}},[e._v("删除")])],1)}}],null,!1,942578135)}):e._e()],1):e._e(),e.rawFlag?a("a-row",[e.rawFormFlag?a("a-row",[e.rawFormTableFlag?a("a-table",{attrs:{bordered:"",size:"small",rowSelection:e.rowRawFormSelection,columns:e.urlFormColumn,pagination:e.pagination,dataSource:e.rawFormData,rowKey:"id"},scopedSlots:e._u([{key:"urlFormName",fn:function(t,r){return[a("a-input",{attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.rawFormNameChange}})]}},{key:"urlFormValue",fn:function(t,r){return[null!=r.enums?a("a-row",[a("a-select",{staticStyle:{width:"100%"},attrs:{mode:r.enumsMode,defaultValue:t,"data-key":r.id,options:r.enums},on:{change:e.rawFormContentEnumChange}})],1):a("a-row",[a("a-input",{class:"knife4j-debug-param-require"+r.require,attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.rawFormContentChange}})],1)]}},{key:"operation",fn:function(t,r){return a("a-row",{},[r.new?e._e():a("a-button",{attrs:{type:"link"},domProps:{innerHTML:e._s(e.$t("debug.tableHeader.holderDel"))},on:{click:function(t){return e.rawFormDelete(r)}}},[e._v("删除")])],1)}}],null,!1,2757824471)}):e._e()],1):e._e(),a("editor-debug-show",{staticStyle:{"margin-top":"5px"},attrs:{value:e.rawText,mode:e.rawMode},on:{change:e.rawChange}})],1):e._e()],1),e.enableAfterScript?a("a-tab-pane",{key:"3",attrs:{tab:"AfterScript"}},[a("a-row",{staticStyle:{height:"25px","line-height":"25px"}},[e._v(" 关于AfterScript更详细的使用方法及介绍,请"),a("a",{attrs:{href:"https://gitee.com/xiaoym/knife4j/wikis/AfterScript",target:"_blank"}},[e._v("参考文档")])]),a("a-row",[a("editor-script",{staticStyle:{"margin-top":"5px"},attrs:{value:e.rawScript},on:{change:e.rawScriptChange}})],1)],1):e._e()],1)],1),a("a-row",[a("DebugResponse",{ref:"childDebugResponse",attrs:{responseFieldDescriptionChecked:e.responseFieldDescriptionChecked,swaggerInstance:e.swaggerInstance,api:e.api,debugSend:e.debugSend,responseContent:e.responseContent,responseCurlText:e.responseCurlText,responseStatus:e.responseStatus,responseRawText:e.responseRawText,responseHeaders:e.responseHeaders},on:{debugShowFieldDescriptionChange:e.debugShowFieldDescriptionChange,debugEditorChange:e.debugEditorChange}})],1)],1)])],1)}),[],!1,null,null,null);t.default=C.exports},b680:function(e,t,a){"use strict";var r=a("23e7"),n=a("a691"),i=a("408a"),o=a("1148"),s=a("d039"),l=1..toFixed,u=Math.floor,c=function(e,t,a){return 0===t?a:t%2==1?c(e,t-1,a*e):c(e*e,t/2,a)};r({target:"Number",proto:!0,forced:l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){l.call({})}))},{toFixed:function(e){var t,a,r,s,l=i(this),d=n(e),h=[0,0,0,0,0,0],m="",p="0",f=function(e,t){for(var a=-1,r=t;++a<6;)r+=e*h[a],h[a]=r%1e7,r=u(r/1e7)},g=function(e){for(var t=6,a=0;--t>=0;)a+=h[t],h[t]=u(a/e),a=a%e*1e7},w=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==h[e]){var a=String(h[e]);t=""===t?a:t+o.call("0",7-a.length)+a}return t};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(m="-",l=-l),l>1e-21)if(t=function(e){for(var t=0,a=e;a>=4096;)t+=12,a/=4096;for(;a>=2;)t+=1,a/=2;return t}(l*c(2,69,1))-69,a=t<0?l*c(2,-t,1):l/c(2,t,1),a*=4503599627370496,(t=52-t)>0){for(f(0,a),r=d;r>=7;)f(1e7,0),r-=7;for(f(c(10,r,1),0),r=t-1;r>=23;)g(1<<23),r-=23;g(1<0?p=m+((s=p.length)<=d?"0."+o.call("0",d-s)+p:p.slice(0,s-d)+"."+p.slice(s-d)):p=m+p,p}})}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy