"use strict";(globalThis.webpackChunk_clerk_ui=globalThis.webpackChunk_clerk_ui||[]).push([["522"],{3131:function(e,t,i){i.r(t),i.d(t,{KeylessPrompt:()=>w});var r=i(4518),n=i(8628),o=i(8802),a=i(630),s=i(7201),l=i(8272),c=i(1986),d=i(9406),p=i(8307);function h(){return(0,r.Y)("svg",{width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg",children:(0,r.Y)("path",{d:"M2.75 2.75L13.25 13.25M7.02665 6.38227C7.00046 6.21924 6.98684 6.052 6.98684 5.88158C6.98684 4.15206 8.3889 2.75 10.1184 2.75C11.8479 2.75 13.25 4.15206 13.25 5.88158C13.25 7.6111 11.8479 9.01316 10.1184 9.01316C9.89357 9.01316 9.67425 8.98946 9.46283 8.94442M4.39638 8.74013L3.21279 9.92371C2.91768 10.1977 2.75 10.5823 2.75 10.985V13.25H5.25V11.25H6.55172L7.02665 10.7751M10 5.97998V5.99998",stroke:"#F0D653",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var m=i(7697);let f="--clerk-keyless-prompt",u=`${f}-button`,x=`${f}-content`;function g(e){try{return e()}catch{return"https://dashboard.clerk.com/last-active"}}let b=e=>{let{isSignedIn:t}=(0,n.Jd)(),[i,s]=(0,a.useState)(!1);(0,a.useEffect)(()=>{t&&s(!0)},[t]);let d=function(){let e=(0,n.ho)(),t=(0,a.useRef)(Date.now()),[,i]=(0,a.useReducer)(e=>e+1,0);return(0,a.useEffect)(()=>{let r=new AbortController;return window.addEventListener("focus",async()=>{let n=e.__internal_environment;if(n){if(null!==n.authConfig.claimedAt)return r.abort();if(!(Date.now()<t.current+1e4)&&"visible"===document.visibilityState)for(let e=0;e<2;e++){let{authConfig:{claimedAt:e}}=await n.fetch();if(t.current=Date.now(),null!==e){i();break}}}},{signal:r.signal}),()=>{r.abort()}},[]),(0,m.O)()}(),f=!!d.authConfig.claimedAt,b="function"==typeof e.onDismiss&&f,w=d.displayConfig.applicationName,k=f||b||i,y=(0,a.useMemo)(()=>{if(f)return e.copyKeysUrl;let t=new URL(e.claimUrl);return t.searchParams.append("return_url",window.location.href),t.href},[f,e.copyKeysUrl,e.claimUrl]),v=(0,a.useMemo)(()=>g(()=>{let t=(0,p.CB)(e.copyKeysUrl);return new URL(`${t.baseDomain}/apps/${t.appId}/instances/${t.instanceId}/user-authentication/email-phone-username`).href}),[e.copyKeysUrl]);(0,a.useMemo)(()=>g(()=>{let t=(0,p.CB)(e.copyKeysUrl);return new URL(`${t.baseDomain}/last-active?path=api-keys`).href}),[e.copyKeysUrl]);let $=(0,o.AH)`
    ${p.mk};
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 1.75rem;
    max-width: 14.625rem;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12px;
    color: ${f||b?"white":"#fde047"};
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.32);
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30.5%, rgba(0, 0, 0, 0.05) 100%), #454545;
    box-shadow:
      0px 0px 0px 1px rgba(255, 255, 255, 0.04) inset,
      0px 1px 0px 0px rgba(255, 255, 255, 0.04) inset,
      0px 0px 0px 1px rgba(0, 0, 0, 0.12),
      0px 1.5px 2px 0px rgba(0, 0, 0, 0.48),
      0px 0px 4px 0px rgba(243, 107, 22, 0) inset;
  `;return(0,r.FD)(c.Z,{children:[(0,r.FD)(p.Uw,{"data-expanded":k,sx:e=>({position:"fixed",bottom:"1.25rem",right:"1.25rem",height:`${e.sizes.$10}`,minWidth:"13.4rem",paddingLeft:`${e.space.$3}`,borderRadius:"1.25rem",transition:"all 195ms cubic-bezier(0.2, 0.61, 0.1, 1)",'&[data-expanded="false"]:hover':{background:"linear-gradient(180deg, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0) 100%), #1f1f1f"},'&[data-expanded="true"]':{flexDirection:"column",alignItems:"flex-center",justifyContent:"flex-center",height:f||b?"fit-content":t?"8.5rem":"12rem",overflow:"hidden",width:"fit-content",minWidth:"16.125rem",gap:`${e.space.$1x5}`,padding:`${e.space.$2x5} ${e.space.$3} ${e.space.$3} ${e.space.$3}`,borderRadius:`${e.radii.$xl}`,transition:"all 230ms cubic-bezier(0.28, 1, 0.32, 1)"}}),children:[(0,r.FD)("button",{type:"button","aria-expanded":k,"aria-controls":x,id:u,onClick:()=>!f&&s(e=>!e),css:(0,o.AH)`
            ${p.mk};
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: center;
          `,children:[(0,r.FD)(l.so,{sx:e=>({alignItems:"center",gap:e.space.$2}),children:[b?(0,r.Y)(p.F3,{css:(0,o.AH)`
                  width: 1rem;
                  height: 1rem;
                `}):f?(0,r.Y)("svg",{width:"1rem",height:"1rem",viewBox:"0 0 16 16","aria-hidden":!0,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.Y)("path",{d:"M8 5.75V7.25M8 10.2502V10.2602M13.25 8C13.25 10.8995 10.8995 13.25 8 13.25C5.10051 13.25 2.75 10.8995 2.75 8C2.75 5.10051 5.10051 2.75 8 2.75C10.8995 2.75 13.25 5.10051 13.25 8Z",stroke:"#F36B16",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,r.FD)("div",{css:(0,o.AH)`
                  perspective: 1000px;
                  position: relative;
                  width: 1rem;
                  height: 1rem;
                  transform-style: preserve-3d;
                  animation: ${k?"coinFlipAnimation 12s infinite linear":" none"};

                  @keyframes coinFlipAnimation {
                    0%,
                    55% {
                      transform: rotateY(0);
                    }
                    60%,
                    95% {
                      transform: rotateY(180deg);
                    }
                    100% {
                      transform: rotateY(0);
                    }
                  }
                  @media (prefers-reduced-motion: reduce) {
                    animation: none;
                  }
                `,children:[(0,r.Y)("span",{className:"coin-flip-front","aria-hidden":!0,css:(0,o.AH)`
                    position: absolute;
                    width: 100%;
                    height: 100%;
                    backface-visibility: hidden;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                  `,children:(0,r.Y)(p.MF,{})}),(0,r.Y)("span",{className:"coin-flip-back","aria-hidden":!0,css:(0,o.AH)`
                    position: absolute;
                    width: 100%;
                    height: 100%;
                    backface-visibility: hidden;
                    transform: rotateY(180deg);
                    display: flex;
                    align-items: center;
                    justify-content: center;
                  `,children:(0,r.Y)(h,{})})]}),(0,r.Y)("p",{"data-text":"Clerk is in keyless mode","aria-label":b?"Claim completed":f?"Missing environment keys":"Clerk is in keyless mode",css:(0,o.AH)`
                ${p.mk};
                color: #d9d9d9;
                font-size: 0.875rem;
                font-weight: 500;
                white-space: nowrap;
                cursor: pointer;
              `,children:b?"Claim completed":f?"Missing environment keys":"Clerk is in keyless mode"})]}),(0,r.Y)("svg",{width:"1rem",height:"1rem",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg",css:(0,o.AH)`
              color: #8c8c8c;
              transition: color 120ms ease-out;
              display: ${i&&!f&&!b?"block":"none"};
              cursor: pointer;

              :hover {
                color: #eeeeee;
              }

              animation: show-button 300ms ease;
              @keyframes show-button {
                from {
                  transform: scaleX(0.9);
                  opacity: 0;
                }
                to {
                  transform: scaleX(1);
                  opacity: 1;
                }
              }
            `,children:(0,r.Y)("path",{d:"M3.75 8H12.25",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})]}),(0,r.FD)(l.so,{sx:e=>({flexDirection:"column",gap:e.space.$3}),children:[(0,r.Y)("div",{role:"region",id:x,"aria-labelledby":u,hidden:!k,children:(0,r.Y)("div",{css:(0,o.AH)`
                display: flex;
                flex-direction: column;
                gap: 0.5rem;
                color: #b4b4b4;
                max-width: 14.625rem;
                animation: ${k&&"show-description 500ms ease-in forwards"};
                @keyframes show-description {
                  0%,
                  5% {
                    opacity: 0;
                  }
                  12%,
                  100% {
                    opacity: 1;
                  }
                }
              `,children:b?(0,r.FD)("p",{css:(0,o.AH)`
                    ${p.mk};
                    color: #b4b4b4;
                    font-size: 0.8125rem;
                    font-weight: 400;
                    line-height: 1rem;
                  `,children:["Your application"," ",(0,r.Y)("span",{css:(0,o.AH)`
                      ${p.mk};
                      display: inline-block;
                      white-space: nowrap;
                      overflow: hidden;
                      text-overflow: ellipsis;
                      max-width: 8.125rem;
                      vertical-align: bottom;
                      font-size: 0.8125rem;
                      font-weight: 500;
                      color: #d5d5d5;
                    `,children:w})," ","has been claimed. Configure settings from the"," ",(0,r.Y)(l.N_,{isExternal:!0,"aria-label":"Go to Dashboard to configure settings",href:v,sx:e=>({color:e.colors.$whiteAlpha600,textDecoration:"underline solid",transition:`${e.transitionTiming.$common} ${e.transitionDuration.$fast}`,":hover":{color:e.colors.$whiteAlpha800}}),children:"Clerk Dashboard"})]}):f?(0,r.Y)("p",{css:(0,o.AH)`
                    ${p.mk};
                    color: #b4b4b4;
                    font-size: 0.8125rem;
                    font-weight: 400;
                    line-height: 1rem;
                  `,children:"You claimed this application but haven't set keys in your environment. Get them from the Clerk Dashboard."}):t?(0,r.Y)("p",{css:(0,o.AH)`
                    ${p.mk};
                    color: #b4b4b4;
                    font-size: 0.8125rem;
                    font-weight: 400;
                    line-height: 1rem;
                  `,children:(0,r.Y)("span",{children:"You've created your first user! Link this application to your Clerk account to explore the Dashboard."})}):(0,r.FD)(r.FK,{children:[(0,r.Y)("p",{css:(0,o.AH)`
                      ${p.mk};
                      color: #b4b4b4;
                      font-size: 0.8125rem;
                      font-weight: 400;
                      line-height: 1rem;
                      text-wrap: pretty;
                    `,children:"Temporary API keys are enabled so you can get started immediately."}),(0,r.Y)("p",{css:(0,o.AH)`
                      ${p.mk};
                      color: #b4b4b4;
                      font-size: 0.8125rem;
                      font-weight: 400;
                      line-height: 1rem;
                      text-wrap: pretty;
                    `,children:"Claim this application to access the Clerk Dashboard where you can manage auth settings and explore more Clerk features."})]})})}),k&&(b?(0,r.Y)("button",{type:"button",onClick:async()=>{await e.onDismiss?.(),window.location.reload()},css:(0,o.AH)`
                  ${$};

                  &:hover {
                    background: #4b4b4b;
                    transition: all 120ms ease-in-out;
                  }
                `,children:"Dismiss"}):(0,r.Y)(l.so,{"data-expanded":k,sx:e=>({flexDirection:"column",alignItems:"center",gap:e.space.$2x5}),children:(0,r.Y)("a",{href:y,target:"_blank",rel:"noopener noreferrer",css:(0,o.AH)`
                    ${$};
                    animation: ${k&&t?"show-main-CTA 800ms ease forwards":"show-main-CTA 650ms ease-in forwards"};

                    @keyframes show-main-CTA {
                      0%,
                      5% {
                        opacity: 0;
                      }
                      14%,
                      100% {
                        opacity: 1;
                      }
                    }

                    &:hover {
                      ${f?`
                  background: #4B4B4B;
                  transition: all 120ms ease-in-out;`:`
                  box-shadow:
                    0px 0px 6px 0px rgba(253, 224, 71, 0.24) inset,
                    0px 0px 0px 1px rgba(255, 255, 255, 0.04) inset,
                    0px 1px 0px 0px rgba(255, 255, 255, 0.04) inset,
                    0px 0px 0px 1px rgba(0, 0, 0, 0.12),
                    0px 1.5px 2px 0px rgba(0, 0, 0, 0.48);`}
                    }
                  `,children:f?"Get API keys":"Claim application"})}))]})]}),(0,r.Y)(C,{children:(0,r.Y)("a",{href:`#${u}`,css:(0,o.AH)`
            position: fixed;
            left: -999px;
            top: 1rem;
            z-index: 999999;
            border-radius: 0.375rem;
            background-color: white;
            padding: 0.25rem 0.5rem;
            font-size: 0.875rem;
            color: black;
            text-decoration: underline;

            &:focus {
              left: 1rem;
              outline: 2px solid;
              outline-offset: 2px;
            }
          `,children:"Skip to Clerk keyless mode content"})})]})},w=e=>(0,r.Y)(d.S,{children:(0,r.Y)(b,{...e})}),C=({children:e})=>{let[t,i]=(0,a.useState)(null);return(0,a.useEffect)(()=>{let e=document.createElement("div");return i(e),document.body.insertBefore(e,document.body.firstChild),()=>{e&&document.body.removeChild(e)}},[]),t?(0,s.createPortal)(e,t):null}},8307:function(e,t,i){i.d(t,{CB:()=>c,F3:()=>l,MF:()=>d,Uw:()=>a,mk:()=>s});var r=i(4518),n=i(8802),o=i(8272);function a({children:e,sx:t,...i}){return(0,r.Y)(o.so,{sx:e=>[{borderRadius:"1.25rem",fontFamily:e.fonts.$main,background:"linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 100%), #1f1f1f",boxShadow:"0px 0px 0px 0.5px #2F3037 inset, 0px 1px 0px 0px rgba(255, 255, 255, 0.08) inset, 0px 0px 0.8px 0.8px rgba(255, 255, 255, 0.20) inset, 0px 0px 0px 0px rgba(255, 255, 255, 0.72), 0px 16px 36px -6px rgba(0, 0, 0, 0.36), 0px 6px 16px -2px rgba(0, 0, 0, 0.20);"},t],...i,children:e})}let s=(0,n.AH)`
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  line-height: 1.5;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    avenir next,
    avenir,
    segoe ui,
    helvetica neue,
    helvetica,
    Cantarell,
    Ubuntu,
    roboto,
    noto,
    arial,
    sans-serif;
  text-decoration: none;
`;function l(e){return(0,r.Y)("svg",{...e,viewBox:"0 0 16 17",fill:"none","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg",children:(0,r.FD)("g",{opacity:"0.88",children:[(0,r.Y)("path",{d:"M13.8002 8.20039C13.8002 8.96206 13.6502 9.71627 13.3587 10.42C13.0672 11.1236 12.64 11.763 12.1014 12.3016C11.5628 12.8402 10.9234 13.2674 10.2198 13.5589C9.51607 13.8504 8.76186 14.0004 8.0002 14.0004C7.23853 14.0004 6.48432 13.8504 5.78063 13.5589C5.07694 13.2674 4.43756 12.8402 3.89898 12.3016C3.3604 11.763 2.93317 11.1236 2.64169 10.42C2.35022 9.71627 2.2002 8.96206 2.2002 8.20039C2.2002 6.66214 2.81126 5.18688 3.89898 4.09917C4.98669 3.01146 6.46194 2.40039 8.0002 2.40039C9.53845 2.40039 11.0137 3.01146 12.1014 4.09917C13.1891 5.18688 13.8002 6.66214 13.8002 8.20039Z",fill:"#22C543",fillOpacity:"0.16"}),(0,r.Y)("path",{d:"M6.06686 8.68372L7.51686 10.1337L9.93353 6.75039M13.8002 8.20039C13.8002 8.96206 13.6502 9.71627 13.3587 10.42C13.0672 11.1236 12.64 11.763 12.1014 12.3016C11.5628 12.8402 10.9234 13.2674 10.2198 13.5589C9.51607 13.8504 8.76186 14.0004 8.0002 14.0004C7.23853 14.0004 6.48432 13.8504 5.78063 13.5589C5.07694 13.2674 4.43756 12.8402 3.89898 12.3016C3.3604 11.763 2.93317 11.1236 2.64169 10.42C2.35022 9.71627 2.2002 8.96206 2.2002 8.20039C2.2002 6.66214 2.81126 5.18688 3.89898 4.09917C4.98669 3.01146 6.46194 2.40039 8.0002 2.40039C9.53845 2.40039 11.0137 3.01146 12.1014 4.09917C13.1891 5.18688 13.8002 6.66214 13.8002 8.20039Z",stroke:"#22C543",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})})}function c(e){let t=new URL(e).href.match(/^https?:\/\/(.*?)\/apps\/app_(.+?)\/instances\/ins_(.+?)(?:\/.*)?$/);if(!t)throw Error("Invalid value Dashboard URL structure");return{baseDomain:`https://${t[1]}`,appId:`app_${t[2]}`,instanceId:`ins_${t[3]}`}}function d(){return(0,r.FD)("svg",{width:"1rem",height:"1.25rem",viewBox:"0 0 16 20",fill:"none","aria-hidden":!0,xmlns:"http://www.w3.org/2000/svg",children:[(0,r.FD)("g",{filter:"url(#filter0_i_438_501)",children:[(0,r.Y)("path",{d:"M10.4766 9.99979C10.4766 11.3774 9.35978 12.4942 7.98215 12.4942C6.60452 12.4942 5.48773 11.3774 5.48773 9.99979C5.48773 8.62216 6.60452 7.50537 7.98215 7.50537C9.35978 7.50537 10.4766 8.62216 10.4766 9.99979Z",fill:"#BBBBBB"}),(0,r.Y)("path",{d:"M12.4176 3.36236C12.6676 3.52972 12.6889 3.88187 12.4762 4.09457L10.6548 5.91595C10.4897 6.08107 10.2336 6.10714 10.0257 6.00071C9.41273 5.68684 8.71811 5.50976 7.98214 5.50976C5.5024 5.50976 3.49219 7.51998 3.49219 9.99972C3.49219 10.7357 3.66926 11.4303 3.98314 12.0433C4.08957 12.2511 4.06349 12.5073 3.89837 12.6724L2.07699 14.4938C1.86429 14.7065 1.51215 14.6851 1.34479 14.4352C0.495381 13.1666 0 11.641 0 9.99972C0 5.5913 3.57373 2.01758 7.98214 2.01758C9.62345 2.01758 11.1491 2.51296 12.4176 3.36236Z",fill:"#8F8F8F"}),(0,r.Y)("path",{d:"M12.4762 15.905C12.6889 16.1177 12.6675 16.4698 12.4176 16.6372C11.149 17.4866 9.62342 17.982 7.9821 17.982C6.34078 17.982 4.81516 17.4866 3.54661 16.6372C3.29666 16.4698 3.27531 16.1177 3.48801 15.905L5.30938 14.0836C5.4745 13.9185 5.73066 13.8924 5.93851 13.9988C6.55149 14.3127 7.24612 14.4898 7.9821 14.4898C8.71808 14.4898 9.4127 14.3127 10.0257 13.9988C10.2335 13.8924 10.4897 13.9185 10.6548 14.0836L12.4762 15.905Z",fill:"#BBBBBB"})]}),(0,r.Y)("defs",{children:(0,r.FD)("filter",{id:"filter0_i_438_501",x:"0",y:"1.86758",width:"12.6217",height:"16.1144",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[(0,r.Y)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),(0,r.Y)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),(0,r.Y)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),(0,r.Y)("feOffset",{dy:"-0.15"}),(0,r.Y)("feGaussianBlur",{stdDeviation:"0.15"}),(0,r.Y)("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),(0,r.Y)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),(0,r.Y)("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_438_501"})]})})]})}}}]);