react-luminus-components 2.0.5-beta.r19-24 → 2.0.5-beta.r19-25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contexts/auth/utils/authUtils.d.ts +3 -0
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +357 -350
- package/package.json +1 -1
package/dist/contexts.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./nivo-bar-C1VYGnTR.cjs"),h=require("react/jsx-runtime"),p=require("react"),R=require("@azure/msal-browser"),z=require("@azure/msal-react");require("react-router");require("react-dom");require("react-hook-form");require("react-flexmonster");const B=require("./FormDisabledProvider-CiGUtSf7.cjs"),V=require("./useLocalStorageState-AB4BFfn5.cjs");function Q(t){const e=s.toDate(t);return e.setHours(23,59,59,999),e}function X(){return Q(Date.now())}function Y(t,e){const i=+s.toDate(t),[f,n]=[+s.toDate(e.start),+s.toDate(e.end)].sort((a,o)=>a-o);return i>=f&&i<=n}function Z(){return s.startOfDay(Date.now())}const ee=t=>{const e=s.compilerRuntimeExports.c(10),{children:i}=t,[f,n]=p.useState(!1),[a,o]=p.useState(""),[r,v]=p.useState(void 0);let C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=(y,g)=>{n(!0),o(y),v(g)},e[0]=C):C=e[0];const m=C;let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{n(!1)},e[1]=S):S=e[1];const c=S;let l;e[2]!==f||e[3]!==a||e[4]!==r?(l={show:f,text:a,showConfirm:m,hideConfirm:c,textSm:r},e[2]=f,e[3]=a,e[4]=r,e[5]=l):l=e[5];const u=l;let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=h.jsx(me,{}),e[6]=d):d=e[6];let x;return e[7]!==i||e[8]!==u?(x=h.jsxs(s.ConfirmContext.Provider,{value:u,children:[d,i]}),e[7]=i,e[8]=u,e[9]=x):x=e[9],x},te=()=>{const t=s.compilerRuntimeExports.c(43),{texts:e}=p.useContext(s.LuminusComponentsContext),{confirm:i}=e,{isShown:f,text:n,onFinish:a}=s.usePrompt(),{options:o}=p.useContext(s.PromptContext),[r,v]=p.useState(o.defaultValue??"");let C;t[0]!==a?(C=()=>{a(null)},t[0]=a,t[1]=C):C=t[1];const m=C;let S;t[2]!==a||t[3]!==o.required||t[4]!==r?(S=A=>{A.preventDefault(),!(o.required&&!r)&&(a(r),v(""))},t[2]=a,t[3]=o.required,t[4]=r,t[5]=S):S=t[5];const c=S;let l;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=A=>v(A.currentTarget.value),t[6]=l):l=t[6];let u;t[7]!==r?(u={value:r,onChange:l,className:"w-100",autoFocus:!0,tabIndex:0},t[7]=r,t[8]=u):u=t[8];const d=u;let x,y;t[9]!==f||t[10]!==o.defaultValue?(x=()=>{f===!0&&v(o.defaultValue??"")},y=[f,o.defaultValue],t[9]=f,t[10]=o.defaultValue,t[11]=x,t[12]=y):(x=t[11],y=t[12]),p.useEffect(x,y);let g;t[13]!==n?(g=h.jsx(s.Modal.Header,{className:"justify-content-center",children:h.jsx(s.Modal.Title,{children:n})}),t[13]=n,t[14]=g):g=t[14];let k;t[15]!==d||t[16]!==o.input?(k=o.input==="textarea"?h.jsx("textarea",{...d,rows:5}):void 0,t[15]=d,t[16]=o.input,t[17]=k):k=t[17];let T;t[18]!==d||t[19]!==o.input||t[20]!==o.type?(T=o.input==="input"?h.jsx(s.FormControl,{...d,type:o.type}):void 0,t[18]=d,t[19]=o.input,t[20]=o.type,t[21]=T):T=t[21];let w;t[22]!==k||t[23]!==T?(w=h.jsxs(s.Modal.Body,{children:[k,T]}),t[22]=k,t[23]=T,t[24]=w):w=t[24];let E;t[25]!==i.cancel||t[26]!==m?(E=h.jsx(s.PrimaryButton,{variant:"outlined",color:"secondary",onClick:m,className:"flex-grow-1",children:i.cancel}),t[25]=i.cancel,t[26]=m,t[27]=E):E=t[27];const L=o.required&&!r;let b;t[28]!==i.confirm||t[29]!==L?(b=h.jsx(s.PrimaryButton,{color:"primary",disabled:L,type:"submit",className:"flex-grow-1",children:i.confirm}),t[28]=i.confirm,t[29]=L,t[30]=b):b=t[30];let M;t[31]!==E||t[32]!==b?(M=h.jsxs(s.Modal.Footer,{className:"w-100 d-flex gap-5",children:[E,b]}),t[31]=E,t[32]=b,t[33]=M):M=t[33];let D;t[34]!==c||t[35]!==w||t[36]!==M?(D=h.jsxs("form",{onSubmit:c,onKeyDown:ne,children:[w,M]}),t[34]=c,t[35]=w,t[36]=M,t[37]=D):D=t[37];let j;return t[38]!==f||t[39]!==m||t[40]!==D||t[41]!==g?(j=h.jsxs(s.Modal,{show:f,size:"sm",centered:!0,onHide:m,children:[g,D]}),t[38]=f,t[39]=m,t[40]=D,t[41]=g,t[42]=j):j=t[42],j};function ne(t){return t.stopPropagation()}const oe=t=>{const e=s.compilerRuntimeExports.c(11),{children:i}=t,[f,n]=p.useState(!1),[a,o]=p.useState("");let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={input:"textarea",type:"text"},e[0]=r):r=e[0];const[v,C]=p.useState(r),m=p.useRef(se);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=k=>{o(k),n(!0)},e[1]=S):S=e[1];const c=S;let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>{n(!1)},e[2]=l):l=e[2];const u=l;let d;e[3]!==f||e[4]!==v||e[5]!==a?(d={isShown:f,text:a,showPrompt:c,hidePrompt:u,resolveRef:m,options:v,setOptions:C},e[3]=f,e[4]=v,e[5]=a,e[6]=d):d=e[6];const x=d;let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=h.jsx(te,{}),e[7]=y):y=e[7];let g;return e[8]!==i||e[9]!==x?(g=h.jsxs(s.PromptContext.Provider,{value:x,children:[i,y]}),e[8]=i,e[9]=x,e[10]=g):g=e[10],g};function se(){}const le=t=>{const e=s.compilerRuntimeExports.c(14),{cookieDomain:i,axiosOptions:f,language:n,texts:a,ProjectIconComponent:o,localizationContext:r,chartColorPalette:v,children:C}=t;let m;e[0]!==o||e[1]!==f||e[2]!==v||e[3]!==i||e[4]!==n||e[5]!==r||e[6]!==a?(m={axiosOptions:f,cookieDomain:i,language:n,texts:a,ProjectIconComponent:o,localizationContext:r,chartColorPalette:v},e[0]=o,e[1]=f,e[2]=v,e[3]=i,e[4]=n,e[5]=r,e[6]=a,e[7]=m):m=e[7];const S=m;let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=h.jsx(s.Fe,{}),e[8]=c):c=e[8];let l;e[9]!==C?(l=h.jsx(ee,{children:h.jsxs(oe,{children:[c,C]})}),e[9]=C,e[10]=l):l=e[10];let u;return e[11]!==S||e[12]!==l?(u=h.jsx(s.LuminusComponentsContext.Provider,{value:S,children:l}),e[11]=S,e[12]=l,e[13]=u):u=e[13],u},re=t=>{const e=s.compilerRuntimeExports.c(15),{children:i}=t,[f,n]=p.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=new Set,e[0]=a):a=e[0];const[o]=p.useState(a);let r;e[1]!==o?(r=d=>{o.add(d),n(!0)},e[1]=o,e[2]=r):r=e[2];const v=r;let C;e[3]!==o?(C=d=>{o.delete(d),o.size===0&&n(!1)},e[3]=o,e[4]=C):C=e[4];const m=C;let S;e[5]!==f||e[6]!==v||e[7]!==m?(S={isLoading:f,startLoading:v,stopLoading:m},e[5]=f,e[6]=v,e[7]=m,e[8]=S):S=e[8];const c=S;let l;e[9]!==f?(l=f&&h.jsx(B.Loading,{}),e[9]=f,e[10]=l):l=e[10];let u;return e[11]!==i||e[12]!==c||e[13]!==l?(u=h.jsxs(s.LoadingContext.Provider,{value:c,children:[l,i]}),e[11]=i,e[12]=c,e[13]=l,e[14]=u):u=e[14],u},ie=t=>{const e=s.compilerRuntimeExports.c(39),{children:i}=t,f=s.useAxios(),{msalInstance:n,getToken:a}=p.useContext(s.AuthContext),{delegation:o,setDelegation:r,setAvailableDelegations:v,refreshAvailableDelegations:C}=p.useContext(s.DelegationContext),[m,S]=p.useState(null);let c;e[0]!==a?(c=async()=>{const P=await a();P&&S(P.token)},e[0]=a,e[1]=c):c=e[1];const l=c;let u,d;e[2]!==l?(u=()=>{l()},d=[l],e[2]=l,e[3]=u,e[4]=d):(u=e[3],d=e[4]),p.useEffect(u,d);let x;if(e[5]===Symbol.for("react.memo_cache_sentinel")){e:{const P=localStorage.getItem("user")??null;if(!P){x=null;break e}x=JSON.parse(P??"")}e[5]=x}else x=e[5];const y=x;let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g={state:y?s.LoginState.LOGGED_IN:s.LoginState.LOGGED_OUT,user:y},e[6]=g):g=e[6];const[k,T]=p.useState(g);let w;e[7]!==f?(w=async P=>{let _=null;return await f.get("/user/detail",P?{headers:{Authorization:`Bearer ${P}`}}:void 0).then(F=>{_=F.data}).catch(()=>{_=null}),_},e[7]=f,e[8]=w):w=e[8];const E=w;let L;e[9]!==v||e[10]!==r?(L=()=>{localStorage.removeItem("user"),T({state:s.LoginState.LOGGED_OUT,user:null}),r(null),v(null)},e[9]=v,e[10]=r,e[11]=L):L=e[11];const b=L;let M;e[12]!==E||e[13]!==C?(M=async P=>{T({state:s.LoginState.LOGGING_IN,user:null});const _=await E(P);return _?(T({state:s.LoginState.LOGGED_IN,user:_}),localStorage.setItem("user",JSON.stringify(_)),await C(),!0):(T({state:s.LoginState.LOGIN_FAILED,user:null}),!1)},e[12]=E,e[13]=C,e[14]=M):M=e[14];const D=M;let j;e[15]!==n?(j=()=>{if(n){const P=n.addEventCallback(_=>{if(_.eventType===R.EventType.LOGIN_SUCCESS&&_.payload){const F=_.payload;S(F.accessToken)}});return()=>{P&&n.removeEventCallback(P)}}return ae},e[15]=n,e[16]=j):j=e[16];let A;e[17]!==D||e[18]!==b||e[19]!==n?(A=[n,D,b],e[17]=D,e[18]=b,e[19]=n,e[20]=A):A=e[20],p.useEffect(j,A);let I;e[21]!==D||e[22]!==b||e[23]!==r?(I=async P=>{P&&await D(P).catch(()=>{b(),r(null)})},e[21]=D,e[22]=b,e[23]=r,e[24]=I):I=e[24];const O=I;let q;e[25]!==m||e[26]!==O?(q=()=>{O(m)},e[25]=m,e[26]=O,e[27]=q):q=e[27];const $=o==null?void 0:o.id;let N;e[28]!==m||e[29]!==O||e[30]!==$?(N=[m,$,O],e[28]=m,e[29]=O,e[30]=$,e[31]=N):N=e[31],p.useEffect(q,N);let U;e[32]!==D||e[33]!==b||e[34]!==k?(U={user:k.user,userLoginState:k,loginUser:D,logoutUser:b},e[32]=D,e[33]=b,e[34]=k,e[35]=U):U=e[35];const G=U;let H;return e[36]!==i||e[37]!==G?(H=h.jsx(s.UserContext.Provider,{value:G,children:i}),e[36]=i,e[37]=G,e[38]=H):H=e[38],H};function ae(){}const K=()=>{const t=s.compilerRuntimeExports.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=h.jsx("p",{children:"Redirecting..."}),t[0]=e):e=t[0];let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=h.jsxs("div",{children:[e,h.jsxs("p",{children:["If you are not redirected within 10 seconds, please click"," ",h.jsx("a",{href:window.location.href.replace("/blank","/"),children:"here"})]})]}),t[1]=i):i=t[1],i},ce=({...t})=>{const{inProgress:e}=z.useMsal(),{cookieDomain:i}=p.useContext(s.LuminusComponentsContext),[,f]=s.useCookies(["Authorization"]),n=p.useMemo(()=>t.useMsal?t.msalInstance:null,[t.useMsal,t.useMsal?t.msalInstance:null]),a=p.useMemo(()=>t.useMsal?t.msalScopes:[],[t.useMsal,t.useMsal?t.msalScopes:null]),o=p.useMemo(()=>t.useMsal?t.msalExtraScopes:[],[t.useMsal,t.useMsal?t.msalExtraScopes:null]),r=p.useRef(null),v=p.useCallback(()=>{const c=localStorage.getItem("token");return c?{token:c,expiresOn:B.addYears(new Date(Date.now()),1)}:null},[]),C=p.useCallback(async()=>{if(console.log("getTokenMsal"),n==null)throw console.log("getTokenMsal throwing error because msalInstance is null"),new Error("getTokenMsal: msalInstance is null");if(r.current)return console.log("getTokenMsal returning tokenRequestPromise.current",r.current),r.current;const c=new Promise((l,u)=>{if(console.log("getTokenMsal promise"),e!==R.InteractionStatus.None){console.log("getTokenMsal rejecting because inProgress !== InteractionStatus.None",e),u(new Error("Authentication in progress"));return}n.handleRedirectPromise().then(d=>{console.log("getTokenMsal tokenResponse",d);const x=n==null?void 0:n.getActiveAccount(),y=n==null?void 0:n.getAllAccounts();console.log("getTokenMsal allAccounts",y);const g=x??(y==null?void 0:y.at(0))??void 0;if(console.log("getTokenMsal account",g),!g){console.log("getTokenMsal no account found. Redirecting to login"),n==null||n.loginRedirect({scopes:a,extraScopesToConsent:o});return}if(x||n==null||n.setActiveAccount(g),console.log("getTokenMsal account set"),!(d!=null&&d.accessToken)){n==null||n.acquireTokenSilent({scopes:a,account:g,redirectUri:t.useMsal?t.msalSilentRedirectUri:void 0}).then(k=>{r.current=null,l({token:k.accessToken,expiresOn:k.expiresOn??new Date(Date.now())})}).catch(k=>{console.error("Error acquiring token",k),k instanceof R.InteractionRequiredAuthError&&(console.log("Silent token acquisition failed. Acquiring token using redirect"),n==null||n.acquireTokenRedirect({scopes:a,extraScopesToConsent:o}),r.current=null,l(null)),r.current=null,u(k)}).finally(()=>{r.current=null,u(new Error("No access token returned from handleRedirectPromise"))});return}r.current=null,l({token:d.accessToken,expiresOn:d.expiresOn??new Date(Date.now())})})});return r.current=c,c},[e,o,n,a,t.msalSilentRedirectUri,t.useMsal]),m=p.useCallback(async()=>t.useMsal?C():v(),[v,C,t.useMsal]),S=p.useMemo(()=>({useMsal:t.useMsal??!1,msalInstance:n,msalScopes:a,msalExtraScopes:o,getToken:m}),[t.useMsal,n,a,o,m]);return p.useEffect(()=>{if(t.useMsal&&n){const c=n.addEventCallback(l=>{if(l.eventType===R.EventType.LOGIN_SUCCESS||l.eventType===R.EventType.ACQUIRE_TOKEN_SUCCESS&&l.payload){const u=l.payload,d=u.account;n.setActiveAccount(d);const x=u.accessToken,y=u.expiresOn;f("Authorization",x,{path:"/",secure:!0,sameSite:"none",domain:i,expires:y??void 0})}l.error&&console.error("AuthProvider MSAL Error",l)});return()=>{c&&n.removeEventCallback(c)}}return()=>{}},[t.useMsal,n,f,i]),h.jsx(s.AuthContext.Provider,{value:S,children:t.useMsal?h.jsx(z.MsalProvider,{instance:t.msalInstance,children:window.location.pathname==="/blank"?h.jsx(K,{}):t.children}):window.location.pathname==="/blank"?h.jsx(K,{}):t.children})},ue=t=>{const e=s.compilerRuntimeExports.c(18),{children:i,relativeEndpoint:f}=t,[n,a,o]=V.useLocalStorageState("user-delegation",null);let r;e:{if(!n){r=null;break e}const w=n.from?s.parseISO(n.from):Z(),E=n.to?s.parseISO(n.to):X();if(!Y(new Date(Date.now()),{start:w,end:E})){a(null),r=null;break e}r=n}const v=r;let C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C={nullStateBeforeLoad:!1,nullStateOnFail:!0},e[0]=C):C=e[0];const{data:m,setData:S,reloadData:c}=V.useGetApiData(f,C),l=p.useRef(null);let u,d;e[1]!==c?(u=()=>{const w=()=>{c(),l.current=window.setTimeout(w,s.msToStartOfNextDay()+5e3)};return w(),()=>{l.current!==null&&window.clearTimeout(l.current)}},d=[c],e[1]=c,e[2]=u,e[3]=d):(u=e[2],d=e[3]),p.useEffect(u,d);let x;e[4]!==o?(x=()=>{const w=()=>{o()};return window.addEventListener("focus",w),()=>{window.removeEventListener("focus",w)}},e[4]=o,e[5]=x):x=e[5];let y;e[6]!==o||e[7]!==c?(y=[o,c],e[6]=o,e[7]=c,e[8]=y):y=e[8],p.useEffect(x,y);let g;e[9]!==m||e[10]!==c||e[11]!==S||e[12]!==a||e[13]!==v?(g={delegation:v,setDelegation:a,availableDelegations:m,setAvailableDelegations:S,refreshAvailableDelegations:c},e[9]=m,e[10]=c,e[11]=S,e[12]=a,e[13]=v,e[14]=g):g=e[14];const k=g;let T;return e[15]!==i||e[16]!==k?(T=h.jsx(s.DelegationContext.Provider,{value:k,children:i}),e[15]=i,e[16]=k,e[17]=T):T=e[17],T},J=(t,e)=>t?`${t} | ${e}`:e,de=t=>{const e=s.compilerRuntimeExports.c(18),{defaultHelmet:i,children:f,helmetPrefix:n}=t,a=n??"";let o;e[0]!==i||e[1]!==a?(o=J(a,i),e[0]=i,e[1]=a,e[2]=o):o=e[2];let r;e[3]!==o?(r=[o],e[3]=o,e[4]=r):r=e[4];const[v,C]=p.useState(r);let m;e[5]!==n?(m=T=>{C(w=>[...w,J(n??"",T)])},e[5]=n,e[6]=m):m=e[6];const S=m;let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{C(fe)},e[7]=c):c=e[7];const l=c;let u;e[8]!==v?(u=v.at(-1)??"",e[8]=v,e[9]=u):u=e[9];const d=u;let x;e[10]!==S?(x={addHelmet:S,removeHelmet:l},e[10]=S,e[11]=x):x=e[11];const y=x;let g;e[12]!==d?(g=h.jsx("title",{children:d}),e[12]=d,e[13]=g):g=e[13];let k;return e[14]!==f||e[15]!==y||e[16]!==g?(k=h.jsxs(s.HelmetContext.Provider,{value:y,children:[g,f]}),e[14]=f,e[15]=y,e[16]=g,e[17]=k):k=e[17],k};function fe(t){return t.length>1?t.slice(0,-1):t}const W=50,me=()=>{const t=s.compilerRuntimeExports.c(22),{texts:e}=p.useContext(s.LuminusComponentsContext),{confirm:i}=e,{onConfirm:f,onCancel:n,text:a,show:o,textSm:r}=s.useConfirm(),v=r===void 0?a.length>W:r,C=a.length>W;let m;t[0]!==n||t[1]!==f||t[2]!==o?(m=g=>{if(o)e:switch(g.key){case"Enter":{g.preventDefault(),g.stopPropagation(),f();break e}case"Escape":{g.preventDefault(),g.stopPropagation(),n();break e}}},t[0]=n,t[1]=f,t[2]=o,t[3]=m):m=t[3];const S=m;s.useKeyPress(S);const c=C?void 0:"sm";let l;t[4]!==v||t[5]!==a?(l=h.jsx(s.Modal.Header,{className:"justify-content-center",children:v?h.jsx(s.Typography,{variant:"body",children:a}):h.jsx(s.Modal.Title,{children:a})}),t[4]=v,t[5]=a,t[6]=l):l=t[6];let u;t[7]!==i.no||t[8]!==n?(u=h.jsx(s.PrimaryButton,{type:"button",variant:"outlined",color:"secondary",className:"w-100",onClick:n,children:i.no}),t[7]=i.no,t[8]=n,t[9]=u):u=t[9];let d;t[10]!==i.yes||t[11]!==f?(d=h.jsx(s.PrimaryButton,{type:"button",color:"primary",onClick:f,className:"w-100 ml",children:i.yes}),t[10]=i.yes,t[11]=f,t[12]=d):d=t[12];let x;t[13]!==u||t[14]!==d?(x=h.jsx(s.Modal.Body,{children:h.jsxs("div",{className:"w-100 d-flex gap-5",children:[u,d]})}),t[13]=u,t[14]=d,t[15]=x):x=t[15];let y;return t[16]!==n||t[17]!==o||t[18]!==c||t[19]!==l||t[20]!==x?(y=h.jsxs(s.Modal,{show:o,size:c,centered:!0,onHide:n,children:[l,x]}),t[16]=n,t[17]=o,t[18]=c,t[19]=l,t[20]=x,t[21]=y):y=t[21],y};exports.AuthContext=s.AuthContext;exports.DelegationContext=s.DelegationContext;exports.FormDisabledContext=s.FormDisabledContext;exports.HelmetContext=s.HelmetContext;exports.LoadingContext=s.LoadingContext;exports.LuminusComponentsContext=s.LuminusComponentsContext;exports.UserContext=s.UserContext;exports.useFormDisabledContext=s.useFormDisabledContext;exports.FormDisabledProvider=B.FormDisabledProvider;exports.AuthProvider=ce;exports.DelegationProvider=ue;exports.HelmetProvider=de;exports.LoadingProvider=re;exports.LuminusComponentsProvider=le;exports.UserProvider=ie;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./nivo-bar-C1VYGnTR.cjs"),S=require("react/jsx-runtime"),y=require("react"),R=require("@azure/msal-browser"),z=require("@azure/msal-react");require("react-router");require("react-dom");require("react-hook-form");require("react-flexmonster");const B=require("./FormDisabledProvider-CiGUtSf7.cjs"),V=require("./useLocalStorageState-AB4BFfn5.cjs");function Q(t){const e=s.toDate(t);return e.setHours(23,59,59,999),e}function X(){return Q(Date.now())}function Y(t,e){const l=+s.toDate(t),[c,n]=[+s.toDate(e.start),+s.toDate(e.end)].sort((u,o)=>u-o);return l>=c&&l<=n}function Z(){return s.startOfDay(Date.now())}const ee=t=>{const e=s.compilerRuntimeExports.c(10),{children:l}=t,[c,n]=y.useState(!1),[u,o]=y.useState(""),[r,p]=y.useState(void 0);let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=(h,f)=>{n(!0),o(h),p(f)},e[0]=v):v=e[0];const m=v;let C;e[1]===Symbol.for("react.memo_cache_sentinel")?(C=()=>{n(!1)},e[1]=C):C=e[1];const x=C;let i;e[2]!==c||e[3]!==u||e[4]!==r?(i={show:c,text:u,showConfirm:m,hideConfirm:x,textSm:r},e[2]=c,e[3]=u,e[4]=r,e[5]=i):i=e[5];const a=i;let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=S.jsx(xe,{}),e[6]=d):d=e[6];let g;return e[7]!==l||e[8]!==a?(g=S.jsxs(s.ConfirmContext.Provider,{value:a,children:[d,l]}),e[7]=l,e[8]=a,e[9]=g):g=e[9],g},te=()=>{const t=s.compilerRuntimeExports.c(43),{texts:e}=y.useContext(s.LuminusComponentsContext),{confirm:l}=e,{isShown:c,text:n,onFinish:u}=s.usePrompt(),{options:o}=y.useContext(s.PromptContext),[r,p]=y.useState(o.defaultValue??"");let v;t[0]!==u?(v=()=>{u(null)},t[0]=u,t[1]=v):v=t[1];const m=v;let C;t[2]!==u||t[3]!==o.required||t[4]!==r?(C=A=>{A.preventDefault(),!(o.required&&!r)&&(u(r),p(""))},t[2]=u,t[3]=o.required,t[4]=r,t[5]=C):C=t[5];const x=C;let i;t[6]===Symbol.for("react.memo_cache_sentinel")?(i=A=>p(A.currentTarget.value),t[6]=i):i=t[6];let a;t[7]!==r?(a={value:r,onChange:i,className:"w-100",autoFocus:!0,tabIndex:0},t[7]=r,t[8]=a):a=t[8];const d=a;let g,h;t[9]!==c||t[10]!==o.defaultValue?(g=()=>{c===!0&&p(o.defaultValue??"")},h=[c,o.defaultValue],t[9]=c,t[10]=o.defaultValue,t[11]=g,t[12]=h):(g=t[11],h=t[12]),y.useEffect(g,h);let f;t[13]!==n?(f=S.jsx(s.Modal.Header,{className:"justify-content-center",children:S.jsx(s.Modal.Title,{children:n})}),t[13]=n,t[14]=f):f=t[14];let k;t[15]!==d||t[16]!==o.input?(k=o.input==="textarea"?S.jsx("textarea",{...d,rows:5}):void 0,t[15]=d,t[16]=o.input,t[17]=k):k=t[17];let T;t[18]!==d||t[19]!==o.input||t[20]!==o.type?(T=o.input==="input"?S.jsx(s.FormControl,{...d,type:o.type}):void 0,t[18]=d,t[19]=o.input,t[20]=o.type,t[21]=T):T=t[21];let w;t[22]!==k||t[23]!==T?(w=S.jsxs(s.Modal.Body,{children:[k,T]}),t[22]=k,t[23]=T,t[24]=w):w=t[24];let E;t[25]!==l.cancel||t[26]!==m?(E=S.jsx(s.PrimaryButton,{variant:"outlined",color:"secondary",onClick:m,className:"flex-grow-1",children:l.cancel}),t[25]=l.cancel,t[26]=m,t[27]=E):E=t[27];const L=o.required&&!r;let b;t[28]!==l.confirm||t[29]!==L?(b=S.jsx(s.PrimaryButton,{color:"primary",disabled:L,type:"submit",className:"flex-grow-1",children:l.confirm}),t[28]=l.confirm,t[29]=L,t[30]=b):b=t[30];let M;t[31]!==E||t[32]!==b?(M=S.jsxs(s.Modal.Footer,{className:"w-100 d-flex gap-5",children:[E,b]}),t[31]=E,t[32]=b,t[33]=M):M=t[33];let D;t[34]!==x||t[35]!==w||t[36]!==M?(D=S.jsxs("form",{onSubmit:x,onKeyDown:ne,children:[w,M]}),t[34]=x,t[35]=w,t[36]=M,t[37]=D):D=t[37];let j;return t[38]!==c||t[39]!==m||t[40]!==D||t[41]!==f?(j=S.jsxs(s.Modal,{show:c,size:"sm",centered:!0,onHide:m,children:[f,D]}),t[38]=c,t[39]=m,t[40]=D,t[41]=f,t[42]=j):j=t[42],j};function ne(t){return t.stopPropagation()}const oe=t=>{const e=s.compilerRuntimeExports.c(11),{children:l}=t,[c,n]=y.useState(!1),[u,o]=y.useState("");let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={input:"textarea",type:"text"},e[0]=r):r=e[0];const[p,v]=y.useState(r),m=y.useRef(se);let C;e[1]===Symbol.for("react.memo_cache_sentinel")?(C=k=>{o(k),n(!0)},e[1]=C):C=e[1];const x=C;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{n(!1)},e[2]=i):i=e[2];const a=i;let d;e[3]!==c||e[4]!==p||e[5]!==u?(d={isShown:c,text:u,showPrompt:x,hidePrompt:a,resolveRef:m,options:p,setOptions:v},e[3]=c,e[4]=p,e[5]=u,e[6]=d):d=e[6];const g=d;let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h=S.jsx(te,{}),e[7]=h):h=e[7];let f;return e[8]!==l||e[9]!==g?(f=S.jsxs(s.PromptContext.Provider,{value:g,children:[l,h]}),e[8]=l,e[9]=g,e[10]=f):f=e[10],f};function se(){}const le=t=>{const e=s.compilerRuntimeExports.c(14),{cookieDomain:l,axiosOptions:c,language:n,texts:u,ProjectIconComponent:o,localizationContext:r,chartColorPalette:p,children:v}=t;let m;e[0]!==o||e[1]!==c||e[2]!==p||e[3]!==l||e[4]!==n||e[5]!==r||e[6]!==u?(m={axiosOptions:c,cookieDomain:l,language:n,texts:u,ProjectIconComponent:o,localizationContext:r,chartColorPalette:p},e[0]=o,e[1]=c,e[2]=p,e[3]=l,e[4]=n,e[5]=r,e[6]=u,e[7]=m):m=e[7];const C=m;let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=S.jsx(s.Fe,{}),e[8]=x):x=e[8];let i;e[9]!==v?(i=S.jsx(ee,{children:S.jsxs(oe,{children:[x,v]})}),e[9]=v,e[10]=i):i=e[10];let a;return e[11]!==C||e[12]!==i?(a=S.jsx(s.LuminusComponentsContext.Provider,{value:C,children:i}),e[11]=C,e[12]=i,e[13]=a):a=e[13],a},re=t=>{const e=s.compilerRuntimeExports.c(15),{children:l}=t,[c,n]=y.useState(!1);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=new Set,e[0]=u):u=e[0];const[o]=y.useState(u);let r;e[1]!==o?(r=d=>{o.add(d),n(!0)},e[1]=o,e[2]=r):r=e[2];const p=r;let v;e[3]!==o?(v=d=>{o.delete(d),o.size===0&&n(!1)},e[3]=o,e[4]=v):v=e[4];const m=v;let C;e[5]!==c||e[6]!==p||e[7]!==m?(C={isLoading:c,startLoading:p,stopLoading:m},e[5]=c,e[6]=p,e[7]=m,e[8]=C):C=e[8];const x=C;let i;e[9]!==c?(i=c&&S.jsx(B.Loading,{}),e[9]=c,e[10]=i):i=e[10];let a;return e[11]!==l||e[12]!==x||e[13]!==i?(a=S.jsxs(s.LoadingContext.Provider,{value:x,children:[i,l]}),e[11]=l,e[12]=x,e[13]=i,e[14]=a):a=e[14],a},ie=t=>{const e=s.compilerRuntimeExports.c(39),{children:l}=t,c=s.useAxios(),{msalInstance:n,getToken:u}=y.useContext(s.AuthContext),{delegation:o,setDelegation:r,setAvailableDelegations:p,refreshAvailableDelegations:v}=y.useContext(s.DelegationContext),[m,C]=y.useState(null);let x;e[0]!==u?(x=async()=>{const P=await u();P&&C(P.token)},e[0]=u,e[1]=x):x=e[1];const i=x;let a,d;e[2]!==i?(a=()=>{i()},d=[i],e[2]=i,e[3]=a,e[4]=d):(a=e[3],d=e[4]),y.useEffect(a,d);let g;if(e[5]===Symbol.for("react.memo_cache_sentinel")){e:{const P=localStorage.getItem("user")??null;if(!P){g=null;break e}g=JSON.parse(P??"")}e[5]=g}else g=e[5];const h=g;let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f={state:h?s.LoginState.LOGGED_IN:s.LoginState.LOGGED_OUT,user:h},e[6]=f):f=e[6];const[k,T]=y.useState(f);let w;e[7]!==c?(w=async P=>{let _=null;return await c.get("/user/detail",P?{headers:{Authorization:`Bearer ${P}`}}:void 0).then(F=>{_=F.data}).catch(()=>{_=null}),_},e[7]=c,e[8]=w):w=e[8];const E=w;let L;e[9]!==p||e[10]!==r?(L=()=>{localStorage.removeItem("user"),T({state:s.LoginState.LOGGED_OUT,user:null}),r(null),p(null)},e[9]=p,e[10]=r,e[11]=L):L=e[11];const b=L;let M;e[12]!==E||e[13]!==v?(M=async P=>{T({state:s.LoginState.LOGGING_IN,user:null});const _=await E(P);return _?(T({state:s.LoginState.LOGGED_IN,user:_}),localStorage.setItem("user",JSON.stringify(_)),await v(),!0):(T({state:s.LoginState.LOGIN_FAILED,user:null}),!1)},e[12]=E,e[13]=v,e[14]=M):M=e[14];const D=M;let j;e[15]!==n?(j=()=>{if(n){const P=n.addEventCallback(_=>{if(_.eventType===R.EventType.LOGIN_SUCCESS&&_.payload){const F=_.payload;C(F.accessToken)}});return()=>{P&&n.removeEventCallback(P)}}return ce},e[15]=n,e[16]=j):j=e[16];let A;e[17]!==D||e[18]!==b||e[19]!==n?(A=[n,D,b],e[17]=D,e[18]=b,e[19]=n,e[20]=A):A=e[20],y.useEffect(j,A);let q;e[21]!==D||e[22]!==b||e[23]!==r?(q=async P=>{P&&await D(P).catch(()=>{b(),r(null)})},e[21]=D,e[22]=b,e[23]=r,e[24]=q):q=e[24];const O=q;let N;e[25]!==m||e[26]!==O?(N=()=>{O(m)},e[25]=m,e[26]=O,e[27]=N):N=e[27];const $=o==null?void 0:o.id;let U;e[28]!==m||e[29]!==O||e[30]!==$?(U=[m,$,O],e[28]=m,e[29]=O,e[30]=$,e[31]=U):U=e[31],y.useEffect(N,U);let H;e[32]!==D||e[33]!==b||e[34]!==k?(H={user:k.user,userLoginState:k,loginUser:D,logoutUser:b},e[32]=D,e[33]=b,e[34]=k,e[35]=H):H=e[35];const G=H;let I;return e[36]!==l||e[37]!==G?(I=S.jsx(s.UserContext.Provider,{value:G,children:l}),e[36]=l,e[37]=G,e[38]=I):I=e[38],I};function ce(){}const K=()=>{const t=s.compilerRuntimeExports.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=S.jsx("p",{children:"Redirecting..."}),t[0]=e):e=t[0];let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=S.jsxs("div",{children:[e,S.jsxs("p",{children:["If you are not redirected within 10 seconds, please click"," ",S.jsx("a",{href:window.location.href.replace("/blank","/"),children:"here"})]})]}),t[1]=l):l=t[1],l},ae=t=>{const e=t==null?void 0:t.getActiveAccount();console.log("getTokenMsal activeAccount",e);const l=t==null?void 0:t.getAllAccounts();console.log("getTokenMsal allAccounts",l);const c=(l==null?void 0:l.at(0))??void 0;return console.log("getTokenMsal account",c),c?(e||t==null||t.setActiveAccount(c),c):null},ue=({...t})=>{const{inProgress:e}=z.useMsal(),{cookieDomain:l}=y.useContext(s.LuminusComponentsContext),[,c]=s.useCookies(["Authorization"]),n=y.useMemo(()=>t.useMsal?t.msalInstance:null,[t.useMsal,t.useMsal?t.msalInstance:null]),u=y.useMemo(()=>t.useMsal?t.msalScopes:[],[t.useMsal,t.useMsal?t.msalScopes:null]),o=y.useMemo(()=>t.useMsal?t.msalExtraScopes:[],[t.useMsal,t.useMsal?t.msalExtraScopes:null]),r=y.useRef(null),p=y.useRef(!1),v=y.useCallback(()=>{const i=localStorage.getItem("token");return i?{token:i,expiresOn:B.addYears(new Date(Date.now()),1)}:null},[]),m=y.useCallback(async()=>{if(console.log("getTokenMsal"),n==null)throw console.log("getTokenMsal throwing error because msalInstance is null"),new Error("getTokenMsal: msalInstance is null");if(r.current)return console.log("getTokenMsal returning tokenRequestPromise.current",r.current),r.current;const i=new Promise((a,d)=>{const g=()=>{const h=ae(n);if(!h){console.log("getTokenMsal no account found. Redirecting to login"),n==null||n.loginRedirect({scopes:u,extraScopesToConsent:o});return}n==null||n.acquireTokenSilent({scopes:u,account:h,redirectUri:t.useMsal?t.msalSilentRedirectUri:void 0}).then(f=>{r.current=null,a({token:f.accessToken,expiresOn:f.expiresOn??new Date(Date.now())})}).catch(f=>{console.error("Error acquiring token",f),f instanceof R.InteractionRequiredAuthError&&(console.log("Silent token acquisition failed. Acquiring token using redirect"),n==null||n.acquireTokenRedirect({scopes:u,extraScopesToConsent:o}),r.current=null,a(null)),r.current=null,d(f)}).finally(()=>{r.current=null,d(new Error("No access token returned from handleRedirectPromise"))})};if(console.log("getTokenMsal promise"),e!==R.InteractionStatus.None){console.log("getTokenMsal rejecting because inProgress !== InteractionStatus.None",e),d(new Error("Authentication in progress"));return}p.current?g():n.handleRedirectPromise().then(h=>{if(console.log("getTokenMsal tokenResponse",h),!(h!=null&&h.accessToken)){g();return}r.current=null,a({token:h.accessToken,expiresOn:h.expiresOn??new Date(Date.now())})})});return r.current=i,i},[e,o,n,u,t.msalSilentRedirectUri,t.useMsal]),C=y.useCallback(async()=>t.useMsal?m():v(),[v,m,t.useMsal]),x=y.useMemo(()=>({useMsal:t.useMsal??!1,msalInstance:n,msalScopes:u,msalExtraScopes:o,getToken:C}),[t.useMsal,n,u,o,C]);return y.useEffect(()=>{if(t.useMsal&&n){const i=n.addEventCallback(a=>{if(a.eventType===R.EventType.LOGIN_SUCCESS||a.eventType===R.EventType.ACQUIRE_TOKEN_SUCCESS&&a.payload){const d=a.payload,g=d.account;n.setActiveAccount(g);const h=d.accessToken,f=d.expiresOn;c("Authorization",h,{path:"/",secure:!0,sameSite:"none",domain:l,expires:f??void 0})}a.error&&console.error("AuthProvider MSAL Error",a)});return()=>{i&&n.removeEventCallback(i)}}return()=>{}},[t.useMsal,n,c,l]),S.jsx(s.AuthContext.Provider,{value:x,children:t.useMsal?S.jsx(z.MsalProvider,{instance:t.msalInstance,children:window.location.pathname==="/blank"?S.jsx(K,{}):t.children}):window.location.pathname==="/blank"?S.jsx(K,{}):t.children})},de=t=>{const e=s.compilerRuntimeExports.c(18),{children:l,relativeEndpoint:c}=t,[n,u,o]=V.useLocalStorageState("user-delegation",null);let r;e:{if(!n){r=null;break e}const w=n.from?s.parseISO(n.from):Z(),E=n.to?s.parseISO(n.to):X();if(!Y(new Date(Date.now()),{start:w,end:E})){u(null),r=null;break e}r=n}const p=r;let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={nullStateBeforeLoad:!1,nullStateOnFail:!0},e[0]=v):v=e[0];const{data:m,setData:C,reloadData:x}=V.useGetApiData(c,v),i=y.useRef(null);let a,d;e[1]!==x?(a=()=>{const w=()=>{x(),i.current=window.setTimeout(w,s.msToStartOfNextDay()+5e3)};return w(),()=>{i.current!==null&&window.clearTimeout(i.current)}},d=[x],e[1]=x,e[2]=a,e[3]=d):(a=e[2],d=e[3]),y.useEffect(a,d);let g;e[4]!==o?(g=()=>{const w=()=>{o()};return window.addEventListener("focus",w),()=>{window.removeEventListener("focus",w)}},e[4]=o,e[5]=g):g=e[5];let h;e[6]!==o||e[7]!==x?(h=[o,x],e[6]=o,e[7]=x,e[8]=h):h=e[8],y.useEffect(g,h);let f;e[9]!==m||e[10]!==x||e[11]!==C||e[12]!==u||e[13]!==p?(f={delegation:p,setDelegation:u,availableDelegations:m,setAvailableDelegations:C,refreshAvailableDelegations:x},e[9]=m,e[10]=x,e[11]=C,e[12]=u,e[13]=p,e[14]=f):f=e[14];const k=f;let T;return e[15]!==l||e[16]!==k?(T=S.jsx(s.DelegationContext.Provider,{value:k,children:l}),e[15]=l,e[16]=k,e[17]=T):T=e[17],T},J=(t,e)=>t?`${t} | ${e}`:e,fe=t=>{const e=s.compilerRuntimeExports.c(18),{defaultHelmet:l,children:c,helmetPrefix:n}=t,u=n??"";let o;e[0]!==l||e[1]!==u?(o=J(u,l),e[0]=l,e[1]=u,e[2]=o):o=e[2];let r;e[3]!==o?(r=[o],e[3]=o,e[4]=r):r=e[4];const[p,v]=y.useState(r);let m;e[5]!==n?(m=T=>{v(w=>[...w,J(n??"",T)])},e[5]=n,e[6]=m):m=e[6];const C=m;let x;e[7]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{v(me)},e[7]=x):x=e[7];const i=x;let a;e[8]!==p?(a=p.at(-1)??"",e[8]=p,e[9]=a):a=e[9];const d=a;let g;e[10]!==C?(g={addHelmet:C,removeHelmet:i},e[10]=C,e[11]=g):g=e[11];const h=g;let f;e[12]!==d?(f=S.jsx("title",{children:d}),e[12]=d,e[13]=f):f=e[13];let k;return e[14]!==c||e[15]!==h||e[16]!==f?(k=S.jsxs(s.HelmetContext.Provider,{value:h,children:[f,c]}),e[14]=c,e[15]=h,e[16]=f,e[17]=k):k=e[17],k};function me(t){return t.length>1?t.slice(0,-1):t}const W=50,xe=()=>{const t=s.compilerRuntimeExports.c(22),{texts:e}=y.useContext(s.LuminusComponentsContext),{confirm:l}=e,{onConfirm:c,onCancel:n,text:u,show:o,textSm:r}=s.useConfirm(),p=r===void 0?u.length>W:r,v=u.length>W;let m;t[0]!==n||t[1]!==c||t[2]!==o?(m=f=>{if(o)e:switch(f.key){case"Enter":{f.preventDefault(),f.stopPropagation(),c();break e}case"Escape":{f.preventDefault(),f.stopPropagation(),n();break e}}},t[0]=n,t[1]=c,t[2]=o,t[3]=m):m=t[3];const C=m;s.useKeyPress(C);const x=v?void 0:"sm";let i;t[4]!==p||t[5]!==u?(i=S.jsx(s.Modal.Header,{className:"justify-content-center",children:p?S.jsx(s.Typography,{variant:"body",children:u}):S.jsx(s.Modal.Title,{children:u})}),t[4]=p,t[5]=u,t[6]=i):i=t[6];let a;t[7]!==l.no||t[8]!==n?(a=S.jsx(s.PrimaryButton,{type:"button",variant:"outlined",color:"secondary",className:"w-100",onClick:n,children:l.no}),t[7]=l.no,t[8]=n,t[9]=a):a=t[9];let d;t[10]!==l.yes||t[11]!==c?(d=S.jsx(s.PrimaryButton,{type:"button",color:"primary",onClick:c,className:"w-100 ml",children:l.yes}),t[10]=l.yes,t[11]=c,t[12]=d):d=t[12];let g;t[13]!==a||t[14]!==d?(g=S.jsx(s.Modal.Body,{children:S.jsxs("div",{className:"w-100 d-flex gap-5",children:[a,d]})}),t[13]=a,t[14]=d,t[15]=g):g=t[15];let h;return t[16]!==n||t[17]!==o||t[18]!==x||t[19]!==i||t[20]!==g?(h=S.jsxs(s.Modal,{show:o,size:x,centered:!0,onHide:n,children:[i,g]}),t[16]=n,t[17]=o,t[18]=x,t[19]=i,t[20]=g,t[21]=h):h=t[21],h};exports.AuthContext=s.AuthContext;exports.DelegationContext=s.DelegationContext;exports.FormDisabledContext=s.FormDisabledContext;exports.HelmetContext=s.HelmetContext;exports.LoadingContext=s.LoadingContext;exports.LuminusComponentsContext=s.LuminusComponentsContext;exports.UserContext=s.UserContext;exports.useFormDisabledContext=s.useFormDisabledContext;exports.FormDisabledProvider=B.FormDisabledProvider;exports.AuthProvider=ue;exports.DelegationProvider=de;exports.HelmetProvider=fe;exports.LoadingProvider=re;exports.LuminusComponentsProvider=le;exports.UserProvider=ie;
|
package/dist/contexts.es.js
CHANGED
|
@@ -1,211 +1,211 @@
|
|
|
1
|
-
import { t as j, bK as
|
|
2
|
-
import { bR as
|
|
3
|
-
import { jsxs as D, jsx as
|
|
4
|
-
import { useState as _, useContext as
|
|
5
|
-
import { EventType as
|
|
1
|
+
import { t as j, bK as ce, c as A, bL as ae, Q as J, am as ue, bM as se, a4 as O, aj as fe, R as V, bN as de, aq as me, ao as he, bc as re, bx as ie, be as G, ap as ge, bO as Se, aE as te, bP as xe, bQ as ye, an as ve, b7 as be, a5 as ke } from "./nivo-bar-BHzU38wt.js";
|
|
2
|
+
import { bR as ct, ag as at } from "./nivo-bar-BHzU38wt.js";
|
|
3
|
+
import { jsxs as D, jsx as v } from "react/jsx-runtime";
|
|
4
|
+
import { useState as _, useContext as H, useEffect as U, useRef as Q, useMemo as K, useCallback as Z } from "react";
|
|
5
|
+
import { EventType as ee, InteractionStatus as we, InteractionRequiredAuthError as Te } from "@azure/msal-browser";
|
|
6
6
|
import { useMsal as pe, MsalProvider as Ce } from "@azure/msal-react";
|
|
7
7
|
import "react-router";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
import "react-hook-form";
|
|
10
10
|
import "react-flexmonster";
|
|
11
11
|
import { L as De, b as Pe } from "./FormDisabledProvider-BlRae2l2.js";
|
|
12
|
-
import { F as
|
|
12
|
+
import { F as ft } from "./FormDisabledProvider-BlRae2l2.js";
|
|
13
13
|
import { a as _e, u as Me } from "./useLocalStorageState-B2v6hClT.js";
|
|
14
14
|
function Ee(t) {
|
|
15
15
|
const e = j(t);
|
|
16
16
|
return e.setHours(23, 59, 59, 999), e;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ae() {
|
|
19
19
|
return Ee(Date.now());
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
const
|
|
21
|
+
function Le(t, e) {
|
|
22
|
+
const l = +j(t), [i, n] = [
|
|
23
23
|
+j(e.start),
|
|
24
24
|
+j(e.end)
|
|
25
25
|
].sort((a, o) => a - o);
|
|
26
|
-
return
|
|
26
|
+
return l >= i && l <= n;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function Oe() {
|
|
29
|
+
return ce(Date.now());
|
|
30
30
|
}
|
|
31
31
|
const Ne = (t) => {
|
|
32
|
-
const e =
|
|
33
|
-
children:
|
|
34
|
-
} = t, [
|
|
35
|
-
let
|
|
36
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
37
|
-
n(!0), o(
|
|
38
|
-
}, e[0] =
|
|
39
|
-
const d =
|
|
32
|
+
const e = A.c(10), {
|
|
33
|
+
children: l
|
|
34
|
+
} = t, [i, n] = _(!1), [a, o] = _(""), [s, y] = _(void 0);
|
|
35
|
+
let x;
|
|
36
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (x = (g, f) => {
|
|
37
|
+
n(!0), o(g), y(f);
|
|
38
|
+
}, e[0] = x) : x = e[0];
|
|
39
|
+
const d = x;
|
|
40
40
|
let S;
|
|
41
41
|
e[1] === Symbol.for("react.memo_cache_sentinel") ? (S = () => {
|
|
42
42
|
n(!1);
|
|
43
43
|
}, e[1] = S) : S = e[1];
|
|
44
|
-
const
|
|
45
|
-
let
|
|
46
|
-
e[2] !==
|
|
47
|
-
show:
|
|
44
|
+
const m = S;
|
|
45
|
+
let r;
|
|
46
|
+
e[2] !== i || e[3] !== a || e[4] !== s ? (r = {
|
|
47
|
+
show: i,
|
|
48
48
|
text: a,
|
|
49
49
|
showConfirm: d,
|
|
50
|
-
hideConfirm:
|
|
50
|
+
hideConfirm: m,
|
|
51
51
|
textSm: s
|
|
52
|
-
}, e[2] =
|
|
53
|
-
const c =
|
|
52
|
+
}, e[2] = i, e[3] = a, e[4] = s, e[5] = r) : r = e[5];
|
|
53
|
+
const c = r;
|
|
54
54
|
let u;
|
|
55
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */
|
|
56
|
-
let
|
|
57
|
-
return e[7] !==
|
|
55
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ v(Fe, {}), e[6] = u) : u = e[6];
|
|
56
|
+
let h;
|
|
57
|
+
return e[7] !== l || e[8] !== c ? (h = /* @__PURE__ */ D(ae.Provider, { value: c, children: [
|
|
58
58
|
u,
|
|
59
|
-
|
|
60
|
-
] }), e[7] =
|
|
61
|
-
},
|
|
62
|
-
const t =
|
|
59
|
+
l
|
|
60
|
+
] }), e[7] = l, e[8] = c, e[9] = h) : h = e[9], h;
|
|
61
|
+
}, Re = () => {
|
|
62
|
+
const t = A.c(43), {
|
|
63
63
|
texts: e
|
|
64
|
-
} =
|
|
65
|
-
confirm:
|
|
64
|
+
} = H(J), {
|
|
65
|
+
confirm: l
|
|
66
66
|
} = e, {
|
|
67
|
-
isShown:
|
|
67
|
+
isShown: i,
|
|
68
68
|
text: n,
|
|
69
69
|
onFinish: a
|
|
70
70
|
} = ue(), {
|
|
71
71
|
options: o
|
|
72
|
-
} =
|
|
73
|
-
let
|
|
74
|
-
t[0] !== a ? (
|
|
72
|
+
} = H(se), [s, y] = _(o.defaultValue ?? "");
|
|
73
|
+
let x;
|
|
74
|
+
t[0] !== a ? (x = () => {
|
|
75
75
|
a(null);
|
|
76
|
-
}, t[0] = a, t[1] =
|
|
77
|
-
const d =
|
|
76
|
+
}, t[0] = a, t[1] = x) : x = t[1];
|
|
77
|
+
const d = x;
|
|
78
78
|
let S;
|
|
79
|
-
t[2] !== a || t[3] !== o.required || t[4] !== s ? (S = (
|
|
80
|
-
|
|
79
|
+
t[2] !== a || t[3] !== o.required || t[4] !== s ? (S = (R) => {
|
|
80
|
+
R.preventDefault(), !(o.required && !s) && (a(s), y(""));
|
|
81
81
|
}, t[2] = a, t[3] = o.required, t[4] = s, t[5] = S) : S = t[5];
|
|
82
|
-
const
|
|
83
|
-
let
|
|
84
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
82
|
+
const m = S;
|
|
83
|
+
let r;
|
|
84
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (r = (R) => y(R.currentTarget.value), t[6] = r) : r = t[6];
|
|
85
85
|
let c;
|
|
86
86
|
t[7] !== s ? (c = {
|
|
87
87
|
value: s,
|
|
88
|
-
onChange:
|
|
88
|
+
onChange: r,
|
|
89
89
|
className: "w-100",
|
|
90
90
|
autoFocus: !0,
|
|
91
91
|
tabIndex: 0
|
|
92
92
|
}, t[7] = s, t[8] = c) : c = t[8];
|
|
93
93
|
const u = c;
|
|
94
|
-
let
|
|
95
|
-
t[9] !==
|
|
96
|
-
|
|
97
|
-
},
|
|
98
|
-
let
|
|
99
|
-
t[13] !== n ? (
|
|
100
|
-
let
|
|
101
|
-
t[15] !== u || t[16] !== o.input ? (
|
|
94
|
+
let h, g;
|
|
95
|
+
t[9] !== i || t[10] !== o.defaultValue ? (h = () => {
|
|
96
|
+
i === !0 && y(o.defaultValue ?? "");
|
|
97
|
+
}, g = [i, o.defaultValue], t[9] = i, t[10] = o.defaultValue, t[11] = h, t[12] = g) : (h = t[11], g = t[12]), U(h, g);
|
|
98
|
+
let f;
|
|
99
|
+
t[13] !== n ? (f = /* @__PURE__ */ v(O.Header, { className: "justify-content-center", children: /* @__PURE__ */ v(O.Title, { children: n }) }), t[13] = n, t[14] = f) : f = t[14];
|
|
100
|
+
let b;
|
|
101
|
+
t[15] !== u || t[16] !== o.input ? (b = o.input === "textarea" ? /* @__PURE__ */ v("textarea", { ...u, rows: 5 }) : void 0, t[15] = u, t[16] = o.input, t[17] = b) : b = t[17];
|
|
102
102
|
let w;
|
|
103
|
-
t[18] !== u || t[19] !== o.input || t[20] !== o.type ? (w = o.input === "input" ? /* @__PURE__ */
|
|
103
|
+
t[18] !== u || t[19] !== o.input || t[20] !== o.type ? (w = o.input === "input" ? /* @__PURE__ */ v(fe, { ...u, type: o.type }) : void 0, t[18] = u, t[19] = o.input, t[20] = o.type, t[21] = w) : w = t[21];
|
|
104
104
|
let k;
|
|
105
|
-
t[22] !==
|
|
106
|
-
|
|
105
|
+
t[22] !== b || t[23] !== w ? (k = /* @__PURE__ */ D(O.Body, { children: [
|
|
106
|
+
b,
|
|
107
107
|
w
|
|
108
|
-
] }), t[22] =
|
|
108
|
+
] }), t[22] = b, t[23] = w, t[24] = k) : k = t[24];
|
|
109
109
|
let P;
|
|
110
|
-
t[25] !==
|
|
110
|
+
t[25] !== l.cancel || t[26] !== d ? (P = /* @__PURE__ */ v(V, { variant: "outlined", color: "secondary", onClick: d, className: "flex-grow-1", children: l.cancel }), t[25] = l.cancel, t[26] = d, t[27] = P) : P = t[27];
|
|
111
111
|
const N = o.required && !s;
|
|
112
112
|
let T;
|
|
113
|
-
t[28] !==
|
|
113
|
+
t[28] !== l.confirm || t[29] !== N ? (T = /* @__PURE__ */ v(V, { color: "primary", disabled: N, type: "submit", className: "flex-grow-1", children: l.confirm }), t[28] = l.confirm, t[29] = N, t[30] = T) : T = t[30];
|
|
114
114
|
let M;
|
|
115
|
-
t[31] !== P || t[32] !== T ? (M = /* @__PURE__ */ D(
|
|
115
|
+
t[31] !== P || t[32] !== T ? (M = /* @__PURE__ */ D(O.Footer, { className: "w-100 d-flex gap-5", children: [
|
|
116
116
|
P,
|
|
117
117
|
T
|
|
118
118
|
] }), t[31] = P, t[32] = T, t[33] = M) : M = t[33];
|
|
119
119
|
let p;
|
|
120
|
-
t[34] !==
|
|
120
|
+
t[34] !== m || t[35] !== k || t[36] !== M ? (p = /* @__PURE__ */ D("form", { onSubmit: m, onKeyDown: Ue, children: [
|
|
121
121
|
k,
|
|
122
122
|
M
|
|
123
|
-
] }), t[34] =
|
|
124
|
-
let
|
|
125
|
-
return t[38] !==
|
|
126
|
-
|
|
123
|
+
] }), t[34] = m, t[35] = k, t[36] = M, t[37] = p) : p = t[37];
|
|
124
|
+
let L;
|
|
125
|
+
return t[38] !== i || t[39] !== d || t[40] !== p || t[41] !== f ? (L = /* @__PURE__ */ D(O, { show: i, size: "sm", centered: !0, onHide: d, children: [
|
|
126
|
+
f,
|
|
127
127
|
p
|
|
128
|
-
] }), t[38] =
|
|
128
|
+
] }), t[38] = i, t[39] = d, t[40] = p, t[41] = f, t[42] = L) : L = t[42], L;
|
|
129
129
|
};
|
|
130
130
|
function Ue(t) {
|
|
131
131
|
return t.stopPropagation();
|
|
132
132
|
}
|
|
133
|
-
const
|
|
134
|
-
const e =
|
|
135
|
-
children:
|
|
136
|
-
} = t, [
|
|
133
|
+
const $e = (t) => {
|
|
134
|
+
const e = A.c(11), {
|
|
135
|
+
children: l
|
|
136
|
+
} = t, [i, n] = _(!1), [a, o] = _("");
|
|
137
137
|
let s;
|
|
138
138
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (s = {
|
|
139
139
|
input: "textarea",
|
|
140
140
|
type: "text"
|
|
141
141
|
}, e[0] = s) : s = e[0];
|
|
142
|
-
const [
|
|
142
|
+
const [y, x] = _(s), d = Q(Ge);
|
|
143
143
|
let S;
|
|
144
|
-
e[1] === Symbol.for("react.memo_cache_sentinel") ? (S = (
|
|
145
|
-
o(
|
|
144
|
+
e[1] === Symbol.for("react.memo_cache_sentinel") ? (S = (b) => {
|
|
145
|
+
o(b), n(!0);
|
|
146
146
|
}, e[1] = S) : S = e[1];
|
|
147
|
-
const
|
|
148
|
-
let
|
|
149
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
147
|
+
const m = S;
|
|
148
|
+
let r;
|
|
149
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
150
150
|
n(!1);
|
|
151
|
-
}, e[2] =
|
|
152
|
-
const c =
|
|
151
|
+
}, e[2] = r) : r = e[2];
|
|
152
|
+
const c = r;
|
|
153
153
|
let u;
|
|
154
|
-
e[3] !==
|
|
155
|
-
isShown:
|
|
154
|
+
e[3] !== i || e[4] !== y || e[5] !== a ? (u = {
|
|
155
|
+
isShown: i,
|
|
156
156
|
text: a,
|
|
157
|
-
showPrompt:
|
|
157
|
+
showPrompt: m,
|
|
158
158
|
hidePrompt: c,
|
|
159
159
|
resolveRef: d,
|
|
160
|
-
options:
|
|
161
|
-
setOptions:
|
|
162
|
-
}, e[3] =
|
|
163
|
-
const
|
|
164
|
-
let
|
|
165
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
166
|
-
let
|
|
167
|
-
return e[8] !==
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
] }), e[8] =
|
|
160
|
+
options: y,
|
|
161
|
+
setOptions: x
|
|
162
|
+
}, e[3] = i, e[4] = y, e[5] = a, e[6] = u) : u = e[6];
|
|
163
|
+
const h = u;
|
|
164
|
+
let g;
|
|
165
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ v(Re, {}), e[7] = g) : g = e[7];
|
|
166
|
+
let f;
|
|
167
|
+
return e[8] !== l || e[9] !== h ? (f = /* @__PURE__ */ D(se.Provider, { value: h, children: [
|
|
168
|
+
l,
|
|
169
|
+
g
|
|
170
|
+
] }), e[8] = l, e[9] = h, e[10] = f) : f = e[10], f;
|
|
171
171
|
};
|
|
172
|
-
function
|
|
172
|
+
function Ge() {
|
|
173
173
|
}
|
|
174
|
-
const
|
|
175
|
-
const e =
|
|
176
|
-
cookieDomain:
|
|
177
|
-
axiosOptions:
|
|
174
|
+
const et = (t) => {
|
|
175
|
+
const e = A.c(14), {
|
|
176
|
+
cookieDomain: l,
|
|
177
|
+
axiosOptions: i,
|
|
178
178
|
language: n,
|
|
179
179
|
texts: a,
|
|
180
180
|
ProjectIconComponent: o,
|
|
181
181
|
localizationContext: s,
|
|
182
|
-
chartColorPalette:
|
|
183
|
-
children:
|
|
182
|
+
chartColorPalette: y,
|
|
183
|
+
children: x
|
|
184
184
|
} = t;
|
|
185
185
|
let d;
|
|
186
|
-
e[0] !== o || e[1] !==
|
|
187
|
-
axiosOptions:
|
|
188
|
-
cookieDomain:
|
|
186
|
+
e[0] !== o || e[1] !== i || e[2] !== y || e[3] !== l || e[4] !== n || e[5] !== s || e[6] !== a ? (d = {
|
|
187
|
+
axiosOptions: i,
|
|
188
|
+
cookieDomain: l,
|
|
189
189
|
language: n,
|
|
190
190
|
texts: a,
|
|
191
191
|
ProjectIconComponent: o,
|
|
192
192
|
localizationContext: s,
|
|
193
|
-
chartColorPalette:
|
|
194
|
-
}, e[0] = o, e[1] =
|
|
193
|
+
chartColorPalette: y
|
|
194
|
+
}, e[0] = o, e[1] = i, e[2] = y, e[3] = l, e[4] = n, e[5] = s, e[6] = a, e[7] = d) : d = e[7];
|
|
195
195
|
const S = d;
|
|
196
|
-
let
|
|
197
|
-
e[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
198
|
-
let
|
|
199
|
-
e[9] !==
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
] }) }), e[9] =
|
|
196
|
+
let m;
|
|
197
|
+
e[8] === Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ v(de, {}), e[8] = m) : m = e[8];
|
|
198
|
+
let r;
|
|
199
|
+
e[9] !== x ? (r = /* @__PURE__ */ v(Ne, { children: /* @__PURE__ */ D($e, { children: [
|
|
200
|
+
m,
|
|
201
|
+
x
|
|
202
|
+
] }) }), e[9] = x, e[10] = r) : r = e[10];
|
|
203
203
|
let c;
|
|
204
|
-
return e[11] !== S || e[12] !==
|
|
205
|
-
},
|
|
206
|
-
const e =
|
|
207
|
-
children:
|
|
208
|
-
} = t, [
|
|
204
|
+
return e[11] !== S || e[12] !== r ? (c = /* @__PURE__ */ v(J.Provider, { value: S, children: r }), e[11] = S, e[12] = r, e[13] = c) : c = e[13], c;
|
|
205
|
+
}, tt = (t) => {
|
|
206
|
+
const e = A.c(15), {
|
|
207
|
+
children: l
|
|
208
|
+
} = t, [i, n] = _(!1);
|
|
209
209
|
let a;
|
|
210
210
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ new Set(), e[0] = a) : a = e[0];
|
|
211
211
|
const [o] = _(a);
|
|
@@ -213,171 +213,178 @@ const Ze = (t) => {
|
|
|
213
213
|
e[1] !== o ? (s = (u) => {
|
|
214
214
|
o.add(u), n(!0);
|
|
215
215
|
}, e[1] = o, e[2] = s) : s = e[2];
|
|
216
|
-
const
|
|
217
|
-
let
|
|
218
|
-
e[3] !== o ? (
|
|
216
|
+
const y = s;
|
|
217
|
+
let x;
|
|
218
|
+
e[3] !== o ? (x = (u) => {
|
|
219
219
|
o.delete(u), o.size === 0 && n(!1);
|
|
220
|
-
}, e[3] = o, e[4] =
|
|
221
|
-
const d =
|
|
220
|
+
}, e[3] = o, e[4] = x) : x = e[4];
|
|
221
|
+
const d = x;
|
|
222
222
|
let S;
|
|
223
|
-
e[5] !==
|
|
224
|
-
isLoading:
|
|
225
|
-
startLoading:
|
|
223
|
+
e[5] !== i || e[6] !== y || e[7] !== d ? (S = {
|
|
224
|
+
isLoading: i,
|
|
225
|
+
startLoading: y,
|
|
226
226
|
stopLoading: d
|
|
227
|
-
}, e[5] =
|
|
228
|
-
const
|
|
229
|
-
let
|
|
230
|
-
e[9] !==
|
|
227
|
+
}, e[5] = i, e[6] = y, e[7] = d, e[8] = S) : S = e[8];
|
|
228
|
+
const m = S;
|
|
229
|
+
let r;
|
|
230
|
+
e[9] !== i ? (r = i && /* @__PURE__ */ v(De, {}), e[9] = i, e[10] = r) : r = e[10];
|
|
231
231
|
let c;
|
|
232
|
-
return e[11] !==
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
] }), e[11] =
|
|
236
|
-
},
|
|
237
|
-
const e =
|
|
238
|
-
children:
|
|
239
|
-
} = t,
|
|
232
|
+
return e[11] !== l || e[12] !== m || e[13] !== r ? (c = /* @__PURE__ */ D(me.Provider, { value: m, children: [
|
|
233
|
+
r,
|
|
234
|
+
l
|
|
235
|
+
] }), e[11] = l, e[12] = m, e[13] = r, e[14] = c) : c = e[14], c;
|
|
236
|
+
}, nt = (t) => {
|
|
237
|
+
const e = A.c(39), {
|
|
238
|
+
children: l
|
|
239
|
+
} = t, i = he(), {
|
|
240
240
|
msalInstance: n,
|
|
241
241
|
getToken: a
|
|
242
|
-
} =
|
|
242
|
+
} = H(re), {
|
|
243
243
|
delegation: o,
|
|
244
244
|
setDelegation: s,
|
|
245
|
-
setAvailableDelegations:
|
|
246
|
-
refreshAvailableDelegations:
|
|
247
|
-
} =
|
|
248
|
-
let
|
|
249
|
-
e[0] !== a ? (
|
|
245
|
+
setAvailableDelegations: y,
|
|
246
|
+
refreshAvailableDelegations: x
|
|
247
|
+
} = H(ie), [d, S] = _(null);
|
|
248
|
+
let m;
|
|
249
|
+
e[0] !== a ? (m = async () => {
|
|
250
250
|
const C = await a();
|
|
251
251
|
C && S(C.token);
|
|
252
|
-
}, e[0] = a, e[1] =
|
|
253
|
-
const
|
|
252
|
+
}, e[0] = a, e[1] = m) : m = e[1];
|
|
253
|
+
const r = m;
|
|
254
254
|
let c, u;
|
|
255
|
-
e[2] !==
|
|
256
|
-
|
|
257
|
-
}, u = [
|
|
258
|
-
let
|
|
255
|
+
e[2] !== r ? (c = () => {
|
|
256
|
+
r();
|
|
257
|
+
}, u = [r], e[2] = r, e[3] = c, e[4] = u) : (c = e[3], u = e[4]), U(c, u);
|
|
258
|
+
let h;
|
|
259
259
|
if (e[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
260
260
|
e: {
|
|
261
261
|
const C = localStorage.getItem("user") ?? null;
|
|
262
262
|
if (!C) {
|
|
263
|
-
|
|
263
|
+
h = null;
|
|
264
264
|
break e;
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
h = JSON.parse(C ?? "");
|
|
267
267
|
}
|
|
268
|
-
e[5] =
|
|
268
|
+
e[5] = h;
|
|
269
269
|
} else
|
|
270
|
-
|
|
271
|
-
const
|
|
272
|
-
let
|
|
273
|
-
e[6] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
274
|
-
state:
|
|
275
|
-
user:
|
|
276
|
-
}, e[6] =
|
|
277
|
-
const [
|
|
270
|
+
h = e[5];
|
|
271
|
+
const g = h;
|
|
272
|
+
let f;
|
|
273
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (f = {
|
|
274
|
+
state: g ? G.LOGGED_IN : G.LOGGED_OUT,
|
|
275
|
+
user: g
|
|
276
|
+
}, e[6] = f) : f = e[6];
|
|
277
|
+
const [b, w] = _(f);
|
|
278
278
|
let k;
|
|
279
|
-
e[7] !==
|
|
279
|
+
e[7] !== i ? (k = async (C) => {
|
|
280
280
|
let E = null;
|
|
281
|
-
return await
|
|
281
|
+
return await i.get("/user/detail", C ? {
|
|
282
282
|
headers: {
|
|
283
283
|
Authorization: `Bearer ${C}`
|
|
284
284
|
}
|
|
285
|
-
} : void 0).then((
|
|
286
|
-
E =
|
|
285
|
+
} : void 0).then((Y) => {
|
|
286
|
+
E = Y.data;
|
|
287
287
|
}).catch(() => {
|
|
288
288
|
E = null;
|
|
289
289
|
}), E;
|
|
290
|
-
}, e[7] =
|
|
290
|
+
}, e[7] = i, e[8] = k) : k = e[8];
|
|
291
291
|
const P = k;
|
|
292
292
|
let N;
|
|
293
|
-
e[9] !==
|
|
293
|
+
e[9] !== y || e[10] !== s ? (N = () => {
|
|
294
294
|
localStorage.removeItem("user"), w({
|
|
295
|
-
state:
|
|
295
|
+
state: G.LOGGED_OUT,
|
|
296
296
|
user: null
|
|
297
|
-
}), s(null),
|
|
298
|
-
}, e[9] =
|
|
297
|
+
}), s(null), y(null);
|
|
298
|
+
}, e[9] = y, e[10] = s, e[11] = N) : N = e[11];
|
|
299
299
|
const T = N;
|
|
300
300
|
let M;
|
|
301
|
-
e[12] !== P || e[13] !==
|
|
301
|
+
e[12] !== P || e[13] !== x ? (M = async (C) => {
|
|
302
302
|
w({
|
|
303
|
-
state:
|
|
303
|
+
state: G.LOGGING_IN,
|
|
304
304
|
user: null
|
|
305
305
|
});
|
|
306
306
|
const E = await P(C);
|
|
307
307
|
return E ? (w({
|
|
308
|
-
state:
|
|
308
|
+
state: G.LOGGED_IN,
|
|
309
309
|
user: E
|
|
310
|
-
}), localStorage.setItem("user", JSON.stringify(E)), await
|
|
311
|
-
state:
|
|
310
|
+
}), localStorage.setItem("user", JSON.stringify(E)), await x(), !0) : (w({
|
|
311
|
+
state: G.LOGIN_FAILED,
|
|
312
312
|
user: null
|
|
313
313
|
}), !1);
|
|
314
|
-
}, e[12] = P, e[13] =
|
|
314
|
+
}, e[12] = P, e[13] = x, e[14] = M) : M = e[14];
|
|
315
315
|
const p = M;
|
|
316
|
-
let
|
|
317
|
-
e[15] !== n ? (
|
|
316
|
+
let L;
|
|
317
|
+
e[15] !== n ? (L = () => {
|
|
318
318
|
if (n) {
|
|
319
319
|
const C = n.addEventCallback((E) => {
|
|
320
|
-
if (E.eventType ===
|
|
321
|
-
const
|
|
322
|
-
S(
|
|
320
|
+
if (E.eventType === ee.LOGIN_SUCCESS && E.payload) {
|
|
321
|
+
const Y = E.payload;
|
|
322
|
+
S(Y.accessToken);
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
325
|
return () => {
|
|
326
326
|
C && n.removeEventCallback(C);
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
return
|
|
330
|
-
}, e[15] = n, e[16] =
|
|
329
|
+
return He;
|
|
330
|
+
}, e[15] = n, e[16] = L) : L = e[16];
|
|
331
|
+
let R;
|
|
332
|
+
e[17] !== p || e[18] !== T || e[19] !== n ? (R = [n, p, T], e[17] = p, e[18] = T, e[19] = n, e[20] = R) : R = e[20], U(L, R);
|
|
331
333
|
let I;
|
|
332
|
-
e[
|
|
333
|
-
let H;
|
|
334
|
-
e[21] !== p || e[22] !== T || e[23] !== s ? (H = async (C) => {
|
|
334
|
+
e[21] !== p || e[22] !== T || e[23] !== s ? (I = async (C) => {
|
|
335
335
|
C && await p(C).catch(() => {
|
|
336
336
|
T(), s(null);
|
|
337
337
|
});
|
|
338
|
-
}, e[21] = p, e[22] = T, e[23] = s, e[24] =
|
|
339
|
-
const
|
|
338
|
+
}, e[21] = p, e[22] = T, e[23] = s, e[24] = I) : I = e[24];
|
|
339
|
+
const $ = I;
|
|
340
340
|
let q;
|
|
341
|
-
e[25] !== d || e[26] !==
|
|
342
|
-
|
|
343
|
-
}, e[25] = d, e[26] =
|
|
344
|
-
const
|
|
341
|
+
e[25] !== d || e[26] !== $ ? (q = () => {
|
|
342
|
+
$(d);
|
|
343
|
+
}, e[25] = d, e[26] = $, e[27] = q) : q = e[27];
|
|
344
|
+
const W = o == null ? void 0 : o.id;
|
|
345
345
|
let F;
|
|
346
|
-
e[28] !== d || e[29] !==
|
|
346
|
+
e[28] !== d || e[29] !== $ || e[30] !== W ? (F = [d, W, $], e[28] = d, e[29] = $, e[30] = W, e[31] = F) : F = e[31], U(q, F);
|
|
347
347
|
let z;
|
|
348
|
-
e[32] !== p || e[33] !== T || e[34] !==
|
|
349
|
-
user:
|
|
350
|
-
userLoginState:
|
|
348
|
+
e[32] !== p || e[33] !== T || e[34] !== b ? (z = {
|
|
349
|
+
user: b.user,
|
|
350
|
+
userLoginState: b,
|
|
351
351
|
loginUser: p,
|
|
352
352
|
logoutUser: T
|
|
353
|
-
}, e[32] = p, e[33] = T, e[34] =
|
|
354
|
-
const
|
|
353
|
+
}, e[32] = p, e[33] = T, e[34] = b, e[35] = z) : z = e[35];
|
|
354
|
+
const X = z;
|
|
355
355
|
let B;
|
|
356
|
-
return e[36] !==
|
|
356
|
+
return e[36] !== l || e[37] !== X ? (B = /* @__PURE__ */ v(ge.Provider, { value: X, children: l }), e[36] = l, e[37] = X, e[38] = B) : B = e[38], B;
|
|
357
357
|
};
|
|
358
|
-
function
|
|
358
|
+
function He() {
|
|
359
359
|
}
|
|
360
360
|
const ne = () => {
|
|
361
|
-
const t =
|
|
361
|
+
const t = A.c(2);
|
|
362
362
|
let e;
|
|
363
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */
|
|
364
|
-
let
|
|
365
|
-
return t[1] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
363
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ v("p", { children: "Redirecting..." }), t[0] = e) : e = t[0];
|
|
364
|
+
let l;
|
|
365
|
+
return t[1] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ D("div", { children: [
|
|
366
366
|
e,
|
|
367
367
|
/* @__PURE__ */ D("p", { children: [
|
|
368
368
|
"If you are not redirected within 10 seconds, please click",
|
|
369
369
|
" ",
|
|
370
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ v("a", { href: window.location.href.replace("/blank", "/"), children: "here" })
|
|
371
371
|
] })
|
|
372
|
-
] }), t[1] =
|
|
373
|
-
},
|
|
372
|
+
] }), t[1] = l) : l = t[1], l;
|
|
373
|
+
}, Ie = (t) => {
|
|
374
|
+
const e = t == null ? void 0 : t.getActiveAccount();
|
|
375
|
+
console.log("getTokenMsal activeAccount", e);
|
|
376
|
+
const l = t == null ? void 0 : t.getAllAccounts();
|
|
377
|
+
console.log("getTokenMsal allAccounts", l);
|
|
378
|
+
const i = (l == null ? void 0 : l.at(0)) ?? void 0;
|
|
379
|
+
return console.log("getTokenMsal account", i), i ? (e || t == null || t.setActiveAccount(i), i) : null;
|
|
380
|
+
}, ot = ({
|
|
374
381
|
...t
|
|
375
382
|
}) => {
|
|
376
383
|
const {
|
|
377
384
|
inProgress: e
|
|
378
385
|
} = pe(), {
|
|
379
|
-
cookieDomain:
|
|
380
|
-
} =
|
|
386
|
+
cookieDomain: l
|
|
387
|
+
} = H(J), [, i] = Se(["Authorization"]), n = K(
|
|
381
388
|
() => t.useMsal ? t.msalInstance : null,
|
|
382
389
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
383
390
|
[t.useMsal, t.useMsal ? t.msalInstance : null]
|
|
@@ -389,96 +396,96 @@ const ne = () => {
|
|
|
389
396
|
() => t.useMsal ? t.msalExtraScopes : [],
|
|
390
397
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
391
398
|
[t.useMsal, t.useMsal ? t.msalExtraScopes : null]
|
|
392
|
-
), s =
|
|
393
|
-
const
|
|
394
|
-
return
|
|
395
|
-
token:
|
|
399
|
+
), s = Q(null), y = Q(!1), x = Z(() => {
|
|
400
|
+
const r = localStorage.getItem("token");
|
|
401
|
+
return r ? {
|
|
402
|
+
token: r,
|
|
396
403
|
expiresOn: Pe(new Date(Date.now()), 1)
|
|
397
404
|
} : null;
|
|
398
|
-
}, []),
|
|
405
|
+
}, []), d = Z(async () => {
|
|
399
406
|
if (console.log("getTokenMsal"), n == null)
|
|
400
407
|
throw console.log("getTokenMsal throwing error because msalInstance is null"), new Error("getTokenMsal: msalInstance is null");
|
|
401
408
|
if (s.current)
|
|
402
409
|
return console.log("getTokenMsal returning tokenRequestPromise.current", s.current), s.current;
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
n.handleRedirectPromise().then((u) => {
|
|
409
|
-
console.log("getTokenMsal tokenResponse", u);
|
|
410
|
-
const m = n == null ? void 0 : n.getActiveAccount(), y = n == null ? void 0 : n.getAllAccounts();
|
|
411
|
-
console.log("getTokenMsal allAccounts", y);
|
|
412
|
-
const h = m ?? (y == null ? void 0 : y.at(0)) ?? void 0;
|
|
413
|
-
if (console.log("getTokenMsal account", h), !h) {
|
|
410
|
+
const r = new Promise((c, u) => {
|
|
411
|
+
const h = () => {
|
|
412
|
+
const g = Ie(n);
|
|
413
|
+
if (!g) {
|
|
414
414
|
console.log("getTokenMsal no account found. Redirecting to login"), n == null || n.loginRedirect({
|
|
415
415
|
scopes: a,
|
|
416
416
|
extraScopesToConsent: o
|
|
417
417
|
});
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
expiresOn: v.expiresOn ?? new Date(Date.now())
|
|
429
|
-
});
|
|
430
|
-
}).catch((v) => {
|
|
431
|
-
console.error("Error acquiring token", v), v instanceof Te && (console.log("Silent token acquisition failed. Acquiring token using redirect"), n == null || n.acquireTokenRedirect({
|
|
432
|
-
scopes: a,
|
|
433
|
-
extraScopesToConsent: o
|
|
434
|
-
}), s.current = null, l(null)), s.current = null, c(v);
|
|
435
|
-
}).finally(() => {
|
|
436
|
-
s.current = null, c(new Error("No access token returned from handleRedirectPromise"));
|
|
420
|
+
n == null || n.acquireTokenSilent({
|
|
421
|
+
scopes: a,
|
|
422
|
+
account: g,
|
|
423
|
+
redirectUri: t.useMsal ? t.msalSilentRedirectUri : void 0
|
|
424
|
+
}).then((f) => {
|
|
425
|
+
s.current = null, c({
|
|
426
|
+
token: f.accessToken,
|
|
427
|
+
expiresOn: f.expiresOn ?? new Date(Date.now())
|
|
437
428
|
});
|
|
429
|
+
}).catch((f) => {
|
|
430
|
+
console.error("Error acquiring token", f), f instanceof Te && (console.log("Silent token acquisition failed. Acquiring token using redirect"), n == null || n.acquireTokenRedirect({
|
|
431
|
+
scopes: a,
|
|
432
|
+
extraScopesToConsent: o
|
|
433
|
+
}), s.current = null, c(null)), s.current = null, u(f);
|
|
434
|
+
}).finally(() => {
|
|
435
|
+
s.current = null, u(new Error("No access token returned from handleRedirectPromise"));
|
|
436
|
+
});
|
|
437
|
+
};
|
|
438
|
+
if (console.log("getTokenMsal promise"), e !== we.None) {
|
|
439
|
+
console.log("getTokenMsal rejecting because inProgress !== InteractionStatus.None", e), u(new Error("Authentication in progress"));
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
y.current ? h() : n.handleRedirectPromise().then((g) => {
|
|
443
|
+
if (console.log("getTokenMsal tokenResponse", g), !(g != null && g.accessToken)) {
|
|
444
|
+
h();
|
|
438
445
|
return;
|
|
439
446
|
}
|
|
440
|
-
s.current = null,
|
|
441
|
-
token:
|
|
442
|
-
expiresOn:
|
|
447
|
+
s.current = null, c({
|
|
448
|
+
token: g.accessToken,
|
|
449
|
+
expiresOn: g.expiresOn ?? new Date(Date.now())
|
|
443
450
|
});
|
|
444
451
|
});
|
|
445
452
|
});
|
|
446
|
-
return s.current =
|
|
447
|
-
}, [e, o, n, a, t.msalSilentRedirectUri, t.useMsal]),
|
|
453
|
+
return s.current = r, r;
|
|
454
|
+
}, [e, o, n, a, t.msalSilentRedirectUri, t.useMsal]), S = Z(async () => t.useMsal ? d() : x(), [x, d, t.useMsal]), m = K(() => ({
|
|
448
455
|
useMsal: t.useMsal ?? !1,
|
|
449
456
|
msalInstance: n,
|
|
450
457
|
msalScopes: a,
|
|
451
458
|
msalExtraScopes: o,
|
|
452
|
-
getToken:
|
|
453
|
-
}), [t.useMsal, n, a, o,
|
|
459
|
+
getToken: S
|
|
460
|
+
}), [t.useMsal, n, a, o, S]);
|
|
454
461
|
return U(() => {
|
|
455
462
|
if (t.useMsal && n) {
|
|
456
|
-
const
|
|
457
|
-
if (
|
|
458
|
-
const
|
|
459
|
-
n.setActiveAccount(
|
|
460
|
-
const
|
|
461
|
-
|
|
463
|
+
const r = n.addEventCallback((c) => {
|
|
464
|
+
if (c.eventType === ee.LOGIN_SUCCESS || c.eventType === ee.ACQUIRE_TOKEN_SUCCESS && c.payload) {
|
|
465
|
+
const u = c.payload, h = u.account;
|
|
466
|
+
n.setActiveAccount(h);
|
|
467
|
+
const g = u.accessToken, f = u.expiresOn;
|
|
468
|
+
i("Authorization", g, {
|
|
462
469
|
path: "/",
|
|
463
470
|
secure: !0,
|
|
464
471
|
sameSite: "none",
|
|
465
|
-
domain:
|
|
466
|
-
expires:
|
|
472
|
+
domain: l,
|
|
473
|
+
expires: f ?? void 0
|
|
467
474
|
});
|
|
468
475
|
}
|
|
469
|
-
|
|
476
|
+
c.error && console.error("AuthProvider MSAL Error", c);
|
|
470
477
|
});
|
|
471
478
|
return () => {
|
|
472
|
-
|
|
479
|
+
r && n.removeEventCallback(r);
|
|
473
480
|
};
|
|
474
481
|
}
|
|
475
482
|
return () => {
|
|
476
483
|
};
|
|
477
|
-
}, [t.useMsal, n,
|
|
478
|
-
},
|
|
479
|
-
const e =
|
|
480
|
-
children:
|
|
481
|
-
relativeEndpoint:
|
|
484
|
+
}, [t.useMsal, n, i, l]), /* @__PURE__ */ v(re.Provider, { value: m, children: t.useMsal ? /* @__PURE__ */ v(Ce, { instance: t.msalInstance, children: window.location.pathname === "/blank" ? /* @__PURE__ */ v(ne, {}) : t.children }) : window.location.pathname === "/blank" ? /* @__PURE__ */ v(ne, {}) : t.children });
|
|
485
|
+
}, lt = (t) => {
|
|
486
|
+
const e = A.c(18), {
|
|
487
|
+
children: l,
|
|
488
|
+
relativeEndpoint: i
|
|
482
489
|
} = t, [n, a, o] = _e("user-delegation", null);
|
|
483
490
|
let s;
|
|
484
491
|
e: {
|
|
@@ -486,8 +493,8 @@ const ne = () => {
|
|
|
486
493
|
s = null;
|
|
487
494
|
break e;
|
|
488
495
|
}
|
|
489
|
-
const k = n.from ? te(n.from) :
|
|
490
|
-
if (!
|
|
496
|
+
const k = n.from ? te(n.from) : Oe(), P = n.to ? te(n.to) : Ae();
|
|
497
|
+
if (!Le(new Date(Date.now()), {
|
|
491
498
|
start: k,
|
|
492
499
|
end: P
|
|
493
500
|
})) {
|
|
@@ -496,147 +503,147 @@ const ne = () => {
|
|
|
496
503
|
}
|
|
497
504
|
s = n;
|
|
498
505
|
}
|
|
499
|
-
const
|
|
500
|
-
let
|
|
501
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
506
|
+
const y = s;
|
|
507
|
+
let x;
|
|
508
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (x = {
|
|
502
509
|
nullStateBeforeLoad: !1,
|
|
503
510
|
nullStateOnFail: !0
|
|
504
|
-
}, e[0] =
|
|
511
|
+
}, e[0] = x) : x = e[0];
|
|
505
512
|
const {
|
|
506
513
|
data: d,
|
|
507
514
|
setData: S,
|
|
508
|
-
reloadData:
|
|
509
|
-
} = Me(
|
|
515
|
+
reloadData: m
|
|
516
|
+
} = Me(i, x), r = Q(null);
|
|
510
517
|
let c, u;
|
|
511
|
-
e[1] !==
|
|
518
|
+
e[1] !== m ? (c = () => {
|
|
512
519
|
const k = () => {
|
|
513
|
-
|
|
520
|
+
m(), r.current = window.setTimeout(k, xe() + 5e3);
|
|
514
521
|
};
|
|
515
522
|
return k(), () => {
|
|
516
|
-
|
|
523
|
+
r.current !== null && window.clearTimeout(r.current);
|
|
517
524
|
};
|
|
518
|
-
}, u = [
|
|
519
|
-
let
|
|
520
|
-
e[4] !== o ? (
|
|
525
|
+
}, u = [m], e[1] = m, e[2] = c, e[3] = u) : (c = e[2], u = e[3]), U(c, u);
|
|
526
|
+
let h;
|
|
527
|
+
e[4] !== o ? (h = () => {
|
|
521
528
|
const k = () => {
|
|
522
529
|
o();
|
|
523
530
|
};
|
|
524
531
|
return window.addEventListener("focus", k), () => {
|
|
525
532
|
window.removeEventListener("focus", k);
|
|
526
533
|
};
|
|
527
|
-
}, e[4] = o, e[5] =
|
|
528
|
-
let
|
|
529
|
-
e[6] !== o || e[7] !==
|
|
530
|
-
let
|
|
531
|
-
e[9] !== d || e[10] !==
|
|
532
|
-
delegation:
|
|
534
|
+
}, e[4] = o, e[5] = h) : h = e[5];
|
|
535
|
+
let g;
|
|
536
|
+
e[6] !== o || e[7] !== m ? (g = [o, m], e[6] = o, e[7] = m, e[8] = g) : g = e[8], U(h, g);
|
|
537
|
+
let f;
|
|
538
|
+
e[9] !== d || e[10] !== m || e[11] !== S || e[12] !== a || e[13] !== y ? (f = {
|
|
539
|
+
delegation: y,
|
|
533
540
|
setDelegation: a,
|
|
534
541
|
availableDelegations: d,
|
|
535
542
|
setAvailableDelegations: S,
|
|
536
|
-
refreshAvailableDelegations:
|
|
537
|
-
}, e[9] = d, e[10] =
|
|
538
|
-
const
|
|
543
|
+
refreshAvailableDelegations: m
|
|
544
|
+
}, e[9] = d, e[10] = m, e[11] = S, e[12] = a, e[13] = y, e[14] = f) : f = e[14];
|
|
545
|
+
const b = f;
|
|
539
546
|
let w;
|
|
540
|
-
return e[15] !==
|
|
541
|
-
}, oe = (t, e) => t ? `${t} | ${e}` : e,
|
|
542
|
-
const e =
|
|
543
|
-
defaultHelmet:
|
|
544
|
-
children:
|
|
547
|
+
return e[15] !== l || e[16] !== b ? (w = /* @__PURE__ */ v(ie.Provider, { value: b, children: l }), e[15] = l, e[16] = b, e[17] = w) : w = e[17], w;
|
|
548
|
+
}, oe = (t, e) => t ? `${t} | ${e}` : e, st = (t) => {
|
|
549
|
+
const e = A.c(18), {
|
|
550
|
+
defaultHelmet: l,
|
|
551
|
+
children: i,
|
|
545
552
|
helmetPrefix: n
|
|
546
553
|
} = t, a = n ?? "";
|
|
547
554
|
let o;
|
|
548
|
-
e[0] !==
|
|
555
|
+
e[0] !== l || e[1] !== a ? (o = oe(a, l), e[0] = l, e[1] = a, e[2] = o) : o = e[2];
|
|
549
556
|
let s;
|
|
550
557
|
e[3] !== o ? (s = [o], e[3] = o, e[4] = s) : s = e[4];
|
|
551
|
-
const [
|
|
558
|
+
const [y, x] = _(s);
|
|
552
559
|
let d;
|
|
553
560
|
e[5] !== n ? (d = (w) => {
|
|
554
|
-
|
|
561
|
+
x((k) => [...k, oe(n ?? "", w)]);
|
|
555
562
|
}, e[5] = n, e[6] = d) : d = e[6];
|
|
556
563
|
const S = d;
|
|
557
|
-
let
|
|
558
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
559
|
-
|
|
560
|
-
}, e[7] =
|
|
561
|
-
const
|
|
564
|
+
let m;
|
|
565
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
|
|
566
|
+
x(qe);
|
|
567
|
+
}, e[7] = m) : m = e[7];
|
|
568
|
+
const r = m;
|
|
562
569
|
let c;
|
|
563
|
-
e[8] !==
|
|
570
|
+
e[8] !== y ? (c = y.at(-1) ?? "", e[8] = y, e[9] = c) : c = e[9];
|
|
564
571
|
const u = c;
|
|
565
|
-
let m;
|
|
566
|
-
e[10] !== S ? (m = {
|
|
567
|
-
addHelmet: S,
|
|
568
|
-
removeHelmet: l
|
|
569
|
-
}, e[10] = S, e[11] = m) : m = e[11];
|
|
570
|
-
const y = m;
|
|
571
572
|
let h;
|
|
572
|
-
e[
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
573
|
+
e[10] !== S ? (h = {
|
|
574
|
+
addHelmet: S,
|
|
575
|
+
removeHelmet: r
|
|
576
|
+
}, e[10] = S, e[11] = h) : h = e[11];
|
|
577
|
+
const g = h;
|
|
578
|
+
let f;
|
|
579
|
+
e[12] !== u ? (f = /* @__PURE__ */ v("title", { children: u }), e[12] = u, e[13] = f) : f = e[13];
|
|
580
|
+
let b;
|
|
581
|
+
return e[14] !== i || e[15] !== g || e[16] !== f ? (b = /* @__PURE__ */ D(ye.Provider, { value: g, children: [
|
|
582
|
+
f,
|
|
583
|
+
i
|
|
584
|
+
] }), e[14] = i, e[15] = g, e[16] = f, e[17] = b) : b = e[17], b;
|
|
578
585
|
};
|
|
579
|
-
function
|
|
586
|
+
function qe(t) {
|
|
580
587
|
return t.length > 1 ? t.slice(0, -1) : t;
|
|
581
588
|
}
|
|
582
|
-
const le = 50,
|
|
583
|
-
const t =
|
|
589
|
+
const le = 50, Fe = () => {
|
|
590
|
+
const t = A.c(22), {
|
|
584
591
|
texts: e
|
|
585
|
-
} =
|
|
586
|
-
confirm:
|
|
592
|
+
} = H(J), {
|
|
593
|
+
confirm: l
|
|
587
594
|
} = e, {
|
|
588
|
-
onConfirm:
|
|
595
|
+
onConfirm: i,
|
|
589
596
|
onCancel: n,
|
|
590
597
|
text: a,
|
|
591
598
|
show: o,
|
|
592
599
|
textSm: s
|
|
593
|
-
} = ve(),
|
|
600
|
+
} = ve(), y = s === void 0 ? a.length > le : s, x = a.length > le;
|
|
594
601
|
let d;
|
|
595
|
-
t[0] !== n || t[1] !==
|
|
602
|
+
t[0] !== n || t[1] !== i || t[2] !== o ? (d = (f) => {
|
|
596
603
|
if (o)
|
|
597
|
-
e: switch (
|
|
604
|
+
e: switch (f.key) {
|
|
598
605
|
case "Enter": {
|
|
599
|
-
|
|
606
|
+
f.preventDefault(), f.stopPropagation(), i();
|
|
600
607
|
break e;
|
|
601
608
|
}
|
|
602
609
|
case "Escape": {
|
|
603
|
-
|
|
610
|
+
f.preventDefault(), f.stopPropagation(), n();
|
|
604
611
|
break e;
|
|
605
612
|
}
|
|
606
613
|
}
|
|
607
|
-
}, t[0] = n, t[1] =
|
|
608
|
-
const
|
|
609
|
-
let
|
|
610
|
-
t[4] !==
|
|
614
|
+
}, t[0] = n, t[1] = i, t[2] = o, t[3] = d) : d = t[3], be(d);
|
|
615
|
+
const m = x ? void 0 : "sm";
|
|
616
|
+
let r;
|
|
617
|
+
t[4] !== y || t[5] !== a ? (r = /* @__PURE__ */ v(O.Header, { className: "justify-content-center", children: y ? /* @__PURE__ */ v(ke, { variant: "body", children: a }) : /* @__PURE__ */ v(O.Title, { children: a }) }), t[4] = y, t[5] = a, t[6] = r) : r = t[6];
|
|
611
618
|
let c;
|
|
612
|
-
t[7] !==
|
|
619
|
+
t[7] !== l.no || t[8] !== n ? (c = /* @__PURE__ */ v(V, { type: "button", variant: "outlined", color: "secondary", className: "w-100", onClick: n, children: l.no }), t[7] = l.no, t[8] = n, t[9] = c) : c = t[9];
|
|
613
620
|
let u;
|
|
614
|
-
t[10] !==
|
|
615
|
-
let
|
|
616
|
-
t[13] !== c || t[14] !== u ? (
|
|
621
|
+
t[10] !== l.yes || t[11] !== i ? (u = /* @__PURE__ */ v(V, { type: "button", color: "primary", onClick: i, className: "w-100 ml", children: l.yes }), t[10] = l.yes, t[11] = i, t[12] = u) : u = t[12];
|
|
622
|
+
let h;
|
|
623
|
+
t[13] !== c || t[14] !== u ? (h = /* @__PURE__ */ v(O.Body, { children: /* @__PURE__ */ D("div", { className: "w-100 d-flex gap-5", children: [
|
|
617
624
|
c,
|
|
618
625
|
u
|
|
619
|
-
] }) }), t[13] = c, t[14] = u, t[15] =
|
|
620
|
-
let
|
|
621
|
-
return t[16] !== n || t[17] !== o || t[18] !==
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
] }), t[16] = n, t[17] = o, t[18] =
|
|
626
|
+
] }) }), t[13] = c, t[14] = u, t[15] = h) : h = t[15];
|
|
627
|
+
let g;
|
|
628
|
+
return t[16] !== n || t[17] !== o || t[18] !== m || t[19] !== r || t[20] !== h ? (g = /* @__PURE__ */ D(O, { show: o, size: m, centered: !0, onHide: n, children: [
|
|
629
|
+
r,
|
|
630
|
+
h
|
|
631
|
+
] }), t[16] = n, t[17] = o, t[18] = m, t[19] = r, t[20] = h, t[21] = g) : g = t[21], g;
|
|
625
632
|
};
|
|
626
633
|
export {
|
|
627
634
|
re as AuthContext,
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
635
|
+
ot as AuthProvider,
|
|
636
|
+
ie as DelegationContext,
|
|
637
|
+
lt as DelegationProvider,
|
|
638
|
+
ct as FormDisabledContext,
|
|
639
|
+
ft as FormDisabledProvider,
|
|
633
640
|
ye as HelmetContext,
|
|
634
|
-
|
|
641
|
+
st as HelmetProvider,
|
|
635
642
|
me as LoadingContext,
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
643
|
+
tt as LoadingProvider,
|
|
644
|
+
J as LuminusComponentsContext,
|
|
645
|
+
et as LuminusComponentsProvider,
|
|
639
646
|
ge as UserContext,
|
|
640
|
-
|
|
641
|
-
|
|
647
|
+
nt as UserProvider,
|
|
648
|
+
at as useFormDisabledContext
|
|
642
649
|
};
|
package/package.json
CHANGED