@superwall/studio 2.6.0-beta.1 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const g of document.querySelectorAll('link[rel="modulepreload"]'))u(g);new MutationObserver(g=>{for(const y of g)if(y.type==="childList")for(const w of y.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&u(w)}).observe(document,{childList:!0,subtree:!0});function c(g){const y={};return g.integrity&&(y.integrity=g.integrity),g.referrerPolicy&&(y.referrerPolicy=g.referrerPolicy),g.crossOrigin==="use-credentials"?y.credentials="include":g.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function u(g){if(g.ep)return;g.ep=!0;const y=c(g);fetch(g.href,y)}})();function kh(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var hc={exports:{}},vi={};var U0;function u2(){if(U0)return vi;U0=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(u,g,y){var w=null;if(y!==void 0&&(w=""+y),g.key!==void 0&&(w=""+g.key),"key"in g){y={};for(var j in g)j!=="key"&&(y[j]=g[j])}else y=g;return g=y.ref,{$$typeof:l,type:u,key:w,ref:g!==void 0?g:null,props:y}}return vi.Fragment=r,vi.jsx=c,vi.jsxs=c,vi}var H0;function f2(){return H0||(H0=1,hc.exports=u2()),hc.exports}var o=f2(),mc={exports:{}},pe={};var B0;function d2(){if(B0)return pe;B0=1;var l=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),g=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),w=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),h=Symbol.iterator;function S(x){return x===null||typeof x!="object"?null:(x=h&&x[h]||x["@@iterator"],typeof x=="function"?x:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,V={};function Y(x,D,Z){this.props=x,this.context=D,this.refs=V,this.updater=Z||M}Y.prototype.isReactComponent={},Y.prototype.setState=function(x,D){if(typeof x!="object"&&typeof x!="function"&&x!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,x,D,"setState")},Y.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function Q(){}Q.prototype=Y.prototype;function le(x,D,Z){this.props=x,this.context=D,this.refs=V,this.updater=Z||M}var q=le.prototype=new Q;q.constructor=le,C(q,Y.prototype),q.isPureReactComponent=!0;var X=Array.isArray,K={H:null,A:null,T:null,S:null,V:null},I=Object.prototype.hasOwnProperty;function ae(x,D,Z,U,J,ne){return Z=ne.ref,{$$typeof:l,type:x,key:D,ref:Z!==void 0?Z:null,props:ne}}function ue(x,D){return ae(x.type,D,void 0,void 0,void 0,x.props)}function ve(x){return typeof x=="object"&&x!==null&&x.$$typeof===l}function se(x){var D={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(Z){return D[Z]})}var je=/\/+/g;function Ce(x,D){return typeof x=="object"&&x!==null&&x.key!=null?se(""+x.key):D.toString(36)}function xe(){}function _e(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(xe,xe):(x.status="pending",x.then(function(D){x.status==="pending"&&(x.status="fulfilled",x.value=D)},function(D){x.status==="pending"&&(x.status="rejected",x.reason=D)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function de(x,D,Z,U,J){var ne=typeof x;(ne==="undefined"||ne==="boolean")&&(x=null);var te=!1;if(x===null)te=!0;else switch(ne){case"bigint":case"string":case"number":te=!0;break;case"object":switch(x.$$typeof){case l:case r:te=!0;break;case v:return te=x._init,de(te(x._payload),D,Z,U,J)}}if(te)return J=J(x),te=U===""?"."+Ce(x,0):U,X(J)?(Z="",te!=null&&(Z=te.replace(je,"$&/")+"/"),de(J,D,Z,"",function(st){return st})):J!=null&&(ve(J)&&(J=ue(J,Z+(J.key==null||x&&x.key===J.key?"":(""+J.key).replace(je,"$&/")+"/")+te)),D.push(J)),1;te=0;var qe=U===""?".":U+":";if(X(x))for(var re=0;re<x.length;re++)U=x[re],ne=qe+Ce(U,re),te+=de(U,D,Z,ne,J);else if(re=S(x),typeof re=="function")for(x=re.call(x),re=0;!(U=x.next()).done;)U=U.value,ne=qe+Ce(U,re++),te+=de(U,D,Z,ne,J);else if(ne==="object"){if(typeof x.then=="function")return de(_e(x),D,Z,U,J);throw D=String(x),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return te}function A(x,D,Z){if(x==null)return x;var U=[],J=0;return de(x,U,"","",function(ne){return D.call(Z,ne,J++)}),U}function k(x){if(x._status===-1){var D=x._result;D=D(),D.then(function(Z){(x._status===0||x._status===-1)&&(x._status=1,x._result=Z)},function(Z){(x._status===0||x._status===-1)&&(x._status=2,x._result=Z)}),x._status===-1&&(x._status=0,x._result=D)}if(x._status===1)return x._result.default;throw x._result}var F=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)};function he(){}return pe.Children={map:A,forEach:function(x,D,Z){A(x,function(){D.apply(this,arguments)},Z)},count:function(x){var D=0;return A(x,function(){D++}),D},toArray:function(x){return A(x,function(D){return D})||[]},only:function(x){if(!ve(x))throw Error("React.Children.only expected to receive a single React element child.");return x}},pe.Component=Y,pe.Fragment=c,pe.Profiler=g,pe.PureComponent=le,pe.StrictMode=u,pe.Suspense=m,pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,pe.__COMPILER_RUNTIME={__proto__:null,c:function(x){return K.H.useMemoCache(x)}},pe.cache=function(x){return function(){return x.apply(null,arguments)}},pe.cloneElement=function(x,D,Z){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var U=C({},x.props),J=x.key,ne=void 0;if(D!=null)for(te in D.ref!==void 0&&(ne=void 0),D.key!==void 0&&(J=""+D.key),D)!I.call(D,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&D.ref===void 0||(U[te]=D[te]);var te=arguments.length-2;if(te===1)U.children=Z;else if(1<te){for(var qe=Array(te),re=0;re<te;re++)qe[re]=arguments[re+2];U.children=qe}return ae(x.type,J,void 0,void 0,ne,U)},pe.createContext=function(x){return x={$$typeof:w,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:y,_context:x},x},pe.createElement=function(x,D,Z){var U,J={},ne=null;if(D!=null)for(U in D.key!==void 0&&(ne=""+D.key),D)I.call(D,U)&&U!=="key"&&U!=="__self"&&U!=="__source"&&(J[U]=D[U]);var te=arguments.length-2;if(te===1)J.children=Z;else if(1<te){for(var qe=Array(te),re=0;re<te;re++)qe[re]=arguments[re+2];J.children=qe}if(x&&x.defaultProps)for(U in te=x.defaultProps,te)J[U]===void 0&&(J[U]=te[U]);return ae(x,ne,void 0,void 0,null,J)},pe.createRef=function(){return{current:null}},pe.forwardRef=function(x){return{$$typeof:j,render:x}},pe.isValidElement=ve,pe.lazy=function(x){return{$$typeof:v,_payload:{_status:-1,_result:x},_init:k}},pe.memo=function(x,D){return{$$typeof:d,type:x,compare:D===void 0?null:D}},pe.startTransition=function(x){var D=K.T,Z={};K.T=Z;try{var U=x(),J=K.S;J!==null&&J(Z,U),typeof U=="object"&&U!==null&&typeof U.then=="function"&&U.then(he,F)}catch(ne){F(ne)}finally{K.T=D}},pe.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},pe.use=function(x){return K.H.use(x)},pe.useActionState=function(x,D,Z){return K.H.useActionState(x,D,Z)},pe.useCallback=function(x,D){return K.H.useCallback(x,D)},pe.useContext=function(x){return K.H.useContext(x)},pe.useDebugValue=function(){},pe.useDeferredValue=function(x,D){return K.H.useDeferredValue(x,D)},pe.useEffect=function(x,D,Z){var U=K.H;if(typeof Z=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return U.useEffect(x,D)},pe.useId=function(){return K.H.useId()},pe.useImperativeHandle=function(x,D,Z){return K.H.useImperativeHandle(x,D,Z)},pe.useInsertionEffect=function(x,D){return K.H.useInsertionEffect(x,D)},pe.useLayoutEffect=function(x,D){return K.H.useLayoutEffect(x,D)},pe.useMemo=function(x,D){return K.H.useMemo(x,D)},pe.useOptimistic=function(x,D){return K.H.useOptimistic(x,D)},pe.useReducer=function(x,D,Z){return K.H.useReducer(x,D,Z)},pe.useRef=function(x){return K.H.useRef(x)},pe.useState=function(x){return K.H.useState(x)},pe.useSyncExternalStore=function(x,D,Z){return K.H.useSyncExternalStore(x,D,Z)},pe.useTransition=function(){return K.H.useTransition()},pe.version="19.1.0",pe}var L0;function Hc(){return L0||(L0=1,mc.exports=d2()),mc.exports}var T=Hc();const G=kh(T);var pc={exports:{}},yi={},gc={exports:{}},vc={};var k0;function h2(){return k0||(k0=1,(function(l){function r(A,k){var F=A.length;A.push(k);e:for(;0<F;){var he=F-1>>>1,x=A[he];if(0<g(x,k))A[he]=k,A[F]=x,F=he;else break e}}function c(A){return A.length===0?null:A[0]}function u(A){if(A.length===0)return null;var k=A[0],F=A.pop();if(F!==k){A[0]=F;e:for(var he=0,x=A.length,D=x>>>1;he<D;){var Z=2*(he+1)-1,U=A[Z],J=Z+1,ne=A[J];if(0>g(U,F))J<x&&0>g(ne,U)?(A[he]=ne,A[J]=F,he=J):(A[he]=U,A[Z]=F,he=Z);else if(J<x&&0>g(ne,F))A[he]=ne,A[J]=F,he=J;else break e}}return k}function g(A,k){var F=A.sortIndex-k.sortIndex;return F!==0?F:A.id-k.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;l.unstable_now=function(){return y.now()}}else{var w=Date,j=w.now();l.unstable_now=function(){return w.now()-j}}var m=[],d=[],v=1,h=null,S=3,M=!1,C=!1,V=!1,Y=!1,Q=typeof setTimeout=="function"?setTimeout:null,le=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function X(A){for(var k=c(d);k!==null;){if(k.callback===null)u(d);else if(k.startTime<=A)u(d),k.sortIndex=k.expirationTime,r(m,k);else break;k=c(d)}}function K(A){if(V=!1,X(A),!C)if(c(m)!==null)C=!0,I||(I=!0,Ce());else{var k=c(d);k!==null&&de(K,k.startTime-A)}}var I=!1,ae=-1,ue=5,ve=-1;function se(){return Y?!0:!(l.unstable_now()-ve<ue)}function je(){if(Y=!1,I){var A=l.unstable_now();ve=A;var k=!0;try{e:{C=!1,V&&(V=!1,le(ae),ae=-1),M=!0;var F=S;try{t:{for(X(A),h=c(m);h!==null&&!(h.expirationTime>A&&se());){var he=h.callback;if(typeof he=="function"){h.callback=null,S=h.priorityLevel;var x=he(h.expirationTime<=A);if(A=l.unstable_now(),typeof x=="function"){h.callback=x,X(A),k=!0;break t}h===c(m)&&u(m),X(A)}else u(m);h=c(m)}if(h!==null)k=!0;else{var D=c(d);D!==null&&de(K,D.startTime-A),k=!1}}break e}finally{h=null,S=F,M=!1}k=void 0}}finally{k?Ce():I=!1}}}var Ce;if(typeof q=="function")Ce=function(){q(je)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,_e=xe.port2;xe.port1.onmessage=je,Ce=function(){_e.postMessage(null)}}else Ce=function(){Q(je,0)};function de(A,k){ae=Q(function(){A(l.unstable_now())},k)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(A){A.callback=null},l.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<A?Math.floor(1e3/A):5},l.unstable_getCurrentPriorityLevel=function(){return S},l.unstable_next=function(A){switch(S){case 1:case 2:case 3:var k=3;break;default:k=S}var F=S;S=k;try{return A()}finally{S=F}},l.unstable_requestPaint=function(){Y=!0},l.unstable_runWithPriority=function(A,k){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var F=S;S=A;try{return k()}finally{S=F}},l.unstable_scheduleCallback=function(A,k,F){var he=l.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?he+F:he):F=he,A){case 1:var x=-1;break;case 2:x=250;break;case 5:x=1073741823;break;case 4:x=1e4;break;default:x=5e3}return x=F+x,A={id:v++,callback:k,priorityLevel:A,startTime:F,expirationTime:x,sortIndex:-1},F>he?(A.sortIndex=F,r(d,A),c(m)===null&&A===c(d)&&(V?(le(ae),ae=-1):V=!0,de(K,F-he))):(A.sortIndex=x,r(m,A),C||M||(C=!0,I||(I=!0,Ce()))),A},l.unstable_shouldYield=se,l.unstable_wrapCallback=function(A){var k=S;return function(){var F=S;S=k;try{return A.apply(this,arguments)}finally{S=F}}}})(vc)),vc}var Y0;function m2(){return Y0||(Y0=1,gc.exports=h2()),gc.exports}var yc={exports:{}},Mt={};var q0;function p2(){if(q0)return Mt;q0=1;var l=Hc();function r(m){var d="https://react.dev/errors/"+m;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)d+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var u={d:{f:c,r:function(){throw Error(r(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},g=Symbol.for("react.portal");function y(m,d,v){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:g,key:h==null?null:""+h,children:m,containerInfo:d,implementation:v}}var w=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(m,d){if(m==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Mt.createPortal=function(m,d){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(r(299));return y(m,d,null,v)},Mt.flushSync=function(m){var d=w.T,v=u.p;try{if(w.T=null,u.p=2,m)return m()}finally{w.T=d,u.p=v,u.d.f()}},Mt.preconnect=function(m,d){typeof m=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,u.d.C(m,d))},Mt.prefetchDNS=function(m){typeof m=="string"&&u.d.D(m)},Mt.preinit=function(m,d){if(typeof m=="string"&&d&&typeof d.as=="string"){var v=d.as,h=j(v,d.crossOrigin),S=typeof d.integrity=="string"?d.integrity:void 0,M=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;v==="style"?u.d.S(m,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:S,fetchPriority:M}):v==="script"&&u.d.X(m,{crossOrigin:h,integrity:S,fetchPriority:M,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Mt.preinitModule=function(m,d){if(typeof m=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var v=j(d.as,d.crossOrigin);u.d.M(m,{crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&u.d.M(m)},Mt.preload=function(m,d){if(typeof m=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var v=d.as,h=j(v,d.crossOrigin);u.d.L(m,v,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Mt.preloadModule=function(m,d){if(typeof m=="string")if(d){var v=j(d.as,d.crossOrigin);u.d.m(m,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:v,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else u.d.m(m)},Mt.requestFormReset=function(m){u.d.r(m)},Mt.unstable_batchedUpdates=function(m,d){return m(d)},Mt.useFormState=function(m,d,v){return w.H.useFormState(m,d,v)},Mt.useFormStatus=function(){return w.H.useHostTransitionStatus()},Mt.version="19.1.0",Mt}var G0;function Yh(){if(G0)return yc.exports;G0=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),yc.exports=p2(),yc.exports}var V0;function g2(){if(V0)return yi;V0=1;var l=m2(),r=Hc(),c=Yh();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function g(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function y(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function w(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function j(e){if(y(e)!==e)throw Error(u(188))}function m(e){var t=e.alternate;if(!t){if(t=y(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,n=t;;){var i=a.return;if(i===null)break;var s=i.alternate;if(s===null){if(n=i.return,n!==null){a=n;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===a)return j(i),e;if(s===n)return j(i),t;s=s.sibling}throw Error(u(188))}if(a.return!==n.return)a=i,n=s;else{for(var f=!1,p=i.child;p;){if(p===a){f=!0,a=i,n=s;break}if(p===n){f=!0,n=i,a=s;break}p=p.sibling}if(!f){for(p=s.child;p;){if(p===a){f=!0,a=s,n=i;break}if(p===n){f=!0,n=s,a=i;break}p=p.sibling}if(!f)throw Error(u(189))}}if(a.alternate!==n)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,h=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),V=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),Q=Symbol.for("react.provider"),le=Symbol.for("react.consumer"),q=Symbol.for("react.context"),X=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),ve=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),je=Symbol.iterator;function Ce(e){return e===null||typeof e!="object"?null:(e=je&&e[je]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Symbol.for("react.client.reference");function _e(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case Y:return"Profiler";case V:return"StrictMode";case K:return"Suspense";case I:return"SuspenseList";case ve:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case q:return(e.displayName||"Context")+".Provider";case le:return(e._context.displayName||"Context")+".Consumer";case X:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ae:return t=e.displayName||null,t!==null?t:_e(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}var de=Array.isArray,A=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},he=[],x=-1;function D(e){return{current:e}}function Z(e){0>x||(e.current=he[x],he[x]=null,x--)}function U(e,t){x++,he[x]=e.current,e.current=t}var J=D(null),ne=D(null),te=D(null),qe=D(null);function re(e,t){switch(U(te,t),U(ne,e),U(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?c0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=c0(t),e=u0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(J),U(J,e)}function st(){Z(J),Z(ne),Z(te)}function Rt(e){e.memoizedState!==null&&U(qe,e);var t=J.current,a=u0(t,e.type);t!==a&&(U(ne,e),U(J,a))}function W(e){ne.current===e&&(Z(J),Z(ne)),qe.current===e&&(Z(qe),di._currentValue=F)}var P=Object.prototype.hasOwnProperty,Te=l.unstable_scheduleCallback,Ue=l.unstable_cancelCallback,_t=l.unstable_shouldYield,Bt=l.unstable_requestPaint,ge=l.unstable_now,Lt=l.unstable_getCurrentPriorityLevel,Ge=l.unstable_ImmediatePriority,Ct=l.unstable_UserBlockingPriority,Kt=l.unstable_NormalPriority,$e=l.unstable_LowPriority,kt=l.unstable_IdlePriority,Ea=l.log,Ve=l.unstable_setDisableYieldValue,Ne=null,et=null;function Fe(e){if(typeof Ea=="function"&&Ve(e),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(Ne,e)}catch{}}var Ae=Math.clz32?Math.clz32:fa,ua=Math.log,ja=Math.LN2;function fa(e){return e>>>=0,e===0?32:31-(ua(e)/ja|0)|0}var da=256,ha=4194304;function $t(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ma(e,t,a){var n=e.pendingLanes;if(n===0)return 0;var i=0,s=e.suspendedLanes,f=e.pingedLanes;e=e.warmLanes;var p=n&134217727;return p!==0?(n=p&~s,n!==0?i=$t(n):(f&=p,f!==0?i=$t(f):a||(a=p&~e,a!==0&&(i=$t(a))))):(p=n&~s,p!==0?i=$t(p):f!==0?i=$t(f):a||(a=n&~e,a!==0&&(i=$t(a)))),i===0?0:t!==0&&t!==i&&(t&s)===0&&(s=i&-i,a=t&-t,s>=a||s===32&&(a&4194048)!==0)?t:i}function $(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ze(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function rt(){var e=da;return da<<=1,(da&4194048)===0&&(da=256),e}function mt(){var e=ha;return ha<<=1,(ha&62914560)===0&&(ha=4194304),e}function xt(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function _i(e,t,a,n,i,s){var f=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var p=e.entanglements,b=e.expirationTimes,R=e.hiddenUpdates;for(a=f&~a;0<a;){var H=31-Ae(a),L=1<<H;p[H]=0,b[H]=-1;var O=R[H];if(O!==null)for(R[H]=null,H=0;H<O.length;H++){var z=O[H];z!==null&&(z.lane&=-536870913)}a&=~L}n!==0&&me(e,n,0),s!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=s&~(f&~t))}function me(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-Ae(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|a&4194090}function tt(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var n=31-Ae(a),i=1<<n;i&t|e[n]&t&&(e[n]|=t),a&=~i}}function ot(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function St(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function hn(){var e=k.p;return e!==0?e:(e=window.event,e===void 0?32:C0(e.type))}function ft(e,t){var a=k.p;try{return k.p=e,t()}finally{k.p=a}}var at=Math.random().toString(36).slice(2),nt="__reactFiber$"+at,Qe="__reactProps$"+at,pt="__reactContainer$"+at,On="__reactEvents$"+at,Na="__reactListeners$"+at,Jc="__reactHandles$"+at,Fc="__reactResources$"+at,El="__reactMarker$"+at;function ir(e){delete e[nt],delete e[Qe],delete e[On],delete e[Na],delete e[Jc]}function zn(e){var t=e[nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[pt]||a[nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=m0(e);e!==null;){if(a=e[nt])return a;e=m0(e)}return t}e=a,a=e.parentNode}return null}function Dn(e){if(e=e[nt]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function jl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Un(e){var t=e[Fc];return t||(t=e[Fc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[El]=!0}var Wc=new Set,Ic={};function mn(e,t){Hn(e,t),Hn(e+"Capture",t)}function Hn(e,t){for(Ic[e]=t,e=0;e<t.length;e++)Wc.add(t[e])}var am=RegExp("^[: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]*$"),Pc={},eu={};function nm(e){return P.call(eu,e)?!0:P.call(Pc,e)?!1:am.test(e)?eu[e]=!0:(Pc[e]=!0,!1)}function Ci(e,t,a){if(nm(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ai(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Ta(e,t,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+n)}}var sr,tu;function Bn(e){if(sr===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);sr=t&&t[1]||"",tu=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+sr+e+tu}var rr=!1;function or(e,t){if(!e||rr)return"";rr=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(t){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(z){var O=z}Reflect.construct(e,[],L)}else{try{L.call()}catch(z){O=z}e.call(L.prototype)}}else{try{throw Error()}catch(z){O=z}(L=e())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(z){if(z&&O&&typeof z.stack=="string")return[z.stack,O.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=n.DetermineComponentFrameRoot(),f=s[0],p=s[1];if(f&&p){var b=f.split(`
4
+ `),R=p.split(`
5
+ `);for(i=n=0;n<b.length&&!b[n].includes("DetermineComponentFrameRoot");)n++;for(;i<R.length&&!R[i].includes("DetermineComponentFrameRoot");)i++;if(n===b.length||i===R.length)for(n=b.length-1,i=R.length-1;1<=n&&0<=i&&b[n]!==R[i];)i--;for(;1<=n&&0<=i;n--,i--)if(b[n]!==R[i]){if(n!==1||i!==1)do if(n--,i--,0>i||b[n]!==R[i]){var H=`
6
+ `+b[n].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=n&&0<=i);break}}}finally{rr=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Bn(a):""}function lm(e){switch(e.tag){case 26:case 27:case 5:return Bn(e.type);case 16:return Bn("Lazy");case 13:return Bn("Suspense");case 19:return Bn("SuspenseList");case 0:case 15:return or(e.type,!1);case 11:return or(e.type.render,!1);case 1:return or(e.type,!0);case 31:return Bn("Activity");default:return""}}function au(e){try{var t="";do t+=lm(e),e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}function Jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function im(e){var t=nu(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var i=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(f){n=""+f,s.call(this,f)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(f){n=""+f},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ri(e){e._valueTracker||(e._valueTracker=im(e))}function lu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),n="";return e&&(n=nu(e)?e.checked?"true":"false":e.value),e=n,e!==a?(t.setValue(e),!0):!1}function Oi(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}}var sm=/[\n"\\]/g;function Ft(e){return e.replace(sm,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function cr(e,t,a,n,i,s,f,p){e.name="",f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.type=f:e.removeAttribute("type"),t!=null?f==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Jt(t)):e.value!==""+Jt(t)&&(e.value=""+Jt(t)):f!=="submit"&&f!=="reset"||e.removeAttribute("value"),t!=null?ur(e,f,Jt(t)):a!=null?ur(e,f,Jt(a)):n!=null&&e.removeAttribute("value"),i==null&&s!=null&&(e.defaultChecked=!!s),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Jt(p):e.removeAttribute("name")}function iu(e,t,a,n,i,s,f,p){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||a!=null){if(!(s!=="submit"&&s!=="reset"||t!=null))return;a=a!=null?""+Jt(a):"",t=t!=null?""+Jt(t):a,p||t===e.value||(e.value=t),e.defaultValue=t}n=n??i,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=p?e.checked:!!n,e.defaultChecked=!!n,f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.name=f)}function ur(e,t,a){t==="number"&&Oi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ln(e,t,a,n){if(e=e.options,t){t={};for(var i=0;i<a.length;i++)t["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=t.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&n&&(e[a].defaultSelected=!0)}else{for(a=""+Jt(a),t=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,n&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function su(e,t,a){if(t!=null&&(t=""+Jt(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Jt(a):""}function ru(e,t,a,n){if(t==null){if(n!=null){if(a!=null)throw Error(u(92));if(de(n)){if(1<n.length)throw Error(u(93));n=n[0]}a=n}a==null&&(a=""),t=a}a=Jt(t),e.defaultValue=a,n=e.textContent,n===a&&n!==""&&n!==null&&(e.value=n)}function kn(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var rm=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ou(e,t,a){var n=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,a):typeof a!="number"||a===0||rm.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function cu(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var i in t)n=t[i],t.hasOwnProperty(i)&&a[i]!==n&&ou(e,i,n)}else for(var s in t)t.hasOwnProperty(s)&&ou(e,s,t[s])}function fr(e){if(e.indexOf("-")===-1)return!1;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 om=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),cm=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function zi(e){return cm.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var dr=null;function hr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yn=null,qn=null;function uu(e){var t=Dn(e);if(t&&(e=t.stateNode)){var a=e[Qe]||null;e:switch(e=t.stateNode,t.type){case"input":if(cr(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ft(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var n=a[t];if(n!==e&&n.form===e.form){var i=n[Qe]||null;if(!i)throw Error(u(90));cr(n,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<a.length;t++)n=a[t],n.form===e.form&&lu(n)}break e;case"textarea":su(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Ln(e,!!a.multiple,t,!1)}}}var mr=!1;function fu(e,t,a){if(mr)return e(t,a);mr=!0;try{var n=e(t);return n}finally{if(mr=!1,(Yn!==null||qn!==null)&&(ys(),Yn&&(t=Yn,e=qn,qn=Yn=null,uu(t),e)))for(t=0;t<e.length;t++)uu(e[t])}}function Nl(e,t){var a=e.stateNode;if(a===null)return null;var n=a[Qe]||null;if(n===null)return null;a=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pr=!1;if(Ma)try{var Tl={};Object.defineProperty(Tl,"passive",{get:function(){pr=!0}}),window.addEventListener("test",Tl,Tl),window.removeEventListener("test",Tl,Tl)}catch{pr=!1}var Xa=null,gr=null,Di=null;function du(){if(Di)return Di;var e,t=gr,a=t.length,n,i="value"in Xa?Xa.value:Xa.textContent,s=i.length;for(e=0;e<a&&t[e]===i[e];e++);var f=a-e;for(n=1;n<=f&&t[a-n]===i[s-n];n++);return Di=i.slice(e,1<n?1-n:void 0)}function Ui(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Hi(){return!0}function hu(){return!1}function Ot(e){function t(a,n,i,s,f){this._reactName=a,this._targetInst=i,this.type=n,this.nativeEvent=s,this.target=f,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(a=e[p],this[p]=a?a(s):s[p]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Hi:hu,this.isPropagationStopped=hu,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Hi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Hi)},persist:function(){},isPersistent:Hi}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bi=Ot(pn),Ml=v({},pn,{view:0,detail:0}),um=Ot(Ml),vr,yr,_l,Li=v({},Ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==_l&&(_l&&e.type==="mousemove"?(vr=e.screenX-_l.screenX,yr=e.screenY-_l.screenY):yr=vr=0,_l=e),vr)},movementY:function(e){return"movementY"in e?e.movementY:yr}}),mu=Ot(Li),fm=v({},Li,{dataTransfer:0}),dm=Ot(fm),hm=v({},Ml,{relatedTarget:0}),br=Ot(hm),mm=v({},pn,{animationName:0,elapsedTime:0,pseudoElement:0}),pm=Ot(mm),gm=v({},pn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vm=Ot(gm),ym=v({},pn,{data:0}),pu=Ot(ym),bm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xm={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sm[e])?!!t[e]:!1}function xr(){return wm}var Em=v({},Ml,{key:function(e){if(e.key){var t=bm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ui(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?xm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xr,charCode:function(e){return e.type==="keypress"?Ui(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ui(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),jm=Ot(Em),Nm=v({},Li,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gu=Ot(Nm),Tm=v({},Ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xr}),Mm=Ot(Tm),_m=v({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cm=Ot(_m),Am=v({},Li,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Rm=Ot(Am),Om=v({},pn,{newState:0,oldState:0}),zm=Ot(Om),Dm=[9,13,27,32],Sr=Ma&&"CompositionEvent"in window,Cl=null;Ma&&"documentMode"in document&&(Cl=document.documentMode);var Um=Ma&&"TextEvent"in window&&!Cl,vu=Ma&&(!Sr||Cl&&8<Cl&&11>=Cl),yu=" ",bu=!1;function xu(e,t){switch(e){case"keyup":return Dm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Su(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gn=!1;function Hm(e,t){switch(e){case"compositionend":return Su(t);case"keypress":return t.which!==32?null:(bu=!0,yu);case"textInput":return e=t.data,e===yu&&bu?null:e;default:return null}}function Bm(e,t){if(Gn)return e==="compositionend"||!Sr&&xu(e,t)?(e=du(),Di=gr=Xa=null,Gn=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return vu&&t.locale!=="ko"?null:t.data;default:return null}}var Lm={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Lm[e.type]:t==="textarea"}function Eu(e,t,a,n){Yn?qn?qn.push(n):qn=[n]:Yn=n,t=js(t,"onChange"),0<t.length&&(a=new Bi("onChange","change",null,a,n),e.push({event:a,listeners:t}))}var Al=null,Rl=null;function km(e){l0(e,0)}function ki(e){var t=jl(e);if(lu(t))return e}function ju(e,t){if(e==="change")return t}var Nu=!1;if(Ma){var wr;if(Ma){var Er="oninput"in document;if(!Er){var Tu=document.createElement("div");Tu.setAttribute("oninput","return;"),Er=typeof Tu.oninput=="function"}wr=Er}else wr=!1;Nu=wr&&(!document.documentMode||9<document.documentMode)}function Mu(){Al&&(Al.detachEvent("onpropertychange",_u),Rl=Al=null)}function _u(e){if(e.propertyName==="value"&&ki(Rl)){var t=[];Eu(t,Rl,e,hr(e)),fu(km,t)}}function Ym(e,t,a){e==="focusin"?(Mu(),Al=t,Rl=a,Al.attachEvent("onpropertychange",_u)):e==="focusout"&&Mu()}function qm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ki(Rl)}function Gm(e,t){if(e==="click")return ki(t)}function Vm(e,t){if(e==="input"||e==="change")return ki(t)}function Xm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yt=typeof Object.is=="function"?Object.is:Xm;function Ol(e,t){if(Yt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;for(n=0;n<a.length;n++){var i=a[n];if(!P.call(t,i)||!Yt(e[i],t[i]))return!1}return!0}function Cu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Au(e,t){var a=Cu(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e<=t&&n>=t)return{node:a,offset:t-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Cu(a)}}function Ru(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ru(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ou(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Oi(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Oi(e.document)}return t}function jr(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")}var Qm=Ma&&"documentMode"in document&&11>=document.documentMode,Vn=null,Nr=null,zl=null,Tr=!1;function zu(e,t,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Tr||Vn==null||Vn!==Oi(n)||(n=Vn,"selectionStart"in n&&jr(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zl&&Ol(zl,n)||(zl=n,n=js(Nr,"onSelect"),0<n.length&&(t=new Bi("onSelect","select",null,t,a),e.push({event:t,listeners:n}),t.target=Vn)))}function gn(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Xn={animationend:gn("Animation","AnimationEnd"),animationiteration:gn("Animation","AnimationIteration"),animationstart:gn("Animation","AnimationStart"),transitionrun:gn("Transition","TransitionRun"),transitionstart:gn("Transition","TransitionStart"),transitioncancel:gn("Transition","TransitionCancel"),transitionend:gn("Transition","TransitionEnd")},Mr={},Du={};Ma&&(Du=document.createElement("div").style,"AnimationEvent"in window||(delete Xn.animationend.animation,delete Xn.animationiteration.animation,delete Xn.animationstart.animation),"TransitionEvent"in window||delete Xn.transitionend.transition);function vn(e){if(Mr[e])return Mr[e];if(!Xn[e])return e;var t=Xn[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Du)return Mr[e]=t[a];return e}var Uu=vn("animationend"),Hu=vn("animationiteration"),Bu=vn("animationstart"),Zm=vn("transitionrun"),Km=vn("transitionstart"),$m=vn("transitioncancel"),Lu=vn("transitionend"),ku=new Map,_r="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");_r.push("scrollEnd");function sa(e,t){ku.set(e,t),mn(t,[e])}var Yu=new WeakMap;function Wt(e,t){if(typeof e=="object"&&e!==null){var a=Yu.get(e);return a!==void 0?a:(t={value:e,source:t,stack:au(t)},Yu.set(e,t),t)}return{value:e,source:t,stack:au(t)}}var It=[],Qn=0,Cr=0;function Yi(){for(var e=Qn,t=Cr=Qn=0;t<e;){var a=It[t];It[t++]=null;var n=It[t];It[t++]=null;var i=It[t];It[t++]=null;var s=It[t];if(It[t++]=null,n!==null&&i!==null){var f=n.pending;f===null?i.next=i:(i.next=f.next,f.next=i),n.pending=i}s!==0&&qu(a,i,s)}}function qi(e,t,a,n){It[Qn++]=e,It[Qn++]=t,It[Qn++]=a,It[Qn++]=n,Cr|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function Ar(e,t,a,n){return qi(e,t,a,n),Gi(e)}function Zn(e,t){return qi(e,null,null,t),Gi(e)}function qu(e,t,a){e.lanes|=a;var n=e.alternate;n!==null&&(n.lanes|=a);for(var i=!1,s=e.return;s!==null;)s.childLanes|=a,n=s.alternate,n!==null&&(n.childLanes|=a),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(i=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,i&&t!==null&&(i=31-Ae(a),e=s.hiddenUpdates,n=e[i],n===null?e[i]=[t]:n.push(t),t.lane=a|536870912),s):null}function Gi(e){if(50<li)throw li=0,Bo=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Kn={};function Jm(e,t,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qt(e,t,a,n){return new Jm(e,t,a,n)}function Rr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _a(e,t){var a=e.alternate;return a===null?(a=qt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Gu(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Vi(e,t,a,n,i,s){var f=0;if(n=e,typeof e=="function")Rr(e)&&(f=1);else if(typeof e=="string")f=Wp(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ve:return e=qt(31,a,t,i),e.elementType=ve,e.lanes=s,e;case C:return yn(a.children,i,s,t);case V:f=8,i|=24;break;case Y:return e=qt(12,a,t,i|2),e.elementType=Y,e.lanes=s,e;case K:return e=qt(13,a,t,i),e.elementType=K,e.lanes=s,e;case I:return e=qt(19,a,t,i),e.elementType=I,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Q:case q:f=10;break e;case le:f=9;break e;case X:f=11;break e;case ae:f=14;break e;case ue:f=16,n=null;break e}f=29,a=Error(u(130,e===null?"null":typeof e,"")),n=null}return t=qt(f,a,t,i),t.elementType=e,t.type=n,t.lanes=s,t}function yn(e,t,a,n){return e=qt(7,e,n,t),e.lanes=a,e}function Or(e,t,a){return e=qt(6,e,null,t),e.lanes=a,e}function zr(e,t,a){return t=qt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var $n=[],Jn=0,Xi=null,Qi=0,Pt=[],ea=0,bn=null,Ca=1,Aa="";function xn(e,t){$n[Jn++]=Qi,$n[Jn++]=Xi,Xi=e,Qi=t}function Vu(e,t,a){Pt[ea++]=Ca,Pt[ea++]=Aa,Pt[ea++]=bn,bn=e;var n=Ca;e=Aa;var i=32-Ae(n)-1;n&=~(1<<i),a+=1;var s=32-Ae(t)+i;if(30<s){var f=i-i%5;s=(n&(1<<f)-1).toString(32),n>>=f,i-=f,Ca=1<<32-Ae(t)+i|a<<i|n,Aa=s+e}else Ca=1<<s|a<<i|n,Aa=e}function Dr(e){e.return!==null&&(xn(e,1),Vu(e,1,0))}function Ur(e){for(;e===Xi;)Xi=$n[--Jn],$n[Jn]=null,Qi=$n[--Jn],$n[Jn]=null;for(;e===bn;)bn=Pt[--ea],Pt[ea]=null,Aa=Pt[--ea],Pt[ea]=null,Ca=Pt[--ea],Pt[ea]=null}var At=null,We=null,Oe=!1,Sn=null,pa=!1,Hr=Error(u(519));function wn(e){var t=Error(u(418,""));throw Hl(Wt(t,e)),Hr}function Xu(e){var t=e.stateNode,a=e.type,n=e.memoizedProps;switch(t[nt]=e,t[Qe]=n,a){case"dialog":we("cancel",t),we("close",t);break;case"iframe":case"object":case"embed":we("load",t);break;case"video":case"audio":for(a=0;a<si.length;a++)we(si[a],t);break;case"source":we("error",t);break;case"img":case"image":case"link":we("error",t),we("load",t);break;case"details":we("toggle",t);break;case"input":we("invalid",t),iu(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0),Ri(t);break;case"select":we("invalid",t);break;case"textarea":we("invalid",t),ru(t,n.value,n.defaultValue,n.children),Ri(t)}a=n.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||n.suppressHydrationWarning===!0||o0(t.textContent,a)?(n.popover!=null&&(we("beforetoggle",t),we("toggle",t)),n.onScroll!=null&&we("scroll",t),n.onScrollEnd!=null&&we("scrollend",t),n.onClick!=null&&(t.onclick=Ns),t=!0):t=!1,t||wn(e)}function Qu(e){for(At=e.return;At;)switch(At.tag){case 5:case 13:pa=!1;return;case 27:case 3:pa=!0;return;default:At=At.return}}function Dl(e){if(e!==At)return!1;if(!Oe)return Qu(e),Oe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Po(e.type,e.memoizedProps)),a=!a),a&&We&&wn(e),Qu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){We=oa(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}We=null}}else t===27?(t=We,rn(e.type)?(e=nc,nc=null,We=e):We=t):We=At?oa(e.stateNode.nextSibling):null;return!0}function Ul(){We=At=null,Oe=!1}function Zu(){var e=Sn;return e!==null&&(Ut===null?Ut=e:Ut.push.apply(Ut,e),Sn=null),e}function Hl(e){Sn===null?Sn=[e]:Sn.push(e)}var Br=D(null),En=null,Ra=null;function Qa(e,t,a){U(Br,t._currentValue),t._currentValue=a}function Oa(e){e._currentValue=Br.current,Z(Br)}function Lr(e,t,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===a)break;e=e.return}}function kr(e,t,a,n){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var s=i.dependencies;if(s!==null){var f=i.child;s=s.firstContext;e:for(;s!==null;){var p=s;s=i;for(var b=0;b<t.length;b++)if(p.context===t[b]){s.lanes|=a,p=s.alternate,p!==null&&(p.lanes|=a),Lr(s.return,a,e),n||(f=null);break e}s=p.next}}else if(i.tag===18){if(f=i.return,f===null)throw Error(u(341));f.lanes|=a,s=f.alternate,s!==null&&(s.lanes|=a),Lr(f,a,e),f=null}else f=i.child;if(f!==null)f.return=i;else for(f=i;f!==null;){if(f===e){f=null;break}if(i=f.sibling,i!==null){i.return=f.return,f=i;break}f=f.return}i=f}}function Bl(e,t,a,n){e=null;for(var i=t,s=!1;i!==null;){if(!s){if((i.flags&524288)!==0)s=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var f=i.alternate;if(f===null)throw Error(u(387));if(f=f.memoizedProps,f!==null){var p=i.type;Yt(i.pendingProps.value,f.value)||(e!==null?e.push(p):e=[p])}}else if(i===qe.current){if(f=i.alternate,f===null)throw Error(u(387));f.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(di):e=[di])}i=i.return}e!==null&&kr(t,e,a,n),t.flags|=262144}function Zi(e){for(e=e.firstContext;e!==null;){if(!Yt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function jn(e){En=e,Ra=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Tt(e){return Ku(En,e)}function Ki(e,t){return En===null&&jn(e),Ku(e,t)}function Ku(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Ra===null){if(e===null)throw Error(u(308));Ra=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ra=Ra.next=t;return a}var Fm=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Wm=l.unstable_scheduleCallback,Im=l.unstable_NormalPriority,dt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yr(){return{controller:new Fm,data:new Map,refCount:0}}function Ll(e){e.refCount--,e.refCount===0&&Wm(Im,function(){e.controller.abort()})}var kl=null,qr=0,Fn=0,Wn=null;function Pm(e,t){if(kl===null){var a=kl=[];qr=0,Fn=Xo(),Wn={status:"pending",value:void 0,then:function(n){a.push(n)}}}return qr++,t.then($u,$u),t}function $u(){if(--qr===0&&kl!==null){Wn!==null&&(Wn.status="fulfilled");var e=kl;kl=null,Fn=0,Wn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ep(e,t){var a=[],n={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var i=0;i<a.length;i++)(0,a[i])(t)},function(i){for(n.status="rejected",n.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),n}var Ju=A.S;A.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&Pm(e,t),Ju!==null&&Ju(e,t)};var Nn=D(null);function Gr(){var e=Nn.current;return e!==null?e:Ze.pooledCache}function $i(e,t){t===null?U(Nn,Nn.current):U(Nn,t.pool)}function Fu(){var e=Gr();return e===null?null:{parent:dt._currentValue,pool:e}}var Yl=Error(u(460)),Wu=Error(u(474)),Ji=Error(u(542)),Vr={then:function(){}};function Iu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Fi(){}function Pu(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Fi,Fi),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tf(e),e;default:if(typeof t.status=="string")t.then(Fi,Fi);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=n}},function(n){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,tf(e),e}throw ql=t,Yl}}var ql=null;function ef(){if(ql===null)throw Error(u(459));var e=ql;return ql=null,e}function tf(e){if(e===Yl||e===Ji)throw Error(u(483))}var Za=!1;function Xr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function $a(e,t,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(He&2)!==0){var i=n.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),n.pending=t,t=Gi(e),qu(e,null,a),t}return qi(e,n,t,a),Gi(e)}function Gl(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,tt(e,a)}}function Zr(e,t){var a=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,a===n)){var i=null,s=null;if(a=a.firstBaseUpdate,a!==null){do{var f={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};s===null?i=s=f:s=s.next=f,a=a.next}while(a!==null);s===null?i=s=t:s=s.next=t}else i=s=t;a={baseState:n.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Kr=!1;function Vl(){if(Kr){var e=Wn;if(e!==null)throw e}}function Xl(e,t,a,n){Kr=!1;var i=e.updateQueue;Za=!1;var s=i.firstBaseUpdate,f=i.lastBaseUpdate,p=i.shared.pending;if(p!==null){i.shared.pending=null;var b=p,R=b.next;b.next=null,f===null?s=R:f.next=R,f=b;var H=e.alternate;H!==null&&(H=H.updateQueue,p=H.lastBaseUpdate,p!==f&&(p===null?H.firstBaseUpdate=R:p.next=R,H.lastBaseUpdate=b))}if(s!==null){var L=i.baseState;f=0,H=R=b=null,p=s;do{var O=p.lane&-536870913,z=O!==p.lane;if(z?(Me&O)===O:(n&O)===O){O!==0&&O===Fn&&(Kr=!0),H!==null&&(H=H.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var fe=e,oe=p;O=t;var Ye=a;switch(oe.tag){case 1:if(fe=oe.payload,typeof fe=="function"){L=fe.call(Ye,L,O);break e}L=fe;break e;case 3:fe.flags=fe.flags&-65537|128;case 0:if(fe=oe.payload,O=typeof fe=="function"?fe.call(Ye,L,O):fe,O==null)break e;L=v({},L,O);break e;case 2:Za=!0}}O=p.callback,O!==null&&(e.flags|=64,z&&(e.flags|=8192),z=i.callbacks,z===null?i.callbacks=[O]:z.push(O))}else z={lane:O,tag:p.tag,payload:p.payload,callback:p.callback,next:null},H===null?(R=H=z,b=L):H=H.next=z,f|=O;if(p=p.next,p===null){if(p=i.shared.pending,p===null)break;z=p,p=z.next,z.next=null,i.lastBaseUpdate=z,i.shared.pending=null}}while(!0);H===null&&(b=L),i.baseState=b,i.firstBaseUpdate=R,i.lastBaseUpdate=H,s===null&&(i.shared.lanes=0),an|=f,e.lanes=f,e.memoizedState=L}}function af(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function nf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)af(a[e],t)}var In=D(null),Wi=D(0);function lf(e,t){e=ka,U(Wi,e),U(In,t),ka=e|t.baseLanes}function $r(){U(Wi,ka),U(In,In.current)}function Jr(){ka=Wi.current,Z(In),Z(Wi)}var Ja=0,ye=null,Le=null,ct=null,Ii=!1,Pn=!1,Tn=!1,Pi=0,Ql=0,el=null,tp=0;function lt(){throw Error(u(321))}function Fr(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Yt(e[a],t[a]))return!1;return!0}function Wr(e,t,a,n,i,s){return Ja=s,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?Gf:Vf,Tn=!1,s=a(n,i),Tn=!1,Pn&&(s=rf(t,a,n,i)),sf(e),s}function sf(e){A.H=is;var t=Le!==null&&Le.next!==null;if(Ja=0,ct=Le=ye=null,Ii=!1,Ql=0,el=null,t)throw Error(u(300));e===null||vt||(e=e.dependencies,e!==null&&Zi(e)&&(vt=!0))}function rf(e,t,a,n){ye=e;var i=0;do{if(Pn&&(el=null),Ql=0,Pn=!1,25<=i)throw Error(u(301));if(i+=1,ct=Le=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}A.H=op,s=t(a,n)}while(Pn);return s}function ap(){var e=A.H,t=e.useState()[0];return t=typeof t.then=="function"?Zl(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(ye.flags|=1024),t}function Ir(){var e=Pi!==0;return Pi=0,e}function Pr(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function eo(e){if(Ii){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ii=!1}Ja=0,ct=Le=ye=null,Pn=!1,Ql=Pi=0,el=null}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?ye.memoizedState=ct=e:ct=ct.next=e,ct}function ut(){if(Le===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=ct===null?ye.memoizedState:ct.next;if(t!==null)ct=t,Le=e;else{if(e===null)throw ye.alternate===null?Error(u(467)):Error(u(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},ct===null?ye.memoizedState=ct=e:ct=ct.next=e}return ct}function to(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zl(e){var t=Ql;return Ql+=1,el===null&&(el=[]),e=Pu(el,e,t),t=ye,(ct===null?t.memoizedState:ct.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?Gf:Vf),e}function es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Zl(e);if(e.$$typeof===q)return Tt(e)}throw Error(u(438,String(e)))}function ao(e){var t=null,a=ye.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var n=ye.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=to(),ye.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),n=0;n<e;n++)a[n]=se;return t.index++,a}function za(e,t){return typeof t=="function"?t(e):t}function ts(e){var t=ut();return no(t,Le,e)}function no(e,t,a){var n=e.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=a;var i=e.baseQueue,s=n.pending;if(s!==null){if(i!==null){var f=i.next;i.next=s.next,s.next=f}t.baseQueue=i=s,n.pending=null}if(s=e.baseState,i===null)e.memoizedState=s;else{t=i.next;var p=f=null,b=null,R=t,H=!1;do{var L=R.lane&-536870913;if(L!==R.lane?(Me&L)===L:(Ja&L)===L){var O=R.revertLane;if(O===0)b!==null&&(b=b.next={lane:0,revertLane:0,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),L===Fn&&(H=!0);else if((Ja&O)===O){R=R.next,O===Fn&&(H=!0);continue}else L={lane:0,revertLane:R.revertLane,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(p=b=L,f=s):b=b.next=L,ye.lanes|=O,an|=O;L=R.action,Tn&&a(s,L),s=R.hasEagerState?R.eagerState:a(s,L)}else O={lane:L,revertLane:R.revertLane,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},b===null?(p=b=O,f=s):b=b.next=O,ye.lanes|=L,an|=L;R=R.next}while(R!==null&&R!==t);if(b===null?f=s:b.next=p,!Yt(s,e.memoizedState)&&(vt=!0,H&&(a=Wn,a!==null)))throw a;e.memoizedState=s,e.baseState=f,e.baseQueue=b,n.lastRenderedState=s}return i===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function lo(e){var t=ut(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var n=a.dispatch,i=a.pending,s=t.memoizedState;if(i!==null){a.pending=null;var f=i=i.next;do s=e(s,f.action),f=f.next;while(f!==i);Yt(s,t.memoizedState)||(vt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),a.lastRenderedState=s}return[s,n]}function of(e,t,a){var n=ye,i=ut(),s=Oe;if(s){if(a===void 0)throw Error(u(407));a=a()}else a=t();var f=!Yt((Le||i).memoizedState,a);f&&(i.memoizedState=a,vt=!0),i=i.queue;var p=ff.bind(null,n,i,e);if(Kl(2048,8,p,[e]),i.getSnapshot!==t||f||ct!==null&&ct.memoizedState.tag&1){if(n.flags|=2048,tl(9,as(),uf.bind(null,n,i,a,t),null),Ze===null)throw Error(u(349));s||(Ja&124)!==0||cf(n,t,a)}return a}function cf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=ye.updateQueue,t===null?(t=to(),ye.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function uf(e,t,a,n){t.value=a,t.getSnapshot=n,df(t)&&hf(e)}function ff(e,t,a){return a(function(){df(t)&&hf(e)})}function df(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Yt(e,a)}catch{return!0}}function hf(e){var t=Zn(e,2);t!==null&&Zt(t,e,2)}function io(e){var t=zt();if(typeof e=="function"){var a=e;if(e=a(),Tn){Fe(!0);try{a()}finally{Fe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:za,lastRenderedState:e},t}function mf(e,t,a,n){return e.baseState=a,no(e,Le,typeof n=="function"?n:za)}function np(e,t,a,n,i){if(ls(e))throw Error(u(485));if(e=t.action,e!==null){var s={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(f){s.listeners.push(f)}};A.T!==null?a(!0):s.isTransition=!1,n(s),a=t.pending,a===null?(s.next=t.pending=s,pf(t,s)):(s.next=a.next,t.pending=a.next=s)}}function pf(e,t){var a=t.action,n=t.payload,i=e.state;if(t.isTransition){var s=A.T,f={};A.T=f;try{var p=a(i,n),b=A.S;b!==null&&b(f,p),gf(e,t,p)}catch(R){so(e,t,R)}finally{A.T=s}}else try{s=a(i,n),gf(e,t,s)}catch(R){so(e,t,R)}}function gf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(n){vf(e,t,n)},function(n){return so(e,t,n)}):vf(e,t,a)}function vf(e,t,a){t.status="fulfilled",t.value=a,yf(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,pf(e,a)))}function so(e,t,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=a,yf(t),t=t.next;while(t!==n)}e.action=null}function yf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bf(e,t){return t}function xf(e,t){if(Oe){var a=Ze.formState;if(a!==null){e:{var n=ye;if(Oe){if(We){t:{for(var i=We,s=pa;i.nodeType!==8;){if(!s){i=null;break t}if(i=oa(i.nextSibling),i===null){i=null;break t}}s=i.data,i=s==="F!"||s==="F"?i:null}if(i){We=oa(i.nextSibling),n=i.data==="F!";break e}}wn(n)}n=!1}n&&(t=a[0])}}return a=zt(),a.memoizedState=a.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bf,lastRenderedState:t},a.queue=n,a=kf.bind(null,ye,n),n.dispatch=a,n=io(!1),s=fo.bind(null,ye,!1,n.queue),n=zt(),i={state:t,dispatch:null,action:e,pending:null},n.queue=i,a=np.bind(null,ye,i,s,a),i.dispatch=a,n.memoizedState=e,[t,a,!1]}function Sf(e){var t=ut();return wf(t,Le,e)}function wf(e,t,a){if(t=no(e,t,bf)[0],e=ts(za)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=Zl(t)}catch(f){throw f===Yl?Ji:f}else n=t;t=ut();var i=t.queue,s=i.dispatch;return a!==t.memoizedState&&(ye.flags|=2048,tl(9,as(),lp.bind(null,i,a),null)),[n,s,e]}function lp(e,t){e.action=t}function Ef(e){var t=ut(),a=Le;if(a!==null)return wf(t,a,e);ut(),t=t.memoizedState,a=ut();var n=a.queue.dispatch;return a.memoizedState=e,[t,n,!1]}function tl(e,t,a,n){return e={tag:e,create:a,deps:n,inst:t,next:null},t=ye.updateQueue,t===null&&(t=to(),ye.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,t.lastEffect=e),e}function as(){return{destroy:void 0,resource:void 0}}function jf(){return ut().memoizedState}function ns(e,t,a,n){var i=zt();n=n===void 0?null:n,ye.flags|=e,i.memoizedState=tl(1|t,as(),a,n)}function Kl(e,t,a,n){var i=ut();n=n===void 0?null:n;var s=i.memoizedState.inst;Le!==null&&n!==null&&Fr(n,Le.memoizedState.deps)?i.memoizedState=tl(t,s,a,n):(ye.flags|=e,i.memoizedState=tl(1|t,s,a,n))}function Nf(e,t){ns(8390656,8,e,t)}function Tf(e,t){Kl(2048,8,e,t)}function Mf(e,t){return Kl(4,2,e,t)}function _f(e,t){return Kl(4,4,e,t)}function Cf(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Af(e,t,a){a=a!=null?a.concat([e]):null,Kl(4,4,Cf.bind(null,t,e),a)}function ro(){}function Rf(e,t){var a=ut();t=t===void 0?null:t;var n=a.memoizedState;return t!==null&&Fr(t,n[1])?n[0]:(a.memoizedState=[e,t],e)}function Of(e,t){var a=ut();t=t===void 0?null:t;var n=a.memoizedState;if(t!==null&&Fr(t,n[1]))return n[0];if(n=e(),Tn){Fe(!0);try{e()}finally{Fe(!1)}}return a.memoizedState=[n,t],n}function oo(e,t,a){return a===void 0||(Ja&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=Ud(),ye.lanes|=e,an|=e,a)}function zf(e,t,a,n){return Yt(a,t)?a:In.current!==null?(e=oo(e,a,n),Yt(e,t)||(vt=!0),e):(Ja&42)===0?(vt=!0,e.memoizedState=a):(e=Ud(),ye.lanes|=e,an|=e,t)}function Df(e,t,a,n,i){var s=k.p;k.p=s!==0&&8>s?s:8;var f=A.T,p={};A.T=p,fo(e,!1,t,a);try{var b=i(),R=A.S;if(R!==null&&R(p,b),b!==null&&typeof b=="object"&&typeof b.then=="function"){var H=ep(b,n);$l(e,t,H,Qt(e))}else $l(e,t,n,Qt(e))}catch(L){$l(e,t,{then:function(){},status:"rejected",reason:L},Qt())}finally{k.p=s,A.T=f}}function ip(){}function co(e,t,a,n){if(e.tag!==5)throw Error(u(476));var i=Uf(e).queue;Df(e,i,t,F,a===null?ip:function(){return Hf(e),a(n)})}function Uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:za,lastRenderedState:F},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:za,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hf(e){var t=Uf(e).next.queue;$l(e,t,{},Qt())}function uo(){return Tt(di)}function Bf(){return ut().memoizedState}function Lf(){return ut().memoizedState}function sp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Qt();e=Ka(a);var n=$a(t,e,a);n!==null&&(Zt(n,t,a),Gl(n,t,a)),t={cache:Yr()},e.payload=t;return}t=t.return}}function rp(e,t,a){var n=Qt();a={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},ls(e)?Yf(t,a):(a=Ar(e,t,a,n),a!==null&&(Zt(a,e,n),qf(a,t,n)))}function kf(e,t,a){var n=Qt();$l(e,t,a,n)}function $l(e,t,a,n){var i={lane:n,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(ls(e))Yf(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var f=t.lastRenderedState,p=s(f,a);if(i.hasEagerState=!0,i.eagerState=p,Yt(p,f))return qi(e,t,i,0),Ze===null&&Yi(),!1}catch{}if(a=Ar(e,t,i,n),a!==null)return Zt(a,e,n),qf(a,t,n),!0}return!1}function fo(e,t,a,n){if(n={lane:2,revertLane:Xo(),action:n,hasEagerState:!1,eagerState:null,next:null},ls(e)){if(t)throw Error(u(479))}else t=Ar(e,a,n,2),t!==null&&Zt(t,e,2)}function ls(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Yf(e,t){Pn=Ii=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function qf(e,t,a){if((a&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,a|=n,t.lanes=a,tt(e,a)}}var is={readContext:Tt,use:es,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt},Gf={readContext:Tt,use:es,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:Tt,useEffect:Nf,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ns(4194308,4,Cf.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ns(4194308,4,e,t)},useInsertionEffect:function(e,t){ns(4,2,e,t)},useMemo:function(e,t){var a=zt();t=t===void 0?null:t;var n=e();if(Tn){Fe(!0);try{e()}finally{Fe(!1)}}return a.memoizedState=[n,t],n},useReducer:function(e,t,a){var n=zt();if(a!==void 0){var i=a(t);if(Tn){Fe(!0);try{a(t)}finally{Fe(!1)}}}else i=t;return n.memoizedState=n.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},n.queue=e,e=e.dispatch=rp.bind(null,ye,e),[n.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:function(e){e=io(e);var t=e.queue,a=kf.bind(null,ye,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ro,useDeferredValue:function(e,t){var a=zt();return oo(a,e,t)},useTransition:function(){var e=io(!1);return e=Df.bind(null,ye,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var n=ye,i=zt();if(Oe){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Ze===null)throw Error(u(349));(Me&124)!==0||cf(n,t,a)}i.memoizedState=a;var s={value:a,getSnapshot:t};return i.queue=s,Nf(ff.bind(null,n,s,e),[e]),n.flags|=2048,tl(9,as(),uf.bind(null,n,s,a,t),null),a},useId:function(){var e=zt(),t=Ze.identifierPrefix;if(Oe){var a=Aa,n=Ca;a=(n&~(1<<32-Ae(n)-1)).toString(32)+a,t="«"+t+"R"+a,a=Pi++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=tp++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:uo,useFormState:xf,useActionState:xf,useOptimistic:function(e){var t=zt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=fo.bind(null,ye,!0,a),a.dispatch=t,[e,t]},useMemoCache:ao,useCacheRefresh:function(){return zt().memoizedState=sp.bind(null,ye)}},Vf={readContext:Tt,use:es,useCallback:Rf,useContext:Tt,useEffect:Tf,useImperativeHandle:Af,useInsertionEffect:Mf,useLayoutEffect:_f,useMemo:Of,useReducer:ts,useRef:jf,useState:function(){return ts(za)},useDebugValue:ro,useDeferredValue:function(e,t){var a=ut();return zf(a,Le.memoizedState,e,t)},useTransition:function(){var e=ts(za)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:Zl(e),t]},useSyncExternalStore:of,useId:Bf,useHostTransitionStatus:uo,useFormState:Sf,useActionState:Sf,useOptimistic:function(e,t){var a=ut();return mf(a,Le,e,t)},useMemoCache:ao,useCacheRefresh:Lf},op={readContext:Tt,use:es,useCallback:Rf,useContext:Tt,useEffect:Tf,useImperativeHandle:Af,useInsertionEffect:Mf,useLayoutEffect:_f,useMemo:Of,useReducer:lo,useRef:jf,useState:function(){return lo(za)},useDebugValue:ro,useDeferredValue:function(e,t){var a=ut();return Le===null?oo(a,e,t):zf(a,Le.memoizedState,e,t)},useTransition:function(){var e=lo(za)[0],t=ut().memoizedState;return[typeof e=="boolean"?e:Zl(e),t]},useSyncExternalStore:of,useId:Bf,useHostTransitionStatus:uo,useFormState:Ef,useActionState:Ef,useOptimistic:function(e,t){var a=ut();return Le!==null?mf(a,Le,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:ao,useCacheRefresh:Lf},al=null,Jl=0;function ss(e){var t=Jl;return Jl+=1,al===null&&(al=[]),Pu(al,e,t)}function Fl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function rs(e,t){throw t.$$typeof===h?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xf(e){var t=e._init;return t(e._payload)}function Qf(e){function t(N,E){if(e){var _=N.deletions;_===null?(N.deletions=[E],N.flags|=16):_.push(E)}}function a(N,E){if(!e)return null;for(;E!==null;)t(N,E),E=E.sibling;return null}function n(N){for(var E=new Map;N!==null;)N.key!==null?E.set(N.key,N):E.set(N.index,N),N=N.sibling;return E}function i(N,E){return N=_a(N,E),N.index=0,N.sibling=null,N}function s(N,E,_){return N.index=_,e?(_=N.alternate,_!==null?(_=_.index,_<E?(N.flags|=67108866,E):_):(N.flags|=67108866,E)):(N.flags|=1048576,E)}function f(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function p(N,E,_,B){return E===null||E.tag!==6?(E=Or(_,N.mode,B),E.return=N,E):(E=i(E,_),E.return=N,E)}function b(N,E,_,B){var ee=_.type;return ee===C?H(N,E,_.props.children,B,_.key):E!==null&&(E.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&Xf(ee)===E.type)?(E=i(E,_.props),Fl(E,_),E.return=N,E):(E=Vi(_.type,_.key,_.props,null,N.mode,B),Fl(E,_),E.return=N,E)}function R(N,E,_,B){return E===null||E.tag!==4||E.stateNode.containerInfo!==_.containerInfo||E.stateNode.implementation!==_.implementation?(E=zr(_,N.mode,B),E.return=N,E):(E=i(E,_.children||[]),E.return=N,E)}function H(N,E,_,B,ee){return E===null||E.tag!==7?(E=yn(_,N.mode,B,ee),E.return=N,E):(E=i(E,_),E.return=N,E)}function L(N,E,_){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return E=Or(""+E,N.mode,_),E.return=N,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case S:return _=Vi(E.type,E.key,E.props,null,N.mode,_),Fl(_,E),_.return=N,_;case M:return E=zr(E,N.mode,_),E.return=N,E;case ue:var B=E._init;return E=B(E._payload),L(N,E,_)}if(de(E)||Ce(E))return E=yn(E,N.mode,_,null),E.return=N,E;if(typeof E.then=="function")return L(N,ss(E),_);if(E.$$typeof===q)return L(N,Ki(N,E),_);rs(N,E)}return null}function O(N,E,_,B){var ee=E!==null?E.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return ee!==null?null:p(N,E,""+_,B);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case S:return _.key===ee?b(N,E,_,B):null;case M:return _.key===ee?R(N,E,_,B):null;case ue:return ee=_._init,_=ee(_._payload),O(N,E,_,B)}if(de(_)||Ce(_))return ee!==null?null:H(N,E,_,B,null);if(typeof _.then=="function")return O(N,E,ss(_),B);if(_.$$typeof===q)return O(N,E,Ki(N,_),B);rs(N,_)}return null}function z(N,E,_,B,ee){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return N=N.get(_)||null,p(E,N,""+B,ee);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case S:return N=N.get(B.key===null?_:B.key)||null,b(E,N,B,ee);case M:return N=N.get(B.key===null?_:B.key)||null,R(E,N,B,ee);case ue:var be=B._init;return B=be(B._payload),z(N,E,_,B,ee)}if(de(B)||Ce(B))return N=N.get(_)||null,H(E,N,B,ee,null);if(typeof B.then=="function")return z(N,E,_,ss(B),ee);if(B.$$typeof===q)return z(N,E,_,Ki(E,B),ee);rs(E,B)}return null}function fe(N,E,_,B){for(var ee=null,be=null,ie=E,ce=E=0,bt=null;ie!==null&&ce<_.length;ce++){ie.index>ce?(bt=ie,ie=null):bt=ie.sibling;var Re=O(N,ie,_[ce],B);if(Re===null){ie===null&&(ie=bt);break}e&&ie&&Re.alternate===null&&t(N,ie),E=s(Re,E,ce),be===null?ee=Re:be.sibling=Re,be=Re,ie=bt}if(ce===_.length)return a(N,ie),Oe&&xn(N,ce),ee;if(ie===null){for(;ce<_.length;ce++)ie=L(N,_[ce],B),ie!==null&&(E=s(ie,E,ce),be===null?ee=ie:be.sibling=ie,be=ie);return Oe&&xn(N,ce),ee}for(ie=n(ie);ce<_.length;ce++)bt=z(ie,N,ce,_[ce],B),bt!==null&&(e&&bt.alternate!==null&&ie.delete(bt.key===null?ce:bt.key),E=s(bt,E,ce),be===null?ee=bt:be.sibling=bt,be=bt);return e&&ie.forEach(function(dn){return t(N,dn)}),Oe&&xn(N,ce),ee}function oe(N,E,_,B){if(_==null)throw Error(u(151));for(var ee=null,be=null,ie=E,ce=E=0,bt=null,Re=_.next();ie!==null&&!Re.done;ce++,Re=_.next()){ie.index>ce?(bt=ie,ie=null):bt=ie.sibling;var dn=O(N,ie,Re.value,B);if(dn===null){ie===null&&(ie=bt);break}e&&ie&&dn.alternate===null&&t(N,ie),E=s(dn,E,ce),be===null?ee=dn:be.sibling=dn,be=dn,ie=bt}if(Re.done)return a(N,ie),Oe&&xn(N,ce),ee;if(ie===null){for(;!Re.done;ce++,Re=_.next())Re=L(N,Re.value,B),Re!==null&&(E=s(Re,E,ce),be===null?ee=Re:be.sibling=Re,be=Re);return Oe&&xn(N,ce),ee}for(ie=n(ie);!Re.done;ce++,Re=_.next())Re=z(ie,N,ce,Re.value,B),Re!==null&&(e&&Re.alternate!==null&&ie.delete(Re.key===null?ce:Re.key),E=s(Re,E,ce),be===null?ee=Re:be.sibling=Re,be=Re);return e&&ie.forEach(function(c2){return t(N,c2)}),Oe&&xn(N,ce),ee}function Ye(N,E,_,B){if(typeof _=="object"&&_!==null&&_.type===C&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case S:e:{for(var ee=_.key;E!==null;){if(E.key===ee){if(ee=_.type,ee===C){if(E.tag===7){a(N,E.sibling),B=i(E,_.props.children),B.return=N,N=B;break e}}else if(E.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ue&&Xf(ee)===E.type){a(N,E.sibling),B=i(E,_.props),Fl(B,_),B.return=N,N=B;break e}a(N,E);break}else t(N,E);E=E.sibling}_.type===C?(B=yn(_.props.children,N.mode,B,_.key),B.return=N,N=B):(B=Vi(_.type,_.key,_.props,null,N.mode,B),Fl(B,_),B.return=N,N=B)}return f(N);case M:e:{for(ee=_.key;E!==null;){if(E.key===ee)if(E.tag===4&&E.stateNode.containerInfo===_.containerInfo&&E.stateNode.implementation===_.implementation){a(N,E.sibling),B=i(E,_.children||[]),B.return=N,N=B;break e}else{a(N,E);break}else t(N,E);E=E.sibling}B=zr(_,N.mode,B),B.return=N,N=B}return f(N);case ue:return ee=_._init,_=ee(_._payload),Ye(N,E,_,B)}if(de(_))return fe(N,E,_,B);if(Ce(_)){if(ee=Ce(_),typeof ee!="function")throw Error(u(150));return _=ee.call(_),oe(N,E,_,B)}if(typeof _.then=="function")return Ye(N,E,ss(_),B);if(_.$$typeof===q)return Ye(N,E,Ki(N,_),B);rs(N,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,E!==null&&E.tag===6?(a(N,E.sibling),B=i(E,_),B.return=N,N=B):(a(N,E),B=Or(_,N.mode,B),B.return=N,N=B),f(N)):a(N,E)}return function(N,E,_,B){try{Jl=0;var ee=Ye(N,E,_,B);return al=null,ee}catch(ie){if(ie===Yl||ie===Ji)throw ie;var be=qt(29,ie,null,N.mode);return be.lanes=B,be.return=N,be}}}var nl=Qf(!0),Zf=Qf(!1),ta=D(null),ga=null;function Fa(e){var t=e.alternate;U(ht,ht.current&1),U(ta,e),ga===null&&(t===null||In.current!==null||t.memoizedState!==null)&&(ga=e)}function Kf(e){if(e.tag===22){if(U(ht,ht.current),U(ta,e),ga===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(ga=e)}}else Wa()}function Wa(){U(ht,ht.current),U(ta,ta.current)}function Da(e){Z(ta),ga===e&&(ga=null),Z(ht)}var ht=D(0);function os(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||ac(a)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ho(e,t,a,n){t=e.memoizedState,a=a(n,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var mo={enqueueSetState:function(e,t,a){e=e._reactInternals;var n=Qt(),i=Ka(n);i.payload=t,a!=null&&(i.callback=a),t=$a(e,i,n),t!==null&&(Zt(t,e,n),Gl(t,e,n))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var n=Qt(),i=Ka(n);i.tag=1,i.payload=t,a!=null&&(i.callback=a),t=$a(e,i,n),t!==null&&(Zt(t,e,n),Gl(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Qt(),n=Ka(a);n.tag=2,t!=null&&(n.callback=t),t=$a(e,n,a),t!==null&&(Zt(t,e,a),Gl(t,e,a))}};function $f(e,t,a,n,i,s,f){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,f):t.prototype&&t.prototype.isPureReactComponent?!Ol(a,n)||!Ol(i,s):!0}function Jf(e,t,a,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,n),t.state!==e&&mo.enqueueReplaceState(t,t.state,null)}function Mn(e,t){var a=t;if("ref"in t){a={};for(var n in t)n!=="ref"&&(a[n]=t[n])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}var cs=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Ff(e){cs(e)}function Wf(e){console.error(e)}function If(e){cs(e)}function us(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Pf(e,t,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function po(e,t,a){return a=Ka(a),a.tag=3,a.payload={element:null},a.callback=function(){us(e,t)},a}function ed(e){return e=Ka(e),e.tag=3,e}function td(e,t,a,n){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var s=n.value;e.payload=function(){return i(s)},e.callback=function(){Pf(t,a,n)}}var f=a.stateNode;f!==null&&typeof f.componentDidCatch=="function"&&(e.callback=function(){Pf(t,a,n),typeof i!="function"&&(nn===null?nn=new Set([this]):nn.add(this));var p=n.stack;this.componentDidCatch(n.value,{componentStack:p!==null?p:""})})}function cp(e,t,a,n,i){if(a.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=a.alternate,t!==null&&Bl(t,a,i,!0),a=ta.current,a!==null){switch(a.tag){case 13:return ga===null?ko():a.alternate===null&&Ie===0&&(Ie=3),a.flags&=-257,a.flags|=65536,a.lanes=i,n===Vr?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([n]):t.add(n),qo(e,n,i)),!1;case 22:return a.flags|=65536,n===Vr?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([n]):a.add(n)),qo(e,n,i)),!1}throw Error(u(435,a.tag))}return qo(e,n,i),ko(),!1}if(Oe)return t=ta.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,n!==Hr&&(e=Error(u(422),{cause:n}),Hl(Wt(e,a)))):(n!==Hr&&(t=Error(u(423),{cause:n}),Hl(Wt(t,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,n=Wt(n,a),i=po(e.stateNode,n,i),Zr(e,i),Ie!==4&&(Ie=2)),!1;var s=Error(u(520),{cause:n});if(s=Wt(s,a),ni===null?ni=[s]:ni.push(s),Ie!==4&&(Ie=2),t===null)return!0;n=Wt(n,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=po(a.stateNode,n,e),Zr(a,e),!1;case 1:if(t=a.type,s=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(nn===null||!nn.has(s))))return a.flags|=65536,i&=-i,a.lanes|=i,i=ed(i),td(i,e,a,n),Zr(a,i),!1}a=a.return}while(a!==null);return!1}var ad=Error(u(461)),vt=!1;function wt(e,t,a,n){t.child=e===null?Zf(t,null,a,n):nl(t,e.child,a,n)}function nd(e,t,a,n,i){a=a.render;var s=t.ref;if("ref"in n){var f={};for(var p in n)p!=="ref"&&(f[p]=n[p])}else f=n;return jn(t),n=Wr(e,t,a,f,s,i),p=Ir(),e!==null&&!vt?(Pr(e,t,i),Ua(e,t,i)):(Oe&&p&&Dr(t),t.flags|=1,wt(e,t,n,i),t.child)}function ld(e,t,a,n,i){if(e===null){var s=a.type;return typeof s=="function"&&!Rr(s)&&s.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=s,id(e,t,s,n,i)):(e=Vi(a.type,null,n,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Eo(e,i)){var f=s.memoizedProps;if(a=a.compare,a=a!==null?a:Ol,a(f,n)&&e.ref===t.ref)return Ua(e,t,i)}return t.flags|=1,e=_a(s,n),e.ref=t.ref,e.return=t,t.child=e}function id(e,t,a,n,i){if(e!==null){var s=e.memoizedProps;if(Ol(s,n)&&e.ref===t.ref)if(vt=!1,t.pendingProps=n=s,Eo(e,i))(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,Ua(e,t,i)}return go(e,t,a,n,i)}function sd(e,t,a){var n=t.pendingProps,i=n.children,s=e!==null?e.memoizedState:null;if(n.mode==="hidden"){if((t.flags&128)!==0){if(n=s!==null?s.baseLanes|a:a,e!==null){for(i=t.child=e.child,s=0;i!==null;)s=s|i.lanes|i.childLanes,i=i.sibling;t.childLanes=s&~n}else t.childLanes=0,t.child=null;return rd(e,t,n,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$i(t,s!==null?s.cachePool:null),s!==null?lf(t,s):$r(),Kf(t);else return t.lanes=t.childLanes=536870912,rd(e,t,s!==null?s.baseLanes|a:a,a)}else s!==null?($i(t,s.cachePool),lf(t,s),Wa(),t.memoizedState=null):(e!==null&&$i(t,null),$r(),Wa());return wt(e,t,i,a),t.child}function rd(e,t,a,n){var i=Gr();return i=i===null?null:{parent:dt._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&$i(t,null),$r(),Kf(t),e!==null&&Bl(e,t,n,!0),null}function fs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function go(e,t,a,n,i){return jn(t),a=Wr(e,t,a,n,void 0,i),n=Ir(),e!==null&&!vt?(Pr(e,t,i),Ua(e,t,i)):(Oe&&n&&Dr(t),t.flags|=1,wt(e,t,a,i),t.child)}function od(e,t,a,n,i,s){return jn(t),t.updateQueue=null,a=rf(t,n,a,i),sf(e),n=Ir(),e!==null&&!vt?(Pr(e,t,s),Ua(e,t,s)):(Oe&&n&&Dr(t),t.flags|=1,wt(e,t,a,s),t.child)}function cd(e,t,a,n,i){if(jn(t),t.stateNode===null){var s=Kn,f=a.contextType;typeof f=="object"&&f!==null&&(s=Tt(f)),s=new a(n,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=mo,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=n,s.state=t.memoizedState,s.refs={},Xr(t),f=a.contextType,s.context=typeof f=="object"&&f!==null?Tt(f):Kn,s.state=t.memoizedState,f=a.getDerivedStateFromProps,typeof f=="function"&&(ho(t,a,f,n),s.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(f=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),f!==s.state&&mo.enqueueReplaceState(s,s.state,null),Xl(t,n,s,i),Vl(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){s=t.stateNode;var p=t.memoizedProps,b=Mn(a,p);s.props=b;var R=s.context,H=a.contextType;f=Kn,typeof H=="object"&&H!==null&&(f=Tt(H));var L=a.getDerivedStateFromProps;H=typeof L=="function"||typeof s.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,H||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(p||R!==f)&&Jf(t,s,n,f),Za=!1;var O=t.memoizedState;s.state=O,Xl(t,n,s,i),Vl(),R=t.memoizedState,p||O!==R||Za?(typeof L=="function"&&(ho(t,a,L,n),R=t.memoizedState),(b=Za||$f(t,a,b,n,O,R,f))?(H||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=R),s.props=n,s.state=R,s.context=f,n=b):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Qr(e,t),f=t.memoizedProps,H=Mn(a,f),s.props=H,L=t.pendingProps,O=s.context,R=a.contextType,b=Kn,typeof R=="object"&&R!==null&&(b=Tt(R)),p=a.getDerivedStateFromProps,(R=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(f!==L||O!==b)&&Jf(t,s,n,b),Za=!1,O=t.memoizedState,s.state=O,Xl(t,n,s,i),Vl();var z=t.memoizedState;f!==L||O!==z||Za||e!==null&&e.dependencies!==null&&Zi(e.dependencies)?(typeof p=="function"&&(ho(t,a,p,n),z=t.memoizedState),(H=Za||$f(t,a,H,n,O,z,b)||e!==null&&e.dependencies!==null&&Zi(e.dependencies))?(R||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,z,b),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,z,b)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=z),s.props=n,s.state=z,s.context=b,n=H):(typeof s.componentDidUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||f===e.memoizedProps&&O===e.memoizedState||(t.flags|=1024),n=!1)}return s=n,fs(e,t),n=(t.flags&128)!==0,s||n?(s=t.stateNode,a=n&&typeof a.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&n?(t.child=nl(t,e.child,null,i),t.child=nl(t,null,a,i)):wt(e,t,a,i),t.memoizedState=s.state,e=t.child):e=Ua(e,t,i),e}function ud(e,t,a,n){return Ul(),t.flags|=256,wt(e,t,a,n),t.child}var vo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yo(e){return{baseLanes:e,cachePool:Fu()}}function bo(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=aa),e}function fd(e,t,a){var n=t.pendingProps,i=!1,s=(t.flags&128)!==0,f;if((f=s)||(f=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),f&&(i=!0,t.flags&=-129),f=(t.flags&32)!==0,t.flags&=-33,e===null){if(Oe){if(i?Fa(t):Wa(),Oe){var p=We,b;if(b=p){e:{for(b=p,p=pa;b.nodeType!==8;){if(!p){p=null;break e}if(b=oa(b.nextSibling),b===null){p=null;break e}}p=b}p!==null?(t.memoizedState={dehydrated:p,treeContext:bn!==null?{id:Ca,overflow:Aa}:null,retryLane:536870912,hydrationErrors:null},b=qt(18,null,null,0),b.stateNode=p,b.return=t,t.child=b,At=t,We=null,b=!0):b=!1}b||wn(t)}if(p=t.memoizedState,p!==null&&(p=p.dehydrated,p!==null))return ac(p)?t.lanes=32:t.lanes=536870912,null;Da(t)}return p=n.children,n=n.fallback,i?(Wa(),i=t.mode,p=ds({mode:"hidden",children:p},i),n=yn(n,i,a,null),p.return=t,n.return=t,p.sibling=n,t.child=p,i=t.child,i.memoizedState=yo(a),i.childLanes=bo(e,f,a),t.memoizedState=vo,n):(Fa(t),xo(t,p))}if(b=e.memoizedState,b!==null&&(p=b.dehydrated,p!==null)){if(s)t.flags&256?(Fa(t),t.flags&=-257,t=So(e,t,a)):t.memoizedState!==null?(Wa(),t.child=e.child,t.flags|=128,t=null):(Wa(),i=n.fallback,p=t.mode,n=ds({mode:"visible",children:n.children},p),i=yn(i,p,a,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,nl(t,e.child,null,a),n=t.child,n.memoizedState=yo(a),n.childLanes=bo(e,f,a),t.memoizedState=vo,t=i);else if(Fa(t),ac(p)){if(f=p.nextSibling&&p.nextSibling.dataset,f)var R=f.dgst;f=R,n=Error(u(419)),n.stack="",n.digest=f,Hl({value:n,source:null,stack:null}),t=So(e,t,a)}else if(vt||Bl(e,t,a,!1),f=(a&e.childLanes)!==0,vt||f){if(f=Ze,f!==null&&(n=a&-a,n=(n&42)!==0?1:ot(n),n=(n&(f.suspendedLanes|a))!==0?0:n,n!==0&&n!==b.retryLane))throw b.retryLane=n,Zn(e,n),Zt(f,e,n),ad;p.data==="$?"||ko(),t=So(e,t,a)}else p.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=b.treeContext,We=oa(p.nextSibling),At=t,Oe=!0,Sn=null,pa=!1,e!==null&&(Pt[ea++]=Ca,Pt[ea++]=Aa,Pt[ea++]=bn,Ca=e.id,Aa=e.overflow,bn=t),t=xo(t,n.children),t.flags|=4096);return t}return i?(Wa(),i=n.fallback,p=t.mode,b=e.child,R=b.sibling,n=_a(b,{mode:"hidden",children:n.children}),n.subtreeFlags=b.subtreeFlags&65011712,R!==null?i=_a(R,i):(i=yn(i,p,a,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,p=e.child.memoizedState,p===null?p=yo(a):(b=p.cachePool,b!==null?(R=dt._currentValue,b=b.parent!==R?{parent:R,pool:R}:b):b=Fu(),p={baseLanes:p.baseLanes|a,cachePool:b}),i.memoizedState=p,i.childLanes=bo(e,f,a),t.memoizedState=vo,n):(Fa(t),a=e.child,e=a.sibling,a=_a(a,{mode:"visible",children:n.children}),a.return=t,a.sibling=null,e!==null&&(f=t.deletions,f===null?(t.deletions=[e],t.flags|=16):f.push(e)),t.child=a,t.memoizedState=null,a)}function xo(e,t){return t=ds({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ds(e,t){return e=qt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function So(e,t,a){return nl(t,e.child,null,a),e=xo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dd(e,t,a){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Lr(e.return,t,a)}function wo(e,t,a,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=n,s.tail=a,s.tailMode=i)}function hd(e,t,a){var n=t.pendingProps,i=n.revealOrder,s=n.tail;if(wt(e,t,n.children,a),n=ht.current,(n&2)!==0)n=n&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dd(e,a,t);else if(e.tag===19)dd(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}switch(U(ht,n),i){case"forwards":for(a=t.child,i=null;a!==null;)e=a.alternate,e!==null&&os(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=t.child,t.child=null):(i=a.sibling,a.sibling=null),wo(t,!1,i,a,s);break;case"backwards":for(a=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&os(e)===null){t.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}wo(t,!0,a,null,s);break;case"together":wo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ua(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),an|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Bl(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=_a(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=_a(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Eo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Zi(e)))}function up(e,t,a){switch(t.tag){case 3:re(t,t.stateNode.containerInfo),Qa(t,dt,e.memoizedState.cache),Ul();break;case 27:case 5:Rt(t);break;case 4:re(t,t.stateNode.containerInfo);break;case 10:Qa(t,t.type,t.memoizedProps.value);break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(Fa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?fd(e,t,a):(Fa(t),e=Ua(e,t,a),e!==null?e.sibling:null);Fa(t);break;case 19:var i=(e.flags&128)!==0;if(n=(a&t.childLanes)!==0,n||(Bl(e,t,a,!1),n=(a&t.childLanes)!==0),i){if(n)return hd(e,t,a);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),U(ht,ht.current),n)break;return null;case 22:case 23:return t.lanes=0,sd(e,t,a);case 24:Qa(t,dt,e.memoizedState.cache)}return Ua(e,t,a)}function md(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!Eo(e,a)&&(t.flags&128)===0)return vt=!1,up(e,t,a);vt=(e.flags&131072)!==0}else vt=!1,Oe&&(t.flags&1048576)!==0&&Vu(t,Qi,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var n=t.elementType,i=n._init;if(n=i(n._payload),t.type=n,typeof n=="function")Rr(n)?(e=Mn(n,e),t.tag=1,t=cd(null,t,n,e,a)):(t.tag=0,t=go(null,t,n,e,a));else{if(n!=null){if(i=n.$$typeof,i===X){t.tag=11,t=nd(null,t,n,e,a);break e}else if(i===ae){t.tag=14,t=ld(null,t,n,e,a);break e}}throw t=_e(n)||n,Error(u(306,t,""))}}return t;case 0:return go(e,t,t.type,t.pendingProps,a);case 1:return n=t.type,i=Mn(n,t.pendingProps),cd(e,t,n,i,a);case 3:e:{if(re(t,t.stateNode.containerInfo),e===null)throw Error(u(387));n=t.pendingProps;var s=t.memoizedState;i=s.element,Qr(e,t),Xl(t,n,null,a);var f=t.memoizedState;if(n=f.cache,Qa(t,dt,n),n!==s.cache&&kr(t,[dt],a,!0),Vl(),n=f.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:f.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=ud(e,t,n,a);break e}else if(n!==i){i=Wt(Error(u(424)),t),Hl(i),t=ud(e,t,n,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,We=oa(e.firstChild),At=t,Oe=!0,Sn=null,pa=!0,a=Zf(t,null,n,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ul(),n===i){t=Ua(e,t,a);break e}wt(e,t,n,a)}t=t.child}return t;case 26:return fs(e,t),e===null?(a=y0(t.type,null,t.pendingProps,null))?t.memoizedState=a:Oe||(a=t.type,e=t.pendingProps,n=Ts(te.current).createElement(a),n[nt]=t,n[Qe]=e,jt(n,a,e),gt(n),t.stateNode=n):t.memoizedState=y0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Rt(t),e===null&&Oe&&(n=t.stateNode=p0(t.type,t.pendingProps,te.current),At=t,pa=!0,i=We,rn(t.type)?(nc=i,We=oa(n.firstChild)):We=i),wt(e,t,t.pendingProps.children,a),fs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Oe&&((i=n=We)&&(n=Lp(n,t.type,t.pendingProps,pa),n!==null?(t.stateNode=n,At=t,We=oa(n.firstChild),pa=!1,i=!0):i=!1),i||wn(t)),Rt(t),i=t.type,s=t.pendingProps,f=e!==null?e.memoizedProps:null,n=s.children,Po(i,s)?n=null:f!==null&&Po(i,f)&&(t.flags|=32),t.memoizedState!==null&&(i=Wr(e,t,ap,null,null,a),di._currentValue=i),fs(e,t),wt(e,t,n,a),t.child;case 6:return e===null&&Oe&&((e=a=We)&&(a=kp(a,t.pendingProps,pa),a!==null?(t.stateNode=a,At=t,We=null,e=!0):e=!1),e||wn(t)),null;case 13:return fd(e,t,a);case 4:return re(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=nl(t,null,n,a):wt(e,t,n,a),t.child;case 11:return nd(e,t,t.type,t.pendingProps,a);case 7:return wt(e,t,t.pendingProps,a),t.child;case 8:return wt(e,t,t.pendingProps.children,a),t.child;case 12:return wt(e,t,t.pendingProps.children,a),t.child;case 10:return n=t.pendingProps,Qa(t,t.type,n.value),wt(e,t,n.children,a),t.child;case 9:return i=t.type._context,n=t.pendingProps.children,jn(t),i=Tt(i),n=n(i),t.flags|=1,wt(e,t,n,a),t.child;case 14:return ld(e,t,t.type,t.pendingProps,a);case 15:return id(e,t,t.type,t.pendingProps,a);case 19:return hd(e,t,a);case 31:return n=t.pendingProps,a=t.mode,n={mode:n.mode,children:n.children},e===null?(a=ds(n,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=_a(e.child,n),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return sd(e,t,a);case 24:return jn(t),n=Tt(dt),e===null?(i=Gr(),i===null&&(i=Ze,s=Yr(),i.pooledCache=s,s.refCount++,s!==null&&(i.pooledCacheLanes|=a),i=s),t.memoizedState={parent:n,cache:i},Xr(t),Qa(t,dt,i)):((e.lanes&a)!==0&&(Qr(e,t),Xl(t,null,null,a),Vl()),i=e.memoizedState,s=t.memoizedState,i.parent!==n?(i={parent:n,cache:n},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Qa(t,dt,n)):(n=s.cache,Qa(t,dt,n),n!==i.cache&&kr(t,[dt],a,!0))),wt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Ha(e){e.flags|=4}function pd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!E0(t)){if(t=ta.current,t!==null&&((Me&4194048)===Me?ga!==null:(Me&62914560)!==Me&&(Me&536870912)===0||t!==ga))throw ql=Vr,Wu;e.flags|=8192}}function hs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mt():536870912,e.lanes|=t,rl|=t)}function Wl(e,t){if(!Oe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var n=null;a!==null;)a.alternate!==null&&(n=a),a=a.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,n=0;if(t)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags&65011712,n|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=n,e.childLanes=a,t}function fp(e,t,a){var n=t.pendingProps;switch(Ur(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Je(t),null;case 3:return a=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Oa(dt),st(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Dl(t)?Ha(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zu())),Je(t),null;case 26:return a=t.memoizedState,e===null?(Ha(t),a!==null?(Je(t),pd(t,a)):(Je(t),t.flags&=-16777217)):a?a!==e.memoizedState?(Ha(t),Je(t),pd(t,a)):(Je(t),t.flags&=-16777217):(e.memoizedProps!==n&&Ha(t),Je(t),t.flags&=-16777217),null;case 27:W(t),a=te.current;var i=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Ha(t);else{if(!n){if(t.stateNode===null)throw Error(u(166));return Je(t),null}e=J.current,Dl(t)?Xu(t):(e=p0(i,n,a),t.stateNode=e,Ha(t))}return Je(t),null;case 5:if(W(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&Ha(t);else{if(!n){if(t.stateNode===null)throw Error(u(166));return Je(t),null}if(e=J.current,Dl(t))Xu(t);else{switch(i=Ts(te.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof n.is=="string"?i.createElement("select",{is:n.is}):i.createElement("select"),n.multiple?e.multiple=!0:n.size&&(e.size=n.size);break;default:e=typeof n.is=="string"?i.createElement(a,{is:n.is}):i.createElement(a)}}e[nt]=t,e[Qe]=n;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(jt(e,a,n),a){case"button":case"input":case"select":case"textarea":e=!!n.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Ha(t)}}return Je(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&Ha(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(u(166));if(e=te.current,Dl(t)){if(e=t.stateNode,a=t.memoizedProps,n=null,i=At,i!==null)switch(i.tag){case 27:case 5:n=i.memoizedProps}e[nt]=t,e=!!(e.nodeValue===a||n!==null&&n.suppressHydrationWarning===!0||o0(e.nodeValue,a)),e||wn(t)}else e=Ts(e).createTextNode(n),e[nt]=t,t.stateNode=e}return Je(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Dl(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(u(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(u(317));i[nt]=t}else Ul(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Je(t),i=!1}else i=Zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Da(t),t):(Da(t),null)}if(Da(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=n!==null,e=e!==null&&e.memoizedState!==null,a){n=t.child,i=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(i=n.alternate.memoizedState.cachePool.pool);var s=null;n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==i&&(n.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),hs(t,t.updateQueue),Je(t),null;case 4:return st(),e===null&&$o(t.stateNode.containerInfo),Je(t),null;case 10:return Oa(t.type),Je(t),null;case 19:if(Z(ht),i=t.memoizedState,i===null)return Je(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)Wl(i,!1);else{if(Ie!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=os(e),s!==null){for(t.flags|=128,Wl(i,!1),e=s.updateQueue,t.updateQueue=e,hs(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Gu(a,e),a=a.sibling;return U(ht,ht.current&1|2),t.child}e=e.sibling}i.tail!==null&&ge()>gs&&(t.flags|=128,n=!0,Wl(i,!1),t.lanes=4194304)}else{if(!n)if(e=os(s),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,hs(t,e),Wl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Oe)return Je(t),null}else 2*ge()-i.renderingStartTime>gs&&a!==536870912&&(t.flags|=128,n=!0,Wl(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(e=i.last,e!==null?e.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ge(),t.sibling=null,e=ht.current,U(ht,n?e&1|2:e&1),t):(Je(t),null);case 22:case 23:return Da(t),Jr(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(a&536870912)!==0&&(t.flags&128)===0&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),a=t.updateQueue,a!==null&&hs(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==a&&(t.flags|=2048),e!==null&&Z(Nn),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Oa(dt),Je(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function dp(e,t){switch(Ur(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oa(dt),st(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return W(t),null;case 13:if(Da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Ul()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Z(ht),null;case 4:return st(),null;case 10:return Oa(t.type),null;case 22:case 23:return Da(t),Jr(),e!==null&&Z(Nn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Oa(dt),null;case 25:return null;default:return null}}function gd(e,t){switch(Ur(t),t.tag){case 3:Oa(dt),st();break;case 26:case 27:case 5:W(t);break;case 4:st();break;case 13:Da(t);break;case 19:Z(ht);break;case 10:Oa(t.type);break;case 22:case 23:Da(t),Jr(),e!==null&&Z(Nn);break;case 24:Oa(dt)}}function Il(e,t){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){n=void 0;var s=a.create,f=a.inst;n=s(),f.destroy=n}a=a.next}while(a!==i)}}catch(p){Xe(t,t.return,p)}}function Ia(e,t,a){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var s=i.next;n=s;do{if((n.tag&e)===e){var f=n.inst,p=f.destroy;if(p!==void 0){f.destroy=void 0,i=t;var b=a,R=p;try{R()}catch(H){Xe(i,b,H)}}}n=n.next}while(n!==s)}}catch(H){Xe(t,t.return,H)}}function vd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{nf(t,a)}catch(n){Xe(e,e.return,n)}}}function yd(e,t,a){a.props=Mn(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Xe(e,t,n)}}function Pl(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a=="function"?e.refCleanup=a(n):a.current=n}}catch(i){Xe(e,t,i)}}function va(e,t){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n=="function")try{n()}catch(i){Xe(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){Xe(e,t,i)}else a.current=null}function bd(e){var t=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break e;case"img":a.src?n.src=a.src:a.srcSet&&(n.srcset=a.srcSet)}}catch(i){Xe(e,e.return,i)}}function jo(e,t,a){try{var n=e.stateNode;zp(n,e.type,a,t),n[Qe]=t}catch(i){Xe(e,e.return,i)}}function xd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rn(e.type)||e.tag===4}function No(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xd(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.tag===27&&rn(e.type)||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 To(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Ns));else if(n!==4&&(n===27&&rn(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(To(e,t,a),e=e.sibling;e!==null;)To(e,t,a),e=e.sibling}function ms(e,t,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(n!==4&&(n===27&&rn(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ms(e,t,a),e=e.sibling;e!==null;)ms(e,t,a),e=e.sibling}function Sd(e){var t=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);jt(t,n,a),t[nt]=e,t[Qe]=a}catch(s){Xe(e,e.return,s)}}var Ba=!1,it=!1,Mo=!1,wd=typeof WeakSet=="function"?WeakSet:Set,yt=null;function hp(e,t){if(e=e.containerInfo,Wo=Os,e=Ou(e),jr(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var n=a.getSelection&&a.getSelection();if(n&&n.rangeCount!==0){a=n.anchorNode;var i=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{a.nodeType,s.nodeType}catch{a=null;break e}var f=0,p=-1,b=-1,R=0,H=0,L=e,O=null;t:for(;;){for(var z;L!==a||i!==0&&L.nodeType!==3||(p=f+i),L!==s||n!==0&&L.nodeType!==3||(b=f+n),L.nodeType===3&&(f+=L.nodeValue.length),(z=L.firstChild)!==null;)O=L,L=z;for(;;){if(L===e)break t;if(O===a&&++R===i&&(p=f),O===s&&++H===n&&(b=f),(z=L.nextSibling)!==null)break;L=O,O=L.parentNode}L=z}a=p===-1||b===-1?null:{start:p,end:b}}else a=null}a=a||{start:0,end:0}}else a=null;for(Io={focusedElem:e,selectionRange:a},Os=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,s=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,a=t,i=s.memoizedProps,s=s.memoizedState,n=a.stateNode;try{var fe=Mn(a.type,i,a.elementType===a.type);e=n.getSnapshotBeforeUpdate(fe,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(oe){Xe(a,a.return,oe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)tc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":tc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,yt=e;break}yt=t.return}}function Ed(e,t,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Pa(e,a),n&4&&Il(5,a);break;case 1:if(Pa(e,a),n&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(f){Xe(a,a.return,f)}else{var i=Mn(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(f){Xe(a,a.return,f)}}n&64&&vd(a),n&512&&Pl(a,a.return);break;case 3:if(Pa(e,a),n&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{nf(e,t)}catch(f){Xe(a,a.return,f)}}break;case 27:t===null&&n&4&&Sd(a);case 26:case 5:Pa(e,a),t===null&&n&4&&bd(a),n&512&&Pl(a,a.return);break;case 12:Pa(e,a);break;case 13:Pa(e,a),n&4&&Td(e,a),n&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=wp.bind(null,a),Yp(e,a))));break;case 22:if(n=a.memoizedState!==null||Ba,!n){t=t!==null&&t.memoizedState!==null||it,i=Ba;var s=it;Ba=n,(it=t)&&!s?en(e,a,(a.subtreeFlags&8772)!==0):Pa(e,a),Ba=i,it=s}break;case 30:break;default:Pa(e,a)}}function jd(e){var t=e.alternate;t!==null&&(e.alternate=null,jd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ir(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ke=null,Dt=!1;function La(e,t,a){for(a=a.child;a!==null;)Nd(e,t,a),a=a.sibling}function Nd(e,t,a){if(et&&typeof et.onCommitFiberUnmount=="function")try{et.onCommitFiberUnmount(Ne,a)}catch{}switch(a.tag){case 26:it||va(a,t),La(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:it||va(a,t);var n=Ke,i=Dt;rn(a.type)&&(Ke=a.stateNode,Dt=!1),La(e,t,a),oi(a.stateNode),Ke=n,Dt=i;break;case 5:it||va(a,t);case 6:if(n=Ke,i=Dt,Ke=null,La(e,t,a),Ke=n,Dt=i,Ke!==null)if(Dt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(a.stateNode)}catch(s){Xe(a,t,s)}else try{Ke.removeChild(a.stateNode)}catch(s){Xe(a,t,s)}break;case 18:Ke!==null&&(Dt?(e=Ke,h0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),gi(e)):h0(Ke,a.stateNode));break;case 4:n=Ke,i=Dt,Ke=a.stateNode.containerInfo,Dt=!0,La(e,t,a),Ke=n,Dt=i;break;case 0:case 11:case 14:case 15:it||Ia(2,a,t),it||Ia(4,a,t),La(e,t,a);break;case 1:it||(va(a,t),n=a.stateNode,typeof n.componentWillUnmount=="function"&&yd(a,t,n)),La(e,t,a);break;case 21:La(e,t,a);break;case 22:it=(n=it)||a.memoizedState!==null,La(e,t,a),it=n;break;default:La(e,t,a)}}function Td(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{gi(e)}catch(a){Xe(t,t.return,a)}}function mp(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new wd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new wd),t;default:throw Error(u(435,e.tag))}}function _o(e,t){var a=mp(e);t.forEach(function(n){var i=Ep.bind(null,e,n);a.has(n)||(a.add(n),n.then(i,i))})}function Gt(e,t){var a=t.deletions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n],s=e,f=t,p=f;e:for(;p!==null;){switch(p.tag){case 27:if(rn(p.type)){Ke=p.stateNode,Dt=!1;break e}break;case 5:Ke=p.stateNode,Dt=!1;break e;case 3:case 4:Ke=p.stateNode.containerInfo,Dt=!0;break e}p=p.return}if(Ke===null)throw Error(u(160));Nd(s,f,i),Ke=null,Dt=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Md(t,e),t=t.sibling}var ra=null;function Md(e,t){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(t,e),Vt(e),n&4&&(Ia(3,e,e.return),Il(3,e),Ia(5,e,e.return));break;case 1:Gt(t,e),Vt(e),n&512&&(it||a===null||va(a,a.return)),n&64&&Ba&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var i=ra;if(Gt(t,e),Vt(e),n&512&&(it||a===null||va(a,a.return)),n&4){var s=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,i=i.ownerDocument||i;t:switch(n){case"title":s=i.getElementsByTagName("title")[0],(!s||s[El]||s[nt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=i.createElement(n),i.head.insertBefore(s,i.querySelector("head > title"))),jt(s,n,a),s[nt]=e,gt(s),n=s;break e;case"link":var f=S0("link","href",i).get(n+(a.href||""));if(f){for(var p=0;p<f.length;p++)if(s=f[p],s.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&s.getAttribute("rel")===(a.rel==null?null:a.rel)&&s.getAttribute("title")===(a.title==null?null:a.title)&&s.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){f.splice(p,1);break t}}s=i.createElement(n),jt(s,n,a),i.head.appendChild(s);break;case"meta":if(f=S0("meta","content",i).get(n+(a.content||""))){for(p=0;p<f.length;p++)if(s=f[p],s.getAttribute("content")===(a.content==null?null:""+a.content)&&s.getAttribute("name")===(a.name==null?null:a.name)&&s.getAttribute("property")===(a.property==null?null:a.property)&&s.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&s.getAttribute("charset")===(a.charSet==null?null:a.charSet)){f.splice(p,1);break t}}s=i.createElement(n),jt(s,n,a),i.head.appendChild(s);break;default:throw Error(u(468,n))}s[nt]=e,gt(s),n=s}e.stateNode=n}else w0(i,e.type,e.stateNode);else e.stateNode=x0(i,n,e.memoizedProps);else s!==n?(s===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):s.count--,n===null?w0(i,e.type,e.stateNode):x0(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&jo(e,e.memoizedProps,a.memoizedProps)}break;case 27:Gt(t,e),Vt(e),n&512&&(it||a===null||va(a,a.return)),a!==null&&n&4&&jo(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Gt(t,e),Vt(e),n&512&&(it||a===null||va(a,a.return)),e.flags&32){i=e.stateNode;try{kn(i,"")}catch(z){Xe(e,e.return,z)}}n&4&&e.stateNode!=null&&(i=e.memoizedProps,jo(e,i,a!==null?a.memoizedProps:i)),n&1024&&(Mo=!0);break;case 6:if(Gt(t,e),Vt(e),n&4){if(e.stateNode===null)throw Error(u(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(z){Xe(e,e.return,z)}}break;case 3:if(Cs=null,i=ra,ra=Ms(t.containerInfo),Gt(t,e),ra=i,Vt(e),n&4&&a!==null&&a.memoizedState.isDehydrated)try{gi(t.containerInfo)}catch(z){Xe(e,e.return,z)}Mo&&(Mo=!1,_d(e));break;case 4:n=ra,ra=Ms(e.stateNode.containerInfo),Gt(t,e),Vt(e),ra=n;break;case 12:Gt(t,e),Vt(e);break;case 13:Gt(t,e),Vt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Do=ge()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,_o(e,n)));break;case 22:i=e.memoizedState!==null;var b=a!==null&&a.memoizedState!==null,R=Ba,H=it;if(Ba=R||i,it=H||b,Gt(t,e),it=H,Ba=R,Vt(e),n&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(a===null||b||Ba||it||_n(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){b=a=t;try{if(s=b.stateNode,i)f=s.style,typeof f.setProperty=="function"?f.setProperty("display","none","important"):f.display="none";else{p=b.stateNode;var L=b.memoizedProps.style,O=L!=null&&L.hasOwnProperty("display")?L.display:null;p.style.display=O==null||typeof O=="boolean"?"":(""+O).trim()}}catch(z){Xe(b,b.return,z)}}}else if(t.tag===6){if(a===null){b=t;try{b.stateNode.nodeValue=i?"":b.memoizedProps}catch(z){Xe(b,b.return,z)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(a=n.retryQueue,a!==null&&(n.retryQueue=null,_o(e,a))));break;case 19:Gt(t,e),Vt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,_o(e,n)));break;case 30:break;case 21:break;default:Gt(t,e),Vt(e)}}function Vt(e){var t=e.flags;if(t&2){try{for(var a,n=e.return;n!==null;){if(xd(n)){a=n;break}n=n.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var i=a.stateNode,s=No(e);ms(e,s,i);break;case 5:var f=a.stateNode;a.flags&32&&(kn(f,""),a.flags&=-33);var p=No(e);ms(e,p,f);break;case 3:case 4:var b=a.stateNode.containerInfo,R=No(e);To(e,R,b);break;default:throw Error(u(161))}}catch(H){Xe(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function _d(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;_d(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Pa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ed(e,t.alternate,t),t=t.sibling}function _n(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ia(4,t,t.return),_n(t);break;case 1:va(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&yd(t,t.return,a),_n(t);break;case 27:oi(t.stateNode);case 26:case 5:va(t,t.return),_n(t);break;case 22:t.memoizedState===null&&_n(t);break;case 30:_n(t);break;default:_n(t)}e=e.sibling}}function en(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,i=e,s=t,f=s.flags;switch(s.tag){case 0:case 11:case 15:en(i,s,a),Il(4,s);break;case 1:if(en(i,s,a),n=s,i=n.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(R){Xe(n,n.return,R)}if(n=s,i=n.updateQueue,i!==null){var p=n.stateNode;try{var b=i.shared.hiddenCallbacks;if(b!==null)for(i.shared.hiddenCallbacks=null,i=0;i<b.length;i++)af(b[i],p)}catch(R){Xe(n,n.return,R)}}a&&f&64&&vd(s),Pl(s,s.return);break;case 27:Sd(s);case 26:case 5:en(i,s,a),a&&n===null&&f&4&&bd(s),Pl(s,s.return);break;case 12:en(i,s,a);break;case 13:en(i,s,a),a&&f&4&&Td(i,s);break;case 22:s.memoizedState===null&&en(i,s,a),Pl(s,s.return);break;case 30:break;default:en(i,s,a)}t=t.sibling}}function Co(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Ll(a))}function Ao(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ll(e))}function ya(e,t,a,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Cd(e,t,a,n),t=t.sibling}function Cd(e,t,a,n){var i=t.flags;switch(t.tag){case 0:case 11:case 15:ya(e,t,a,n),i&2048&&Il(9,t);break;case 1:ya(e,t,a,n);break;case 3:ya(e,t,a,n),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ll(e)));break;case 12:if(i&2048){ya(e,t,a,n),e=t.stateNode;try{var s=t.memoizedProps,f=s.id,p=s.onPostCommit;typeof p=="function"&&p(f,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(b){Xe(t,t.return,b)}}else ya(e,t,a,n);break;case 13:ya(e,t,a,n);break;case 23:break;case 22:s=t.stateNode,f=t.alternate,t.memoizedState!==null?s._visibility&2?ya(e,t,a,n):ei(e,t):s._visibility&2?ya(e,t,a,n):(s._visibility|=2,ll(e,t,a,n,(t.subtreeFlags&10256)!==0)),i&2048&&Co(f,t);break;case 24:ya(e,t,a,n),i&2048&&Ao(t.alternate,t);break;default:ya(e,t,a,n)}}function ll(e,t,a,n,i){for(i=i&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var s=e,f=t,p=a,b=n,R=f.flags;switch(f.tag){case 0:case 11:case 15:ll(s,f,p,b,i),Il(8,f);break;case 23:break;case 22:var H=f.stateNode;f.memoizedState!==null?H._visibility&2?ll(s,f,p,b,i):ei(s,f):(H._visibility|=2,ll(s,f,p,b,i)),i&&R&2048&&Co(f.alternate,f);break;case 24:ll(s,f,p,b,i),i&&R&2048&&Ao(f.alternate,f);break;default:ll(s,f,p,b,i)}t=t.sibling}}function ei(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,n=t,i=n.flags;switch(n.tag){case 22:ei(a,n),i&2048&&Co(n.alternate,n);break;case 24:ei(a,n),i&2048&&Ao(n.alternate,n);break;default:ei(a,n)}t=t.sibling}}var ti=8192;function il(e){if(e.subtreeFlags&ti)for(e=e.child;e!==null;)Ad(e),e=e.sibling}function Ad(e){switch(e.tag){case 26:il(e),e.flags&ti&&e.memoizedState!==null&&Pp(ra,e.memoizedState,e.memoizedProps);break;case 5:il(e);break;case 3:case 4:var t=ra;ra=Ms(e.stateNode.containerInfo),il(e),ra=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=ti,ti=16777216,il(e),ti=t):il(e));break;default:il(e)}}function Rd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ai(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];yt=n,zd(n,e)}Rd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Od(e),e=e.sibling}function Od(e){switch(e.tag){case 0:case 11:case 15:ai(e),e.flags&2048&&Ia(9,e,e.return);break;case 3:ai(e);break;case 12:ai(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ps(e)):ai(e);break;default:ai(e)}}function ps(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var n=t[a];yt=n,zd(n,e)}Rd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ia(8,t,t.return),ps(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,ps(t));break;default:ps(t)}e=e.sibling}}function zd(e,t){for(;yt!==null;){var a=yt;switch(a.tag){case 0:case 11:case 15:Ia(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:Ll(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,yt=n;else e:for(a=e;yt!==null;){n=yt;var i=n.sibling,s=n.return;if(jd(n),n===a){yt=null;break e}if(i!==null){i.return=s,yt=i;break e}yt=s}}}var pp={getCacheForType:function(e){var t=Tt(dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},gp=typeof WeakMap=="function"?WeakMap:Map,He=0,Ze=null,Se=null,Me=0,Be=0,Xt=null,tn=!1,sl=!1,Ro=!1,ka=0,Ie=0,an=0,Cn=0,Oo=0,aa=0,rl=0,ni=null,Ut=null,zo=!1,Do=0,gs=1/0,vs=null,nn=null,Et=0,ln=null,ol=null,cl=0,Uo=0,Ho=null,Dd=null,li=0,Bo=null;function Qt(){if((He&2)!==0&&Me!==0)return Me&-Me;if(A.T!==null){var e=Fn;return e!==0?e:Xo()}return hn()}function Ud(){aa===0&&(aa=(Me&536870912)===0||Oe?rt():536870912);var e=ta.current;return e!==null&&(e.flags|=32),aa}function Zt(e,t,a){(e===Ze&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(ul(e,0),sn(e,Me,aa,!1)),Nt(e,a),((He&2)===0||e!==Ze)&&(e===Ze&&((He&2)===0&&(Cn|=a),Ie===4&&sn(e,Me,aa,!1)),ba(e))}function Hd(e,t,a){if((He&6)!==0)throw Error(u(327));var n=!a&&(t&124)===0&&(t&e.expiredLanes)===0||$(e,t),i=n?bp(e,t):Yo(e,t,!0),s=n;do{if(i===0){sl&&!n&&sn(e,t,0,!1);break}else{if(a=e.current.alternate,s&&!vp(a)){i=Yo(e,t,!1),s=!1;continue}if(i===2){if(s=t,e.errorRecoveryDisabledLanes&s)var f=0;else f=e.pendingLanes&-536870913,f=f!==0?f:f&536870912?536870912:0;if(f!==0){t=f;e:{var p=e;i=ni;var b=p.current.memoizedState.isDehydrated;if(b&&(ul(p,f).flags|=256),f=Yo(p,f,!1),f!==2){if(Ro&&!b){p.errorRecoveryDisabledLanes|=s,Cn|=s,i=4;break e}s=Ut,Ut=i,s!==null&&(Ut===null?Ut=s:Ut.push.apply(Ut,s))}i=f}if(s=!1,i!==2)continue}}if(i===1){ul(e,0),sn(e,t,0,!0);break}e:{switch(n=e,s=i,s){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:sn(n,t,aa,!tn);break e;case 2:Ut=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(i=Do+300-ge(),10<i)){if(sn(n,t,aa,!tn),ma(n,0,!0)!==0)break e;n.timeoutHandle=f0(Bd.bind(null,n,a,Ut,vs,zo,t,aa,Cn,rl,tn,s,2,-0,0),i);break e}Bd(n,a,Ut,vs,zo,t,aa,Cn,rl,tn,s,0,-0,0)}}break}while(!0);ba(e)}function Bd(e,t,a,n,i,s,f,p,b,R,H,L,O,z){if(e.timeoutHandle=-1,L=t.subtreeFlags,(L&8192||(L&16785408)===16785408)&&(fi={stylesheets:null,count:0,unsuspend:Ip},Ad(t),L=e2(),L!==null)){e.cancelPendingCommit=L(Xd.bind(null,e,t,s,a,n,i,f,p,b,H,1,O,z)),sn(e,s,f,!R);return}Xd(e,t,s,a,n,i,f,p,b)}function vp(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var n=0;n<a.length;n++){var i=a[n],s=i.getSnapshot;i=i.value;try{if(!Yt(s(),i))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function sn(e,t,a,n){t&=~Oo,t&=~Cn,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var i=t;0<i;){var s=31-Ae(i),f=1<<s;n[s]=-1,i&=~f}a!==0&&me(e,a,t)}function ys(){return(He&6)===0?(ii(0),!1):!0}function Lo(){if(Se!==null){if(Be===0)var e=Se.return;else e=Se,Ra=En=null,eo(e),al=null,Jl=0,e=Se;for(;e!==null;)gd(e.alternate,e),e=e.return;Se=null}}function ul(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Up(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Lo(),Ze=e,Se=a=_a(e.current,null),Me=t,Be=0,Xt=null,tn=!1,sl=$(e,t),Ro=!1,rl=aa=Oo=Cn=an=Ie=0,Ut=ni=null,zo=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var i=31-Ae(n),s=1<<i;t|=e[i],n&=~s}return ka=t,Yi(),a}function Ld(e,t){ye=null,A.H=is,t===Yl||t===Ji?(t=ef(),Be=3):t===Wu?(t=ef(),Be=4):Be=t===ad?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Xt=t,Se===null&&(Ie=1,us(e,Wt(t,e.current)))}function kd(){var e=A.H;return A.H=is,e===null?is:e}function Yd(){var e=A.A;return A.A=pp,e}function ko(){Ie=4,tn||(Me&4194048)!==Me&&ta.current!==null||(sl=!0),(an&134217727)===0&&(Cn&134217727)===0||Ze===null||sn(Ze,Me,aa,!1)}function Yo(e,t,a){var n=He;He|=2;var i=kd(),s=Yd();(Ze!==e||Me!==t)&&(vs=null,ul(e,t)),t=!1;var f=Ie;e:do try{if(Be!==0&&Se!==null){var p=Se,b=Xt;switch(Be){case 8:Lo(),f=6;break e;case 3:case 2:case 9:case 6:ta.current===null&&(t=!0);var R=Be;if(Be=0,Xt=null,fl(e,p,b,R),a&&sl){f=0;break e}break;default:R=Be,Be=0,Xt=null,fl(e,p,b,R)}}yp(),f=Ie;break}catch(H){Ld(e,H)}while(!0);return t&&e.shellSuspendCounter++,Ra=En=null,He=n,A.H=i,A.A=s,Se===null&&(Ze=null,Me=0,Yi()),f}function yp(){for(;Se!==null;)qd(Se)}function bp(e,t){var a=He;He|=2;var n=kd(),i=Yd();Ze!==e||Me!==t?(vs=null,gs=ge()+500,ul(e,t)):sl=$(e,t);e:do try{if(Be!==0&&Se!==null){t=Se;var s=Xt;t:switch(Be){case 1:Be=0,Xt=null,fl(e,t,s,1);break;case 2:case 9:if(Iu(s)){Be=0,Xt=null,Gd(t);break}t=function(){Be!==2&&Be!==9||Ze!==e||(Be=7),ba(e)},s.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Iu(s)?(Be=0,Xt=null,Gd(t)):(Be=0,Xt=null,fl(e,t,s,7));break;case 5:var f=null;switch(Se.tag){case 26:f=Se.memoizedState;case 5:case 27:var p=Se;if(!f||E0(f)){Be=0,Xt=null;var b=p.sibling;if(b!==null)Se=b;else{var R=p.return;R!==null?(Se=R,bs(R)):Se=null}break t}}Be=0,Xt=null,fl(e,t,s,5);break;case 6:Be=0,Xt=null,fl(e,t,s,6);break;case 8:Lo(),Ie=6;break e;default:throw Error(u(462))}}xp();break}catch(H){Ld(e,H)}while(!0);return Ra=En=null,A.H=n,A.A=i,He=a,Se!==null?0:(Ze=null,Me=0,Yi(),Ie)}function xp(){for(;Se!==null&&!_t();)qd(Se)}function qd(e){var t=md(e.alternate,e,ka);e.memoizedProps=e.pendingProps,t===null?bs(e):Se=t}function Gd(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=od(a,t,t.pendingProps,t.type,void 0,Me);break;case 11:t=od(a,t,t.pendingProps,t.type.render,t.ref,Me);break;case 5:eo(t);default:gd(a,t),t=Se=Gu(t,ka),t=md(a,t,ka)}e.memoizedProps=e.pendingProps,t===null?bs(e):Se=t}function fl(e,t,a,n){Ra=En=null,eo(t),al=null,Jl=0;var i=t.return;try{if(cp(e,i,t,a,Me)){Ie=1,us(e,Wt(a,e.current)),Se=null;return}}catch(s){if(i!==null)throw Se=i,s;Ie=1,us(e,Wt(a,e.current)),Se=null;return}t.flags&32768?(Oe||n===1?e=!0:sl||(Me&536870912)!==0?e=!1:(tn=e=!0,(n===2||n===9||n===3||n===6)&&(n=ta.current,n!==null&&n.tag===13&&(n.flags|=16384))),Vd(t,e)):bs(t)}function bs(e){var t=e;do{if((t.flags&32768)!==0){Vd(t,tn);return}e=t.return;var a=fp(t.alternate,t,ka);if(a!==null){Se=a;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Ie===0&&(Ie=5)}function Vd(e,t){do{var a=dp(e.alternate,e);if(a!==null){a.flags&=32767,Se=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=a}while(e!==null);Ie=6,Se=null}function Xd(e,t,a,n,i,s,f,p,b){e.cancelPendingCommit=null;do xs();while(Et!==0);if((He&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(s=t.lanes|t.childLanes,s|=Cr,_i(e,a,s,f,p,b),e===Ze&&(Se=Ze=null,Me=0),ol=t,ln=e,cl=a,Uo=s,Ho=i,Dd=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,jp(Kt,function(){return Jd(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=A.T,A.T=null,i=k.p,k.p=2,f=He,He|=4;try{hp(e,t,a)}finally{He=f,k.p=i,A.T=n}}Et=1,Qd(),Zd(),Kd()}}function Qd(){if(Et===1){Et=0;var e=ln,t=ol,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=A.T,A.T=null;var n=k.p;k.p=2;var i=He;He|=4;try{Md(t,e);var s=Io,f=Ou(e.containerInfo),p=s.focusedElem,b=s.selectionRange;if(f!==p&&p&&p.ownerDocument&&Ru(p.ownerDocument.documentElement,p)){if(b!==null&&jr(p)){var R=b.start,H=b.end;if(H===void 0&&(H=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(H,p.value.length);else{var L=p.ownerDocument||document,O=L&&L.defaultView||window;if(O.getSelection){var z=O.getSelection(),fe=p.textContent.length,oe=Math.min(b.start,fe),Ye=b.end===void 0?oe:Math.min(b.end,fe);!z.extend&&oe>Ye&&(f=Ye,Ye=oe,oe=f);var N=Au(p,oe),E=Au(p,Ye);if(N&&E&&(z.rangeCount!==1||z.anchorNode!==N.node||z.anchorOffset!==N.offset||z.focusNode!==E.node||z.focusOffset!==E.offset)){var _=L.createRange();_.setStart(N.node,N.offset),z.removeAllRanges(),oe>Ye?(z.addRange(_),z.extend(E.node,E.offset)):(_.setEnd(E.node,E.offset),z.addRange(_))}}}}for(L=[],z=p;z=z.parentNode;)z.nodeType===1&&L.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<L.length;p++){var B=L[p];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}Os=!!Wo,Io=Wo=null}finally{He=i,k.p=n,A.T=a}}e.current=t,Et=2}}function Zd(){if(Et===2){Et=0;var e=ln,t=ol,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=A.T,A.T=null;var n=k.p;k.p=2;var i=He;He|=4;try{Ed(e,t.alternate,t)}finally{He=i,k.p=n,A.T=a}}Et=3}}function Kd(){if(Et===4||Et===3){Et=0,Bt();var e=ln,t=ol,a=cl,n=Dd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,ol=ln=null,$d(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(nn=null),St(a),t=t.stateNode,et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=A.T,i=k.p,k.p=2,A.T=null;try{for(var s=e.onRecoverableError,f=0;f<n.length;f++){var p=n[f];s(p.value,{componentStack:p.stack})}}finally{A.T=t,k.p=i}}(cl&3)!==0&&xs(),ba(e),i=e.pendingLanes,(a&4194090)!==0&&(i&42)!==0?e===Bo?li++:(li=0,Bo=e):li=0,ii(0)}}function $d(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ll(t)))}function xs(e){return Qd(),Zd(),Kd(),Jd()}function Jd(){if(Et!==5)return!1;var e=ln,t=Uo;Uo=0;var a=St(cl),n=A.T,i=k.p;try{k.p=32>a?32:a,A.T=null,a=Ho,Ho=null;var s=ln,f=cl;if(Et=0,ol=ln=null,cl=0,(He&6)!==0)throw Error(u(331));var p=He;if(He|=4,Od(s.current),Cd(s,s.current,f,a),He=p,ii(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(Ne,s)}catch{}return!0}finally{k.p=i,A.T=n,$d(e,t)}}function Fd(e,t,a){t=Wt(a,t),t=po(e.stateNode,t,2),e=$a(e,t,2),e!==null&&(Nt(e,2),ba(e))}function Xe(e,t,a){if(e.tag===3)Fd(e,e,a);else for(;t!==null;){if(t.tag===3){Fd(t,e,a);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(nn===null||!nn.has(n))){e=Wt(a,e),a=ed(2),n=$a(t,a,2),n!==null&&(td(a,n,t,e),Nt(n,2),ba(n));break}}t=t.return}}function qo(e,t,a){var n=e.pingCache;if(n===null){n=e.pingCache=new gp;var i=new Set;n.set(t,i)}else i=n.get(t),i===void 0&&(i=new Set,n.set(t,i));i.has(a)||(Ro=!0,i.add(a),e=Sp.bind(null,e,t,a),t.then(e,e))}function Sp(e,t,a){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ze===e&&(Me&a)===a&&(Ie===4||Ie===3&&(Me&62914560)===Me&&300>ge()-Do?(He&2)===0&&ul(e,0):Oo|=a,rl===Me&&(rl=0)),ba(e)}function Wd(e,t){t===0&&(t=mt()),e=Zn(e,t),e!==null&&(Nt(e,t),ba(e))}function wp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Wd(e,a)}function Ep(e,t){var a=0;switch(e.tag){case 13:var n=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(u(314))}n!==null&&n.delete(t),Wd(e,a)}function jp(e,t){return Te(e,t)}var Ss=null,dl=null,Go=!1,ws=!1,Vo=!1,An=0;function ba(e){e!==dl&&e.next===null&&(dl===null?Ss=dl=e:dl=dl.next=e),ws=!0,Go||(Go=!0,Tp())}function ii(e,t){if(!Vo&&ws){Vo=!0;do for(var a=!1,n=Ss;n!==null;){if(e!==0){var i=n.pendingLanes;if(i===0)var s=0;else{var f=n.suspendedLanes,p=n.pingedLanes;s=(1<<31-Ae(42|e)+1)-1,s&=i&~(f&~p),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,t0(n,s))}else s=Me,s=ma(n,n===Ze?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(s&3)===0||$(n,s)||(a=!0,t0(n,s));n=n.next}while(a);Vo=!1}}function Np(){Id()}function Id(){ws=Go=!1;var e=0;An!==0&&(Dp()&&(e=An),An=0);for(var t=ge(),a=null,n=Ss;n!==null;){var i=n.next,s=Pd(n,t);s===0?(n.next=null,a===null?Ss=i:a.next=i,i===null&&(dl=a)):(a=n,(e!==0||(s&3)!==0)&&(ws=!0)),n=i}ii(e)}function Pd(e,t){for(var a=e.suspendedLanes,n=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var f=31-Ae(s),p=1<<f,b=i[f];b===-1?((p&a)===0||(p&n)!==0)&&(i[f]=ze(p,t)):b<=t&&(e.expiredLanes|=p),s&=~p}if(t=Ze,a=Me,a=ma(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Ue(n),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||$(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(n!==null&&Ue(n),St(a)){case 2:case 8:a=Ct;break;case 32:a=Kt;break;case 268435456:a=kt;break;default:a=Kt}return n=e0.bind(null,e),a=Te(a,n),e.callbackPriority=t,e.callbackNode=a,t}return n!==null&&n!==null&&Ue(n),e.callbackPriority=2,e.callbackNode=null,2}function e0(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xs()&&e.callbackNode!==a)return null;var n=Me;return n=ma(e,e===Ze?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Hd(e,n,t),Pd(e,ge()),e.callbackNode!=null&&e.callbackNode===a?e0.bind(null,e):null)}function t0(e,t){if(xs())return null;Hd(e,t,!0)}function Tp(){Hp(function(){(He&6)!==0?Te(Ge,Np):Id()})}function Xo(){return An===0&&(An=rt()),An}function a0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zi(""+e)}function n0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Mp(e,t,a,n,i){if(t==="submit"&&a&&a.stateNode===i){var s=a0((i[Qe]||null).action),f=n.submitter;f&&(t=(t=f[Qe]||null)?a0(t.formAction):f.getAttribute("formAction"),t!==null&&(s=t,f=null));var p=new Bi("action","action",null,n,i);e.push({event:p,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(An!==0){var b=f?n0(i,f):new FormData(i);co(a,{pending:!0,data:b,method:i.method,action:s},null,b)}}else typeof s=="function"&&(p.preventDefault(),b=f?n0(i,f):new FormData(i),co(a,{pending:!0,data:b,method:i.method,action:s},s,b))},currentTarget:i}]})}}for(var Qo=0;Qo<_r.length;Qo++){var Zo=_r[Qo],_p=Zo.toLowerCase(),Cp=Zo[0].toUpperCase()+Zo.slice(1);sa(_p,"on"+Cp)}sa(Uu,"onAnimationEnd"),sa(Hu,"onAnimationIteration"),sa(Bu,"onAnimationStart"),sa("dblclick","onDoubleClick"),sa("focusin","onFocus"),sa("focusout","onBlur"),sa(Zm,"onTransitionRun"),sa(Km,"onTransitionStart"),sa($m,"onTransitionCancel"),sa(Lu,"onTransitionEnd"),Hn("onMouseEnter",["mouseout","mouseover"]),Hn("onMouseLeave",["mouseout","mouseover"]),Hn("onPointerEnter",["pointerout","pointerover"]),Hn("onPointerLeave",["pointerout","pointerover"]),mn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),mn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),mn("onBeforeInput",["compositionend","keypress","textInput","paste"]),mn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),mn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var si="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ap=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(si));function l0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var n=e[a],i=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var f=n.length-1;0<=f;f--){var p=n[f],b=p.instance,R=p.currentTarget;if(p=p.listener,b!==s&&i.isPropagationStopped())break e;s=p,i.currentTarget=R;try{s(i)}catch(H){cs(H)}i.currentTarget=null,s=b}else for(f=0;f<n.length;f++){if(p=n[f],b=p.instance,R=p.currentTarget,p=p.listener,b!==s&&i.isPropagationStopped())break e;s=p,i.currentTarget=R;try{s(i)}catch(H){cs(H)}i.currentTarget=null,s=b}}}}function we(e,t){var a=t[On];a===void 0&&(a=t[On]=new Set);var n=e+"__bubble";a.has(n)||(i0(t,e,2,!1),a.add(n))}function Ko(e,t,a){var n=0;t&&(n|=4),i0(a,e,n,t)}var Es="_reactListening"+Math.random().toString(36).slice(2);function $o(e){if(!e[Es]){e[Es]=!0,Wc.forEach(function(a){a!=="selectionchange"&&(Ap.has(a)||Ko(a,!1,e),Ko(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Es]||(t[Es]=!0,Ko("selectionchange",!1,t))}}function i0(e,t,a,n){switch(C0(t)){case 2:var i=n2;break;case 8:i=l2;break;default:i=oc}a=i.bind(null,t,a,e),i=void 0,!pr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),n?i!==void 0?e.addEventListener(t,a,{capture:!0,passive:i}):e.addEventListener(t,a,!0):i!==void 0?e.addEventListener(t,a,{passive:i}):e.addEventListener(t,a,!1)}function Jo(e,t,a,n,i){var s=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var f=n.tag;if(f===3||f===4){var p=n.stateNode.containerInfo;if(p===i)break;if(f===4)for(f=n.return;f!==null;){var b=f.tag;if((b===3||b===4)&&f.stateNode.containerInfo===i)return;f=f.return}for(;p!==null;){if(f=zn(p),f===null)return;if(b=f.tag,b===5||b===6||b===26||b===27){n=s=f;continue e}p=p.parentNode}}n=n.return}fu(function(){var R=s,H=hr(a),L=[];e:{var O=ku.get(e);if(O!==void 0){var z=Bi,fe=e;switch(e){case"keypress":if(Ui(a)===0)break e;case"keydown":case"keyup":z=jm;break;case"focusin":fe="focus",z=br;break;case"focusout":fe="blur",z=br;break;case"beforeblur":case"afterblur":z=br;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=dm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=Mm;break;case Uu:case Hu:case Bu:z=pm;break;case Lu:z=Cm;break;case"scroll":case"scrollend":z=um;break;case"wheel":z=Rm;break;case"copy":case"cut":case"paste":z=vm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=gu;break;case"toggle":case"beforetoggle":z=zm}var oe=(t&4)!==0,Ye=!oe&&(e==="scroll"||e==="scrollend"),N=oe?O!==null?O+"Capture":null:O;oe=[];for(var E=R,_;E!==null;){var B=E;if(_=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||_===null||N===null||(B=Nl(E,N),B!=null&&oe.push(ri(E,B,_))),Ye)break;E=E.return}0<oe.length&&(O=new z(O,fe,null,a,H),L.push({event:O,listeners:oe}))}}if((t&7)===0){e:{if(O=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",O&&a!==dr&&(fe=a.relatedTarget||a.fromElement)&&(zn(fe)||fe[pt]))break e;if((z||O)&&(O=H.window===H?H:(O=H.ownerDocument)?O.defaultView||O.parentWindow:window,z?(fe=a.relatedTarget||a.toElement,z=R,fe=fe?zn(fe):null,fe!==null&&(Ye=y(fe),oe=fe.tag,fe!==Ye||oe!==5&&oe!==27&&oe!==6)&&(fe=null)):(z=null,fe=R),z!==fe)){if(oe=mu,B="onMouseLeave",N="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(oe=gu,B="onPointerLeave",N="onPointerEnter",E="pointer"),Ye=z==null?O:jl(z),_=fe==null?O:jl(fe),O=new oe(B,E+"leave",z,a,H),O.target=Ye,O.relatedTarget=_,B=null,zn(H)===R&&(oe=new oe(N,E+"enter",fe,a,H),oe.target=_,oe.relatedTarget=Ye,B=oe),Ye=B,z&&fe)t:{for(oe=z,N=fe,E=0,_=oe;_;_=hl(_))E++;for(_=0,B=N;B;B=hl(B))_++;for(;0<E-_;)oe=hl(oe),E--;for(;0<_-E;)N=hl(N),_--;for(;E--;){if(oe===N||N!==null&&oe===N.alternate)break t;oe=hl(oe),N=hl(N)}oe=null}else oe=null;z!==null&&s0(L,O,z,oe,!1),fe!==null&&Ye!==null&&s0(L,Ye,fe,oe,!0)}}e:{if(O=R?jl(R):window,z=O.nodeName&&O.nodeName.toLowerCase(),z==="select"||z==="input"&&O.type==="file")var ee=ju;else if(wu(O))if(Nu)ee=Vm;else{ee=qm;var be=Ym}else z=O.nodeName,!z||z.toLowerCase()!=="input"||O.type!=="checkbox"&&O.type!=="radio"?R&&fr(R.elementType)&&(ee=ju):ee=Gm;if(ee&&(ee=ee(e,R))){Eu(L,ee,a,H);break e}be&&be(e,O,R),e==="focusout"&&R&&O.type==="number"&&R.memoizedProps.value!=null&&ur(O,"number",O.value)}switch(be=R?jl(R):window,e){case"focusin":(wu(be)||be.contentEditable==="true")&&(Vn=be,Nr=R,zl=null);break;case"focusout":zl=Nr=Vn=null;break;case"mousedown":Tr=!0;break;case"contextmenu":case"mouseup":case"dragend":Tr=!1,zu(L,a,H);break;case"selectionchange":if(Qm)break;case"keydown":case"keyup":zu(L,a,H)}var ie;if(Sr)e:{switch(e){case"compositionstart":var ce="onCompositionStart";break e;case"compositionend":ce="onCompositionEnd";break e;case"compositionupdate":ce="onCompositionUpdate";break e}ce=void 0}else Gn?xu(e,a)&&(ce="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ce="onCompositionStart");ce&&(vu&&a.locale!=="ko"&&(Gn||ce!=="onCompositionStart"?ce==="onCompositionEnd"&&Gn&&(ie=du()):(Xa=H,gr="value"in Xa?Xa.value:Xa.textContent,Gn=!0)),be=js(R,ce),0<be.length&&(ce=new pu(ce,e,null,a,H),L.push({event:ce,listeners:be}),ie?ce.data=ie:(ie=Su(a),ie!==null&&(ce.data=ie)))),(ie=Um?Hm(e,a):Bm(e,a))&&(ce=js(R,"onBeforeInput"),0<ce.length&&(be=new pu("onBeforeInput","beforeinput",null,a,H),L.push({event:be,listeners:ce}),be.data=ie)),Mp(L,e,R,a,H)}l0(L,t)})}function ri(e,t,a){return{instance:e,listener:t,currentTarget:a}}function js(e,t){for(var a=t+"Capture",n=[];e!==null;){var i=e,s=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||s===null||(i=Nl(e,a),i!=null&&n.unshift(ri(e,i,s)),i=Nl(e,t),i!=null&&n.push(ri(e,i,s))),e.tag===3)return n;e=e.return}return[]}function hl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function s0(e,t,a,n,i){for(var s=t._reactName,f=[];a!==null&&a!==n;){var p=a,b=p.alternate,R=p.stateNode;if(p=p.tag,b!==null&&b===n)break;p!==5&&p!==26&&p!==27||R===null||(b=R,i?(R=Nl(a,s),R!=null&&f.unshift(ri(a,R,b))):i||(R=Nl(a,s),R!=null&&f.push(ri(a,R,b)))),a=a.return}f.length!==0&&e.push({event:t,listeners:f})}var Rp=/\r\n?/g,Op=/\u0000|\uFFFD/g;function r0(e){return(typeof e=="string"?e:""+e).replace(Rp,`
9
+ `).replace(Op,"")}function o0(e,t){return t=r0(t),r0(e)===t}function Ns(){}function ke(e,t,a,n,i,s){switch(a){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||kn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&kn(e,""+n);break;case"className":Ai(e,"class",n);break;case"tabIndex":Ai(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Ai(e,a,n);break;case"style":cu(e,n,s);break;case"data":if(t!=="object"){Ai(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=zi(""+n),e.setAttribute(a,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(a==="formAction"?(t!=="input"&&ke(e,t,"name",i.name,i,null),ke(e,t,"formEncType",i.formEncType,i,null),ke(e,t,"formMethod",i.formMethod,i,null),ke(e,t,"formTarget",i.formTarget,i,null)):(ke(e,t,"encType",i.encType,i,null),ke(e,t,"method",i.method,i,null),ke(e,t,"target",i.target,i,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(a);break}n=zi(""+n),e.setAttribute(a,n);break;case"onClick":n!=null&&(e.onclick=Ns);break;case"onScroll":n!=null&&we("scroll",e);break;case"onScrollEnd":n!=null&&we("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(u(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}a=zi(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""+n):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":n===!0?e.setAttribute(a,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(a,n):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(a,n):e.removeAttribute(a);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case"popover":we("beforetoggle",e),we("toggle",e),Ci(e,"popover",n);break;case"xlinkActuate":Ta(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Ta(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Ta(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Ta(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Ta(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Ta(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Ta(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Ta(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Ta(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":Ci(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=om.get(a)||a,Ci(e,a,n))}}function Fo(e,t,a,n,i,s){switch(a){case"style":cu(e,n,s);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(u(61));if(a=n.__html,a!=null){if(i.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof n=="string"?kn(e,n):(typeof n=="number"||typeof n=="bigint")&&kn(e,""+n);break;case"onScroll":n!=null&&we("scroll",e);break;case"onScrollEnd":n!=null&&we("scrollend",e);break;case"onClick":n!=null&&(e.onclick=Ns);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ic.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),t=a.slice(2,i?a.length-7:void 0),s=e[Qe]||null,s=s!=null?s[a]:null,typeof s=="function"&&e.removeEventListener(t,s,i),typeof n=="function")){typeof s!="function"&&s!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,n,i);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,""):Ci(e,a,n)}}}function jt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":we("error",e),we("load",e);var n=!1,i=!1,s;for(s in a)if(a.hasOwnProperty(s)){var f=a[s];if(f!=null)switch(s){case"src":n=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ke(e,t,s,f,a,null)}}i&&ke(e,t,"srcSet",a.srcSet,a,null),n&&ke(e,t,"src",a.src,a,null);return;case"input":we("invalid",e);var p=s=f=i=null,b=null,R=null;for(n in a)if(a.hasOwnProperty(n)){var H=a[n];if(H!=null)switch(n){case"name":i=H;break;case"type":f=H;break;case"checked":b=H;break;case"defaultChecked":R=H;break;case"value":s=H;break;case"defaultValue":p=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(u(137,t));break;default:ke(e,t,n,H,a,null)}}iu(e,s,p,b,R,f,i,!1),Ri(e);return;case"select":we("invalid",e),n=f=s=null;for(i in a)if(a.hasOwnProperty(i)&&(p=a[i],p!=null))switch(i){case"value":s=p;break;case"defaultValue":f=p;break;case"multiple":n=p;default:ke(e,t,i,p,a,null)}t=s,a=f,e.multiple=!!n,t!=null?Ln(e,!!n,t,!1):a!=null&&Ln(e,!!n,a,!0);return;case"textarea":we("invalid",e),s=i=n=null;for(f in a)if(a.hasOwnProperty(f)&&(p=a[f],p!=null))switch(f){case"value":n=p;break;case"defaultValue":i=p;break;case"children":s=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(u(91));break;default:ke(e,t,f,p,a,null)}ru(e,n,i,s),Ri(e);return;case"option":for(b in a)a.hasOwnProperty(b)&&(n=a[b],n!=null)&&(b==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":ke(e,t,b,n,a,null));return;case"dialog":we("beforetoggle",e),we("toggle",e),we("cancel",e),we("close",e);break;case"iframe":case"object":we("load",e);break;case"video":case"audio":for(n=0;n<si.length;n++)we(si[n],e);break;case"image":we("error",e),we("load",e);break;case"details":we("toggle",e);break;case"embed":case"source":case"link":we("error",e),we("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in a)if(a.hasOwnProperty(R)&&(n=a[R],n!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:ke(e,t,R,n,a,null)}return;default:if(fr(t)){for(H in a)a.hasOwnProperty(H)&&(n=a[H],n!==void 0&&Fo(e,t,H,n,a,void 0));return}}for(p in a)a.hasOwnProperty(p)&&(n=a[p],n!=null&&ke(e,t,p,n,a,null))}function zp(e,t,a,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,s=null,f=null,p=null,b=null,R=null,H=null;for(z in a){var L=a[z];if(a.hasOwnProperty(z)&&L!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":b=L;default:n.hasOwnProperty(z)||ke(e,t,z,null,n,L)}}for(var O in n){var z=n[O];if(L=a[O],n.hasOwnProperty(O)&&(z!=null||L!=null))switch(O){case"type":s=z;break;case"name":i=z;break;case"checked":R=z;break;case"defaultChecked":H=z;break;case"value":f=z;break;case"defaultValue":p=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(u(137,t));break;default:z!==L&&ke(e,t,O,z,n,L)}}cr(e,f,p,b,R,H,s,i);return;case"select":z=f=p=O=null;for(s in a)if(b=a[s],a.hasOwnProperty(s)&&b!=null)switch(s){case"value":break;case"multiple":z=b;default:n.hasOwnProperty(s)||ke(e,t,s,null,n,b)}for(i in n)if(s=n[i],b=a[i],n.hasOwnProperty(i)&&(s!=null||b!=null))switch(i){case"value":O=s;break;case"defaultValue":p=s;break;case"multiple":f=s;default:s!==b&&ke(e,t,i,s,n,b)}t=p,a=f,n=z,O!=null?Ln(e,!!a,O,!1):!!n!=!!a&&(t!=null?Ln(e,!!a,t,!0):Ln(e,!!a,a?[]:"",!1));return;case"textarea":z=O=null;for(p in a)if(i=a[p],a.hasOwnProperty(p)&&i!=null&&!n.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:ke(e,t,p,null,n,i)}for(f in n)if(i=n[f],s=a[f],n.hasOwnProperty(f)&&(i!=null||s!=null))switch(f){case"value":O=i;break;case"defaultValue":z=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(u(91));break;default:i!==s&&ke(e,t,f,i,n,s)}su(e,O,z);return;case"option":for(var fe in a)O=a[fe],a.hasOwnProperty(fe)&&O!=null&&!n.hasOwnProperty(fe)&&(fe==="selected"?e.selected=!1:ke(e,t,fe,null,n,O));for(b in n)O=n[b],z=a[b],n.hasOwnProperty(b)&&O!==z&&(O!=null||z!=null)&&(b==="selected"?e.selected=O&&typeof O!="function"&&typeof O!="symbol":ke(e,t,b,O,n,z));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var oe in a)O=a[oe],a.hasOwnProperty(oe)&&O!=null&&!n.hasOwnProperty(oe)&&ke(e,t,oe,null,n,O);for(R in n)if(O=n[R],z=a[R],n.hasOwnProperty(R)&&O!==z&&(O!=null||z!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:ke(e,t,R,O,n,z)}return;default:if(fr(t)){for(var Ye in a)O=a[Ye],a.hasOwnProperty(Ye)&&O!==void 0&&!n.hasOwnProperty(Ye)&&Fo(e,t,Ye,void 0,n,O);for(H in n)O=n[H],z=a[H],!n.hasOwnProperty(H)||O===z||O===void 0&&z===void 0||Fo(e,t,H,O,n,z);return}}for(var N in a)O=a[N],a.hasOwnProperty(N)&&O!=null&&!n.hasOwnProperty(N)&&ke(e,t,N,null,n,O);for(L in n)O=n[L],z=a[L],!n.hasOwnProperty(L)||O===z||O==null&&z==null||ke(e,t,L,O,n,z)}var Wo=null,Io=null;function Ts(e){return e.nodeType===9?e:e.ownerDocument}function c0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function u0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Po(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ec=null;function Dp(){var e=window.event;return e&&e.type==="popstate"?e===ec?!1:(ec=e,!0):(ec=null,!1)}var f0=typeof setTimeout=="function"?setTimeout:void 0,Up=typeof clearTimeout=="function"?clearTimeout:void 0,d0=typeof Promise=="function"?Promise:void 0,Hp=typeof queueMicrotask=="function"?queueMicrotask:typeof d0<"u"?function(e){return d0.resolve(null).then(e).catch(Bp)}:f0;function Bp(e){setTimeout(function(){throw e})}function rn(e){return e==="head"}function h0(e,t){var a=t,n=0,i=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(0<n&&8>n){a=n;var f=e.ownerDocument;if(a&1&&oi(f.documentElement),a&2&&oi(f.body),a&4)for(a=f.head,oi(a),f=a.firstChild;f;){var p=f.nextSibling,b=f.nodeName;f[El]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=p}}if(i===0){e.removeChild(s),gi(t);return}i--}else a==="$"||a==="$?"||a==="$!"?i++:n=a.charCodeAt(0)-48;else n=0;a=s}while(a);gi(t)}function tc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":tc(a),ir(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Lp(e,t,a,n){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[El])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=oa(e.nextSibling),e===null)break}return null}function kp(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=oa(e.nextSibling),e===null))return null;return e}function ac(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function Yp(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var n=function(){t(),a.removeEventListener("DOMContentLoaded",n)};a.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function oa(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var nc=null;function m0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"){if(t===0)return e;t--}else a==="/$"&&t++}e=e.previousSibling}return null}function p0(e,t,a){switch(t=Ts(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function oi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ir(e)}var na=new Map,g0=new Set;function Ms(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ya=k.d;k.d={f:qp,r:Gp,D:Vp,C:Xp,L:Qp,m:Zp,X:$p,S:Kp,M:Jp};function qp(){var e=Ya.f(),t=ys();return e||t}function Gp(e){var t=Dn(e);t!==null&&t.tag===5&&t.type==="form"?Hf(t):Ya.r(e)}var ml=typeof document>"u"?null:document;function v0(e,t,a){var n=ml;if(n&&typeof t=="string"&&t){var i=Ft(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),g0.has(i)||(g0.add(i),e={rel:e,crossOrigin:a,href:t},n.querySelector(i)===null&&(t=n.createElement("link"),jt(t,"link",e),gt(t),n.head.appendChild(t)))}}function Vp(e){Ya.D(e),v0("dns-prefetch",e,null)}function Xp(e,t){Ya.C(e,t),v0("preconnect",e,t)}function Qp(e,t,a){Ya.L(e,t,a);var n=ml;if(n&&e&&t){var i='link[rel="preload"][as="'+Ft(t)+'"]';t==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Ft(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Ft(a.imageSizes)+'"]')):i+='[href="'+Ft(e)+'"]';var s=i;switch(t){case"style":s=pl(e);break;case"script":s=gl(e)}na.has(s)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),na.set(s,e),n.querySelector(i)!==null||t==="style"&&n.querySelector(ci(s))||t==="script"&&n.querySelector(ui(s))||(t=n.createElement("link"),jt(t,"link",e),gt(t),n.head.appendChild(t)))}}function Zp(e,t){Ya.m(e,t);var a=ml;if(a&&e){var n=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Ft(n)+'"][href="'+Ft(e)+'"]',s=i;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=gl(e)}if(!na.has(s)&&(e=v({rel:"modulepreload",href:e},t),na.set(s,e),a.querySelector(i)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ui(s)))return}n=a.createElement("link"),jt(n,"link",e),gt(n),a.head.appendChild(n)}}}function Kp(e,t,a){Ya.S(e,t,a);var n=ml;if(n&&e){var i=Un(n).hoistableStyles,s=pl(e);t=t||"default";var f=i.get(s);if(!f){var p={loading:0,preload:null};if(f=n.querySelector(ci(s)))p.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=na.get(s))&&lc(e,a);var b=f=n.createElement("link");gt(b),jt(b,"link",e),b._p=new Promise(function(R,H){b.onload=R,b.onerror=H}),b.addEventListener("load",function(){p.loading|=1}),b.addEventListener("error",function(){p.loading|=2}),p.loading|=4,_s(f,t,n)}f={type:"stylesheet",instance:f,count:1,state:p},i.set(s,f)}}}function $p(e,t){Ya.X(e,t);var a=ml;if(a&&e){var n=Un(a).hoistableScripts,i=gl(e),s=n.get(i);s||(s=a.querySelector(ui(i)),s||(e=v({src:e,async:!0},t),(t=na.get(i))&&ic(e,t),s=a.createElement("script"),gt(s),jt(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(i,s))}}function Jp(e,t){Ya.M(e,t);var a=ml;if(a&&e){var n=Un(a).hoistableScripts,i=gl(e),s=n.get(i);s||(s=a.querySelector(ui(i)),s||(e=v({src:e,async:!0,type:"module"},t),(t=na.get(i))&&ic(e,t),s=a.createElement("script"),gt(s),jt(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(i,s))}}function y0(e,t,a,n){var i=(i=te.current)?Ms(i):null;if(!i)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=pl(a.href),a=Un(i).hoistableStyles,n=a.get(t),n||(n={type:"style",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=pl(a.href);var s=Un(i).hoistableStyles,f=s.get(e);if(f||(i=i.ownerDocument||i,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,f),(s=i.querySelector(ci(e)))&&!s._p&&(f.instance=s,f.state.loading=5),na.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},na.set(e,a),s||Fp(i,e,a,f.state))),t&&n===null)throw Error(u(528,""));return f}if(t&&n!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=gl(a),a=Un(i).hoistableScripts,n=a.get(t),n||(n={type:"script",instance:null,count:0,state:null},a.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function pl(e){return'href="'+Ft(e)+'"'}function ci(e){return'link[rel="stylesheet"]['+e+"]"}function b0(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Fp(e,t,a,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),jt(t,"link",a),gt(t),e.head.appendChild(t))}function gl(e){return'[src="'+Ft(e)+'"]'}function ui(e){return"script[async]"+e}function x0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Ft(a.href)+'"]');if(n)return t.instance=n,gt(n),n;var i=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),gt(n),jt(n,"style",i),_s(n,a.precedence,e),t.instance=n;case"stylesheet":i=pl(a.href);var s=e.querySelector(ci(i));if(s)return t.state.loading|=4,t.instance=s,gt(s),s;n=b0(a),(i=na.get(i))&&lc(n,i),s=(e.ownerDocument||e).createElement("link"),gt(s);var f=s;return f._p=new Promise(function(p,b){f.onload=p,f.onerror=b}),jt(s,"link",n),t.state.loading|=4,_s(s,a.precedence,e),t.instance=s;case"script":return s=gl(a.src),(i=e.querySelector(ui(s)))?(t.instance=i,gt(i),i):(n=a,(i=na.get(s))&&(n=v({},a),ic(n,i)),e=e.ownerDocument||e,i=e.createElement("script"),gt(i),jt(i,"link",n),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,_s(n,a.precedence,e));return t.instance}function _s(e,t,a){for(var n=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=n.length?n[n.length-1]:null,s=i,f=0;f<n.length;f++){var p=n[f];if(p.dataset.precedence===t)s=p;else if(s!==i)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function lc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ic(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Cs=null;function S0(e,t,a){if(Cs===null){var n=new Map,i=Cs=new Map;i.set(a,n)}else i=Cs,n=i.get(a),n||(n=new Map,i.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var s=a[i];if(!(s[El]||s[nt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var f=s.getAttribute(t)||"";f=e+f;var p=n.get(f);p?p.push(s):n.set(f,[s])}}return n}function w0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Wp(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function E0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var fi=null;function Ip(){}function Pp(e,t,a){if(fi===null)throw Error(u(475));var n=fi;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var i=pl(a.href),s=e.querySelector(ci(i));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(n.count++,n=As.bind(n),e.then(n,n)),t.state.loading|=4,t.instance=s,gt(s);return}s=e.ownerDocument||e,a=b0(a),(i=na.get(i))&&lc(a,i),s=s.createElement("link"),gt(s);var f=s;f._p=new Promise(function(p,b){f.onload=p,f.onerror=b}),jt(s,"link",a),t.instance=s}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(n.count++,t=As.bind(n),e.addEventListener("load",t),e.addEventListener("error",t))}}function e2(){if(fi===null)throw Error(u(475));var e=fi;return e.stylesheets&&e.count===0&&sc(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&sc(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function As(){if(this.count--,this.count===0){if(this.stylesheets)sc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rs=null;function sc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rs=new Map,t.forEach(t2,e),Rs=null,As.call(e))}function t2(e,t){if(!(t.state.loading&4)){var a=Rs.get(e);if(a)var n=a.get(null);else{a=new Map,Rs.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<i.length;s++){var f=i[s];(f.nodeName==="LINK"||f.getAttribute("media")!=="not all")&&(a.set(f.dataset.precedence,f),n=f)}n&&a.set(null,n)}i=t.instance,f=i.getAttribute("data-precedence"),s=a.get(f)||n,s===n&&a.set(null,i),a.set(f,i),this.count++,n=As.bind(this),i.addEventListener("load",n),i.addEventListener("error",n),s?s.parentNode.insertBefore(i,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var di={$$typeof:q,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function a2(e,t,a,n,i,s,f,p){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=xt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xt(0),this.hiddenUpdates=xt(null),this.identifierPrefix=n,this.onUncaughtError=i,this.onCaughtError=s,this.onRecoverableError=f,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=p,this.incompleteTransitions=new Map}function j0(e,t,a,n,i,s,f,p,b,R,H,L){return e=new a2(e,t,a,f,p,b,R,L),t=1,s===!0&&(t|=24),s=qt(3,null,null,t),e.current=s,s.stateNode=e,t=Yr(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:n,isDehydrated:a,cache:t},Xr(s),e}function N0(e){return e?(e=Kn,e):Kn}function T0(e,t,a,n,i,s){i=N0(i),n.context===null?n.context=i:n.pendingContext=i,n=Ka(t),n.payload={element:a},s=s===void 0?null:s,s!==null&&(n.callback=s),a=$a(e,n,t),a!==null&&(Zt(a,e,t),Gl(a,e,t))}function M0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function rc(e,t){M0(e,t),(e=e.alternate)&&M0(e,t)}function _0(e){if(e.tag===13){var t=Zn(e,67108864);t!==null&&Zt(t,e,67108864),rc(e,67108864)}}var Os=!0;function n2(e,t,a,n){var i=A.T;A.T=null;var s=k.p;try{k.p=2,oc(e,t,a,n)}finally{k.p=s,A.T=i}}function l2(e,t,a,n){var i=A.T;A.T=null;var s=k.p;try{k.p=8,oc(e,t,a,n)}finally{k.p=s,A.T=i}}function oc(e,t,a,n){if(Os){var i=cc(n);if(i===null)Jo(e,t,n,zs,a),A0(e,n);else if(s2(i,e,t,a,n))n.stopPropagation();else if(A0(e,n),t&4&&-1<i2.indexOf(e)){for(;i!==null;){var s=Dn(i);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var f=$t(s.pendingLanes);if(f!==0){var p=s;for(p.pendingLanes|=2,p.entangledLanes|=2;f;){var b=1<<31-Ae(f);p.entanglements[1]|=b,f&=~b}ba(s),(He&6)===0&&(gs=ge()+500,ii(0))}}break;case 13:p=Zn(s,2),p!==null&&Zt(p,s,2),ys(),rc(s,2)}if(s=cc(n),s===null&&Jo(e,t,n,zs,a),s===i)break;i=s}i!==null&&n.stopPropagation()}else Jo(e,t,n,null,a)}}function cc(e){return e=hr(e),uc(e)}var zs=null;function uc(e){if(zs=null,e=zn(e),e!==null){var t=y(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=w(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zs=e,null}function C0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Lt()){case Ge:return 2;case Ct:return 8;case Kt:case $e:return 32;case kt:return 268435456;default:return 32}default:return 32}}var fc=!1,on=null,cn=null,un=null,hi=new Map,mi=new Map,fn=[],i2="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function A0(e,t){switch(e){case"focusin":case"focusout":on=null;break;case"dragenter":case"dragleave":cn=null;break;case"mouseover":case"mouseout":un=null;break;case"pointerover":case"pointerout":hi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":mi.delete(t.pointerId)}}function pi(e,t,a,n,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:a,eventSystemFlags:n,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Dn(t),t!==null&&_0(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function s2(e,t,a,n,i){switch(t){case"focusin":return on=pi(on,e,t,a,n,i),!0;case"dragenter":return cn=pi(cn,e,t,a,n,i),!0;case"mouseover":return un=pi(un,e,t,a,n,i),!0;case"pointerover":var s=i.pointerId;return hi.set(s,pi(hi.get(s)||null,e,t,a,n,i)),!0;case"gotpointercapture":return s=i.pointerId,mi.set(s,pi(mi.get(s)||null,e,t,a,n,i)),!0}return!1}function R0(e){var t=zn(e.target);if(t!==null){var a=y(t);if(a!==null){if(t=a.tag,t===13){if(t=w(a),t!==null){e.blockedOn=t,ft(e.priority,function(){if(a.tag===13){var n=Qt();n=ot(n);var i=Zn(a,n);i!==null&&Zt(i,a,n),rc(a,n)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ds(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=cc(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);dr=n,a.target.dispatchEvent(n),dr=null}else return t=Dn(a),t!==null&&_0(t),e.blockedOn=a,!1;t.shift()}return!0}function O0(e,t,a){Ds(e)&&a.delete(t)}function r2(){fc=!1,on!==null&&Ds(on)&&(on=null),cn!==null&&Ds(cn)&&(cn=null),un!==null&&Ds(un)&&(un=null),hi.forEach(O0),mi.forEach(O0)}function Us(e,t){e.blockedOn===t&&(e.blockedOn=null,fc||(fc=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,r2)))}var Hs=null;function z0(e){Hs!==e&&(Hs=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){Hs===e&&(Hs=null);for(var t=0;t<e.length;t+=3){var a=e[t],n=e[t+1],i=e[t+2];if(typeof n!="function"){if(uc(n||a)===null)continue;break}var s=Dn(a);s!==null&&(e.splice(t,3),t-=3,co(s,{pending:!0,data:i,method:a.method,action:n},n,i))}}))}function gi(e){function t(b){return Us(b,e)}on!==null&&Us(on,e),cn!==null&&Us(cn,e),un!==null&&Us(un,e),hi.forEach(t),mi.forEach(t);for(var a=0;a<fn.length;a++){var n=fn[a];n.blockedOn===e&&(n.blockedOn=null)}for(;0<fn.length&&(a=fn[0],a.blockedOn===null);)R0(a),a.blockedOn===null&&fn.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n<a.length;n+=3){var i=a[n],s=a[n+1],f=i[Qe]||null;if(typeof s=="function")f||z0(a);else if(f){var p=null;if(s&&s.hasAttribute("formAction")){if(i=s,f=s[Qe]||null)p=f.formAction;else if(uc(i)!==null)continue}else p=f.action;typeof p=="function"?a[n+1]=p:(a.splice(n,3),n-=3),z0(a)}}}function dc(e){this._internalRoot=e}Bs.prototype.render=dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,n=Qt();T0(a,n,e,t,null,null)},Bs.prototype.unmount=dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;T0(e.current,2,null,e,null,null),ys(),t[pt]=null}};function Bs(e){this._internalRoot=e}Bs.prototype.unstable_scheduleHydration=function(e){if(e){var t=hn();e={blockedOn:null,target:e,priority:t};for(var a=0;a<fn.length&&t!==0&&t<fn[a].priority;a++);fn.splice(a,0,e),a===0&&R0(e)}};var D0=r.version;if(D0!=="19.1.0")throw Error(u(527,D0,"19.1.0"));k.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=m(t),e=e!==null?d(e):null,e=e===null?null:e.stateNode,e};var o2={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ls.isDisabled&&Ls.supportsFiber)try{Ne=Ls.inject(o2),et=Ls}catch{}}return yi.createRoot=function(e,t){if(!g(e))throw Error(u(299));var a=!1,n="",i=Ff,s=Wf,f=If,p=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(f=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(p=t.unstable_transitionCallbacks)),t=j0(e,1,!1,null,null,a,n,i,s,f,p,null),e[pt]=t.current,$o(e),new dc(t)},yi.hydrateRoot=function(e,t,a){if(!g(e))throw Error(u(299));var n=!1,i="",s=Ff,f=Wf,p=If,b=null,R=null;return a!=null&&(a.unstable_strictMode===!0&&(n=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(s=a.onUncaughtError),a.onCaughtError!==void 0&&(f=a.onCaughtError),a.onRecoverableError!==void 0&&(p=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(b=a.unstable_transitionCallbacks),a.formState!==void 0&&(R=a.formState)),t=j0(e,1,!0,t,a??null,n,i,s,f,p,b,R),t.context=N0(null),a=t.current,n=Qt(),n=ot(n),i=Ka(n),i.callback=null,$a(a,i,n),a=n,t.current.lanes=a,Nt(t,a),ba(t),e[pt]=t.current,$o(e),new Bs(t)},yi.version="19.1.0",yi}var X0;function v2(){if(X0)return pc.exports;X0=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),pc.exports=g2(),pc.exports}var y2=v2();const qh=({children:l,position:r="fixed"})=>o.jsx("div",{className:`sw-studio bg-background text-foreground ${r} inset-0 flex flex-col font-sans text-base antialiased`,children:l}),Cc=({icon:l,title:r,description:c,actions:u,tone:g="muted",size:y="default"})=>o.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-12 text-center",children:[o.jsx("span",{className:`flex flex-none items-center justify-center rounded-sm ${y==="lg"?"size-14 [&>svg]:size-6":"size-10 [&>svg]:size-4.5"} ${g==="destructive"?"bg-destructive/16 text-destructive-foreground":"bg-muted [&>svg]:icon-tertiary"}`,children:l}),o.jsxs("div",{className:"flex max-w-md flex-col gap-0.5",children:[o.jsx("h2",{className:`m-0 font-medium ${y==="lg"?"text-lg":"text-base"}`,children:r}),c!==void 0&&o.jsx("p",{className:"m-0 text-sm text-fg-secondary",children:c})]}),u!==void 0&&o.jsx("div",{className:"flex flex-wrap justify-center gap-2",children:u})]}),De=({className:l,children:r})=>o.jsx("svg",{className:l?`sw-icon ${l}`:"sw-icon",viewBox:"0 0 24 24","aria-hidden":"true",children:r}),Gh=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}),o.jsx("path",{d:"M21 3v5h-5"})]}),xl=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"M15 3h6v6"}),o.jsx("path",{d:"M10 14 21 3"}),o.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"})]}),b2=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"M12 15V3"}),o.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),o.jsx("path",{d:"m7 10 5 5 5-5"})]}),Ps=()=>o.jsx("svg",{className:"sw-spinner",viewBox:"0 0 37 37","aria-hidden":"true",children:[0,1,2,3,4,5,6,7].map(l=>o.jsx("rect",{x:"15.975",y:"0.99",width:"5.05",height:"12.02",rx:"2.525",transform:`rotate(${l*45} 18.5 18.5)`,style:{animationDelay:`${(l*.1-.8).toFixed(1)}s`}},l))}),x2=l=>o.jsxs(De,{...l,children:[o.jsx("circle",{cx:"12",cy:"12",r:"4"}),o.jsx("path",{d:"M12 2v2M12 20v2m-7.07-17.07 1.41 1.41m11.32 11.32 1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"})]}),S2=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"})}),w2=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"M10 5H3M12 19H3M14 3v4M16 17v4M21 12h-9M21 19h-5M21 5h-7M8 10v4M8 12H3"})}),Ni=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"M18 6 6 18M6 6l12 12"})}),Vh=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"m6 9 6 6 6-6"})}),Xh=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"m7 15 5 5 5-5"}),o.jsx("path",{d:"m7 9 5-5 5 5"})]}),Bc=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"M20 6 9 17l-5-5"})}),Qh=l=>o.jsxs(De,{...l,children:[o.jsx("rect",{x:"8",y:"8",width:"14",height:"14",rx:"2"}),o.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]}),E2=l=>o.jsxs(De,{...l,children:[o.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),o.jsx("path",{d:"M12 3v18"})]}),Vs=l=>o.jsxs(De,{...l,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m9 12 2 2 4-4"})]}),Sa=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}),o.jsx("path",{d:"M12 9v4"}),o.jsx("path",{d:"M12 17h.01"})]}),Lc=l=>o.jsxs(De,{...l,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"M12 16v-4"}),o.jsx("path",{d:"M12 8h.01"})]}),ks=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"})}),xi=l=>o.jsxs(De,{...l,children:[o.jsx("circle",{cx:"8",cy:"21",r:"1"}),o.jsx("circle",{cx:"19",cy:"21",r:"1"}),o.jsx("path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12"})]}),j2=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"M10.268 21a2 2 0 0 0 3.464 0"}),o.jsx("path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326"})]}),N2=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"})}),T2=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}),o.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),M2=l=>o.jsxs(De,{...l,children:[o.jsx("rect",{x:"4",y:"2",width:"10",height:"16",rx:"2"}),o.jsx("path",{d:"M17 12a5 5 0 0 1-5 9H9"}),o.jsx("path",{d:"m11 19-2 2 2 2"})]}),_2=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}),o.jsx("path",{d:"m15 5 4 4"})]}),C2=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"M5 12h14"})}),A2=l=>o.jsx(De,{...l,children:o.jsx("path",{d:"M5 12h14M12 5v14"})}),$s=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"m21 21-4.34-4.34"}),o.jsx("circle",{cx:"11",cy:"11",r:"8"})]}),R2=l=>o.jsxs(De,{...l,children:[o.jsx("rect",{x:"3",y:"3",width:"5",height:"5",rx:"1"}),o.jsx("rect",{x:"16",y:"3",width:"5",height:"5",rx:"1"}),o.jsx("rect",{x:"3",y:"16",width:"5",height:"5",rx:"1"}),o.jsx("path",{d:"M21 16h-3a2 2 0 0 0-2 2v3M21 21v.01M12 7v3a2 2 0 0 1-2 2H7M3 12h.01M12 3h.01M12 16v.01M16 12h1M21 12v.01M12 21v-1"})]}),O2=l=>o.jsxs(De,{...l,children:[o.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),o.jsx("path",{d:"M10 4v4M2 8h20M6 4v4"})]}),z2=l=>o.jsxs(De,{...l,children:[o.jsx("circle",{cx:"12",cy:"12",r:"10"}),o.jsx("path",{d:"m16.24 7.76-2.12 6.36-6.36 2.12 2.12-6.36z"})]}),D2=l=>o.jsxs(De,{...l,children:[o.jsx("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2"}),o.jsx("path",{d:"M12 18h.01"})]}),kc=({className:l,children:r})=>o.jsx("svg",{className:l?`sw-icon sw-icon--brand ${l}`:"sw-icon sw-icon--brand",viewBox:"0 0 24 24","aria-hidden":"true",children:r}),U2=l=>o.jsx(kc,{...l,children:o.jsx("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"})}),H2=l=>o.jsx(kc,{...l,children:o.jsx("path",{d:"M22.018 13.298l-3.919 2.218-3.515-3.493 3.543-3.521 3.891 2.202a1.49 1.49 0 0 1 0 2.594zM1.337.924a1.486 1.486 0 0 0-.112.568v21.017c0 .217.045.419.124.6l11.155-11.087L1.337.924zm12.207 10.065l3.258-3.238L3.45.195a1.466 1.466 0 0 0-.946-.179l11.04 10.973zm0 2.067l-11 10.933c.298.036.612-.016.906-.183l13.324-7.54-3.23-3.21z"})}),B2=l=>o.jsx(kc,{...l,children:o.jsx("path",{d:"M13.976 9.15c-2.172-.806-3.356-1.426-3.356-2.409 0-.831.683-1.305 1.901-1.305 2.227 0 4.515.858 6.09 1.631l.89-5.494C18.252.975 15.697 0 12.165 0 9.667 0 7.589.654 6.104 1.872 4.56 3.147 3.757 4.992 3.757 7.218c0 4.039 2.467 5.76 6.476 7.219 2.585.92 3.445 1.574 3.445 2.583 0 .98-.84 1.545-2.354 1.545-1.875 0-4.965-.921-6.99-2.109l-.9 5.555C5.175 22.99 8.385 24 11.714 24c2.641 0 4.843-.624 6.328-1.813 1.664-1.305 2.525-3.236 2.525-5.732 0-4.128-2.524-5.851-6.594-7.305h.003z"})}),L2=l=>o.jsxs(De,{...l,children:[o.jsx("path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"}),o.jsx("path",{d:"m3.3 7 8.7 5 8.7-5"}),o.jsx("path",{d:"M12 22V12"})]}),ia=({children:l})=>o.jsx("code",{className:"rounded-xs border border-border bg-muted px-1 py-px font-mono text-xs font-normal wrap-anywhere text-foreground",children:l}),la=l=>`${l.project?`/${l.project}`:""}/${l.kind}/${l.id}`,Zh=l=>/[?&]transport=editor(?:&|$)/.test(l)?l:`${l}${l.includes("?")?"&":"?"}transport=editor`,k2=l=>`/__studio/original${la(l)}`,Y2=l=>Zh(`/preview${la(l)}`),q2=async(l,r,c)=>{try{const u=await fetch("/__studio/action",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:r.action,version:r.version,kind:l.kind,id:l.id,project:l.project})});if(!u.body)return await u.json();const g=u.body.getReader(),y=new TextDecoder;let w="",j;const m=d=>{if(!d.trim())return;const v=JSON.parse(d);v.result?j=v.result:v.step&&v.state&&c?.(v.step,v.state)};for(;;){const{done:d,value:v}=await g.read();if(d)break;w+=y.decode(v,{stream:!0});const h=w.split(`
10
+ `);w=h.pop()??"";for(const S of h)m(S)}return m(w),j??{ok:!1,error:"The dev server closed without a result."}}catch(u){return{ok:!1,error:u instanceof Error?u.message:String(u)}}},G2=async l=>{try{return await(await fetch(`/__studio/status${la(l)}`)).json()}catch(r){return{unreachable:r instanceof Error?r.message:String(r)}}},V2={offered:["push","promote","publish"],run:q2,status:G2},X2=async l=>{const c=await(await fetch(`/__studio/screenshot${la(l)}`)).json();if(c.unreachable!==void 0)throw new Error(c.unreachable);return c.shots},Q2=async()=>{try{const r=await(await fetch("/__studio/samples.json")).json();return typeof r=="object"&&r!==null?r:{}}catch(l){return{unreachable:l instanceof Error?l.message:String(l)}}},Z2=15,K2=70,Q0={width:80,height:60},$2=600,J2=(l,r)=>{const c=.1*(l/r)+.035;return Math.round((100-c*100)*10)/10},F2=(l,r)=>{if(!l)return;const c=l.cornerRadius??Z2,u=Math.min(r.width,r.height)>=$2,g=(w,j)=>{const m=Math.round(r.width*w/100),d=Math.round(r.height*j/100);return{x:Math.round((r.width-m)/2),y:Math.round((r.height-d)/2),width:m,height:d,radius:{top:c,bottom:c},underlay:!1}},y=(w,j)=>{const m=Math.round(r.height*w/100);return{x:0,y:r.height-m,width:r.width,height:m,radius:{top:c,bottom:0},underlay:j}};switch(l.style){case"modal":return u?g(70,80):y(J2(r.width,r.height),!0);case"drawer":return y(l.height??K2,!1);case"popup":return g(l.width??Q0.width,l.height??Q0.height);default:return}},W2=l=>typeof l=="object"&&l!==null&&!Array.isArray(l),vl=l=>typeof l=="number"&&Number.isFinite(l)&&l>0?l:void 0,I2={FULLSCREEN:"fullscreen",MODAL:"modal",PUSH:"push",NO_ANIMATION:"noAnimation",DRAWER:"drawer",POPUP:"popup"},P2=l=>{if(!W2(l)||typeof l.type!="string")return;const r=I2[l.type];if(r)return{style:r,...vl(l.width)===void 0?{}:{width:vl(l.width)},...vl(l.height)===void 0?{}:{height:vl(l.height)},...vl(l.corner_radius)===void 0?{}:{cornerRadius:vl(l.corner_radius)}}},eg=l=>typeof l=="object"&&l!==null&&!Array.isArray(l)&&Object.values(l).every(r=>typeof r=="string"),qa=l=>typeof l=="object"&&l!==null&&!Array.isArray(l),Xs=l=>Array.isArray(l)&&l.every(r=>typeof r=="string"),tg=l=>{if(!qa(l))return;const r=l.kind==="paywall"||l.kind==="funnel"?l.kind:void 0;if(!r||typeof l.id!="string")return;const c=P2(qa(l.settings)?l.settings.presentation_style:void 0),u=ig(l.origin);return{kind:r,id:l.id,...typeof l.project=="string"?{project:l.project}:{},...typeof l.label=="string"&&l.label!==""?{label:l.label}:{},routes:Xs(l.routes)?l.routes:[],products:eg(l.products)?l.products:{},locales:Xs(l.locales)?l.locales:[],...Xs(l.platforms)?{platforms:l.platforms}:{},...c===void 0?{}:{presentation:c},paywallId:typeof l.paywallId=="string"?l.paywallId:void 0,...u===void 0?{}:{origin:u}}},ag=l=>{if(!(!qa(l)||typeof l.name!="string"||l.name===""))return typeof l.iconUrl=="string"&&l.iconUrl!==""?{name:l.name,iconUrl:l.iconUrl}:{name:l.name}},ng=l=>typeof l=="string"&&l!==""&&!/[\\/]/.test(l)&&!l.startsWith("."),lg=new Set(["swiftui","uikit","compose","android-views","react-native","flutter"]),ig=l=>{if(qa(l)){if(typeof l.paywallId=="string"&&typeof l.url=="string")return{paywallId:l.paywallId,url:l.url};if(typeof l.path=="string"&&typeof l.framework=="string"&&lg.has(l.framework)){const r=l.framework;return ng(l.screenshot)?{path:l.path,framework:r,screenshot:l.screenshot}:{path:l.path,framework:r}}}},sg=new Set(["patch","minor","major"]),rg=l=>{if(!qa(l))return;const{current:r,latest:c,kind:u,command:g,notes:y}=l;if(!(typeof r!="string"||typeof c!="string"||typeof g!="string"||typeof y!="string"||typeof u!="string"||!sg.has(u)))return{current:r,latest:c,kind:u,command:g,notes:y}},og=l=>{if(!qa(l))throw new Error("project payload is not an object");const r=Array.isArray(l.surfaces)?l.surfaces.map(tg).filter(j=>j!==void 0):[],c=qa(l.capabilities)?l.capabilities:{},u=qa(l.samples)?l.samples:{},g=j=>qa(u[j])?u[j]:{},y=ag(l.app),w=rg(l.update);return{title:typeof l.title=="string"?l.title:"superwall",...y===void 0?{}:{app:y},scheme:typeof l.scheme=="string"?l.scheme:void 0,networkOrigin:typeof l.networkOrigin=="string"?l.networkOrigin:void 0,surfaces:r,diagnostics:Xs(l.diagnostics)?l.diagnostics:[],samples:{device:g("device"),user:g("user"),params:g("params")},capabilities:{actions:c.actions===!0},...w===void 0?{}:{update:w}}},cg={experimentId:"0",variantId:"0",campaignId:"0"},Sl=l=>Object.fromEntries(Object.entries(l).filter(([,r])=>r!==void 0)),Kh=(l={})=>({paywallId:l.paywallId??"0",paywallIdentifier:l.paywallIdentifier??"paywall",device:Sl(l.device??{}),user:Sl(l.user??{}),params:Sl(l.params??{}),products:l.products??[],experiment:l.experiment??cg,...l.introductoryOfferEligible===void 0?{}:{introductoryOfferEligible:l.introductoryOfferEligible}}),Z0=(l,r)=>{const c={...l,paywallId:r.paywallId??l.paywallId,paywallIdentifier:r.paywallIdentifier??l.paywallIdentifier,device:r.device?Sl({...l.device,...r.device}):l.device,user:r.user?Sl({...l.user,...r.user}):l.user,params:r.params?Sl({...l.params,...r.params}):l.params,products:r.products??l.products,experiment:r.experiment??l.experiment};return"introductoryOfferEligible"in r&&(r.introductoryOfferEligible===void 0?delete c.introductoryOfferEligible:c.introductoryOfferEligible=r.introductoryOfferEligible),c},Ac=(l,r)=>JSON.stringify(l)===JSON.stringify(r),bc=(l,r)=>{const c={};let u=!1;for(const g of new Set([...Object.keys(l),...Object.keys(r)]))g in r?Ac(l[g],r[g])||(c[g]=r[g],u=!0):(c[g]=void 0,u=!0);return u?c:void 0},ug=(l,r)=>{const c={},u=bc(l.device,r.device);u&&(c.device=u);const g=bc(l.user,r.user);g&&(c.user=g);const y=bc(l.params,r.params);return y&&(c.params=y),Ac(l.products,r.products)||(c.products=r.products),l.introductoryOfferEligible!==r.introductoryOfferEligible&&(c.introductoryOfferEligible=r.introductoryOfferEligible),l.paywallId!==r.paywallId&&(c.paywallId=r.paywallId),l.paywallIdentifier!==r.paywallIdentifier&&(c.paywallIdentifier=r.paywallIdentifier),Ac(l.experiment,r.experiment)||(c.experiment=r.experiment),c},$h=l=>{const r=l.variables.trialPeriodDays,c=typeof r=="number"?r:typeof r=="string"?Number(r):0;return Number.isFinite(c)?c:0},Ei=l=>l.introductoryOfferEligible??l.products.some(r=>$h(r)>0),Jh=l=>({event_name:"template_variables",variables:{device:l.device,user:l.user,params:l.params,...l.products.length>0?{products:l.products.map(r=>({[r.reference]:r.variables}))}:{}}}),Fh=l=>({event_name:"experiment",experimentId:l.experiment.experimentId,variantId:l.experiment.variantId,campaignId:l.experiment.campaignId}),Wh=l=>({event_name:"products",products:l.products.map(r=>({product:r.reference,productId:r.productId}))}),Ih=l=>({event_name:"template_substitutions_prefix",prefix:Ei(l)?"freeTrial":"default"}),fg=l=>({event_name:"paywall_open",paywall_id:l.paywallId,paywall_identifier:l.paywallIdentifier}),dg=l=>({event_name:"paywall_close",paywall_id:l.paywallId,paywall_identifier:l.paywallIdentifier}),hg=l=>[Jh(l),Fh(l),Wh(l),Ih(l),fg(l)],er=l=>({product:l.reference,product_identifier:l.productId}),mg=l=>({event_name:"transaction_start",...er(l)}),pg=l=>({event_name:"transaction_complete",...er(l)}),gg=l=>({event_name:"transaction_abandon",...er(l)}),K0=l=>({event_name:"transaction_fail",...er(l)}),vg=()=>({event_name:"transaction_restore"}),yg=(l,r)=>({event_name:"freeTrial_start",product_identifier:l.productId,trial_end_date:r}),bg=()=>({event_name:"restore_start"}),xg=()=>({event_name:"restore_complete"}),$0=()=>({event_name:"restore_fail"}),Sg=l=>({event_name:"permission_result",permission_type:l.permissionType,request_id:l.requestId,status:l.status}),wg=l=>({event_name:"callback_result",request_id:l.requestId,name:l.name,status:l.status,...l.data===void 0?{}:{data:l.data}}),Eg=()=>({event:()=>{},purchase:()=>"completed",restore:()=>"restored",close:()=>{},openUrl:()=>{},custom:()=>{},customPlacement:()=>{},permission:()=>"granted",callback:()=>({status:"success"})}),jg=1440*60*1e3,tr=(l,r,c)=>{new Promise(u=>u(l())).then(r,c)},ar=(l,r)=>{console.error(`[superwall host] ${l}`,r)},Ng=(l,r,c)=>l.products.find(u=>u.reference===r)??l.products.find(u=>u.productId===c)??{reference:r,productId:c??r,variables:{}},Tg=(l,r)=>{const{delegate:c,send:u,now:g}=l,y=Ng(l.state(),r.product,r.product_identifier);u([mg(y)]),tr(()=>c.purchase(y),w=>{if(w==="completed"){const j=$h(y),m=[pg(y)];Ei(l.state())&&j>0&&m.push(yg(y,g()+j*jg)),u(m)}else u(w==="abandoned"?[gg(y)]:[K0(y)])},w=>{ar("purchase delegate threw",w),u([K0(y)])})},Mg=l=>{const{delegate:r,send:c}=l;c([bg()]),tr(()=>r.restore(),u=>{c(u==="restored"?[vg(),xg()]:[$0()])},u=>{ar("restore delegate threw",u),c([$0()])})},_g=(l,r)=>{const{delegate:c,send:u}=l,g=y=>u([Sg({permissionType:r.permission_type,requestId:r.request_id,status:y})]);tr(()=>c.permission(r.permission_type),g,y=>{ar("permission delegate threw",y),g("denied")})},Cg=(l,r)=>{const{delegate:c,send:u}=l,g=y=>u([wg({requestId:r.request_id,name:r.name,status:y.status,...y.data===void 0?{}:{data:y.data}})]);tr(()=>c.callback(r.name,r.variables??{}),g,y=>{ar("callback delegate threw",y),g({status:"failure"})})},J0=l=>JSON.stringify([l.device,l.user,l.params,l.products.map(r=>[r.reference,r.variables])]),F0=l=>JSON.stringify(l.products.map(r=>[r.reference,r.productId])),W0=l=>JSON.stringify(l.experiment),Ag=l=>{let r=Kh(l.state);const{delegate:c,send:u}=l,g={state:()=>r,delegate:c,send:u,now:l.now??Date.now},y=m=>{switch(m.event_name){case"ping":u(hg(r));return;case"purchase":Tg(g,m);return;case"restore":Mg(g);return;case"close":c.close(),u([dg(r)]);return;case"open_url":c.openUrl(m.url,m.browser_type==="payment_sheet"?"payment_sheet":"in_app");return;case"open_url_external":c.openUrl(m.url,"external");return;case"open_deep_link":c.openUrl(m.link,"deep_link");return;case"custom":c.custom(m.data);return;case"custom_placement":c.customPlacement(m.name,m.params);return;case"user_attribute_updated":r=Z0(r,{user:Object.fromEntries(m.attributes.map(d=>[d.key,d.value]))});return;case"request_permission":_g(g,m);return;case"request_callback":Cg(g,m);return;default:return}};return{get state(){return r},receive:m=>{for(const d of m)c.event(d),y(d)},update:m=>{const d=r;r=Z0(r,m);const v=[];J0(d)!==J0(r)&&v.push(Jh(r)),W0(d)!==W0(r)&&v.push(Fh(r)),F0(d)!==F0(r)&&v.push(Wh(r)),Ei(d)!==Ei(r)&&v.push(Ih(r)),v.length>0&&u(v)},send:u}},Rg=()=>{try{return typeof localStorage<"u"&&localStorage.getItem("SW_DEBUG_TRANSPORT")==="true"}catch{return!1}},Og={WebKit:"#9C27B0",Android:"#4CAF50",Editor:"#2196F3",Web:"#00BCD4",Transport:"#FF9800"},zg=l=>{const r=Og[l],c=(u,g,...y)=>{if(!Rg()&&u==="debug")return;const w=`%c[${l}]%c ${g}`,j=[`color: ${r}; font-weight: bold`,"color: inherit"];switch(u){case"error":console.error(w,...j,...y);break;case"warn":console.warn(w,...j,...y);break;case"info":console.info(w,...j,...y);break;default:console.log(w,...j,...y)}};return{debug:(u,...g)=>c("debug",u,...g),info:(u,...g)=>c("info",u,...g),warn:(u,...g)=>c("warn",u,...g),error:(u,...g)=>c("error",u,...g)}};var Yc=(l=>(l.ToPaywall="to_paywall",l.FromPaywall="from_paywall",l.ToPaywallUi="to_paywall_ui",l.FromPaywallUi="from_paywall_ui",l))(Yc||{});const Dg=(l,r)=>{const c={direction:r,version:1,payload:{events:Array.isArray(l)?l:[l]}};return JSON.stringify(c)},Ug=()=>({parse:l=>l}),Hg=zg("Transport"),Bg=(l,r,c=Ug())=>{try{const u=c.parse(JSON.parse(l));if(u.direction!==r)throw new Error("Message direction incorrect");return u.payload.events}catch(u){return Hg.error("Failed to parse incoming message",{message:l,error:u}),[]}},Lg=l=>r=>{l.postMessage(Dg([...r],Yc.ToPaywall),"*")},kg=(l,r,c={})=>{const u=c.listen??window,g=y=>{if(y.source!==r||typeof y.data!="string")return;const w=Bg(y.data,Yc.FromPaywall);w.length>0&&l.receive(w)};return u.addEventListener("message",g),()=>u.removeEventListener("message",g)},Yg=l=>{const{target:r,listen:c,...u}=l,g=Ag({...u,send:Lg(r)}),y=kg(g,r,c?{listen:c}:{});return{host:g,detach:y}},xc=1440*60*1e3,Sc=60*1e3,Ph=-18e3,Rc={publicApiKey:"pk_3f9c2a71e4b8d05c6a1f7e9b2d4c8a6e0f5b3d7c9a1e4f68",platform:"iOS",appUserId:"44dd573cd1e849a6997a5eaf98298e47",aliases:["$SuperwallAlias:00EB5C40-68A7-4778-B634-F3714D2010B9"],vendorId:"86A1F395-D3A3-4A1C-914A-5912EF0363E2",appVersion:"8.4",osVersion:"15.5.0",deviceLocale:"en_US",deviceModel:"iPhone10",deviceLanguageCode:"en",deviceCurrencyCode:"USD",deviceCurrencySymbol:"$",timezoneOffset:Ph,radioType:"Wifi",interfaceStyle:"Dark",isLowPowerModeEnabled:0,bundleId:"com.jakemor.fitnessai",isMac:0,totalPaywallViews:0,interfaceType:"iphone"},bi=l=>String(l).padStart(2,"0"),I0=l=>{const r=`${l.getUTCFullYear()}-${bi(l.getUTCMonth()+1)}-${bi(l.getUTCDate())}`,c=`${bi(l.getUTCHours())}:${bi(l.getUTCMinutes())}:${bi(l.getUTCSeconds())}`;return{date:r,time:c,dateTime:`${r}T${c}`}},qg=(l,r=Ph)=>{const c=l-5*xc,u=l-360*Sc,g=I0(new Date(l)),y=I0(new Date(l+r*1e3));return{daysSinceInstall:Math.floor((l-c)/xc),minutesSinceInstall:Math.floor((l-c)/Sc),appInstallDate:new Date(c).toISOString(),daysSinceLastPaywallView:Math.floor((l-u)/xc),minutesSinceLastPaywallView:Math.floor((l-u)/Sc),utcDate:g.date,localDate:y.date,utcTime:g.time,localTime:y.time,utcDateTime:g.dateTime,localDateTime:y.dateTime}},Gg=(l=Date.now())=>({...Rc,...qg(l,Rc.timezoneOffset)}),Vg={appUserId:Rc.appUserId,email:"preview@example.com",firstName:"John",lastName:"Doe",country:"US",language:"en"},Xg={$event_name:"campaign_trigger",event_name:"campaign_trigger",$is_standard_event:!1,$is_feature_gatable:!1},Qg=[[60,"second"],[60,"minute"],[24,"hour"],[7,"day"],[4.348,"week"],[12,"month"]],e1=l=>{const r=new Intl.RelativeTimeFormat("en",{numeric:"auto"}),c=Math.sign(l)||1;let u=Math.abs(l);for(const[g,y]of Qg){if(u<g)return r.format(c*Math.round(u),y);u/=g}return r.format(c*Math.round(u),"year")},qc=(l,r=Date.now())=>{const c=Date.parse(l);if(!Number.isNaN(c))return e1(-Math.max(0,(r-c)/1e3))},Zg=l=>e1(Math.max(0,l)/1e3),Kg={bottom:{start:"top-full left-0 mt-1 origin-top-left",center:"top-full left-1/2 mt-1 -translate-x-1/2 origin-top",end:"top-full right-0 mt-1 origin-top-right"},top:{start:"bottom-full left-0 mb-1 origin-bottom-left",center:"bottom-full left-1/2 mb-1 -translate-x-1/2 origin-bottom",end:"bottom-full right-0 mb-1 origin-bottom-right"}},wl=({hint:l,side:r="bottom",align:c="end",children:u})=>{const[g,y]=T.useState(!1);return l===void 0?o.jsx(o.Fragment,{children:u}):o.jsxs("span",{className:"relative inline-flex",onMouseEnter:()=>y(!0),onMouseLeave:()=>y(!1),onFocus:()=>y(!0),onBlur:()=>y(!1),children:[u,g&&o.jsx("span",{role:"tooltip",className:`pointer-events-none absolute z-50 w-max max-w-64 rounded-sm border border-border bg-popover px-2 py-1 text-left text-xs font-normal text-balance whitespace-normal text-foreground transition-[opacity,scale] duration-popup ease-out starting:scale-98 starting:opacity-0 ${Kg[r][c]}`,children:l})]})};var t1=Yh();const $g=kh(t1),Ti=(l,r,c)=>{const u=T.useRef(c);u.current=c,T.useEffect(()=>{if(!r)return;const g=w=>{const j=w.composedPath();l.some(m=>m.current&&j.includes(m.current))||u.current()},y=w=>{w.key==="Escape"&&u.current()};return window.addEventListener("mousedown",g),window.addEventListener("keydown",y),()=>{window.removeEventListener("mousedown",g),window.removeEventListener("keydown",y)}},[l,r])},Gc=(l,r)=>{const[c,u]=T.useState("start");return T.useLayoutEffect(()=>{const g=l.current;if(!r||!g)return;const y=g.getBoundingClientRect();u(y.left+y.width/2>window.innerWidth/2?"end":"start")},[l,r]),c},P0=12,Jg=l=>{const r=l?.closest(".sw-studio");if(r)return r;const c=l?.getRootNode();return c instanceof ShadowRoot?c:document.body},Mi=({popupRef:l,anchor:r,side:c,align:u,className:g="",children:y})=>{const[w,j]=T.useState(void 0);return T.useLayoutEffect(()=>{const m=()=>{const d=r.current?.getBoundingClientRect();if(!d)return;const v=l.current?.offsetWidth??0,h=u==="end"?d.right-v:d.left;j({...c==="top"?{bottom:window.innerHeight-d.top+4}:{top:d.bottom+4},left:Math.max(P0,Math.min(h,window.innerWidth-P0-v))})};return m(),window.addEventListener("resize",m),window.addEventListener("scroll",m,!0),()=>{window.removeEventListener("resize",m),window.removeEventListener("scroll",m,!0)}},[r,l,c,u]),t1.createPortal(o.jsx("div",{ref:l,className:`fixed z-30 flex max-w-[calc(100vw-1.5rem)] flex-col overflow-hidden rounded-sm border border-border bg-popover text-foreground ${w?"":"invisible"} ${g}`,style:w,"data-menu-popup":"",children:y}),Jg(r.current))},ji=({label:l,hint:r,selected:c,onSelect:u})=>o.jsxs("button",{type:"button",className:`grid w-full min-w-0 grid-cols-[1fr_0.875rem] items-center gap-2 rounded-sm border border-transparent ps-[calc(--spacing(2.5)-1px)] pe-2 text-left text-sm text-foreground outline-none hover:bg-accent focus-visible:bg-accent ${r?"py-[calc(--spacing(1.5)-1px)]":"py-[calc(--spacing(1)-1px)]"}`,"aria-current":c||void 0,onClick:u,children:[o.jsxs("span",{className:"flex min-w-0 flex-col",children:[o.jsx("span",{className:"truncate",children:l}),r&&o.jsx("span",{className:"truncate text-xs/4 text-fg-tertiary",children:r})]}),c?o.jsx(Bc,{className:"text-primary"}):o.jsx("span",{})]}),a1=({children:l})=>o.jsx("span",{className:"block px-2.5 py-1.5 text-xs font-medium text-fg-tertiary",children:l}),Fg=()=>o.jsx("span",{className:"mx-2.5 my-1 block h-px bg-border"}),Js={push:["link","build","assets","push","source"],publish:["link","build","assets","push","source","promote"],promote:["link","promote"]},Wg={link:"Find paywall",build:"Build snapshot",assets:"Sync assets",push:"Push version",source:"Push source",promote:"Promote to live"},Ig=(l,r,c)=>l==="promote"&&r==="rollback"?`Roll back to v${c}`:Wg[l],Pg=l=>l.find(r=>r.live)?.version,ev=l=>l.length===0?void 0:Math.max(...l.map(r=>r.version)),tv=(l,r)=>l!==void 0&&r!==void 0&&l<r?"rollback":"promote",n1={promote:{label:"Promote",running:"Promoting…"},rollback:{label:"Roll back",running:"Rolling back…"}},av=l=>{const{target:r,live:c}=l;return r===void 0?"Make the latest push live":c===void 0?`Make v${r} live`:r===c?`v${c} is live today`:r<c?`Make v${r} live again, replacing v${c}`:`Make v${r} live, replacing v${c}`},nv=l=>{if(l.versions.length===0)return"Nothing has been pushed yet";if(l.target!==void 0&&l.target===l.live)return`v${l.live} is already live`},lv={push:"New version, nothing live changes",publish:"Push and make it live"},Fs=(l,r)=>l==="push"?"Push":l==="publish"?"Publish":n1[r].label,l1=(l,r)=>l==="push"?"Pushing…":l==="publish"?"Publishing…":n1[r].running,iv={done:"bg-primary",failed:"bg-destructive",pending:"bg-fg-muted"},sv=({progress:l,direction:r,target:c})=>{const u=Js[l.action],g=u.filter(w=>l.steps[w]==="done").length,y=l.error!==void 0;return o.jsxs("div",{className:"flex w-72 max-w-full flex-col",children:[o.jsxs("div",{className:"flex flex-col gap-2 p-3",children:[o.jsx("span",{className:"-mt-1 text-sm font-medium",children:y?`${Fs(l.action,r)} failed`:g===u.length?`${Fs(l.action,r)} complete`:l1(l.action,r)}),o.jsx("span",{className:"block h-1 w-full overflow-hidden rounded-sm bg-muted",children:o.jsx("span",{className:`block h-full transition-[width] duration-move ease-out ${y?"bg-destructive":"bg-primary"}`,style:{width:`${g/u.length*100}%`}})})]}),o.jsx("ul",{className:"m-0 flex list-none flex-col border-t border-border p-1",children:u.map((w,j)=>{const m=l.steps[w]??"pending";return o.jsxs("li",{className:"flex items-center gap-2 px-2.5 py-1",children:[o.jsx("span",{className:"w-4 text-xs text-fg-muted tabular-nums",children:String(j+1).padStart(2,"0")}),o.jsx("span",{className:`flex-1 text-sm ${m==="pending"?"text-fg-tertiary":"text-foreground"}`,children:Ig(w,l.action==="promote"?r:"promote",c)}),m==="active"?o.jsx("span",{className:"flex size-4 flex-none items-center justify-center text-primary",children:o.jsx(Ps,{})}):o.jsx("span",{className:`size-2 flex-none rounded-full ${iv[m]}`})]},w)})}),l.error&&o.jsx("div",{className:"border-t border-border p-3 text-xs whitespace-pre-wrap text-destructive-foreground",role:"alert",children:l.error})]})},eh=l=>`v${l.version}${l.live?" · Live":""}`,rv=l=>{if(l.live)return"What SDKs receive today";const r=l.pushedAt?qc(l.pushedAt):void 0;return r?`Pushed ${r}`:"Pushed snapshot"},th="sw-btn sw-btn--sm sw-btn--primary",ov=({versions:l,target:r,disabled:c,onPick:u})=>{const[g,y]=T.useState(!1),w=T.useRef(null),j=T.useRef(null),m=T.useMemo(()=>[w,j],[]);Ti(m,g,()=>y(!1));const d=l.find(v=>v.version===r);return o.jsxs("div",{className:"relative flex",ref:w,children:[o.jsxs("button",{type:"button",className:"sw-btn sw-btn--sm","aria-label":"Version","aria-expanded":g,disabled:c,onClick:()=>y(v=>!v),children:[d?eh(d):`v${r}`,o.jsx(Xh,{className:"icon-tertiary"})]}),g&&o.jsx(Mi,{popupRef:j,anchor:w,side:"bottom",align:"end",className:"w-56",children:o.jsx("div",{className:"flex max-h-64 scroll-fade flex-col overflow-y-auto p-1","data-menu-list":"",children:l.map(v=>o.jsx(ji,{label:eh(v),hint:rv(v),selected:v.version===r,onSelect:()=>{y(!1),u(v.version)}},v.version))})})]})},cv=({offered:l,promotion:r,progress:c,blocked:u,onRun:g,onBlocked:y})=>{const[w,j]=T.useState(l[0]??"push"),[m,d]=T.useState(!1),v=T.useRef(null),h=tv(r.target,r.live),[S,M]=T.useState({direction:h,target:r.target}),C=[...r.versions].sort((se,je)=>je.version-se.version),V=r.pick,Y=V!==void 0&&C.length>0,Q=l.length>1,le=w==="promote"?nv(r):u,q=le!==void 0,X=c!==void 0&&c.error===void 0&&Js[c.action].some(se=>c.steps[se]!=="done"),K=c!==void 0,I=T.useRef(null),ae=T.useMemo(()=>[v,I],[]);Ti(ae,m,()=>d(!1));const ue=()=>{if(q){w!=="promote"&&y?.();return}M({direction:h,target:r.target}),g(w)},ve=se=>{j(se),d(!1)};return o.jsxs("div",{className:"flex items-center gap-2",children:[Y&&o.jsx(ov,{versions:C,target:r.target,disabled:X,onPick:se=>{V(se),l.includes("promote")&&j("promote")}}),o.jsxs("div",{className:"relative flex",ref:v,children:[o.jsx(wl,{hint:le,children:o.jsxs("span",{className:"flex",children:[o.jsxs("button",{type:"button",className:`${th} ${Q?"rounded-e-none border-e-0":""}`,disabled:X||q&&w==="promote","aria-busy":X||void 0,onClick:ue,children:[X&&o.jsx(Ps,{}),X?l1(c.action,S.direction):Fs(w,h)]}),Q&&o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",className:"w-px bg-primary-foreground/24"}),o.jsx("button",{type:"button",className:`${th} sw-btn--icon rounded-s-none border-s-0`,"aria-label":"Choose action","aria-expanded":m,"aria-busy":X||void 0,disabled:X,onClick:()=>d(se=>!se),children:o.jsx(Vh,{})})]})]})}),(K||m)&&o.jsx(Mi,{popupRef:I,anchor:v,side:"bottom",align:"end",children:K?o.jsx(sv,{progress:c,direction:S.direction,target:S.target}):o.jsx("div",{className:"flex w-max min-w-56 flex-col p-1",children:l.map(se=>o.jsx(ji,{label:Fs(se,h),hint:se==="promote"?av(r):lv[se],selected:se===w,onSelect:()=>ve(se)},se))})})]})]})},uv=({active:l,options:r,notice:c,onSelect:u})=>{const[g,y]=T.useState(!1),[w,j]=T.useState(""),m=T.useRef(null),d=T.useRef(null),v=T.useMemo(()=>[m,d],[]);Ti(v,g,()=>y(!1));const h=Gc(m,g);T.useEffect(()=>{g||j("")},[g]);const S=l&&(l.type==="version"?`version:${l.version}`:l.type==="origin"?"origin":`surface:${l.surface.kind}/${l.surface.id}`),M=I=>{y(!1),u(I)},C=w.trim().toLowerCase(),V=I=>C===""||`${I.label} ${I.hint}`.toLowerCase().includes(C),Y=r.filter(I=>I.target.type==="origin").filter(V),Q=r.filter(I=>I.target.type==="version").filter(V),le=r.filter(I=>I.target.type==="surface").filter(V),q=I=>I.map(ae=>o.jsx(ji,{label:ae.label,hint:ae.hint,selected:ae.key===S,onSelect:()=>M(ae.target)},ae.key)),X=[{label:"Rebuilt from",options:Y},{label:"Versions",options:Q},{label:"Paywalls",options:le}].filter(I=>I.options.length>0),K=X.length>1;return o.jsxs("div",{className:"relative flex",ref:m,children:[o.jsxs("button",{type:"button",className:"sw-btn","aria-pressed":l!==void 0,"aria-expanded":g,onClick:()=>y(I=>!I),children:[o.jsx(E2,{}),"Compare"]}),g&&o.jsxs(Mi,{popupRef:d,anchor:m,side:"top",align:h,className:"w-72",children:[o.jsxs("label",{className:"flex items-center gap-2.5 border-b border-border ps-3 pe-2.5",children:[o.jsx($s,{className:"icon-tertiary"}),o.jsx("input",{className:"h-9 min-w-0 flex-1 bg-transparent text-sm text-foreground outline-none placeholder:text-fg-muted",type:"search",value:w,placeholder:"Search versions and paywalls","aria-label":"Search versions and paywalls",onChange:I=>j(I.target.value)})]}),o.jsx("div",{className:"flex max-h-64 scroll-fade flex-col gap-1.5 overflow-y-auto p-1","data-menu-list":"",children:X.length===0?o.jsx("span",{className:"block px-2.5 py-1 text-sm text-fg-tertiary",children:C===""?"No pushed versions or other paywalls":`No versions or paywalls match “${w.trim()}”`}):X.map(I=>o.jsxs("div",{className:"flex flex-col",children:[K&&o.jsx(a1,{children:I.label}),q(I.options)]},I.label))}),o.jsxs("div",{className:"flex flex-col border-t border-border p-1",children:[c&&o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block px-2.5 py-1.5 text-xs text-fg-secondary",role:"status",children:c}),o.jsx(Fg,{})]}),o.jsx(ji,{label:"Off",hint:"A single preview",selected:l===void 0,onSelect:()=>M(void 0)})]})]})]})},wc=l=>typeof l=="string"&&l!==""?l:void 0,ah=l=>typeof l=="number"&&Number.isFinite(l)?l:void 0,fv=l=>{const r=wc(l.price);if(!r)return{};const c=wc(l.period),u=ah(l.trialPeriodDays),g=wc(l.trialPeriodPrice),y=u===void 0||u<=0?void 0:ah(l.rawTrialPeriodPrice)===0||!g?`${u}-day free trial`:`${u}-day trial for ${g}`;return{price:c?`${r} / ${c}`:r,...y?{trial:y}:{}}},dv=(l,r,c)=>{if(r.unreachable)return{kind:"unchecked"};if(!r.products)return{kind:c?"loading":"unchecked"};const u=r.products[l];return u===void 0?{kind:"missing"}:{kind:"ok",variables:u}},nh={"app-store":{label:"App Store",icon:U2},"play-store":{label:"Google Play",icon:H2},stripe:{label:"Stripe",icon:B2},custom:{label:"Custom",icon:L2}},i1=l=>(l?.stores??[]).flatMap(r=>Object.hasOwn(nh,r)?[nh[r]]:[]),hv=({state:l,listing:r})=>{const[c]=i1(r),u=l.kind==="missing"?Sa:c?.icon??xi;return o.jsx("span",{className:`flex size-8 shrink-0 items-center justify-center rounded-sm border ${l.kind==="missing"?"border-destructive/40 text-destructive-foreground":"border-border bg-muted text-fg-secondary"}`,children:o.jsx(u,{})})},mv=({state:l})=>{if(l.kind!=="ok")return null;const r=fv(l.variables);return o.jsxs("div",{className:"flex shrink-0 flex-col items-end",children:[r.price?o.jsx("span",{className:"text-sm/5 font-medium tabular-nums",children:r.price}):o.jsx("span",{className:"text-sm/5 text-fg-tertiary",children:"No price in Superwall"}),r.trial&&o.jsx("span",{className:"text-xs/4 text-fg-secondary",children:r.trial})]})},pv={loading:{text:"Checking…",tone:"text-fg-tertiary"},missing:{text:"Not in Superwall",tone:"text-destructive-foreground"},unchecked:{text:"Couldn’t check",tone:"text-warning-foreground"}},lh=({value:l,label:r,className:c,children:u})=>{const[g,y]=T.useState(!1);return T.useEffect(()=>{if(!g)return;const w=setTimeout(()=>y(!1),1500);return()=>clearTimeout(w)},[g]),o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button",className:`peer/id min-w-0 cursor-pointer truncate border-0 bg-transparent p-0 font-mono hover:text-foreground ${c}`,"aria-label":g?`Copied ${r}: ${l}`:`Copy ${r}: ${l}`,title:l,onClick:()=>{navigator.clipboard?.writeText(l).then(()=>y(!0),()=>y(!1))},children:l}),u,g?o.jsx(Bc,{className:"size-3 shrink-0 text-success"}):o.jsx(Qh,{className:"size-3 shrink-0 opacity-0 peer-hover/id:opacity-100 peer-focus-visible/id:opacity-100"})]})},gv=({reference:l,identifier:r,state:c,listing:u})=>{const g=i1(u).map(d=>d.label).join(" + "),y=u?.name&&u.name!==r?u.name:void 0,w=c.kind==="ok"?void 0:pv[c.kind],j=`${l} identifier`,m=o.jsx("span",{className:"sw-chip h-4.5 shrink-0 font-mono text-[0.6875rem] font-normal text-fg-secondary",children:l});return o.jsxs("section",{"aria-label":l,className:"flex items-center gap-3 px-3 py-2",children:[o.jsx(hv,{state:c,listing:u}),o.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsx("div",{className:"flex min-w-0 items-center gap-1.5 text-sm/5",children:y?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"truncate font-medium",children:y}),m]}):o.jsx(lh,{value:r,label:j,className:"text-[0.8125rem]/5",children:m})}),o.jsxs("div",{className:"flex min-w-0 items-center gap-1.5 text-xs/4 text-fg-tertiary",children:[w&&o.jsx("span",{className:`shrink-0 ${w.tone}`,children:w.text}),g&&o.jsx("span",{className:"shrink-0",children:g}),g&&y&&o.jsx("span",{"aria-hidden":"true",children:"·"}),y&&o.jsx(lh,{value:r,label:j,className:"text-xs"})]})]}),o.jsx(mv,{state:c})]})},vv=({products:l,samples:r,pending:c=!1})=>{const[u,g]=T.useState(!1),y=T.useRef(null),w=T.useRef(null),j=T.useMemo(()=>[y,w],[]);Ti(j,u,()=>g(!1));const m=Gc(y,u),d=Object.entries(l??{}).map(([M,C])=>({reference:M,identifier:C,state:dv(C,r,c)})),v=d.filter(M=>M.state.kind==="missing").length,h=d.length>0&&(!!r.unreachable||v>0),S=h?r.unreachable?"Products, couldn’t check":`Products, ${v} missing`:d.length>0?`Products, ${d.length}`:"Products";return o.jsxs("div",{className:"relative flex",ref:y,children:[o.jsxs("button",{type:"button",className:"sw-btn","aria-expanded":u,"aria-haspopup":"dialog","aria-label":S,onClick:()=>g(M=>!M),children:[o.jsx(xi,{}),"Products",h?o.jsx(Sa,{className:"text-warning"}):d.length>0&&o.jsx("span",{className:"text-fg-tertiary tabular-nums",children:d.length})]}),u&&o.jsx(Mi,{popupRef:w,anchor:y,side:"top",align:m,className:"w-104",children:o.jsxs("div",{role:"dialog","aria-label":"Products",className:"flex min-h-0 flex-col",children:[d.length>0&&!r.unreachable&&!r.products&&!c&&o.jsx("p",{role:"status",className:"m-0 border-b border-border px-3 py-2 text-xs text-fg-tertiary",children:"No product catalog to check these against."}),d.length===0?o.jsx("p",{className:"m-0 px-3 py-3 text-sm text-fg-secondary",children:"This paywall sells nothing yet."}):o.jsx("div",{className:"flex max-h-96 scroll-fade flex-col divide-y divide-border overflow-y-auto",children:d.map(M=>o.jsx(gv,{...M,listing:r.catalog?.[M.identifier]},M.reference))}),o.jsx("p",{className:"m-0 border-t border-border px-3 py-2.5 text-xs text-fg-tertiary",children:d.length===0?o.jsxs(o.Fragment,{children:["Add ",o.jsx(ia,{children:'products: { primary: "pro_year" }'})," to"," ",o.jsx(ia,{children:"config.ts"}),"."]}):o.jsxs(o.Fragment,{children:["Products change in ",o.jsx(ia,{children:"config.ts"}),". Push and promote to ship."]})})]})})]})},yv=.1,bv=4,Vc={top:48,right:48,bottom:48,left:48},ih=1.25,nr=l=>Math.min(bv,Math.max(yv,l)),sh=(l,r,c=Vc)=>{if(l.width<=0||l.height<=0||r.width<=0||r.height<=0)return{scale:1,x:0,y:0};const u=s1(r,c),g=nr(Math.min(1,u.width/l.width,u.height/l.height));return Qs(g,l,r,c)},s1=(l,r)=>({width:l.width-r.left-r.right,height:l.height-r.top-r.bottom}),Qs=(l,r,c,u=Vc)=>{const g=s1(c,u);return{scale:l,x:u.left+(g.width-r.width*l)/2,y:u.top+(g.height-r.height*l)/2}},Ec=(l,r,c)=>{const u=nr(l.scale*r),g=u/l.scale;return{scale:u,x:c.x-(c.x-l.x)*g,y:c.y-(c.y-l.y)*g}},yl=(l,r,c)=>({...l,x:l.x+r,y:l.y+c}),xv=(l,r)=>nr(Math.round((r===1?l*ih:l/ih)*100)/100),Sv=l=>`${Math.round(l*100)}%`,wv=.01,rh={min:.6,max:1.6},Ev=4,jv="data-studio-grab",Nv=120,Tv=8,oh=2,Mv=16,_v=800,Cv={x:!1,y:!1},Av={x:!0,y:!0},r1=T.createContext(1),o1=()=>T.useContext(r1),jc=(l,r)=>Math.hypot(l.x-r.x,l.y-r.y),ch=(l,r)=>({x:(l.x+r.x)/2,y:(l.y+r.y)/2}),Rv=l=>Math.min(rh.max,Math.max(rh.min,Math.exp(-l*wv))),uh=l=>l.ctrlKey||l.metaKey,Ov=l=>{l.preventDefault(),l.stopPropagation()},c1=l=>l instanceof HTMLElement&&(l.isContentEditable||/^(input|textarea|select)$/i.test(l.tagName)),zv=l=>{try{return l.contentDocument?l.contentWindow:null}catch{return null}},Dv=l=>typeof l=="object"&&l!==null&&l.nodeType===1,fh=(l,r)=>l.ownerDocument.defaultView?.getComputedStyle(l)[r]||("style"in l?l.style[r]:""),dh=(l,r)=>{const c=fh(l,r==="y"?"overflowY":"overflowX"),u=fh(l,r==="y"?"overscrollBehaviorY":"overscrollBehaviorX");return/(contain|none)/.test(u)?!0:(r==="y"?l.scrollHeight-l.clientHeight:l.scrollWidth-l.clientWidth)>0?/(auto|scroll|hidden|clip)/.test(c)||l===l.ownerDocument.scrollingElement:!1},Uv=l=>{const r={x:!1,y:!1};for(let c=Dv(l.target)?l.target:null;c;c=c.parentElement)r.x||=dh(c,"x"),r.y||=dh(c,"y");return r},Hv=l=>{const r=l.deltaMode===1?Mv:l.deltaMode===2?_v:1;return{x:l.deltaX*r,y:l.deltaY*r}},Bv=(l,r)=>{const c=Math.abs(l.x),u=Math.abs(l.y);return r.y&&u*oh>=c||r.x&&c*oh>=u?Cv:{x:!r.x,y:!r.y}},hh=(l,r)=>({x:r.x?-l.deltaX:0,y:r.y?-l.deltaY:0}),mh=l=>{const[r,c]=T.useState({width:0,height:0});return T.useLayoutEffect(()=>{if(!l)return;const u=()=>c({width:l.offsetWidth,height:l.offsetHeight});if(u(),typeof ResizeObserver>"u")return;const g=new ResizeObserver(u);return g.observe(l),()=>g.disconnect()},[l]),r},Lv=l=>{const r=T.useRef(l);return r.current=l,r},kv=l=>{const[r,c]=T.useState(!1);return T.useEffect(()=>{const u=w=>{w.code!=="Space"||w.repeat||c1(w.target)||l.current&&(w.preventDefault(),c(!0))},g=w=>{w.code==="Space"&&c(!1)},y=()=>c(!1);return window.addEventListener("keydown",u),window.addEventListener("keyup",g),window.addEventListener("blur",y),()=>{window.removeEventListener("keydown",u),window.removeEventListener("keyup",g),window.removeEventListener("blur",y)}},[l]),r},Yv=l=>l===void 0?Vc:{top:l,right:l,bottom:l,left:l},qv=(l,r)=>l.width===r.width&&l.height===r.height,Gv=(l,r)=>{const c=T.useRef(!r);return T.useEffect(()=>{if(c.current=!r,!r||!l)return;let u=!1,g=!1;const y=()=>{c.current=u||g},w=new AbortController,{signal:j}=w;return l.addEventListener("pointerenter",()=>{u=!0,y()},{signal:j}),l.addEventListener("pointerleave",()=>{u=!1,y()},{signal:j}),l.addEventListener("focusin",()=>{g=!0,y()},{signal:j}),l.addEventListener("focusout",m=>{g=m.relatedTarget instanceof Node&&l.contains(m.relatedTarget),y()},{signal:j}),()=>w.abort()},[r,l]),c},Vv=({fitKey:l,ref:r,onZoom:c,inset:u,contained:g=!1,children:y})=>{const[w,j]=T.useState(null),[m,d]=T.useState(null),[v,h]=T.useState({kind:"fit"}),[S,M]=T.useState(!1),C=mh(w),V=mh(m),Y=Gv(w,g),Q=kv(Y),le=T.useMemo(()=>Yv(u),[u]),q=v.kind==="fit"?sh(V,C,le):v.transform,X=T.useRef(new Map),K=T.useRef(null),I=T.useRef(l),ae=T.useRef(null),ue=T.useRef(v),ve=Lv({contentSize:V,viewportSize:C,room:le}),se=T.useCallback(()=>{const W=ue.current;if(W.kind==="manual")return W.transform;const P=ve.current;return sh(P.contentSize,P.viewportSize,P.room)},[ve]),je=T.useCallback(()=>{const W=performance.now(),P=ae.current;return P&&W-P.at<=Nv?(P.at=W,P):(ae.current={at:W,sum:{x:0,y:0},pans:null},ae.current)},[]),Ce=T.useCallback((W,P)=>{ue.current={kind:"manual",transform:W,followsFit:P},h(ue.current)},[]),xe=T.useCallback(W=>Ce(W,!1),[Ce]),_e=T.useCallback(W=>{const P=ue.current;Ce(W,P.kind==="fit"||P.followsFit)},[Ce]),de=T.useCallback(()=>{ue.current={kind:"fit"},h(ue.current)},[]),A=T.useCallback((W,P)=>{const Te=w?.getBoundingClientRect();return{x:W-(Te?.left??0),y:P-(Te?.top??0)}},[w]),k=T.useCallback((W,P)=>{W.preventDefault(),xe(Ec(se(),Rv(W.deltaY),P))},[xe,se]),F=T.useCallback(W=>{const P={x:C.width/2,y:C.height/2},Te=se();xe(Ec(Te,xv(Te.scale,W)/Te.scale,P))},[xe,se,C]),he=T.useCallback(W=>{const P=ve.current;xe(Qs(nr(W),P.contentSize,P.viewportSize,P.room))},[xe,ve]),x=T.useCallback(()=>({scale:se().scale,fitted:ue.current.kind==="fit"}),[se]),D=T.useCallback(()=>{xe(Qs(1,V,C,le))},[xe,V,C,le]),Z=T.useCallback(()=>_e(se()),[_e,se]),U=T.useCallback((W,P)=>_e(yl(se(),W,P)),[_e,se]);T.useImperativeHandle(r,()=>({zoomStep:F,zoomTo:he,zoom:x,actualSize:D,fit:de,hold:Z,pan:U}),[F,he,x,D,de,Z,U]),T.useEffect(()=>{c?.({scale:q.scale,fitted:v.kind==="fit"})},[c,q.scale,v.kind]);const J=T.useRef(C);T.useLayoutEffect(()=>{const W=J.current;if(J.current=C,qv(W,C))return;const P=ue.current;if(P.kind!=="manual"||W.width<=0||W.height<=0)return;const{contentSize:Te,room:Ue}=ve.current;P.followsFit?de():xe(Qs(P.transform.scale,Te,C,Ue))},[C,ve,de,xe]),T.useEffect(()=>{I.current!==l&&(I.current=l,de())},[l,de]),T.useEffect(()=>{if(!w)return;const W=P=>{if(uh(P)){ae.current=null,k(P,A(P.clientX,P.clientY));return}if(g)return;const Te=je();if(Te.pans??=Av,!Te.pans.x&&!Te.pans.y)return;P.preventDefault();const Ue=hh(P,Te.pans);_e(yl(se(),Ue.x,Ue.y))};return w.addEventListener("wheel",W,{passive:!1}),()=>w.removeEventListener("wheel",W)},[w,g,_e,se,A,k,je]),T.useEffect(()=>{if(!m)return;const W=new Map,P=Ue=>{W.get(Ue)?.(),W.delete(Ue);const _t=zv(Ue);if(!_t)return;const Bt=new AbortController,{signal:ge}=Bt,Lt=Ve=>{if(uh(Ve)){ae.current=null;const Fe=Ue.getBoundingClientRect(),Ae=se().scale;k(Ve,A(Fe.left+Ve.clientX*Ae,Fe.top+Ve.clientY*Ae));return}if(g)return;const Ne=je();if(Ve.defaultPrevented)return;if(!Ne.pans){const Fe=Hv(Ve);if(Ne.sum={x:Ne.sum.x+Fe.x,y:Ne.sum.y+Fe.y},Math.hypot(Ne.sum.x,Ne.sum.y)<Tv)return;Ne.pans=Bv(Ne.sum,Uv(Ve))}if(!Ne.pans.x&&!Ne.pans.y)return;Ve.preventDefault();const et=hh(Ve,Ne.pans);_e(yl(se(),et.x,et.y))};let Ge=null,Ct=null;const Kt=Ve=>{const Ne=Ue.contentDocument;Ne&&(Ct?.remove(),Ct=null,Ve&&(Ct=Ne.createElement("style"),Ct.setAttribute(jv,""),Ct.textContent="*, *::before, *::after { cursor: grabbing !important; }",(Ne.head??Ne.documentElement).appendChild(Ct)))},$e=Ve=>{Ve.pointerType!=="mouse"||Ve.button!==1||(Ve.preventDefault(),Ge={at:{x:Ve.screenX,y:Ve.screenY},panning:!1})},kt=Ve=>{if(!Ge)return;const Ne={x:Ve.screenX,y:Ve.screenY};if(!Ge.panning){if(jc(Ge.at,Ne)<Ev)return;Ge.panning=!0,M(!0),Kt(!0)}Ve.preventDefault(),_e(yl(se(),Ne.x-Ge.at.x,Ne.y-Ge.at.y)),Ge.at=Ne},Ea=()=>{Ge?.panning&&(M(!1),Kt(!1),_t.addEventListener("click",Ov,{capture:!0,once:!0,signal:ge})),Ge=null};_t.addEventListener("wheel",Lt,{passive:!1,signal:ge}),_t.addEventListener("pointerdown",$e,{signal:ge}),_t.addEventListener("pointermove",kt,{signal:ge}),_t.addEventListener("pointerup",Ea,{signal:ge}),_t.addEventListener("pointercancel",Ea,{signal:ge}),W.set(Ue,()=>Bt.abort())},Te=Ue=>{Ue.target instanceof HTMLIFrameElement&&P(Ue.target)};return m.querySelectorAll("iframe").forEach(P),m.addEventListener("load",Te,!0),()=>{m.removeEventListener("load",Te,!0),W.forEach(Ue=>Ue())}},[m,g,_e,se,A,k,je]),T.useEffect(()=>{const W=P=>{if(!(!(P.metaKey||P.ctrlKey)||c1(P.target)||!Y.current)){if(P.key==="="||P.key==="+")F(1);else if(P.key==="-")F(-1);else if(P.key==="0")de();else if(P.key==="1")D();else return;P.preventDefault()}};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[F,de,D,Y]);const ne=W=>{if(!(W.pointerType==="mouse"&&W.button!==0&&W.button!==1)){W.button===1&&W.preventDefault();try{W.currentTarget.setPointerCapture(W.pointerId)}catch{return}if(X.current.set(W.pointerId,{x:W.clientX,y:W.clientY}),M(!0),X.current.size===2){const[P,Te]=[...X.current.values()];K.current={span:jc(P,Te),midpoint:ch(P,Te)}}}},te=W=>{const P=X.current.get(W.pointerId);if(!P)return;const Te={x:W.clientX,y:W.clientY};if(X.current.set(W.pointerId,Te),X.current.size>=2&&K.current){const[Bt,ge]=[...X.current.values()],Lt={span:jc(Bt,ge),midpoint:ch(Bt,ge)},Ge=Ec(se(),Lt.span/K.current.span,A(K.current.midpoint.x,K.current.midpoint.y));xe(yl(Ge,Lt.midpoint.x-K.current.midpoint.x,Lt.midpoint.y-K.current.midpoint.y)),K.current=Lt;return}const Ue=ue.current,_t=Ue.kind==="fit"||Ue.followsFit;g&&W.pointerType!=="mouse"&&_t||_e(yl(se(),Te.x-P.x,Te.y-P.y))},qe=W=>{X.current.delete(W.pointerId),X.current.size<2&&(K.current=null),X.current.size===0&&M(!1)},re=S?"cursor-grabbing":Q?"cursor-grab":"",st=Q||S?"[&_iframe]:pointer-events-none":"",Rt=g?v.kind==="fit"||v.followsFit?"touch-pan-y":"touch-none pointer-coarse:[&_iframe]:pointer-events-none":"touch-none";return o.jsx("div",{className:`relative min-h-0 min-w-0 flex-1 overflow-hidden ${Rt} select-none ${re} ${st}`,"data-testid":"canvas","data-contained":g||void 0,"data-panning":Q||void 0,"data-dragging":S||void 0,ref:j,onPointerDown:ne,onPointerMove:te,onPointerUp:qe,onPointerCancel:qe,onContextMenu:W=>{S&&W.preventDefault()},children:o.jsx("div",{className:"absolute top-0 left-0 flex origin-top-left items-start gap-16","data-testid":"canvas-content",ref:d,style:{transform:`translate(${q.x}px, ${q.y}px) scale(${q.scale})`},children:o.jsx(r1.Provider,{value:q.scale,children:y})})})},Ys={radius:54,cutout:"island",statusBarHeight:64,homeIndicator:!0},Ws=[{id:"iphone-se",name:"iPhone SE",width:375,height:667,device:{platform:"iOS",deviceModel:"iPhone14,6",osVersion:"26.0"},chrome:{radius:0,statusBarHeight:20,homeIndicator:!1}},{id:"iphone-17",name:"iPhone 17",width:402,height:874,device:{platform:"iOS",deviceModel:"iPhone18,3",osVersion:"26.0"},chrome:Ys},{id:"iphone-17-pro",name:"iPhone 17 Pro",width:402,height:874,device:{platform:"iOS",deviceModel:"iPhone18,1",osVersion:"26.0"},chrome:Ys},{id:"iphone-air",name:"iPhone Air",width:420,height:912,device:{platform:"iOS",deviceModel:"iPhone18,4",osVersion:"26.0"},chrome:Ys},{id:"iphone-17-pro-max",name:"iPhone 17 Pro Max",width:440,height:956,device:{platform:"iOS",deviceModel:"iPhone18,2",osVersion:"26.0"},chrome:Ys},{id:"iphone-duo-closed",name:"iPhone Duo (Closed)",width:466,height:678,device:{platform:"iOS",deviceModel:"iPhone19,4",osVersion:"27.1"},chrome:{radius:40,duo:"closed",statusBarHeight:0,homeIndicator:!0},safeArea:{portrait:{top:0,right:84,bottom:34,left:0},landscape:{top:0,right:84,bottom:34,left:0}}},{id:"iphone-duo-open",name:"iPhone Duo (Open)",width:669,height:951,device:{platform:"iOS",deviceModel:"iPhone19,4",osVersion:"27.1"},chrome:{radius:32,duo:"open",statusBarHeight:0,homeIndicator:!0},safeArea:{portrait:{top:82,right:0,bottom:34,left:0},landscape:{top:0,right:84,bottom:34,left:0}}},{id:"pixel-10",name:"Pixel 10",width:412,height:915,device:{platform:"Android",deviceModel:"Pixel 10",osVersion:"16"},chrome:{radius:28,cutout:"punch",statusBarHeight:24,homeIndicator:!0,navigationBarHeight:24}},{id:"galaxy-s25",name:"Galaxy S25",width:360,height:780,device:{platform:"Android",deviceModel:"SM-S931B",osVersion:"15"},chrome:{radius:26,cutout:"punch",statusBarHeight:24,homeIndicator:!0,navigationBarHeight:24}},{id:"ipad-mini",name:"iPad mini",width:744,height:1133,device:{platform:"iOS",deviceModel:"iPad14,1",osVersion:"26.0",interfaceType:"ipad"},chrome:{radius:21,statusBarHeight:24,homeIndicator:!0}},{id:"ipad-pro-11",name:"iPad Pro 11″",width:834,height:1194,device:{platform:"iOS",deviceModel:"iPad16,3",osVersion:"26.0",interfaceType:"ipad"},chrome:{radius:18,statusBarHeight:24,homeIndicator:!0}},{id:"desktop",name:"Desktop",width:1440,height:900}],Xc="iphone-17",ph=l=>l!==void 0&&l.length>0&&l.every(r=>r.toLowerCase()==="web"),Xv=(l,r)=>r?void 0:l.chrome,Si={phone:84,tablet:66,desktop:52},Qv={phone:104,tablet:66},u1=l=>l.width>=600,Zv=l=>{if(l.device===void 0)return"desktop";if(l.device.platform==="iOS")return u1(l)?"tablet":"phone"},Zs=(l,{teleported:r,landscape:c=!1})=>{const u=Zv(l);if(u===void 0)return;const g=l.chrome?.statusBarHeight??0;if(u==="tablet"){const y=f1(l,c),w=Math.max(g,y?.top??0);return{kind:u,top:w+Si.tablet,bottom:0,statusBar:w,right:y?.right??0}}return u==="desktop"?{kind:u,top:Si.desktop,bottom:0,statusBar:0,right:0}:r?{kind:u,top:0,bottom:0,statusBar:g,right:0}:c?void 0:{kind:u,top:g,bottom:Si.phone,statusBar:g,right:0}},Kv=l=>{const r=Zs(l,{teleported:!1}),c=r===void 0?(l.chrome?.statusBarHeight??0)+Qv[u1(l)?"tablet":"phone"]:r.top+r.bottom;return{width:l.width,height:l.height-c}},$v={platform:"iOS",deviceModel:"Mac",osVersion:"26.0",interfaceType:"mac"},f1=(l,r)=>l.safeArea?.[r?"landscape":"portrait"],Jv=(l,r,c=!1)=>{if(r)return{...l.device,platform:"web"};const u=f1(l,c),g=l.device??$v;return u===void 0?g:{...g,safeAreaInsets:u}},gh="responsive",Fv={width:393,height:852},d1=Ws.find(l=>l.id===Xc)??Ws[0],h1=l=>Ws.find(r=>r.id===l)??d1,Wv=440,m1=(l,r)=>{const c=r?void 0:l.device;return c?{platform:c.platform,width:Math.min(l.width,Wv)}:{platform:"iOS",width:d1.width}},Iv="superwall.com",p1="#1c1c1e",Ga={background:"rgba(255, 255, 255, 0.12)",backdropFilter:"blur(40px) saturate(180%)",WebkitBackdropFilter:"blur(40px) saturate(180%)",border:"0.5px solid rgba(255, 255, 255, 0.15)",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)"},Pv={background:"rgba(255, 255, 255, 0.45)",backdropFilter:"blur(40px) saturate(180%)",WebkitBackdropFilter:"blur(40px) saturate(180%)",border:"0.5px solid rgba(255, 255, 255, 0.5)",boxShadow:"0 2px 16px rgba(0, 0, 0, 0.08)"},ey={...Ga,background:"rgba(60, 60, 64, 0.55)"},Va=({size:l,weight:r=2,className:c,fill:u="none",children:g})=>o.jsx("svg",{width:l,height:l,viewBox:"0 0 24 24",fill:u,stroke:u==="none"?"currentColor":void 0,strokeWidth:r,strokeLinecap:"round",strokeLinejoin:"round",className:`shrink-0 ${c??""}`,"aria-hidden":"true",children:g}),ty=({size:l})=>o.jsxs(Va,{size:l,children:[o.jsx("path",{d:"M19.1213 20.1213C17.9497 21.2929 16.0503 21.2929 14.8787 20.1213C13.7071 18.9497 13.7071 17.0503 14.8787 15.8787C16.0503 14.7071 17.9497 14.7071 19.1213 15.8787C20.2929 17.0503 20.2929 18.9497 19.1213 20.1213Z"}),o.jsx("path",{d:"M19 11V6C19 4.34315 17.6569 3 16 3H7C5.34315 3 4 4.34315 4 6V18C4 19.6569 5.34315 21 7 21H10.5"}),o.jsx("path",{d:"M8 15H9"}),o.jsx("path",{d:"M8 7H15"}),o.jsx("path",{d:"M8 11H11"}),o.jsx("path",{d:"M19.1211 20.1211L20.9998 21.9998"})]}),ay=({size:l})=>o.jsxs(Va,{size:l,weight:2.5,children:[o.jsx("path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}),o.jsx("path",{d:"M21 3v5h-5"})]}),Qc=({size:l,className:r})=>o.jsx(Va,{size:l,weight:2.5,className:r,children:o.jsx("path",{d:"m15 18-6-6 6-6"})}),ny=({size:l,className:r})=>o.jsx(Va,{size:l,weight:2.5,className:r,children:o.jsx("path",{d:"m9 18 6-6-6-6"})}),g1=({size:l})=>o.jsxs(Va,{size:l,children:[o.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),o.jsx("path",{d:"M9 3v18"})]}),v1=({size:l})=>o.jsxs(Va,{size:l,children:[o.jsx("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),o.jsx("polyline",{points:"16 6 12 2 8 6"}),o.jsx("line",{x1:"12",x2:"12",y1:"2",y2:"15"})]}),y1=({size:l})=>o.jsxs(Va,{size:l,weight:2.5,children:[o.jsx("path",{d:"M12 5v14"}),o.jsx("path",{d:"M5 12h14"})]}),b1=({size:l})=>o.jsxs(Va,{size:l,children:[o.jsx("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),o.jsx("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})]}),ly=({size:l})=>o.jsxs(Va,{size:l,fill:"currentColor",children:[o.jsx("circle",{cx:"12",cy:"5",r:"2"}),o.jsx("circle",{cx:"12",cy:"12",r:"2"}),o.jsx("circle",{cx:"12",cy:"19",r:"2"})]}),ca=({glass:l,height:r,grow:c=!1,padding:u,gap:g,children:y})=>o.jsx("div",{className:`flex items-center ${c?"min-w-0 flex-1":"shrink-0 justify-center"}`,style:{height:r,minWidth:r,borderRadius:r/2,paddingLeft:u,paddingRight:u,gap:g,...l},children:y}),Zc=({size:l,fontSize:r,color:c})=>o.jsxs(o.Fragment,{children:[o.jsx(ty,{size:l}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-center font-medium",style:{color:c,fontSize:r,letterSpacing:-.2},children:Iv}),o.jsx(ay,{size:l-2})]}),iy=()=>o.jsxs("div",{className:"absolute inset-x-0 top-0 flex items-center gap-2 text-white","data-testid":"browser-top-bar",style:{height:Si.desktop,background:p1,paddingLeft:10,paddingRight:10},children:[o.jsxs("div",{className:"mx-1 flex shrink-0 gap-2",children:[o.jsx("span",{className:"size-3 rounded-full bg-[#FF5F56]"}),o.jsx("span",{className:"size-3 rounded-full bg-[#FFBD2E]"}),o.jsx("span",{className:"size-3 rounded-full bg-[#27C93F]"})]}),o.jsx(ca,{glass:Ga,height:36,padding:10,children:o.jsx(g1,{size:18})}),o.jsxs(ca,{glass:Ga,height:36,padding:8,gap:4,children:[o.jsx(Qc,{size:18}),o.jsx(ny,{size:18,className:"text-white/30"})]}),o.jsx(ca,{glass:Ga,height:36,padding:12,grow:!0,children:o.jsx(Zc,{size:16,fontSize:14,color:"rgba(255,255,255,0.85)"})}),o.jsxs(ca,{glass:Ga,height:36,padding:10,gap:12,children:[o.jsx(v1,{size:16}),o.jsx(y1,{size:16}),o.jsx(b1,{size:16})]})]}),sy=({height:l,statusBar:r,right:c})=>o.jsx("div",{className:"absolute left-0 flex flex-col text-white","data-testid":"browser-top-bar",style:{top:r,right:c,height:l-r,background:p1},children:o.jsxs("div",{className:"flex flex-1 items-center gap-2 px-3",children:[o.jsx(ca,{glass:Ga,height:40,padding:0,children:o.jsx(g1,{size:20})}),o.jsx(ca,{glass:Ga,height:40,padding:0,children:o.jsx(Qc,{size:20})}),o.jsx(ca,{glass:Ga,height:40,padding:12,grow:!0,children:o.jsx(Zc,{size:18,fontSize:15,color:"rgba(255,255,255,0.85)"})}),o.jsxs(ca,{glass:Ga,height:40,padding:12,gap:14,children:[o.jsx(v1,{size:18}),o.jsx(y1,{size:18}),o.jsx(b1,{size:18})]})]})}),ry=({dark:l})=>{const r=l?ey:Pv;return o.jsx("div",{className:`absolute inset-x-0 bottom-0 flex justify-center ${l?"text-white":"text-black"}`,"data-testid":"browser-bottom-bar",style:{height:Si.phone},children:o.jsxs("div",{className:"flex w-full items-center gap-2.5 px-4",style:{height:44,marginTop:6},children:[o.jsx(ca,{glass:r,height:44,padding:0,children:o.jsx(Qc,{size:24})}),o.jsx(ca,{glass:r,height:44,padding:14,grow:!0,children:o.jsx(Zc,{size:20,fontSize:16,color:l?"#ffffff":"#000000"})}),o.jsx(ca,{glass:r,height:44,padding:0,children:o.jsx(ly,{size:20})})]})})},oy=({kind:l,top:r,statusBar:c,right:u=0,theme:g="light"})=>o.jsxs("div",{className:"pointer-events-none absolute inset-0","data-testid":`browser-chrome-${l}`,children:[l==="desktop"&&o.jsx(iy,{}),l==="tablet"&&o.jsx(sy,{height:r,statusBar:c,right:u}),l==="phone"&&o.jsx(ry,{dark:g==="dark"})]}),cy=()=>o.jsxs("svg",{width:"19",height:"12",viewBox:"0 0 19 12",fill:"currentColor","aria-hidden":"true",children:[o.jsx("rect",{x:"0",y:"7.5",width:"3.5",height:"4.5",rx:"1"}),o.jsx("rect",{x:"5",y:"5",width:"3.5",height:"7",rx:"1"}),o.jsx("rect",{x:"10",y:"2.5",width:"3.5",height:"9.5",rx:"1"}),o.jsx("rect",{x:"15",y:"0",width:"3.5",height:"12",rx:"1"})]}),uy=()=>o.jsxs("svg",{width:"27",height:"13",viewBox:"0 0 27 13","aria-hidden":"true",children:[o.jsx("rect",{x:"0.5",y:"0.5",width:"23",height:"12",rx:"3.8",fill:"none",stroke:"currentColor",strokeOpacity:"0.35"}),o.jsx("path",{d:"M25 4.5v4a2.17 2.17 0 0 0 0-4Z",fill:"currentColor",fillOpacity:"0.4"}),o.jsx("rect",{x:"2",y:"2",width:"20",height:"9",rx:"2.5",fill:"currentColor"})]}),fy=()=>o.jsxs("span",{className:"flex items-center gap-[7px]",children:[o.jsx(cy,{}),o.jsx("span",{style:{fontSize:12.5,fontWeight:700,letterSpacing:"0.02em"},children:"SW"}),o.jsx(uy,{})]}),x1=(l,r)=>l==="closed"?r?{corners:[8,8,59,59],camera:{x:630.5,y:418.5}}:{corners:[8,59,59,8],camera:{x:418.2,y:47.8},clock:{x:417.7,y:92.7},ring:{x:418,y:130}}:r?{corners:[55,55,55,55],clock:{x:903,y:39.7},ring:{x:903,y:77}}:{corners:[55,55,55,55],clock:{x:574.6,y:47.6},ring:{x:621,y:48}},Nc=l=>({position:"absolute",left:l.x,top:l.y,transform:"translate(-50%, -50%)"}),dy=()=>{const l=[64,77,90,103,116].map(r=>{const c=r*Math.PI/180;return{cx:20+17*Math.cos(c),cy:20+17*Math.sin(c)}});return o.jsxs("svg",{width:40,height:40,viewBox:"0 0 40 40",fill:"none","aria-hidden":"true",children:[o.jsx("path",{d:"M8.1 32.2 A17 17 0 1 1 31.9 32.2",stroke:"#fff",strokeWidth:3,strokeLinecap:"round"}),l.map(r=>o.jsx("circle",{cx:r.cx,cy:r.cy,r:1.2,fill:"#fff",opacity:.6},r.cx)),o.jsx("path",{d:"M13.5 18.2a9.2 9.2 0 0 1 13 0",stroke:"#fff",strokeWidth:2.4,strokeLinecap:"round"}),o.jsx("path",{d:"M16.3 21a5.2 5.2 0 0 1 7.4 0",stroke:"#fff",strokeWidth:2.4,strokeLinecap:"round"}),o.jsx("circle",{cx:20,cy:24.2,r:1.8,fill:"#fff"})]})},hy=({layout:l})=>o.jsxs(o.Fragment,{children:[(l.clock||l.ring)&&o.jsxs("div",{className:"absolute inset-0",style:{mixBlendMode:"difference"},"data-testid":"duo-status",children:[l.clock&&o.jsx("span",{className:"leading-none",style:{...Nc(l.clock),fontFamily:'-apple-system, "SF Pro Text", system-ui, sans-serif',fontSize:15,fontWeight:600,letterSpacing:-.2,color:"#fff"},children:"9:41"}),l.ring&&o.jsx("div",{style:Nc(l.ring),children:o.jsx(dy,{})})]}),l.camera&&o.jsx("div",{className:"absolute rounded-full","data-testid":"duo-camera",style:{...Nc(l.camera),width:37,height:37,background:"radial-gradient(circle at 50% 50%, #1b2733 0 18%, #05070a 30% 100%)",boxShadow:"inset 0 0 0 1px rgba(255,255,255,0.06)"}})]}),my=({spec:l,width:r,height:c,landscape:u,theme:g})=>{const y=g==="dark"?"rgba(255,255,255,0.95)":"rgba(0,0,0,0.95)",w=Math.max(28,l.radius*.6);return o.jsxs("div",{className:"pointer-events-none absolute inset-0 select-none",style:{width:r,height:c,color:y},"data-testid":"device-chrome",children:[l.duo&&o.jsx(hy,{layout:x1(l.duo,u)}),!u&&!l.duo&&o.jsxs("div",{className:"absolute inset-x-0 top-0 flex items-center justify-between",style:{height:l.statusBarHeight,paddingLeft:w,paddingRight:w,fontFamily:'-apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif',fontSize:15,fontWeight:600,letterSpacing:"-0.2px"},children:[o.jsx("span",{children:"9:41"}),o.jsx(fy,{})]}),l.cutout==="island"&&(u?o.jsx("div",{className:"absolute rounded-full bg-black",style:{left:12,top:(c-124)/2,width:36,height:124}}):o.jsx("div",{className:"absolute rounded-full bg-black",style:{left:(r-124)/2,top:12,width:124,height:36}})),l.cutout==="punch"&&(u?o.jsx("div",{className:"absolute rounded-full bg-black",style:{left:16,top:(c-13)/2,width:13,height:13}}):o.jsx("div",{className:"absolute rounded-full bg-black",style:{left:(r-13)/2,top:15,width:13,height:13}})),l.homeIndicator&&o.jsx("div",{className:"absolute rounded-full",style:{width:Math.round(Math.min(r,c)*.36),height:5,left:"50%",transform:"translateX(-50%)",bottom:8,background:y,opacity:.9}})]})},py=(l,r)=>{const c=T.useRef(void 0),u=T.useRef({hostState:l,delegate:r}),g=T.useCallback(y=>{if(c.current?.detach(),c.current=void 0,!y?.contentWindow)return;const{host:w,detach:j}=Yg({target:y.contentWindow,state:u.current.hostState,delegate:u.current.delegate});c.current={host:w,detach:j,sent:u.current.hostState}},[]);return T.useEffect(()=>{u.current={hostState:l,delegate:r};const y=c.current;y&&(y.host.update(ug(y.sent,l)),y.sent=l)},[l,r]),g},S1=({hostState:l,delegate:r,...c})=>o.jsx("iframe",{...c,ref:py(l,r)}),gy=250,vy=({width:l,height:r,children:c})=>o.jsx("div",{className:"flex flex-none items-center justify-center overflow-hidden rounded-sm bg-background p-6 text-center text-sm text-fg-secondary outline outline-foreground/20","data-testid":"device-placeholder",style:{width:l,height:r},children:c}),yy=({width:l,height:r,title:c,src:u,hostState:g,delegate:y,reloadKey:w=0,chrome:j,presentation:m,landscape:d=!1,theme:v="light",browser:h})=>{const S=T.useRef(0),[M,C]=T.useState([{src:u,generation:0,ready:!0}]),V=T.useRef(!1);T.useEffect(()=>{if(!V.current){V.current=!0;return}S.current+=1;const ae={src:u,generation:S.current,ready:!1};C(ue=>[...ue.filter(ve=>ve.ready).slice(-1),ae])},[u,w]);const Y=ae=>{window.setTimeout(()=>{C(ue=>ue.some(ve=>ve.generation===ae)?ue.map(ve=>ve.generation===ae?{...ve,ready:!0}:ve).filter(ve=>ve.generation>=ae):ue)},gy)},Q=M.findLast(ae=>ae.ready),le=h?void 0:F2(m,{width:l,height:r}),q=d||h?0:j?.navigationBarHeight??0,X=le??{x:0,y:h?.top??0,width:l,height:r-q-(h?h.top+h.bottom:0),radius:{top:0,bottom:0}},K=v==="dark",I=j?.duo?x1(j.duo,d).corners.map(ae=>`${ae}px`).join(" "):j?.radius??3;return o.jsxs("div",{className:"relative flex-none overflow-hidden bg-background outline outline-foreground/20","data-testid":"device-frame","data-browser":h?h.kind:void 0,style:{width:l,height:r,borderRadius:I,background:h?K?"#000000":"#ffffff":void 0},children:[le&&o.jsx("div",{className:"absolute inset-0","data-testid":"presentation-backdrop",style:{background:K?"repeating-linear-gradient(-45deg, #1c1f26 0 7px, #171a20 7px 20px)":"repeating-linear-gradient(-45deg, #e3e3e3 0 7px, #ededed 7px 20px)"},children:le.underlay&&o.jsx("div",{className:"absolute left-1/2 -translate-x-1/2",style:{top:le.y-12,width:Math.round(l*.92),height:30,borderRadius:"20px 20px 0 0",background:K?"rgba(255,255,255,0.2)":"rgba(0,0,0,0.3)"}})}),o.jsx("div",{className:"absolute overflow-hidden","data-testid":"presentation-page",style:{left:X.x,top:X.y,width:X.width,height:X.height,borderRadius:`${X.radius.top}px ${X.radius.top}px ${X.radius.bottom}px ${X.radius.bottom}px`,boxShadow:le?"0 0 40px rgba(0,0,0,0.25)":void 0},children:M.map(ae=>o.jsx(S1,{hostState:g,delegate:y,className:`absolute inset-0 border-0 bg-white transition-opacity duration-hover ${ae===Q?"opacity-100":"opacity-0"}`,title:c,src:ae.src,width:X.width,height:X.height,onLoad:()=>{ae.ready||Y(ae.generation)}},ae.generation))}),q>0&&!le&&o.jsx("div",{className:"absolute inset-x-0 bottom-0","data-testid":"navigation-bar",style:{height:q,background:K?"#000000":"#ffffff"}}),j&&o.jsx("div",{className:"pointer-events-none absolute inset-0",style:{width:l,height:r},children:o.jsx(my,{spec:j,width:l,height:r,landscape:d,theme:v})}),h&&o.jsx(oy,{kind:h.kind,top:h.top,statusBar:h.statusBar,right:h.right,theme:v})]})},by=[{id:"top",label:"Resize height from the top",y:"top",className:"-top-2 left-0 h-4 w-full",cursor:"ns-resize"},{id:"bottom",label:"Resize height",y:"bottom",className:"-bottom-2 left-0 h-4 w-full",cursor:"ns-resize"},{id:"left",label:"Resize width from the left",x:"left",className:"top-0 -left-2 h-full w-4",cursor:"ew-resize"},{id:"right",label:"Resize width",x:"right",className:"top-0 -right-2 h-full w-4",cursor:"ew-resize"},{id:"top-left",label:"Resize from the top left",x:"left",y:"top",className:"-top-2 -left-2 h-5 w-5",cursor:"nwse-resize"},{id:"top-right",label:"Resize from the top right",x:"right",y:"top",className:"-top-2 -right-2 h-5 w-5",cursor:"nesw-resize"},{id:"bottom-left",label:"Resize from the bottom left",x:"left",y:"bottom",className:"-bottom-2 -left-2 h-5 w-5",cursor:"nesw-resize"},{id:"bottom-right",label:"Resize",x:"right",y:"bottom",className:"-right-2 -bottom-2 h-5 w-5",cursor:"nwse-resize"}],xy=({size:l,scale:r,clamp:c,onResize:u,onDragStart:g,onShift:y})=>{const w=T.useRef(null),j=T.useCallback(()=>{w.current?.release(),w.current=null},[]);T.useEffect(()=>j,[j]);const m=h=>S=>{if(S.pointerType==="mouse"&&S.button!==0)return;S.stopPropagation(),S.preventDefault();const M=S.currentTarget;try{M.setPointerCapture(S.pointerId)}catch{return}j();const C=S.pointerId,V=Q=>{Q.pointerId===C&&j()},Y=()=>j();window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V),window.addEventListener("blur",Y),M.addEventListener("lostpointercapture",Y),w.current={pointerId:C,handle:h,from:{x:S.clientX,y:S.clientY},start:l,last:l,release:()=>{window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),window.removeEventListener("blur",Y),M.removeEventListener("lostpointercapture",Y)}},g?.()},d=h=>{const S=w.current;if(!S||S.pointerId!==h.pointerId)return;if(h.stopPropagation(),h.pointerType==="mouse"&&h.buttons===0){j();return}const{handle:M,start:C}=S,V=(h.clientX-S.from.x)/r,Y=(h.clientY-S.from.y)/r,Q={width:M.x==="right"?c(Math.round(C.width+V),C.width):M.x==="left"?c(Math.round(C.width-V),C.width):C.width,height:M.y==="bottom"?c(Math.round(C.height+Y),C.height):M.y==="top"?c(Math.round(C.height-Y),C.height):C.height},le=M.x==="left"?-(Q.width-S.last.width)*r:0,q=M.y==="top"?-(Q.height-S.last.height)*r:0;S.last=Q,u(Q),(le!==0||q!==0)&&y?.(le,q)},v=h=>{w.current?.pointerId===h.pointerId&&(h.stopPropagation(),j())};return o.jsx(o.Fragment,{children:by.map(h=>o.jsx("div",{role:"separator","aria-label":h.label,"aria-orientation":h.y&&!h.x?"horizontal":"vertical","data-testid":`resize-${h.id}`,className:`absolute z-10 touch-none select-none ${h.className}`,style:{cursor:h.cursor},onPointerDown:m(h),onPointerMove:d,onPointerUp:v,onPointerCancel:v},h.id))})},w1=({title:l,description:r,footer:c,onClose:u,children:g})=>{const y=T.useId(),w=T.useId(),j=T.useRef(null),m=T.useRef(u);return m.current=u,T.useEffect(()=>{j.current?.focus();const d=v=>{v.key==="Escape"&&m.current()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[]),o.jsx("div",{className:"fixed inset-0 z-50 grid grid-rows-[1fr_auto_3fr] justify-items-center bg-scrim p-4 transition-opacity duration-dialog ease-out starting:opacity-0 max-sm:grid-rows-[1fr_auto] max-sm:p-0",onMouseDown:d=>{d.target===d.currentTarget&&u()},children:o.jsxs("div",{ref:j,role:"dialog","aria-modal":"true","aria-labelledby":y,"aria-describedby":r===void 0?void 0:w,tabIndex:-1,className:"relative row-start-2 flex w-full max-w-lg flex-col rounded-sm border border-border bg-popover text-foreground outline-none transition-[opacity,scale] duration-dialog ease-out starting:scale-98 starting:opacity-0 max-sm:max-w-none max-sm:rounded-none max-sm:border-x-0 max-sm:border-b-0",children:[o.jsxs("div",{className:"flex flex-col gap-1 p-5 pe-14 pb-3",children:[o.jsx("h2",{id:y,className:"m-0 text-lg font-medium",children:l}),r!==void 0&&o.jsx("p",{id:w,className:"m-0 text-sm text-fg-secondary",children:r})]}),o.jsx("button",{type:"button",className:"sw-btn sw-btn--icon sw-btn--ghost absolute top-[calc(--spacing(3.5)-1px)] right-[calc(--spacing(3.5)-1px)]","aria-label":"Close",onClick:u,children:o.jsx(Ni,{})}),o.jsx("div",{className:"flex flex-col gap-4 px-5 pt-1 pb-5",children:g}),c!==void 0&&o.jsx("div",{className:"flex flex-col-reverse gap-2 rounded-b-[calc(var(--radius-2xl)-1px)] border-t border-border bg-card px-5 py-3 sm:flex-row sm:justify-end",children:c})]})})},Sy=({paywall:l,missing:r,onDismiss:c})=>o.jsxs(w1,{title:r.length===1?"A product is missing":`${r.length} products are missing`,description:`${l} declares ${r.length===1?"a product":"products"} Superwall has no record of. Every variable on ${r.length===1?"it":"them"} will be undefined here and on device.`,onClose:c,footer:o.jsx("button",{type:"button",className:"sw-btn sw-btn--primary",onClick:c,children:"View anyway"}),children:[o.jsx("ul",{className:"m-0 flex list-none flex-col divide-y divide-border overflow-hidden rounded-sm border border-border p-0",children:r.map(u=>o.jsxs("li",{className:"flex items-center justify-between gap-4 px-3 py-2.5 text-sm",children:[o.jsx("span",{className:"truncate",children:u.reference}),o.jsx("span",{className:"truncate text-fg-tertiary tabular-nums",children:u.identifier})]},u.reference))}),o.jsxs("p",{className:"m-0 text-sm text-fg-secondary",children:["Add ",r.length===1?"it":"them"," in the Superwall dashboard, or point the config at",r.length===1?" a product":" products"," that exists. Pushing is refused until then."]})]});function wy(l){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css",r.appendChild(c),c.styleSheet?c.styleSheet.cssText=l:c.appendChild(document.createTextNode(l))}const Ey=l=>{switch(l){case"success":return Ty;case"info":return _y;case"warning":return My;case"error":return Cy;default:return null}},jy=Array(12).fill(0),Ny=({visible:l,className:r})=>G.createElement("div",{className:["sonner-loading-wrapper",r].filter(Boolean).join(" "),"data-visible":l},G.createElement("div",{className:"sonner-spinner"},jy.map((c,u)=>G.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${u}`})))),Ty=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),My=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),_y=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Cy=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},G.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Ay=G.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},G.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),G.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Ry=()=>{const[l,r]=G.useState(document.hidden);return G.useEffect(()=>{const c=()=>{r(document.hidden)};return document.addEventListener("visibilitychange",c),()=>window.removeEventListener("visibilitychange",c)},[]),l};let Oc=1;class Oy{constructor(){this.subscribe=r=>(this.subscribers.push(r),()=>{const c=this.subscribers.indexOf(r);this.subscribers.splice(c,1)}),this.publish=r=>{this.subscribers.forEach(c=>c(r))},this.addToast=r=>{this.publish(r),this.toasts=[...this.toasts,r]},this.create=r=>{var c;const{message:u,...g}=r,y=typeof r?.id=="number"||((c=r.id)==null?void 0:c.length)>0?r.id:Oc++,w=this.toasts.find(m=>m.id===y),j=r.dismissible===void 0?!0:r.dismissible;return this.dismissedToasts.has(y)&&this.dismissedToasts.delete(y),w?this.toasts=this.toasts.map(m=>m.id===y?(this.publish({...m,...r,id:y,title:u}),{...m,...r,id:y,dismissible:j,title:u}):m):this.addToast({title:u,...g,dismissible:j,id:y}),y},this.dismiss=r=>(r?(this.dismissedToasts.add(r),requestAnimationFrame(()=>this.subscribers.forEach(c=>c({id:r,dismiss:!0})))):this.toasts.forEach(c=>{this.subscribers.forEach(u=>u({id:c.id,dismiss:!0}))}),r),this.message=(r,c)=>this.create({...c,message:r}),this.error=(r,c)=>this.create({...c,message:r,type:"error"}),this.success=(r,c)=>this.create({...c,type:"success",message:r}),this.info=(r,c)=>this.create({...c,type:"info",message:r}),this.warning=(r,c)=>this.create({...c,type:"warning",message:r}),this.loading=(r,c)=>this.create({...c,type:"loading",message:r}),this.promise=(r,c)=>{if(!c)return;let u;c.loading!==void 0&&(u=this.create({...c,promise:r,type:"loading",message:c.loading,description:typeof c.description!="function"?c.description:void 0}));const g=Promise.resolve(r instanceof Function?r():r);let y=u!==void 0,w;const j=g.then(async d=>{if(w=["resolve",d],G.isValidElement(d))y=!1,this.create({id:u,type:"default",message:d});else if(Dy(d)&&!d.ok){y=!1;const h=typeof c.error=="function"?await c.error(`HTTP error! status: ${d.status}`):c.error,S=typeof c.description=="function"?await c.description(`HTTP error! status: ${d.status}`):c.description,C=typeof h=="object"&&!G.isValidElement(h)?h:{message:h};this.create({id:u,type:"error",description:S,...C})}else if(d instanceof Error){y=!1;const h=typeof c.error=="function"?await c.error(d):c.error,S=typeof c.description=="function"?await c.description(d):c.description,C=typeof h=="object"&&!G.isValidElement(h)?h:{message:h};this.create({id:u,type:"error",description:S,...C})}else if(c.success!==void 0){y=!1;const h=typeof c.success=="function"?await c.success(d):c.success,S=typeof c.description=="function"?await c.description(d):c.description,C=typeof h=="object"&&!G.isValidElement(h)?h:{message:h};this.create({id:u,type:"success",description:S,...C})}}).catch(async d=>{if(w=["reject",d],c.error!==void 0){y=!1;const v=typeof c.error=="function"?await c.error(d):c.error,h=typeof c.description=="function"?await c.description(d):c.description,M=typeof v=="object"&&!G.isValidElement(v)?v:{message:v};this.create({id:u,type:"error",description:h,...M})}}).finally(()=>{y&&(this.dismiss(u),u=void 0),c.finally==null||c.finally.call(c)}),m=()=>new Promise((d,v)=>j.then(()=>w[0]==="reject"?v(w[1]):d(w[1])).catch(v));return typeof u!="string"&&typeof u!="number"?{unwrap:m}:Object.assign(u,{unwrap:m})},this.custom=(r,c)=>{const u=c?.id||Oc++;return this.create({jsx:r(u),id:u,...c}),u},this.getActiveToasts=()=>this.toasts.filter(r=>!this.dismissedToasts.has(r.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Ht=new Oy,zy=(l,r)=>{const c=r?.id||Oc++;return Ht.addToast({title:l,...r,id:c}),c},Dy=l=>l&&typeof l=="object"&&"ok"in l&&typeof l.ok=="boolean"&&"status"in l&&typeof l.status=="number",Uy=zy,Hy=()=>Ht.toasts,By=()=>Ht.getActiveToasts(),wa=Object.assign(Uy,{success:Ht.success,info:Ht.info,warning:Ht.warning,error:Ht.error,custom:Ht.custom,message:Ht.message,promise:Ht.promise,dismiss:Ht.dismiss,loading:Ht.loading},{getHistory:Hy,getToasts:By});wy("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function qs(l){return l.label!==void 0}const Ly=3,ky="24px",Yy="16px",vh=4e3,qy=356,Gy=14,Vy=45,Xy=200;function xa(...l){return l.filter(Boolean).join(" ")}function Qy(l){const[r,c]=l.split("-"),u=[];return r&&u.push(r),c&&u.push(c),u}const Zy=l=>{var r,c,u,g,y,w,j,m,d;const{invert:v,toast:h,unstyled:S,interacting:M,setHeights:C,visibleToasts:V,heights:Y,index:Q,toasts:le,expanded:q,removeToast:X,defaultRichColors:K,closeButton:I,style:ae,cancelButtonStyle:ue,actionButtonStyle:ve,className:se="",descriptionClassName:je="",duration:Ce,position:xe,gap:_e,expandByDefault:de,classNames:A,icons:k,closeButtonAriaLabel:F="Close toast"}=l,[he,x]=G.useState(null),[D,Z]=G.useState(null),[U,J]=G.useState(!1),[ne,te]=G.useState(!1),[qe,re]=G.useState(!1),[st,Rt]=G.useState(!1),[W,P]=G.useState(!1),[Te,Ue]=G.useState(0),[_t,Bt]=G.useState(0),ge=G.useRef(h.duration||Ce||vh),Lt=G.useRef(null),Ge=G.useRef(null),Ct=Q===0,Kt=Q+1<=V,$e=h.type,kt=h.dismissible!==!1,Ea=h.className||"",Ve=h.descriptionClassName||"",Ne=G.useMemo(()=>Y.findIndex(me=>me.toastId===h.id)||0,[Y,h.id]),et=G.useMemo(()=>{var me;return(me=h.closeButton)!=null?me:I},[h.closeButton,I]),Fe=G.useMemo(()=>h.duration||Ce||vh,[h.duration,Ce]),Ae=G.useRef(0),ua=G.useRef(0),ja=G.useRef(0),fa=G.useRef(null),[da,ha]=xe.split("-"),$t=G.useMemo(()=>Y.reduce((me,tt,ot)=>ot>=Ne?me:me+tt.height,0),[Y,Ne]),ma=Ry(),$=h.invert||v,ze=$e==="loading";ua.current=G.useMemo(()=>Ne*_e+$t,[Ne,$t]),G.useEffect(()=>{ge.current=Fe},[Fe]),G.useEffect(()=>{J(!0)},[]),G.useEffect(()=>{const me=Ge.current;if(me){const tt=me.getBoundingClientRect().height;return Bt(tt),C(ot=>[{toastId:h.id,height:tt,position:h.position},...ot]),()=>C(ot=>ot.filter(St=>St.toastId!==h.id))}},[C,h.id]),G.useLayoutEffect(()=>{if(!U)return;const me=Ge.current,tt=me.style.height;me.style.height="auto";const ot=me.getBoundingClientRect().height;me.style.height=tt,Bt(ot),C(St=>St.find(ft=>ft.toastId===h.id)?St.map(ft=>ft.toastId===h.id?{...ft,height:ot}:ft):[{toastId:h.id,height:ot,position:h.position},...St])},[U,h.title,h.description,C,h.id,h.jsx,h.action,h.cancel]);const rt=G.useCallback(()=>{te(!0),Ue(ua.current),C(me=>me.filter(tt=>tt.toastId!==h.id)),setTimeout(()=>{X(h)},Xy)},[h,X,C,ua]);G.useEffect(()=>{if(h.promise&&$e==="loading"||h.duration===1/0||h.type==="loading")return;let me;return q||M||ma?(()=>{if(ja.current<Ae.current){const St=new Date().getTime()-Ae.current;ge.current=ge.current-St}ja.current=new Date().getTime()})():ge.current!==1/0&&(Ae.current=new Date().getTime(),me=setTimeout(()=>{h.onAutoClose==null||h.onAutoClose.call(h,h),rt()},ge.current)),()=>clearTimeout(me)},[q,M,h,$e,ma,rt]),G.useEffect(()=>{h.delete&&(rt(),h.onDismiss==null||h.onDismiss.call(h,h))},[rt,h.delete]);function mt(){var me;if(k?.loading){var tt;return G.createElement("div",{className:xa(A?.loader,h==null||(tt=h.classNames)==null?void 0:tt.loader,"sonner-loader"),"data-visible":$e==="loading"},k.loading)}return G.createElement(Ny,{className:xa(A?.loader,h==null||(me=h.classNames)==null?void 0:me.loader),visible:$e==="loading"})}const xt=h.icon||k?.[$e]||Ey($e);var Nt,_i;return G.createElement("li",{tabIndex:0,ref:Ge,className:xa(se,Ea,A?.toast,h==null||(r=h.classNames)==null?void 0:r.toast,A?.default,A?.[$e],h==null||(c=h.classNames)==null?void 0:c[$e]),"data-sonner-toast":"","data-rich-colors":(Nt=h.richColors)!=null?Nt:K,"data-styled":!(h.jsx||h.unstyled||S),"data-mounted":U,"data-promise":!!h.promise,"data-swiped":W,"data-removed":ne,"data-visible":Kt,"data-y-position":da,"data-x-position":ha,"data-index":Q,"data-front":Ct,"data-swiping":qe,"data-dismissible":kt,"data-type":$e,"data-invert":$,"data-swipe-out":st,"data-swipe-direction":D,"data-expanded":!!(q||de&&U),"data-testid":h.testId,style:{"--index":Q,"--toasts-before":Q,"--z-index":le.length-Q,"--offset":`${ne?Te:ua.current}px`,"--initial-height":de?"auto":`${_t}px`,...ae,...h.style},onDragEnd:()=>{re(!1),x(null),fa.current=null},onPointerDown:me=>{me.button!==2&&(ze||!kt||(Lt.current=new Date,Ue(ua.current),me.target.setPointerCapture(me.pointerId),me.target.tagName!=="BUTTON"&&(re(!0),fa.current={x:me.clientX,y:me.clientY})))},onPointerUp:()=>{var me,tt,ot;if(st||!kt)return;fa.current=null;const St=Number(((me=Ge.current)==null?void 0:me.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),hn=Number(((tt=Ge.current)==null?void 0:tt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ft=new Date().getTime()-((ot=Lt.current)==null?void 0:ot.getTime()),at=he==="x"?St:hn,nt=Math.abs(at)/ft;if(Math.abs(at)>=Vy||nt>.11){Ue(ua.current),h.onDismiss==null||h.onDismiss.call(h,h),Z(he==="x"?St>0?"right":"left":hn>0?"down":"up"),rt(),Rt(!0);return}else{var Qe,pt;(Qe=Ge.current)==null||Qe.style.setProperty("--swipe-amount-x","0px"),(pt=Ge.current)==null||pt.style.setProperty("--swipe-amount-y","0px")}P(!1),re(!1),x(null)},onPointerMove:me=>{var tt,ot,St;if(!fa.current||!kt||((tt=window.getSelection())==null?void 0:tt.toString().length)>0)return;const ft=me.clientY-fa.current.y,at=me.clientX-fa.current.x;var nt;const Qe=(nt=l.swipeDirections)!=null?nt:Qy(xe);!he&&(Math.abs(at)>1||Math.abs(ft)>1)&&x(Math.abs(at)>Math.abs(ft)?"x":"y");let pt={x:0,y:0};const On=Na=>1/(1.5+Math.abs(Na)/20);if(he==="y"){if(Qe.includes("top")||Qe.includes("bottom"))if(Qe.includes("top")&&ft<0||Qe.includes("bottom")&&ft>0)pt.y=ft;else{const Na=ft*On(ft);pt.y=Math.abs(Na)<Math.abs(ft)?Na:ft}}else if(he==="x"&&(Qe.includes("left")||Qe.includes("right")))if(Qe.includes("left")&&at<0||Qe.includes("right")&&at>0)pt.x=at;else{const Na=at*On(at);pt.x=Math.abs(Na)<Math.abs(at)?Na:at}(Math.abs(pt.x)>0||Math.abs(pt.y)>0)&&P(!0),(ot=Ge.current)==null||ot.style.setProperty("--swipe-amount-x",`${pt.x}px`),(St=Ge.current)==null||St.style.setProperty("--swipe-amount-y",`${pt.y}px`)}},et&&!h.jsx&&$e!=="loading"?G.createElement("button",{"aria-label":F,"data-disabled":ze,"data-close-button":!0,onClick:ze||!kt?()=>{}:()=>{rt(),h.onDismiss==null||h.onDismiss.call(h,h)},className:xa(A?.closeButton,h==null||(u=h.classNames)==null?void 0:u.closeButton)},(_i=k?.close)!=null?_i:Ay):null,($e||h.icon||h.promise)&&h.icon!==null&&(k?.[$e]!==null||h.icon)?G.createElement("div",{"data-icon":"",className:xa(A?.icon,h==null||(g=h.classNames)==null?void 0:g.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||mt():null,h.type!=="loading"?xt:null):null,G.createElement("div",{"data-content":"",className:xa(A?.content,h==null||(y=h.classNames)==null?void 0:y.content)},G.createElement("div",{"data-title":"",className:xa(A?.title,h==null||(w=h.classNames)==null?void 0:w.title)},h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title),h.description?G.createElement("div",{"data-description":"",className:xa(je,Ve,A?.description,h==null||(j=h.classNames)==null?void 0:j.description)},typeof h.description=="function"?h.description():h.description):null),G.isValidElement(h.cancel)?h.cancel:h.cancel&&qs(h.cancel)?G.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||ue,onClick:me=>{qs(h.cancel)&&kt&&(h.cancel.onClick==null||h.cancel.onClick.call(h.cancel,me),rt())},className:xa(A?.cancelButton,h==null||(m=h.classNames)==null?void 0:m.cancelButton)},h.cancel.label):null,G.isValidElement(h.action)?h.action:h.action&&qs(h.action)?G.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||ve,onClick:me=>{qs(h.action)&&(h.action.onClick==null||h.action.onClick.call(h.action,me),!me.defaultPrevented&&rt())},className:xa(A?.actionButton,h==null||(d=h.classNames)==null?void 0:d.actionButton)},h.action.label):null)};function yh(){if(typeof window>"u"||typeof document>"u")return"ltr";const l=document.documentElement.getAttribute("dir");return l==="auto"||!l?window.getComputedStyle(document.documentElement).direction:l}function Ky(l,r){const c={};return[l,r].forEach((u,g)=>{const y=g===1,w=y?"--mobile-offset":"--offset",j=y?Yy:ky;function m(d){["top","right","bottom","left"].forEach(v=>{c[`${w}-${v}`]=typeof d=="number"?`${d}px`:d})}typeof u=="number"||typeof u=="string"?m(u):typeof u=="object"?["top","right","bottom","left"].forEach(d=>{u[d]===void 0?c[`${w}-${d}`]=j:c[`${w}-${d}`]=typeof u[d]=="number"?`${u[d]}px`:u[d]}):m(j)}),c}const $y=G.forwardRef(function(r,c){const{id:u,invert:g,position:y="bottom-right",hotkey:w=["altKey","KeyT"],expand:j,closeButton:m,className:d,offset:v,mobileOffset:h,theme:S="light",richColors:M,duration:C,style:V,visibleToasts:Y=Ly,toastOptions:Q,dir:le=yh(),gap:q=Gy,icons:X,containerAriaLabel:K="Notifications"}=r,[I,ae]=G.useState([]),ue=G.useMemo(()=>u?I.filter(U=>U.toasterId===u):I.filter(U=>!U.toasterId),[I,u]),ve=G.useMemo(()=>Array.from(new Set([y].concat(ue.filter(U=>U.position).map(U=>U.position)))),[ue,y]),[se,je]=G.useState([]),[Ce,xe]=G.useState(!1),[_e,de]=G.useState(!1),[A,k]=G.useState(S!=="system"?S:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),F=G.useRef(null),he=w.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=G.useRef(null),D=G.useRef(!1),Z=G.useCallback(U=>{ae(J=>{var ne;return(ne=J.find(te=>te.id===U.id))!=null&&ne.delete||Ht.dismiss(U.id),J.filter(({id:te})=>te!==U.id)})},[]);return G.useEffect(()=>Ht.subscribe(U=>{if(U.dismiss){requestAnimationFrame(()=>{ae(J=>J.map(ne=>ne.id===U.id?{...ne,delete:!0}:ne))});return}setTimeout(()=>{$g.flushSync(()=>{ae(J=>{const ne=J.findIndex(te=>te.id===U.id);return ne!==-1?[...J.slice(0,ne),{...J[ne],...U},...J.slice(ne+1)]:[U,...J]})})})}),[I]),G.useEffect(()=>{if(S!=="system"){k(S);return}if(S==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?k("dark"):k("light")),typeof window>"u")return;const U=window.matchMedia("(prefers-color-scheme: dark)");try{U.addEventListener("change",({matches:J})=>{k(J?"dark":"light")})}catch{U.addListener(({matches:ne})=>{try{k(ne?"dark":"light")}catch(te){console.error(te)}})}},[S]),G.useEffect(()=>{I.length<=1&&xe(!1)},[I]),G.useEffect(()=>{const U=J=>{var ne;if(w.every(re=>J[re]||J.code===re)){var qe;xe(!0),(qe=F.current)==null||qe.focus()}J.code==="Escape"&&(document.activeElement===F.current||(ne=F.current)!=null&&ne.contains(document.activeElement))&&xe(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[w]),G.useEffect(()=>{if(F.current)return()=>{x.current&&(x.current.focus({preventScroll:!0}),x.current=null,D.current=!1)}},[F.current]),G.createElement("section",{ref:c,"aria-label":`${K} ${he}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},ve.map((U,J)=>{var ne;const[te,qe]=U.split("-");return ue.length?G.createElement("ol",{key:U,dir:le==="auto"?yh():le,tabIndex:-1,ref:F,className:d,"data-sonner-toaster":!0,"data-sonner-theme":A,"data-y-position":te,"data-x-position":qe,style:{"--front-toast-height":`${((ne=se[0])==null?void 0:ne.height)||0}px`,"--width":`${qy}px`,"--gap":`${q}px`,...V,...Ky(v,h)},onBlur:re=>{D.current&&!re.currentTarget.contains(re.relatedTarget)&&(D.current=!1,x.current&&(x.current.focus({preventScroll:!0}),x.current=null))},onFocus:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||D.current||(D.current=!0,x.current=re.relatedTarget)},onMouseEnter:()=>xe(!0),onMouseMove:()=>xe(!0),onMouseLeave:()=>{_e||xe(!1)},onDragEnd:()=>xe(!1),onPointerDown:re=>{re.target instanceof HTMLElement&&re.target.dataset.dismissible==="false"||de(!0)},onPointerUp:()=>de(!1)},ue.filter(re=>!re.position&&J===0||re.position===U).map((re,st)=>{var Rt,W;return G.createElement(Zy,{key:re.id,icons:X,index:st,toast:re,defaultRichColors:M,duration:(Rt=Q?.duration)!=null?Rt:C,className:Q?.className,descriptionClassName:Q?.descriptionClassName,invert:g,visibleToasts:Y,closeButton:(W=Q?.closeButton)!=null?W:m,interacting:_e,position:U,style:Q?.style,unstyled:Q?.unstyled,classNames:Q?.classNames,cancelButtonStyle:Q?.cancelButtonStyle,actionButtonStyle:Q?.actionButtonStyle,closeButtonAriaLabel:Q?.closeButtonAriaLabel,removeToast:Z,toasts:ue.filter(P=>P.position==re.position),heights:se.filter(P=>P.position==re.position),setHeights:je,expandByDefault:j,gap:q,expanded:Ce,swipeDirections:r.swipeDirections})})):null}))}),Jy='system-ui, BlinkMacSystemFont, -apple-system, "SF Pro Text", sans-serif',Fy='"Google Sans Text", Roboto, system-ui, sans-serif',E1={iOS:14,Android:12},Wy={iOS:"linear-gradient(160deg, #262a45 0%, #121423 55%, #1b1f33 100%)",Android:"linear-gradient(160deg, #1d1b26 0%, #0f0e14 60%, #17151d 100%)"},Iy=(l,r)=>Math.max(0,r-E1[l]*2),j1=l=>({display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:l,overflow:"hidden",overflowWrap:"anywhere"}),wi={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},Py=new Intl.Segmenter(void 0,{granularity:"grapheme"}),eb=l=>{const[r]=Py.segment(l.trim());return r?r.segment.toUpperCase():"?"},N1=({app:l,size:r,radius:c})=>{const[u,g]=T.useState(!1),y={width:r,height:r,borderRadius:c,flexShrink:0};return l.iconUrl&&!u?o.jsx("img",{src:l.iconUrl,alt:"","data-testid":"notification-icon",style:{...y,objectFit:"cover"},onError:()=>g(!0)}):o.jsx("span",{"aria-hidden":"true","data-testid":"notification-icon-fallback",style:{...y,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r*.45,fontWeight:600,background:"linear-gradient(180deg, #4a4a50 0%, #2c2c30 100%)",color:"#fff"},children:eb(l.name)})},tb=({app:l,notification:r})=>o.jsxs("div",{"data-platform":"iOS",style:{display:"flex",alignItems:"center",gap:12,padding:"11.5px 17px 12.7px 14px",borderRadius:24,background:"rgba(66, 66, 74, 0.5)",backdropFilter:"blur(24px) saturate(1.6)",WebkitBackdropFilter:"blur(24px) saturate(1.6)",boxShadow:"inset 0 0 0 0.5px rgba(255, 255, 255, 0.16)",color:"rgba(255, 255, 255, 0.93)",fontFamily:Jy,fontSize:15,lineHeight:"17.9px"},children:[o.jsx(N1,{app:l,size:38,radius:8}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[o.jsx("span",{"data-part":"title",style:{...wi,flex:1,fontWeight:600},children:r.title}),o.jsx("span",{style:{flexShrink:0,fontSize:13,color:"rgba(255, 255, 255, 0.6)"},children:"now"})]}),r.subtitle&&o.jsx("div",{"data-part":"subtitle",style:{...wi,fontWeight:600},children:r.subtitle}),o.jsx("div",{"data-part":"body",style:j1(4),children:r.body})]})]}),ab=({app:l,notification:r})=>o.jsxs("div",{"data-platform":"Android",style:{display:"flex",alignItems:"flex-start",gap:12,padding:16,borderRadius:28,background:"#2b2930",color:"#e6e0e9",fontFamily:Fy,fontSize:14,lineHeight:"20px"},children:[o.jsx(N1,{app:l,size:36,radius:"50%"}),o.jsxs("div",{style:{flex:1,minWidth:0},children:[o.jsxs("div",{"data-part":"header",style:{display:"flex",gap:4,fontSize:12,lineHeight:"16px",color:"#cac4d0"},children:[o.jsx("span",{style:{...wi,flexShrink:0,maxWidth:"50%"},children:l.name}),r.subtitle&&o.jsxs(o.Fragment,{children:[o.jsx("span",{"aria-hidden":"true",children:"•"}),o.jsx("span",{"data-part":"subtitle",style:wi,children:r.subtitle})]}),o.jsx("span",{"aria-hidden":"true",children:"•"}),o.jsx("span",{style:{flexShrink:0},children:"now"})]}),o.jsx("div",{"data-part":"title",style:{...wi,marginTop:2,fontWeight:500},children:r.title}),o.jsx("div",{"data-part":"body",style:{...j1(2),color:"#cac4d0"},children:r.body})]})]}),nb=({platform:l,screenWidth:r,app:c,notification:u})=>o.jsx("div",{"data-testid":"notification-preview",className:"rounded-sm",style:{width:r,padding:`14px ${E1[l]}px`,background:Wy[l],colorScheme:"dark"},children:o.jsx("div",{"data-part":"card",style:{width:Iy(l,r)},children:l==="iOS"?o.jsx(tb,{app:c,notification:u}):o.jsx(ab,{app:c,notification:u})})}),lb=new Set(["ping","page_view","page_styles","has_set_dom","haptic_feedback","var_click","purchase","restore"]),ib={open_url:["url"],open_url_external:["url"],open_deep_link:["link"],custom_placement:["name"],custom:["name","data"],request_permission:["permission_type"],request_callback:["name"],discount_redemption_result:["code"]},sb=new Set(["close"]),rb=new Set(["stripe_checkout_complete","post_checkout_complete"]),ob=l=>{for(const r of ib[l.event_name]??[]){const c=Reflect.get(l,r);if(typeof c=="string"&&c.length>0)return c}},cb=l=>{if(!lb.has(l.event_name))return{action:l.event_name,subject:ob(l),tone:sb.has(l.event_name)?"warning":rb.has(l.event_name)?"success":"info"}},ub="sw_nav",bh={where:"app",teleported:!1},fb=l=>{try{return new URL(l).searchParams.get(ub)??void 0}catch{return}},db=(l,r)=>{if(r.event_name==="open_url_external"&&r.teleport===!0){const c=fb(r.url);return{place:{where:"browser",teleported:!0,...c===void 0?{}:{route:c}},change:"teleported"}}return l.where!=="browser"?{place:l}:r.event_name==="close"?{place:{where:"app",teleported:!0}}:r.event_name!=="page_view"?{place:l}:r.type==="entry"?{place:{where:"app",teleported:!0}}:l.webDepth===void 0?{place:{...l,route:r.page_name,webDepth:r.flow_position}}:r.flow_position<l.webDepth?{place:{where:"app",teleported:!0},change:"returned"}:{place:{...l,route:r.page_name}}},T1=()=>{let l=bh;const r=new Set,c=u=>{if(u!==l){l=u;for(const g of r)g()}};return{getSnapshot:()=>l,subscribe:u=>(r.add(u),()=>{r.delete(u)}),feed:u=>{const g=db(l,u);return c(g.place),g.change},reset:()=>c(bh)}},xh=l=>{const r=T.useMemo(T1,[]);T.useEffect(()=>r.reset(),[r,l]);const c=T.useSyncExternalStore(r.subscribe,r.getSnapshot);return{tracker:r,place:c}},M1={info:"text-info",success:"text-success",warning:"text-warning"},hb={purchase:xi,transaction_complete:Vs,freeTrial_start:Vs,transaction_abandon:Sa,transaction_fail:Sa,close:Ni,restore:Gh,restore_complete:Vs,restore_fail:Sa,open_url:xl,open_url_external:xl,open_deep_link:xl,initiate_web_checkout:xi,open_payment_sheet:xi,custom_placement:ks,custom:ks,request_permission:ks,request_callback:ks,request_store_review:N2,user_attribute_updated:T2},_1="rounded-sm border border-border bg-popover font-sans text-sm text-foreground",lr=({icon:l,tone:r,children:c,description:u,actions:g})=>o.jsx("div",{className:`w-90 max-w-[calc(100vw-2rem)] py-3 ps-[calc(--spacing(3)-1px)] pe-3 ${_1}`,children:o.jsxs("div",{className:"grid grid-cols-[0.875rem_1fr] items-start gap-x-2",children:[o.jsx("span",{className:`flex h-5 items-center justify-center ${M1[r]}`,children:o.jsx(l,{})}),o.jsxs("span",{className:"flex min-w-0 flex-col gap-0.5",children:[o.jsx("span",{className:"font-medium break-words",children:c}),u&&o.jsx("span",{className:"break-words text-fg-secondary",children:u})]}),g&&o.jsx("div",{className:"col-start-2 mt-2 flex justify-end gap-2",children:g})]})}),Kc=({action:l,tone:r,children:c,actions:u})=>o.jsx(lr,{icon:hb[l]??Lc,tone:r,actions:u,children:c}),mb=({notice:l})=>o.jsxs(Kc,{action:l.action,tone:l.tone,children:["Tap triggered a ",o.jsx(ia,{children:l.action}),l.subject?o.jsxs(o.Fragment,{children:[" for ",o.jsx(ia,{children:l.subject})]}):" action","."]}),pb=({choice:l,subject:r})=>o.jsxs(Kc,{action:l.action,tone:l.tone,children:[o.jsx(ia,{children:r})," ",l.done]}),gb=({action:l,verb:r,subject:c,choices:u,onAnswer:g})=>o.jsxs(Kc,{action:l,tone:"info",actions:u.map(y=>o.jsx("button",{type:"button",className:y.primary?"sw-btn sw-btn--xs sw-btn--primary":"sw-btn sw-btn--xs",onClick:()=>g(y),children:y.label},y.label)),children:["Tap triggered a ",o.jsx(ia,{children:r})," for ",o.jsx(ia,{children:c}),"."]}),vb=[{label:"Abandon",value:"abandoned",action:"transaction_abandon",tone:"warning",done:"purchase abandoned."},{label:"Fail",value:"failed",action:"transaction_fail",tone:"warning",done:"purchase failed."},{label:"Complete",value:"completed",primary:!0,action:"transaction_complete",tone:"success",done:"purchase completed."}],yb=[{label:"Nothing",value:"failed",action:"restore_fail",tone:"warning",done:"nothing to restore."},{label:"Restore",value:"restored",primary:!0,action:"restore_complete",tone:"success",done:"restored."}],bb=[{label:"Deny",value:"denied",action:"request_permission",tone:"warning",done:"denied."},{label:"Grant",value:"granted",primary:!0,action:"request_permission",tone:"success",done:"granted."}],xb=[{label:"Fail",value:"failure",action:"request_callback",tone:"warning",done:"failed."},{label:"Succeed",value:"success",primary:!0,action:"request_callback",tone:"success",done:"succeeded."}],Sh=m1(h1(Xc),!1),C1={platform:Sh.platform,screenWidth:Sh.width,app:{name:"superwall"}},Sb=26,wb=({message:l,target:r,onDismiss:c})=>o.jsxs("div",{className:`relative left-1/2 -translate-x-1/2 p-3 ${_1}`,style:{width:r.screenWidth+Sb},children:[o.jsxs("div",{className:"mb-3 grid grid-cols-[0.875rem_1fr_auto] items-center gap-x-2",children:[o.jsx("span",{className:`flex h-5 items-center justify-center ${M1.info}`,children:o.jsx(j2,{})}),o.jsxs("span",{className:"min-w-0 font-medium",children:["Trial reminder scheduled"," ",o.jsxs("span",{className:"font-normal text-fg-secondary",children:["· ",Zg(l.delay)]})]}),o.jsx("button",{type:"button","aria-label":"Dismiss",className:"sw-btn sw-btn--xs sw-btn--icon sw-btn--ghost",onClick:c,children:o.jsx(Ni,{})})]}),o.jsx(nb,{platform:r.platform,screenWidth:r.screenWidth,app:r.app,notification:{title:l.title,...l.subtitle===void 0?{}:{subtitle:l.subtitle},body:l.body}})]}),Eb=(l,r)=>{const c=`reminder-${l.id}`;wa.custom(()=>o.jsx(wb,{message:l,target:r,onDismiss:()=>wa.dismiss(c)}),{id:c,duration:Number.POSITIVE_INFINITY})},jb=l=>wa.custom(()=>o.jsx(lr,{icon:z2,tone:"info",description:l===void 0?"The preview shows the paywall in Safari, as the shopper sees it.":o.jsxs(o.Fragment,{children:["The preview shows ",o.jsx(ia,{children:l})," in Safari, as the shopper sees it."]}),children:"Teleported to the browser"})),Nb=()=>wa.custom(()=>o.jsx(lr,{icon:D2,tone:"success",description:"The shopper went back from the first web route.",children:"Back in the app"}));let Tb=0;const Gs=(l,r,c,u)=>new Promise(g=>{const y=`${l}-${Tb+=1}`;wa.custom(()=>o.jsx(gb,{action:l,verb:r,subject:c,choices:u,onAnswer:w=>{wa.dismiss(y),wa.custom(()=>o.jsx(pb,{choice:w,subject:c})),g(w.value)}}),{id:y,duration:Number.POSITIVE_INFINITY})}),Mb=(l=()=>C1,r=T1())=>({event:c=>{const u=r.feed(c);if(u==="teleported"){const y=r.getSnapshot();jb(y.where==="browser"?y.route:void 0);return}if(u==="returned"&&Nb(),c.event_name==="schedule_notification"){Eb(c,l());return}const g=cb(c);g&&wa.custom(()=>o.jsx(mb,{notice:g}))},purchase:c=>Gs("purchase","purchase",c.reference,vb),restore:()=>Gs("restore","restore","purchases",yb),close:()=>{},openUrl:()=>{},custom:()=>{},customPlacement:()=>{},permission:c=>Gs("request_permission","permission",c,bb),callback:c=>Gs("request_callback","callback",c,xb).then(u=>({status:u}))}),wh=(l,r)=>{const c=T.useRef(l);return c.current=l,T.useMemo(()=>Mb(()=>c.current??C1,r),[r])},_b=({surfaceKey:l,raised:r=!1})=>(T.useEffect(()=>{wa.dismiss()},[l]),o.jsx($y,{position:"top-center",swipeDirections:["top"],offset:r?101:64,gap:12,visibleToasts:3,style:{zIndex:5},toastOptions:{unstyled:!0,classNames:{toast:"w-full"}}})),Cb={info:Lc,success:Vs,warning:Sa},Eh=(l,{tone:r="info",description:c}={})=>{wa.custom(()=>o.jsx(lr,{icon:Cb[r],tone:r,description:c,children:l}))},A1=T.createContext(void 0),R1=()=>{const l=T.useContext(A1);if(!l)throw new Error("Studio components must be rendered inside <StudioHostProvider>.");return l},Ab=({mode:l,home:r,children:c})=>{const{href:u,navigate:g}=r,y=T.useMemo(()=>({mode:l,home:{href:u,navigate:g}}),[l,u,g]);return o.jsx(A1.Provider,{value:y,children:c})},$c=()=>R1().mode,Rb=()=>R1().home,Ob={checking:"Looking for a screenshot…",none:"This paywall has no live version yet. Screenshots are captured from the published document, so promote a pushed version before downloading one.",unreachable:"Couldn’t reach the screenshot service."},jh=(l,r)=>{const c=document.createElement("a");c.href=l,r===void 0?(c.target="_blank",c.rel="noreferrer"):c.download=r,c.click()},zb=(l,r,c,u)=>{if(u)return`${l.id}.png`;const g=r.label.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return`${l.id}-${g||`page-${c+1}`}.png`},Db=({source:l,surface:r})=>{const c=$c()==="hosted",[u,g]=T.useState({status:"checking"}),[y,w]=T.useState(!1),[j,m]=T.useState(!1),d=T.useRef(null),v=T.useRef(null),h=T.useMemo(()=>[d,v],[]);Ti(h,j,()=>m(!1));const S=Gc(d,j),M=c?l.screenshots:X2;T.useEffect(()=>{if(M===void 0){g({status:"none"});return}let q=!1;return g({status:"checking"}),M(r).then(X=>{q||g(X===void 0||X.length===0?{status:"none"}:{status:"ready",shots:X})},X=>{q||g({status:"unreachable",reason:X instanceof Error?X.message:String(X)})}),()=>{q=!0}},[M,r]);const C=async(q,X,K)=>{m(!1),w(!0);try{const I=await fetch(c?X.url:`/__studio/screenshot${la(r)}?download=1&page=${K}`);if(!I.ok)throw new Error(`${c?"the image host":"the dev server"} answered ${I.status}`);const ae=URL.createObjectURL(await I.blob());jh(ae,zb(r,X,K,q.length===1)),URL.revokeObjectURL(ae)}catch(I){c?(jh(X.url),Eh("Opened the screenshot in a new tab",{description:"Save it from there."})):Eh("Couldn’t download screenshot",{tone:"warning",description:I instanceof Error?I.message:String(I)})}finally{w(!1)}},V=()=>{if(u.status!=="ready"||y)return;const[q]=u.shots;if(q!==void 0&&u.shots.length===1){C(u.shots,q,0);return}m(X=>!X)},Y=u.status==="ready"?u.shots:[],Q=u.status!=="ready"||y,le=y||j?void 0:u.status==="ready"?"Download screenshot":u.status==="unreachable"?u.reason:Ob[u.status];return o.jsxs("div",{className:"relative flex",ref:d,children:[o.jsx(wl,{hint:le,children:o.jsx("button",{className:"sw-btn sw-btn--sm sw-btn--icon sw-btn--ghost",type:"button","aria-label":"Download screenshot","aria-disabled":Q,"aria-busy":y||void 0,"aria-expanded":Y.length>1?j:void 0,onClick:V,children:y?o.jsx(Ps,{}):o.jsx(b2,{})})}),j&&o.jsx(Mi,{popupRef:v,anchor:d,side:"bottom",align:S,className:"w-64",children:o.jsxs("div",{className:"flex max-h-80 scroll-fade flex-col overflow-y-auto p-1","data-menu-list":"",children:[o.jsx(a1,{children:"Download a page"}),Y.map((q,X)=>o.jsx(ji,{label:q.label,onSelect:()=>{C(Y,q,X)}},`${X}:${q.url}`))]})})]})};var Ub=Object.defineProperty,Is=Object.getOwnPropertySymbols,O1=Object.prototype.hasOwnProperty,z1=Object.prototype.propertyIsEnumerable,Nh=(l,r,c)=>r in l?Ub(l,r,{enumerable:!0,configurable:!0,writable:!0,value:c}):l[r]=c,zc=(l,r)=>{for(var c in r||(r={}))O1.call(r,c)&&Nh(l,c,r[c]);if(Is)for(var c of Is(r))z1.call(r,c)&&Nh(l,c,r[c]);return l},Dc=(l,r)=>{var c={};for(var u in l)O1.call(l,u)&&r.indexOf(u)<0&&(c[u]=l[u]);if(l!=null&&Is)for(var u of Is(l))r.indexOf(u)<0&&z1.call(l,u)&&(c[u]=l[u]);return c};var Rn;(l=>{const r=class Ee{constructor(m,d,v,h){if(this.version=m,this.errorCorrectionLevel=d,this.modules=[],this.isFunction=[],m<Ee.MIN_VERSION||m>Ee.MAX_VERSION)throw new RangeError("Version value out of range");if(h<-1||h>7)throw new RangeError("Mask value out of range");this.size=m*4+17;let S=[];for(let C=0;C<this.size;C++)S.push(!1);for(let C=0;C<this.size;C++)this.modules.push(S.slice()),this.isFunction.push(S.slice());this.drawFunctionPatterns();const M=this.addEccAndInterleave(v);if(this.drawCodewords(M),h==-1){let C=1e9;for(let V=0;V<8;V++){this.applyMask(V),this.drawFormatBits(V);const Y=this.getPenaltyScore();Y<C&&(h=V,C=Y),this.applyMask(V)}}g(0<=h&&h<=7),this.mask=h,this.applyMask(h),this.drawFormatBits(h),this.isFunction=[]}static encodeText(m,d){const v=l.QrSegment.makeSegments(m);return Ee.encodeSegments(v,d)}static encodeBinary(m,d){const v=l.QrSegment.makeBytes(m);return Ee.encodeSegments([v],d)}static encodeSegments(m,d,v=1,h=40,S=-1,M=!0){if(!(Ee.MIN_VERSION<=v&&v<=h&&h<=Ee.MAX_VERSION)||S<-1||S>7)throw new RangeError("Invalid value");let C,V;for(C=v;;C++){const q=Ee.getNumDataCodewords(C,d)*8,X=w.getTotalBits(m,C);if(X<=q){V=X;break}if(C>=h)throw new RangeError("Data too long")}for(const q of[Ee.Ecc.MEDIUM,Ee.Ecc.QUARTILE,Ee.Ecc.HIGH])M&&V<=Ee.getNumDataCodewords(C,q)*8&&(d=q);let Y=[];for(const q of m){c(q.mode.modeBits,4,Y),c(q.numChars,q.mode.numCharCountBits(C),Y);for(const X of q.getData())Y.push(X)}g(Y.length==V);const Q=Ee.getNumDataCodewords(C,d)*8;g(Y.length<=Q),c(0,Math.min(4,Q-Y.length),Y),c(0,(8-Y.length%8)%8,Y),g(Y.length%8==0);for(let q=236;Y.length<Q;q^=253)c(q,8,Y);let le=[];for(;le.length*8<Y.length;)le.push(0);return Y.forEach((q,X)=>le[X>>>3]|=q<<7-(X&7)),new Ee(C,d,le,S)}getModule(m,d){return 0<=m&&m<this.size&&0<=d&&d<this.size&&this.modules[d][m]}getModules(){return this.modules}drawFunctionPatterns(){for(let v=0;v<this.size;v++)this.setFunctionModule(6,v,v%2==0),this.setFunctionModule(v,6,v%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const m=this.getAlignmentPatternPositions(),d=m.length;for(let v=0;v<d;v++)for(let h=0;h<d;h++)v==0&&h==0||v==0&&h==d-1||v==d-1&&h==0||this.drawAlignmentPattern(m[v],m[h]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(m){const d=this.errorCorrectionLevel.formatBits<<3|m;let v=d;for(let S=0;S<10;S++)v=v<<1^(v>>>9)*1335;const h=(d<<10|v)^21522;g(h>>>15==0);for(let S=0;S<=5;S++)this.setFunctionModule(8,S,u(h,S));this.setFunctionModule(8,7,u(h,6)),this.setFunctionModule(8,8,u(h,7)),this.setFunctionModule(7,8,u(h,8));for(let S=9;S<15;S++)this.setFunctionModule(14-S,8,u(h,S));for(let S=0;S<8;S++)this.setFunctionModule(this.size-1-S,8,u(h,S));for(let S=8;S<15;S++)this.setFunctionModule(8,this.size-15+S,u(h,S));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let m=this.version;for(let v=0;v<12;v++)m=m<<1^(m>>>11)*7973;const d=this.version<<12|m;g(d>>>18==0);for(let v=0;v<18;v++){const h=u(d,v),S=this.size-11+v%3,M=Math.floor(v/3);this.setFunctionModule(S,M,h),this.setFunctionModule(M,S,h)}}drawFinderPattern(m,d){for(let v=-4;v<=4;v++)for(let h=-4;h<=4;h++){const S=Math.max(Math.abs(h),Math.abs(v)),M=m+h,C=d+v;0<=M&&M<this.size&&0<=C&&C<this.size&&this.setFunctionModule(M,C,S!=2&&S!=4)}}drawAlignmentPattern(m,d){for(let v=-2;v<=2;v++)for(let h=-2;h<=2;h++)this.setFunctionModule(m+h,d+v,Math.max(Math.abs(h),Math.abs(v))!=1)}setFunctionModule(m,d,v){this.modules[d][m]=v,this.isFunction[d][m]=!0}addEccAndInterleave(m){const d=this.version,v=this.errorCorrectionLevel;if(m.length!=Ee.getNumDataCodewords(d,v))throw new RangeError("Invalid argument");const h=Ee.NUM_ERROR_CORRECTION_BLOCKS[v.ordinal][d],S=Ee.ECC_CODEWORDS_PER_BLOCK[v.ordinal][d],M=Math.floor(Ee.getNumRawDataModules(d)/8),C=h-M%h,V=Math.floor(M/h);let Y=[];const Q=Ee.reedSolomonComputeDivisor(S);for(let q=0,X=0;q<h;q++){let K=m.slice(X,X+V-S+(q<C?0:1));X+=K.length;const I=Ee.reedSolomonComputeRemainder(K,Q);q<C&&K.push(0),Y.push(K.concat(I))}let le=[];for(let q=0;q<Y[0].length;q++)Y.forEach((X,K)=>{(q!=V-S||K>=C)&&le.push(X[q])});return g(le.length==M),le}drawCodewords(m){if(m.length!=Math.floor(Ee.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let d=0;for(let v=this.size-1;v>=1;v-=2){v==6&&(v=5);for(let h=0;h<this.size;h++)for(let S=0;S<2;S++){const M=v-S,V=(v+1&2)==0?this.size-1-h:h;!this.isFunction[V][M]&&d<m.length*8&&(this.modules[V][M]=u(m[d>>>3],7-(d&7)),d++)}}g(d==m.length*8)}applyMask(m){if(m<0||m>7)throw new RangeError("Mask value out of range");for(let d=0;d<this.size;d++)for(let v=0;v<this.size;v++){let h;switch(m){case 0:h=(v+d)%2==0;break;case 1:h=d%2==0;break;case 2:h=v%3==0;break;case 3:h=(v+d)%3==0;break;case 4:h=(Math.floor(v/3)+Math.floor(d/2))%2==0;break;case 5:h=v*d%2+v*d%3==0;break;case 6:h=(v*d%2+v*d%3)%2==0;break;case 7:h=((v+d)%2+v*d%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[d][v]&&h&&(this.modules[d][v]=!this.modules[d][v])}}getPenaltyScore(){let m=0;for(let S=0;S<this.size;S++){let M=!1,C=0,V=[0,0,0,0,0,0,0];for(let Y=0;Y<this.size;Y++)this.modules[S][Y]==M?(C++,C==5?m+=Ee.PENALTY_N1:C>5&&m++):(this.finderPenaltyAddHistory(C,V),M||(m+=this.finderPenaltyCountPatterns(V)*Ee.PENALTY_N3),M=this.modules[S][Y],C=1);m+=this.finderPenaltyTerminateAndCount(M,C,V)*Ee.PENALTY_N3}for(let S=0;S<this.size;S++){let M=!1,C=0,V=[0,0,0,0,0,0,0];for(let Y=0;Y<this.size;Y++)this.modules[Y][S]==M?(C++,C==5?m+=Ee.PENALTY_N1:C>5&&m++):(this.finderPenaltyAddHistory(C,V),M||(m+=this.finderPenaltyCountPatterns(V)*Ee.PENALTY_N3),M=this.modules[Y][S],C=1);m+=this.finderPenaltyTerminateAndCount(M,C,V)*Ee.PENALTY_N3}for(let S=0;S<this.size-1;S++)for(let M=0;M<this.size-1;M++){const C=this.modules[S][M];C==this.modules[S][M+1]&&C==this.modules[S+1][M]&&C==this.modules[S+1][M+1]&&(m+=Ee.PENALTY_N2)}let d=0;for(const S of this.modules)d=S.reduce((M,C)=>M+(C?1:0),d);const v=this.size*this.size,h=Math.ceil(Math.abs(d*20-v*10)/v)-1;return g(0<=h&&h<=9),m+=h*Ee.PENALTY_N4,g(0<=m&&m<=2568888),m}getAlignmentPatternPositions(){if(this.version==1)return[];{const m=Math.floor(this.version/7)+2,d=this.version==32?26:Math.ceil((this.version*4+4)/(m*2-2))*2;let v=[6];for(let h=this.size-7;v.length<m;h-=d)v.splice(1,0,h);return v}}static getNumRawDataModules(m){if(m<Ee.MIN_VERSION||m>Ee.MAX_VERSION)throw new RangeError("Version number out of range");let d=(16*m+128)*m+64;if(m>=2){const v=Math.floor(m/7)+2;d-=(25*v-10)*v-55,m>=7&&(d-=36)}return g(208<=d&&d<=29648),d}static getNumDataCodewords(m,d){return Math.floor(Ee.getNumRawDataModules(m)/8)-Ee.ECC_CODEWORDS_PER_BLOCK[d.ordinal][m]*Ee.NUM_ERROR_CORRECTION_BLOCKS[d.ordinal][m]}static reedSolomonComputeDivisor(m){if(m<1||m>255)throw new RangeError("Degree out of range");let d=[];for(let h=0;h<m-1;h++)d.push(0);d.push(1);let v=1;for(let h=0;h<m;h++){for(let S=0;S<d.length;S++)d[S]=Ee.reedSolomonMultiply(d[S],v),S+1<d.length&&(d[S]^=d[S+1]);v=Ee.reedSolomonMultiply(v,2)}return d}static reedSolomonComputeRemainder(m,d){let v=d.map(h=>0);for(const h of m){const S=h^v.shift();v.push(0),d.forEach((M,C)=>v[C]^=Ee.reedSolomonMultiply(M,S))}return v}static reedSolomonMultiply(m,d){if(m>>>8||d>>>8)throw new RangeError("Byte out of range");let v=0;for(let h=7;h>=0;h--)v=v<<1^(v>>>7)*285,v^=(d>>>h&1)*m;return g(v>>>8==0),v}finderPenaltyCountPatterns(m){const d=m[1];g(d<=this.size*3);const v=d>0&&m[2]==d&&m[3]==d*3&&m[4]==d&&m[5]==d;return(v&&m[0]>=d*4&&m[6]>=d?1:0)+(v&&m[6]>=d*4&&m[0]>=d?1:0)}finderPenaltyTerminateAndCount(m,d,v){return m&&(this.finderPenaltyAddHistory(d,v),d=0),d+=this.size,this.finderPenaltyAddHistory(d,v),this.finderPenaltyCountPatterns(v)}finderPenaltyAddHistory(m,d){d[0]==0&&(m+=this.size),d.pop(),d.unshift(m)}};r.MIN_VERSION=1,r.MAX_VERSION=40,r.PENALTY_N1=3,r.PENALTY_N2=3,r.PENALTY_N3=40,r.PENALTY_N4=10,r.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],r.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],l.QrCode=r;function c(j,m,d){if(m<0||m>31||j>>>m)throw new RangeError("Value out of range");for(let v=m-1;v>=0;v--)d.push(j>>>v&1)}function u(j,m){return(j>>>m&1)!=0}function g(j){if(!j)throw new Error("Assertion error")}const y=class Pe{constructor(m,d,v){if(this.mode=m,this.numChars=d,this.bitData=v,d<0)throw new RangeError("Invalid argument");this.bitData=v.slice()}static makeBytes(m){let d=[];for(const v of m)c(v,8,d);return new Pe(Pe.Mode.BYTE,m.length,d)}static makeNumeric(m){if(!Pe.isNumeric(m))throw new RangeError("String contains non-numeric characters");let d=[];for(let v=0;v<m.length;){const h=Math.min(m.length-v,3);c(parseInt(m.substring(v,v+h),10),h*3+1,d),v+=h}return new Pe(Pe.Mode.NUMERIC,m.length,d)}static makeAlphanumeric(m){if(!Pe.isAlphanumeric(m))throw new RangeError("String contains unencodable characters in alphanumeric mode");let d=[],v;for(v=0;v+2<=m.length;v+=2){let h=Pe.ALPHANUMERIC_CHARSET.indexOf(m.charAt(v))*45;h+=Pe.ALPHANUMERIC_CHARSET.indexOf(m.charAt(v+1)),c(h,11,d)}return v<m.length&&c(Pe.ALPHANUMERIC_CHARSET.indexOf(m.charAt(v)),6,d),new Pe(Pe.Mode.ALPHANUMERIC,m.length,d)}static makeSegments(m){return m==""?[]:Pe.isNumeric(m)?[Pe.makeNumeric(m)]:Pe.isAlphanumeric(m)?[Pe.makeAlphanumeric(m)]:[Pe.makeBytes(Pe.toUtf8ByteArray(m))]}static makeEci(m){let d=[];if(m<0)throw new RangeError("ECI assignment value out of range");if(m<128)c(m,8,d);else if(m<16384)c(2,2,d),c(m,14,d);else if(m<1e6)c(6,3,d),c(m,21,d);else throw new RangeError("ECI assignment value out of range");return new Pe(Pe.Mode.ECI,0,d)}static isNumeric(m){return Pe.NUMERIC_REGEX.test(m)}static isAlphanumeric(m){return Pe.ALPHANUMERIC_REGEX.test(m)}getData(){return this.bitData.slice()}static getTotalBits(m,d){let v=0;for(const h of m){const S=h.mode.numCharCountBits(d);if(h.numChars>=1<<S)return 1/0;v+=4+S+h.bitData.length}return v}static toUtf8ByteArray(m){m=encodeURI(m);let d=[];for(let v=0;v<m.length;v++)m.charAt(v)!="%"?d.push(m.charCodeAt(v)):(d.push(parseInt(m.substring(v+1,v+3),16)),v+=2);return d}};y.NUMERIC_REGEX=/^[0-9]*$/,y.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,y.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let w=y;l.QrSegment=y})(Rn||(Rn={}));(l=>{(r=>{const c=class{constructor(g,y){this.ordinal=g,this.formatBits=y}};c.LOW=new c(0,1),c.MEDIUM=new c(1,0),c.QUARTILE=new c(2,3),c.HIGH=new c(3,2),r.Ecc=c})(l.QrCode||(l.QrCode={}))})(Rn||(Rn={}));(l=>{(r=>{const c=class{constructor(g,y){this.modeBits=g,this.numBitsCharCount=y}numCharCountBits(g){return this.numBitsCharCount[Math.floor((g+7)/17)]}};c.NUMERIC=new c(1,[10,12,14]),c.ALPHANUMERIC=new c(2,[9,11,13]),c.BYTE=new c(4,[8,16,16]),c.KANJI=new c(8,[8,10,12]),c.ECI=new c(7,[0,0,0]),r.Mode=c})(l.QrSegment||(l.QrSegment={}))})(Rn||(Rn={}));var bl=Rn;var Hb={L:bl.QrCode.Ecc.LOW,M:bl.QrCode.Ecc.MEDIUM,Q:bl.QrCode.Ecc.QUARTILE,H:bl.QrCode.Ecc.HIGH},D1=128,U1="L",H1="#FFFFFF",B1="#000000",L1=!1,k1=1,Bb=4,Lb=0,kb=.1;function Y1(l,r=0){const c=[];return l.forEach(function(u,g){let y=null;u.forEach(function(w,j){if(!w&&y!==null){c.push(`M${y+r} ${g+r}h${j-y}v1H${y+r}z`),y=null;return}if(j===u.length-1){if(!w)return;y===null?c.push(`M${j+r},${g+r} h1v1H${j+r}z`):c.push(`M${y+r},${g+r} h${j+1-y}v1H${y+r}z`);return}w&&y===null&&(y=j)})}),c.join("")}function q1(l,r){return l.slice().map((c,u)=>u<r.y||u>=r.y+r.h?c:c.map((g,y)=>y<r.x||y>=r.x+r.w?g:!1))}function Yb(l,r,c,u){if(u==null)return null;const g=l.length+c*2,y=Math.floor(r*kb),w=g/r,j=(u.width||y)*w,m=(u.height||y)*w,d=u.x==null?l.length/2-j/2:u.x*w,v=u.y==null?l.length/2-m/2:u.y*w,h=u.opacity==null?1:u.opacity;let S=null;if(u.excavate){let C=Math.floor(d),V=Math.floor(v),Y=Math.ceil(j+d-C),Q=Math.ceil(m+v-V);S={x:C,y:V,w:Y,h:Q}}const M=u.crossOrigin;return{x:d,y:v,h:m,w:j,excavation:S,opacity:h,crossOrigin:M}}function qb(l,r){return r!=null?Math.max(Math.floor(r),0):l?Bb:Lb}function G1({value:l,level:r,minVersion:c,includeMargin:u,marginSize:g,imageSettings:y,size:w,boostLevel:j}){let m=G.useMemo(()=>{const C=(Array.isArray(l)?l:[l]).reduce((V,Y)=>(V.push(...bl.QrSegment.makeSegments(Y)),V),[]);return bl.QrCode.encodeSegments(C,Hb[r],c,void 0,void 0,j)},[l,r,c,j]);const{cells:d,margin:v,numCells:h,calculatedImageSettings:S}=G.useMemo(()=>{let M=m.getModules();const C=qb(u,g),V=M.length+C*2,Y=Yb(M,w,C,y);return{cells:M,margin:C,numCells:V,calculatedImageSettings:Y}},[m,w,y,u,g]);return{qrcode:m,margin:v,cells:d,numCells:h,calculatedImageSettings:S}}var Gb=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),Vb=G.forwardRef(function(r,c){const u=r,{value:g,size:y=D1,level:w=U1,bgColor:j=H1,fgColor:m=B1,includeMargin:d=L1,minVersion:v=k1,boostLevel:h,marginSize:S,imageSettings:M}=u,V=Dc(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:Y}=V,Q=Dc(V,["style"]),le=M?.src,q=G.useRef(null),X=G.useRef(null),K=G.useCallback(_e=>{q.current=_e,typeof c=="function"?c(_e):c&&(c.current=_e)},[c]),[I,ae]=G.useState(!1),{margin:ue,cells:ve,numCells:se,calculatedImageSettings:je}=G1({value:g,level:w,minVersion:v,boostLevel:h,includeMargin:d,marginSize:S,imageSettings:M,size:y});G.useEffect(()=>{if(q.current!=null){const _e=q.current,de=_e.getContext("2d");if(!de)return;let A=ve;const k=X.current,F=je!=null&&k!==null&&k.complete&&k.naturalHeight!==0&&k.naturalWidth!==0;F&&je.excavation!=null&&(A=q1(ve,je.excavation));const he=window.devicePixelRatio||1;_e.height=_e.width=y*he;const x=y/se*he;de.scale(x,x),de.fillStyle=j,de.fillRect(0,0,se,se),de.fillStyle=m,Gb?de.fill(new Path2D(Y1(A,ue))):ve.forEach(function(D,Z){D.forEach(function(U,J){U&&de.fillRect(J+ue,Z+ue,1,1)})}),je&&(de.globalAlpha=je.opacity),F&&de.drawImage(k,je.x+ue,je.y+ue,je.w,je.h)}}),G.useEffect(()=>{ae(!1)},[le]);const Ce=zc({height:y,width:y},Y);let xe=null;return le!=null&&(xe=G.createElement("img",{src:le,key:le,style:{display:"none"},onLoad:()=>{ae(!0)},ref:X,crossOrigin:je?.crossOrigin})),G.createElement(G.Fragment,null,G.createElement("canvas",zc({style:Ce,height:y,width:y,ref:K,role:"img"},Q)),xe)});Vb.displayName="QRCodeCanvas";var V1=G.forwardRef(function(r,c){const u=r,{value:g,size:y=D1,level:w=U1,bgColor:j=H1,fgColor:m=B1,includeMargin:d=L1,minVersion:v=k1,boostLevel:h,title:S,marginSize:M,imageSettings:C}=u,V=Dc(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:Y,cells:Q,numCells:le,calculatedImageSettings:q}=G1({value:g,level:w,minVersion:v,boostLevel:h,includeMargin:d,marginSize:M,imageSettings:C,size:y});let X=Q,K=null;C!=null&&q!=null&&(q.excavation!=null&&(X=q1(Q,q.excavation)),K=G.createElement("image",{href:C.src,height:q.h,width:q.w,x:q.x+Y,y:q.y+Y,preserveAspectRatio:"none",opacity:q.opacity,crossOrigin:q.crossOrigin}));const I=Y1(X,Y);return G.createElement("svg",zc({height:y,width:y,viewBox:`0 0 ${le} ${le}`,ref:c,role:"img"},V),!!S&&G.createElement("title",null,S),G.createElement("path",{fill:j,d:`M0,0 h${le}v${le}H0z`,shapeRendering:"crispEdges"}),G.createElement("path",{fill:m,d:I,shapeRendering:"crispEdges"}),K)});V1.displayName="QRCodeSVG";const X1="superwall-device-scheme",Q1=()=>{try{return window.localStorage.getItem(X1)??void 0}catch{return}},Z1=l=>{try{window.localStorage.setItem(X1,l)}catch{}},Uc=(l,r,c)=>{const u=c===void 0?"":`&superwall_dev_surface=${encodeURIComponent(c)}`;return`${l}://?superwall_dev=${encodeURIComponent(r)}${u}`},Xb=l=>{const c=window.prompt("Your app’s URL scheme, so this can open it:",l)?.trim();if(!(c===void 0||c===""))return Z1(c),c},Qb=({source:l,surface:r})=>{const c=$c()==="hosted",[u,g]=T.useState(!1),[y,w]=T.useState(()=>Q1()??l.scheme),[j,m]=T.useState({status:"loading"});return T.useEffect(()=>{if(u){if(c){const d=l.previewLink;if(d===void 0){m({status:"unavailable",reason:"This studio can’t open paywalls on a device."});return}let v=!1;return m({status:"loading"}),d(r).then(h=>{v||m({status:"ready",url:h})},h=>{v||m({status:"unavailable",reason:String(h)})}),()=>{v=!0}}if(y===void 0){m({status:"unavailable",reason:"Set your app’s URL scheme to build a link."});return}m({status:"ready",url:Uc(y,l.networkOrigin??window.location.origin,r.id)})}},[u,c,y,l,r]),o.jsxs(o.Fragment,{children:[o.jsxs("button",{className:"sw-btn sw-btn--sm max-sm:w-7 max-sm:px-0",type:"button","aria-label":"Preview",onClick:()=>g(!0),children:[o.jsx(R2,{}),o.jsx("span",{className:"max-sm:hidden",children:"Preview"})]}),u&&o.jsx(w1,{title:"Preview on a device",description:c?"Scan with the device that has your app installed. It opens the live paywall in the SDK’s debugger.":"Scan with the device that has your app installed. It opens this paywall against this machine’s dev server.",onClose:()=>g(!1),footer:o.jsxs(o.Fragment,{children:[!c&&o.jsx("button",{className:"sw-btn",type:"button",onClick:()=>{const d=Xb(y??"");d!==void 0&&w(d)},children:y===void 0?"Set URL scheme":"Edit URL scheme"}),j.status==="ready"&&o.jsxs("a",{className:"sw-btn sw-btn--primary sm:ml-auto",href:j.url,...c?{target:"_blank",rel:"noreferrer"}:{},children:[o.jsx(xl,{}),c?"Open preview":"Open in app"]})]}),children:o.jsx("div",{className:"flex flex-col items-center gap-3 py-2",children:j.status==="ready"?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"rounded-sm bg-foreground p-3",children:o.jsx(V1,{value:j.url,size:192})}),!c&&o.jsx("span",{className:"max-w-full text-center text-xs break-all text-fg-tertiary",children:j.url})]}):o.jsx("div",{className:"flex size-54 flex-none flex-col items-center justify-center gap-2 rounded-sm border border-border bg-card px-6 text-center text-xs text-fg-tertiary",children:j.status==="loading"?o.jsxs(o.Fragment,{children:[o.jsx(Ps,{}),"Building a link…"]}):j.reason})})})]})},K1=T.createContext("default"),Zb=({value:l,options:r,onChange:c,label:u})=>{const g=T.useRef(new Map),[y,w]=T.useState(void 0);return T.useLayoutEffect(()=>{const j=g.current.get(l);w(j?{left:j.offsetLeft,width:j.offsetWidth}:void 0)},[l,r]),o.jsx("div",{className:"flex h-8 flex-none rounded-sm border border-border p-0.5",role:"group","aria-label":u,children:o.jsxs("div",{className:"relative flex gap-0.5",children:[y&&o.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 rounded-[1px] bg-primary/10 transition-[left,width] duration-move ease-out motion-reduce:transition-none",style:y}),r.map(j=>{const m=j.value===l;return o.jsx("button",{ref:d=>{d?g.current.set(j.value,d):g.current.delete(j.value)},type:"button","aria-pressed":m,"aria-label":j.name,className:`relative z-10 flex h-6.5 min-w-6.5 items-center justify-center gap-2 rounded-[1px] border border-transparent px-[calc(--spacing(2.5)-1px)] text-sm whitespace-nowrap transition-colors duration-hover focus-visible:border-primary ${m?"text-primary":"text-fg-tertiary hover:text-foreground [&:not(:hover)>svg]:icon-tertiary"}`,onClick:()=>c(j.value),children:j.label},j.value)})]})})},Th=({value:l,options:r,onChange:c,label:u,size:g})=>{const y=T.useContext(K1),w=(g??y)==="sm";return o.jsxs("span",{className:"relative inline-flex flex-none",children:[o.jsx("select",{className:`sw-select bg-card bg-linear-to-b from-transparent to-transparent transition-[border-color,--tw-gradient-from,--tw-gradient-to] duration-hover hover:not-focus-visible:border-foreground/20 hover:from-foreground/3 hover:to-foreground/3 ${w?"sw-select--sm":""}`,"aria-label":u,value:l,onChange:j=>c(j.target.value),children:r.map(j=>o.jsx("option",{value:j.value,children:j.label},j.value))}),o.jsx(Xh,{className:`icon-tertiary pointer-events-none absolute top-1/2 -translate-y-1/2 ${w?"right-[calc(--spacing(2.5)-1px)]":"right-[calc(--spacing(3)-1px)]"}`})]})},$1=({checked:l,onChange:r,label:c})=>o.jsx("button",{type:"button",role:"switch","aria-checked":l,"aria-label":c,className:`inline-flex h-4.5 w-7.5 flex-none items-center rounded-full border border-transparent transition-colors duration-hover ${l?"bg-primary focus-visible:border-foreground":"bg-secondary focus-visible:border-primary"}`,onClick:()=>r(!l),children:o.jsx("span",{"aria-hidden":"true",className:`block size-4 rounded-full transition-[translate,background-color] duration-hover ${l?"translate-x-3 bg-primary-foreground":"bg-fg-tertiary"}`})}),Kb={outline:"border-border text-fg-tertiary",success:"border-transparent bg-success/16 text-success-foreground"},$b=({variant:l,children:r})=>o.jsx("span",{className:`inline-flex h-5 min-w-5 flex-none items-center justify-center rounded-sm border px-[calc(--spacing(1.5)-1px)] text-[0.75rem]/4 font-medium tabular-nums whitespace-nowrap ${Kb[l]}`,children:r}),Jb=({open:l,title:r,onClose:c,children:u})=>o.jsx("aside",{className:`flex-none overflow-hidden transition-[width] duration-move ease-out motion-reduce:transition-none ${l?"w-80":"w-0"}`,"aria-hidden":!l,inert:!l,children:o.jsxs("div",{className:"flex h-full w-80 flex-col border-l border-border bg-background",children:[o.jsxs("div",{className:"flex h-12 flex-none items-center justify-between border-b border-border ps-4 pe-2.5",children:[o.jsx("span",{className:"text-sm font-medium",children:r}),o.jsx("button",{type:"button",className:"sw-btn sw-btn--sm sw-btn--icon sw-btn--ghost","aria-label":`Close ${r.toLowerCase()}`,onClick:c,children:o.jsx(Ni,{})})]}),o.jsx("div",{className:"min-h-0 flex-1 scroll-fade overflow-y-auto",children:u})]})}),Fb="data-toolbar-divider",Wb="data-orphan",Mh=l=>l.offsetTop+l.offsetHeight/2,_h=(l,r)=>Math.abs(Mh(l)-Mh(r))<=Math.min(l.offsetHeight,r.offsetHeight)/2+1,Ib=l=>{const r=[...l.children].filter(c=>c instanceof HTMLElement);r.forEach((c,u)=>{if(!c.hasAttribute(Fb))return;const g=r[u-1],y=r[u+1],w=g===void 0||!_h(g,c),j=y===void 0||!_h(c,y);c.toggleAttribute(Wb,w||j)})},Pb=({children:l})=>{const[r,c]=T.useState(null);return T.useLayoutEffect(()=>{if(!r)return;const u=()=>Ib(r);if(u(),typeof ResizeObserver>"u")return;const g=new ResizeObserver(u);return g.observe(r),()=>g.disconnect()},[r,l]),o.jsx("div",{className:"z-10 flex-none border-t border-border bg-background",children:o.jsx("div",{className:"flex min-h-14 items-center justify-center-safe gap-4 px-4 py-3 max-sm:scroll-fade-x max-sm:overflow-x-auto sm:flex-wrap [&>*]:flex-none",ref:c,children:l})})},Tc=({label:l,children:r})=>o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs font-medium whitespace-nowrap text-fg-tertiary",children:l}),r]}),Ch=()=>o.jsx("span",{className:"h-4 w-px bg-border data-[orphan]:invisible","data-toolbar-divider":""}),e4=({className:l,height:r=16})=>o.jsx("span",{className:l,role:"img","aria-label":"Superwall",style:{"--logo-primary":"var(--primary)","--logo-secondary":"var(--foreground)"},children:o.jsxs("svg",{height:r,width:691/108*r,style:{display:"block"},viewBox:"0 0 691 108",fill:"none","aria-hidden":"true",focusable:"false",children:[o.jsx("path",{d:"M634.735 95.5696C633.858 95.5696 633.142 95.2909 632.584 94.7334C632.027 94.1759 631.748 93.4592 631.748 92.5831V14.9343C631.748 14.0582 632.027 13.3415 632.584 12.784C633.142 12.2265 633.858 11.9478 634.735 11.9478H647.995C648.871 11.9478 649.587 12.2265 650.145 12.784C650.702 13.3415 650.981 14.0582 650.981 14.9343V76.562C650.981 78.2189 652.324 79.562 653.981 79.562H688.014C688.89 79.562 689.606 79.8407 690.164 80.3982C690.721 80.9557 691 81.6725 691 82.5485V92.5831C691 93.4592 690.721 94.1759 690.164 94.7334C689.606 95.2909 688.89 95.5696 688.014 95.5696H634.735Z",fill:"var(--logo-secondary)"}),o.jsx("path",{d:"M565.229 95.5696C564.353 95.5696 563.636 95.2909 563.078 94.7334C562.521 94.1759 562.242 93.4592 562.242 92.5831V14.9343C562.242 14.0582 562.521 13.3415 563.078 12.784C563.636 12.2265 564.353 11.9478 565.229 11.9478H578.489C579.365 11.9478 580.082 12.2265 580.639 12.784C581.196 13.3415 581.475 14.0582 581.475 14.9343V76.562C581.475 78.2189 582.818 79.562 584.475 79.562H618.508C619.384 79.562 620.101 79.8407 620.658 80.3982C621.215 80.9557 621.494 81.6725 621.494 82.5485V92.5831C621.494 93.4592 621.215 94.1759 620.658 94.7334C620.101 95.2909 619.384 95.5696 618.508 95.5696H565.229Z",fill:"var(--logo-secondary)"}),o.jsx("path",{d:"M472.962 95.5696C472.245 95.5696 471.648 95.3307 471.17 94.8529C470.692 94.2954 470.453 93.6981 470.453 93.061C470.453 92.6628 470.493 92.3044 470.573 91.9858L499.004 15.1732C499.243 14.2971 499.721 13.5406 500.438 12.9034C501.154 12.2663 502.15 11.9478 503.424 11.9478H518.715C519.989 11.9478 520.985 12.2663 521.701 12.9034C522.418 13.5406 522.896 14.2971 523.135 15.1732L551.566 91.9858C551.646 92.3044 551.686 92.6628 551.686 93.061C551.686 93.6981 551.447 94.2954 550.969 94.8529C550.491 95.3307 549.894 95.5696 549.177 95.5696H536.753C535.559 95.5696 534.683 95.2909 534.125 94.7334C533.568 94.1759 533.209 93.6583 533.05 93.1804L528.652 81.7257C528.207 80.5662 527.094 79.8009 525.852 79.8009H496.287C495.045 79.8009 493.932 80.5662 493.487 81.7257L489.089 93.1804C488.93 93.6583 488.571 94.1759 488.014 94.7334C487.456 95.2909 486.58 95.5696 485.386 95.5696H472.962ZM500.097 60.3717C499.391 62.3271 500.84 64.3906 502.919 64.3906H519.115C521.19 64.3906 522.638 62.3343 521.94 60.3804L513.881 37.8465C512.933 35.1978 509.19 35.1921 508.234 37.8378L500.097 60.3717Z",fill:"var(--logo-secondary)"}),o.jsx("path",{d:"M392.505 95.5696C391.231 95.5696 390.275 95.2112 389.638 94.4945C389.08 93.7777 388.842 92.9017 388.921 91.8664L390.952 14.6953C390.952 13.9786 391.231 13.3415 391.788 12.784C392.346 12.2265 393.023 11.9478 393.819 11.9478H406.004C407.119 11.9478 407.915 12.1867 408.393 12.6645C408.871 13.1424 409.07 13.8591 408.99 14.8148L407.847 51.2385C407.747 54.4211 412.02 55.5467 413.501 52.7278L423.564 33.57C423.963 32.9329 424.52 32.2559 425.237 31.5392C425.954 30.8224 426.909 30.464 428.104 30.464H435.63C436.904 30.464 437.74 30.8224 438.139 31.5392C438.537 32.2559 438.776 32.9329 438.855 33.57L440.889 52.6026C441.223 55.7286 445.53 56.3008 446.669 53.3705L461.792 14.4564C462.429 12.784 463.783 11.9478 465.853 11.9478H478.874C479.83 11.9478 480.427 12.2663 480.666 12.9034C480.985 13.5406 480.985 14.2175 480.666 14.9343L451.518 91.8664C451.12 92.9017 450.443 93.7777 449.487 94.4945C448.611 95.2112 447.536 95.5696 446.262 95.5696H436.347C434.993 95.5696 434.037 95.2511 433.48 94.6139C433.002 93.8972 432.683 93.1804 432.524 92.4637L428.181 64.5033C427.737 61.6484 423.911 61.0087 422.563 63.5641L407.318 92.4637C406.92 93.1804 406.322 93.8972 405.526 94.6139C404.73 95.2511 403.694 95.5696 402.42 95.5696H392.505Z",fill:"var(--logo-secondary)"}),o.jsx("path",{d:"M311.837 95.5696C310.961 95.5696 310.244 95.2909 309.687 94.7334C309.129 94.1759 308.851 93.4592 308.851 92.5831V14.9343C308.851 14.0582 309.129 13.3415 309.687 12.784C310.244 12.2265 310.961 11.9478 311.837 11.9478H343.494C353.449 11.9478 361.293 14.2573 367.028 18.8764C372.762 23.4159 375.629 29.9862 375.629 38.5873C375.629 44.401 374.235 49.259 371.448 53.1614C369.298 56.1713 366.579 58.5889 363.292 60.4144C361.712 61.2921 361.004 63.2757 361.893 64.8504L377.062 91.7469C377.301 92.2247 377.42 92.6628 377.42 93.061C377.42 93.6981 377.182 94.2954 376.704 94.8529C376.226 95.3307 375.629 95.5696 374.912 95.5696H361.652C360.218 95.5696 359.143 95.2112 358.426 94.4945C357.71 93.6981 357.192 92.9813 356.873 92.3442L343.146 66.5773C342.625 65.5991 341.607 64.9879 340.498 64.9879H330.845C329.188 64.9879 327.845 66.3311 327.845 67.9879V92.5831C327.845 93.4592 327.566 94.1759 327.008 94.7334C326.451 95.2909 325.734 95.5696 324.858 95.5696H311.837ZM327.845 46.8165C327.845 48.4734 329.188 49.8165 330.845 49.8165H343.136C347.516 49.8165 350.741 48.821 352.812 46.83C354.962 44.839 356.037 42.0516 356.037 38.4678C356.037 34.884 355.002 32.0568 352.931 29.9862C350.861 27.9155 347.595 26.8802 343.136 26.8802H330.845C329.188 26.8802 327.845 28.2234 327.845 29.8802V46.8165Z",fill:"var(--logo-primary)"}),o.jsx("path",{d:"M240.339 95.5696C239.463 95.5696 238.746 95.2909 238.189 94.7334C237.631 94.1759 237.353 93.4592 237.353 92.5831V14.9343C237.353 14.0582 237.631 13.3415 238.189 12.784C238.746 12.2265 239.463 11.9478 240.339 11.9478H294.454C295.33 11.9478 296.047 12.2265 296.605 12.784C297.162 13.3415 297.441 14.0582 297.441 14.9343V24.491C297.441 25.2874 297.162 25.9644 296.605 26.5219C296.047 27.0793 295.33 27.3581 294.454 27.3581H258.749C257.092 27.3581 255.749 28.7012 255.749 30.3581V43.1133C255.749 44.7701 257.092 46.1133 258.749 46.1133H291.826C292.702 46.1133 293.419 46.392 293.976 46.9495C294.534 47.507 294.813 48.2237 294.813 49.0998V57.9398C294.813 58.7362 294.534 59.4131 293.976 59.9706C293.419 60.5281 292.702 60.8068 291.826 60.8068H258.749C257.092 60.8068 255.749 62.15 255.749 63.8068V77.1593C255.749 78.8162 257.092 80.1593 258.749 80.1593H295.41C296.286 80.1593 297.003 80.438 297.56 80.9955C298.118 81.553 298.396 82.2698 298.396 83.1458V92.5831C298.396 93.4592 298.118 94.1759 297.56 94.7334C297.003 95.2909 296.286 95.5696 295.41 95.5696H240.339Z",fill:"var(--logo-primary)"}),o.jsx("path",{d:"M164.408 95.5696C163.532 95.5696 162.816 95.2909 162.258 94.7334C161.701 94.1759 161.422 93.4592 161.422 92.5831V14.9343C161.422 14.0582 161.701 13.3415 162.258 12.784C162.816 12.2265 163.532 11.9478 164.408 11.9478H197.021C203.472 11.9478 209.046 12.9433 213.745 14.9343C218.524 16.9252 222.227 19.9516 224.855 24.0132C227.563 27.9952 228.917 32.9727 228.917 38.9457C228.917 44.9983 227.563 50.0156 224.855 53.9976C222.227 57.9 218.524 60.8068 213.745 62.7182C209.046 64.6295 203.472 65.5852 197.021 65.5852H184.013C182.356 65.5852 181.013 66.9284 181.013 68.5852V92.5831C181.013 93.4592 180.735 94.1759 180.177 94.7334C179.62 95.2909 178.903 95.5696 178.027 95.5696H164.408ZM180.655 47.7722C180.655 49.429 181.998 50.7722 183.655 50.7722H196.424C200.485 50.7722 203.631 49.7767 205.861 47.7857C208.17 45.7947 209.325 42.8082 209.325 38.8262C209.325 35.3221 208.29 32.455 206.219 30.2251C204.228 27.9952 200.963 26.8802 196.424 26.8802H183.655C181.998 26.8802 180.655 28.2234 180.655 29.8802V47.7722Z",fill:"var(--logo-primary)"}),o.jsx("path",{d:"M114.645 96.7637C107.637 96.7637 101.504 95.6089 96.2481 93.2994C90.9919 90.9102 86.9303 87.2866 84.0632 82.4286C81.1962 77.4909 79.7627 71.2392 79.7627 63.6734V14.9338C79.7627 14.0577 80.0414 13.341 80.5989 12.7835C81.1564 12.226 81.8732 11.9473 82.7492 11.9473H95.7703C96.6463 11.9473 97.3631 12.226 97.9206 12.7835C98.4781 13.341 98.7568 14.0577 98.7568 14.9338V63.5539C98.7568 69.4473 100.15 73.8274 102.938 76.6945C105.725 79.5615 109.628 80.995 114.645 80.995C119.583 80.995 123.445 79.5615 126.233 76.6945C129.02 73.8274 130.414 69.4473 130.414 63.5539V14.9338C130.414 14.0577 130.692 13.341 131.25 12.7835C131.887 12.226 132.604 11.9473 133.4 11.9473H146.541C147.337 11.9473 148.014 12.226 148.572 12.7835C149.129 13.341 149.408 14.0577 149.408 14.9338V63.6734C149.408 71.2392 147.974 77.4909 145.107 82.4286C142.24 87.2866 138.218 90.9102 133.042 93.2994C127.865 95.6089 121.733 96.7637 114.645 96.7637Z",fill:"var(--logo-primary)"}),o.jsx("path",{d:"M30.7012 107.514C29.8251 107.514 29.1084 107.235 28.5509 106.678C27.9934 106.12 27.7147 105.403 27.7147 104.527V98.9503C27.7147 97.4299 26.5751 96.1593 25.0747 95.9137C20.1767 95.1118 15.9995 93.7621 12.5433 91.8646C8.48164 89.555 5.41551 86.7676 3.34487 83.5024C1.27424 80.2372 0.15928 76.8127 0 73.2289C0 72.5917 0.23892 72.0343 0.716759 71.5564C1.27424 70.9989 1.91136 70.7202 2.62811 70.7202H15.4103C16.4456 70.7202 17.242 70.9591 17.7995 71.437C18.2667 71.7707 18.7059 72.1883 19.1172 72.6898C19.2778 72.8856 19.3992 73.1093 19.504 73.3398C20.0637 74.5705 20.8892 75.7679 21.9806 76.9321C23.2548 78.2064 24.9671 79.2815 27.1174 80.1575C29.2676 80.9539 31.9356 81.3521 35.1212 81.3521C40.2978 81.3521 44.1603 80.5159 46.7088 78.8435C49.3369 77.171 50.6509 74.9013 50.6509 72.0343C50.6509 69.9636 49.9342 68.2912 48.5007 67.0169C47.1468 65.7427 44.9567 64.5879 41.9304 63.5526C38.9837 62.5173 35.0017 61.4023 29.9844 60.2077C24.0114 58.9335 18.9543 57.3009 14.813 55.3099C10.6717 53.2393 7.52596 50.6111 5.37569 47.4255C3.30505 44.1603 2.26974 40.1385 2.26974 35.3601C2.26974 29.0686 4.49965 23.7327 8.95948 19.3525C12.992 15.4614 18.3758 12.8901 25.1107 11.6386C26.5927 11.3632 27.7147 10.1013 27.7147 8.59398V2.98649C27.7147 2.11046 27.9934 1.3937 28.5509 0.836215C29.1084 0.278738 29.8251 0 30.7012 0H39.1828C39.9792 0 40.6561 0.278738 41.2136 0.836215C41.7711 1.3937 42.0498 2.11046 42.0498 2.98649V8.90851C42.0498 10.383 43.1243 11.6271 44.5656 11.9386C48.9576 12.8879 52.6983 14.4035 55.7877 16.4854C59.5308 18.8746 62.358 21.6222 64.2693 24.7282C66.2603 27.7545 67.2957 30.7012 67.3753 33.5682C67.3753 34.2053 67.1364 34.8026 66.6585 35.3601C66.1807 35.8379 65.5834 36.0769 64.8667 36.0769H51.3677C50.6509 36.0769 49.974 35.9176 49.3369 35.599C48.8255 35.3433 48.3653 34.9336 47.9566 34.37C47.7503 34.0856 47.6374 33.7481 47.5428 33.4097C47.0246 31.5563 45.6715 29.9367 43.4834 28.5509C41.0942 26.9581 38.0678 26.1617 34.4044 26.1617C30.5021 26.1617 27.3961 26.8785 25.0865 28.312C22.777 29.7455 21.6222 31.9356 21.6222 34.8823C21.6222 36.7936 22.2195 38.4262 23.4141 39.7801C24.6087 41.0544 26.5599 42.2091 29.2676 43.2444C31.9754 44.2001 35.6388 45.2753 40.2579 46.4699C47.2662 47.9034 52.9605 49.6156 57.3407 51.6066C61.7209 53.5976 64.9065 56.1859 66.8975 59.3715C68.9681 62.4775 70.0034 66.4197 70.0034 71.198C70.0034 75.8172 68.8486 79.9186 66.5391 83.5024C64.2295 87.0066 60.9643 89.8338 56.7434 91.984C53.2541 93.7958 49.2277 95.0987 44.6642 95.8928C43.1756 96.1518 42.0498 97.4173 42.0498 98.9283V104.527C42.0498 105.403 41.7711 106.12 41.2136 106.678C40.6561 107.235 39.9792 107.514 39.1828 107.514H30.7012Z",fill:"var(--logo-primary)"})]})}),Ah=16,t4=(l,r)=>{const c=[...l.children].filter(y=>y instanceof HTMLElement&&y!==r),u=l.clientWidth/2,g=r.scrollWidth/2;return c.every(y=>{const w=y.offsetLeft;return w+y.offsetWidth+Ah<=u-g||w-Ah>=u+g})},J1=({title:l,actions:r,label:c="Studio"})=>{const u=Rb(),[g,y]=T.useState(null),[w,j]=T.useState(null),[m,d]=T.useState(!0);return T.useLayoutEffect(()=>{if(!g||!w)return;const v=()=>d(t4(g,w));if(v(),typeof ResizeObserver>"u")return;const h=new ResizeObserver(v);h.observe(g);for(const S of g.children)h.observe(S);return()=>h.disconnect()},[g,w,l,r]),o.jsx("header",{className:"relative z-20 flex h-12 flex-none items-center border-b border-border bg-background",children:o.jsxs("div",{className:"relative flex h-full w-full items-center ps-4 pe-2.5",ref:y,children:[o.jsxs("a",{className:"relative flex items-center gap-4 text-sm before:pointer-events-none before:absolute before:-inset-x-1 before:-inset-y-0.5 before:rounded-sm before:border before:border-transparent before:transition-colors before:duration-hover focus-visible:before:border-primary",href:u.href,onClick:v=>{v.button===0&&(v.metaKey||v.ctrlKey||v.shiftKey||v.altKey||(v.preventDefault(),u.navigate()))},children:[o.jsx(e4,{className:"flex whitespace-nowrap"}),o.jsx("span",{className:"h-4 w-px bg-border max-sm:hidden"}),o.jsx("span",{className:"text-fg-secondary max-sm:hidden",children:c})]}),l!==void 0&&o.jsx("span",{className:`absolute left-1/2 -translate-x-1/2 text-sm font-medium whitespace-nowrap ${m?"":"invisible"}`,"aria-hidden":m?void 0:!0,ref:j,children:l}),o.jsx("div",{className:"ml-auto flex items-center gap-2",children:o.jsx(K1.Provider,{value:"sm",children:r})})]})})},F1="superwall-dismissed-update",a4=()=>{try{return window.localStorage.getItem(F1)??void 0}catch{return}},n4=l=>{try{window.localStorage.setItem(F1,l)}catch{return}},l4="https://github.com/superwall/superwall/releases",i4=l=>l.kind==="major"?[`Upgrade this project's superwall from ${l.current} to ${l.latest}. It is a major release, so it may contain breaking changes.`,"",`1. Read the release notes of ${l.latest} (${l.notes}) and of every release between ${l.current} and ${l.latest} (${l4}).`,"2. List each breaking change that touches this project: search its paywalls, components and config for every API that was changed or removed. Before you change anything, tell me what will break and ask me about any change that needs a decision.",`3. Run \`${l.command}\`.`,"4. Make the changes the breaking changes require, then run `superwall build` and check in `superwall dev` that every paywall still builds and looks the same."].join(`
11
+ `):[`Upgrade this project's superwall from ${l.current} to ${l.latest}.`,"",`1. Read the release notes (${l.notes}) and tell me if anything in them touches this project.`,`2. Run \`${l.command}\`.`,"3. Run `superwall build` and check that every paywall still builds."].join(`
12
+ `),s4=({update:l,warning:r})=>{const[c,u]=T.useState(!1);return T.useEffect(()=>{if(!c)return;const g=setTimeout(()=>u(!1),1500);return()=>clearTimeout(g)},[c]),o.jsxs("button",{type:"button",className:`inline-flex flex-none cursor-pointer items-center gap-1.5 rounded-xs border px-1.5 py-px text-xs ${r?"border-warning/30 bg-warning/10 text-warning-foreground hover:bg-warning/18":"border-border bg-muted text-foreground hover:bg-muted/70"}`,title:l.command,onClick:()=>{navigator.clipboard?.writeText(i4(l)).then(()=>u(!0),()=>u(!1))},children:[c?"Copied":"Copy prompt",c?o.jsx(Bc,{className:`size-3 shrink-0 ${r?"":"text-success"}`}):o.jsx(Qh,{className:"size-3 shrink-0"})]})},W1=({update:l})=>{const[r,c]=T.useState(a4);if(l===void 0||r===l.latest)return null;const u=l.kind==="major";return o.jsxs("div",{role:"status",className:`relative z-10 flex flex-none flex-wrap items-center gap-x-2 gap-y-1 border-b border-border py-1.5 ps-4 pe-2.5 text-sm ${u?"bg-warning/8 text-warning-foreground":"text-fg-secondary"}`,children:[o.jsx("span",{className:`flex flex-none [&>svg]:size-4 ${u?"":"text-fg-tertiary"}`,children:u?o.jsx(Sa,{}):o.jsx(Lc,{})}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:u?"":"text-foreground",children:u?"Major update available":"Update available"})," ",o.jsxs("span",{className:u?"text-warning-foreground/80":"",children:["· superwall ",l.current," → ",l.latest,u?", it may contain breaking changes":""]})]}),u&&o.jsxs("a",{href:l.notes,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 underline underline-offset-2 [&>svg]:size-3",children:["Release notes",o.jsx(xl,{})]}),o.jsxs("span",{className:"ml-auto flex flex-none items-center gap-2",children:[o.jsx(s4,{update:l,warning:u}),o.jsx("button",{type:"button","aria-label":"Dismiss",className:`sw-btn sw-btn--sm sw-btn--icon sw-btn--ghost ${u?"[&>.sw-icon]:text-warning-foreground [&>.sw-icon]:[filter:none]":""}`,onClick:()=>{n4(l.latest),c(l.latest)},children:o.jsx(Ni,{})})]})]})},r4=[{key:"user",label:"User",blurb:"Attributes your app sets"},{key:"device",label:"Device",blurb:"Platform, locale, OS — the SDK fills these in"},{key:"params",label:"Params",blurb:"Passed in at the placement"},{key:"products",label:"Products",blurb:"Store data for this paywall’s products"}],Rh=l=>l==null?"":typeof l=="string"?l:JSON.stringify(l),o4=l=>l==="true"?!0:l==="false"?!1:l.trim()!==""&&Number.isFinite(Number(l))?Number(l):l,Mc=l=>l.slice(l.indexOf(".")+1),c4=({row:l,override:r,onChange:c})=>{const u=r!==void 0,g=u?r:l.value;return o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex min-h-5 items-center justify-between gap-2",children:[o.jsx("span",{className:"truncate text-xs font-medium text-fg-tertiary",children:l.path}),u&&o.jsx("button",{type:"button",className:"sw-btn sw-btn--plain shrink-0 text-xs","aria-label":`Reset ${l.path}`,onClick:()=>c(void 0),children:"Reset"})]}),typeof g=="boolean"?o.jsx("span",{className:"flex h-7 items-center",children:o.jsx($1,{label:l.path,checked:g,onChange:y=>c(y)})}):o.jsx("input",{className:"sw-input sw-input--sm","aria-label":l.path,value:Rh(g),placeholder:Rh(l.value),onChange:y=>{const w=y.target.value;c(w===""?void 0:o4(w))}})]})},u4=({label:l,blurb:r,rows:c,overrideOf:u,onChange:g,searching:y})=>{const[w,j]=T.useState("closed"),m=y?"open":w,d=m==="open",v=c.filter(h=>u(h.path)!==void 0).length;return o.jsxs("section",{className:"border-b border-border",children:[o.jsxs("button",{type:"button",className:"group relative flex w-full items-center gap-4 px-4 py-2.5 text-left transition-colors duration-hover before:pointer-events-none before:absolute before:inset-0 before:border before:border-transparent before:transition-colors before:duration-hover hover:bg-foreground/3 focus-visible:before:border-primary","aria-expanded":d,onClick:()=>j(h=>h==="open"?"closing":"open"),children:[o.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[o.jsxs("span",{className:"flex items-center gap-1.5 text-sm font-medium",children:[l,v>0?o.jsx("span",{className:"font-normal text-primary tabular-nums",children:`${v} set`}):c.length>0&&o.jsx("span",{className:"font-normal text-fg-tertiary tabular-nums",children:c.length})]}),o.jsx("span",{className:"truncate text-xs/4 text-fg-tertiary",children:r})]}),o.jsx(Vh,{className:`icon-tertiary transition-disclosure group-hover:filter-none ${d?"rotate-180":""}`})]}),m!=="closed"&&o.jsx("div",{className:`grid transition-[grid-template-rows,opacity] duration-move ease-out starting:grid-rows-[0fr] starting:opacity-0 ${d?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,"aria-hidden":d?void 0:!0,inert:!d,onTransitionEnd:h=>{h.target===h.currentTarget&&m==="closing"&&j("closed")},children:o.jsx("div",{className:"min-h-0 overflow-hidden",children:c.length===0?o.jsx("span",{className:"block px-4 pb-4 text-xs text-fg-tertiary",children:"Nothing here for this paywall."}):o.jsx("div",{className:"flex flex-col gap-3 px-4 pt-1 pb-4",children:c.map(h=>o.jsx(c4,{row:h,override:u(h.path),onChange:S=>g(h.path,S)},h.path))})})})]})},f4=({overrides:l,groups:r,onChange:c})=>{const u=(d,v,h)=>{if(d!=="products"){const Y={...l[d]};h===void 0?delete Y[Mc(v)]:Y[Mc(v)]=h,c({...l,[d]:Y});return}const[,S="",M=""]=v.split("."),C={...l.products?.[S]};h===void 0?delete C[M]:C[M]=h;const V={...l.products,[S]:C};Object.keys(C).length===0&&delete V[S],c({...l,products:V})},[g,y]=T.useState(""),w=g.trim().toLowerCase(),j=d=>w===""?d:d.filter(v=>v.path.toLowerCase().includes(w)),m=r4.filter(d=>w===""||j(r[d.key]??[]).length>0);return o.jsxs("div",{className:"flex flex-col",children:[o.jsx("div",{className:"border-b border-border p-3",children:o.jsxs("label",{className:"relative flex items-center",children:[o.jsx($s,{className:"icon-tertiary pointer-events-none absolute left-2.5"}),o.jsx("input",{className:"sw-input sw-input--sm w-full pl-8",type:"search","aria-label":"Search variables",placeholder:"Search variables",value:g,onChange:d=>y(d.target.value)})]})}),m.length===0&&o.jsx("span",{className:"block px-4 py-4 text-xs text-fg-tertiary",children:"No variables match."}),m.map(d=>o.jsx(u4,{label:d.label,blurb:d.blurb,searching:w!=="",rows:j(r[d.key]??[]),overrideOf:v=>d.key==="products"?l.products?.[v.split(".")[1]??""]?.[v.split(".")[2]??""]:l[d.key]?.[Mc(v)],onChange:(v,h)=>u(d.key,v,h)},d.key))]})},I1=()=>({device:Gg(),user:Vg,params:Xg}),P1=l=>{const{publicApiKey:r,...c}=l;return c},em=({surface:l,defaults:r,sourceSamples:c,samples:u,frame:g,theme:y,locale:w,edited:j})=>{const m=P1({...r.device,...c?.device,...u.device,...g,interfaceStyle:y==="dark"?"Dark":"Light",...w?{deviceLocale:w,deviceLanguageCode:w.split(/[-_]/)[0]}:{},...j.device}),d={...r.user,...c?.user,...u.user,...j.user},v={...r.params,...c?.params,...j.params},h=Object.entries(l.products??{}).map(([S,M])=>({reference:S,productId:M,variables:{...u.products?.[M],...j.products?.[S]}}));return Kh({paywallId:l.paywallId??"0",paywallIdentifier:l.paywallIdentifier??l.id,device:m,user:d,params:v,products:h,introductoryOfferEligible:j.introductoryOfferEligible})},d4={swiftui:"SwiftUI",uikit:"UIKit",compose:"Jetpack Compose","android-views":"Android Views","react-native":"React Native",flutter:"Flutter"},Ks=l=>"path"in l,Oh=l=>l.origin!==void 0&&(!Ks(l.origin)||l.origin.screenshot!==void 0),zh="flex w-8 items-center justify-center outline-none transition-colors duration-hover hover:bg-accent focus-visible:bg-accent hover:[&>svg]:filter-none focus-visible:[&>svg]:filter-none",tm=(l,r)=>Number.isFinite(l)?Math.min(3e3,Math.max(200,Math.round(l))):r,Dh=({label:l,value:r,onCommit:c})=>{const[u,g]=T.useState(String(r));T.useEffect(()=>{g(String(r))},[r]);const y=()=>{const w=tm(Number(u),r);g(String(w)),c(w)};return o.jsx("input",{className:"sw-input w-16 text-center tabular-nums",type:"number","aria-label":l,value:u,onChange:w=>g(w.target.value),onBlur:y,onKeyDown:w=>{w.key==="Enter"&&w.target.blur()}})},Uh=({label:l,width:r,height:c,title:u,src:g,image:y,hostState:w,delegate:j,reloadKey:m,empty:d,chrome:v,presentation:h,landscape:S,theme:M,onResize:C,canvas:V,browser:Y})=>{const Q=o1(),[le,q]=T.useState(!1);return T.useEffect(()=>q(!1),[y]),o.jsxs("div",{className:"flex flex-none flex-col gap-2",children:[l&&o.jsx("span",{className:"origin-bottom-left text-xs whitespace-nowrap text-fg-tertiary",style:{transform:`scale(${1/Q})`},children:l}),o.jsxs("div",{className:"relative",children:[y&&!le?o.jsx("div",{className:"flex flex-none items-center justify-center overflow-hidden bg-black",style:{width:r,height:c},children:o.jsx("img",{src:y,alt:u,title:u,className:"max-h-full max-w-full object-contain",draggable:!1,onError:()=>q(!0)})}):g?o.jsx(yy,{width:r,height:c,title:u,src:g,hostState:w,delegate:j,reloadKey:m,chrome:v,presentation:h,landscape:S,theme:M,browser:Y}):o.jsx(vy,{width:r,height:c,children:d??"Nothing live yet — publish to compare against production."}),C&&o.jsx(xy,{size:{width:r,height:c},scale:Q,clamp:tm,onResize:C,onDragStart:()=>V?.current?.hold(),onShift:(X,K)=>V?.current?.pan(X,K)})]})]})},h4=({children:l})=>{const r=o1();return o.jsx("div",{className:"w-fit origin-top self-center",style:{transform:`scale(${1/r})`},onPointerDown:c=>c.stopPropagation(),children:l})},m4=l=>l===void 0?"":l.type==="version"?`version:${l.version}`:l.type==="origin"?"origin":`surface:${l.surface.kind}/${l.surface.id}`,_c=l=>l.label??`${l.kind}/${l.id}`,p4=({source:l,surface:r,samples:c,samplesPending:u=!1,actions:g})=>{const[y,w]=T.useState(Xc),[j,m]=T.useState(Fv),[d,v]=T.useState("light"),[h,S]=T.useState(void 0),[M,C]=T.useState({}),[V,Y]=T.useState(!1),[Q,le]=T.useState(()=>Oh(r)&&new URLSearchParams(window.location.search).get("compare")==="origin"?{type:"origin"}:void 0),[q,X]=T.useState(0),[K,I]=T.useState(!1),ae=T.useRef(null),[ue,ve]=T.useState({scale:1,fitted:!0}),[se,je]=T.useState({}),[Ce,xe]=T.useState(void 0),[_e,de]=T.useState(void 0),A=T.useRef(void 0);T.useEffect(()=>()=>window.clearTimeout(A.current),[]);const k=l.actions,F=T.useMemo(I1,[r]),he=r.locales;T.useEffect(()=>{if(!k)return;let $=!1;return xe(void 0),k.status(r).then(ze=>{$||je(ze)}),()=>{$=!0}},[k,r]);const x=async $=>{if(!k)return;window.clearTimeout(A.current),de({action:$,steps:{}});const ze=$==="promote"?r.version??Ce:void 0,rt=await k.run(r,{action:$,version:ze},(mt,xt)=>{de(Nt=>Nt?.action===$?{...Nt,steps:{...Nt.steps,[mt]:xt==="start"?"active":"done"}}:Nt)});if(rt.ok){const mt=Object.fromEntries(Js[$].map(xt=>[xt,"done"]));de({action:$,steps:mt}),xe(void 0),je(await k.status(r)),A.current=window.setTimeout(()=>de(void 0),1600)}else de(mt=>{if(!mt)return mt;const xt={...mt.steps};for(const Nt of Js[$])xt[Nt]==="active"&&(xt[Nt]="failed");return{...mt,steps:xt,error:rt.error}})},D=y===gh,Z=h1(y),U=ph(r.platforms),J=T.useMemo(()=>Jv(Z,U,K),[Z,U,K]),ne=U&&!D?Zs(Z,{teleported:!1,landscape:K}):void 0,te=D?j:U&&ne===void 0?Kv(Z):{width:Z.width,height:Z.height},qe=U?void 0:r.presentation,re=m1(Z,U||D),st={platform:re.platform,screenWidth:re.width,app:l.app??{name:r.project??l.title}},Rt=l.previewUrl(r),W=xh(`${Rt}#${q}`),P=wh(st,W.tracker),Te=xh(`${Rt}|${m4(Q)}#${q}`),Ue=wh(st,Te.tracker),_t=Q?.type==="surface"?ph(Q.surface.platforms):U,Bt=($,ze)=>{if(!D)return ze?Zs(Z,{teleported:!1,landscape:K}):$.where==="browser"?Zs(Z,{teleported:!0,landscape:K}):void 0},ge=K?{width:te.height,height:te.width}:te,Lt=$=>{w($),(W.place.where==="browser"||Te.place.where==="browser")&&X(ze=>ze+1)},Ge=()=>{const $=l.standaloneUrl?.(r);if($===void 0)return;if(ge.width>768){window.open($,"_blank");return}const ze=Math.max(0,window.screen.width/2-ge.width/2),rt=Math.max(0,window.screen.height/2-ge.height/2);window.open($,"superwall-preview",`toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=${ge.width},height=${ge.height},top=${rt},left=${ze}`)||window.open($,"_blank")},Ct=T.useMemo(()=>em({surface:r,defaults:F,sourceSamples:l.samples,samples:c,frame:D?void 0:J,theme:d,locale:h,edited:M}),[r,F,l.samples,c,D,J,d,h,M]),Kt=D?void 0:Xv(Z,U&&ne===void 0),$e=se.versions??[],kt={target:r.version??Ce??ev($e),live:Pg($e),versions:$e,pick:r.version===void 0?xe:k?.pick},Ea=$=>`v${$.version}${$.live?" · Live":""}`,Ve=$=>{if($.live)return"What SDKs receive today";const ze=$.pushedAt?qc($.pushedAt):void 0;return ze?`Pushed ${ze}`:"Pushed snapshot"},Ne=[...r.origin&&Oh(r)?[{key:"origin",label:"Original",hint:Ks(r.origin)?`${d4[r.origin.framework]} screen ${r.origin.path}, as captured in the simulator`:`Dashboard paywall ${r.origin.paywallId}, as it serves today`,target:{type:"origin"}}]:[],...$e.map($=>({key:`version:${$.version}`,label:Ea($),hint:Ve($),target:{type:"version",version:$.version}})),...l.surfaces.map($=>({key:`surface:${$.kind}/${$.id}`,label:_c($),hint:l.compareHint??"Local preview",target:{type:"surface",surface:$}})).filter($=>$.target.surface!==r)],et=se.unreachable?`Couldn’t read the pushed versions — ${se.unreachable}`:void 0,Fe=Q?.type==="version"?$e.find($=>$.version===Q.version):void 0,Ae=Q&&(Q.type==="version"?{label:Fe?Ea(Fe):`v${Q.version}`,src:Fe?Zh(Fe.url):void 0,title:`${r.id} v${Q.version}`,empty:et??"This version is no longer on the dashboard."}:Q.type==="origin"?{label:"Original",...r.origin&&Ks(r.origin)?{image:r.origin.screenshot?k2(r):void 0}:{src:r.origin?.url},title:`${r.id} original`,empty:r.origin&&Ks(r.origin)?"The original’s screenshot is missing — capture it again with `superwall migrate --screen <path> --screenshot <file>`.":"This paywall was not rebuilt from a dashboard paywall or a native screen."}:{label:_c(Q.surface),src:l.previewUrl(Q.surface),title:`${_c(Q.surface)} preview`}),ua=T.useMemo(()=>{const $=(ze,rt)=>Object.entries(rt??{}).map(([mt,xt])=>({path:`${ze}.${mt}`,value:xt})).toSorted((mt,xt)=>mt.path.localeCompare(xt.path));return{user:$("user",{...F.user,...l.samples?.user,...c.user}),device:$("device",P1({...F.device,...l.samples?.device,...c.device,...J})),params:$("params",{...F.params,...l.samples?.params}),products:Object.entries(r.products??{}).flatMap(([ze,rt])=>$(`products.${ze}`,c.products?.[rt]))}},[F,l.samples,c,J,r.products]),ja=T.useMemo(()=>c.products?Object.entries(r.products??{}).filter(([,$])=>c.products?.[$]===void 0).map(([$,ze])=>({reference:$,identifier:ze})):[],[c.products,r.products]),[fa,da]=T.useState(!1);T.useEffect(()=>da(!1),[r]);const ha=c.unreachable,$t=ja.length===0,ma=Object.keys(M.user??{}).length+Object.keys(M.params??{}).length+Object.keys(M.device??{}).length;return o.jsxs(o.Fragment,{children:[o.jsx(_b,{surfaceKey:`${r.project??""}/${r.id}`,raised:!!ha}),ja.length>0&&!fa&&o.jsx(Sy,{paywall:r.id,missing:ja,onDismiss:()=>da(!0)}),o.jsx(J1,{title:`${r.project??l.title} / ${r.label??r.id}${r.label?` · ${r.id}`:""}`,actions:o.jsxs(o.Fragment,{children:[g,o.jsxs("span",{className:"flex items-center gap-0.5",children:[o.jsx(wl,{hint:"Reload preview",children:o.jsx("button",{type:"button",className:"sw-btn sw-btn--sm sw-btn--icon sw-btn--ghost","aria-label":"Reload preview",onClick:()=>X($=>$+1),children:o.jsx(Gh,{})})}),l.standaloneUrl&&o.jsx(wl,{hint:"Open preview",children:o.jsx("button",{type:"button",className:"sw-btn sw-btn--sm sw-btn--icon sw-btn--ghost","aria-label":"Open preview",onClick:Ge,children:o.jsx(xl,{})})}),o.jsx(Db,{source:l,surface:r})]}),o.jsx(Qb,{source:l,surface:r}),k&&o.jsx(cv,{offered:k.offered,promotion:kt,progress:_e,blocked:$t?void 0:`Superwall has no product for ${ja.map($=>$.reference).join(", ")}`,onRun:x,onBlocked:()=>da(!1)})]})}),o.jsx(W1,{update:l.update}),ha&&o.jsxs("div",{role:"status",className:"relative z-10 flex flex-none items-center gap-2 border-b border-border bg-warning/8 px-4 py-2 text-sm text-warning-foreground",children:[o.jsx(Sa,{}),o.jsxs("span",{className:"min-w-0 truncate",children:["Couldn’t check this paywall’s products"," ",o.jsxs("span",{className:"text-warning-foreground/80",children:["· ",ha]})]})]}),o.jsxs("div",{className:"relative flex min-h-0 flex-1",children:[o.jsx(Vv,{ref:ae,onZoom:ve,fitKey:[y,D?"":`${ge.width}x${ge.height}`,Ae?"compare":"single",qe?.style??""].join(":"),children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-start gap-16",children:[Ae&&o.jsx(Uh,{label:Ae.label,width:ge.width,height:ge.height,title:Ae.title,src:"src"in Ae?Ae.src:void 0,image:"image"in Ae?Ae.image:void 0,presentation:Te.place.where==="browser"?void 0:Q?.type==="surface"&&!U?Q.surface.presentation:qe,hostState:Ct,delegate:Ue,reloadKey:q,empty:"empty"in Ae?Ae.empty:void 0,chrome:Kt,landscape:K,theme:d,browser:Bt(Te.place,_t)}),o.jsx(Uh,{label:Ae?r.label??"Local":void 0,width:ge.width,height:ge.height,title:`${r.id} preview`,src:Rt,presentation:W.place.where==="browser"?void 0:qe,hostState:Ct,delegate:P,reloadKey:q,chrome:Kt,landscape:K,theme:d,browser:Bt(W.place,U),onResize:D?$=>m(K?{width:$.height,height:$.width}:$):void 0,canvas:ae})]}),o.jsx(h4,{children:o.jsxs("label",{className:"flex cursor-pointer items-center gap-2 py-1 text-sm text-fg-secondary select-none",children:[o.jsx($1,{label:"Introductory offer",checked:Ei(Ct),onChange:$=>C(ze=>({...ze,introductoryOfferEligible:$}))}),"Introductory offer"]})})]})}),o.jsx(Jb,{open:V,title:"Variables",onClose:()=>Y(!1),children:o.jsx(f4,{overrides:M,groups:ua,onChange:C})})]}),o.jsxs(Pb,{children:[o.jsx(Tc,{label:"Zoom",children:o.jsxs("div",{className:"flex h-8 flex-none overflow-hidden rounded-sm border border-border transition-colors duration-hover has-[:focus-visible]:border-primary",role:"group","aria-label":"Zoom",children:[o.jsx("button",{type:"button",className:zh,"aria-label":"Zoom out",onClick:()=>ae.current?.zoomStep(-1),children:o.jsx(C2,{className:"icon-tertiary"})}),o.jsx("button",{type:"button",className:"min-w-14 border-x border-border px-2 text-sm tabular-nums outline-none transition-colors duration-hover hover:bg-accent focus-visible:bg-accent","aria-label":"Fit to view","aria-pressed":ue.fitted,onClick:()=>ae.current?.fit(),children:Sv(ue.scale)}),o.jsx("button",{type:"button",className:zh,"aria-label":"Zoom in",onClick:()=>ae.current?.zoomStep(1),children:o.jsx(A2,{className:"icon-tertiary"})})]})}),o.jsx(Ch,{}),o.jsxs(Tc,{label:"Device",children:[o.jsx(Th,{label:"Device",value:y,options:[...Ws.map($=>({value:$.id,label:$.name})),{value:gh,label:"Responsive"}],onChange:Lt}),o.jsx(wl,{side:"top",align:"center",hint:K?"Back to portrait":"Rotate to landscape",children:o.jsx("button",{type:"button",className:"sw-btn sw-btn--icon","aria-label":"Rotate device","aria-pressed":K,onClick:()=>I($=>!$),children:o.jsx(M2,{className:`transition-disclosure ${K?"-rotate-90":""}`})})}),o.jsx(Zb,{label:"Theme",value:d,options:[{value:"light",label:o.jsx(x2,{}),name:"Light"},{value:"dark",label:o.jsx(S2,{}),name:"Dark"}],onChange:v}),D&&o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Dh,{label:"Preview width",value:ge.width,onCommit:$=>m(ze=>({...ze,width:$}))}),o.jsx("span",{className:"text-fg-tertiary",children:"×"}),o.jsx(Dh,{label:"Preview height",value:ge.height,onCommit:$=>m(ze=>({...ze,height:$}))})]})]}),he.length>1&&o.jsx(Tc,{label:"Locale",children:o.jsx(Th,{label:"Locale",value:h??"default",options:[{value:"default",label:"Device"},...he.map($=>({value:$,label:$}))],onChange:$=>S($==="default"?void 0:$)})}),o.jsx(Ch,{}),(k||Ne.length>0)&&o.jsx(uv,{active:Q,options:Ne,notice:et,onSelect:le}),o.jsx(vv,{products:r.products,samples:c,pending:u}),o.jsxs("button",{type:"button",className:"sw-btn","aria-expanded":V,onClick:()=>Y($=>!$),children:[o.jsx(w2,{}),"Variables",ma>0&&o.jsx("span",{className:"text-primary tabular-nums",children:ma})]})]})]})},g4=({origin:l,scheme:r})=>{const[c,u]=T.useState(Q1),g=c??r,y=j=>{const d=window.prompt("Your app’s URL scheme, so this can open it:",j)?.trim();if(!(d===void 0||d===""))return u(d),Z1(d),d},w=j=>{if(g!==void 0)return;j.preventDefault();const m=y("");m!==void 0&&window.location.assign(Uc(m,l))};return o.jsxs("div",{className:"flex items-center gap-2",children:[g!==void 0&&o.jsx(wl,{hint:"Edit app URL scheme",children:o.jsx("button",{className:"sw-btn sw-btn--sm sw-btn--icon sw-btn--ghost",type:"button","aria-label":"Edit app URL scheme",onClick:()=>y(g),children:o.jsx(_2,{})})}),o.jsx("a",{className:"sw-btn sw-btn--sm sw-btn--primary",href:g===void 0?"#":Uc(g,l),onClick:w,children:"Open in app"})]})},v4={ios:"iOS",android:"Android",web:"Web"},Hh=390,y4=844,b4=l=>{const[r,c]=T.useState(0);return T.useLayoutEffect(()=>{const u=l.current;if(!u)return;const g=()=>c(u.getBoundingClientRect().width);if(g(),typeof ResizeObserver>"u")return;const y=new ResizeObserver(g);return y.observe(u),()=>y.disconnect()},[l]),r},x4=({surface:l,status:r,previewSrc:c,hostState:u,onOpen:g,href:y})=>{const w=T.useRef(null),j=b4(w),m=j>0?j/Hh:0,d=T.useMemo(Eg,[]),v=[l.label===void 0?l.project:`${l.project?`${l.project}/`:""}${l.id}`,...(l.platforms??[]).map(h=>v4[h]??h),r&&(r.updatedAt?`Edited ${qc(r.updatedAt)}`:"Not published")].filter(h=>!!h);return o.jsxs("a",{className:"group relative flex min-w-0 flex-col gap-3 border-e border-b border-border p-4 outline-none transition-colors duration-hover before:pointer-events-none before:absolute before:inset-0 before:border before:border-transparent before:transition-colors before:duration-hover hover:bg-foreground/3 focus-visible:before:border-primary",href:y??la(l),onClick:h=>{h.metaKey||h.ctrlKey||(h.preventDefault(),g())},children:[o.jsx("div",{className:"relative aspect-[390/844] overflow-hidden rounded-sm border border-border bg-card",ref:w,children:m>0&&o.jsx(S1,{hostState:u,delegate:d,className:"pointer-events-none block origin-top-left border-0 bg-white",title:`${l.project?`${l.project}/`:""}${l.id} preview`,src:c,loading:"lazy",tabIndex:-1,width:Hh,height:y4,style:{transform:`scale(${m})`}})}),o.jsxs("div",{className:"flex min-w-0 flex-col",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:l.label??l.id}),r?.paywallId&&o.jsx($b,{variant:r.active?"success":"outline",children:r.active?"Active":"Inactive"})]}),v.length>0&&o.jsx("span",{className:"truncate text-xs/4 text-fg-tertiary",children:v.map((h,S)=>o.jsxs(T.Fragment,{children:[S>0&&o.jsx("span",{className:"text-fg-muted","aria-hidden":"true",children:" · "}),h]},S))})]})]})};let Bh=0;const S4=({source:l,onOpen:r})=>{const c=$c()==="device",u=l.actions,[g,y]=T.useState({}),w=T.useMemo(I1,[l]);T.useEffect(()=>{if(!u)return;let S=!1;for(const M of l.surfaces)u.status(M).then(C=>{S||y(V=>({...V,[la(M)]:C}))});return()=>{S=!0}},[l,u]);const[j,m]=T.useState({}),d=T.useRef(null);T.useLayoutEffect(()=>{const S=d.current;if(!S)return;S.scrollTop=Bh;const M=()=>{Bh=S.scrollTop};return S.addEventListener("scroll",M,{passive:!0}),()=>{M(),S.removeEventListener("scroll",M)}},[]);const v=[["Paywalls","paywall"],["Funnels","funnel"]].map(([S,M])=>{const C=l.surfaces.filter(Y=>Y.kind===M),V=(j[M]??"").trim().toLowerCase();return{label:S,kind:M,all:C,needle:V,surfaces:C.filter(Y=>V===""||`${Y.project??""} ${Y.id} ${Y.label??""}`.toLowerCase().includes(V))}}).filter(S=>S.all.length>0),h=S=>m(M=>({...M,[S]:""}));return o.jsxs(o.Fragment,{children:[o.jsx(J1,{label:c?"Preview":void 0,actions:c?o.jsx(g4,{origin:window.location.origin,scheme:l.scheme}):void 0}),o.jsx(W1,{update:l.update}),o.jsx("div",{className:"flex-1 overflow-y-auto",ref:d,children:o.jsxs("div",{className:"mx-auto flex w-full max-w-[1440px] flex-col gap-6 p-3 sm:p-6 lg:p-10",children:[o.jsxs("header",{className:"flex flex-col gap-0.5",children:[o.jsx("h1",{className:"m-0 text-2xl font-medium",children:l.title}),!c&&o.jsxs("p",{className:"m-0 text-base text-fg-secondary",children:["Previews run against a real SDK host, and you choose the outcomes. Edit files under"," ",o.jsx(ia,{children:"superwall/"})," and they update live."]})]}),l.diagnostics&&l.diagnostics.length>0&&o.jsxs("div",{className:"flex gap-2 rounded-sm border border-destructive/32 bg-destructive/8 py-3 ps-[calc(--spacing(3)-1px)] pe-3 text-sm text-destructive-foreground",role:"alert",children:[o.jsx("span",{className:"flex h-5 flex-none items-center",children:o.jsx(Sa,{})}),o.jsx("span",{className:"min-w-0 whitespace-pre-wrap text-destructive-foreground/80",children:l.diagnostics.join(`
13
+ `)})]}),v.map(S=>o.jsxs("section",{className:"overflow-hidden rounded-sm border border-border bg-card","aria-label":S.label,children:[o.jsxs("div",{className:"flex min-h-12 flex-wrap items-center gap-x-4 gap-y-2 border-b border-border py-2.5 ps-4 pe-2.5",children:[o.jsxs("h2",{className:"m-0 flex flex-1 items-center gap-1.5 text-sm font-medium tracking-normal whitespace-nowrap",children:[S.label,o.jsx("span",{className:"font-normal text-fg-tertiary tabular-nums",children:S.surfaces.length})]}),S.all.length>1&&o.jsxs("label",{className:"relative flex w-full items-center sm:w-56",children:[o.jsx($s,{className:"icon-tertiary pointer-events-none absolute left-[calc(--spacing(2.5)-1px)]"}),o.jsx("input",{className:"sw-input sw-input--sm ps-8",type:"search",value:j[S.kind]??"",placeholder:`Search ${S.label.toLowerCase()}`,"aria-label":`Search ${S.label.toLowerCase()}`,onChange:M=>m(C=>({...C,[S.kind]:M.target.value}))})]})]}),S.surfaces.length>0?o.jsx("div",{className:"-me-px -mb-px grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 2xl:grid-cols-5",children:S.surfaces.map(M=>{const C=c?l.standaloneUrl?.(M):void 0;return o.jsx(x4,{surface:M,status:g[la(M)],previewSrc:l.previewUrl(M),hostState:em({surface:M,defaults:w,sourceSamples:l.samples,samples:{},theme:"light",edited:{}}),onOpen:()=>C===void 0?r(M):window.location.assign(C),href:C??(c?la(M):void 0)},la(M))})}):o.jsx(Cc,{icon:o.jsx($s,{}),title:`No ${S.label.toLowerCase()} match “${(j[S.kind]??"").trim()}”`,actions:o.jsx("button",{type:"button",className:"sw-btn sw-btn--sm",onClick:()=>h(S.kind),children:"Clear search"})})]},S.kind)),l.surfaces.length===0&&o.jsx("div",{className:"rounded-sm border border-border bg-card",children:o.jsx(Cc,{icon:o.jsx(O2,{}),title:"No paywalls yet",description:o.jsxs(o.Fragment,{children:["Create ",o.jsx(ia,{children:"superwall/paywalls/<id>/app/page.tsx"})," and it appears here."]})})})]})})]})},w4=(l,r)=>{const c=r.match(/^\/(?:([a-z0-9-]+)\/)?(paywall|funnel)\/([a-z0-9-]+)\/?$/);if(c)return l.find(u=>u.kind===c[2]&&u.id===c[3]&&(c[1]===void 0||u.project===c[1]))},E4=({source:l,mode:r="local"})=>{const[c,u]=T.useState(()=>window.location.pathname),[g,y]=T.useState({});T.useEffect(()=>{const M=()=>u(window.location.pathname);return window.addEventListener("popstate",M),()=>window.removeEventListener("popstate",M)},[]);const w=l.actions!==void 0,[j,m]=T.useState(w);T.useEffect(()=>{if(!w)return;let M=!1;return Q2().then(C=>{M||(y(C),m(!1))}),()=>{M=!0}},[w]);const d=r==="device"?"/device":"/",v=T.useCallback(M=>{window.history.pushState(null,"",M),u(M)},[]),h=T.useMemo(()=>({href:d,navigate:()=>v(d)}),[d,v]),S=w4(l.surfaces,c);return o.jsx(Ab,{mode:r,home:h,children:o.jsx(qh,{children:S?o.jsx(p4,{source:l,surface:S,samples:g,samplesPending:j}):o.jsx(S4,{source:l,onOpen:M=>v(la(M))})})})},j4=async()=>{const l=await fetch("/__studio/project.json");if(!l.ok)throw new Error(`project data unavailable (${l.status})`);const{capabilities:r,...c}=og(await l.json());return{...c,...r.actions?{actions:V2}:{},previewUrl:Y2,standaloneUrl:u=>`/preview${la(u)}`}},N4=({error:l})=>o.jsx(qh,{children:o.jsx("div",{className:"m-auto",children:o.jsx(Cc,{size:"lg",tone:"destructive",icon:o.jsx(Sa,{}),title:"Couldn’t load the studio",description:o.jsxs(o.Fragment,{children:[String(l),". Is ",o.jsx(ia,{children:"superwall dev"})," running in a project directory?"]})})})}),Lh=y2.createRoot(document.getElementById("root")),T4=/^\/device\/?$/.test(window.location.pathname)?"device":"local";j4().then(l=>{Lh.render(o.jsx(T.StrictMode,{children:o.jsx(E4,{source:l,mode:T4})}))}).catch(l=>{Lh.render(o.jsx(T.StrictMode,{children:o.jsx(N4,{error:l})}))});