@clerk/shared
Advanced tools
Comparing version 0.9.0-staging.2 to 0.9.0-staging.3
@@ -1,2 +0,2 @@ | ||
import{A as tr,B as rr,C as nr,D as ir,E as ar,F as or,G as sr,H as ur,I as fr,J as lr,K as cr,L as dr,M as vr,N as gr,O as mr,c as St,d as At,e as Pt,f as kt,g as Ut,h as Dt,i as Ft,j as Vt,k as Wt,l as _t,m as Nt,n as Kt,o as $t,p as Ht,q as Gt,r as qt,s as jt,t as Jt,u as Yt,v as Bt,w as Zt,x as Qt,y as Xt,z as er}from"./chunk-3YXQHDO2.js";var tt=Object.freeze({InvalidFrontendApiErrorMessage:"The frontendApi passed to Clerk is invalid. You can get your Frontend API key at https://dashboard.clerk.dev/last-active?path=api-keys. (key={{key}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.dev/last-active?path=api-keys. (key={{key}})",MissingFrontendApiPublishableKeyErrorMessage:"Missing frontendApi or publishableKey. You can get your key at https://dashboard.clerk.dev/last-active?path=api-keys."});function hr({packageName:e,customMessages:i}){let t=e,n={...tt,...i};function a(r,o){if(!o)return`${t}: ${r}`;let f=r,d=r.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(let s of d){let l=(o[s[1]]||"").toString();f=f.replace(`{{${s[1]}}}`,l)}return`${t}: ${f}`}return{setPackageName({packageName:r}){return typeof r=="string"&&(t=r),this},setMessages({customMessages:r}){return Object.assign(n,r||{}),this},throwInvalidPublishableKeyError(r){throw new Error(a(n.InvalidPublishableKeyErrorMessage,r))},throwInvalidFrontendApiError(r){throw new Error(a(n.InvalidFrontendApiErrorMessage,r))},throwMissingFrontendApiOrPublishableKeyError(){throw new Error(a(n.MissingFrontendApiPublishableKeyErrorMessage))}}}import de from"react";function rt(e,i){if(!e)throw typeof i=="string"?new Error(i):new Error(`${i.displayName} not found`)}var H=(e,i)=>{let{assertCtxFn:t=rt}=i||{},n=de.createContext(void 0);return n.displayName=e,[n,()=>{let o=de.useContext(n);return t(o,`${e} not found`),o.value},()=>{let o=de.useContext(n);return o?o.value:{}}]};var[Rr,G]=H("ClerkInstanceContext"),[xr,Ie]=H("UserContext"),[Er,wr]=H("ClientContext"),[Lr,Se]=H("SessionContext"),[Mr,Ae]=H("OrganizationContext");import{useEffect as nt,useLayoutEffect as it,createContext as at,useContext as De,useState as Fe,createElement as ot,useRef as W,useCallback as me,useDebugValue as st}from"react";function Ve(e,i,t,n){function a(r){return r instanceof t?r:new t(function(o){o(r)})}return new(t||(t=Promise))(function(r,o){function f(l){try{s(n.next(l))}catch(v){o(v)}}function d(l){try{s(n.throw(l))}catch(v){o(v)}}function s(l){l.done?r(l.value):a(l.value).then(f,d)}s((n=n.apply(e,i||[])).next())})}function We(e,i){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,a,r,o;return o={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function f(s){return function(l){return d([s,l])}}function d(s){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(r=s[0]&2?a.return:s[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,s[1])).done)return r;switch(a=0,r&&(s=[s[0]&2,r.value]),s[0]){case 0:case 1:r=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,a=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(r=t.trys,!(r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){t.label=s[1];break}if(s[0]===6&&t.label<r[1]){t.label=r[1],r=s;break}if(r&&t.label<r[2]){t.label=r[2],t.ops.push(s);break}r[2]&&t.ops.pop(),t.trys.pop();continue}s=i.call(e,t)}catch(l){s=[6,l],a=0}finally{n=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}var M=function(){},h=M(),Q=Object,b=function(e){return e===h},k=function(e){return typeof e=="function"},S=function(e,i){return Q.assign({},e,i)},Ce="undefined",ye=function(){return typeof window!=Ce},ut=function(){return typeof document!=Ce},ft=function(){return ye()&&typeof window.requestAnimationFrame!=Ce},ie=new WeakMap,lt=0,te=function(e){var i=typeof e,t=e&&e.constructor,n=t==Date,a,r;if(Q(e)===e&&!n&&t!=RegExp){if(a=ie.get(e),a)return a;if(a=++lt+"~",ie.set(e,a),t==Array){for(a="@",r=0;r<e.length;r++)a+=te(e[r])+",";ie.set(e,a)}if(t==Q){a="#";for(var o=Q.keys(e).sort();!b(r=o.pop());)b(e[r])||(a+=r+":"+te(e[r])+",");ie.set(e,a)}}else a=n?e.toJSON():i=="symbol"?e.toString():i=="string"?JSON.stringify(e):""+e;return a},he=!0,ct=function(){return he},_e=ye(),Re=ut(),pe=_e&&window.addEventListener?window.addEventListener.bind(window):M,dt=Re?document.addEventListener.bind(document):M,be=_e&&window.removeEventListener?window.removeEventListener.bind(window):M,vt=Re?document.removeEventListener.bind(document):M,gt=function(){var e=Re&&document.visibilityState;return b(e)||e!=="hidden"},mt=function(e){return dt("visibilitychange",e),pe("focus",e),function(){vt("visibilitychange",e),be("focus",e)}},ht=function(e){var i=function(){he=!0,e()},t=function(){he=!1};return pe("online",i),pe("offline",t),function(){be("online",i),be("offline",t)}},pt={isOnline:ct,isVisible:gt},bt={initFocus:mt,initReconnect:ht},ae=!ye()||"Deno"in window,Ot=function(e){return ft()?window.requestAnimationFrame(e):setTimeout(e,1)},X=ae?nt:it,ve=typeof navigator<"u"&&navigator.connection,Pe=!ae&&ve&&(["slow-2g","2g"].includes(ve.effectiveType)||ve.saveData),Ne=function(e){if(k(e))try{e=e()}catch{e=""}var i=[].concat(e);e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?te(e):"";var t=e?"$swr$"+e:"";return[e,i,t]},_=new WeakMap,Ke=0,$e=1,He=2,ee=function(e,i,t,n,a,r,o){o===void 0&&(o=!0);var f=_.get(e),d=f[0],s=f[1],l=f[3],v=d[i],c=s[i];if(o&&c)for(var y=0;y<c.length;++y)c[y](t,n,a);return r&&(delete l[i],v&&v[0])?v[0](He).then(function(){return e.get(i)}):e.get(i)},zt=0,Oe=function(){return++zt},Ge=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return Ve(void 0,void 0,void 0,function(){var t,n,a,r,o,f,d,s,l,v,c,y,N,O,g,u,q,U,T,E,D;return We(this,function(A){switch(A.label){case 0:if(t=e[0],n=e[1],a=e[2],r=e[3],o=typeof r=="boolean"?{revalidate:r}:r||{},f=b(o.populateCache)?!0:o.populateCache,d=o.revalidate!==!1,s=o.rollbackOnError!==!1,l=o.optimisticData,v=Ne(n),c=v[0],y=v[2],!c)return[2];if(N=_.get(t),O=N[2],e.length<3)return[2,ee(t,c,t.get(c),h,h,d,!0)];if(g=a,q=Oe(),O[c]=[q,0],U=!b(l),T=t.get(c),U&&(E=k(l)?l(T):l,t.set(c,E),ee(t,c,E)),k(g))try{g=g(t.get(c))}catch(F){u=F}return g&&k(g.then)?[4,g.catch(function(F){u=F})]:[3,2];case 1:if(g=A.sent(),q!==O[c][0]){if(u)throw u;return[2,g]}else u&&U&&s&&(f=!0,g=T,t.set(c,T));A.label=2;case 2:return f&&(u||(k(f)&&(g=f(g,T)),t.set(c,g)),t.set(y,S(t.get(y),{error:u}))),O[c][1]=Oe(),[4,ee(t,c,g,u,h,d,!!f)];case 3:if(D=A.sent(),u)throw u;return[2,f?D:g]}})})},ke=function(e,i){for(var t in e)e[t][0]&&e[t][0](i)},qe=function(e,i){if(!_.has(e)){var t=S(bt,i),n={},a=Ge.bind(h,e),r=M;if(_.set(e,[n,{},{},{},a]),!ae){var o=t.initFocus(setTimeout.bind(h,ke.bind(h,n,Ke))),f=t.initReconnect(setTimeout.bind(h,ke.bind(h,n,$e)));r=function(){o&&o(),f&&f(),_.delete(e)}}return[e,a,r]}return[e,_.get(e)[4]]},Ct=function(e,i,t,n,a){var r=t.errorRetryCount,o=a.retryCount,f=~~((Math.random()+.5)*(1<<(o<8?o:8)))*t.errorRetryInterval;!b(r)&&o>r||setTimeout(n,f,a)},je=qe(new Map),Je=je[0],yt=je[1],Ye=S({onLoadingSlow:M,onSuccess:M,onError:M,onErrorRetry:Ct,onDiscarded:M,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Pe?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Pe?5e3:3e3,compare:function(e,i){return te(e)==te(i)},isPaused:function(){return!1},cache:Je,mutate:yt,fallback:{}},pt),Be=function(e,i){var t=S(e,i);if(i){var n=e.use,a=e.fallback,r=i.use,o=i.fallback;n&&r&&(t.use=n.concat(r)),a&&o&&(t.fallback=S(a,o))}return t},ze=at({}),Rt=function(e){var i=e.value,t=Be(De(ze),i),n=i&&i.provider,a=Fe(function(){return n?qe(n(t.cache||Je),i):h})[0];return a&&(t.cache=a[0],t.mutate=a[1]),X(function(){return a?a[2]:h},[]),ot(ze.Provider,S(e,{value:t}))},xt=function(e,i){var t=Fe({})[1],n=W(e),a=W({data:!1,error:!1,isValidating:!1}),r=me(function(o){var f=!1,d=n.current;for(var s in o){var l=s;d[l]!==o[l]&&(d[l]=o[l],a.current[l]&&(f=!0))}f&&!i.current&&t({})},[]);return X(function(){n.current=e}),[n,a.current,r]},Et=function(e){return k(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}]},wt=function(){return S(Ye,De(ze))},Lt=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=wt(),r=Et(t),o=r[0],f=r[1],d=r[2],s=Be(a,d),l=e,v=s.use;if(v)for(var c=v.length;c-- >0;)l=v[c](l);return l(o,f||s.fetcher,s)}},Ue=function(e,i,t){var n=i[e]||(i[e]=[]);return n.push(t),function(){var a=n.indexOf(t);a>=0&&(n[a]=n[n.length-1],n.pop())}},ge={dedupe:!0},Mt=function(e,i,t){var n=t.cache,a=t.compare,r=t.fallbackData,o=t.suspense,f=t.revalidateOnMount,d=t.refreshInterval,s=t.refreshWhenHidden,l=t.refreshWhenOffline,v=_.get(n),c=v[0],y=v[1],N=v[2],O=v[3],g=Ne(e),u=g[0],q=g[1],U=g[2],T=W(!1),E=W(!1),D=W(u),A=W(i),F=W(t),m=function(){return F.current},oe=function(){return m().isVisible()&&m().isOnline()},re=function(R){return n.set(U,S(n.get(U),R))},Ee=n.get(u),Qe=b(r)?t.fallback[u]:r,I=b(Ee)?Qe:Ee,we=n.get(U)||{},j=we.error,Le=!T.current,Me=function(){return Le&&!b(f)?f:m().isPaused()?!1:o?b(I)?!1:t.revalidateIfStale:b(I)||t.revalidateIfStale},Xe=function(){return!u||!i?!1:we.isValidating?!0:Le&&Me()},se=Xe(),ue=xt({data:I,error:j,isValidating:se},E),K=ue[0],fe=ue[1],ne=ue[2],V=me(function(R){return Ve(void 0,void 0,void 0,function(){var z,C,x,J,Y,w,p,P,L,le,B,$,ce;return We(this,function(Z){switch(Z.label){case 0:if(z=A.current,!u||!z||E.current||m().isPaused())return[2,!1];J=!0,Y=R||{},w=!O[u]||!Y.dedupe,p=function(){return!E.current&&u===D.current&&T.current},P=function(){var Te=O[u];Te&&Te[1]===x&&delete O[u]},L={isValidating:!1},le=function(){re({isValidating:!1}),p()&&ne(L)},re({isValidating:!0}),ne({isValidating:!0}),Z.label=1;case 1:return Z.trys.push([1,3,,4]),w&&(ee(n,u,K.current.data,K.current.error,!0),t.loadingTimeout&&!n.get(u)&&setTimeout(function(){J&&p()&&m().onLoadingSlow(u,t)},t.loadingTimeout),O[u]=[z.apply(void 0,q),Oe()]),ce=O[u],C=ce[0],x=ce[1],[4,C];case 2:return C=Z.sent(),w&&setTimeout(P,t.dedupingInterval),!O[u]||O[u][1]!==x?(w&&p()&&m().onDiscarded(u),[2,!1]):(re({error:h}),L.error=h,B=N[u],!b(B)&&(x<=B[0]||x<=B[1]||B[1]===0)?(le(),w&&p()&&m().onDiscarded(u),[2,!1]):(a(K.current.data,C)?L.data=K.current.data:L.data=C,a(n.get(u),C)||n.set(u,C),w&&p()&&m().onSuccess(C,u,t),[3,4]));case 3:return $=Z.sent(),P(),m().isPaused()||(re({error:$}),L.error=$,w&&p()&&(m().onError($,u,t),(typeof t.shouldRetryOnError=="boolean"&&t.shouldRetryOnError||k(t.shouldRetryOnError)&&t.shouldRetryOnError($))&&oe()&&m().onErrorRetry($,u,t,V,{retryCount:(Y.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return J=!1,le(),p()&&w&&ee(n,u,L.data,L.error,!1),[2,!0]}})})},[u]),et=me(Ge.bind(h,n,function(){return D.current}),[]);if(X(function(){A.current=i,F.current=t}),X(function(){if(!!u){var R=u!==D.current,z=V.bind(h,ge),C=function(p,P,L){ne(S({error:P,isValidating:L},a(K.current.data,p)?h:{data:p}))},x=0,J=function(p){if(p==Ke){var P=Date.now();m().revalidateOnFocus&&P>x&&oe()&&(x=P+m().focusThrottleInterval,z())}else if(p==$e)m().revalidateOnReconnect&&oe()&&z();else if(p==He)return V()},Y=Ue(u,y,C),w=Ue(u,c,J);return E.current=!1,D.current=u,T.current=!0,R&&ne({data:I,error:j,isValidating:se}),Me()&&(b(I)||ae?z():Ot(z)),function(){E.current=!0,Y(),w()}}},[u,V]),X(function(){var R;function z(){var x=k(d)?d(I):d;x&&R!==-1&&(R=setTimeout(C,x))}function C(){!K.current.error&&(s||m().isVisible())&&(l||m().isOnline())?V(ge).then(z):z()}return z(),function(){R&&(clearTimeout(R),R=-1)}},[d,s,l,V]),st(I),o&&b(I)&&u)throw A.current=i,F.current=t,E.current=!1,b(j)?V(ge):j;return{mutate:et,get data(){return fe.data=!0,I},get error(){return fe.error=!0,j},get isValidating(){return fe.isValidating=!0,se}}},Sr=Q.defineProperty(Rt,"default",{value:Ye});var xe=Lt(Mt);var Ur=e=>{let{invitationList:i,membershipList:t}=e||{},{organization:n,lastOrganizationMember:a,lastOrganizationInvitation:r}=Ae(),o=Se(),f=G(),d=f.loaded&&o&&n,s=f.loaded?()=>f.organization?.getPendingInvitations(i):()=>[],l=f.loaded?()=>f.organization?.getMemberships(t):()=>[],{data:v,isValidating:c,mutate:y}=xe(d&&i?Ze("invites",n,r,i):null,s),{data:N,isValidating:O,mutate:g}=xe(d&&t?Ze("memberships",n,a,t):null,l);return n===void 0?{isLoaded:!1,organization:void 0,invitationList:void 0,membershipList:void 0,membership:void 0}:n===null?{isLoaded:!0,organization:null,invitationList:null,membershipList:null,membership:null}:!f.loaded&&n?{isLoaded:!0,organization:n,invitationList:void 0,membershipList:void 0,membership:void 0}:{isLoaded:!O&&!c,organization:n,membershipList:N,membership:Tt(o.user.organizationMemberships,n.id),invitationList:v,unstable__mutate:()=>{g(),y()}}};function Tt(e,i){return e.find(t=>t.organization.id===i)}function Ze(e,i,t,n){return[e,i.id,t?.id,t?.updatedAt,n.offset,n.limit].filter(Boolean).join("-")}var Vr=()=>{let e=G(),i=Ie();return!e.loaded||!i?{isLoaded:!1,organizationList:void 0,createOrganization:void 0,setActive:void 0}:{isLoaded:!0,organizationList:It(i.organizationMemberships),setActive:e.setActive,createOrganization:e.createOrganization}};function It(e){return e.map(i=>({membership:i,organization:i.organization}))}var Nr=()=>{let e=G();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}};export{Rr as ClerkInstanceContext,Er as ClientContext,rr as LocalStorageBroadcastChannel,Mr as OrganizationContext,dr as Poller,Lr as SessionContext,xr as UserContext,Yt as addYears,rt as assertContextExists,hr as buildErrorThrower,Zt as buildPublishableKey,ur as camelToSnake,Kt as colorToSameTypeString,H as createContextAndHook,Ht as createCookieHandler,cr as createWorkerTimers,Gt as dateTo12HourTime,fr as deepCamelToSnake,lr as deepSnakeToCamel,qt as differenceInCalendarDays,nr as extension,Jt as formatRelative,Wt as hasAlpha,$t as hexStringToRgbaColor,At as inBrowser,vr as inClientSide,Ft as isHSLColor,ar as isIPV4Address,er as isLegacyFrontendApiKey,Xt as isPublishableKey,Dt as isRGBColor,tr as isRetinaDisplay,Vt as isTransparent,Pt as isValidHexString,Ut as isValidHslaString,kt as isValidRgbaString,ir as noop,jt as normalizeDate,Qt as parsePublishableKey,gr as parseSearchParams,Bt as readJSONFile,mr as runWithExponentialBackOff,sr as snakeToCamel,_t as stringToHslaColor,Nt as stringToSameTypeColor,or as titleize,St as toSentence,G as useClerkInstanceContext,wr as useClientContext,Ur as useOrganization,Ae as useOrganizationContext,Vr as useOrganizationList,Nr as useOrganizations,Se as useSessionContext,Ie as useUserContext}; | ||
import{A as tn,B as nn,C as rn,D as an,E as on,F as sn,G as un,H as fn,I as ln,J as dn,K as cn,L as vn,M as gn,N as mn,O as hn,P as pn,c as St,d as At,e as Pt,f as kt,g as Ut,h as Dt,i as Ft,j as Vt,k as Wt,l as _t,m as Nt,n as Kt,o as $t,p as Ht,q as Gt,r as qt,s as jt,t as Jt,u as Yt,v as Bt,w as Zt,x as Qt,y as Xt,z as en}from"./chunk-LNDJRDTI.js";var tt=Object.freeze({InvalidFrontendApiErrorMessage:"The frontendApi passed to Clerk is invalid. You can get your Frontend API key at https://dashboard.clerk.dev/last-active?path=api-keys. (key={{key}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.dev/last-active?path=api-keys. (key={{key}})",MissingFrontendApiPublishableKeyErrorMessage:"Missing frontendApi or publishableKey. You can get your key at https://dashboard.clerk.dev/last-active?path=api-keys."});function bn({packageName:e,customMessages:i}){let t=e,r={...tt,...i};function a(n,o){if(!o)return`${t}: ${n}`;let f=n,c=n.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(let s of c){let l=(o[s[1]]||"").toString();f=f.replace(`{{${s[1]}}}`,l)}return`${t}: ${f}`}return{setPackageName({packageName:n}){return typeof n=="string"&&(t=n),this},setMessages({customMessages:n}){return Object.assign(r,n||{}),this},throwInvalidPublishableKeyError(n){throw new Error(a(r.InvalidPublishableKeyErrorMessage,n))},throwInvalidFrontendApiError(n){throw new Error(a(r.InvalidFrontendApiErrorMessage,n))},throwMissingFrontendApiOrPublishableKeyError(){throw new Error(a(r.MissingFrontendApiPublishableKeyErrorMessage))}}}import ce from"react";function nt(e,i){if(!e)throw typeof i=="string"?new Error(i):new Error(`${i.displayName} not found`)}var H=(e,i)=>{let{assertCtxFn:t=nt}=i||{},r=ce.createContext(void 0);return r.displayName=e,[r,()=>{let o=ce.useContext(r);return t(o,`${e} not found`),o.value},()=>{let o=ce.useContext(r);return o?o.value:{}}]};var[En,G]=H("ClerkInstanceContext"),[wn,Ie]=H("UserContext"),[Ln,Mn]=H("ClientContext"),[Tn,Se]=H("SessionContext"),[In,Ae]=H("OrganizationContext");import{useEffect as rt,useLayoutEffect as it,createContext as at,useContext as De,useState as Fe,createElement as ot,useRef as W,useCallback as me,useDebugValue as st}from"react";function Ve(e,i,t,r){function a(n){return n instanceof t?n:new t(function(o){o(n)})}return new(t||(t=Promise))(function(n,o){function f(l){try{s(r.next(l))}catch(v){o(v)}}function c(l){try{s(r.throw(l))}catch(v){o(v)}}function s(l){l.done?n(l.value):a(l.value).then(f,c)}s((r=r.apply(e,i||[])).next())})}function We(e,i){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,a,n,o;return o={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function f(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;t;)try{if(r=1,a&&(n=s[0]&2?a.return:s[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;switch(a=0,n&&(s=[s[0]&2,n.value]),s[0]){case 0:case 1:n=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,a=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(n=t.trys,!(n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){t.label=s[1];break}if(s[0]===6&&t.label<n[1]){t.label=n[1],n=s;break}if(n&&t.label<n[2]){t.label=n[2],t.ops.push(s);break}n[2]&&t.ops.pop(),t.trys.pop();continue}s=i.call(e,t)}catch(l){s=[6,l],a=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}var M=function(){},h=M(),Q=Object,b=function(e){return e===h},k=function(e){return typeof e=="function"},S=function(e,i){return Q.assign({},e,i)},Ce="undefined",ye=function(){return typeof window!=Ce},ut=function(){return typeof document!=Ce},ft=function(){return ye()&&typeof window.requestAnimationFrame!=Ce},ie=new WeakMap,lt=0,te=function(e){var i=typeof e,t=e&&e.constructor,r=t==Date,a,n;if(Q(e)===e&&!r&&t!=RegExp){if(a=ie.get(e),a)return a;if(a=++lt+"~",ie.set(e,a),t==Array){for(a="@",n=0;n<e.length;n++)a+=te(e[n])+",";ie.set(e,a)}if(t==Q){a="#";for(var o=Q.keys(e).sort();!b(n=o.pop());)b(e[n])||(a+=n+":"+te(e[n])+",");ie.set(e,a)}}else a=r?e.toJSON():i=="symbol"?e.toString():i=="string"?JSON.stringify(e):""+e;return a},he=!0,dt=function(){return he},_e=ye(),Re=ut(),pe=_e&&window.addEventListener?window.addEventListener.bind(window):M,ct=Re?document.addEventListener.bind(document):M,be=_e&&window.removeEventListener?window.removeEventListener.bind(window):M,vt=Re?document.removeEventListener.bind(document):M,gt=function(){var e=Re&&document.visibilityState;return b(e)||e!=="hidden"},mt=function(e){return ct("visibilitychange",e),pe("focus",e),function(){vt("visibilitychange",e),be("focus",e)}},ht=function(e){var i=function(){he=!0,e()},t=function(){he=!1};return pe("online",i),pe("offline",t),function(){be("online",i),be("offline",t)}},pt={isOnline:dt,isVisible:gt},bt={initFocus:mt,initReconnect:ht},ae=!ye()||"Deno"in window,Ot=function(e){return ft()?window.requestAnimationFrame(e):setTimeout(e,1)},X=ae?rt:it,ve=typeof navigator!="undefined"&&navigator.connection,Pe=!ae&&ve&&(["slow-2g","2g"].includes(ve.effectiveType)||ve.saveData),Ne=function(e){if(k(e))try{e=e()}catch{e=""}var i=[].concat(e);e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?te(e):"";var t=e?"$swr$"+e:"";return[e,i,t]},_=new WeakMap,Ke=0,$e=1,He=2,ee=function(e,i,t,r,a,n,o){o===void 0&&(o=!0);var f=_.get(e),c=f[0],s=f[1],l=f[3],v=c[i],d=s[i];if(o&&d)for(var y=0;y<d.length;++y)d[y](t,r,a);return n&&(delete l[i],v&&v[0])?v[0](He).then(function(){return e.get(i)}):e.get(i)},zt=0,Oe=function(){return++zt},Ge=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return Ve(void 0,void 0,void 0,function(){var t,r,a,n,o,f,c,s,l,v,d,y,N,O,g,u,q,U,T,E,D;return We(this,function(A){switch(A.label){case 0:if(t=e[0],r=e[1],a=e[2],n=e[3],o=typeof n=="boolean"?{revalidate:n}:n||{},f=b(o.populateCache)?!0:o.populateCache,c=o.revalidate!==!1,s=o.rollbackOnError!==!1,l=o.optimisticData,v=Ne(r),d=v[0],y=v[2],!d)return[2];if(N=_.get(t),O=N[2],e.length<3)return[2,ee(t,d,t.get(d),h,h,c,!0)];if(g=a,q=Oe(),O[d]=[q,0],U=!b(l),T=t.get(d),U&&(E=k(l)?l(T):l,t.set(d,E),ee(t,d,E)),k(g))try{g=g(t.get(d))}catch(F){u=F}return g&&k(g.then)?[4,g.catch(function(F){u=F})]:[3,2];case 1:if(g=A.sent(),q!==O[d][0]){if(u)throw u;return[2,g]}else u&&U&&s&&(f=!0,g=T,t.set(d,T));A.label=2;case 2:return f&&(u||(k(f)&&(g=f(g,T)),t.set(d,g)),t.set(y,S(t.get(y),{error:u}))),O[d][1]=Oe(),[4,ee(t,d,g,u,h,c,!!f)];case 3:if(D=A.sent(),u)throw u;return[2,f?D:g]}})})},ke=function(e,i){for(var t in e)e[t][0]&&e[t][0](i)},qe=function(e,i){if(!_.has(e)){var t=S(bt,i),r={},a=Ge.bind(h,e),n=M;if(_.set(e,[r,{},{},{},a]),!ae){var o=t.initFocus(setTimeout.bind(h,ke.bind(h,r,Ke))),f=t.initReconnect(setTimeout.bind(h,ke.bind(h,r,$e)));n=function(){o&&o(),f&&f(),_.delete(e)}}return[e,a,n]}return[e,_.get(e)[4]]},Ct=function(e,i,t,r,a){var n=t.errorRetryCount,o=a.retryCount,f=~~((Math.random()+.5)*(1<<(o<8?o:8)))*t.errorRetryInterval;!b(n)&&o>n||setTimeout(r,f,a)},je=qe(new Map),Je=je[0],yt=je[1],Ye=S({onLoadingSlow:M,onSuccess:M,onError:M,onErrorRetry:Ct,onDiscarded:M,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Pe?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Pe?5e3:3e3,compare:function(e,i){return te(e)==te(i)},isPaused:function(){return!1},cache:Je,mutate:yt,fallback:{}},pt),Be=function(e,i){var t=S(e,i);if(i){var r=e.use,a=e.fallback,n=i.use,o=i.fallback;r&&n&&(t.use=r.concat(n)),a&&o&&(t.fallback=S(a,o))}return t},ze=at({}),Rt=function(e){var i=e.value,t=Be(De(ze),i),r=i&&i.provider,a=Fe(function(){return r?qe(r(t.cache||Je),i):h})[0];return a&&(t.cache=a[0],t.mutate=a[1]),X(function(){return a?a[2]:h},[]),ot(ze.Provider,S(e,{value:t}))},xt=function(e,i){var t=Fe({})[1],r=W(e),a=W({data:!1,error:!1,isValidating:!1}),n=me(function(o){var f=!1,c=r.current;for(var s in o){var l=s;c[l]!==o[l]&&(c[l]=o[l],a.current[l]&&(f=!0))}f&&!i.current&&t({})},[]);return X(function(){r.current=e}),[r,a.current,n]},Et=function(e){return k(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}]},wt=function(){return S(Ye,De(ze))},Lt=function(e){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var a=wt(),n=Et(t),o=n[0],f=n[1],c=n[2],s=Be(a,c),l=e,v=s.use;if(v)for(var d=v.length;d-- >0;)l=v[d](l);return l(o,f||s.fetcher,s)}},Ue=function(e,i,t){var r=i[e]||(i[e]=[]);return r.push(t),function(){var a=r.indexOf(t);a>=0&&(r[a]=r[r.length-1],r.pop())}},ge={dedupe:!0},Mt=function(e,i,t){var r=t.cache,a=t.compare,n=t.fallbackData,o=t.suspense,f=t.revalidateOnMount,c=t.refreshInterval,s=t.refreshWhenHidden,l=t.refreshWhenOffline,v=_.get(r),d=v[0],y=v[1],N=v[2],O=v[3],g=Ne(e),u=g[0],q=g[1],U=g[2],T=W(!1),E=W(!1),D=W(u),A=W(i),F=W(t),m=function(){return F.current},oe=function(){return m().isVisible()&&m().isOnline()},ne=function(R){return r.set(U,S(r.get(U),R))},Ee=r.get(u),Qe=b(n)?t.fallback[u]:n,I=b(Ee)?Qe:Ee,we=r.get(U)||{},j=we.error,Le=!T.current,Me=function(){return Le&&!b(f)?f:m().isPaused()?!1:o?b(I)?!1:t.revalidateIfStale:b(I)||t.revalidateIfStale},Xe=function(){return!u||!i?!1:we.isValidating?!0:Le&&Me()},se=Xe(),ue=xt({data:I,error:j,isValidating:se},E),K=ue[0],fe=ue[1],re=ue[2],V=me(function(R){return Ve(void 0,void 0,void 0,function(){var z,C,x,J,Y,w,p,P,L,le,B,$,de;return We(this,function(Z){switch(Z.label){case 0:if(z=A.current,!u||!z||E.current||m().isPaused())return[2,!1];J=!0,Y=R||{},w=!O[u]||!Y.dedupe,p=function(){return!E.current&&u===D.current&&T.current},P=function(){var Te=O[u];Te&&Te[1]===x&&delete O[u]},L={isValidating:!1},le=function(){ne({isValidating:!1}),p()&&re(L)},ne({isValidating:!0}),re({isValidating:!0}),Z.label=1;case 1:return Z.trys.push([1,3,,4]),w&&(ee(r,u,K.current.data,K.current.error,!0),t.loadingTimeout&&!r.get(u)&&setTimeout(function(){J&&p()&&m().onLoadingSlow(u,t)},t.loadingTimeout),O[u]=[z.apply(void 0,q),Oe()]),de=O[u],C=de[0],x=de[1],[4,C];case 2:return C=Z.sent(),w&&setTimeout(P,t.dedupingInterval),!O[u]||O[u][1]!==x?(w&&p()&&m().onDiscarded(u),[2,!1]):(ne({error:h}),L.error=h,B=N[u],!b(B)&&(x<=B[0]||x<=B[1]||B[1]===0)?(le(),w&&p()&&m().onDiscarded(u),[2,!1]):(a(K.current.data,C)?L.data=K.current.data:L.data=C,a(r.get(u),C)||r.set(u,C),w&&p()&&m().onSuccess(C,u,t),[3,4]));case 3:return $=Z.sent(),P(),m().isPaused()||(ne({error:$}),L.error=$,w&&p()&&(m().onError($,u,t),(typeof t.shouldRetryOnError=="boolean"&&t.shouldRetryOnError||k(t.shouldRetryOnError)&&t.shouldRetryOnError($))&&oe()&&m().onErrorRetry($,u,t,V,{retryCount:(Y.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return J=!1,le(),p()&&w&&ee(r,u,L.data,L.error,!1),[2,!0]}})})},[u]),et=me(Ge.bind(h,r,function(){return D.current}),[]);if(X(function(){A.current=i,F.current=t}),X(function(){if(!!u){var R=u!==D.current,z=V.bind(h,ge),C=function(p,P,L){re(S({error:P,isValidating:L},a(K.current.data,p)?h:{data:p}))},x=0,J=function(p){if(p==Ke){var P=Date.now();m().revalidateOnFocus&&P>x&&oe()&&(x=P+m().focusThrottleInterval,z())}else if(p==$e)m().revalidateOnReconnect&&oe()&&z();else if(p==He)return V()},Y=Ue(u,y,C),w=Ue(u,d,J);return E.current=!1,D.current=u,T.current=!0,R&&re({data:I,error:j,isValidating:se}),Me()&&(b(I)||ae?z():Ot(z)),function(){E.current=!0,Y(),w()}}},[u,V]),X(function(){var R;function z(){var x=k(c)?c(I):c;x&&R!==-1&&(R=setTimeout(C,x))}function C(){!K.current.error&&(s||m().isVisible())&&(l||m().isOnline())?V(ge).then(z):z()}return z(),function(){R&&(clearTimeout(R),R=-1)}},[c,s,l,V]),st(I),o&&b(I)&&u)throw A.current=i,F.current=t,E.current=!1,b(j)?V(ge):j;return{mutate:et,get data(){return fe.data=!0,I},get error(){return fe.error=!0,j},get isValidating(){return fe.isValidating=!0,se}}},Pn=Q.defineProperty(Rt,"default",{value:Ye});var xe=Lt(Mt);var Fn=e=>{let{invitationList:i,membershipList:t}=e||{},{organization:r,lastOrganizationMember:a,lastOrganizationInvitation:n}=Ae(),o=Se(),f=G(),c=f.loaded&&o&&r,s=f.loaded?()=>{var u;return(u=f.organization)==null?void 0:u.getPendingInvitations(i)}:()=>[],l=f.loaded?()=>{var u;return(u=f.organization)==null?void 0:u.getMemberships(t)}:()=>[],{data:v,isValidating:d,mutate:y}=xe(c&&i?Ze("invites",r,n,i):null,s),{data:N,isValidating:O,mutate:g}=xe(c&&t?Ze("memberships",r,a,t):null,l);return r===void 0?{isLoaded:!1,organization:void 0,invitationList:void 0,membershipList:void 0,membership:void 0}:r===null?{isLoaded:!0,organization:null,invitationList:null,membershipList:null,membership:null}:!f.loaded&&r?{isLoaded:!0,organization:r,invitationList:void 0,membershipList:void 0,membership:void 0}:{isLoaded:!O&&!d,organization:r,membershipList:N,membership:Tt(o.user.organizationMemberships,r.id),invitationList:v,unstable__mutate:()=>{g(),y()}}};function Tt(e,i){return e.find(t=>t.organization.id===i)}function Ze(e,i,t,r){return[e,i.id,t==null?void 0:t.id,t==null?void 0:t.updatedAt,r.offset,r.limit].filter(Boolean).join("-")}var _n=()=>{let e=G(),i=Ie();return!e.loaded||!i?{isLoaded:!1,organizationList:void 0,createOrganization:void 0,setActive:void 0}:{isLoaded:!0,organizationList:It(i.organizationMemberships),setActive:e.setActive,createOrganization:e.createOrganization}};function It(e){return e.map(i=>({membership:i,organization:i.organization}))}var $n=()=>{let e=G();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}};export{En as ClerkInstanceContext,Ln as ClientContext,rn as LocalStorageBroadcastChannel,In as OrganizationContext,gn as Poller,Tn as SessionContext,wn as UserContext,Yt as addYears,nt as assertContextExists,bn as buildErrorThrower,Qt as buildPublishableKey,ln as camelToSnake,Kt as colorToSameTypeString,H as createContextAndHook,Ht as createCookieHandler,vn as createWorkerTimers,Gt as dateTo12HourTime,dn as deepCamelToSnake,cn as deepSnakeToCamel,qt as differenceInCalendarDays,an as extension,Jt as formatRelative,Wt as hasAlpha,$t as hexStringToRgbaColor,At as inBrowser,mn as inClientSide,Ft as isHSLColor,sn as isIPV4Address,tn as isLegacyFrontendApiKey,en as isPublishableKey,Dt as isRGBColor,nn as isRetinaDisplay,Vt as isTransparent,Pt as isValidHexString,Ut as isValidHslaString,kt as isValidRgbaString,Zt as isomorphicAtob,on as noop,jt as normalizeDate,Xt as parsePublishableKey,hn as parseSearchParams,Bt as readJSONFile,pn as runWithExponentialBackOff,fn as snakeToCamel,_t as stringToHslaColor,Nt as stringToSameTypeColor,un as titleize,St as toSentence,G as useClerkInstanceContext,Mn as useClientContext,Fn as useOrganization,Ae as useOrganizationContext,_n as useOrganizationList,$n as useOrganizations,Se as useSessionContext,Ie as useUserContext}; | ||
/*! ***************************************************************************** | ||
@@ -3,0 +3,0 @@ Copyright (c) Microsoft Corporation. |
@@ -1,2 +0,2 @@ | ||
import{D as t,a as m,b as e}from"../chunk-3YXQHDO2.js";var o={};m(o,{noop:()=>t,render:()=>n,userEvent:()=>p});var r={};m(r,{noop:()=>t,render:()=>n,userEvent:()=>p});import"@testing-library/jest-dom/extend-expect";import{render as a}from"@testing-library/react";e(r,u);import*as u from"@testing-library/react";import{default as p}from"@testing-library/user-event";var n=(f,s)=>a(f,s);e(o,r);export{t as noop,n as render,p as userEvent}; | ||
import{E as t,a as m,b as e}from"../chunk-LNDJRDTI.js";var o={};m(o,{noop:()=>t,render:()=>n,userEvent:()=>p});var r={};m(r,{noop:()=>t,render:()=>n,userEvent:()=>p});import"@testing-library/jest-dom/extend-expect";import{render as a}from"@testing-library/react";e(r,u);import*as u from"@testing-library/react";import{default as p}from"@testing-library/user-event";var n=(f,s)=>a(f,s);e(o,r);export{t as noop,n as render,p as userEvent}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,3 +0,3 @@ | ||
"use strict";var It=Object.create;var ae=Object.defineProperty;var zt=Object.getOwnPropertyDescriptor;var kt=Object.getOwnPropertyNames;var Lt=Object.getPrototypeOf,Mt=Object.prototype.hasOwnProperty;var Dt=(e,r)=>{for(var t in r)ae(e,t,{get:r[t],enumerable:!0})},Je=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of kt(r))!Mt.call(e,a)&&a!==t&&ae(e,a,{get:()=>r[a],enumerable:!(n=zt(r,a))||n.enumerable});return e};var Pt=(e,r,t)=>(t=e!=null?It(Lt(e)):{},Je(r||!e||!e.__esModule?ae(t,"default",{value:e,enumerable:!0}):t,e)),At=e=>Je(ae({},"__esModule",{value:!0}),e);var sn={};Dt(sn,{ClerkInstanceContext:()=>Ft,ClientContext:()=>Vt,LocalStorageBroadcastChannel:()=>Ve,OrganizationContext:()=>Nt,Poller:()=>Qr,SessionContext:()=>Ht,UserContext:()=>Ut,addYears:()=>_r,assertContextExists:()=>qe,buildErrorThrower:()=>Wt,buildPublishableKey:()=>Ur,camelToSnake:()=>Ne,colorToSameTypeString:()=>gt,createContextAndHook:()=>$,createCookieHandler:()=>Dr,createWorkerTimers:()=>ge,dateTo12HourTime:()=>Pr,deepCamelToSnake:()=>Yr,deepSnakeToCamel:()=>Jr,differenceInCalendarDays:()=>yt,extension:()=>Br,formatRelative:()=>Ar,hasAlpha:()=>Rr,hexStringToRgbaColor:()=>vt,inBrowser:()=>hr,inClientSide:()=>en,isHSLColor:()=>We,isIPV4Address:()=>jr,isLegacyFrontendApiKey:()=>$r,isPublishableKey:()=>Tt,isRGBColor:()=>_e,isRetinaDisplay:()=>Hr,isTransparent:()=>de,isValidHexString:()=>re,isValidHslaString:()=>ce,isValidRgbaString:()=>le,noop:()=>$e,normalizeDate:()=>me,parsePublishableKey:()=>Vr,parseSearchParams:()=>tn,readJSONFile:()=>Wr,runWithExponentialBackOff:()=>on,snakeToCamel:()=>He,stringToHslaColor:()=>wr,stringToSameTypeColor:()=>Sr,titleize:()=>Xr,toSentence:()=>vr,useClerkInstanceContext:()=>H,useClientContext:()=>$t,useOrganization:()=>dr,useOrganizationContext:()=>Oe,useOrganizationList:()=>pr,useOrganizations:()=>gr,useSessionContext:()=>Re,useUserContext:()=>Te});module.exports=At(sn);var _t=Object.freeze({InvalidFrontendApiErrorMessage:"The frontendApi passed to Clerk is invalid. You can get your Frontend API key at https://dashboard.clerk.dev/last-active?path=api-keys. (key={{key}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.dev/last-active?path=api-keys. (key={{key}})",MissingFrontendApiPublishableKeyErrorMessage:"Missing frontendApi or publishableKey. You can get your key at https://dashboard.clerk.dev/last-active?path=api-keys."});function Wt({packageName:e,customMessages:r}){let t=e,n={..._t,...r};function a(i,o){if(!o)return`${t}: ${i}`;let u=i,f=i.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(let s of f){let c=(o[s[1]]||"").toString();u=u.replace(`{{${s[1]}}}`,c)}return`${t}: ${u}`}return{setPackageName({packageName:i}){return typeof i=="string"&&(t=i),this},setMessages({customMessages:i}){return Object.assign(n,i||{}),this},throwInvalidPublishableKeyError(i){throw new Error(a(n.InvalidPublishableKeyErrorMessage,i))},throwInvalidFrontendApiError(i){throw new Error(a(n.InvalidFrontendApiErrorMessage,i))},throwMissingFrontendApiOrPublishableKeyError(){throw new Error(a(n.MissingFrontendApiPublishableKeyErrorMessage))}}}var oe=Pt(require("react"));function qe(e,r){if(!e)throw typeof r=="string"?new Error(r):new Error(`${r.displayName} not found`)}var $=(e,r)=>{let{assertCtxFn:t=qe}=r||{},n=oe.default.createContext(void 0);return n.displayName=e,[n,()=>{let o=oe.default.useContext(n);return t(o,`${e} not found`),o.value},()=>{let o=oe.default.useContext(n);return o?o.value:{}}]};var[Ft,H]=$("ClerkInstanceContext"),[Ut,Te]=$("UserContext"),[Vt,$t]=$("ClientContext"),[Ht,Re]=$("SessionContext"),[Nt,Oe]=$("OrganizationContext");var p=require("react");function tt(e,r,t,n){function a(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function u(c){try{s(n.next(c))}catch(m){o(m)}}function f(c){try{s(n.throw(c))}catch(m){o(m)}}function s(c){c.done?i(c.value):a(c.value).then(u,f)}s((n=n.apply(e,r||[])).next())})}function rt(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(c){return f([s,c])}}function f(s){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(i=s[0]&2?a.return:s[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;switch(a=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,a=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1],i=s;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(s);break}i[2]&&t.ops.pop(),t.trys.pop();continue}s=r.call(e,t)}catch(c){s=[6,c],a=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}var k=function(){},b=k(),Z=Object,y=function(e){return e===b},_=function(e){return typeof e=="function"},D=function(e,r){return Z.assign({},e,r)},Me="undefined",De=function(){return typeof window!=Me},Kt=function(){return typeof document!=Me},Bt=function(){return De()&&typeof window.requestAnimationFrame!=Me},se=new WeakMap,Gt=0,te=function(e){var r=typeof e,t=e&&e.constructor,n=t==Date,a,i;if(Z(e)===e&&!n&&t!=RegExp){if(a=se.get(e),a)return a;if(a=++Gt+"~",se.set(e,a),t==Array){for(a="@",i=0;i<e.length;i++)a+=te(e[i])+",";se.set(e,a)}if(t==Z){a="#";for(var o=Z.keys(e).sort();!y(i=o.pop());)y(e[i])||(a+=i+":"+te(e[i])+",");se.set(e,a)}}else a=n?e.toJSON():r=="symbol"?e.toString():r=="string"?JSON.stringify(e):""+e;return a},Se=!0,jt=function(){return Se},nt=De(),Pe=Kt(),Ie=nt&&window.addEventListener?window.addEventListener.bind(window):k,Xt=Pe?document.addEventListener.bind(document):k,ze=nt&&window.removeEventListener?window.removeEventListener.bind(window):k,Yt=Pe?document.removeEventListener.bind(document):k,Jt=function(){var e=Pe&&document.visibilityState;return y(e)||e!=="hidden"},qt=function(e){return Xt("visibilitychange",e),Ie("focus",e),function(){Yt("visibilitychange",e),ze("focus",e)}},Zt=function(e){var r=function(){Se=!0,e()},t=function(){Se=!1};return Ie("online",r),Ie("offline",t),function(){ze("online",r),ze("offline",t)}},Qt={isOnline:jt,isVisible:Jt},er={initFocus:qt,initReconnect:Zt},ue=!De()||"Deno"in window,tr=function(e){return Bt()?window.requestAnimationFrame(e):setTimeout(e,1)},Q=ue?p.useEffect:p.useLayoutEffect,Ee=typeof navigator<"u"&&navigator.connection,Ze=!ue&&Ee&&(["slow-2g","2g"].includes(Ee.effectiveType)||Ee.saveData),it=function(e){if(_(e))try{e=e()}catch{e=""}var r=[].concat(e);e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?te(e):"";var t=e?"$swr$"+e:"";return[e,r,t]},N=new WeakMap,at=0,ot=1,st=2,ee=function(e,r,t,n,a,i,o){o===void 0&&(o=!0);var u=N.get(e),f=u[0],s=u[1],c=u[3],m=f[r],l=s[r];if(o&&l)for(var v=0;v<l.length;++v)l[v](t,n,a);return i&&(delete c[r],m&&m[0])?m[0](st).then(function(){return e.get(r)}):e.get(r)},rr=0,ke=function(){return++rr},ut=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return tt(void 0,void 0,void 0,function(){var t,n,a,i,o,u,f,s,c,m,l,v,x,T,g,d,G,W,L,S,F;return rt(this,function(P){switch(P.label){case 0:if(t=e[0],n=e[1],a=e[2],i=e[3],o=typeof i=="boolean"?{revalidate:i}:i||{},u=y(o.populateCache)?!0:o.populateCache,f=o.revalidate!==!1,s=o.rollbackOnError!==!1,c=o.optimisticData,m=it(n),l=m[0],v=m[2],!l)return[2];if(x=N.get(t),T=x[2],e.length<3)return[2,ee(t,l,t.get(l),b,b,f,!0)];if(g=a,G=ke(),T[l]=[G,0],W=!y(c),L=t.get(l),W&&(S=_(c)?c(L):c,t.set(l,S),ee(t,l,S)),_(g))try{g=g(t.get(l))}catch(U){d=U}return g&&_(g.then)?[4,g.catch(function(U){d=U})]:[3,2];case 1:if(g=P.sent(),G!==T[l][0]){if(d)throw d;return[2,g]}else d&&W&&s&&(u=!0,g=L,t.set(l,L));P.label=2;case 2:return u&&(d||(_(u)&&(g=u(g,L)),t.set(l,g)),t.set(v,D(t.get(v),{error:d}))),T[l][1]=ke(),[4,ee(t,l,g,d,b,f,!!u)];case 3:if(F=P.sent(),d)throw d;return[2,u?F:g]}})})},Qe=function(e,r){for(var t in e)e[t][0]&&e[t][0](r)},lt=function(e,r){if(!N.has(e)){var t=D(er,r),n={},a=ut.bind(b,e),i=k;if(N.set(e,[n,{},{},{},a]),!ue){var o=t.initFocus(setTimeout.bind(b,Qe.bind(b,n,at))),u=t.initReconnect(setTimeout.bind(b,Qe.bind(b,n,ot)));i=function(){o&&o(),u&&u(),N.delete(e)}}return[e,a,i]}return[e,N.get(e)[4]]},nr=function(e,r,t,n,a){var i=t.errorRetryCount,o=a.retryCount,u=~~((Math.random()+.5)*(1<<(o<8?o:8)))*t.errorRetryInterval;!y(i)&&o>i||setTimeout(n,u,a)},ct=lt(new Map),dt=ct[0],ir=ct[1],ft=D({onLoadingSlow:k,onSuccess:k,onError:k,onErrorRetry:nr,onDiscarded:k,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ze?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Ze?5e3:3e3,compare:function(e,r){return te(e)==te(r)},isPaused:function(){return!1},cache:dt,mutate:ir,fallback:{}},Qt),pt=function(e,r){var t=D(e,r);if(r){var n=e.use,a=e.fallback,i=r.use,o=r.fallback;n&&i&&(t.use=n.concat(i)),a&&o&&(t.fallback=D(a,o))}return t},Le=(0,p.createContext)({}),ar=function(e){var r=e.value,t=pt((0,p.useContext)(Le),r),n=r&&r.provider,a=(0,p.useState)(function(){return n?lt(n(t.cache||dt),r):b})[0];return a&&(t.cache=a[0],t.mutate=a[1]),Q(function(){return a?a[2]:b},[]),(0,p.createElement)(Le.Provider,D(e,{value:t}))},or=function(e,r){var t=(0,p.useState)({})[1],n=(0,p.useRef)(e),a=(0,p.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,p.useCallback)(function(o){var u=!1,f=n.current;for(var s in o){var c=s;f[c]!==o[c]&&(f[c]=o[c],a.current[c]&&(u=!0))}u&&!r.current&&t({})},[]);return Q(function(){n.current=e}),[n,a.current,i]},sr=function(e){return _(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}]},ur=function(){return D(ft,(0,p.useContext)(Le))},lr=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=ur(),i=sr(t),o=i[0],u=i[1],f=i[2],s=pt(a,f),c=e,m=s.use;if(m)for(var l=m.length;l-- >0;)c=m[l](c);return c(o,u||s.fetcher,s)}},et=function(e,r,t){var n=r[e]||(r[e]=[]);return n.push(t),function(){var a=n.indexOf(t);a>=0&&(n[a]=n[n.length-1],n.pop())}},we={dedupe:!0},cr=function(e,r,t){var n=t.cache,a=t.compare,i=t.fallbackData,o=t.suspense,u=t.revalidateOnMount,f=t.refreshInterval,s=t.refreshWhenHidden,c=t.refreshWhenOffline,m=N.get(n),l=m[0],v=m[1],x=m[2],T=m[3],g=it(e),d=g[0],G=g[1],W=g[2],L=(0,p.useRef)(!1),S=(0,p.useRef)(!1),F=(0,p.useRef)(d),P=(0,p.useRef)(r),U=(0,p.useRef)(t),h=function(){return U.current},ve=function(){return h().isVisible()&&h().isOnline()},ne=function(E){return n.set(W,D(n.get(W),E))},Be=n.get(d),Et=y(i)?t.fallback[d]:i,M=y(Be)?Et:Be,Ge=n.get(W)||{},j=Ge.error,je=!L.current,Xe=function(){return je&&!y(u)?u:h().isPaused()?!1:o?y(M)?!1:t.revalidateIfStale:y(M)||t.revalidateIfStale},wt=function(){return!d||!r?!1:Ge.isValidating?!0:je&&Xe()},he=wt(),be=or({data:M,error:j,isValidating:he},S),K=be[0],Ce=be[1],ie=be[2],V=(0,p.useCallback)(function(E){return tt(void 0,void 0,void 0,function(){var R,O,w,X,Y,I,C,A,z,ye,J,B,xe;return rt(this,function(q){switch(q.label){case 0:if(R=P.current,!d||!R||S.current||h().isPaused())return[2,!1];X=!0,Y=E||{},I=!T[d]||!Y.dedupe,C=function(){return!S.current&&d===F.current&&L.current},A=function(){var Ye=T[d];Ye&&Ye[1]===w&&delete T[d]},z={isValidating:!1},ye=function(){ne({isValidating:!1}),C()&&ie(z)},ne({isValidating:!0}),ie({isValidating:!0}),q.label=1;case 1:return q.trys.push([1,3,,4]),I&&(ee(n,d,K.current.data,K.current.error,!0),t.loadingTimeout&&!n.get(d)&&setTimeout(function(){X&&C()&&h().onLoadingSlow(d,t)},t.loadingTimeout),T[d]=[R.apply(void 0,G),ke()]),xe=T[d],O=xe[0],w=xe[1],[4,O];case 2:return O=q.sent(),I&&setTimeout(A,t.dedupingInterval),!T[d]||T[d][1]!==w?(I&&C()&&h().onDiscarded(d),[2,!1]):(ne({error:b}),z.error=b,J=x[d],!y(J)&&(w<=J[0]||w<=J[1]||J[1]===0)?(ye(),I&&C()&&h().onDiscarded(d),[2,!1]):(a(K.current.data,O)?z.data=K.current.data:z.data=O,a(n.get(d),O)||n.set(d,O),I&&C()&&h().onSuccess(O,d,t),[3,4]));case 3:return B=q.sent(),A(),h().isPaused()||(ne({error:B}),z.error=B,I&&C()&&(h().onError(B,d,t),(typeof t.shouldRetryOnError=="boolean"&&t.shouldRetryOnError||_(t.shouldRetryOnError)&&t.shouldRetryOnError(B))&&ve()&&h().onErrorRetry(B,d,t,V,{retryCount:(Y.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return X=!1,ye(),C()&&I&&ee(n,d,z.data,z.error,!1),[2,!0]}})})},[d]),St=(0,p.useCallback)(ut.bind(b,n,function(){return F.current}),[]);if(Q(function(){P.current=r,U.current=t}),Q(function(){if(!!d){var E=d!==F.current,R=V.bind(b,we),O=function(C,A,z){ie(D({error:A,isValidating:z},a(K.current.data,C)?b:{data:C}))},w=0,X=function(C){if(C==at){var A=Date.now();h().revalidateOnFocus&&A>w&&ve()&&(w=A+h().focusThrottleInterval,R())}else if(C==ot)h().revalidateOnReconnect&&ve()&&R();else if(C==st)return V()},Y=et(d,v,O),I=et(d,l,X);return S.current=!1,F.current=d,L.current=!0,E&&ie({data:M,error:j,isValidating:he}),Xe()&&(y(M)||ue?R():tr(R)),function(){S.current=!0,Y(),I()}}},[d,V]),Q(function(){var E;function R(){var w=_(f)?f(M):f;w&&E!==-1&&(E=setTimeout(O,w))}function O(){!K.current.error&&(s||h().isVisible())&&(c||h().isOnline())?V(we).then(R):R()}return R(),function(){E&&(clearTimeout(E),E=-1)}},[f,s,c,V]),(0,p.useDebugValue)(M),o&&y(M)&&d)throw P.current=r,U.current=t,S.current=!1,y(j)?V(we):j;return{mutate:St,get data(){return Ce.data=!0,M},get error(){return Ce.error=!0,j},get isValidating(){return Ce.isValidating=!0,he}}},gn=Z.defineProperty(ar,"default",{value:ft});var Ae=lr(cr);var dr=e=>{let{invitationList:r,membershipList:t}=e||{},{organization:n,lastOrganizationMember:a,lastOrganizationInvitation:i}=Oe(),o=Re(),u=H(),f=u.loaded&&o&&n,s=u.loaded?()=>u.organization?.getPendingInvitations(r):()=>[],c=u.loaded?()=>u.organization?.getMemberships(t):()=>[],{data:m,isValidating:l,mutate:v}=Ae(f&&r?mt("invites",n,i,r):null,s),{data:x,isValidating:T,mutate:g}=Ae(f&&t?mt("memberships",n,a,t):null,c);return n===void 0?{isLoaded:!1,organization:void 0,invitationList:void 0,membershipList:void 0,membership:void 0}:n===null?{isLoaded:!0,organization:null,invitationList:null,membershipList:null,membership:null}:!u.loaded&&n?{isLoaded:!0,organization:n,invitationList:void 0,membershipList:void 0,membership:void 0}:{isLoaded:!T&&!l,organization:n,membershipList:x,membership:fr(o.user.organizationMemberships,n.id),invitationList:m,unstable__mutate:()=>{g(),v()}}};function fr(e,r){return e.find(t=>t.organization.id===r)}function mt(e,r,t,n){return[e,r.id,t?.id,t?.updatedAt,n.offset,n.limit].filter(Boolean).join("-")}var pr=()=>{let e=H(),r=Te();return!e.loaded||!r?{isLoaded:!1,organizationList:void 0,createOrganization:void 0,setActive:void 0}:{isLoaded:!0,organizationList:mr(r.organizationMemberships),setActive:e.setActive,createOrganization:e.createOrganization}};function mr(e){return e.map(r=>({membership:r,organization:r.organization}))}var gr=()=>{let e=H();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}};var vr=e=>{if(e.length==0)return"";if(e.length==1)return e[0];let r=e.slice(0,-1).join(", ");return r+=`, or ${e.slice(-1)}`,r};function hr(){return typeof window<"u"}var br=/^#?([A-F0-9]{6}|[A-F0-9]{3})$/i,Cr=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/i,yr=/^rgba\((\d+),\s*(\d+),\s*(\d+)(,\s*\d+(\.\d+)?)\)$/i,xr=/^hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)$/i,Tr=/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(,\s*\d+(\.\d+)?)*\)$/i,re=e=>!!e.match(br),le=e=>!!(e.match(Cr)||e.match(yr)),ce=e=>!!e.match(xr)||!!e.match(Tr),_e=e=>typeof e!="string"&&"r"in e,We=e=>typeof e!="string"&&"h"in e,de=e=>e==="transparent",Rr=e=>typeof e!="string"&&e.a!=null&&e.a<1;var Or=/[hsla()]/g,Er=/[rgba()]/g,wr=e=>e==="transparent"?{h:0,s:0,l:0,a:0}:re(e)?kr(e):ce(e)?Ct(e):le(e)?ht(e):null,Sr=e=>(e=e.trim(),re(e)?e.startsWith("#")?e:`#${e}`:le(e)?bt(e):ce(e)?Ct(e):de(e)?e:""),gt=e=>typeof e=="string"&&(re(e)||de(e))?e:_e(e)?Ir(e):We(e)?zr(e):"",vt=e=>{e=e.replace("#","");let r=parseInt(e.substring(0,2),16),t=parseInt(e.substring(2,4),16),n=parseInt(e.substring(4,6),16);return{r,g:t,b:n}},Ir=e=>{let{a:r,b:t,g:n,r:a}=e;return e.a===0?"transparent":e.a!=null?`rgba(${a},${n},${t},${r})`:`rgb(${a},${n},${t})`},zr=e=>{let{h:r,s:t,l:n,a}=e,i=Math.round(t*100),o=Math.round(n*100);return e.a===0?"transparent":e.a!=null?`hsla(${r},${i}%,${o}%,${a})`:`hsl(${r},${i}%,${o}%)`},kr=e=>{let r=gt(vt(e));return ht(r)},ht=e=>{let r=bt(e),t=r.r/255,n=r.g/255,a=r.b/255,i=Math.max(t,n,a),o=Math.min(t,n,a),u,f,s=(i+o)/2;if(i==o)u=f=0;else{let l=i-o;switch(f=s>=.5?l/(2-(i+o)):l/(i+o),i){case t:u=(n-a)/l*60;break;case n:u=((a-t)/l+2)*60;break;default:u=((t-n)/l+4)*60;break}}let c={h:Math.round(u),s:f,l:s},m=r.a;return m!=null&&(c.a=m),c},bt=e=>{let[r,t,n,a]=e.replace(Er,"").split(",").map(i=>Number.parseFloat(i));return{r,g:t,b:n,a}},Ct=e=>{let[r,t,n,a]=e.replace(Or,"").split(",").map(i=>Number.parseFloat(i));return{h:r,s:t/100,l:n/100,a}};function fe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)e[n]=t[n]}return e}var Lr={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)}};function Fe(e,r){function t(a,i,o){if(!(typeof document>"u")){o=fe({},r,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var f in o)!o[f]||(u+="; "+f,o[f]!==!0&&(u+="="+o[f].split(";")[0]));return document.cookie=a+"="+e.write(i,a)+u}}function n(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var i=document.cookie?document.cookie.split("; "):[],o={},u=0;u<i.length;u++){var f=i[u].split("="),s=f.slice(1).join("=");try{var c=decodeURIComponent(f[0]);if(o[c]=e.read(s,c),a===c)break}catch{}}return a?o[a]:o}}return Object.create({set:t,get:n,remove:function(a,i){t(a,"",fe({},i,{expires:-1}))},withAttributes:function(a){return Fe(this.converter,fe({},this.attributes,a))},withConverter:function(a){return Fe(fe({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(e)}})}var Mr=Fe(Lr,{path:"/"}),pe=Mr;function Dr(e){return{get(){return pe.get(e)},set(r,t={}){return pe.set(e,r,t)},remove(r){pe.remove(e,r)}}}function Pr(e){return e?e.toLocaleString("en-US",{hour:"2-digit",minute:"numeric",hour12:!0}):""}function yt(e,r,{absolute:t=!0}={}){if(!e||!r)return 0;let n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),a=Date.UTC(r.getFullYear(),r.getMonth(),r.getDate()),i=Math.floor((a-n)/864e5);return t?Math.abs(i):i}function me(e){try{return new Date(e||new Date)}catch{return new Date}}function Ar(e){let{date:r,relativeTo:t}=e;if(!r||!t)return null;let n=me(r),a=me(t),i=yt(a,n,{absolute:!1});return i<-6?{relativeDateCase:"other",date:n}:i<-1?{relativeDateCase:"previous6Days",date:n}:i===-1?{relativeDateCase:"lastDay",date:n}:i===0?{relativeDateCase:"sameDay",date:n}:i===1?{relativeDateCase:"nextDay",date:n}:i<7?{relativeDateCase:"next6Days",date:n}:{relativeDateCase:"other",date:n}}function _r(e,r){let t=me(e);return t.setFullYear(t.getFullYear()+r),t}function Wr(e){return new Promise((r,t)=>{let n=new FileReader;n.addEventListener("load",function(){let a=JSON.parse(n.result);r(a)}),n.addEventListener("error",t),n.readAsText(e)})}var Ue="pk_live_",xt="pk_test_",Fr=/^(([a-z]+)-){2}([0-9]{1,2})\.clerk\.accounts([a-z.]*)(dev|com)$/i;function Ur(e){return`${Fr.test(e)?xt:Ue}${btoa(`${e}$`)}`}function Vr(e){if(e=e||"",!Tt(e))return null;let r=e.startsWith(Ue)?"production":"development",t=atob(e.split("_")[2]);return t.endsWith("$")?(t=t.slice(0,-1),{instanceType:r,frontendApi:t}):null}function Tt(e){e=e||"";let r=e.startsWith(Ue)||e.startsWith(xt),t=atob(e.split("_")[2]||"").endsWith("$");return r&&t}function $r(e){return e=e||"",e.startsWith("clerk.")}function Hr(){if(!window.matchMedia)return!1;let e=window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");return e&&e.matches||window.devicePixelRatio>1}var Nr="__lsbc__",Ve=class{constructor(r){this.eventTarget=window;this.postMessage=r=>{try{localStorage.setItem(this.channelKey,JSON.stringify(r)),localStorage.removeItem(this.channelKey)}catch{}};this.addEventListener=(r,t)=>{this.eventTarget.addEventListener(this.prefixEventName(r),n=>{t(n)})};this.setupLocalStorageListener=()=>{let r=t=>{if(!(t.key!==this.channelKey||!t.newValue))try{let n=JSON.parse(t.newValue||""),a=new MessageEvent(this.prefixEventName("message"),{data:n});this.eventTarget.dispatchEvent(a)}catch{}};window.addEventListener("storage",r)};this.channelKey=Nr+r,this.setupLocalStorageListener()}prefixEventName(r){return this.channelKey+r}};var Kr=Object.freeze({"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/x-icon":"ico","image/vnd.microsoft.icon":"ico"}),Br=e=>Kr[e];var $e=(...e)=>{};var Gr=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;function jr(e){return Gr.test(e||"")}function Xr(e){let r=e||"";return r.charAt(0).toUpperCase()+r.slice(1)}function He(e){return e?e.replace(/([-_][a-z])/g,r=>r.toUpperCase().replace(/-|_/,"")):""}function Ne(e){return e?e.replace(/[A-Z]/g,r=>`_${r.toLowerCase()}`):""}var Rt=e=>{let r=t=>{if(!t)return t;if(Array.isArray(t))return t.map(i=>typeof i=="object"||Array.isArray(i)?r(i):i);let n={...t},a=Object.keys(n);for(let i of a){let o=e(i.toString());o!==i&&(n[o]=n[i],delete n[i]),typeof n[o]=="object"&&(n[o]=r(n[o]))}return n};return r},Yr=Rt(Ne),Jr=Rt(He);var Ke=`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}}); | ||
`;var Ot=(e,r={})=>{if(typeof Worker>"u")return null;try{let t=new Blob([e],{type:"application/javascript; charset=utf-8"}),n=globalThis.URL.createObjectURL(t);return new Worker(n,r)}catch{return console.warn("Clerk: Cannot create worker from blob. Consider adding worker-src blob:; to your CSP"),null}},Zr=()=>{let e=globalThis.setTimeout.bind(globalThis),r=globalThis.setInterval.bind(globalThis),t=globalThis.clearTimeout.bind(globalThis),n=globalThis.clearInterval.bind(globalThis);return{setTimeout:e,setInterval:r,clearTimeout:t,clearInterval:n,cleanup:$e}},ge=()=>{let e=0,r=()=>e++,t=new Map,n=(l,v)=>l?.postMessage(v),a=l=>{t.get(l.data.id)?.()},i=Ot(Ke,{name:"clerk-timers"});if(i?.addEventListener("message",a),!i)return Zr();let o=()=>{i||(i=Ot(Ke,{name:"clerk-timers"}),i?.addEventListener("message",a))};return{setTimeout:(l,v)=>{o();let x=r();return t.set(x,l),n(i,{type:"setTimeout",id:x,ms:v}),x},setInterval:(l,v)=>{o();let x=r();return t.set(x,l),n(i,{type:"setInterval",id:x,ms:v}),x},clearTimeout:l=>{o(),t.delete(l),n(i,{type:"clearTimeout",id:l})},clearInterval:l=>{o(),t.delete(l),n(i,{type:"clearInterval",id:l})},cleanup:()=>{i&&(i.terminate(),i=null,t.clear())}}};function Qr({delayInMs:e}={delayInMs:1e3}){let r=ge(),t,n=!1,a=()=>{t&&(r.clearTimeout(t),r.cleanup()),n=!0},i=async o=>{n=!1,await o(a),!n&&(t=r.setTimeout(()=>{i(o)},e))};return{run:i,stop:a}}var en=()=>typeof window<"u";function tn(e=""){return e.startsWith("?")&&(e=e.slice(1)),new URLSearchParams(e)}var rn={maxRetries:10,firstDelay:125,timeMultiple:2,shouldRetry:()=>!0},nn=async e=>new Promise(r=>setTimeout(r,e)),an=e=>{let r=0,t=()=>{let n=e.firstDelay,a=e.timeMultiple;return n*Math.pow(a,r)};return async()=>{await nn(t()),r++}},on=async(e,r={})=>{let t=0,{maxRetries:n,shouldRetry:a,firstDelay:i,timeMultiple:o}={...rn,...r},u=()=>t===n,f=an({firstDelay:i,timeMultiple:o});for(;!u();)try{return await e()}catch(s){if(t++,!a(s,t)||u())throw s;await f()}throw new Error("Something went wrong")};0&&(module.exports={ClerkInstanceContext,ClientContext,LocalStorageBroadcastChannel,OrganizationContext,Poller,SessionContext,UserContext,addYears,assertContextExists,buildErrorThrower,buildPublishableKey,camelToSnake,colorToSameTypeString,createContextAndHook,createCookieHandler,createWorkerTimers,dateTo12HourTime,deepCamelToSnake,deepSnakeToCamel,differenceInCalendarDays,extension,formatRelative,hasAlpha,hexStringToRgbaColor,inBrowser,inClientSide,isHSLColor,isIPV4Address,isLegacyFrontendApiKey,isPublishableKey,isRGBColor,isRetinaDisplay,isTransparent,isValidHexString,isValidHslaString,isValidRgbaString,noop,normalizeDate,parsePublishableKey,parseSearchParams,readJSONFile,runWithExponentialBackOff,snakeToCamel,stringToHslaColor,stringToSameTypeColor,titleize,toSentence,useClerkInstanceContext,useClientContext,useOrganization,useOrganizationContext,useOrganizationList,useOrganizations,useSessionContext,useUserContext}); | ||
"use strict";var zt=Object.create;var ae=Object.defineProperty;var Lt=Object.getOwnPropertyDescriptor;var kt=Object.getOwnPropertyNames;var Mt=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var Pt=(e,r)=>{for(var t in r)ae(e,t,{get:r[t],enumerable:!0})},qe=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of kt(r))!Dt.call(e,a)&&a!==t&&ae(e,a,{get:()=>r[a],enumerable:!(n=Lt(r,a))||n.enumerable});return e};var At=(e,r,t)=>(t=e!=null?zt(Mt(e)):{},qe(r||!e||!e.__esModule?ae(t,"default",{value:e,enumerable:!0}):t,e)),_t=e=>qe(ae({},"__esModule",{value:!0}),e);var un={};Pt(un,{ClerkInstanceContext:()=>Ut,ClientContext:()=>$t,LocalStorageBroadcastChannel:()=>$e,OrganizationContext:()=>Kt,Poller:()=>en,SessionContext:()=>Nt,UserContext:()=>Vt,addYears:()=>Wr,assertContextExists:()=>Ze,buildErrorThrower:()=>Ft,buildPublishableKey:()=>Vr,camelToSnake:()=>Ke,colorToSameTypeString:()=>vt,createContextAndHook:()=>$,createCookieHandler:()=>Pr,createWorkerTimers:()=>ve,dateTo12HourTime:()=>Ar,deepCamelToSnake:()=>Jr,deepSnakeToCamel:()=>qr,differenceInCalendarDays:()=>xt,extension:()=>Gr,formatRelative:()=>_r,hasAlpha:()=>Or,hexStringToRgbaColor:()=>ht,inBrowser:()=>br,inClientSide:()=>tn,isHSLColor:()=>Fe,isIPV4Address:()=>Xr,isLegacyFrontendApiKey:()=>Hr,isPublishableKey:()=>Rt,isRGBColor:()=>We,isRetinaDisplay:()=>Nr,isTransparent:()=>de,isValidHexString:()=>re,isValidHslaString:()=>ce,isValidRgbaString:()=>le,isomorphicAtob:()=>ge,noop:()=>He,normalizeDate:()=>me,parsePublishableKey:()=>$r,parseSearchParams:()=>rn,readJSONFile:()=>Fr,runWithExponentialBackOff:()=>sn,snakeToCamel:()=>Ne,stringToHslaColor:()=>Sr,stringToSameTypeColor:()=>Ir,titleize:()=>Yr,toSentence:()=>hr,useClerkInstanceContext:()=>H,useClientContext:()=>Ht,useOrganization:()=>fr,useOrganizationContext:()=>Ee,useOrganizationList:()=>mr,useOrganizations:()=>vr,useSessionContext:()=>Oe,useUserContext:()=>Re});module.exports=_t(un);var Wt=Object.freeze({InvalidFrontendApiErrorMessage:"The frontendApi passed to Clerk is invalid. You can get your Frontend API key at https://dashboard.clerk.dev/last-active?path=api-keys. (key={{key}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.dev/last-active?path=api-keys. (key={{key}})",MissingFrontendApiPublishableKeyErrorMessage:"Missing frontendApi or publishableKey. You can get your key at https://dashboard.clerk.dev/last-active?path=api-keys."});function Ft({packageName:e,customMessages:r}){let t=e,n={...Wt,...r};function a(i,o){if(!o)return`${t}: ${i}`;let u=i,f=i.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(let s of f){let d=(o[s[1]]||"").toString();u=u.replace(`{{${s[1]}}}`,d)}return`${t}: ${u}`}return{setPackageName({packageName:i}){return typeof i=="string"&&(t=i),this},setMessages({customMessages:i}){return Object.assign(n,i||{}),this},throwInvalidPublishableKeyError(i){throw new Error(a(n.InvalidPublishableKeyErrorMessage,i))},throwInvalidFrontendApiError(i){throw new Error(a(n.InvalidFrontendApiErrorMessage,i))},throwMissingFrontendApiOrPublishableKeyError(){throw new Error(a(n.MissingFrontendApiPublishableKeyErrorMessage))}}}var oe=At(require("react"));function Ze(e,r){if(!e)throw typeof r=="string"?new Error(r):new Error(`${r.displayName} not found`)}var $=(e,r)=>{let{assertCtxFn:t=Ze}=r||{},n=oe.default.createContext(void 0);return n.displayName=e,[n,()=>{let o=oe.default.useContext(n);return t(o,`${e} not found`),o.value},()=>{let o=oe.default.useContext(n);return o?o.value:{}}]};var[Ut,H]=$("ClerkInstanceContext"),[Vt,Re]=$("UserContext"),[$t,Ht]=$("ClientContext"),[Nt,Oe]=$("SessionContext"),[Kt,Ee]=$("OrganizationContext");var p=require("react");function rt(e,r,t,n){function a(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function u(d){try{s(n.next(d))}catch(m){o(m)}}function f(d){try{s(n.throw(d))}catch(m){o(m)}}function s(d){d.done?i(d.value):a(d.value).then(u,f)}s((n=n.apply(e,r||[])).next())})}function nt(e,r){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(d){return f([s,d])}}function f(s){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(i=s[0]&2?a.return:s[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,s[1])).done)return i;switch(a=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return t.label++,{value:s[1],done:!1};case 5:t.label++,a=s[1],s=[0];continue;case 7:s=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){t.label=s[1];break}if(s[0]===6&&t.label<i[1]){t.label=i[1],i=s;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(s);break}i[2]&&t.ops.pop(),t.trys.pop();continue}s=r.call(e,t)}catch(d){s=[6,d],a=0}finally{n=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}var L=function(){},b=L(),Z=Object,y=function(e){return e===b},_=function(e){return typeof e=="function"},D=function(e,r){return Z.assign({},e,r)},De="undefined",Pe=function(){return typeof window!=De},Bt=function(){return typeof document!=De},Gt=function(){return Pe()&&typeof window.requestAnimationFrame!=De},se=new WeakMap,jt=0,te=function(e){var r=typeof e,t=e&&e.constructor,n=t==Date,a,i;if(Z(e)===e&&!n&&t!=RegExp){if(a=se.get(e),a)return a;if(a=++jt+"~",se.set(e,a),t==Array){for(a="@",i=0;i<e.length;i++)a+=te(e[i])+",";se.set(e,a)}if(t==Z){a="#";for(var o=Z.keys(e).sort();!y(i=o.pop());)y(e[i])||(a+=i+":"+te(e[i])+",");se.set(e,a)}}else a=n?e.toJSON():r=="symbol"?e.toString():r=="string"?JSON.stringify(e):""+e;return a},Ie=!0,Xt=function(){return Ie},it=Pe(),Ae=Bt(),ze=it&&window.addEventListener?window.addEventListener.bind(window):L,Yt=Ae?document.addEventListener.bind(document):L,Le=it&&window.removeEventListener?window.removeEventListener.bind(window):L,Jt=Ae?document.removeEventListener.bind(document):L,qt=function(){var e=Ae&&document.visibilityState;return y(e)||e!=="hidden"},Zt=function(e){return Yt("visibilitychange",e),ze("focus",e),function(){Jt("visibilitychange",e),Le("focus",e)}},Qt=function(e){var r=function(){Ie=!0,e()},t=function(){Ie=!1};return ze("online",r),ze("offline",t),function(){Le("online",r),Le("offline",t)}},er={isOnline:Xt,isVisible:qt},tr={initFocus:Zt,initReconnect:Qt},ue=!Pe()||"Deno"in window,rr=function(e){return Gt()?window.requestAnimationFrame(e):setTimeout(e,1)},Q=ue?p.useEffect:p.useLayoutEffect,we=typeof navigator!="undefined"&&navigator.connection,Qe=!ue&&we&&(["slow-2g","2g"].includes(we.effectiveType)||we.saveData),at=function(e){if(_(e))try{e=e()}catch{e=""}var r=[].concat(e);e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?te(e):"";var t=e?"$swr$"+e:"";return[e,r,t]},N=new WeakMap,ot=0,st=1,ut=2,ee=function(e,r,t,n,a,i,o){o===void 0&&(o=!0);var u=N.get(e),f=u[0],s=u[1],d=u[3],m=f[r],c=s[r];if(o&&c)for(var v=0;v<c.length;++v)c[v](t,n,a);return i&&(delete d[r],m&&m[0])?m[0](ut).then(function(){return e.get(r)}):e.get(r)},nr=0,ke=function(){return++nr},lt=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return rt(void 0,void 0,void 0,function(){var t,n,a,i,o,u,f,s,d,m,c,v,x,T,g,l,G,W,k,S,F;return nt(this,function(P){switch(P.label){case 0:if(t=e[0],n=e[1],a=e[2],i=e[3],o=typeof i=="boolean"?{revalidate:i}:i||{},u=y(o.populateCache)?!0:o.populateCache,f=o.revalidate!==!1,s=o.rollbackOnError!==!1,d=o.optimisticData,m=at(n),c=m[0],v=m[2],!c)return[2];if(x=N.get(t),T=x[2],e.length<3)return[2,ee(t,c,t.get(c),b,b,f,!0)];if(g=a,G=ke(),T[c]=[G,0],W=!y(d),k=t.get(c),W&&(S=_(d)?d(k):d,t.set(c,S),ee(t,c,S)),_(g))try{g=g(t.get(c))}catch(U){l=U}return g&&_(g.then)?[4,g.catch(function(U){l=U})]:[3,2];case 1:if(g=P.sent(),G!==T[c][0]){if(l)throw l;return[2,g]}else l&&W&&s&&(u=!0,g=k,t.set(c,k));P.label=2;case 2:return u&&(l||(_(u)&&(g=u(g,k)),t.set(c,g)),t.set(v,D(t.get(v),{error:l}))),T[c][1]=ke(),[4,ee(t,c,g,l,b,f,!!u)];case 3:if(F=P.sent(),l)throw l;return[2,u?F:g]}})})},et=function(e,r){for(var t in e)e[t][0]&&e[t][0](r)},ct=function(e,r){if(!N.has(e)){var t=D(tr,r),n={},a=lt.bind(b,e),i=L;if(N.set(e,[n,{},{},{},a]),!ue){var o=t.initFocus(setTimeout.bind(b,et.bind(b,n,ot))),u=t.initReconnect(setTimeout.bind(b,et.bind(b,n,st)));i=function(){o&&o(),u&&u(),N.delete(e)}}return[e,a,i]}return[e,N.get(e)[4]]},ir=function(e,r,t,n,a){var i=t.errorRetryCount,o=a.retryCount,u=~~((Math.random()+.5)*(1<<(o<8?o:8)))*t.errorRetryInterval;!y(i)&&o>i||setTimeout(n,u,a)},dt=ct(new Map),ft=dt[0],ar=dt[1],pt=D({onLoadingSlow:L,onSuccess:L,onError:L,onErrorRetry:ir,onDiscarded:L,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Qe?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Qe?5e3:3e3,compare:function(e,r){return te(e)==te(r)},isPaused:function(){return!1},cache:ft,mutate:ar,fallback:{}},er),mt=function(e,r){var t=D(e,r);if(r){var n=e.use,a=e.fallback,i=r.use,o=r.fallback;n&&i&&(t.use=n.concat(i)),a&&o&&(t.fallback=D(a,o))}return t},Me=(0,p.createContext)({}),or=function(e){var r=e.value,t=mt((0,p.useContext)(Me),r),n=r&&r.provider,a=(0,p.useState)(function(){return n?ct(n(t.cache||ft),r):b})[0];return a&&(t.cache=a[0],t.mutate=a[1]),Q(function(){return a?a[2]:b},[]),(0,p.createElement)(Me.Provider,D(e,{value:t}))},sr=function(e,r){var t=(0,p.useState)({})[1],n=(0,p.useRef)(e),a=(0,p.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,p.useCallback)(function(o){var u=!1,f=n.current;for(var s in o){var d=s;f[d]!==o[d]&&(f[d]=o[d],a.current[d]&&(u=!0))}u&&!r.current&&t({})},[]);return Q(function(){n.current=e}),[n,a.current,i]},ur=function(e){return _(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}]},lr=function(){return D(pt,(0,p.useContext)(Me))},cr=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=lr(),i=ur(t),o=i[0],u=i[1],f=i[2],s=mt(a,f),d=e,m=s.use;if(m)for(var c=m.length;c-- >0;)d=m[c](d);return d(o,u||s.fetcher,s)}},tt=function(e,r,t){var n=r[e]||(r[e]=[]);return n.push(t),function(){var a=n.indexOf(t);a>=0&&(n[a]=n[n.length-1],n.pop())}},Se={dedupe:!0},dr=function(e,r,t){var n=t.cache,a=t.compare,i=t.fallbackData,o=t.suspense,u=t.revalidateOnMount,f=t.refreshInterval,s=t.refreshWhenHidden,d=t.refreshWhenOffline,m=N.get(n),c=m[0],v=m[1],x=m[2],T=m[3],g=at(e),l=g[0],G=g[1],W=g[2],k=(0,p.useRef)(!1),S=(0,p.useRef)(!1),F=(0,p.useRef)(l),P=(0,p.useRef)(r),U=(0,p.useRef)(t),h=function(){return U.current},he=function(){return h().isVisible()&&h().isOnline()},ne=function(E){return n.set(W,D(n.get(W),E))},Ge=n.get(l),wt=y(i)?t.fallback[l]:i,M=y(Ge)?wt:Ge,je=n.get(W)||{},j=je.error,Xe=!k.current,Ye=function(){return Xe&&!y(u)?u:h().isPaused()?!1:o?y(M)?!1:t.revalidateIfStale:y(M)||t.revalidateIfStale},St=function(){return!l||!r?!1:je.isValidating?!0:Xe&&Ye()},be=St(),Ce=sr({data:M,error:j,isValidating:be},S),K=Ce[0],ye=Ce[1],ie=Ce[2],V=(0,p.useCallback)(function(E){return rt(void 0,void 0,void 0,function(){var R,O,w,X,Y,I,C,A,z,xe,J,B,Te;return nt(this,function(q){switch(q.label){case 0:if(R=P.current,!l||!R||S.current||h().isPaused())return[2,!1];X=!0,Y=E||{},I=!T[l]||!Y.dedupe,C=function(){return!S.current&&l===F.current&&k.current},A=function(){var Je=T[l];Je&&Je[1]===w&&delete T[l]},z={isValidating:!1},xe=function(){ne({isValidating:!1}),C()&&ie(z)},ne({isValidating:!0}),ie({isValidating:!0}),q.label=1;case 1:return q.trys.push([1,3,,4]),I&&(ee(n,l,K.current.data,K.current.error,!0),t.loadingTimeout&&!n.get(l)&&setTimeout(function(){X&&C()&&h().onLoadingSlow(l,t)},t.loadingTimeout),T[l]=[R.apply(void 0,G),ke()]),Te=T[l],O=Te[0],w=Te[1],[4,O];case 2:return O=q.sent(),I&&setTimeout(A,t.dedupingInterval),!T[l]||T[l][1]!==w?(I&&C()&&h().onDiscarded(l),[2,!1]):(ne({error:b}),z.error=b,J=x[l],!y(J)&&(w<=J[0]||w<=J[1]||J[1]===0)?(xe(),I&&C()&&h().onDiscarded(l),[2,!1]):(a(K.current.data,O)?z.data=K.current.data:z.data=O,a(n.get(l),O)||n.set(l,O),I&&C()&&h().onSuccess(O,l,t),[3,4]));case 3:return B=q.sent(),A(),h().isPaused()||(ne({error:B}),z.error=B,I&&C()&&(h().onError(B,l,t),(typeof t.shouldRetryOnError=="boolean"&&t.shouldRetryOnError||_(t.shouldRetryOnError)&&t.shouldRetryOnError(B))&&he()&&h().onErrorRetry(B,l,t,V,{retryCount:(Y.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return X=!1,xe(),C()&&I&&ee(n,l,z.data,z.error,!1),[2,!0]}})})},[l]),It=(0,p.useCallback)(lt.bind(b,n,function(){return F.current}),[]);if(Q(function(){P.current=r,U.current=t}),Q(function(){if(!!l){var E=l!==F.current,R=V.bind(b,Se),O=function(C,A,z){ie(D({error:A,isValidating:z},a(K.current.data,C)?b:{data:C}))},w=0,X=function(C){if(C==ot){var A=Date.now();h().revalidateOnFocus&&A>w&&he()&&(w=A+h().focusThrottleInterval,R())}else if(C==st)h().revalidateOnReconnect&&he()&&R();else if(C==ut)return V()},Y=tt(l,v,O),I=tt(l,c,X);return S.current=!1,F.current=l,k.current=!0,E&&ie({data:M,error:j,isValidating:be}),Ye()&&(y(M)||ue?R():rr(R)),function(){S.current=!0,Y(),I()}}},[l,V]),Q(function(){var E;function R(){var w=_(f)?f(M):f;w&&E!==-1&&(E=setTimeout(O,w))}function O(){!K.current.error&&(s||h().isVisible())&&(d||h().isOnline())?V(Se).then(R):R()}return R(),function(){E&&(clearTimeout(E),E=-1)}},[f,s,d,V]),(0,p.useDebugValue)(M),o&&y(M)&&l)throw P.current=r,U.current=t,S.current=!1,y(j)?V(Se):j;return{mutate:It,get data(){return ye.data=!0,M},get error(){return ye.error=!0,j},get isValidating(){return ye.isValidating=!0,be}}},vn=Z.defineProperty(or,"default",{value:pt});var _e=cr(dr);var fr=e=>{let{invitationList:r,membershipList:t}=e||{},{organization:n,lastOrganizationMember:a,lastOrganizationInvitation:i}=Ee(),o=Oe(),u=H(),f=u.loaded&&o&&n,s=u.loaded?()=>{var l;return(l=u.organization)==null?void 0:l.getPendingInvitations(r)}:()=>[],d=u.loaded?()=>{var l;return(l=u.organization)==null?void 0:l.getMemberships(t)}:()=>[],{data:m,isValidating:c,mutate:v}=_e(f&&r?gt("invites",n,i,r):null,s),{data:x,isValidating:T,mutate:g}=_e(f&&t?gt("memberships",n,a,t):null,d);return n===void 0?{isLoaded:!1,organization:void 0,invitationList:void 0,membershipList:void 0,membership:void 0}:n===null?{isLoaded:!0,organization:null,invitationList:null,membershipList:null,membership:null}:!u.loaded&&n?{isLoaded:!0,organization:n,invitationList:void 0,membershipList:void 0,membership:void 0}:{isLoaded:!T&&!c,organization:n,membershipList:x,membership:pr(o.user.organizationMemberships,n.id),invitationList:m,unstable__mutate:()=>{g(),v()}}};function pr(e,r){return e.find(t=>t.organization.id===r)}function gt(e,r,t,n){return[e,r.id,t==null?void 0:t.id,t==null?void 0:t.updatedAt,n.offset,n.limit].filter(Boolean).join("-")}var mr=()=>{let e=H(),r=Re();return!e.loaded||!r?{isLoaded:!1,organizationList:void 0,createOrganization:void 0,setActive:void 0}:{isLoaded:!0,organizationList:gr(r.organizationMemberships),setActive:e.setActive,createOrganization:e.createOrganization}};function gr(e){return e.map(r=>({membership:r,organization:r.organization}))}var vr=()=>{let e=H();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}};var hr=e=>{if(e.length==0)return"";if(e.length==1)return e[0];let r=e.slice(0,-1).join(", ");return r+=`, or ${e.slice(-1)}`,r};function br(){return typeof window!="undefined"}var Cr=/^#?([A-F0-9]{6}|[A-F0-9]{3})$/i,yr=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/i,xr=/^rgba\((\d+),\s*(\d+),\s*(\d+)(,\s*\d+(\.\d+)?)\)$/i,Tr=/^hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)$/i,Rr=/^hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%(,\s*\d+(\.\d+)?)*\)$/i,re=e=>!!e.match(Cr),le=e=>!!(e.match(yr)||e.match(xr)),ce=e=>!!e.match(Tr)||!!e.match(Rr),We=e=>typeof e!="string"&&"r"in e,Fe=e=>typeof e!="string"&&"h"in e,de=e=>e==="transparent",Or=e=>typeof e!="string"&&e.a!=null&&e.a<1;var Er=/[hsla()]/g,wr=/[rgba()]/g,Sr=e=>e==="transparent"?{h:0,s:0,l:0,a:0}:re(e)?kr(e):ce(e)?yt(e):le(e)?bt(e):null,Ir=e=>(e=e.trim(),re(e)?e.startsWith("#")?e:`#${e}`:le(e)?Ct(e):ce(e)?yt(e):de(e)?e:""),vt=e=>typeof e=="string"&&(re(e)||de(e))?e:We(e)?zr(e):Fe(e)?Lr(e):"",ht=e=>{e=e.replace("#","");let r=parseInt(e.substring(0,2),16),t=parseInt(e.substring(2,4),16),n=parseInt(e.substring(4,6),16);return{r,g:t,b:n}},zr=e=>{let{a:r,b:t,g:n,r:a}=e;return e.a===0?"transparent":e.a!=null?`rgba(${a},${n},${t},${r})`:`rgb(${a},${n},${t})`},Lr=e=>{let{h:r,s:t,l:n,a}=e,i=Math.round(t*100),o=Math.round(n*100);return e.a===0?"transparent":e.a!=null?`hsla(${r},${i}%,${o}%,${a})`:`hsl(${r},${i}%,${o}%)`},kr=e=>{let r=vt(ht(e));return bt(r)},bt=e=>{let r=Ct(e),t=r.r/255,n=r.g/255,a=r.b/255,i=Math.max(t,n,a),o=Math.min(t,n,a),u,f,s=(i+o)/2;if(i==o)u=f=0;else{let c=i-o;switch(f=s>=.5?c/(2-(i+o)):c/(i+o),i){case t:u=(n-a)/c*60;break;case n:u=((a-t)/c+2)*60;break;default:u=((t-n)/c+4)*60;break}}let d={h:Math.round(u),s:f,l:s},m=r.a;return m!=null&&(d.a=m),d},Ct=e=>{let[r,t,n,a]=e.replace(wr,"").split(",").map(i=>Number.parseFloat(i));return{r,g:t,b:n,a}},yt=e=>{let[r,t,n,a]=e.replace(Er,"").split(",").map(i=>Number.parseFloat(i));return{h:r,s:t/100,l:n/100,a}};function fe(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)e[n]=t[n]}return e}var Mr={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)}};function Ue(e,r){function t(a,i,o){if(typeof document!="undefined"){o=fe({},r,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var f in o)!o[f]||(u+="; "+f,o[f]!==!0&&(u+="="+o[f].split(";")[0]));return document.cookie=a+"="+e.write(i,a)+u}}function n(a){if(!(typeof document=="undefined"||arguments.length&&!a)){for(var i=document.cookie?document.cookie.split("; "):[],o={},u=0;u<i.length;u++){var f=i[u].split("="),s=f.slice(1).join("=");try{var d=decodeURIComponent(f[0]);if(o[d]=e.read(s,d),a===d)break}catch{}}return a?o[a]:o}}return Object.create({set:t,get:n,remove:function(a,i){t(a,"",fe({},i,{expires:-1}))},withAttributes:function(a){return Ue(this.converter,fe({},this.attributes,a))},withConverter:function(a){return Ue(fe({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(e)}})}var Dr=Ue(Mr,{path:"/"}),pe=Dr;function Pr(e){return{get(){return pe.get(e)},set(r,t={}){return pe.set(e,r,t)},remove(r){pe.remove(e,r)}}}function Ar(e){return e?e.toLocaleString("en-US",{hour:"2-digit",minute:"numeric",hour12:!0}):""}function xt(e,r,{absolute:t=!0}={}){if(!e||!r)return 0;let n=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),a=Date.UTC(r.getFullYear(),r.getMonth(),r.getDate()),i=Math.floor((a-n)/864e5);return t?Math.abs(i):i}function me(e){try{return new Date(e||new Date)}catch{return new Date}}function _r(e){let{date:r,relativeTo:t}=e;if(!r||!t)return null;let n=me(r),a=me(t),i=xt(a,n,{absolute:!1});return i<-6?{relativeDateCase:"other",date:n}:i<-1?{relativeDateCase:"previous6Days",date:n}:i===-1?{relativeDateCase:"lastDay",date:n}:i===0?{relativeDateCase:"sameDay",date:n}:i===1?{relativeDateCase:"nextDay",date:n}:i<7?{relativeDateCase:"next6Days",date:n}:{relativeDateCase:"other",date:n}}function Wr(e,r){let t=me(e);return t.setFullYear(t.getFullYear()+r),t}function Fr(e){return new Promise((r,t)=>{let n=new FileReader;n.addEventListener("load",function(){let a=JSON.parse(n.result);r(a)}),n.addEventListener("error",t),n.readAsText(e)})}var ge=e=>typeof atob!="undefined"&&typeof atob=="function"?atob(e):typeof Buffer!="undefined"?new Buffer(e,"base64").toString():e;var Ve="pk_live_",Tt="pk_test_",Ur=/^(([a-z]+)-){2}([0-9]{1,2})\.clerk\.accounts([a-z.]*)(dev|com)$/i;function Vr(e){return`${Ur.test(e)?Tt:Ve}${btoa(`${e}$`)}`}function $r(e){if(e=e||"",!Rt(e))return null;let r=e.startsWith(Ve)?"production":"development",t=ge(e.split("_")[2]);return t.endsWith("$")?(t=t.slice(0,-1),{instanceType:r,frontendApi:t}):null}function Rt(e){e=e||"";let r=e.startsWith(Ve)||e.startsWith(Tt),t=ge(e.split("_")[2]||"").endsWith("$");return r&&t}function Hr(e){return e=e||"",e.startsWith("clerk.")}function Nr(){if(!window.matchMedia)return!1;let e=window.matchMedia("only screen and (min--moz-device-pixel-ratio: 1.3), only screen and (-o-min-device-pixel-ratio: 2.6/2), only screen and (-webkit-min-device-pixel-ratio: 1.3), only screen and (min-device-pixel-ratio: 1.3), only screen and (min-resolution: 1.3dppx)");return e&&e.matches||window.devicePixelRatio>1}var Kr="__lsbc__",$e=class{constructor(r){this.eventTarget=window;this.postMessage=r=>{try{localStorage.setItem(this.channelKey,JSON.stringify(r)),localStorage.removeItem(this.channelKey)}catch{}};this.addEventListener=(r,t)=>{this.eventTarget.addEventListener(this.prefixEventName(r),n=>{t(n)})};this.setupLocalStorageListener=()=>{let r=t=>{if(!(t.key!==this.channelKey||!t.newValue))try{let n=JSON.parse(t.newValue||""),a=new MessageEvent(this.prefixEventName("message"),{data:n});this.eventTarget.dispatchEvent(a)}catch{}};window.addEventListener("storage",r)};this.channelKey=Kr+r,this.setupLocalStorageListener()}prefixEventName(r){return this.channelKey+r}};var Br=Object.freeze({"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/x-icon":"ico","image/vnd.microsoft.icon":"ico"}),Gr=e=>Br[e];var He=(...e)=>{};var jr=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;function Xr(e){return jr.test(e||"")}function Yr(e){let r=e||"";return r.charAt(0).toUpperCase()+r.slice(1)}function Ne(e){return e?e.replace(/([-_][a-z])/g,r=>r.toUpperCase().replace(/-|_/,"")):""}function Ke(e){return e?e.replace(/[A-Z]/g,r=>`_${r.toLowerCase()}`):""}var Ot=e=>{let r=t=>{if(!t)return t;if(Array.isArray(t))return t.map(i=>typeof i=="object"||Array.isArray(i)?r(i):i);let n={...t},a=Object.keys(n);for(let i of a){let o=e(i.toString());o!==i&&(n[o]=n[i],delete n[i]),typeof n[o]=="object"&&(n[o]=r(n[o]))}return n};return r},Jr=Ot(Ke),qr=Ot(Ne);var Be=`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}}); | ||
`;var Et=(e,r={})=>{if(typeof Worker=="undefined")return null;try{let t=new Blob([e],{type:"application/javascript; charset=utf-8"}),n=globalThis.URL.createObjectURL(t);return new Worker(n,r)}catch{return console.warn("Clerk: Cannot create worker from blob. Consider adding worker-src blob:; to your CSP"),null}},Qr=()=>{let e=globalThis.setTimeout.bind(globalThis),r=globalThis.setInterval.bind(globalThis),t=globalThis.clearTimeout.bind(globalThis),n=globalThis.clearInterval.bind(globalThis);return{setTimeout:e,setInterval:r,clearTimeout:t,clearInterval:n,cleanup:He}},ve=()=>{let e=0,r=()=>e++,t=new Map,n=(c,v)=>c==null?void 0:c.postMessage(v),a=c=>{var v;(v=t.get(c.data.id))==null||v()},i=Et(Be,{name:"clerk-timers"});if(i==null||i.addEventListener("message",a),!i)return Qr();let o=()=>{i||(i=Et(Be,{name:"clerk-timers"}),i==null||i.addEventListener("message",a))};return{setTimeout:(c,v)=>{o();let x=r();return t.set(x,c),n(i,{type:"setTimeout",id:x,ms:v}),x},setInterval:(c,v)=>{o();let x=r();return t.set(x,c),n(i,{type:"setInterval",id:x,ms:v}),x},clearTimeout:c=>{o(),t.delete(c),n(i,{type:"clearTimeout",id:c})},clearInterval:c=>{o(),t.delete(c),n(i,{type:"clearInterval",id:c})},cleanup:()=>{i&&(i.terminate(),i=null,t.clear())}}};function en({delayInMs:e}={delayInMs:1e3}){let r=ve(),t,n=!1,a=()=>{t&&(r.clearTimeout(t),r.cleanup()),n=!0},i=async o=>{n=!1,await o(a),!n&&(t=r.setTimeout(()=>{i(o)},e))};return{run:i,stop:a}}var tn=()=>typeof window!="undefined";function rn(e=""){return e.startsWith("?")&&(e=e.slice(1)),new URLSearchParams(e)}var nn={maxRetries:10,firstDelay:125,timeMultiple:2,shouldRetry:()=>!0},an=async e=>new Promise(r=>setTimeout(r,e)),on=e=>{let r=0,t=()=>{let n=e.firstDelay,a=e.timeMultiple;return n*Math.pow(a,r)};return async()=>{await an(t()),r++}},sn=async(e,r={})=>{let t=0,{maxRetries:n,shouldRetry:a,firstDelay:i,timeMultiple:o}={...nn,...r},u=()=>t===n,f=on({firstDelay:i,timeMultiple:o});for(;!u();)try{return await e()}catch(s){if(t++,!a(s,t)||u())throw s;await f()}throw new Error("Something went wrong")};0&&(module.exports={ClerkInstanceContext,ClientContext,LocalStorageBroadcastChannel,OrganizationContext,Poller,SessionContext,UserContext,addYears,assertContextExists,buildErrorThrower,buildPublishableKey,camelToSnake,colorToSameTypeString,createContextAndHook,createCookieHandler,createWorkerTimers,dateTo12HourTime,deepCamelToSnake,deepSnakeToCamel,differenceInCalendarDays,extension,formatRelative,hasAlpha,hexStringToRgbaColor,inBrowser,inClientSide,isHSLColor,isIPV4Address,isLegacyFrontendApiKey,isPublishableKey,isRGBColor,isRetinaDisplay,isTransparent,isValidHexString,isValidHslaString,isValidRgbaString,isomorphicAtob,noop,normalizeDate,parsePublishableKey,parseSearchParams,readJSONFile,runWithExponentialBackOff,snakeToCamel,stringToHslaColor,stringToSameTypeColor,titleize,toSentence,useClerkInstanceContext,useClientContext,useOrganization,useOrganizationContext,useOrganizationList,useOrganizations,useSessionContext,useUserContext}); | ||
/*! ***************************************************************************** | ||
@@ -4,0 +4,0 @@ Copyright (c) Microsoft Corporation. |
@@ -1,3 +0,3 @@ | ||
"use strict";var D=Object.create;var m=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},u=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of k(t))!P.call(e,n)&&n!==r&&m(e,n,{get:()=>t[n],enumerable:!(s=w(t,n))||s.enumerable});return e},l=(e,t,r)=>(u(e,t,"default"),r&&u(r,t,"default")),_=(e,t,r)=>(r=e!=null?D(I(e)):{},u(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),L=e=>u(m({},"__esModule",{value:!0}),e);var g={};C(g,{noop:()=>f,render:()=>S,userEvent:()=>b.default});module.exports=L(g);var a={};C(a,{noop:()=>f,render:()=>S,userEvent:()=>b.default});var Ve=require("@testing-library/jest-dom/extend-expect"),R=require("@testing-library/react");function d(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)e[s]=r[s]}return e}var M={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)}};function x(e,t){function r(n,i,o){if(!(typeof document>"u")){o=d({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var p in o)!o[p]||(c+="; "+p,o[p]!==!0&&(c+="="+o[p].split(";")[0]));return document.cookie=n+"="+e.write(i,n)+c}}function s(n){if(!(typeof document>"u"||arguments.length&&!n)){for(var i=document.cookie?document.cookie.split("; "):[],o={},c=0;c<i.length;c++){var p=i[c].split("="),E=p.slice(1).join("=");try{var h=decodeURIComponent(p[0]);if(o[h]=e.read(E,h),n===h)break}catch{}}return n?o[n]:o}}return Object.create({set:r,get:s,remove:function(n,i){r(n,"",d({},i,{expires:-1}))},withAttributes:function(n){return x(this.converter,d({},this.attributes,n))},withConverter:function(n){return x(d({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Z=x(M,{path:"/"});var ae=Object.freeze({"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/x-icon":"ico","image/vnd.microsoft.icon":"ico"});var f=(...e)=>{};function T(e){return e?e.replace(/([-_][a-z])/g,t=>t.toUpperCase().replace(/-|_/,"")):""}function y(e){return e?e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`):""}var v=e=>{let t=r=>{if(!r)return r;if(Array.isArray(r))return r.map(i=>typeof i=="object"||Array.isArray(i)?t(i):i);let s={...r},n=Object.keys(s);for(let i of n){let o=e(i.toString());o!==i&&(s[o]=s[i],delete s[i]),typeof s[o]=="object"&&(s[o]=t(s[o]))}return s};return t},me=v(y),de=v(T);l(a,require("@testing-library/react"));var b=_(require("@testing-library/user-event")),S=(e,t)=>(0,R.render)(e,t);l(g,a,module.exports);0&&(module.exports={noop,render,userEvent}); | ||
"use strict";var D=Object.create;var m=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var I=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var C=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},u=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of w(t))!P.call(e,n)&&n!==r&&m(e,n,{get:()=>t[n],enumerable:!(s=k(t,n))||s.enumerable});return e},l=(e,t,r)=>(u(e,t,"default"),r&&u(r,t,"default")),_=(e,t,r)=>(r=e!=null?D(I(e)):{},u(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e)),L=e=>u(m({},"__esModule",{value:!0}),e);var g={};C(g,{noop:()=>d,render:()=>S,userEvent:()=>b.default});module.exports=L(g);var a={};C(a,{noop:()=>d,render:()=>S,userEvent:()=>b.default});var Ye=require("@testing-library/jest-dom/extend-expect"),R=require("@testing-library/react");function f(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)e[s]=r[s]}return e}var M={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)}};function x(e,t){function r(n,i,o){if(typeof document!="undefined"){o=f({},t,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),n=encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var p in o)!o[p]||(c+="; "+p,o[p]!==!0&&(c+="="+o[p].split(";")[0]));return document.cookie=n+"="+e.write(i,n)+c}}function s(n){if(!(typeof document=="undefined"||arguments.length&&!n)){for(var i=document.cookie?document.cookie.split("; "):[],o={},c=0;c<i.length;c++){var p=i[c].split("="),E=p.slice(1).join("=");try{var h=decodeURIComponent(p[0]);if(o[h]=e.read(E,h),n===h)break}catch{}}return n?o[n]:o}}return Object.create({set:r,get:s,remove:function(n,i){r(n,"",f({},i,{expires:-1}))},withAttributes:function(n){return x(this.converter,f({},this.attributes,n))},withConverter:function(n){return x(f({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Z=x(M,{path:"/"});var pe=Object.freeze({"image/png":"png","image/jpeg":"jpg","image/gif":"gif","image/webp":"webp","image/x-icon":"ico","image/vnd.microsoft.icon":"ico"});var d=(...e)=>{};function y(e){return e?e.replace(/([-_][a-z])/g,t=>t.toUpperCase().replace(/-|_/,"")):""}function T(e){return e?e.replace(/[A-Z]/g,t=>`_${t.toLowerCase()}`):""}var v=e=>{let t=r=>{if(!r)return r;if(Array.isArray(r))return r.map(i=>typeof i=="object"||Array.isArray(i)?t(i):i);let s={...r},n=Object.keys(s);for(let i of n){let o=e(i.toString());o!==i&&(s[o]=s[i],delete s[i]),typeof s[o]=="object"&&(s[o]=t(s[o]))}return s};return t},ge=v(T),he=v(y);l(a,require("@testing-library/react"));var b=_(require("@testing-library/user-event")),S=(e,t)=>(0,R.render)(e,t);l(g,a,module.exports);0&&(module.exports={noop,render,userEvent}); | ||
/*! js-cookie v3.0.1 | MIT */ | ||
//# sourceMappingURL=index.js.map |
@@ -20,2 +20,3 @@ export * from './array'; | ||
export * from './runWithExponentialBackOff'; | ||
export * from './isomorphicAtob'; | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@clerk/shared", | ||
"version": "0.9.0-staging.2", | ||
"version": "0.9.0-staging.3", | ||
"description": "Internal package utils used by the Clerk SDKs", | ||
@@ -40,3 +40,3 @@ "types": "./dist/types/index.d.ts", | ||
"license": "ISC", | ||
"gitHead": "5488e823563876f31a826e03a45e6dd8c14ce0db", | ||
"gitHead": "daf93dc67b32ec7180fe14c0ee3297b367995de9", | ||
"publishConfig": { | ||
@@ -43,0 +43,0 @@ "access": "public" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
355382
85
556