clerk.tradewindai.com
Open in
urlscan Pro
104.18.0.101
Public Scan
Submitted URL: https://clerk.tradewindai.com/npm/@clerk/clerk-js@4/dist/clerk.browser.js
Effective URL: https://clerk.tradewindai.com/npm/@clerk/clerk-js@4.73.10/dist/clerk.browser.js
Submission: On November 06 via api from IT — Scanned from IT
Effective URL: https://clerk.tradewindai.com/npm/@clerk/clerk-js@4.73.10/dist/clerk.browser.js
Submission: On November 06 via api from IT — Scanned from IT
Form analysis
0 forms found in the DOMText Content
/*! For license information please see clerk.browser.js.LICENSE.txt */ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(globalThis,(function(){return function(){var e,t,n,r,i={2163:function(e,t,n){"use strict";n.d(t,{A:function(){return re}});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),i=Math.abs,o=String.fromCharCode,a=Object.assign;function s(e){return e.trim()}function c(e,t,n){return e.replace(t,n)}function l(e,t){return e.indexOf(t)}function u(e,t){return 0|e.charCodeAt(t)}function d(e,t,n){return e.slice(t,n)}function h(e){return e.length}function f(e){return e.length}function p(e,t){return t.push(e),e}var m=1,g=1,y=0,v=0,b=0,w="";function _(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:m,column:g,length:a,return:""}}function S(e,t){return a(_("",null,null,"",null,null,0),e,{length:-e.length},t)}function k(){return b=v>0?u(w,--v):0,g--,10===b&&(g=1,m--),b}function P(){return b=v<y?u(w,v++):0,g++,10===b&&(g=1,m++),b}function O(){return u(w,v)}function A(){return v}function U(e,t){return d(w,e,t)}function C(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function x(e){return m=g=1,y=h(w=e),v=0,[]}function E(e){return w="",e}function I(e){return s(U(v-1,z(91===e?e+2:40===e?e+1:e)))}function M(e){for(;(b=O())&&b<33;)P();return C(e)>2||C(b)>3?"":" "}function R(e,t){for(;--t&&P()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return U(e,A()+(t<6&&32==O()&&32==P()))}function z(e){for(;P();)switch(b){case e:return v;case 34:case 39:34!==e&&39!==e&&z(b);break;case 40:41===e&&z(e);break;case 92:P()}return v}function T(e,t){for(;P()&&e+b!==57&&(e+b!==84||47!==O()););return"/*"+U(t,v-1)+"*"+o(47===e?e:P())}function N(e){for(;!C(O());)P();return U(e,v)}var L="-ms-",j="-moz-",$="-webkit-",F="comm",D="rule",W="decl",V="@keyframes";function B(e,t){for(var n="",r=f(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function J(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case W:return e.return=e.return||e.value;case F:return"";case V:return e.return=e.value+"{"+B(e.children,r)+"}";case D:e.value=e.props.join(",")}return h(n=B(e.children,r))?e.return=e.value+"{"+n+"}":""}function q(e){return E(G("",null,null,null,[""],e=x(e),0,[0],e))}function G(e,t,n,r,i,a,s,d,f){for(var m=0,g=0,y=s,v=0,b=0,w=0,_=1,S=1,U=1,C=0,x="",E=i,z=a,L=r,j=x;S;)switch(w=C,C=P()){case 40:if(108!=w&&58==u(j,y-1)){-1!=l(j+=c(I(C),"&","&\f"),"&\f")&&(U=-1);break}case 34:case 39:case 91:j+=I(C);break;case 9:case 10:case 13:case 32:j+=M(w);break;case 92:j+=R(A()-1,7);continue;case 47:switch(O()){case 42:case 47:p(H(T(P(),A()),t,n),f);break;default:j+="/"}break;case 123*_:d[m++]=h(j)*U;case 125*_:case 59:case 0:switch(C){case 0:case 125:S=0;case 59+g:-1==U&&(j=c(j,/\f/g,"")),b>0&&h(j)-y&&p(b>32?Y(j+";",r,n,y-1):Y(c(j," ","")+";",r,n,y-2),f);break;case 59:j+=";";default:if(p(L=K(j,t,n,m,g,i,d,x,E=[],z=[],y),a),123===C)if(0===g)G(j,t,L,L,E,a,y,d,z);else switch(99===v&&110===u(j,3)?100:v){case 100:case 108:case 109:case 115:G(e,L,L,r&&p(K(e,L,L,0,0,i,d,x,i,E=[],y),z),i,z,y,d,r?E:z);break;default:G(j,L,L,L,[""],z,0,d,z)}}m=g=b=0,_=U=1,x=j="",y=s;break;case 58:y=1+h(j),b=w;default:if(_<1)if(123==C)--_;else if(125==C&&0==_++&&125==k())continue;switch(j+=o(C),C*_){case 38:U=g>0?1:(j+="\f",-1);break;case 44:d[m++]=(h(j)-1)*U,U=1;break;case 64:45===O()&&(j+=I(P())),v=O(),g=y=h(x=j+=N(A())),C++;break;case 45:45===w&&2==h(j)&&(_=0)}}return a}function K(e,t,n,r,o,a,l,u,h,p,m){for(var g=o-1,y=0===o?a:[""],v=f(y),b=0,w=0,S=0;b<r;++b)for(var k=0,P=d(e,g+1,g=i(w=l[b])),O=e;k<v;++k)(O=s(w>0?y[k]+" "+P:c(P,/&\f/g,y[k])))&&(h[S++]=O);return _(e,t,n,0===o?D:u,h,p,m)}function H(e,t,n){return _(e,t,n,F,o(b),d(e,2,-2),0)}function Y(e,t,n,r){return _(e,t,n,W,d(e,0,r),d(e,r+1,-1),r)}var Z=function(e,t,n){for(var r=0,i=0;r=i,i=O(),38===r&&12===i&&(t[n]=1),!C(i);)P();return U(e,v)},Q=new WeakMap,X=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Q.get(n))&&!r){Q.set(e,!0);for(var i=[],a=function(e,t){return E(function(e,t){var n=-1,r=44;do{switch(C(r)){case 0:38===r&&12===O()&&(t[n]=1),e[n]+=Z(v-1,t,n);break;case 2:e[n]+=I(r);break;case 4:if(44===r){e[++n]=58===O()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=o(r)}}while(r=P());return e}(x(e),t))}(t,i),s=n.props,c=0,l=0;c<a.length;c++)for(var u=0;u<s.length;u++,l++)e.props[l]=i[c]?a[c].replace(/&\f/g,s[u]):s[u]+" "+a[c]}}},ee=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function te(e,t){switch(function(e,t){return 45^u(e,0)?(((t<<2^u(e,0))<<2^u(e,1))<<2^u(e,2))<<2^u(e,3):0}(e,t)){case 5103:return $+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $+e+j+e+L+e+e;case 6828:case 4268:return $+e+L+e+e;case 6165:return $+e+L+"flex-"+e+e;case 5187:return $+e+c(e,/(\w+).+(:[^]+)/,$+"box-$1$2"+L+"flex-$1$2")+e;case 5443:return $+e+L+"flex-item-"+c(e,/flex-|-self/,"")+e;case 4675:return $+e+L+"flex-line-pack"+c(e,/align-content|flex-|-self/,"")+e;case 5548:return $+e+L+c(e,"shrink","negative")+e;case 5292:return $+e+L+c(e,"basis","preferred-size")+e;case 6060:return $+"box-"+c(e,"-grow","")+$+e+L+c(e,"grow","positive")+e;case 4554:return $+c(e,/([^-])(transform)/g,"$1"+$+"$2")+e;case 6187:return c(c(c(e,/(zoom-|grab)/,$+"$1"),/(image-set)/,$+"$1"),e,"")+e;case 5495:case 3959:return c(e,/(image-set\([^]*)/,$+"$1$`$1");case 4968:return c(c(e,/(.+:)(flex-)?(.*)/,$+"box-pack:$3"+L+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$+e+e;case 4095:case 3583:case 4068:case 2532:return c(e,/(.+)-inline(.+)/,$+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(h(e)-1-t>6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return c(e,/(.+:)(.+)-([^]+)/,"$1"+$+"$2-$3$1"+j+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~l(e,"stretch")?te(c(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~l(e,"!important")&&10))){case 107:return c(e,":",":"+$)+e;case 101:return c(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$+(45===u(e,14)?"inline-":"")+"box$3$1"+$+"$2$3$1"+L+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return $+e+L+c(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $+e+L+c(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $+e+L+c(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return $+e+L+e+e}return e}var ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=te(e.value,e.length);break;case V:return B([S(e,{value:c(e.value,"@","@"+$)})],r);case D:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return B([S(e,{props:[c(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return B([S(e,{props:[c(t,/:(plac\w+)/,":"+$+"input-$1")]}),S(e,{props:[c(t,/:(plac\w+)/,":-moz-$1")]}),S(e,{props:[c(t,/:(plac\w+)/,L+"input-$1")]})],r)}return""}))}}],re=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i,o,a=e.stylisPlugins||ne,s={},c=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)s[t[n]]=!0;c.push(e)}));var l,u,d,h,p=[J,(h=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&h(e)})],m=(u=[X,ee].concat(a,p),d=f(u),function(e,t,n,r){for(var i="",o=0;o<d;o++)i+=u[o](e,t,n,r)||"";return i});o=function(e,t,n,r){l=n,B(q(e?e+"{"+t.styles+"}":t.styles),m),r&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new r({key:t,container:i,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return g.sheet.hydrate(c),g}},2949:function(e,t,n){"use strict";n.d(t,{C:function(){return h},E:function(){return w},a:function(){return g},c:function(){return v},h:function(){return u}});var r=n(4041),i=n(2163);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}var a=function(e){var t=new WeakMap;return function(n){if(t.has(n))return t.get(n);var r=e(n);return t.set(n,r),r}},s=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},c=n(6979),l=n(6558),u={}.hasOwnProperty,d=r.createContext("undefined"!=typeof HTMLElement?(0,i.A)({key:"css"}):null),h=d.Provider,f=function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(d);return e(t,i,n)}))},p=r.createContext({}),m=a((function(e){return a((function(t){return function(e,t){return"function"==typeof t?t(e):o({},e,t)}(e,t)}))})),g=function(e){var t=r.useContext(p);return e.theme!==t&&(t=m(t)(e.theme)),r.createElement(p.Provider,{value:t},e.children)},y="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",v=function(e,t){var n={};for(var r in t)u.call(t,r)&&(n[r]=t[r]);return n[y]=e,n},b=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return s(t,n,r),(0,l.s)((function(){return function(e,t,n){s(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}(t,n,r)})),null},w=f((function(e,t,n){var i=e.css;"string"==typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var o=e[y],a=[i],s="";"string"==typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,a,e.className):null!=e.className&&(s=e.className+" ");var l=(0,c.J)(a,void 0,r.useContext(p));s+=t.key+"-"+l.name;var d={};for(var h in e)u.call(e,h)&&"css"!==h&&h!==y&&(d[h]=e[h]);return d.ref=n,d.className=s,r.createElement(r.Fragment,null,r.createElement(b,{cache:t,serialized:l,isStringTag:"string"==typeof o}),r.createElement(o,d))}))},4380:function(e,t,n){"use strict";n.d(t,{FD:function(){return s},FK:function(){return o},Y:function(){return a}});var r=n(1085),i=n(2949),o=(n(4041),n(2163),n(5985),n(6979),n(6558),r.Fragment);function a(e,t,n){return i.h.call(t,"css")?r.jsx(i.E,(0,i.c)(e,t),n):r.jsx(e,t,n)}function s(e,t,n){return i.h.call(t,"css")?r.jsxs(i.E,(0,i.c)(e,t),n):r.jsxs(e,t,n)}},6979:function(e,t,n){"use strict";n.d(t,{J:function(){return p}});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function i(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var o=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,s=function(e){return 45===e.charCodeAt(1)},c=function(e){return null!=e&&"boolean"!=typeof e},l=i((function(e){return s(e)?e:e.replace(o,"-$&").toLowerCase()})),u=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,(function(e,t,n){return h={name:t,styles:n,next:h},t}))}return 1===r[e]||s(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return h={name:n.name,styles:n.styles,next:h},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)h={name:r.name,styles:r.styles,next:h},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=d(e,t,n[i])+";";else for(var o in n){var a=n[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?r+=o+"{"+t[a]+"}":c(a)&&(r+=l(o)+":"+u(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=d(e,t,a);switch(o){case"animation":case"animationName":r+=l(o)+":"+s+";";break;default:r+=o+"{"+s+"}"}}else for(var h=0;h<a.length;h++)c(a[h])&&(r+=l(o)+":"+u(o,a[h])+";")}return r}(e,t,n);case"function":if(void 0!==e){var i=h,o=n(e);return h=i,d(e,t,o)}}if(null==t)return n;var a=t[n];return void 0!==a?a:n}var h,f=/label:\s*([^\s;\n{]+)\s*(;|$)/g,p=function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";h=void 0;var o=e[0];null==o||void 0===o.raw?(r=!1,i+=d(n,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=d(n,t,e[a]),r&&(i+=o[a]);f.lastIndex=0;for(var s,c="";null!==(s=f.exec(i));)c+="-"+s[1];var l=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+c;return{name:l,styles:i,next:h}}},6558:function(e,t,n){"use strict";var r;n.d(t,{s:function(){return a}});var i=n(4041),o=!!(r||(r=n.t(i,2))).useInsertionEffect&&(r||(r=n.t(i,2))).useInsertionEffect,a=o||function(e){return e()};o||i.useLayoutEffect},3011:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{c(r.next(e))}catch(t){o(t)}}function s(e){try{c(r.throw(e))}catch(t){o(t)}}function c(e){e.done?i(e.value):new n((function(t){t(e.value)})).then(a,s)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(6933),a="browser-tabs-lock-key";function s(e){return new Promise((function(t){return setTimeout(t,e)}))}function c(e){for(var t="",n=0;n<e;n++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var l=function(){function e(){this.acquiredIatSet=new Set,this.id=Date.now().toString()+c(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,n){return void 0===n&&(n=5e3),r(this,void 0,void 0,(function(){var r,o,l,u,d,h;return i(this,(function(i){switch(i.label){case 0:r=Date.now()+c(4),o=Date.now()+n,l=a+"-"+t,u=window.localStorage,i.label=1;case 1:return Date.now()<o?[4,s(30)]:[3,8];case 2:return i.sent(),null!==u.getItem(l)?[3,5]:(d=this.id+"-"+t+"-"+r,[4,s(Math.floor(25*Math.random()))]);case 3:return i.sent(),u.setItem(l,JSON.stringify({id:this.id,iat:r,timeoutKey:d,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return i.sent(),null!==(h=u.getItem(l))&&(h=JSON.parse(h)).id===this.id&&h.iat===r?(this.acquiredIatSet.add(r),this.refreshLockWhileAcquired(l,r),[2,!0]):[3,7];case 5:return e.lockCorrector(),[4,this.waitForSomethingToChange(o)];case 6:i.sent(),i.label=7;case 7:return r=Date.now()+c(4),[3,1];case 8:return[2,!1]}}))}))},e.prototype.refreshLockWhileAcquired=function(e,t){return r(this,void 0,void 0,(function(){var n=this;return i(this,(function(a){return setTimeout((function(){return r(n,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:return[4,o.default().lock(t)];case 1:return i.sent(),this.acquiredIatSet.has(t)?(n=window.localStorage,null===(r=n.getItem(e))?(o.default().unlock(t),[2]):((r=JSON.parse(r)).timeRefreshed=Date.now(),n.setItem(e,JSON.stringify(r)),o.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(o.default().unlock(t),[2])}}))}))}),1e3),[2]}))}))},e.prototype.waitForSomethingToChange=function(t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,new Promise((function(n){var r=!1,i=Date.now(),o=!1;function a(){if(o||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),o=!0),!r){r=!0;var t=50-(Date.now()-i);t>0?setTimeout(n,t):n()}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))}))];case 1:return n.sent(),[2]}}))}))},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter((function(e){return e!==t})))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach((function(e){return e()}))},e.prototype.releaseLock=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}}))}))},e.prototype.releaseLock__private__=function(t){return r(this,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return n=window.localStorage,r=a+"-"+t,null===(s=n.getItem(r))?[2]:(s=JSON.parse(s)).id!==this.id?[3,2]:[4,o.default().lock(s.iat)];case 1:i.sent(),this.acquiredIatSet.delete(s.iat),n.removeItem(r),o.default().unlock(s.iat),e.notifyWaiters(),i.label=2;case 2:return[2]}}))}))},e.lockCorrector=function(){for(var t=Date.now()-5e3,n=window.localStorage,r=Object.keys(n),i=!1,o=0;o<r.length;o++){var s=r[o];if(s.includes(a)){var c=n.getItem(s);null!==c&&(void 0===(c=JSON.parse(c)).timeRefreshed&&c.timeAcquired<t||void 0!==c.timeRefreshed&&c.timeRefreshed<t)&&(n.removeItem(s),i=!0)}}i&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=l},6933:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise((function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())}))},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}},9818:function(e,t,n){"use strict";var r=n(528),i=n(8498),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},8498:function(e,t,n){"use strict";var r=n(9138),i=n(528),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),c=i("%Object.getOwnPropertyDescriptor%",!0),l=i("%Object.defineProperty%",!0),u=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(h){l=null}e.exports=function(e){var t=s(r,a,arguments);return c&&l&&c(t,"length").configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))}),t};var d=function(){return s(r,o,arguments)};l?l(e.exports,"apply",{value:d}):e.exports.apply=d},8794:function(e){"use strict";var t=Array.prototype.slice,n=Object.prototype.toString;e.exports=function(e){var r=this;if("function"!=typeof r||"[object Function]"!==n.call(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var i,o=t.call(arguments,1),a=Math.max(0,r.length-o.length),s=[],c=0;c<a;c++)s.push("$"+c);if(i=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var n=r.apply(this,o.concat(t.call(arguments)));return Object(n)===n?n:this}return r.apply(e,o.concat(t.call(arguments)))})),r.prototype){var l=function(){};l.prototype=r.prototype,i.prototype=new l,l.prototype=null}return i}},9138:function(e,t,n){"use strict";var r=n(8794);e.exports=Function.prototype.bind||r},528:function(e,t,n){"use strict";var r,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(t){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(E){c=null}var l=function(){throw new a},u=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(t){return l}}}():l,d=n(3558)(),h=n(6869)(),f=Object.getPrototypeOf||(h?function(e){return e.__proto__}:null),p={},m="undefined"!=typeof Uint8Array&&f?f(Uint8Array):r,g={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":d&&f?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&f?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d&&f?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d&&f?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&f?f(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(f)try{null.error}catch(E){var y=f(f(E));g["%Error.prototype%"]=y}var v=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&f&&(n=f(i.prototype))}return g[t]=n,n},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},w=n(9138),_=n(2571),S=w.call(Function.call,Array.prototype.concat),k=w.call(Function.apply,Array.prototype.splice),P=w.call(Function.call,String.prototype.replace),O=w.call(Function.call,String.prototype.slice),A=w.call(Function.call,RegExp.prototype.exec),U=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,x=function(e,t){var n,r=e;if(_(b,r)&&(r="%"+(n=b[r])[0]+"%"),_(g,r)){var o=g[r];if(o===p&&(o=v(r)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===A(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=O(e,0,1),n=O(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return P(e,U,(function(e,t,n,i){r[r.length]=n?P(i,C,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=x("%"+r+"%",t),s=o.name,l=o.value,u=!1,d=o.alias;d&&(r=d[0],k(n,S([0,1],d)));for(var h=1,f=!0;h<n.length;h+=1){var p=n[h],m=O(p,0,1),y=O(p,-1);if(('"'===m||"'"===m||"`"===m||'"'===y||"'"===y||"`"===y)&&m!==y)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&f||(u=!0),_(g,s="%"+(r+="."+p)+"%"))l=g[s];else if(null!=l){if(!(p in l)){if(!t)throw new a("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&h+1>=n.length){var v=c(l,p);l=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:l[p]}else f=_(l,p),l=l[p];f&&!u&&(g[s]=l)}}return l}},2580:function(e){e.exports=function(e,t){if("string"!=typeof e)throw new TypeError("Expected a string");for(var n,r=String(e),i="",o=!!t&&!!t.extended,a=!!t&&!!t.globstar,s=!1,c=t&&"string"==typeof t.flags?t.flags:"",l=0,u=r.length;l<u;l++)switch(n=r[l]){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":i+="\\"+n;break;case"?":if(o){i+=".";break}case"[":case"]":if(o){i+=n;break}case"{":if(o){s=!0,i+="(";break}case"}":if(o){s=!1,i+=")";break}case",":if(s){i+="|";break}i+="\\"+n;break;case"*":for(var d=r[l-1],h=1;"*"===r[l+1];)h++,l++;var f=r[l+1];a?!(h>1)||"/"!==d&&void 0!==d||"/"!==f&&void 0!==f?i+="([^/]*)":(i+="((?:[^/]*(?:/|$))*)",l++):i+=".*";break;default:i+=n}return c&&~c.indexOf("g")||(i="^"+i+"$"),new RegExp(i,c)}},6869:function(e){"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},3558:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(2908);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},2908:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},2571:function(e,t,n){"use strict";var r=n(9138);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},5985:function(e,t,n){"use strict";var r=n(524),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function c(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var i=f(n);i&&i!==p&&e(t,i,r)}var a=u(n);d&&(a=a.concat(d(n)));for(var s=c(t),m=c(n),g=0;g<a.length;++g){var y=a[g];if(!(o[y]||r&&r[y]||m&&m[y]||s&&s[y])){var v=h(n,y);try{l(t,y,v)}catch(b){}}}}return t}},8660:function(e,t,n){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&c&&"function"==typeof c.get?c.get:null,u=s&&Set.prototype.forEach,d="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,b=String.prototype.replace,w=String.prototype.toUpperCase,_=String.prototype.toLowerCase,S=RegExp.prototype.test,k=Array.prototype.concat,P=Array.prototype.join,O=Array.prototype.slice,A=Math.floor,U="function"==typeof BigInt?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,E="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,M=Object.prototype.propertyIsEnumerable,R=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function z(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||S.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-A(-e):A(e);if(r!==e){var i=String(r),o=v.call(t,i.length+1);return b.call(i,n,"$&_")+"."+b.call(b.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(t,n,"$&_")}var T=n(6973),N=T.custom,L=W(N)?N:null;function j(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function $(e){return b.call(String(e),/"/g,""")}function F(e){return!("[object Array]"!==J(e)||I&&"object"==typeof e&&I in e)}function D(e){return!("[object RegExp]"!==J(e)||I&&"object"==typeof e&&I in e)}function W(e){if(E)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,i){var s=n||{};if(B(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(B(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!B(s,"customInspect")||s.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(B(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(B(s,"numericSeparator")&&"boolean"!=typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var m=s.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,s);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var w=String(t);return m?z(t,w):w}if("bigint"==typeof t){var S=String(t)+"n";return m?z(t,S):S}var A=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=A&&A>0&&"object"==typeof t)return F(t)?"[Array]":"[Object]";var C,N=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=P.call(Array(e.indent+1)," ")}return{base:n,prev:P.call(Array(t+1),n)}}(s,r);if(void 0===i)i=[];else if(q(i,t)>=0)return"[Circular]";function V(t,n,o){if(n&&(i=O.call(i)).push(n),o){var a={depth:s.depth};return B(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,i)}return e(t,s,r+1,i)}if("function"==typeof t&&!D(t)){var K=function(e){if(e.name)return e.name;var t=y.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=X(t,V);return"[Function"+(K?": "+K:" (anonymous)")+"]"+(ee.length>0?" { "+P.call(ee,", ")+" }":"")}if(W(t)){var te=E?b.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(t);return"object"!=typeof t||E?te:H(te)}if((C=t)&&"object"==typeof C&&("undefined"!=typeof HTMLElement&&C instanceof HTMLElement||"string"==typeof C.nodeName&&"function"==typeof C.getAttribute)){for(var ne="<"+_.call(String(t.nodeName)),re=t.attributes||[],ie=0;ie<re.length;ie++)ne+=" "+re[ie].name+"="+j($(re[ie].value),"double",s);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+_.call(String(t.nodeName))+">"}if(F(t)){if(0===t.length)return"[]";var oe=X(t,V);return N&&!function(e){for(var t=0;t<e.length;t++)if(q(e[t],"\n")>=0)return!1;return!0}(oe)?"["+Q(oe,N)+"]":"[ "+P.call(oe,", ")+" ]"}if(function(e){return!("[object Error]"!==J(e)||I&&"object"==typeof e&&I in e)}(t)){var ae=X(t,V);return"cause"in Error.prototype||!("cause"in t)||M.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+P.call(ae,", ")+" }":"{ ["+String(t)+"] "+P.call(k.call("[cause]: "+V(t.cause),ae),", ")+" }"}if("object"==typeof t&&c){if(L&&"function"==typeof t[L]&&T)return T(t,{depth:A-r});if("symbol"!==c&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{l.call(e)}catch(ne){return!0}return e instanceof Map}catch(t){}return!1}(t)){var se=[];return a&&a.call(t,(function(e,n){se.push(V(n,t,!0)+" => "+V(e,t))})),Z("Map",o.call(t),se,N)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{o.call(e)}catch(t){return!0}return e instanceof Set}catch(n){}return!1}(t)){var ce=[];return u&&u.call(t,(function(e){ce.push(V(e,t))})),Z("Set",l.call(t),ce,N)}if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(ne){return!0}return e instanceof WeakMap}catch(t){}return!1}(t))return Y("WeakMap");if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(ne){return!0}return e instanceof WeakSet}catch(t){}return!1}(t))return Y("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(t){}return!1}(t))return Y("WeakRef");if(function(e){return!("[object Number]"!==J(e)||I&&"object"==typeof e&&I in e)}(t))return H(V(Number(t)));if(function(e){if(!e||"object"!=typeof e||!U)return!1;try{return U.call(e),!0}catch(t){}return!1}(t))return H(V(U.call(t)));if(function(e){return!("[object Boolean]"!==J(e)||I&&"object"==typeof e&&I in e)}(t))return H(p.call(t));if(function(e){return!("[object String]"!==J(e)||I&&"object"==typeof e&&I in e)}(t))return H(V(String(t)));if(!function(e){return!("[object Date]"!==J(e)||I&&"object"==typeof e&&I in e)}(t)&&!D(t)){var le=X(t,V),ue=R?R(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",he=!ue&&I&&Object(t)===t&&I in t?v.call(J(t),8,-1):de?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(he||de?"["+P.call(k.call([],he||[],de||[]),": ")+"] ":"");return 0===le.length?fe+"{}":N?fe+"{"+Q(le,N)+"}":fe+"{ "+P.call(le,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function B(e,t){return V.call(e,t)}function J(e){return m.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function G(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return G(v.call(e,0,t.maxStringLength),t)+r}return j(b.call(b.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,K),"single",t)}function K(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+w.call(t.toString(16))}function H(e){return"Object("+e+")"}function Y(e){return e+" { ? }"}function Z(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):P.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+P.call(e,","+n)+"\n"+t.prev}function X(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=B(e,i)?t(e[i],e):""}var o,a="function"==typeof C?C(e):[];if(E){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var c in e)B(e,c)&&(n&&String(Number(c))===c&&c<e.length||E&&o["$"+c]instanceof Symbol||(S.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof C)for(var l=0;l<a.length;l++)M.call(e,a[l])&&r.push("["+t(a[l])+"]: "+t(e[a[l]],e));return r}},1830:function(e){"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},5810:function(e,t,n){"use strict";var r=n(6623),i=n(6193),o=n(1830);e.exports={formats:o,parse:i,stringify:r}},6193:function(e,t,n){"use strict";var r=n(1539),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),l=s?o.slice(0,s.index):o,u=[];if(l){if(!n.plainObjects&&i.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var d=0;n.depth>0&&null!==(s=a.exec(o))&&d<n.depth;){if(d+=1,!n.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),function(e,t,n,r){for(var i=r?t:c(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=i:"__proto__"!==l&&(a[l]=i):a={0:i}}i=a}return i}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=u.split(t.delimiter,d),f=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n<h.length;++n)0===h[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===h[n]?p="utf-8":"utf8=%26%2310003%3B"===h[n]&&(p="iso-8859-1"),f=n,n=h.length);for(n=0;n<h.length;++n)if(n!==f){var m,g,y=h[n],v=y.indexOf("]="),b=-1===v?y.indexOf("="):v+1;-1===b?(m=t.decoder(y,a.decoder,p,"key"),g=t.strictNullHandling?null:""):(m=t.decoder(y.slice(0,b),a.decoder,p,"key"),g=r.maybeMap(c(y.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,p,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===p&&(g=s(g)),y.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(l,m)?l[m]=r.combine(l[m],g):l[m]=g}return l}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(u),f=0;f<h.length;++f){var p=h[f],m=l(p,u[p],n,"string"==typeof e);d=r.merge(d,m,n)}return!0===n.allowSparse?d:r.compact(d)}},6623:function(e,t,n){"use strict";var r=n(7575),i=n(1539),o=n(1830),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=String.prototype.split,u=Array.prototype.push,d=function(e,t){u.apply(e,c(t)?t:[t])},h=Date.prototype.toISOString,f=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:f,formatter:o.formatters[f],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},m={},g=function e(t,n,o,a,s,u,h,f,g,y,v,b,w,_,S,k){for(var P,O=t,A=k,U=0,C=!1;void 0!==(A=A.get(m))&&!C;){var x=A.get(t);if(U+=1,void 0!==x){if(x===U)throw new RangeError("Cyclic object value");C=!0}void 0===A.get(m)&&(U=0)}if("function"==typeof f?O=f(n,O):O instanceof Date?O=v(O):"comma"===o&&c(O)&&(O=i.maybeMap(O,(function(e){return e instanceof Date?v(e):e}))),null===O){if(s)return h&&!_?h(n,p.encoder,S,"key",b):n;O=""}if("string"==typeof(P=O)||"number"==typeof P||"boolean"==typeof P||"symbol"==typeof P||"bigint"==typeof P||i.isBuffer(O)){if(h){var E=_?n:h(n,p.encoder,S,"key",b);if("comma"===o&&_){for(var I=l.call(String(O),","),M="",R=0;R<I.length;++R)M+=(0===R?"":",")+w(h(I[R],p.encoder,S,"value",b));return[w(E)+(a&&c(O)&&1===I.length?"[]":"")+"="+M]}return[w(E)+"="+w(h(O,p.encoder,S,"value",b))]}return[w(n)+"="+w(String(O))]}var z,T=[];if(void 0===O)return T;if("comma"===o&&c(O))z=[{value:O.length>0?O.join(",")||null:void 0}];else if(c(f))z=f;else{var N=Object.keys(O);z=g?N.sort(g):N}for(var L=a&&c(O)&&1===O.length?n+"[]":n,j=0;j<z.length;++j){var $=z[j],F="object"==typeof $&&void 0!==$.value?$.value:O[$];if(!u||null!==F){var D=c(O)?"function"==typeof o?o(L,$):L:L+(y?"."+$:"["+$+"]");k.set(t,U);var W=r();W.set(m,k),d(T,e(F,D,o,a,s,u,h,f,g,y,v,b,w,_,S,W))}}return T};e.exports=function(e,t){var n,i=e,l=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==e.format){if(!a.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=o.formatters[n],i=p.filter;return("function"==typeof e.filter||c(e.filter))&&(i=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof l.filter?i=(0,l.filter)("",i):c(l.filter)&&(n=l.filter);var u,h=[];if("object"!=typeof i||null===i)return"";u=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[u];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var m="comma"===f&&t&&t.commaRoundTrip;n||(n=Object.keys(i)),l.sort&&n.sort(l.sort);for(var y=r(),v=0;v<n.length;++v){var b=n[v];l.skipNulls&&null===i[b]||d(h,g(i[b],b,f,m,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,y))}var w=h.join(l.delimiter),_=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),w.length>0?_+w:""}},1539:function(e,t,n){"use strict";var r=n(1830),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(i){return r}},encode:function(e,t,n,i,o){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var c="",l=0;l<s.length;++l){var u=s.charCodeAt(l);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===r.RFC1738&&(40===u||41===u)?c+=s.charAt(l):u<128?c+=a[u]:u<2048?c+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?c+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(l)),c+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(o(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return o(t)&&!o(n)&&(a=s(t,r)),o(t)&&o(n)?(n.forEach((function(n,o){if(i.call(t,o)){var a=t[o];a&&"object"==typeof a&&n&&"object"==typeof n?t[o]=e(a,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return i.call(t,o)?t[o]=e(t[o],a,r):t[o]=a,t}),a)}}},320:function(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case o:case s:case a:case f:return e;default:switch(e=e&&e.$$typeof){case l:case h:case g:case m:case c:return e;default:return t}}case i:return t}}}function S(e){return _(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=r,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=f,t.isAsyncMode=function(e){return S(e)||_(e)===u},t.isConcurrentMode=S,t.isContextConsumer=function(e){return _(e)===l},t.isContextProvider=function(e){return _(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===h},t.isFragment=function(e){return _(e)===o},t.isLazy=function(e){return _(e)===g},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===i},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===a},t.isSuspense=function(e){return _(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===s||e===a||e===f||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===l||e.$$typeof===h||e.$$typeof===v||e.$$typeof===b||e.$$typeof===w||e.$$typeof===y)},t.typeOf=_},524:function(e,t,n){"use strict";e.exports=n(320)},3335:function(e,t,n){"use strict";var r=n(4041),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,n){var r,o={},l=null,u=null;for(r in void 0!==n&&(l=""+n),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!c.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:l,ref:u,props:o,_owner:s.current}}t.Fragment=o,t.jsx=l,t.jsxs=l},4304:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function v(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=y.prototype;var w=b.prototype=new v;w.constructor=b,m(w,y.prototype),w.isPureReactComponent=!0;var _=Array.isArray,S=Object.prototype.hasOwnProperty,k={current:null},P={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,r){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,i)&&!P.hasOwnProperty(i)&&(o[i]=t[i]);var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps)void 0===o[i]&&(o[i]=c[i]);return{$$typeof:n,type:e,key:a,ref:s,props:o,_owner:k.current}}function A(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var U=/\/+/g;function C(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function x(e,t,i,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var c=!1;if(null===e)c=!0;else switch(s){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0}}if(c)return a=a(c=e),e=""===o?"."+C(c,0):o,_(a)?(i="",null!=e&&(i=e.replace(U,"$&/")+"/"),x(a,t,i,"",(function(e){return e}))):null!=a&&(A(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,i+(!a.key||c&&c.key===a.key?"":(""+a.key).replace(U,"$&/")+"/")+e)),t.push(a)),1;if(c=0,o=""===o?".":o+":",_(e))for(var l=0;l<e.length;l++){var u=o+C(s=e[l],l);c+=x(s,t,i,u,a)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),l=0;!(s=e.next()).done;)c+=x(s=s.value,t,i,u=o+C(s,l++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return c}function E(e,t,n){if(null==e)return e;var r=[],i=0;return x(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function I(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var M={current:null},R={transition:null},z={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:R,ReactCurrentOwner:k};t.Children={map:E,forEach:function(e,t,n){E(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return E(e,(function(){t++})),t},toArray:function(e){return E(e,(function(e){return e}))||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=i,t.Profiler=a,t.PureComponent=b,t.StrictMode=o,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=z,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=k.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)S.call(t,l)&&!P.hasOwnProperty(l)&&(i[l]=void 0===t[l]&&void 0!==c?c[l]:t[l])}var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:n,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=O,t.createFactory=function(e){var t=O.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:I}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=R.transition;R.transition={};try{e()}finally{R.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return M.current.useCallback(e,t)},t.useContext=function(e){return M.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return M.current.useDeferredValue(e)},t.useEffect=function(e,t){return M.current.useEffect(e,t)},t.useId=function(){return M.current.useId()},t.useImperativeHandle=function(e,t,n){return M.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return M.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return M.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return M.current.useMemo(e,t)},t.useReducer=function(e,t,n){return M.current.useReducer(e,t,n)},t.useRef=function(e){return M.current.useRef(e)},t.useState=function(e){return M.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return M.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return M.current.useTransition()},t.version="18.2.0"},4041:function(e,t,n){"use strict";e.exports=n(4304)},1085:function(e,t,n){"use strict";e.exports=n(3335)},8989:function(e){var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(R){l=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof y?t:y,a=Object.create(o.prototype),s=new E(r||[]);return i(a,"_invoke",{value:A(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(R){return{type:"throw",arg:R}}}e.wrap=u;var h="suspendedStart",f="suspendedYield",p="executing",m="completed",g={};function y(){}function v(){}function b(){}var w={};l(w,a,(function(){return this}));var _=Object.getPrototypeOf,S=_&&_(_(I([])));S&&S!==n&&r.call(S,a)&&(w=S);var k=b.prototype=y.prototype=Object.create(w);function P(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(i,o,a,s){var c=d(e[i],e,o);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==typeof u&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){l.value=e,a(l)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function A(e,t,n){var r=h;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===m){if("throw"===i)throw o;return M()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=U(a,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=d(e,t,n);if("normal"===c.type){if(r=n.done?m:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=m,n.method="throw",n.arg=c.arg)}}}function U(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,U(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:M}}function M(){return{value:t,done:!0}}return v.prototype=b,i(k,"constructor",{value:b,configurable:!0}),i(b,"constructor",{value:v,configurable:!0}),v.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(k),e},e.awrap=function(e){return{__await:e}},P(O.prototype),l(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},P(k),l(k,c,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=I,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(x),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:I(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}(e.exports);try{regeneratorRuntime=t}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},7575:function(e,t,n){"use strict";var r=n(528),i=n(9818),o=n(8660),a=r("%TypeError%"),s=r("%WeakMap%",!0),c=r("%Map%",!0),l=i("WeakMap.prototype.get",!0),u=i("WeakMap.prototype.set",!0),d=i("WeakMap.prototype.has",!0),h=i("Map.prototype.get",!0),f=i("Map.prototype.set",!0),p=i("Map.prototype.has",!0),m=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+o(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return l(e,r)}else if(c){if(t)return h(t,r)}else if(n)return function(e,t){var n=m(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return d(e,r)}else if(c){if(t)return p(t,r)}else if(n)return function(e,t){return!!m(e,t)}(n,r);return!1},set:function(r,i){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),u(e,r,i)):c?(t||(t=new c),f(t,r,i)):(n||(n={key:{},next:null}),function(e,t,n){var r=m(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,i))}};return r}},6480:function(e,t,n){"use strict";n.d(t,{$i:function(){return f},CL:function(){return s},Ej:function(){return r},MC:function(){return l},OQ:function(){return u},UU:function(){return h},ZA:function(){return i},e8:function(){return d},k2:function(){return a},rt:function(){return c},tK:function(){return o}});const r=["after_sign_in_url","after_sign_up_url","redirect_url"],i="clerk-db-jwt",o="__dev_session",a="Clerk-Cookie",s="__clerk_modal_state",c="__clerk_synced",l="__clerk_satellite_url",u={FORM_IDENTIFIER_NOT_FOUND:"form_identifier_not_found",FORM_PASSWORD_INCORRECT:"form_password_incorrect",INVALID_STRATEGY_FOR_USER:"strategy_for_user_invalid",NOT_ALLOWED_TO_SIGN_UP:"not_allowed_to_sign_up",OAUTH_ACCESS_DENIED:"oauth_access_denied",OAUTH_EMAIL_DOMAIN_RESERVED_BY_SAML:"oauth_email_domain_reserved_by_saml",NOT_ALLOWED_ACCESS:"not_allowed_access",SAML_USER_ATTRIBUTE_MISSING:"saml_user_attribute_missing",USER_LOCKED:"user_locked"},d=["email_address","phone_number","username"],h=["email_address","phone_number","username","first_name","last_name"],f=350},5882:function(e,t,n){"use strict";n.d(t,{$V:function(){return h},A8:function(){return U},BF:function(){return o},Gm:function(){return y},HZ:function(){return g},IJ:function(){return _},O:function(){return l},Rj:function(){return v},U6:function(){return A},ZX:function(){return P},a2:function(){return p},eS:function(){return a},gY:function(){return O},hs:function(){return f},i$:function(){return c},iq:function(){return S},jB:function(){return s},kX:function(){return d},lg:function(){return u},pV:function(){return b},sW:function(){return i},ut:function(){return k},wv:function(){return w},z$:function(){return m}});const r="ClerkJS:";function i(e,t){throw new Error(`${r} Network error at "${e}" - ${t}. Please try again.`)}function o(){throw new Error(`${r} Something went wrong initializing Clerk.`)}function a(e){throw new Error(`${r} Something went wrong initializing Clerk in development mode${e&&` - ${e}`}.`)}function s(e){throw new Error(`${r} Missing path option. The ${e} component was mounted with path routing so you need to specify the path where the component is mounted on e.g. path="/sign-in".`)}function c(e){throw new Error(`${r} You must wrap your application in a <${e}> component.`)}function l(){throw new Error(`${r} User is undefined. Try wrapping your component with \`withUserGuard\``)}function u(){throw new Error(`${r} Session is undefined. Try wrapping your component with \`withUserGuard\``)}function d(){throw new Error(`${r} Clerk is undefined`)}function h(){throw new Error(`${r} The target element is empty. Provide a valid DOM element.`)}function f(){throw new Error(`${r} Missing FAPI client in resources.`)}function p(e){throw new Error(`${r} Token refresh failed (error='${e}')`)}function m(e){throw new Error(`${r} Something went wrong initializing Clerk during the ${e} flow. Please contact support.`)}function g(e){throw new Error(`${r} You need to start a ${e} flow by calling ${e}.create() first.`)}function y(e,t){throw new Error(`${r} Strategy "${t}" is not a valid strategy for ${e}.`)}function v(e){throw new Error(`${r} You need to start a ${e} flow by calling ${e}.create({ identifier: 'your web3 wallet address' }) first`)}function b(e=""){throw new Error(`${r} Missing '${e}' option`)}function w(e,t){throw new Error(`${r} Response: ${e||0} not supported yet.\nFor more information contact us at ${t}`)}function _(){throw new Error(`${r} Missing dev browser jwt. Please contact support.`)}function S(){throw new Error(`${r} Missing domain and proxyUrl. A satellite application needs to specify a domain or a proxyUrl.`)}function k(){throw new Error(`${r} The signInUrl needs to be on a different origin than your satellite application.`)}function P(){throw new Error(`${r} The signInUrl needs to have a absolute url format.`)}function O(){throw new Error(`${r} Missing signInUrl. A satellite application needs to specify the signInUrl for development instances.`)}function A(){throw new Error(`${r} Invalid redirect_url. A valid http or https url should be used for the redirection.`)}function U(e){throw new Error(`${r} Unable to retrieve a third party script${e?` ${e}`:""}.`)}},2692:function(e,t,n){"use strict";n.d(t,{A:function(){return r},B:function(){return i}});const r={TokenUpdate:"token:update"},i=(()=>{const e=new Map;return{on:(t,n)=>{var r;e.get(t)||e.set(t,[]),null===(r=e.get(t))||void 0===r||r.push(n)},dispatch:(t,n)=>{(e.get(t)||[]).forEach((e=>"function"==typeof e&&e(n)))},off:(t,n)=>{const r=e.get(t)||[];r.length&&(n&&e.set(t,r.filter((e=>e!==n))),e.set(t,[]))}}})()},600:function(e,t,n){"use strict";n.d(t,{A:function(){return l}});var r=n(8517),i=n(5810),o=n.n(i),a=n(5098),s=n(5882);const c=(e,t,n,i)=>"key"===i?(0,r.C8)(e):t(e);function l(e){const t=[],n=[];function i({method:t,path:n,sessionId:r,search:i,rotatingTokenNonce:a}){const s=new URLSearchParams(i);e.version&&s.append("_clerk_js_version",e.version),a&&s.append("rotating_token_nonce",a),"development"===e.instanceType&&e.isSatellite&&s.append("__domain",e.domain),t&&"GET"!==t&&"POST"!==t&&s.append("_method",t),n&&!n.startsWith("/client")&&r&&s.append("_clerk_session_id",r);const c=[...s.entries()].reduce(((e,[t,n])=>(e[t]=n.includes(",")?n.split(","):n,e)),{});return o().stringify(c,{addQueryPrefix:!0,arrayFormat:"repeat"})}function l(t){const{path:n,pathPrefix:r="v1"}=t,{proxyUrl:o,domain:s,frontendApi:c,instanceType:l}=e,u="production"===l?s:"";if(o){const e=new URL(o),s=e.pathname.slice(1,e.pathname.length);return(0,a.kZ)({base:e.origin,pathname:`${s}/${r}${n}`,search:i(t)},{stringify:!1})}return(0,a.kZ)({base:`https://${u||c}`,pathname:`${r}${n}`,search:i(t)},{stringify:!1})}return{buildEmailAddress:function(t){return(0,a.DG)({localPart:t,frontendApi:e.frontendApi})},buildUrl:l,onAfterResponse:function(e){n.push(e)},onBeforeRequest:function(e){t.push(e)},request:async function(i){var a;let{method:u="GET",body:d}=i;i.url=l({...i,sessionId:null===(a=e.session)||void 0===a?void 0:a.id}),i.headers||(i.headers=new Headers),"GET"===u||d instanceof FormData||i.headers.has("content-type")||i.headers.set("content-type","application/x-www-form-urlencoded"),"application/x-www-form-urlencoded"===i.headers.get("content-type")&&(i.body=o().stringify(d,{encoder:c,indices:!1}));const h=await async function(e){const n="undefined"!=typeof window&&window.__unstable__onBeforeRequest;for await(const r of[n,...t].filter((e=>e)))if(!1===await r(e))return!1;return!0}(i),f="GET"===u?"GET":"POST";let p;const m=i.url.toString(),g={...i,credentials:"include",method:f};try{if(h){const e=(0,r.kv)()?4:11;p="GET"===f?await(0,r.Nv)((()=>fetch(m,g)),{firstDelay:500,maxDelay:3e3,shouldRetry:(t,n)=>n<e}):await fetch(m,g)}else p=new Response("{}",i)}catch(b){(0,s.sW)(m,b)}const y=await p.json(),v=Object.assign(p,{payload:y});return await async function(e,t){const r="undefined"!=typeof window&&window.__unstable__onAfterResponse;for await(const i of[r,...n].filter((e=>e)))if(!1===await i(e,t))return!1;return!0}(i,v),v}}}},1101:function(e,t,n){"use strict";n.d(t,{xW:function(){return s},Qx:function(){return o},LR:function(){return w.LR},cR:function(){return w.cR},Kj:function(){return d},Z4:function(){return h},lx:function(){return p},Tl:function(){return g},NZ:function(){return w.NZ},Ys:function(){return w.Ys},OH:function(){return v},Fi:function(){return O},NX:function(){return A},_V:function(){return U},gS:function(){return w.gS},dB:function(){return w.dB},yb:function(){return z},L5:function(){return T},i7:function(){return N},YO:function(){return L},go:function(){return C},LA:function(){return H},t3:function(){return j},Nn:function(){return K},Kn:function(){return Y},Ls:function(){return X},Hx:function(){return re},Vx:function(){return k},_k:function(){return oe},ou:function(){return ie},KJ:function(){return ce},E0:function(){return ee},wE:function(){return le},tl:function(){return a},o6:function(){return S},Nv:function(){return ue},$R:function(){return w.$R},Cm:function(){return w.Cm},ux:function(){return w.ux},si:function(){return w.si},u$:function(){return w.u$}});var r=n(8521),i=n(5882);class o{constructor(){this.pathRoot=""}static get fapiClient(){return o.clerk.getFapiClient()}static async _fetch(e,t={}){let n;o.fapiClient||(0,i.hs)();try{n=await o.fapiClient.request(e)}catch(u){if((0,r.CS)())throw u;return console.warn(u),null}const{payload:a,status:s,statusText:c,headers:l}=n;if(l){const e=l.get("x-country");this.clerk.__internal_setCountry(e?e.toLowerCase():null)}if(("GET"!==e.method||t.forceUpdateClient)&&this._updateClient(a),s>=200&&s<=299)return a;if(401===s&&await o.clerk.handleUnauthenticated(),s>=400)throw new w.LR(c,{data:null==a?void 0:a.errors,status:s});return null}static _updateClient(e){var t;if(!e)return;const n=e.client||(null===(t=e.meta)||void 0===t?void 0:t.client);n&&o.clerk&&o.clerk.updateClient(d.getInstance().fromJSON(n))}isNew(){return!this.id}path(e){const t=this.pathRoot;if(this.isNew())return t;const n=t.replace(/[^/]$/,"$&/")+encodeURIComponent(this.id);return e?n.replace(/[^/]$/,"$&/")+encodeURIComponent(e):n}async _baseGet(e={}){const t=await o._fetch({method:"GET",path:this.path(),rotatingTokenNonce:e.rotatingTokenNonce,search:e.search},e);return this.fromJSON((null==t?void 0:t.response)||t)}async _baseMutate({action:e,body:t,method:n="POST",path:r}){const i=await o._fetch({method:n,path:r||this.path(e),body:t});return this.fromJSON((null==i?void 0:i.response)||i)}async _basePost(e={}){return this._baseMutate({...e,method:"POST"})}async _basePut(e={}){return this._baseMutate({...e,method:"PUT"})}async _basePatch(e={}){return this._baseMutate({...e,method:"PATCH"})}async _baseDelete(e={}){await this._baseMutate({...e,method:"DELETE"})}async reload(e){const{rotatingTokenNonce:t}=e||{};return this._baseGet({forceUpdateClient:!0,rotatingTokenNonce:t})}}class a extends o{constructor(e){super(),this.id=void 0,this.socialProviderStrategies=[],this.authenticatableSocialStrategies=[],this.web3FirstFactors=[],this.enabledFirstFactorIdentifiers=[],this.fromJSON(e)}get instanceIsPasswordBased(){return this.attributes.password.enabled&&this.attributes.password.required}get hasValidAuthFactor(){return this.attributes.email_address.enabled||this.attributes.phone_number.enabled||this.attributes.password.required&&this.attributes.username.required}fromJSON(e){var t,n,r;return e?(this.social=e.social,this.saml=e.saml,this.attributes=Object.fromEntries(Object.entries(e.attributes).map((e=>[e[0],{...e[1],name:e[0]}]))),this.actions=e.actions,this.signIn=e.sign_in,this.signUp=e.sign_up,this.passwordSettings={...e.password_settings,min_length:Math.max(null===(t=null==e?void 0:e.password_settings)||void 0===t?void 0:t.min_length,8),max_length:0===(null===(n=null==e?void 0:e.password_settings)||void 0===n?void 0:n.max_length)?72:Math.min(null===(r=null==e?void 0:e.password_settings)||void 0===r?void 0:r.max_length,72)},this.socialProviderStrategies=this.getSocialProviderStrategies(e.social),this.authenticatableSocialStrategies=this.getAuthenticatableSocialStrategies(e.social),this.web3FirstFactors=this.getWeb3FirstFactors(this.attributes),this.enabledFirstFactorIdentifiers=this.getEnabledFirstFactorIdentifiers(this.attributes),this):this}getEnabledFirstFactorIdentifiers(e){return e?Object.entries(e).filter((([e,t])=>t.used_for_first_factor&&!e.startsWith("web3"))).map((([e])=>e)):[]}getWeb3FirstFactors(e){return e?Object.entries(e).filter((([e,t])=>t.used_for_first_factor&&e.startsWith("web3"))).map((([,e])=>e.first_factors)).flat():[]}getSocialProviderStrategies(e){return e?Object.entries(e).filter((([,e])=>e.enabled)).map((([,e])=>e.strategy)).sort():[]}getAuthenticatableSocialStrategies(e){return e?Object.entries(e).filter((([,e])=>e.enabled&&e.authenticatable)).map((([,e])=>e.strategy)).sort():[]}}class s extends o{constructor(e){super(),this.fromJSON(e)}fromJSON(e){return this.singleSessionMode=!e||e.single_session_mode,this.urlBasedSessionSyncing=!!e&&e.url_based_session_syncing,this}}function c(e){const t=new Date(e||new Date);return(n=t)instanceof Date&&!isNaN(n.getTime())?t:new Date;var n}class l{static fromKey(e){const[t,n,r=""]=e.split("::");return new l(t,{audience:r,tokenId:n})}constructor(e,t){this.prefix=e,this.data=t,this.prefix=e,this.data=t}toKey(){const{tokenId:e,audience:t}=this.data;return[this.prefix,e,t||""].join("::")}}const u=((e="clerk")=>{const t=new Map;let n;return{get:(n,r=10)=>{const i=new l(e,n),o=t.get(i.toKey());if(!o)return;const a=Math.floor(Date.now()/1e3)-o.createdAt;if(!(o.expiresIn-a<(r||1)+5))return o.entry;t.delete(i.toKey())},set:r=>{const i=new l(e,{audience:r.audience,tokenId:r.tokenId}).toKey(),o={entry:r,createdAt:Math.floor(Date.now()/1e3)},a=()=>{t.get(i)===o&&t.delete(i)};r.tokenResolver.then((e=>{if(!e.jwt)return a();const t=e.jwt.claims.exp-e.jwt.claims.iat;o.expiresIn=t,n=setTimeout(a,1e3*t),"function"==typeof n.unref&&n.unref()})).catch((()=>{a()})),t.set(i,o)},clear:()=>{clearTimeout(n),t.clear()},size:()=>t.size}})();class d extends o{static getInstance(){return d.instance||(d.instance=new d),d.instance}static isClientResource(e){return!!e&&e instanceof d}constructor(e=null){super(),this.pathRoot="/client",this.sessions=[],this.signUp=new re,this.signIn=new X,this.lastActiveSessionId=null,this.createdAt=null,this.updatedAt=null,this.fromJSON(e)}get signUpAttempt(){return this.signUp}get signInAttempt(){return this.signIn}get activeSessions(){return this.sessions.filter((e=>"active"===e.status))}create(){return this._basePut()}fetch(){return this._baseGet()}async destroy(){return this._baseDelete({path:"/client"}).then((()=>{u.clear(),this.sessions=[],this.signUp=new re(null),this.signIn=new X(null),this.lastActiveSessionId=null,this.createdAt=null,this.updatedAt=null}))}clearCache(){return this.sessions.forEach((e=>e.clearCache()))}fromJSON(e){return e&&(this.id=e.id,this.sessions=(e.sessions||[]).map((e=>new K(e))),this.signUp=new re(e.sign_up),this.signIn=new X(e.sign_in),this.lastActiveSessionId=e.last_active_session_id,this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at)),this}path(){return this.pathRoot}}class h{constructor(e){this.object="",this.deleted=!1,this.fromJSON(e)}fromJSON(e){return e?(this.object=e.object,this.id=e.id,this.slug=e.slug,this.deleted=e.deleted,this):this}}var f=n(7780);class p extends o{constructor(e){super(),this.captchaPublicKey=null,this.captchaWidgetType=null,this.captchaProvider="turnstile",this.captchaPublicKeyInvisible=null,this.captchaOauthBypass=[],this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.instanceEnvironmentType=e.instance_environment_type,this.applicationName=e.application_name,this.theme=e.theme,this.preferredSignInStrategy=e.preferred_sign_in_strategy,this.logoImageUrl=e.logo_image_url,this.faviconImageUrl=e.favicon_image_url,this.logoUrl=e.logo_url,this.faviconUrl=e.favicon_url,this.homeUrl=e.home_url,this.signInUrl=e.sign_in_url,this.signUpUrl=e.sign_up_url,this.userProfileUrl=e.user_profile_url,this.afterSignInUrl=e.after_sign_in_url,this.afterSignUpUrl=e.after_sign_up_url,this.afterSignOutOneUrl=e.after_sign_out_one_url,this.afterSignOutAllUrl=e.after_sign_out_all_url,this.afterSwitchSessionUrl=e.after_switch_session_url,this.branded=e.branded,this.captchaPublicKey=e.captcha_public_key,this.captchaWidgetType=e.captcha_widget_type,this.captchaProvider=e.captcha_provider,this.captchaPublicKeyInvisible=e.captcha_public_key_invisible,this.captchaOauthBypass=e.captcha_oauth_bypass||["oauth_google","oauth_microsoft","oauth_apple"],this.supportEmail=e.support_email||"",this.clerkJSVersion=e.clerk_js_version,this.organizationProfileUrl=e.organization_profile_url,this.createOrganizationUrl=e.create_organization_url,this.afterLeaveOrganizationUrl=e.after_leave_organization_url,this.afterCreateOrganizationUrl=e.after_create_organization_url,this.googleOneTapClientId=e.google_one_tap_client_id,this):this}}(0,f.Lx)(p,"logoUrl","Use `logoImageUrl` instead."),(0,f.Lx)(p,"faviconUrl","Use `faviconImageUrl` instead.");var m=n(4968);n(3195);class g extends o{constructor(e,t){super(),this.emailAddress="",this.linkedTo=[],this.prepareVerification=e=>this._basePost({action:"prepare_verification",body:{...e}}),this.attemptVerification=e=>{const{code:t}=e||{};return this._basePost({action:"attempt_verification",body:{code:t}})},this.createMagicLinkFlow=()=>{(0,f.io)("createMagicLinkFlow","Use `createEmailLinkFlow` instead.");const{run:e,stop:t}=(0,m.vu)();return{startMagicLinkFlow:async({redirectUrl:n})=>(this.id||(0,i.HZ)("SignUp"),await this.prepareVerification({strategy:"email_link",redirectUrl:n}),new Promise(((n,r)=>{e((()=>this.reload().then((e=>{"verified"===e.verification.status&&(t(),n(e))})).catch((e=>{t(),r(e)}))))}))),cancelMagicLinkFlow:t}},this.createEmailLinkFlow=()=>{const{run:e,stop:t}=(0,m.vu)();return{startEmailLinkFlow:async({redirectUrl:n})=>(this.id||(0,i.HZ)("SignUp"),await this.prepareVerification({strategy:"email_link",redirectUrl:n}),new Promise(((n,r)=>{e((()=>this.reload().then((e=>{"verified"===e.verification.status&&(t(),n(e))})).catch((e=>{t(),r(e)}))))}))),cancelEmailLinkFlow:t}},this.destroy=()=>this._baseDelete(),this.toString=()=>this.emailAddress,this.pathRoot=t,this.fromJSON(e)}create(){return this._basePost({body:{email_address:this.emailAddress}})}fromJSON(e){return e?(this.id=e.id,this.emailAddress=e.email_address,this.verification=new S(e.verification),this.linkedTo=(e.linked_to||[]).map((e=>new A(e))),this):this}}class y extends o{constructor(e){super(),this.fromJSON(e)}fromJSON(e){const{enabled:t=!1,max_allowed_memberships:n=0,actions:r,domains:i}=e||{};return this.enabled=t,this.maxAllowedMemberships=n,this.actions={adminDelete:(null==r?void 0:r.admin_delete)||!1},this.domains={enabled:(null==i?void 0:i.enabled)||!1,enrollmentModes:(null==i?void 0:i.enrollment_modes)||[]},this}}class v extends o{static getInstance(){return v.instance||(v.instance=new v),v.instance}constructor(e=null){super(),this.pathRoot="/environment",this.isSingleSession=()=>this.authConfig.singleSessionMode,this.isProduction=()=>"production"===this.displayConfig.instanceEnvironmentType,this.isDevelopmentOrStaging=()=>!this.isProduction(),this.onWindowLocationHost=()=>this.displayConfig.backendHost===window.location.host,this.fromJSON(e)}fetch({touch:e}={touch:!1}){if(e)return this._basePatch({});const t=new URLSearchParams;if("function"==typeof o.clerk.__internal_getFrameworkHint){const{framework:e,version:n}=o.clerk.__internal_getFrameworkHint();e&&(t.append("__clerk_framework_hint",e),n&&t.append("__clerk_framework_version",n))}return this._baseGet({search:t})}fromJSON(e){return e&&(this.authConfig=new s(e.auth_config),this.displayConfig=new p(e.display_config),this.userSettings=new a(e.user_settings),this.organizationSettings=new y(e.organization_settings),this.maintenanceMode=e.maintenance_mode),this}}var b,w=n(9859),_=n(8517);class S extends o{constructor(e){super(),this.pathRoot="",this.status=null,this.strategy=null,this.nonce=null,this.externalVerificationRedirectURL=null,this.attempts=null,this.expireAt=null,this.error=null,this.verifiedAtClient=null,this.verifiedFromTheSameClient=()=>{var e,t;return this.verifiedAtClient===(null===(t=null===(e=o.clerk)||void 0===e?void 0:e.client)||void 0===t?void 0:t.id)},this.fromJSON(e)}fromJSON(e){return e&&(this.status=e.status,this.verifiedAtClient=e.verified_at_client,this.strategy=e.strategy,this.nonce=e.nonce||null,e.external_verification_redirect_url?this.externalVerificationRedirectURL=new URL(e.external_verification_redirect_url):this.externalVerificationRedirectURL=null,this.attempts=e.attempts,this.expireAt=c(e.expire_at),this.error=e.error?(0,w.u$)(e.error):null),this}}class k{constructor(e){e?(this.emailAddress=new P(e.email_address),this.phoneNumber=new P(e.phone_number),this.web3Wallet=new P(e.web3_wallet),this.externalAccount=new S(e.external_account)):(this.emailAddress=new P(null),this.phoneNumber=new P(null),this.web3Wallet=new P(null),this.externalAccount=new S(null))}}class P extends S{constructor(e){super(e),e?(this.nextAction=e.next_action,this.supportedStrategies=e.supported_strategies):(this.nextAction="",this.supportedStrategies=[])}}class O extends o{constructor(e,t){super(),this.providerUserId="",this.emailAddress="",this.approvedScopes="",this.firstName="",this.lastName="",this.avatarUrl="",this.imageUrl="",this.username="",this.publicMetadata={},this.label="",this.verification=null,this.reauthorize=e=>{const{additionalScopes:t,redirectUrl:n}=e||{};return this._basePatch({action:"reauthorize",body:{additional_scope:t,redirect_url:n}})},this.destroy=()=>this._baseDelete(),this.pathRoot=t,this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.identificationId=e.identification_id,this.providerUserId=e.provider_user_id,this.approvedScopes=e.approved_scopes,this.avatarUrl=e.avatar_url,this.imageUrl=e.image_url,this.emailAddress=e.email_address,this.firstName=e.first_name,this.lastName=e.last_name,this.provider=(e.provider||"").replace("oauth_",""),this.username=e.username,this.publicMetadata=e.public_metadata,this.label=e.label,e.verification&&(this.verification=new S(e.verification)),this):this}providerSlug(){return this.provider}providerTitle(){return[(0,_.Ns)(this.providerSlug()),"Account"].join(" ")}accountIdentifier(){return this.username||this.emailAddress||this.label}}(0,_.Lx)(O,"avatarUrl","Use `imageUrl` instead.");class A extends o{constructor(e){super(),this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.type=e.type,this):this}}class U extends o{static async create(e,t={}){var n;let r,i=t;"string"==typeof t.file?(i=t.file,r=new Headers({"Content-Type":"application/octet-stream"})):t.file&&(i=new FormData,i.append("file",t.file));const a=null===(n=await o._fetch({path:e,method:"POST",body:i,headers:r}))||void 0===n?void 0:n.response;return new U(a)}static async delete(e){var t;const n=null===(t=await o._fetch({path:e,method:"DELETE"}))||void 0===t?void 0:t.response;return new U(n)}constructor(e){super(),this.name=null,this.publicUrl=null,this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.name=e.name,this.publicUrl=e.public_url,this):this}}class C extends o{constructor(e,t){super(),this.phoneNumber="",this.reservedForSecondFactor=!1,this.defaultSecondFactor=!1,this.linkedTo=[],this.create=()=>this._basePost({body:{phone_number:this.phoneNumber}}),this.prepareVerification=()=>this._basePost({action:"prepare_verification",body:{strategy:"phone_code"}}),this.attemptVerification=e=>{const{code:t}=e||{};return this._basePost({action:"attempt_verification",body:{code:t}})},this.setReservedForSecondFactor=e=>{const{reserved:t}=e||{};return this._basePatch({body:{reserved_for_second_factor:t}})},this.makeDefaultSecondFactor=()=>this._basePatch({body:{default_second_factor:!0}}),this.destroy=()=>this._baseDelete(),this.toString=()=>{const e=this.phoneNumber.match(/^(\d{3})(\d{3})(\d{4})$/);return e?"("+e[1]+") "+e[2]+"-"+e[3]:this.phoneNumber},this.pathRoot=t,this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.phoneNumber=e.phone_number,this.reservedForSecondFactor=e.reserved_for_second_factor,this.defaultSecondFactor=e.default_second_factor,this.verification=new S(e.verification),this.linkedTo=(e.linked_to||[]).map((e=>new A(e))),this.backupCodes=e.backup_codes,this):this}}function x(e){const{pageSize:t,initialPage:n,...r}=e||{},i=null!=t?t:10,o=null!=n?n:1;return{...(a=r,Object.keys(a).reduce(((e,t)=>(void 0!==a[t]&&(e[t]=a[t]),e)),{})),limit:i,offset:(o-1)*i};var a}class E extends o{constructor(e){super(),this.prepareAffiliationVerification=async e=>this._basePost({path:`/organizations/${this.organizationId}/domains/${this.id}/prepare_affiliation_verification`,method:"POST",body:e}),this.attemptAffiliationVerification=async e=>this._basePost({path:`/organizations/${this.organizationId}/domains/${this.id}/attempt_affiliation_verification`,method:"POST",body:e}),this.updateEnrollmentMode=e=>this._basePost({path:`/organizations/${this.organizationId}/domains/${this.id}/update_enrollment_mode`,body:e}),this.delete=()=>this._baseDelete({path:`/organizations/${this.organizationId}/domains/${this.id}`}),this.fromJSON(e)}static async create(e,{name:t}){var n;const r=null===(n=await o._fetch({path:`/organizations/${e}/domains`,method:"POST",body:{name:t}}))||void 0===n?void 0:n.response;return new E(r)}fromJSON(e){return e&&(this.id=e.id,this.name=e.name,this.organizationId=e.organization_id,this.enrollmentMode=e.enrollment_mode,this.affiliationEmailAddress=e.affiliation_email_address,this.totalPendingSuggestions=e.total_pending_suggestions,this.totalPendingInvitations=e.total_pending_invitations,e.verification?this.verification={status:e.verification.status,strategy:e.verification.strategy,attempts:e.verification.attempts,expiresAt:c(e.verification.expires_at)}:this.verification=null),this}}class I extends o{constructor(e){super(),this.accept=async()=>await this._basePost({path:`/organizations/${this.organizationId}/membership_requests/${this.id}/accept`}),this.reject=async()=>await this._basePost({path:`/organizations/${this.organizationId}/membership_requests/${this.id}/reject`}),this.fromJSON(e)}fromJSON(e){return e&&(this.id=e.id,this.organizationId=e.organization_id,this.status=e.status,this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at),e.public_user_data&&(this.publicUserData=new H(e.public_user_data))),this}}class M extends o{constructor(e){super(),this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.key=e.key,this.name=e.name,this.description=e.description,this.type=e.type,this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at),this):this}}class R extends o{constructor(e){super(),this.permissions=[],this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.key=e.key,this.name=e.name,this.description=e.description,this.permissions=e.permissions.map((e=>new M(e))),this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at),this):this}}class z extends o{constructor(e){super(),this.pathRoot="/organizations",this.publicMetadata={},this.membersCount=0,this.pendingInvitationsCount=0,this.update=async e=>this._basePatch({body:e}),this.getRoles=async e=>await o._fetch({path:`/organizations/${this.id}/roles`,method:"GET",search:x(e)},{forceUpdateClient:!0}).then((e=>{const{data:t,total_count:n}=null==e?void 0:e.response;return{total_count:n,data:t.map((e=>new R(e)))}})),this.getDomains=async e=>await o._fetch({path:`/organizations/${this.id}/domains`,method:"GET",search:x(e)},{forceUpdateClient:!0}).then((e=>{const{data:t,total_count:n}=null==e?void 0:e.response;return{total_count:n,data:t.map((e=>new E(e)))}})).catch((()=>({total_count:0,data:[]}))),this.getDomain=async({domainId:e})=>{var t;const n=null===(t=await o._fetch({path:`/organizations/${this.id}/domains/${e}`,method:"GET"}))||void 0===t?void 0:t.response;return new E(n)},this.getMembershipRequests=async e=>await o._fetch({path:`/organizations/${this.id}/membership_requests`,method:"GET",search:x(e)}).then((e=>{const{data:t,total_count:n}=null==e?void 0:e.response;return{total_count:n,data:t.map((e=>new I(e)))}})).catch((()=>({total_count:0,data:[]}))),this.createDomain=async e=>E.create(this.id,{name:e}),this.getMemberships=async e=>{const t=void 0===e||!(null==e?void 0:e.paginated);return(null==e?void 0:e.limit)&&(0,f.io)("limit","Use `pageSize` instead in Organization.getMemberships.","organization:getMemberships:limit"),(null==e?void 0:e.offset)&&(0,f.io)("offset","Use `initialPage` instead in Organization.limit.","organization:getMemberships:offset"),await o._fetch({path:`/organizations/${this.id}/memberships`,method:"GET",search:t?e:x(e)},{forceUpdateClient:!0}).then((e=>{if(t)return(null==e?void 0:e.response).map((e=>new N(e)));const{data:n,total_count:r}=null==e?void 0:e.response;return{total_count:r,data:n.map((e=>new N(e)))}})).catch((()=>t?[]:{total_count:0,data:[]}))},this.getPendingInvitations=async e=>((0,f.io)("getPendingInvitations","Use the `getInvitations` method instead."),await o._fetch({path:`/organizations/${this.id}/invitations/pending`,method:"GET",search:e}).then((e=>(null==e?void 0:e.response).map((e=>new T(e))))).catch((()=>[]))),this.getInvitations=async e=>await o._fetch({path:`/organizations/${this.id}/invitations`,method:"GET",search:x(e)},{forceUpdateClient:!0}).then((e=>{const{data:t,total_count:n}=null==e?void 0:e.response;return{total_count:n,data:t.map((e=>new T(e)))}})).catch((()=>({total_count:0,data:[]}))),this.addMember=async({userId:e,role:t})=>{const n=await o._fetch({method:"POST",path:`/organizations/${this.id}/memberships`,body:{userId:e,role:t}}).then((e=>new N(null==e?void 0:e.response)));return N.clerk.__unstable__membershipUpdate(n),n},this.inviteMember=async e=>T.create(this.id,e),this.inviteMembers=async e=>T.createBulk(this.id,e),this.updateMember=async({userId:e,role:t})=>{const n=await o._fetch({method:"PATCH",path:`/organizations/${this.id}/memberships/${e}`,body:{role:t}}).then((e=>new N(null==e?void 0:e.response)));return N.clerk.__unstable__membershipUpdate(n),n},this.removeMember=async e=>{const t=await o._fetch({method:"DELETE",path:`/organizations/${this.id}/memberships/${e}`}).then((e=>new N(null==e?void 0:e.response)));return N.clerk.__unstable__membershipUpdate(t),t},this.destroy=async()=>this._baseDelete(),this.setLogo=async({file:e})=>{if(null===e)return await o._fetch({path:`/organizations/${this.id}/logo`,method:"DELETE"}).then((e=>new z(null==e?void 0:e.response)));let t,n;return"string"==typeof e?(t=e,n=new Headers({"Content-Type":"application/octet-stream"})):(t=new FormData,t.append("file",e)),await o._fetch({path:`/organizations/${this.id}/logo`,method:"PUT",body:t,headers:n}).then((e=>new z(null==e?void 0:e.response)))},this.fromJSON(e)}static async create(e){var t;let n,r;"string"==typeof e?(n=e,(0,f.io)("create","Calling `create` with a string is deprecated. Use an object of type CreateOrganizationParams instead.","organization:create")):(n=e.name,r=e.slug);const i=null===(t=await o._fetch({path:"/organizations",method:"POST",body:{name:n,slug:r}}))||void 0===t?void 0:t.response;return new z(i)}static async get(e){var t;const n=null===(t=await o._fetch({path:`/organizations/${e}`,method:"GET"}))||void 0===t?void 0:t.response;return new z(n)}fromJSON(e){return e?(this.id=e.id,this.name=e.name,this.slug=e.slug,this.logoUrl=e.logo_url,this.imageUrl=e.image_url,this.hasImage=e.has_image,this.publicMetadata=e.public_metadata,this.membersCount=e.members_count,this.pendingInvitationsCount=e.pending_invitations_count,this.maxAllowedMemberships=e.max_allowed_memberships,this.adminDeleteEnabled=e.admin_delete_enabled,this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at),this):this}async reload(e){var t;const{rotatingTokenNonce:n}=e||{},r=null===(t=await o._fetch({path:`/organizations/${this.id}`,method:"GET",rotatingTokenNonce:n},{forceUpdateClient:!0}))||void 0===t?void 0:t.response;return this.fromJSON(r)}}(0,f.Lx)(z,"logoUrl","Use `imageUrl` instead.");class T extends o{static async create(e,{emailAddress:t,role:n}){var r;const i=null===(r=await o._fetch({path:`/organizations/${e}/invitations`,method:"POST",body:{email_address:t,role:n}}))||void 0===r?void 0:r.response,a=new T(i);return this.clerk.__unstable__invitationUpdate(a),a}static async createBulk(e,t){var n;const{emailAddresses:r,role:i}=t;return(null===(n=await o._fetch({path:`/organizations/${e}/invitations/bulk`,method:"POST",body:{email_address:r,role:i}}))||void 0===n?void 0:n.response).map((e=>new T(e)))}constructor(e){super(),this.publicMetadata={},this.revoke=async()=>{const e=await this._basePost({path:`/organizations/${this.organizationId}/invitations/${this.id}/revoke`});return T.clerk.__unstable__invitationUpdate(e),e},this.fromJSON(e)}fromJSON(e){return e&&(this.id=e.id,this.emailAddress=e.email_address,this.organizationId=e.organization_id,this.publicMetadata=e.public_metadata,this.role=e.role,this.status=e.status,this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at)),this}}class N extends o{constructor(e){super(),this.publicMetadata={},this.permissions=[],this.destroy=async()=>{const e=await this._baseDelete({path:`/organizations/${this.organization.id}/memberships/${this.publicUserData.userId}`});return b.clerk.__unstable__membershipUpdate(e),e},this.update=async({role:e})=>{const t=await this._basePatch({path:`/organizations/${this.organization.id}/memberships/${this.publicUserData.userId}`,body:{role:e}});return b.clerk.__unstable__membershipUpdate(t),t},this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.organization=new z(e.organization),this.publicMetadata=e.public_metadata,e.public_user_data&&(this.publicUserData=new H(e.public_user_data)),this.permissions=Array.isArray(e.permissions)?[...e.permissions]:[],this.role=e.role,this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at),this):this}async reload(e){const{rotatingTokenNonce:t}=e||{},n=await o._fetch({method:"GET",path:"/me/organization_memberships",rotatingTokenNonce:t},{forceUpdateClient:!0}),r=(null==n?void 0:n.response).find((e=>e.id===this.id));return this.fromJSON(r)}}b=N,N.retrieve=async e=>{const t=void 0===e||!(null==e?void 0:e.paginated);return(null==e?void 0:e.limit)&&(0,f.io)("limit","Use `pageSize` instead in OrganizationMembership.retrieve.","organization-membership:limit"),(null==e?void 0:e.offset)&&(0,f.io)("offset","Use `initialPage` instead in OrganizationMembership.retrieve.","organization-membership:offset"),await o._fetch({path:"/me/organization_memberships",method:"GET",search:t?e:x(e)}).then((e=>{if(t)return(null==e?void 0:e.response).map((e=>new b(e)));const{data:n,total_count:r}=null==e?void 0:e.response;return{total_count:r,data:n.map((e=>new b(e)))}})).catch((()=>t?[]:{total_count:0,data:[]}))};class L extends o{constructor(e){super(),this.accept=async()=>await this._basePost({path:`/me/organization_suggestions/${this.id}/accept`}),this.fromJSON(e)}static async retrieve(e){return await o._fetch({path:"/me/organization_suggestions",method:"GET",search:x(e)}).then((e=>{const{data:t,total_count:n}=null==e?void 0:e.response;return{total_count:n,data:t.map((e=>new L(e)))}})).catch((()=>({total_count:0,data:[]})))}fromJSON(e){return e&&(this.id=e.id,this.status=e.status,this.publicOrganizationData={hasImage:e.public_organization_data.has_image,imageUrl:e.public_organization_data.image_url,name:e.public_organization_data.name,id:e.public_organization_data.id,slug:e.public_organization_data.slug},this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at)),this}}class j extends o{constructor(e,t){super(),this.provider="saml_custom",this.providerUserId=null,this.active=!1,this.emailAddress="",this.firstName="",this.lastName="",this.verification=null,this.pathRoot=t,this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.provider=e.provider,this.providerUserId=e.provider_user_id,this.active=e.active,this.emailAddress=e.email_address,this.firstName=e.first_name,this.lastName=e.last_name,e.verification&&(this.verification=new S(e.verification)),this):this}}var $,F,D,W,V,B,J,q=n(2692),G=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class K extends o{static isSessionResource(e){return!!e&&e instanceof K}constructor(e){super(),$.add(this),this.pathRoot="/client/sessions",this.end=()=>(u.clear(),this._basePost({action:"end"})),this.remove=()=>(u.clear(),this._basePost({action:"remove"})),this.touch=()=>this._basePost({action:"touch",body:{active_organization_id:this.lastActiveOrganizationId}}),this.clearCache=()=>u.clear(),this.getToken=async e=>(0,_.Nv)((()=>this._getToken(e)),{shouldRetry:(e,t)=>!(0,w.nc)(e)&&t<4}),this.checkAuthorization=e=>{if(!this.lastActiveOrganizationId||!this.user)return!1;const t=(this.user.organizationMemberships||[]).find((e=>e.organization.id===this.lastActiveOrganizationId));if(!t)return!1;const n=t.permissions,r=t.role;return e.permission?n.includes(e.permission):!!e.role&&r===e.role},F.set(this,(e=>{e&&(u.set({tokenId:G(this,$,"m",D).call(this),tokenResolver:Promise.resolve(e)}),q.B.dispatch(q.A.TokenUpdate,{token:e}))})),W.set(this,(e=>!!e&&e.startsWith("integration_"))),V.set(this,(e=>(e||"").replace("integration_",""))),B.set(this,(async e=>{const{template:t,leewayInSeconds:n}=e,r=u.get({tokenId:this.user.id,audience:t},n);if(r)return r.tokenResolver.then((e=>G(this,$,"m",J).call(this,e)));const i=ie.create(this.user.pathRoot+"/tokens",{service:G(this,V,"f").call(this,t)});return u.set({tokenId:this.user.id,audience:t,tokenResolver:i}),i.then((e=>G(this,$,"m",J).call(this,e)))})),this.fromJSON(e),G(this,F,"f").call(this,this.lastActiveToken)}fromJSON(e){return e?(this.id=e.id,this.status=e.status,this.expireAt=c(e.expire_at),this.abandonAt=c(e.abandon_at),this.lastActiveAt=c(e.last_active_at),this.lastActiveOrganizationId=e.last_active_organization_id,this.actor=e.actor,this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at),this.user=new ce(e.user),e.public_user_data&&(this.publicUserData=new H(e.public_user_data)),this.lastActiveToken=e.last_active_token?new ie(e.last_active_token):null,this):this}async _getToken(e){if(!this.user)return null;const{leewayInSeconds:t,template:n,skipCache:r=!1}=e||{};if(!n&&Number(t)>=60)throw new Error("Leeway can not exceed the token lifespan (60 seconds)");if(G(this,W,"f").call(this,n))return G(this,B,"f").call(this,{template:n,leewayInSeconds:t,skipCache:r});const i=G(this,$,"m",D).call(this,n),o=r?void 0:u.get({tokenId:i},t);if(o){const e=await o.tokenResolver;return n||q.B.dispatch(q.A.TokenUpdate,{token:e}),G(this,$,"m",J).call(this,e)}const a=n?`${this.path()}/tokens/${n}`:`${this.path()}/tokens`,s=ie.create(a);return u.set({tokenId:i,tokenResolver:s}),s.then((e=>(n||q.B.dispatch(q.A.TokenUpdate,{token:e}),G(this,$,"m",J).call(this,e))))}}F=new WeakMap,W=new WeakMap,V=new WeakMap,B=new WeakMap,$=new WeakSet,D=function(e){return`${e?`${this.id}-${e}`:this.id}-${this.updatedAt.getTime()}`},J=function(e){return e.getRawString()||null};class H{constructor(e){this.fromJSON(e)}fromJSON(e){return e&&(this.firstName=e.first_name,this.lastName=e.last_name,this.profileImageUrl=e.profile_image_url,this.imageUrl=e.image_url,this.hasImage=e.has_image,this.identifier=e.identifier,this.userId=e.user_id),this}}(0,f.Lx)(H,"profileImageUrl","Use `imageUrl` instead.");class Y extends o{constructor(e,t){super(),this.pathRoot="",this.pathRoot=t,this.fromJSON(e)}static retrieve(){var e;const t=null===(e=o.clerk.session)||void 0===e?void 0:e.id;return this.clerk.getFapiClient().request({method:"GET",path:"/me/sessions/active",sessionId:t}).then((e=>e.payload.map((e=>new Y(e,"/me/sessions"))))).catch((()=>[]))}revoke(){return this._basePost({action:"revoke",body:{}})}fromJSON(e){var t;return e?(this.id=e.id,this.status=e.status,this.expireAt=c(e.expire_at),this.abandonAt=c(e.abandon_at),this.lastActiveAt=c(e.last_active_at),this.latestActivity=(e=>({id:e.id,deviceType:e.device_type,browserName:e.browser_name,browserVersion:e.browser_version,country:e.country,city:e.city,isMobile:e.is_mobile,ipAddress:e.ip_address}))(null!==(t=e.latest_activity)&&void 0!==t?t:{}),this.actor=e.actor,this):this}}var Z=n(5098),Q=n(9961);class X extends o{constructor(e=null){super(),this.pathRoot="/client/sign_ins",this.status=null,this.supportedIdentifiers=[],this.supportedFirstFactors=[],this.supportedSecondFactors=[],this.firstFactorVerification=new S(null),this.secondFactorVerification=new S(null),this.identifier=null,this.createdSessionId=null,this.userData=new ee(null),this.create=e=>this._basePost({path:this.pathRoot,body:e}),this.resetPassword=e=>this._basePost({body:e,action:"reset_password"}),this.prepareFirstFactor=e=>{let t;switch(e.strategy){case"email_link":t={emailAddressId:e.emailAddressId,redirectUrl:e.redirectUrl};break;case"email_code":case"reset_password_email_code":t={emailAddressId:e.emailAddressId};break;case"phone_code":t={phoneNumberId:e.phoneNumberId,default:e.default};break;case"web3_metamask_signature":t={web3WalletId:e.web3WalletId};break;case"reset_password_phone_code":t={phoneNumberId:e.phoneNumberId};break;case"saml":t={redirectUrl:e.redirectUrl,actionCompleteRedirectUrl:e.actionCompleteRedirectUrl};break;default:(0,i.Gm)("SignIn.prepareFirstFactor",e.strategy)}return this._basePost({body:{...t,strategy:e.strategy},action:"prepare_first_factor"})},this.attemptFirstFactor=e=>this._basePost({body:e,action:"attempt_first_factor"}),this.createMagicLinkFlow=()=>{(0,_.io)("createMagicLinkFlow","Use `createEmailLinkFlow` instead.");const{run:e,stop:t}=(0,_.vu)();return{startMagicLinkFlow:async({emailAddressId:n,redirectUrl:r})=>(this.id||(0,i.HZ)("SignIn"),await this.prepareFirstFactor({strategy:"email_link",emailAddressId:n,redirectUrl:r}),new Promise(((n,r)=>{e((()=>this.reload().then((e=>{const r=e.firstFactorVerification.status;"verified"!==r&&"expired"!==r||(t(),n(e))})).catch((e=>{t(),r(e)}))))}))),cancelMagicLinkFlow:t}},this.createEmailLinkFlow=()=>{const{run:e,stop:t}=(0,_.vu)();return{startEmailLinkFlow:async({emailAddressId:n,redirectUrl:r})=>(this.id||(0,i.HZ)("SignIn"),await this.prepareFirstFactor({strategy:"email_link",emailAddressId:n,redirectUrl:r}),new Promise(((n,r)=>{e((()=>this.reload().then((e=>{const r=e.firstFactorVerification.status;"verified"!==r&&"expired"!==r||(t(),n(e))})).catch((e=>{t(),r(e)}))))}))),cancelEmailLinkFlow:t}},this.prepareSecondFactor=e=>this._basePost({body:e,action:"prepare_second_factor"}),this.attemptSecondFactor=e=>this._basePost({body:e,action:"attempt_second_factor"}),this.authenticateWithRedirect=async e=>{const{strategy:t,redirectUrl:n,redirectUrlComplete:r,identifier:o}=e||{},{firstFactorVerification:a}="saml"===t&&this.id?await this.prepareFirstFactor({strategy:t,redirectUrl:X.clerk.buildUrlWithAuth(n),actionCompleteRedirectUrl:r}):await this.create({strategy:t,identifier:o,redirectUrl:X.clerk.buildUrlWithAuth(n),actionCompleteRedirectUrl:r}),{status:s,externalVerificationRedirectURL:c}=a;"unverified"===s&&c?(0,Z.y7)(c):(0,i.wv)(s,X.fapiClient.buildEmailAddress("support"))},this.authenticateWithWeb3=async e=>{const{identifier:t,generateSignature:n}=e||{};"function"!=typeof n&&(0,i.pV)("generateSignature"),await this.create({identifier:t});const r=this.supportedFirstFactors.find((e=>"web3_metamask_signature"===e.strategy));r||(0,i.Rj)("SignIn"),await this.prepareFirstFactor(r);const{nonce:o}=this.firstFactorVerification,a=await n({identifier:this.identifier,nonce:o});return this.attemptFirstFactor({signature:a,strategy:"web3_metamask_signature"})},this.authenticateWithMetamask=async()=>{const e=await(0,Z.$1)();return this.authenticateWithWeb3({identifier:e,generateSignature:Z.l})},this.validatePassword=(e,t)=>{var n,r;if(null===(n=X.clerk.__unstable__environment)||void 0===n?void 0:n.userSettings.passwordSettings)return(0,Q.G)({...null===(r=X.clerk.__unstable__environment)||void 0===r?void 0:r.userSettings.passwordSettings,validatePassword:!0})(e,t)},this.fromJSON(e)}fromJSON(e){return e&&(this.id=e.id,this.status=e.status,this.supportedIdentifiers=e.supported_identifiers,this.identifier=e.identifier,this.supportedFirstFactors=(0,_.Sd)(e.supported_first_factors),this.supportedSecondFactors=(0,_.Sd)(e.supported_second_factors),this.firstFactorVerification=new S(e.first_factor_verification),this.secondFactorVerification=new S(e.second_factor_verification),this.createdSessionId=e.created_session_id,this.userData=new ee(e.user_data)),this}}class ee{constructor(e){this.fromJSON(e)}fromJSON(e){return e&&(this.firstName=e.first_name,this.lastName=e.last_name,this.profileImageUrl=e.profile_image_url,this.imageUrl=e.image_url,this.hasImage=e.has_image),this}}(0,f.Lx)(ee,"profileImageUrl","Use `imageUrl` instead.");var te=n(9210);function ne(e){const{unsafeMetadata:t}={...e},n=t?"object"==typeof t?JSON.stringify(t):t:"";return{...e,...t?{unsafeMetadata:n}:{}}}class re extends o{constructor(e=null){super(),this.pathRoot="/client/sign_ups",this.status=null,this.requiredFields=[],this.optionalFields=[],this.missingFields=[],this.unverifiedFields=[],this.verifications=new k(null),this.username=null,this.firstName=null,this.lastName=null,this.emailAddress=null,this.phoneNumber=null,this.web3wallet=null,this.hasPassword=!1,this.unsafeMetadata={},this.createdSessionId=null,this.createdUserId=null,this.abandonAt=null,this.create=async e=>{var t;const n=e,{captchaSiteKey:r,canUseCaptcha:i,captchaURL:o,captchaWidgetType:a,captchaProvider:s,captchaPublicKeyInvisible:c}=(0,te.NQ)(re.clerk);if(!this.shouldBypassCaptchaForAttempt(e)&&i&&r&&o&&c)try{const{captchaToken:e,captchaWidgetTypeUsed:t}=await(0,te.yi)({siteKey:r,widgetType:a,invisibleSiteKey:c,scriptUrl:o,captchaProvider:s});n.captchaToken=e,n.captchaWidgetType=t}catch(l){if(!l.captchaError)throw new w.cR(l.message,{code:"captcha_unavailable"});n.captchaError=l.captchaError}return e.transfer&&this.shouldBypassCaptchaForAttempt(e)&&(n.strategy=null===(t=re.clerk.client)||void 0===t?void 0:t.signIn.firstFactorVerification.strategy),this._basePost({path:this.pathRoot,body:ne(n)})},this.prepareVerification=e=>this._basePost({body:e,action:"prepare_verification"}),this.attemptVerification=e=>this._basePost({body:e,action:"attempt_verification"}),this.prepareEmailAddressVerification=e=>this.prepareVerification(e||{strategy:"email_code"}),this.attemptEmailAddressVerification=e=>this.attemptVerification({...e,strategy:"email_code"}),this.createMagicLinkFlow=()=>{(0,_.io)("createMagicLinkFlow","Use `createEmailLinkFlow` instead.");const{run:e,stop:t}=(0,_.vu)();return{startMagicLinkFlow:async({redirectUrl:n})=>(this.id||(0,i.HZ)("SignUp"),await this.prepareEmailAddressVerification({strategy:"email_link",redirectUrl:n}),new Promise(((n,r)=>{e((()=>this.reload().then((e=>{const r=e.verifications.emailAddress.status;"verified"!==r&&"expired"!==r||(t(),n(e))})).catch((e=>{t(),r(e)}))))}))),cancelMagicLinkFlow:t}},this.createEmailLinkFlow=()=>{const{run:e,stop:t}=(0,_.vu)();return{startEmailLinkFlow:async({redirectUrl:n})=>(this.id||(0,i.HZ)("SignUp"),await this.prepareEmailAddressVerification({strategy:"email_link",redirectUrl:n}),new Promise(((n,r)=>{e((()=>this.reload().then((e=>{const r=e.verifications.emailAddress.status;"verified"!==r&&"expired"!==r||(t(),n(e))})).catch((e=>{t(),r(e)}))))}))),cancelEmailLinkFlow:t}},this.preparePhoneNumberVerification=e=>this.prepareVerification(e||{strategy:"phone_code"}),this.attemptPhoneNumberVerification=e=>this.attemptVerification({...e,strategy:"phone_code"}),this.prepareWeb3WalletVerification=()=>this.prepareVerification({strategy:"web3_metamask_signature"}),this.attemptWeb3WalletVerification=async e=>{const{signature:t,generateSignature:n}=e||{};if(n&&(0,_.io)("generateSignature","Use signature field instead."),t)return this.attemptVerification({signature:t,strategy:"web3_metamask_signature"});"function"!=typeof n&&(0,i.pV)("generateSignature");const{nonce:r}=this.verifications.web3Wallet;r||(0,i.Rj)("SignUp");const o=await n({identifier:this.web3wallet,nonce:r});return this.attemptVerification({signature:o,strategy:"web3_metamask_signature"})},this.authenticateWithWeb3=async e=>{const{generateSignature:t,identifier:n,unsafeMetadata:r}=e||{},o=n||this.web3wallet;await this.create({web3Wallet:o,unsafeMetadata:r}),await this.prepareWeb3WalletVerification();const{nonce:a}=this.verifications.web3Wallet;a||(0,i.Rj)("SignUp");const s=await t({identifier:n,nonce:a});return this.attemptWeb3WalletVerification({signature:s})},this.authenticateWithMetamask=async e=>{const t=await(0,Z.$1)();return this.authenticateWithWeb3({identifier:t,generateSignature:Z.l,unsafeMetadata:null==e?void 0:e.unsafeMetadata})},this.authenticateWithRedirect=async({redirectUrl:e,redirectUrlComplete:t,strategy:n,continueSignUp:r=!1,unsafeMetadata:o,emailAddress:a})=>{const s=()=>{const i={strategy:n,redirectUrl:re.clerk.buildUrlWithAuth(e),actionCompleteRedirectUrl:t,unsafeMetadata:o,emailAddress:a};return r&&this.id?this.update(i):this.create(i)},{verifications:c}=await s().catch((async e=>{if((0,w.$R)(e)&&(0,w.rZ)(e))return await re.clerk.__unstable__environment.reload(),s();throw e})),{externalAccount:l}=c,{status:u,externalVerificationRedirectURL:d}=l;"unverified"===u&&d?(0,Z.y7)(d):(0,i.wv)(u,re.fapiClient.buildEmailAddress("support"))},this.update=e=>this._basePatch({body:ne(e)}),this.validatePassword=(e,t)=>{var n,r;if(null===(n=re.clerk.__unstable__environment)||void 0===n?void 0:n.userSettings.passwordSettings)return(0,Q.G)({...null===(r=re.clerk.__unstable__environment)||void 0===r?void 0:r.userSettings.passwordSettings,validatePassword:!0})(e,t)},this.fromJSON(e)}fromJSON(e){return e&&(this.id=e.id,this.status=e.status,this.requiredFields=e.required_fields,this.optionalFields=e.optional_fields,this.missingFields=e.missing_fields,this.unverifiedFields=e.unverified_fields,this.verifications=new k(e.verifications),this.username=e.username,this.firstName=e.first_name,this.lastName=e.last_name,this.emailAddress=e.email_address,this.phoneNumber=e.phone_number,this.hasPassword=e.has_password,this.unsafeMetadata=e.unsafe_metadata,this.createdSessionId=e.created_session_id,this.createdUserId=e.created_user_id,this.abandonAt=e.abandon_at,this.web3wallet=e.web3_wallet),this}shouldBypassCaptchaForAttempt(e){if(!e.strategy)return!1;const t=re.clerk.__unstable__environment.displayConfig.captchaOauthBypass;return!!t.some((t=>t===e.strategy))||!(!e.transfer||!t.some((e=>e===re.clerk.client.signIn.firstFactorVerification.strategy)))}}class ie extends o{static async create(e,t={}){const n=await o._fetch({path:e,method:"POST",body:t});return new ie(n,e)}constructor(e,t){super(),this.pathRoot="tokens",this.getRawString=()=>{var e;return(null===(e=this.jwt)||void 0===e?void 0:e.claims.__raw)||""},t&&(this.pathRoot=t),(null==e?void 0:e.jwt)&&(this.jwt=(0,Z.D4)(e.jwt))}fromJSON(e){return e?(this.jwt=(0,Z.D4)(e.jwt),this):this}}class oe extends o{constructor(e){super(),this.pathRoot="/me",this.id="",this.verified=!1,this.updatedAt=null,this.createdAt=null,this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.secret=e.secret,this.uri=e.uri,this.verified=e.verified,this.backupCodes=e.backup_codes,this.updatedAt=c(e.updated_at),this.createdAt=c(e.created_at),this):this}}var ae=n(8740);class se extends o{constructor(e){super(),this.pathRoot="/me",this.codes=[],this.updatedAt=null,this.createdAt=null,this.fromJSON(e)}fromJSON(e){return e?(this.id=e.id,this.codes=e.codes,this.updatedAt=c(e.updated_at),this.createdAt=c(e.created_at),this):this}}class ce extends o{static isUserResource(e){return!!e&&e instanceof ce}constructor(e){super(),this.pathRoot="/me",this.id="",this.externalId=null,this.username=null,this.emailAddresses=[],this.phoneNumbers=[],this.web3Wallets=[],this.externalAccounts=[],this.samlAccounts=[],this.organizationMemberships=[],this.passwordEnabled=!1,this.firstName=null,this.lastName=null,this.fullName=null,this.primaryEmailAddressId=null,this.primaryEmailAddress=null,this.primaryPhoneNumberId=null,this.primaryPhoneNumber=null,this.primaryWeb3WalletId=null,this.primaryWeb3Wallet=null,this.profileImageUrl="",this.imageUrl="",this.hasImage=!1,this.twoFactorEnabled=!1,this.totpEnabled=!1,this.backupCodeEnabled=!1,this.publicMetadata={},this.unsafeMetadata={},this.createOrganizationEnabled=!1,this.deleteSelfEnabled=!1,this.lastSignInAt=null,this.updatedAt=null,this.createdAt=null,this.cachedSessionsWithActivities=null,this.isPrimaryIdentification=e=>{switch(e.constructor){case g:return this.primaryEmailAddressId===e.id;case C:return this.primaryPhoneNumberId===e.id;case ue:return this.primaryWeb3WalletId===e.id;default:return!1}},this.createEmailAddress=e=>{const{email:t}=e||{};return new g({email_address:t},this.path()+"/email_addresses/").create()},this.createPhoneNumber=e=>{const{phoneNumber:t}=e||{};return new C({phone_number:t},this.path()+"/phone_numbers/").create()},this.createWeb3Wallet=e=>{const{web3Wallet:t}=e||{};return new ue({web3_wallet:t},this.path()+"/web3_wallets/").create()},this.createExternalAccount=async e=>{var t;const{strategy:n,redirectUrl:r,additionalScopes:i,redirect_url:a}=e||{};a&&(0,f.io)("redirect_url","Use `redirectUrl` instead.");const s=null===(t=await o._fetch({path:"/me/external_accounts",method:"POST",body:{strategy:n,redirect_url:r||a,additional_scope:i}}))||void 0===t?void 0:t.response;return new O(s,this.path()+"/external_accounts")},this.createTOTP=async()=>{var e;const t=null===(e=await o._fetch({path:"/me/totp",method:"POST"}))||void 0===e?void 0:e.response;return new oe(t)},this.verifyTOTP=async({code:e})=>{var t;const n=null===(t=await o._fetch({path:"/me/totp/attempt_verification",method:"POST",body:{code:e}}))||void 0===t?void 0:t.response;return new oe(n)},this.disableTOTP=async()=>{var e;const t=null===(e=await o._fetch({path:"/me/totp",method:"DELETE"}))||void 0===e?void 0:e.response;return new h(t)},this.createBackupCode=async()=>{var e;const t=null===(e=await o._fetch({path:this.path()+"/backup_codes/",method:"POST"}))||void 0===e?void 0:e.response;return new se(t)},this.update=e=>(e.password&&(0,f.io)("password","This will be removed in the next major version. Please use `updatePassword(params)` instead."),this._basePatch({body:ne(e)})),this.updatePassword=e=>this._basePost({body:e,path:`${this.path()}/change_password`}),this.removePassword=e=>this._basePost({body:e,path:`${this.path()}/remove_password`}),this.delete=()=>this._baseDelete({path:"/me"}),this.getSessions=async()=>{if(this.cachedSessionsWithActivities)return this.cachedSessionsWithActivities;const e=await Y.retrieve();return this.cachedSessionsWithActivities=e,e},this.setProfileImage=e=>{const{file:t}=e||{};return null===t?U.delete(`${this.path()}/profile_image`):U.create(`${this.path()}/profile_image`,{file:t})},this.getOrganizationInvitations=e=>le.retrieve(e),this.getOrganizationSuggestions=e=>L.retrieve(e),this.getOrganizationMemberships=e=>N.retrieve(e),this.leaveOrganization=async e=>{var t;const n=null===(t=await o._fetch({path:`${this.path()}/organization_memberships/${e}`,method:"DELETE"}))||void 0===t?void 0:t.response;return new h(n)},this.fromJSON(e)}path(){return this.pathRoot}get verifiedExternalAccounts(){return this.externalAccounts.filter((e=>{var t;return"verified"==(null===(t=e.verification)||void 0===t?void 0:t.status)}))}get unverifiedExternalAccounts(){return this.externalAccounts.filter((e=>{var t;return"verified"!=(null===(t=e.verification)||void 0===t?void 0:t.status)}))}get hasVerifiedEmailAddress(){return this.emailAddresses.filter((e=>"verified"===e.verification.status)).length>0}get hasVerifiedPhoneNumber(){return this.phoneNumbers.filter((e=>"verified"===e.verification.status)).length>0}fromJSON(e){return e?(this.id=e.id,this.externalId=e.external_id,this.firstName=e.first_name,this.lastName=e.last_name,(this.firstName||this.lastName)&&(this.fullName=(0,ae.dS)({firstName:this.firstName,lastName:this.lastName})),this.profileImageUrl=e.profile_image_url,this.imageUrl=e.image_url,this.hasImage=e.has_image,this.username=e.username,this.passwordEnabled=e.password_enabled,this.emailAddresses=(e.email_addresses||[]).map((e=>new g(e,this.path()+"/email_addresses"))),this.primaryEmailAddressId=e.primary_email_address_id,this.primaryEmailAddress=this.emailAddresses.find((({id:e})=>e===this.primaryEmailAddressId))||null,this.phoneNumbers=(e.phone_numbers||[]).map((e=>new C(e,this.path()+"/phone_numbers"))),this.primaryPhoneNumberId=e.primary_phone_number_id,this.primaryPhoneNumber=this.phoneNumbers.find((({id:e})=>e===this.primaryPhoneNumberId))||null,this.web3Wallets=(e.web3_wallets||[]).map((e=>new ue(e,this.path()+"/web3_wallets"))),this.primaryWeb3WalletId=e.primary_web3_wallet_id,this.primaryWeb3Wallet=this.web3Wallets.find((({id:e})=>e===this.primaryWeb3WalletId))||null,this.externalAccounts=(e.external_accounts||[]).map((e=>new O(e,this.path()+"/external_accounts"))),this.organizationMemberships=(e.organization_memberships||[]).map((e=>new N(e))),this.samlAccounts=(e.saml_accounts||[]).map((e=>new j(e,this.path()+"/saml_accounts"))),this.publicMetadata=e.public_metadata,this.unsafeMetadata=e.unsafe_metadata,this.totpEnabled=e.totp_enabled,this.backupCodeEnabled=e.backup_code_enabled,this.twoFactorEnabled=e.two_factor_enabled,this.createOrganizationEnabled=e.create_organization_enabled,this.deleteSelfEnabled=e.delete_self_enabled,e.last_sign_in_at&&(this.lastSignInAt=c(e.last_sign_in_at)),this.updatedAt=c(e.updated_at),this.createdAt=c(e.created_at),this):this}}(0,f.Lx)(ce,"profileImageUrl","Use `imageUrl` instead.");class le extends o{static async retrieve(e){return await o._fetch({path:"/me/organization_invitations",method:"GET",search:x(e)}).then((e=>{const{data:t,total_count:n}=null==e?void 0:e.response;return{total_count:n,data:t.map((e=>new le(e)))}})).catch((()=>({total_count:0,data:[]})))}constructor(e){super(),this.publicMetadata={},this.accept=async()=>await this._basePost({path:`/me/organization_invitations/${this.id}/accept`}),this.fromJSON(e)}fromJSON(e){return e&&(this.id=e.id,this.emailAddress=e.email_address,this.publicOrganizationData={hasImage:e.public_organization_data.has_image,imageUrl:e.public_organization_data.image_url,name:e.public_organization_data.name,id:e.public_organization_data.id,slug:e.public_organization_data.slug},this.publicMetadata=e.public_metadata,this.role=e.role,this.status=e.status,this.createdAt=c(e.created_at),this.updatedAt=c(e.updated_at)),this}}class ue extends o{constructor(e,t){super(),this.web3Wallet="",this.prepareVerification=e=>this._basePost({action:"prepare_verification",body:{...e}}),this.attemptVerification=e=>{const{signature:t,generateSignature:n}=e||{};return n&&(0,f.io)("generateSignature","Use signature field instead."),t?this._basePost({action:"attempt_verification",body:{signature:t}}):("function"!=typeof n&&(0,i.pV)("generateSignature"),(async()=>{"function"!=typeof n&&(0,i.pV)("generateSignature");const{nonce:e}=this.verification;e||(0,i.Rj)("SignUp");const t=await n({identifier:this.web3Wallet,nonce:e});return this._basePost({action:"attempt_verification",body:{signature:t}})})())},this.pathRoot=t,this.fromJSON(e)}create(){return this._basePost({body:{web3_wallet:this.web3Wallet}})}destroy(){return this._baseDelete()}toString(){return this.web3Wallet}fromJSON(e){return e?(this.id=e.id,this.web3Wallet=e.web3_wallet,this.verification=new S(e.verification),this):this}}},5864:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});const r={cannotRenderComponentWhenSessionExists:"The <SignUp/> and <SignIn/> components cannot render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, Clerk is redirecting to the Home URL instead.",cannotRenderComponentWhenUserDoesNotExist:"<UserProfile/> cannot render unless a user is signed in. Since no user is signed in, Clerk is redirecting to the Home URL instead. (This notice only appears in development.)",cannotRenderComponentWhenOrgDoesNotExist:"<OrganizationProfile/> cannot render unless an organization is active. Since no organization is currently active, Clerk is redirecting to the Home URL instead.",cannotOpenOrgProfile:"The OrganizationProfile cannot render unless an organization is active. Since no organization is currently active, this is no-op.",cannotOpenUserProfile:"The UserProfile modal cannot render unless a user is signed in. Since no user is signed in, this is no-op.",cannotOpenSignUpOrSignUp:"The SignIn or SignUp modals do not render when a user is already signed in, unless the application allows multiple sessions. Since a user is signed in and this application only allows a single session, this is no-op."};for(const i of Object.keys(r))r[i]=`🔒 Clerk:\n${r[i].trim()}\n(This notice only appears in development)`},2797:function(e,t,n){"use strict";n.d(t,{x:function(){return a}});var r=n(4041),i=n(6480),o=n(5098);const a=()=>{const[e,t]=r.useState({startPath:"",path:"",componentName:"",socialProvider:""}),n=(0,o.FP)();r.useLayoutEffect((()=>{n&&t(n)}),[]);const a=()=>{t({startPath:"",path:"",componentName:"",socialProvider:""})};return{urlStateParam:{...e,clearUrlStateParam:a},decodedRedirectParams:n,clearUrlStateParam:a,removeQueryParam:()=>(0,o.rw)(i.CL)}}},5547:function(e,t,n){"use strict";n.d(t,{A:function(){return r}});const r=({signUp:e,verifyEmailPath:t,verifyPhonePath:n,navigate:r,handleComplete:i,redirectUrl:o="",redirectUrlComplete:a=""})=>{var s,c;if("complete"===e.status)return i&&i();if("missing_requirements"===e.status){if(e.missingFields.some((e=>"saml"===e)))return e.authenticateWithRedirect({strategy:"saml",redirectUrl:o,redirectUrlComplete:a,continueSignUp:!0});if((null===(s=e.unverifiedFields)||void 0===s?void 0:s.includes("email_address"))&&t)return r(t);if((null===(c=e.unverifiedFields)||void 0===c?void 0:c.includes("phone_number"))&&n)return r(n)}}},9210:function(e,t,n){"use strict";n.d(t,{Wl:function(){return o},yi:function(){return l},NQ:function(){return i}});var r=n(600);const i=e=>{const t=e.__unstable__environment,n=(0,r.A)(e),i=t?t.displayConfig.captchaProvider:"turnstile";return{captchaSiteKey:t?t.displayConfig.captchaPublicKey:null,captchaWidgetType:t?t.displayConfig.captchaWidgetType:null,captchaProvider:i,captchaPublicKeyInvisible:t?t.displayConfig.captchaPublicKeyInvisible:null,canUseCaptcha:t?t.userSettings.signUp.captcha_enabled&&e.isStandardBrowser&&"production"===e.instanceType:null,captchaURL:n.buildUrl({path:"hcaptcha"==i?"hcaptcha/1/api.js":"cloudflare/turnstile/v0/api.js",pathPrefix:"",search:"?render=explicit"}).toString()}},o="clerk-captcha",a="clerk-invisible-captcha";var s=n(8643);const c=async e=>{const{siteKey:t,scriptUrl:n,widgetType:r,invisibleSiteKey:i}=e;let c="",l="",u=!r||"invisible"===r,d=t,h=null;const f=()=>{const e=document.createElement("div");return e.classList.add(a),document.body.appendChild(e),e},p=await async function(e){return window.turnstile||await async function(){try{return await(0,s.k)("https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit",{defer:!0})}catch(e){throw console.warn("Clerk: Failed to load the CAPTCHA script from Cloudflare. If you see a CSP error in your browser, please add the necessary CSP rules to your app. Visit https://clerk.com/docs/security/clerk-csp for more information."),e}}().catch((()=>async function(e){try{return await(0,s.k)(e,{defer:!0})}catch(t){throw console.error("Clerk: Failed to load the CAPTCHA script from the URL: ",e),t}}(e))).catch((()=>{throw{captchaError:"captcha_script_failed_to_load"}})),window.turnstile}(n);let m=0;const g=[];try{[c,l]=await new Promise(((e,t)=>{try{if(u)h=f();else{const e=document.getElementById(o);e?(e.style.display="block",h=e):(console.error("Captcha DOM element not found. Using invisible captcha widget."),h=f(),u=!0,d=i)}const n=p.render(u?`.${a}`:`#${o}`,{sitekey:d,appearance:"interaction-only",retry:"never","refresh-expired":"auto",callback:function(t){e([t,n])},"error-callback":function(e){g.push(e),m<2&&(e=>!!["crashed","undefined_error","102","103","104","106","110600","300","600"].find((t=>e.startsWith(t))))(e.toString())?setTimeout((()=>{p.reset(n),m++}),250):t([g.join(","),n])},"unsupported-callback":function(){return t(["This browser is not supported by the CAPTCHA.",n]),!0}})}catch(n){t([n,void 0])}})),p.remove(l)}catch([y,l]){throw l&&p.remove(l),{captchaError:y}}finally{h&&(u?document.body.removeChild(h):h.style.display="none")}return{captchaToken:c,captchaWidgetTypeUsed:u?"invisible":"smart"}},l=e=>{const{captchaProvider:t,...n}=e;return"hcaptcha"===t?(async e=>{const{siteKey:t,scriptUrl:n,widgetType:r,invisibleSiteKey:i}=e;let c="",l="",u=!r||"invisible"===r,d=t,h=null;const f=()=>{const e=document.createElement("div");return e.id=a,document.body.appendChild(e),e},p=await async function(e){if(!window.hcaptcha)try{await(0,s.k)(e,{defer:!0})}catch{throw console.error("Clerk: Failed to load the CAPTCHA script from the URL: ",e),{captchaError:"captcha_script_failed_to_load"}}return window.hcaptcha}(n);let m=0;const g=[];try{[c,l]=await new Promise(((e,t)=>{try{if(u)h=f();else{const e=document.getElementById(o);e?(e.style.display="block",h=e):(console.error("Captcha DOM element not found. Using invisible captcha widget."),h=f(),u=!0,d=i)}const n=p.render(u?a:o,{sitekey:d,size:u?"invisible":"normal",callback:function(t){e([t,n])},"error-callback":function(e){g.push(e),m<2?setTimeout((()=>{p.reset(n),m++}),250):t([g.join(","),n])}});u&&p.execute(n)}catch(n){t([n,void 0])}})),p.remove(l)}catch([y,l]){throw l&&p.remove(l),{captchaError:y}}finally{h&&(u?document.body.removeChild(h):h.style.display="none")}return{captchaToken:c,captchaWidgetTypeUsed:u?"invisible":"smart"}})(n):c(n)}},4927:function(e,t,n){"use strict";n.d(t,{hI:function(){return i},rw:function(){return o}});var r=n(6480);function i(e){return new URL(window.location.href).searchParams.get(e)||null}function o(e){const t=new URL(window.location.href);t.searchParams.has(e)&&(t.searchParams.delete(e),window.history.replaceState(window.history.state,"",t))}r.rt,r.MC},5098:function(e,t,n){"use strict";n.d(t,{F1:function(){return Y},$7:function(){return l.$7},jk:function(){return V},k:function(){return te},DG:function(){return S},kZ:function(){return l.kZ},cL:function(){return D},T0:function(){return i},J4:function(){return b},AL:function(){return w},wO:function(){return j},D4:function(){return T},Fm:function(){return k},sb:function(){return A},l:function(){return Z.l},hI:function(){return U.hI},aC:function(){return _},$1:function(){return Z.$},vA:function(){return B.v},rM:function(){return l.rM},tL:function(){return l.tL},ez:function(){return E},Z$:function(){return q},M:function(){return J},zU:function(){return G},V0:function(){return l.V0},px:function(){return re},zi:function(){return l.zi},DY:function(){return l.DY},bJ:function(){return O},l1:function(){return l.l1},AY:function(){return l.AY},yR:function(){return l.yR},FW:function(){return s},vV:function(){return a},yY:function(){return l.yY},VH:function(){return ee},FP:function(){return W},rw:function(){return U.rw},AC:function(){return l.AC},Mo:function(){return $},gm:function(){return C},QP:function(){return o},FV:function(){return l.FV},Z0:function(){return l.Z0},Xz:function(){return l.Xz},iD:function(){return l.iD},Kj:function(){return l.Kj},RA:function(){return R},y7:function(){return r.y}});var r=n(3132);const i=()=>{let e=!1;const t=()=>e=!0;return{startTracking:()=>{window.addEventListener("beforeunload",t),window.addEventListener(r.t,t)},stopTracking:()=>{window.removeEventListener("beforeunload",t),window.removeEventListener(r.t,t)},isUnloading:()=>e}},o=(e,t)=>!(!e.session||!(null==t?void 0:t.authConfig.singleSessionMode)),a=e=>!e.user,s=e=>!e.organization;var c=n(8517),l=n(7661);function u(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}n(3195);var d=function e(t,n){function r(e,r,i){if("undefined"!=typeof document){"number"==typeof(i=u({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var o="";for(var a in i)i[a]&&(o+="; "+a,!0!==i[a]&&(o+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+o}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");try{var s=decodeURIComponent(o[0]);if(r[s]=t.read(a,s),e===s)break}catch(c){}}return e?r[e]:r}},remove:function(e,t){r(e,"",u({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,u({},this.attributes,t))},withConverter:function(t){return e(u({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),h=d;function f(e){return{get(){return h.get(e)},set(t,n={}){return h.set(e,t,n)},remove(t){h.remove(e,t)}}}const p=f("__client"),m=f("__client_uat"),g=f(c.Ss),y=f("__initted"),v=f("__session"),b=()=>{const e=p;return{getDevBrowserInittedCookie:()=>y.get(),setDevBrowserInittedCookie:()=>y.set("1",{expires:(0,c.e7)(Date.now(),1),sameSite:G()?"None":"Lax",secure:!!G()||void 0,path:"/"}),setSessionCookie:e=>{const t=(0,c.e7)(Date.now(),1),n=G()?"None":"Lax",r=G()||"https:"===window.location.protocol;return v.set(e,{expires:t,sameSite:n,secure:r})},getClientUatCookie:()=>parseInt(m.get()||"0",10),setClientUatCookie:e=>{const t=(0,c.e7)(Date.now(),1),n=G()?"None":"strict",r=G()||"https:"===window.location.protocol;let i="0";return e&&e.updatedAt&&e.activeSessions.length>0&&(i=Math.floor(e.updatedAt.getTime()/1e3).toString()),m.set(i,{expires:t,sameSite:n,secure:r})},removeSessionCookie:()=>v.remove(),removeAllDevBrowserCookies:()=>{y.remove({path:"/"}),(0,l.Ux)().forEach((t=>e.remove({domain:t,path:"/"})))},setDevBrowserCookie:e=>{const t=(0,c.e7)(Date.now(),1),n=G()?"None":"Lax",r=G()||"https:"===window.location.protocol;return g.set(e,{expires:t,sameSite:n,secure:r})},getDevBrowserCookie:()=>g.get(),removeDevBrowserCookie:()=>g.remove()}},w=({regex:e})=>({urlWithParam:t,entity:n})=>{const r=e.exec(t);if(r){const e=r[1];if(e in n){const i=n[e];return t.replace(r[0],i)}}return t};function _(e){const t=new URL(e),n=(0,c.HR)(t),r=(0,c.Lm)(t),i=n||r;return i&&void 0!==globalThis.history&&globalThis.history.replaceState(null,"",t.href),i}function S({localPart:e,frontendApi:t}){return`${e}@${t?t.replace("clerk.",""):"clerk.dev"}`}function k(e){return n.g.btoa(e)}function P(e){return function(e){return decodeURIComponent(n.g.atob(e).split("").map((e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2))).join(""))}(e.replace(/_/g,"/").replace(/-/g,"+"))}function O(e,t=""){return e.errors&&!!e.errors.find((e=>e.code===t))}const A=(0,n(9859)._r)({packageName:"@clerk/clerk-js"});var U=n(4927);function C({src:e,eventOrigin:t}){return new Promise(((n,r)=>{const i=document.createElement("div");i.setAttribute("style","display: none; position: fixed; z-index: 2147483646; background-color: rgba(100,100,100,0.8); top: 0; left: 0; bottom: 0; right: 0;");const o=document.createElement("iframe");o.src=e,o.setAttribute("style","display: none; position: fixed; z-index: 2147483647; border-radius: 32px; width: 600px; height: 500px; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 0; outline: 0; background-color: white; box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);");const a=["allow-same-origin","allow-scripts","allow-top-navigation"];function s(){null==i||i.remove(),null==o||o.remove(),window.removeEventListener("message",c,!1)}function c(e){e.origin==t&&(e.data.error?(s(),r(e.data.error)):e.data.showFrame?(o.style.display="block",i.style.display="block"):(s(),n(e.data)))}"function"==typeof document.requestStorageAccess&&a.push("allow-storage-access-by-user-activation"),o.setAttribute("sandbox",a.join(" ")),window.addEventListener("message",c,!1),document.body.appendChild(i),document.body.appendChild(o)}))}const x=e=>!!e&&"object"==typeof e&&"target"in e&&"currentTarget"in e&&"preventDefault"in e;function E(e,t={}){if(!(t.requireType&&typeof e!==t.requireType||x(e)))return e}const I=/^clerk\.([\w|-]+\.){2,4}(dev|com)$/i,M=/^clerk(\.[A-Z0-9_-]{1,256}){2,}$/i;function R(e){return!!e&&((0,l.DY)(e)?I.test(e):M.test(e))}var z=n(7780);function T(e){const t=(e||"").split("."),[n,r,i]=t;if(3!==t.length||!n||!r||!i)throw new Error("JWT could not be decoded");const o=JSON.parse(P(r)),a={__raw:e};Object.keys(o).forEach((e=>{a[e]=o[e]}));const s={encoded:{header:n,payload:r,signature:i},header:JSON.parse(P(n)),claims:a};return(0,z.W1)(s,"orgs",'Add orgs to your session token using the "user.organizations" shortcode in JWT Templates instead.',"decode:orgs"),s}var N=n(8521);const L=()=>{},j=()=>{if(!(0,N.M)())return{isUnloading:L,onPageVisible:L};const e={"visibilitychange:visible":[]};return document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&e["visibilitychange:visible"].forEach((e=>e()))})),{onPageVisible:t=>{e["visibilitychange:visible"].push(t)}}};function $(e){return"function"==typeof e?e():e}n(5792);var F=n(6480);const D=({base:e,path:t})=>t?e+t:e,W=()=>{var e;const t=null!==(e=(0,U.hI)(F.CL))&&void 0!==e?e:"";return t?JSON.parse(atob(t)):null},V=({url:e,startPath:t="/user",currentPath:n="",componentName:r,socialProvider:i=""})=>{const o={path:n.replace(/CLERK-ROUTER\/VIRTUAL\/.*\//,"")||"",componentName:r,startPath:t,socialProvider:i},a=k(JSON.stringify(o)),s=new URL(e),c=s.searchParams;return c.set(F.CL,a),s.search=c.toString(),s.toString()};var B=n(1630);function J(){return void 0!==globalThis.document}function q(){return J()&&globalThis.document.hasFocus()}function G(){return J()&&window.self!==window.top&&!("undefined"!=typeof window&&void 0!==window.Cypress)&&!window.frameElement&&J()&&"https:"===window.location.protocol}var K=n(3011),H=n.n(K);function Y(e){const t=new(H());return window.addEventListener("beforeunload",(async()=>{await t.releaseLock(e)})),{acquireLockAndRun:async n=>{if(await t.acquireLock(e,5e3))try{return await n()}finally{await t.releaseLock(e)}}}}var Z=n(1783),Q=n(5810),X=n.n(Q);const ee=(e,{ctx:t,queryParams:n,displayConfig:r,options:i},o=!0)=>{const a=(0,c.C8)(e),s=null==n?void 0:n[a],u="string"==typeof s?s:void 0,d=o&&"string"==typeof(null==n?void 0:n.redirect_url)?n.redirect_url:void 0;let h;u&&(0,l.Dp)(u,null==i?void 0:i.allowedRedirectOrigins)?h=u:d&&(0,l.Dp)(d,null==i?void 0:i.allowedRedirectOrigins)&&(h=d);const f=h||(null==t?void 0:t[e])||(o?null==t?void 0:t.redirectUrl:void 0)||(null==i?void 0:i[e])||(null==r?void 0:r[e]);return!(0,l.AY)(f,{includeRelativeUrls:!0})||(0,l.RF)(f)?"":f},te=e=>{const t=t=>{const n=e[t];if(n&&n!==e.displayConfig[t])return n.startsWith("/")?window.location.origin+n:n},n=t("afterSignInUrl"),r=t("afterSignUpUrl"),i={};return n&&n===r?i.redirect_url=n:(r&&(i.after_sign_up_url=r),n&&(i.after_sign_in_url=n)),0===Object.keys(i).length?null:X().stringify(i)};var ne=n(1777);const re=e=>{if((e||"").includes("gravatar")||(e||"").includes("avatar_placeholder"))return!0;try{const t=new URL(e).pathname.replace("/",""),n=(0,ne.y)(t);return"default"===JSON.parse(n).type}catch{return!1}}},9961:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(8517);const i=(e,t)=>{const{onValidation:i=r.lQ,onValidationComplexity:o=r.lQ}=t||{},{show_zxcvbn:a,validatePassword:s}=e,c=(e=>t=>((e,t)=>{const{max_length:n,min_length:r,require_special_char:i,require_lowercase:o,require_numbers:a,require_uppercase:s}=t,c=(e=>{let t;if(e.allowed_special_characters){let n=e.allowed_special_characters.replace("[","\\[");n=n.replace("]","\\]"),t=new RegExp(`[${n}]`)}else t=/[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/;return(e,{minLength:n,maxLength:r})=>({max_length:e.length<r,min_length:e.length>=n,require_numbers:/\d/.test(e),require_lowercase:/[a-z]/.test(e),require_uppercase:/[A-Z]/.test(e),require_special_char:t.test(e)})})(t),l=c(e,{maxLength:t.max_length,minLength:t.min_length}),u={max_length:n,min_length:r,require_special_char:i,require_lowercase:o,require_numbers:a,require_uppercase:s},d=new Map;for(const h in u){const e=h;u[e]&&(l[e]||d.set(e,!0))}return Object.freeze(Object.fromEntries(d))})(t,e))(e),l=(({min_zxcvbn_strength:e,onResult:t})=>n=>r=>{const i=n(r);return null==t||t(i),i.score>=e&&i.score<3?{state:"pass",keys:["unstable__errors.zxcvbn.couldBeStronger"],result:i}:i.score>=e?{state:"excellent",result:i}:{state:"fail",keys:["unstable__errors.zxcvbn.notEnough",...i.feedback.suggestions.map((e=>`unstable__errors.zxcvbn.suggestions.${e}`))],result:i}})(e);let u={};return(e,t)=>{const{onValidation:r=i,onValidationComplexity:d=o}=t||{};if(!s)return;const h=c(e);d(0===Object.keys(h).length),u={...u,complexity:h},a&&Promise.all([Promise.all([n.e(592),n.e(96)]).then(n.bind(n,1533)),n.e(128).then(n.bind(n,1206))]).then((([e,t])=>{const{zxcvbnOptions:n,zxcvbn:r}=e,{dictionary:i,adjacencyGraphs:o}=t;return n.setOptions({dictionary:{...i},graphs:o}),r})).then((t=>{const n=l(t)(e);u={...u,strength:n},r({...u,strength:n})})),u.complexity&&0===Object.keys(u.complexity).length&&a||r(u)}}},5792:function(e,t,n){"use strict";n.d(t,{H:function(){return o}});const r="/",i=new RegExp(r+"{1,}","g");function o(e,t){return[e,t].filter((e=>e)).join(r).replace(i,r)}},1630:function(e,t,n){"use strict";n.d(t,{v:function(){return o}});var r=n(5810),i=n.n(r);const o=e=>i().parse(e||"",{ignoreQueryPrefix:!0})},7661:function(e,t,n){"use strict";n.d(t,{$7:function(){return _},kZ:function(){return m},Ux:function(){return p},RF:function(){return O},rM:function(){return S},tL:function(){return A},Dp:function(){return R},V0:function(){return P},zi:function(){return f},DY:function(){return d},l1:function(){return I},AY:function(){return k},yR:function(){return U},yY:function(){return C},AC:function(){return M},FV:function(){return y},Z0:function(){return w},Xz:function(){return g},iD:function(){return b},Kj:function(){return v}});var r=n(8517),i=(n(3195),n(2580)),o=n(5792),a=n(1630);const s="http://clerk-dummy",c=[".lcl.dev",".lclstage.dev",".lclclerk.com"],l=[".accounts.dev",".accountsstage.dev",".accounts.lclclerk.com"],u=["javascript:"],{isDevOrStagingUrl:d}=(0,r.RZ)(),h=new Map;function f(e=window.location.hostname){if(!e)return!1;let t=h.get(e);var n;return void 0===t&&(n=e,t=c.some((e=>n.startsWith("accounts.")&&n.endsWith(e)))||function(e){return l.some((t=>e.endsWith(t)&&!e.endsWith(".clerk"+t)))}(e),h.set(e,t)),t}function p(e=window.location.hostname){const t=e.split("."),n=[],r=[];for(let i=t.length-1;i>0;i--)n.unshift(t[i]),r.push(n.join("."));return r}function m(e,t={}){const{base:n,hashPath:r,hashSearch:i,searchParams:c,...l}=e;let u="";u="undefined"!=typeof window&&window.location?window.location.href:"http://react-native-fake-base-url";const d=new URL(n||"",u);if(c instanceof URLSearchParams&&c.forEach(((e,t)=>{d.searchParams.set(t,e)})),Object.assign(d,l),r||i){const e=new URL(s+d.hash.substring(1));e.pathname=(0,o.H)(e.pathname,r||"");const t=(0,a.v)(i||"");for(const[r,i]of Object.entries(t))e.searchParams.append(r,i);const n=e.href.replace(s,"");d.hash=n}const{stringify:h,skipOrigin:f}=t;return h?f?d.href.replace(d.origin,""):d.href:d}function g(e){return new URL(e.toString(),window.location.origin)}function y(e){return(e=g(e)).href.replace(e.origin,"")}const v=e=>(e||"").replace(/\/+$/,""),b=e=>(e||"").replace(/^\/+/,""),w=(e,t)=>t.origin===e.origin?y(e):`${e}`,_=(e,t={})=>{const n=g(e),i=new URLSearchParams;for(const[o,a]of Object.entries(t))a&&i.append((0,r.C8)(o),a);return`${n}${i.toString()?"#/?"+i.toString():""}`},S=e=>{const{externalAccount:t}=e.verifications;return!!t.error};function k(e,t){const{includeRelativeUrls:n=!1}=t||{};if(!e&&!n)return!1;try{return new URL(e,n?s:void 0),!0}catch(r){return!1}}function P(e){return!!k(e)&&"data:"===new URL(e).protocol}function O(e){if(!k(e))return!1;const t=new URL(e).protocol;return u.some((e=>e===t))}const A=e=>new URL(e,s).hash.startsWith("#/"),U=e=>{const t=new URL(e);if(!A(t))return t;const n=new URL(t.hash.replace("#/","/"),t.href),r=[t.pathname,n.pathname].map((e=>e.split("/"))).flat().filter(Boolean).join("/"),i=new URL(r,t.origin);return t.searchParams.forEach(((e,t)=>{i.searchParams.set(t,e)})),n.searchParams.forEach(((e,t)=>{i.searchParams.set(t,e)})),i},C=e=>e.replace(/CLERK-ROUTER\/(.*?)\//,""),x=["/oauth/authorize"],E=["/v1/verify","/v1/tickets/accept"];function I(e,t){const n=new URL(t,s),r=n.pathname,i=x.includes(r)||E.includes(r);return e===n.host&&i}function M(e){const t=new URL(e,s);return x.includes(t.pathname)}const R=(e,t)=>{if(!t)return!0;const n=new URL(e,s);if(n.origin===s)return!0;const r=t.map((e=>"string"==typeof e?(e=>{try{return i(e)}catch(t){throw new Error(`Invalid pattern: ${e}.\nConsult the documentation of glob-to-regexp here: https://www.npmjs.com/package/glob-to-regexp.\n${t.message}`)}})(v(e)):e)).some((e=>e.test(v(n.origin))));return r||console.warn(`Clerk: Redirect URL ${n} is not on one of the allowedRedirectOrigins, falling back to the default redirect URL.`),r}},8740:function(e,t,n){"use strict";n.d(t,{Cm:function(){return o},IM:function(){return i},dS:function(){return r}});const r=({firstName:e,lastName:t,name:n})=>n||[e,t].join(" ").trim()||"",i=({firstName:e,lastName:t,name:n})=>[(e||"")[0],(t||"")[0]].join("").trim()||(n||"")[0],o=e=>e.username?e.username:e.primaryEmailAddress?e.primaryEmailAddress.emailAddress:e.primaryPhoneNumber?e.primaryPhoneNumber.phoneNumber:e.primaryWeb3Wallet?e.primaryWeb3Wallet.web3Wallet:""},1783:function(e,t,n){"use strict";async function r(){if(!n.g.ethereum)return"";const e=await n.g.ethereum.request({method:"eth_requestAccounts"});return e&&e[0]||""}async function i({identifier:e,nonce:t}){return n.g.ethereum?await n.g.ethereum.request({method:"personal_sign",params:[`0x${r=t,r.split("").map((e=>e.charCodeAt(0).toString(16).padStart(2,"0"))).join("")}`,e]}):"";var r}n.d(t,{l:function(){return i},$:function(){return r}})},3132:function(e,t,n){"use strict";n.d(t,{t:function(){return r},y:function(){return i}});const r="clerk:beforeunload";function i(e){let t=new URL(e,window.location.href);"http:"!==t.protocol&&"https:"!==t.protocol&&(console.warn("Clerk: Not a valid protocol. Redirecting to /"),t=new URL("/",window.location.href)),window.dispatchEvent(new CustomEvent(r)),window.location.href=t.href}},4026:function(e,t,n){"use strict";var r=n(4041),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(r){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return s((function(){i.value=n,i.getSnapshot=t,l(i)&&u({inst:i})}),[e,n,t]),a((function(){return l(i)&&u({inst:i}),e((function(){l(i)&&u({inst:i})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},8139:function(e,t,n){"use strict";e.exports=n(4026)},6973:function(){},8521:function(e,t,n){"use strict";n.d(t,{CS:function(){return r.CS},M:function(){return r.M}});var r=n(7736);n(3195)},4968:function(e,t,n){"use strict";n.d(t,{fx:function(){return a},lQ:function(){return r},vu:function(){return s}});var r=(...e)=>{},i='const respond=r=>{self.postMessage(r)},workerToTabIds={};self.addEventListener("message",r=>{const e=r.data;switch(e.type){case"setTimeout":workerToTabIds[e.id]=setTimeout(()=>{respond({id:e.id})},e.ms);break;case"clearTimeout":workerToTabIds[e.id]&&(clearTimeout(workerToTabIds[e.id]),delete workerToTabIds[e.id]);break;case"setInterval":workerToTabIds[e.id]=setInterval(()=>{respond({id:e.id})},e.ms);break;case"clearInterval":workerToTabIds[e.id]&&(clearInterval(workerToTabIds[e.id]),delete workerToTabIds[e.id]);break}});\n',o=(e,t={})=>{if("undefined"==typeof Worker)return null;try{const n=new Blob([e],{type:"application/javascript; charset=utf-8"}),r=globalThis.URL.createObjectURL(n);return new Worker(r,t)}catch(n){return console.warn("Clerk: Cannot create worker from blob. Consider adding worker-src blob:; to your CSP"),null}},a=()=>{let e=0;const t=()=>e++,n=new Map,a=(e,t)=>null==e?void 0:e.postMessage(t),s=e=>{var t;null==(t=n.get(e.data.id))||t()};let c=o(i,{name:"clerk-timers"});if(null==c||c.addEventListener("message",s),!c)return{setTimeout:globalThis.setTimeout.bind(globalThis),setInterval:globalThis.setInterval.bind(globalThis),clearTimeout:globalThis.clearTimeout.bind(globalThis),clearInterval:globalThis.clearInterval.bind(globalThis),cleanup:r};const l=()=>{c||(c=o(i,{name:"clerk-timers"}),null==c||c.addEventListener("message",s))};return{setTimeout:(e,r)=>{l();const i=t();return n.set(i,e),a(c,{type:"setTimeout",id:i,ms:r}),i},setInterval:(e,r)=>{l();const i=t();return n.set(i,e),a(c,{type:"setInterval",id:i,ms:r}),i},clearTimeout:e=>{l(),n.delete(e),a(c,{type:"clearTimeout",id:e})},clearInterval:e=>{l(),n.delete(e),a(c,{type:"clearInterval",id:e})},cleanup:()=>{c&&(c.terminate(),c=null,n.clear())}}};function s({delayInMs:e}={delayInMs:1e3}){const t=a();let n,r=!1;const i=()=>{n&&(t.clearTimeout(n),t.cleanup()),r=!0},o=async a=>{r=!1,await a(i),r||(n=t.setTimeout((()=>{o(a)}),e))};return{run:o,stop:i}}},7754:function(e,t,n){"use strict";n.d(t,{Lx:function(){return a},W1:function(){return s},b_:function(){return r},io:function(){return o}});var r=()=>{try{return!1}catch(e){}return!1},i=new Set,o=(e,t,n)=>{const r=(()=>{try{return!1}catch(e){}return!1})()||(()=>{try{return!0}catch(e){}return!1})(),o=null!=n?n:e;i.has(o)||r||(i.add(o),console.warn(`Clerk - DEPRECATION WARNING: "${e}" is deprecated and will be removed in the next major release.\n${t}`))},a=(e,t,n,r=!1)=>{const i=r?e:e.prototype;let a=i[t];Object.defineProperty(i,t,{get(){return o(t,n,`${e.name}:${t}`),a},set(e){a=e}})},s=(e,t,n,r)=>{let i=e[t];Object.defineProperty(e,t,{get(){return o(t,n,r),i},set(e){i=e}})}},7736:function(e,t,n){"use strict";function r(){return"undefined"!=typeof window}n.d(t,{CS:function(){return a},M:function(){return r},kv:function(){return o}});var i=new RegExp(["bot","spider","crawl","APIs-Google","AdsBot","Googlebot","mediapartners","Google Favicon","FeedFetcher","Google-Read-Aloud","DuplexWeb-Google","googleweblight","bing","yandex","baidu","duckduck","yahoo","ecosia","ia_archiver","facebook","instagram","pinterest","reddit","slack","twitter","whatsapp","youtube","semrush"].join("|"),"i");function o(){var e,t;const n=r()?null==window?void 0:window.navigator:null;if(!n)return!1;const i=null==n?void 0:n.onLine;return 0!==(null==(e=null==n?void 0:n.connection)?void 0:e.rtt)&&0!==(null==(t=null==n?void 0:n.connection)?void 0:t.downlink)&&i}function a(){return o()&&function(){const e=r()?null==window?void 0:window.navigator:null;return!(!e||(t=null==e?void 0:e.userAgent,t&&i.test(t)||(null==e?void 0:e.webdriver)));var t}()}},3195:function(e,t,n){"use strict";n.d(t,{V:function(){return s},i:function(){return l}});var r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},c=(e,t,n,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let c of o(t))a.call(e,c)||c===n||r(e,c,{get:()=>t[c],enumerable:!(s=i(t,c))||s.enumerable});return e},l=(e,t,n)=>(c(e,t,"default"),n&&c(n,t,"default"))},1777:function(e,t,n){"use strict";n.d(t,{y:function(){return r}});var r=e=>"undefined"!=typeof atob&&"function"==typeof atob?atob(e):"undefined"!=typeof global&&global.Buffer?new global.Buffer(e,"base64").toString():e},6310:function(e,t,n){"use strict";n.d(t,{$R:function(){return c},Au:function(){return h},Cm:function(){return l},LR:function(){return p},NZ:function(){return y},TX:function(){return a},Ys:function(){return w},_d:function(){return d},_r:function(){return S},cR:function(){return m},dB:function(){return b},gS:function(){return g},hl:function(){return v},nc:function(){return o},rZ:function(){return i},si:function(){return u},u$:function(){return f},ux:function(){return s}});var r=n(7754);function i(e){return["captcha_invalid","captcha_not_enabled","captcha_missing_token"].includes(e.errors[0].code)}function o(e){const t=null==e?void 0:e.status;return!!t&&t>=400&&t<500}function a(e){return(`${e.message}${e.name}`||"").toLowerCase().replace(/\s+/g,"").includes("networkerror")}function s(e){return c(e)||u(e)||l(e)}function c(e){return"clerkError"in e}function l(e){return"clerkRuntimeError"in e}function u(e){return"code"in e&&[4001,32602,32603].includes(e.code)&&"message"in e}function d(e){var t,n;return c(e)&&"user_locked"===(null==(n=null==(t=e.errors)?void 0:t[0])?void 0:n.code)}function h(e){var t,n;return c(e)&&"form_password_pwned"===(null==(n=null==(t=e.errors)?void 0:t[0])?void 0:n.code)}function f(e){var t,n,r,i,o;return{code:e.code,message:e.message,longMessage:e.long_message,meta:{paramName:null==(t=null==e?void 0:e.meta)?void 0:t.param_name,sessionId:null==(n=null==e?void 0:e.meta)?void 0:n.session_id,emailAddresses:null==(r=null==e?void 0:e.meta)?void 0:r.email_addresses,identifiers:null==(i=null==e?void 0:e.meta)?void 0:i.identifiers,zxcvbn:null==(o=null==e?void 0:e.meta)?void 0:o.zxcvbn}}}var p=class e extends Error{constructor(t,{data:n,status:r,clerkTraceId:i}){super(t),this.toString=()=>{let e=`[${this.name}]\nMessage:${this.message}\nStatus:${this.status}\nSerialized errors: ${this.errors.map((e=>JSON.stringify(e)))}`;return this.clerkTraceId&&(e+=`\nClerk Trace ID: ${this.clerkTraceId}`),e},Object.setPrototypeOf(this,e.prototype),this.status=r,this.message=t,this.clerkTraceId=i,this.clerkError=!0,this.errors=function(e=[]){return e.length>0?e.map(f):[]}(n)}},m=class e extends Error{constructor(t,{code:n}){super(t),this.toString=()=>`[${this.name}]\nMessage:${this.message}`,Object.setPrototypeOf(this,e.prototype),this.code=n,this.message=t,this.clerkRuntimeError=!0}},g=class e extends Error{constructor(t){super(t),this.code=t,Object.setPrototypeOf(this,e.prototype),(0,r.io)("MagicLinkError","Use `EmailLinkError` instead.")}},y=class e extends Error{constructor(t){super(t),this.code=t,Object.setPrototypeOf(this,e.prototype)}};function v(e){return e instanceof y}var b=new Proxy({Expired:"expired",Failed:"failed"},{get(e,t,n){return(0,r.io)("MagicLinkErrorCode","Use `EmailLinkErrorCode` instead."),Reflect.get(e,t,n)}}),w={Expired:"expired",Failed:"failed"},_=Object.freeze({InvalidFrontendApiErrorMessage:"The frontendApi passed to Clerk is invalid. You can get your Frontend API key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys."});function S({packageName:e,customMessages:t}){let n=e;const r={..._,...t};function i(e,t){if(!t)return`${n}: ${e}`;let r=e;const i=e.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(const n of i){const e=(t[n[1]]||"").toString();r=r.replace(`{{${n[1]}}}`,e)}return`${n}: ${r}`}return{setPackageName({packageName:e}){return"string"==typeof e&&(n=e),this},setMessages({customMessages:e}){return Object.assign(r,e||{}),this},throwInvalidPublishableKeyError(e){throw new Error(i(r.InvalidPublishableKeyErrorMessage,e))},throwInvalidFrontendApiError(e){throw new Error(i(r.InvalidFrontendApiErrorMessage,e))},throwInvalidProxyUrl(e){throw new Error(i(r.InvalidProxyUrlErrorMessage,e))},throwMissingPublishableKeyError(){throw new Error(i(r.MissingPublishableKeyErrorMessage))}}}},7780:function(e,t,n){"use strict";n.d(t,{Lx:function(){return r.Lx},W1:function(){return r.W1},io:function(){return r.io}});var r=n(7754);n(3195)},9859:function(e,t,n){"use strict";n.d(t,{$R:function(){return r.$R},Au:function(){return r.Au},Cm:function(){return r.Cm},LR:function(){return r.LR},NZ:function(){return r.NZ},TX:function(){return r.TX},Ys:function(){return r.Ys},_d:function(){return r._d},_r:function(){return r._r},cR:function(){return r.cR},dB:function(){return r.dB},gS:function(){return r.gS},hl:function(){return r.hl},nc:function(){return r.nc},rZ:function(){return r.rZ},si:function(){return r.si},u$:function(){return r.u$},ux:function(){return r.ux}});var r=n(6310);n(7754),n(3195)},8517:function(e,t,n){"use strict";n.d(t,{Ss:function(){return x},vu:function(){return r.vu},TV:function(){return m},e7:function(){return U},C8:function(){return d},ph:function(){return T},RZ:function(){return S},fx:function(){return r.fx},Sd:function(){return f},io:function(){return i.io},Lx:function(){return i.Lx},HR:function(){return M},Lm:function(){return R},om:function(){return A},VK:function(){return g},M:function(){return k.M},nc:function(){return z.nc},kv:function(){return k.kv},$R:function(){return z.$R},b_:function(){return i.b_},RE:function(){return a},r7:function(){return _},_d:function(){return z._d},CS:function(){return k.CS},_c:function(){return o},lQ:function(){return r.lQ},OG:function(){return O},q5:function(){return w},zz:function(){return c},Nv:function(){return L},Js:function(){return I},sF:function(){return u},Wl:function(){return p},Ns:function(){return l}});var r=n(4968),i=n(7754);function o(e){return!e||a(e)||s(e)}function a(e){return/^http(s)?:\/\//.test(e||"")}function s(e){return e.startsWith("/")}function c(e){return e?s(e)?new URL(e,window.location.origin).toString():e:""}function l(e){const t=e||"";return t.charAt(0).toUpperCase()+t.slice(1)}function u(e){return e?e.replace(/([-_][a-z])/g,(e=>e.toUpperCase().replace(/-|_/,""))):""}function d(e){return e?e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)):""}var h=e=>{const t=n=>{if(!n)return n;if(Array.isArray(n))return n.map((e=>"object"==typeof e||Array.isArray(e)?t(e):e));const r={...n},i=Object.keys(r);for(const o of i){const n=e(o.toString());n!==o&&(r[n]=r[o],delete r[o]),"object"==typeof r[n]&&(r[n]=t(r[n]))}return r};return t},f=(h(d),h(u));function p(e=""){return(e||"").replace(/^.+:\/\//,"")}function m(e){if(!e)return"";let t;if(e.match(/^(clerk\.)+\w*$/))t=/(clerk\.)*(?=clerk\.)/;else{if(e.match(/\.clerk.accounts/))return e;t=/^(clerk\.)*/gi}return`clerk.${e.replace(t,"")}`}function g(e,t,n){return"function"==typeof e?e(t):void 0!==e?e:void 0!==n?n:void 0}Object.freeze({"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/x-icon":"ico","image/vnd.microsoft.icon":"ico"});var y=n(1777),v="pk_live_",b="pk_test_";function w(e){if(!function(e){const t=(e=e||"").startsWith(v)||e.startsWith(b),n=(0,y.y)(e.split("_")[2]||"").endsWith("$");return t&&n}(e=e||""))return null;const t=e.startsWith(v)?"production":"development";let n=(0,y.y)(e.split("_")[2]);return n.endsWith("$")?(n=n.slice(0,-1),{instanceType:t,frontendApi:n}):null}function _(e){return(e=e||"").startsWith("clerk.")}function S(){const e=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],t=new Map;return{isDevOrStagingUrl:n=>{if(!n)return!1;const r="string"==typeof n?n:n.hostname;let i=t.get(r);return void 0===i&&(i=e.some((e=>r.endsWith(e))),t.set(r,i)),i}}}var k=n(7736),P=864e5;function O(e){try{return new Date(e||new Date)}catch(t){return new Date}}function A(e){const{date:t,relativeTo:n}=e;if(!t||!n)return null;const r=O(t),i=function(e,t,{absolute:n=!0}={}){if(!e||!t)return 0;const r=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),i=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),o=Math.floor((i-r)/P);return n?Math.abs(o):o}(O(n),r,{absolute:!1});return i<-6?{relativeDateCase:"other",date:r}:i<-1?{relativeDateCase:"previous6Days",date:r}:-1===i?{relativeDateCase:"lastDay",date:r}:0===i?{relativeDateCase:"sameDay",date:r}:1===i?{relativeDateCase:"nextDay",date:r}:i<7?{relativeDateCase:"next6Days",date:r}:{relativeDateCase:"other",date:r}}function U(e,t){const n=O(e);return n.setFullYear(n.getFullYear()+t),n}var C="__dev_session",x="__clerk_db_jwt",E=/__clerk_db_jwt\[(.*)\]/;function I(e,t,n={hash:!0}){const r=new URL(e),i=M(r),o=R(r),a=i||o||t;return a&&(r.searchParams.append(C,a),r.searchParams.append(x,a),n.hash&&(r.hash=r.hash+`${x}[${a}]`)),r}function M(e){const t=function(e){const t=e.match(E);return t?t[1]:""}(e.hash);return e.hash=e.hash.replace(E,""),e.href.endsWith("#")&&(e.hash=""),t}function R(e){const t=e.searchParams.get(C);e.searchParams.delete(C);const n=e.searchParams.get(x);return e.searchParams.delete(x),t||n||""}var z=n(6310),T=(n(3195),()=>{let e=r.lQ,t=r.lQ;return{promise:new Promise(((n,r)=>{e=n,t=r})),resolve:e,reject:t}}),N={firstDelay:125,maxDelay:0,timeMultiple:2,shouldRetry:()=>!0},L=async(e,t={})=>{let n=0;const{shouldRetry:r,firstDelay:i,maxDelay:o,timeMultiple:a}={...N,...t},s=(e=>{let t=0;return async()=>{await(async e=>new Promise((t=>setTimeout(t,e))))((()=>{const n=e.firstDelay,r=e.timeMultiple,i=n*Math.pow(r,t);return Math.min(e.maxDelay||i,i)})()),t++}})({firstDelay:i,maxDelay:o,timeMultiple:a});for(;;)try{return await e()}catch(c){if(n++,!r(c,n))throw c;await s()}}},8643:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r="loadScript cannot be called when document does not exist",i="loadScript cannot be called without a src";async function o(e="",t){const{async:n,defer:o,beforeLoad:a,crossOrigin:s}=t||{};return new Promise(((t,c)=>{e||c(i),document&&document.body||c(r);const l=document.createElement("script");s&&l.setAttribute("crossorigin",s),l.async=n||!1,l.defer=o||!1,l.addEventListener("load",(()=>{l.remove(),t(l)})),l.addEventListener("error",(()=>{l.remove(),c()})),l.src=e,null==a||a(l),document.body.appendChild(l)}))}n(3195)},4654:function(e,t,n){"use strict";n.d(t,{ED:function(){return ce},pc:function(){return he},TS:function(){return ve},IC:function(){return pe},Rs:function(){return ue},_x:function(){return oe},e3:function(){return ae},hQ:function(){return le},WD:function(){return fe},Z5:function(){return ke},D_:function(){return Ae},Gi:function(){return Ue},UQ:function(){return Ce},Lg:function(){return me},ur:function(){return de}});var r={};n.r(r),n.d(r,{SWRConfig:function(){return ee},default:function(){return te},mutate:function(){return D},preload:function(){return H},unstable_serialize:function(){return Z},useSWRConfig:function(){return K}});var i=n(7754),o=n(3195),a=n(4041),s=n(8139);const c=()=>{},l=c(),u=Object,d=e=>e===l,h=e=>"function"==typeof e,f=(e,t)=>({...e,...t}),p=new WeakMap;let m=0;const g=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,o;if(u(e)!==e||r||n==RegExp)i=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(i=p.get(e),i)return i;if(i=++m+"~",p.set(e,i),n==Array){for(i="@",o=0;o<e.length;o++)i+=g(e[o])+",";p.set(e,i)}if(n==u){i="#";const t=u.keys(e).sort();for(;!d(o=t.pop());)d(e[o])||(i+=o+":"+g(e[o])+",");p.set(e,i)}}return i},y=new WeakMap,v={},b={},w="undefined",_=typeof window!=w,S=typeof document!=w,k=(e,t)=>{const n=y.get(e);return[()=>!d(t)&&e.get(t)||v,r=>{if(!d(t)){const i=e.get(t);t in b||(b[t]=i),n[5](t,f(i,r),i||v)}},n[6],()=>!d(t)&&t in b?b[t]:!d(t)&&e.get(t)||v]};let P=!0;const[O,A]=_&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[c,c],U={isOnline:()=>P,isVisible:()=>{const e=S&&document.visibilityState;return d(e)||"hidden"!==e}},C={initFocus:e=>(S&&document.addEventListener("visibilitychange",e),O("focus",e),()=>{S&&document.removeEventListener("visibilitychange",e),A("focus",e)}),initReconnect:e=>{const t=()=>{P=!0,e()},n=()=>{P=!1};return O("online",t),O("offline",n),()=>{A("online",t),A("offline",n)}}},x=!a.useId,E=!_||"Deno"in window,I=E?a.useEffect:a.useLayoutEffect,M="undefined"!=typeof navigator&&navigator.connection,R=!E&&M&&(["slow-2g","2g"].includes(M.effectiveType)||M.saveData),z=e=>{if(h(e))try{e=e()}catch(n){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?g(e):"",t]};let T=0;const N=()=>++T;async function L(...e){const[t,n,r,i]=e,o=f({populateCache:!0,throwOnError:!0},"boolean"==typeof i?{revalidate:i}:i||{});let a=o.populateCache;const s=o.rollbackOnError;let c=o.optimisticData;const u=!1!==o.revalidate,p=o.throwOnError;if(h(n)){const e=n,r=[],i=t.keys();for(const n of i)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(m))}return m(n);async function m(n){const[i]=z(n);if(!i)return;const[o,f]=k(t,i),[m,g,v,b]=y.get(t),w=m[i],_=()=>u&&(delete v[i],delete b[i],w&&w[0])?w[0](2).then((()=>o().data)):o().data;if(e.length<3)return _();let S,P=r;const O=N();g[i]=[O,0];const A=!d(c),U=o(),C=U.data,x=U._c,E=d(x)?C:x;if(A&&(c=h(c)?c(E,C):c,f({data:c,_c:E})),h(P))try{P=P(E)}catch(M){S=M}if(P&&h(P.then)){if(P=await P.catch((e=>{S=e})),O!==g[i][0]){if(S)throw S;return P}S&&A&&(e=>"function"==typeof s?s(e):!1!==s)(S)&&(a=!0,P=E,f({data:P,_c:l}))}a&&(S||(h(a)&&(P=a(P,E)),f({data:P,error:l,_c:l}))),g[i][1]=N();const I=await _();if(f({_c:l}),!S)return a?I:P;if(p)throw S}}const j=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},$=(e,t)=>{if(!y.has(e)){const n=f(C,t),r={},i=L.bind(l,e);let o=c;const a={},s=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},u=(t,n,r)=>{e.set(t,n);const i=a[t];if(i)for(const e of i)e(n,r)},d=()=>{if(!y.has(e)&&(y.set(e,[r,{},{},{},i,u,s]),!E)){const t=n.initFocus(setTimeout.bind(l,j.bind(l,r,0))),i=n.initReconnect(setTimeout.bind(l,j.bind(l,r,1)));o=()=>{t&&t(),i&&i(),y.delete(e)}}};return d(),[e,i,d,o]}return[e,y.get(e)[4]]},[F,D]=$(new Map),W=f({onLoadingSlow:c,onSuccess:c,onError:c,onErrorRetry:(e,t,n,r,i)=>{const o=n.errorRetryCount,a=i.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!d(o)&&a>o||setTimeout(r,s,i)},onDiscarded:c,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:R?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:R?5e3:3e3,compare:(e,t)=>g(e)==g(t),isPaused:()=>!1,cache:F,mutate:D,fallback:{}},U),V=(e,t)=>{const n=f(e,t);if(t){const{use:r,fallback:i}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),i&&a&&(n.fallback=f(i,a))}return n},B=(0,a.createContext)({}),J=_&&window.__SWR_DEVTOOLS_USE__,q=J?window.__SWR_DEVTOOLS_USE__:[],G=e=>h(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],K=()=>f(W,(0,a.useContext)(B)),H=(e,t)=>{const[n,r]=z(e),[,,,i]=y.get(F);if(i[n])return i[n];const o=t(r);return i[n]=o,o},Y=q.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=z(t),[,,,i]=y.get(F),o=i[r];return d(o)?n(...e):(delete i[r],o)}),r)));J&&(window.__SWR_DEVTOOLS_REACT__=a);const Z=e=>z(e)[0],Q=a.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),X={dedupe:!0},ee=u.defineProperty((e=>{const{value:t}=e,n=(0,a.useContext)(B),r=h(t),i=(0,a.useMemo)((()=>r?t(n):t),[r,n,t]),o=(0,a.useMemo)((()=>r?i:V(n,i)),[r,n,i]),s=i&&i.provider,c=(0,a.useRef)(l);s&&!c.current&&(c.current=$(s(o.cache||F),i));const u=c.current;return u&&(o.cache=u[0],o.mutate=u[1]),I((()=>{if(u)return u[2]&&u[2](),u[3]}),[]),(0,a.createElement)(B.Provider,f(e,{value:o}))}),"defaultValue",{value:W}),te=(ne=(e,t,n)=>{const{cache:r,compare:i,suspense:o,fallbackData:c,revalidateOnMount:u,revalidateIfStale:p,refreshInterval:m,refreshWhenHidden:g,refreshWhenOffline:v,keepPreviousData:b}=n,[S,P,O,A]=y.get(r),[U,C]=z(e),M=(0,a.useRef)(!1),R=(0,a.useRef)(!1),T=(0,a.useRef)(U),j=(0,a.useRef)(t),$=(0,a.useRef)(n),F=()=>$.current,D=()=>F().isVisible()&&F().isOnline(),[W,V,B,J]=k(r,U),q=(0,a.useRef)({}).current,G=d(c)?n.fallback[U]:c,K=(e,t)=>{for(const n in q){const r=n;if("data"===r){if(!i(e[r],t[r])){if(!d(e[r]))return!1;if(!i(oe,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},H=(0,a.useMemo)((()=>{const e=!!U&&!!t&&(d(u)?!F().isPaused()&&!o&&(!!d(p)||p):u),n=t=>{const n=f(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=W(),i=J(),a=n(r),s=r===i?a:n(i);let c=a;return[()=>{const e=n(W());return K(e,c)?(c.data=e.data,c.isLoading=e.isLoading,c.isValidating=e.isValidating,c.error=e.error,c):(c=e,e)},()=>s]}),[r,U]),Y=(0,s.useSyncExternalStore)((0,a.useCallback)((e=>B(U,((t,n)=>{K(n,t)||e()}))),[r,U]),H[0],H[1]),Z=!M.current,ee=S[U]&&S[U].length>0,te=Y.data,ne=d(te)?G:te,re=Y.error,ie=(0,a.useRef)(ne),oe=b?d(te)?ie.current:te:ne,ae=!(ee&&!d(re))&&(Z&&!d(u)?u:!F().isPaused()&&(o?!d(ne)&&p:d(ne)||p)),se=!!(U&&t&&Z&&ae),ce=d(Y.isValidating)?se:Y.isValidating,le=d(Y.isLoading)?se:Y.isLoading,ue=(0,a.useCallback)((async e=>{const t=j.current;if(!U||!t||R.current||F().isPaused())return!1;let r,o,a=!0;const s=e||{},c=!O[U]||!s.dedupe,u=()=>x?!R.current&&U===T.current&&M.current:U===T.current,f={isValidating:!1,isLoading:!1},p=()=>{V(f)},m=()=>{const e=O[U];e&&e[1]===o&&delete O[U]},g={isValidating:!0};d(W().data)&&(g.isLoading=!0);try{if(c&&(V(g),n.loadingTimeout&&d(W().data)&&setTimeout((()=>{a&&u()&&F().onLoadingSlow(U,n)}),n.loadingTimeout),O[U]=[t(C),N()]),[r,o]=O[U],r=await r,c&&setTimeout(m,n.dedupingInterval),!O[U]||O[U][1]!==o)return c&&u()&&F().onDiscarded(U),!1;f.error=l;const e=P[U];if(!d(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return p(),c&&u()&&F().onDiscarded(U),!1;const s=W().data;f.data=i(s,r)?s:r,c&&u()&&F().onSuccess(r,U,n)}catch(y){m();const e=F(),{shouldRetryOnError:t}=e;e.isPaused()||(f.error=y,c&&u()&&(e.onError(y,U,e),(!0===t||h(t)&&t(y))&&D()&&e.onErrorRetry(y,U,e,(e=>{const t=S[U];t&&t[0]&&t[0](3,e)}),{retryCount:(s.retryCount||0)+1,dedupe:!0})))}return a=!1,p(),!0}),[U,r]),de=(0,a.useCallback)(((...e)=>L(r,T.current,...e)),[]);if(I((()=>{j.current=t,$.current=n,d(te)||(ie.current=te)})),I((()=>{if(!U)return;const e=ue.bind(l,X);let t=0;const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(U,S,((n,r={})=>{if(0==n){const n=Date.now();F().revalidateOnFocus&&n>t&&D()&&(t=n+F().focusThrottleInterval,e())}else if(1==n)F().revalidateOnReconnect&&D()&&e();else{if(2==n)return ue();if(3==n)return ue(r)}}));return R.current=!1,T.current=U,M.current=!0,V({_k:C}),ae&&(d(ne)||E?e():(r=e,_&&typeof window.requestAnimationFrame!=w?window.requestAnimationFrame(r):setTimeout(r,1))),()=>{R.current=!0,n()};var r}),[U]),I((()=>{let e;function t(){const t=h(m)?m(W().data):m;t&&-1!==e&&(e=setTimeout(n,t))}function n(){W().error||!g&&!F().isVisible()||!v&&!F().isOnline()?t():ue(X).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[m,g,v,U]),(0,a.useDebugValue)(oe),o&&d(ne)&&U){if(!x&&E)throw new Error("Fallback data is required when using suspense in SSR.");j.current=t,$.current=n,R.current=!1;const e=A[U];if(!d(e)){const t=de(e);Q(t)}if(!d(re))throw re;{const e=ue(X);d(oe)||(e.status="fulfilled",e.value=!0),Q(e)}}return{mutate:de,get data(){return q.data=!0,oe},get error(){return q.error=!0,re},get isValidating(){return q.isValidating=!0,ce},get isLoading(){return q.isLoading=!0,le}}},function(...e){const t=K(),[n,r,i]=G(e),o=V(t,i);let a=ne;const{use:s}=o,c=(s||[]).concat(Y);for(let l=c.length;l--;)a=c[l](a);return a(n,r||o.fetcher||null,o)});var ne;const re=Promise.resolve(),ie=((e,t)=>(...n)=>{const[r,i,o]=G(n),a=(o.use||[]).concat(t);return e(r,i,{...o,use:a})})(te,(e=>(t,n,r)=>{const i=(0,a.useRef)(!1),{cache:o,initialSize:c=1,revalidateAll:u=!1,persistSize:f=!1,revalidateFirstPage:p=!0,revalidateOnMount:m=!1,parallel:g=!1}=r;let y;try{y=(e=>z(e?e(0,null):null)[0])(t),y&&(y="$inf$"+y)}catch(x){}const[v,b,w]=k(o,y),_=(0,a.useCallback)((()=>d(v()._l)?c:v()._l),[o,y,c]);(0,s.useSyncExternalStore)((0,a.useCallback)((e=>y?w(y,(()=>{e()})):()=>{}),[o,y]),_,_);const S=(0,a.useCallback)((()=>{const e=v()._l;return d(e)?c:e}),[y,c]),P=(0,a.useRef)(S());I((()=>{i.current?y&&b({_l:f?P.current:S()}):i.current=!0}),[y,o]);const O=m&&!i.current,A=e(y,(async e=>{const i=v()._i,a=[],s=S(),[c]=k(o,e),h=c().data,f=[];let m=null;for(let l=0;l<s;++l){const[e,s]=z(t(l,g?null:m));if(!e)break;const[c,y]=k(o,e);let v=c().data;const b=u||i||d(v)||p&&!l&&!d(h)||O||h&&!d(h[l])&&!r.compare(h[l],v);if(n&&b){const e=async()=>{v=await n(s),y({data:v,_k:s}),a[l]=v};g?f.push(e):await e()}else a[l]=v;g||(m=v)}return g&&await Promise.all(f.map((e=>e()))),b({_i:l}),a}),r),U=(0,a.useCallback)((function(e,t){const n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return y?(r&&(d(e)?b({_i:!0}):b({_i:!1})),arguments.length?A.mutate(e,{...n,revalidate:r}):A.mutate()):re}),[y,o]),C=(0,a.useCallback)((e=>{if(!y)return re;const[,n]=k(o,y);let r;if(h(e)?r=e(S()):"number"==typeof e&&(r=e),"number"!=typeof r)return re;n({_l:r}),P.current=r;const i=[],[a]=k(o,y);let s=null;for(let c=0;c<r;++c){const[e]=z(t(c,s)),[n]=k(o,e),r=e?n().data:l;if(d(r))return U(a().data);i.push(r),s=r}return U(i)}),[y,o,U,S]);return{size:S(),setSize:C,mutate:U,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}}));function oe(e,t){if(!e)throw"string"==typeof t?new Error(t):new Error(`${t.displayName} not found`)}var ae=(e,t)=>{const{assertCtxFn:n=oe}=t||{},r=a.createContext(void 0);return r.displayName=e,[r,()=>{const t=a.useContext(r);return n(t,`${e} not found`),t.value},()=>{const e=a.useContext(r);return e?e.value:{}}]},se={};(0,o.V)(se,{SWRConfig:()=>ee,useSWR:()=>te,useSWRInfinite:()=>ie}),(0,o.i)(se,r);var[ce,le]=ae("ClerkInstanceContext"),[ue,de]=ae("UserContext"),[he,fe]=ae("ClientContext"),[pe,me]=ae("SessionContext"),[ge,ye]=ae("OrganizationContext"),ve=({children:e,organization:t,lastOrganizationMember:n,lastOrganizationInvitation:r,swrConfig:i})=>a.createElement(ee,{value:i},a.createElement(ge.Provider,{value:{value:{organization:t,lastOrganizationMember:n,lastOrganizationInvitation:r}}},e));function be(e,t){const n=new Set(Object.keys(t)),r={};for(const i of Object.keys(e))n.has(i)||(r[i]=e[i]);return r}var we=(e,t)=>{var n,r,i;const o="boolean"==typeof e&&e,s=(0,a.useRef)(o?t.initialPage:null!=(n=null==e?void 0:e.initialPage)?n:t.initialPage),c=(0,a.useRef)(o?t.pageSize:null!=(r=null==e?void 0:e.pageSize)?r:t.pageSize),l={};for(const a of Object.keys(t))l[a]=o?t[a]:null!=(i=null==e?void 0:e[a])?i:t[a];return{...l,initialPage:s.current,pageSize:c.current}},_e=(e,t,n,r)=>{var i,o,s,c,l,u;const[d,h]=(0,a.useState)(null!=(i=e.initialPage)?i:1),f=(0,a.useRef)(null!=(o=e.initialPage)?o:1),p=(0,a.useRef)(null!=(s=e.pageSize)?s:10),m=null==(c=n.enabled)||c,g=null!=(l=n.infinite)&&l,y=null!=(u=n.keepPreviousData)&&u,v={...r,...e,initialPage:d,pageSize:p.current},{data:b,isValidating:w,isLoading:_,error:S,mutate:k}=te(!g&&t&&m?v:null,(e=>{const n=be(e,r);return null==t?void 0:t(n)}),{keepPreviousData:y}),{data:P,isLoading:O,isValidating:A,error:U,size:C,setSize:x,mutate:E}=ie((t=>g&&m?{...e,...r,initialPage:f.current+t,pageSize:p.current}:null),(e=>{const n=be(e,r);return null==t?void 0:t(n)})),I=(0,a.useMemo)((()=>g?C:d),[g,C,d]),M=(0,a.useCallback)((e=>{if(!g)return h(e);x(e)}),[x]),R=(0,a.useMemo)((()=>{var e,t;return g?null!=(e=null==P?void 0:P.map((e=>null==e?void 0:e.data)).flat())?e:[]:null!=(t=null==b?void 0:b.data)?t:[]}),[g,b,P]),z=(0,a.useMemo)((()=>{var e,t;return g?(null==(e=null==P?void 0:P[(null==P?void 0:P.length)-1])?void 0:e.total_count)||0:null!=(t=null==b?void 0:b.total_count)?t:0}),[g,b,P]),T=g?O:_,N=g?A:w,L=!!(g?U:S),j=(0,a.useCallback)((()=>{M((e=>Math.max(0,e+1)))}),[M]),$=(0,a.useCallback)((()=>{M((e=>Math.max(0,e-1)))}),[M]),F=(f.current-1)*p.current,D=Math.ceil((z-F)/p.current),W=z-F*p.current>I*p.current,V=(I-1)*p.current>F*p.current;return{data:R,count:z,isLoading:T,isFetching:N,isError:L,page:I,pageCount:D,fetchPage:M,fetchNext:j,fetchPrevious:$,hasNextPage:W,hasPreviousPage:V,revalidate:g?()=>E():()=>k(),setData:g?e=>E(e,{revalidate:!1}):e=>k(e,{revalidate:!1})}},Se={data:void 0,count:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0},ke=e=>{const{invitationList:t,membershipList:n,domains:r,membershipRequests:o,memberships:a,invitations:s}=e||{},{organization:c,lastOrganizationMember:l,lastOrganizationInvitation:u}=ye(),d=me(),h=we(r,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1,enrollmentMode:void 0}),f=we(o,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),p=we(a,{initialPage:1,pageSize:10,role:void 0,keepPreviousData:!1,infinite:!1}),m=we(s,{initialPage:1,pageSize:10,status:["pending"],keepPreviousData:!1,infinite:!1}),g=le(),y=!!(g.loaded&&d&&c),v=void 0===r?void 0:{initialPage:h.initialPage,pageSize:h.pageSize,enrollmentMode:h.enrollmentMode},b=void 0===o?void 0:{initialPage:f.initialPage,pageSize:f.pageSize,status:f.status},w=void 0===a?void 0:{initialPage:p.initialPage,pageSize:p.pageSize,role:p.role},_=void 0===s?void 0:{initialPage:m.initialPage,pageSize:m.pageSize,status:m.status},S=_e({...v},null==c?void 0:c.getDomains,{keepPreviousData:h.keepPreviousData,infinite:h.infinite,enabled:!!v},{type:"domains",organizationId:null==c?void 0:c.id}),k=_e({...b},null==c?void 0:c.getMembershipRequests,{keepPreviousData:f.keepPreviousData,infinite:f.infinite,enabled:!!b},{type:"membershipRequests",organizationId:null==c?void 0:c.id}),P=_e({...w,paginated:!0},null==c?void 0:c.getMemberships,{keepPreviousData:p.keepPreviousData,infinite:p.infinite,enabled:!!w},{type:"members",organizationId:null==c?void 0:c.id}),O=_e({..._},null==c?void 0:c.getInvitations,{keepPreviousData:m.keepPreviousData,infinite:m.infinite,enabled:!!_},{type:"invitations",organizationId:null==c?void 0:c.id}),A=g.loaded?()=>{var e;return null==(e=g.organization)?void 0:e.getPendingInvitations(t)}:()=>[],U=g.loaded?()=>{var e;return null==(e=g.organization)?void 0:e.getMemberships(n)}:()=>[];t&&(0,i.io)("invitationList in useOrganization","Use the `invitations` property and return value instead.");const{data:C,isValidating:x,mutate:E}=te(y&&t?Pe("invites",c,u,t):null,A);n&&(0,i.io)("membershipList in useOrganization","Use the `memberships` property and return value instead.");const{data:I,isValidating:M,mutate:R}=te(y&&n?Pe("memberships",c,l,n):null,U);return void 0===c?{isLoaded:!1,organization:void 0,invitationList:void 0,membershipList:void 0,membership:void 0,domains:Se,membershipRequests:Se,memberships:Se,invitations:Se}:null===c?{isLoaded:!0,organization:null,invitationList:null,membershipList:null,membership:null,domains:null,membershipRequests:null,memberships:null,invitations:null}:!g.loaded&&c?{isLoaded:!0,organization:c,invitationList:void 0,membershipList:void 0,membership:void 0,domains:Se,membershipRequests:Se,memberships:Se,invitations:Se}:{isLoaded:!M&&!x,organization:c,membershipList:I,membership:(z=d.user.organizationMemberships,T=c.id,z.find((e=>e.organization.id===T))),invitationList:C,unstable__mutate:()=>{R(),E()},domains:S,membershipRequests:k,memberships:P,invitations:O};var z,T};function Pe(e,t,n,r){return[e,t.id,null==n?void 0:n.id,null==n?void 0:n.updatedAt,r.offset,r.limit].filter(Boolean).join("-")}var Oe={data:void 0,count:void 0,isLoading:!1,isFetching:!1,isError:!1,page:void 0,pageCount:void 0,fetchPage:void 0,fetchNext:void 0,fetchPrevious:void 0,hasNextPage:!1,hasPreviousPage:!1,revalidate:void 0,setData:void 0},Ae=e=>{const{userMemberships:t,userInvitations:n,userSuggestions:r}=e||{},o=we(t,{initialPage:1,pageSize:10,keepPreviousData:!1,infinite:!1}),a=we(n,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),s=we(r,{initialPage:1,pageSize:10,status:"pending",keepPreviousData:!1,infinite:!1}),c=le(),l=de(),u=void 0===t?void 0:{initialPage:o.initialPage,pageSize:o.pageSize},d=void 0===n?void 0:{initialPage:a.initialPage,pageSize:a.pageSize,status:a.status},h=void 0===r?void 0:{initialPage:s.initialPage,pageSize:s.pageSize,status:s.status},f=!(!c.loaded||!l),p=_e({...u,paginated:!0},null==l?void 0:l.getOrganizationMemberships,{keepPreviousData:o.keepPreviousData,infinite:o.infinite,enabled:!!u},{type:"userMemberships",userId:null==l?void 0:l.id}),m=_e({...d},null==l?void 0:l.getOrganizationInvitations,{keepPreviousData:a.keepPreviousData,infinite:a.infinite,enabled:!!d},{type:"userInvitations",userId:null==l?void 0:l.id}),g=_e({...h},null==l?void 0:l.getOrganizationSuggestions,{keepPreviousData:s.keepPreviousData,infinite:s.infinite,enabled:!!h},{type:"userSuggestions",userId:null==l?void 0:l.id});if(!f)return{isLoaded:!1,organizationList:void 0,createOrganization:void 0,setActive:void 0,userMemberships:Oe,userInvitations:Oe,userSuggestions:Oe};const y={isLoaded:f,organizationList:(v=l.organizationMemberships,v.map((e=>({membership:e,organization:e.organization})))),setActive:c.setActive,createOrganization:c.createOrganization,userMemberships:p,userInvitations:m,userSuggestions:g};var v;return(0,i.W1)(y,"organizationList","Use `userMemberships` instead."),y},Ue=()=>{(0,i.io)("useOrganizations","Use useOrganizationList, useOrganization, or useClerk instead.");const e=le();return e.loaded?{isLoaded:!0,createOrganization:e.createOrganization,getOrganizationMemberships:e.getOrganizationMemberships,getOrganization:e.getOrganization}:{isLoaded:!1,createOrganization:void 0,getOrganizationMemberships:void 0,getOrganization:void 0}},Ce="undefined"!=typeof window?a.useLayoutEffect:a.useEffect}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return i[e].call(n.exports,n,n.exports,a),n.exports}a.m=i,a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},a.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);a.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((function(e){o[e]=function(){return n[e]}}));return o.default=function(){return n},a.d(i,o),i},a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,n){return a.f[n](e,t),t}),[]))},a.u=function(e){return({45:"userprofile",65:"ui-common",96:"vendors",128:"zxcvbn-common",278:"userbutton",417:"signin",536:"oneTap",578:"organizationlist",592:"zxcvbn-ts-core",703:"organizationswitcher",787:"signup",796:"impersonationfab",837:"organizationprofile",862:"createorganization"}[e]||e)+"_"+a.h().slice(0,6)+"_4.73.10.js"},a.h=function(){return"ec47d86c4a8f0ad93dc1"},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n={},r="@clerk/clerk-js:",a.l=function(e,t,i,o){if(n[e])n[e].push(t);else{var s,c;if(void 0!==i)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==e||d.getAttribute("data-webpack")==r+i){s=d;break}}s||(c=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,a.nc&&s.setAttribute("nonce",a.nc),s.setAttribute("data-webpack",r+i),s.src=e),n[e]=[t];var h=function(t,r){s.onerror=s.onload=null,clearTimeout(f);var i=n[e];if(delete n[e],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((function(e){return e(r)})),t)return t(r)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),c&&document.head.appendChild(s)}},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e}(),function(){var e={468:0};a.f.j=function(t,n){var r=a.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var i=new Promise((function(n,i){r=e[t]=[n,i]}));n.push(r[2]=i);var o=a.p+a.u(t),s=new Error;a.l(o,(function(n){if(a.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",s.name="ChunkLoadError",s.type=i,s.request=o,r[1](s)}}),"chunk-"+t,t)}};var t=function(t,n){var r,i,o=n[0],s=n[1],c=n[2],l=0;if(o.some((function(t){return 0!==e[t]}))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);c&&c(a)}for(t&&t(n);l<o.length;l++)i=o[l],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0},n=globalThis.webpackChunk_clerk_clerk_js=globalThis.webpackChunk_clerk_clerk_js||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var s={};return function(){"use strict";a.r(s);{const e=/(^.*\/@clerk\/clerk-js@)(.+?)(\/dist.*)/;(()=>{try{const t=new URL(document.currentScript.src);let n=new URL(t.href.split("/").slice(0,-1).join("/")).href;n+=n.endsWith("/")?"":"/",a.p=n.replace(e,"$14.73.10$3")}catch(t){}})()}a(8989);var e=a(8517),t=a(5547),n=a(5098),r=a(1101);function i(e,t){return function(e,t){if(!e&&t||e&&!t)return!0;if(!e&&e===t)return!1;if(!e||!t)return!0;try{if(r.Kj.isClientResource(e))return function(e,t){return e.id!==t.id||e.updatedAt.getTime()<t.updatedAt.getTime()||e.sessions.length!==t.sessions.length}(e,t);if(r.Nn.isSessionResource(e))return function(e,t){return e.id!==t.id||e.updatedAt.getTime()<t.updatedAt.getTime()||function(e,t){var n,r,i,o,a,s;if(e.lastActiveOrganizationId!==t.lastActiveOrganizationId)return!0;const c=null===(r=null===(n=e.user)||void 0===n?void 0:n.organizationMemberships)||void 0===r?void 0:r.find((t=>t.organization.id===e.lastActiveOrganizationId)),l=null===(o=null===(i=t.user)||void 0===i?void 0:i.organizationMemberships)||void 0===o?void 0:o.find((t=>t.organization.id===e.lastActiveOrganizationId));return(null==c?void 0:c.role)!==(null==l?void 0:l.role)||(null===(a=null==c?void 0:c.permissions)||void 0===a?void 0:a.length)!==(null===(s=null==l?void 0:l.permissions)||void 0===s?void 0:s.length)}(t,e)}(e,t);if(r.KJ.isUserResource(e))return function(e,t){return e.id!==t.id||e.updatedAt.getTime()<t.updatedAt.getTime()||function(e,t){var n,r;return e.organizationMemberships.length!==t.organizationMemberships.length||(null===(n=e.organizationMemberships[0])||void 0===n?void 0:n.updatedAt)!==(null===(r=t.organizationMemberships[0])||void 0===r?void 0:r.updatedAt)}(t,e)}(e,t)}catch(n){return!0}return!0}(e,t)?t:e}var o=a(6480),c=a(5882);var l=a(600),u=a(9859),d=a(2692);class h{constructor(){this.lock=(0,n.F1)("clerk.lock.refreshSessionToken"),this.workerTimers=(0,e.fx)(),this.timerId=null}startPollingForSessionToken(e){this.timerId||(this.timerId=this.workerTimers.setInterval((()=>{this.lock.acquireLockAndRun(e)}),5e3))}stopPollingForSessionToken(){this.timerId&&(this.workerTimers.clearInterval(this.timerId),this.timerId=null)}}class f{constructor(e){this.clerk=e,this.cookies=(0,n.J4)(),this.poller=null,d.B.on(d.A.TokenUpdate,(({token:e})=>{this.updateSessionCookie(null==e?void 0:e.getRawString())})),this.refreshTokenOnVisibilityChange(),this.startPollingForToken()}setEnvironment(e){this.environment=e,this.setClientUatCookieForDevelopmentInstances()}async setAuthCookiesFromSession(e){this.updateSessionCookie(await(null==e?void 0:e.getToken())),this.setClientUatCookieForDevelopmentInstances()}startPollingForToken(){this.poller||(this.poller=new h),this.poller.startPollingForSessionToken((()=>this.refreshSessionToken()))}refreshTokenOnVisibilityChange(){(0,n.M)()&&document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this.refreshSessionToken()}))}async refreshSessionToken(){if((0,n.M)()&&this.clerk.session)try{this.updateSessionCookie(await this.getNewToken())}catch(e){return this.handleGetTokenError(e)}}getNewToken(){var e;return null===(e=this.clerk.session)||void 0===e?void 0:e.getToken()}setSessionCookie(e){this.cookies.setSessionCookie(e)}updateSessionCookie(e){return e?this.setSessionCookie(e):this.removeSessionCookie()}removeSessionCookie(){this.cookies.removeSessionCookie()}setClientUatCookieForDevelopmentInstances(){this.environment&&this.environment.isDevelopmentOrStaging()&&this.inCustomDevelopmentDomain()&&this.cookies.setClientUatCookie(this.clerk.client)}inCustomDevelopmentDomain(){const e=this.clerk.frontendApi.replace("clerk.","");return!window.location.host.endsWith(e)}handleGetTokenError(e){(0,u.$R)(e)||(0,c.a2)(e.message||e),(0,u.nc)(e)?this.clerk.handleUnauthenticated():(0,u.TX)(e)||(0,c.a2)(e.toString())}}var p,m,g,y,v,b,w,_,S,k,P,O,A,U,C,x,E,I,M,R,z,T,N,L,j,$,F,D,W,V,B,J,q,G,K,H,Y,Z,Q,X,ee,te,ne,re=a(5864),ie=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},oe=function(e,t,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(e,n):i?i.value=n:t.set(e,n),n};const ae={polling:!0,standardBrowser:!0,touchSession:!0,isSatellite:!1,signInUrl:void 0,signUpUrl:void 0,afterSignInUrl:void 0,afterSignUpUrl:void 0,isInterstitial:!1};class se{get version(){return p.version}set sdkMetadata(e){p.sdkMetadata=e}get sdkMetadata(){return p.sdkMetadata}get loaded(){return ie(this,P,"f")}get isSatellite(){return!!(0,n.M)()&&(0,e.VK)(ie(this,C,"f").isSatellite,new URL(window.location.href),!1)}get domain(){if((0,n.M)()){const t=(0,e.Wl)((0,e.VK)(ie(this,m,"f"),new URL(window.location.href)));return"production"===ie(this,k,"f")?(0,e.TV)(t):t}return""}get proxyUrl(){if((0,n.M)()){const t=(0,e.VK)(ie(this,g,"f"),new URL(window.location.href));return(0,e._c)(t)||n.sb.throwInvalidProxyUrl({url:t}),(0,e.zz)(t)}return""}get instanceType(){return ie(this,k,"f")}get isStandardBrowser(){return ie(this,C,"f").standardBrowser||!1}get experimental_canUseCaptcha(){return(0,e.io)("experimental_canUseCaptcha","This is will be dropped in the next major version"),!!ie(this,_,"f")&&ie(this,_,"f").userSettings.signUp.captcha_enabled&&ie(this,C,"f").standardBrowser&&"production"===ie(this,k,"f")}get experimental_captchaSiteKey(){return(0,e.io)("experimental_captchaSiteKey","This is will be dropped in the next major version"),ie(this,_,"f")?ie(this,_,"f").displayConfig.captchaPublicKey:null}get experimental_captchaURL(){return(0,e.io)("experimental_captchaURL","This is will be dropped in the next major version"),ie(this,S,"f")?ie(this,S,"f").buildUrl({path:"cloudflare/turnstile/v0/api.js",pathPrefix:"",search:"?render=explicit"}).toString():null}constructor(a,s){if(this.internal_last_error=null,m.set(this,void 0),g.set(this,void 0),y.set(this,null),v.set(this,null),b.set(this,void 0),w.set(this,null),_.set(this,void 0),S.set(this,void 0),k.set(this,void 0),P.set(this,!1),O.set(this,null),A.set(this,null),U.set(this,[]),C.set(this,{}),x.set(this,null),this.getFapiClient=()=>ie(this,S,"f"),this.isReady=()=>ie(this,P,"f"),this.load=async e=>{ie(this,P,"f")||(oe(this,C,{...ae,...e},"f"),ie(this,C,"f").standardBrowser?oe(this,P,await ie(this,F,"f").call(this),"f"):oe(this,P,await ie(this,D,"f").call(this),"f"))},this.signOut=async(e,t)=>{var r;if(!this.client||0===this.client.sessions.length)return;const i="function"==typeof e?e:void 0,o=e&&"object"==typeof e?e:t||{};if(!o.sessionId||1===this.client.activeSessions.length)return await this.client.destroy(),this.setActive({session:null,beforeEmit:(0,n.ez)(i)});const a=this.client.activeSessions.find((e=>e.id===o.sessionId)),s=(null==a?void 0:a.id)&&(null===(r=this.session)||void 0===r?void 0:r.id)===a.id;return await(null==a?void 0:a.remove()),s?this.setActive({session:null,beforeEmit:(0,n.ez)(i)}):void 0},this.openGoogleOneTap=e=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted({preloadHint:"GoogleOneTap"}).then((t=>t.openModal("googleOneTap",e||{})))},this.closeGoogleOneTap=()=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((e=>e.closeModal("googleOneTap")))},this.openSignIn=e=>{if(this.assertComponentsReady(ie(this,b,"f")),(0,n.QP)(this,ie(this,_,"f"))&&"development"===ie(this,k,"f"))return console.info(re.A.cannotOpenSignUpOrSignUp);ie(this,b,"f").ensureMounted({preloadHint:"SignIn"}).then((t=>t.openModal("signIn",e||{})))},this.closeSignIn=()=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((e=>e.closeModal("signIn")))},this.openSignUp=e=>{if(this.assertComponentsReady(ie(this,b,"f")),(0,n.QP)(this,ie(this,_,"f"))&&"development"===ie(this,k,"f"))return console.info(re.A.cannotOpenSignUpOrSignUp);ie(this,b,"f").ensureMounted({preloadHint:"SignUp"}).then((t=>t.openModal("signUp",e||{})))},this.closeSignUp=()=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((e=>e.closeModal("signUp")))},this.openUserProfile=e=>{if(this.assertComponentsReady(ie(this,b,"f")),(0,n.vV)(this)&&"development"===ie(this,k,"f"))return console.info(re.A.cannotOpenUserProfile);ie(this,b,"f").ensureMounted({preloadHint:"UserProfile"}).then((t=>t.openModal("userProfile",e||{})))},this.closeUserProfile=()=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((e=>e.closeModal("userProfile")))},this.openOrganizationProfile=e=>{if(this.assertComponentsReady(ie(this,b,"f")),(0,n.FW)(this)&&"development"===ie(this,k,"f"))return console.info(re.A.cannotOpenOrgProfile);ie(this,b,"f").ensureMounted({preloadHint:"OrganizationProfile"}).then((t=>t.openModal("organizationProfile",e||{})))},this.closeOrganizationProfile=()=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((e=>e.closeModal("organizationProfile")))},this.openCreateOrganization=e=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted({preloadHint:"CreateOrganization"}).then((t=>t.openModal("createOrganization",e||{})))},this.closeCreateOrganization=()=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((e=>e.closeModal("createOrganization")))},this.mountSignIn=(e,t)=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted({preloadHint:"SignIn"}).then((n=>n.mountComponent({name:"SignIn",appearanceKey:"signIn",node:e,props:t})))},this.unmountSignIn=e=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((t=>t.unmountComponent({node:e})))},this.mountSignUp=(e,t)=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted({preloadHint:"SignUp"}).then((n=>n.mountComponent({name:"SignUp",appearanceKey:"signUp",node:e,props:t})))},this.unmountSignUp=e=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((t=>t.unmountComponent({node:e})))},this.mountUserProfile=(e,t)=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted({preloadHint:"UserProfile"}).then((n=>n.mountComponent({name:"UserProfile",appearanceKey:"userProfile",node:e,props:t})))},this.unmountUserProfile=e=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((t=>t.unmountComponent({node:e})))},this.mountOrganizationProfile=(e,t)=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted({preloadHint:"OrganizationProfile"}).then((n=>n.mountComponent({name:"OrganizationProfile",appearanceKey:"userProfile",node:e,props:t})))},this.unmountOrganizationProfile=e=>{this.assertComponentsReady(ie(this,b,"f")),ie(this,b,"f").ensureMounted().then((t=>t.unmountComponent({node:e})))},this.mountCreateOrganization=(e,t)=>{var n;this.assertComponentsReady(ie(this,b,"f")),null===(n=ie(this,b,"f"))||void 0===n||n.ensureMounted({preloadHint:"CreateOrganization"}).then((n=>n.mountComponent({name:"CreateOrganization",appearanceKey:"createOrganization",node:e,props:t})))},this.unmountCreateOrganization=e=>{var t;this.assertComponentsReady(ie(this,b,"f")),null===(t=ie(this,b,"f"))||void 0===t||t.ensureMounted().then((t=>t.unmountComponent({node:e})))},this.mountOrganizationSwitcher=(e,t)=>{var n;this.assertComponentsReady(ie(this,b,"f")),null===(n=ie(this,b,"f"))||void 0===n||n.ensureMounted({preloadHint:"OrganizationSwitcher"}).then((n=>n.mountComponent({name:"OrganizationSwitcher",appearanceKey:"organizationSwitcher",node:e,props:t})))},this.unmountOrganizationSwitcher=e=>{var t;this.assertComponentsReady(ie(this,b,"f")),null===(t=ie(this,b,"f"))||void 0===t||t.ensureMounted().then((t=>t.unmountComponent({node:e})))},this.mountOrganizationList=(e,t)=>{var n;this.assertComponentsReady(ie(this,b,"f")),null===(n=ie(this,b,"f"))||void 0===n||n.ensureMounted({preloadHint:"OrganizationList"}).then((n=>n.mountComponent({name:"OrganizationList",appearanceKey:"organizationList",node:e,props:t})))},this.unmountOrganizationList=e=>{var t;this.assertComponentsReady(ie(this,b,"f")),null===(t=ie(this,b,"f"))||void 0===t||t.ensureMounted().then((t=>t.unmountComponent({node:e})))},this.mountUserButton=(e,t)=>{var n;this.assertComponentsReady(ie(this,b,"f")),null===(n=ie(this,b,"f"))||void 0===n||n.ensureMounted({preloadHint:"UserButton"}).then((n=>n.mountComponent({name:"UserButton",appearanceKey:"userButton",node:e,props:t})))},this.unmountUserButton=e=>{var t;this.assertComponentsReady(ie(this,b,"f")),null===(t=ie(this,b,"f"))||void 0===t||t.ensureMounted().then((t=>t.unmountComponent({node:e})))},this.setActive=async({session:t,organization:r,beforeEmit:i})=>{var o;if(!this.client)throw new Error("setActive is being called before the client is loaded. Wait for init.");if(void 0===t&&!this.session)throw new Error("setActive should either be called with a session param or there should be already an active session.");const a="undefined"!=typeof window&&"function"==typeof window.__unstable__onBeforeSetActive?window.__unstable__onBeforeSetActive:e.lQ,s="undefined"!=typeof window&&"function"==typeof window.__unstable__onAfterSetActive?window.__unstable__onAfterSetActive:e.lQ;"string"==typeof t&&(t=this.client.sessions.find((e=>e.id===t))||null);let c=void 0===t?this.session:t;if(c&&void 0!==r){const e="string"==typeof r?r:null==r?void 0:r.id;c.lastActiveOrganizationId=e||null}this.session&&null===c&&ie(this,q,"f").call(this),a(),!(0,n.Z$)()&&ie(this,C,"f").standardBrowser||(await ie(this,B,"f").call(this,c),c=ie(this,Z,"f").call(this,null==c?void 0:c.id)),await(null===(o=ie(this,y,"f"))||void 0===o?void 0:o.setAuthCookiesFromSession(c));const l=(0,n.T0)();i&&(l.startTracking(),ie(this,K,"f").call(this),await i(c),l.stopTracking()),l.isUnloading()||(ie(this,Y,"f").call(this,c),ie(this,J,"f").call(this),s(),ie(this,G,"f").call(this))},this.setSession=async(t,n)=>((0,e.io)("setSession","Use `setActive` instead.","clerk:setSession"),this.setActive({session:t,beforeEmit:n})),this.addListener=e=>(e=function(e){let t;return n=>{var r,o;t||(t={...n}),t={...(r=t,o=n,{client:i(r.client,o.client),session:i(r.session,o.session),user:i(r.user,o.user),organization:i(r.organization,o.organization),lastOrganizationInvitation:i(r.lastOrganizationInvitation,o.lastOrganizationInvitation),lastOrganizationMember:i(r.lastOrganizationMember,o.lastOrganizationMember)})},e(t)}}(e),ie(this,U,"f").push(e),this.client&&e({client:this.client,session:this.session,user:this.user,organization:this.organization,lastOrganizationInvitation:ie(this,O,"f"),lastOrganizationMember:ie(this,A,"f")}),()=>{oe(this,U,ie(this,U,"f").filter((t=>t!==e)),"f")}),this.navigate=async e=>{if(!e||!(0,n.M)())return;let t=new URL(e,window.location.href);"http:"!==t.protocol&&"https:"!==t.protocol&&(console.warn("Clerk: Not a valid protocol. Redirecting to /"),t=new URL("/",window.location.href));const r=ie(this,C,"f").navigate;if(t.origin===window.location.origin&&r)return await r((0,n.FV)(t));(0,n.y7)(t)},E.set(this,(async()=>{if(!(0,n.M)())return;const t=new URLSearchParams({[o.rt]:"true"}),r=(0,n.hI)(o.MC);r&&(0,e.RE)(r)||(0,c.U6)();const i=(0,n.kZ)({base:(0,n.hI)(o.MC),searchParams:t},{stringify:!0});return this.navigate(this.buildUrlWithAuth(i))})),this.redirectWithAuth=async e=>{if((0,n.M)())return this.navigate(this.buildUrlWithAuth(e))},this.redirectToSignIn=async e=>{if((0,n.M)())return this.navigate(this.buildSignInUrl(e))},this.redirectToSignUp=async e=>{if((0,n.M)())return this.navigate(this.buildSignUpUrl(e))},this.redirectToUserProfile=async()=>{if((0,n.M)())return this.navigate(this.buildUserProfileUrl())},this.redirectToCreateOrganization=async()=>{if((0,n.M)())return this.navigate(this.buildCreateOrganizationUrl())},this.redirectToOrganizationProfile=async()=>{if((0,n.M)())return this.navigate(this.buildOrganizationProfileUrl())},this.redirectToHome=async()=>{if((0,n.M)())return this.navigate(this.buildHomeUrl())},this.handleMagicLinkVerification=async(t,i)=>{if((0,e.io)("handleMagicLinkVerification","Use `handleEmailLinkVerification` instead."),!this.client)return;const o=(0,n.hI)("__clerk_status");if("expired"===o)throw new r.gS(r.dB.Expired);if("verified"!==o)throw new r.gS(r.dB.Failed);const a=(0,n.hI)("__clerk_created_session"),{signIn:s,signUp:c,sessions:l}=this.client,u=l.some((e=>e.id===a)),d="needs_second_factor"===s.status||"missing_requirements"===c.status,h=e=>i&&"function"==typeof i?i(e):this.navigate(e),f=t.redirectUrlComplete?()=>h(t.redirectUrlComplete):e.lQ,p=t.redirectUrl?()=>h(t.redirectUrl):e.lQ;return u?this.setActive({session:a,beforeEmit:f}):d?p():("function"==typeof t.onVerifiedOnOtherDevice&&t.onVerifiedOnOtherDevice(),null)},this.handleEmailLinkVerification=async(t,i)=>{if(!this.client)return;const o=(0,n.hI)("__clerk_status");if("expired"===o)throw new r.NZ(r.Ys.Expired);if("verified"!==o)throw new r.NZ(r.Ys.Failed);const a=(0,n.hI)("__clerk_created_session"),{signIn:s,signUp:c,sessions:l}=this.client,u=l.some((e=>e.id===a)),d="needs_second_factor"===s.status||"missing_requirements"===c.status,h=e=>i&&"function"==typeof i?i(e):this.navigate(e),f=t.redirectUrlComplete?()=>h(t.redirectUrlComplete):e.lQ,p=t.redirectUrl?()=>h(t.redirectUrl):e.lQ;return u?this.setActive({session:a,beforeEmit:f}):d?p():("function"==typeof t.onVerifiedOnOtherDevice&&t.onVerifiedOnOtherDevice(),null)},this.handleGoogleOneTapCallback=async(e,t,n)=>{if(!ie(this,P,"f")||!ie(this,_,"f")||!this.client)return;const{signIn:r,signUp:i}=this.client,o="identifier"in(e||{})?e:r,a="missingFields"in(e||{})?e:i;return this._handleRedirectCallback(t,{signUp:a,signIn:o,navigate:e=>n&&"function"==typeof n?n(this.buildUrlWithAuth(e)):this.navigate(this.buildUrlWithAuth(e))})},this._handleRedirectCallback=async(e,{signIn:r,signUp:i,navigate:o})=>{var a,s,l,u,d,h;if(!this.loaded||!ie(this,_,"f")||!this.client)return;const{displayConfig:f}=ie(this,_,"f"),{firstFactorVerification:p}=r,{externalAccount:m}=i.verifications,g={status:i.status,missingFields:i.missingFields,externalAccountStatus:m.status,externalAccountErrorCode:null===(a=m.error)||void 0===a?void 0:a.code,externalAccountSessionId:null===(l=null===(s=m.error)||void 0===s?void 0:s.meta)||void 0===l?void 0:l.sessionId,sessionId:i.createdSessionId},y={status:r.status,firstFactorVerificationStatus:p.status,firstFactorVerificationErrorCode:null===(u=p.error)||void 0===u?void 0:u.code,firstFactorVerificationSessionId:null===(h=null===(d=p.error)||void 0===d?void 0:d.meta)||void 0===h?void 0:h.sessionId,sessionId:r.createdSessionId},v=e=>()=>o(e),b=v(f.signInUrl),w=v(f.signUpUrl),S=v(e.firstFactorUrl||(0,n.kZ)({base:f.signInUrl,hashPath:"/factor-one"},{stringify:!0})),k=v(e.secondFactorUrl||(0,n.kZ)({base:f.signInUrl,hashPath:"/factor-two"},{stringify:!0})),P=v(e.resetPasswordUrl||(0,n.kZ)({base:f.signInUrl,hashPath:"/reset-password"},{stringify:!0})),O=v(e.afterSignInUrl||e.redirectUrl||f.afterSignInUrl),A=v(e.afterSignUpUrl||e.redirectUrl||f.afterSignUpUrl),U=v(e.continueSignUpUrl||(0,n.kZ)({base:f.signUpUrl,hashPath:"/continue"},{stringify:!0})),C=({missingFields:r})=>r.length?U():(0,t.A)({signUp:i,verifyEmailPath:e.verifyEmailAddressUrl||(0,n.kZ)({base:f.signUpUrl,hashPath:"/verify-email-address"},{stringify:!0}),verifyPhonePath:e.verifyPhoneNumberUrl||(0,n.kZ)({base:f.signUpUrl,hashPath:"/verify-phone-number"},{stringify:!0}),navigate:o});if("complete"===y.status)return this.setActive({session:y.sessionId,beforeEmit:O});if("transferable"===g.externalAccountStatus&&"external_account_exists"===g.externalAccountErrorCode){const e=await r.create({transfer:!0});switch(e.status){case"complete":return this.setActive({session:e.createdSessionId,beforeEmit:O});case"needs_first_factor":return S();case"needs_second_factor":return k();case"needs_new_password":return P();default:(0,c.z$)("sign in")}}const x="user_locked"===y.firstFactorVerificationErrorCode;if("user_locked"===g.externalAccountErrorCode)return w();if(x)return b();if("needs_first_factor"===y.status)return S();if("needs_new_password"===y.status)return P();if("transferable"===y.firstFactorVerificationStatus){const e=await i.create({transfer:!0});switch(e.status){case"complete":return this.setActive({session:e.createdSessionId,beforeEmit:A});case"missing_requirements":return C({missingFields:e.missingFields});default:(0,c.z$)("sign in")}}if("complete"===g.status)return this.setActive({session:g.sessionId,beforeEmit:A});if("needs_second_factor"===y.status)return k();if(("failed"===g.externalAccountStatus||"unverified"===g.externalAccountStatus)&&"identifier_already_signed_in"===g.externalAccountErrorCode&&g.externalAccountSessionId||"failed"===y.firstFactorVerificationStatus&&"identifier_already_signed_in"===y.firstFactorVerificationErrorCode&&y.firstFactorVerificationSessionId){const e=y.firstFactorVerificationSessionId||g.externalAccountSessionId;if(e)return this.setActive({session:e,beforeEmit:O})}return(0,n.rM)(i)?w():"verified"===g.externalAccountStatus&&"missing_requirements"===g.status?C({missingFields:i.missingFields}):b()},this.handleRedirectCallback=async(e={},t)=>{if(!this.loaded||!ie(this,_,"f")||!this.client)return;const{signIn:n,signUp:r}=this.client;return this._handleRedirectCallback(e,{signUp:r,signIn:n,navigate:e=>t&&"function"==typeof t?t(e):this.navigate(e)})},this.handleUnauthenticated=async(e={broadcast:!0})=>{if(!this.client||!this.session)return;const t=await r.Kj.getInstance().fetch();return this.updateClient(t),this.session?void 0:(e.broadcast&&ie(this,q,"f").call(this),this.setActive({session:null}))},this.authenticateWithGoogleOneTap=async t=>{var n;return null===(n=this.client)||void 0===n?void 0:n.signIn.create({strategy:"google_one_tap",token:t.token}).catch((n=>{var r;if((0,e.$R)(n)&&"external_account_not_found"===n.errors[0].code)return null===(r=this.client)||void 0===r?void 0:r.signUp.create({strategy:"google_one_tap",token:t.token});throw n}))},this.authenticateWithMetamask=async({redirectUrl:e,signUpContinueUrl:t,customNavigate:r,unsafeMetadata:i}={})=>{if(!this.client||!ie(this,_,"f"))return;const a=e=>r&&"function"==typeof r?r(e):this.navigate(e);let s;try{s=await this.client.signIn.authenticateWithMetamask()}catch(c){if(!(0,n.bJ)(c,o.OQ.FORM_IDENTIFIER_NOT_FOUND))throw c;s=await this.client.signUp.authenticateWithMetamask({unsafeMetadata:i}),t&&"missing_requirements"===s.status&&"verified"===s.verifications.web3Wallet.status&&await a(t)}s.createdSessionId&&await this.setActive({session:s.createdSessionId,beforeEmit:()=>e?a(e):Promise.resolve()})},this.createOrganization=async({name:e,slug:t})=>r.yb.create({name:e,slug:t}),this.getOrganizationMemberships=async()=>((0,e.io)("getOrganizationMemberships","Use User.getOrganizationMemberships"),await r.i7.retrieve()),this.getOrganization=async e=>r.yb.get(e),this.__internal_setCountry=e=>{this.__internal_country||(this.__internal_country=e)},this.updateClient=e=>{if(!this.client){const t=ie(this,C,"f").selectInitialSession?ie(this,C,"f").selectInitialSession(e):ie(this,W,"f").call(this,e);ie(this,Y,"f").call(this,t)}if(this.client=e,this.session){const e=ie(this,Z,"f").call(this,this.session.id);ie(this,Y,"f").call(this,e)}ie(this,J,"f").call(this)},this.__unstable__setEnvironment=async e=>{oe(this,_,new r.OH(e),"f"),p.mountComponentRenderer&&oe(this,b,p.mountComponentRenderer(this,ie(this,_,"f"),ie(this,C,"f")),"f")},this.__unstable__onBeforeRequest=e=>{ie(this,S,"f").onBeforeRequest(e)},this.__unstable__onAfterResponse=e=>{ie(this,S,"f").onAfterResponse(e)},this.__unstable__updateProps=e=>{var t;return null===(t=ie(this,b,"f"))||void 0===t?void 0:t.ensureMounted().then((t=>t.updateProps(e)))},I.set(this,(()=>"true"===(0,n.hI)(o.rt))),M.set(this,(()=>(0,n.rw)(o.rt))),R.set(this,(()=>{const e=new URLSearchParams({[o.MC]:window.location.href});return(0,n.kZ)({base:ie(this,C,"f").signInUrl,searchParams:e},{stringify:!0})})),z.set(this,(()=>{let e;if(this.proxyUrl){const t=new URL(this.proxyUrl);e=new URL(`${t.pathname}/v1/client/sync`,t.origin)}else this.domain&&(e=new URL("/v1/client/sync",`https://${this.domain}`));return null==e||e.searchParams.append("redirect_url",window.location.href),(null==e?void 0:e.toString())||""})),T.set(this,(()=>ie(this,I,"f").call(this)?(ie(this,C,"f").isInterstitial||ie(this,M,"f").call(this),!1):!!this.isSatellite&&(0,n.J4)().getClientUatCookie()<=0)),N.set(this,(()=>"production"!==ie(this,k,"f")&&(!this.isSatellite&&!!(0,n.hI)(o.MC)))),L.set(this,(async()=>{"development"===this.instanceType?await this.navigate(ie(this,R,"f").call(this)):"production"===this.instanceType&&await this.navigate(ie(this,z,"f").call(this))})),j.set(this,((e,t)=>{let n;try{n=new URL(e)}catch{(0,c.ZX)()}n.origin===t&&(0,c.ut)()})),$.set(this,(()=>{this.isSatellite&&("development"!==ie(this,k,"f")||ie(this,C,"f").signInUrl||(0,c.gY)(),this.proxyUrl||this.domain||(0,c.iq)(),ie(this,C,"f").signInUrl&&ie(this,j,"f").call(this,ie(this,C,"f").signInUrl,window.location.origin))})),F.set(this,(async()=>{if(oe(this,w,function({frontendApi:e,fapiClient:t}){const r=(0,n.J4)(),i=o.ZA;let a=!0;function s(){return localStorage.getItem(i)}function l(e){localStorage.setItem(i,e),r.setDevBrowserCookie(e)}function u(){localStorage.removeItem(i),r.removeDevBrowserCookie()}function d(){return a}return{clear:async function(){return u(),r.removeAllDevBrowserCookies(),Promise.resolve()},setup:async function(){const i=(0,n.DY)(e),u=(0,n.DY)(window.location.host),h=r.getDevBrowserCookie();if(h&&(r.removeDevBrowserCookie(),r.setDevBrowserCookie(h)),i&&(t.onBeforeRequest((e=>{var t;const n=s();n&&(null===(t=e.url)||void 0===t||t.searchParams.set(o.tK,n))})),t.onAfterResponse(((e,t)=>{var n;const r=null===(n=null==t?void 0:t.headers)||void 0===n?void 0:n.get(o.k2);r&&l(r)}))),await async function(){const e=(0,n.aC)(new URL(window.location.href));if(e)return void l(e);if(null!==s())return;const r=t.buildUrl({path:"/dev_browser"}),i=await fetch(r.toString(),{method:"POST"});if(200===i.status){a=!0;const e=await i.json();l(null==e?void 0:e.token)}else a=!1}(),!d())return u&&!r.getDevBrowserInittedCookie()?async function(){const e=t.buildUrl({method:"POST",path:"/dev_browser/set_first_party_cookie"});(await fetch(e.toString(),{method:"POST",credentials:"include"})).ok||(0,c.eS)(),r.setDevBrowserInittedCookie()}():u||!i||s()?void 0:async function(){const t=`https://${e}`,i=window.location.origin,o=window.location.href,a=(0,n.kZ)({base:t,pathname:"/v1/dev_browser/init",search:`origin=${i}&redirect=${o}`},{stringify:!0});try{const{browserToken:e}=await(0,n.gm)({src:a,eventOrigin:t});if(!e)throw"Missing token";l(e),r.removeSessionCookie()}catch(s){(0,c.eS)(s.message||s)}}()},getDevBrowserJWT:s,setDevBrowserJWT:l,usesUrlBasedSessionSync:d,removeDevBrowserJWT:u}}({frontendApi:this.frontendApi,fapiClient:ie(this,S,"f")}),"f"),ie(this,$,"f").call(this),ie(this,T,"f").call(this))return await ie(this,L,"f").call(this),!1;if("production"===ie(this,k,"f")?await ie(this,w,"f").clear():await ie(this,w,"f").setup(),ie(this,N,"f").call(this))return await ie(this,E,"f").call(this),!1;oe(this,y,new f(this),"f"),oe(this,x,(0,n.wO)(),"f");const t=(0,n.zi)(null===window||void 0===window?void 0:window.location.hostname);ie(this,V,"f").call(this);let i=0;for(;i<2;){i++;try{const e="development"===ie(this,k,"f")&&!t,[n,i]=await Promise.all([r.OH.getInstance().fetch({touch:e}),r.Kj.getInstance().fetch()]);if(this.updateClient(i),this.updateEnvironment(n),await ie(this,te,"f").call(this))return!1;p.mountComponentRenderer&&oe(this,b,p.mountComponentRenderer(this,ie(this,_,"f"),ie(this,C,"f")),"f");break}catch(a){if(!(0,n.bJ)(a,"dev_browser_unauthenticated")){if((0,e.CS)())throw a;return console.warn(a),!1}await ie(this,w,"f").clear(),await ie(this,w,"f").setup()}i>=2&&(0,c.BF)()}return ie(this,ne,"f").call(this),ie(this,X,"f").call(this),!0})),D.set(this,(async()=>{const[e,t]=await Promise.all([r.OH.getInstance().fetch({touch:!1}),r.Kj.getInstance().fetch()]);return oe(this,_,e,"f"),this.updateClient(t),p.mountComponentRenderer&&oe(this,b,p.mountComponentRenderer(this,ie(this,_,"f"),ie(this,C,"f")),"f"),!0})),W.set(this,(e=>{if(e.lastActiveSessionId){const t=e.activeSessions.find((t=>t.id===e.lastActiveSessionId));if(t)return t}return e.activeSessions[0]||null})),V.set(this,(()=>{var t,n;(0,e.M)()&&(null===(t=ie(this,x,"f"))||void 0===t||t.onPageVisible((()=>{this.session&&ie(this,B,"f").call(this,this.session)})),null===(n=ie(this,v,"f"))||void 0===n||n.addEventListener("message",(({data:e})=>{"signout"===e.type&&this.handleUnauthenticated({broadcast:!1})})))})),B.set(this,(async t=>{if(!t||!ie(this,C,"f").touchSession)return Promise.resolve();await t.touch().catch((t=>{(0,e.nc)(t)&&this.handleUnauthenticated()}))})),J.set(this,(()=>{if(this.client)for(const e of ie(this,U,"f"))e({client:this.client,session:this.session,user:this.user,organization:this.organization,lastOrganizationInvitation:ie(this,O,"f"),lastOrganizationMember:ie(this,A,"f")})})),q.set(this,(()=>{var e;null===(e=ie(this,v,"f"))||void 0===e||e.postMessage({type:"signout"})})),G.set(this,(()=>{p.mountComponentRenderer&&(this.closeSignUp(),this.closeSignIn())})),K.set(this,(()=>{this.session=void 0,this.organization=void 0,this.user=void 0,ie(this,J,"f").call(this)})),H.set(this,(()=>{var e;return((null===(e=this.session)||void 0===e?void 0:e.user.organizationMemberships)||[]).map((e=>e.organization)).find((e=>{var t;return e.id===(null===(t=this.session)||void 0===t?void 0:t.lastActiveOrganizationId)}))||null})),Y.set(this,(e=>{this.session=e||null,this.organization=ie(this,H,"f").call(this),ie(this,Q,"f").call(this)})),Z.set(this,(e=>{var t;return(null===(t=this.client)||void 0===t?void 0:t.activeSessions.find((t=>t.id===e)))||null})),Q.set(this,(()=>{this.user=this.session?this.session.user:null})),X.set(this,(()=>{this.addListener((({session:e})=>{var t;(null==e?void 0:e.actor)&&(null===(t=ie(this,b,"f"))||void 0===t||t.ensureMounted().then((e=>e.mountImpersonationFab())))}))})),ee.set(this,((e,t)=>{if(!ie(this,P,"f")||!ie(this,_,"f")||!ie(this,_,"f").displayConfig)return"";const r=(0,n.VH)(e,{options:ie(this,C,"f"),displayConfig:ie(this,_,"f").displayConfig},!1),i={afterSignInUrl:(0,n.VH)("afterSignInUrl",{ctx:t,options:ie(this,C,"f")},!1),afterSignUpUrl:(0,n.VH)("afterSignUpUrl",{ctx:t,options:ie(this,C,"f")},!1),redirectUrl:(null==t?void 0:t.redirectUrl)||window.location.href};return Object.keys(i).forEach((function(e){const t=i[e];t&&(i[e]=(0,n.Z0)((0,n.Xz)(t),(0,n.Xz)(r)))})),this.buildUrlWithAuth((0,n.$7)(r,{...i,...null==t?void 0:t.initialValues}))})),te.set(this,(async()=>{var e,t;const r=new URLSearchParams(window.location.search).get("redirect_url"),i="production"===this.instanceType,o=null!==r&&(0,n.l1)(this.frontendApi,r);if(i||!o)return!1;const a=this.session,s=ie(this,C,"f").signInUrl||(null===(e=ie(this,_,"f"))||void 0===e?void 0:e.displayConfig.signInUrl),c=s&&window.location.href.startsWith(s),l=ie(this,C,"f").signUpUrl||(null===(t=ie(this,_,"f"))||void 0===t?void 0:t.displayConfig.signUpUrl),u=l&&window.location.href.startsWith(l);return!((0,n.AC)(r)&&!a&&(c||u)||(await this.navigate(this.buildUrlWithAuth(r)),0))})),ne.set(this,(()=>{try{(0,n.rw)("__clerk_handshake"),(0,n.rw)("__clerk_help")}catch(e){}})),a=(a||"").trim(),oe(this,m,null==s?void 0:s.domain,"f"),oe(this,g,null==s?void 0:s.proxyUrl,"f"),(0,e.r7)(a))(0,e.io)("frontendApi","Use `publishableKey` instead."),(0,n.RA)(a)||n.sb.throwInvalidFrontendApiError({key:a}),this.frontendApi=a,oe(this,k,(0,n.DY)(this.frontendApi)?"development":"production","f");else{const t=(0,e.q5)(a);t||n.sb.throwInvalidPublishableKeyError({key:a});const{frontendApi:r,instanceType:i}=t;this.publishableKey=a,this.frontendApi=r,oe(this,k,i,"f")}oe(this,S,(0,l.A)(this),"f"),r.Qx.clerk=this}buildUrlWithAuth(t){var n,r;if("production"===ie(this,k,"f")||!(null===(n=ie(this,w,"f"))||void 0===n?void 0:n.usesUrlBasedSessionSync()))return t;const i=new URL(t,window.location.origin);if(i.origin===window.location.origin)return i.href;const o=null===(r=ie(this,w,"f"))||void 0===r?void 0:r.getDevBrowserJWT();return o?(0,e.Js)(i,o).href:(0,c.IJ)()}buildSignInUrl(e){return ie(this,ee,"f").call(this,"signInUrl",e)}buildSignUpUrl(e){return ie(this,ee,"f").call(this,"signUpUrl",e)}buildUserProfileUrl(){return ie(this,_,"f")&&ie(this,_,"f").displayConfig?this.buildUrlWithAuth(ie(this,_,"f").displayConfig.userProfileUrl):""}buildHomeUrl(){return ie(this,_,"f")&&ie(this,_,"f").displayConfig?this.buildUrlWithAuth(ie(this,_,"f").displayConfig.homeUrl):""}buildCreateOrganizationUrl(){return ie(this,_,"f")&&ie(this,_,"f").displayConfig?this.buildUrlWithAuth(ie(this,_,"f").displayConfig.createOrganizationUrl):""}buildOrganizationProfileUrl(){return ie(this,_,"f")&&ie(this,_,"f").displayConfig?this.buildUrlWithAuth(ie(this,_,"f").displayConfig.organizationProfileUrl):""}updateEnvironment(e){var t;oe(this,_,e,"f"),null===(t=ie(this,y,"f"))||void 0===t||t.setEnvironment(e)}get __internal_last_error(){const e=this.internal_last_error;return this.internal_last_error=null,e}set __internal_last_error(e){this.internal_last_error=e}__unstable__invitationUpdate(t){(0,e.io)("__unstable__invitationUpdate","We are completely dropping this method as it was introduced for internal use only"),oe(this,O,t,"f"),ie(this,J,"f").call(this)}__unstable__membershipUpdate(t){(0,e.io)("__unstable__membershipUpdate","We are completely dropping this method as it was introduced for internal use only"),oe(this,A,t,"f"),ie(this,J,"f").call(this)}get __unstable__environment(){return ie(this,_,"f")}__internal_navigateWithError(e,t){return this.__internal_last_error=t,this.navigate(e)}__internal_getFrameworkHint(){var e,t;try{if("undefined"==typeof window||"undefined"==typeof document)return{framework:void 0,version:void 0};const n=window;return n.__NEXT_DATA__||n.document.querySelector("#__next")||(null===(e=n.next)||void 0===e?void 0:e.version)?{framework:"nextjs",version:null===(t=n.next)||void 0===t?void 0:t.version}:{framework:void 0,version:void 0}}catch(n){return{framework:void 0,version:void 0}}}assertComponentsReady(e){if(!p.mountComponentRenderer)throw new Error("ClerkJS was loaded without UI components.");if(!e)throw new Error("ClerkJS components are not ready yet.")}}p=se,m=new WeakMap,g=new WeakMap,y=new WeakMap,v=new WeakMap,b=new WeakMap,w=new WeakMap,_=new WeakMap,S=new WeakMap,k=new WeakMap,P=new WeakMap,O=new WeakMap,A=new WeakMap,U=new WeakMap,C=new WeakMap,x=new WeakMap,E=new WeakMap,I=new WeakMap,M=new WeakMap,R=new WeakMap,z=new WeakMap,T=new WeakMap,N=new WeakMap,L=new WeakMap,j=new WeakMap,$=new WeakMap,F=new WeakMap,D=new WeakMap,W=new WeakMap,V=new WeakMap,B=new WeakMap,J=new WeakMap,q=new WeakMap,G=new WeakMap,K=new WeakMap,H=new WeakMap,Y=new WeakMap,Z=new WeakMap,Q=new WeakMap,X=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,se.version="4.73.10",se.sdkMetadata={name:"@clerk/clerk-js",version:"4.73.10"};var ce=se,le=a(4380),ue=a(4654),de=a(4041),he=a(2797);const fe={SignIn:()=>Promise.all([a.e(96),a.e(65),a.e(417)]).then(a.bind(a,739)),SignUp:()=>Promise.all([a.e(96),a.e(65),a.e(787)]).then(a.bind(a,5685)),UserButton:()=>Promise.all([a.e(96),a.e(65),a.e(278)]).then(a.bind(a,1906)),UserProfile:()=>Promise.all([a.e(96),a.e(65),a.e(45)]).then(a.bind(a,9937)),CreateOrganization:()=>Promise.all([a.e(96),a.e(65),a.e(916),a.e(862)]).then(a.bind(a,2525)),OrganizationProfile:()=>Promise.all([a.e(96),a.e(65),a.e(837)]).then(a.bind(a,114)),OrganizationSwitcher:()=>Promise.all([a.e(96),a.e(65),a.e(703)]).then(a.bind(a,8770)),OrganizationList:()=>Promise.all([a.e(96),a.e(65),a.e(916),a.e(578)]).then(a.bind(a,8382)),ImpersonationFab:()=>Promise.all([a.e(96),a.e(65),a.e(796)]).then(a.bind(a,9009)),GoogleOneTap:()=>Promise.all([a.e(96),a.e(65),a.e(536)]).then(a.bind(a,7187))},pe=(0,de.lazy)((()=>fe.SignIn().then((e=>({default:e.SignIn}))))),me=(0,de.lazy)((()=>fe.SignIn().then((e=>({default:e.SignInModal}))))),ge=(0,de.lazy)((()=>fe.GoogleOneTap().then((e=>({default:e.OneTap}))))),ye=(0,de.lazy)((()=>fe.SignUp().then((e=>({default:e.SignUp}))))),ve=(0,de.lazy)((()=>fe.SignUp().then((e=>({default:e.SignUpModal}))))),be=(0,de.lazy)((()=>fe.UserButton().then((e=>({default:e.UserButton}))))),we=(0,de.lazy)((()=>fe.UserProfile().then((e=>({default:e.UserProfile}))))),_e=(0,de.lazy)((()=>fe.UserProfile().then((e=>({default:e.UserProfileModal}))))),Se=(0,de.lazy)((()=>fe.CreateOrganization().then((e=>({default:e.CreateOrganization}))))),ke=(0,de.lazy)((()=>fe.CreateOrganization().then((e=>({default:e.CreateOrganizationModal}))))),Pe=(0,de.lazy)((()=>fe.OrganizationProfile().then((e=>({default:e.OrganizationProfile}))))),Oe=(0,de.lazy)((()=>fe.OrganizationProfile().then((e=>({default:e.OrganizationProfileModal}))))),Ae=(0,de.lazy)((()=>fe.OrganizationSwitcher().then((e=>({default:e.OrganizationSwitcher}))))),Ue=(0,de.lazy)((()=>fe.OrganizationList().then((e=>({default:e.OrganizationList}))))),Ce=(0,de.lazy)((()=>fe.ImpersonationFab().then((e=>({default:e.ImpersonationFab}))))),xe={SignIn:pe,SignUp:ye,UserButton:be,UserProfile:we,OrganizationSwitcher:Ae,OrganizationList:Ue,OrganizationProfile:Pe,CreateOrganization:Se,SignInModal:me,SignUpModal:ve,UserProfileModal:_e,OrganizationProfileModal:Oe,CreateOrganizationModal:ke,GoogleOneTap:ge},Ee=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,4740)).then((e=>({default:e.CoreClerkContextWrapper}))))),Ie=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,4740)).then((e=>({default:e.EnvironmentProvider}))))),Me=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,4740)).then((e=>({default:e.OptionsProvider}))))),Re=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,9333)).then((e=>({default:e.AppearanceProvider}))))),ze=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,166)).then((e=>({default:e.VirtualRouter}))))),Te=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,3965)).then((e=>({default:e.InternalThemeProvider}))))),Ne=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,861)).then((e=>({default:e.Portal}))))),Le=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,861)).then((e=>({default:e.VirtualBodyRootPortal}))))),je=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,2932)).then((e=>({default:e.FlowMetadataProvider}))))),$e=(0,de.lazy)((()=>Promise.all([a.e(96),a.e(65)]).then(a.bind(a,2932)).then((e=>({default:e.Modal}))))),Fe=e=>(0,le.Y)(Ee,{clerk:e.clerk,children:(0,le.Y)(Ie,{value:e.environment,children:(0,le.Y)(Me,{value:e.options,children:e.children})})}),De=e=>(0,le.Y)(Re,{globalAppearance:e.globalAppearance,appearanceKey:e.appearanceKey,appearance:e.componentAppearance,children:(0,le.Y)(Ne,{node:e.node,component:xe[e.componentName],props:e.componentProps,componentName:e.componentName})}),We=e=>(0,le.Y)(de.Suspense,{fallback:"",children:(0,le.Y)(Re,{globalAppearance:e.globalAppearance,appearanceKey:e.appearanceKey,appearance:e.componentAppearance,children:(0,le.Y)(je,{flow:e.flowName||"",children:(0,le.Y)(Te,{children:(0,le.Y)($e,{handleClose:e.onClose,containerSx:e.modalContainerSx,contentSx:e.modalContentSx,children:e.startPath?(0,le.Y)(de.Suspense,{children:(0,le.Y)(ze,{startPath:e.startPath,onExternalNavigate:e.onExternalNavigate,children:e.children})}):e.children})})})})}),Ve=e=>(0,le.Y)(de.Suspense,{children:(0,le.Y)(Re,{globalAppearance:e.globalAppearance,appearanceKey:"impersonationFab",children:e.children})}),Be=e=>(0,le.Y)(Re,{globalAppearance:e.globalAppearance,appearanceKey:"oneTap",appearance:e.componentAppearance,children:(0,le.Y)(Le,{startPath:e.startPath,component:xe.GoogleOneTap,props:e.componentProps,componentName:"GoogleOneTap"})});let Je=0;const qe={},Ge=Object.freeze({SignUp:"signUpModal",SignIn:"signInModal",UserProfile:"userProfileModal",OrganizationProfile:"organizationProfileModal",CreateOrganization:"createOrganizationModal"}),Ke=e=>{const[t,r]=de.useState({appearance:e.options.appearance,options:e.options,googleOneTapModal:null,signInModal:null,signUpModal:null,userProfileModal:null,organizationProfileModal:null,createOrganizationModal:null,nodes:new Map,impersonationFab:!1}),{googleOneTapModal:i,signInModal:o,signUpModal:a,userProfileModal:s,organizationProfileModal:l,createOrganizationModal:u,nodes:d}=t,{urlStateParam:h,clearUrlStateParam:f,decodedRedirectParams:p}=(0,he.x)();(0,ue.UQ)((()=>{p&&r((e=>({...e,[Ge[p.componentName]]:!0}))),qe.mountComponent=e=>{const{node:t,name:n,props:i,appearanceKey:o}=e;t||(0,c.$V)(),r((e=>(e.nodes.set(t,{key:"p"+ ++Je,name:n,props:i,appearanceKey:o}),{...e,nodes:d})))},qe.unmountComponent=e=>{const{node:t}=e;r((e=>(e.nodes.delete(t),{...e,nodes:d})))},qe.updateProps=({node:e,props:n,...i})=>{if(e&&n&&"object"==typeof n){const i=t.nodes.get(e);if(i)return i.props={...n},void r((e=>({...e})))}r((e=>({...e,...i})))},qe.closeModal=e=>{f(),r((t=>({...t,[e+"Modal"]:null})))},qe.openModal=(e,t)=>{r((n=>({...n,[e+"Modal"]:t})))},qe.mountImpersonationFab=()=>{r((e=>({...e,impersonationFab:!0})))},e.onComponentsMounted()}),[]);const m=(0,le.Y)(Be,{componentProps:i,globalAppearance:t.appearance,componentAppearance:null==i?void 0:i.appearance,startPath:(0,n.cL)({base:"/one-tap",path:""})}),g=(0,le.FD)(We,{globalAppearance:t.appearance,appearanceKey:"signIn",componentAppearance:null==o?void 0:o.appearance,flowName:"signIn",onClose:()=>qe.closeModal("signIn"),onExternalNavigate:()=>qe.closeModal("signIn"),startPath:(0,n.cL)({base:"/sign-in",path:null==h?void 0:h.path}),componentName:"SignInModal",children:[(0,le.Y)(me,{...o}),(0,le.Y)(ve,{...o})]}),y=(0,le.FD)(We,{globalAppearance:t.appearance,appearanceKey:"signUp",componentAppearance:null==a?void 0:a.appearance,flowName:"signUp",onClose:()=>qe.closeModal("signUp"),onExternalNavigate:()=>qe.closeModal("signUp"),startPath:(0,n.cL)({base:"/sign-up",path:null==h?void 0:h.path}),componentName:"SignUpModal",children:[(0,le.Y)(me,{...a}),(0,le.Y)(ve,{...a})]}),v=(0,le.Y)(We,{globalAppearance:t.appearance,appearanceKey:"userProfile",componentAppearance:null==s?void 0:s.appearance,flowName:"userProfile",onClose:()=>qe.closeModal("userProfile"),onExternalNavigate:()=>qe.closeModal("userProfile"),startPath:(0,n.cL)({base:"/user",path:null==h?void 0:h.path}),componentName:"SignUpModal",modalContainerSx:{alignItems:"center"},modalContentSx:e=>({height:`min(${e.sizes.$176}, calc(100% - ${e.sizes.$12}))`,margin:0}),children:(0,le.Y)(_e,{...s})}),b=(0,le.Y)(We,{globalAppearance:t.appearance,appearanceKey:"organizationProfile",componentAppearance:null==l?void 0:l.appearance,flowName:"organizationProfile",onClose:()=>qe.closeModal("organizationProfile"),onExternalNavigate:()=>qe.closeModal("organizationProfile"),startPath:(0,n.cL)({base:"/organizationProfile",path:null==h?void 0:h.path}),componentName:"OrganizationProfileModal",modalContainerSx:{alignItems:"center"},modalContentSx:e=>({height:`min(${e.sizes.$176}, calc(100% - ${e.sizes.$12}))`,margin:0}),children:(0,le.Y)(Oe,{...l})}),w=(0,le.Y)(We,{globalAppearance:t.appearance,appearanceKey:"createOrganization",componentAppearance:null==u?void 0:u.appearance,flowName:"createOrganization",onClose:()=>qe.closeModal("createOrganization"),onExternalNavigate:()=>qe.closeModal("createOrganization"),startPath:(0,n.cL)({base:"/createOrganization",path:null==h?void 0:h.path}),componentName:"CreateOrganizationModal",modalContainerSx:{alignItems:"center"},modalContentSx:e=>({height:`min(${e.sizes.$120}, calc(100% - ${e.sizes.$12}))`,margin:0}),children:(0,le.Y)(ke,{...u})});return(0,le.Y)(de.Suspense,{fallback:"",children:(0,le.FD)(Fe,{clerk:e.clerk,environment:e.environment,options:t.options,children:[[...d].map((([e,n])=>{var r;return(0,le.Y)(De,{node:e,globalAppearance:t.appearance,appearanceKey:n.appearanceKey,componentAppearance:null===(r=n.props)||void 0===r?void 0:r.appearance,componentName:n.name,componentProps:n.props},n.key)})),i&&m,o&&g,a&&y,s&&v,l&&b,u&&w,t.impersonationFab&&(0,le.Y)(Ve,{globalAppearance:t.appearance,children:(0,le.Y)(Ce,{})})]})})};var He,Ye,Ze,Qe;ce.mountComponentRenderer=(t,n,r)=>{let i,o=document.getElementById("clerk-components");return o||(o=document.createElement("div"),o.setAttribute("id","clerk-components"),document.body.appendChild(o)),{ensureMounted:async s=>{const{preloadHint:c}=s||{};if(!i){const s=(0,e.ph)();c&&(async e=>{var t;null===(t=fe[e])||void 0===t||t.call(fe)})(c),i=Promise.all([a.e(96),a.e(65)]).then(a.bind(a,8131)).then((({createRoot:e})=>(e(o).render((0,le.Y)(Ke,{clerk:t,environment:n,options:r,onComponentsMounted:s.resolve})),s.promise.then((()=>qe)))))}return i.then((e=>e))}}};const Xe=(null===(He=document.querySelector("script[data-clerk-publishable-key]"))||void 0===He?void 0:He.getAttribute("data-clerk-publishable-key"))||window.__clerk_publishable_key||"",et=(null===(Ye=document.querySelector("script[data-clerk-frontend-api]"))||void 0===Ye?void 0:Ye.getAttribute("data-clerk-frontend-api"))||window.__clerk_frontend_api||"",tt=(null===(Ze=document.querySelector("script[data-clerk-proxy-url]"))||void 0===Ze?void 0:Ze.getAttribute("data-clerk-proxy-url"))||window.__clerk_proxy_url||"",nt=(null===(Qe=document.querySelector("script[data-clerk-domain]"))||void 0===Qe?void 0:Qe.getAttribute("data-clerk-domain"))||window.__clerk_domain||"";window.Clerk=new ce(Xe||et,{proxyUrl:tt,domain:nt})}(),s}()}));