You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
12 KiB
1 lines
12 KiB
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[459],{6886:function(n,r,e){"use strict";e.d(r,{ZP:function(){return y}});var t=e(3366),i=e(7462),o=e(7294),a=e(6010),s=e(5408),u=e(9707),l=e(7192),c=e(1496),p=e(3616);var d=o.createContext(),m=e(8979);function f(n){return(0,m.Z)("MuiGrid",n)}const g=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12];var h=(0,e(6087).Z)("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((n=>`spacing-xs-${n}`)),...["column-reverse","column","row-reverse","row"].map((n=>`direction-xs-${n}`)),...["nowrap","wrap-reverse","wrap"].map((n=>`wrap-xs-${n}`)),...g.map((n=>`grid-xs-${n}`)),...g.map((n=>`grid-sm-${n}`)),...g.map((n=>`grid-md-${n}`)),...g.map((n=>`grid-lg-${n}`)),...g.map((n=>`grid-xl-${n}`))]),x=e(5893);const b=["className","columns","columnSpacing","component","container","direction","item","lg","md","rowSpacing","sm","spacing","wrap","xl","xs","zeroMinWidth"];function v(n){const r=parseFloat(n);return`${r}${String(n).replace(String(r),"")||"px"}`}function w(n,r,e={}){if(!r||!n||n<=0)return[];if("string"===typeof n&&!Number.isNaN(Number(n))||"number"===typeof n)return[e[`spacing-xs-${String(n)}`]||`spacing-xs-${String(n)}`];const{xs:t,sm:i,md:o,lg:a,xl:s}=n;return[Number(t)>0&&(e[`spacing-xs-${String(t)}`]||`spacing-xs-${String(t)}`),Number(i)>0&&(e[`spacing-sm-${String(i)}`]||`spacing-sm-${String(i)}`),Number(o)>0&&(e[`spacing-md-${String(o)}`]||`spacing-md-${String(o)}`),Number(a)>0&&(e[`spacing-lg-${String(a)}`]||`spacing-lg-${String(a)}`),Number(s)>0&&(e[`spacing-xl-${String(s)}`]||`spacing-xl-${String(s)}`)]}const S=(0,c.ZP)("div",{name:"MuiGrid",slot:"Root",overridesResolver:(n,r)=>{const{container:e,direction:t,item:i,lg:o,md:a,sm:s,spacing:u,wrap:l,xl:c,xs:p,zeroMinWidth:d}=n.ownerState;return[r.root,e&&r.container,i&&r.item,d&&r.zeroMinWidth,...w(u,e,r),"row"!==t&&r[`direction-xs-${String(t)}`],"wrap"!==l&&r[`wrap-xs-${String(l)}`],!1!==p&&r[`grid-xs-${String(p)}`],!1!==s&&r[`grid-sm-${String(s)}`],!1!==a&&r[`grid-md-${String(a)}`],!1!==o&&r[`grid-lg-${String(o)}`],!1!==c&&r[`grid-xl-${String(c)}`]]}})((({ownerState:n})=>(0,i.Z)({boxSizing:"border-box"},n.container&&{display:"flex",flexWrap:"wrap",width:"100%"},n.item&&{margin:0},n.zeroMinWidth&&{minWidth:0},"wrap"!==n.wrap&&{flexWrap:n.wrap})),(function({theme:n,ownerState:r}){const e=(0,s.P$)({values:r.direction,breakpoints:n.breakpoints.values});return(0,s.k9)({theme:n},e,(n=>{const r={flexDirection:n};return 0===n.indexOf("column")&&(r[`& > .${h.item}`]={maxWidth:"none"}),r}))}),(function({theme:n,ownerState:r}){const{container:e,rowSpacing:t}=r;let i={};if(e&&0!==t){const r=(0,s.P$)({values:t,breakpoints:n.breakpoints.values});i=(0,s.k9)({theme:n},r,(r=>{const e=n.spacing(r);return"0px"!==e?{marginTop:`-${v(e)}`,[`& > .${h.item}`]:{paddingTop:v(e)}}:{}}))}return i}),(function({theme:n,ownerState:r}){const{container:e,columnSpacing:t}=r;let i={};if(e&&0!==t){const r=(0,s.P$)({values:t,breakpoints:n.breakpoints.values});i=(0,s.k9)({theme:n},r,(r=>{const e=n.spacing(r);return"0px"!==e?{width:`calc(100% + ${v(e)})`,marginLeft:`-${v(e)}`,[`& > .${h.item}`]:{paddingLeft:v(e)}}:{}}))}return i}),(function({theme:n,ownerState:r}){let e;return n.breakpoints.keys.reduce(((t,o)=>{let a={};if(r[o]&&(e=r[o]),!e)return t;if(!0===e)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===e)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const u=(0,s.P$)({values:r.columns,breakpoints:n.breakpoints.values}),l="object"===typeof u?u[o]:u;if(void 0===l||null===l)return t;const c=Math.round(e/l*1e8)/1e6+"%";let p={};if(r.container&&r.item&&0!==r.columnSpacing){const e=n.spacing(r.columnSpacing);if("0px"!==e){const n=`calc(${c} + ${v(e)})`;p={flexBasis:n,maxWidth:n}}}a=(0,i.Z)({flexBasis:c,flexGrow:0,maxWidth:c},p)}return 0===n.breakpoints.values[o]?Object.assign(t,a):t[n.breakpoints.up(o)]=a,t}),{})}));var y=o.forwardRef((function(n,r){const e=(0,p.Z)({props:n,name:"MuiGrid"}),s=(0,u.Z)(e),{className:c,columns:m,columnSpacing:g,component:h="div",container:v=!1,direction:y="row",item:$=!1,lg:P=!1,md:j=!1,rowSpacing:Z,sm:O=!1,spacing:k=0,wrap:I="wrap",xl:W=!1,xs:M=!1,zeroMinWidth:N=!1}=s,A=(0,t.Z)(s,b),L=Z||k,C=g||k,B=o.useContext(d),F=m||B||12,R=(0,i.Z)({},s,{columns:F,container:v,direction:y,item:$,lg:P,md:j,sm:O,rowSpacing:L,columnSpacing:C,wrap:I,xl:W,xs:M,zeroMinWidth:N}),_=(n=>{const{classes:r,container:e,direction:t,item:i,lg:o,md:a,sm:s,spacing:u,wrap:c,xl:p,xs:d,zeroMinWidth:m}=n,g={root:["root",e&&"container",i&&"item",m&&"zeroMinWidth",...w(u,e),"row"!==t&&`direction-xs-${String(t)}`,"wrap"!==c&&`wrap-xs-${String(c)}`,!1!==d&&`grid-xs-${String(d)}`,!1!==s&&`grid-sm-${String(s)}`,!1!==a&&`grid-md-${String(a)}`,!1!==o&&`grid-lg-${String(o)}`,!1!==p&&`grid-xl-${String(p)}`]};return(0,l.Z)(g,f,r)})(R);return T=(0,x.jsx)(S,(0,i.Z)({ownerState:R,className:(0,a.Z)(_.root,c),as:h,ref:r},A)),12!==F?(0,x.jsx)(d.Provider,{value:F,children:T}):T;var T}))},7106:function(n,r,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/login",function(){return e(1686)}])},4629:function(n,r,e){"use strict";var t=e(5893),i=e(7357),o=e(7294),a=e(4188),s=e(4825),u=e(4690),l=e(7504),c=e(4069),p=e(7869),d=e(6284),m=e(2152),f=e(7987),g=e(8859),h=e(2749);function x(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}function b(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function v(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{},t=Object.keys(e);"function"===typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e).filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})))),t.forEach((function(r){b(n,r,e[r])}))}return n}function w(n,r){if(null==n)return{};var e,t,i=function(n,r){if(null==n)return{};var e,t,i={},o=Object.keys(n);for(t=0;t<o.length;t++)e=o[t],r.indexOf(e)>=0||(i[e]=n[e]);return i}(n,r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(t=0;t<o.length;t++)e=o[t],r.indexOf(e)>=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(i[e]=n[e])}return i}function S(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var e=null==n?null:"undefined"!==typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,i,o=[],a=!0,s=!1;try{for(e=e.call(n);!(a=(t=e.next()).done)&&(o.push(t.value),!r||o.length!==r);a=!0);}catch(u){s=!0,i=u}finally{try{a||null==e.return||e.return()}finally{if(s)throw i}}return o}}(n,r)||$(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(n){return function(n){if(Array.isArray(n))return x(n)}(n)||function(n){if("undefined"!==typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||$(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function $(n,r){if(n){if("string"===typeof n)return x(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(e):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?x(n,r):void 0}}var P={width:"100%"},j="gate-input",Z="".concat(j,"-credential-id"),O="".concat(j,"-credential-passphrase"),k="access",I=(0,o.forwardRef)((function(n,r){var e,x,b=n.formContainer,$=void 0===b||b,j=n.gridProps,I=void 0===j?{}:j,W=I.columns,M=void 0===W?{xs:1,sm:2}:W,N=(I.layout,I.spacing),A=void 0===N?"1em":N,L=n.identifierId,C=void 0===L?Z:L,B=n.identifierInputTestBatchBuilder,F=void 0===B?f.Gn:B,R=n.identifierLabel,_=n.identifierOutlinedInputWithLabelProps,T=void 0===_?{}:_,G=T.formControlProps,z=void 0===G?{}:G,E=T.inputProps,U=n.onIdentifierBlurAppend,q=n.onSubmit,D=n.onSubmitAppend,V=n.passphraseId,X=void 0===V?O:V,H=n.passphraseLabel,J=n.passphraseOutlinedInputWithLabelProps,K=void 0===J?{}:J,Q=K.formControlProps,Y=void 0===Q?{}:Q,nn=K.inputProps,rn=n.submitLabel,en=n.allowSubmit,tn=void 0===en?$:en,on=w(n.gridProps,["columns","layout","spacing"]),an=w(n.identifierOutlinedInputWithLabelProps,["formControlProps","inputProps"]),sn=w(n.passphraseOutlinedInputWithLabelProps,["formControlProps","inputProps"]),un=z.sx,ln=w(z,["sx"]),cn=Y.sx,pn=w(Y,["sx"]),dn=(0,o.useRef)({}),mn=(0,o.useRef)({}),fn=(0,o.useRef)({}),gn=S((0,h.Z)(!1),2),hn=gn[0],xn=gn[1],bn=(0,g.Z)([Z,O],fn),vn=bn.buildFinishInputTestBatchFunction,wn=bn.buildInputFirstRenderFunction,Sn=bn.buildInputUnmountFunction,yn=bn.isFormInvalid,$n=bn.setMessage,Pn=(0,o.useMemo)((function(){return null!==q&&void 0!==q?q:function(){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];var t,i=r[0];i.preventDefault(),$n(k),xn(!0);var o=i.target,a=o.elements,s=a.namedItem(Z),u=s.value,l=a.namedItem(O),c=l.value;null===D||void 0===D||(t=D).call.apply(t,[null,u,c,function(n){$n(k,n)},xn].concat(y(r)))}}),[q,D,xn,$n]),jn=(0,o.useMemo)((function(){return hn?(0,t.jsx)(m.Z,{mt:0}):(0,t.jsx)(u.Z,{row:!0,sx:{justifyContent:"flex-end"},children:(0,t.jsx)(s.Z,{disabled:yn,type:"submit",children:rn})})}),[yn,hn,rn]),Zn=(0,o.useMemo)((function(){var n={};return tn&&(n["gate-cell-message-group"]={children:(0,t.jsx)(p.Z,{count:1,defaultMessageType:"warning",ref:fn}),sm:2},n["gate-cell-submit"]={children:jn,sm:2}),n}),[tn,jn]),On=(0,o.useMemo)((function(){var n={};return $&&(n.component="form",n.onSubmit=Pn),n}),[$,Pn]);return(0,o.useImperativeHandle)(r,(function(){return{get:function(){var n,r;return{identifier:null!==(e=null===(n=dn.current.getValue)||void 0===n?void 0:n.call(null))&&void 0!==e?e:"",passphrase:null!==(x=null===(r=mn.current.getValue)||void 0===r?void 0:r.call(null))&&void 0!==x?x:""}},messageGroup:v({},fn.current),setIsSubmitting:function(n){xn(n)}}})),(0,t.jsx)(i.Z,v({},On,{children:(0,t.jsx)(l.Z,v({columns:M,layout:v({"gate-input-cell-credential-id":{children:(0,t.jsx)(c.Z,{input:(0,t.jsx)(d.Z,v({formControlProps:v({},ln,{sx:v({},P,un)}),id:C,inputProps:E,label:R},an)),inputTestBatch:F(R,(function(){$n(C)}),{onFinishBatch:vn(C)},(function(n){$n(C,{children:n})})),onBlurAppend:function(){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];var t;null===U||void 0===U||(t=U).call.apply(t,[null].concat(y(r)))},onFirstRender:wn(C),onUnmount:Sn(C),ref:dn,required:!0})},"gate-input-cell-credential-passphrase":{children:(0,t.jsx)(c.Z,{input:(0,t.jsx)(d.Z,v({formControlProps:v({},pn,{sx:v({},P,cn)}),id:X,inputProps:nn,label:H,type:a.Z.password},sn)),inputTestBatch:(0,f.Gn)(H,(function(){$n(X)}),{onFinishBatch:vn(X)},(function(n){$n(X,{children:n})})),onFirstRender:wn(X),onUnmount:Sn(X),ref:mn,required:!0})}},Zn),spacing:A},on))}))}));I.displayName="GateForm",r.ZP=I},1686:function(n,r,e){"use strict";e.r(r),e.d(r,{default:function(){return d}});var t=e(5893),i=e(9008),o=e(1163),a=e(4390),s=e(4629),u=e(1770),l=e(3679),c=function(){var n=(0,o.useRouter)().query.rt;return(0,t.jsx)(l.s_,{sx:{marginLeft:{xs:"1em",sm:"auto"},marginRight:{xs:"1em",sm:"auto"},marginTop:"calc(50vh - 14em)",minWidth:"16em",width:{xs:"fit-content",sm:"26em"}},children:(0,t.jsx)(s.ZP,{gridProps:{columns:1},identifierLabel:"Username",onSubmitAppend:function(r,e,t,i){i(!0),a.Z.post("/auth/login",{username:r,password:e}).then((function(){var r=n?String(n):"/";window.location.replace(r)})).catch((function(n){var r=(0,u.Z)(n,{onResponseErrorAppend:function(){return{children:"Credentials mismatched.",type:"warning"}}});t(r)})).finally((function(){i(!1)}))},passphraseLabel:"Passphrase",submitLabel:"Login"})})},p=e(5521),d=function(){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{children:(0,t.jsx)("title",{children:"Login"})}),(0,t.jsx)(p.Z,{}),(0,t.jsx)(c,{})]})}},1163:function(n,r,e){n.exports=e(387)}},function(n){n.O(0,[382,438,894,62,195,987,248,336,774,888,179],(function(){return r=7106,n(n.s=r);var r}));var r=n.O();_N_E=r}]); |