diff --git a/1.gif b/1.gif new file mode 100644 index 0000000..9e0c466 Binary files /dev/null and b/1.gif differ diff --git a/2.gif b/2.gif new file mode 100644 index 0000000..4440fbf Binary files /dev/null and b/2.gif differ diff --git a/3.gif b/3.gif new file mode 100644 index 0000000..3c5e50b Binary files /dev/null and b/3.gif differ diff --git a/assets/index-BJwWMNni.js b/assets/index-BJwWMNni.js new file mode 100644 index 0000000..5fae1b4 --- /dev/null +++ b/assets/index-BJwWMNni.js @@ -0,0 +1,56 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Wc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ts={exports:{}},fl={},Os={exports:{}},I={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var tr=Symbol.for("react.element"),Kc=Symbol.for("react.portal"),Yc=Symbol.for("react.fragment"),Gc=Symbol.for("react.strict_mode"),Xc=Symbol.for("react.profiler"),Jc=Symbol.for("react.provider"),Zc=Symbol.for("react.context"),qc=Symbol.for("react.forward_ref"),bc=Symbol.for("react.suspense"),ef=Symbol.for("react.memo"),tf=Symbol.for("react.lazy"),fu=Symbol.iterator;function nf(e){return e===null||typeof e!="object"?null:(e=fu&&e[fu]||e["@@iterator"],typeof e=="function"?e:null)}var xs={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ns=Object.assign,Is={};function dn(e,t,n){this.props=e,this.context=t,this.refs=Is,this.updater=n||xs}dn.prototype.isReactComponent={};dn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};dn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rs(){}Rs.prototype=dn.prototype;function ci(e,t,n){this.props=e,this.context=t,this.refs=Is,this.updater=n||xs}var fi=ci.prototype=new Rs;fi.constructor=ci;Ns(fi,dn.prototype);fi.isPureReactComponent=!0;var du=Array.isArray,Ls=Object.prototype.hasOwnProperty,di={current:null},Us={key:!0,ref:!0,__self:!0,__source:!0};function zs(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Ls.call(t,r)&&!Us.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,G=T[V];if(0>>1;Vl($l,N))Etl(sr,$l)?(T[V]=sr,T[Et]=N,V=Et):(T[V]=$l,T[kt]=N,V=kt);else if(Etl(sr,N))T[V]=sr,T[Et]=N,V=Et;else break e}}return x}function l(T,x){var N=T.sortIndex-x.sortIndex;return N!==0?N:T.id-x.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var s=[],c=[],g=1,v=null,m=3,E=!1,_=!1,C=!1,L=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(T){for(var x=n(c);x!==null;){if(x.callback===null)r(c);else if(x.startTime<=T)r(c),x.sortIndex=x.expirationTime,t(s,x);else break;x=n(c)}}function f(T){if(C=!1,p(T),!_)if(n(s)!==null)_=!0,Dl(h);else{var x=n(c);x!==null&&Fl(f,x.startTime-T)}}function h(T,x){_=!1,C&&(C=!1,d(w),w=-1),E=!0;var N=m;try{for(p(x),v=n(s);v!==null&&(!(v.expirationTime>x)||T&&!fe());){var V=v.callback;if(typeof V=="function"){v.callback=null,m=v.priorityLevel;var G=V(v.expirationTime<=x);x=e.unstable_now(),typeof G=="function"?v.callback=G:v===n(s)&&r(s),p(x)}else r(s);v=n(s)}if(v!==null)var ur=!0;else{var kt=n(c);kt!==null&&Fl(f,kt.startTime-x),ur=!1}return ur}finally{v=null,m=N,E=!1}}var y=!1,k=null,w=-1,U=5,O=-1;function fe(){return!(e.unstable_now()-OT||125V?(T.sortIndex=N,t(c,T),n(s)===null&&T===n(c)&&(C?(d(w),w=-1):C=!0,Fl(f,N-V))):(T.sortIndex=G,t(s,T),_||E||(_=!0,Dl(h))),T},e.unstable_shouldYield=fe,e.unstable_wrapCallback=function(T){var x=m;return function(){var N=m;m=x;try{return T.apply(this,arguments)}finally{m=N}}}})(Fs);Ds.exports=Fs;var hf=Ds.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var mf=le,ke=hf;function S(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),vo=Object.prototype.hasOwnProperty,gf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,hu={},mu={};function vf(e){return vo.call(mu,e)?!0:vo.call(hu,e)?!1:gf.test(e)?mu[e]=!0:(hu[e]=!0,!1)}function yf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function wf(e,t,n,r){if(t===null||typeof t>"u"||yf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ce(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ee[e]=new ce(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ee[t]=new ce(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ee[e]=new ce(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ee[e]=new ce(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ee[e]=new ce(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ee[e]=new ce(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ee[e]=new ce(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ee[e]=new ce(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ee[e]=new ce(e,5,!1,e.toLowerCase(),null,!1,!1)});var hi=/[\-:]([a-z])/g;function mi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(hi,mi);ee[t]=new ce(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(hi,mi);ee[t]=new ce(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(hi,mi);ee[t]=new ce(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ee[e]=new ce(e,1,!1,e.toLowerCase(),null,!1,!1)});ee.xlinkHref=new ce("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ee[e]=new ce(e,1,!1,e.toLowerCase(),null,!0,!0)});function gi(e,t,n,r){var l=ee.hasOwnProperty(t)?ee[t]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var s=` +`+l[i].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=i&&0<=u);break}}}finally{Vl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Cn(e):""}function Sf(e){switch(e.tag){case 5:return Cn(e.type);case 16:return Cn("Lazy");case 13:return Cn("Suspense");case 19:return Cn("SuspenseList");case 0:case 2:case 15:return e=Ql(e.type,!1),e;case 11:return e=Ql(e.type.render,!1),e;case 1:return e=Ql(e.type,!0),e;default:return""}}function ko(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bt:return"Fragment";case $t:return"Portal";case yo:return"Profiler";case vi:return"StrictMode";case wo:return"Suspense";case So:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Hs:return(e.displayName||"Context")+".Consumer";case Bs:return(e._context.displayName||"Context")+".Provider";case yi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wi:return t=e.displayName||null,t!==null?t:ko(e.type)||"Memo";case nt:t=e._payload,e=e._init;try{return ko(e(t))}catch{}}return null}function kf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ko(t);case 8:return t===vi?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function gt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ef(e){var t=Qs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function fr(e){e._valueTracker||(e._valueTracker=Ef(e))}function Ws(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Qs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Br(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Eo(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function vu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ks(e,t){t=t.checked,t!=null&&gi(e,"checked",t,!1)}function _o(e,t){Ks(e,t);var n=gt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Co(e,t.type,n):t.hasOwnProperty("defaultValue")&&Co(e,t.type,gt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Co(e,t,n){(t!=="number"||Br(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pn=Array.isArray;function qt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=dr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Fn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_f=["Webkit","ms","Moz","O"];Object.keys(xn).forEach(function(e){_f.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xn[t]=xn[e]})});function Js(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xn.hasOwnProperty(e)&&xn[e]?(""+t).trim():t+"px"}function Zs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Js(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Cf=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oo(e,t){if(t){if(Cf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function xo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var No=null;function Si(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Io=null,bt=null,en=null;function ku(e){if(e=lr(e)){if(typeof Io!="function")throw Error(S(280));var t=e.stateNode;t&&(t=gl(t),Io(e.stateNode,e.type,t))}}function qs(e){bt?en?en.push(e):en=[e]:bt=e}function bs(){if(bt){var e=bt,t=en;if(en=bt=null,ku(e),t)for(e=0;e>>=0,e===0?32:31-(Af(e)/Mf|0)|0}var pr=64,hr=4194304;function Tn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var u=i&~l;u!==0?r=Tn(u):(o&=i,o!==0&&(r=Tn(o)))}else i=n&~l,i!==0?r=Tn(i):o!==0&&(r=Tn(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function nr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Me(t),e[t]=n}function $f(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=In),Iu=" ",Ru=!1;function wa(e,t){switch(e){case"keyup":return hd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sa(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ht=!1;function gd(e,t){switch(e){case"compositionend":return Sa(t);case"keypress":return t.which!==32?null:(Ru=!0,Iu);case"textInput":return e=t.data,e===Iu&&Ru?null:e;default:return null}}function vd(e,t){if(Ht)return e==="compositionend"||!xi&&wa(e,t)?(e=va(),Rr=Pi=it=null,Ht=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Au(n)}}function Ca(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ca(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pa(){for(var e=window,t=Br();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Br(e.document)}return t}function Ni(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Td(e){var t=Pa(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ca(n.ownerDocument.documentElement,n)){if(r!==null&&Ni(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Mu(n,o);var i=Mu(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Vt=null,Mo=null,Ln=null,jo=!1;function ju(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jo||Vt==null||Vt!==Br(r)||(r=Vt,"selectionStart"in r&&Ni(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ln&&Wn(Ln,r)||(Ln=r,r=Gr(Mo,"onSelect"),0Kt||(e.current=Vo[Kt],Vo[Kt]=null,Kt--)}function A(e,t){Kt++,Vo[Kt]=e.current,e.current=t}var vt={},oe=wt(vt),me=wt(!1),It=vt;function on(e,t){var n=e.type.contextTypes;if(!n)return vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function ge(e){return e=e.childContextTypes,e!=null}function Jr(){j(me),j(oe)}function Qu(e,t,n){if(oe.current!==vt)throw Error(S(168));A(oe,t),A(me,n)}function za(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(S(108,kf(e)||"Unknown",l));return B({},n,r)}function Zr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vt,It=oe.current,A(oe,e),A(me,me.current),!0}function Wu(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=za(e,t,It),r.__reactInternalMemoizedMergedChildContext=e,j(me),j(oe),A(oe,e)):j(me),A(me,n)}var We=null,vl=!1,lo=!1;function Aa(e){We===null?We=[e]:We.push(e)}function Dd(e){vl=!0,Aa(e)}function St(){if(!lo&&We!==null){lo=!0;var e=0,t=z;try{var n=We;for(z=1;e>=i,l-=i,Ke=1<<32-Me(t)+l|n<w?(U=k,k=null):U=k.sibling;var O=m(d,k,p[w],f);if(O===null){k===null&&(k=U);break}e&&k&&O.alternate===null&&t(d,k),a=o(O,a,w),y===null?h=O:y.sibling=O,y=O,k=U}if(w===p.length)return n(d,k),D&&_t(d,w),h;if(k===null){for(;ww?(U=k,k=null):U=k.sibling;var fe=m(d,k,O.value,f);if(fe===null){k===null&&(k=U);break}e&&k&&fe.alternate===null&&t(d,k),a=o(fe,a,w),y===null?h=fe:y.sibling=fe,y=fe,k=U}if(O.done)return n(d,k),D&&_t(d,w),h;if(k===null){for(;!O.done;w++,O=p.next())O=v(d,O.value,f),O!==null&&(a=o(O,a,w),y===null?h=O:y.sibling=O,y=O);return D&&_t(d,w),h}for(k=r(d,k);!O.done;w++,O=p.next())O=E(k,d,w,O.value,f),O!==null&&(e&&O.alternate!==null&&k.delete(O.key===null?w:O.key),a=o(O,a,w),y===null?h=O:y.sibling=O,y=O);return e&&k.forEach(function(et){return t(d,et)}),D&&_t(d,w),h}function L(d,a,p,f){if(typeof p=="object"&&p!==null&&p.type===Bt&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case cr:e:{for(var h=p.key,y=a;y!==null;){if(y.key===h){if(h=p.type,h===Bt){if(y.tag===7){n(d,y.sibling),a=l(y,p.props.children),a.return=d,d=a;break e}}else if(y.elementType===h||typeof h=="object"&&h!==null&&h.$$typeof===nt&&Gu(h)===y.type){n(d,y.sibling),a=l(y,p.props),a.ref=kn(d,y,p),a.return=d,d=a;break e}n(d,y);break}else t(d,y);y=y.sibling}p.type===Bt?(a=Nt(p.props.children,d.mode,f,p.key),a.return=d,d=a):(f=Fr(p.type,p.key,p.props,null,d.mode,f),f.ref=kn(d,a,p),f.return=d,d=f)}return i(d);case $t:e:{for(y=p.key;a!==null;){if(a.key===y)if(a.tag===4&&a.stateNode.containerInfo===p.containerInfo&&a.stateNode.implementation===p.implementation){n(d,a.sibling),a=l(a,p.children||[]),a.return=d,d=a;break e}else{n(d,a);break}else t(d,a);a=a.sibling}a=po(p,d.mode,f),a.return=d,d=a}return i(d);case nt:return y=p._init,L(d,a,y(p._payload),f)}if(Pn(p))return _(d,a,p,f);if(gn(p))return C(d,a,p,f);kr(d,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,a!==null&&a.tag===6?(n(d,a.sibling),a=l(a,p),a.return=d,d=a):(n(d,a),a=fo(p,d.mode,f),a.return=d,d=a),i(d)):n(d,a)}return L}var sn=Fa(!0),$a=Fa(!1),el=wt(null),tl=null,Xt=null,Ui=null;function zi(){Ui=Xt=tl=null}function Ai(e){var t=el.current;j(el),e._currentValue=t}function Ko(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function nn(e,t){tl=e,Ui=Xt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(he=!0),e.firstContext=null)}function Ne(e){var t=e._currentValue;if(Ui!==e)if(e={context:e,memoizedValue:t,next:null},Xt===null){if(tl===null)throw Error(S(308));Xt=e,tl.dependencies={lanes:0,firstContext:e}}else Xt=Xt.next=e;return t}var Tt=null;function Mi(e){Tt===null?Tt=[e]:Tt.push(e)}function Ba(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Mi(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ze(e,r)}function Ze(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var rt=!1;function ji(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ha(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ge(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,R&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ze(e,n)}return l=r.interleaved,l===null?(t.next=t,Mi(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ze(e,n)}function Ur(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ei(e,n)}}function Xu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function nl(e,t,n,r){var l=e.updateQueue;rt=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,c=s.next;s.next=null,i===null?o=c:i.next=c,i=s;var g=e.alternate;g!==null&&(g=g.updateQueue,u=g.lastBaseUpdate,u!==i&&(u===null?g.firstBaseUpdate=c:u.next=c,g.lastBaseUpdate=s))}if(o!==null){var v=l.baseState;i=0,g=c=s=null,u=o;do{var m=u.lane,E=u.eventTime;if((r&m)===m){g!==null&&(g=g.next={eventTime:E,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var _=e,C=u;switch(m=t,E=n,C.tag){case 1:if(_=C.payload,typeof _=="function"){v=_.call(E,v,m);break e}v=_;break e;case 3:_.flags=_.flags&-65537|128;case 0:if(_=C.payload,m=typeof _=="function"?_.call(E,v,m):_,m==null)break e;v=B({},v,m);break e;case 2:rt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,m=l.effects,m===null?l.effects=[u]:m.push(u))}else E={eventTime:E,lane:m,tag:u.tag,payload:u.payload,callback:u.callback,next:null},g===null?(c=g=E,s=v):g=g.next=E,i|=m;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;m=u,u=m.next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}}while(!0);if(g===null&&(s=v),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=g,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);Ut|=i,e.lanes=i,e.memoizedState=v}}function Ju(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=io.transition;io.transition={};try{e(!1),t()}finally{z=n,io.transition=r}}function oc(){return Ie().memoizedState}function Hd(e,t,n){var r=ht(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e))uc(t,n);else if(n=Ba(e,t,n,r),n!==null){var l=se();je(n,e,r,l),sc(n,t,r)}}function Vd(e,t,n){var r=ht(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))uc(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,De(u,i)){var s=t.interleaved;s===null?(l.next=l,Mi(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=Ba(e,t,l,r),n!==null&&(l=se(),je(n,e,r,l),sc(n,t,r))}}function ic(e){var t=e.alternate;return e===$||t!==null&&t===$}function uc(e,t){Un=ll=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function sc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ei(e,n)}}var ol={readContext:Ne,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},Qd={readContext:Ne,useCallback:function(e,t){return $e().memoizedState=[e,t===void 0?null:t],e},useContext:Ne,useEffect:qu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ar(4194308,4,ec.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ar(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ar(4,2,e,t)},useMemo:function(e,t){var n=$e();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$e();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Hd.bind(null,$,e),[r.memoizedState,e]},useRef:function(e){var t=$e();return e={current:e},t.memoizedState=e},useState:Zu,useDebugValue:Wi,useDeferredValue:function(e){return $e().memoizedState=e},useTransition:function(){var e=Zu(!1),t=e[0];return e=Bd.bind(null,e[1]),$e().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$,l=$e();if(D){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),J===null)throw Error(S(349));Lt&30||Ka(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,qu(Ga.bind(null,r,o,e),[e]),r.flags|=2048,bn(9,Ya.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=$e(),t=J.identifierPrefix;if(D){var n=Ye,r=Ke;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Be]=t,e[Gn]=r,yc(e,t,!1,!1),t.stateNode=e;e:{switch(i=xo(n,r),n){case"dialog":M("cancel",e),M("close",e),l=r;break;case"iframe":case"object":case"embed":M("load",e),l=r;break;case"video":case"audio":for(l=0;lfn&&(t.flags|=128,r=!0,En(o,!1),t.lanes=4194304)}else{if(!r)if(e=rl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),En(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!D)return ne(t),null}else 2*Q()-o.renderingStartTime>fn&&n!==1073741824&&(t.flags|=128,r=!0,En(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Q(),t.sibling=null,n=F.current,A(F,r?n&1|2:n&1),t):(ne(t),null);case 22:case 23:return Zi(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ye&1073741824&&(ne(t),t.subtreeFlags&6&&(t.flags|=8192)):ne(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function qd(e,t){switch(Ri(t),t.tag){case 1:return ge(t.type)&&Jr(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return an(),j(me),j(oe),$i(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Fi(t),null;case 13:if(j(F),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));un()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(F),null;case 4:return an(),null;case 10:return Ai(t.type._context),null;case 22:case 23:return Zi(),null;case 24:return null;default:return null}}var _r=!1,re=!1,bd=typeof WeakSet=="function"?WeakSet:Set,P=null;function Jt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){H(e,t,r)}else n.current=null}function ti(e,t,n){try{n()}catch(r){H(e,t,r)}}var as=!1;function ep(e,t){if(Do=Kr,e=Pa(),Ni(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,u=-1,s=-1,c=0,g=0,v=e,m=null;t:for(;;){for(var E;v!==n||l!==0&&v.nodeType!==3||(u=i+l),v!==o||r!==0&&v.nodeType!==3||(s=i+r),v.nodeType===3&&(i+=v.nodeValue.length),(E=v.firstChild)!==null;)m=v,v=E;for(;;){if(v===e)break t;if(m===n&&++c===l&&(u=i),m===o&&++g===r&&(s=i),(E=v.nextSibling)!==null)break;v=m,m=v.parentNode}v=E}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fo={focusedElem:e,selectionRange:n},Kr=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var _=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(_!==null){var C=_.memoizedProps,L=_.memoizedState,d=t.stateNode,a=d.getSnapshotBeforeUpdate(t.elementType===t.type?C:Le(t.type,C),L);d.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(f){H(t,t.return,f)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return _=as,as=!1,_}function zn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&ti(t,n,o)}l=l.next}while(l!==r)}}function Sl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ni(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function kc(e){var t=e.alternate;t!==null&&(e.alternate=null,kc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Be],delete t[Gn],delete t[Ho],delete t[Md],delete t[jd])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ec(e){return e.tag===5||e.tag===3||e.tag===4}function cs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ri(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xr));else if(r!==4&&(e=e.child,e!==null))for(ri(e,t,n),e=e.sibling;e!==null;)ri(e,t,n),e=e.sibling}function li(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(li(e,t,n),e=e.sibling;e!==null;)li(e,t,n),e=e.sibling}var q=null,Ue=!1;function tt(e,t,n){for(n=n.child;n!==null;)_c(e,t,n),n=n.sibling}function _c(e,t,n){if(He&&typeof He.onCommitFiberUnmount=="function")try{He.onCommitFiberUnmount(dl,n)}catch{}switch(n.tag){case 5:re||Jt(n,t);case 6:var r=q,l=Ue;q=null,tt(e,t,n),q=r,Ue=l,q!==null&&(Ue?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(Ue?(e=q,n=n.stateNode,e.nodeType===8?ro(e.parentNode,n):e.nodeType===1&&ro(e,n),Vn(e)):ro(q,n.stateNode));break;case 4:r=q,l=Ue,q=n.stateNode.containerInfo,Ue=!0,tt(e,t,n),q=r,Ue=l;break;case 0:case 11:case 14:case 15:if(!re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&ti(n,t,i),l=l.next}while(l!==r)}tt(e,t,n);break;case 1:if(!re&&(Jt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){H(n,t,u)}tt(e,t,n);break;case 21:tt(e,t,n);break;case 22:n.mode&1?(re=(r=re)||n.memoizedState!==null,tt(e,t,n),re=r):tt(e,t,n);break;default:tt(e,t,n)}}function fs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new bd),t.forEach(function(r){var l=ap.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Re(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=Q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*np(r/1960))-r,10e?16:e,ut===null)var r=!1;else{if(e=ut,ut=null,sl=0,R&6)throw Error(S(331));var l=R;for(R|=4,P=e.current;P!==null;){var o=P,i=o.child;if(P.flags&16){var u=o.deletions;if(u!==null){for(var s=0;sQ()-Xi?xt(e,0):Gi|=n),ve(e,t)}function Rc(e,t){t===0&&(e.mode&1?(t=hr,hr<<=1,!(hr&130023424)&&(hr=4194304)):t=1);var n=se();e=Ze(e,t),e!==null&&(nr(e,t,n),ve(e,n))}function sp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rc(e,n)}function ap(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),Rc(e,n)}var Lc;Lc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||me.current)he=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return he=!1,Jd(e,t,n);he=!!(e.flags&131072)}else he=!1,D&&t.flags&1048576&&Ma(t,br,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Mr(e,t),e=t.pendingProps;var l=on(t,oe.current);nn(t,n),l=Hi(null,t,r,e,l,n);var o=Vi();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ge(r)?(o=!0,Zr(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,ji(t),l.updater=wl,t.stateNode=l,l._reactInternals=t,Go(t,r,e,n),t=Zo(null,t,r,!0,o,n)):(t.tag=0,D&&o&&Ii(t),ue(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Mr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=fp(r),e=Le(r,e),l){case 0:t=Jo(null,t,r,e,n);break e;case 1:t=is(null,t,r,e,n);break e;case 11:t=ls(null,t,r,e,n);break e;case 14:t=os(null,t,r,Le(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Le(r,l),Jo(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Le(r,l),is(e,t,r,l,n);case 3:e:{if(mc(t),e===null)throw Error(S(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Ha(e,t),nl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=cn(Error(S(423)),t),t=us(e,t,r,n,l);break e}else if(r!==l){l=cn(Error(S(424)),t),t=us(e,t,r,n,l);break e}else for(we=ft(t.stateNode.containerInfo.firstChild),Se=t,D=!0,ze=null,n=$a(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(un(),r===l){t=qe(e,t,n);break e}ue(e,t,r,n)}t=t.child}return t;case 5:return Va(t),e===null&&Wo(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,$o(r,l)?i=null:o!==null&&$o(r,o)&&(t.flags|=32),hc(e,t),ue(e,t,i,n),t.child;case 6:return e===null&&Wo(t),null;case 13:return gc(e,t,n);case 4:return Di(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=sn(t,null,r,n):ue(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Le(r,l),ls(e,t,r,l,n);case 7:return ue(e,t,t.pendingProps,n),t.child;case 8:return ue(e,t,t.pendingProps.children,n),t.child;case 12:return ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,A(el,r._currentValue),r._currentValue=i,o!==null)if(De(o.value,i)){if(o.children===l.children&&!me.current){t=qe(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=Ge(-1,n&-n),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var g=c.pending;g===null?s.next=s:(s.next=g.next,g.next=s),c.pending=s}}o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Ko(o.return,n,t),u.lanes|=n;break}s=s.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(S(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),Ko(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}ue(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,nn(t,n),l=Ne(l),r=r(l),t.flags|=1,ue(e,t,r,n),t.child;case 14:return r=t.type,l=Le(r,t.pendingProps),l=Le(r.type,l),os(e,t,r,l,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Le(r,l),Mr(e,t),t.tag=1,ge(r)?(e=!0,Zr(t)):e=!1,nn(t,n),ac(t,r,l),Go(t,r,l,n),Zo(null,t,r,!0,e,n);case 19:return vc(e,t,n);case 22:return pc(e,t,n)}throw Error(S(156,t.tag))};function Uc(e,t){return ia(e,t)}function cp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oe(e,t,n,r){return new cp(e,t,n,r)}function bi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fp(e){if(typeof e=="function")return bi(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yi)return 11;if(e===wi)return 14}return 2}function mt(e,t){var n=e.alternate;return n===null?(n=Oe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fr(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")bi(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Bt:return Nt(n.children,l,o,t);case vi:i=8,l|=8;break;case yo:return e=Oe(12,n,t,l|2),e.elementType=yo,e.lanes=o,e;case wo:return e=Oe(13,n,t,l),e.elementType=wo,e.lanes=o,e;case So:return e=Oe(19,n,t,l),e.elementType=So,e.lanes=o,e;case Vs:return El(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Bs:i=10;break e;case Hs:i=9;break e;case yi:i=11;break e;case wi:i=14;break e;case nt:i=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=Oe(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Nt(e,t,n,r){return e=Oe(7,e,r,t),e.lanes=n,e}function El(e,t,n,r){return e=Oe(22,e,r,t),e.elementType=Vs,e.lanes=n,e.stateNode={isHidden:!1},e}function fo(e,t,n){return e=Oe(6,e,null,t),e.lanes=n,e}function po(e,t,n){return t=Oe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function dp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Kl(0),this.expirationTimes=Kl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function eu(e,t,n,r,l,o,i,u,s){return e=new dp(e,t,n,u,s),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Oe(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ji(o),e}function pp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jc)}catch(e){console.error(e)}}jc(),js.exports=Ee;var yp=js.exports,ws=yp;go.createRoot=ws.createRoot,go.hydrateRoot=ws.hydrateRoot;/*! js-cookie v3.0.5 | MIT */function Tr(e){for(var t=1;t"u")){i=Tr({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),l=encodeURIComponent(l).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var u="";for(var s in i)i[s]&&(u+="; "+s,i[s]!==!0&&(u+="="+i[s].split(";")[0]));return document.cookie=l+"="+e.write(o,l)+u}}function r(l){if(!(typeof document>"u"||arguments.length&&!l)){for(var o=document.cookie?document.cookie.split("; "):[],i={},u=0;us.userPermissions.includes(c))}function o(i){return{isRole(u){return t(i,u)},isAtLeastRole(u){return n(i,u)},hasPermission(u){return r(i,u)},hasAllPermissions(u){return l(i,u)}}}return{isRole:t,isAtLeastRole:n,hasPermission:r,hasAllPermissions:l,getAccessHelperWithOrgId:o}}function kp(e){return{getOrg(t){if(e.hasOwnProperty(t))return e[t]},getOrgIds(){return Object.keys(e)},getOrgs(){return Object.values(e)},getOrgByName(t){for(const n of Object.values(e))if(n.orgName===t||n.urlSafeOrgName===t)return n}}}class lu{constructor(t,n){this.userId=t.userId,this.orgIdToUserOrgInfo=n,this.email=t.email,this.firstName=t.firstName,this.lastName=t.lastName,this.username=t.username,this.createdAt=t.createdAt,this.pictureUrl=t.pictureUrl,this.hasPassword=t.hasPassword,this.hasMfaEnabled=t.hasMfaEnabled,this.canCreateOrgs=t.canCreateOrgs,this.legacyUserId=t.legacyUserId,this.impersonatorUserId=t.impersonatorUserId,this.properties=t.properties}getOrg(t){if(this.orgIdToUserOrgInfo)return this.orgIdToUserOrgInfo[t]}getOrgByName(t){if(!this.orgIdToUserOrgInfo)return;const n=t.toLowerCase().replace(/ /g,"-");for(const r in this.orgIdToUserOrgInfo){const l=this.orgIdToUserOrgInfo[r];if((l==null?void 0:l.urlSafeOrgName)===n)return l}}getUserProperty(t){if(this.properties)return this.properties[t]}getOrgs(){return this.orgIdToUserOrgInfo?Object.values(this.orgIdToUserOrgInfo):[]}isImpersonating(){return!!this.impersonatorUserId}isRole(t,n){const r=this.getOrg(t);return r?r.isRole(n):!1}isAtLeastRole(t,n){const r=this.getOrg(t);return r?r.isAtLeastRole(n):!1}hasPermission(t,n){const r=this.getOrg(t);return r?r.hasPermission(n):!1}hasAllPermissions(t,n){const r=this.getOrg(t);return r?r.hasAllPermissions(n):!1}static fromJSON(t){const n=JSON.parse(t),r={};for(const l in n.orgIdToUserOrgInfo)r[l]=Ol.fromJSON(JSON.stringify(n.orgIdToUserOrgInfo[l]));try{return new lu({userId:n.userId,email:n.email,createdAt:n.createdAt,firstName:n.firstName,lastName:n.lastName,username:n.username,legacyUserId:n.legacyUserId,impersonatorUserId:n.impersonatorUserId,properties:n.properties,pictureUrl:n.pictureUrl,hasPassword:n.hasPassword,hasMfaEnabled:n.hasMfaEnabled,canCreateOrgs:n.canCreateOrgs},r)}catch(l){throw console.error("Unable to parse User. Make sure the JSON string is a stringified `UserClass` type.",l),l}}}class Ol{constructor(t,n,r,l,o,i,u,s,c){this.orgId=t,this.orgName=n,this.orgMetadata=r,this.urlSafeOrgName=l,this.orgRoleStructure=s??jn.SingleRole,this.userAssignedRole=o,this.userInheritedRolesPlusCurrentRole=i,this.userPermissions=u,this.userAssignedAdditionalRoles=c??[]}isRole(t){return this.orgRoleStructure===jn.MultiRole?this.userAssignedRole===t||this.userAssignedAdditionalRoles.includes(t):this.userAssignedRole===t}isAtLeastRole(t){return this.orgRoleStructure===jn.MultiRole?this.userAssignedRole===t||this.userAssignedAdditionalRoles.includes(t):this.userInheritedRolesPlusCurrentRole.includes(t)}hasPermission(t){return this.userPermissions.includes(t)}hasAllPermissions(t){return t.every(n=>this.hasPermission(n))}static fromJSON(t){const n=JSON.parse(t);try{return new Ol(n.orgId,n.orgName,n.orgMetadata,n.urlSafeOrgName,n.userAssignedRole,n.userInheritedRolesPlusCurrentRole,n.userPermissions,n.orgRoleStructure,n.userAssignedAdditionalRoles)}catch(r){throw console.error("Unable to parse UserOrgInfo. Make sure the JSON string is a stringified `UserOrgInfo` type.",r),r}}}function Ep(e){if(e===void 0)return;const t={};for(const n of Object.values(e))t[n.orgId]=new Ol(n.orgId,n.orgName,n.orgMetadata,n.urlSafeOrgName,n.userAssignedRole,n.userInheritedRolesPlusCurrentRole,n.userPermissions,n.orgRoleStructure,n.userAssignedAdditionalRoles);return t}function Ss(e,t){const n=new URLSearchParams;t&&n.append("active_org_id",t);let r=`${e}/api/v1/refresh_token`;return n.toString()&&(r+=`?${n.toString()}`),fetch(r,{method:"GET",credentials:"include",headers:{"Content-Type":"application/json"}}).then(l=>l.status===401?null:l.status===0?(Dc(),Promise.reject({status:503,message:"Unable to process authentication response"})):l.ok?Cp(l):Promise.reject({status:l.status,message:l.statusText}))}function _p(e){return fetch(`${e}/api/v1/logout`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}}).then(t=>t.status===0?(Dc(),Promise.reject({status:503,message:"Unable to process authentication response"})):t.ok?t.json():(console.error("Logout error",t.status,t.statusText),Promise.reject({status:t.status,message:t.statusText})))}function Cp(e){return e.text().then(t=>{try{const n=Pp(t);return Tp(n)}catch(n){return console.error("Unable to process authentication response",n),Promise.reject({status:500,message:"Unable to process authentication response"})}},t=>(console.error("Unable to process authentication response",t),Promise.reject({status:500,message:"Unable to process authentication response"})))}function Pp(e){return JSON.parse(e,function(t,n){if(t==="org_id")this.orgId=n;else if(t==="org_name")this.orgName=n;else if(t==="org_metadata")this.orgMetadata=n;else if(t==="url_safe_org_name")this.urlSafeOrgName=n;else if(t==="user_role")this.userAssignedRole=n;else if(t==="inherited_user_roles_plus_current_role")this.userInheritedRolesPlusCurrentRole=n;else if(t==="user_permissions")this.userPermissions=n;else if(t==="access_token")this.accessToken=n;else if(t==="expires_at_seconds")this.expiresAtSeconds=n;else if(t==="org_id_to_org_member_info")this.orgIdToOrgMemberInfo=n;else if(t==="user_id")this.userId=n;else if(t==="email_confirmed")this.emailConfirmed=n;else if(t==="first_name")this.firstName=n;else if(t==="last_name")this.lastName=n;else if(t==="picture_url")this.pictureUrl=n;else if(t==="mfa_enabled")this.mfaEnabled=n;else if(t==="has_password")this.hasPassword=n;else if(t==="can_create_orgs")this.canCreateOrgs=n;else if(t==="created_at")this.createdAt=n;else if(t==="last_active_at")this.lastActiveAt=n;else if(t==="legacy_user_id")this.legacyUserId=n;else if(t==="impersonator_user")this.impersonatorUserId=n;else if(t==="org_role_structure")this.orgRoleStructure=n;else if(t==="additional_roles")this.userAssignedAdditionalRoles=n;else return n})}function Tp(e){return e.orgIdToOrgMemberInfo&&(e.orgHelper=kp(e.orgIdToOrgMemberInfo),e.accessHelper=Sp(e.orgIdToOrgMemberInfo)),e.userClass=new lu({userId:e.user.userId,email:e.user.email,createdAt:e.user.createdAt,firstName:e.user.firstName,lastName:e.user.lastName,username:e.user.username,properties:e.user.properties,pictureUrl:e.user.pictureUrl,hasPassword:e.user.hasPassword,hasMfaEnabled:e.user.mfaEnabled,canCreateOrgs:e.user.canCreateOrgs,legacyUserId:e.user.legacyUserId,impersonatorUserId:e.impersonatorUserId},Ep(e.orgIdToOrgMemberInfo)),Promise.resolve(e)}function Dc(){console.error(`Request to PropelAuth failed due to a CORS error. There are a few likely causes: + 1. In the Frontend Integration section of your dashboard, make sure your requests are coming either the specified Application URL or localhost with a matching port. + 2. Make sure your server is hosted on HTTPS in production.`)}const Op=3,ks=async e=>Fc(e,Op),Fc=async(e,t)=>{try{return await e()}catch(n){if(t<=0)throw n;return await xp(Np(t)),Fc(e,t-1)}},xp=e=>new Promise(t=>setTimeout(t,e)),Np=e=>e>=3?100:e===2?200:300;function Dt(){return Date.now()/1e3}function $r(){return typeof localStorage<"u"}function Ip(){return typeof window<"u"}function Or(e){if(!$r())return null;const t=localStorage.getItem(e);if(!t)return null;const n=parseInt(t,10);return Number.isNaN(n)?null:n}const ho="__PROPEL_AUTH_LOGGED_IN_AT",mo="__PROPEL_AUTH_LOGGED_OUT_AT",Rp=10*60,Lp=60,Up=60*5,Ft=e=>(window?window.btoa:btoa)(e);function zp(e){try{const t=new URL(e.authUrl);e.authUrl=t.origin}catch(t){throw console.error("Invalid authUrl",t),new Error("Unable to initialize auth client")}e.enableBackgroundTokenRefresh===void 0&&(e.enableBackgroundTokenRefresh=!0)}function Es(e){zp(e);const t={initialLoadFinished:!1,authenticationInfo:null,observers:[],accessTokenObservers:[],lastLoggedInAtMessage:Or(ho),lastLoggedOutAtMessage:Or(mo),authUrl:e.authUrl,refreshInterval:null,lastRefresh:null,accessTokenActiveOrgMap:{}};function n(f){for(let h=0;hSs(t.authUrl));return c(h),h}catch(h){if(f)return t.authenticationInfo;throw c(null),h}}const v=f=>{let h=new URLSearchParams,y=`${t.authUrl}/signup`;if(f){const{postSignupRedirectUrl:k,userSignupQueryParameters:w}=f;k&&h.set("rt",Ft(k)),w&&Object.entries(w).forEach(([U,O])=>{h.set(U,O)})}return h.toString()&&(y+=`?${h.toString()}`),y},m=f=>{let h=new URLSearchParams,y=`${t.authUrl}/login`;if(f){const{postLoginRedirectUrl:k,userSignupQueryParameters:w}=f;k&&h.set("rt",Ft(k)),w&&Object.entries(w).forEach(([U,O])=>{h.set(U,O)})}return h.toString()&&(y+=`?${h.toString()}`),y},E=f=>{let h=new URLSearchParams,y=`${t.authUrl}/account`;if(f){const{redirectBackToUrl:k}=f;k&&h.set("rt",Ft(k))}return h.toString()&&(y+=`?${h.toString()}`),y},_=(f,h)=>{let y=new URLSearchParams,k=`${t.authUrl}/org`;return f&&y.set("id",f),h&&h.redirectBackToUrl&&y.set("rt",Ft(h.redirectBackToUrl)),y.toString()&&(k+=`?${y.toString()}`),k},C=f=>{let h=new URLSearchParams,y=`${t.authUrl}/create_org`;if(f){const{redirectBackToUrl:k}=f;k&&h.set("rt",Ft(k))}return h.toString()&&(y+=`?${h.toString()}`),y},L=(f,h)=>{let y=new URLSearchParams;return h&&h.redirectBackToUrl&&y.set("rt",Ft(h.redirectBackToUrl)),y.set("id",f),`${t.authUrl}/saml?${y.toString()}`},d={addLoggedInChangeObserver(f){t.observers.includes(f)?console.error("Observer has been attached already."):f?t.observers.push(f):console.error("Cannot add a null observer")},removeLoggedInChangeObserver(f){const h=t.observers.indexOf(f);h===-1?console.error("Cannot find observer to remove"):t.observers.splice(h,1)},addAccessTokenChangeObserver(f){t.accessTokenObservers.includes(f)?console.error("Observer has been attached already."):f?t.accessTokenObservers.push(f):console.error("Cannot add a null observer")},removeAccessTokenChangeObserver(f){const h=t.accessTokenObservers.indexOf(f);h===-1?console.error("Cannot find observer to remove"):t.accessTokenObservers.splice(h,1)},async getAuthenticationInfoOrNull(f){const h=Dt();if(f)return await g(!1);if(t.authenticationInfo)if(h+Rp>t.authenticationInfo.expiresAtSeconds){const y=hSs(t.authUrl,f));if(!k)return{error:"user_not_in_org",accessToken:null};const{accessToken:w}=k;return t.accessTokenActiveOrgMap[f]={accessToken:w,fetchedAt:h},{accessToken:w,error:void 0}}catch{return{error:"unexpected_error",accessToken:null}}},getSignupPageUrl(f){return v(f)},getLoginPageUrl(f){return m(f)},getAccountPageUrl(f){return E(f)},getOrgPageUrl(f,h){return _(f,h)},getCreateOrgPageUrl(f){return C(f)},getSetupSAMLPageUrl(f,h){return L(f,h)},redirectToSignupPage(f){window.location.href=v(f)},redirectToLoginPage(f){window.location.href=m(f)},redirectToAccountPage(f){window.location.href=E(f)},redirectToOrgPage(f,h){window.location.href=_(f,h)},redirectToCreateOrgPage(f){window.location.href=C(f)},redirectToSetupSAMLPage(f,h){window.location.href=L(f,h)},async logout(f){const h=await _p(t.authUrl);c(null),f&&(window.location.href=h.redirect_to)},destroy(){t.observers=[],t.accessTokenObservers=[],window.removeEventListener("storage",a),t.refreshInterval&&clearInterval(t.refreshInterval)}},a=async function(){if(!$r())return;const f=Or(mo),h=Or(ho);f&&(!t.lastLoggedOutAtMessage||f>t.lastLoggedOutAtMessage)&&(t.lastLoggedOutAtMessage=f,t.authenticationInfo&&await g(!0)),h&&(!t.lastLoggedInAtMessage||h>t.lastLoggedInAtMessage)&&(t.lastLoggedInAtMessage=h,t.authenticationInfo||await g(!0))},p=async function(){t.lastRefresh&&Dt()>t.lastRefresh+Lp?await g(!0):await d.getAuthenticationInfoOrNull()};return Ip()&&(window.addEventListener("storage",a),window.addEventListener("online",p),window.addEventListener("focus",p),e.enableBackgroundTokenRefresh&&(d.getAuthenticationInfoOrNull(),t.refreshInterval=window.setInterval(d.getAuthenticationInfoOrNull,6e4))),d}const Ap="__last_selected_org";function Mp(){return localStorage?localStorage.getItem(Ap):null}const jp=e=>{const[t,n]=le.useState(0),{authUrl:r}=e,l=le.useRef(null);if(l.current===null){const o=Es({authUrl:r,enableBackgroundTokenRefresh:!0});o.addAccessTokenChangeObserver(()=>n(i=>i+1)),l.current={authUrl:r,client:o}}return le.useEffect(()=>{if(l.current!==null){if(l.current.authUrl===r)return;{l.current.client.destroy();const o=Es({authUrl:r,enableBackgroundTokenRefresh:!0});o.addAccessTokenChangeObserver(()=>n(i=>i+1)),l.current={authUrl:r,client:o}}}},[r]),{clientRef:l,accessTokenChangeCounter:t}},de=(e,t)=>le.useCallback((...n)=>{var l;const r=(l=e.current)==null?void 0:l.client;if(!r)throw new Error("Client is not initialized");return t(r)(...n)},[t]),ir=Ae.createContext(void 0),Dp={loading:!0,authInfo:null};function Fp(e,t){return t.authInfo?e.loading?{loading:!1,authInfo:t.authInfo}:e.authInfo&&e.authInfo.accessToken!==t.authInfo.accessToken?{loading:!1,authInfo:t.authInfo}:e:{loading:!1,authInfo:t.authInfo}}const $p=e=>{const[t,n]=le.useReducer(Fp,Dp),{clientRef:r,accessTokenChangeCounter:l}=jp({authUrl:e.authUrl});le.useEffect(()=>{let w=!1;async function U(){var fe;const O=(fe=r.current)==null?void 0:fe.client;if(O)try{const et=await O.getAuthenticationInfoOrNull();w||n({authInfo:et})}catch{}}return U(),()=>{w=!0}},[l]),le.useEffect(()=>{e.getActiveOrgFn&&console.warn("The `getActiveOrgFn` prop is deprecated.")},[]);const o=de(r,w=>w.logout),i=de(r,w=>w.redirectToLoginPage),u=de(r,w=>w.redirectToSignupPage),s=de(r,w=>w.redirectToAccountPage),c=de(r,w=>w.redirectToOrgPage),g=de(r,w=>w.redirectToCreateOrgPage),v=de(r,w=>w.redirectToSetupSAMLPage),m=de(r,w=>w.getLoginPageUrl),E=de(r,w=>w.getSignupPageUrl),_=de(r,w=>w.getAccountPageUrl),C=de(r,w=>w.getOrgPageUrl),L=de(r,w=>w.getCreateOrgPageUrl),d=de(r,w=>w.getSetupSAMLPageUrl),a=de(r,w=>w.getAccessTokenForOrg),p=le.useCallback(async()=>{if(r.current===null)return;const U=await r.current.client.getAuthenticationInfoOrNull(!0);n({authInfo:U})},[n]),f=e.getActiveOrgFn||Mp,{defaultDisplayWhileLoading:h,defaultDisplayIfLoggedOut:y}=e,k={loading:t.loading,authInfo:t.authInfo,logout:o,defaultDisplayWhileLoading:h,defaultDisplayIfLoggedOut:y,redirectToLoginPage:i,redirectToSignupPage:u,redirectToAccountPage:s,redirectToOrgPage:c,redirectToCreateOrgPage:g,redirectToSetupSAMLPage:v,getLoginPageUrl:m,activeOrgFn:f,getSignupPageUrl:E,getAccountPageUrl:_,getOrgPageUrl:C,getCreateOrgPageUrl:L,getSetupSAMLPageUrl:d,refreshAuthInfo:p,tokens:{getAccessTokenForOrg:a}};return Ae.createElement(ir.Provider,{value:k},e.children)};function Bp(){const e=le.useContext(ir);if(e===void 0)throw new Error("useAuthInfo must be used within an AuthProvider or RequiredAuthProvider");const{loading:t,authInfo:n,refreshAuthInfo:r,tokens:l}=e;return t?{loading:!0,isLoggedIn:void 0,accessToken:void 0,orgHelper:void 0,accessHelper:void 0,user:void 0,userClass:void 0,isImpersonating:void 0,impersonatorUserId:void 0,refreshAuthInfo:r,tokens:l,accessTokenExpiresAtSeconds:void 0}:n&&n.accessToken?{loading:!1,isLoggedIn:!0,accessToken:n.accessToken,orgHelper:n.orgHelper,accessHelper:n.accessHelper,user:n.user,userClass:n.userClass,isImpersonating:!!n.impersonatorUserId,impersonatorUserId:n.impersonatorUserId,refreshAuthInfo:r,tokens:l,accessTokenExpiresAtSeconds:n.expiresAtSeconds}:{loading:!1,isLoggedIn:!1,accessToken:null,user:null,userClass:null,orgHelper:null,accessHelper:null,isImpersonating:!1,impersonatorUserId:void 0,refreshAuthInfo:r,tokens:l,accessTokenExpiresAtSeconds:void 0}}function Hp(){const e=le.useContext(ir);if(e===void 0)throw new Error("useLogoutFunction must be used within an AuthProvider or RequiredAuthProvider");const{logout:t}=e;return t}function Vp(){const e=le.useContext(ir);if(e===void 0)throw new Error("useRedirectFunctions must be used within an AuthProvider or RequiredAuthProvider");const{redirectToAccountPage:t,redirectToSignupPage:n,redirectToLoginPage:r,redirectToOrgPage:l,redirectToCreateOrgPage:o,redirectToSetupSAMLPage:i}=e;return{redirectToSignupPage:n,redirectToLoginPage:r,redirectToAccountPage:t,redirectToOrgPage:l,redirectToCreateOrgPage:o,redirectToSetupSAMLPage:i}}function Qp({children:e,postLoginRedirectUrl:t}){const{redirectToLoginPage:n}=Vp();return le.useEffect(()=>{t?n({postLoginRedirectUrl:t}):n()},[]),Ae.createElement(Ae.Fragment,null,e)}function $c(e){var t={exports:{}};return e(t,t.exports),t.exports}/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Z=typeof Symbol=="function"&&Symbol.for,ou=Z?Symbol.for("react.element"):60103,iu=Z?Symbol.for("react.portal"):60106,xl=Z?Symbol.for("react.fragment"):60107,Nl=Z?Symbol.for("react.strict_mode"):60108,Il=Z?Symbol.for("react.profiler"):60114,Rl=Z?Symbol.for("react.provider"):60109,Ll=Z?Symbol.for("react.context"):60110,uu=Z?Symbol.for("react.async_mode"):60111,Ul=Z?Symbol.for("react.concurrent_mode"):60111,zl=Z?Symbol.for("react.forward_ref"):60112,Al=Z?Symbol.for("react.suspense"):60113,Wp=Z?Symbol.for("react.suspense_list"):60120,Ml=Z?Symbol.for("react.memo"):60115,jl=Z?Symbol.for("react.lazy"):60116,Kp=Z?Symbol.for("react.block"):60121,Yp=Z?Symbol.for("react.fundamental"):60117,Gp=Z?Symbol.for("react.responder"):60118,Xp=Z?Symbol.for("react.scope"):60119;function Ce(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ou:switch(e=e.type,e){case uu:case Ul:case xl:case Il:case Nl:case Al:return e;default:switch(e=e&&e.$$typeof,e){case Ll:case zl:case jl:case Ml:case Rl:return e;default:return t}}case iu:return t}}}function Bc(e){return Ce(e)===Ul}var Jp=uu,Zp=Ul,qp=Ll,bp=Rl,eh=ou,th=zl,nh=xl,rh=jl,lh=Ml,oh=iu,ih=Il,uh=Nl,sh=Al,ah=function(e){return Bc(e)||Ce(e)===uu},ch=Bc,fh=function(e){return Ce(e)===Ll},dh=function(e){return Ce(e)===Rl},ph=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ou},hh=function(e){return Ce(e)===zl},mh=function(e){return Ce(e)===xl},gh=function(e){return Ce(e)===jl},vh=function(e){return Ce(e)===Ml},yh=function(e){return Ce(e)===iu},wh=function(e){return Ce(e)===Il},Sh=function(e){return Ce(e)===Nl},kh=function(e){return Ce(e)===Al},Eh=function(e){return typeof e=="string"||typeof e=="function"||e===xl||e===Ul||e===Il||e===Nl||e===Al||e===Wp||typeof e=="object"&&e!==null&&(e.$$typeof===jl||e.$$typeof===Ml||e.$$typeof===Rl||e.$$typeof===Ll||e.$$typeof===zl||e.$$typeof===Yp||e.$$typeof===Gp||e.$$typeof===Xp||e.$$typeof===Kp)},_h=Ce,Ch={AsyncMode:Jp,ConcurrentMode:Zp,ContextConsumer:qp,ContextProvider:bp,Element:eh,ForwardRef:th,Fragment:nh,Lazy:rh,Memo:lh,Portal:oh,Profiler:ih,StrictMode:uh,Suspense:sh,isAsyncMode:ah,isConcurrentMode:ch,isContextConsumer:fh,isContextProvider:dh,isElement:ph,isForwardRef:hh,isFragment:mh,isLazy:gh,isMemo:vh,isPortal:yh,isProfiler:wh,isStrictMode:Sh,isSuspense:kh,isValidElementType:Eh,typeOf:_h};/** @license React v16.13.1 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */$c(function(e,t){});var su=$c(function(e){e.exports=Ch}),Ph={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Th={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Oh={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Hc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},au={};au[su.ForwardRef]=Oh;au[su.Memo]=Hc;function _s(e){return su.isMemo(e)?Hc:au[e.$$typeof]||Ph}var xh=Object.defineProperty,Nh=Object.getOwnPropertyNames,Cs=Object.getOwnPropertySymbols,Ih=Object.getOwnPropertyDescriptor,Rh=Object.getPrototypeOf,Ps=Object.prototype;function Vc(e,t,n){if(typeof t!="string"){if(Ps){var r=Rh(t);r&&r!==Ps&&Vc(e,r,n)}var l=Nh(t);Cs&&(l=l.concat(Cs(t)));for(var o=_s(e),i=_s(t),u=0;u{const o=le.useContext(ir);if(o===void 0)throw new Error("withRequiredAuthInfo must be used within an AuthProvider or RequiredAuthProvider");const{loading:i,authInfo:u,defaultDisplayIfLoggedOut:s,defaultDisplayWhileLoading:c,refreshAuthInfo:g,tokens:v}=o;function m(){return c||Ae.createElement(Ae.Fragment,null)}function E(){return s||Ae.createElement(Qp,null)}if(i)return m();if(u){const _={...l,accessToken:u.accessToken,isLoggedIn:!!u.accessToken,orgHelper:u.orgHelper,accessHelper:u.accessHelper,user:u.user,userClass:u.userClass,isImpersonating:!!u.impersonatorUserId,impersonatorUserId:u.impersonatorUserId,refreshAuthInfo:g,tokens:v,accessTokenExpiresAtSeconds:u.expiresAtSeconds};return Ae.createElement(e,_)}else return E()};return r.displayName=n,r.WrappedComponent=e,Lh(r,e)}Uh(({children:e})=>Ae.createElement(Ae.Fragment,null,e));function zh(){const e=Bp(),t=Hp();return e.loading?ie.jsx("h2",{children:"Loading..."}):e.isLoggedIn?ie.jsxs(ie.Fragment,{children:[ie.jsx("h1",{children:"Propelauth + React"}),ie.jsx("div",{children:ie.jsx("img",{src:e.user.pictureUrl,className:"logo",alt:"React logo"})}),ie.jsxs("h2",{children:["Welcome, ",e.user.firstName,"!"]}),ie.jsxs("p",{children:["You are logged in as ",ie.jsx("a",{href:`mailto:${e.user.email}`,children:e.user.email})]}),ie.jsx("div",{className:"card",children:ie.jsx("button",{onClick:()=>t(),children:"Log Out"})})]}):ie.jsx("a",{href:"https://4319085.propelauthtest.com",children:"Login"})}go.createRoot(document.getElementById("root")).render(ie.jsx(Ae.StrictMode,{children:ie.jsx($p,{authUrl:"https://4319085.propelauthtest.com",children:ie.jsx(zh,{})})})); diff --git a/assets/index-DiwrgTda.css b/assets/index-DiwrgTda.css new file mode 100644 index 0000000..7704ff6 --- /dev/null +++ b/assets/index-DiwrgTda.css @@ -0,0 +1 @@ +#root{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}.logo{height:6em;padding:1.5em;will-change:filter;transition:filter .3s}.logo:hover{filter:drop-shadow(0 0 2em #646cffaa)}.logo.react:hover{filter:drop-shadow(0 0 2em #61dafbaa)}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion: no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}} diff --git a/index.html b/index.html new file mode 100644 index 0000000..e9cac9c --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Vite + React + + + + +
+ + diff --git a/vite.svg b/vite.svg new file mode 100644 index 0000000..e7b8dfb --- /dev/null +++ b/vite.svg @@ -0,0 +1 @@ + \ No newline at end of file