@getcredify/credify-insurance-widget 1.18.3 → 1.24.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.
@@ -1,123 +0,0 @@
1
- (function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const m of f.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function l(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(c){if(c.ep)return;c.ep=!0;const f=l(c);fetch(c.href,f)}})();var Is={exports:{}},Li={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var __;function $y(){if(__)return Li;__=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function l(o,c,f){var m=null;if(f!==void 0&&(m=""+f),c.key!==void 0&&(m=""+c.key),"key"in c){f={};for(var _ in c)_!=="key"&&(f[_]=c[_])}else f=c;return c=f.ref,{$$typeof:n,type:o,key:m,ref:c!==void 0?c:null,props:f}}return Li.Fragment=r,Li.jsx=l,Li.jsxs=l,Li}var h_;function Zy(){return h_||(h_=1,Is.exports=$y()),Is.exports}var y=Zy(),$s={exports:{}},Ce={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var p_;function Gy(){if(p_)return Ce;p_=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),m=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),R=Symbol.iterator;function j(v){return v===null||typeof v!="object"?null:(v=R&&v[R]||v["@@iterator"],typeof v=="function"?v:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,k={};function fe(v,M,O){this.props=v,this.context=M,this.refs=k,this.updater=O||B}fe.prototype.isReactComponent={},fe.prototype.setState=function(v,M){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,M,"setState")},fe.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function le(){}le.prototype=fe.prototype;function de(v,M,O){this.props=v,this.context=M,this.refs=k,this.updater=O||B}var te=de.prototype=new le;te.constructor=de,G(te,fe.prototype),te.isPureReactComponent=!0;var ie=Array.isArray,W={H:null,A:null,T:null,S:null,V:null},re=Object.prototype.hasOwnProperty;function me(v,M,O,T,S,I){return O=I.ref,{$$typeof:n,type:v,key:M,ref:O!==void 0?O:null,props:I}}function ne(v,M){return me(v.type,M,void 0,void 0,void 0,v.props)}function he(v){return typeof v=="object"&&v!==null&&v.$$typeof===n}function Ae(v){var M={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(O){return M[O]})}var Ee=/\/+/g;function Ne(v,M){return typeof v=="object"&&v!==null&&v.key!=null?Ae(""+v.key):M.toString(36)}function Ke(){}function We(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(Ke,Ke):(v.status="pending",v.then(function(M){v.status==="pending"&&(v.status="fulfilled",v.value=M)},function(M){v.status==="pending"&&(v.status="rejected",v.reason=M)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function ce(v,M,O,T,S){var I=typeof v;(I==="undefined"||I==="boolean")&&(v=null);var w=!1;if(v===null)w=!0;else switch(I){case"bigint":case"string":case"number":w=!0;break;case"object":switch(v.$$typeof){case n:case r:w=!0;break;case b:return w=v._init,ce(w(v._payload),M,O,T,S)}}if(w)return S=S(v),w=T===""?"."+Ne(v,0):T,ie(S)?(O="",w!=null&&(O=w.replace(Ee,"$&/")+"/"),ce(S,M,O,"",function(ee){return ee})):S!=null&&(he(S)&&(S=ne(S,O+(S.key==null||v&&v.key===S.key?"":(""+S.key).replace(Ee,"$&/")+"/")+w)),M.push(S)),1;w=0;var P=T===""?".":T+":";if(ie(v))for(var X=0;X<v.length;X++)T=v[X],I=P+Ne(T,X),w+=ce(T,M,O,I,S);else if(X=j(v),typeof X=="function")for(v=X.call(v),X=0;!(T=v.next()).done;)T=T.value,I=P+Ne(T,X++),w+=ce(T,M,O,I,S);else if(I==="object"){if(typeof v.then=="function")return ce(We(v),M,O,T,S);throw M=String(v),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return w}function E(v,M,O){if(v==null)return v;var T=[],S=0;return ce(v,T,"","",function(I){return M.call(O,I,S++)}),T}function D(v){if(v._status===-1){var M=v._result;M=M(),M.then(function(O){(v._status===0||v._status===-1)&&(v._status=1,v._result=O)},function(O){(v._status===0||v._status===-1)&&(v._status=2,v._result=O)}),v._status===-1&&(v._status=0,v._result=M)}if(v._status===1)return v._result.default;throw v._result}var $=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)};function V(){}return Ce.Children={map:E,forEach:function(v,M,O){E(v,function(){M.apply(this,arguments)},O)},count:function(v){var M=0;return E(v,function(){M++}),M},toArray:function(v){return E(v,function(M){return M})||[]},only:function(v){if(!he(v))throw Error("React.Children.only expected to receive a single React element child.");return v}},Ce.Component=fe,Ce.Fragment=l,Ce.Profiler=c,Ce.PureComponent=de,Ce.StrictMode=o,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(v){return W.H.useMemoCache(v)}},Ce.cache=function(v){return function(){return v.apply(null,arguments)}},Ce.cloneElement=function(v,M,O){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var T=G({},v.props),S=v.key,I=void 0;if(M!=null)for(w in M.ref!==void 0&&(I=void 0),M.key!==void 0&&(S=""+M.key),M)!re.call(M,w)||w==="key"||w==="__self"||w==="__source"||w==="ref"&&M.ref===void 0||(T[w]=M[w]);var w=arguments.length-2;if(w===1)T.children=O;else if(1<w){for(var P=Array(w),X=0;X<w;X++)P[X]=arguments[X+2];T.children=P}return me(v.type,S,void 0,void 0,I,T)},Ce.createContext=function(v){return v={$$typeof:m,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:f,_context:v},v},Ce.createElement=function(v,M,O){var T,S={},I=null;if(M!=null)for(T in M.key!==void 0&&(I=""+M.key),M)re.call(M,T)&&T!=="key"&&T!=="__self"&&T!=="__source"&&(S[T]=M[T]);var w=arguments.length-2;if(w===1)S.children=O;else if(1<w){for(var P=Array(w),X=0;X<w;X++)P[X]=arguments[X+2];S.children=P}if(v&&v.defaultProps)for(T in w=v.defaultProps,w)S[T]===void 0&&(S[T]=w[T]);return me(v,I,void 0,void 0,null,S)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(v){return{$$typeof:_,render:v}},Ce.isValidElement=he,Ce.lazy=function(v){return{$$typeof:b,_payload:{_status:-1,_result:v},_init:D}},Ce.memo=function(v,M){return{$$typeof:p,type:v,compare:M===void 0?null:M}},Ce.startTransition=function(v){var M=W.T,O={};W.T=O;try{var T=v(),S=W.S;S!==null&&S(O,T),typeof T=="object"&&T!==null&&typeof T.then=="function"&&T.then(V,$)}catch(I){$(I)}finally{W.T=M}},Ce.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},Ce.use=function(v){return W.H.use(v)},Ce.useActionState=function(v,M,O){return W.H.useActionState(v,M,O)},Ce.useCallback=function(v,M){return W.H.useCallback(v,M)},Ce.useContext=function(v){return W.H.useContext(v)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(v,M){return W.H.useDeferredValue(v,M)},Ce.useEffect=function(v,M,O){var T=W.H;if(typeof O=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return T.useEffect(v,M)},Ce.useId=function(){return W.H.useId()},Ce.useImperativeHandle=function(v,M,O){return W.H.useImperativeHandle(v,M,O)},Ce.useInsertionEffect=function(v,M){return W.H.useInsertionEffect(v,M)},Ce.useLayoutEffect=function(v,M){return W.H.useLayoutEffect(v,M)},Ce.useMemo=function(v,M){return W.H.useMemo(v,M)},Ce.useOptimistic=function(v,M){return W.H.useOptimistic(v,M)},Ce.useReducer=function(v,M,O){return W.H.useReducer(v,M,O)},Ce.useRef=function(v){return W.H.useRef(v)},Ce.useState=function(v){return W.H.useState(v)},Ce.useSyncExternalStore=function(v,M,O){return W.H.useSyncExternalStore(v,M,O)},Ce.useTransition=function(){return W.H.useTransition()},Ce.version="19.1.1",Ce}var y_;function pc(){return y_||(y_=1,$s.exports=Gy()),$s.exports}var H=pc(),Zs={exports:{}},zi={},Gs={exports:{}},Fs={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var g_;function Fy(){return g_||(g_=1,(function(n){function r(E,D){var $=E.length;E.push(D);e:for(;0<$;){var V=$-1>>>1,v=E[V];if(0<c(v,D))E[V]=D,E[$]=v,$=V;else break e}}function l(E){return E.length===0?null:E[0]}function o(E){if(E.length===0)return null;var D=E[0],$=E.pop();if($!==D){E[0]=$;e:for(var V=0,v=E.length,M=v>>>1;V<M;){var O=2*(V+1)-1,T=E[O],S=O+1,I=E[S];if(0>c(T,$))S<v&&0>c(I,T)?(E[V]=I,E[S]=$,V=S):(E[V]=T,E[O]=$,V=O);else if(S<v&&0>c(I,$))E[V]=I,E[S]=$,V=S;else break e}}return D}function c(E,D){var $=E.sortIndex-D.sortIndex;return $!==0?$:E.id-D.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var m=Date,_=m.now();n.unstable_now=function(){return m.now()-_}}var g=[],p=[],b=1,R=null,j=3,B=!1,G=!1,k=!1,fe=!1,le=typeof setTimeout=="function"?setTimeout:null,de=typeof clearTimeout=="function"?clearTimeout:null,te=typeof setImmediate<"u"?setImmediate:null;function ie(E){for(var D=l(p);D!==null;){if(D.callback===null)o(p);else if(D.startTime<=E)o(p),D.sortIndex=D.expirationTime,r(g,D);else break;D=l(p)}}function W(E){if(k=!1,ie(E),!G)if(l(g)!==null)G=!0,re||(re=!0,Ne());else{var D=l(p);D!==null&&ce(W,D.startTime-E)}}var re=!1,me=-1,ne=5,he=-1;function Ae(){return fe?!0:!(n.unstable_now()-he<ne)}function Ee(){if(fe=!1,re){var E=n.unstable_now();he=E;var D=!0;try{e:{G=!1,k&&(k=!1,de(me),me=-1),B=!0;var $=j;try{t:{for(ie(E),R=l(g);R!==null&&!(R.expirationTime>E&&Ae());){var V=R.callback;if(typeof V=="function"){R.callback=null,j=R.priorityLevel;var v=V(R.expirationTime<=E);if(E=n.unstable_now(),typeof v=="function"){R.callback=v,ie(E),D=!0;break t}R===l(g)&&o(g),ie(E)}else o(g);R=l(g)}if(R!==null)D=!0;else{var M=l(p);M!==null&&ce(W,M.startTime-E),D=!1}}break e}finally{R=null,j=$,B=!1}D=void 0}}finally{D?Ne():re=!1}}}var Ne;if(typeof te=="function")Ne=function(){te(Ee)};else if(typeof MessageChannel<"u"){var Ke=new MessageChannel,We=Ke.port2;Ke.port1.onmessage=Ee,Ne=function(){We.postMessage(null)}}else Ne=function(){le(Ee,0)};function ce(E,D){me=le(function(){E(n.unstable_now())},D)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(E){E.callback=null},n.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<E?Math.floor(1e3/E):5},n.unstable_getCurrentPriorityLevel=function(){return j},n.unstable_next=function(E){switch(j){case 1:case 2:case 3:var D=3;break;default:D=j}var $=j;j=D;try{return E()}finally{j=$}},n.unstable_requestPaint=function(){fe=!0},n.unstable_runWithPriority=function(E,D){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var $=j;j=E;try{return D()}finally{j=$}},n.unstable_scheduleCallback=function(E,D,$){var V=n.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?V+$:V):$=V,E){case 1:var v=-1;break;case 2:v=250;break;case 5:v=1073741823;break;case 4:v=1e4;break;default:v=5e3}return v=$+v,E={id:b++,callback:D,priorityLevel:E,startTime:$,expirationTime:v,sortIndex:-1},$>V?(E.sortIndex=$,r(p,E),l(g)===null&&E===l(p)&&(k?(de(me),me=-1):k=!0,ce(W,$-V))):(E.sortIndex=v,r(g,E),G||B||(G=!0,re||(re=!0,Ne()))),E},n.unstable_shouldYield=Ae,n.unstable_wrapCallback=function(E){var D=j;return function(){var $=j;j=D;try{return E.apply(this,arguments)}finally{j=$}}}})(Fs)),Fs}var v_;function Yy(){return v_||(v_=1,Gs.exports=Fy()),Gs.exports}var Ys={exports:{}},Rt={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var b_;function qy(){if(b_)return Rt;b_=1;var n=pc();function r(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(r(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(g,p,b){var R=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:R==null?null:""+R,children:g,containerInfo:p,implementation:b}}var m=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function _(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Rt.createPortal=function(g,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(r(299));return f(g,p,null,b)},Rt.flushSync=function(g){var p=m.T,b=o.p;try{if(m.T=null,o.p=2,g)return g()}finally{m.T=p,o.p=b,o.d.f()}},Rt.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(g,p))},Rt.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},Rt.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var b=p.as,R=_(b,p.crossOrigin),j=typeof p.integrity=="string"?p.integrity:void 0,B=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?o.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:R,integrity:j,fetchPriority:B}):b==="script"&&o.d.X(g,{crossOrigin:R,integrity:j,fetchPriority:B,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Rt.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=_(p.as,p.crossOrigin);o.d.M(g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(g)},Rt.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,R=_(b,p.crossOrigin);o.d.L(g,b,{crossOrigin:R,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Rt.preloadModule=function(g,p){if(typeof g=="string")if(p){var b=_(p.as,p.crossOrigin);o.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(g)},Rt.requestFormReset=function(g){o.d.r(g)},Rt.unstable_batchedUpdates=function(g,p){return g(p)},Rt.useFormState=function(g,p,b){return m.H.useFormState(g,p,b)},Rt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Rt.version="19.1.1",Rt}var S_;function Vy(){if(S_)return Ys.exports;S_=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Ys.exports=qy(),Ys.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var A_;function Py(){if(A_)return zi;A_=1;var n=Yy(),r=pc(),l=Vy();function o(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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(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 m(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 _(e){if(f(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var u=a.return;if(u===null)break;var s=u.alternate;if(s===null){if(i=u.return,i!==null){a=i;continue}break}if(u.child===s.child){for(s=u.child;s;){if(s===a)return _(u),e;if(s===i)return _(u),t;s=s.sibling}throw Error(o(188))}if(a.return!==i.return)a=u,i=s;else{for(var d=!1,h=u.child;h;){if(h===a){d=!0,a=u,i=s;break}if(h===i){d=!0,i=u,a=s;break}h=h.sibling}if(!d){for(h=s.child;h;){if(h===a){d=!0,a=s,i=u;break}if(h===i){d=!0,i=s,a=u;break}h=h.sibling}if(!d)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,R=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),B=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),fe=Symbol.for("react.profiler"),le=Symbol.for("react.provider"),de=Symbol.for("react.consumer"),te=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),he=Symbol.for("react.activity"),Ae=Symbol.for("react.memo_cache_sentinel"),Ee=Symbol.iterator;function Ne(e){return e===null||typeof e!="object"?null:(e=Ee&&e[Ee]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Symbol.for("react.client.reference");function We(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ke?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case fe:return"Profiler";case k:return"StrictMode";case W:return"Suspense";case re:return"SuspenseList";case he:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case B:return"Portal";case te:return(e.displayName||"Context")+".Provider";case de:return(e._context.displayName||"Context")+".Consumer";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case me:return t=e.displayName||null,t!==null?t:We(e.type)||"Memo";case ne:t=e._payload,e=e._init;try{return We(e(t))}catch{}}return null}var ce=Array.isArray,E=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},V=[],v=-1;function M(e){return{current:e}}function O(e){0>v||(e.current=V[v],V[v]=null,v--)}function T(e,t){v++,V[v]=e.current,e.current=t}var S=M(null),I=M(null),w=M(null),P=M(null);function X(e,t){switch(T(w,t),T(I,e),T(S,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zm(t),e=Gm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(S),T(S,e)}function ee(){O(S),O(I),O(w)}function oe(e){e.memoizedState!==null&&T(P,e);var t=S.current,a=Gm(t,e.type);t!==a&&(T(I,e),T(S,a))}function K(e){I.current===e&&(O(S),O(I)),P.current===e&&(O(P),Mi._currentValue=$)}var Q=Object.prototype.hasOwnProperty,J=n.unstable_scheduleCallback,pe=n.unstable_cancelCallback,Oe=n.unstable_shouldYield,Me=n.unstable_requestPaint,ye=n.unstable_now,Qe=n.unstable_getCurrentPriorityLevel,ue=n.unstable_ImmediatePriority,$e=n.unstable_UserBlockingPriority,Te=n.unstable_NormalPriority,ke=n.unstable_LowPriority,Je=n.unstable_IdlePriority,At=n.log,Ft=n.unstable_setDisableYieldValue,Yt=null,Ue=null;function we(e){if(typeof At=="function"&&Ft(e),Ue&&typeof Ue.setStrictMode=="function")try{Ue.setStrictMode(Yt,e)}catch{}}var He=Math.clz32?Math.clz32:ze,ft=Math.log,Dt=Math.LN2;function ze(e){return e>>>=0,e===0?32:31-(ft(e)/Dt|0)|0}var yt=256,tn=4194304;function nn(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 pn(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var u=0,s=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var h=i&134217727;return h!==0?(i=h&~s,i!==0?u=nn(i):(d&=h,d!==0?u=nn(d):a||(a=h&~e,a!==0&&(u=nn(a))))):(h=i&~s,h!==0?u=nn(h):d!==0?u=nn(d):a||(a=i&~e,a!==0&&(u=nn(a)))),u===0?0:t!==0&&t!==u&&(t&s)===0&&(s=u&-u,a=t&-t,s>=a||s===32&&(a&4194048)!==0)?t:u}function Dn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function xn(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 Ga(){var e=yt;return yt<<=1,(yt&4194048)===0&&(yt=256),e}function Fa(){var e=tn;return tn<<=1,(tn&62914560)===0&&(tn=4194304),e}function qn(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function An(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Vi(e,t,a,i,u,s){var d=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 h=e.entanglements,A=e.expirationTimes,L=e.hiddenUpdates;for(a=d&~a;0<a;){var Z=31-He(a),q=1<<Z;h[Z]=0,A[Z]=-1;var z=L[Z];if(z!==null)for(L[Z]=null,Z=0;Z<z.length;Z++){var U=z[Z];U!==null&&(U.lane&=-536870913)}a&=~q}i!==0&&Pi(e,i,0),s!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=s&~(d&~t))}function Pi(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-He(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&4194090}function Ki(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-He(a),u=1<<i;u&t|e[i]&t&&(e[i]|=t),a&=~u}}function En(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 yn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Qi(){var e=D.p;return e!==0?e:(e=window.event,e===void 0?32:u_(e.type))}function x0(e,t){var a=D.p;try{return D.p=e,t()}finally{D.p=a}}var Vn=Math.random().toString(36).slice(2),xt="__reactFiber$"+Vn,kt="__reactProps$"+Vn,Ya="__reactContainer$"+Vn,Ro="__reactEvents$"+Vn,w0="__reactListeners$"+Vn,R0="__reactHandles$"+Vn,Dc="__reactResources$"+Vn,Hr="__reactMarker$"+Vn;function Lo(e){delete e[xt],delete e[kt],delete e[Ro],delete e[w0],delete e[R0]}function qa(e){var t=e[xt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ya]||a[xt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Vm(e);e!==null;){if(a=e[xt])return a;e=Vm(e)}return t}e=a,a=e.parentNode}return null}function Va(e){if(e=e[xt]||e[Ya]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function Ir(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Pa(e){var t=e[Dc];return t||(t=e[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function gt(e){e[Hr]=!0}var xc=new Set,wc={};function Aa(e,t){Ka(e,t),Ka(e+"Capture",t)}function Ka(e,t){for(wc[e]=t,e=0;e<t.length;e++)xc.add(t[e])}var L0=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]*$"),Rc={},Lc={};function z0(e){return Q.call(Lc,e)?!0:Q.call(Rc,e)?!1:L0.test(e)?Lc[e]=!0:(Rc[e]=!0,!1)}function Xi(e,t,a){if(z0(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Wi(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 wn(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}var zo,zc;function Qa(e){if(zo===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);zo=t&&t[1]||"",zc=-1<a.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+zo+e+zc}var Bo=!1;function ko(e,t){if(!e||Bo)return"";Bo=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var q=function(){throw Error()};if(Object.defineProperty(q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(q,[])}catch(U){var z=U}Reflect.construct(e,[],q)}else{try{q.call()}catch(U){z=U}e.call(q.prototype)}}else{try{throw Error()}catch(U){z=U}(q=e())&&typeof q.catch=="function"&&q.catch(function(){})}}catch(U){if(U&&z&&typeof U.stack=="string")return[U.stack,z.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=i.DetermineComponentFrameRoot(),d=s[0],h=s[1];if(d&&h){var A=d.split(`
44
- `),L=h.split(`
45
- `);for(u=i=0;i<A.length&&!A[i].includes("DetermineComponentFrameRoot");)i++;for(;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;if(i===A.length||u===L.length)for(i=A.length-1,u=L.length-1;1<=i&&0<=u&&A[i]!==L[u];)u--;for(;1<=i&&0<=u;i--,u--)if(A[i]!==L[u]){if(i!==1||u!==1)do if(i--,u--,0>u||A[i]!==L[u]){var Z=`
46
- `+A[i].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),Z}while(1<=i&&0<=u);break}}}finally{Bo=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Qa(a):""}function B0(e){switch(e.tag){case 26:case 27:case 5:return Qa(e.type);case 16:return Qa("Lazy");case 13:return Qa("Suspense");case 19:return Qa("SuspenseList");case 0:case 15:return ko(e.type,!1);case 11:return ko(e.type.render,!1);case 1:return ko(e.type,!0);case 31:return Qa("Activity");default:return""}}function Bc(e){try{var t="";do t+=B0(e),e=e.return;while(e);return t}catch(a){return`
47
- Error generating stack: `+a.message+`
48
- `+a.stack}}function an(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function kc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function k0(e){var t=kc(e)?"checked":"value",a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var u=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(d){i=""+d,s.call(this,d)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return i},setValue:function(d){i=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ji(e){e._valueTracker||(e._valueTracker=k0(e))}function Uc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=kc(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function el(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 U0=/[\n"\\]/g;function rn(e){return e.replace(U0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Uo(e,t,a,i,u,s,d,h){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+an(t)):e.value!==""+an(t)&&(e.value=""+an(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?jo(e,d,an(t)):a!=null?jo(e,d,an(a)):i!=null&&e.removeAttribute("value"),u==null&&s!=null&&(e.defaultChecked=!!s),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+an(h):e.removeAttribute("name")}function jc(e,t,a,i,u,s,d,h){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?""+an(a):"",t=t!=null?""+an(t):a,h||t===e.value||(e.value=t),e.defaultValue=t}i=i??u,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=h?e.checked:!!i,e.defaultChecked=!!i,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d)}function jo(e,t,a){t==="number"&&el(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Xa(e,t,a,i){if(e=e.options,t){t={};for(var u=0;u<a.length;u++)t["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=t.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&i&&(e[a].defaultSelected=!0)}else{for(a=""+an(a),t=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,i&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function Hc(e,t,a){if(t!=null&&(t=""+an(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+an(a):""}function Ic(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if(ce(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=an(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i)}function Wa(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var j0=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 $c(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||j0.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Zc(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var u in t)i=t[u],t.hasOwnProperty(u)&&a[u]!==i&&$c(e,u,i)}else for(var s in t)t.hasOwnProperty(s)&&$c(e,s,t[s])}function Ho(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 H0=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"]]),I0=/^[\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 tl(e){return I0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Io=null;function $o(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ja=null,er=null;function Gc(e){var t=Va(e);if(t&&(e=t.stateNode)){var a=e[kt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Uo(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="'+rn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var u=i[kt]||null;if(!u)throw Error(o(90));Uo(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&Uc(i)}break e;case"textarea":Hc(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&Xa(e,!!a.multiple,t,!1)}}}var Zo=!1;function Fc(e,t,a){if(Zo)return e(t,a);Zo=!0;try{var i=e(t);return i}finally{if(Zo=!1,(Ja!==null||er!==null)&&(Il(),Ja&&(t=Ja,e=er,er=Ja=null,Gc(t),e)))for(t=0;t<e.length;t++)Gc(e[t])}}function $r(e,t){var a=e.stateNode;if(a===null)return null;var i=a[kt]||null;if(i===null)return null;a=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var Rn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Go=!1;if(Rn)try{var Zr={};Object.defineProperty(Zr,"passive",{get:function(){Go=!0}}),window.addEventListener("test",Zr,Zr),window.removeEventListener("test",Zr,Zr)}catch{Go=!1}var Pn=null,Fo=null,nl=null;function Yc(){if(nl)return nl;var e,t=Fo,a=t.length,i,u="value"in Pn?Pn.value:Pn.textContent,s=u.length;for(e=0;e<a&&t[e]===u[e];e++);var d=a-e;for(i=1;i<=d&&t[a-i]===u[s-i];i++);return nl=u.slice(e,1<i?1-i:void 0)}function al(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 rl(){return!0}function qc(){return!1}function Ut(e){function t(a,i,u,s,d){this._reactName=a,this._targetInst=u,this.type=i,this.nativeEvent=s,this.target=d,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(a=e[h],this[h]=a?a(s):s[h]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?rl:qc,this.isPropagationStopped=qc,this}return b(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=rl)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=rl)},persist:function(){},isPersistent:rl}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},il=Ut(Ea),Gr=b({},Ea,{view:0,detail:0}),$0=Ut(Gr),Yo,qo,Fr,ll=b({},Gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Po,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!==Fr&&(Fr&&e.type==="mousemove"?(Yo=e.screenX-Fr.screenX,qo=e.screenY-Fr.screenY):qo=Yo=0,Fr=e),Yo)},movementY:function(e){return"movementY"in e?e.movementY:qo}}),Vc=Ut(ll),Z0=b({},ll,{dataTransfer:0}),G0=Ut(Z0),F0=b({},Gr,{relatedTarget:0}),Vo=Ut(F0),Y0=b({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),q0=Ut(Y0),V0=b({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),P0=Ut(V0),K0=b({},Ea,{data:0}),Pc=Ut(K0),Q0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X0={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"},W0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W0[e])?!!t[e]:!1}function Po(){return J0}var ep=b({},Gr,{key:function(e){if(e.key){var t=Q0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=al(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?X0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Po,charCode:function(e){return e.type==="keypress"?al(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?al(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tp=Ut(ep),np=b({},ll,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kc=Ut(np),ap=b({},Gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Po}),rp=Ut(ap),ip=b({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),lp=Ut(ip),op=b({},ll,{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}),up=Ut(op),sp=b({},Ea,{newState:0,oldState:0}),cp=Ut(sp),fp=[9,13,27,32],Ko=Rn&&"CompositionEvent"in window,Yr=null;Rn&&"documentMode"in document&&(Yr=document.documentMode);var dp=Rn&&"TextEvent"in window&&!Yr,Qc=Rn&&(!Ko||Yr&&8<Yr&&11>=Yr),Xc=" ",Wc=!1;function Jc(e,t){switch(e){case"keyup":return fp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ef(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tr=!1;function mp(e,t){switch(e){case"compositionend":return ef(t);case"keypress":return t.which!==32?null:(Wc=!0,Xc);case"textInput":return e=t.data,e===Xc&&Wc?null:e;default:return null}}function _p(e,t){if(tr)return e==="compositionend"||!Ko&&Jc(e,t)?(e=Yc(),nl=Fo=Pn=null,tr=!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 Qc&&t.locale!=="ko"?null:t.data;default:return null}}var hp={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 tf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hp[e.type]:t==="textarea"}function nf(e,t,a,i){Ja?er?er.push(i):er=[i]:Ja=i,t=ql(t,"onChange"),0<t.length&&(a=new il("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var qr=null,Vr=null;function pp(e){Um(e,0)}function ol(e){var t=Ir(e);if(Uc(t))return e}function af(e,t){if(e==="change")return t}var rf=!1;if(Rn){var Qo;if(Rn){var Xo="oninput"in document;if(!Xo){var lf=document.createElement("div");lf.setAttribute("oninput","return;"),Xo=typeof lf.oninput=="function"}Qo=Xo}else Qo=!1;rf=Qo&&(!document.documentMode||9<document.documentMode)}function of(){qr&&(qr.detachEvent("onpropertychange",uf),Vr=qr=null)}function uf(e){if(e.propertyName==="value"&&ol(Vr)){var t=[];nf(t,Vr,e,$o(e)),Fc(pp,t)}}function yp(e,t,a){e==="focusin"?(of(),qr=t,Vr=a,qr.attachEvent("onpropertychange",uf)):e==="focusout"&&of()}function gp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ol(Vr)}function vp(e,t){if(e==="click")return ol(t)}function bp(e,t){if(e==="input"||e==="change")return ol(t)}function Sp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qt=typeof Object.is=="function"?Object.is:Sp;function Pr(e,t){if(qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var u=a[i];if(!Q.call(t,u)||!qt(e[u],t[u]))return!1}return!0}function sf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cf(e,t){var a=sf(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=sf(a)}}function ff(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ff(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function df(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=el(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=el(e.document)}return t}function Wo(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 Ap=Rn&&"documentMode"in document&&11>=document.documentMode,nr=null,Jo=null,Kr=null,eu=!1;function mf(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;eu||nr==null||nr!==el(i)||(i=nr,"selectionStart"in i&&Wo(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Kr&&Pr(Kr,i)||(Kr=i,i=ql(Jo,"onSelect"),0<i.length&&(t=new il("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=nr)))}function Ta(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var ar={animationend:Ta("Animation","AnimationEnd"),animationiteration:Ta("Animation","AnimationIteration"),animationstart:Ta("Animation","AnimationStart"),transitionrun:Ta("Transition","TransitionRun"),transitionstart:Ta("Transition","TransitionStart"),transitioncancel:Ta("Transition","TransitionCancel"),transitionend:Ta("Transition","TransitionEnd")},tu={},_f={};Rn&&(_f=document.createElement("div").style,"AnimationEvent"in window||(delete ar.animationend.animation,delete ar.animationiteration.animation,delete ar.animationstart.animation),"TransitionEvent"in window||delete ar.transitionend.transition);function Ca(e){if(tu[e])return tu[e];if(!ar[e])return e;var t=ar[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in _f)return tu[e]=t[a];return e}var hf=Ca("animationend"),pf=Ca("animationiteration"),yf=Ca("animationstart"),Ep=Ca("transitionrun"),Tp=Ca("transitionstart"),Cp=Ca("transitioncancel"),gf=Ca("transitionend"),vf=new Map,nu="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(" ");nu.push("scrollEnd");function gn(e,t){vf.set(e,t),Aa(t,[e])}var bf=new WeakMap;function ln(e,t){if(typeof e=="object"&&e!==null){var a=bf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Bc(t)},bf.set(e,t),t)}return{value:e,source:t,stack:Bc(t)}}var on=[],rr=0,au=0;function ul(){for(var e=rr,t=au=rr=0;t<e;){var a=on[t];on[t++]=null;var i=on[t];on[t++]=null;var u=on[t];on[t++]=null;var s=on[t];if(on[t++]=null,i!==null&&u!==null){var d=i.pending;d===null?u.next=u:(u.next=d.next,d.next=u),i.pending=u}s!==0&&Sf(a,u,s)}}function sl(e,t,a,i){on[rr++]=e,on[rr++]=t,on[rr++]=a,on[rr++]=i,au|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function ru(e,t,a,i){return sl(e,t,a,i),cl(e)}function ir(e,t){return sl(e,null,null,t),cl(e)}function Sf(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var u=!1,s=e.return;s!==null;)s.childLanes|=a,i=s.alternate,i!==null&&(i.childLanes|=a),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(u=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,u&&t!==null&&(u=31-He(a),e=s.hiddenUpdates,i=e[u],i===null?e[u]=[t]:i.push(t),t.lane=a|536870912),s):null}function cl(e){if(50<bi)throw bi=0,cs=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var lr={};function Op(e,t,a,i){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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,t,a,i){return new Op(e,t,a,i)}function iu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ln(e,t){var a=e.alternate;return a===null?(a=Vt(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 Af(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 fl(e,t,a,i,u,s){var d=0;if(i=e,typeof e=="function")iu(e)&&(d=1);else if(typeof e=="string")d=My(e,a,S.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case he:return e=Vt(31,a,t,u),e.elementType=he,e.lanes=s,e;case G:return Oa(a.children,u,s,t);case k:d=8,u|=24;break;case fe:return e=Vt(12,a,t,u|2),e.elementType=fe,e.lanes=s,e;case W:return e=Vt(13,a,t,u),e.elementType=W,e.lanes=s,e;case re:return e=Vt(19,a,t,u),e.elementType=re,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:case te:d=10;break e;case de:d=9;break e;case ie:d=11;break e;case me:d=14;break e;case ne:d=16,i=null;break e}d=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=Vt(d,a,t,u),t.elementType=e,t.type=i,t.lanes=s,t}function Oa(e,t,a,i){return e=Vt(7,e,i,t),e.lanes=a,e}function lu(e,t,a){return e=Vt(6,e,null,t),e.lanes=a,e}function ou(e,t,a){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var or=[],ur=0,dl=null,ml=0,un=[],sn=0,Na=null,zn=1,Bn="";function Ma(e,t){or[ur++]=ml,or[ur++]=dl,dl=e,ml=t}function Ef(e,t,a){un[sn++]=zn,un[sn++]=Bn,un[sn++]=Na,Na=e;var i=zn;e=Bn;var u=32-He(i)-1;i&=~(1<<u),a+=1;var s=32-He(t)+u;if(30<s){var d=u-u%5;s=(i&(1<<d)-1).toString(32),i>>=d,u-=d,zn=1<<32-He(t)+u|a<<u|i,Bn=s+e}else zn=1<<s|a<<u|i,Bn=e}function uu(e){e.return!==null&&(Ma(e,1),Ef(e,1,0))}function su(e){for(;e===dl;)dl=or[--ur],or[ur]=null,ml=or[--ur],or[ur]=null;for(;e===Na;)Na=un[--sn],un[sn]=null,Bn=un[--sn],un[sn]=null,zn=un[--sn],un[sn]=null}var zt=null,rt=null,Ie=!1,Da=null,Tn=!1,cu=Error(o(519));function xa(e){var t=Error(o(418,""));throw Wr(ln(t,e)),cu}function Tf(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[xt]=e,t[kt]=i,a){case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":case"embed":Le("load",t);break;case"video":case"audio":for(a=0;a<Ai.length;a++)Le(Ai[a],t);break;case"source":Le("error",t);break;case"img":case"image":case"link":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"input":Le("invalid",t),jc(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0),Ji(t);break;case"select":Le("invalid",t);break;case"textarea":Le("invalid",t),Ic(t,i.value,i.defaultValue,i.children),Ji(t)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||$m(t.textContent,a)?(i.popover!=null&&(Le("beforetoggle",t),Le("toggle",t)),i.onScroll!=null&&Le("scroll",t),i.onScrollEnd!=null&&Le("scrollend",t),i.onClick!=null&&(t.onclick=Vl),t=!0):t=!1,t||xa(e)}function Cf(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 13:Tn=!1;return;case 27:case 3:Tn=!0;return;default:zt=zt.return}}function Qr(e){if(e!==zt)return!1;if(!Ie)return Cf(e),Ie=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Os(e.type,e.memoizedProps)),a=!a),a&&rt&&xa(e),Cf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(a=e.data,a==="/$"){if(t===0){rt=bn(e.nextSibling);break e}t--}else a!=="$"&&a!=="$!"&&a!=="$?"||t++;e=e.nextSibling}rt=null}}else t===27?(t=rt,ca(e.type)?(e=xs,xs=null,rt=e):rt=t):rt=zt?bn(e.stateNode.nextSibling):null;return!0}function Xr(){rt=zt=null,Ie=!1}function Of(){var e=Da;return e!==null&&(It===null?It=e:It.push.apply(It,e),Da=null),e}function Wr(e){Da===null?Da=[e]:Da.push(e)}var fu=M(null),wa=null,kn=null;function Kn(e,t,a){T(fu,t._currentValue),t._currentValue=a}function Un(e){e._currentValue=fu.current,O(fu)}function du(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function mu(e,t,a,i){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var s=u.dependencies;if(s!==null){var d=u.child;s=s.firstContext;e:for(;s!==null;){var h=s;s=u;for(var A=0;A<t.length;A++)if(h.context===t[A]){s.lanes|=a,h=s.alternate,h!==null&&(h.lanes|=a),du(s.return,a,e),i||(d=null);break e}s=h.next}}else if(u.tag===18){if(d=u.return,d===null)throw Error(o(341));d.lanes|=a,s=d.alternate,s!==null&&(s.lanes|=a),du(d,a,e),d=null}else d=u.child;if(d!==null)d.return=u;else for(d=u;d!==null;){if(d===e){d=null;break}if(u=d.sibling,u!==null){u.return=d.return,d=u;break}d=d.return}u=d}}function Jr(e,t,a,i){e=null;for(var u=t,s=!1;u!==null;){if(!s){if((u.flags&524288)!==0)s=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var d=u.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var h=u.type;qt(u.pendingProps.value,d.value)||(e!==null?e.push(h):e=[h])}}else if(u===P.current){if(d=u.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Mi):e=[Mi])}u=u.return}e!==null&&mu(t,e,a,i),t.flags|=262144}function _l(e){for(e=e.firstContext;e!==null;){if(!qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ra(e){wa=e,kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wt(e){return Nf(wa,e)}function hl(e,t){return wa===null&&Ra(e),Nf(e,t)}function Nf(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},kn===null){if(e===null)throw Error(o(308));kn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else kn=kn.next=t;return a}var Np=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Mp=n.unstable_scheduleCallback,Dp=n.unstable_NormalPriority,_t={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function _u(){return{controller:new Np,data:new Map,refCount:0}}function ei(e){e.refCount--,e.refCount===0&&Mp(Dp,function(){e.controller.abort()})}var ti=null,hu=0,sr=0,cr=null;function xp(e,t){if(ti===null){var a=ti=[];hu=0,sr=ys(),cr={status:"pending",value:void 0,then:function(i){a.push(i)}}}return hu++,t.then(Mf,Mf),t}function Mf(){if(--hu===0&&ti!==null){cr!==null&&(cr.status="fulfilled");var e=ti;ti=null,sr=0,cr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function wp(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var u=0;u<a.length;u++)(0,a[u])(t)},function(u){for(i.status="rejected",i.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),i}var Df=E.S;E.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&xp(e,t),Df!==null&&Df(e,t)};var La=M(null);function pu(){var e=La.current;return e!==null?e:Xe.pooledCache}function pl(e,t){t===null?T(La,La.current):T(La,t.pool)}function xf(){var e=pu();return e===null?null:{parent:_t._currentValue,pool:e}}var ni=Error(o(460)),wf=Error(o(474)),yl=Error(o(542)),yu={then:function(){}};function Rf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gl(){}function Lf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(gl,gl),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Bf(e),e;default:if(typeof t.status=="string")t.then(gl,gl);else{if(e=Xe,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=i}},function(i){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Bf(e),e}throw ai=t,ni}}var ai=null;function zf(){if(ai===null)throw Error(o(459));var e=ai;return ai=null,e}function Bf(e){if(e===ni||e===yl)throw Error(o(483))}var Qn=!1;function gu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vu(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 Xn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Wn(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Ze&2)!==0){var u=i.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),i.pending=t,t=cl(e),Sf(e,null,a),t}return sl(e,i,t,a),cl(e)}function ri(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Ki(e,a)}}function bu(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var u=null,s=null;if(a=a.firstBaseUpdate,a!==null){do{var d={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};s===null?u=s=d:s=s.next=d,a=a.next}while(a!==null);s===null?u=s=t:s=s.next=t}else u=s=t;a={baseState:i.baseState,firstBaseUpdate:u,lastBaseUpdate:s,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Su=!1;function ii(){if(Su){var e=cr;if(e!==null)throw e}}function li(e,t,a,i){Su=!1;var u=e.updateQueue;Qn=!1;var s=u.firstBaseUpdate,d=u.lastBaseUpdate,h=u.shared.pending;if(h!==null){u.shared.pending=null;var A=h,L=A.next;A.next=null,d===null?s=L:d.next=L,d=A;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,h=Z.lastBaseUpdate,h!==d&&(h===null?Z.firstBaseUpdate=L:h.next=L,Z.lastBaseUpdate=A))}if(s!==null){var q=u.baseState;d=0,Z=L=A=null,h=s;do{var z=h.lane&-536870913,U=z!==h.lane;if(U?(Be&z)===z:(i&z)===z){z!==0&&z===sr&&(Su=!0),Z!==null&&(Z=Z.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var Se=e,ge=h;z=t;var Ve=a;switch(ge.tag){case 1:if(Se=ge.payload,typeof Se=="function"){q=Se.call(Ve,q,z);break e}q=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=ge.payload,z=typeof Se=="function"?Se.call(Ve,q,z):Se,z==null)break e;q=b({},q,z);break e;case 2:Qn=!0}}z=h.callback,z!==null&&(e.flags|=64,U&&(e.flags|=8192),U=u.callbacks,U===null?u.callbacks=[z]:U.push(z))}else U={lane:z,tag:h.tag,payload:h.payload,callback:h.callback,next:null},Z===null?(L=Z=U,A=q):Z=Z.next=U,d|=z;if(h=h.next,h===null){if(h=u.shared.pending,h===null)break;U=h,h=U.next,U.next=null,u.lastBaseUpdate=U,u.shared.pending=null}}while(!0);Z===null&&(A=q),u.baseState=A,u.firstBaseUpdate=L,u.lastBaseUpdate=Z,s===null&&(u.shared.lanes=0),la|=d,e.lanes=d,e.memoizedState=q}}function kf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Uf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)kf(a[e],t)}var fr=M(null),vl=M(0);function jf(e,t){e=Fn,T(vl,e),T(fr,t),Fn=e|t.baseLanes}function Au(){T(vl,Fn),T(fr,fr.current)}function Eu(){Fn=vl.current,O(fr),O(vl)}var Jn=0,De=null,Ye=null,dt=null,bl=!1,dr=!1,za=!1,Sl=0,oi=0,mr=null,Rp=0;function ut(){throw Error(o(321))}function Tu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!qt(e[a],t[a]))return!1;return!0}function Cu(e,t,a,i,u,s){return Jn=s,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?Sd:Ad,za=!1,s=a(i,u),za=!1,dr&&(s=If(t,a,i,u)),Hf(e),s}function Hf(e){E.H=Nl;var t=Ye!==null&&Ye.next!==null;if(Jn=0,dt=Ye=De=null,bl=!1,oi=0,mr=null,t)throw Error(o(300));e===null||vt||(e=e.dependencies,e!==null&&_l(e)&&(vt=!0))}function If(e,t,a,i){De=e;var u=0;do{if(dr&&(mr=null),oi=0,dr=!1,25<=u)throw Error(o(301));if(u+=1,dt=Ye=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}E.H=Hp,s=t(a,i)}while(dr);return s}function Lp(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?ui(t):t,e=e.useState()[0],(Ye!==null?Ye.memoizedState:null)!==e&&(De.flags|=1024),t}function Ou(){var e=Sl!==0;return Sl=0,e}function Nu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Mu(e){if(bl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bl=!1}Jn=0,dt=Ye=De=null,dr=!1,oi=Sl=0,mr=null}function jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?De.memoizedState=dt=e:dt=dt.next=e,dt}function mt(){if(Ye===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=Ye.next;var t=dt===null?De.memoizedState:dt.next;if(t!==null)dt=t,Ye=e;else{if(e===null)throw De.alternate===null?Error(o(467)):Error(o(310));Ye=e,e={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},dt===null?De.memoizedState=dt=e:dt=dt.next=e}return dt}function Du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ui(e){var t=oi;return oi+=1,mr===null&&(mr=[]),e=Lf(mr,e,t),t=De,(dt===null?t.memoizedState:dt.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?Sd:Ad),e}function Al(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ui(e);if(e.$$typeof===te)return wt(e)}throw Error(o(438,String(e)))}function xu(e){var t=null,a=De.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=De.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Du(),De.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=Ae;return t.index++,a}function jn(e,t){return typeof t=="function"?t(e):t}function El(e){var t=mt();return wu(t,Ye,e)}function wu(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var u=e.baseQueue,s=i.pending;if(s!==null){if(u!==null){var d=u.next;u.next=s.next,s.next=d}t.baseQueue=u=s,i.pending=null}if(s=e.baseState,u===null)e.memoizedState=s;else{t=u.next;var h=d=null,A=null,L=t,Z=!1;do{var q=L.lane&-536870913;if(q!==L.lane?(Be&q)===q:(Jn&q)===q){var z=L.revertLane;if(z===0)A!==null&&(A=A.next={lane:0,revertLane:0,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),q===sr&&(Z=!0);else if((Jn&z)===z){L=L.next,z===sr&&(Z=!0);continue}else q={lane:0,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(h=A=q,d=s):A=A.next=q,De.lanes|=z,la|=z;q=L.action,za&&a(s,q),s=L.hasEagerState?L.eagerState:a(s,q)}else z={lane:q,revertLane:L.revertLane,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},A===null?(h=A=z,d=s):A=A.next=z,De.lanes|=q,la|=q;L=L.next}while(L!==null&&L!==t);if(A===null?d=s:A.next=h,!qt(s,e.memoizedState)&&(vt=!0,Z&&(a=cr,a!==null)))throw a;e.memoizedState=s,e.baseState=d,e.baseQueue=A,i.lastRenderedState=s}return u===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function Ru(e){var t=mt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,u=a.pending,s=t.memoizedState;if(u!==null){a.pending=null;var d=u=u.next;do s=e(s,d.action),d=d.next;while(d!==u);qt(s,t.memoizedState)||(vt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),a.lastRenderedState=s}return[s,i]}function $f(e,t,a){var i=De,u=mt(),s=Ie;if(s){if(a===void 0)throw Error(o(407));a=a()}else a=t();var d=!qt((Ye||u).memoizedState,a);d&&(u.memoizedState=a,vt=!0),u=u.queue;var h=Ff.bind(null,i,u,e);if(si(2048,8,h,[e]),u.getSnapshot!==t||d||dt!==null&&dt.memoizedState.tag&1){if(i.flags|=2048,_r(9,Tl(),Gf.bind(null,i,u,a,t),null),Xe===null)throw Error(o(349));s||(Jn&124)!==0||Zf(i,t,a)}return a}function Zf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=De.updateQueue,t===null?(t=Du(),De.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Gf(e,t,a,i){t.value=a,t.getSnapshot=i,Yf(t)&&qf(e)}function Ff(e,t,a){return a(function(){Yf(t)&&qf(e)})}function Yf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!qt(e,a)}catch{return!0}}function qf(e){var t=ir(e,2);t!==null&&Wt(t,e,2)}function Lu(e){var t=jt();if(typeof e=="function"){var a=e;if(e=a(),za){we(!0);try{a()}finally{we(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:e},t}function Vf(e,t,a,i){return e.baseState=a,wu(e,Ye,typeof i=="function"?i:jn)}function zp(e,t,a,i,u){if(Ol(e))throw Error(o(485));if(e=t.action,e!==null){var s={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){s.listeners.push(d)}};E.T!==null?a(!0):s.isTransition=!1,i(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,i=t.payload,u=e.state;if(t.isTransition){var s=E.T,d={};E.T=d;try{var h=a(u,i),A=E.S;A!==null&&A(d,h),Kf(e,t,h)}catch(L){zu(e,t,L)}finally{E.T=s}}else try{s=a(u,i),Kf(e,t,s)}catch(L){zu(e,t,L)}}function Kf(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Qf(e,t,i)},function(i){return zu(e,t,i)}):Qf(e,t,a)}function Qf(e,t,a){t.status="fulfilled",t.value=a,Xf(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 zu(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Xf(t),t=t.next;while(t!==i)}e.action=null}function Xf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wf(e,t){return t}function Jf(e,t){if(Ie){var a=Xe.formState;if(a!==null){e:{var i=De;if(Ie){if(rt){t:{for(var u=rt,s=Tn;u.nodeType!==8;){if(!s){u=null;break t}if(u=bn(u.nextSibling),u===null){u=null;break t}}s=u.data,u=s==="F!"||s==="F"?u:null}if(u){rt=bn(u.nextSibling),i=u.data==="F!";break e}}xa(i)}i=!1}i&&(t=a[0])}}return a=jt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wf,lastRenderedState:t},a.queue=i,a=gd.bind(null,De,i),i.dispatch=a,i=Lu(!1),s=Hu.bind(null,De,!1,i.queue),i=jt(),u={state:t,dispatch:null,action:e,pending:null},i.queue=u,a=zp.bind(null,De,u,s,a),u.dispatch=a,i.memoizedState=e,[t,a,!1]}function ed(e){var t=mt();return td(t,Ye,e)}function td(e,t,a){if(t=wu(e,t,Wf)[0],e=El(jn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=ui(t)}catch(d){throw d===ni?yl:d}else i=t;t=mt();var u=t.queue,s=u.dispatch;return a!==t.memoizedState&&(De.flags|=2048,_r(9,Tl(),Bp.bind(null,u,a),null)),[i,s,e]}function Bp(e,t){e.action=t}function nd(e){var t=mt(),a=Ye;if(a!==null)return td(t,a,e);mt(),t=t.memoizedState,a=mt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function _r(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=De.updateQueue,t===null&&(t=Du(),De.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function Tl(){return{destroy:void 0,resource:void 0}}function ad(){return mt().memoizedState}function Cl(e,t,a,i){var u=jt();i=i===void 0?null:i,De.flags|=e,u.memoizedState=_r(1|t,Tl(),a,i)}function si(e,t,a,i){var u=mt();i=i===void 0?null:i;var s=u.memoizedState.inst;Ye!==null&&i!==null&&Tu(i,Ye.memoizedState.deps)?u.memoizedState=_r(t,s,a,i):(De.flags|=e,u.memoizedState=_r(1|t,s,a,i))}function rd(e,t){Cl(8390656,8,e,t)}function id(e,t){si(2048,8,e,t)}function ld(e,t){return si(4,2,e,t)}function od(e,t){return si(4,4,e,t)}function ud(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 sd(e,t,a){a=a!=null?a.concat([e]):null,si(4,4,ud.bind(null,t,e),a)}function Bu(){}function cd(e,t){var a=mt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&Tu(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function fd(e,t){var a=mt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&Tu(t,i[1]))return i[0];if(i=e(),za){we(!0);try{e()}finally{we(!1)}}return a.memoizedState=[i,t],i}function ku(e,t,a){return a===void 0||(Jn&1073741824)!==0?e.memoizedState=t:(e.memoizedState=a,e=_m(),De.lanes|=e,la|=e,a)}function dd(e,t,a,i){return qt(a,t)?a:fr.current!==null?(e=ku(e,a,i),qt(e,t)||(vt=!0),e):(Jn&42)===0?(vt=!0,e.memoizedState=a):(e=_m(),De.lanes|=e,la|=e,t)}function md(e,t,a,i,u){var s=D.p;D.p=s!==0&&8>s?s:8;var d=E.T,h={};E.T=h,Hu(e,!1,t,a);try{var A=u(),L=E.S;if(L!==null&&L(h,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var Z=wp(A,i);ci(e,t,Z,Xt(e))}else ci(e,t,i,Xt(e))}catch(q){ci(e,t,{then:function(){},status:"rejected",reason:q},Xt())}finally{D.p=s,E.T=d}}function kp(){}function Uu(e,t,a,i){if(e.tag!==5)throw Error(o(476));var u=_d(e).queue;md(e,u,t,$,a===null?kp:function(){return hd(e),a(i)})}function _d(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:$},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function hd(e){var t=_d(e).next.queue;ci(e,t,{},Xt())}function ju(){return wt(Mi)}function pd(){return mt().memoizedState}function yd(){return mt().memoizedState}function Up(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Xt();e=Xn(a);var i=Wn(t,e,a);i!==null&&(Wt(i,t,a),ri(i,t,a)),t={cache:_u()},e.payload=t;return}t=t.return}}function jp(e,t,a){var i=Xt();a={lane:i,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},Ol(e)?vd(t,a):(a=ru(e,t,a,i),a!==null&&(Wt(a,e,i),bd(a,t,i)))}function gd(e,t,a){var i=Xt();ci(e,t,a,i)}function ci(e,t,a,i){var u={lane:i,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(Ol(e))vd(t,u);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var d=t.lastRenderedState,h=s(d,a);if(u.hasEagerState=!0,u.eagerState=h,qt(h,d))return sl(e,t,u,0),Xe===null&&ul(),!1}catch{}finally{}if(a=ru(e,t,u,i),a!==null)return Wt(a,e,i),bd(a,t,i),!0}return!1}function Hu(e,t,a,i){if(i={lane:2,revertLane:ys(),action:i,hasEagerState:!1,eagerState:null,next:null},Ol(e)){if(t)throw Error(o(479))}else t=ru(e,a,i,2),t!==null&&Wt(t,e,2)}function Ol(e){var t=e.alternate;return e===De||t!==null&&t===De}function vd(e,t){dr=bl=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function bd(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Ki(e,a)}}var Nl={readContext:wt,use:Al,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut},Sd={readContext:wt,use:Al,useCallback:function(e,t){return jt().memoizedState=[e,t===void 0?null:t],e},useContext:wt,useEffect:rd,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Cl(4194308,4,ud.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Cl(4194308,4,e,t)},useInsertionEffect:function(e,t){Cl(4,2,e,t)},useMemo:function(e,t){var a=jt();t=t===void 0?null:t;var i=e();if(za){we(!0);try{e()}finally{we(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=jt();if(a!==void 0){var u=a(t);if(za){we(!0);try{a(t)}finally{we(!1)}}}else u=t;return i.memoizedState=i.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},i.queue=e,e=e.dispatch=jp.bind(null,De,e),[i.memoizedState,e]},useRef:function(e){var t=jt();return e={current:e},t.memoizedState=e},useState:function(e){e=Lu(e);var t=e.queue,a=gd.bind(null,De,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Bu,useDeferredValue:function(e,t){var a=jt();return ku(a,e,t)},useTransition:function(){var e=Lu(!1);return e=md.bind(null,De,e.queue,!0,!1),jt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=De,u=jt();if(Ie){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Xe===null)throw Error(o(349));(Be&124)!==0||Zf(i,t,a)}u.memoizedState=a;var s={value:a,getSnapshot:t};return u.queue=s,rd(Ff.bind(null,i,s,e),[e]),i.flags|=2048,_r(9,Tl(),Gf.bind(null,i,s,a,t),null),a},useId:function(){var e=jt(),t=Xe.identifierPrefix;if(Ie){var a=Bn,i=zn;a=(i&~(1<<32-He(i)-1)).toString(32)+a,t="«"+t+"R"+a,a=Sl++,0<a&&(t+="H"+a.toString(32)),t+="»"}else a=Rp++,t="«"+t+"r"+a.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:ju,useFormState:Jf,useActionState:Jf,useOptimistic:function(e){var t=jt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=Hu.bind(null,De,!0,a),a.dispatch=t,[e,t]},useMemoCache:xu,useCacheRefresh:function(){return jt().memoizedState=Up.bind(null,De)}},Ad={readContext:wt,use:Al,useCallback:cd,useContext:wt,useEffect:id,useImperativeHandle:sd,useInsertionEffect:ld,useLayoutEffect:od,useMemo:fd,useReducer:El,useRef:ad,useState:function(){return El(jn)},useDebugValue:Bu,useDeferredValue:function(e,t){var a=mt();return dd(a,Ye.memoizedState,e,t)},useTransition:function(){var e=El(jn)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:ui(e),t]},useSyncExternalStore:$f,useId:pd,useHostTransitionStatus:ju,useFormState:ed,useActionState:ed,useOptimistic:function(e,t){var a=mt();return Vf(a,Ye,e,t)},useMemoCache:xu,useCacheRefresh:yd},Hp={readContext:wt,use:Al,useCallback:cd,useContext:wt,useEffect:id,useImperativeHandle:sd,useInsertionEffect:ld,useLayoutEffect:od,useMemo:fd,useReducer:Ru,useRef:ad,useState:function(){return Ru(jn)},useDebugValue:Bu,useDeferredValue:function(e,t){var a=mt();return Ye===null?ku(a,e,t):dd(a,Ye.memoizedState,e,t)},useTransition:function(){var e=Ru(jn)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:ui(e),t]},useSyncExternalStore:$f,useId:pd,useHostTransitionStatus:ju,useFormState:nd,useActionState:nd,useOptimistic:function(e,t){var a=mt();return Ye!==null?Vf(a,Ye,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:xu,useCacheRefresh:yd},hr=null,fi=0;function Ml(e){var t=fi;return fi+=1,hr===null&&(hr=[]),Lf(hr,e,t)}function di(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Dl(e,t){throw t.$$typeof===R?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ed(e){var t=e._init;return t(e._payload)}function Td(e){function t(N,C){if(e){var x=N.deletions;x===null?(N.deletions=[C],N.flags|=16):x.push(C)}}function a(N,C){if(!e)return null;for(;C!==null;)t(N,C),C=C.sibling;return null}function i(N){for(var C=new Map;N!==null;)N.key!==null?C.set(N.key,N):C.set(N.index,N),N=N.sibling;return C}function u(N,C){return N=Ln(N,C),N.index=0,N.sibling=null,N}function s(N,C,x){return N.index=x,e?(x=N.alternate,x!==null?(x=x.index,x<C?(N.flags|=67108866,C):x):(N.flags|=67108866,C)):(N.flags|=1048576,C)}function d(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function h(N,C,x,F){return C===null||C.tag!==6?(C=lu(x,N.mode,F),C.return=N,C):(C=u(C,x),C.return=N,C)}function A(N,C,x,F){var ae=x.type;return ae===G?Z(N,C,x.props.children,F,x.key):C!==null&&(C.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===ne&&Ed(ae)===C.type)?(C=u(C,x.props),di(C,x),C.return=N,C):(C=fl(x.type,x.key,x.props,null,N.mode,F),di(C,x),C.return=N,C)}function L(N,C,x,F){return C===null||C.tag!==4||C.stateNode.containerInfo!==x.containerInfo||C.stateNode.implementation!==x.implementation?(C=ou(x,N.mode,F),C.return=N,C):(C=u(C,x.children||[]),C.return=N,C)}function Z(N,C,x,F,ae){return C===null||C.tag!==7?(C=Oa(x,N.mode,F,ae),C.return=N,C):(C=u(C,x),C.return=N,C)}function q(N,C,x){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=lu(""+C,N.mode,x),C.return=N,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case j:return x=fl(C.type,C.key,C.props,null,N.mode,x),di(x,C),x.return=N,x;case B:return C=ou(C,N.mode,x),C.return=N,C;case ne:var F=C._init;return C=F(C._payload),q(N,C,x)}if(ce(C)||Ne(C))return C=Oa(C,N.mode,x,null),C.return=N,C;if(typeof C.then=="function")return q(N,Ml(C),x);if(C.$$typeof===te)return q(N,hl(N,C),x);Dl(N,C)}return null}function z(N,C,x,F){var ae=C!==null?C.key:null;if(typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint")return ae!==null?null:h(N,C,""+x,F);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case j:return x.key===ae?A(N,C,x,F):null;case B:return x.key===ae?L(N,C,x,F):null;case ne:return ae=x._init,x=ae(x._payload),z(N,C,x,F)}if(ce(x)||Ne(x))return ae!==null?null:Z(N,C,x,F,null);if(typeof x.then=="function")return z(N,C,Ml(x),F);if(x.$$typeof===te)return z(N,C,hl(N,x),F);Dl(N,x)}return null}function U(N,C,x,F,ae){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return N=N.get(x)||null,h(C,N,""+F,ae);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case j:return N=N.get(F.key===null?x:F.key)||null,A(C,N,F,ae);case B:return N=N.get(F.key===null?x:F.key)||null,L(C,N,F,ae);case ne:var xe=F._init;return F=xe(F._payload),U(N,C,x,F,ae)}if(ce(F)||Ne(F))return N=N.get(x)||null,Z(C,N,F,ae,null);if(typeof F.then=="function")return U(N,C,x,Ml(F),ae);if(F.$$typeof===te)return U(N,C,x,hl(C,F),ae);Dl(C,F)}return null}function Se(N,C,x,F){for(var ae=null,xe=null,se=C,ve=C=0,St=null;se!==null&&ve<x.length;ve++){se.index>ve?(St=se,se=null):St=se.sibling;var je=z(N,se,x[ve],F);if(je===null){se===null&&(se=St);break}e&&se&&je.alternate===null&&t(N,se),C=s(je,C,ve),xe===null?ae=je:xe.sibling=je,xe=je,se=St}if(ve===x.length)return a(N,se),Ie&&Ma(N,ve),ae;if(se===null){for(;ve<x.length;ve++)se=q(N,x[ve],F),se!==null&&(C=s(se,C,ve),xe===null?ae=se:xe.sibling=se,xe=se);return Ie&&Ma(N,ve),ae}for(se=i(se);ve<x.length;ve++)St=U(se,N,ve,x[ve],F),St!==null&&(e&&St.alternate!==null&&se.delete(St.key===null?ve:St.key),C=s(St,C,ve),xe===null?ae=St:xe.sibling=St,xe=St);return e&&se.forEach(function(ha){return t(N,ha)}),Ie&&Ma(N,ve),ae}function ge(N,C,x,F){if(x==null)throw Error(o(151));for(var ae=null,xe=null,se=C,ve=C=0,St=null,je=x.next();se!==null&&!je.done;ve++,je=x.next()){se.index>ve?(St=se,se=null):St=se.sibling;var ha=z(N,se,je.value,F);if(ha===null){se===null&&(se=St);break}e&&se&&ha.alternate===null&&t(N,se),C=s(ha,C,ve),xe===null?ae=ha:xe.sibling=ha,xe=ha,se=St}if(je.done)return a(N,se),Ie&&Ma(N,ve),ae;if(se===null){for(;!je.done;ve++,je=x.next())je=q(N,je.value,F),je!==null&&(C=s(je,C,ve),xe===null?ae=je:xe.sibling=je,xe=je);return Ie&&Ma(N,ve),ae}for(se=i(se);!je.done;ve++,je=x.next())je=U(se,N,ve,je.value,F),je!==null&&(e&&je.alternate!==null&&se.delete(je.key===null?ve:je.key),C=s(je,C,ve),xe===null?ae=je:xe.sibling=je,xe=je);return e&&se.forEach(function(Iy){return t(N,Iy)}),Ie&&Ma(N,ve),ae}function Ve(N,C,x,F){if(typeof x=="object"&&x!==null&&x.type===G&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case j:e:{for(var ae=x.key;C!==null;){if(C.key===ae){if(ae=x.type,ae===G){if(C.tag===7){a(N,C.sibling),F=u(C,x.props.children),F.return=N,N=F;break e}}else if(C.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===ne&&Ed(ae)===C.type){a(N,C.sibling),F=u(C,x.props),di(F,x),F.return=N,N=F;break e}a(N,C);break}else t(N,C);C=C.sibling}x.type===G?(F=Oa(x.props.children,N.mode,F,x.key),F.return=N,N=F):(F=fl(x.type,x.key,x.props,null,N.mode,F),di(F,x),F.return=N,N=F)}return d(N);case B:e:{for(ae=x.key;C!==null;){if(C.key===ae)if(C.tag===4&&C.stateNode.containerInfo===x.containerInfo&&C.stateNode.implementation===x.implementation){a(N,C.sibling),F=u(C,x.children||[]),F.return=N,N=F;break e}else{a(N,C);break}else t(N,C);C=C.sibling}F=ou(x,N.mode,F),F.return=N,N=F}return d(N);case ne:return ae=x._init,x=ae(x._payload),Ve(N,C,x,F)}if(ce(x))return Se(N,C,x,F);if(Ne(x)){if(ae=Ne(x),typeof ae!="function")throw Error(o(150));return x=ae.call(x),ge(N,C,x,F)}if(typeof x.then=="function")return Ve(N,C,Ml(x),F);if(x.$$typeof===te)return Ve(N,C,hl(N,x),F);Dl(N,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,C!==null&&C.tag===6?(a(N,C.sibling),F=u(C,x),F.return=N,N=F):(a(N,C),F=lu(x,N.mode,F),F.return=N,N=F),d(N)):a(N,C)}return function(N,C,x,F){try{fi=0;var ae=Ve(N,C,x,F);return hr=null,ae}catch(se){if(se===ni||se===yl)throw se;var xe=Vt(29,se,null,N.mode);return xe.lanes=F,xe.return=N,xe}finally{}}}var pr=Td(!0),Cd=Td(!1),cn=M(null),Cn=null;function ea(e){var t=e.alternate;T(ht,ht.current&1),T(cn,e),Cn===null&&(t===null||fr.current!==null||t.memoizedState!==null)&&(Cn=e)}function Od(e){if(e.tag===22){if(T(ht,ht.current),T(cn,e),Cn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Cn=e)}}else ta()}function ta(){T(ht,ht.current),T(cn,cn.current)}function Hn(e){O(cn),Cn===e&&(Cn=null),O(ht)}var ht=M(0);function xl(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==="$?"||Ds(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 Iu(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var $u={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=Xt(),u=Xn(i);u.payload=t,a!=null&&(u.callback=a),t=Wn(e,u,i),t!==null&&(Wt(t,e,i),ri(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=Xt(),u=Xn(i);u.tag=1,u.payload=t,a!=null&&(u.callback=a),t=Wn(e,u,i),t!==null&&(Wt(t,e,i),ri(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Xt(),i=Xn(a);i.tag=2,t!=null&&(i.callback=t),t=Wn(e,i,a),t!==null&&(Wt(t,e,a),ri(t,e,a))}};function Nd(e,t,a,i,u,s,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,s,d):t.prototype&&t.prototype.isPureReactComponent?!Pr(a,i)||!Pr(u,s):!0}function Md(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&$u.enqueueReplaceState(t,t.state,null)}function Ba(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}var wl=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 Dd(e){wl(e)}function xd(e){console.error(e)}function wd(e){wl(e)}function Rl(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Rd(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Zu(e,t,a){return a=Xn(a),a.tag=3,a.payload={element:null},a.callback=function(){Rl(e,t)},a}function Ld(e){return e=Xn(e),e.tag=3,e}function zd(e,t,a,i){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var s=i.value;e.payload=function(){return u(s)},e.callback=function(){Rd(t,a,i)}}var d=a.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Rd(t,a,i),typeof u!="function"&&(oa===null?oa=new Set([this]):oa.add(this));var h=i.stack;this.componentDidCatch(i.value,{componentStack:h!==null?h:""})})}function Ip(e,t,a,i,u){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Jr(t,a,u,!0),a=cn.current,a!==null){switch(a.tag){case 13:return Cn===null?ds():a.alternate===null&&it===0&&(it=3),a.flags&=-257,a.flags|=65536,a.lanes=u,i===yu?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),_s(e,i,u)),!1;case 22:return a.flags|=65536,i===yu?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),_s(e,i,u)),!1}throw Error(o(435,a.tag))}return _s(e,i,u),ds(),!1}if(Ie)return t=cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,i!==cu&&(e=Error(o(422),{cause:i}),Wr(ln(e,a)))):(i!==cu&&(t=Error(o(423),{cause:i}),Wr(ln(t,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,i=ln(i,a),u=Zu(e.stateNode,i,u),bu(e,u),it!==4&&(it=2)),!1;var s=Error(o(520),{cause:i});if(s=ln(s,a),vi===null?vi=[s]:vi.push(s),it!==4&&(it=2),t===null)return!0;i=ln(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=Zu(a.stateNode,i,e),bu(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"&&(oa===null||!oa.has(s))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Ld(u),zd(u,e,a,i),bu(a,u),!1}a=a.return}while(a!==null);return!1}var Bd=Error(o(461)),vt=!1;function Et(e,t,a,i){t.child=e===null?Cd(t,null,a,i):pr(t,e.child,a,i)}function kd(e,t,a,i,u){a=a.render;var s=t.ref;if("ref"in i){var d={};for(var h in i)h!=="ref"&&(d[h]=i[h])}else d=i;return Ra(t),i=Cu(e,t,a,d,s,u),h=Ou(),e!==null&&!vt?(Nu(e,t,u),In(e,t,u)):(Ie&&h&&uu(t),t.flags|=1,Et(e,t,i,u),t.child)}function Ud(e,t,a,i,u){if(e===null){var s=a.type;return typeof s=="function"&&!iu(s)&&s.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=s,jd(e,t,s,i,u)):(e=fl(a.type,null,i,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Qu(e,u)){var d=s.memoizedProps;if(a=a.compare,a=a!==null?a:Pr,a(d,i)&&e.ref===t.ref)return In(e,t,u)}return t.flags|=1,e=Ln(s,i),e.ref=t.ref,e.return=t,t.child=e}function jd(e,t,a,i,u){if(e!==null){var s=e.memoizedProps;if(Pr(s,i)&&e.ref===t.ref)if(vt=!1,t.pendingProps=i=s,Qu(e,u))(e.flags&131072)!==0&&(vt=!0);else return t.lanes=e.lanes,In(e,t,u)}return Gu(e,t,a,i,u)}function Hd(e,t,a){var i=t.pendingProps,u=i.children,s=e!==null?e.memoizedState:null;if(i.mode==="hidden"){if((t.flags&128)!==0){if(i=s!==null?s.baseLanes|a:a,e!==null){for(u=t.child=e.child,s=0;u!==null;)s=s|u.lanes|u.childLanes,u=u.sibling;t.childLanes=s&~i}else t.childLanes=0,t.child=null;return Id(e,t,i,a)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&pl(t,s!==null?s.cachePool:null),s!==null?jf(t,s):Au(),Od(t);else return t.lanes=t.childLanes=536870912,Id(e,t,s!==null?s.baseLanes|a:a,a)}else s!==null?(pl(t,s.cachePool),jf(t,s),ta(),t.memoizedState=null):(e!==null&&pl(t,null),Au(),ta());return Et(e,t,u,a),t.child}function Id(e,t,a,i){var u=pu();return u=u===null?null:{parent:_t._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&pl(t,null),Au(),Od(t),e!==null&&Jr(e,t,i,!0),null}function Ll(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(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Gu(e,t,a,i,u){return Ra(t),a=Cu(e,t,a,i,void 0,u),i=Ou(),e!==null&&!vt?(Nu(e,t,u),In(e,t,u)):(Ie&&i&&uu(t),t.flags|=1,Et(e,t,a,u),t.child)}function $d(e,t,a,i,u,s){return Ra(t),t.updateQueue=null,a=If(t,i,a,u),Hf(e),i=Ou(),e!==null&&!vt?(Nu(e,t,s),In(e,t,s)):(Ie&&i&&uu(t),t.flags|=1,Et(e,t,a,s),t.child)}function Zd(e,t,a,i,u){if(Ra(t),t.stateNode===null){var s=lr,d=a.contextType;typeof d=="object"&&d!==null&&(s=wt(d)),s=new a(i,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=$u,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=i,s.state=t.memoizedState,s.refs={},gu(t),d=a.contextType,s.context=typeof d=="object"&&d!==null?wt(d):lr,s.state=t.memoizedState,d=a.getDerivedStateFromProps,typeof d=="function"&&(Iu(t,a,d,i),s.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(d=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),d!==s.state&&$u.enqueueReplaceState(s,s.state,null),li(t,i,s,u),ii(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){s=t.stateNode;var h=t.memoizedProps,A=Ba(a,h);s.props=A;var L=s.context,Z=a.contextType;d=lr,typeof Z=="object"&&Z!==null&&(d=wt(Z));var q=a.getDerivedStateFromProps;Z=typeof q=="function"||typeof s.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,Z||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(h||L!==d)&&Md(t,s,i,d),Qn=!1;var z=t.memoizedState;s.state=z,li(t,i,s,u),ii(),L=t.memoizedState,h||z!==L||Qn?(typeof q=="function"&&(Iu(t,a,q,i),L=t.memoizedState),(A=Qn||Nd(t,a,A,i,z,L,d))?(Z||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=i,t.memoizedState=L),s.props=i,s.state=L,s.context=d,i=A):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{s=t.stateNode,vu(e,t),d=t.memoizedProps,Z=Ba(a,d),s.props=Z,q=t.pendingProps,z=s.context,L=a.contextType,A=lr,typeof L=="object"&&L!==null&&(A=wt(L)),h=a.getDerivedStateFromProps,(L=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d!==q||z!==A)&&Md(t,s,i,A),Qn=!1,z=t.memoizedState,s.state=z,li(t,i,s,u),ii();var U=t.memoizedState;d!==q||z!==U||Qn||e!==null&&e.dependencies!==null&&_l(e.dependencies)?(typeof h=="function"&&(Iu(t,a,h,i),U=t.memoizedState),(Z=Qn||Nd(t,a,Z,i,z,U,A)||e!==null&&e.dependencies!==null&&_l(e.dependencies))?(L||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(i,U,A),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(i,U,A)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=U),s.props=i,s.state=U,s.context=A,i=Z):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&z===e.memoizedState||(t.flags|=1024),i=!1)}return s=i,Ll(e,t),i=(t.flags&128)!==0,s||i?(s=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&i?(t.child=pr(t,e.child,null,u),t.child=pr(t,null,a,u)):Et(e,t,a,u),t.memoizedState=s.state,e=t.child):e=In(e,t,u),e}function Gd(e,t,a,i){return Xr(),t.flags|=256,Et(e,t,a,i),t.child}var Fu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yu(e){return{baseLanes:e,cachePool:xf()}}function qu(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=fn),e}function Fd(e,t,a){var i=t.pendingProps,u=!1,s=(t.flags&128)!==0,d;if((d=s)||(d=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),d&&(u=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ie){if(u?ea(t):ta(),Ie){var h=rt,A;if(A=h){e:{for(A=h,h=Tn;A.nodeType!==8;){if(!h){h=null;break e}if(A=bn(A.nextSibling),A===null){h=null;break e}}h=A}h!==null?(t.memoizedState={dehydrated:h,treeContext:Na!==null?{id:zn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},A=Vt(18,null,null,0),A.stateNode=h,A.return=t,t.child=A,zt=t,rt=null,A=!0):A=!1}A||xa(t)}if(h=t.memoizedState,h!==null&&(h=h.dehydrated,h!==null))return Ds(h)?t.lanes=32:t.lanes=536870912,null;Hn(t)}return h=i.children,i=i.fallback,u?(ta(),u=t.mode,h=zl({mode:"hidden",children:h},u),i=Oa(i,u,a,null),h.return=t,i.return=t,h.sibling=i,t.child=h,u=t.child,u.memoizedState=Yu(a),u.childLanes=qu(e,d,a),t.memoizedState=Fu,i):(ea(t),Vu(t,h))}if(A=e.memoizedState,A!==null&&(h=A.dehydrated,h!==null)){if(s)t.flags&256?(ea(t),t.flags&=-257,t=Pu(e,t,a)):t.memoizedState!==null?(ta(),t.child=e.child,t.flags|=128,t=null):(ta(),u=i.fallback,h=t.mode,i=zl({mode:"visible",children:i.children},h),u=Oa(u,h,a,null),u.flags|=2,i.return=t,u.return=t,i.sibling=u,t.child=i,pr(t,e.child,null,a),i=t.child,i.memoizedState=Yu(a),i.childLanes=qu(e,d,a),t.memoizedState=Fu,t=u);else if(ea(t),Ds(h)){if(d=h.nextSibling&&h.nextSibling.dataset,d)var L=d.dgst;d=L,i=Error(o(419)),i.stack="",i.digest=d,Wr({value:i,source:null,stack:null}),t=Pu(e,t,a)}else if(vt||Jr(e,t,a,!1),d=(a&e.childLanes)!==0,vt||d){if(d=Xe,d!==null&&(i=a&-a,i=(i&42)!==0?1:En(i),i=(i&(d.suspendedLanes|a))!==0?0:i,i!==0&&i!==A.retryLane))throw A.retryLane=i,ir(e,i),Wt(d,e,i),Bd;h.data==="$?"||ds(),t=Pu(e,t,a)}else h.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,rt=bn(h.nextSibling),zt=t,Ie=!0,Da=null,Tn=!1,e!==null&&(un[sn++]=zn,un[sn++]=Bn,un[sn++]=Na,zn=e.id,Bn=e.overflow,Na=t),t=Vu(t,i.children),t.flags|=4096);return t}return u?(ta(),u=i.fallback,h=t.mode,A=e.child,L=A.sibling,i=Ln(A,{mode:"hidden",children:i.children}),i.subtreeFlags=A.subtreeFlags&65011712,L!==null?u=Ln(L,u):(u=Oa(u,h,a,null),u.flags|=2),u.return=t,i.return=t,i.sibling=u,t.child=i,i=u,u=t.child,h=e.child.memoizedState,h===null?h=Yu(a):(A=h.cachePool,A!==null?(L=_t._currentValue,A=A.parent!==L?{parent:L,pool:L}:A):A=xf(),h={baseLanes:h.baseLanes|a,cachePool:A}),u.memoizedState=h,u.childLanes=qu(e,d,a),t.memoizedState=Fu,i):(ea(t),a=e.child,e=a.sibling,a=Ln(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=a,t.memoizedState=null,a)}function Vu(e,t){return t=zl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function zl(e,t){return e=Vt(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Pu(e,t,a){return pr(t,e.child,null,a),e=Vu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yd(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),du(e.return,t,a)}function Ku(e,t,a,i,u){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:u}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=a,s.tailMode=u)}function qd(e,t,a){var i=t.pendingProps,u=i.revealOrder,s=i.tail;if(Et(e,t,i.children,a),i=ht.current,(i&2)!==0)i=i&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&&Yd(e,a,t);else if(e.tag===19)Yd(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}i&=1}switch(T(ht,i),u){case"forwards":for(a=t.child,u=null;a!==null;)e=a.alternate,e!==null&&xl(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=t.child,t.child=null):(u=a.sibling,a.sibling=null),Ku(t,!1,u,a,s);break;case"backwards":for(a=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&xl(e)===null){t.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}Ku(t,!0,a,null,s);break;case"together":Ku(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function In(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),la|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Jr(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Ln(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Ln(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Qu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_l(e)))}function $p(e,t,a){switch(t.tag){case 3:X(t,t.stateNode.containerInfo),Kn(t,_t,e.memoizedState.cache),Xr();break;case 27:case 5:oe(t);break;case 4:X(t,t.stateNode.containerInfo);break;case 10:Kn(t,t.type,t.memoizedProps.value);break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(ea(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Fd(e,t,a):(ea(t),e=In(e,t,a),e!==null?e.sibling:null);ea(t);break;case 19:var u=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Jr(e,t,a,!1),i=(a&t.childLanes)!==0),u){if(i)return qd(e,t,a);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),T(ht,ht.current),i)break;return null;case 22:case 23:return t.lanes=0,Hd(e,t,a);case 24:Kn(t,_t,e.memoizedState.cache)}return In(e,t,a)}function Vd(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)vt=!0;else{if(!Qu(e,a)&&(t.flags&128)===0)return vt=!1,$p(e,t,a);vt=(e.flags&131072)!==0}else vt=!1,Ie&&(t.flags&1048576)!==0&&Ef(t,ml,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var i=t.elementType,u=i._init;if(i=u(i._payload),t.type=i,typeof i=="function")iu(i)?(e=Ba(i,e),t.tag=1,t=Zd(null,t,i,e,a)):(t.tag=0,t=Gu(null,t,i,e,a));else{if(i!=null){if(u=i.$$typeof,u===ie){t.tag=11,t=kd(null,t,i,e,a);break e}else if(u===me){t.tag=14,t=Ud(null,t,i,e,a);break e}}throw t=We(i)||i,Error(o(306,t,""))}}return t;case 0:return Gu(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,u=Ba(i,t.pendingProps),Zd(e,t,i,u,a);case 3:e:{if(X(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var s=t.memoizedState;u=s.element,vu(e,t),li(t,i,null,a);var d=t.memoizedState;if(i=d.cache,Kn(t,_t,i),i!==s.cache&&mu(t,[_t],a,!0),ii(),i=d.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Gd(e,t,i,a);break e}else if(i!==u){u=ln(Error(o(424)),t),Wr(u),t=Gd(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=bn(e.firstChild),zt=t,Ie=!0,Da=null,Tn=!0,a=Cd(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Xr(),i===u){t=In(e,t,a);break e}Et(e,t,i,a)}t=t.child}return t;case 26:return Ll(e,t),e===null?(a=Xm(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ie||(a=t.type,e=t.pendingProps,i=Pl(w.current).createElement(a),i[xt]=t,i[kt]=e,Ct(i,a,e),gt(i),t.stateNode=i):t.memoizedState=Xm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return oe(t),e===null&&Ie&&(i=t.stateNode=Pm(t.type,t.pendingProps,w.current),zt=t,Tn=!0,u=rt,ca(t.type)?(xs=u,rt=bn(i.firstChild)):rt=u),Et(e,t,t.pendingProps.children,a),Ll(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ie&&((u=i=rt)&&(i=hy(i,t.type,t.pendingProps,Tn),i!==null?(t.stateNode=i,zt=t,rt=bn(i.firstChild),Tn=!1,u=!0):u=!1),u||xa(t)),oe(t),u=t.type,s=t.pendingProps,d=e!==null?e.memoizedProps:null,i=s.children,Os(u,s)?i=null:d!==null&&Os(u,d)&&(t.flags|=32),t.memoizedState!==null&&(u=Cu(e,t,Lp,null,null,a),Mi._currentValue=u),Ll(e,t),Et(e,t,i,a),t.child;case 6:return e===null&&Ie&&((e=a=rt)&&(a=py(a,t.pendingProps,Tn),a!==null?(t.stateNode=a,zt=t,rt=null,e=!0):e=!1),e||xa(t)),null;case 13:return Fd(e,t,a);case 4:return X(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=pr(t,null,i,a):Et(e,t,i,a),t.child;case 11:return kd(e,t,t.type,t.pendingProps,a);case 7:return Et(e,t,t.pendingProps,a),t.child;case 8:return Et(e,t,t.pendingProps.children,a),t.child;case 12:return Et(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Kn(t,t.type,i.value),Et(e,t,i.children,a),t.child;case 9:return u=t.type._context,i=t.pendingProps.children,Ra(t),u=wt(u),i=i(u),t.flags|=1,Et(e,t,i,a),t.child;case 14:return Ud(e,t,t.type,t.pendingProps,a);case 15:return jd(e,t,t.type,t.pendingProps,a);case 19:return qd(e,t,a);case 31:return i=t.pendingProps,a=t.mode,i={mode:i.mode,children:i.children},e===null?(a=zl(i,a),a.ref=t.ref,t.child=a,a.return=t,t=a):(a=Ln(e.child,i),a.ref=t.ref,t.child=a,a.return=t,t=a),t;case 22:return Hd(e,t,a);case 24:return Ra(t),i=wt(_t),e===null?(u=pu(),u===null&&(u=Xe,s=_u(),u.pooledCache=s,s.refCount++,s!==null&&(u.pooledCacheLanes|=a),u=s),t.memoizedState={parent:i,cache:u},gu(t),Kn(t,_t,u)):((e.lanes&a)!==0&&(vu(e,t),li(t,null,null,a),ii()),u=e.memoizedState,s=t.memoizedState,u.parent!==i?(u={parent:i,cache:i},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Kn(t,_t,i)):(i=s.cache,Kn(t,_t,i),i!==u.cache&&mu(t,[_t],a,!0))),Et(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function $n(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,!n_(t)){if(t=cn.current,t!==null&&((Be&4194048)===Be?Cn!==null:(Be&62914560)!==Be&&(Be&536870912)===0||t!==Cn))throw ai=yu,wf;e.flags|=8192}}function Bl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Fa():536870912,e.lanes|=t,br|=t)}function mi(e,t){if(!Ie)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 i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function nt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags&65011712,i|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,i|=u.subtreeFlags,i|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function Zp(e,t,a){var i=t.pendingProps;switch(su(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(t),null;case 1:return nt(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Un(_t),ee(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Qr(t)?$n(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Of())),nt(t),null;case 26:return a=t.memoizedState,e===null?($n(t),a!==null?(nt(t),Pd(t,a)):(nt(t),t.flags&=-16777217)):a?a!==e.memoizedState?($n(t),nt(t),Pd(t,a)):(nt(t),t.flags&=-16777217):(e.memoizedProps!==i&&$n(t),nt(t),t.flags&=-16777217),null;case 27:K(t),a=w.current;var u=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==i&&$n(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return nt(t),null}e=S.current,Qr(t)?Tf(t):(e=Pm(u,i,a),t.stateNode=e,$n(t))}return nt(t),null;case 5:if(K(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&$n(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return nt(t),null}if(e=S.current,Qr(t))Tf(t);else{switch(u=Pl(w.current),e){case 1:e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":e=u.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":e=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":e=u.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof i.is=="string"?u.createElement("select",{is:i.is}):u.createElement("select"),i.multiple?e.multiple=!0:i.size&&(e.size=i.size);break;default:e=typeof i.is=="string"?u.createElement(a,{is:i.is}):u.createElement(a)}}e[xt]=t,e[kt]=i;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)e.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=e;e:switch(Ct(e,a,i),a){case"button":case"input":case"select":case"textarea":e=!!i.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&$n(t)}}return nt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&$n(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=w.current,Qr(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,u=zt,u!==null)switch(u.tag){case 27:case 5:i=u.memoizedProps}e[xt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||$m(e.nodeValue,a)),e||xa(t)}else e=Pl(e).createTextNode(i),e[xt]=t,t.stateNode=e}return nt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Qr(t),i!==null&&i.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[xt]=t}else Xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;nt(t),u=!1}else u=Of(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Hn(t),t):(Hn(t),null)}if(Hn(t),(t.flags&128)!==0)return t.lanes=a,t;if(a=i!==null,e=e!==null&&e.memoizedState!==null,a){i=t.child,u=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(u=i.alternate.memoizedState.cachePool.pool);var s=null;i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==u&&(i.flags|=2048)}return a!==e&&a&&(t.child.flags|=8192),Bl(t,t.updateQueue),nt(t),null;case 4:return ee(),e===null&&Ss(t.stateNode.containerInfo),nt(t),null;case 10:return Un(t.type),nt(t),null;case 19:if(O(ht),u=t.memoizedState,u===null)return nt(t),null;if(i=(t.flags&128)!==0,s=u.rendering,s===null)if(i)mi(u,!1);else{if(it!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=xl(e),s!==null){for(t.flags|=128,mi(u,!1),e=s.updateQueue,t.updateQueue=e,Bl(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Af(a,e),a=a.sibling;return T(ht,ht.current&1|2),t.child}e=e.sibling}u.tail!==null&&ye()>jl&&(t.flags|=128,i=!0,mi(u,!1),t.lanes=4194304)}else{if(!i)if(e=xl(s),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bl(t,e),mi(u,!0),u.tail===null&&u.tailMode==="hidden"&&!s.alternate&&!Ie)return nt(t),null}else 2*ye()-u.renderingStartTime>jl&&a!==536870912&&(t.flags|=128,i=!0,mi(u,!1),t.lanes=4194304);u.isBackwards?(s.sibling=t.child,t.child=s):(e=u.last,e!==null?e.sibling=s:t.child=s,u.last=s)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=ye(),t.sibling=null,e=ht.current,T(ht,i?e&1|2:e&1),t):(nt(t),null);case 22:case 23:return Hn(t),Eu(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(nt(t),t.subtreeFlags&6&&(t.flags|=8192)):nt(t),a=t.updateQueue,a!==null&&Bl(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&O(La),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Un(_t),nt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Gp(e,t){switch(su(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Un(_t),ee(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return K(t),null;case 13:if(Hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(ht),null;case 4:return ee(),null;case 10:return Un(t.type),null;case 22:case 23:return Hn(t),Eu(),e!==null&&O(La),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Un(_t),null;case 25:return null;default:return null}}function Kd(e,t){switch(su(t),t.tag){case 3:Un(_t),ee();break;case 26:case 27:case 5:K(t);break;case 4:ee();break;case 13:Hn(t);break;case 19:O(ht);break;case 10:Un(t.type);break;case 22:case 23:Hn(t),Eu(),e!==null&&O(La);break;case 24:Un(_t)}}function _i(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var u=i.next;a=u;do{if((a.tag&e)===e){i=void 0;var s=a.create,d=a.inst;i=s(),d.destroy=i}a=a.next}while(a!==u)}}catch(h){Pe(t,t.return,h)}}function na(e,t,a){try{var i=t.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var s=u.next;i=s;do{if((i.tag&e)===e){var d=i.inst,h=d.destroy;if(h!==void 0){d.destroy=void 0,u=t;var A=a,L=h;try{L()}catch(Z){Pe(u,A,Z)}}}i=i.next}while(i!==s)}}catch(Z){Pe(t,t.return,Z)}}function Qd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Uf(t,a)}catch(i){Pe(e,e.return,i)}}}function Xd(e,t,a){a.props=Ba(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Pe(e,t,i)}}function hi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(u){Pe(e,t,u)}}function On(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(u){Pe(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Pe(e,t,u)}else a.current=null}function Wd(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(u){Pe(e,e.return,u)}}function Xu(e,t,a){try{var i=e.stateNode;cy(i,e.type,a,t),i[kt]=t}catch(u){Pe(e,e.return,u)}}function Jd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ca(e.type)||e.tag===4}function Wu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jd(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&&ca(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 Ju(e,t,a){var i=e.tag;if(i===5||i===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=Vl));else if(i!==4&&(i===27&&ca(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Ju(e,t,a),e=e.sibling;e!==null;)Ju(e,t,a),e=e.sibling}function kl(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&ca(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(kl(e,t,a),e=e.sibling;e!==null;)kl(e,t,a),e=e.sibling}function em(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);Ct(t,i,a),t[xt]=e,t[kt]=a}catch(s){Pe(e,e.return,s)}}var Zn=!1,st=!1,es=!1,tm=typeof WeakSet=="function"?WeakSet:Set,bt=null;function Fp(e,t){if(e=e.containerInfo,Ts=eo,e=df(e),Wo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var u=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{a.nodeType,s.nodeType}catch{a=null;break e}var d=0,h=-1,A=-1,L=0,Z=0,q=e,z=null;t:for(;;){for(var U;q!==a||u!==0&&q.nodeType!==3||(h=d+u),q!==s||i!==0&&q.nodeType!==3||(A=d+i),q.nodeType===3&&(d+=q.nodeValue.length),(U=q.firstChild)!==null;)z=q,q=U;for(;;){if(q===e)break t;if(z===a&&++L===u&&(h=d),z===s&&++Z===i&&(A=d),(U=q.nextSibling)!==null)break;q=z,z=q.parentNode}q=U}a=h===-1||A===-1?null:{start:h,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(Cs={focusedElem:e,selectionRange:a},eo=!1,bt=t;bt!==null;)if(t=bt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,bt=e;else for(;bt!==null;){switch(t=bt,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,u=s.memoizedProps,s=s.memoizedState,i=a.stateNode;try{var Se=Ba(a.type,u,a.elementType===a.type);e=i.getSnapshotBeforeUpdate(Se,s),i.__reactInternalSnapshotBeforeUpdate=e}catch(ge){Pe(a,a.return,ge)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Ms(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ms(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,bt=e;break}bt=t.return}}function nm(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:aa(e,a),i&4&&_i(5,a);break;case 1:if(aa(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(d){Pe(a,a.return,d)}else{var u=Ba(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Pe(a,a.return,d)}}i&64&&Qd(a),i&512&&hi(a,a.return);break;case 3:if(aa(e,a),i&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{Uf(e,t)}catch(d){Pe(a,a.return,d)}}break;case 27:t===null&&i&4&&em(a);case 26:case 5:aa(e,a),t===null&&i&4&&Wd(a),i&512&&hi(a,a.return);break;case 12:aa(e,a);break;case 13:aa(e,a),i&4&&im(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Jp.bind(null,a),yy(e,a))));break;case 22:if(i=a.memoizedState!==null||Zn,!i){t=t!==null&&t.memoizedState!==null||st,u=Zn;var s=st;Zn=i,(st=t)&&!s?ra(e,a,(a.subtreeFlags&8772)!==0):aa(e,a),Zn=u,st=s}break;case 30:break;default:aa(e,a)}}function am(e){var t=e.alternate;t!==null&&(e.alternate=null,am(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Lo(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 et=null,Ht=!1;function Gn(e,t,a){for(a=a.child;a!==null;)rm(e,t,a),a=a.sibling}function rm(e,t,a){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(Yt,a)}catch{}switch(a.tag){case 26:st||On(a,t),Gn(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:st||On(a,t);var i=et,u=Ht;ca(a.type)&&(et=a.stateNode,Ht=!1),Gn(e,t,a),Ti(a.stateNode),et=i,Ht=u;break;case 5:st||On(a,t);case 6:if(i=et,u=Ht,et=null,Gn(e,t,a),et=i,Ht=u,et!==null)if(Ht)try{(et.nodeType===9?et.body:et.nodeName==="HTML"?et.ownerDocument.body:et).removeChild(a.stateNode)}catch(s){Pe(a,t,s)}else try{et.removeChild(a.stateNode)}catch(s){Pe(a,t,s)}break;case 18:et!==null&&(Ht?(e=et,qm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ri(e)):qm(et,a.stateNode));break;case 4:i=et,u=Ht,et=a.stateNode.containerInfo,Ht=!0,Gn(e,t,a),et=i,Ht=u;break;case 0:case 11:case 14:case 15:st||na(2,a,t),st||na(4,a,t),Gn(e,t,a);break;case 1:st||(On(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Xd(a,t,i)),Gn(e,t,a);break;case 21:Gn(e,t,a);break;case 22:st=(i=st)||a.memoizedState!==null,Gn(e,t,a),st=i;break;default:Gn(e,t,a)}}function im(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ri(e)}catch(a){Pe(t,t.return,a)}}function Yp(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new tm),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new tm),t;default:throw Error(o(435,e.tag))}}function ts(e,t){var a=Yp(e);t.forEach(function(i){var u=ey.bind(null,e,i);a.has(i)||(a.add(i),i.then(u,u))})}function Pt(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var u=a[i],s=e,d=t,h=d;e:for(;h!==null;){switch(h.tag){case 27:if(ca(h.type)){et=h.stateNode,Ht=!1;break e}break;case 5:et=h.stateNode,Ht=!1;break e;case 3:case 4:et=h.stateNode.containerInfo,Ht=!0;break e}h=h.return}if(et===null)throw Error(o(160));rm(s,d,u),et=null,Ht=!1,s=u.alternate,s!==null&&(s.return=null),u.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)lm(t,e),t=t.sibling}var vn=null;function lm(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Pt(t,e),Kt(e),i&4&&(na(3,e,e.return),_i(3,e),na(5,e,e.return));break;case 1:Pt(t,e),Kt(e),i&512&&(st||a===null||On(a,a.return)),i&64&&Zn&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var u=vn;if(Pt(t,e),Kt(e),i&512&&(st||a===null||On(a,a.return)),i&4){var s=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(i){case"title":s=u.getElementsByTagName("title")[0],(!s||s[Hr]||s[xt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=u.createElement(i),u.head.insertBefore(s,u.querySelector("head > title"))),Ct(s,i,a),s[xt]=e,gt(s),i=s;break e;case"link":var d=e_("link","href",u).get(i+(a.href||""));if(d){for(var h=0;h<d.length;h++)if(s=d[h],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)){d.splice(h,1);break t}}s=u.createElement(i),Ct(s,i,a),u.head.appendChild(s);break;case"meta":if(d=e_("meta","content",u).get(i+(a.content||""))){for(h=0;h<d.length;h++)if(s=d[h],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)){d.splice(h,1);break t}}s=u.createElement(i),Ct(s,i,a),u.head.appendChild(s);break;default:throw Error(o(468,i))}s[xt]=e,gt(s),i=s}e.stateNode=i}else t_(u,e.type,e.stateNode);else e.stateNode=Jm(u,i,e.memoizedProps);else s!==i?(s===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):s.count--,i===null?t_(u,e.type,e.stateNode):Jm(u,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Xu(e,e.memoizedProps,a.memoizedProps)}break;case 27:Pt(t,e),Kt(e),i&512&&(st||a===null||On(a,a.return)),a!==null&&i&4&&Xu(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Pt(t,e),Kt(e),i&512&&(st||a===null||On(a,a.return)),e.flags&32){u=e.stateNode;try{Wa(u,"")}catch(U){Pe(e,e.return,U)}}i&4&&e.stateNode!=null&&(u=e.memoizedProps,Xu(e,u,a!==null?a.memoizedProps:u)),i&1024&&(es=!0);break;case 6:if(Pt(t,e),Kt(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(U){Pe(e,e.return,U)}}break;case 3:if(Xl=null,u=vn,vn=Kl(t.containerInfo),Pt(t,e),vn=u,Kt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Ri(t.containerInfo)}catch(U){Pe(e,e.return,U)}es&&(es=!1,om(e));break;case 4:i=vn,vn=Kl(e.stateNode.containerInfo),Pt(t,e),Kt(e),vn=i;break;case 12:Pt(t,e),Kt(e);break;case 13:Pt(t,e),Kt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(os=ye()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ts(e,i)));break;case 22:u=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,L=Zn,Z=st;if(Zn=L||u,st=Z||A,Pt(t,e),st=Z,Zn=L,Kt(e),i&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(a===null||A||Zn||st||ka(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(s=A.stateNode,u)d=s.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{h=A.stateNode;var q=A.memoizedProps.style,z=q!=null&&q.hasOwnProperty("display")?q.display:null;h.style.display=z==null||typeof z=="boolean"?"":(""+z).trim()}}catch(U){Pe(A,A.return,U)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=u?"":A.memoizedProps}catch(U){Pe(A,A.return,U)}}}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}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,ts(e,a))));break;case 19:Pt(t,e),Kt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,ts(e,i)));break;case 30:break;case 21:break;default:Pt(t,e),Kt(e)}}function Kt(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Jd(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var u=a.stateNode,s=Wu(e);kl(e,s,u);break;case 5:var d=a.stateNode;a.flags&32&&(Wa(d,""),a.flags&=-33);var h=Wu(e);kl(e,h,d);break;case 3:case 4:var A=a.stateNode.containerInfo,L=Wu(e);Ju(e,L,A);break;default:throw Error(o(161))}}catch(Z){Pe(e,e.return,Z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function om(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;om(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function aa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nm(e,t.alternate,t),t=t.sibling}function ka(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:na(4,t,t.return),ka(t);break;case 1:On(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Xd(t,t.return,a),ka(t);break;case 27:Ti(t.stateNode);case 26:case 5:On(t,t.return),ka(t);break;case 22:t.memoizedState===null&&ka(t);break;case 30:ka(t);break;default:ka(t)}e=e.sibling}}function ra(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,u=e,s=t,d=s.flags;switch(s.tag){case 0:case 11:case 15:ra(u,s,a),_i(4,s);break;case 1:if(ra(u,s,a),i=s,u=i.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(L){Pe(i,i.return,L)}if(i=s,u=i.updateQueue,u!==null){var h=i.stateNode;try{var A=u.shared.hiddenCallbacks;if(A!==null)for(u.shared.hiddenCallbacks=null,u=0;u<A.length;u++)kf(A[u],h)}catch(L){Pe(i,i.return,L)}}a&&d&64&&Qd(s),hi(s,s.return);break;case 27:em(s);case 26:case 5:ra(u,s,a),a&&i===null&&d&4&&Wd(s),hi(s,s.return);break;case 12:ra(u,s,a);break;case 13:ra(u,s,a),a&&d&4&&im(u,s);break;case 22:s.memoizedState===null&&ra(u,s,a),hi(s,s.return);break;case 30:break;default:ra(u,s,a)}t=t.sibling}}function ns(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&&ei(a))}function as(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ei(e))}function Nn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)um(e,t,a,i),t=t.sibling}function um(e,t,a,i){var u=t.flags;switch(t.tag){case 0:case 11:case 15:Nn(e,t,a,i),u&2048&&_i(9,t);break;case 1:Nn(e,t,a,i);break;case 3:Nn(e,t,a,i),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ei(e)));break;case 12:if(u&2048){Nn(e,t,a,i),e=t.stateNode;try{var s=t.memoizedProps,d=s.id,h=s.onPostCommit;typeof h=="function"&&h(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Pe(t,t.return,A)}}else Nn(e,t,a,i);break;case 13:Nn(e,t,a,i);break;case 23:break;case 22:s=t.stateNode,d=t.alternate,t.memoizedState!==null?s._visibility&2?Nn(e,t,a,i):pi(e,t):s._visibility&2?Nn(e,t,a,i):(s._visibility|=2,yr(e,t,a,i,(t.subtreeFlags&10256)!==0)),u&2048&&ns(d,t);break;case 24:Nn(e,t,a,i),u&2048&&as(t.alternate,t);break;default:Nn(e,t,a,i)}}function yr(e,t,a,i,u){for(u=u&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var s=e,d=t,h=a,A=i,L=d.flags;switch(d.tag){case 0:case 11:case 15:yr(s,d,h,A,u),_i(8,d);break;case 23:break;case 22:var Z=d.stateNode;d.memoizedState!==null?Z._visibility&2?yr(s,d,h,A,u):pi(s,d):(Z._visibility|=2,yr(s,d,h,A,u)),u&&L&2048&&ns(d.alternate,d);break;case 24:yr(s,d,h,A,u),u&&L&2048&&as(d.alternate,d);break;default:yr(s,d,h,A,u)}t=t.sibling}}function pi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,u=i.flags;switch(i.tag){case 22:pi(a,i),u&2048&&ns(i.alternate,i);break;case 24:pi(a,i),u&2048&&as(i.alternate,i);break;default:pi(a,i)}t=t.sibling}}var yi=8192;function gr(e){if(e.subtreeFlags&yi)for(e=e.child;e!==null;)sm(e),e=e.sibling}function sm(e){switch(e.tag){case 26:gr(e),e.flags&yi&&e.memoizedState!==null&&xy(vn,e.memoizedState,e.memoizedProps);break;case 5:gr(e);break;case 3:case 4:var t=vn;vn=Kl(e.stateNode.containerInfo),gr(e),vn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=yi,yi=16777216,gr(e),yi=t):gr(e));break;default:gr(e)}}function cm(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 gi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];bt=i,dm(i,e)}cm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fm(e),e=e.sibling}function fm(e){switch(e.tag){case 0:case 11:case 15:gi(e),e.flags&2048&&na(9,e,e.return);break;case 3:gi(e);break;case 12:gi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ul(e)):gi(e);break;default:gi(e)}}function Ul(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];bt=i,dm(i,e)}cm(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:na(8,t,t.return),Ul(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Ul(t));break;default:Ul(t)}e=e.sibling}}function dm(e,t){for(;bt!==null;){var a=bt;switch(a.tag){case 0:case 11:case 15:na(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:ei(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,bt=i;else e:for(a=e;bt!==null;){i=bt;var u=i.sibling,s=i.return;if(am(i),i===a){bt=null;break e}if(u!==null){u.return=s,bt=u;break e}bt=s}}}var qp={getCacheForType:function(e){var t=wt(_t),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a}},Vp=typeof WeakMap=="function"?WeakMap:Map,Ze=0,Xe=null,Re=null,Be=0,Ge=0,Qt=null,ia=!1,vr=!1,rs=!1,Fn=0,it=0,la=0,Ua=0,is=0,fn=0,br=0,vi=null,It=null,ls=!1,os=0,jl=1/0,Hl=null,oa=null,Tt=0,ua=null,Sr=null,Ar=0,us=0,ss=null,mm=null,bi=0,cs=null;function Xt(){if((Ze&2)!==0&&Be!==0)return Be&-Be;if(E.T!==null){var e=sr;return e!==0?e:ys()}return Qi()}function _m(){fn===0&&(fn=(Be&536870912)===0||Ie?Ga():536870912);var e=cn.current;return e!==null&&(e.flags|=32),fn}function Wt(e,t,a){(e===Xe&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(Er(e,0),sa(e,Be,fn,!1)),An(e,a),((Ze&2)===0||e!==Xe)&&(e===Xe&&((Ze&2)===0&&(Ua|=a),it===4&&sa(e,Be,fn,!1)),Mn(e))}function hm(e,t,a){if((Ze&6)!==0)throw Error(o(327));var i=!a&&(t&124)===0&&(t&e.expiredLanes)===0||Dn(e,t),u=i?Qp(e,t):ms(e,t,!0),s=i;do{if(u===0){vr&&!i&&sa(e,t,0,!1);break}else{if(a=e.current.alternate,s&&!Pp(a)){u=ms(e,t,!1),s=!1;continue}if(u===2){if(s=t,e.errorRecoveryDisabledLanes&s)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var h=e;u=vi;var A=h.current.memoizedState.isDehydrated;if(A&&(Er(h,d).flags|=256),d=ms(h,d,!1),d!==2){if(rs&&!A){h.errorRecoveryDisabledLanes|=s,Ua|=s,u=4;break e}s=It,It=u,s!==null&&(It===null?It=s:It.push.apply(It,s))}u=d}if(s=!1,u!==2)continue}}if(u===1){Er(e,0),sa(e,t,0,!0);break}e:{switch(i=e,s=u,s){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:sa(i,t,fn,!ia);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=os+300-ye(),10<u)){if(sa(i,t,fn,!ia),pn(i,0,!0)!==0)break e;i.timeoutHandle=Fm(pm.bind(null,i,a,It,Hl,ls,t,fn,Ua,br,ia,s,2,-0,0),u);break e}pm(i,a,It,Hl,ls,t,fn,Ua,br,ia,s,0,-0,0)}}break}while(!0);Mn(e)}function pm(e,t,a,i,u,s,d,h,A,L,Z,q,z,U){if(e.timeoutHandle=-1,q=t.subtreeFlags,(q&8192||(q&16785408)===16785408)&&(Ni={stylesheets:null,count:0,unsuspend:Dy},sm(t),q=wy(),q!==null)){e.cancelPendingCommit=q(Em.bind(null,e,t,s,a,i,u,d,h,A,Z,1,z,U)),sa(e,s,d,!L);return}Em(e,t,s,a,i,u,d,h,A)}function Pp(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 i=0;i<a.length;i++){var u=a[i],s=u.getSnapshot;u=u.value;try{if(!qt(s(),u))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 sa(e,t,a,i){t&=~is,t&=~Ua,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var u=t;0<u;){var s=31-He(u),d=1<<s;i[s]=-1,u&=~d}a!==0&&Pi(e,a,t)}function Il(){return(Ze&6)===0?(Si(0),!1):!0}function fs(){if(Re!==null){if(Ge===0)var e=Re.return;else e=Re,kn=wa=null,Mu(e),hr=null,fi=0,e=Re;for(;e!==null;)Kd(e.alternate,e),e=e.return;Re=null}}function Er(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,dy(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),fs(),Xe=e,Re=a=Ln(e.current,null),Be=t,Ge=0,Qt=null,ia=!1,vr=Dn(e,t),rs=!1,br=fn=is=Ua=la=it=0,It=vi=null,ls=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var u=31-He(i),s=1<<u;t|=e[u],i&=~s}return Fn=t,ul(),a}function ym(e,t){De=null,E.H=Nl,t===ni||t===yl?(t=zf(),Ge=3):t===wf?(t=zf(),Ge=4):Ge=t===Bd?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Qt=t,Re===null&&(it=1,Rl(e,ln(t,e.current)))}function gm(){var e=E.H;return E.H=Nl,e===null?Nl:e}function vm(){var e=E.A;return E.A=qp,e}function ds(){it=4,ia||(Be&4194048)!==Be&&cn.current!==null||(vr=!0),(la&134217727)===0&&(Ua&134217727)===0||Xe===null||sa(Xe,Be,fn,!1)}function ms(e,t,a){var i=Ze;Ze|=2;var u=gm(),s=vm();(Xe!==e||Be!==t)&&(Hl=null,Er(e,t)),t=!1;var d=it;e:do try{if(Ge!==0&&Re!==null){var h=Re,A=Qt;switch(Ge){case 8:fs(),d=6;break e;case 3:case 2:case 9:case 6:cn.current===null&&(t=!0);var L=Ge;if(Ge=0,Qt=null,Tr(e,h,A,L),a&&vr){d=0;break e}break;default:L=Ge,Ge=0,Qt=null,Tr(e,h,A,L)}}Kp(),d=it;break}catch(Z){ym(e,Z)}while(!0);return t&&e.shellSuspendCounter++,kn=wa=null,Ze=i,E.H=u,E.A=s,Re===null&&(Xe=null,Be=0,ul()),d}function Kp(){for(;Re!==null;)bm(Re)}function Qp(e,t){var a=Ze;Ze|=2;var i=gm(),u=vm();Xe!==e||Be!==t?(Hl=null,jl=ye()+500,Er(e,t)):vr=Dn(e,t);e:do try{if(Ge!==0&&Re!==null){t=Re;var s=Qt;t:switch(Ge){case 1:Ge=0,Qt=null,Tr(e,t,s,1);break;case 2:case 9:if(Rf(s)){Ge=0,Qt=null,Sm(t);break}t=function(){Ge!==2&&Ge!==9||Xe!==e||(Ge=7),Mn(e)},s.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:Rf(s)?(Ge=0,Qt=null,Sm(t)):(Ge=0,Qt=null,Tr(e,t,s,7));break;case 5:var d=null;switch(Re.tag){case 26:d=Re.memoizedState;case 5:case 27:var h=Re;if(!d||n_(d)){Ge=0,Qt=null;var A=h.sibling;if(A!==null)Re=A;else{var L=h.return;L!==null?(Re=L,$l(L)):Re=null}break t}}Ge=0,Qt=null,Tr(e,t,s,5);break;case 6:Ge=0,Qt=null,Tr(e,t,s,6);break;case 8:fs(),it=6;break e;default:throw Error(o(462))}}Xp();break}catch(Z){ym(e,Z)}while(!0);return kn=wa=null,E.H=i,E.A=u,Ze=a,Re!==null?0:(Xe=null,Be=0,ul(),it)}function Xp(){for(;Re!==null&&!Oe();)bm(Re)}function bm(e){var t=Vd(e.alternate,e,Fn);e.memoizedProps=e.pendingProps,t===null?$l(e):Re=t}function Sm(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=$d(a,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=$d(a,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:Mu(t);default:Kd(a,t),t=Re=Af(t,Fn),t=Vd(a,t,Fn)}e.memoizedProps=e.pendingProps,t===null?$l(e):Re=t}function Tr(e,t,a,i){kn=wa=null,Mu(t),hr=null,fi=0;var u=t.return;try{if(Ip(e,u,t,a,Be)){it=1,Rl(e,ln(a,e.current)),Re=null;return}}catch(s){if(u!==null)throw Re=u,s;it=1,Rl(e,ln(a,e.current)),Re=null;return}t.flags&32768?(Ie||i===1?e=!0:vr||(Be&536870912)!==0?e=!1:(ia=e=!0,(i===2||i===9||i===3||i===6)&&(i=cn.current,i!==null&&i.tag===13&&(i.flags|=16384))),Am(t,e)):$l(t)}function $l(e){var t=e;do{if((t.flags&32768)!==0){Am(t,ia);return}e=t.return;var a=Zp(t.alternate,t,Fn);if(a!==null){Re=a;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);it===0&&(it=5)}function Am(e,t){do{var a=Gp(e.alternate,e);if(a!==null){a.flags&=32767,Re=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=a}while(e!==null);it=6,Re=null}function Em(e,t,a,i,u,s,d,h,A){e.cancelPendingCommit=null;do Zl();while(Tt!==0);if((Ze&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(s=t.lanes|t.childLanes,s|=au,Vi(e,a,s,d,h,A),e===Xe&&(Re=Xe=null,Be=0),Sr=t,ua=e,Ar=a,us=s,ss=u,mm=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ty(Te,function(){return Mm(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=E.T,E.T=null,u=D.p,D.p=2,d=Ze,Ze|=4;try{Fp(e,t,a)}finally{Ze=d,D.p=u,E.T=i}}Tt=1,Tm(),Cm(),Om()}}function Tm(){if(Tt===1){Tt=0;var e=ua,t=Sr,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=E.T,E.T=null;var i=D.p;D.p=2;var u=Ze;Ze|=4;try{lm(t,e);var s=Cs,d=df(e.containerInfo),h=s.focusedElem,A=s.selectionRange;if(d!==h&&h&&h.ownerDocument&&ff(h.ownerDocument.documentElement,h)){if(A!==null&&Wo(h)){var L=A.start,Z=A.end;if(Z===void 0&&(Z=L),"selectionStart"in h)h.selectionStart=L,h.selectionEnd=Math.min(Z,h.value.length);else{var q=h.ownerDocument||document,z=q&&q.defaultView||window;if(z.getSelection){var U=z.getSelection(),Se=h.textContent.length,ge=Math.min(A.start,Se),Ve=A.end===void 0?ge:Math.min(A.end,Se);!U.extend&&ge>Ve&&(d=Ve,Ve=ge,ge=d);var N=cf(h,ge),C=cf(h,Ve);if(N&&C&&(U.rangeCount!==1||U.anchorNode!==N.node||U.anchorOffset!==N.offset||U.focusNode!==C.node||U.focusOffset!==C.offset)){var x=q.createRange();x.setStart(N.node,N.offset),U.removeAllRanges(),ge>Ve?(U.addRange(x),U.extend(C.node,C.offset)):(x.setEnd(C.node,C.offset),U.addRange(x))}}}}for(q=[],U=h;U=U.parentNode;)U.nodeType===1&&q.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<q.length;h++){var F=q[h];F.element.scrollLeft=F.left,F.element.scrollTop=F.top}}eo=!!Ts,Cs=Ts=null}finally{Ze=u,D.p=i,E.T=a}}e.current=t,Tt=2}}function Cm(){if(Tt===2){Tt=0;var e=ua,t=Sr,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=E.T,E.T=null;var i=D.p;D.p=2;var u=Ze;Ze|=4;try{nm(e,t.alternate,t)}finally{Ze=u,D.p=i,E.T=a}}Tt=3}}function Om(){if(Tt===4||Tt===3){Tt=0,Me();var e=ua,t=Sr,a=Ar,i=mm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,Sr=ua=null,Nm(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(oa=null),yn(a),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot=="function")try{Ue.onCommitFiberRoot(Yt,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=E.T,u=D.p,D.p=2,E.T=null;try{for(var s=e.onRecoverableError,d=0;d<i.length;d++){var h=i[d];s(h.value,{componentStack:h.stack})}}finally{E.T=t,D.p=u}}(Ar&3)!==0&&Zl(),Mn(e),u=e.pendingLanes,(a&4194090)!==0&&(u&42)!==0?e===cs?bi++:(bi=0,cs=e):bi=0,Si(0)}}function Nm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ei(t)))}function Zl(e){return Tm(),Cm(),Om(),Mm()}function Mm(){if(Tt!==5)return!1;var e=ua,t=us;us=0;var a=yn(Ar),i=E.T,u=D.p;try{D.p=32>a?32:a,E.T=null,a=ss,ss=null;var s=ua,d=Ar;if(Tt=0,Sr=ua=null,Ar=0,(Ze&6)!==0)throw Error(o(331));var h=Ze;if(Ze|=4,fm(s.current),um(s,s.current,d,a),Ze=h,Si(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot=="function")try{Ue.onPostCommitFiberRoot(Yt,s)}catch{}return!0}finally{D.p=u,E.T=i,Nm(e,t)}}function Dm(e,t,a){t=ln(a,t),t=Zu(e.stateNode,t,2),e=Wn(e,t,2),e!==null&&(An(e,2),Mn(e))}function Pe(e,t,a){if(e.tag===3)Dm(e,e,a);else for(;t!==null;){if(t.tag===3){Dm(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(oa===null||!oa.has(i))){e=ln(a,e),a=Ld(2),i=Wn(t,a,2),i!==null&&(zd(a,i,t,e),An(i,2),Mn(i));break}}t=t.return}}function _s(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new Vp;var u=new Set;i.set(t,u)}else u=i.get(t),u===void 0&&(u=new Set,i.set(t,u));u.has(a)||(rs=!0,u.add(a),e=Wp.bind(null,e,t,a),t.then(e,e))}function Wp(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Xe===e&&(Be&a)===a&&(it===4||it===3&&(Be&62914560)===Be&&300>ye()-os?(Ze&2)===0&&Er(e,0):is|=a,br===Be&&(br=0)),Mn(e)}function xm(e,t){t===0&&(t=Fa()),e=ir(e,t),e!==null&&(An(e,t),Mn(e))}function Jp(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),xm(e,a)}function ey(e,t){var a=0;switch(e.tag){case 13:var i=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),xm(e,a)}function ty(e,t){return J(e,t)}var Gl=null,Cr=null,hs=!1,Fl=!1,ps=!1,ja=0;function Mn(e){e!==Cr&&e.next===null&&(Cr===null?Gl=Cr=e:Cr=Cr.next=e),Fl=!0,hs||(hs=!0,ay())}function Si(e,t){if(!ps&&Fl){ps=!0;do for(var a=!1,i=Gl;i!==null;){if(e!==0){var u=i.pendingLanes;if(u===0)var s=0;else{var d=i.suspendedLanes,h=i.pingedLanes;s=(1<<31-He(42|e)+1)-1,s&=u&~(d&~h),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(a=!0,zm(i,s))}else s=Be,s=pn(i,i===Xe?s:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(s&3)===0||Dn(i,s)||(a=!0,zm(i,s));i=i.next}while(a);ps=!1}}function ny(){wm()}function wm(){Fl=hs=!1;var e=0;ja!==0&&(fy()&&(e=ja),ja=0);for(var t=ye(),a=null,i=Gl;i!==null;){var u=i.next,s=Rm(i,t);s===0?(i.next=null,a===null?Gl=u:a.next=u,u===null&&(Cr=a)):(a=i,(e!==0||(s&3)!==0)&&(Fl=!0)),i=u}Si(e)}function Rm(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,u=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var d=31-He(s),h=1<<d,A=u[d];A===-1?((h&a)===0||(h&i)!==0)&&(u[d]=xn(h,t)):A<=t&&(e.expiredLanes|=h),s&=~h}if(t=Xe,a=Be,a=pn(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&pe(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Dn(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&pe(i),yn(a)){case 2:case 8:a=$e;break;case 32:a=Te;break;case 268435456:a=Je;break;default:a=Te}return i=Lm.bind(null,e),a=J(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&pe(i),e.callbackPriority=2,e.callbackNode=null,2}function Lm(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Zl()&&e.callbackNode!==a)return null;var i=Be;return i=pn(e,e===Xe?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(hm(e,i,t),Rm(e,ye()),e.callbackNode!=null&&e.callbackNode===a?Lm.bind(null,e):null)}function zm(e,t){if(Zl())return null;hm(e,t,!0)}function ay(){my(function(){(Ze&6)!==0?J(ue,ny):wm()})}function ys(){return ja===0&&(ja=Ga()),ja}function Bm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:tl(""+e)}function km(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 ry(e,t,a,i,u){if(t==="submit"&&a&&a.stateNode===u){var s=Bm((u[kt]||null).action),d=i.submitter;d&&(t=(t=d[kt]||null)?Bm(t.formAction):d.getAttribute("formAction"),t!==null&&(s=t,d=null));var h=new il("action","action",null,i,u);e.push({event:h,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(ja!==0){var A=d?km(u,d):new FormData(u);Uu(a,{pending:!0,data:A,method:u.method,action:s},null,A)}}else typeof s=="function"&&(h.preventDefault(),A=d?km(u,d):new FormData(u),Uu(a,{pending:!0,data:A,method:u.method,action:s},s,A))},currentTarget:u}]})}}for(var gs=0;gs<nu.length;gs++){var vs=nu[gs],iy=vs.toLowerCase(),ly=vs[0].toUpperCase()+vs.slice(1);gn(iy,"on"+ly)}gn(hf,"onAnimationEnd"),gn(pf,"onAnimationIteration"),gn(yf,"onAnimationStart"),gn("dblclick","onDoubleClick"),gn("focusin","onFocus"),gn("focusout","onBlur"),gn(Ep,"onTransitionRun"),gn(Tp,"onTransitionStart"),gn(Cp,"onTransitionCancel"),gn(gf,"onTransitionEnd"),Ka("onMouseEnter",["mouseout","mouseover"]),Ka("onMouseLeave",["mouseout","mouseover"]),Ka("onPointerEnter",["pointerout","pointerover"]),Ka("onPointerLeave",["pointerout","pointerover"]),Aa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Aa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Aa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Aa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Aa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ai="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(" "),oy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ai));function Um(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],u=i.event;i=i.listeners;e:{var s=void 0;if(t)for(var d=i.length-1;0<=d;d--){var h=i[d],A=h.instance,L=h.currentTarget;if(h=h.listener,A!==s&&u.isPropagationStopped())break e;s=h,u.currentTarget=L;try{s(u)}catch(Z){wl(Z)}u.currentTarget=null,s=A}else for(d=0;d<i.length;d++){if(h=i[d],A=h.instance,L=h.currentTarget,h=h.listener,A!==s&&u.isPropagationStopped())break e;s=h,u.currentTarget=L;try{s(u)}catch(Z){wl(Z)}u.currentTarget=null,s=A}}}}function Le(e,t){var a=t[Ro];a===void 0&&(a=t[Ro]=new Set);var i=e+"__bubble";a.has(i)||(jm(t,e,2,!1),a.add(i))}function bs(e,t,a){var i=0;t&&(i|=4),jm(a,e,i,t)}var Yl="_reactListening"+Math.random().toString(36).slice(2);function Ss(e){if(!e[Yl]){e[Yl]=!0,xc.forEach(function(a){a!=="selectionchange"&&(oy.has(a)||bs(a,!1,e),bs(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yl]||(t[Yl]=!0,bs("selectionchange",!1,t))}}function jm(e,t,a,i){switch(u_(t)){case 2:var u=zy;break;case 8:u=By;break;default:u=Bs}a=u.bind(null,t,a,e),u=void 0,!Go||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),i?u!==void 0?e.addEventListener(t,a,{capture:!0,passive:u}):e.addEventListener(t,a,!0):u!==void 0?e.addEventListener(t,a,{passive:u}):e.addEventListener(t,a,!1)}function As(e,t,a,i,u){var s=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var d=i.tag;if(d===3||d===4){var h=i.stateNode.containerInfo;if(h===u)break;if(d===4)for(d=i.return;d!==null;){var A=d.tag;if((A===3||A===4)&&d.stateNode.containerInfo===u)return;d=d.return}for(;h!==null;){if(d=qa(h),d===null)return;if(A=d.tag,A===5||A===6||A===26||A===27){i=s=d;continue e}h=h.parentNode}}i=i.return}Fc(function(){var L=s,Z=$o(a),q=[];e:{var z=vf.get(e);if(z!==void 0){var U=il,Se=e;switch(e){case"keypress":if(al(a)===0)break e;case"keydown":case"keyup":U=tp;break;case"focusin":Se="focus",U=Vo;break;case"focusout":Se="blur",U=Vo;break;case"beforeblur":case"afterblur":U=Vo;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":U=Vc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=G0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=rp;break;case hf:case pf:case yf:U=q0;break;case gf:U=lp;break;case"scroll":case"scrollend":U=$0;break;case"wheel":U=up;break;case"copy":case"cut":case"paste":U=P0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=Kc;break;case"toggle":case"beforetoggle":U=cp}var ge=(t&4)!==0,Ve=!ge&&(e==="scroll"||e==="scrollend"),N=ge?z!==null?z+"Capture":null:z;ge=[];for(var C=L,x;C!==null;){var F=C;if(x=F.stateNode,F=F.tag,F!==5&&F!==26&&F!==27||x===null||N===null||(F=$r(C,N),F!=null&&ge.push(Ei(C,F,x))),Ve)break;C=C.return}0<ge.length&&(z=new U(z,Se,null,a,Z),q.push({event:z,listeners:ge}))}}if((t&7)===0){e:{if(z=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",z&&a!==Io&&(Se=a.relatedTarget||a.fromElement)&&(qa(Se)||Se[Ya]))break e;if((U||z)&&(z=Z.window===Z?Z:(z=Z.ownerDocument)?z.defaultView||z.parentWindow:window,U?(Se=a.relatedTarget||a.toElement,U=L,Se=Se?qa(Se):null,Se!==null&&(Ve=f(Se),ge=Se.tag,Se!==Ve||ge!==5&&ge!==27&&ge!==6)&&(Se=null)):(U=null,Se=L),U!==Se)){if(ge=Vc,F="onMouseLeave",N="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ge=Kc,F="onPointerLeave",N="onPointerEnter",C="pointer"),Ve=U==null?z:Ir(U),x=Se==null?z:Ir(Se),z=new ge(F,C+"leave",U,a,Z),z.target=Ve,z.relatedTarget=x,F=null,qa(Z)===L&&(ge=new ge(N,C+"enter",Se,a,Z),ge.target=x,ge.relatedTarget=Ve,F=ge),Ve=F,U&&Se)t:{for(ge=U,N=Se,C=0,x=ge;x;x=Or(x))C++;for(x=0,F=N;F;F=Or(F))x++;for(;0<C-x;)ge=Or(ge),C--;for(;0<x-C;)N=Or(N),x--;for(;C--;){if(ge===N||N!==null&&ge===N.alternate)break t;ge=Or(ge),N=Or(N)}ge=null}else ge=null;U!==null&&Hm(q,z,U,ge,!1),Se!==null&&Ve!==null&&Hm(q,Ve,Se,ge,!0)}}e:{if(z=L?Ir(L):window,U=z.nodeName&&z.nodeName.toLowerCase(),U==="select"||U==="input"&&z.type==="file")var ae=af;else if(tf(z))if(rf)ae=bp;else{ae=gp;var xe=yp}else U=z.nodeName,!U||U.toLowerCase()!=="input"||z.type!=="checkbox"&&z.type!=="radio"?L&&Ho(L.elementType)&&(ae=af):ae=vp;if(ae&&(ae=ae(e,L))){nf(q,ae,a,Z);break e}xe&&xe(e,z,L),e==="focusout"&&L&&z.type==="number"&&L.memoizedProps.value!=null&&jo(z,"number",z.value)}switch(xe=L?Ir(L):window,e){case"focusin":(tf(xe)||xe.contentEditable==="true")&&(nr=xe,Jo=L,Kr=null);break;case"focusout":Kr=Jo=nr=null;break;case"mousedown":eu=!0;break;case"contextmenu":case"mouseup":case"dragend":eu=!1,mf(q,a,Z);break;case"selectionchange":if(Ap)break;case"keydown":case"keyup":mf(q,a,Z)}var se;if(Ko)e:{switch(e){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else tr?Jc(e,a)&&(ve="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ve="onCompositionStart");ve&&(Qc&&a.locale!=="ko"&&(tr||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&tr&&(se=Yc()):(Pn=Z,Fo="value"in Pn?Pn.value:Pn.textContent,tr=!0)),xe=ql(L,ve),0<xe.length&&(ve=new Pc(ve,e,null,a,Z),q.push({event:ve,listeners:xe}),se?ve.data=se:(se=ef(a),se!==null&&(ve.data=se)))),(se=dp?mp(e,a):_p(e,a))&&(ve=ql(L,"onBeforeInput"),0<ve.length&&(xe=new Pc("onBeforeInput","beforeinput",null,a,Z),q.push({event:xe,listeners:ve}),xe.data=se)),ry(q,e,L,a,Z)}Um(q,t)})}function Ei(e,t,a){return{instance:e,listener:t,currentTarget:a}}function ql(e,t){for(var a=t+"Capture",i=[];e!==null;){var u=e,s=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||s===null||(u=$r(e,a),u!=null&&i.unshift(Ei(e,u,s)),u=$r(e,t),u!=null&&i.push(Ei(e,u,s))),e.tag===3)return i;e=e.return}return[]}function Or(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hm(e,t,a,i,u){for(var s=t._reactName,d=[];a!==null&&a!==i;){var h=a,A=h.alternate,L=h.stateNode;if(h=h.tag,A!==null&&A===i)break;h!==5&&h!==26&&h!==27||L===null||(A=L,u?(L=$r(a,s),L!=null&&d.unshift(Ei(a,L,A))):u||(L=$r(a,s),L!=null&&d.push(Ei(a,L,A)))),a=a.return}d.length!==0&&e.push({event:t,listeners:d})}var uy=/\r\n?/g,sy=/\u0000|\uFFFD/g;function Im(e){return(typeof e=="string"?e:""+e).replace(uy,`
49
- `).replace(sy,"")}function $m(e,t){return t=Im(t),Im(e)===t}function Vl(){}function qe(e,t,a,i,u,s){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Wa(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Wa(e,""+i);break;case"className":Wi(e,"class",i);break;case"tabIndex":Wi(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Wi(e,a,i);break;case"style":Zc(e,i,s);break;case"data":if(t!=="object"){Wi(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=tl(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="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"&&qe(e,t,"name",u.name,u,null),qe(e,t,"formEncType",u.formEncType,u,null),qe(e,t,"formMethod",u.formMethod,u,null),qe(e,t,"formTarget",u.formTarget,u,null)):(qe(e,t,"encType",u.encType,u,null),qe(e,t,"method",u.method,u,null),qe(e,t,"target",u.target,u,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=tl(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=Vl);break;case"onScroll":i!=null&&Le("scroll",e);break;case"onScrollEnd":i!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=tl(""+i),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":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):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":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Le("beforetoggle",e),Le("toggle",e),Xi(e,"popover",i);break;case"xlinkActuate":wn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":wn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":wn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":wn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":wn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":wn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":wn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":wn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":wn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Xi(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=H0.get(a)||a,Xi(e,a,i))}}function Es(e,t,a,i,u,s){switch(a){case"style":Zc(e,i,s);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?Wa(e,i):(typeof i=="number"||typeof i=="bigint")&&Wa(e,""+i);break;case"onScroll":i!=null&&Le("scroll",e);break;case"onScrollEnd":i!=null&&Le("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Vl);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wc.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),t=a.slice(2,u?a.length-7:void 0),s=e[kt]||null,s=s!=null?s[a]:null,typeof s=="function"&&e.removeEventListener(t,s,u),typeof i=="function")){typeof s!="function"&&s!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,u);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):Xi(e,a,i)}}}function Ct(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var i=!1,u=!1,s;for(s in a)if(a.hasOwnProperty(s)){var d=a[s];if(d!=null)switch(s){case"src":i=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:qe(e,t,s,d,a,null)}}u&&qe(e,t,"srcSet",a.srcSet,a,null),i&&qe(e,t,"src",a.src,a,null);return;case"input":Le("invalid",e);var h=s=d=u=null,A=null,L=null;for(i in a)if(a.hasOwnProperty(i)){var Z=a[i];if(Z!=null)switch(i){case"name":u=Z;break;case"type":d=Z;break;case"checked":A=Z;break;case"defaultChecked":L=Z;break;case"value":s=Z;break;case"defaultValue":h=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(o(137,t));break;default:qe(e,t,i,Z,a,null)}}jc(e,s,h,A,L,d,u,!1),Ji(e);return;case"select":Le("invalid",e),i=d=s=null;for(u in a)if(a.hasOwnProperty(u)&&(h=a[u],h!=null))switch(u){case"value":s=h;break;case"defaultValue":d=h;break;case"multiple":i=h;default:qe(e,t,u,h,a,null)}t=s,a=d,e.multiple=!!i,t!=null?Xa(e,!!i,t,!1):a!=null&&Xa(e,!!i,a,!0);return;case"textarea":Le("invalid",e),s=u=i=null;for(d in a)if(a.hasOwnProperty(d)&&(h=a[d],h!=null))switch(d){case"value":i=h;break;case"defaultValue":u=h;break;case"children":s=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(o(91));break;default:qe(e,t,d,h,a,null)}Ic(e,i,u,s),Ji(e);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(i=a[A],i!=null))switch(A){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:qe(e,t,A,i,a,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(i=0;i<Ai.length;i++)Le(Ai[i],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(L in a)if(a.hasOwnProperty(L)&&(i=a[L],i!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:qe(e,t,L,i,a,null)}return;default:if(Ho(t)){for(Z in a)a.hasOwnProperty(Z)&&(i=a[Z],i!==void 0&&Es(e,t,Z,i,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(i=a[h],i!=null&&qe(e,t,h,i,a,null))}function cy(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,s=null,d=null,h=null,A=null,L=null,Z=null;for(U in a){var q=a[U];if(a.hasOwnProperty(U)&&q!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":A=q;default:i.hasOwnProperty(U)||qe(e,t,U,null,i,q)}}for(var z in i){var U=i[z];if(q=a[z],i.hasOwnProperty(z)&&(U!=null||q!=null))switch(z){case"type":s=U;break;case"name":u=U;break;case"checked":L=U;break;case"defaultChecked":Z=U;break;case"value":d=U;break;case"defaultValue":h=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:U!==q&&qe(e,t,z,U,i,q)}}Uo(e,d,h,A,L,Z,s,u);return;case"select":U=d=h=z=null;for(s in a)if(A=a[s],a.hasOwnProperty(s)&&A!=null)switch(s){case"value":break;case"multiple":U=A;default:i.hasOwnProperty(s)||qe(e,t,s,null,i,A)}for(u in i)if(s=i[u],A=a[u],i.hasOwnProperty(u)&&(s!=null||A!=null))switch(u){case"value":z=s;break;case"defaultValue":h=s;break;case"multiple":d=s;default:s!==A&&qe(e,t,u,s,i,A)}t=h,a=d,i=U,z!=null?Xa(e,!!a,z,!1):!!i!=!!a&&(t!=null?Xa(e,!!a,t,!0):Xa(e,!!a,a?[]:"",!1));return;case"textarea":U=z=null;for(h in a)if(u=a[h],a.hasOwnProperty(h)&&u!=null&&!i.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:qe(e,t,h,null,i,u)}for(d in i)if(u=i[d],s=a[d],i.hasOwnProperty(d)&&(u!=null||s!=null))switch(d){case"value":z=u;break;case"defaultValue":U=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==s&&qe(e,t,d,u,i,s)}Hc(e,z,U);return;case"option":for(var Se in a)if(z=a[Se],a.hasOwnProperty(Se)&&z!=null&&!i.hasOwnProperty(Se))switch(Se){case"selected":e.selected=!1;break;default:qe(e,t,Se,null,i,z)}for(A in i)if(z=i[A],U=a[A],i.hasOwnProperty(A)&&z!==U&&(z!=null||U!=null))switch(A){case"selected":e.selected=z&&typeof z!="function"&&typeof z!="symbol";break;default:qe(e,t,A,z,i,U)}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 ge in a)z=a[ge],a.hasOwnProperty(ge)&&z!=null&&!i.hasOwnProperty(ge)&&qe(e,t,ge,null,i,z);for(L in i)if(z=i[L],U=a[L],i.hasOwnProperty(L)&&z!==U&&(z!=null||U!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(137,t));break;default:qe(e,t,L,z,i,U)}return;default:if(Ho(t)){for(var Ve in a)z=a[Ve],a.hasOwnProperty(Ve)&&z!==void 0&&!i.hasOwnProperty(Ve)&&Es(e,t,Ve,void 0,i,z);for(Z in i)z=i[Z],U=a[Z],!i.hasOwnProperty(Z)||z===U||z===void 0&&U===void 0||Es(e,t,Z,z,i,U);return}}for(var N in a)z=a[N],a.hasOwnProperty(N)&&z!=null&&!i.hasOwnProperty(N)&&qe(e,t,N,null,i,z);for(q in i)z=i[q],U=a[q],!i.hasOwnProperty(q)||z===U||z==null&&U==null||qe(e,t,q,z,i,U)}var Ts=null,Cs=null;function Pl(e){return e.nodeType===9?e:e.ownerDocument}function Zm(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 Gm(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 Os(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 Ns=null;function fy(){var e=window.event;return e&&e.type==="popstate"?e===Ns?!1:(Ns=e,!0):(Ns=null,!1)}var Fm=typeof setTimeout=="function"?setTimeout:void 0,dy=typeof clearTimeout=="function"?clearTimeout:void 0,Ym=typeof Promise=="function"?Promise:void 0,my=typeof queueMicrotask=="function"?queueMicrotask:typeof Ym<"u"?function(e){return Ym.resolve(null).then(e).catch(_y)}:Fm;function _y(e){setTimeout(function(){throw e})}function ca(e){return e==="head"}function qm(e,t){var a=t,i=0,u=0;do{var s=a.nextSibling;if(e.removeChild(a),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(0<i&&8>i){a=i;var d=e.ownerDocument;if(a&1&&Ti(d.documentElement),a&2&&Ti(d.body),a&4)for(a=d.head,Ti(a),d=a.firstChild;d;){var h=d.nextSibling,A=d.nodeName;d[Hr]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=h}}if(u===0){e.removeChild(s),Ri(t);return}u--}else a==="$"||a==="$?"||a==="$!"?u++:i=a.charCodeAt(0)-48;else i=0;a=s}while(a);Ri(t)}function Ms(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":Ms(a),Lo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function hy(e,t,a,i){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Hr])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!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=bn(e.nextSibling),e===null)break}return null}function py(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=bn(e.nextSibling),e===null))return null;return e}function Ds(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function yy(e,t){var a=e.ownerDocument;if(e.data!=="$?"||a.readyState==="complete")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function bn(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 xs=null;function Vm(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 Pm(e,t,a){switch(t=Pl(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ti(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lo(e)}var dn=new Map,Km=new Set;function Kl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Yn=D.d;D.d={f:gy,r:vy,D:by,C:Sy,L:Ay,m:Ey,X:Cy,S:Ty,M:Oy};function gy(){var e=Yn.f(),t=Il();return e||t}function vy(e){var t=Va(e);t!==null&&t.tag===5&&t.type==="form"?hd(t):Yn.r(e)}var Nr=typeof document>"u"?null:document;function Qm(e,t,a){var i=Nr;if(i&&typeof t=="string"&&t){var u=rn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),Km.has(u)||(Km.add(u),e={rel:e,crossOrigin:a,href:t},i.querySelector(u)===null&&(t=i.createElement("link"),Ct(t,"link",e),gt(t),i.head.appendChild(t)))}}function by(e){Yn.D(e),Qm("dns-prefetch",e,null)}function Sy(e,t){Yn.C(e,t),Qm("preconnect",e,t)}function Ay(e,t,a){Yn.L(e,t,a);var i=Nr;if(i&&e&&t){var u='link[rel="preload"][as="'+rn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+rn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+rn(a.imageSizes)+'"]')):u+='[href="'+rn(e)+'"]';var s=u;switch(t){case"style":s=Mr(e);break;case"script":s=Dr(e)}dn.has(s)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),dn.set(s,e),i.querySelector(u)!==null||t==="style"&&i.querySelector(Ci(s))||t==="script"&&i.querySelector(Oi(s))||(t=i.createElement("link"),Ct(t,"link",e),gt(t),i.head.appendChild(t)))}}function Ey(e,t){Yn.m(e,t);var a=Nr;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+rn(i)+'"][href="'+rn(e)+'"]',s=u;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Dr(e)}if(!dn.has(s)&&(e=b({rel:"modulepreload",href:e},t),dn.set(s,e),a.querySelector(u)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Oi(s)))return}i=a.createElement("link"),Ct(i,"link",e),gt(i),a.head.appendChild(i)}}}function Ty(e,t,a){Yn.S(e,t,a);var i=Nr;if(i&&e){var u=Pa(i).hoistableStyles,s=Mr(e);t=t||"default";var d=u.get(s);if(!d){var h={loading:0,preload:null};if(d=i.querySelector(Ci(s)))h.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=dn.get(s))&&ws(e,a);var A=d=i.createElement("link");gt(A),Ct(A,"link",e),A._p=new Promise(function(L,Z){A.onload=L,A.onerror=Z}),A.addEventListener("load",function(){h.loading|=1}),A.addEventListener("error",function(){h.loading|=2}),h.loading|=4,Ql(d,t,i)}d={type:"stylesheet",instance:d,count:1,state:h},u.set(s,d)}}}function Cy(e,t){Yn.X(e,t);var a=Nr;if(a&&e){var i=Pa(a).hoistableScripts,u=Dr(e),s=i.get(u);s||(s=a.querySelector(Oi(u)),s||(e=b({src:e,async:!0},t),(t=dn.get(u))&&Rs(e,t),s=a.createElement("script"),gt(s),Ct(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(u,s))}}function Oy(e,t){Yn.M(e,t);var a=Nr;if(a&&e){var i=Pa(a).hoistableScripts,u=Dr(e),s=i.get(u);s||(s=a.querySelector(Oi(u)),s||(e=b({src:e,async:!0,type:"module"},t),(t=dn.get(u))&&Rs(e,t),s=a.createElement("script"),gt(s),Ct(s,"link",e),a.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},i.set(u,s))}}function Xm(e,t,a,i){var u=(u=w.current)?Kl(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Mr(a.href),a=Pa(u).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Mr(a.href);var s=Pa(u).hoistableStyles,d=s.get(e);if(d||(u=u.ownerDocument||u,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,d),(s=u.querySelector(Ci(e)))&&!s._p&&(d.instance=s,d.state.loading=5),dn.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},dn.set(e,a),s||Ny(u,e,a,d.state))),t&&i===null)throw Error(o(528,""));return d}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Dr(a),a=Pa(u).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Mr(e){return'href="'+rn(e)+'"'}function Ci(e){return'link[rel="stylesheet"]['+e+"]"}function Wm(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Ny(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ct(t,"link",a),gt(t),e.head.appendChild(t))}function Dr(e){return'[src="'+rn(e)+'"]'}function Oi(e){return"script[async]"+e}function Jm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+rn(a.href)+'"]');if(i)return t.instance=i,gt(i),i;var u=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),gt(i),Ct(i,"style",u),Ql(i,a.precedence,e),t.instance=i;case"stylesheet":u=Mr(a.href);var s=e.querySelector(Ci(u));if(s)return t.state.loading|=4,t.instance=s,gt(s),s;i=Wm(a),(u=dn.get(u))&&ws(i,u),s=(e.ownerDocument||e).createElement("link"),gt(s);var d=s;return d._p=new Promise(function(h,A){d.onload=h,d.onerror=A}),Ct(s,"link",i),t.state.loading|=4,Ql(s,a.precedence,e),t.instance=s;case"script":return s=Dr(a.src),(u=e.querySelector(Oi(s)))?(t.instance=u,gt(u),u):(i=a,(u=dn.get(s))&&(i=b({},a),Rs(i,u)),e=e.ownerDocument||e,u=e.createElement("script"),gt(u),Ct(u,"link",i),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Ql(i,a.precedence,e));return t.instance}function Ql(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=i.length?i[i.length-1]:null,s=u,d=0;d<i.length;d++){var h=i[d];if(h.dataset.precedence===t)s=h;else if(s!==u)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function ws(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Rs(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Xl=null;function e_(e,t,a){if(Xl===null){var i=new Map,u=Xl=new Map;u.set(a,i)}else u=Xl,i=u.get(a),i||(i=new Map,u.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var s=a[u];if(!(s[Hr]||s[xt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var d=s.getAttribute(t)||"";d=e+d;var h=i.get(d);h?h.push(s):i.set(d,[s])}}return i}function t_(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function My(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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 n_(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Ni=null;function Dy(){}function xy(e,t,a){if(Ni===null)throw Error(o(475));var i=Ni;if(t.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var u=Mr(a.href),s=e.querySelector(Ci(u));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(i.count++,i=Wl.bind(i),e.then(i,i)),t.state.loading|=4,t.instance=s,gt(s);return}s=e.ownerDocument||e,a=Wm(a),(u=dn.get(u))&&ws(a,u),s=s.createElement("link"),gt(s);var d=s;d._p=new Promise(function(h,A){d.onload=h,d.onerror=A}),Ct(s,"link",a),t.instance=s}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(i.count++,t=Wl.bind(i),e.addEventListener("load",t),e.addEventListener("error",t))}}function wy(){if(Ni===null)throw Error(o(475));var e=Ni;return e.stylesheets&&e.count===0&&Ls(e,e.stylesheets),0<e.count?function(t){var a=setTimeout(function(){if(e.stylesheets&&Ls(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(a)}}:null}function Wl(){if(this.count--,this.count===0){if(this.stylesheets)Ls(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Jl=null;function Ls(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Jl=new Map,t.forEach(Ry,e),Jl=null,Wl.call(e))}function Ry(e,t){if(!(t.state.loading&4)){var a=Jl.get(e);if(a)var i=a.get(null);else{a=new Map,Jl.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<u.length;s++){var d=u[s];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(a.set(d.dataset.precedence,d),i=d)}i&&a.set(null,i)}u=t.instance,d=u.getAttribute("data-precedence"),s=a.get(d)||i,s===i&&a.set(null,u),a.set(d,u),this.count++,i=Wl.bind(this),u.addEventListener("load",i),u.addEventListener("error",i),s?s.parentNode.insertBefore(u,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var Mi={$$typeof:te,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Ly(e,t,a,i,u,s,d,h){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=qn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qn(0),this.hiddenUpdates=qn(null),this.identifierPrefix=i,this.onUncaughtError=u,this.onCaughtError=s,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=h,this.incompleteTransitions=new Map}function a_(e,t,a,i,u,s,d,h,A,L,Z,q){return e=new Ly(e,t,a,d,h,A,L,q),t=1,s===!0&&(t|=24),s=Vt(3,null,null,t),e.current=s,s.stateNode=e,t=_u(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:i,isDehydrated:a,cache:t},gu(s),e}function r_(e){return e?(e=lr,e):lr}function i_(e,t,a,i,u,s){u=r_(u),i.context===null?i.context=u:i.pendingContext=u,i=Xn(t),i.payload={element:a},s=s===void 0?null:s,s!==null&&(i.callback=s),a=Wn(e,i,t),a!==null&&(Wt(a,e,t),ri(a,e,t))}function l_(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function zs(e,t){l_(e,t),(e=e.alternate)&&l_(e,t)}function o_(e){if(e.tag===13){var t=ir(e,67108864);t!==null&&Wt(t,e,67108864),zs(e,67108864)}}var eo=!0;function zy(e,t,a,i){var u=E.T;E.T=null;var s=D.p;try{D.p=2,Bs(e,t,a,i)}finally{D.p=s,E.T=u}}function By(e,t,a,i){var u=E.T;E.T=null;var s=D.p;try{D.p=8,Bs(e,t,a,i)}finally{D.p=s,E.T=u}}function Bs(e,t,a,i){if(eo){var u=ks(i);if(u===null)As(e,t,i,to,a),s_(e,i);else if(Uy(u,e,t,a,i))i.stopPropagation();else if(s_(e,i),t&4&&-1<ky.indexOf(e)){for(;u!==null;){var s=Va(u);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var d=nn(s.pendingLanes);if(d!==0){var h=s;for(h.pendingLanes|=2,h.entangledLanes|=2;d;){var A=1<<31-He(d);h.entanglements[1]|=A,d&=~A}Mn(s),(Ze&6)===0&&(jl=ye()+500,Si(0))}}break;case 13:h=ir(s,2),h!==null&&Wt(h,s,2),Il(),zs(s,2)}if(s=ks(i),s===null&&As(e,t,i,to,a),s===u)break;u=s}u!==null&&i.stopPropagation()}else As(e,t,i,null,a)}}function ks(e){return e=$o(e),Us(e)}var to=null;function Us(e){if(to=null,e=qa(e),e!==null){var t=f(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(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 to=e,null}function u_(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(Qe()){case ue:return 2;case $e:return 8;case Te:case ke:return 32;case Je:return 268435456;default:return 32}default:return 32}}var js=!1,fa=null,da=null,ma=null,Di=new Map,xi=new Map,_a=[],ky="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 s_(e,t){switch(e){case"focusin":case"focusout":fa=null;break;case"dragenter":case"dragleave":da=null;break;case"mouseover":case"mouseout":ma=null;break;case"pointerover":case"pointerout":Di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":xi.delete(t.pointerId)}}function wi(e,t,a,i,u,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:s,targetContainers:[u]},t!==null&&(t=Va(t),t!==null&&o_(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Uy(e,t,a,i,u){switch(t){case"focusin":return fa=wi(fa,e,t,a,i,u),!0;case"dragenter":return da=wi(da,e,t,a,i,u),!0;case"mouseover":return ma=wi(ma,e,t,a,i,u),!0;case"pointerover":var s=u.pointerId;return Di.set(s,wi(Di.get(s)||null,e,t,a,i,u)),!0;case"gotpointercapture":return s=u.pointerId,xi.set(s,wi(xi.get(s)||null,e,t,a,i,u)),!0}return!1}function c_(e){var t=qa(e.target);if(t!==null){var a=f(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,x0(e.priority,function(){if(a.tag===13){var i=Xt();i=En(i);var u=ir(a,i);u!==null&&Wt(u,a,i),zs(a,i)}});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function no(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ks(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);Io=i,a.target.dispatchEvent(i),Io=null}else return t=Va(a),t!==null&&o_(t),e.blockedOn=a,!1;t.shift()}return!0}function f_(e,t,a){no(e)&&a.delete(t)}function jy(){js=!1,fa!==null&&no(fa)&&(fa=null),da!==null&&no(da)&&(da=null),ma!==null&&no(ma)&&(ma=null),Di.forEach(f_),xi.forEach(f_)}function ao(e,t){e.blockedOn===t&&(e.blockedOn=null,js||(js=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,jy)))}var ro=null;function d_(e){ro!==e&&(ro=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ro===e&&(ro=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],u=e[t+2];if(typeof i!="function"){if(Us(i||a)===null)continue;break}var s=Va(a);s!==null&&(e.splice(t,3),t-=3,Uu(s,{pending:!0,data:u,method:a.method,action:i},i,u))}}))}function Ri(e){function t(A){return ao(A,e)}fa!==null&&ao(fa,e),da!==null&&ao(da,e),ma!==null&&ao(ma,e),Di.forEach(t),xi.forEach(t);for(var a=0;a<_a.length;a++){var i=_a[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<_a.length&&(a=_a[0],a.blockedOn===null);)c_(a),a.blockedOn===null&&_a.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var u=a[i],s=a[i+1],d=u[kt]||null;if(typeof s=="function")d||d_(a);else if(d){var h=null;if(s&&s.hasAttribute("formAction")){if(u=s,d=s[kt]||null)h=d.formAction;else if(Us(u)!==null)continue}else h=d.action;typeof h=="function"?a[i+1]=h:(a.splice(i,3),i-=3),d_(a)}}}function Hs(e){this._internalRoot=e}io.prototype.render=Hs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=Xt();i_(a,i,e,t,null,null)},io.prototype.unmount=Hs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;i_(e.current,2,null,e,null,null),Il(),t[Ya]=null}};function io(e){this._internalRoot=e}io.prototype.unstable_scheduleHydration=function(e){if(e){var t=Qi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<_a.length&&t!==0&&t<_a[a].priority;a++);_a.splice(a,0,e),a===0&&c_(e)}};var m_=r.version;if(m_!=="19.1.1")throw Error(o(527,m_,"19.1.1"));D.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var Hy={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lo.isDisabled&&lo.supportsFiber)try{Yt=lo.inject(Hy),Ue=lo}catch{}}return zi.createRoot=function(e,t){if(!c(e))throw Error(o(299));var a=!1,i="",u=Dd,s=xd,d=wd,h=null;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(h=t.unstable_transitionCallbacks)),t=a_(e,1,!1,null,null,a,i,u,s,d,h,null),e[Ya]=t.current,Ss(e),new Hs(t)},zi.hydrateRoot=function(e,t,a){if(!c(e))throw Error(o(299));var i=!1,u="",s=Dd,d=xd,h=wd,A=null,L=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(s=a.onUncaughtError),a.onCaughtError!==void 0&&(d=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.unstable_transitionCallbacks!==void 0&&(A=a.unstable_transitionCallbacks),a.formState!==void 0&&(L=a.formState)),t=a_(e,1,!0,t,a??null,i,u,s,d,h,A,L),t.context=r_(null),a=t.current,i=Xt(),i=En(i),u=Xn(i),u.callback=null,Wn(a,u,i),a=i,t.current.lanes=a,An(t,a),Mn(t),e[Ya]=t.current,Ss(e),new io(t)},zi.version="19.1.1",zi}var E_;function Ky(){if(E_)return Zs.exports;E_=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Zs.exports=Py(),Zs.exports}var Qy=Ky();function en({id:n,label:r,hint:l,error:o,required:c,className:f,children:m}){return y.jsxs("div",{className:f,children:[y.jsxs("label",{htmlFor:n,className:"form-label",children:[r," ",c&&y.jsx("span",{className:"text-red-600",children:"*"})]}),m,l&&!o&&y.jsx("p",{id:`${n}-hint`,className:"mt-1 text-sm text-slate-500",children:l}),o&&y.jsx("p",{id:`${n}-error`,className:"mt-1 text-sm text-red-600",children:o})]})}function qs({id:n,label:r,hint:l,error:o,required:c,className:f,...m}){return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("input",{id:n,className:`form-input ${o?"input-error":""}`,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,required:c,...m,type:"text"})})}function T_(n,r){if(!n)return"";const l=parseInt(n,10);if(isNaN(l))return"";const o=l.toLocaleString("en-US");return r?`$${o}`:o}function Xy({id:n,label:r,hint:l,error:o,required:c,className:f,value:m,onChange:_,onKeyDown:g,isCurrency:p=!1,maxDigits:b,...R}){const[j,B]=H.useState(""),G=H.useRef(null);H.useEffect(()=>{if(m==null||m===""){B("");return}const le=String(m).replace(/\D/g,"");B(T_(le,p))},[m,p]);const k=le=>{let de=le.target.value.replace(/\D/g,"");b!==void 0&&(de=de.slice(0,b)),B(T_(de,p));const te={...le,currentTarget:{...le.currentTarget,value:de},target:{...le.target,value:de}};_?.(te)},fe=le=>{if(["-","+",".","e","E"].includes(le.key)){le.preventDefault();return}if(b!==void 0&&/^\d$/.test(le.key)&&le.currentTarget.value.replace(/\D/g,"").length>=b){le.preventDefault();return}g?.(le)};return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("input",{ref:G,id:n,type:"text",inputMode:"numeric",className:`form-input ${o?"input-error":""}`,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,required:c,value:j,onChange:k,onKeyDown:fe,...R})})}function C_(n){return n.length<=3?n:n.length<=5?`${n.slice(0,3)}-${n.slice(3)}`:`${n.slice(0,3)}-${n.slice(3,5)}-${n.slice(5,9)}`}function Wy({id:n,label:r,hint:l,error:o,required:c,className:f,value:m="",onChange:_,...g}){const[p,b]=H.useState(""),R=H.useRef(null);H.useEffect(()=>{const B=m.replace(/\D/g,"").slice(0,9);b(C_(B))},[m]);const j=B=>{const G=B.target.value,k=B.target.selectionStart??0,fe=G.replace(/\D/g,"").slice(0,9),le=C_(fe);b(le);const de={...B,currentTarget:{...B.currentTarget,value:le},target:{...B.target,value:le}};_?.(de),setTimeout(()=>{if(R.current){const te=G.slice(0,k).replace(/\D/g,"").length;let ie=te;te>5?ie+=2:te>3&&(ie+=1),R.current.setSelectionRange(ie,ie)}},0)};return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("input",{ref:R,id:n,type:"text",inputMode:"numeric",className:`form-input ${o?"input-error":""}`,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,required:c,maxLength:11,placeholder:"XXX-XX-XXXX",autoComplete:"off",value:p,onChange:j,...g})})}function Vs({id:n,label:r,hint:l,error:o,required:c,className:f,...m}){return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("input",{id:n,type:"number",className:`form-input ${o?"input-error":""}`,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,required:c,...m})})}function Jy({id:n,label:r,hint:l,error:o,required:c,className:f,...m}){return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("input",{id:n,type:"email",className:`form-input ${o?"input-error":""}`,inputMode:"email",autoComplete:"email",required:c,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,...m})})}function Ps(n){const r=n.replace(/\D/g,"");if(r.length===10)return`(${r.slice(0,3)}) ${r.slice(3,6)} - ${r.slice(6)}`;if(r.length>10){const l=r.slice(0,10);return`(${l.slice(0,3)}) ${l.slice(3,6)} - ${l.slice(6)}`}return r.length>=6?`(${r.slice(0,3)}) ${r.slice(3,6)} - ${r.slice(6)}`:r.length>=3?`(${r.slice(0,3)}) ${r.slice(3)}`:r.length>0?`(${r}`:r}function Ks(n){return n.replace(/\D/g,"")}function eg({id:n,label:r,hint:l,error:o,required:c,className:f,value:m="",onChange:_,...g}){const[p,b]=H.useState(""),R=H.useRef(null),j=H.useRef(0);H.useEffect(()=>{if(!m){b("");return}let G=Ks(m);G.length===11&&G.startsWith("1")&&(G=G.slice(1));const k=G.slice(0,10);b(Ps(k))},[m]);const B=G=>{const k=G.target,fe=k.value;j.current=k.selectionStart||0;const de=Ks(fe).slice(0,10),te=Ps(de);b(te);const ie=de.length===10?`+1${de}`:de,W={...G,currentTarget:{...G.currentTarget,value:ie},target:{...G.target,value:ie}};_?.(W),setTimeout(()=>{if(R.current){const re=fe.slice(0,j.current),me=Ks(re),ne=Ps(me),he=Math.min(ne.length,te.length);R.current.setSelectionRange(he,he)}},0)};return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsxs("div",{className:`tel-input-wrapper flex items-center border rounded-lg transition-colors w-full relative ${o?"border-red-500 error":"border-[var(--accent-color)] focus-within:border-[var(--primary-color)]"}`,children:[y.jsx("label",{htmlFor:n,className:"px-3 py-3 text-slate-700 font-medium border-r border-[var(--accent-color)] bg-slate-50 flex-shrink-0 relative z-0 rounded-l-lg",children:"+1"}),y.jsx("input",{ref:R,id:n,type:"tel",className:`flex-1 px-4 py-3 border-0 rounded-r-lg outline-none bg-transparent text-[var(--text-primary)] text-base ${o?"input-error":""}`,inputMode:"tel",autoComplete:"tel",required:c,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,value:p,onChange:B,...g})]})})}function tg({id:n,label:r,hint:l,error:o,required:c,className:f,...m}){return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("input",{id:n,type:"url",className:`form-input ${o?"input-error":""}`,inputMode:"url",autoComplete:"url",required:c,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,...m})})}function ng({id:n,label:r,hint:l,error:o,required:c,className:f,...m}){return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("input",{id:n,type:"password",className:`form-input ${o?"input-error":""}`,autoComplete:"current-password",required:c,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,...m})})}function ag({id:n,label:r,hint:l,error:o,required:c,className:f,rows:m=4,..._}){return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("textarea",{id:n,rows:m,className:`form-input ${o?"input-error":""}`,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,required:c,..._})})}function rg({id:n,label:r,hint:l,error:o,required:c,className:f,...m}){return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsx("input",{id:n,type:"date",className:`form-input ${o?"input-error":""}`,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,required:c,...m})})}function ac({id:n,label:r,className:l,...o}){return y.jsxs("label",{className:`checkbox-card ${l||""}`,htmlFor:n,children:[y.jsx("input",{id:n,type:"checkbox",className:"checkbox-input",...o}),y.jsx("span",{className:"checkbox-label",children:r})]})}function ig({onChoose:n,isSubmitting:r=!1}){const[l,o]=H.useState(!1),c=!l||r;return y.jsxs("div",{className:"communications-consent","data-testid":"communications-consent",children:[y.jsx("h3",{className:"text-lg font-semibold text-text-primary mb-3",children:"Communications Consent"}),y.jsx(ac,{id:"communications-consent-checkbox",className:"communications-consent-checkbox",checked:l,onChange:f=>o(f.target.checked),disabled:r,label:"I consent to communications from Credify Corporation (licensed insurance agency) and my selected carrier(s) at the phone number and email address I provided. This covers: support (including AI agents), carrier quote and service contact, automated rate shopping at or before renewal, policy renewal notifications, claims management, and Credify's newsletter (which we may send by email, or by text message with a link to read it)."}),y.jsxs("div",{className:"text-sm text-slate-600 mt-4 space-y-2",children:[y.jsx("p",{children:"These may use automated systems, emails or texts. Message frequency varies. Message & data rates may apply. Reply STOP to opt out of SMS; Reply HELP for help."}),y.jsx("p",{children:"Consent is not required to receive quotes or purchase insurance."}),y.jsxs("p",{children:["Credify Corporation – Texas #3309669."," ",y.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","|"," ",y.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"})]})]}),y.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-6",children:[y.jsxs("button",{type:"button","data-testid":"communications-consent-accept",onClick:()=>n(!0),disabled:c,className:["form-wizard-next-btn","h-12 rounded-full text-white font-bold transition","disabled:cursor-not-allowed","flex items-center justify-center gap-2",c?"bg-slate-400":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[r&&y.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),y.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"I Consent"]}),y.jsx("button",{type:"button","data-testid":"communications-consent-decline",onClick:()=>n(!1),disabled:r,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition disabled:opacity-50 disabled:cursor-not-allowed",children:"I Do Not Consent"})]})]})}function lg({name:n,value:r,checked:l,onChange:o,children:c}){return y.jsxs("label",{className:"radio-card",children:[y.jsx("input",{className:"radio-input",type:"radio",name:n,value:r,checked:l,onChange:o}),y.jsx("span",{className:"radio-label",children:c})]})}function og({legend:n,children:r,className:l,legendClassName:o}){return y.jsxs("fieldset",{className:l,children:[y.jsx("legend",{className:`form-label mb-4 ${o||""}`,children:n}),y.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:r})]})}function Bi({id:n,label:r,hint:l,error:o,required:c,className:f,placeholder:m,options:_,children:g,...p}){const b=[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,R=!!g;return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsxs("select",{id:n,className:`form-input select-caret ${o?"input-error":""}`,"aria-invalid":!!o,"aria-describedby":b,required:c,...p,children:[m&&y.jsx("option",{value:"",disabled:!0,selected:!("value"in p),children:m}),R?g:_?.map(j=>y.jsx("option",{value:j.value,disabled:j.disabled,children:j.label},j.value))]})})}const ug="AIzaSyDjLdKLxoa-maLNGAyq_I_2r_Fe_TzFikw";function sg(){return new Promise((n,r)=>{if(window.google?.maps?.places){n();return}const l=document.querySelector('script[src*="maps.googleapis.com"]');if(l){l.addEventListener("load",()=>n()),l.addEventListener("error",()=>r(new Error("Failed to load Google Maps script")));return}const o=document.createElement("script");o.src=`https://maps.googleapis.com/maps/api/js?key=${ug}&libraries=places`,o.async=!0,o.defer=!0,o.onload=()=>n(),o.onerror=()=>r(new Error("Failed to load Google Maps script")),document.head.appendChild(o)})}function cg(n){const r={fullAddress:n.formatted_address};return n.address_components&&n.address_components.forEach(l=>{const o=l.types;o.includes("street_number")&&(r.streetNumber=l.long_name),o.includes("route")&&(r.streetName=l.long_name),o.includes("locality")&&(r.city=l.long_name),o.includes("administrative_area_level_1")&&(r.state=l.short_name),o.includes("postal_code")&&(r.zipCode=l.long_name),o.includes("country")&&(r.country=l.short_name)}),r}function fg({id:n,label:r,hint:l,error:o,required:c,className:f,onChange:m,onPlaceSelect:_,value:g,...p}){const b=H.useRef(null),R=H.useRef(null),j=H.useRef(null),B=H.useRef(null),[G,k]=H.useState(!0),[fe,le]=H.useState(g||""),[de,te]=H.useState([]),[ie,W]=H.useState(!1),[re,me]=H.useState(-1),ne=H.useRef([]),he=H.useRef(!1),Ae=H.useRef(-1);H.useEffect(()=>{ne.current=de},[de]),H.useEffect(()=>{he.current=ie},[ie]),H.useEffect(()=>{Ae.current=re},[re]),H.useEffect(()=>{g!==void 0&&le(String(g))},[g]);const Ee=H.useRef(null);H.useEffect(()=>{if(!b.current)return;let ce=!0;return sg().then(()=>{!ce||!b.current||(R.current=new google.maps.places.AutocompleteService,j.current=new google.maps.places.PlacesService(document.createElement("div")),k(!1))}).catch(E=>{console.error("Error loading Google Maps:",E),k(!1)}),()=>{ce=!1,Ee.current&&clearTimeout(Ee.current)}},[]);const Ne=ce=>{const E=ce.target.value;if(le(E),m?.(E),Ee.current&&clearTimeout(Ee.current),E.length<3){te([]),W(!1);return}Ee.current=setTimeout(()=>{R.current&&R.current.getPlacePredictions({input:E,types:["address"]},(D,$)=>{$===google.maps.places.PlacesServiceStatus.OK&&D?(te(D),W(!0),me(-1)):(te([]),W(!1))})},300)},Ke=ce=>{if(!he.current||ne.current.length===0){ce.key==="Escape"&&(W(!1),he.current=!1);return}switch(ce.key){case"ArrowDown":ce.preventDefault(),me(E=>{const D=E<ne.current.length-1?E+1:E;return Ae.current=D,D});break;case"ArrowUp":ce.preventDefault(),me(E=>{const D=E>0?E-1:-1;return Ae.current=D,D});break;case"Enter":ce.preventDefault(),Ae.current>=0&&Ae.current<ne.current.length&&We(ne.current[Ae.current]);break;case"Escape":ce.preventDefault(),W(!1),he.current=!1;break}};H.useEffect(()=>{const ce=E=>{B.current&&!B.current.contains(E.target)&&b.current&&!b.current.contains(E.target)&&(W(!1),he.current=!1)};if(ie)return document.addEventListener("mousedown",ce),()=>{document.removeEventListener("mousedown",ce)}},[ie]);const We=ce=>{j.current&&j.current.getDetails({placeId:ce.place_id,fields:["address_components","formatted_address","geometry"]},(E,D)=>{if(D===google.maps.places.PlacesServiceStatus.OK&&E){const $=E.formatted_address||"";le($),W(!1),te([]),he.current=!1;const V=cg(E);m?.($,V),_?.(E)}})};return y.jsx(en,{id:n,label:r,hint:l,error:o,required:c,className:f,children:y.jsxs("div",{className:"relative",children:[y.jsx("input",{ref:b,id:n,type:"text",className:`form-input ${o?"input-error":""}`,value:fe,onChange:Ne,onKeyDown:Ke,"aria-invalid":!!o,"aria-describedby":[l?`${n}-hint`:null,o?`${n}-error`:null].filter(Boolean).join(" ")||void 0,required:c,autoComplete:"street-address",placeholder:p.placeholder||"Enter an address",disabled:G||p.disabled,...p}),G&&y.jsx("p",{className:"mt-1 text-sm text-slate-500",children:"Loading address suggestions..."}),ie&&de.length>0&&y.jsx("div",{ref:B,className:"absolute z-50 w-full mt-1 bg-white border border-slate-200 rounded-lg shadow-lg max-h-60 overflow-y-auto",role:"listbox",children:de.map((ce,E)=>y.jsxs("div",{className:`px-4 py-3 cursor-pointer transition-colors ${E===re?"bg-blue-50 text-slate-900":"bg-white text-slate-900 hover:bg-slate-50"} ${E<de.length-1?"border-b border-slate-100":""}`,role:"option","aria-selected":E===re,onClick:()=>We(ce),onMouseEnter:()=>me(E),children:[y.jsx("div",{className:"font-medium text-slate-900",children:ce.structured_formatting.main_text}),ce.structured_formatting.secondary_text&&y.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:ce.structured_formatting.secondary_text})]},ce.place_id))})]})})}function yc(n){const r=(l,o)=>l.map((c,f)=>{const m=o.length?o.join("__"):"root",_=c.key??`${m}__q${f}_${String(c.question).slice(0,24).replace(/\W+/g,"-")||"field"}`,p=(c.conditionals??[]).map((b,R)=>{const j=b.conditionalQuestions?r(b.conditionalQuestions,[...o,`${_}__c${R}`]):void 0;return{...b,conditionalQuestions:j}});return{...c,key:_,conditionals:p}});return r(n,[])}function Y(n,r,l){function o(_,g){if(_._zod||Object.defineProperty(_,"_zod",{value:{def:g,constr:m,traits:new Set},enumerable:!1}),_._zod.traits.has(n))return;_._zod.traits.add(n),r(_,g);const p=m.prototype,b=Object.keys(p);for(let R=0;R<b.length;R++){const j=b[R];j in _||(_[j]=p[j].bind(_))}}const c=l?.Parent??Object;class f extends c{}Object.defineProperty(f,"name",{value:n});function m(_){var g;const p=l?.Parent?new f:this;o(p,_),(g=p._zod).deferred??(g.deferred=[]);for(const b of p._zod.deferred)b();return p}return Object.defineProperty(m,"init",{value:o}),Object.defineProperty(m,Symbol.hasInstance,{value:_=>l?.Parent&&_ instanceof l.Parent?!0:_?._zod?.traits?.has(n)}),Object.defineProperty(m,"name",{value:n}),m}class zr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Rh extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}}const Lh={};function Ha(n){return Lh}function zh(n){const r=Object.values(n).filter(o=>typeof o=="number");return Object.entries(n).filter(([o,c])=>r.indexOf(+o)===-1).map(([o,c])=>c)}function rc(n,r){return typeof r=="bigint"?r.toString():r}function gc(n){return{get value(){{const r=n();return Object.defineProperty(this,"value",{value:r}),r}}}}function vc(n){return n==null}function bc(n){const r=n.startsWith("^")?1:0,l=n.endsWith("$")?n.length-1:n.length;return n.slice(r,l)}function dg(n,r){const l=(n.toString().split(".")[1]||"").length,o=r.toString();let c=(o.split(".")[1]||"").length;if(c===0&&/\d?e-\d?/.test(o)){const g=o.match(/\d?e-(\d?)/);g?.[1]&&(c=Number.parseInt(g[1]))}const f=l>c?l:c,m=Number.parseInt(n.toFixed(f).replace(".","")),_=Number.parseInt(r.toFixed(f).replace(".",""));return m%_/10**f}const O_=Symbol("evaluating");function Fe(n,r,l){let o;Object.defineProperty(n,r,{get(){if(o!==O_)return o===void 0&&(o=O_,o=l()),o},set(c){Object.defineProperty(n,r,{value:c})},configurable:!0})}function $a(n,r,l){Object.defineProperty(n,r,{value:l,writable:!0,enumerable:!0,configurable:!0})}function ba(...n){const r={};for(const l of n){const o=Object.getOwnPropertyDescriptors(l);Object.assign(r,o)}return Object.defineProperties({},r)}function N_(n){return JSON.stringify(n)}function mg(n){return n.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Bh="captureStackTrace"in Error?Error.captureStackTrace:(...n)=>{};function So(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)}const _g=gc(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const n=Function;return new n(""),!0}catch{return!1}});function Fi(n){if(So(n)===!1)return!1;const r=n.constructor;if(r===void 0||typeof r!="function")return!0;const l=r.prototype;return!(So(l)===!1||Object.prototype.hasOwnProperty.call(l,"isPrototypeOf")===!1)}function kh(n){return Fi(n)?{...n}:Array.isArray(n)?[...n]:n}const hg=new Set(["string","number","symbol"]);function kr(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Sa(n,r,l){const o=new n._zod.constr(r??n._zod.def);return(!r||l?.parent)&&(o._zod.parent=n),o}function _e(n){const r=n;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function pg(n){return Object.keys(n).filter(r=>n[r]._zod.optin==="optional"&&n[r]._zod.optout==="optional")}const yg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function gg(n,r){const l=n._zod.def,o=l.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const f=ba(n._zod.def,{get shape(){const m={};for(const _ in r){if(!(_ in l.shape))throw new Error(`Unrecognized key: "${_}"`);r[_]&&(m[_]=l.shape[_])}return $a(this,"shape",m),m},checks:[]});return Sa(n,f)}function vg(n,r){const l=n._zod.def,o=l.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const f=ba(n._zod.def,{get shape(){const m={...n._zod.def.shape};for(const _ in r){if(!(_ in l.shape))throw new Error(`Unrecognized key: "${_}"`);r[_]&&delete m[_]}return $a(this,"shape",m),m},checks:[]});return Sa(n,f)}function bg(n,r){if(!Fi(r))throw new Error("Invalid input to extend: expected a plain object");const l=n._zod.def.checks;if(l&&l.length>0){const f=n._zod.def.shape;for(const m in r)if(Object.getOwnPropertyDescriptor(f,m)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const c=ba(n._zod.def,{get shape(){const f={...n._zod.def.shape,...r};return $a(this,"shape",f),f}});return Sa(n,c)}function Sg(n,r){if(!Fi(r))throw new Error("Invalid input to safeExtend: expected a plain object");const l=ba(n._zod.def,{get shape(){const o={...n._zod.def.shape,...r};return $a(this,"shape",o),o}});return Sa(n,l)}function Ag(n,r){const l=ba(n._zod.def,{get shape(){const o={...n._zod.def.shape,...r._zod.def.shape};return $a(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:[]});return Sa(n,l)}function Eg(n,r,l){const c=r._zod.def.checks;if(c&&c.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const m=ba(r._zod.def,{get shape(){const _=r._zod.def.shape,g={..._};if(l)for(const p in l){if(!(p in _))throw new Error(`Unrecognized key: "${p}"`);l[p]&&(g[p]=n?new n({type:"optional",innerType:_[p]}):_[p])}else for(const p in _)g[p]=n?new n({type:"optional",innerType:_[p]}):_[p];return $a(this,"shape",g),g},checks:[]});return Sa(r,m)}function Tg(n,r,l){const o=ba(r._zod.def,{get shape(){const c=r._zod.def.shape,f={...c};if(l)for(const m in l){if(!(m in f))throw new Error(`Unrecognized key: "${m}"`);l[m]&&(f[m]=new n({type:"nonoptional",innerType:c[m]}))}else for(const m in c)f[m]=new n({type:"nonoptional",innerType:c[m]});return $a(this,"shape",f),f}});return Sa(r,o)}function Lr(n,r=0){if(n.aborted===!0)return!0;for(let l=r;l<n.issues.length;l++)if(n.issues[l]?.continue!==!0)return!0;return!1}function Uh(n,r){return r.map(l=>{var o;return(o=l).path??(o.path=[]),l.path.unshift(n),l})}function oo(n){return typeof n=="string"?n:n?.message}function Ia(n,r,l){const o={...n,path:n.path??[]};if(!n.message){const c=oo(n.inst?._zod.def?.error?.(n))??oo(r?.error?.(n))??oo(l.customError?.(n))??oo(l.localeError?.(n))??"Invalid input";o.message=c}return delete o.inst,delete o.continue,r?.reportInput||delete o.input,o}function Sc(n){return Array.isArray(n)?"array":typeof n=="string"?"string":"unknown"}function Yi(...n){const[r,l,o]=n;return typeof r=="string"?{message:r,code:"custom",input:l,inst:o}:{...r}}const jh=(n,r)=>{n.name="$ZodError",Object.defineProperty(n,"_zod",{value:n._zod,enumerable:!1}),Object.defineProperty(n,"issues",{value:r,enumerable:!1}),n.message=JSON.stringify(r,rc,2),Object.defineProperty(n,"toString",{value:()=>n.message,enumerable:!1})},Hh=Y("$ZodError",jh),Ih=Y("$ZodError",jh,{Parent:Error});function Cg(n,r=l=>l.message){const l={},o=[];for(const c of n.issues)c.path.length>0?(l[c.path[0]]=l[c.path[0]]||[],l[c.path[0]].push(r(c))):o.push(r(c));return{formErrors:o,fieldErrors:l}}function Og(n,r=l=>l.message){const l={_errors:[]},o=c=>{for(const f of c.issues)if(f.code==="invalid_union"&&f.errors.length)f.errors.map(m=>o({issues:m}));else if(f.code==="invalid_key")o({issues:f.issues});else if(f.code==="invalid_element")o({issues:f.issues});else if(f.path.length===0)l._errors.push(r(f));else{let m=l,_=0;for(;_<f.path.length;){const g=f.path[_];_===f.path.length-1?(m[g]=m[g]||{_errors:[]},m[g]._errors.push(r(f))):m[g]=m[g]||{_errors:[]},m=m[g],_++}}};return o(n),l}const Ac=n=>(r,l,o,c)=>{const f=o?Object.assign(o,{async:!1}):{async:!1},m=r._zod.run({value:l,issues:[]},f);if(m instanceof Promise)throw new zr;if(m.issues.length){const _=new(c?.Err??n)(m.issues.map(g=>Ia(g,f,Ha())));throw Bh(_,c?.callee),_}return m.value},Ec=n=>async(r,l,o,c)=>{const f=o?Object.assign(o,{async:!0}):{async:!0};let m=r._zod.run({value:l,issues:[]},f);if(m instanceof Promise&&(m=await m),m.issues.length){const _=new(c?.Err??n)(m.issues.map(g=>Ia(g,f,Ha())));throw Bh(_,c?.callee),_}return m.value},Do=n=>(r,l,o)=>{const c=o?{...o,async:!1}:{async:!1},f=r._zod.run({value:l,issues:[]},c);if(f instanceof Promise)throw new zr;return f.issues.length?{success:!1,error:new(n??Hh)(f.issues.map(m=>Ia(m,c,Ha())))}:{success:!0,data:f.value}},Ng=Do(Ih),xo=n=>async(r,l,o)=>{const c=o?Object.assign(o,{async:!0}):{async:!0};let f=r._zod.run({value:l,issues:[]},c);return f instanceof Promise&&(f=await f),f.issues.length?{success:!1,error:new n(f.issues.map(m=>Ia(m,c,Ha())))}:{success:!0,data:f.value}},Mg=xo(Ih),Dg=n=>(r,l,o)=>{const c=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ac(n)(r,l,c)},xg=n=>(r,l,o)=>Ac(n)(r,l,o),wg=n=>async(r,l,o)=>{const c=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Ec(n)(r,l,c)},Rg=n=>async(r,l,o)=>Ec(n)(r,l,o),Lg=n=>(r,l,o)=>{const c=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return Do(n)(r,l,c)},zg=n=>(r,l,o)=>Do(n)(r,l,o),Bg=n=>async(r,l,o)=>{const c=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return xo(n)(r,l,c)},kg=n=>async(r,l,o)=>xo(n)(r,l,o),Ug=/^[cC][^\s-]{8,}$/,jg=/^[0-9a-z]+$/,Hg=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ig=/^[0-9a-vA-V]{20}$/,$g=/^[A-Za-z0-9]{27}$/,Zg=/^[a-zA-Z0-9_-]{21}$/,Gg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Fg=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,M_=n=>n?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${n}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Yg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Vg(){return new RegExp(qg,"u")}const Pg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Kg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Qg=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Xg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$h=/^[A-Za-z0-9_-]*$/,Jg=/^\+[1-9]\d{6,14}$/,Zh="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ev=new RegExp(`^${Zh}$`);function Gh(n){const r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof n.precision=="number"?n.precision===-1?`${r}`:n.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${n.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tv(n){return new RegExp(`^${Gh(n)}$`)}function nv(n){const r=Gh({precision:n.precision}),l=["Z"];n.local&&l.push(""),n.offset&&l.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${r}(?:${l.join("|")})`;return new RegExp(`^${Zh}T(?:${o})$`)}const av=n=>{const r=n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},rv=/^-?\d+$/,iv=/^-?\d+(?:\.\d+)?$/,lv=/^(?:true|false)$/i,ov=/^[^A-Z]*$/,uv=/^[^a-z]*$/,Gt=Y("$ZodCheck",(n,r)=>{var l;n._zod??(n._zod={}),n._zod.def=r,(l=n._zod).onattach??(l.onattach=[])}),Fh={number:"number",bigint:"bigint",object:"date"},Yh=Y("$ZodCheckLessThan",(n,r)=>{Gt.init(n,r);const l=Fh[typeof r.value];n._zod.onattach.push(o=>{const c=o._zod.bag,f=(r.inclusive?c.maximum:c.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<f&&(r.inclusive?c.maximum=r.value:c.exclusiveMaximum=r.value)}),n._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:l,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:n,continue:!r.abort})}}),qh=Y("$ZodCheckGreaterThan",(n,r)=>{Gt.init(n,r);const l=Fh[typeof r.value];n._zod.onattach.push(o=>{const c=o._zod.bag,f=(r.inclusive?c.minimum:c.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>f&&(r.inclusive?c.minimum=r.value:c.exclusiveMinimum=r.value)}),n._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:l,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:n,continue:!r.abort})}}),sv=Y("$ZodCheckMultipleOf",(n,r)=>{Gt.init(n,r),n._zod.onattach.push(l=>{var o;(o=l._zod.bag).multipleOf??(o.multipleOf=r.value)}),n._zod.check=l=>{if(typeof l.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof l.value=="bigint"?l.value%r.value===BigInt(0):dg(l.value,r.value)===0)||l.issues.push({origin:typeof l.value,code:"not_multiple_of",divisor:r.value,input:l.value,inst:n,continue:!r.abort})}}),cv=Y("$ZodCheckNumberFormat",(n,r)=>{Gt.init(n,r),r.format=r.format||"float64";const l=r.format?.includes("int"),o=l?"int":"number",[c,f]=yg[r.format];n._zod.onattach.push(m=>{const _=m._zod.bag;_.format=r.format,_.minimum=c,_.maximum=f,l&&(_.pattern=rv)}),n._zod.check=m=>{const _=m.value;if(l){if(!Number.isInteger(_)){m.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:_,inst:n});return}if(!Number.isSafeInteger(_)){_>0?m.issues.push({input:_,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:o,inclusive:!0,continue:!r.abort}):m.issues.push({input:_,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:n,origin:o,inclusive:!0,continue:!r.abort});return}}_<c&&m.issues.push({origin:"number",input:_,code:"too_small",minimum:c,inclusive:!0,inst:n,continue:!r.abort}),_>f&&m.issues.push({origin:"number",input:_,code:"too_big",maximum:f,inclusive:!0,inst:n,continue:!r.abort})}}),fv=Y("$ZodCheckMaxLength",(n,r)=>{var l;Gt.init(n,r),(l=n._zod.def).when??(l.when=o=>{const c=o.value;return!vc(c)&&c.length!==void 0}),n._zod.onattach.push(o=>{const c=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<c&&(o._zod.bag.maximum=r.maximum)}),n._zod.check=o=>{const c=o.value;if(c.length<=r.maximum)return;const m=Sc(c);o.issues.push({origin:m,code:"too_big",maximum:r.maximum,inclusive:!0,input:c,inst:n,continue:!r.abort})}}),dv=Y("$ZodCheckMinLength",(n,r)=>{var l;Gt.init(n,r),(l=n._zod.def).when??(l.when=o=>{const c=o.value;return!vc(c)&&c.length!==void 0}),n._zod.onattach.push(o=>{const c=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>c&&(o._zod.bag.minimum=r.minimum)}),n._zod.check=o=>{const c=o.value;if(c.length>=r.minimum)return;const m=Sc(c);o.issues.push({origin:m,code:"too_small",minimum:r.minimum,inclusive:!0,input:c,inst:n,continue:!r.abort})}}),mv=Y("$ZodCheckLengthEquals",(n,r)=>{var l;Gt.init(n,r),(l=n._zod.def).when??(l.when=o=>{const c=o.value;return!vc(c)&&c.length!==void 0}),n._zod.onattach.push(o=>{const c=o._zod.bag;c.minimum=r.length,c.maximum=r.length,c.length=r.length}),n._zod.check=o=>{const c=o.value,f=c.length;if(f===r.length)return;const m=Sc(c),_=f>r.length;o.issues.push({origin:m,..._?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:n,continue:!r.abort})}}),wo=Y("$ZodCheckStringFormat",(n,r)=>{var l,o;Gt.init(n,r),n._zod.onattach.push(c=>{const f=c._zod.bag;f.format=r.format,r.pattern&&(f.patterns??(f.patterns=new Set),f.patterns.add(r.pattern))}),r.pattern?(l=n._zod).check??(l.check=c=>{r.pattern.lastIndex=0,!r.pattern.test(c.value)&&c.issues.push({origin:"string",code:"invalid_format",format:r.format,input:c.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:n,continue:!r.abort})}):(o=n._zod).check??(o.check=()=>{})}),_v=Y("$ZodCheckRegex",(n,r)=>{wo.init(n,r),n._zod.check=l=>{r.pattern.lastIndex=0,!r.pattern.test(l.value)&&l.issues.push({origin:"string",code:"invalid_format",format:"regex",input:l.value,pattern:r.pattern.toString(),inst:n,continue:!r.abort})}}),hv=Y("$ZodCheckLowerCase",(n,r)=>{r.pattern??(r.pattern=ov),wo.init(n,r)}),pv=Y("$ZodCheckUpperCase",(n,r)=>{r.pattern??(r.pattern=uv),wo.init(n,r)}),yv=Y("$ZodCheckIncludes",(n,r)=>{Gt.init(n,r);const l=kr(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${l}`:l);r.pattern=o,n._zod.onattach.push(c=>{const f=c._zod.bag;f.patterns??(f.patterns=new Set),f.patterns.add(o)}),n._zod.check=c=>{c.value.includes(r.includes,r.position)||c.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:c.value,inst:n,continue:!r.abort})}}),gv=Y("$ZodCheckStartsWith",(n,r)=>{Gt.init(n,r);const l=new RegExp(`^${kr(r.prefix)}.*`);r.pattern??(r.pattern=l),n._zod.onattach.push(o=>{const c=o._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(l)}),n._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:n,continue:!r.abort})}}),vv=Y("$ZodCheckEndsWith",(n,r)=>{Gt.init(n,r);const l=new RegExp(`.*${kr(r.suffix)}$`);r.pattern??(r.pattern=l),n._zod.onattach.push(o=>{const c=o._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(l)}),n._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:n,continue:!r.abort})}}),bv=Y("$ZodCheckOverwrite",(n,r)=>{Gt.init(n,r),n._zod.check=l=>{l.value=r.tx(l.value)}});class Sv{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}const o=r.split(`
50
- `).filter(m=>m),c=Math.min(...o.map(m=>m.length-m.trimStart().length)),f=o.map(m=>m.slice(c)).map(m=>" ".repeat(this.indent*2)+m);for(const m of f)this.content.push(m)}compile(){const r=Function,l=this?.args,c=[...(this?.content??[""]).map(f=>` ${f}`)];return new r(...l,c.join(`
51
- `))}}const Av={major:4,minor:3,patch:6},lt=Y("$ZodType",(n,r)=>{var l;n??(n={}),n._zod.def=r,n._zod.bag=n._zod.bag||{},n._zod.version=Av;const o=[...n._zod.def.checks??[]];n._zod.traits.has("$ZodCheck")&&o.unshift(n);for(const c of o)for(const f of c._zod.onattach)f(n);if(o.length===0)(l=n._zod).deferred??(l.deferred=[]),n._zod.deferred?.push(()=>{n._zod.run=n._zod.parse});else{const c=(m,_,g)=>{let p=Lr(m),b;for(const R of _){if(R._zod.def.when){if(!R._zod.def.when(m))continue}else if(p)continue;const j=m.issues.length,B=R._zod.check(m);if(B instanceof Promise&&g?.async===!1)throw new zr;if(b||B instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await B,m.issues.length!==j&&(p||(p=Lr(m,j)))});else{if(m.issues.length===j)continue;p||(p=Lr(m,j))}}return b?b.then(()=>m):m},f=(m,_,g)=>{if(Lr(m))return m.aborted=!0,m;const p=c(_,o,g);if(p instanceof Promise){if(g.async===!1)throw new zr;return p.then(b=>n._zod.parse(b,g))}return n._zod.parse(p,g)};n._zod.run=(m,_)=>{if(_.skipChecks)return n._zod.parse(m,_);if(_.direction==="backward"){const p=n._zod.parse({value:m.value,issues:[]},{..._,skipChecks:!0});return p instanceof Promise?p.then(b=>f(b,m,_)):f(p,m,_)}const g=n._zod.parse(m,_);if(g instanceof Promise){if(_.async===!1)throw new zr;return g.then(p=>c(p,o,_))}return c(g,o,_)}}Fe(n,"~standard",()=>({validate:c=>{try{const f=Ng(n,c);return f.success?{value:f.data}:{issues:f.error?.issues}}catch{return Mg(n,c).then(m=>m.success?{value:m.data}:{issues:m.error?.issues})}},vendor:"zod",version:1}))}),Tc=Y("$ZodString",(n,r)=>{lt.init(n,r),n._zod.pattern=[...n?._zod.bag?.patterns??[]].pop()??av(n._zod.bag),n._zod.parse=(l,o)=>{if(r.coerce)try{l.value=String(l.value)}catch{}return typeof l.value=="string"||l.issues.push({expected:"string",code:"invalid_type",input:l.value,inst:n}),l}}),tt=Y("$ZodStringFormat",(n,r)=>{wo.init(n,r),Tc.init(n,r)}),Ev=Y("$ZodGUID",(n,r)=>{r.pattern??(r.pattern=Fg),tt.init(n,r)}),Tv=Y("$ZodUUID",(n,r)=>{if(r.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=M_(o))}else r.pattern??(r.pattern=M_());tt.init(n,r)}),Cv=Y("$ZodEmail",(n,r)=>{r.pattern??(r.pattern=Yg),tt.init(n,r)}),Ov=Y("$ZodURL",(n,r)=>{tt.init(n,r),n._zod.check=l=>{try{const o=l.value.trim(),c=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(c.hostname)||l.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:l.value,inst:n,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(c.protocol.endsWith(":")?c.protocol.slice(0,-1):c.protocol)||l.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:l.value,inst:n,continue:!r.abort})),r.normalize?l.value=c.href:l.value=o;return}catch{l.issues.push({code:"invalid_format",format:"url",input:l.value,inst:n,continue:!r.abort})}}}),Nv=Y("$ZodEmoji",(n,r)=>{r.pattern??(r.pattern=Vg()),tt.init(n,r)}),Mv=Y("$ZodNanoID",(n,r)=>{r.pattern??(r.pattern=Zg),tt.init(n,r)}),Dv=Y("$ZodCUID",(n,r)=>{r.pattern??(r.pattern=Ug),tt.init(n,r)}),xv=Y("$ZodCUID2",(n,r)=>{r.pattern??(r.pattern=jg),tt.init(n,r)}),wv=Y("$ZodULID",(n,r)=>{r.pattern??(r.pattern=Hg),tt.init(n,r)}),Rv=Y("$ZodXID",(n,r)=>{r.pattern??(r.pattern=Ig),tt.init(n,r)}),Lv=Y("$ZodKSUID",(n,r)=>{r.pattern??(r.pattern=$g),tt.init(n,r)}),zv=Y("$ZodISODateTime",(n,r)=>{r.pattern??(r.pattern=nv(r)),tt.init(n,r)}),Bv=Y("$ZodISODate",(n,r)=>{r.pattern??(r.pattern=ev),tt.init(n,r)}),kv=Y("$ZodISOTime",(n,r)=>{r.pattern??(r.pattern=tv(r)),tt.init(n,r)}),Uv=Y("$ZodISODuration",(n,r)=>{r.pattern??(r.pattern=Gg),tt.init(n,r)}),jv=Y("$ZodIPv4",(n,r)=>{r.pattern??(r.pattern=Pg),tt.init(n,r),n._zod.bag.format="ipv4"}),Hv=Y("$ZodIPv6",(n,r)=>{r.pattern??(r.pattern=Kg),tt.init(n,r),n._zod.bag.format="ipv6",n._zod.check=l=>{try{new URL(`http://[${l.value}]`)}catch{l.issues.push({code:"invalid_format",format:"ipv6",input:l.value,inst:n,continue:!r.abort})}}}),Iv=Y("$ZodCIDRv4",(n,r)=>{r.pattern??(r.pattern=Qg),tt.init(n,r)}),$v=Y("$ZodCIDRv6",(n,r)=>{r.pattern??(r.pattern=Xg),tt.init(n,r),n._zod.check=l=>{const o=l.value.split("/");try{if(o.length!==2)throw new Error;const[c,f]=o;if(!f)throw new Error;const m=Number(f);if(`${m}`!==f)throw new Error;if(m<0||m>128)throw new Error;new URL(`http://[${c}]`)}catch{l.issues.push({code:"invalid_format",format:"cidrv6",input:l.value,inst:n,continue:!r.abort})}}});function Vh(n){if(n==="")return!0;if(n.length%4!==0)return!1;try{return atob(n),!0}catch{return!1}}const Zv=Y("$ZodBase64",(n,r)=>{r.pattern??(r.pattern=Wg),tt.init(n,r),n._zod.bag.contentEncoding="base64",n._zod.check=l=>{Vh(l.value)||l.issues.push({code:"invalid_format",format:"base64",input:l.value,inst:n,continue:!r.abort})}});function Gv(n){if(!$h.test(n))return!1;const r=n.replace(/[-_]/g,o=>o==="-"?"+":"/"),l=r.padEnd(Math.ceil(r.length/4)*4,"=");return Vh(l)}const Fv=Y("$ZodBase64URL",(n,r)=>{r.pattern??(r.pattern=$h),tt.init(n,r),n._zod.bag.contentEncoding="base64url",n._zod.check=l=>{Gv(l.value)||l.issues.push({code:"invalid_format",format:"base64url",input:l.value,inst:n,continue:!r.abort})}}),Yv=Y("$ZodE164",(n,r)=>{r.pattern??(r.pattern=Jg),tt.init(n,r)});function qv(n,r=null){try{const l=n.split(".");if(l.length!==3)return!1;const[o]=l;if(!o)return!1;const c=JSON.parse(atob(o));return!("typ"in c&&c?.typ!=="JWT"||!c.alg||r&&(!("alg"in c)||c.alg!==r))}catch{return!1}}const Vv=Y("$ZodJWT",(n,r)=>{tt.init(n,r),n._zod.check=l=>{qv(l.value,r.alg)||l.issues.push({code:"invalid_format",format:"jwt",input:l.value,inst:n,continue:!r.abort})}}),Ph=Y("$ZodNumber",(n,r)=>{lt.init(n,r),n._zod.pattern=n._zod.bag.pattern??iv,n._zod.parse=(l,o)=>{if(r.coerce)try{l.value=Number(l.value)}catch{}const c=l.value;if(typeof c=="number"&&!Number.isNaN(c)&&Number.isFinite(c))return l;const f=typeof c=="number"?Number.isNaN(c)?"NaN":Number.isFinite(c)?void 0:"Infinity":void 0;return l.issues.push({expected:"number",code:"invalid_type",input:c,inst:n,...f?{received:f}:{}}),l}}),Pv=Y("$ZodNumberFormat",(n,r)=>{cv.init(n,r),Ph.init(n,r)}),Kv=Y("$ZodBoolean",(n,r)=>{lt.init(n,r),n._zod.pattern=lv,n._zod.parse=(l,o)=>{if(r.coerce)try{l.value=!!l.value}catch{}const c=l.value;return typeof c=="boolean"||l.issues.push({expected:"boolean",code:"invalid_type",input:c,inst:n}),l}}),Qv=Y("$ZodUnknown",(n,r)=>{lt.init(n,r),n._zod.parse=l=>l}),Xv=Y("$ZodNever",(n,r)=>{lt.init(n,r),n._zod.parse=(l,o)=>(l.issues.push({expected:"never",code:"invalid_type",input:l.value,inst:n}),l)});function D_(n,r,l){n.issues.length&&r.issues.push(...Uh(l,n.issues)),r.value[l]=n.value}const Wv=Y("$ZodArray",(n,r)=>{lt.init(n,r),n._zod.parse=(l,o)=>{const c=l.value;if(!Array.isArray(c))return l.issues.push({expected:"array",code:"invalid_type",input:c,inst:n}),l;l.value=Array(c.length);const f=[];for(let m=0;m<c.length;m++){const _=c[m],g=r.element._zod.run({value:_,issues:[]},o);g instanceof Promise?f.push(g.then(p=>D_(p,l,m))):D_(g,l,m)}return f.length?Promise.all(f).then(()=>l):l}});function Ao(n,r,l,o,c){if(n.issues.length){if(c&&!(l in o))return;r.issues.push(...Uh(l,n.issues))}n.value===void 0?l in o&&(r.value[l]=void 0):r.value[l]=n.value}function Kh(n){const r=Object.keys(n.shape);for(const o of r)if(!n.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const l=pg(n.shape);return{...n,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(l)}}function Qh(n,r,l,o,c,f){const m=[],_=c.keySet,g=c.catchall._zod,p=g.def.type,b=g.optout==="optional";for(const R in r){if(_.has(R))continue;if(p==="never"){m.push(R);continue}const j=g.run({value:r[R],issues:[]},o);j instanceof Promise?n.push(j.then(B=>Ao(B,l,R,r,b))):Ao(j,l,R,r,b)}return m.length&&l.issues.push({code:"unrecognized_keys",keys:m,input:r,inst:f}),n.length?Promise.all(n).then(()=>l):l}const Jv=Y("$ZodObject",(n,r)=>{if(lt.init(n,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){const _=r.shape;Object.defineProperty(r,"shape",{get:()=>{const g={..._};return Object.defineProperty(r,"shape",{value:g}),g}})}const o=gc(()=>Kh(r));Fe(n._zod,"propValues",()=>{const _=r.shape,g={};for(const p in _){const b=_[p]._zod;if(b.values){g[p]??(g[p]=new Set);for(const R of b.values)g[p].add(R)}}return g});const c=So,f=r.catchall;let m;n._zod.parse=(_,g)=>{m??(m=o.value);const p=_.value;if(!c(p))return _.issues.push({expected:"object",code:"invalid_type",input:p,inst:n}),_;_.value={};const b=[],R=m.shape;for(const j of m.keys){const B=R[j],G=B._zod.optout==="optional",k=B._zod.run({value:p[j],issues:[]},g);k instanceof Promise?b.push(k.then(fe=>Ao(fe,_,j,p,G))):Ao(k,_,j,p,G)}return f?Qh(b,p,_,g,o.value,n):b.length?Promise.all(b).then(()=>_):_}}),eb=Y("$ZodObjectJIT",(n,r)=>{Jv.init(n,r);const l=n._zod.parse,o=gc(()=>Kh(r)),c=j=>{const B=new Sv(["shape","payload","ctx"]),G=o.value,k=te=>{const ie=N_(te);return`shape[${ie}]._zod.run({ value: input[${ie}], issues: [] }, ctx)`};B.write("const input = payload.value;");const fe=Object.create(null);let le=0;for(const te of G.keys)fe[te]=`key_${le++}`;B.write("const newResult = {};");for(const te of G.keys){const ie=fe[te],W=N_(te),me=j[te]?._zod?.optout==="optional";B.write(`const ${ie} = ${k(te)};`),me?B.write(`
52
- if (${ie}.issues.length) {
53
- if (${W} in input) {
54
- payload.issues = payload.issues.concat(${ie}.issues.map(iss => ({
55
- ...iss,
56
- path: iss.path ? [${W}, ...iss.path] : [${W}]
57
- })));
58
- }
59
- }
60
-
61
- if (${ie}.value === undefined) {
62
- if (${W} in input) {
63
- newResult[${W}] = undefined;
64
- }
65
- } else {
66
- newResult[${W}] = ${ie}.value;
67
- }
68
-
69
- `):B.write(`
70
- if (${ie}.issues.length) {
71
- payload.issues = payload.issues.concat(${ie}.issues.map(iss => ({
72
- ...iss,
73
- path: iss.path ? [${W}, ...iss.path] : [${W}]
74
- })));
75
- }
76
-
77
- if (${ie}.value === undefined) {
78
- if (${W} in input) {
79
- newResult[${W}] = undefined;
80
- }
81
- } else {
82
- newResult[${W}] = ${ie}.value;
83
- }
84
-
85
- `)}B.write("payload.value = newResult;"),B.write("return payload;");const de=B.compile();return(te,ie)=>de(j,te,ie)};let f;const m=So,_=!Lh.jitless,p=_&&_g.value,b=r.catchall;let R;n._zod.parse=(j,B)=>{R??(R=o.value);const G=j.value;return m(G)?_&&p&&B?.async===!1&&B.jitless!==!0?(f||(f=c(r.shape)),j=f(j,B),b?Qh([],G,j,B,R,n):j):l(j,B):(j.issues.push({expected:"object",code:"invalid_type",input:G,inst:n}),j)}});function x_(n,r,l,o){for(const f of n)if(f.issues.length===0)return r.value=f.value,r;const c=n.filter(f=>!Lr(f));return c.length===1?(r.value=c[0].value,c[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:l,errors:n.map(f=>f.issues.map(m=>Ia(m,o,Ha())))}),r)}const tb=Y("$ZodUnion",(n,r)=>{lt.init(n,r),Fe(n._zod,"optin",()=>r.options.some(c=>c._zod.optin==="optional")?"optional":void 0),Fe(n._zod,"optout",()=>r.options.some(c=>c._zod.optout==="optional")?"optional":void 0),Fe(n._zod,"values",()=>{if(r.options.every(c=>c._zod.values))return new Set(r.options.flatMap(c=>Array.from(c._zod.values)))}),Fe(n._zod,"pattern",()=>{if(r.options.every(c=>c._zod.pattern)){const c=r.options.map(f=>f._zod.pattern);return new RegExp(`^(${c.map(f=>bc(f.source)).join("|")})$`)}});const l=r.options.length===1,o=r.options[0]._zod.run;n._zod.parse=(c,f)=>{if(l)return o(c,f);let m=!1;const _=[];for(const g of r.options){const p=g._zod.run({value:c.value,issues:[]},f);if(p instanceof Promise)_.push(p),m=!0;else{if(p.issues.length===0)return p;_.push(p)}}return m?Promise.all(_).then(g=>x_(g,c,n,f)):x_(_,c,n,f)}}),nb=Y("$ZodIntersection",(n,r)=>{lt.init(n,r),n._zod.parse=(l,o)=>{const c=l.value,f=r.left._zod.run({value:c,issues:[]},o),m=r.right._zod.run({value:c,issues:[]},o);return f instanceof Promise||m instanceof Promise?Promise.all([f,m]).then(([g,p])=>w_(l,g,p)):w_(l,f,m)}});function ic(n,r){if(n===r)return{valid:!0,data:n};if(n instanceof Date&&r instanceof Date&&+n==+r)return{valid:!0,data:n};if(Fi(n)&&Fi(r)){const l=Object.keys(r),o=Object.keys(n).filter(f=>l.indexOf(f)!==-1),c={...n,...r};for(const f of o){const m=ic(n[f],r[f]);if(!m.valid)return{valid:!1,mergeErrorPath:[f,...m.mergeErrorPath]};c[f]=m.data}return{valid:!0,data:c}}if(Array.isArray(n)&&Array.isArray(r)){if(n.length!==r.length)return{valid:!1,mergeErrorPath:[]};const l=[];for(let o=0;o<n.length;o++){const c=n[o],f=r[o],m=ic(c,f);if(!m.valid)return{valid:!1,mergeErrorPath:[o,...m.mergeErrorPath]};l.push(m.data)}return{valid:!0,data:l}}return{valid:!1,mergeErrorPath:[]}}function w_(n,r,l){const o=new Map;let c;for(const _ of r.issues)if(_.code==="unrecognized_keys"){c??(c=_);for(const g of _.keys)o.has(g)||o.set(g,{}),o.get(g).l=!0}else n.issues.push(_);for(const _ of l.issues)if(_.code==="unrecognized_keys")for(const g of _.keys)o.has(g)||o.set(g,{}),o.get(g).r=!0;else n.issues.push(_);const f=[...o].filter(([,_])=>_.l&&_.r).map(([_])=>_);if(f.length&&c&&n.issues.push({...c,keys:f}),Lr(n))return n;const m=ic(r.value,l.value);if(!m.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`);return n.value=m.data,n}const ab=Y("$ZodEnum",(n,r)=>{lt.init(n,r);const l=zh(r.entries),o=new Set(l);n._zod.values=o,n._zod.pattern=new RegExp(`^(${l.filter(c=>hg.has(typeof c)).map(c=>typeof c=="string"?kr(c):c.toString()).join("|")})$`),n._zod.parse=(c,f)=>{const m=c.value;return o.has(m)||c.issues.push({code:"invalid_value",values:l,input:m,inst:n}),c}}),rb=Y("$ZodLiteral",(n,r)=>{if(lt.init(n,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");const l=new Set(r.values);n._zod.values=l,n._zod.pattern=new RegExp(`^(${r.values.map(o=>typeof o=="string"?kr(o):o?kr(o.toString()):String(o)).join("|")})$`),n._zod.parse=(o,c)=>{const f=o.value;return l.has(f)||o.issues.push({code:"invalid_value",values:r.values,input:f,inst:n}),o}}),ib=Y("$ZodTransform",(n,r)=>{lt.init(n,r),n._zod.parse=(l,o)=>{if(o.direction==="backward")throw new Rh(n.constructor.name);const c=r.transform(l.value,l);if(o.async)return(c instanceof Promise?c:Promise.resolve(c)).then(m=>(l.value=m,l));if(c instanceof Promise)throw new zr;return l.value=c,l}});function R_(n,r){return n.issues.length&&r===void 0?{issues:[],value:void 0}:n}const Xh=Y("$ZodOptional",(n,r)=>{lt.init(n,r),n._zod.optin="optional",n._zod.optout="optional",Fe(n._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),Fe(n._zod,"pattern",()=>{const l=r.innerType._zod.pattern;return l?new RegExp(`^(${bc(l.source)})?$`):void 0}),n._zod.parse=(l,o)=>{if(r.innerType._zod.optin==="optional"){const c=r.innerType._zod.run(l,o);return c instanceof Promise?c.then(f=>R_(f,l.value)):R_(c,l.value)}return l.value===void 0?l:r.innerType._zod.run(l,o)}}),lb=Y("$ZodExactOptional",(n,r)=>{Xh.init(n,r),Fe(n._zod,"values",()=>r.innerType._zod.values),Fe(n._zod,"pattern",()=>r.innerType._zod.pattern),n._zod.parse=(l,o)=>r.innerType._zod.run(l,o)}),ob=Y("$ZodNullable",(n,r)=>{lt.init(n,r),Fe(n._zod,"optin",()=>r.innerType._zod.optin),Fe(n._zod,"optout",()=>r.innerType._zod.optout),Fe(n._zod,"pattern",()=>{const l=r.innerType._zod.pattern;return l?new RegExp(`^(${bc(l.source)}|null)$`):void 0}),Fe(n._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),n._zod.parse=(l,o)=>l.value===null?l:r.innerType._zod.run(l,o)}),ub=Y("$ZodDefault",(n,r)=>{lt.init(n,r),n._zod.optin="optional",Fe(n._zod,"values",()=>r.innerType._zod.values),n._zod.parse=(l,o)=>{if(o.direction==="backward")return r.innerType._zod.run(l,o);if(l.value===void 0)return l.value=r.defaultValue,l;const c=r.innerType._zod.run(l,o);return c instanceof Promise?c.then(f=>L_(f,r)):L_(c,r)}});function L_(n,r){return n.value===void 0&&(n.value=r.defaultValue),n}const sb=Y("$ZodPrefault",(n,r)=>{lt.init(n,r),n._zod.optin="optional",Fe(n._zod,"values",()=>r.innerType._zod.values),n._zod.parse=(l,o)=>(o.direction==="backward"||l.value===void 0&&(l.value=r.defaultValue),r.innerType._zod.run(l,o))}),cb=Y("$ZodNonOptional",(n,r)=>{lt.init(n,r),Fe(n._zod,"values",()=>{const l=r.innerType._zod.values;return l?new Set([...l].filter(o=>o!==void 0)):void 0}),n._zod.parse=(l,o)=>{const c=r.innerType._zod.run(l,o);return c instanceof Promise?c.then(f=>z_(f,n)):z_(c,n)}});function z_(n,r){return!n.issues.length&&n.value===void 0&&n.issues.push({code:"invalid_type",expected:"nonoptional",input:n.value,inst:r}),n}const fb=Y("$ZodCatch",(n,r)=>{lt.init(n,r),Fe(n._zod,"optin",()=>r.innerType._zod.optin),Fe(n._zod,"optout",()=>r.innerType._zod.optout),Fe(n._zod,"values",()=>r.innerType._zod.values),n._zod.parse=(l,o)=>{if(o.direction==="backward")return r.innerType._zod.run(l,o);const c=r.innerType._zod.run(l,o);return c instanceof Promise?c.then(f=>(l.value=f.value,f.issues.length&&(l.value=r.catchValue({...l,error:{issues:f.issues.map(m=>Ia(m,o,Ha()))},input:l.value}),l.issues=[]),l)):(l.value=c.value,c.issues.length&&(l.value=r.catchValue({...l,error:{issues:c.issues.map(f=>Ia(f,o,Ha()))},input:l.value}),l.issues=[]),l)}}),db=Y("$ZodPipe",(n,r)=>{lt.init(n,r),Fe(n._zod,"values",()=>r.in._zod.values),Fe(n._zod,"optin",()=>r.in._zod.optin),Fe(n._zod,"optout",()=>r.out._zod.optout),Fe(n._zod,"propValues",()=>r.in._zod.propValues),n._zod.parse=(l,o)=>{if(o.direction==="backward"){const f=r.out._zod.run(l,o);return f instanceof Promise?f.then(m=>uo(m,r.in,o)):uo(f,r.in,o)}const c=r.in._zod.run(l,o);return c instanceof Promise?c.then(f=>uo(f,r.out,o)):uo(c,r.out,o)}});function uo(n,r,l){return n.issues.length?(n.aborted=!0,n):r._zod.run({value:n.value,issues:n.issues},l)}const mb=Y("$ZodReadonly",(n,r)=>{lt.init(n,r),Fe(n._zod,"propValues",()=>r.innerType._zod.propValues),Fe(n._zod,"values",()=>r.innerType._zod.values),Fe(n._zod,"optin",()=>r.innerType?._zod?.optin),Fe(n._zod,"optout",()=>r.innerType?._zod?.optout),n._zod.parse=(l,o)=>{if(o.direction==="backward")return r.innerType._zod.run(l,o);const c=r.innerType._zod.run(l,o);return c instanceof Promise?c.then(B_):B_(c)}});function B_(n){return n.value=Object.freeze(n.value),n}const _b=Y("$ZodCustom",(n,r)=>{Gt.init(n,r),lt.init(n,r),n._zod.parse=(l,o)=>l,n._zod.check=l=>{const o=l.value,c=r.fn(o);if(c instanceof Promise)return c.then(f=>k_(f,l,o,n));k_(c,l,o,n)}});function k_(n,r,l,o){if(!n){const c={code:"custom",input:l,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(c.params=o._zod.def.params),r.issues.push(Yi(c))}}var U_;class hb{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...l){const o=l[0];return this._map.set(r,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){const l=this._map.get(r);return l&&typeof l=="object"&&"id"in l&&this._idmap.delete(l.id),this._map.delete(r),this}get(r){const l=r._zod.parent;if(l){const o={...this.get(l)??{}};delete o.id;const c={...o,...this._map.get(r)};return Object.keys(c).length?c:void 0}return this._map.get(r)}has(r){return this._map.has(r)}}function pb(){return new hb}(U_=globalThis).__zod_globalRegistry??(U_.__zod_globalRegistry=pb());const Ii=globalThis.__zod_globalRegistry;function yb(n,r){return new n({type:"string",..._e(r)})}function gb(n,r){return new n({type:"string",format:"email",check:"string_format",abort:!1,..._e(r)})}function j_(n,r){return new n({type:"string",format:"guid",check:"string_format",abort:!1,..._e(r)})}function vb(n,r){return new n({type:"string",format:"uuid",check:"string_format",abort:!1,..._e(r)})}function bb(n,r){return new n({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._e(r)})}function Sb(n,r){return new n({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._e(r)})}function Ab(n,r){return new n({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._e(r)})}function Eb(n,r){return new n({type:"string",format:"url",check:"string_format",abort:!1,..._e(r)})}function Tb(n,r){return new n({type:"string",format:"emoji",check:"string_format",abort:!1,..._e(r)})}function Cb(n,r){return new n({type:"string",format:"nanoid",check:"string_format",abort:!1,..._e(r)})}function Ob(n,r){return new n({type:"string",format:"cuid",check:"string_format",abort:!1,..._e(r)})}function Nb(n,r){return new n({type:"string",format:"cuid2",check:"string_format",abort:!1,..._e(r)})}function Mb(n,r){return new n({type:"string",format:"ulid",check:"string_format",abort:!1,..._e(r)})}function Db(n,r){return new n({type:"string",format:"xid",check:"string_format",abort:!1,..._e(r)})}function xb(n,r){return new n({type:"string",format:"ksuid",check:"string_format",abort:!1,..._e(r)})}function wb(n,r){return new n({type:"string",format:"ipv4",check:"string_format",abort:!1,..._e(r)})}function Rb(n,r){return new n({type:"string",format:"ipv6",check:"string_format",abort:!1,..._e(r)})}function Lb(n,r){return new n({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._e(r)})}function zb(n,r){return new n({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._e(r)})}function Bb(n,r){return new n({type:"string",format:"base64",check:"string_format",abort:!1,..._e(r)})}function kb(n,r){return new n({type:"string",format:"base64url",check:"string_format",abort:!1,..._e(r)})}function Ub(n,r){return new n({type:"string",format:"e164",check:"string_format",abort:!1,..._e(r)})}function jb(n,r){return new n({type:"string",format:"jwt",check:"string_format",abort:!1,..._e(r)})}function Hb(n,r){return new n({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._e(r)})}function Ib(n,r){return new n({type:"string",format:"date",check:"string_format",..._e(r)})}function $b(n,r){return new n({type:"string",format:"time",check:"string_format",precision:null,..._e(r)})}function Zb(n,r){return new n({type:"string",format:"duration",check:"string_format",..._e(r)})}function Gb(n,r){return new n({type:"number",coerce:!0,checks:[],..._e(r)})}function Fb(n,r){return new n({type:"number",check:"number_format",abort:!1,format:"safeint",..._e(r)})}function Yb(n,r){return new n({type:"boolean",..._e(r)})}function qb(n){return new n({type:"unknown"})}function Vb(n,r){return new n({type:"never",..._e(r)})}function H_(n,r){return new Yh({check:"less_than",..._e(r),value:n,inclusive:!1})}function Qs(n,r){return new Yh({check:"less_than",..._e(r),value:n,inclusive:!0})}function I_(n,r){return new qh({check:"greater_than",..._e(r),value:n,inclusive:!1})}function Xs(n,r){return new qh({check:"greater_than",..._e(r),value:n,inclusive:!0})}function $_(n,r){return new sv({check:"multiple_of",..._e(r),value:n})}function Wh(n,r){return new fv({check:"max_length",..._e(r),maximum:n})}function Eo(n,r){return new dv({check:"min_length",..._e(r),minimum:n})}function Jh(n,r){return new mv({check:"length_equals",..._e(r),length:n})}function Pb(n,r){return new _v({check:"string_format",format:"regex",..._e(r),pattern:n})}function Kb(n){return new hv({check:"string_format",format:"lowercase",..._e(n)})}function Qb(n){return new pv({check:"string_format",format:"uppercase",..._e(n)})}function Xb(n,r){return new yv({check:"string_format",format:"includes",..._e(r),includes:n})}function Wb(n,r){return new gv({check:"string_format",format:"starts_with",..._e(r),prefix:n})}function Jb(n,r){return new vv({check:"string_format",format:"ends_with",..._e(r),suffix:n})}function jr(n){return new bv({check:"overwrite",tx:n})}function eS(n){return jr(r=>r.normalize(n))}function tS(){return jr(n=>n.trim())}function nS(){return jr(n=>n.toLowerCase())}function aS(){return jr(n=>n.toUpperCase())}function rS(){return jr(n=>mg(n))}function iS(n,r,l){return new n({type:"array",element:r,..._e(l)})}function lS(n,r,l){return new n({type:"custom",check:"custom",fn:r,..._e(l)})}function oS(n){const r=uS(l=>(l.addIssue=o=>{if(typeof o=="string")l.issues.push(Yi(o,l.value,r._zod.def));else{const c=o;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=l.value),c.inst??(c.inst=r),c.continue??(c.continue=!r._zod.def.abort),l.issues.push(Yi(c))}},n(l.value,l)));return r}function uS(n,r){const l=new Gt({check:"custom",..._e(r)});return l._zod.check=n,l}function e0(n){let r=n?.target??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:n.processors??{},metadataRegistry:n?.metadata??Ii,target:r,unrepresentable:n?.unrepresentable??"throw",override:n?.override??(()=>{}),io:n?.io??"output",counter:0,seen:new Map,cycles:n?.cycles??"ref",reused:n?.reused??"inline",external:n?.external??void 0}}function Mt(n,r,l={path:[],schemaPath:[]}){var o;const c=n._zod.def,f=r.seen.get(n);if(f)return f.count++,l.schemaPath.includes(n)&&(f.cycle=l.path),f.schema;const m={schema:{},count:1,cycle:void 0,path:l.path};r.seen.set(n,m);const _=n._zod.toJSONSchema?.();if(_)m.schema=_;else{const b={...l,schemaPath:[...l.schemaPath,n],path:l.path};if(n._zod.processJSONSchema)n._zod.processJSONSchema(r,m.schema,b);else{const j=m.schema,B=r.processors[c.type];if(!B)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${c.type}`);B(n,r,j,b)}const R=n._zod.parent;R&&(m.ref||(m.ref=R),Mt(R,r,b),r.seen.get(R).isParent=!0)}const g=r.metadataRegistry.get(n);return g&&Object.assign(m.schema,g),r.io==="input"&&Bt(n)&&(delete m.schema.examples,delete m.schema.default),r.io==="input"&&m.schema._prefault&&((o=m.schema).default??(o.default=m.schema._prefault)),delete m.schema._prefault,r.seen.get(n).schema}function t0(n,r){const l=n.seen.get(r);if(!l)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const m of n.seen.entries()){const _=n.metadataRegistry.get(m[0])?.id;if(_){const g=o.get(_);if(g&&g!==m[0])throw new Error(`Duplicate schema id "${_}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(_,m[0])}}const c=m=>{const _=n.target==="draft-2020-12"?"$defs":"definitions";if(n.external){const R=n.external.registry.get(m[0])?.id,j=n.external.uri??(G=>G);if(R)return{ref:j(R)};const B=m[1].defId??m[1].schema.id??`schema${n.counter++}`;return m[1].defId=B,{defId:B,ref:`${j("__shared")}#/${_}/${B}`}}if(m[1]===l)return{ref:"#"};const p=`#/${_}/`,b=m[1].schema.id??`__schema${n.counter++}`;return{defId:b,ref:p+b}},f=m=>{if(m[1].schema.$ref)return;const _=m[1],{ref:g,defId:p}=c(m);_.def={..._.schema},p&&(_.defId=p);const b=_.schema;for(const R in b)delete b[R];b.$ref=g};if(n.cycles==="throw")for(const m of n.seen.entries()){const _=m[1];if(_.cycle)throw new Error(`Cycle detected: #/${_.cycle?.join("/")}/<root>
86
-
87
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const m of n.seen.entries()){const _=m[1];if(r===m[0]){f(m);continue}if(n.external){const p=n.external.registry.get(m[0])?.id;if(r!==m[0]&&p){f(m);continue}}if(n.metadataRegistry.get(m[0])?.id){f(m);continue}if(_.cycle){f(m);continue}if(_.count>1&&n.reused==="ref"){f(m);continue}}}function n0(n,r){const l=n.seen.get(r);if(!l)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=m=>{const _=n.seen.get(m);if(_.ref===null)return;const g=_.def??_.schema,p={...g},b=_.ref;if(_.ref=null,b){o(b);const j=n.seen.get(b),B=j.schema;if(B.$ref&&(n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(B)):Object.assign(g,B),Object.assign(g,p),m._zod.parent===b)for(const k in g)k==="$ref"||k==="allOf"||k in p||delete g[k];if(B.$ref&&j.def)for(const k in g)k==="$ref"||k==="allOf"||k in j.def&&JSON.stringify(g[k])===JSON.stringify(j.def[k])&&delete g[k]}const R=m._zod.parent;if(R&&R!==b){o(R);const j=n.seen.get(R);if(j?.schema.$ref&&(g.$ref=j.schema.$ref,j.def))for(const B in g)B==="$ref"||B==="allOf"||B in j.def&&JSON.stringify(g[B])===JSON.stringify(j.def[B])&&delete g[B]}n.override({zodSchema:m,jsonSchema:g,path:_.path??[]})};for(const m of[...n.seen.entries()].reverse())o(m[0]);const c={};if(n.target==="draft-2020-12"?c.$schema="https://json-schema.org/draft/2020-12/schema":n.target==="draft-07"?c.$schema="http://json-schema.org/draft-07/schema#":n.target==="draft-04"?c.$schema="http://json-schema.org/draft-04/schema#":n.target,n.external?.uri){const m=n.external.registry.get(r)?.id;if(!m)throw new Error("Schema is missing an `id` property");c.$id=n.external.uri(m)}Object.assign(c,l.def??l.schema);const f=n.external?.defs??{};for(const m of n.seen.entries()){const _=m[1];_.def&&_.defId&&(f[_.defId]=_.def)}n.external||Object.keys(f).length>0&&(n.target==="draft-2020-12"?c.$defs=f:c.definitions=f);try{const m=JSON.parse(JSON.stringify(c));return Object.defineProperty(m,"~standard",{value:{...r["~standard"],jsonSchema:{input:To(r,"input",n.processors),output:To(r,"output",n.processors)}},enumerable:!1,writable:!1}),m}catch{throw new Error("Error converting schema to JSON.")}}function Bt(n,r){const l=r??{seen:new Set};if(l.seen.has(n))return!1;l.seen.add(n);const o=n._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return Bt(o.element,l);if(o.type==="set")return Bt(o.valueType,l);if(o.type==="lazy")return Bt(o.getter(),l);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return Bt(o.innerType,l);if(o.type==="intersection")return Bt(o.left,l)||Bt(o.right,l);if(o.type==="record"||o.type==="map")return Bt(o.keyType,l)||Bt(o.valueType,l);if(o.type==="pipe")return Bt(o.in,l)||Bt(o.out,l);if(o.type==="object"){for(const c in o.shape)if(Bt(o.shape[c],l))return!0;return!1}if(o.type==="union"){for(const c of o.options)if(Bt(c,l))return!0;return!1}if(o.type==="tuple"){for(const c of o.items)if(Bt(c,l))return!0;return!!(o.rest&&Bt(o.rest,l))}return!1}const sS=(n,r={})=>l=>{const o=e0({...l,processors:r});return Mt(n,o),t0(o,n),n0(o,n)},To=(n,r,l={})=>o=>{const{libraryOptions:c,target:f}=o??{},m=e0({...c??{},target:f,io:r,processors:l});return Mt(n,m),t0(m,n),n0(m,n)},cS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fS=(n,r,l,o)=>{const c=l;c.type="string";const{minimum:f,maximum:m,format:_,patterns:g,contentEncoding:p}=n._zod.bag;if(typeof f=="number"&&(c.minLength=f),typeof m=="number"&&(c.maxLength=m),_&&(c.format=cS[_]??_,c.format===""&&delete c.format,_==="time"&&delete c.format),p&&(c.contentEncoding=p),g&&g.size>0){const b=[...g];b.length===1?c.pattern=b[0].source:b.length>1&&(c.allOf=[...b.map(R=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:R.source}))])}},dS=(n,r,l,o)=>{const c=l,{minimum:f,maximum:m,format:_,multipleOf:g,exclusiveMaximum:p,exclusiveMinimum:b}=n._zod.bag;typeof _=="string"&&_.includes("int")?c.type="integer":c.type="number",typeof b=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(c.minimum=b,c.exclusiveMinimum=!0):c.exclusiveMinimum=b),typeof f=="number"&&(c.minimum=f,typeof b=="number"&&r.target!=="draft-04"&&(b>=f?delete c.minimum:delete c.exclusiveMinimum)),typeof p=="number"&&(r.target==="draft-04"||r.target==="openapi-3.0"?(c.maximum=p,c.exclusiveMaximum=!0):c.exclusiveMaximum=p),typeof m=="number"&&(c.maximum=m,typeof p=="number"&&r.target!=="draft-04"&&(p<=m?delete c.maximum:delete c.exclusiveMaximum)),typeof g=="number"&&(c.multipleOf=g)},mS=(n,r,l,o)=>{l.type="boolean"},_S=(n,r,l,o)=>{l.not={}},hS=(n,r,l,o)=>{},pS=(n,r,l,o)=>{const c=n._zod.def,f=zh(c.entries);f.every(m=>typeof m=="number")&&(l.type="number"),f.every(m=>typeof m=="string")&&(l.type="string"),l.enum=f},yS=(n,r,l,o)=>{const c=n._zod.def,f=[];for(const m of c.values)if(m===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof m=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");f.push(Number(m))}else f.push(m);if(f.length!==0)if(f.length===1){const m=f[0];l.type=m===null?"null":typeof m,r.target==="draft-04"||r.target==="openapi-3.0"?l.enum=[m]:l.const=m}else f.every(m=>typeof m=="number")&&(l.type="number"),f.every(m=>typeof m=="string")&&(l.type="string"),f.every(m=>typeof m=="boolean")&&(l.type="boolean"),f.every(m=>m===null)&&(l.type="null"),l.enum=f},gS=(n,r,l,o)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},vS=(n,r,l,o)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},bS=(n,r,l,o)=>{const c=l,f=n._zod.def,{minimum:m,maximum:_}=n._zod.bag;typeof m=="number"&&(c.minItems=m),typeof _=="number"&&(c.maxItems=_),c.type="array",c.items=Mt(f.element,r,{...o,path:[...o.path,"items"]})},SS=(n,r,l,o)=>{const c=l,f=n._zod.def;c.type="object",c.properties={};const m=f.shape;for(const p in m)c.properties[p]=Mt(m[p],r,{...o,path:[...o.path,"properties",p]});const _=new Set(Object.keys(m)),g=new Set([..._].filter(p=>{const b=f.shape[p]._zod;return r.io==="input"?b.optin===void 0:b.optout===void 0}));g.size>0&&(c.required=Array.from(g)),f.catchall?._zod.def.type==="never"?c.additionalProperties=!1:f.catchall?f.catchall&&(c.additionalProperties=Mt(f.catchall,r,{...o,path:[...o.path,"additionalProperties"]})):r.io==="output"&&(c.additionalProperties=!1)},AS=(n,r,l,o)=>{const c=n._zod.def,f=c.inclusive===!1,m=c.options.map((_,g)=>Mt(_,r,{...o,path:[...o.path,f?"oneOf":"anyOf",g]}));f?l.oneOf=m:l.anyOf=m},ES=(n,r,l,o)=>{const c=n._zod.def,f=Mt(c.left,r,{...o,path:[...o.path,"allOf",0]}),m=Mt(c.right,r,{...o,path:[...o.path,"allOf",1]}),_=p=>"allOf"in p&&Object.keys(p).length===1,g=[..._(f)?f.allOf:[f],..._(m)?m.allOf:[m]];l.allOf=g},TS=(n,r,l,o)=>{const c=n._zod.def,f=Mt(c.innerType,r,o),m=r.seen.get(n);r.target==="openapi-3.0"?(m.ref=c.innerType,l.nullable=!0):l.anyOf=[f,{type:"null"}]},CS=(n,r,l,o)=>{const c=n._zod.def;Mt(c.innerType,r,o);const f=r.seen.get(n);f.ref=c.innerType},OS=(n,r,l,o)=>{const c=n._zod.def;Mt(c.innerType,r,o);const f=r.seen.get(n);f.ref=c.innerType,l.default=JSON.parse(JSON.stringify(c.defaultValue))},NS=(n,r,l,o)=>{const c=n._zod.def;Mt(c.innerType,r,o);const f=r.seen.get(n);f.ref=c.innerType,r.io==="input"&&(l._prefault=JSON.parse(JSON.stringify(c.defaultValue)))},MS=(n,r,l,o)=>{const c=n._zod.def;Mt(c.innerType,r,o);const f=r.seen.get(n);f.ref=c.innerType;let m;try{m=c.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}l.default=m},DS=(n,r,l,o)=>{const c=n._zod.def,f=r.io==="input"?c.in._zod.def.type==="transform"?c.out:c.in:c.out;Mt(f,r,o);const m=r.seen.get(n);m.ref=f},xS=(n,r,l,o)=>{const c=n._zod.def;Mt(c.innerType,r,o);const f=r.seen.get(n);f.ref=c.innerType,l.readOnly=!0},a0=(n,r,l,o)=>{const c=n._zod.def;Mt(c.innerType,r,o);const f=r.seen.get(n);f.ref=c.innerType},wS=Y("ZodISODateTime",(n,r)=>{zv.init(n,r),at.init(n,r)});function RS(n){return Hb(wS,n)}const LS=Y("ZodISODate",(n,r)=>{Bv.init(n,r),at.init(n,r)});function zS(n){return Ib(LS,n)}const BS=Y("ZodISOTime",(n,r)=>{kv.init(n,r),at.init(n,r)});function kS(n){return $b(BS,n)}const US=Y("ZodISODuration",(n,r)=>{Uv.init(n,r),at.init(n,r)});function jS(n){return Zb(US,n)}const HS=(n,r)=>{Hh.init(n,r),n.name="ZodError",Object.defineProperties(n,{format:{value:l=>Og(n,l)},flatten:{value:l=>Cg(n,l)},addIssue:{value:l=>{n.issues.push(l),n.message=JSON.stringify(n.issues,rc,2)}},addIssues:{value:l=>{n.issues.push(...l),n.message=JSON.stringify(n.issues,rc,2)}},isEmpty:{get(){return n.issues.length===0}}})},mn=Y("ZodError",HS,{Parent:Error}),IS=Ac(mn),$S=Ec(mn),ZS=Do(mn),GS=xo(mn),FS=Dg(mn),YS=xg(mn),qS=wg(mn),VS=Rg(mn),PS=Lg(mn),KS=zg(mn),QS=Bg(mn),XS=kg(mn),ot=Y("ZodType",(n,r)=>(lt.init(n,r),Object.assign(n["~standard"],{jsonSchema:{input:To(n,"input"),output:To(n,"output")}}),n.toJSONSchema=sS(n,{}),n.def=r,n.type=r.type,Object.defineProperty(n,"_def",{value:r}),n.check=(...l)=>n.clone(ba(r,{checks:[...r.checks??[],...l.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),n.with=n.check,n.clone=(l,o)=>Sa(n,l,o),n.brand=()=>n,n.register=((l,o)=>(l.add(n,o),n)),n.parse=(l,o)=>IS(n,l,o,{callee:n.parse}),n.safeParse=(l,o)=>ZS(n,l,o),n.parseAsync=async(l,o)=>$S(n,l,o,{callee:n.parseAsync}),n.safeParseAsync=async(l,o)=>GS(n,l,o),n.spa=n.safeParseAsync,n.encode=(l,o)=>FS(n,l,o),n.decode=(l,o)=>YS(n,l,o),n.encodeAsync=async(l,o)=>qS(n,l,o),n.decodeAsync=async(l,o)=>VS(n,l,o),n.safeEncode=(l,o)=>PS(n,l,o),n.safeDecode=(l,o)=>KS(n,l,o),n.safeEncodeAsync=async(l,o)=>QS(n,l,o),n.safeDecodeAsync=async(l,o)=>XS(n,l,o),n.refine=(l,o)=>n.check(VA(l,o)),n.superRefine=l=>n.check(PA(l)),n.overwrite=l=>n.check(jr(l)),n.optional=()=>Y_(n),n.exactOptional=()=>zA(n),n.nullable=()=>q_(n),n.nullish=()=>Y_(q_(n)),n.nonoptional=l=>IA(n,l),n.array=()=>EA(n),n.or=l=>l0([n,l]),n.and=l=>MA(n,l),n.transform=l=>V_(n,RA(l)),n.default=l=>UA(n,l),n.prefault=l=>HA(n,l),n.catch=l=>ZA(n,l),n.pipe=l=>V_(n,l),n.readonly=()=>YA(n),n.describe=l=>{const o=n.clone();return Ii.add(o,{description:l}),o},Object.defineProperty(n,"description",{get(){return Ii.get(n)?.description},configurable:!0}),n.meta=(...l)=>{if(l.length===0)return Ii.get(n);const o=n.clone();return Ii.add(o,l[0]),o},n.isOptional=()=>n.safeParse(void 0).success,n.isNullable=()=>n.safeParse(null).success,n.apply=l=>l(n),n)),r0=Y("_ZodString",(n,r)=>{Tc.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(o,c,f)=>fS(n,o,c);const l=n._zod.bag;n.format=l.format??null,n.minLength=l.minimum??null,n.maxLength=l.maximum??null,n.regex=(...o)=>n.check(Pb(...o)),n.includes=(...o)=>n.check(Xb(...o)),n.startsWith=(...o)=>n.check(Wb(...o)),n.endsWith=(...o)=>n.check(Jb(...o)),n.min=(...o)=>n.check(Eo(...o)),n.max=(...o)=>n.check(Wh(...o)),n.length=(...o)=>n.check(Jh(...o)),n.nonempty=(...o)=>n.check(Eo(1,...o)),n.lowercase=o=>n.check(Kb(o)),n.uppercase=o=>n.check(Qb(o)),n.trim=()=>n.check(tS()),n.normalize=(...o)=>n.check(eS(...o)),n.toLowerCase=()=>n.check(nS()),n.toUpperCase=()=>n.check(aS()),n.slugify=()=>n.check(rS())}),WS=Y("ZodString",(n,r)=>{Tc.init(n,r),r0.init(n,r),n.email=l=>n.check(gb(JS,l)),n.url=l=>n.check(Eb(eA,l)),n.jwt=l=>n.check(jb(hA,l)),n.emoji=l=>n.check(Tb(tA,l)),n.guid=l=>n.check(j_(Z_,l)),n.uuid=l=>n.check(vb(so,l)),n.uuidv4=l=>n.check(bb(so,l)),n.uuidv6=l=>n.check(Sb(so,l)),n.uuidv7=l=>n.check(Ab(so,l)),n.nanoid=l=>n.check(Cb(nA,l)),n.guid=l=>n.check(j_(Z_,l)),n.cuid=l=>n.check(Ob(aA,l)),n.cuid2=l=>n.check(Nb(rA,l)),n.ulid=l=>n.check(Mb(iA,l)),n.base64=l=>n.check(Bb(dA,l)),n.base64url=l=>n.check(kb(mA,l)),n.xid=l=>n.check(Db(lA,l)),n.ksuid=l=>n.check(xb(oA,l)),n.ipv4=l=>n.check(wb(uA,l)),n.ipv6=l=>n.check(Rb(sA,l)),n.cidrv4=l=>n.check(Lb(cA,l)),n.cidrv6=l=>n.check(zb(fA,l)),n.e164=l=>n.check(Ub(_A,l)),n.datetime=l=>n.check(RS(l)),n.date=l=>n.check(zS(l)),n.time=l=>n.check(kS(l)),n.duration=l=>n.check(jS(l))});function ga(n){return yb(WS,n)}const at=Y("ZodStringFormat",(n,r)=>{tt.init(n,r),r0.init(n,r)}),JS=Y("ZodEmail",(n,r)=>{Cv.init(n,r),at.init(n,r)}),Z_=Y("ZodGUID",(n,r)=>{Ev.init(n,r),at.init(n,r)}),so=Y("ZodUUID",(n,r)=>{Tv.init(n,r),at.init(n,r)}),eA=Y("ZodURL",(n,r)=>{Ov.init(n,r),at.init(n,r)}),tA=Y("ZodEmoji",(n,r)=>{Nv.init(n,r),at.init(n,r)}),nA=Y("ZodNanoID",(n,r)=>{Mv.init(n,r),at.init(n,r)}),aA=Y("ZodCUID",(n,r)=>{Dv.init(n,r),at.init(n,r)}),rA=Y("ZodCUID2",(n,r)=>{xv.init(n,r),at.init(n,r)}),iA=Y("ZodULID",(n,r)=>{wv.init(n,r),at.init(n,r)}),lA=Y("ZodXID",(n,r)=>{Rv.init(n,r),at.init(n,r)}),oA=Y("ZodKSUID",(n,r)=>{Lv.init(n,r),at.init(n,r)}),uA=Y("ZodIPv4",(n,r)=>{jv.init(n,r),at.init(n,r)}),sA=Y("ZodIPv6",(n,r)=>{Hv.init(n,r),at.init(n,r)}),cA=Y("ZodCIDRv4",(n,r)=>{Iv.init(n,r),at.init(n,r)}),fA=Y("ZodCIDRv6",(n,r)=>{$v.init(n,r),at.init(n,r)}),dA=Y("ZodBase64",(n,r)=>{Zv.init(n,r),at.init(n,r)}),mA=Y("ZodBase64URL",(n,r)=>{Fv.init(n,r),at.init(n,r)}),_A=Y("ZodE164",(n,r)=>{Yv.init(n,r),at.init(n,r)}),hA=Y("ZodJWT",(n,r)=>{Vv.init(n,r),at.init(n,r)}),i0=Y("ZodNumber",(n,r)=>{Ph.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(o,c,f)=>dS(n,o,c),n.gt=(o,c)=>n.check(I_(o,c)),n.gte=(o,c)=>n.check(Xs(o,c)),n.min=(o,c)=>n.check(Xs(o,c)),n.lt=(o,c)=>n.check(H_(o,c)),n.lte=(o,c)=>n.check(Qs(o,c)),n.max=(o,c)=>n.check(Qs(o,c)),n.int=o=>n.check(G_(o)),n.safe=o=>n.check(G_(o)),n.positive=o=>n.check(I_(0,o)),n.nonnegative=o=>n.check(Xs(0,o)),n.negative=o=>n.check(H_(0,o)),n.nonpositive=o=>n.check(Qs(0,o)),n.multipleOf=(o,c)=>n.check($_(o,c)),n.step=(o,c)=>n.check($_(o,c)),n.finite=()=>n;const l=n._zod.bag;n.minValue=Math.max(l.minimum??Number.NEGATIVE_INFINITY,l.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,n.maxValue=Math.min(l.maximum??Number.POSITIVE_INFINITY,l.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,n.isInt=(l.format??"").includes("int")||Number.isSafeInteger(l.multipleOf??.5),n.isFinite=!0,n.format=l.format??null}),pA=Y("ZodNumberFormat",(n,r)=>{Pv.init(n,r),i0.init(n,r)});function G_(n){return Fb(pA,n)}const yA=Y("ZodBoolean",(n,r)=>{Kv.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>mS(n,l,o)});function gA(n){return Yb(yA,n)}const vA=Y("ZodUnknown",(n,r)=>{Qv.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>hS()});function F_(){return qb(vA)}const bA=Y("ZodNever",(n,r)=>{Xv.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>_S(n,l,o)});function SA(n){return Vb(bA,n)}const AA=Y("ZodArray",(n,r)=>{Wv.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>bS(n,l,o,c),n.element=r.element,n.min=(l,o)=>n.check(Eo(l,o)),n.nonempty=l=>n.check(Eo(1,l)),n.max=(l,o)=>n.check(Wh(l,o)),n.length=(l,o)=>n.check(Jh(l,o)),n.unwrap=()=>n.element});function EA(n,r){return iS(AA,n,r)}const TA=Y("ZodObject",(n,r)=>{eb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>SS(n,l,o,c),Fe(n,"shape",()=>r.shape),n.keyof=()=>Rr(Object.keys(n._zod.def.shape)),n.catchall=l=>n.clone({...n._zod.def,catchall:l}),n.passthrough=()=>n.clone({...n._zod.def,catchall:F_()}),n.loose=()=>n.clone({...n._zod.def,catchall:F_()}),n.strict=()=>n.clone({...n._zod.def,catchall:SA()}),n.strip=()=>n.clone({...n._zod.def,catchall:void 0}),n.extend=l=>bg(n,l),n.safeExtend=l=>Sg(n,l),n.merge=l=>Ag(n,l),n.pick=l=>gg(n,l),n.omit=l=>vg(n,l),n.partial=(...l)=>Eg(o0,n,l[0]),n.required=(...l)=>Tg(u0,n,l[0])});function CA(n,r){const l={type:"object",shape:n??{},..._e(r)};return new TA(l)}const OA=Y("ZodUnion",(n,r)=>{tb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>AS(n,l,o,c),n.options=r.options});function l0(n,r){return new OA({type:"union",options:n,..._e(r)})}const NA=Y("ZodIntersection",(n,r)=>{nb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>ES(n,l,o,c)});function MA(n,r){return new NA({type:"intersection",left:n,right:r})}const lc=Y("ZodEnum",(n,r)=>{ab.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(o,c,f)=>pS(n,o,c),n.enum=r.entries,n.options=Object.values(r.entries);const l=new Set(Object.keys(r.entries));n.extract=(o,c)=>{const f={};for(const m of o)if(l.has(m))f[m]=r.entries[m];else throw new Error(`Key ${m} not found in enum`);return new lc({...r,checks:[],..._e(c),entries:f})},n.exclude=(o,c)=>{const f={...r.entries};for(const m of o)if(l.has(m))delete f[m];else throw new Error(`Key ${m} not found in enum`);return new lc({...r,checks:[],..._e(c),entries:f})}});function Rr(n,r){const l=Array.isArray(n)?Object.fromEntries(n.map(o=>[o,o])):n;return new lc({type:"enum",entries:l,..._e(r)})}const DA=Y("ZodLiteral",(n,r)=>{rb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>yS(n,l,o),n.values=new Set(r.values),Object.defineProperty(n,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function xA(n,r){return new DA({type:"literal",values:Array.isArray(n)?n:[n],..._e(r)})}const wA=Y("ZodTransform",(n,r)=>{ib.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>vS(n,l),n._zod.parse=(l,o)=>{if(o.direction==="backward")throw new Rh(n.constructor.name);l.addIssue=f=>{if(typeof f=="string")l.issues.push(Yi(f,l.value,r));else{const m=f;m.fatal&&(m.continue=!1),m.code??(m.code="custom"),m.input??(m.input=l.value),m.inst??(m.inst=n),l.issues.push(Yi(m))}};const c=r.transform(l.value,l);return c instanceof Promise?c.then(f=>(l.value=f,l)):(l.value=c,l)}});function RA(n){return new wA({type:"transform",transform:n})}const o0=Y("ZodOptional",(n,r)=>{Xh.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>a0(n,l,o,c),n.unwrap=()=>n._zod.def.innerType});function Y_(n){return new o0({type:"optional",innerType:n})}const LA=Y("ZodExactOptional",(n,r)=>{lb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>a0(n,l,o,c),n.unwrap=()=>n._zod.def.innerType});function zA(n){return new LA({type:"optional",innerType:n})}const BA=Y("ZodNullable",(n,r)=>{ob.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>TS(n,l,o,c),n.unwrap=()=>n._zod.def.innerType});function q_(n){return new BA({type:"nullable",innerType:n})}const kA=Y("ZodDefault",(n,r)=>{ub.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>OS(n,l,o,c),n.unwrap=()=>n._zod.def.innerType,n.removeDefault=n.unwrap});function UA(n,r){return new kA({type:"default",innerType:n,get defaultValue(){return typeof r=="function"?r():kh(r)}})}const jA=Y("ZodPrefault",(n,r)=>{sb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>NS(n,l,o,c),n.unwrap=()=>n._zod.def.innerType});function HA(n,r){return new jA({type:"prefault",innerType:n,get defaultValue(){return typeof r=="function"?r():kh(r)}})}const u0=Y("ZodNonOptional",(n,r)=>{cb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>CS(n,l,o,c),n.unwrap=()=>n._zod.def.innerType});function IA(n,r){return new u0({type:"nonoptional",innerType:n,..._e(r)})}const $A=Y("ZodCatch",(n,r)=>{fb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>MS(n,l,o,c),n.unwrap=()=>n._zod.def.innerType,n.removeCatch=n.unwrap});function ZA(n,r){return new $A({type:"catch",innerType:n,catchValue:typeof r=="function"?r:()=>r})}const GA=Y("ZodPipe",(n,r)=>{db.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>DS(n,l,o,c),n.in=r.in,n.out=r.out});function V_(n,r){return new GA({type:"pipe",in:n,out:r})}const FA=Y("ZodReadonly",(n,r)=>{mb.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>xS(n,l,o,c),n.unwrap=()=>n._zod.def.innerType});function YA(n){return new FA({type:"readonly",innerType:n})}const qA=Y("ZodCustom",(n,r)=>{_b.init(n,r),ot.init(n,r),n._zod.processJSONSchema=(l,o,c)=>gS(n,l)});function VA(n,r={}){return lS(qA,n,r)}function PA(n){return oS(n)}const oc={custom:"custom"};function pt(n){return Gb(i0,n)}const KA=["additional_pip","tort_threshold","pip_coverage_type","extended_medical","policy_pip_deductible"],QA=new Set([...KA,"is_corporation"]);CA({additional_pip:Rr(["cov100_10400_LIMITED","cov125_13000_LIMITED","cov175_18200_LIMITED","cov250_26000_LIMITED","cov400_41600_LIMITED","cov500_52000_LIMITED","cov600_62400_LIMITED","cov700_72800_LIMITED","cov100_UNLIMITED","cov125_UNLIMITED","cov175_UNLIMITED","cov250_UNLIMITED","cov400_UNLIMITED","cov500_UNLIMITED","cov600_UNLIMITED","cov700_UNLIMITED"]),tort_threshold:Rr(["Verbal_Threshold","Zero_Threshold"]),pip_coverage_type:Rr(["Primary","Secondary"]),extended_medical:Rr(["cov1000","cov10000"]),policy_pip_deductible:Rr(["cov250","cov500","cov1000","cov2000","cov2500"]),has_health_insurance_auto_accident:gA().nullable().optional()}).superRefine((n,r)=>{n.pip_coverage_type==="Secondary"&&n.has_health_insurance_auto_accident!==!0&&r.addIssue({code:oc.custom,path:["pip_coverage_type"],message:"Secondary PIP coverage requires health insurance that covers auto accidents."})});const XA=new Set(["Home","HomeConstruction","HomeFeatures","Demographics"]),WA=new Set(["HomePolicy","BundlePolicy"]),JA=new Set(["HomeCustomer","BundleCustomer","Demographics"]);function Co(n){if(typeof n!="string"||!n.trim())return!1;const r=n.trim().toLowerCase();return r==="nj"||r==="n.j."||r==="n.j"||r==="new jersey"}function P_(n){return n?Co(n.state??n.State):!1}function s0(n,r,l){return n==="has_health_insurance_auto_accident"?r==="BundleCustomer"||r==="Demographics"?!1:!P_(l):QA.has(n)?!P_(l):n==="household_size"?!(r&&XA.has(r)):n==="number_of_mortgagees"?!(r&&WA.has(r)):(n==="has_co_applicant"||n==="co_applicant_middle_name"||n==="co_applicant_relationship")&&r&&JA.has(r)?!1:n==="multi_policy_discount"&&r==="HomePolicy"?!0:e1.has(n)}const e1=new Set(["anti_theft_type","passive_restraint_type","anti_lock_brakes","daytime_running_lights","vehicle_full_glass","vehicle_loan_lease","percent_to_work","stated_value_amount_cents","vehicle_comp_deductible","vehicle_coll_deductible","vehicle_towing_and_labor","vehicle_transportation_expense","accident_prevention_course","driver_accidents","driver_violations","losses","middle_name","ssn_display","auto_current_annual_premium_cents","has_co_applicant","co_applicant_middle_name","co_applicant_relationship"]),c0=new Date().getUTCFullYear(),co=ga().trim().min(1,"Required").regex(/^[A-Za-z\s]+$/,"Only alphabetic characters are allowed."),K_=l0([xA(""),ga().trim().regex(/^[A-Za-z\s]*$/,"Only alphabetic characters are allowed.")]).optional(),t1=(n,r,l)=>pt({error:`${n} must be a number.`}).min(r,`${n} must be between ${r.toLocaleString()} and ${l.toLocaleString()}.`).max(l,`${n} must be between ${r.toLocaleString()} and ${l.toLocaleString()}.`).int(`${n} must be a whole number.`),xr=(n,r)=>pt({error:`${n} must be a number.`}).min(0,`${n} must be between 0 and ${r.toLocaleString()}.`).max(r,`${n} must be between 0 and ${r.toLocaleString()}.`).int(`${n} must be a whole number.`),fo=(n,r=1600)=>pt({error:`${n} must be a valid 4-digit year.`}).int(`${n} must be a whole number.`).min(r,`${n} should be between ${r} and the current year.`).max(c0,`${n} cannot be in the future.`),mo=n=>pt({error:`${n} must be a number.`}).int(`${n} must be a whole number.`).min(0,`${n} must be between 0 and 99.`).max(99,`${n} must be between 0 and 99.`),ki=(n,r,l=0)=>{const o=Math.pow(10,r)-1,c=o.toLocaleString("en-US"),f=l.toLocaleString("en-US");return pt({error:`${n} must be a number.`}).min(l,`${n}: Value must be between ${f} and ${c}.`).max(o,`${n}: Value must be between ${f} and ${c}.`).int(`${n} must be a whole number.`)},n1={email:ga().trim().min(1,"Required").email("Please enter a valid email address."),phone:ga().trim().min(1,"Required").refine(n=>{let r=n.replace(/\D/g,"");return r.length===11&&r.startsWith("1")&&(r=r.slice(1)),r.length===10},"Please enter a valid 10-digit US phone number."),social_security_number:ga().trim().refine(n=>n===""||/^\d{3}-\d{2}-\d{4}$/.test(n),"Social Security Number must be in the format XXX-XX-XXXX.").optional(),sms_code:ga().trim().min(1,"Required").regex(/^\d{6}$/,"Please enter the 6-digit code."),first_name:co,last_name:co,middle_name:K_,co_applicant_first_name:co,co_applicant_last_name:co,co_applicant_middle_name:K_,year_built:fo("Year built",1800),year_roof_updated:pt({error:"Please enter a valid 4-digit year."}).int("Year must be a whole number.").min(1e3,"Please enter a valid 4-digit year.").max(9999,"Please enter a valid 4-digit year."),heating_update_year:fo("Heating update year"),plumbing_update_year:fo("Plumbing update year"),electrical_update_year:fo("Electrical update year"),total_area_sq_ft:t1("Square footage",1,999999),sale_price_cents:pt({error:"Purchase Price must be a number."}).min(1,"Purchase Price must be between 1 and 21,474,836.").max(21474836,"Purchase Price must be between 1 and 21,474,836.").int("Purchase Price must be a whole number."),home_prior_years:mo("Number of years with your prior carrier"),home_continuous_coverage_years:mo("How long you have had continuous home coverage"),household_size:pt({error:"Household size must be a number."}).min(1,"Occupants must be between 1 and 8.").max(8,"Occupants must be between 1 and 8.").int("Occupants must be between 1 and 8."),number_of_mortgagees:pt({error:"Number of mortgagees must be a number."}).int().min(0,"Number of mortgagees cannot be negative.").max(3,"Number of mortgagees must be between 0 and 3."),dwelling_replacement_cost:ki("Replacement cost",9,1),other_structures_coverage:ki("Other structures",9),personal_property_coverage:ki("Personal property",7),loss_of_use_coverage:ki("Loss of use coverage",8),years_at_address:pt({error:"Years at address must be a number."}).int().min(0,"Years at address cannot be negative.").max(100,"Years at address must be 100 or less."),months_at_address:pt({error:"Months at address must be a number."}).int().min(0,"Months at address cannot be negative.").max(11,"Months at address must be between 0 and 11."),years_at_prior_address:pt({error:"Years at prior address must be a number."}).int().min(0,"Years at prior address cannot be negative.").max(100,"Years at prior address must be 100 or less."),number_of_units:pt({error:"Number of units must be a number."}).int().min(1,"Number of units/apartments should be greater than 0.").max(99,"Number of units/apartments must be between 1 and 99."),number_of_families:pt({error:"Number of families must be a number."}).int("Number of families must be a whole number.").refine(n=>n>=1&&n<=5,{message:"Number of families must be between 1 and 5."}),number_of_dogs:pt({error:"Number of dogs must be a number."}).int().min(0,"Number of dogs must be between 0 and 99.").max(99,"Number of dogs must be between 0 and 99."),distance_to_coast_miles:pt({error:"Distance to coast must be a number."}).int().min(0,"Distance to coast cannot be negative.").max(9999,"Distance to coast must be at most 4 digits."),amount_paid_cents:ki("Amount paid",7),license_number:ga().trim().min(1,"Required").max(20,"License number must be 20 characters or fewer.").regex(/^[A-Z0-9]+$/i,"License number must contain only letters and numbers."),vin:ga().superRefine((n,r)=>{if(typeof n!="string"||n.trim()==="")return;if(/\s/.test(n)){r.addIssue({code:oc.custom,message:"VIN cannot contain spaces."});return}const l=n.trim();/^[A-HJ-NPR-Z0-9]{17}$/i.test(l)||r.addIssue({code:oc.custom,message:"VIN must be exactly 17 letters and numbers (excluding I, O, and Q)."})}),annual_mileage:pt({error:"Annual mileage must be a number."}).int("Annual mileage must be a whole number.").min(1e3,"Vehicle annual use should be between 1,000 & 100,000 miles.").max(1e5,"Vehicle annual use should be between 1,000 & 100,000 miles."),miles_to_work:pt({error:"Miles driven to work/school must be a number."}).int("Miles driven to work/school must be a whole number.").min(1,"Please enter a value greater than 0.").max(9999,"Miles driven to work/school must be between 1 and 9,999."),custom_equipment_value_cents:xr("Modifications value",9999999),cost_new_value_cents:xr("Cost new value",9999999),stated_value_amount_cents:xr("Stated Value Amount",9999999),property_damage_amount_paid_cents:xr("Property damage amount paid",9999999),personal_injury_amount_paid_cents:xr("Personal injury amount paid",9999999),auto_current_annual_premium_cents:xr("Current annual premium",9999999),auto_prior_years:mo("Years with prior auto carrier"),auto_prior_months:pt({error:"Months with prior carrier must be a number."}).int().min(0,"Months with prior carrier must be between 0 and 11.").max(11,"Months with prior carrier must be between 0 and 11."),auto_continuous_coverage_years:mo("Years with continuous auto coverage")};function ct(n){return new Date(`${n}T00:00:00Z`)}function Ot(){const n=new Date;return new Date(Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()))}function pa(n,r){let l=r.getUTCFullYear()-n.getUTCFullYear();const o=r.getUTCMonth()-n.getUTCMonth();return(o<0||o===0&&r.getUTCDate()<n.getUTCDate())&&l--,l}const f0=[{targetKey:"social_security_number",dependsOn:["social_security_number","state"],validate:n=>{if(!("social_security_number"in n)||!Co(n.state))return;const r=n.social_security_number;return(typeof r=="string"?r.trim():"")===""?"Social Security Number is required in New Jersey.":void 0}},{targetKey:"date_of_birth",dependsOn:["date_of_birth"],validate:n=>{const r=n.date_of_birth;if(!r||typeof r!="string")return;const l=ct(r);return isNaN(l.getTime())?"Invalid date.":l.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":pa(l,Ot())<18?"Applicant can't be under the age of 18.":void 0}},{targetKey:"co_applicant_date_of_birth",dependsOn:["co_applicant_date_of_birth"],validate:n=>{const r=n.co_applicant_date_of_birth;if(!r||typeof r!="string")return;const l=ct(r);return isNaN(l.getTime())?"Invalid date.":l.getUTCFullYear()<1900?"Date of birth year can't be earlier than 1900.":pa(l,Ot())<16?"Co-applicant can't be under the age of 16.":void 0}},{targetKey:"year_roof_updated",dependsOn:["year_roof_updated","year_built"],validate:n=>{const r=Number(n.year_roof_updated),l=Number(n.year_built);if(isNaN(r))return;const o=isNaN(l)?1e3:l;if(r<o||r>c0)return"Roof renovation/replacement year must be between the home's build year and the current year."}},{targetKey:"move_in_date",dependsOn:["move_in_date","year_built"],validate:n=>{const r=n.move_in_date,l=n.year_built;if(!r||l==null)return;const o=ct(String(r));if(isNaN(o.getTime()))return;const c=Number(l);if(!isNaN(c))return o.getUTCFullYear()<c?"Purchase date cannot be prior to the year the building was originally constructed.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed"],validate:n=>{const r=n.date_first_licensed;if(!r||typeof r!="string")return;const l=ct(r);return isNaN(l.getTime())?"Invalid date.":l>Ot()?"Date first licensed cannot be in the future.":void 0}},{targetKey:"date_first_licensed",dependsOn:["date_first_licensed","date_of_birth"],validate:n=>{const r=n.date_first_licensed,l=n.date_of_birth;if(!r||typeof r!="string"||!l||typeof l!="string")return;const o=ct(l),c=ct(r);if(isNaN(o.getTime())||isNaN(c.getTime()))return;if(c<o)return"Date licensed cannot be before driver date of birth.";const f=new Date(Date.UTC(o.getUTCFullYear()+18,o.getUTCMonth(),o.getUTCDate()));return c<f?"Driver can't be licensed to drive before the age of 18.":void 0}},{targetKey:"occurred_at",dependsOn:["occurred_at"],validate:n=>{const r=n.occurred_at;if(!r||typeof r!="string")return;const l=ct(r);return isNaN(l.getTime())?"Invalid date.":l>Ot()?"Incident date cannot be in the future.":void 0}},{targetKey:"accident_prevention_course_date",dependsOn:["accident_prevention_course_date"],validate:n=>{const r=n.accident_prevention_course_date;if(!r||typeof r!="string")return;const l=ct(r);return isNaN(l.getTime())?"Invalid date.":l>Ot()?"Course date cannot be in the future.":void 0}},{targetKey:"effective_date",dependsOn:["effective_date"],validate:n=>{const r=n.effective_date;if(!r||typeof r!="string")return;const l=ct(r);if(isNaN(l.getTime()))return"Invalid date.";const o=Ot(),c=new Date(Date.UTC(o.getUTCFullYear(),o.getUTCMonth()+3,o.getUTCDate()));if(l<o)return"Insurance start date cannot be in the past.";if(l>c)return"Insurance must begin within 3 months from today."}},{targetKey:"years_at_address",dependsOn:["years_at_address","date_of_birth"],validate:n=>{const r=n.years_at_address,l=n.date_of_birth;if(r==null||l==null||typeof l!="string")return;const o=Number(r);if(isNaN(o))return;const c=ct(l);if(isNaN(c.getTime()))return;const f=pa(c,Ot());return o>f?"Time at address cannot be greater than the applicant age.":void 0}},{targetKey:"years_at_prior_address",dependsOn:["years_at_prior_address","date_of_birth"],validate:n=>{const r=n.years_at_prior_address,l=n.date_of_birth;if(r==null||l==null||typeof l!="string")return;const o=Number(r);if(isNaN(o))return;const c=ct(l);if(isNaN(c.getTime()))return;const f=pa(c,Ot());return o>f?"Years at prior address cannot be greater than the applicant age.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","home_continuous_coverage_years"],validate:n=>{const r=n.home_prior_years,l=n.home_continuous_coverage_years;if(r==null||l==null)return;const o=Number(r),c=Number(l);if(!(isNaN(o)||isNaN(c)))return o>c?"Years with prior carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"home_prior_years",dependsOn:["home_prior_years","date_of_birth"],validate:n=>{const r=n.home_prior_years,l=n.date_of_birth;if(r==null||l==null||typeof l!="string")return;const o=Number(r);if(isNaN(o))return;const c=ct(l);if(isNaN(c.getTime()))return;const f=pa(c,Ot());return o>f?"Years with prior carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"home_continuous_coverage_years",dependsOn:["home_continuous_coverage_years","date_of_birth"],validate:n=>{const r=n.home_continuous_coverage_years,l=n.date_of_birth;if(r==null||l==null||typeof l!="string")return;const o=Number(r);if(isNaN(o))return;const c=ct(l);if(isNaN(c.getTime()))return;const f=pa(c,Ot());return o>f?"Years with continuous home coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"move_in_date",dependsOn:["move_in_date"],validate:n=>{const r=n.move_in_date;if(!r||typeof r!="string")return;const l=ct(r);return isNaN(l.getTime())?"Invalid date.":l>Ot()?"Purchase date cannot be in the future.":void 0}},{targetKey:"date_of_incident",dependsOn:["date_of_incident"],validate:n=>{const r=n.date_of_incident;if(!r||typeof r!="string")return;const l=ct(r);if(isNaN(l.getTime()))return"Invalid date.";const o=Ot();return l>o?"Loss date cannot be in the future.":void 0}},{targetKey:"home_prior_expiration_date",dependsOn:["home_prior_expiration_date"],validate:n=>{const r=n.home_prior_expiration_date;if(!r||typeof r!="string")return;const l=ct(r);if(isNaN(l.getTime()))return"Invalid date.";const o=Ot(),c=new Date(Date.UTC(o.getUTCFullYear()-1,o.getUTCMonth(),o.getUTCDate())),f=new Date(Date.UTC(o.getUTCFullYear()+1,o.getUTCMonth(),o.getUTCDate()));if(l<c||l>f)return"Policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"purchase_date",dependsOn:["purchase_date"],validate:n=>{const r=n.purchase_date;if(!r||typeof r!="string")return;const l=ct(r);return isNaN(l.getTime())?"Invalid date.":l>Ot()?"Vehicle purchase date cannot be in the future.":void 0}},{targetKey:"purchase_date",dependsOn:["purchase_date","year"],validate:n=>{const r=n.purchase_date,l=n.year;if(!r||typeof r!="string"||l==null)return;const o=ct(r);if(isNaN(o.getTime()))return;const c=Number(l);if(!isNaN(c))return o.getUTCFullYear()<c?"The year the vehicle was purchased is not valid with the model year.":void 0}},{targetKey:"auto_prior_expiration_date",dependsOn:["auto_prior_expiration_date"],validate:n=>{const r=n.auto_prior_expiration_date;if(!r||typeof r!="string")return;const l=ct(r);if(isNaN(l.getTime()))return"Invalid date.";const o=Ot(),c=new Date(Date.UTC(o.getUTCFullYear()-1,o.getUTCMonth(),o.getUTCDate())),f=new Date(Date.UTC(o.getUTCFullYear()+1,o.getUTCMonth(),o.getUTCDate()));if(l<c||l>f)return"Auto policy expiration date must be between 1 year ago and 1 year from now."}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","auto_continuous_coverage_years"],validate:n=>{const r=n.auto_prior_years,l=n.auto_continuous_coverage_years;if(r==null||l==null)return;const o=Number(r),c=Number(l);if(!(isNaN(o)||isNaN(c)))return o>c?"Years with prior auto carrier cannot be higher than years with continuous coverage.":void 0}},{targetKey:"auto_prior_years",dependsOn:["auto_prior_years","date_of_birth"],validate:n=>{const r=n.auto_prior_years,l=n.date_of_birth;if(r==null||l==null||typeof l!="string")return;const o=Number(r);if(isNaN(o))return;const c=ct(l);if(isNaN(c.getTime()))return;const f=pa(c,Ot());return o>f?"Years with prior auto carrier cannot be greater than the Applicant's age.":void 0}},{targetKey:"auto_continuous_coverage_years",dependsOn:["auto_continuous_coverage_years","date_of_birth"],validate:n=>{const r=n.auto_continuous_coverage_years,l=n.date_of_birth;if(r==null||l==null||typeof l!="string")return;const o=Number(r);if(isNaN(o))return;const c=ct(l);if(isNaN(c.getTime()))return;const f=pa(c,Ot());return o>f?"Years with continuous auto coverage cannot be greater than the Applicant's age.":void 0}},{targetKey:"vehicle_coll_deductible",dependsOn:["vehicle_coll_deductible","vehicle_comp_deductible"],validate:n=>{const r=n.vehicle_coll_deductible,l=n.vehicle_comp_deductible;if(!(!r||typeof r!="string"||!l||typeof l!="string")&&l==="NoCoverage"&&r!=="NoCoverage")return"Collision Coverage cannot be chosen if Comprehensive is No Coverage."}},{targetKey:"policy_um",dependsOn:["policy_um","policy_bi"],validate:n=>{const r=n.policy_um,l=n.policy_bi;if(!r||typeof r!="string"||!l||typeof l!="string"||r==="Reject"||l==="Dontknow")return;const o=p=>p.endsWith("CSL"),c=o(r),f=o(l);if(c&&!f)return"A Combined Single Limit cannot be selected for Uninsured/Underinsured Motorist unless a Combined Single Limit has also been selected for Liability.";const m={cov30to60:30,cov50to100:50,cov100to100:100,cov100to300:100,cov250to500:250,cov300to300:300,cov500to500:500,cov100CSL:100,cov300CSL:300,cov500CSL:500},_=m[r],g=m[l];if(_!=null&&g!=null&&_>g)return"Uninsured/Underinsured Motorist Limit value cannot be greater than Bodily Injury Limit value."}},{targetKey:"policy_umpd",dependsOn:["policy_umpd","policy_pd"],validate:n=>{const r=n.policy_umpd,l=n.policy_pd;if(!r||typeof r!="string"||!l||typeof l!="string"||r==="NoCoverage"||l==="Dontknow")return;const o=m=>{if(!m.startsWith("cov"))return null;const _=parseInt(m.replace("cov",""),10);return isNaN(_)?null:_},c=o(r),f=o(l);if(c!=null&&f!=null&&c>f)return"Uninsured Motorist Property Damage Limit value cannot be greater than Liability Property Damage Limit value."}},{targetKey:"custom_equipment_value_cents",dependsOn:["custom_equipment_value_cents","stated_value_amount_cents"],validate:n=>{const r=n.custom_equipment_value_cents,l=n.stated_value_amount_cents;if(r==null||l==null)return;const o=Number(r),c=Number(l);if(!(isNaN(o)||isNaN(c))&&c>0&&o>0)return"Modifications should be included in the stated value of the vehicle. If a stated value quote is not required, remove the stated value."}}];function uc(n,r){const l=n1[n];if(!l)return;const o=l.safeParse(r);return o.success?void 0:o.error.issues[0].message}function Q_(n){if(/\s/.test(n))return!1;const r=n.trim();return r.length===17&&/^[A-HJ-NPR-Z0-9]{17}$/i.test(r)}function a1(n,r){const l={};for(const o of f0){if(r?.has(o.targetKey))continue;const c=o.validate(n);c&&(l[o.targetKey]=c)}return l}function sc(n){return n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/(^-|-$)/g,"")}function Gi(n,r){return n.key??`${sc(n.question)}-${r}`}function va(n,r){return r==="number"?n==null||typeof n=="string"&&n.trim()==="":r==="checkbox"?n!==!0:n==null||typeof n=="string"&&n.trim()===""}function Oo(n,r){const l={};n.forEach((m,_)=>{const g=Gi(m,_),p=r[g];if(m.required&&va(p,m.inputType)){l[g]="Required";return}if(!va(p,m.inputType)){const b=uc(g,p);if(b){l[g]=b;return}}});const o={...r};n.forEach((m,_)=>{const g=Gi(m,_);g in o||(o[g]="")});const c=new Set(Object.keys(l).filter(m=>l[m])),f=a1(o,c);for(const[m,_]of Object.entries(f))l[m]=_;return l}function r1(n){if(n===""||n===null||n===void 0)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const i1={NoPriorInsurance:"No Prior Insurance",TwentyFirstCentury:"21st Century",ACentral:"A.Central",AAA:"AAA",AARP:"AARP",Acadia:"Acadia",Ace:"Ace",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",Aegis:"Aegis",AIC:"AIC",AIG:"AIG",AlfaAlliance:"Alfa Alliance",Allied:"Allied",Allstate:"Allstate",AmericaFirst:"America First",AmericanCommerce:"American Commerce",AmericanFamily:"American Family",Amica:"Amica",ASILloyds:"ASI Lloyds",AustinMutual:"Austin Mutual",Autoone:"Autoone",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bankers:"Bankers",BeaconNational:"Beacon National",BrethernMutual:"Brethern Mutual",BristolWest:"Bristol West",CapitalInsuranceGroup:"Capital Insurance Group",Celina:"Celina",CentralMutualOfOH:"Central Mutual of OH",Chubb:"Chubb",Cincinnati:"Cincinnati",Clearcover:"Clearcover",CNA:"CNA",ColonialPenn:"Colonial Penn",ColoradoCasualty:"Colorado Casualty",Columbia:"Columbia",CommerceWest:"Commerce West",CommonwealthCasualty:"Commonwealth Casualty",Ameriprise:"CONNECT",ConstitutionalCasualty:"Constitutional Casualty",Cornerstone:"Cornerstone",Countrywide:"Countrywide",CSE:"CSE",Cumberland:"Cumberland",Dairyland:"Dairyland",Deerbrook:"Deerbrook",Direct:"Direct",Donegal:"Donegal",Drive:"Drive",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",Explorer:"Explorer",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",Foremost:"Foremost",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",GreatAmerican:"Great American",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harbor:"Harbor",Harleysville:"Harleysville",HartfordOMNI:"Hartford OMNI",Hartford:"Hartford",HastingsMutual:"Hastings Mutual",HawkeyeSecurity:"Hawkeye Security",HDI:"HDI",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",IFA:"IFA",ImperialCasualty:"Imperial Casualty",IndianaFarmers:"Indiana Farmers",Indiana:"Indiana",Infinity:"Infinity",Insurequest:"Insurequest",Integon:"Integon",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",MainStreetAmerica:"Main Street America",Mapfre:"Mapfre",Mendota:"Mendota",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",Metropolitan:"Metropolitan",MidContinent:"Mid-Continent",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MtWashington:"Mt. Washington",MutualBenefit:"Mutual Benefit",NationalGeneral:"National General",Nationwide:"Nationwide",NewYorkCentralMutual:"New York Central Mutual",NJManufacturers:"NJ Manufacturers",NJSkylands:"NJ Skylands",Northstar:"Northstar",Occidental:"Occidental",OhioCasualty:"Ohio Casualty",OmahaPC:"Omaha P/C",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",Palisades:"Palisades",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",Pemco:"Pemco",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Proformance:"Proformance",Progressive:"Progressive",Prudential:"Prudential",Republic:"Republic",RockfordMutual:"Rockford Mutual",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",Selective:"Selective",SouthernCounty:"Southern County",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StarCasualty:"Star Casualty",StateAuto:"State Auto",StateFarm:"State Farm",Fidelity:"Stillwater",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Victoria:"Victoria",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Windsor:"Windsor",Zurich:"Zurich",OtherStandard:"Other Standard",OtherNonStandard:"Other Non-Standard"},l1={OwnHome:"Own Home",OwnCondo:"Own Condo",RentHome:"Rent Home",RentCondo:"Rent Condo",RentApartment:"Rent Apartment",LiveWithParents:"Live With Parents"},o1={TwentyFirstCentury:"21st Century",AAA:"AAA",Acuity:"Acuity",AdirondackInsExchange:"Adirondack Ins Exchange",AIG:"AIG",AlfaAlliance:"Alfa Alliance",AllianzOfAmerica:"Allianz of America",AllianzOfAmericaJefferson:"Allianz of America-Jefferson",Allied:"Allied",Allmerica:"Allmerica",Allstate:"Allstate",AmericaFirst:"America First",AmericanFamily:"American Family",AmericanCommerce:"American Commerce",Amica:"Amica",ASILloyds:"ASI Lloyds",Assurant:"Assurant",AtlasGeneralAgency:"Atlas General Agency",AustinMutual:"Austin Mutual",AutoOwners:"Auto-Owners",BadgerMutual:"Badger Mutual",Balboa:"Balboa",Bamboo:"Bamboo",BeaconNational:"Beacon National",BunkerHill:"Bunker Hill",CapitalInsuranceGroup:"Capital Insurance Group",CentralMutualOfOH:"Central Mutual of OH",ChubbInsurance:"Chubb",Cincinnati:"Cincinnati",Citizens:"Citizens",ColoradoCasualty:"Colorado Casualty",Ameriprise:"CONNECT",CSE:"CSE",Cumberland:"Cumberland",Cypress:"Cypress",Dairyland:"Dairyland",Donegal:"Donegal",Electric:"Electric",EMC:"EMC",Encompass:"Encompass",Erie:"Erie",Esurance:"Esurance",ExcelsiorInsuranceCompany:"Excelsior Insurance Company",FairPlan:"Fair Plan",FarmBureau:"Farm Bureau",Farmers:"Farmers",FiremansFund:"Firemans Fund",FirstAmerican:"First American",ForemostInsuranceCompany:"Foremost Insurance Company",Geico:"Geico",GeneralCasualty:"General Casualty",GermantownMutual:"Germantown Mutual",GMAC:"GMAC",Grange:"Grange",Grinnell:"Grinnell",GuideOne:"Guide One",Hanover:"Hanover",Harleysville:"Harleysville",Hartford:"Hartford",HartfordOMNI:"Hartford OMNI",HawkeyeSecurity:"Hawkeye Security",HippoInsuranceCompany:"Hippo Insurance Company",HomeownersOfAmerica:"Homeowners of America",Homesite:"Homesite",HoraceMann:"Horace Mann",HoustonGeneral:"Houston General",Indiana:"Indiana",IndianaFarmers:"Indiana Farmers",Integrity:"Integrity",Kemper:"Kemper",LibertyMutual:"Liberty Mutual",LibertyNorthwest:"Liberty Northwest",Lloyds:"Lloyds",MainStreetAmerica:"Main Street America",MarkelInsuranceCompany:"Markel Insurance Company",MerchantsGroup:"Merchants Group",Mercury:"Mercury",Metlife:"MetLife",MidwesternIndemnity:"Midwestern Indemnity",Montgomery:"Montgomery",MSA:"MSA",MutualBenefit:"Mutual Benefit",Tower:"National General",NatGenPremier:"NatGen Premier",Nationwide:"Nationwide",NationwideScottsdale:"Nationwide-Scottsdale",NewYorkCentralMutual:"New York Central Mutual",NJSkylands:"NJ Skylands",Northstar:"Northstar",OhioCasualty:"Ohio Casualty",OneBeacon:"One Beacon",OregonMutual:"Oregon Mutual",PeerlessMontgomery:"Peerless/Montgomery",Pekin:"Pekin",PennNational:"Penn National",PlymouthRock:"Plymouth Rock",PreferredMutual:"Preferred Mutual",Prudential:"Prudential",PureHighValue:"Pure High Value",Republic:"Republic",RoyalAndSunAlliance:"Royal and Sun Alliance",Safeco:"Safeco",SECURA:"SECURA",SouthernMutual:"Southern Mutual",SouthernTrust:"Southern Trust",StPaulTravelers:"St. Paul/Travelers",StandardMutual:"Standard Mutual",StateAuto:"State Auto",StateFarm:"State Farm",StateFarmFloridaInsuranceCompany:"State Farm Florida Insurance Company",Fidelity:"Stillwater",SunshineStateInsuranceCompany:"Sunshine State Insurance Company",Travelers:"Travelers",TWFG:"TWFG",Unigard:"Unigard",UnitedFireAndCasualty:"United Fire and Casualty",Unitrin:"Unitrin",Universal:"Universal",USAA:"USAA",UticaNational:"Utica National",Wellington:"Wellington",WestBend:"West Bend",WesternNational:"Western National",WesternReserveGroup:"Western Reserve Group",Westfield:"Westfield",WhiteMountains:"White Mountains",WilsonMutual:"Wilson Mutual",Zurich:"Zurich",Other:"Other",OtherNonStandard:"Other Non-Standard",OtherStandard:"Other Standard"},u1={Business:"Business",Pleasure:"Pleasure",Farming:"Farming",To_FromWork:"To/From Work",To_FromSchool:"To/From School"},s1={Dontknow:"Don't Know",ThirtyToSixty:"30/60",FiftyToHundred:"50/100",HundredToHundred:"100/100",HundredToThreeHundred:"100/300",TwoHundredFiftyToFiveHundred:"250/500",ThreeHundredToThreeHundred:"300/300",FiveHundredToFiveHundred:"500/500",HundredCSL:"100CSL",ThreeHundredCSL:"300CSL",FiveHundredCSL:"500CSL"},c1={ActiveMilitaryDuty:"Active Military Duty",DrivingCompanyCar:"Driving A Company Car",DrivingCarOwnedByRelative:"Driving A Car Owned By A Relative",HasNotOwnedOrOperatedVehicle:"Has Not Owned Or Operated A Vehicle",OwnedVehParkedStoredOffRoadNotDriven:"Owned Veh Parked/Stored Off Road/Not Driven",NonPayment:"Non-Payment",Other:"Other"},f1={Dontknow:"Don't Know",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},d1={Reject:"Reject",cov30to60:"30/60",cov35to70:"35/70",cov50to100:"50/100",cov100to100:"100/100",cov100to300:"100/300",cov250to500:"250/500",cov300to300:"300/300",cov500to500:"500/500",cov100CSL:"100 CSL",cov300CSL:"300 CSL",cov500CSL:"500 CSL"},m1={Dontknow:"Don't know",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov500000:"500,000"},_1={None:"None",cov500:"500",cov1000:"1,000",cov2000:"2,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov15000:"15,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000"},h1={cov25000:"25,000",cov35000:"35,000",cov50000:"50,000",cov100000:"100,000",cov200000:"200,000",cov250000:"250,000",cov300000:"300,000",cov500000:"500,000"},p1={cov15000:"15,000",cov2500:"2,500",cov5000:"5,000",cov10000:"10,000",cov25000:"25,000",cov50000:"50,000",cov100000:"100,000",cov250000:"250,000",cov75000:"75,000",cov150000:"150,000"},y1={NoCoverage:"No Coverage",cov5000:"5,000",cov10000:"10,000"},cc={NoCoverage:"No Coverage",Zero:"0",Fifty:"50",Hundred:"100",TwoHunderd:"200",TwoHundredfifty:"250",FiveHundred:"500",SeventyFiveHundred:"750",Thousand:"1,000",TwoThousand:"2,000"},g1=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","SeventyFiveHundred","Thousand","TwoThousand"],v1=["NoCoverage","Zero","Fifty","Hundred","TwoHunderd","TwoHundredfifty","FiveHundred","Thousand","TwoThousand"],fc={NoCoverage:"No Coverage",TwentyFive:"25",Forty:"40",Fifty:"50",SeventyFive:"75",Eighty:"80",Hundred:"100",TwelveHundred:"120",TwoHundred:"200",Unlimited:"Unlimited"},b1=["NoCoverage","TwentyFive","Fifty","SeventyFive","Hundred","TwoHundred","Unlimited"],d0={NoCoverage:"No Coverage",cov20to600:"20/600",cov25to750:"25/750",cov30to900:"30/900",cov40to1200:"40/1,200",cov50to1500:"50/1,500",cov100to3000:"100/3,000"},S1=["NoCoverage","cov20to600","cov25to750","cov30to900","cov40to1200","cov50to1500","cov100to3000"],A1=["NoCoverage","cov20to600","cov30to900","cov40to1200","cov50to1500"],m0={NoHighSchoolDiploma:"No High School Diploma",HighSchoolDiploma:"High School Diploma",SomeCollegeNoDegree:"Some College - No Degree",VocationalTechnicalDegree:"Vocational Technical Degree",AssociatesDegree:"Associates Degree",Bachelors:"Bachelors",Masters:"Masters",Phd:"Phd",MedicalDegree:"Medical Degree",LawDegree:"Law Degree"},E1={TwoFamilyHome:"2-Family Home",American4square:"American 4-square",Basic:"Basic",BiLevel:"Bi-Level",Bungalow:"Bungalow",CapeCod:"Cape Cod",Colonial:"Colonial",ColonialSpanish:"Colonial - Spanish",CompletelyCustom:"Completely Custom",Contemporary:"Contemporary",ContractorModern:"Contractor Modern",Farmhouse:"Farmhouse",Folk:"Folk",Log:"Log",Mediterranean:"Mediterranean",Ranch:"Ranch",TriLevel:"Tri-Level",Tudor:"Tudor",Vernacular:"Vernacular",Victorian:"Victorian"},T1={SingleFamilyHouse:"Single Family House",Townhouse:"Townhouse",Rowhouse:"Rowhouse",Duplex:"Duplex/Two Family Unit",Triplex:"Tri-plex/Three Family Unit",Fourplex:"Four-plex/Four Family Unit",MultFamily:"Multi-family (more than four units)"},C1={OwnerPrimary:"Owner Primary",OwnerSecondary:"Owner Secondary",OwnerSeasonal:"Owner Seasonal"},O1={Basic:"Basic",Modest:"Modest",Average:"Average",AboveAverage:"Above Average",Expensive:"Expensive",VeryExpensive:"Very Expensive",Opulent:"Opulent"},N1={Frame:"Frame",Masonry:"Masonry",MasonryVeneer:"Masonry Veneer",Log:"Log",Asbestos:"Asbestos",EFIS:"EFIS",HardiPlank:"HardiPlank",SuperiorFireResistive:"Superior Fire Resistive",SuperiorMasonryNonCombustible:"Superior Masonry Non Combustible",SuperiorNonCombustible:"Superior Non Combustible"},M1={Slab:"Slab",Basement:"Basement",CrawlSpace:"Crawl Space",PartialBasement:"Partial Basement",PiersPostsPiles:"Piers / Posts / Piles",Open:"Open"},D1={NotOverWater:"No",PartiallyOverWater:"Partially Over Water",FullyOrEntirelyOverWater:"Fully or Entirely Over Water"},x1={One:"1",OneHalf:"1.5",Two:"2",TwoHalf:"2.5",Three:"3",ThreeHalf:"3.5",Four:"4",BiLevel:"Bi-Level",TriLevel:"Tri-Level"},w1={VinylSiding:"Vinyl Siding",WoodFraming:"Wood Framing",BrickVeneer:"Brick Veneer",Stucco:"Stucco",AdobeBlock:"Adobe Block",AluminumSiding:"Aluminum Siding",CementFiberShingles:"Cement Fiber Shingles",Clapboard:"Clapboard",ConcreteBlock:"Concrete Block",HardboardSiding:"Hardboard Siding",InsulatedConcreteForms:"Insulated Concrete Forms",LightGaugeSteelFraming:"Light Gauge Steel Framing",LogsSolid:"Logs (Solid)",MasoniteSiding:"Masonite Siding",PreEngineeredMetal:"Pre-Engineered Metal",SolidBrickConstruction:"Solid Brick Construction",SolidConcrete:"Solid Concrete",StandardPoleFramed:"Standard Pole Framed",Stone:"Stone",StructuralInsulatedPanels:"Structural Insulated Panels",TimberFraming:"Timber Framing"},R1={ASPHALT_SHINGLES:"Asphalt Shingles",ARCHITECTURAL_SHINGLES:"Architectural Shingles",METAL:"Metal",TILE_CONCRETE:"Tile (Concrete)",ASBESTOS:"Asbestos",BUILT_UP:"Built-Up",COMPOSITION:"Composition",CONCRETE:"Concrete",COPPER:"Copper",CORRUGATED_STEEL:"Corrugated Steel",FIBERGLASS:"Fiberglass",FOAM:"Foam",GRAVEL:"Gravel",MEMBRANE:"Membrane",MINERAL_FIBER_SHAKE:"Mineral Fiber Shake",PLASTIC:"Plastic",ROCK:"Rock",ROLLED_PAPER:"Rolled Paper",RUBBER:"Rubber",SLATE:"Slate",TAR:"Tar",TAR_GRAVEL:"Tar and Gravel",TILE_CLAY:"Tile (Clay)",TILE_MISSION:"Tile (Mission)",TILE_SPANISH:"Tile (Spanish)",TIN:"Tin",WOOD_FIBERGLASS_SHINGLES:"Wood/Fiberglass Shingles",WOOD_SHAKE:"Wood Shake",WOOD_SHINGLES:"Wood Shingles",OTHER:"Other"},L1={B_Gable:"Gable",C_Hip:"Hip",A_Flat:"Flat",D_Other:"Other"},z1={NotUpdated:"Not Updated",PartialUpdate:"Partial Update",CompleteUpdate:"Complete Update"},B1={Electric:"Electric",Gas:"Gas",GasForcedAir:"Gas - Forced Air",GasHotWater:"Gas - Hot Water",Oil:"Oil",OilForcedAir:"Oil - Forced Air",OilHotWater:"Oil - Hot Water",SolidFuel:"Solid Fuel",HeatPump:"Heat Pump",Other:"Other"},k1={AboveGround:"Above Ground",BelowGround:"Below Ground"},U1={Basement:"Below Grade Basement",SplitLevelBasement:"Split Level Basement",WalkoutBasement:"Walkout Basement"},j1={EntirelyCopper:"Entirely Copper",EntirelyGalvanized:"Entirely Galvanized",EntirelyPEX:"Entirely PEX",EntirelyPVC:"Entirely PVC",Polybutylene:"Polybutylene"},H1={TwentyFive:"$25,000",Fifty:"$50,000",OneHundred:"$100,000",TwoHundred:"$200,000",ThreeHundred:"$300,000",FourHundred:"$400,000",FiveHundred:"$500,000"},I1={cov1000:"$1,000",cov2000:"$2,000",cov3000:"$3,000",cov4000:"$4,000",cov5000:"$5,000"},$1={TwoHundredFifty:"$250",FiveHundred:"$500",SevenHundredFifty:"$750",OneThousand:"$1,000",OneThousandFiveHundred:"$1,500",TwoThousand:"$2,000",TwoThousandFiveHundred:"$2,500",ThreeThousands:"$3,000",FourThousands:"$4,000",FiveThousands:"$5,000",OnePercent:"1%",TwoPercent:"2%",ThreePercent:"3%",FourPercent:"4%",FivePercent:"5%"},Z1={None:"None",OnePercent:"1%",TwoPercent:"2%",FivePercent:"5%",TenPercent:"10%"},G1={_0_500ft:"0-500 Feet",_501_1000ft:"501-1000 Feet",_1001ftAndGreater:"1001 Feet And Greater"},F1={Lessthan5miles:"Less Than 5 Miles",Over5miles:"Over 5 Miles",NotAvailable:"Not Available"},X_={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House Person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},W_={Single:"Single",Married:"Married",Seperated:"Separated",Divorced:"Divorced",Widowed:"Widowed",DomesticPartner:"Domestic Partner"},J_={Female:"Female",Male:"Male"},_0={"Agriclt/Forestry/Fish":"Agriculture/Forestry/Fishing","Art/Design/Media":"Art/Design/Media","Banking/Finance/RE":"Banking/Finance/Real Estate","Business/Sales/Offi":"Business/Sales/Office","Construct/EnrgyTrds":"Construction/Energy Trades",Disabled:"Disabled","Education/Library":"Education/Library","Engr/Archt/Sci/Math":"Engineer/Architect/Science/Math","Government/Military":"Government/Military","Homemaker/Houseprsn":"Homemaker/House person","Info Tech":"Information Technology",Insurance:"Insurance","Lgl/Law Enfcmt/Sec":"Legal/Law Enforcement/Security","Maint/Rpr/Hsekeep":"Maintenance/Repair/Housekeeping","Mfg/Production":"Manufacturing/Production","Med/Soc Svcs/Relig":"Medical/Social Services/Religion",Other:"Other","Person.Care/Service":"Personal Care/Service","Rest/Hotel Services":"Restaurant/Hotel Services",Retired:"Retired","Sports/Recreation":"Sports/Recreation",Student:"Student","Trvl/Trnsprt/Warehs":"Travel/Transportation/Warehousing",Unemployed:"Unemployed"},Y1={CONTAMINATION:"Contamination",CREDITCARD:"Credit Card",DAMAGETOPROPERTYOFOTHERS:"Damage To Property Of Others",DOGBITELIABILITY:"Dog Bite",EARTHMOVEMENT:"Earth Movement",EARTHQUAKE:"Earthquake",EXTENDEDCOVERAGEPERILS:"Extended Coverage Perils",FIRE:"Fire",FLOOD:"Flood",FREEZINGWATERINCLUDINGBURSTPIPES:"Freezing Water",HAIL:"Hail",HURRICANE:"Hurricane",LIABILITYALLOTHER:"Liability",LIGHTNING:"Lightning",MEDICALPAYMENTS:"Medical Payments",MYSTERIOUSDISAPPEARANCE:"Mysterious Disappearance",MYSTERIOUSDISAPPEARANCESCHEDULEDPROPERTY:"Mysterious Disappearance - Scheduled Property",PHYSICALDAMAGEALLOTHER:"Physical Damage",SINKHOLE:"Sinkhole",SLIPFALLLIABILITY:"Slip/Fall",SMOKE:"Smoke",THEFTSCHEDULEDPROPERTY:"Theft - Scheduled Property",THEFTBURGLARY:"Theft - Burglary",TORNADO:"Tornado",VANDALISMMALICIOUSMISCHIEF:"Vandalism",WATERDAMAGE:"Water Damage",WIND:"Wind",WORKERSCOMPENSATION:"Workers Compensation",ALLOTHER:"All Other"},q1={Verbal_Threshold:"Limited right to sue",Zero_Threshold:"Unlimited right to sue"},V1={Primary:"Primary",Secondary:"Secondary"},P1={cov1000:"$1,000",cov10000:"$10,000"},K1={cov100_10400_LIMITED:"100 - 10,400/ LIMITED",cov125_13000_LIMITED:"125 - 13,000/ LIMITED",cov175_18200_LIMITED:"175 - 18,200/ LIMITED",cov250_26000_LIMITED:"250 - 26,000/ LIMITED",cov400_41600_LIMITED:"400 - 41,600/ LIMITED",cov500_52000_LIMITED:"500 - 52,000/ LIMITED",cov600_62400_LIMITED:"600 - 62,400/ LIMITED",cov700_72800_LIMITED:"700 - 72,800/ LIMITED",cov100_UNLIMITED:"100/UNLIMITED",cov125_UNLIMITED:"125/UNLIMITED",cov175_UNLIMITED:"175/UNLIMITED",cov250_UNLIMITED:"250/UNLIMITED",cov400_UNLIMITED:"400/UNLIMITED",cov500_UNLIMITED:"500/UNLIMITED",cov600_UNLIMITED:"600/UNLIMITED",cov700_UNLIMITED:"700/UNLIMITED"},Q1={cov250:"$250",cov500:"$500",cov1000:"$1,000",cov2000:"$2,000",cov2500:"$2,500"},X1={"Agriclt/Forestry/Fish":["Agr Inspect/Grader","Arborist","Clerk","Equip. Operator","Farm/Ranch Owner","Farm/Ranch Worker","Fisherman","Florist","Laborer/Worker","Landscape/NursryWkr","Landscaper","Logger","Millworker","Other","Ranger","Supervisor","Timber Grader/Scale"],"Art/Design/Media":["Actor","Admin Assist","Announcer/Broadcstr","Artist/Animator","Author/Writer","Choreography/Dancer","Clerk","Composer/Director","Curator","Designer","Editor","Journalist/Reporter","Musician/Singer","Other","Printer","Producer","Production Crew","Projectionist","Receptionist/Sec","Ticket Sales/Usher"],"Banking/Finance/RE":["Accountant/Auditor","Admin Assist","Analyst/Broker","Bookkeeper","Branch Manager","Clerk","Collections","Consultant","Controller","CSR/Teller","Director/Administr","Executive","Financial Advisor","Investment Banker","Investor","Loan/EscrowProcess","Mgr-Credit/Loan","Mgr-Portfolio/Prod.","Mgr-Property","Other","Realtor","Receptionist/Sec","SalesAgt/Represent.","Trader,Finan Instru","Underwriter"],"Business/Sales/Offi":["Account Executive","Admin Assist","Buyer","Clerk-Office","Consultant","CSR","Director/Administr","Executive","H.R. Representative","Marketing Researchr","Messenger/Courier","Mgr - District","Mgr - Finance","Mgr-Dept/Store","Mgr-General Opers","Mgr-H.R./PublicRel","Mgr-Mkt/Sales","Mgr/Supervisr-Offic","Other","Receptionist/Sec","Sales-Counter/Rentl","Sales-Home Based","Sales-Mfg Rep","Sales-Retail/Whlsle","Sales-Route/Vendor"],"Construct/EnrgyTrds":["Boiler Oper/Maker","Bricklayer/Mason","Carpenter","Carpet Installer","Concrete Worker","Constrct Proj Mgr","Contractor","Crane Operator","Electrician/Linesmn","ElevatorTech/Instl","Equip. Operator","FloorLayer/Finisher","Foreman/Supervisor","Handyman","Heat/Air Technician","Inspector","Laborer/Worker","Metalworker","Miner","Oil/GasDril/RigOpr","Other","Painter","Plstr/Drywall/Stuc","Plumber","Roofer"],Disabled:["Disabled"],"Education/Library":["Admin Assist","Audio-Visual Tech.","Child/DayCare Wrker","Clerk","Counselor","Grad. Teaching/Asst","Instructor-Vocation","Librarian/Curator","Other","Professor, College","Receptionist/Sec","Superintendent","Teacher, College","Teacher, K-12","Teaching Asst/Aide","Tutor"],"Engr/Archt/Sci/Math":["Actuary","Admin Assist","Analyst","Architect","Clerk","Clinical Data Coord.","Drafter","Engineer","Manager-Project","Manager-R&D","Mathematician","Other","Receptionist/Sec","Research Prog. Dir.","Researcher","Scientist","Sociologist","Surveyor/Mapmaker","Technician"],"Government/Military":["Accountant/Auditor","Admin Assist","Analyst","Attorney","Chief Executive","Clerk","Commissioner","Council member","Director/Administr","Enlst Mil Prsnl E1-4","Legislator","Mayor/City Manager","Meter Reader","NCO (E5-9)","Officer-Commissiond","Officer-Warrant","Other","Park Ranger","Planner","Postmaster","Receptionist/Sec","Regulator","US Postal Worker"],"Homemaker/Houseprsn":["Homemaker/Houseprsn"],"Info Tech":["Admin Assist","Analyst","Clerk","Director/Administr","Engineer-Hardware","Engineer-Software","Engineer-Systems","Executive","Manager-Systems","Network Admin","Other","Programmer","Project Coordinator","Receptionist/Sec","Support Technician","Systems Security","Technical Writer","Web Developer"],Insurance:["Accountant/Auditor","Actuarial Clerk","Actuary","Admin Assist","Agent/Broker","Analyst","Attorney","Claims Adjuster","Clerk","Commissioner","CSR","Director/Administr","Executive","Other","Product Manager","Receptionist/Sec","Sales Rep","Underwriter"],"Lgl/Law Enfcmt/Sec":["Airport Sec Ofcr","Animal Control Ofcr","Attorney","Bailiff","Corrections Officer","Court Clrk/Reporter","Deputy Sheriff","Dispatcher","Examiner","Fed Agt/Marshall","Fire Chief","Fire Fighter/Supv.","Gaming Ofcr/Invest","Highway Patrol Ofcr","Judge/Hearing Ofcr","Legal Asst./Sec","Other","Paralegal/Law Clerk","Police Chief","Police Det/Investgr","Police Offcr/Supvr","Process Server","Prvt Invest/Detec.","Security Guard","Sheriff"],"Maint/Rpr/Hsekeep":["Bldg Maint Engineer","Custodian/Janitor","Electrician","Field Service Tech.","Handyman","Heat/AirCond Repair","Housekeeper/Maid","Lndscpe/Grnds Maint","Maint Mechanic","Mechanic","Other"],"Mfg/Production":["Admin Assist","Clerk","Factory Worker","Foreman/Supervisor","Furniture Finisher","Inspector","Jeweler","Machine Operator","Other","Packer","Plant Manager","Printer/Bookbinder","Quality Control","Receptionist/Sec","Refining Operator","Shoemaker","Tailor/Custom Sewer","Textile Worker","Upholsterer"],"Med/Soc Svcs/Relig":["Admin Assist","Assist-Med/Dent/Vet","Clergy","Clerk","Client Care Worker","Dental Hygenist","Dentist","Doctor","Hospice Volunteer","Mortician","Nurse - C.N.A.","Nurse - LPN","Nurse - RN","Nurse Practitioner","Optometrist","Other","Paramedic/EM Tech","Pharmacist","Receptionist/Sec","Social Worker","Support Services","Technician","Therapist","Veterinarian"],Other:["Other"],"Person.Care/Service":["Caregiver","Dry Cleaner/Laundry","Hair Stylist/Barber","Housekeeper","Manicurist","Masseuse","Nanny","Other","Pet Services","Receptionist/Sec"],"Rest/Hotel Services":["Baker","Bartender","Bellhop","Bus Person","Caterer","Chef","Concessionaire","Concierge","Cook-Rest/Cafeteria","Cook/Wrkr-Fast Food","Delivery Person","Desk Clerk","Dishwasher","Food Prod/Packing","Host/Maitre d","Housekeeper/Maid","Manager","Other","Valet","Waiter/Waitress","Wine Steward"],Retired:["Retired"],"Sports/Recreation":["Activity/Recre.Asst","Admin Assist","Agent","Athlete","CampCounselor/Lead","Clerk","Coach","Concessionaire","Director, Program","Event Mgr/Promoter","Life Guard","Mgr - Fitness Club","Other","Park Ranger","Receptionist/Sec","Sales-Tkt/Mmbrshp","SportsBrdcstr/Journ","Trainer/Instructor","Umpire/Referee"],Student:["Graduate Student","High school","Other","Undergraduate"],"Trvl/Trnsprt/Warehs":["Admin Assist","Air Traffic Control","Airport Ops Crew","Bellhop/Porter","Clerk","Crane Loader/Oper","Dispatcher","Driver-Bus/Strcar","Driver-Taxi/Limo","Driver-Truck/Delvry","Flight Attendant","Forklift Operator","Laborer","Longshoreman","Mate/Sailor","Mgr Warehse/Dist","Other","Parking Lot Attend","Pilot/Capt/Eng","Railroad Worker","Receptionist/Sec","Shipping/RecClk","Subway/LgtRail Oper","Ticket Agent","Transportation Spec"],Unemployed:["Unemployed"]},W1={"Agr Inspect/Grader":"Agriculture Inspector/Grader",Arborist:"Arborist",Clerk:"Clerk","Equip. Operator":"Equipment Operator","Farm/Ranch Owner":"Farm/Ranch Owner","Farm/Ranch Worker":"Farm/Ranch Worker",Fisherman:"Fisherman",Florist:"Florist","Laborer/Worker":"Laborer/Worker","Landscape/NursryWkr":"Landscaper/Nursery Worker",Landscaper:"Landscaper",Logger:"Logger",Millworker:"Mill worker",Other:"Other",Ranger:"Ranger",Supervisor:"Supervisor","Timber Grader/Scale":"Timber Grader/Scale",Actor:"Actor","Admin Assist":"Administrative Assistant","Announcer/Broadcstr":"Announcer/Broadcaster","Artist/Animator":"Artist/Animator","Author/Writer":"Author/Writer","Choreography/Dancer":"Choreography/Dancer","Composer/Director":"Composer/Director",Curator:"Curator",Designer:"Designer",Editor:"Editor","Journalist/Reporter":"Journalist/Reporter","Musician/Singer":"Musician/Singer",Printer:"Printer",Producer:"Producer","Production Crew":"Production Crew",Projectionist:"Projectionist","Receptionist/Sec":"Receptionist/Secretary","Ticket Sales/Usher":"Ticket Sales/Usher","Accountant/Auditor":"Accountant/Auditor","Analyst/Broker":"Analyst/Broker",Bookkeeper:"Bookkeeper","Branch Manager":"Branch Manager",Collections:"Collections",Consultant:"Consultant",Controller:"Controller","CSR/Teller":"CSR/Teller","Director/Administr":"Director/Administrator",Executive:"Executive","Financial Advisor":"Financial Advisor","Investment Banker":"Investment Banker",Investor:"Investor","Loan/EscrowProcess":"Loan/Escrow Processor","Mgr-Credit/Loan":"Manager-Credit/Loan","Mgr-Portfolio/Prod.":"Manager-Portfolio/Production","Mgr-Property":"Manager-Property",Realtor:"Realtor","SalesAgt/Represent.":"Sales Agent/Representative","Trader,Finan Instru":"Trader, Financial Instruments",Underwriter:"Underwriter","Account Executive":"Account Executive",Buyer:"Buyer","Clerk-Office":"Clerk-Office",CSR:"Customer Service Representative","H.R. Representative":"H.R. Representative","Marketing Researchr":"Marketing Researcher","Messenger/Courier":"Messenger/Courier","Mgr - District":"Manager - District","Mgr - Finance":"Manager - Finance","Mgr-Dept/Store":"Manager - Department/Store","Mgr-General Opers":"Manager - General Operations","Mgr-H.R./PublicRel":"Manager - H.R./Public Relations","Mgr-Mkt/Sales":"Manager - Marketing/Sales","Mgr/Supervisr-Offic":"Manager/Supervisor - Office","Sales-Counter/Rentl":"Sales-Counter/Rental","Sales-Home Based":"Sales-Home Based","Sales-Mfg Rep":"Sales-Manufacture Rep","Sales-Retail/Whlsle":"Sales-Retail/Wholesale","Sales-Route/Vendor":"Sales-Route/Vendor","Boiler Oper/Maker":"Boiler Operator/Maker","Bricklayer/Mason":"Bricklayer/Mason",Carpenter:"Carpenter","Carpet Installer":"Carpet Installer","Concrete Worker":"Concrete Worker","Constrct Proj Mgr":"Construction - Project Manager",Contractor:"Contractor","Crane Operator":"Crane Operator","Electrician/Linesmn":"Electrician/Linesman","ElevatorTech/Instl":"Elevator Technician/Installer","FloorLayer/Finisher":"Floor Layer/Finisher","Foreman/Supervisor":"Foreman/Supervisor",Handyman:"Handyman","Heat/Air Technician":"Heat/Air Technician",Inspector:"Inspector",Metalworker:"Metalworker",Miner:"Miner","Oil/GasDril/RigOpr":"Oil/Gas Driller/Rig Operator",Painter:"Painter","Plstr/Drywall/Stuc":"Plaster/Drywall/Stucco",Plumber:"Plumber",Roofer:"Roofer",Disabled:"Disabled","Audio-Visual Tech.":"Audio-Visual Tech.","Child/DayCare Wrker":"Child/Daycare Worker",Counselor:"Counselor","Grad. Teaching/Asst":"Graduate Teaching Assistant","Instructor-Vocation":"Instructor-Vocation","Librarian/Curator":"Librarian/Curator","Professor, College":"Professor, College",Superintendent:"Superintendent","Teacher, College":"Teacher, College","Teacher, K-12":"Teacher, K-12","Teaching Asst/Aide":"Teaching Assistant/Aide",Tutor:"Tutor",Actuary:"Actuary",Analyst:"Analyst",Architect:"Architect","Clinical Data Coord.":"Clinical Data Coordinator",Drafter:"Drafter",Engineer:"Engineer","Manager-Project":"Manager-Project","Manager-R&D":"Manager-R&D",Mathematician:"Mathematician","Research Prog. Dir.":"Research Program Director",Researcher:"Researcher",Scientist:"Scientist",Sociologist:"Sociologist","Surveyor/Mapmaker":"Surveyor/Mapmaker",Technician:"Technician",Attorney:"Attorney","Chief Executive":"Chief Executive",Commissioner:"Commissioner","Council member":"Council member","Enlst Mil Prsnl E1-4":"Enlisted Military Personnel (E1-4)",Legislator:"Legislator","Mayor/City Manager":"Mayor/City Manager","Meter Reader":"Meter Reader","NCO (E5-9)":"NCO (E5-9)","Officer-Commissiond":"Officer-Commissioned","Officer-Warrant":"Officer-Warrant","Park Ranger":"Park Ranger",Planner:"Planner",Postmaster:"Postmaster",Regulator:"Regulator","US Postal Worker":"US Postal Worker","Homemaker/Houseprsn":"Homemaker/House person","Engineer-Hardware":"Engineer-Hardware","Engineer-Software":"Engineer-Software","Engineer-Systems":"Engineer-Systems","Manager-Systems":"Manager-Systems","Network Admin":"Network Administrator",Programmer:"Programmer","Project Coordinator":"Project Coordinator","Support Technician":"Support Technician","Systems Security":"Systems Security","Technical Writer":"Technical Writer","Web Developer":"Web Developer","Actuarial Clerk":"Actuarial Clerk","Agent/Broker":"Agent/Broker","Claims Adjuster":"Claims Adjuster","Product Manager":"Product Manager","Sales Rep":"Sales Representative","Airport Sec Ofcr":"Airport Security Officer","Animal Control Ofcr":"Animal Control Officer",Bailiff:"Bailiff","Corrections Officer":"Corrections Officer","Court Clrk/Reporter":"Court Clerk/Reporter","Deputy Sheriff":"Deputy Sheriff",Dispatcher:"Dispatcher",Examiner:"Examiner","Fed Agt/Marshall":"Federal Agent/Marshall","Fire Chief":"Fire Chief","Fire Fighter/Supv.":"Fire Fighter/Supervisor","Gaming Ofcr/Invest":"Gaming Officer/Investigator","Highway Patrol Ofcr":"Highway Patrol Officer","Judge/Hearing Ofcr":"Judge/Hearing Officer","Legal Asst./Sec":"Legal Assistant/Secretary","Paralegal/Law Clerk":"Paralegal/Law Clerk","Police Chief":"Police Chief","Police Det/Investgr":"Police Detective/Investigator","Police Offcr/Supvr":"Police Officer/Supervisor","Process Server":"Process Server","Prvt Invest/Detec.":"Private Investigator/Detective","Security Guard":"Security Guard",Sheriff:"Sheriff","Bldg Maint Engineer":"Building Maintenance Engineer","Custodian/Janitor":"Custodian/Janitor",Electrician:"Electrician","Field Service Tech.":"Field Service Technician","Heat/AirCond Repair":"Heat/Air Conditioner Repairman","Housekeeper/Maid":"Housekeeper/Maid","Lndscpe/Grnds Maint":"Landscape/Grounds Maintenance","Maint Mechanic":"Maintenance Mechanic",Mechanic:"Mechanic","Factory Worker":"Factory Worker","Furniture Finisher":"Furniture Finisher",Jeweler:"Jeweler","Machine Operator":"Machine Operator",Packer:"Packer","Plant Manager":"Plant Manager","Printer/Bookbinder":"Printer/Bookbinder","Quality Control":"Quality Control","Refining Operator":"Refining Operator",Shoemaker:"Shoemaker","Tailor/Custom Sewer":"Tailor/Custom Sewer","Textile Worker":"Textile Worker",Upholsterer:"Upholsterer","Assist-Med/Dent/Vet":"Assistant - Medic/Dent/Vet",Clergy:"Clergy","Client Care Worker":"Client Care Worker","Dental Hygenist":"Dental Hygienist",Dentist:"Dentist",Doctor:"Doctor","Hospice Volunteer":"Hospice Volunteer",Mortician:"Mortician","Nurse - C.N.A.":"Nurse - C.N.A.","Nurse - LPN":"Nurse - LPN","Nurse - RN":"Nurse - RN","Nurse Practitioner":"Nurse Practitioner",Optometrist:"Optometrist","Paramedic/EM Tech":"Paramedic/E.M. Technician",Pharmacist:"Pharmacist","Social Worker":"Social Worker","Support Services":"Support Services",Therapist:"Therapist",Veterinarian:"Veterinarian",Caregiver:"Caregiver","Dry Cleaner/Laundry":"Dry Cleaner/Laundry","Hair Stylist/Barber":"Hair Stylist/Barber",Housekeeper:"Housekeeper",Manicurist:"Manicurist",Masseuse:"Masseuse",Nanny:"Nanny","Pet Services":"Pet Services",Baker:"Baker",Bartender:"Bartender",Bellhop:"Bellhop","Bus Person":"Bus Person",Caterer:"Caterer",Chef:"Chef",Concessionaire:"Concessionaire",Concierge:"Concierge","Cook-Rest/Cafeteria":"Cook - Restaurant/Cafeteria","Cook/Wrkr-Fast Food":"Cook/Worker-Fast Food","Delivery Person":"Delivery Person","Desk Clerk":"Desk Clerk",Dishwasher:"Dishwasher","Food Prod/Packing":"Food Production/Packing","Host/Maitre d":"Host/Maitre d",Manager:"Manager",Valet:"Valet","Waiter/Waitress":"Waiter/Waitress","Wine Steward":"Wine Steward",Retired:"Retired","Activity/Recre.Asst":"Activity/Recreational Assistant",Agent:"Agent",Athlete:"Athlete","CampCounselor/Lead":"Camp Counselor/Lead",Coach:"Coach","Director, Program":"Director, Program","Event Mgr/Promoter":"Event Manager/Promoter","Life Guard":"Life Guard","Mgr - Fitness Club":"Manager - Fitness Club","Sales-Tkt/Mmbrshp":"Sales-Ticket/Membership","SportsBrdcstr/Journ":"Sports Broadcaster/Journalist","Trainer/Instructor":"Trainer/Instructor","Umpire/Referee":"Umpire/Referee","Graduate Student":"Graduate Student","High school":"High school",Undergraduate:"Undergraduate","Air Traffic Control":"Air Traffic Control","Airport Ops Crew":"Airport Operations Crew","Bellhop/Porter":"Bellhop/Porter","Crane Loader/Oper":"Crane Loader/Operator","Driver-Bus/Strcar":"Driver - Bus/Streetcar","Driver-Taxi/Limo":"Driver-Taxi/Limo","Driver-Truck/Delvry":"Driver-Truck/Delivery","Flight Attendant":"Flight Attendant","Forklift Operator":"Forklift Operator",Laborer:"Laborer",Longshoreman:"Longshoreman","Mate/Sailor":"Mate/Sailor","Mgr Warehse/Dist":"Manager - Warehouse/District","Parking Lot Attend":"Parking Lot Attendant","Pilot/Capt/Eng":"Pilot/Captain/Engineer","Railroad Worker":"Railroad Worker","Shipping/RecClk":"Shipping/Receiving Clerk","Subway/LgtRail Oper":"Subway/Light Rail Operator","Ticket Agent":"Ticket Agent","Transportation Spec":"Transportation Specialist",Unemployed:"Unemployed"},eh=X1,h0=W1;function Cc(n,r){if(typeof n!="string")return n;const l=n.trim();if(!l)return n;if(r[l])return l;const o=l.toLowerCase();return Object.keys(r).find(f=>f.toLowerCase()===o||r[f]?.toLowerCase()===o)??n}function No(n){return Cc(n,_0)}function p0(n){return Cc(n,m0)}function y0(n){return Cc(n,h0)}function J1(n){return n.trim().toLowerCase()}function th(n){if(typeof n!="string")return null;const r=n.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!r)return null;const l=Number(r[1]),o=Number(r[2]),c=Number(r[3]);if(!Number.isFinite(l)||!Number.isFinite(o)||!Number.isFinite(c)||o<1||o>12||c<1||c>31)return null;const f=new Date(Date.UTC(l,o-1,c));return f.getUTCFullYear()!==l||f.getUTCMonth()!==o-1||f.getUTCDate()!==c?null:f.getTime()}function Br(n,r){if(!r.effectiveDateKey||!r.expirationDateKey)return!1;const l=th(n[r.expirationDateKey]),o=th(n[r.effectiveDateKey]);return l==null||o==null?!1:l<o}const eE=new Set(["HomePolicy","BundlePolicy"]);function yo(n,r,l){return String(n.key??"")!=="lapse_in_coverage"||!l||!eE.has(l)?!0:r.home_prior_carrier_name!=="NoPriorInsurance"}function Oc(n){let r=null,l=null,o=null;const c=new Set,f=new Set,m=g=>{const p=String(g.key??""),b=J1(String(g.question??""));!r&&(p==="auto_prior_carrier_name"||p==="home_prior_carrier_name"||b.includes("current auto insurance company"))&&(r=p),!l&&(p==="effective_date"||b.includes("when do you need your insurance to begin"))&&(l=p),!o&&(p==="auto_prior_expiration_date"||p==="home_prior_expiration_date"||b.includes("when does the current policy expire"))&&(o=p),(p==="auto_reason_for_no_insurance"||b.includes("reason you are not currently insured")||b.includes("reason for lapse in coverage"))&&c.add(p),(p==="auto_prior_years"||p==="auto_prior_months"||p==="auto_continuous_coverage_years"||p==="auto_prior_expiration_date"||p==="auto_current_annual_premium_cents"||p==="auto_prior_liability_limit")&&f.add(p)};n.forEach(m);const _=g=>{g.forEach(p=>{(p.conditionals??[]).forEach(b=>{const R=b.conditionalQuestions??[];R.forEach(m),_(R)})})};return _(n),{currentCarrierKey:r,effectiveDateKey:l,expirationDateKey:o,noInsuranceReasonKeys:c,hideWhenNoPriorInsuranceKeys:f}}function qi(n,r){return r.currentCarrierKey==="home_prior_carrier_name"&&n.home_prior_carrier_name==="NoPriorInsurance"&&n.auto_prior_carrier_name!=="NoPriorInsurance"?!1:(r.currentCarrierKey?n[r.currentCarrierKey]:void 0)==="NoPriorInsurance"?!0:!r.effectiveDateKey||!r.expirationDateKey||r.expirationDateKey==="home_prior_expiration_date"&&Br(n,r)?!1:Br(n,r)}function go(n,r,l){const o=String(n.key??"");if(l.noInsuranceReasonKeys.has(o)&&l.currentCarrierKey==="home_prior_carrier_name"&&r.home_prior_carrier_name==="NoPriorInsurance"&&r.auto_prior_carrier_name!=="NoPriorInsurance")return!1;const f=(l.currentCarrierKey?r[l.currentCarrierKey]:void 0)==="NoPriorInsurance";return f&&l.hideWhenNoPriorInsuranceKeys.has(o)?!1:!l.noInsuranceReasonKeys.has(o)||f?!0:qi(r,l)}function Mo(n,r){const l=String(n.key??"");return r.noInsuranceReasonKeys.has(l)}const tE=["ACURA","ALFA ROMEO","ASTON MARTIN","AUDI","BENTLEY","BMW","BUGATTI","BUICK","CADILLAC","CHEVROLET","CHRYSLER","CRUISE","DODGE","FERRARI","FIAT","FORD","FREIGHTLINER","GENESIS","GLOBAL ELECTRIC MOTORS","GMC","HONDA","HYUNDAI","INFINITI","JAGUAR","JEEP","KARMA AUTOMOTIVE","KIA","LAMBORGHINI","LAND ROVER","LEXUS","LINCOLN","LOTUS","MASERATI","MAZDA","MCLAREN AUTOMOTIVE","MERCEDES-BENZ","MINI","MITSUBISHI","NISSAN","POLESTAR","PORSCHE","RAM","ROLLS-ROYCE","SUBARU","TESLA","TOYOTA","VOLKSWAGEN","VOLVO"],Nc="credify_quote_id",Mc="credify_auth_token";function nE(n){try{localStorage.setItem(Nc,n)}catch(r){console.error("Failed to save quoteId to localStorage:",r)}}function aE(){try{return localStorage.getItem(Nc)}catch(n){return console.error("Failed to load quoteId from localStorage:",n),null}}function g0(){try{localStorage.removeItem(Nc)}catch(n){console.error("Failed to clear quoteId from localStorage:",n)}}function rE(n){try{localStorage.setItem(Mc,n)}catch(r){console.error("Failed to save authToken to localStorage:",r)}}function iE(){try{return localStorage.getItem(Mc)}catch(n){return console.error("Failed to load authToken from localStorage:",n),null}}function v0(){try{localStorage.removeItem(Mc)}catch(n){console.error("Failed to clear authToken from localStorage:",n)}}function lE(){g0(),v0()}const _n="https://api.getcredify.com";let Ur=null;function nh(n){Ur=n,rE(n)}function $i(){return Ur}function dc(){const n=iE();n&&(Ur=n)}function b0(){Ur=null,v0()}async function hn(n,r){const l={"Content-Type":"application/json"};Ur&&(l.Authorization=`Bearer ${Ur}`);const o=await fetch(n,{method:"POST",headers:l,body:JSON.stringify(r)});if(!o.ok){let c=`Request failed with status ${o.status}`;try{c=(await o.json()).error||c}catch{c=o.statusText||c}const f=new Error(c);throw f.statusCode=o.status,f}return o}async function oE(n){try{return await n.json()}catch{return{}}}async function uE(n,r){const l=r?{stage:n,quoteId:r}:{stage:n};return await(await hn(`${_n}/get-questions-by-stage`,l)).json()}async function _o(n){const r=n?{quoteId:n}:{};return await(await hn(`${_n}/get-stages-for-quote`,r)).json()}async function sE(n){const l=await(await hn(`${_n}/create-quote`,{postal_code:n})).json();if(!l||typeof l!="object"||!l.quoteId)throw new Error(`Invalid createQuote response: ${JSON.stringify(l)}`);return l}async function cE(n,r){return await(await hn(`${_n}/verify-quote`,{action:"send",quoteId:n,phone:r})).json()}async function wr(n,r,l){const o={payload:n,getRates:r};l&&typeof l=="string"&&l.trim()!==""&&(o.quoteId=l);const c=await hn(`${_n}/update-quote`,o),f=await oE(c);return!f||typeof f!="object"||!("status"in f)||f.status==null?{status:"success"}:f}async function ah(n,r){return await(await hn(`${_n}/verify-quote`,{quoteId:n,smsCode:r})).json()}async function fE(n,r){const l={state:n};return r&&typeof r=="string"&&r.trim()!==""&&(l.quoteId=r),await(await hn(`${_n}/is-supported-state`,l)).json()}async function rh(){return await(await hn(`${_n}/get-rates`,{})).json()}async function ih(n){const r=n?{quoteId:n}:{};return await(await hn(`${_n}/get-quote`,r)).json()}async function lh(n){return(await hn(`${_n}/get-vehicle-options`,n)).json()}async function dE(n){return(await hn(`${_n}/get-vehicle-options`,{...n,action:"vinDecode"})).json()}async function mE(n){const l=await(await hn(`${_n}/request-bind`,{quoteRateId:n})).json();return l&&typeof l=="object"&&"success"in l?l:{success:!0}}const Ws=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]),_E={None:"None","30000/60000/25000":"30/60k","30000/60000/30000":"30/60k","50000/100000/30000":"50/100k","50000/100000/50000":"50/100k","100000/300000/50000":"100/300k","100000/300000/100000":"100/300k","250000/500000/100000":"250/500k","250000/500000/250000":"250/500k","300000/500000/250000":"300/500k","300000/500000/300000":"300/500k","500000/500000/300000":"500k CSL","500000/500000/500000":"500k CSL","500000/1000000/300000":"500k/1M","500000/1000000/500000":"500k/1M"},oh={auto_prior_carrier_name:i1,auto_prior_liability_limit:s1,auto_reason_for_no_insurance:c1,residence_type:l1,home_prior_carrier_name:o1,policy_bi:f1,policy_um:d1,policy_pd:m1,policy_mp:_1,policy_umpd:h1,policy_pip:p1,policy_auto_death_indemnity:y1,vehicle_comp_deductible:cc,vehicle_coll_deductible:cc,vehicle_towing_and_labor:fc,vehicle_transportation_expense:d0,education_level:m0,industry:_0,occupation:h0,usage:u1,architectural_style:E1,dwelling_type:T1,occupancy_type:C1,construction_quality:O1,construction_type:N1,foundation_type:M1,located_over_water:D1,number_of_stories:x1,exterior_wall_type:w1,roof_material_type:R1,roof_shape:L1,roof_updated_type:z1,heating_type:B1,oil_tank_location:k1,basement_type:U1,plumbing_type:j1,personal_liability:H1,dwelling_medical_payments:I1,all_perils_deductible:$1,windstorm_deductible:Z1,distance_from_fire_hydrant_ft:G1,distance_from_fire_station_miles:F1,employment_industry:X_,marital_status:W_,gender:J_,co_applicant_employment_industry:X_,co_applicant_marital_status:W_,co_applicant_gender:J_,description:Y1,tort_threshold:q1,pip_coverage_type:V1,extended_medical:P1,additional_pip:K1,policy_pip_deductible:Q1},hE=["OTHER / NOT LISTED"],pE=["SEDAN","SUV","COUPE","HATCHBACK","PICKUP","VAN","WAGON","OTHER"],yE=["Other"];function Jt(n){const r=n.getUTCFullYear(),l=String(n.getUTCMonth()+1).padStart(2,"0"),o=String(n.getUTCDate()).padStart(2,"0");return`${r}-${l}-${o}`}function uh(n){const r=n.replace(/\D+/g,"");if(r!=="")return r1(r)}function gE(n){return n==="-"||n==="+"||n==="."||n==="e"||n==="E"}const vE={year_built:4,year_roof_updated:4,heating_update_year:4,plumbing_update_year:4,electrical_update_year:4,total_area_sq_ft:6,sale_price_cents:9,dwelling_replacement_cost:9,other_structures_coverage:9,personal_property_coverage:7,amount_paid_cents:7,loss_of_use_coverage:8,home_prior_years:2,home_continuous_coverage_years:2,number_of_dogs:2,number_of_units:2,months_at_address:2,years_at_address:3,years_at_prior_address:3,distance_to_coast_miles:4,household_size:1,number_of_families:1,number_of_mortgagees:1,annual_mileage:6,miles_to_work:4,custom_equipment_value_cents:7,cost_new_value_cents:7,stated_value_amount_cents:7,property_damage_amount_paid_cents:7,personal_injury_amount_paid_cents:7,auto_current_annual_premium_cents:7,auto_prior_years:2,auto_prior_months:2,auto_continuous_coverage_years:2},sh=new Set(["sale_price_cents","dwelling_replacement_cost","other_structures_coverage","personal_property_coverage","loss_of_use_coverage","custom_equipment_value_cents","cost_new_value_cents","stated_value_amount_cents","property_damage_amount_paid_cents","personal_injury_amount_paid_cents","auto_current_annual_premium_cents","amount_paid_cents"]),bE=new Set(["total_area_sq_ft","annual_mileage","miles_to_work","distance_to_coast_miles"]),ho={first_name:"given-name",last_name:"family-name",co_applicant_first_name:"given-name",co_applicant_last_name:"family-name",date_of_birth:"bday",co_applicant_date_of_birth:"bday",sms_code:"one-time-code",vin:"off",license_number:"off",effective_date:"off"},SE={license_number:20};function AE(n){const r=new Date,l=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()));if(n==="effective_date"){const o=new Date(Date.UTC(l.getUTCFullYear(),l.getUTCMonth()+3,l.getUTCDate()));return{min:Jt(l),max:Jt(o)}}if(n==="home_prior_expiration_date"){const o=new Date(Date.UTC(l.getUTCFullYear()-1,l.getUTCMonth(),l.getUTCDate())),c=new Date(Date.UTC(l.getUTCFullYear()+1,l.getUTCMonth(),l.getUTCDate()));return{min:Jt(o),max:Jt(c)}}if(n==="date_of_incident")return{max:Jt(l)};if(n==="move_in_date")return{max:Jt(l)};if(n==="purchase_date")return{max:Jt(l)};if(n==="date_of_birth")return{max:Jt(l)};if(n==="date_first_licensed")return{max:Jt(l)};if(n==="occurred_at")return{max:Jt(l)};if(n==="accident_prevention_course_date")return{max:Jt(l)};if(n==="auto_prior_expiration_date"){const o=new Date(Date.UTC(l.getUTCFullYear()-1,l.getUTCMonth(),l.getUTCDate())),c=new Date(Date.UTC(l.getUTCFullYear()+1,l.getUTCMonth(),l.getUTCDate()));return{min:Jt(o),max:Jt(c)}}return{}}const EE=new Set(["Disabled","Retired","Unemployed","Other"]);function Js(n,r,l){const o=String(n.key??"");if(o!=="occupation"&&o!=="co_applicant_occupation"||o==="co_applicant_occupation")return!0;const c=Nt(r,l,"industry"),f=Nt(r,l,"employment_industry"),m=String(c??f??"").trim();return!EE.has(m)}function ec(n,r,l,o){return s0(n,o,l)}function vo(n){return n.inputType!=="radio"||!n.options||n.options.length!==1||n.options[0]!=="Yes"?!1:(n.conditionals??[]).some(l=>l.conditionalQuestionsAllowMultiple&&l.conditionalType==="equals"&&l.conditionalValue==="Yes")}function ch(n,r){return vo(n)?"Yes":r}function fh(n){return typeof n=="number"&&Number.isFinite(n)?n:typeof n=="string"&&n.trim()!==""&&!Number.isNaN(Number(n))?Number(n):null}function dh(n){if(n instanceof Date&&!Number.isNaN(n.getTime()))return n.getTime();if(typeof n=="string"){const r=Date.parse(n);return Number.isNaN(r)?null:r}return null}function mh(n,r){const l=fh(n),o=fh(r);if(l!=null&&o!=null)return l-o;const c=dh(n),f=dh(r);return c!=null&&f!=null?c-f:n==null||r==null?null:String(n).localeCompare(String(r))}function TE(n,r){return Array.isArray(n)?n.some(l=>l===r):typeof n=="string"?r!=null&&n.includes(String(r)):!1}function Ui(n,r,l){switch(r){case"equals":return n===l;case"notEquals":return n!==l&&n!==""&&n!=null;case"lessThan":{const o=mh(n,l);return o!=null&&o<0}case"greaterThan":{const o=mh(n,l);return o!=null&&o>0}case"contains":return TE(n,l);case"startsWith":return n!=null&&l!=null&&String(n).startsWith(String(l));case"endsWith":return n!=null&&l!=null&&String(n).endsWith(String(l));default:return!1}}function Zi(n,r){return r.reduce((l,o)=>l?.[o],n)}function Sn(n,r,l){if(r.length===0)return n;const[o,...c]=r;if(c.length===0){if(typeof o=="number"){const p=(Array.isArray(n)?n:[]).slice();return p[o]=l,p}return{...n,[o]:l}}const f=n?.[o],m=typeof c[0]=="number"?Array.isArray(f)?f:[]:f&&typeof f=="object"?f:{},_=Sn(m,c,l);if(typeof o=="number"){const p=(Array.isArray(n)?n:[]).slice();return p[o]=_,p}return{...n,[o]:_}}function Nt(n,r,l){return Zi(n,[...r??[],l])}function Lt(n,r,l,o){return Sn(n,[...r??[],l],o)}function CE(n,r){return n?.length?`${n.join("-")}-${r}`:r}const OE="__items",po=n=>`${n}${OE}`;function $t(n){return n==null?"":typeof n=="string"?n:String(n)}function _h(n){return n==null?"":typeof n=="number"&&Number.isFinite(n)||typeof n=="string"?n:""}function NE(n){return n==null?"":typeof n=="string"||typeof n=="number"?n:String(n)}function ME({questions:n,initialValues:r,controlledValues:l,onChangeValues:o,onSubmit:c,quoteId:f,widgetStageKey:m}){const _=H.useMemo(()=>yc(n),[n]),g=H.useMemo(()=>Oc(_),[_]),p=H.useMemo(()=>m==="BundlePolicy"?!0:_.some(O=>String(O.key)==="home_prior_carrier_name")&&_.some(O=>String(O.key)==="driver_vehicle_assignments"),[m,_]),b=H.useMemo(()=>{const O={};return r&&Object.assign(O,r),O},[r]),[R,j]=H.useState(b);H.useEffect(()=>{j(b)},[b]);const[B,G]=H.useState({}),k=H.useMemo(()=>({...B,...l??R}),[B,l,R]);H.useEffect(()=>{l&&G(O=>({...O,...l}))},[l]);const[fe,le]=H.useState({}),de=H.useRef(new Map),te=H.useRef(new Set),[,ie]=H.useState({}),[W,re]=H.useState({}),me=H.useRef(!1);H.useEffect(()=>{!f||me.current||!_.some(T=>T.key==="year"||T.key==="make"||T.key==="model"||T.key==="body_style")||(me.current=!0,lh({quoteId:f}).catch(()=>{}))},[f,_]);const[ne,he]=H.useState({}),[Ae,Ee]=H.useState({}),Ne=H.useCallback(async(O,T)=>{if(!f||!Q_(T))return;const S=O?O.join("-"):"_root";he(I=>({...I,[S]:!0})),Ee(I=>({...I,[S]:null}));try{const I=await dE({quoteId:f,vin:T});if(I.error){Ee(P=>({...P,[S]:I.error}));return}let w=k;I.year&&(w=Lt(w,O,"year",String(I.year))),I.make&&(w=Lt(w,O,"make",I.make)),I.model&&(w=Lt(w,O,"model",I.model)),I.bodyStyle&&(w=Lt(w,O,"body_style",I.bodyStyle)),l&&o?o(w):j(w),G(w),de.current.clear(),te.current.clear(),ie({})}catch{Ee(I=>({...I,[S]:"VIN lookup failed — please enter vehicle details manually"}))}finally{he(I=>({...I,[S]:!1}))}},[f,k,l,o]),Ke=H.useCallback(O=>{const T=`${O.year}|${O.make??""}|${O.model??""}`,S=O.model?"bodyStyles":O.make?"models":"makes",I=de.current.get(T);return I?I[S]??[]:void 0},[]),We=H.useCallback((O,T)=>{if(!f)return;const S=`${T.year}|${T.make??""}|${T.model??""}`,I=T.model?"bodyStyles":T.make?"models":"makes",w=`${O}:${I}`;de.current.has(S)||te.current.has(S)||(te.current.add(S),re(P=>({...P,[w]:!0})),lh({quoteId:f,...T}).then(P=>{de.current.set(S,P),ie(X=>({...X,[w]:P[I]??[]}))}).catch(()=>{de.current.set(S,{}),ie(P=>({...P,[w]:[]}))}).finally(()=>{te.current.delete(S),re(P=>({...P,[w]:!1}))}))},[f]);function ce(O,T,S){const I=k,w=O?Zi(k,O)??{}:I;return O?{state:I.state,...w,[T]:S}:{...w,[T]:S}}function E(O,T){const S=f0.filter(w=>w.targetKey===O||w.dependsOn.includes(O)),I={[O]:void 0};for(const w of S){const P=w.validate(T);w.targetKey in I?P!==void 0&&(I[w.targetKey]=P):I[w.targetKey]=P}le(w=>({...w,...I}))}const D=(O,T,S)=>{const I=Nt(k,S,O);if(va(I,T)){fe[O]&&le(P=>({...P,[O]:void 0}));return}const w=uc(O,I);if(w){le(P=>({...P,[O]:w}));return}E(O,ce(S,O,I))};H.useEffect(()=>{let O=k,T=!1;_.forEach(S=>{if(!vo(S))return;const I=String(S.key);Nt(O,void 0,I)!=="Yes"&&(O=Lt(O,void 0,I,"Yes"),T=!0)}),T&&(l&&o?o(O):j(O),G(O))},[_,k,l,o]);function $(O,T){const S=O.key;if((S==="relationship_to_insured"||S==="is_registered_owner")&&T){const K=T[T.length-1];if(typeof K=="number"&&K===0)return null}if((S==="purchase_date"||S==="cost_new_value_cents")&&T)return null;if(S==="custom_equipment_value_cents"&&T){const K=Nt(k,T,"vehicle_has_modifications");if(K!=="Yes"&&K!==!0)return null}const I=S==="auto_reason_for_no_insurance"&&g.currentCarrierKey?k[g.currentCarrierKey]==="NoPriorInsurance"?"Reason you are not currently insured":"Reason for lapse in coverage":O.question,w=O.hint,P=Nt(k,T,S),X=Mo(O,g)?qi(k,g):S==="social_security_number"&&Co(k.state??k.State)?!0:O.required,ee=fe[S],oe=K=>{let Q=Lt(k,T,S,K);if(O.inputType==="radio"&&O.conditionals){const J=O.conditionals??[];for(const pe of J){const Oe=Nt(k,T,S),Me=Ui(Oe,pe.conditionalType,pe.conditionalValue),ye=Ui(K,pe.conditionalType,pe.conditionalValue);if(Me&&!ye&&pe.conditionalQuestionsAllowMultiple){const Qe=pe.conditionalQuestions??[];if(Qe.length>0){const ue=po(S);Q=Sn(Q,[...T??[],ue],[]);const $e=(Te,ke)=>{Te.forEach(Je=>{(Je.conditionals??[]).forEach(Ft=>{if(Ft.conditionalQuestionsAllowMultiple){const Ue=po(Je.key);Q=Sn(Q,[...ke,Ue],[])}const Yt=Ft.conditionalQuestions??[];Yt.length>0&&$e(Yt,ke)})})};$e(Qe,[...T??[],ue])}}}}l&&o?o(Q):j(Q),G(Q)};if(S==="vehicle_policy_selections"){const K=k.vehicles__items??[],Q=k.drivers__items??[];if(K.length===0)return y.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles first to configure coverage selections."},S);const J=k.driver_vehicle_assignments??{},pe=Q.length>1,Oe=Ue=>Object.entries(Ue).map(([we,He])=>({value:we,label:He})),Me=Co(k.state??k.State),ye=(Ue,we)=>Object.fromEntries(Ue.filter(He=>He in we).map(He=>[He,we[He]])),ue=Oe(ye(Me?g1:v1,cc)),$e=Me?ye(b1,fc):fc,Te=Oe($e),Je=Oe(ye(Me?S1:A1,d0)),At=(Ue,we,He)=>{const ft=Sn(k,["vehicles__items",Ue,we],He);l&&o?o(ft):j(ft),G(ft)},Ft=(Ue,we,He)=>{const ft={...J},Dt=`v${Ue}`;ft[Dt]={...ft[Dt]??{}},ft[Dt][`d${we}`]=He;const ze=Sn(k,["driver_vehicle_assignments"],ft);l&&o?o(ze):j(ze),G(ze)},Yt=Ue=>{if(!pe)return null;const we=J[`v${Ue}`];if(!we)return null;const He=Q.map((ze,yt)=>we[`d${yt}`]??0),ft=He.filter(ze=>ze>0);if(ft.length>=2&&ft.every(ze=>ze===ft[0])&&ft[0]===50)return`Assignments for Vehicle ${Ue+1} cannot be 50 percent for both Drivers.`;const Dt=He.reduce((ze,yt)=>ze+yt,0);return Dt>0&&Dt!==100?`Driver percentages for this vehicle must add up to 100% (currently ${Dt}%).`:null};return y.jsx("div",{children:K.map((Ue,we)=>{const He=[Ue.year,Ue.make,Ue.model].filter(Boolean).join(" ")||`Vehicle ${we+1}`,ft=Yt(we),Dt=ze=>typeof Ue[ze]=="string"?Ue[ze]:"";return y.jsxs("fieldset",{style:{border:`1px solid ${ft?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[y.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:He}),y.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"12px"},children:[y.jsx(Bi,{id:`veh-${we}-comp`,label:"Comprehensive deductible",required:!0,placeholder:"Select...",options:ue,value:Dt("vehicle_comp_deductible"),onChange:ze=>At(we,"vehicle_comp_deductible",ze.currentTarget.value)}),y.jsx(Bi,{id:`veh-${we}-coll`,label:"Collision deductible",required:!0,placeholder:"Select...",options:ue,value:Dt("vehicle_coll_deductible"),onChange:ze=>At(we,"vehicle_coll_deductible",ze.currentTarget.value)}),y.jsx(Bi,{id:`veh-${we}-tow`,label:"Towing and Labor",required:!0,placeholder:"Select...",options:Te,value:Dt("vehicle_towing_and_labor"),onChange:ze=>At(we,"vehicle_towing_and_labor",ze.currentTarget.value)}),y.jsx(Bi,{id:`veh-${we}-trans`,label:"Transportation expense",required:!0,placeholder:"Select...",options:Je,value:Dt("vehicle_transportation_expense"),onChange:ze=>At(we,"vehicle_transportation_expense",ze.currentTarget.value)})]}),pe&&y.jsxs("div",{style:{marginTop:"16px"},children:[y.jsx("p",{style:{fontWeight:600,margin:"0 0 8px"},children:"Drivers usage (%)"}),y.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:Q.map((ze,yt)=>{const tn=[ze.first_name,ze.last_name].filter(Boolean).join(" ")||`Driver ${yt+1}`,nn=J[`v${we}`]?.[`d${yt}`];return y.jsx("div",{style:{flex:"0 0 140px"},children:y.jsx(Vs,{id:`assignment-v${we}-d${yt}`,label:`${tn} %`,value:nn??"",min:0,max:100,step:1,inputMode:"numeric",onChange:pn=>{const Dn=pn.currentTarget.value.replace(/\D+/g,"");Ft(we,yt,Dn===""?0:Math.min(100,parseInt(Dn,10)))}})},`${we}-${yt}`)})}),ft&&y.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:ft})]})]},we)})},S)}if(S==="driver_vehicle_assignments"){const K=k.vehicles__items??[],Q=k.drivers__items??[];if(p&&Q.length<=1)return null;if(K.length===0||Q.length===0)return y.jsx("p",{style:{color:"#666",fontStyle:"italic"},children:"Add vehicles and drivers first to configure driver usage percentages."},S);const J=k.driver_vehicle_assignments??{},pe=(Me,ye,Qe)=>{const ue={...J},$e=`v${Me}`;ue[$e]={...ue[$e]??{}},ue[$e][`d${ye}`]=Qe,oe(ue)},Oe=Me=>{if(Q.length<2)return null;const ye=J[`v${Me}`];if(!ye)return null;const Qe=Q.map((Te,ke)=>ye[`d${ke}`]??0),ue=Qe.filter(Te=>Te>0);if(ue.length>=2&&ue.every(Te=>Te===ue[0])&&ue[0]===50)return`Assignments for Vehicle ${Me+1} cannot be 50 percent for both Drivers.`;const $e=Qe.reduce((Te,ke)=>Te+ke,0);return $e>0&&$e!==100?`Driver percentages for this vehicle must add up to 100% (currently ${$e}%).`:null};return y.jsxs("div",{children:[y.jsx("h4",{style:{marginBottom:"12px"},children:I}),K.map((Me,ye)=>{const Qe=[Me.year,Me.make,Me.model].filter(Boolean).join(" ")||`Vehicle ${ye+1}`,ue=Oe(ye);return y.jsxs("fieldset",{style:{border:`1px solid ${ue?"#dc3545":"#ddd"}`,borderRadius:"8px",padding:"16px",marginBottom:"16px"},children:[y.jsx("legend",{style:{fontWeight:600,padding:"0 8px"},children:Qe}),y.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px"},children:Q.map(($e,Te)=>{const ke=[$e.first_name,$e.last_name].filter(Boolean).join(" ")||`Driver ${Te+1}`,Je=J[`v${ye}`]?.[`d${Te}`];return y.jsx("div",{style:{flex:"0 0 140px"},children:y.jsx(Vs,{id:`assignment-v${ye}-d${Te}`,label:`${ke} %`,value:Je??"",min:0,max:100,step:1,inputMode:"numeric",onChange:At=>{const Ft=At.currentTarget.value.replace(/\D+/g,"");pe(ye,Te,Ft===""?0:Math.min(100,parseInt(Ft,10)))}})},`${ye}-${Te}`)})}),ue&&y.jsx("p",{style:{color:"#dc3545",fontSize:"0.85rem",marginTop:"8px",marginBottom:0},children:ue})]},ye)})]},S)}switch(O.inputType){case"text":{if(S==="vin"&&f){const K=T?T.join("-"):"_root",Q=ne[K]??!1,J=Ae[K]??null,pe=[w?`${S}-hint`:null,ee?`${S}-error`:null,J?`${S}-vin-error`:null].filter(Boolean).join(" ");return y.jsxs("div",{children:[y.jsx(en,{id:S,label:I,hint:w,error:ee,required:X,children:y.jsxs("div",{className:"flex items-end gap-2",children:[y.jsx("div",{className:"flex-1 min-w-0",children:y.jsx("input",{id:S,className:`form-input ${ee?"input-error":""}`,"aria-invalid":!!ee,"aria-describedby":pe||void 0,"aria-required":X||void 0,required:X,value:$t(P),maxLength:17,onChange:Oe=>oe(Oe.currentTarget.value),onBlur:()=>D(S,"text",T),autoComplete:ho[S],type:"text"})}),y.jsx("button",{type:"button",disabled:Q||!Q_($t(P)),className:"btn btn-outline shrink-0 self-end !w-auto min-w-[8.5rem] px-4 whitespace-nowrap disabled:opacity-50",onClick:()=>Ne(T,$t(P)),children:Q?"Looking up...":"Verify VIN"})]})}),J&&y.jsx("p",{id:`${S}-vin-error`,className:"text-sm text-red-600 mt-1",children:J})]},S)}if(S==="sms_code"){const K=$t(P);return y.jsx(qs,{id:S,label:I,hint:w,value:K,inputMode:"numeric",pattern:"[0-9]*",maxLength:6,onChange:Q=>{const J=Q.currentTarget.value.replace(/\D+/g,"").slice(0,6);oe(J)},onBlur:()=>D(S,"text",T),"aria-required":X||void 0,error:ee,autoComplete:ho[S]},S)}if(S==="license_number")return y.jsx(qs,{id:S,label:I,hint:w,value:$t(P),onChange:K=>oe(K.currentTarget.value.replace(/[^A-Z0-9]/gi,"").slice(0,20)),onBlur:()=>D(S,"text",T),"aria-required":X||void 0,error:ee,autoComplete:"off",maxLength:20},S);if(S==="social_security_number"){const K=Nt(k,T,"ssn_display"),Q=typeof K=="string"?K:"",J=Q?`${Q}. Re-enter to update.${w?` ${w}`:""}`:w;return y.jsx(Wy,{id:S,label:I,hint:J,value:$t(P),onChange:pe=>oe(pe.currentTarget.value),onBlur:()=>D(S,"text",T),"aria-required":X||void 0,error:ee},S)}return y.jsx(qs,{id:S,label:I,hint:w,value:$t(P),onChange:K=>oe(K.currentTarget.value),onBlur:()=>D(S,"text",T),"aria-required":X||void 0,error:ee,autoComplete:ho[S],maxLength:SE[S]},S)}case"email":return y.jsx(Jy,{id:S,label:I,value:$t(P),onChange:K=>oe(K.currentTarget.value),onBlur:()=>D(S,"email",T),"aria-required":X||void 0,error:ee},S);case"password":return y.jsx(ng,{id:S,label:I,value:$t(P),onChange:K=>oe(K.currentTarget.value),onBlur:()=>D(S,"password",T),"aria-required":X||void 0,error:ee},S);case"tel":return y.jsxs(y.Fragment,{children:[y.jsx(eg,{id:S,label:I,value:$t(P),onChange:K=>oe(K.currentTarget.value),onBlur:()=>D(S,"tel",T),"aria-required":X||void 0,error:ee},S),S==="phone"&&y.jsxs("div",{className:"mt-3 text-xs text-slate-600 space-y-1",children:[y.jsx("p",{children:"We verify your number before showing your quotes — you'll get a 6-digit code next. This is just to confirm your number, not a sales call."}),y.jsx("p",{children:"Message & data rates may apply. One message per request."}),y.jsxs("p",{children:["See our"," ",y.jsx("a",{href:"https://getcredify.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})," ","and"," ",y.jsx("a",{href:"https://getcredify.com/terms-of-service",target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Terms of Service"}),"."]})]})]});case"url":return y.jsx(tg,{id:S,label:I,value:$t(P),onChange:K=>oe(K.currentTarget.value),onBlur:()=>D(S,"url",T),"aria-required":X||void 0,error:ee},S);case"number":{const K=vE[S];return sh.has(S)||bE.has(S)?y.jsx(Xy,{id:S,label:I,hint:w,value:_h(P),isCurrency:sh.has(S),maxDigits:K,onChange:Q=>oe(uh(Q.currentTarget.value)),onBlur:()=>D(S,"number",T),"aria-required":X||void 0,error:ee},S):y.jsx(Vs,{id:S,label:I,hint:w,value:_h(P),inputMode:"numeric",pattern:"[0-9]*",onKeyDown:Q=>{if(gE(Q.key)){Q.preventDefault();return}K!==void 0&&/^\d$/.test(Q.key)&&String(Q.currentTarget.value).replace(/\D/g,"").length>=K&&Q.preventDefault()},onChange:Q=>{let J=Q.currentTarget.value;K!==void 0&&(J=J.slice(0,K)),oe(uh(J))},onBlur:()=>D(S,"number",T),"aria-required":X||void 0,error:ee},S)}case"textarea":return y.jsx(ag,{id:S,label:I,value:$t(P),onChange:K=>oe(K.currentTarget.value),onBlur:()=>D(S,"textarea",T),"aria-required":X||void 0,error:ee,rows:4},S);case"date":{const{min:K,max:Q}=AE(S);return y.jsx(rg,{id:S,label:I,hint:w,value:$t(P),min:K,max:Q,onChange:J=>{const pe=J.currentTarget.value;oe(pe),!va(pe,"date")&&!uc(S,pe)&&E(S,ce(T,S,pe))},onBlur:()=>D(S,"date",T),"aria-required":X||void 0,error:ee,autoComplete:ho[S]},S)}case"checkbox":{if(O.options){const K=Array.isArray(P)?P:[];return y.jsxs("div",{className:"space-y-2",children:[y.jsxs("div",{className:"form-label",children:[I,X&&y.jsx("span",{className:"text-red-600 ml-1",children:"*"})]}),y.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:O.options.map(Q=>{const J=`${S}-${sc(Q)}`,pe=K.includes(Q);return y.jsx(ac,{id:J,label:Q,checked:pe,onChange:Oe=>{const Me=new Set(K);Oe.currentTarget.checked?Me.add(Q):Me.delete(Q),oe(Array.from(Me))},"aria-required":X||void 0},J)})}),ee&&y.jsx("p",{className:"mt-1 text-sm text-red-600",children:ee})]},S)}return y.jsx(ac,{id:S,label:X?`${I} *`:I,checked:!!P,onChange:K=>oe(K.currentTarget.checked),"aria-required":X||void 0},S)}case"radio":{if(vo(O))return null;const K=O.options??[],Q=T&&T.length>0?`${S}__${T.join("__")}`:S;return y.jsx(og,{legend:I,legendClassName:X?"legend-required":void 0,children:K.map(J=>y.jsx(lg,{name:Q,value:J,checked:P===J,onChange:()=>{oe(J),E(S,ce(T,S,J))},children:oh[S]?.[J]??J},`${S}-${sc(J)}`))},S)}case"select":{let K=O.options??[];S==="quote_vehicle_id"&&(K=l?.vehicles__items?.map(ye=>ye.vin)??[]);let Q=!1,J,pe,Oe;if(S==="year"||S==="make"||S==="model"||S==="body_style"){const ye=T?T.join("-"):"_root";ne[ye]&&(Q=!0,J="Looking up VIN...")}if(!Q&&(S==="make"||S==="model"||S==="body_style")){const ye=T?T.join("-"):"_root";Oe=ye;const Qe=Nt(k,T,"year"),ue=typeof Qe=="number"?Qe:Number(Qe);if(S==="make"){const $e=`${ye}:makes`;if(!ue||!Number.isFinite(ue))Q=!0,J="Select a year first";else{pe={year:ue};const Te=Ke(pe);Te&&Te.length>0?K=Te:W[$e]?(Q=!0,J="Loading makes..."):K=[...tE]}}else if(S==="model"){const $e=`${ye}:models`,Te=String(Nt(k,T,"make")??"");if(!Te)Q=!0,J="Select a make first";else if(ue&&Number.isFinite(ue)){pe={year:ue,make:Te};const ke=Ke(pe);ke&&ke.length>0?K=ke:W[$e]?(Q=!0,J="Loading models..."):K=[...hE]}typeof P=="string"&&P&&!K.includes(P)&&(K=[P,...K])}else{const $e=`${ye}:bodyStyles`,Te=String(Nt(k,T,"make")??""),ke=String(Nt(k,T,"model")??"");if(!ke)Q=!0,J="Select a model first";else if(ue&&Number.isFinite(ue)&&Te){pe={year:ue,make:Te,model:ke};const Je=Ke(pe);Je&&Je.length>0?K=Je:W[$e]?(Q=!0,J="Loading body styles..."):K=[...pE]}typeof P=="string"&&P&&!K.includes(P)&&(K=[P,...K])}}if(S==="occupation"||S==="co_applicant_occupation"){const ye=S==="co_applicant_occupation"?"co_applicant_employment_industry":void 0,Qe=ye?void 0:Nt(k,T,"industry"),ue=Nt(k,T,ye??"employment_industry"),Te=String(No(Qe??ue)??"").trim();K=[...eh[Te]??yE],typeof P=="string"&&P&&!K.includes(P)&&(K=[P,...K])}const Me=CE(T,S);return y.jsx(Bi,{id:Me,label:J?`${I} — ${J}`:I,"aria-required":X||void 0,error:ee,disabled:Q,value:NE(P),onChange:ye=>{const Qe=ye.currentTarget.value;if(S!=="year"&&S!=="make"&&S!=="model"&&S!=="industry"&&S!=="employment_industry"&&S!=="co_applicant_employment_industry"){oe(Qe),E(S,ce(T,S,Qe));return}let ue=Lt(k,T,S,Qe);if(S==="year")ue=Lt(ue,T,"make",""),ue=Lt(ue,T,"model",""),ue=Lt(ue,T,"body_style","");else if(S==="make")ue=Lt(ue,T,"model",""),ue=Lt(ue,T,"body_style","");else if(S==="model")ue=Lt(ue,T,"body_style","");else if(S==="industry"||S==="employment_industry")ue=Lt(ue,T,"occupation","");else if(S==="co_applicant_employment_industry"){const Te=String(No(Qe)??"").trim(),ke=eh[Te]??[],Je=ke.find(At=>At===Te)??ke[0]??"";ue=Lt(ue,T,"co_applicant_occupation",Je??"")}l&&o?o(ue):j(ue),G(ue);const $e=T?Zi(ue,T)??{}:ue;E(S,{...$e,[S]:Qe})},placeholder:J??"Select an option",onFocus:pe&&Oe?()=>We(Oe,pe):void 0,options:K.map(ye=>({value:ye,label:oh[S]?.[ye]??_E[ye]??ye}))},Me)}case"address":return y.jsx(fg,{id:S,label:I,value:$t(P),onChange:(K,Q)=>{let J=Lt(k,T,S,K);const pe=Q?.state??(typeof K=="string"?K.match(/,\s*([A-Z]{2})\s+\d{5}\b/)?.[1]:void 0);if(pe){const Oe=T?[...T,"state"]:["state"];J=Sn(J,Oe,pe)}l&&o?o(J):j(J),G(J)},onBlur:()=>D(S,"address",T),required:X,"aria-required":X||void 0,error:ee},S);default:return null}}function V(O,T){return O.map((S,I)=>{const w=String(S.key);if(!go(S,k,g)||!Js(S,k,T)||!yo(S,k,m))return null;if(ec(w,S,k,m)){const Q=g.currentCarrierKey?k[g.currentCarrierKey]:void 0;if(!(Q&&Q!=="NoPriorInsurance"&&Br(k,g)&&Ws.has(w)))return null}const P=$(S,T),X=S.conditionals??[];if(!X.length)return m==="BundlePolicy"&&w==="policy_bi"?y.jsxs("div",{children:[y.jsx("h3",{className:"text-lg font-semibold mt-6 mb-3",children:"Vehicle Coverage Information"}),P]},`wrap-${w}-${I}`):y.jsx("div",{children:P},`wrap-${w}-${I}`);const ee=ch(S,Nt(k,T,w)),oe=X.filter(Q=>Ui(ee,Q.conditionalType,Q.conditionalValue)),K=oe.length>1&&!oe.some(Q=>Q.conditionalQuestionsAllowMultiple)?oe.slice(0,1):oe;return y.jsxs("div",{children:[P,K.map((Q,J)=>{const pe=Q.conditionalQuestions??[];if(!pe.length)return null;if(!Q.conditionalQuestionsAllowMultiple)return y.jsx("div",{className:"mt-3",children:V(pe,T)},`branch-${w}-${J}`);const Oe=po(w),Me=Zi(k,[...T??[],Oe])??[],ye=Math.max(1,Me.length||1),Qe=()=>{const Te=Sn(k,[...T??[],Oe,Me.length],{});l&&o?o(Te):j(Te),G(Te)},ue=()=>{const Te=Me.slice(0,Math.max(0,Me.length-1)),ke=Sn(k,[...T??[],Oe],Te);l&&o?o(ke):j(ke),G(ke)},$e=`${w}__c${J}`;return y.jsxs("div",{className:"mt-3",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),y.jsxs("div",{className:"space-x-2",children:[y.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:Qe,children:"Add another"}),ye>1&&y.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:ue,children:"Remove last"})]})]}),Array.from({length:ye}).map((Te,ke)=>{const Je=[...T??[],Oe,ke],At=`${$e}__i${ke}`,Ft=Me[ke]??{},Yt=w==="drivers",He=Yt?`Driver #${ke+1}`:w==="vehicles"?`Vehicle #${ke+1}`:w==="home_losses"||w==="losses"?`Loss #${ke+1}`:`Entry #${ke+1}`,Dt=Yt&&typeof Ft.ssn_display=="string"&&Ft.ssn_display?` — ${Ft.ssn_display}`:"";return y.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[y.jsxs("div",{className:"text-sm font-semibold mb-2",children:[He,Dt]}),pe.map(ze=>{const yt=String(ze.key);if(!go(ze,k,g)||!Js(ze,k,Je)||!yo(ze,k,m))return null;if(ec(yt,ze,k,m)){const tn=g.currentCarrierKey?k[g.currentCarrierKey]:void 0;if(!(tn&&tn!=="NoPriorInsurance"&&Br(k,g)&&Ws.has(yt)))return null}return y.jsxs("div",{className:"mt-3",children:[$(ze,Je),(()=>{const tn=ze.conditionals??[];if(!tn.length)return null;const nn=Nt(k,Je,ze.key),pn=tn.filter(xn=>Ui(nn,xn.conditionalType,xn.conditionalValue));return(pn.length>1&&!pn.some(xn=>xn.conditionalQuestionsAllowMultiple)?pn.slice(0,1):pn).map((xn,Ga)=>{const Fa=xn.conditionalQuestions??[];if(!Fa.length)return null;if(!xn.conditionalQuestionsAllowMultiple)return y.jsx("div",{className:"mt-3",children:V(Fa,Je)},`nested-${At}-${Ga}`);const qn=po(ze.key),An=Zi(k,[...Je,qn])??[],Vi=Math.max(1,An.length||1),Pi=()=>{const En=Sn(k,[...Je,qn,An.length],{});l&&o?o(En):j(En),G(En)},Ki=()=>{const En=An.slice(0,Math.max(0,An.length-1)),yn=Sn(k,[...Je,qn],En);l&&o?o(yn):j(yn),G(yn)};return y.jsxs("div",{className:"mt-3",children:[y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[y.jsx("div",{className:"text-sm font-medium opacity-75",children:"Add one or more entries"}),y.jsxs("div",{className:"space-x-2",children:[y.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:Pi,children:"Add another"}),Vi>1&&y.jsx("button",{type:"button",className:"btn-outline px-3 py-1",onClick:Ki,children:"Remove last"})]})]}),Array.from({length:Vi}).map((En,yn)=>{const Qi=[...Je,qn,yn];return y.jsxs("div",{className:"rounded-lg border p-3 mb-3",children:[y.jsxs("div",{className:"text-sm font-semibold mb-2",children:["Entry #",yn+1]}),V(Fa,Qi)]},`nested-item-${At}-${Ga}-${yn}`)})]},`nested-repeat-${At}-${Ga}`)})})()]},`${At}-${yt}`)})]},`group-${At}`)})]},`branch-${w}-${J}`)})]},`wrap-${w}-${I}`)})}const v=H.useMemo(()=>{const O=[],T=(S,I)=>{S.forEach(w=>{if(!go(w,k,g)||!Js(w,k,I)||!yo(w,k,m))return;const P=String(w.key);if(ec(P,w,k,m)){const Q=g.currentCarrierKey?k[g.currentCarrierKey]:void 0;if(!(Q&&Q!=="NoPriorInsurance"&&Br(k,g)&&Ws.has(P)))return}vo(w)||O.push(w);const X=w.conditionals??[];if(!X.length)return;const ee=ch(w,Nt(k,I,P)),oe=X.filter(Q=>Ui(ee,Q.conditionalType,Q.conditionalValue));(oe.length>1&&!oe.some(Q=>Q.conditionalQuestionsAllowMultiple)?oe.slice(0,1):oe).forEach(Q=>{const J=Q.conditionalQuestions??[];J.length&&(Q.conditionalQuestionsAllowMultiple||T(J,I))})})};return T(_),O},[_,k,g,m]);function M(O){O.preventDefault();const T=qi(k,g),S=v.map(w=>Mo(w,g)?{...w,required:T}:w),I=Oo(S,k);if(le(I),Object.keys(I).length>0){const w=v.findIndex(P=>I[P.key]);w>=0&&document.getElementById(v[w].key)?.focus();return}c(k)}return y.jsx("form",{className:"space-y-6 px-1",onSubmit:M,noValidate:!0,children:V(_)})}const DE="https://getcredify.com/privacy-policy";function xE(){return y.jsx("a",{href:DE,target:"_blank",rel:"noopener noreferrer",className:"credify-link-underline",children:"Privacy Policy"})}function hh(){return y.jsxs(y.Fragment,{children:["See our ",y.jsx(xE,{})," for how we use your information."]})}const wE=new Set(["Product","Name","Home","HomeConstruction","HomeFeatures","Vehicle","Driver","Demographics","Customer","HomeCustomer","BundleCustomer"]),RE=new Set(["AutoCurrentCarrier","HomeCurrentCarrier","HomePolicy","BundlePolicy","AutoPolicy"]);function LE({stageKey:n}){return n?n==="Zip"?y.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"No credit card required."}):n==="Email"?y.jsxs("div",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left space-y-1",children:[y.jsx("p",{children:"We'll send your quotes and updates here, and save your progress so you can return anytime."}),y.jsx("p",{children:y.jsx(hh,{})})]}):RE.has(n)?y.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Tell us about your current coverage. Carriers ask about your coverage history to put together accurate quotes — it's a standard step on any application. Coverage gaps are common, so just enter things as they are. You're almost there: your quotes are almost ready."}):n==="Ssn"?y.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"Your SSN is required by some carriers for fraud prevention, underwriting and to generate a quote. It's entered directly into our secure, encrypted form."}):n==="SMSVerification"?y.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:"You'll receive a text from Credify shortly."}):wE.has(n)?y.jsx("p",{className:"stage-footer-hint mt-3 text-xs text-slate-600 text-left",children:y.jsx(hh,{})}):null:null}const zE="GTM-NK8LGHTQ";function BE(){return typeof window>"u"?[]:(window.dataLayer=window.dataLayer??[],window.dataLayer)}function Za(n,r={}){BE().push({event:n,credifyWidget:{...r,containerId:zE}})}function kE(){Za("credify_widget_opened")}function ph(){Za("credify_widget_closed")}function UE(n){Za("credify_widget_stage_viewed",n)}function yh(n){Za("credify_widget_stage_completed",n)}function jE(){Za("credify_widget_flow_completed")}function HE(n){Za("credify_widget_rates_viewed",n??{})}function IE(){Za("credify_widget_rates_back")}const S0=new Set(["Disabled","Retired","Unemployed","Other"]);function $E(n,r){const l=String(n.key??"");if(l==="co_applicant_occupation"||l!=="occupation")return!0;const o=r.industry,c=r.employment_industry,f=String(o??c??"").trim();return!S0.has(f)}function ZE(n,r){const l=String(n.key??"");if(l==="co_applicant_occupation"||l!=="occupation")return!0;const o=r.industry,c=r.employment_industry,f=String(o??c??"").trim();return!S0.has(f)}function A0(n){return n.inputType!=="radio"||!n.options||n.options.length!==1||n.options[0]!=="Yes"?!1:(n.conditionals??[]).some(l=>l.conditionalQuestionsAllowMultiple&&l.conditionalType==="equals"&&l.conditionalValue==="Yes")}function E0(n,r){return A0(n)?"Yes":r}function gh(n){return typeof n=="number"&&Number.isFinite(n)?n:typeof n=="string"&&n.trim()!==""&&!Number.isNaN(Number(n))?Number(n):null}function vh(n){if(n instanceof Date&&!Number.isNaN(n.getTime()))return n.getTime();if(typeof n=="string"){const r=Date.parse(n);return Number.isNaN(r)?null:r}return null}function bh(n,r){const l=gh(n),o=gh(r);if(l!=null&&o!=null)return l-o;const c=vh(n),f=vh(r);return c!=null&&f!=null?c-f:n==null||r==null?null:String(n).localeCompare(String(r))}function GE(n,r){return Array.isArray(n)?n.some(l=>l===r):typeof n=="string"?r!=null&&n.includes(String(r)):!1}function T0(n,r,l){switch(r){case"equals":return n===l;case"notEquals":return n!==l&&n!==""&&n!=null;case"lessThan":{const o=bh(n,l);return o!=null&&o<0}case"greaterThan":{const o=bh(n,l);return o!=null&&o>0}case"contains":return GE(n,l);case"startsWith":return n!=null&&l!=null&&String(n).startsWith(String(l));case"endsWith":return n!=null&&l!=null&&String(n).endsWith(String(l));default:return!1}}const FE=new Set(["auto_prior_years","auto_prior_months","auto_continuous_coverage_years"]);function mc(n,r,l){const o=yc([...n]),c=Oc(o),f=[],m=_=>{_.forEach(g=>{if(!go(g,r,c)||!$E(g,r)||!yo(g,r,l))return;const p=String(g.key);if(s0(p,l,r)){const G=c.currentCarrierKey?r[c.currentCarrierKey]:void 0;if(!(G&&G!=="NoPriorInsurance"&&Br(r,c)&&FE.has(p)))return}A0(g)||f.push(g);const b=E0(g,r[p]),R=g.conditionals??[];if(!R.length)return;const j=R.filter(G=>T0(b,G.conditionalType,G.conditionalValue));(j.length>1&&!j.some(G=>G.conditionalQuestionsAllowMultiple)?j.slice(0,1):j).forEach(G=>{const k=G.conditionalQuestions??[];k.length&&(G.conditionalQuestionsAllowMultiple||m(k))})})};return m(o),f}const C0="__items",_c=n=>`${n}${C0}`;function YE(n,r){if(n.key==="relationship_to_insured"||n.key==="is_registered_owner"){const l=r[r.length-1];return typeof l=="number"&&l===0}return!1}function hc(n,r,l=[],o=void 0,c=r){for(const f of n){const m=String(f.key),_=E0(f,r[m]),g=f.conditionals??[];if(!g.length)continue;const p=g.filter(R=>T0(_,R.conditionalType,R.conditionalValue)),b=p.length>1&&!p.some(R=>R.conditionalQuestionsAllowMultiple)?p.slice(0,1):p;for(const R of b){const j=R.conditionalQuestions??[];if(!j.length)continue;if(!R.conditionalQuestionsAllowMultiple){if(hc(j,r,l,o,c))return!0;continue}const B=r[_c(m)]??[];if(B.length===0)return!0;for(const[G,k]of B.entries()){const fe=[...l,_c(m),G],le=mc(j,k,o).filter(ie=>!(YE(ie,fe)||!ZE(ie,k))),de={state:c.state,...k},te=Oo(le,de);if(Object.values(te).some(Boolean)||hc(j,k,fe,o,c))return!0}}}return!1}function Sh(n,r,l){return hc(n,r,[],l,r)}function Ah(n){const r=n.vehicles__items??[];if(!Array.isArray(r)||r.length===0)return!1;for(const l of r)if(va(l.vehicle_comp_deductible,"select")||va(l.vehicle_coll_deductible,"select")||va(l.vehicle_towing_and_labor,"select")||va(l.vehicle_transportation_expense,"select"))return!0;return!1}function qE({stages:n,onStageComplete:r,onComplete:l,initialValues:o,initialActive:c,quoteId:f,nonTerminalStageKeys:m}){const[_,g]=H.useState(c??0),[p,b]=H.useState(o??{}),[R,j]=H.useState({}),[B,G]=H.useState(!1),[k,fe]=H.useState(!1),[le,de]=H.useState(null),te=H.useRef([]),ie=H.useRef(n),W=Array.isArray(n)&&n.length>0,re=W?Math.min(_,n.length-1):0,me=W?n[re]:null,ne=me?.key??null;H.useEffect(()=>{c!==void 0&&g(c)},[c]),ie.current=n;const he=H.useMemo(()=>{const D=re>=n.length-1;return D&&ne&&m?.has(ne)?!1:!!(D||n.slice(re+1).every(V=>V.key==="AutoPolicy")&&(p.drivers__items??[]).length<=1)},[re,n,p,ne,m]);H.useEffect(()=>{W&&_>=n.length&&g(n.length-1)},[_,n.length,W]),H.useEffect(()=>{const D=te.current[re];D&&D.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[re]),H.useEffect(()=>{o!==void 0&&b(o)},[o]),H.useEffect(()=>{if(!me||!ne){G(!1),de(null);return}if(R[ne]){G(!1),de(null);return}let D=!1;return G(!0),de(null),Promise.resolve(me.loadQuestions()).then($=>{if(!D){if(!Array.isArray($))throw new Error(`loadQuestions("${ne}") did not return an array`);j(V=>({...V,[ne]:$}))}}).catch($=>{D||de(`Failed to load stage "${me?.title??""}": ${$?.message??"Unknown error"}`)}).finally(()=>{D||G(!1)}),()=>{D=!0}},[me,ne,R]);const Ae=ne?R[ne]:void 0,Ee=H.useMemo(()=>Oc(yc(Ae??[])),[Ae]);H.useEffect(()=>{me&&ne&&Ae&&UE({stageKey:ne,stageTitle:me.title??ne,stepIndex:_+1,totalSteps:n.length})},[ne,_,n.length,me,Ae]);const Ne=H.useMemo(()=>{if(!Ae)return{};const D={};(v=>{const M=[],O=T=>{T.forEach((S,I)=>{const w=Gi(S,I);M.push(w);const P=_c(w);M.push(P),(S.conditionals??[]).forEach(ee=>{const oe=ee.conditionalQuestions??[];oe.length>0&&O(oe)})})};return O(v),M})(Ae).forEach(v=>{v in p&&(D[v]=p[v])});for(const v of["state","State","address","product"])v in p&&(D[v]=p[v]);for(const[v,M]of Object.entries(p))v.endsWith(C0)&&!(v in D)&&(D[v]=M);return D},[Ae,p]),Ke=D=>{b($=>({...$,...D}))},We=()=>{g(D=>D>0?D-1:0),document.querySelector(".panel-body")?.scrollTo({top:0,behavior:"instant"})},ce=async()=>{if(!Ae||!me||B||le||k)return;const D=mc(Ae,Ne,ne??void 0),$=qi(p,Ee),V=D.map(ee=>Mo(ee,Ee)?{...ee,required:$}:ee),v=Oo(V,Ne),M=new Set(V.map((ee,oe)=>Gi(ee,oe))),O=Object.entries(v).some(([ee,oe])=>oe&&M.has(ee)),T=Sh(Ae,p,ne??void 0),I=D.some(ee=>String(ee.key??"")==="vehicle_policy_selections")?Ah(p):!1,w=p.driver_vehicle_assignments,P=p.drivers__items??[];let X=!1;if(w&&P.length>=2){const ee=p.vehicles__items??[];for(let oe=0;oe<ee.length;oe++){const K=w[`v${oe}`];if(!K)continue;const Q=P.map((Oe,Me)=>K[`d${Me}`]??0),J=Q.filter(Oe=>Oe>0);if(J.length>=2&&J.every(Oe=>Oe===50)){X=!0;break}const pe=Q.reduce((Oe,Me)=>Oe+Me,0);if(pe>0&&pe!==100){X=!0;break}}}if(!(O||T||I||X)){fe(!0);try{const ee=he,oe=ee?await l(p,ne??""):await r(Ne,ne??""),{success:K,error:Q}=oe;if(!K){de(Q??"An error occurred");return}if(!ee){const J=oe.latestStages??ie.current,pe=J.findIndex(Me=>Me.key===ne),Oe=pe>=0?Math.min(pe+1,J.length-1):Math.min(_+1,J.length-1);g(Oe)}}finally{fe(!1)}}},E=H.useMemo(()=>{if(!Ae||B||le||k)return!0;const D=mc(Ae,Ne,ne??void 0),$=qi(p,Ee),V=D.map(ee=>Mo(ee,Ee)?{...ee,required:$}:ee),v=Oo(V,Ne),M=new Set(V.map((ee,oe)=>Gi(ee,oe))),O=Object.entries(v).some(([ee,oe])=>oe&&M.has(ee)),T=Sh(Ae,p,ne??void 0),I=D.some(ee=>String(ee.key??"")==="vehicle_policy_selections")?Ah(p):!1,w=p.driver_vehicle_assignments,P=p.drivers__items??[];let X=!1;if(w&&P.length>=2){const ee=p.vehicles__items??[];for(let oe=0;oe<ee.length;oe++){const K=w[`v${oe}`];if(!K)continue;const Q=P.map((Oe,Me)=>K[`d${Me}`]??0),J=Q.filter(Oe=>Oe>0);if(J.length>=2&&J.every(Oe=>Oe===50)){X=!0;break}const pe=Q.reduce((Oe,Me)=>Oe+Me,0);if(pe>0&&pe!==100){X=!0;break}}}return O||T||I||X},[Ae,Ne,p,B,le,k,Ee,ne]);return W?y.jsxs("div",{className:"space-y-6",children:[y.jsxs("div",{className:"form-wizard-steps-header flex items-center justify-between gap-4",children:[y.jsx("ol",{className:"form-wizard-steps flex gap-2 text-xs overflow-x-auto flex-1 pb-1 scrollbar-hide items-center",style:{scrollbarWidth:"none",msOverflowStyle:"none"},children:n.flatMap((D,$)=>[y.jsx("li",{ref:V=>{te.current[$]=V},className:`form-wizard-step-pill px-2.5 py-1 rounded-full border whitespace-nowrap flex-shrink-0 ${$<re?"bg-blue-600 text-white border-blue-600":$===re?"border-blue-600 text-blue-600 bg-white":"border-slate-200 text-slate-600"}`,children:D.title},D.key??`stage-${$}`),...$<n.length-1?[y.jsx("li",{className:"form-wizard-step-arrow text-slate-400 flex-shrink-0",children:"→"},`arrow-${D.key??$}`)]:[]])}),y.jsxs("div",{className:"form-wizard-step-counter text-sm text-slate-500 flex-shrink-0",children:[re+1," / ",n.length]})]}),y.jsxs("div",{children:[B&&y.jsx("div",{className:"text-slate-500",children:"Loading…"}),me&&y.jsx(ME,{questions:Ae??[],controlledValues:Ne,onChangeValues:Ke,onSubmit:()=>ce(),quoteId:f,widgetStageKey:ne??void 0},me.key)]}),!B&&le&&y.jsxs("div",{className:"text-red-600 text-sm -mt-4",children:[y.jsx("div",{children:le}),me&&y.jsx("button",{type:"button",className:"credify-retry-btn underline mt-1 font-bold",onClick:()=>{j(D=>{if(!ne)return D;const $={...D};return delete $[ne],$})},children:"Retry"})]}),y.jsx(LE,{stageKey:ne}),y.jsxs("div",{className:re>0?"grid grid-cols-2 gap-3":"",children:[re>0&&y.jsx("button",{type:"button",onClick:We,disabled:B,className:"credify-btn-back h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Back"}),y.jsxs("button",{type:"button","data-widget-ctrl":"next",onClick:ce,disabled:E,className:["form-wizard-next-btn",re>0?"":"w-full","h-12 rounded-full text-white transition","disabled:opacity-50 disabled:cursor-not-allowed","flex items-center justify-center gap-2",E?"bg-gray-300":"bg-blue-600 hover:bg-blue-600/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 bg-primary hover:bg-primary/90 focus-visible:ring-primary/40"].join(" "),children:[k&&y.jsxs("svg",{className:"animate-spin h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[y.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),y.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),he?"Finish":"Next"]})]})]}):y.jsx("div",{className:"text-slate-600",children:"Loading..."})}const O0={SafecoPersonal:{name:"Safeco",abbr:"SFC",color:"#0F337A"},SafecoPersoanl:{name:"Safeco",abbr:"SFC",color:"#0F337A"},AssuranceAmerica:{name:"Assurance America",abbr:"AA",color:"#2768B5"},CommonWealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#2D69EC"},Alinsco:{name:"Alinsco",abbr:"AL",color:"#20395D"},ACORDBOLTPersonalAuto:{name:"Bolt Auto",abbr:"BLT",color:"#1F2937"},ACORDBOLTPersonalHome:{name:"Bolt Home",abbr:"BLT",color:"#1F2937"},TwentyFirstCentury:{name:"21st Century",abbr:"21C",color:"#B2392A"},ACentral:{name:"A-Central",abbr:"ACT",color:"#EAAD1D"},AAA:{name:"AAA",abbr:"AAA",color:"#DB461C"},AARP:{name:"AARP",abbr:"ARP",color:"#DB4724"},Acadia:{name:"Acadia",abbr:"ACD",color:"#386B61"},Ace:{name:"ACE",abbr:"ACE",color:"#457D48"},Acuity:{name:"Acuity",abbr:"ACU",color:"#D74630"},AdirondackInsExchange:{name:"Adirondack",abbr:"ADK",color:"#1F5490"},Aegis:{name:"Aegis",abbr:"AEG",color:"#1A4675"},AIC:{name:"AIC",abbr:"AIC",color:"#508F47"},AIG:{name:"AIG",abbr:"AIG",color:"#223572"},AlfaAlliance:{name:"Alfa Alliance",abbr:"ALF",color:"#C13D17"},AllianzOfAmerica:{name:"Allianz",abbr:"ALZ",color:"#003781"},AllianzOfAmericaJefferson:{name:"Allianz Jefferson",abbr:"ALZ",color:"#003781"},Allied:{name:"Allied",abbr:"ALD",color:"#0047BB"},Allmerica:{name:"Allmerica",abbr:"ALM",color:"#003DA5"},Allstate:{name:"Allstate",abbr:"ALS",color:"#002F87"},AmericaFirst:{name:"America First",abbr:"AMF",color:"#003DA5"},AmericanCommerce:{name:"American Commerce",abbr:"ACM",color:"#003DA5"},AmericanFamily:{name:"American Family",abbr:"AMF",color:"#0033A0"},Amica:{name:"Amica",abbr:"AMI",color:"#003DA5"},Ameriprise:{name:"Ameriprise",abbr:"AMP",color:"#003DA5"},ASILloyds:{name:"ASI Lloyds",abbr:"ASI",color:"#003DA5"},Assurant:{name:"Assurant",abbr:"ASR",color:"#0033A0"},AtlasGeneralAgency:{name:"Atlas General",abbr:"ATL",color:"#1F3864"},AustinMutual:{name:"Austin Mutual",abbr:"AUS",color:"#1F3864"},Autoone:{name:"AutoOne",abbr:"AON",color:"#003DA5"},AutoOwners:{name:"Auto-Owners",abbr:"AO",color:"#C8102E"},BadgerMutual:{name:"Badger Mutual",abbr:"BDG",color:"#003DA5"},Balboa:{name:"Balboa",abbr:"BAL",color:"#1F3864"},Bamboo:{name:"Bamboo",abbr:"BMB",color:"#0F4C3A"},Bankers:{name:"Bankers",abbr:"BNK",color:"#1F3864"},BeaconNational:{name:"Beacon National",abbr:"BCN",color:"#003DA5"},BrethernMutual:{name:"Brethren Mutual",abbr:"BRT",color:"#1F3864"},BristolWest:{name:"Bristol West",abbr:"BW",color:"#003DA5"},BunkerHill:{name:"Bunker Hill",abbr:"BHL",color:"#1F3864"},CapitalInsuranceGroup:{name:"Capital Insurance",abbr:"CIG",color:"#003DA5"},Celina:{name:"Celina",abbr:"CEL",color:"#1F3864"},CentralMutualOfOH:{name:"Central Mutual",abbr:"CMO",color:"#003DA5"},Chubb:{name:"Chubb",abbr:"CHB",color:"#000000"},ChubbInsurance:{name:"Chubb",abbr:"CHB",color:"#000000"},Cincinnati:{name:"Cincinnati",abbr:"CIN",color:"#003DA5"},Citizens:{name:"Citizens",abbr:"CTZ",color:"#003DA5"},Clearcover:{name:"Clearcover",abbr:"CC",color:"#00B5E2"},CNA:{name:"CNA",abbr:"CNA",color:"#CC3232"},ColonialPenn:{name:"Colonial Penn",abbr:"CPN",color:"#0072CE"},ColoradoCasualty:{name:"Colorado Casualty",abbr:"COC",color:"#1F3864"},Columbia:{name:"Columbia",abbr:"CLM",color:"#003DA5"},CommerceWest:{name:"Commerce West",abbr:"CMW",color:"#003DA5"},CommonwealthCasualty:{name:"Commonwealth Casualty",abbr:"CW",color:"#1F3864"},ConstitutionalCasualty:{name:"Constitutional Casualty",abbr:"CON",color:"#1F3864"},Cornerstone:{name:"Cornerstone",abbr:"CRN",color:"#1F3864"},Countrywide:{name:"Countrywide",abbr:"CTW",color:"#003DA5"},CSE:{name:"CSE",abbr:"CSE",color:"#003DA5"},Cumberland:{name:"Cumberland",abbr:"CMB",color:"#1F3864"},Cypress:{name:"Cypress",abbr:"CYP",color:"#0F4C3A"},Dairyland:{name:"Dairyland",abbr:"DL",color:"#0072CE"},Deerbrook:{name:"Deerbrook",abbr:"DBK",color:"#1F3864"},Direct:{name:"Direct",abbr:"DIR",color:"#D52B1E"},Donegal:{name:"Donegal",abbr:"DON",color:"#003DA5"},Drive:{name:"Drive",abbr:"DRV",color:"#1F3864"},Electric:{name:"Electric",abbr:"ELC",color:"#003DA5"},EMC:{name:"EMC",abbr:"EMC",color:"#003DA5"},Encompass:{name:"Encompass",abbr:"ENC",color:"#002F87"},Erie:{name:"Erie",abbr:"ERI",color:"#005FAC"},Esurance:{name:"Esurance",abbr:"ESU",color:"#00A6CE"},ExcelsiorInsuranceCompany:{name:"Excelsior",abbr:"EXC",color:"#1F3864"},Explorer:{name:"Explorer",abbr:"EXP",color:"#1F3864"},FairPlan:{name:"FAIR Plan",abbr:"FPN",color:"#1F3864"},FarmBureau:{name:"Farm Bureau",abbr:"FB",color:"#00843D"},Farmers:{name:"Farmers",abbr:"FRM",color:"#1C428B"},Fidelity:{name:"Fidelity",abbr:"FID",color:"#00833F"},FiremansFund:{name:"Fireman's Fund",abbr:"FF",color:"#E31837"},FirstAmerican:{name:"First American",abbr:"FAM",color:"#003DA5"},Foremost:{name:"Foremost",abbr:"FOR",color:"#E31837"},ForemostInsuranceCompany:{name:"Foremost",abbr:"FOR",color:"#E31837"},Geico:{name:"GEICO",abbr:"GEI",color:"#0F4293"},GeneralCasualty:{name:"General Casualty",abbr:"GC",color:"#1F3864"},GermantownMutual:{name:"Germantown Mutual",abbr:"GTM",color:"#1F3864"},GMAC:{name:"GMAC",abbr:"GMA",color:"#003DA5"},Grange:{name:"Grange",abbr:"GRG",color:"#003DA5"},GreatAmerican:{name:"Great American",abbr:"GA",color:"#003DA5"},Grinnell:{name:"Grinnell Mutual",abbr:"GRN",color:"#E31837"},GuideOne:{name:"GuideOne",abbr:"GO",color:"#0072CE"},Hanover:{name:"Hanover",abbr:"HAN",color:"#003DA5"},Harbor:{name:"Harbor",abbr:"HBR",color:"#1F3864"},Harleysville:{name:"Harleysville",abbr:"HRL",color:"#003DA5"},Hartford:{name:"The Hartford",abbr:"HFD",color:"#7F1734"},HartfordOMNI:{name:"Hartford OMNI",abbr:"HOM",color:"#7F1734"},HastingsMutual:{name:"Hastings Mutual",abbr:"HST",color:"#1F3864"},HawkeyeSecurity:{name:"Hawkeye Security",abbr:"HWK",color:"#1F3864"},HDI:{name:"HDI",abbr:"HDI",color:"#00563F"},HippoInsuranceCompany:{name:"Hippo",abbr:"HPO",color:"#00C9A7"},HomeownersOfAmerica:{name:"Homeowners of America",abbr:"HOA",color:"#003DA5"},Homesite:{name:"Homesite",abbr:"HMS",color:"#0033A0"},HoraceMann:{name:"Horace Mann",abbr:"HM",color:"#003DA5"},HoustonGeneral:{name:"Houston General",abbr:"HG",color:"#1F3864"},IFA:{name:"IFA",abbr:"IFA",color:"#003DA5"},ImperialCasualty:{name:"Imperial Casualty",abbr:"IMP",color:"#1F3864"},Indiana:{name:"Indiana Insurance",abbr:"IND",color:"#003DA5"},IndianaFarmers:{name:"Indiana Farmers",abbr:"IFM",color:"#00843D"},Infinity:{name:"Infinity",abbr:"INF",color:"#E31837"},Insurequest:{name:"Insurequest",abbr:"INQ",color:"#1F3864"},Integon:{name:"Integon",abbr:"ITG",color:"#003DA5"},Integrity:{name:"Integrity",abbr:"ITY",color:"#1F3864"},Kemper:{name:"Kemper",abbr:"KMP",color:"#0033A0"},LibertyMutual:{name:"Liberty Mutual",abbr:"LM",color:"#FFD000"},LibertyNorthwest:{name:"Liberty Northwest",abbr:"LNW",color:"#FFD000"},Lloyds:{name:"Lloyd's",abbr:"LLY",color:"#003DA5"},MainStreetAmerica:{name:"Main Street America",abbr:"MSA",color:"#003DA5"},Mapfre:{name:"MAPFRE",abbr:"MAP",color:"#E31837"},MarkelInsuranceCompany:{name:"Markel",abbr:"MKL",color:"#003DA5"},Mendota:{name:"Mendota",abbr:"MND",color:"#1F3864"},MerchantsGroup:{name:"Merchants Group",abbr:"MRC",color:"#003DA5"},Mercury:{name:"Mercury",abbr:"MER",color:"#ED1C24"},Metlife:{name:"MetLife",abbr:"MET",color:"#0090DA"},Metropolitan:{name:"Metropolitan",abbr:"MTP",color:"#0090DA"},MidContinent:{name:"Mid-Continent",abbr:"MC",color:"#003DA5"},MidwesternIndemnity:{name:"Midwestern Indemnity",abbr:"MWI",color:"#003DA5"},Montgomery:{name:"Montgomery",abbr:"MTG",color:"#1F3864"},MSA:{name:"MSA",abbr:"MSA",color:"#003DA5"},MtWashington:{name:"Mt. Washington",abbr:"MTW",color:"#1F3864"},MutualBenefit:{name:"Mutual Benefit",abbr:"MB",color:"#1F3864"},NatGenPremier:{name:"NatGen Premier",abbr:"NGP",color:"#0033A0"},NationalGeneral:{name:"National General",abbr:"NG",color:"#0033A0"},Nationwide:{name:"Nationwide",abbr:"NW",color:"#204D9B"},NationwideScottsdale:{name:"Nationwide Scottsdale",abbr:"NWS",color:"#204D9B"},NewYorkCentralMutual:{name:"NY Central Mutual",abbr:"NYC",color:"#003DA5"},NJManufacturers:{name:"NJM Insurance",abbr:"NJM",color:"#003DA5"},NJSkylands:{name:"NJ Skylands",abbr:"NJS",color:"#003DA5"},Northstar:{name:"Northstar",abbr:"NST",color:"#1F3864"},Occidental:{name:"Occidental",abbr:"OCC",color:"#1F3864"},OhioCasualty:{name:"Ohio Casualty",abbr:"OHC",color:"#003DA5"},OmahaPC:{name:"Omaha P&C",abbr:"OMA",color:"#003DA5"},OneBeacon:{name:"OneBeacon",abbr:"OB",color:"#003DA5"},OregonMutual:{name:"Oregon Mutual",abbr:"ORE",color:"#003DA5"},Palisades:{name:"Palisades",abbr:"PAL",color:"#1F3864"},PeerlessMontgomery:{name:"Peerless Montgomery",abbr:"PRM",color:"#1F3864"},Pekin:{name:"Pekin",abbr:"PEK",color:"#003DA5"},Pemco:{name:"PEMCO",abbr:"PMC",color:"#0072CE"},PennNational:{name:"Penn National",abbr:"PN",color:"#003DA5"},PlymouthRock:{name:"Plymouth Rock",abbr:"PLR",color:"#003DA5"},PreferredMutual:{name:"Preferred Mutual",abbr:"PFM",color:"#003DA5"},Proformance:{name:"Proformance",abbr:"PRF",color:"#1F3864"},Progressive:{name:"Progressive",abbr:"PRG",color:"#0053BA"},Prudential:{name:"Prudential",abbr:"PRU",color:"#0033A0"},PureHighValue:{name:"PURE",abbr:"PUR",color:"#003DA5"},Republic:{name:"Republic",abbr:"REP",color:"#003DA5"},RockfordMutual:{name:"Rockford Mutual",abbr:"RKF",color:"#1F3864"},RoyalAndSunAlliance:{name:"Royal & SunAlliance",abbr:"RSA",color:"#003DA5"},Safeco:{name:"Safeco",abbr:"SFC",color:"#E4002B"},SECURA:{name:"SECURA",abbr:"SEC",color:"#003DA5"},Selective:{name:"Selective",abbr:"SEL",color:"#003DA5"},SouthernCounty:{name:"Southern County",abbr:"SCM",color:"#1F3864"},SouthernMutual:{name:"Southern Mutual",abbr:"SM",color:"#1F3864"},SouthernTrust:{name:"Southern Trust",abbr:"ST",color:"#1F3864"},StPaulTravelers:{name:"St. Paul Travelers",abbr:"SPT",color:"#C8102E"},StandardMutual:{name:"Standard Mutual",abbr:"STM",color:"#1F3864"},StarCasualty:{name:"Star Casualty",abbr:"SC",color:"#1F3864"},StateAuto:{name:"State Auto",abbr:"SA",color:"#003DA5"},StateFarm:{name:"State Farm",abbr:"SF",color:"#CC0717"},StateFarmFloridaInsuranceCompany:{name:"State Farm Florida",abbr:"SFF",color:"#CC0717"},SunshineStateInsuranceCompany:{name:"Sunshine State",abbr:"SSS",color:"#FFC72C"},Travelers:{name:"Travelers",abbr:"TRV",color:"#C8102E"},Tower:{name:"Tower",abbr:"TWR",color:"#1F3864"},TWFG:{name:"TWFG",abbr:"TWF",color:"#003DA5"},Unigard:{name:"Unigard",abbr:"UNG",color:"#1F3864"},UnitedFireAndCasualty:{name:"United Fire & Casualty",abbr:"UFC",color:"#003DA5"},Unitrin:{name:"Unitrin",abbr:"UTN",color:"#003DA5"},Universal:{name:"Universal",abbr:"UNV",color:"#003DA5"},USAA:{name:"USAA",abbr:"USA",color:"#1A3258"},UticaNational:{name:"Utica National",abbr:"UTC",color:"#003DA5"},Victoria:{name:"Victoria",abbr:"VIC",color:"#1F3864"},Wellington:{name:"Wellington",abbr:"WLG",color:"#1F3864"},WestBend:{name:"West Bend",abbr:"WB",color:"#003DA5"},WesternNational:{name:"Western National",abbr:"WN",color:"#003DA5"},WesternReserveGroup:{name:"Western Reserve",abbr:"WR",color:"#003DA5"},Westfield:{name:"Westfield",abbr:"WF",color:"#F05136"},WhiteMountains:{name:"White Mountains",abbr:"WM",color:"#1F3864"},WilsonMutual:{name:"Wilson Mutual",abbr:"WLM",color:"#1F3864"},Windsor:{name:"Windsor",abbr:"WIN",color:"#1F3864"},Zurich:{name:"Zurich",abbr:"ZUR",color:"#003399"}},Eh=["#0369A1","#1D4ED8","#0F766E","#7C3AED","#B45309","#DC2626","#0891B2","#9333EA"];function VE(n){return n.replace(/[^A-Za-z0-9]/g,"").slice(0,3).toUpperCase()||"CAR"}function N0(n){return n.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/_/g," ").trim()}function tc(n){if(!n)return n;const r=O0[n];return r?r.name:N0(n)}function PE(n){const r=new Set,l=[];return n.forEach((o,c)=>{const m=O0[o]??{name:N0(o),abbr:VE(o),color:Eh[c%Eh.length]};r.has(m.name)||(r.add(m.name),l.push(m))}),l}function KE(n,r){if(!n)return[];const l=[];return(r==="Auto"||r==="Bundle")&&Array.isArray(n.PersonalAuto)&&l.push(...n.PersonalAuto),(r==="Home"||r==="Bundle")&&Array.isArray(n.PersonalHome)&&l.push(...n.PersonalHome),PE(l)}const QE=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}),M0={PersonalHome:"Homeowners",PersonalAuto:"Personal Auto",Flood:"Flood",ExcessFlood:"Excess Flood",_other:"Other"},Th=["PersonalHome","PersonalAuto","Flood","ExcessFlood"],ji="rounded-2xl border-2 border-blue-300 bg-blue-50/30 p-4 shadow-blue-100/60 ring-1 ring-blue-100",Hi="mb-3 inline-flex w-fit items-center rounded-full bg-blue-100 px-2.5 py-1 text-xs font-semibold text-blue-700",Ch="w-full max-w-md min-w-0 sm:max-w-[calc((100%-1rem)/2)]",XE="rounded-2xl border-2 border-transparent p-4";function Oh({onBack:n}){const r=()=>{IE(),n?.()};return y.jsx("button",{type:"button",onClick:r,className:"credify-btn-back credify-btn-back-rates h-12 rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition w-full",children:"Back"})}function ya({rate:n,status:r,onRequestBind:l,disabled:o,featured:c=!1,showLobLabel:f=!0,showFeaturedBadge:m,className:_}){const g=Number.isFinite(n.term_months)&&n.term_months>0?n.term_months:1,b=(n.monthly_premium_cents!=null?n.monthly_premium_cents:Math.round((n.premium_cents||0)/g))/100,R=QE.format(b),j=r==="loading",B=r==="success",G=!!o||j||B,k=!!(n.effective_date&&n.policy_end_date),fe=n.lob?M0[n.lob]||n.lob:null,le=m??c;return y.jsxs("div",{className:`flex w-full flex-col rounded-xl bg-white p-6 shadow-sm transition hover:shadow-md ${c?"border-2 border-blue-300 shadow-blue-100/60 ring-1 ring-blue-100":"border border-slate-200"}${_?` ${_}`:""}`,children:[f&&fe&&y.jsx("div",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500",children:fe}),le&&y.jsx("div",{className:"mb-3 inline-flex w-fit items-center rounded-full bg-blue-50 px-2.5 py-1 text-xs font-semibold text-blue-700",children:"Featured"}),y.jsxs("div",{className:"mb-4 flex flex-col items-start gap-2",children:[n.carrier_logo_base64?y.jsx("img",{src:`data:image/png;base64,${n.carrier_logo_base64}`,alt:tc(n.carrier_name),className:"h-12 w-auto max-w-full object-contain"}):y.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-md bg-slate-100 text-sm font-semibold text-slate-500",children:tc(n.carrier_name).charAt(0).toUpperCase()}),y.jsx("h4",{className:"w-full break-words text-left font-semibold text-slate-900",children:tc(n.carrier_name)})]}),y.jsx("div",{className:"mb-2",children:y.jsxs("p",{className:"text-2xl font-bold text-slate-900",children:[R,y.jsx("span",{className:"ml-1 text-sm font-medium text-slate-500",children:"/month"})]})}),k&&y.jsx("div",{className:"mb-2",children:y.jsxs("p",{className:"text-xs text-slate-500",children:["Effective ",n.effective_date," - ",n.policy_end_date]})}),n.carrier_quote_id&&y.jsx("div",{className:"mb-4",children:y.jsxs("p",{className:"text-xs text-slate-400",children:["Quote ID: ",n.carrier_quote_id]})}),y.jsxs("div",{className:"mt-auto pt-4",children:[y.jsx("button",{type:"button",onClick:l,disabled:G,className:`rates-bind-btn w-full rounded-full px-4 py-2.5 text-sm font-semibold transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600/40 disabled:cursor-not-allowed ${B?"rates-bind-btn-requested":"hover:bg-blue-600/90 disabled:bg-slate-300 disabled:text-slate-500"}`,children:j?"Requesting…":B?"Requested":"Request Bind"}),r==="error"&&y.jsx("p",{className:"mt-2 text-xs text-red-600",children:"Something went wrong. Please try again."}),r==="success"&&y.jsx("p",{className:"mt-2 text-xs text-emerald-600",children:"We received your bind request."})]})]})}function WE({rates:n,onBack:r,isBundleFlow:l=!1}){const o=Array.isArray(n)?n:[],c=o.length>0,[f,m]=H.useState({}),[_,g]=H.useState("admitted"),[p,b]=H.useState(!1),R=H.useMemo(()=>o.some(E=>E.lob==="PersonalAuto"),[o]),j=H.useMemo(()=>o.some(E=>E.lob==="PersonalHome"),[o]),B=H.useMemo(()=>{if(!l)return[];const E=[];return R&&E.push("PersonalAuto"),j&&E.push("PersonalHome"),E},[l,R,j]),G=H.useMemo(()=>{const E=new Set;for(const D of o){const $=D.lob??null;$&&f[D.quote_rate_id]==="success"&&E.add($)}return E},[o,f]),k=H.useMemo(()=>Object.values(f).some(E=>E==="success"),[f]),fe=H.useMemo(()=>p?!0:!l||B.length===0?k:B.every(E=>G.has(E)),[p,l,k,B,G]),le=H.useMemo(()=>c?o.filter(E=>(E.admitted_status??"admitted")==="admitted"):[],[o,c]),de=H.useMemo(()=>c?o.filter(E=>E.admitted_status==="non_admitted"):[],[o,c]),te=le.length,ie=de.length,W=te+ie>0;H.useEffect(()=>{W&&_==="admitted"&&te===0&&ie>0&&g("non_admitted")},[_,te,ie,W]);const re=H.useMemo(()=>W?_==="admitted"?le:de:[],[W,_,le,de]);H.useEffect(()=>{dc()},[]),H.useEffect(()=>{!fe||p||(lE(),b0(),b(!0))},[fe,p]);const me=H.useMemo(()=>{if(re.length===0)return[];if(!re.some(V=>V.lob))return[{lob:null,title:"Rates",rates:[...re].sort((v,M)=>{const O=Number.isFinite(v.term_months)&&v.term_months>0?v.term_months:1,T=Number.isFinite(M.term_months)&&M.term_months>0?M.term_months:1,S=v.monthly_premium_cents??Math.round((v.premium_cents||0)/O),I=M.monthly_premium_cents??Math.round((M.premium_cents||0)/T);return S-I})}];const D=new Map;for(const V of re){const v=V.lob||"_other",M=D.get(v);M?M.push(V):D.set(v,[V])}return[...D.entries()].sort(([V],[v])=>{const M=Th.indexOf(V),O=Th.indexOf(v);return(M===-1?999:M)-(O===-1?999:O)}).map(([V,v])=>({lob:V,title:M0[V]??V,rates:[...v].sort((M,O)=>{const T=Number.isFinite(M.term_months)&&M.term_months>0?M.term_months:1,S=Number.isFinite(O.term_months)&&O.term_months>0?O.term_months:1,I=M.monthly_premium_cents??Math.round((M.premium_cents||0)/T),w=O.monthly_premium_cents??Math.round((O.premium_cents||0)/S);return I-w})}))},[re]),ne=H.useMemo(()=>{if(!l)return[];const E=o.some(V=>V.lob==="PersonalAuto"),D=o.some(V=>V.lob==="PersonalHome"),$=[];return E||$.push("Sorry, no rates found for Personal Auto."),D||$.push("Sorry, no rates found for Homeowners."),$},[l,o]);if(!W)return y.jsxs("section",{className:"mt-8",children:[y.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),y.jsx("p",{className:"mt-2 text-sm text-slate-500",children:"Sorry, no rates are available at this time."}),r&&y.jsx(Oh,{onBack:r})]});const he=async E=>{m(D=>({...D,[E]:"loading"}));try{if(dc(),!$i())throw new Error("Authentication required. Please verify your phone number first.");if(!((await mE(E))?.success!==!1))throw new Error("Request failed");m(v=>({...v,[E]:"success"}))}catch{m(D=>({...D,[E]:"error"}))}},Ae=me.find(E=>E.lob==="PersonalAuto"),Ee=me.find(E=>E.lob==="PersonalHome"),Ne=!!(Ae?.rates.length&&Ee?.rates.length),Ke=me.filter(E=>!Ne||E.lob!=="PersonalAuto"&&E.lob!=="PersonalHome"),We=Ne&&Ae&&Ee?[{rate:Ae.rates[0]},{rate:Ee.rates[0]}]:[],ce=We.length===1;return y.jsxs("section",{className:"mt-8",children:[y.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Rates"}),ne.length>0&&y.jsx("div",{className:"mt-3 space-y-1",children:ne.map(E=>y.jsx("p",{className:"text-sm text-slate-600",children:E},E))}),y.jsx("div",{className:"mt-4 border-b border-slate-200",children:y.jsxs("div",{className:"flex items-center gap-6",children:[y.jsxs("button",{type:"button",onClick:()=>g("admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${_==="admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Admitted (",te,")"]}),y.jsxs("button",{type:"button",onClick:()=>g("non_admitted"),className:`border-b-2 px-1 py-2 text-sm font-semibold transition ${_==="non_admitted"?"border-cyan-500 text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Non-admitted (",ie,")"]})]})}),re.length===0&&y.jsx("p",{className:"mt-4 text-sm text-slate-500",children:_==="admitted"?"Sorry, no admitted rates are available at this time.":"Sorry, no non-admitted rates are available at this time."}),re.length>0&&Ne&&Ae&&Ee&&y.jsxs(y.Fragment,{children:[y.jsx("div",{className:ce?"mt-6 flex justify-center":"mt-6",children:y.jsxs("div",{className:ce?`w-full max-w-md ${ji}`:ji,children:[y.jsx("div",{className:Hi,children:"Featured Bundle"}),y.jsx("div",{className:ce?"grid justify-items-center gap-4":"grid gap-4 sm:grid-cols-2",children:We.map(({rate:E})=>y.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:y.jsx(ya,{rate:E,featured:!1,showLobLabel:!0,showFeaturedBadge:!1,status:f[E.quote_rate_id]??"idle",disabled:fe||(l?!!(E.lob&&B.includes(E.lob)&&G.has(E.lob)):k),onRequestBind:()=>he(E.quote_rate_id)})},E.quote_rate_id))})]})}),Ae.rates.length>1&&y.jsxs("div",{className:"mt-6",children:[y.jsxs("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:["More ",Ae.title," Options"]}),y.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Ae.rates.slice(1).map(E=>y.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:y.jsx(ya,{rate:E,featured:!1,showLobLabel:!0,showFeaturedBadge:!1,status:f[E.quote_rate_id]??"idle",disabled:fe||(l?!!(E.lob&&B.includes(E.lob)&&G.has(E.lob)):k),onRequestBind:()=>he(E.quote_rate_id)})},E.quote_rate_id))})]}),Ee.rates.length>1&&y.jsxs("div",{className:"mt-6",children:[y.jsxs("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:["More ",Ee.title," Options"]}),y.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:Ee.rates.slice(1).map(E=>y.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:y.jsx(ya,{rate:E,featured:!1,showLobLabel:!0,showFeaturedBadge:!1,status:f[E.quote_rate_id]??"idle",disabled:fe||(l?!!(E.lob&&B.includes(E.lob)&&G.has(E.lob)):k),onRequestBind:()=>he(E.quote_rate_id)})},E.quote_rate_id))})]})]}),re.length>0&&Ke.map(E=>{const[D,...$]=E.rates;return y.jsxs("div",{className:"mt-6",children:[y.jsx("h4",{className:"mb-3 text-base font-semibold text-slate-800",children:E.title}),$.length===0?y.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:y.jsx("div",{className:"col-span-full flex justify-center",children:y.jsxs("div",{className:`${Ch} ${ji}`,children:[y.jsx("div",{className:Hi,children:"Featured"}),y.jsx(ya,{rate:D,featured:!1,showLobLabel:E.lob==null,showFeaturedBadge:!1,status:f[D.quote_rate_id]??"idle",disabled:fe||(l?!!(D.lob&&B.includes(D.lob)&&G.has(D.lob)):k),onRequestBind:()=>he(D.quote_rate_id)})]})})}):$.length===1?y.jsxs("div",{className:"grid items-stretch gap-4 sm:grid-cols-2",children:[y.jsxs("div",{className:`flex h-full min-h-0 w-full min-w-0 flex-col ${ji}`,children:[y.jsx("div",{className:Hi,children:"Featured"}),y.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:y.jsx(ya,{rate:D,featured:!1,showLobLabel:E.lob==null,showFeaturedBadge:!1,status:f[D.quote_rate_id]??"idle",onRequestBind:()=>he(D.quote_rate_id),disabled:fe||(l?!!(D.lob&&B.includes(D.lob)&&G.has(D.lob)):k),className:"h-full min-h-0"})})]}),y.jsxs("div",{className:`flex h-full min-h-0 w-full min-w-0 flex-col ${XE}`,children:[y.jsx("div",{className:`${Hi} pointer-events-none invisible shrink-0`,"aria-hidden":!0,children:"Featured"}),y.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:y.jsx(ya,{rate:$[0],featured:!1,showLobLabel:E.lob==null,showFeaturedBadge:!1,status:f[$[0].quote_rate_id]??"idle",onRequestBind:()=>he($[0].quote_rate_id),disabled:fe||(l?!!($[0].lob&&B.includes($[0].lob)&&G.has($[0].lob)):k),className:"h-full min-h-0"})})]})]}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"grid gap-4 sm:grid-cols-2",children:y.jsx("div",{className:"col-span-full flex justify-center",children:y.jsxs("div",{className:`${Ch} ${ji}`,children:[y.jsx("div",{className:Hi,children:"Featured"}),y.jsx(ya,{rate:D,featured:!1,showLobLabel:E.lob==null,showFeaturedBadge:!1,status:f[D.quote_rate_id]??"idle",disabled:fe||(l?!!(D.lob&&B.includes(D.lob)&&G.has(D.lob)):k),onRequestBind:()=>he(D.quote_rate_id)})]})})}),y.jsx("div",{className:"mt-6 grid gap-4 sm:grid-cols-2",children:$.map(V=>y.jsx("div",{className:"mx-auto w-full min-w-0 max-w-md",children:y.jsx(ya,{rate:V,featured:!1,showLobLabel:E.lob==null,showFeaturedBadge:!1,status:f[V.quote_rate_id]??"idle",disabled:fe||(l?!!(V.lob&&B.includes(V.lob)&&G.has(V.lob)):k),onRequestBind:()=>he(V.quote_rate_id)})},V.quote_rate_id))})]})]},E.lob??"all")}),r&&y.jsx(Oh,{onBack:r})]})}const nc=["Validating your details...","Checking underwriting rules...","Applying eligible discounts...","Reviewing your risk profile...","Calculating premium...","Check complete"],Nh={Auto:{label:"Auto Policy",icon:"🚗",accent:"#0369A1"},Home:{label:"Home Policy",icon:"🏠",accent:"#059669"},Bundle:{label:"Home + Auto Bundle",icon:"🔗",accent:"#7C3AED"}},Mh={Auto:6e4,Home:9e4,Bundle:12e4};function JE({progress:n,color:r,size:l=80}){const o=(l-10)/2,c=2*Math.PI*o,f=c-n/100*c;return y.jsxs("svg",{width:l,height:l,style:{transform:"rotate(-90deg)"},children:[y.jsx("circle",{cx:l/2,cy:l/2,r:o,fill:"none",stroke:"#F1F5F9",strokeWidth:6}),y.jsx("circle",{cx:l/2,cy:l/2,r:o,fill:"none",stroke:r,strokeWidth:6,strokeLinecap:"round",strokeDasharray:c,strokeDashoffset:f,style:{transition:"stroke-dashoffset 0.2s linear"}})]})}function eT({providers:n=[],totalTime:r=6e4,flow:l="Auto",isComplete:o=!1,onComplete:c}){const f=Nh[l]??Nh.Auto,m=Mh[l]??Mh.Auto,_=n.length>0?Math.floor(m/n.length):r,[g,p]=H.useState(0),[b,R]=H.useState(0),[j,B]=H.useState(0),[G,k]=H.useState(0),[fe,le]=H.useState(!0),de=H.useRef(o),te=H.useRef(c),ie=H.useRef(g),W=H.useRef(n.length),re=H.useRef(!1),me=H.useRef(!1);H.useEffect(()=>{de.current=o,o&&n.length===0&&!re.current&&(re.current=!0,te.current?.())},[o,n.length]),H.useEffect(()=>{te.current=c},[c]),H.useEffect(()=>{ie.current=g},[g]),H.useEffect(()=>{W.current=n.length,n.length>0&&(me.current=!1,p(0),R(0),B(0),k(0),le(!0))},[n.length]),H.useEffect(()=>{if(n.length===0){de.current&&!re.current&&(re.current=!0,te.current?.());return}me.current=!1;const Ee=100,Ne=100/(_/Ee),Ke=setInterval(()=>{B(We=>{if(me.current||re.current)return We;const ce=We+Ne;return ce<100?ce:(me.current=!0,setTimeout(()=>{if(de.current){if(re.current)return;re.current=!0,te.current?.();return}const D=ie.current===W.current-1;le(!1),setTimeout(()=>{D?(p(0),R($=>$+1)):p($=>$+1),B(0),k(0),le(!0)},300)},400),100)})},Ee);return()=>clearInterval(Ke)},[g,_,n.length]),H.useEffect(()=>{if(n.length===0)return;const Ee=Math.floor(_/nc.length),Ne=setInterval(()=>k(Ke=>Math.min(Ke+1,nc.length-1)),Ee);return()=>clearInterval(Ne)},[g,_,n.length]);const ne=n.length===0,he=ne?null:n[Math.min(g,n.length-1)],Ae=b>0;return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`
88
- @keyframes providerPulse {
89
- 0%, 100% { transform: scale(1); }
90
- 50% { transform: scale(1.05); }
91
- }
92
- @keyframes ringPulse {
93
- 0%, 100% { transform: scale(1); opacity: 0.5; }
94
- 50% { transform: scale(1.6); opacity: 0; }
95
- }
96
- @keyframes shimmerSlide {
97
- 0% { transform: translateX(0%); }
98
- 100% { transform: translateX(195%); }
99
- }
100
- @keyframes statusFadeIn {
101
- from { opacity: 0; transform: translateX(8px); }
102
- to { opacity: 1; transform: translateX(0); }
103
- }
104
- @keyframes skeletonPulse {
105
- 0%, 100% { opacity: 0.4; transform: scale(1); }
106
- 50% { opacity: 0.8; transform: scale(1.06); }
107
- }
108
- .iq-card-fade {
109
- transition: opacity 0.3s ease, transform 0.3s ease;
110
- }
111
- .iq-card-hidden {
112
- opacity: 0;
113
- transform: translateY(-12px);
114
- }
115
- .iq-card-visible {
116
- opacity: 1;
117
- transform: translateY(0);
118
- }
119
- .iq-status-text {
120
- animation: statusFadeIn 0.25s ease forwards;
121
- }
122
- `}),y.jsx("div",{style:{background:"#F8FAFC",display:"flex",alignItems:"center",justifyContent:"center",padding:"2rem",fontFamily:"'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",height:"100%",minHeight:400,overflowY:"auto"},children:y.jsxs("div",{style:{width:"100%",maxWidth:560},children:[y.jsxs("div",{style:{textAlign:"center",marginBottom:40},children:[y.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:8,background:f.accent+"12",border:`1px solid ${f.accent}30`,borderRadius:100,padding:"6px 16px",marginBottom:16},children:[y.jsx("span",{style:{fontSize:14},children:f.icon}),y.jsx("span",{style:{fontSize:12,fontWeight:700,color:f.accent,letterSpacing:"0.1em",textTransform:"uppercase"},children:f.label})]}),y.jsx("h1",{style:{fontSize:26,fontWeight:700,color:"#0F172A",margin:0,letterSpacing:"-0.02em",lineHeight:1.3},children:ne?"Connecting to top carriers":"Fetching your best rates"}),y.jsx("p",{style:{fontSize:14,color:"#64748B",marginTop:8,marginBottom:0},children:ne?"Identifying the carriers eligible for your quote...":Ae?"Still gathering — a few carriers are taking a little longer...":"We're reaching out to multiple insurers on your behalf"})]}),y.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:32},children:ne?y.jsx("div",{style:{display:"flex",gap:20},children:[0,1,2,3,4].map(Ee=>y.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:6},children:[y.jsx("div",{style:{width:48,height:48,borderRadius:14,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${Ee*.12}s`}}),y.jsx("div",{style:{width:40,height:8,borderRadius:4,background:"#E2E8F0",animation:"skeletonPulse 1.4s ease-in-out infinite",animationDelay:`${Ee*.12}s`}})]},`skeleton-${Ee}`))}):he?y.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:8},children:[y.jsxs("div",{style:{width:64,height:64,borderRadius:18,background:he.color+"18",border:`2px solid ${he.color}`,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:16,color:he.color,position:"relative",animation:"providerPulse 1.8s ease-in-out infinite"},children:[he.abbr,y.jsx("div",{style:{position:"absolute",inset:-5,borderRadius:22,border:`2px solid ${he.color}`,pointerEvents:"none",animation:"ringPulse 1.6s ease-in-out infinite"}})]}),y.jsx("span",{style:{fontSize:13,fontWeight:600,color:he.color,letterSpacing:"0.04em"},children:he.name})]}):null}),y.jsxs("div",{className:`iq-card-fade ${fe?"iq-card-visible":"iq-card-hidden"}`,style:{background:"#FFFFFF",borderRadius:24,border:"1px solid #E2E8F0",padding:32},children:[y.jsx("div",{style:{display:"flex",alignItems:"center",gap:20,marginBottom:28},children:ne||!he?y.jsxs("div",{style:{flex:1,textAlign:"center",padding:"8px 0"},children:[y.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 6px"},children:"Please wait"}),y.jsx("h2",{style:{fontSize:18,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:"Checking eligible providers"}),y.jsx("p",{style:{fontSize:13,color:"#64748B",margin:0},children:"Reviewing your details against our carrier network"})]}):y.jsxs(y.Fragment,{children:[y.jsxs("div",{style:{position:"relative",flexShrink:0},children:[y.jsx(JE,{progress:j,color:he.color,size:80}),y.jsx("div",{style:{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"},children:y.jsxs("span",{style:{fontSize:14,fontWeight:700,color:he.color},children:[Math.round(j),"%"]})})]}),y.jsxs("div",{style:{flex:1},children:[y.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.1em",textTransform:"uppercase",margin:"0 0 4px"},children:Ae?"Still checking":"Now checking"}),y.jsx("h2",{style:{fontSize:20,fontWeight:700,color:"#0F172A",margin:"0 0 6px",letterSpacing:"-0.02em"},children:he.name}),y.jsx("p",{className:"iq-status-text",style:{fontSize:13,color:"#64748B",margin:0},children:nc[G]},`${g}-${G}`)]})]})}),y.jsxs("div",{children:[y.jsx("p",{style:{fontSize:11,fontWeight:700,color:"#94A3B8",letterSpacing:"0.08em",textTransform:"uppercase",margin:"0 0 8px"},children:ne?"Initializing":"Gathering quotes"}),y.jsx("div",{style:{height:6,background:"#F1F5F9",borderRadius:100,overflow:"hidden"},children:y.jsx("div",{style:{height:"100%",width:"35%",background:f.accent,borderRadius:100,animation:"shimmerSlide 1.4s ease-in-out infinite"}})})]})]})]})})]})}function tT({onGoBack:n}){return y.jsxs("section",{className:"mt-4",children:[y.jsxs("div",{className:"rounded-xl border border-red-200 bg-red-50 p-5",children:[y.jsx("h3",{className:"text-base font-semibold text-red-700",children:"Sorry, quote submission failed"}),y.jsx("p",{className:"mt-2 text-sm text-red-700",children:"We ran into an issue submitting your quote. Our team will investigate and get back to you soon."})]}),y.jsx("div",{className:"mt-5",children:y.jsx("button",{type:"button",onClick:n,className:"h-12 w-full rounded-full border border-gray-300 text-text-primary hover:bg-gray-50 transition",children:"Go back"})})]})}function be(n){if(n===!0)return"Yes";if(n===!1)return"No"}function Zt(n){if(n)try{const r=typeof n=="string"?new Date(n):n;return isNaN(r.getTime())?void 0:r.toISOString().split("T")[0]}catch{return}}function nT(n){const r=n,l={};r.phone&&(l.phone=r.phone),r.first_name&&(l.first_name=r.first_name),r.last_name&&(l.last_name=r.last_name),r.email&&(l.email=r.email),r.date_of_birth&&(l.date_of_birth=Zt(r.date_of_birth)),r.product&&(l.product=r.product),r.state&&(l.state=r.state),r.postal_code&&(l.postal_code=r.postal_code);const o=[];r.line_1&&o.push(r.line_1),r.line_2&&o.push(r.line_2),r.city&&o.push(r.city),r.state&&o.push(r.state),r.postal_code&&o.push(r.postal_code),o.length>0&&(l.address=o.join(", ")),typeof r.ssn_display=="string"&&(l.ssn_display=r.ssn_display),r.years_at_address!==null&&r.years_at_address!==void 0&&(l.years_at_address=r.years_at_address),r.months_at_address!==null&&r.months_at_address!==void 0&&(l.months_at_address=r.months_at_address),r.move_in_date&&(l.move_in_date=Zt(r.move_in_date));const c=[];r.prior_line_1&&c.push(r.prior_line_1),r.prior_line_2&&c.push(r.prior_line_2),r.prior_city&&c.push(r.prior_city),r.prior_state&&c.push(r.prior_state),r.prior_postal_code&&c.push(r.prior_postal_code),c.length>0&&(l.prior_address=c.join(", ")),r.years_at_prior_address!==null&&r.years_at_prior_address!==void 0&&(l.years_at_prior_address=r.years_at_prior_address),r.is_mailing_address_different!==null&&r.is_mailing_address_different!==void 0&&(l.is_mailing_address_different=be(r.is_mailing_address_different)),r.mailing_address&&(l.mailing_address=r.mailing_address),r.effective_date&&(l.effective_date=Zt(r.effective_date)),r.auto_has_prior_insurance!==null&&r.auto_has_prior_insurance!==void 0&&(l.auto_has_prior_insurance=be(r.auto_has_prior_insurance)),r.auto_prior_expiration_date&&(l.auto_prior_expiration_date=Zt(r.auto_prior_expiration_date)),r.auto_prior_carrier_name&&(l.auto_prior_carrier_name=r.auto_prior_carrier_name),r.auto_prior_liability_limit&&(l.auto_prior_liability_limit=r.auto_prior_liability_limit),r.auto_reason_for_no_insurance&&(l.auto_reason_for_no_insurance=r.auto_reason_for_no_insurance),r.auto_prior_years!==null&&r.auto_prior_years!==void 0&&(l.auto_prior_years=r.auto_prior_years),r.auto_prior_months!==null&&r.auto_prior_months!==void 0&&(l.auto_prior_months=r.auto_prior_months),r.auto_continuous_coverage_years!==null&&r.auto_continuous_coverage_years!==void 0&&(l.auto_continuous_coverage_years=r.auto_continuous_coverage_years),r.auto_cancelled_declined_refused_to_renew!==null&&r.auto_cancelled_declined_refused_to_renew!==void 0&&(l.auto_cancelled_declined_refused_to_renew=be(r.auto_cancelled_declined_refused_to_renew)),r.auto_current_annual_premium_cents!==null&&r.auto_current_annual_premium_cents!==void 0&&(l.auto_current_annual_premium_cents=r.auto_current_annual_premium_cents),r.policy_bi&&(l.policy_bi=r.policy_bi),r.policy_um&&(l.policy_um=r.policy_um),r.policy_pd&&(l.policy_pd=r.policy_pd),r.policy_mp&&(l.policy_mp=r.policy_mp),r.policy_umpd&&(l.policy_umpd=r.policy_umpd),r.policy_pip&&(l.policy_pip=r.policy_pip),r.policy_auto_death_indemnity&&(l.policy_auto_death_indemnity=r.policy_auto_death_indemnity),r.driver_vehicle_assignments&&(l.driver_vehicle_assignments=r.driver_vehicle_assignments),r.home_has_prior_insurance!==null&&r.home_has_prior_insurance!==void 0&&(l.home_has_prior_insurance=be(r.home_has_prior_insurance)),r.home_prior_expiration_date&&(l.home_prior_expiration_date=Zt(r.home_prior_expiration_date)),r.home_prior_carrier_name&&(l.home_prior_carrier_name=r.home_prior_carrier_name),r.home_prior_years!==null&&r.home_prior_years!==void 0&&(l.home_prior_years=r.home_prior_years),r.home_continuous_coverage_years!==null&&r.home_continuous_coverage_years!==void 0&&(l.home_continuous_coverage_years=r.home_continuous_coverage_years),r.property_insurance_cancelled!==null&&r.property_insurance_cancelled!==void 0&&(l.property_insurance_cancelled=be(r.property_insurance_cancelled)),r.lapse_in_coverage!==null&&r.lapse_in_coverage!==void 0&&(l.lapse_in_coverage=be(r.lapse_in_coverage)),r.year_built!==null&&r.year_built!==void 0&&(l.year_built=r.year_built),r.number_of_units!==null&&r.number_of_units!==void 0&&(l.number_of_units=r.number_of_units),r.number_of_stories!==null&&r.number_of_stories!==void 0&&(l.number_of_stories=r.number_of_stories),r.number_of_beds!==null&&r.number_of_beds!==void 0&&(l.number_of_beds=r.number_of_beds),r.number_of_full_baths!==null&&r.number_of_full_baths!==void 0&&(l.number_of_full_baths=r.number_of_full_baths),r.number_of_partial_baths!==null&&r.number_of_partial_baths!==void 0&&(l.number_of_partial_baths=r.number_of_partial_baths),r.under_construction!==null&&r.under_construction!==void 0&&(l.under_construction=be(r.under_construction)),r.distance_from_fire_hydrant_ft&&(l.distance_from_fire_hydrant_ft=r.distance_from_fire_hydrant_ft),r.distance_from_fire_station_miles&&(l.distance_from_fire_station_miles=r.distance_from_fire_station_miles),r.architectural_style&&(l.architectural_style=r.architectural_style),r.dwelling_type&&(l.dwelling_type=r.dwelling_type),r.construction_quality&&(l.construction_quality=r.construction_quality),r.located_over_water!==null&&r.located_over_water!==void 0&&(l.located_over_water=r.located_over_water),r.construction_type&&(l.construction_type=r.construction_type),r.exterior_wall_type&&(l.exterior_wall_type=r.exterior_wall_type),r.foundation_type&&(l.foundation_type=r.foundation_type),r.roof_material_type&&(l.roof_material_type=r.roof_material_type),r.roof_shape&&(l.roof_shape=r.roof_shape),r.roof_updated_type&&(l.roof_updated_type=r.roof_updated_type),r.year_roof_updated!==null&&r.year_roof_updated!==void 0&&(l.year_roof_updated=r.year_roof_updated),r.mit_credit_form!==null&&r.mit_credit_form!==void 0&&(l.mit_credit_form=be(r.mit_credit_form)),r.storm_shutters!==null&&r.storm_shutters!==void 0&&(l.storm_shutters=be(r.storm_shutters)),r.heating_type&&(l.heating_type=r.heating_type),r.oil_tank_location&&(l.oil_tank_location=r.oil_tank_location),r.heating_fuel_type&&(l.heating_fuel_type=r.heating_fuel_type),r.number_of_fireplaces!==null&&r.number_of_fireplaces!==void 0&&(l.number_of_fireplaces=r.number_of_fireplaces),r.basement_type&&(l.basement_type=r.basement_type),r.parking_type&&(l.parking_type=r.parking_type),r.number_of_parking_spaces!==null&&r.number_of_parking_spaces!==void 0&&(l.number_of_parking_spaces=r.number_of_parking_spaces),r.plumbing_type&&(l.plumbing_type=r.plumbing_type),r.pool_type&&(l.pool_type=r.pool_type),r.total_area_sq_ft!==null&&r.total_area_sq_ft!==void 0&&(l.total_area_sq_ft=r.total_area_sq_ft),r.parcel_area_sq_ft!==null&&r.parcel_area_sq_ft!==void 0&&(l.parcel_area_sq_ft=r.parcel_area_sq_ft),r.residence_type&&(l.residence_type=r.residence_type),r.usage_type&&(l.usage_type=r.usage_type),r.household_size!==null&&r.household_size!==void 0&&(l.household_size=r.household_size),r.number_of_mortgagees!==null&&r.number_of_mortgagees!==void 0&&(l.number_of_mortgagees=r.number_of_mortgagees),r.has_dog!==null&&r.has_dog!==void 0&&(l.has_dog=be(r.has_dog)),r.dog_breed_type&&(l.dog_breed_type=r.dog_breed_type),r.number_of_dogs!==null&&r.number_of_dogs!==void 0&&(l.number_of_dogs=r.number_of_dogs),r.has_vicious_animals!==null&&r.has_vicious_animals!==void 0&&(l.has_vicious_animals=be(r.has_vicious_animals)),r.has_business_on_premises!==null&&r.has_business_on_premises!==void 0&&(l.has_business_on_premises=be(r.has_business_on_premises)),r.business_class&&(l.business_class=r.business_class),r.occupancy_type&&(l.occupancy_type=r.occupancy_type),r.short_term_rental!==null&&r.short_term_rental!==void 0&&(l.short_term_rental=be(r.short_term_rental)),r.sale_price_cents!==null&&r.sale_price_cents!==void 0&&(l.sale_price_cents=Math.round(Number(r.sale_price_cents)/100)),r.number_of_families!==null&&r.number_of_families!==void 0&&(l.number_of_families=r.number_of_families),r.number_of_units_in_firewall!==null&&r.number_of_units_in_firewall!==void 0&&(l.number_of_units_in_firewall=r.number_of_units_in_firewall),r.heating_update_yn!==null&&r.heating_update_yn!==void 0&&(l.heating_update_yn=be(r.heating_update_yn)),r.heating_update_type&&(l.heating_update_type=r.heating_update_type),r.heating_update_year!==null&&r.heating_update_year!==void 0&&(l.heating_update_year=r.heating_update_year),r.plumbing_update_yn!==null&&r.plumbing_update_yn!==void 0&&(l.plumbing_update_yn=be(r.plumbing_update_yn)),r.plumbing_update_type&&(l.plumbing_update_type=r.plumbing_update_type),r.plumbing_update_year!==null&&r.plumbing_update_year!==void 0&&(l.plumbing_update_year=r.plumbing_update_year),r.electrical_update_yn!==null&&r.electrical_update_yn!==void 0&&(l.electrical_update_yn=be(r.electrical_update_yn)),r.electrical_update_type&&(l.electrical_update_type=r.electrical_update_type),r.electrical_update_year!==null&&r.electrical_update_year!==void 0&&(l.electrical_update_year=r.electrical_update_year),r.electric_circuit_breaker!==null&&r.electric_circuit_breaker!==void 0&&(l.electric_circuit_breaker=be(r.electric_circuit_breaker)),r.dwelling_replacement_cost!==null&&r.dwelling_replacement_cost!==void 0&&(l.dwelling_replacement_cost=r.dwelling_replacement_cost),r.other_structures_coverage!==null&&r.other_structures_coverage!==void 0&&(l.other_structures_coverage=r.other_structures_coverage),r.personal_property_coverage!==null&&r.personal_property_coverage!==void 0&&(l.personal_property_coverage=r.personal_property_coverage),r.loss_of_use_coverage!==null&&r.loss_of_use_coverage!==void 0&&(l.loss_of_use_coverage=r.loss_of_use_coverage),r.personal_liability&&(l.personal_liability=r.personal_liability),r.dwelling_medical_payments&&(l.dwelling_medical_payments=r.dwelling_medical_payments),r.all_perils_deductible&&(l.all_perils_deductible=r.all_perils_deductible),r.windstorm_deductible&&(l.windstorm_deductible=r.windstorm_deductible),r.has_garage!==null&&r.has_garage!==void 0&&(l.has_garage=be(r.has_garage)),r.has_pool!==null&&r.has_pool!==void 0&&(l.has_pool=be(r.has_pool)),r.has_trampoline!==null&&r.has_trampoline!==void 0&&(l.has_trampoline=be(r.has_trampoline)),r.gender&&(l.gender=r.gender),r.marital_status&&(l.marital_status=r.marital_status),r.employment_industry&&(l.employment_industry=r.employment_industry),r.occupation&&(l.occupation=r.occupation),r.has_co_applicant!==null&&r.has_co_applicant!==void 0&&(l.has_co_applicant=be(r.has_co_applicant)),r.co_applicant_first_name&&(l.co_applicant_first_name=r.co_applicant_first_name),r.co_applicant_middle_name&&(l.co_applicant_middle_name=r.co_applicant_middle_name),r.co_applicant_last_name&&(l.co_applicant_last_name=r.co_applicant_last_name),r.co_applicant_gender&&(l.co_applicant_gender=r.co_applicant_gender),r.co_applicant_marital_status&&(l.co_applicant_marital_status=r.co_applicant_marital_status),r.co_applicant_relationship&&(l.co_applicant_relationship=r.co_applicant_relationship),r.co_applicant_date_of_birth&&(l.co_applicant_date_of_birth=Zt(r.co_applicant_date_of_birth)),r.co_applicant_employment_industry&&(l.co_applicant_employment_industry=r.co_applicant_employment_industry),r.co_applicant_occupation&&(l.co_applicant_occupation=r.co_applicant_occupation),r.retiree_discount!==null&&r.retiree_discount!==void 0&&(l.retiree_discount=be(r.retiree_discount)),r.gated_community_discount!==null&&r.gated_community_discount!==void 0&&(l.gated_community_discount=be(r.gated_community_discount)),r.multi_policy_discount!==null&&r.multi_policy_discount!==void 0&&(l.multi_policy_discount=be(r.multi_policy_discount)),r.non_smoker_discount!==null&&r.non_smoker_discount!==void 0&&(l.non_smoker_discount=be(r.non_smoker_discount)),r.first_time_buyer_discount!==null&&r.first_time_buyer_discount!==void 0&&(l.first_time_buyer_discount=be(r.first_time_buyer_discount)),r.fire_detection_system!==null&&r.fire_detection_system!==void 0&&(l.fire_detection_system=be(r.fire_detection_system)),r.burglar_alarm_system!==null&&r.burglar_alarm_system!==void 0&&(l.burglar_alarm_system=be(r.burglar_alarm_system)),r.burglar_alarm_system_type&&(l.burglar_alarm_system_type=r.burglar_alarm_system_type),r.smoke_detectors!==null&&r.smoke_detectors!==void 0&&(l.smoke_detectors=be(r.smoke_detectors)),r.sprinkler_system!==null&&r.sprinkler_system!==void 0&&(l.sprinkler_system=be(r.sprinkler_system)),r.sprinkler_system_type&&(l.sprinkler_system_type=r.sprinkler_system_type),r.gas_leakage_detector!==null&&r.gas_leakage_detector!==void 0&&(l.gas_leakage_detector=be(r.gas_leakage_detector)),r.deadbolt_locks!==null&&r.deadbolt_locks!==void 0&&(l.deadbolt_locks=be(r.deadbolt_locks)),r.fire_extinguisher!==null&&r.fire_extinguisher!==void 0&&(l.fire_extinguisher=be(r.fire_extinguisher)),r.order_credit_authorized!==null&&r.order_credit_authorized!==void 0&&(l.order_credit_authorized=be(r.order_credit_authorized)),r.has_health_insurance_auto_accident!==null&&r.has_health_insurance_auto_accident!==void 0&&(l.has_health_insurance_auto_accident=be(r.has_health_insurance_auto_accident)),r.is_corporation!==null&&r.is_corporation!==void 0&&(l.is_corporation=be(r.is_corporation)),r.named_insured_foreclosure_repo_bankruptcy!==null&&r.named_insured_foreclosure_repo_bankruptcy!==void 0&&(l.named_insured_foreclosure_repo_bankruptcy=be(r.named_insured_foreclosure_repo_bankruptcy)),r.named_insured_convicted_insurance_fraud!==null&&r.named_insured_convicted_insurance_fraud!==void 0&&(l.named_insured_convicted_insurance_fraud=be(r.named_insured_convicted_insurance_fraud));const f={};if(r.vehicles)for(const m of r.vehicles)m.quote_vehicle_id&&m.vin&&(f[m.quote_vehicle_id]=m.vin);return r.drivers&&r.drivers.length>0?(l.drivers="Yes",l.drivers__items=r.drivers.map(m=>{const _=m,g={};_.first_name&&(g.first_name=_.first_name),_.middle_name&&(g.middle_name=_.middle_name),_.last_name&&(g.last_name=_.last_name),_.date_of_birth&&(g.date_of_birth=Zt(_.date_of_birth)),_.gender&&(g.gender=_.gender),_.marital_status&&(g.marital_status=_.marital_status),_.relationship_to_insured&&(g.relationship_to_insured=_.relationship_to_insured),_.is_registered_owner!==null&&_.is_registered_owner!==void 0&&(g.is_registered_owner=_.is_registered_owner?"Yes":"No"),_.license_state&&(g.license_state=_.license_state),_.license_status&&(g.license_status=_.license_status),_.license_number&&(g.license_number=_.license_number),_.date_first_licensed&&(g.date_first_licensed=Zt(_.date_first_licensed)),_.education_level&&(g.education_level=p0(_.education_level)),_.occupation&&(g.occupation=y0(_.occupation)),_.industry&&(g.industry=No(_.industry)),_.employment_status&&(g.employment_status=_.employment_status),_.last_5_years_license_suspended_or_revoked!==null&&_.last_5_years_license_suspended_or_revoked!==void 0&&(g.last_5_years_license_suspended_or_revoked=be(_.last_5_years_license_suspended_or_revoked)),_.accident_prevention_course!==null&&_.accident_prevention_course!==void 0&&(g.accident_prevention_course=be(_.accident_prevention_course)),_.accident_prevention_course_date&&(g.accident_prevention_course_date=Zt(_.accident_prevention_course_date)),_.sr22!==null&&_.sr22!==void 0&&(g.sr22=be(_.sr22));const p=_.ssn_display;typeof p=="string"&&(g.ssn_display=p);const b=_.driver_violations;b&&b.length>0&&(g.driver_violations="Yes",g.driver_violations__items=b.map(B=>{const G={};return B.code&&(G.code=B.code),B.occurred_at&&(G.occurred_at=Zt(B.occurred_at)),G}));const R=_.driver_accidents;R&&R.length>0&&(g.driver_accidents="Yes",g.driver_accidents__items=R.map(B=>{const G={};return B.occurred_at&&(G.occurred_at=Zt(B.occurred_at)),B.description&&(G.description=B.description),B.quote_vehicle_id&&(G.quote_vehicle_id=f[B.quote_vehicle_id]??B.quote_vehicle_id),B.property_damage_amount_paid_cents!==null&&B.property_damage_amount_paid_cents!==void 0&&(G.property_damage_amount_paid_cents=B.property_damage_amount_paid_cents),B.personal_injury_amount_paid_cents!==null&&B.personal_injury_amount_paid_cents!==void 0&&(G.personal_injury_amount_paid_cents=B.personal_injury_amount_paid_cents),G}));const j=_.losses;return j&&j.length>0&&(g.losses="Yes",g.losses__items=j.map(B=>{const G={};return B.description&&(G.description=B.description),B.date_of_incident&&(G.date_of_incident=Zt(B.date_of_incident)),B.amount_paid_cents!==null&&B.amount_paid_cents!==void 0&&(G.amount_paid_cents=B.amount_paid_cents),B.quote_vehicle_id&&(G.quote_vehicle_id=f[B.quote_vehicle_id]??B.quote_vehicle_id),G})),g})):l.drivers="No",r.vehicles&&r.vehicles.length>0?(l.vehicles="Yes",l.vehicles__items=r.vehicles.map(m=>{const _=m,g={};_.vin&&(g.vin=_.vin),_.year!==null&&_.year!==void 0&&(g.year=String(_.year)),_.make&&(g.make=_.make),_.model&&(g.model=_.model),_.body_style&&(g.body_style=_.body_style),_.ownership_type&&(g.ownership_type=_.ownership_type),_.usage&&(g.usage=_.usage),_.annual_mileage!==null&&_.annual_mileage!==void 0&&(g.annual_mileage=_.annual_mileage),_.miles_to_work!==null&&_.miles_to_work!==void 0&&(g.miles_to_work=_.miles_to_work),_.percent_to_work!==null&&_.percent_to_work!==void 0&&(g.percent_to_work=_.percent_to_work);const p=[];return _.garaging_address_line_1&&p.push(_.garaging_address_line_1),_.garaging_address_line_2&&p.push(_.garaging_address_line_2),_.garaging_address_city&&p.push(_.garaging_address_city),_.garaging_address_state&&p.push(_.garaging_address_state),_.garaging_address_postal_code&&p.push(_.garaging_address_postal_code),p.length>0&&(g.garaging_address=p.join(", ")),_.new_when_purchased!==null&&_.new_when_purchased!==void 0&&(g.new_when_purchased=be(_.new_when_purchased)),_.purchase_date&&(g.purchase_date=Zt(_.purchase_date)),_.anti_theft_type&&(g.anti_theft_type=_.anti_theft_type),_.passive_restraint_type&&(g.passive_restraint_type=_.passive_restraint_type),_.anti_lock_brakes!==null&&_.anti_lock_brakes!==void 0&&(g.anti_lock_brakes=be(_.anti_lock_brakes)),_.daytime_running_lights!==null&&_.daytime_running_lights!==void 0&&(g.daytime_running_lights=be(_.daytime_running_lights)),_.custom_equipment_value_cents!==null&&_.custom_equipment_value_cents!==void 0&&(g.custom_equipment_value_cents=_.custom_equipment_value_cents),_.cost_new_value_cents!==null&&_.cost_new_value_cents!==void 0&&(g.cost_new_value_cents=_.cost_new_value_cents),_.stated_value_amount_cents!==null&&_.stated_value_amount_cents!==void 0&&(g.stated_value_amount_cents=_.stated_value_amount_cents),_.vehicle_has_modifications!==null&&_.vehicle_has_modifications!==void 0&&(g.vehicle_has_modifications=be(_.vehicle_has_modifications)),_.vehicle_garaged_at_residence!==null&&_.vehicle_garaged_at_residence!==void 0&&(g.vehicle_garaged_at_residence=be(_.vehicle_garaged_at_residence)),_.vehicle_comp_deductible&&(g.vehicle_comp_deductible=_.vehicle_comp_deductible),_.vehicle_coll_deductible&&(g.vehicle_coll_deductible=_.vehicle_coll_deductible),_.vehicle_towing_and_labor&&(g.vehicle_towing_and_labor=_.vehicle_towing_and_labor),_.vehicle_transportation_expense&&(g.vehicle_transportation_expense=_.vehicle_transportation_expense),_.vehicle_full_glass!==null&&_.vehicle_full_glass!==void 0&&(g.vehicle_full_glass=be(_.vehicle_full_glass)),_.vehicle_loan_lease!==null&&_.vehicle_loan_lease!==void 0&&(g.vehicle_loan_lease=be(_.vehicle_loan_lease)),_.coverages&&_.coverages.length>0&&(g.coverages__items=_.coverages.map(b=>{const R={};return b.type&&(R.type=b.type),b.per_person_limit_cents!==null&&b.per_person_limit_cents!==void 0&&(R.per_person_limit_cents=b.per_person_limit_cents),b.per_incident_limit_cents!==null&&b.per_incident_limit_cents!==void 0&&(R.per_incident_limit_cents=b.per_incident_limit_cents),b.per_incident_limit_percent!==null&&b.per_incident_limit_percent!==void 0&&(R.per_incident_limit_percent=b.per_incident_limit_percent),b.per_day_limit_cents!==null&&b.per_day_limit_cents!==void 0&&(R.per_day_limit_cents=b.per_day_limit_cents),b.deductible_cents!==null&&b.deductible_cents!==void 0&&(R.deductible_cents=b.deductible_cents),b.is_declined!==null&&b.is_declined!==void 0&&(R.is_declined=be(b.is_declined)),R})),_.vehicle_lienholders&&_.vehicle_lienholders.length>0&&(g.vehicle_lienholders__items=_.vehicle_lienholders.map(b=>{const R={};return b.name&&(R.name=b.name),b.type&&(R.type=b.type),b.line_1&&(R.line_1=b.line_1),b.line_2&&(R.line_2=b.line_2),b.city&&(R.city=b.city),b.state&&(R.state=b.state),b.postal_code&&(R.postal_code=b.postal_code),b.phone&&(R.phone=b.phone),b.fax&&(R.fax=b.fax),R})),g})):l.vehicles="No",r.losses&&r.losses.length>0?(l.home_losses="Yes",l.home_losses__items=r.losses.map(m=>{const _={};return m.description&&(_.description=m.description),m.date_of_incident&&(_.date_of_incident=Zt(m.date_of_incident)),m.amount_paid_cents!==null&&m.amount_paid_cents!==void 0&&(_.amount_paid_cents=Math.round(Number(m.amount_paid_cents)/100)),_})):l.home_losses="No",l}const Dh=new Set(["Zip","Product","Driver","Vehicle"]);function aT(n){return n?Array.isArray(n.drivers__items)?n.drivers__items.length:Array.isArray(n.drivers)?n.drivers.length:null:null}function xh(n,r){const l=aT(r),o=n.filter(f=>f.key!=="AutoPolicy"),c=o.length>0?o:n;return c}function bo(n){const r={},l=p=>{if(typeof p=="string"){if(p==="Yes")return!0;if(p==="No")return!1}return p},o=Object.keys(n).filter(p=>!p.includes("__items")),c=new Set,f=new Set;for(const[p,b]of Object.entries(n))if(p.endsWith("__items")&&Array.isArray(b)){const R=p.replace("__items","");f.add(R),o.includes(R)&&b.forEach(j=>{typeof j=="object"&&j!==null&&Object.keys(j).forEach(B=>{c.add(B)})})}for(const[p,b]of Object.entries(n))if(p.endsWith("__items")){const R=p.replace("__items","");if(o.includes(R)){const B=Array.isArray(b)?b.map(G=>bo(G)):b;r[R]=B}}else if(!p.includes("__items")){if(f.has(p))continue;c.has(p)||(r[p]=l(b))}const m=r.auto_prior_carrier_name;if(typeof m=="string"&&m.trim()!==""){const p=m==="NoPriorInsurance";r.auto_has_prior_insurance=!p,p&&(delete r.auto_prior_years,delete r.auto_prior_months,delete r.auto_prior_expiration_date,delete r.auto_prior_liability_limit,delete r.auto_continuous_coverage_years,delete r.auto_cancelled_declined_refused_to_renew,delete r.auto_current_annual_premium_cents)}const _=r.home_prior_carrier_name;if(typeof _=="string"&&_.trim()!==""){const p=_==="NoPriorInsurance";r.home_has_prior_insurance=!p,p&&(delete r.home_prior_years,delete r.home_continuous_coverage_years,delete r.home_prior_expiration_date,delete r.property_insurance_cancelled)}Array.isArray(r.drivers)&&(r.drivers=r.drivers.map(p=>{if(!p||typeof p!="object")return p;const b={...p};return b.industry=No(b.industry),b.education_level=p0(b.education_level),b.occupation=y0(b.occupation),b})),console.log("[DEBUG_TRANSFORM] transformed.drivers type:",typeof r.drivers,"isArray:",Array.isArray(r.drivers),Array.isArray(r.drivers)?`count=${r.drivers.length}`:`value=${JSON.stringify(r.drivers)?.slice(0,100)}`),Array.isArray(r.drivers)&&r.drivers.forEach((p,b)=>{const R=p;console.log(`[DEBUG_TRANSFORM] Driver ${b}:`,{first_name:R.first_name,gender:R.gender,marital_status:R.marital_status,education_level:R.education_level,industry:R.industry,occupation:R.occupation,sr22:R.sr22,keys:Object.keys(R)})});const g=21474836;if("sale_price_cents"in r){const p=r.sale_price_cents;if(typeof p=="number"&&Number.isFinite(p)){const b=Math.trunc(p);if(b>=1){const R=Math.min(b,g);r.sale_price_cents=R*100}}}return Array.isArray(r.home_losses)&&(r.home_losses=r.home_losses.map(p=>{if(!p||typeof p!="object")return p;const b=p,R=b.amount_paid_cents;if(typeof R!="number"||!Number.isFinite(R))return b;const j=Math.trunc(R),B=Math.min(Math.max(j,0),g);return{...b,amount_paid_cents:B*100}})),r}function rT(n,r){const l=n.findIndex(c=>c.key===r);return l<0?r:n[l+1]?.key??r}function D0(n){return n.some(r=>String(r.key)==="BundlePolicy"||String(r.key)==="BundleCustomer")}function wh(n){return D0(n)?"Bundle":n.some(r=>String(r.key)==="Vehicle"||String(r.key)==="Driver")?"Auto":"Home"}const iT={Auto:45e3,Home:5e4,Bundle:1e5};function lT(n,r){if(n!=="AutoCurrentCarrier")return r;const l=r.some(f=>String(f.key)==="auto_cancelled_declined_refused_to_renew"),o=r.some(f=>String(f.key)==="vehicle_policy_selections"),c=[...r];return l||c.push({question:"Has any auto insurance company cancelled, declined or refused to renew you in the last 5 years?",inputType:"radio",options:["Yes","No"],key:"auto_cancelled_declined_refused_to_renew",required:!0}),o||c.push({question:"Vehicle coverage selections",inputType:"custom",key:"vehicle_policy_selections",required:!1}),c}function oT(n,r){if(n!=="Vehicle")return r;const l=o=>o.map(c=>{const f=c.conditionals?.map(m=>{const _=m.conditionalQuestions??[];return _.length?{...m,conditionalQuestions:l(_)}:m});return String(c.key)!=="vin"?f?{...c,conditionals:f}:c:{...c,required:!1,...f?{conditionals:f}:{}}});return l(r)}function uT({isOpen:n,onClose:r}){const[l,o]=H.useState([]),[c,f]=H.useState(null),m=H.useRef(null);H.useEffect(()=>{m.current=c},[c]);const[_,g]=H.useState(null),[p,b]=H.useState(!1),[R,j]=H.useState(!1),[B,G]=H.useState([]),k=H.useRef(null),[fe,le]=H.useState(null),[de,te]=H.useState(void 0),[ie,W]=H.useState(!1),[re,me]=H.useState(null),[ne,he]=H.useState(null),[Ae,Ee]=H.useState(!1),Ne=H.useRef(!1);H.useEffect(()=>{if(!p||R)return;const $=wh(l);let V=!1;const v=[];let M=0,O=0;const T=24,S=3,I=5e3;let w=!1;const P=async()=>{if(V)return;M++;try{const{quote:ee}=await ih();if(V)return;if(O=0,!w){const K=ee?.appetites??null,Q=KE(K,$);Q.length>0&&(G(Q),w=!0)}const oe=ee?.rates_status??null;if(oe==="completed"){const{rates:K}=await rh();if(V)return;k.current=K,j(!0);return}if(oe==="no_rates"){k.current=[],j(!0);return}if(oe==="failed"){me({message:"submission_failed"}),b(!1);return}}catch(ee){if(O++,console.warn("Provider polling: getQuote failed",{attempt:M,consecutiveFailures:O,error:ee}),O>=S){me({message:"submission_failed"}),b(!1);return}}if(V)return;if(M>=T){me({message:"submission_failed"}),b(!1);return}const X=window.setTimeout(P,I);v.push(X)};return P(),()=>{V=!0,v.forEach(X=>window.clearTimeout(X))}},[p,R,l]);function Ke($){const V={Zip:"ZIP Code",Email:"Email",Product:"Product & Address",Home:"Home Details",Vehicle:"Vehicle",Name:"Name & DOB",Driver:"Operator",AutoCurrentCarrier:"Policy",HomeCurrentCarrier:"Policy",HomePolicy:"Policy",BundlePolicy:"Policy",Demographics:"Applicant",Ssn:"SSN",Phone:"Phone",SMSVerification:"Verify",AutoPolicy:"Policy",Customer:"Applicant",HomeCustomer:"Applicant",BundleCustomer:"Applicant",HomeConstruction:"Structure",HomeFeatures:"Features"};return $.map(M=>({key:M,title:V[M]||M,loadQuestions:async()=>{const O=await uE(M,m.current??void 0);let T=lT(M,O.questions);return T=oT(M,T),T}}))}H.useEffect(()=>{const $=async()=>{try{const V=aE();if(dc(),V){W(!0),f(V);try{const v=$i(),M=await ih(v?void 0:V);if(!M||!M.quote)throw new Error("Invalid response from getQuote: missing quote data");const{quote:O}=M,{stages:T}=await _o(V),S=Ke(T);o(S);let I;try{I=nT(O),le(I)}catch(P){throw new Error(`Failed to transform quote data: ${P instanceof Error?P.message:"Unknown error"}`)}const w=xh(S,I);if(o(w),O.current_stage){const P=O.current_stage==="State"?"Product":O.current_stage,X=w.findIndex(ee=>ee.key===P);X>=0?te(X):te(w.length-1)}else te(w.length-1)}catch(v){const M=v;if(M.statusCode===404)g0(),f(null);else if(M.statusCode===401){b0();try{const{stages:O}=await _o(V),T=Ke(O);o(T);const S=T.findIndex(I=>I.key==="SMSVerification");S>=0&&te(S)}catch{}}}finally{W(!1)}}else{const{stages:v}=await _o();o(Ke(v))}}catch{W(!1)}};n&&!Ne.current&&(Ne.current=!0,$())},[n]),H.useEffect(()=>{if(!n)return;const{overflow:$}=document.body.style;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=$}},[n]);const We=H.useCallback($=>{$.key==="Escape"&&(ph(),r())},[r]);H.useEffect(()=>{if(n)return window.addEventListener("keydown",We),()=>window.removeEventListener("keydown",We)},[n,We]),H.useEffect(()=>{n||(le(null),te(void 0),W(!1),b(!1),he(null),Ee(!1))},[n]),H.useEffect(()=>{n&&kE()},[n]),H.useEffect(()=>{_&&Array.isArray(_)&&HE({rateCount:_.length})},[_]);const ce=H.useCallback(()=>{me(null),te(Math.max(0,l.length-1))},[l.length]),E=H.useCallback(async $=>{if(!(!ne||!c||Ae)){Ee(!0);try{const v={...bo(ne.allValues),communications_consent:$};G([]),j(!1),k.current=null,b(!0),he(null);let M;try{M=await wr(v,!0)}catch(S){throw b(!1),S}if(M.status==="submission_failed"){b(!1),j(!1),k.current=null,me({message:M.message});return}if(M.status==="success")try{const{rates:S}=await rh();k.current=S,j(!0)}catch(S){throw b(!1),S}const O=l.length,T=l[O-1];yh({stageKey:T?.key??"unknown",stageTitle:T?.title??"unknown",stepIndex:O,totalSteps:O}),jE()}catch{b(!1),me({message:"Oops, something went wrong. Please try again later."})}finally{Ee(!1)}}},[ne,c,Ae,l]);if(!n)return null;const D=()=>{ph(),r()};return y.jsxs("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center",role:"dialog","aria-modal":"true","aria-labelledby":"insurance-modal-title",children:[y.jsx("div",{className:"backdrop","aria-hidden":"true"}),y.jsxs("div",{className:"modal-panel bg-white relative w-full max-w-2xl flex flex-col max-h-[90vh] overflow-hidden",role:"document",children:[y.jsx("button",{onClick:D,className:"modal-close-btn absolute top-4 right-4 text-slate-400 hover:text-slate-600 text-xl","aria-label":"Close",type:"button",children:"×"}),!p&&!re&&y.jsx("div",{className:"text-center mb-6",children:y.jsx("h2",{id:"insurance-modal-title",className:"h1-title",children:"Let's shop multiple leading carriers for you."})}),y.jsxs("div",{className:"panel-body flex-1 min-h-0 overflow-y-auto",children:[re&&y.jsx(tT,{onGoBack:ce}),!re&&p&&(()=>{const $=wh(l);return y.jsx(eT,{providers:B,totalTime:iT[$],flow:$,isComplete:R,onComplete:()=>{b(!1),j(!1),G([]),k.current&&(g(k.current),k.current=null)}})})(),!re&&!p&&ne&&y.jsx(ig,{onChoose:E,isSubmitting:Ae}),!re&&!_&&!p&&!ne&&y.jsx(y.Fragment,{children:ie||l.length===0?y.jsx("div",{className:"flex items-center justify-center py-12",children:y.jsx("div",{className:"text-slate-600",children:"Loading..."})}):y.jsx(qE,{stages:l,initialValues:fe??void 0,initialActive:de,quoteId:c??void 0,nonTerminalStageKeys:Dh,onStageComplete:async($,V)=>{try{const v=bo($);let M=c,O=l;const T=O.findIndex(w=>w.key===V),S=O[T],I=rT(O,V);if(M)if(V==="Phone"){const w=v.phone;if(!w)throw new Error("Phone number is required.");const P=$i();await wr({...v,current_stage:I},!1,P?void 0:M),await cE(M,w)}else if(V==="SMSVerification"){const{isVerified:w,token:P}=await ah(M,v.sms_code);if(!w)throw new Error("Invalid SMS code");P&&nh(P),await wr({current_stage:I},!1)}else if(V==="Product"){const w=$i(),{isSupported:P}=await fE(v.state,w?void 0:M??void 0);if(!P)throw new Error("State is not supported");await wr({...v,current_stage:I},!1,w?void 0:M)}else{const w=$i();await wr({...v,current_stage:I},!1,w?void 0:M||void 0)}else{const w=v.postal_code??"";if(!w)throw new Error("ZIP code is required to start a quote.");const X=(await sE(w))?.quoteId;if(!X||typeof X!="string"||X.trim()==="")throw new Error(`Failed to create quote - invalid quoteId returned: ${X}`);M=X,f(X),nE(X),await wr({...v,current_stage:I},!1,X)}if(Dh.has(V))try{const{stages:w}=await _o(M||void 0);O=Ke(w),O=xh(O,$),o(O)}catch(w){console.warn("Unable to refresh stages after flow-shaping step",w)}return yh({stageKey:V,stageTitle:S?.title??V,stepIndex:T+1,totalSteps:O.length}),{success:!0,latestStages:O}}catch(v){return{success:!1,error:v instanceof Error?v.message:"An error occurred"}}},onComplete:async($,V)=>{if(!c)return{success:!1,error:"Oops, something went wrong. Please try again later."};le($);try{if(V==="SMSVerification"){const v=bo($),{isVerified:M,token:O}=await ah(c,v.sms_code);return M?(O&&nh(O),he({allValues:$}),{success:!0}):{success:!1,error:"Invalid SMS code"}}return he({allValues:$}),{success:!0}}catch{const M="Oops, something went wrong. Please try again later.";return me({message:M}),{success:!1,error:M}}}})})," ",!re&&_&&c&&y.jsx(WE,{rates:_,onBack:()=>g(null),isBundleFlow:D0(l)})]}),y.jsx("div",{className:"mt-4 pt-4 border-t border-slate-200 space-y-1",children:y.jsx("p",{className:"text-center text-sm text-slate-500",children:"Insurance products offered through Credify Corporation, a licensed insurance agency."})})]})]})}function sT(){const[n,r]=H.useState(!1),l=H.useCallback(c=>{window.parent&&window.parent!==window&&window.parent.postMessage({type:c,source:"credify-insurance-widget"},"*")},[]);H.useEffect(()=>{const c=f=>{if(f.data?.source==="credify-insurance-widget")switch(f.data.type){case"open":r(!0),l("opened");break;case"close":r(!1),l("closed");break;case"init":l("ready");break}};return window.addEventListener("message",c),l("ready"),()=>{window.removeEventListener("message",c)}},[l]);const o=H.useCallback(()=>{r(!1),l("closed")},[l]);return y.jsx(uT,{isOpen:n,onClose:o})}Qy.createRoot(document.getElementById("root")).render(y.jsx(H.StrictMode,{children:y.jsx(sT,{})}));
123
- //# sourceMappingURL=iframe-908rMnDa.js.map