You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-mitmproxy/addon/web/client/build/static/js/main.01aeb3c5.chunk.js

2 lines
20 KiB
JavaScript

(this["webpackJsonpmitmproxy-client"]=this["webpackJsonpmitmproxy-client"]||[]).push([[0],{49:function(e,t,s){},54:function(e,t,s){"use strict";s.r(t);var n,i=s(0),r=s.n(i),o=s(20),a=s.n(o),c=(s(48),s(9)),l=s(10),h=s(19),d=s(18),u=s(42),j=s(7),p=s(11),b=s(41),f=s.n(b),O=(s(49),s(21)),v=s(16),w=s(12),x=s(33),y=s(23),S=s(1),E=function(e){Object(h.a)(s,e);var t=Object(d.a)(s);function s(e){var n;return Object(c.a)(this,s),(n=t.call(this,e)).state={show:!1,rule:{method:"ALL",url:"",action:1},haveRules:!1},n.handleClose=n.handleClose.bind(Object(v.a)(n)),n.handleShow=n.handleShow.bind(Object(v.a)(n)),n.handleSave=n.handleSave.bind(Object(v.a)(n)),n}return Object(l.a)(s,[{key:"handleClose",value:function(){this.setState({show:!1})}},{key:"handleShow",value:function(){this.setState({show:!0})}},{key:"handleSave",value:function(){var e=this.state.rule,t=[];e.url&&t.push({method:"ALL"===e.method?"":e.method,url:e.url,action:e.action}),this.props.onSave(t),this.handleClose(),this.setState({haveRules:!!t.length})}},{key:"render",value:function(){var e=this,t=this.state,s=t.rule,n=t.haveRules?"success":"primary";return Object(S.jsxs)("div",{children:[Object(S.jsx)(p.a,{variant:n,size:"sm",onClick:this.handleShow,children:"BreakPoint"}),Object(S.jsxs)(w.a,{show:this.state.show,onHide:this.handleClose,children:[Object(S.jsx)(w.a.Header,{closeButton:!0,children:Object(S.jsx)(w.a.Title,{children:"Set BreakPoint"})}),Object(S.jsxs)(w.a.Body,{children:[Object(S.jsxs)(j.a.Group,{as:x.a,children:[Object(S.jsx)(j.a.Label,{column:!0,sm:2,children:"Method"}),Object(S.jsx)(y.a,{sm:10,children:Object(S.jsxs)(j.a.Control,{as:"select",value:s.method,onChange:function(t){e.setState({rule:Object(O.a)(Object(O.a)({},s),{},{method:t.target.value})})},children:[Object(S.jsx)("option",{children:"ALL"}),Object(S.jsx)("option",{children:"GET"}),Object(S.jsx)("option",{children:"POST"}),Object(S.jsx)("option",{children:"PUT"}),Object(S.jsx)("option",{children:"DELETE"})]})})]}),Object(S.jsxs)(j.a.Group,{as:x.a,children:[Object(S.jsx)(j.a.Label,{column:!0,sm:2,children:"URL"}),Object(S.jsx)(y.a,{sm:10,children:Object(S.jsx)(j.a.Control,{value:s.url,onChange:function(t){e.setState({rule:Object(O.a)(Object(O.a)({},s),{},{url:t.target.value})})}})})]}),Object(S.jsxs)(j.a.Group,{as:x.a,children:[Object(S.jsx)(j.a.Label,{column:!0,sm:2,children:"Action"}),Object(S.jsx)(y.a,{sm:10,children:Object(S.jsxs)(j.a.Control,{as:"select",value:s.action,onChange:function(t){e.setState({rule:Object(O.a)(Object(O.a)({},s),{},{action:parseInt(t.target.value)})})},children:[Object(S.jsx)("option",{value:"1",children:"Request"}),Object(S.jsx)("option",{value:"2",children:"Response"}),Object(S.jsx)("option",{value:"3",children:"Both"})]})})]})]}),Object(S.jsxs)(w.a.Footer,{children:[Object(S.jsx)(p.a,{variant:"secondary",onClick:this.handleClose,children:"Close"}),Object(S.jsx)(p.a,{variant:"primary",onClick:this.handleSave,children:"Save"})]})]})]})}}]),s}(r.a.Component),m=s(39),R=s(34),g=s(43),T=s(40),C=function(e){return!!e&&(!!e.header&&(!!e.header["Content-Type"]&&/text|javascript|json|x-www-form-urlencoded/.test(e.header["Content-Type"].join(""))))},_=function(e){return e?isNaN(e)||e<=0?"0":e<1024?"".concat(e," B"):e<1048576?"".concat((e/1024).toFixed(2)," KB"):"".concat((e/1048576).toFixed(2)," MB"):"0"};!function(e){e[e.REQUEST=1]="REQUEST",e[e.REQUEST_BODY=2]="REQUEST_BODY",e[e.RESPONSE=3]="RESPONSE",e[e.RESPONSE_BODY=4]="RESPONSE_BODY"}(n||(n={}));var N=function(){function e(t){Object(c.a)(this,e),this.no=void 0,this.id=void 0,this.waitIntercept=void 0,this.request=void 0,this.response=null,this.url=void 0,this.path=void 0,this._size=0,this.size="0",this.headerContentLengthExist=!1,this.startTime=Date.now(),this.endTime=0,this.costTime="(pending)",this.status=n.REQUEST,this._isTextRequest=void 0,this._isTextResponse=void 0,this._requestBody=void 0,this._responseBody=void 0,this.no=++e.curNo,this.id=t.id,this.waitIntercept=t.waitIntercept,this.request=t.content,this.url=new URL(this.request.url),this.path=this.url.pathname+this.url.search,this._isTextRequest=null,this.
//# sourceMappingURL=main.01aeb3c5.chunk.js.map