PageSourceSearch

https://app.przetargi.io/assets/index-C71P4n4n.js

js przetargi.io collected 2026-10-09 01:28:09 UTC 40,105 bytes, 1 lines download raw bytes

1import{bR as Se,O as F,Q as q,aJ as D,bS as _,j as u,ak as J,aE as Ge,aI as se,bM as U,aN as k,ar as N,ab as je,r as K,c_ as $e,aO as $,aM as ce,cH as ee,ag as Xe,a8 as Ze}from"./index-Ozl4GyvN.js";import{P as X}from"./pageHeadline.component-CUy7vhIi.js";import{a7 as We,a as re,a8 as et,a9 as Ie,aa as tt,ab as nt,ac as st,ad as rt,D as ot,i as at,P as it}from"./app.component-CSz9esQu.js";const lt={width:512,height:512,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="m350.54 148.68l-26.62-42.06C318.31 100.08 310.62 96 302 96h-92c-8.62 0-16.31 4.08-21.92 10.62l-26.62 42.06C155.85 155.23 148.62 160 140 160H80a32 32 0 0 0-32 32v192a32 32 0 0 0 32 32h352a32 32 0 0 0 32-32V192a32 32 0 0 0-32-32h-59c-8.65 0-16.85-4.77-22.46-11.32Z"/><circle cx="256" cy="272" r="80" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="32"/><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" d="M124 158v-22h-24v22"/>'},we=1*1024*1024,ve=Se("\n  mutation authUpdateUserProfileMutation($input: UpdateCurrentUserMutationInput!) {\n    updateCurrentUser(input: $input) {\n      userProfile {\n        id\n        user {\n          ...commonQueryCurrentUserFragment\n        }\n      }\n    }\n  }\n"),ut=()=>{const e=F(),t=We(),{toast:o}=q(),r=e.formatMessage({defaultMessage:"File cannot be larger than {size}",id:"Auth / Avatar Form / Error / Too large"},{size:t(we)}),s=re({defaultValues:{avatar:null},errorMessages:{avatar:{too_large:r}}}),{handleSubmit:n,setApolloGraphQLResponseErrors:a,form:{reset:l}}=s,[i]=D(ve,{onCompleted:()=>{_("profile","avatar-update"),l(),o({description:e.formatMessage({defaultMessage:"Avatar successfully changed.",id:"Auth / Avatar Form / Success message"})})},onError:d=>{a(d.graphQLErrors)}}),c=n(async d=>{var p,m;(p=d.avatar)!=null&&p[0]&&await i({variables:{input:{avatar:(m=d.avatar)==null?void 0:m[0]}}})});return{...s,handleAvatarUpload:c,fileTooLargeMessage:r}},ct=()=>{var n;const{form:{formState:{errors:e},register:t},handleAvatarUpload:o,fileTooLargeMessage:r}=ut(),s=t("avatar",{validate:a=>{const l=a==null?void 0:a[0];return l&&l.size>we?r:!0}});return u.jsxs("div",{children:[u.jsxs("div",{className:"relative mb-0 h-20 w-20 md:mb-4 ",children:[u.jsxs("label",{tabIndex:0,className:J("absolute -left-2 -top-2 z-[1] flex h-8 w-8 cursor-pointer items-center justify-center rounded-full bg-primary text-secondary"),children:[u.jsx(Ge,{icon:lt,size:18}),u.jsx("input",{className:"hidden",...s,"data-testid":"file-input",accept:"image/*",size:we,type:"file",onChange:async a=>{await s.onChange(a),await o()}})]}),u.jsx(et,{className:"h-20 w-20"})]}),u.jsx(se,{className:"static m-0 text-left text-red-500",children:(n=e.avatar)==null?void 0:n.message})]})},dt=Se("\n  mutation authChangePasswordMutation($input: ChangePasswordMutationInput!) {\n    changePassword(input: $input) {\n      access\n      refresh\n    }\n  }\n"),ft=()=>{const e=F(),{toast:t}=q(),o=re({errorMessages:{oldPassword:{wrong_password:e.formatMessage({defaultMessage:"The password is invalid.",id:"Auth / Change password / wrong old password"})},newPassword:{password_too_common:e.formatMessage({defaultMessage:"The password is too common.",id:"Auth / Change password / password too common"}),password_entirely_numeric:e.formatMessage({defaultMessage:"Your password cannot be entirely numeric.",id:"Auth / Change password / password entirely numeric"})}}}),{handleSubmit:r,setApolloGraphQLResponseErrors:s,form:{reset:n}}=o,[a,{loading:l}]=D(dt,{onCompleted:()=>{_("profile","password-update"),n(),t({description:e.formatMessage({defaultMessage:"Password successfully changed.",id:"Auth / Change password / Success message"})})},onError:c=>{s(c.graphQLErrors)}}),i=r(({newPassword:c,oldPassword:d})=>{a({variables:{input:{newPassword:c,oldPassword:d}}})});return{...o,loading:l,handleChangePassword:i}},ht=()=>{var i,c,d;const e=F(),{form:{formState:{errors:t},register:o,getValues:r},genericError:s,hasGenericErrorOnly:n,loading:a,handleChangePassword:l}=ft();return u.jsx("div",{className:"w-full",children:u.jsxs("form",{noValidate:!0,onSubmit:l,className:J("flex max-w-xs flex-row flex-wrap items-end justify-center gap-4 md:max-w-full md:justify-start"),children:[u.jsx("div",{className:"w-full",children:u.jsx(U,{...o("oldPassword",{required:{value:!0,message:e.formatMessage({defaultMessage:"Old password is required",id:"Auth / Change password / Old password required"})}}),type:"password",label:e.formatMessage({defaultMessage:"Old password",id:"Auth / Change password / Old password placeholder"}),error:(i=t.oldPassword)==null?void 0:i.message})}),u.jsxs("div",{className:J({"gap-8":!!t.newPassword,"gap-4":!t.newPassword},"flex w-full flex-row flex-wrap"),children:[u.jsx(U,{...o("newPassword",{required:{value:!0,message:e.formatMessage({defaultMessage:"New password is required",id:"Auth / Change password / Password required"})},minLength:{value:8,message:e.formatMessage({defaultMessage:"Password is too short. It must contain at least 8 characters.",id:"Auth / Change password / Password too short"})}}),type:"password",label:e.formatMessage({defaultMessage:"New password",id:"Auth / Change password / New password label"}),placeholder:e.formatMessage({defaultMessage:"Minimum 8 characters",id:"Auth / Change password / New password placeholder"}),error:(c=t.newPassword)==null?void 0:c.message}),u.jsx(U,{...o("confirmNewPassword",{validate:{required:p=>(p==null?void 0:p.length)>0||e.formatMessage({defaultMessage:"Confirm password is required",id:"Auth / Change password / Confirm password required"}),mustMatch:p=>r().newPassword===p||e.formatMessage({defaultMessage:"Passwords must match",id:"Auth / Change password / Password must match"})}}),type:"password",label:e.formatMessage({defaultMessage:"Confirm new password",id:"Auth / Change password / Confirm new password label"}),placeholder:e.formatMessage({defaultMessage:"Minimum 8 characters",id:"Auth / Change password / Confirm new password placeholder"}),error:(d=t.confirmNewPassword)==null?void 0:d.message})]}),n?u.jsx(se,{className:"text-red-500",children:s}):null,u.jsx(k,{disabled:a,type:"submit",className:J({"mt-4":!!t.newPassword},"w-full md:w-fit"),children:u.jsx(N,{defaultMessage:"Change password",id:"Auth / Change password / Submit button"})})]})})},gt=40,mt=40,wt=()=>{var c,d;const e=F(),{currentUser:t}=Ie(),{toast:o}=q(),r=re({defaultValues:{firstName:(c=t==null?void 0:t.firstName)!=null?c:"",lastName:(d=t==null?void 0:t.lastName)!=null?d:""}}),{handleSubmit:s,setApolloGraphQLResponseErrors:n}=r,[a,{loading:l}]=D(ve,{onCompleted:()=>{_("profile","personal-data-update"),o({description:e.formatMessage({defaultMessage:"Personal data successfully changed.",id:"Auth / Update profile/ Success message"})})},onError:p=>{n(p.graphQLErrors)}}),i=s(p=>{a({variables:{input:p}})});return{...r,loading:l,handleUpdate:i}},pt=()=>{var l,i;const e=F(),{form:{formState:{errors:t},register:o},genericError:r,hasGenericErrorOnly:s,loading:n,handleUpdate:a}=wt();return u.jsx("div",{className:"w-full",children:u.jsxs("form",{noValidate:!0,onSubmit:a,className:J("flex max-w-xs flex-row flex-wrap items-end justify-center gap-4 md:max-w-full md:justify-start"),children:[u.jsxs("div",{className:"flex w-full flex-row flex-wrap gap-4",children:[u.jsx(U,{...o("firstName",{maxLength:{value:gt,message:e.formatMessage({defaultMessage:"First name is too long",id:"Auth / Update profile/ First name max length error"})}}),label:e.formatMessage({defaultMessage:"First name",id:"Auth / Update profile / First name label"}),error:(l=t.firstName)==null?void 0:l.message}),u.jsx(U,{...o("lastName",{maxLength:{value:mt,message:e.formatMessage({defaultMessage:"Last name is too long",id:"Auth / Update profile/ Last name max length error"})}}),label:e.formatMessage({defaultMessage:"Last name",id:"Auth / Update profile / Last name label"}),error:(i=t.lastName)==null?void 0:i.message})]}),s?u.jsx(se,{className:"text-red-500",children:r}):null,u.jsx(k,{type:"submit",disabled:n,className:"w-full md:w-fit",children:u.jsx(N,{defaultMessage:"Update personal data",id:"Auth / Update profile/ Submit button"})})]})})};var At=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Le={},S={};let Me;const yt=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];S.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};S.getSymbolTotalCodewords=function(t){return yt[t]};S.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};S.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');Me=t};S.isKanjiModeEnabled=function(){return typeof Me<"u"};S.toSJIS=function(t){return Me(t)};var oe={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+o)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,s){if(e.isValid(r))return r;try{return t(r)}catch(n){return s}}})(oe);function Re(){this.buffer=[],this.length=0}Re.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let o=0;o<t;o++)this.putBit((e>>>t-o-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};
vendor: 9,086 bytes, line 1
1var Ct=Re;function G(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}G.prototype.set=function(e,t,o,r){const s=e*this.size+t;this.data[s]=o,r&&(this.reservedBit[s]=!0)};G.prototype.get=function(e,t){return this.data[e*this.size+t]};G.prototype.xor=function(e,t,o){this.data[e*this.size+t]^=o};G.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var Mt=G,Fe={};(function(e){const t=S.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const s=Math.floor(r/7)+2,n=t(r),a=n===145?26:Math.ceil((n-13)/(2*s-2))*2,l=[n-7];for(let i=1;i<s-1;i++)l[i]=l[i-1]-a;return l.push(6),l.reverse()},e.getPositions=function(r){const s=[],n=e.getRowColCoords(r),a=n.length;for(let l=0;l<a;l++)for(let i=0;i<a;i++)l===0&&i===0||l===0&&i===a-1||l===a-1&&i===0||s.push([n[l],n[i]]);return s}})(Fe);var Ue={};const Et=S.getSymbolSize,Pe=7;Ue.getPositions=function(t){const o=Et(t);return[[0,0],[o-Pe,0],[0,o-Pe]]};var De={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(s){return s!=null&&s!==""&&!isNaN(s)&&s>=0&&s<=7},e.from=function(s){return e.isValid(s)?parseInt(s,10):void 0},e.getPenaltyN1=function(s){const n=s.size;let a=0,l=0,i=0,c=null,d=null;for(let p=0;p<n;p++){l=i=0,c=d=null;for(let m=0;m<n;m++){let f=s.get(p,m);f===c?l++:(l>=5&&(a+=t.N1+(l-5)),c=f,l=1),f=s.get(m,p),f===d?i++:(i>=5&&(a+=t.N1+(i-5)),d=f,i=1)}l>=5&&(a+=t.N1+(l-5)),i>=5&&(a+=t.N1+(i-5))}return a},e.getPenaltyN2=function(s){const n=s.size;let a=0;for(let l=0;l<n-1;l++)for(let i=0;i<n-1;i++){const c=s.get(l,i)+s.get(l,i+1)+s.get(l+1,i)+s.get(l+1,i+1);(c===4||c===0)&&a++}return a*t.N2},e.getPenaltyN3=function(s){const n=s.size;let a=0,l=0,i=0;for(let c=0;c<n;c++){l=i=0;for(let d=0;d<n;d++)l=l<<1&2047|s.get(c,d),d>=10&&(l===1488||l===93)&&a++,i=i<<1&2047|s.get(d,c),d>=10&&(i===1488||i===93)&&a++}return a*t.N3},e.getPenaltyN4=function(s){let n=0;const a=s.data.length;for(let i=0;i<a;i++)n+=s.data[i];return Math.abs(Math.ceil(n*100/a/5)-10)*t.N4};function o(r,s,n){switch(r){case e.Patterns.PATTERN000:return(s+n)%2===0;case e.Patterns.PATTERN001:return s%2===0;case e.Patterns.PATTERN010:return n%3===0;case e.Patterns.PATTERN011:return(s+n)%3===0;case e.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(n/3))%2===0;case e.Patterns.PATTERN101:return s*n%2+s*n%3===0;case e.Patterns.PATTERN110:return(s*n%2+s*n%3)%2===0;case e.Patterns.PATTERN111:return(s*n%3+(s+n)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(s,n){const a=n.size;for(let l=0;l<a;l++)for(let i=0;i<a;i++)n.isReserved(i,l)||n.xor(i,l,o(s,i,l))},e.getBestMask=function(s,n){const a=Object.keys(e.Patterns).length;let l=0,i=1/0;for(let c=0;c<a;c++){n(c),e.applyMask(c,s);const d=e.getPenaltyN1(s)+e.getPenaltyN2(s)+e.getPenaltyN3(s)+e.getPenaltyN4(s);e.applyMask(c,s),d<i&&(i=d,l=c)}return l}})(De);var ae={};const L=oe,Z=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],W=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];ae.getBlocksCount=function(t,o){switch(o){case L.L:return Z[(t-1)*4+0];case L.M:return Z[(t-1)*4+1];case L.Q:return Z[(t-1)*4+2];case L.H:return Z[(t-1)*4+3];default:return}};ae.getTotalCodewordsCount=function(t,o){switch(o){case L.L:return W[(t-1)*4+0];case L.M:return W[(t-1)*4+1];case L.Q:return W[(t-1)*4+2];case L.H:return W[(t-1)*4+3];default:return}};var _e={},ie={};const Q=new Uint8Array(512),te=new Uint8Array(256);(function(){let t=1;for(let o=0;o<255;o++)Q[o]=t,te[t]=o,t<<=1,t&256&&(t^=285);for(let o=255;o<512;o++)Q[o]=Q[o-255]})();ie.log=function(t){if(t<1)throw new Error("log("+t+")");return te[t]};ie.exp=function(t){return Q[t]};ie.mul=function(t,o){return t===0||o===0?0:Q[te[t]+te[o]]};(function(e){const t=ie;e.mul=function(r,s){const n=new Uint8Array(r.length+s.length-1);for(let a=0;a<r.length;a++)for(let l=0;l<s.length;l++)n[a+l]^=t.mul(r[a],s[l]);return n},e.mod=function(r,s){let n=new Uint8Array(r);for(;n.length-s.length>=0;){const a=n[0];for(let i=0;i<s.length;i++)n[i]^=t.mul(s[i],a);let l=0;for(;l<n.length&&n[l]===0;)l++;n=n.slice(l)}return n},e.generateECPolynomial=function(r){let s=new Uint8Array([1]);for(let n=0;n<r;n++)s=e.mul(s,new Uint8Array([1,t.exp(n)]));return s}})(_e);const ke=_e;function Ee(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}Ee.prototype.initialize=function(t){this.degree=t,this.genPoly=ke.generateECPolynomial(this.degree)};Ee.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const o=new Uint8Array(t.length+this.degree);o.set(t);const r=ke.mod(o,this.genPoly),s=this.degree-r.length;if(s>0){const n=new Uint8Array(this.degree);return n.set(r,s),n}return r};var bt=Ee,Oe={},R={},be={};be.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var j={};const Ve="[0-9]+",Nt="[A-Z $%*+\\-./:]+";let Y="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";Y=Y.replace(/u/g,"\\u");const xt="(?:(?![A-Z0-9 $%*+\\-./:]|"+Y+")(?:.|[\r\n]))+";j.KANJI=new RegExp(Y,"g");j.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");j.BYTE=new RegExp(xt,"g");j.NUMERIC=new RegExp(Ve,"g");j.ALPHANUMERIC=new RegExp(Nt,"g");const Pt=new RegExp("^"+Y+"$"),Tt=new RegExp("^"+Ve+"$"),Bt=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");j.testKanji=function(t){return Pt.test(t)};j.testNumeric=function(t){return Tt.test(t)};j.testAlphanumeric=function(t){return Bt.test(t)};(function(e){const t=be,o=j;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(n,a){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?n.ccBits[0]:a<27?n.ccBits[1]:n.ccBits[2]},e.getBestModeForData=function(n){return o.testNumeric(n)?e.NUMERIC:o.testAlphanumeric(n)?e.ALPHANUMERIC:o.testKanji(n)?e.KANJI:e.BYTE},e.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},e.isValid=function(n){return n&&n.bit&&n.ccBits};function r(s){if(typeof s!="string")throw new Error("Param is not a string");switch(s.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+s)}}e.from=function(n,a){if(e.isValid(n))return n;try{return r(n)}catch(l){return a}}})(R);(function(e){const t=S,o=ae,r=oe,s=R,n=be,a=7973,l=t.getBCHDigit(a);function i(m,f,A){for(let y=1;y<=40;y++)if(f<=e.getCapacity(y,A,m))return y}function c(m,f){return s.getCharCountIndicator(m,f)+4}function d(m,f){let A=0;return m.forEach(function(y){const x=c(y.mode,f);A+=x+y.getBitsLength()}),A}function p(m,f){for(let A=1;A<=40;A++)if(d(m,A)<=e.getCapacity(A,f,s.MIXED))return A}e.from=function(f,A){return n.isValid(f)?parseInt(f,10):A},e.getCapacity=function(f,A,y){if(!n.isValid(f))throw new Error("Invalid QR Code version");typeof y>"u"&&(y=s.BYTE);const x=t.getSymbolTotalCodewords(f),w=o.getTotalCodewordsCount(f,A),C=(x-w)*8;if(y===s.MIXED)return C;const h=C-c(y,f);switch(y){case s.NUMERIC:return Math.floor(h/10*3);case s.ALPHANUMERIC:return Math.floor(h/11*2);case s.KANJI:return Math.floor(h/13);case s.BYTE:default:return Math.floor(h/8)}},e.getBestVersionForData=function(f,A){let y;const x=r.from(A,r.M);if(Array.isArray(f)){if(f.length>1)return p(f,x);if(f.length===0)return 1;y=f[0]}else y=f;return i(y.mode,y.getLength(),x)},e.getEncodedBits=function(f){if(!n.isValid(f)||f<7)throw new Error("Invalid QR Code version");let A=f<<12;for(;t.getBCHDigit(A)-l>=0;)A^=a<<t.getBCHDigit(A)-l;return f<<12|A}})(Oe);var ze={};const pe=S,He=1335,St=21522,Te=pe.getBCHDigit(He);ze.getEncodedBits=function(t,o){const r=t.bit<<3|o;let s=r<<10;for(;
1pe.getBCHDigit(s)-Te>=0;)s^=He<<pe.getBCHDigit(s)-Te;return(r<<10|s)^St};var Ke={};const jt=R;function O(e){this.mode=jt.NUMERIC,this.data=e.toString()}O.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};O.prototype.getLength=function(){return this.data.length};O.prototype.getBitsLength=function(){return O.getBitsLength(this.data.length)};O.prototype.write=function(t){let o,r,s;for(o=0;o+3<=this.data.length;o+=3)r=this.data.substr(o,3),s=parseInt(r,10),t.put(s,10);const n=this.data.length-o;n>0&&(r=this.data.substr(o),s=parseInt(r,10),t.put(s,n*3+1))};var It=O;const vt=R,de=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function V(e){this.mode=vt.ALPHANUMERIC,this.data=e}V.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};V.prototype.getLength=function(){return this.data.length};V.prototype.getBitsLength=function(){return V.getBitsLength(this.data.length)};V.prototype.write=function(t){let o;for(o=0;o+2<=this.data.length;o+=2){let r=de.indexOf(this.data[o])*45;r+=de.indexOf(this.data[o+1]),t.put(r,11)}this.data.length%2&&t.put(de.indexOf(this.data[o]),6)};var Lt=V,Rt=function(t){for(var o=[],r=t.length,s=0;s<r;s++){var n=t.charCodeAt(s);if(n>=55296&&n<=56319&&r>s+1){var a=t.charCodeAt(s+1);a>=56320&&a<=57343&&(n=(n-55296)*1024+a-56320+65536,s+=1)}if(n<128){o.push(n);continue}if(n<2048){o.push(n>>6|192),o.push(n&63|128);continue}if(n<55296||n>=57344&&n<65536){o.push(n>>12|224),o.push(n>>6&63|128),o.push(n&63|128);continue}if(n>=65536&&n<=1114111){o.push(n>>18|240),o.push(n>>12&63|128),o.push(n>>6&63|128),o.push(n&63|128);continue}o.push(239,191,189)}return new Uint8Array(o).buffer};const Ft=Rt,Ut=R;function z(e){this.mode=Ut.BYTE,typeof e=="string"&&(e=Ft(e)),this.data=new Uint8Array(e)}z.getBitsLength=function(t){return t*8};z.prototype.getLength=function(){return this.data.length};z.prototype.getBitsLength=function(){return z.getBitsLength(this.data.length)};z.prototype.write=function(e){for(let t=0,o=this.data.length;t<o;t++)e.put(this.data[t],8)};var Dt=z;const _t=R,kt=S;function H(e){this.mode=_t.KANJI,this.data=e}H.getBitsLength=function(t){return t*13};H.prototype.getLength=function(){return this.data.length};H.prototype.getBitsLength=function(){return H.getBitsLength(this.data.length)};H.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let o=kt.toSJIS(this.data[t]);if(o>=33088&&o<=40956)o-=33088;else if(o>=57408&&o<=60351)o-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");o=(o>>>8&255)*192+(o&255),e.put(o,13)}};var Ot=H,Je={exports:{}};(function(e){var t={single_source_shortest_paths:function(o,r,s){var n={},a={};a[r]=0;var l=t.PriorityQueue.make();l.push(r,0);for(var i,c,d,p,m,f,A,y,x;!l.empty();){i=l.pop(),c=i.value,p=i.cost,m=o[c]||{};for(d in m)m.hasOwnProperty(d)&&(f=m[d],A=p+f,y=a[d],x=typeof a[d]>"u",(x||y>A)&&(a[d]=A,l.push(d,A),n[d]=c))}if(typeof s<"u"&&typeof a[s]>"u"){var w=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(w)}return n},extract_shortest_path_from_predecessor_list:function(o,r){for(var s=[],n=r;n;)s.push(n),o[n],n=o[n];return s.reverse(),s},find_path:function(o,r,s){var n=t.single_source_shortest_paths(o,r,s);return t.extract_shortest_path_from_predecessor_list(n,s)},PriorityQueue:{make:function(o){var r=t.PriorityQueue,s={},n;o=o||{};for(n in r)r.hasOwnProperty(n)&&(s[n]=r[n]);return s.queue=[],s.sorter=o.sorter||r.default_sorter,s},default_sorter:function(o,r){return o.cost-r.cost},push:function(o,r){var s={value:o,cost:r};this.queue.push(s),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(Je);var Vt=Je.exports;(function(e){const t=R,o=It,r=Lt,s=Dt,n=Ot,a=j,l=S,i=Vt;function c(w){return unescape(encodeURIComponent(w)).length}function d(w,C,h){const g=[];let M;for(;(M=w.exec(h))!==null;)g.push({data:M[0],index:M.index,mode:C,length:M[0].length});return g}function p(w){const C=d(a.NUMERIC,t.NUMERIC,w),h=d(a.ALPHANUMERIC,t.ALPHANUMERIC,w);let g,M;return l.isKanjiModeEnabled()?(g=d(a.BYTE,t.BYTE,w),M=d(a.KANJI,t.KANJI,w)):(g=d(a.BYTE_KANJI,t.BYTE,w),M=[]),C.concat(h,g,M).sort(function(E,P){return E.index-P.index}).map(function(E){return{data:E.data,mode:E.mode,length:E.length}})}function m(w,C){switch(C){case t.NUMERIC:return o.getBitsLength(w);case t.ALPHANUMERIC:return r.getBitsLength(w);case t.KANJI:return n.getBitsLength(w);case t.BYTE:return s.getBitsLength(w)}}function f(w){return w.reduce(function(C,h){const g=C.length-1>=0?C[C.length-1]:null;return g&&g.mode===h.mode?(C[C.length-1].data+=h.data,C):(C.push(h),C)},[])}function A(w){const C=[];for(let h=0;h<w.length;h++){const g=w[h];switch(g.mode){case t.NUMERIC:C.push([g,{data:g.data,mode:t.ALPHANUMERIC,length:g.length},{data:g.data,mode:t.BYTE,length:g.length}]);break;case t.ALPHANUMERIC:C.push([g,{data:g.data,mode:t.BYTE,length:g.length}]);break;case t.KANJI:C.push([g,{data:g.data,mode:t.BYTE,length:c(g.data)}]);break;case t.BYTE:C.push([{data:g.data,mode:t.BYTE,length:c(g.data)}])}}return C}function y(w,C){const h={},g={start:{}};let M=["start"];for(let b=0;b<w.length;b++){const E=w[b],P=[];for(let T=0;T<E.length;T++){const B=E[T],v=""+b+T;
vendor: 4,753 bytes, line 1
1P.push(v),h[v]={node:B,lastCount:0},g[v]={};for(let ue=0;ue<M.length;ue++){const I=M[ue];h[I]&&h[I].node.mode===B.mode?(g[I][v]=m(h[I].lastCount+B.length,B.mode)-m(h[I].lastCount,B.mode),h[I].lastCount+=B.length):(h[I]&&(h[I].lastCount=B.length),g[I][v]=m(B.length,B.mode)+4+t.getCharCountIndicator(B.mode,C))}}M=P}for(let b=0;b<M.length;b++)g[M[b]].end=0;return{map:g,table:h}}function x(w,C){let h;const g=t.getBestModeForData(w);if(h=t.from(C,g),h!==t.BYTE&&h.bit<g.bit)throw new Error('"'+w+'" cannot be encoded with mode '+t.toString(h)+".\n Suggested mode is: "+t.toString(g));switch(h===t.KANJI&&!l.isKanjiModeEnabled()&&(h=t.BYTE),h){case t.NUMERIC:return new o(w);case t.ALPHANUMERIC:return new r(w);case t.KANJI:return new n(w);case t.BYTE:return new s(w)}}e.fromArray=function(C){return C.reduce(function(h,g){return typeof g=="string"?h.push(x(g,null)):g.data&&h.push(x(g.data,g.mode)),h},[])},e.fromString=function(C,h){const g=p(C,l.isKanjiModeEnabled()),M=A(g),b=y(M,h),E=i.find_path(b.map,"start","end"),P=[];for(let T=1;T<E.length-1;T++)P.push(b.table[E[T]].node);return e.fromArray(f(P))},e.rawSplit=function(C){return e.fromArray(p(C,l.isKanjiModeEnabled()))}})(Ke);const le=S,fe=oe,zt=Ct,Ht=Mt,Kt=Fe,Jt=Ue,Ae=De,ye=ae,Qt=bt,ne=Oe,Yt=ze,qt=R,he=Ke;function Gt(e,t){const o=e.size,r=Jt.getPositions(t);for(let s=0;s<r.length;s++){const n=r[s][0],a=r[s][1];for(let l=-1;l<=7;l++)if(!(n+l<=-1||o<=n+l))for(let i=-1;i<=7;i++)a+i<=-1||o<=a+i||(l>=0&&l<=6&&(i===0||i===6)||i>=0&&i<=6&&(l===0||l===6)||l>=2&&l<=4&&i>=2&&i<=4?e.set(n+l,a+i,!0,!0):e.set(n+l,a+i,!1,!0))}}function $t(e){const t=e.size;for(let o=8;o<t-8;o++){const r=o%2===0;e.set(o,6,r,!0),e.set(6,o,r,!0)}}function Xt(e,t){const o=Kt.getPositions(t);for(let r=0;r<o.length;r++){const s=o[r][0],n=o[r][1];for(let a=-2;a<=2;a++)for(let l=-2;l<=2;l++)a===-2||a===2||l===-2||l===2||a===0&&l===0?e.set(s+a,n+l,!0,!0):e.set(s+a,n+l,!1,!0)}}function Zt(e,t){const o=e.size,r=ne.getEncodedBits(t);let s,n,a;for(let l=0;l<18;l++)s=Math.floor(l/3),n=l%3+o-8-3,a=(r>>l&1)===1,e.set(s,n,a,!0),e.set(n,s,a,!0)}function ge(e,t,o){const r=e.size,s=Yt.getEncodedBits(t,o);let n,a;for(n=0;n<15;n++)a=(s>>n&1)===1,n<6?e.set(n,8,a,!0):n<8?e.set(n+1,8,a,!0):e.set(r-15+n,8,a,!0),n<8?e.set(8,r-n-1,a,!0):n<9?e.set(8,15-n-1+1,a,!0):e.set(8,15-n-1,a,!0);e.set(r-8,8,1,!0)}function Wt(e,t){const o=e.size;let r=-1,s=o-1,n=7,a=0;for(let l=o-1;l>0;l-=2)for(l===6&&l--;;){for(let i=0;i<2;i++)if(!e.isReserved(s,l-i)){let c=!1;a<t.length&&(c=(t[a]>>>n&1)===1),e.set(s,l-i,c),n--,n===-1&&(a++,n=7)}if(s+=r,s<0||o<=s){s-=r,r=-r;break}}}function en(e,t,o){const r=new zt;o.forEach(function(i){r.put(i.mode.bit,4),r.put(i.getLength(),qt.getCharCountIndicator(i.mode,e)),i.write(r)});const s=le.getSymbolTotalCodewords(e),n=ye.getTotalCodewordsCount(e,t),a=(s-n)*8;for(r.getLengthInBits()+4<=a&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const l=(a-r.getLengthInBits())/8;for(let i=0;i<l;i++)r.put(i%2?17:236,8);return tn(r,e,t)}function tn(e,t,o){const r=le.getSymbolTotalCodewords(t),s=ye.getTotalCodewordsCount(t,o),n=r-s,a=ye.getBlocksCount(t,o),l=r%a,i=a-l,c=Math.floor(r/a),d=Math.floor(n/a),p=d+1,m=c-d,f=new Qt(m);let A=0;const y=new Array(a),x=new Array(a);let w=0;const C=new Uint8Array(e.buffer);for(let E=0;E<a;E++){const P=E<i?d:p;y[E]=C.slice(A,A+P),x[E]=f.encode(y[E]),A+=P,w=Math.max(w,P)}const h=new Uint8Array(r);let g=0,M,b;for(M=0;M<w;M++)for(b=0;b<a;b++)M<y[b].length&&(h[g++]=y[b][M]);for(M=0;M<m;M++)for(b=0;b<a;b++)h[g++]=x[b][M];return h}function nn(e,t,o,r){let s;if(Array.isArray(e))s=he.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const d=he.rawSplit(e);c=ne.getBestVersionForData(d,o)}s=he.fromString(e,c||40)}else throw new Error("Invalid data");const n=ne.getBestVersionForData(s,o);if(!n)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=n;else if(t<n)throw new Error("\nThe chosen QR Code version cannot contain this amount of data.\nMinimum version required to store current data is: "+n+".\n");const a=en(t,o,s),l=le.getSymbolSize(t),i=new Ht(l);return Gt(i,t),$t(i),Xt(i,t),ge(i,o,0),t>=7&&Zt(i,t),Wt(i,a),isNaN(r)&&(r=Ae.getBestMask(i,ge.bind(null,i,o))),Ae.applyMask(r,i),ge(i,o,r),{modules:i,version:t,errorCorrectionLevel:o,maskPattern:r,segments:s}}Le.create=function(t,o){if(typeof t>"u"||t==="")throw new Error("No input text");let r=fe.M,s,n;return typeof o<"u"&&(r=fe.from(o.errorCorrectionLevel,fe.M),s=ne.from(o.version),n=Ae.from(o.maskPattern),o.toSJISFunc&&le.setToSJISFunction(o.toSJISFunc)),nn(t,s,r,n)};var Qe={},Ne={};(function(e){function t(o){if(typeof o=="number"&&(o=o.toString()),typeof o!="string")throw new Error("Color should be defined as hex string");let r=o.slice().replace("#","").split("");
1if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+o);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(n){return[n,n]}))),r.length===6&&r.push("F","F");const s=parseInt(r.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:s&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const s=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,n=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:n,scale:n?4:a,margin:s,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,s){return s.width&&s.width>=r+s.margin*2?s.width/(r+s.margin*2):s.scale},e.getImageWidth=function(r,s){const n=e.getScale(r,s);return Math.floor((r+s.margin*2)*n)},e.qrToImageData=function(r,s,n){const a=s.modules.size,l=s.modules.data,i=e.getScale(a,n),c=Math.floor((a+n.margin*2)*i),d=n.margin*i,p=[n.color.light,n.color.dark];for(let m=0;m<c;m++)for(let f=0;f<c;f++){let A=(m*c+f)*4,y=n.color.light;if(m>=d&&f>=d&&m<c-d&&f<c-d){const x=Math.floor((m-d)/i),w=Math.floor((f-d)/i);y=p[l[x*a+w]?1:0]}r[A++]=y.r,r[A++]=y.g,r[A++]=y.b,r[A]=y.a}}})(Ne);(function(e){const t=Ne;function o(s,n,a){s.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=a,n.width=a,n.style.height=a+"px",n.style.width=a+"px"}function r(){try{return document.createElement("canvas")}catch(s){throw new Error("You need to specify a canvas element")}}e.render=function(n,a,l){let i=l,c=a;typeof i>"u"&&(!a||!a.getContext)&&(i=a,a=void 0),a||(c=r()),i=t.getOptions(i);const d=t.getImageWidth(n.modules.size,i),p=c.getContext("2d"),m=p.createImageData(d,d);return t.qrToImageData(m.data,n,i),o(p,c,d),p.putImageData(m,0,0),c},e.renderToDataURL=function(n,a,l){let i=l;typeof i>"u"&&(!a||!a.getContext)&&(i=a,a=void 0),i||(i={});const c=e.render(n,a,i),d=i.type||"image/png",p=i.rendererOpts||{};return c.toDataURL(d,p.quality)}})(Qe);var Ye={};const sn=Ne;function Be(e,t){const o=e.a/255,r=t+'="'+e.hex+'"';return o<1?r+" "+t+'-opacity="'+o.toFixed(2).slice(1)+'"':r}function me(e,t,o){let r=e+t;return typeof o<"u"&&(r+=" "+o),r}function rn(e,t,o){let r="",s=0,n=!1,a=0;for(let l=0;l<e.length;l++){const i=Math.floor(l%t),c=Math.floor(l/t);!i&&!n&&(n=!0),e[l]?(a++,l>0&&i>0&&e[l-1]||(r+=n?me("M",i+o,.5+c+o):me("m",s,0),s=0,n=!1),i+1<t&&e[l+1]||(r+=me("h",a),a=0)):s++}return r}Ye.render=function(t,o,r){const s=sn.getOptions(o),n=t.modules.size,a=t.modules.data,l=n+s.margin*2,i=s.color.light.a?"<path "+Be(s.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+Be(s.color.dark,"stroke")+' d="'+rn(a,n,s.margin)+'"/>',d='viewBox="0 0 '+l+" "+l+'"',m='<svg xmlns="http://www.w3.org/2000/svg" '+(s.width?'width="'+s.width+'" height="'+s.width+'" ':"")+d+' shape-rendering="crispEdges">'+i+c+"</svg>\n";return typeof r=="function"&&r(null,m),m};const on=At,Ce=Le,qe=Qe,an=Ye;function xe(e,t,o,r,s){const n=[].slice.call(arguments,1),a=n.length,l=typeof n[a-1]=="function";if(!l&&!on())throw new Error("Callback required as last argument");if(l){if(a<2)throw new Error("Too few arguments provided");a===2?(s=o,o=t,t=r=void 0):a===3&&(t.getContext&&typeof s>"u"?(s=r,r=void 0):(s=r,r=o,o=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(o=t,t=r=void 0):a===2&&!t.getContext&&(r=o,o=t,t=void 0),new Promise(function(i,c){try{const d=Ce.create(o,r);i(e(d,t,r))}catch(d){c(d)}})}try{const i=Ce.create(o,r);s(null,e(i,t,r))}catch(i){s(i)}}Ce.create;xe.bind(null,qe.render);var ln=xe.bind(null,qe.renderToDataURL);xe.bind(null,function(e,t,o){return an.render(e,o)});const un=e=>u.jsx("b",{children:e}),cn=e=>u.jsx("span",{children:e}),dn=({closeModal:e})=>{var M;const t=F(),{toast:o}=q(),{reload:r}=je(),[s,n]=K.useState(""),[a,l]=K.useState(""),[i,c]=K.useState(""),d=re(),{handleSubmit:p,hasGenericErrorOnly:m,genericError:f,setApolloGraphQLResponseErrors:A,form:{register:y,formState:{errors:x}}}=d,w=t.formatMessage({id:"Auth / Add Two-factor / Success message",defaultMessage:"Two-Factor Auth Enabled Successfully!"}),[C]=D(tt,{onError:b=>A(b.graphQLErrors),onCompleted:()=>{_("auth","otp-verify")}}),[h]=D(nt,{variables:{input:{}},onCompleted:()=>{_("auth","otp-generate")}}),g=async b=>{var T;const{data:E}=await C({variables:{input:{otpToken:b.token}}});(T=E==null?void 0:E.verifyOtp)!=null&&T.otpVerified&&(r(),e(),o({description:w}))};return K.useEffect(()=>{i&&ln(i,{scale:8}).then(l)},[i]),K.useEffect(()=>{(async()=>{var B,v;const{data:E}=await h(),P=(B=E==null?void 0:E.generateOtp)==null?void 0:B.base32,T=(v=E==null?void 0:E.generateOtp)==null?void 0:v.otpauthUrl;!P||!T||(n(P),c(T))})()}
1,[h]),u.jsx("div",{"aria-hidden":!0,className:"max-h-[92vh] w-auto overflow-y-auto p-2 text-left",children:u.jsxs("div",{className:"px-4",children:[u.jsx($e,{className:"text-lg lg:text-xl",children:u.jsx(N,{defaultMessage:"Configuring Google Authenticator or Authy",id:"Auth / Add Two-factor / Configuring authenticator"})}),u.jsx($,{className:"mb-2 mt-1"}),u.jsxs("ol",{className:"flex list-none flex-col gap-2 pl-0",children:[u.jsx("li",{className:"text-sm",children:u.jsx(N,{defaultMessage:"Install the Google Authenticator (iOS / Android) or Authy (iOS / Android) app.",id:"Auth / Add Two-factor / Install authenticator app"})}),u.jsx("li",{className:"text-sm",children:u.jsx(N,{defaultMessage:"In your authenticator app, select the “+” icon.",id:"Auth / Add Two-factor / Click add icon"})}),u.jsx("li",{className:"text-sm",children:u.jsx(N,{defaultMessage:'Select "Scan a barcode (or QR code)" and use the phone\'s camera to scan this barcode.',id:"Auth / Add Two-factor / Use camera to scan qr code"})})]}),u.jsxs("div",{children:[u.jsx(ce,{className:"mt-4 text-lg",children:u.jsx(N,{defaultMessage:"Scan QR Code",id:"Auth / Add Two-factor / Scan QR Code"})}),u.jsx($,{className:"mb-2 mt-1"}),u.jsx("div",{className:"flex justify-center p-4",children:u.jsx("img",{src:a,alt:"qrcode url",className:"h-64 w-64"})})]}),u.jsxs("div",{children:[u.jsx(ce,{className:"mt-4 text-lg",children:u.jsx(N,{defaultMessage:"Or Enter Code Into Your App",id:"Auth / Add Two-factor / Enter code in app"})}),u.jsx($,{className:"mb-2 mt-1"}),u.jsx(ee,{firstChildMargin:!1,className:"my-0 text-sm",children:u.jsx(N,{defaultMessage:"SecretKey: <b>{base32}</b> <span>(Base32 encoded)</span>",id:"Auth / Add Two-factor / Secret key encoded",values:{b:un,span:cn,base32:s}})})]}),u.jsxs("div",{children:[u.jsx(ce,{className:"mt-4 text-lg",children:u.jsx(N,{defaultMessage:"Verify Code",id:"Auth / Add Two-factor / Verify Code"})}),u.jsx($,{className:"mb-2 mt-1"}),u.jsxs(ee,{firstChildMargin:!1,className:"my-0 text-sm",children:[u.jsx(N,{defaultMessage:"For changing the setting, please verify the authentication code",id:"Auth / Add Two-factor / Verify code for changing the setting"}),":"]})]}),u.jsxs("form",{className:"relative",onSubmit:p(g),children:[u.jsx(U,{...y("token",{required:{value:!0,message:t.formatMessage({defaultMessage:"The authentication code is required",id:"Auth / Validate OTP / Auth code required"})},minLength:{value:6,message:t.formatMessage({defaultMessage:"The authentication code must be 6 characters long.",id:"Auth / Validate OTP / Password too short"})}}),pattern:"[0-9]*",placeholder:t.formatMessage({defaultMessage:"Authentication code",id:"Auth / Validate OTP / Placeholder"}),maxLength:6,autoFocus:!0,error:(M=x.token)==null?void 0:M.message,autoComplete:"off",className:"mb-8 mt-4 w-48"}),m?u.jsx(se,{className:"absolute top-11 text-red-500",children:f}):null,u.jsxs("div",{className:"flex flex-row gap-4",children:[u.jsx(k,{type:"button",variant:Xe.SECONDARY,onClick:e,children:u.jsx(N,{defaultMessage:"Close",id:"Auth / Add Two-factor / Close button"})}),u.jsx(k,{type:"submit",children:u.jsx(N,{defaultMessage:"Verify & Activate",id:"Auth / Add Two-factor / Verify & Activate button"})})]})]})]})})},fn=({isEnabled:e})=>{const t=F(),{toast:o}=q(),{reload:r}=je(),{isOpen:s,setIsOpen:n}=st(!1),[a]=D(rt,{variables:{input:{}}}),l=t.formatMessage({id:"Auth / Two-factor / Disable success",defaultMessage:"Two-Factor Auth Disabled Successfully!"}),i=async()=>{var p;const{data:c}=await a();(p=c==null?void 0:c.disableOtp)!=null&&p.ok&&(_("auth","otp-disabled"),o({description:l}),r())};return u.jsxs("div",{children:[e?u.jsxs("div",{className:"flex flex-col items-start gap-y-1",children:[u.jsx(N,{defaultMessage:"Your account is using two-factor authentication",id:"Auth / Two-factor / Using two-factor auth"}),u.jsx(k,{type:"submit",className:"mt-1",onClick:()=>{i().catch(Ze)},children:u.jsx(N,{defaultMessage:"Disable 2FA",id:"Auth / Two-factor / Disable button"})})]}):u.jsxs("div",{className:"flex flex-col items-start gap-y-1",children:[u.jsx(N,{defaultMessage:"Your account is not using two-factor authentication",id:"Auth / Two-factor / Not using two-factor auth"}),u.jsx(k,{type:"submit",className:"mt-1",onClick:()=>n(!0),children:u.jsx(N,{defaultMessage:"Setup 2FA",id:"Auth / Two-factor / Setup button"})})]}),u.jsx(ot,{open:s,onOpenChange:c=>{n(c)},children:u.jsx(at,{children:u.jsx(dn,{closeModal:()=>n(!1)})})})]})},wn=()=>{const{currentUser:e}=Ie();return u.jsxs(it,{children:[u.jsx(X,{header:u.jsx(N,{defaultMessage:"User profile",id:"Auth / Profile details / Header"}),subheader:u.jsx(N,{defaultMessage:"Here you can find more information about your account and edit it",id:"Auth / Profile details / Label"})}),u.jsxs("div",{className:"flex flex-row gap-3",children:[u.jsx(ct,{}),u.jsxs("div",{children:[u.jsx(ee,{children:u.jsx(N,{defaultMessage:"Name: {firstName} {lastName}",id:"Auth / Profile details / Name label",values:{firstName:e==null?void 0:e.firstName,lastName:e==null?void 0:e.lastName}})}),u.jsx(ee,{firstChildMargin:!1,children:u.jsx(N,{defaultMessage:"Email: {email}",id:"Auth / Profile details / Email label",values:{email:e==null?void 0:e.email}})})]})]}),u.jsxs("div",{className:"flex w-full flex-col gap-y-6",children:[u.jsx(X,{header:u.jsx(N,{defaultMessage:"Personal data",id:"Auth / Profile details / Personal data header"}),subheader:u.jsx(N,{defaultMessage:"Update your account details",id:"Auth / Profile details / Personal data label"})}),u.jsx(pt,{})]}),u.jsxs("div",{className:"flex w-full flex-col gap-y-6",children:[u.jsx(X,{header:u.jsx(N,{defaultMessage:"Change password",id:"Auth / Profile details / Change password header"}),subheader:u.jsx(N,{defaultMessage:"Update your password",id:"Auth / Profile details / Change password label"})}),u.jsx(ht,{})]}),u.jsxs("div",{className:"flex w-full flex-col gap-y-6",children:[u.jsx(X,{header:u.jsx(N,{defaultMessage:"Two-factor Authentication",id:"Auth / Profile details / Two-factor Authentication header"}),subheader:u.jsx(N,{defaultMessage:"Enable 2FA on your account",id:"Auth / Profile details / Two-factor Authentication label"})}),u.jsx(fn,{isEnabled:e==null?void 0:e.otpEnabled})]})]})};export{wn as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.