var Vm=Object.defineProperty;var Km=(e,t,n)=>t in e?Vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ie=(e,t,n)=>(Km(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Qm(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var eh={exports:{}},Ns={},th={exports:{}},ee={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Gi=Symbol.for("react.element"),Jm=Symbol.for("react.portal"),Gm=Symbol.for("react.fragment"),Ym=Symbol.for("react.strict_mode"),Xm=Symbol.for("react.profiler"),Zm=Symbol.for("react.provider"),e0=Symbol.for("react.context"),t0=Symbol.for("react.forward_ref"),n0=Symbol.for("react.suspense"),r0=Symbol.for("react.memo"),i0=Symbol.for("react.lazy"),Wu=Symbol.iterator;function o0(e){return e===null||typeof e!="object"?null:(e=Wu&&e[Wu]||e["@@iterator"],typeof e=="function"?e:null)}var nh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rh=Object.assign,ih={};function Wr(e,t,n){this.props=e,this.context=t,this.refs=ih,this.updater=n||nh}Wr.prototype.isReactComponent={};Wr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function oh(){}oh.prototype=Wr.prototype;function kc(e,t,n){this.props=e,this.context=t,this.refs=ih,this.updater=n||nh}var Ec=kc.prototype=new oh;Ec.constructor=kc;rh(Ec,Wr.prototype);Ec.isPureReactComponent=!0;var qu=Array.isArray,sh=Object.prototype.hasOwnProperty,Cc={current:null},ah={key:!0,ref:!0,__self:!0,__source:!0};function lh(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)sh.call(t,r)&&!ah.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,oe=B[ie];if(0>>1;iei(Ee,W))qei(ot,Ee)?(B[ie]=ot,B[qe]=W,ie=qe):(B[ie]=Ee,B[ue]=W,ie=ue);else if(qei(ot,W))B[ie]=ot,B[qe]=W,ie=qe;else break e}}return V}function i(B,V){var W=B.sortIndex-V.sortIndex;return W!==0?W:B.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var c=[],u=[],d=1,f=null,g=3,h=!1,y=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(B){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=B)r(u),V.sortIndex=V.expirationTime,t(c,V);else break;V=n(u)}}function x(B){if(_=!1,p(B),!y)if(n(c)!==null)y=!0,J(j);else{var V=n(u);V!==null&&fe(x,V.startTime-B)}}function j(B,V){y=!1,_&&(_=!1,w(O),O=-1),h=!0;var W=g;try{for(p(V),f=n(c);f!==null&&(!(f.expirationTime>V)||B&&!H());){var ie=f.callback;if(typeof ie=="function"){f.callback=null,g=f.priorityLevel;var oe=ie(f.expirationTime<=V);V=e.unstable_now(),typeof oe=="function"?f.callback=oe:f===n(c)&&r(c),p(V)}else r(c);f=n(c)}if(f!==null)var ke=!0;else{var ue=n(u);ue!==null&&fe(x,ue.startTime-V),ke=!1}return ke}finally{f=null,g=W,h=!1}}var b=!1,k=null,O=-1,M=5,z=-1;function H(){return!(e.unstable_now()-zB||125ie?(B.sortIndex=W,t(u,B),n(c)===null&&B===n(u)&&(_?(w(O),O=-1):_=!0,fe(x,W-ie))):(B.sortIndex=oe,t(c,B),y||h||(y=!0,J(j))),B},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(B){var V=g;return function(){var W=g;g=V;try{return B.apply(this,arguments)}finally{g=W}}}})(fh);dh.exports=fh;var m0=dh.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var hh=N,ut=m0;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fl=Object.prototype.hasOwnProperty,v0=/^[: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]*$/,Ku={},Qu={};function y0(e){return fl.call(Qu,e)?!0:fl.call(Ku,e)?!1:v0.test(e)?Qu[e]=!0:(Ku[e]=!0,!1)}function x0(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function w0(e,t,n,r){if(t===null||typeof t>"u"||x0(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ge(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Ue={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ue[e]=new Ge(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ue[t]=new Ge(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ue[e]=new Ge(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ue[e]=new Ge(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ue[e]=new Ge(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ue[e]=new Ge(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ue[e]=new Ge(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ue[e]=new Ge(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ue[e]=new Ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var Pc=/[\-:]([a-z])/g;function Tc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Pc,Tc);Ue[t]=new Ge(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Pc,Tc);Ue[t]=new Ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Pc,Tc);Ue[t]=new Ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ue[e]=new Ge(e,1,!1,e.toLowerCase(),null,!1,!1)});Ue.xlinkHref=new Ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ue[e]=new Ge(e,1,!1,e.toLowerCase(),null,!0,!0)});function Rc(e,t,n,r){var i=Ue.hasOwnProperty(t)?Ue[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var c=` `+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=a);break}}}finally{fa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?fi(e):""}function _0(e){switch(e.tag){case 5:return fi(e.type);case 16:return fi("Lazy");case 13:return fi("Suspense");case 19:return fi("SuspenseList");case 0:case 2:case 15:return e=ha(e.type,!1),e;case 11:return e=ha(e.type.render,!1),e;case 1:return e=ha(e.type,!0),e;default:return""}}function ml(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case dr:return"Fragment";case ur:return"Portal";case hl:return"Profiler";case Nc:return"StrictMode";case pl:return"Suspense";case gl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mh:return(e.displayName||"Context")+".Consumer";case gh:return(e._context.displayName||"Context")+".Provider";case Ac:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ic:return t=e.displayName||null,t!==null?t:ml(e.type)||"Memo";case un:t=e._payload,e=e._init;try{return ml(e(t))}catch{}}return null}function S0(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ml(t);case 8:return t===Nc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function yh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j0(e){var t=yh(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function uo(e){e._valueTracker||(e._valueTracker=j0(e))}function xh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=yh(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function es(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function vl(e,t){var n=t.checked;return _e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wh(e,t){t=t.checked,t!=null&&Rc(e,"checked",t,!1)}function yl(e,t){wh(e,t);var n=Cn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xl(e,t.type,n):t.hasOwnProperty("defaultValue")&&xl(e,t.type,Cn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yu(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function xl(e,t,n){(t!=="number"||es(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var hi=Array.isArray;function jr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=fo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Pi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},b0=["Webkit","ms","Moz","O"];Object.keys(vi).forEach(function(e){b0.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vi[t]=vi[e]})});function bh(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||vi.hasOwnProperty(e)&&vi[e]?(""+t).trim():t+"px"}function kh(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=bh(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var k0=_e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Sl(e,t){if(t){if(k0[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function jl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bl=null;function Lc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var kl=null,br=null,kr=null;function ed(e){if(e=Zi(e)){if(typeof kl!="function")throw Error(F(280));var t=e.stateNode;t&&(t=Ms(t),kl(e.stateNode,e.type,t))}}function Eh(e){br?kr?kr.push(e):kr=[e]:br=e}function Ch(){if(br){var e=br,t=kr;if(kr=br=null,ed(e),t)for(e=0;e>>=0,e===0?32:31-(F0(e)/M0|0)|0}var ho=64,po=4194304;function pi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function is(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=pi(a):(o&=s,o!==0&&(r=pi(o)))}else s=n&~i,s!==0?r=pi(s):o!==0&&(r=pi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Yi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Tt(t),e[t]=n}function $0(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=xi),cd=String.fromCharCode(32),ud=!1;function Kh(e,t){switch(e){case"keyup":return gv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fr=!1;function vv(e,t){switch(e){case"compositionend":return Qh(t);case"keypress":return t.which!==32?null:(ud=!0,cd);case"textInput":return e=t.data,e===cd&&ud?null:e;default:return null}}function yv(e,t){if(fr)return e==="compositionend"||!Hc&&Kh(e,t)?(e=qh(),Ao=Uc=gn=null,fr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=pd(n)}}function Xh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zh(){for(var e=window,t=es();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=es(e.document)}return t}function Wc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Cv(e){var t=Zh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Xh(n.ownerDocument.documentElement,n)){if(r!==null&&Wc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=gd(n,o);var s=gd(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,hr=null,Rl=null,_i=null,Nl=!1;function md(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nl||hr==null||hr!==es(r)||(r=hr,"selectionStart"in r&&Wc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),_i&&Li(_i,r)||(_i=r,r=as(Rl,"onSelect"),0mr||(e.current=zl[mr],zl[mr]=null,mr--)}function de(e,t){mr++,zl[mr]=e.current,e.current=t}var On={},We=Rn(On),nt=Rn(!1),Jn=On;function Nr(e,t){var n=e.type.contextTypes;if(!n)return On;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function rt(e){return e=e.childContextTypes,e!=null}function cs(){ge(nt),ge(We)}function jd(e,t,n){if(We.current!==On)throw Error(F(168));de(We,t),de(nt,n)}function lp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(F(108,S0(e)||"Unknown",i));return _e({},n,r)}function us(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||On,Jn=We.current,de(We,e),de(nt,nt.current),!0}function bd(e,t,n){var r=e.stateNode;if(!r)throw Error(F(169));n?(e=lp(e,t,Jn),r.__reactInternalMemoizedMergedChildContext=e,ge(nt),ge(We),de(We,e)):ge(nt),de(nt,n)}var Kt=null,zs=!1,Ca=!1;function cp(e){Kt===null?Kt=[e]:Kt.push(e)}function Bv(e){zs=!0,cp(e)}function Nn(){if(!Ca&&Kt!==null){Ca=!0;var e=0,t=ce;try{var n=Kt;for(ce=1;e>=s,i-=s,Gt=1<<32-Tt(t)+i|n<O?(M=k,k=null):M=k.sibling;var z=g(w,k,p[O],x);if(z===null){k===null&&(k=M);break}e&&k&&z.alternate===null&&t(w,k),m=o(z,m,O),b===null?j=z:b.sibling=z,b=z,k=M}if(O===p.length)return n(w,k),ve&&Ln(w,O),j;if(k===null){for(;OO?(M=k,k=null):M=k.sibling;var H=g(w,k,z.value,x);if(H===null){k===null&&(k=M);break}e&&k&&H.alternate===null&&t(w,k),m=o(H,m,O),b===null?j=H:b.sibling=H,b=H,k=M}if(z.done)return n(w,k),ve&&Ln(w,O),j;if(k===null){for(;!z.done;O++,z=p.next())z=f(w,z.value,x),z!==null&&(m=o(z,m,O),b===null?j=z:b.sibling=z,b=z);return ve&&Ln(w,O),j}for(k=r(w,k);!z.done;O++,z=p.next())z=h(k,w,O,z.value,x),z!==null&&(e&&z.alternate!==null&&k.delete(z.key===null?O:z.key),m=o(z,m,O),b===null?j=z:b.sibling=z,b=z);return e&&k.forEach(function(te){return t(w,te)}),ve&&Ln(w,O),j}function C(w,m,p,x){if(typeof p=="object"&&p!==null&&p.type===dr&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case co:e:{for(var j=p.key,b=m;b!==null;){if(b.key===j){if(j=p.type,j===dr){if(b.tag===7){n(w,b.sibling),m=i(b,p.props.children),m.return=w,w=m;break e}}else if(b.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===un&&Rd(j)===b.type){n(w,b.sibling),m=i(b,p.props),m.ref=ii(w,b,p),m.return=w,w=m;break e}n(w,b);break}else t(w,b);b=b.sibling}p.type===dr?(m=qn(p.props.children,w.mode,x,p.key),m.return=w,w=m):(x=$o(p.type,p.key,p.props,null,w.mode,x),x.ref=ii(w,m,p),x.return=w,w=x)}return s(w);case ur:e:{for(b=p.key;m!==null;){if(m.key===b)if(m.tag===4&&m.stateNode.containerInfo===p.containerInfo&&m.stateNode.implementation===p.implementation){n(w,m.sibling),m=i(m,p.children||[]),m.return=w,w=m;break e}else{n(w,m);break}else t(w,m);m=m.sibling}m=La(p,w.mode,x),m.return=w,w=m}return s(w);case un:return b=p._init,C(w,m,b(p._payload),x)}if(hi(p))return y(w,m,p,x);if(Zr(p))return _(w,m,p,x);_o(w,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,m!==null&&m.tag===6?(n(w,m.sibling),m=i(m,p),m.return=w,w=m):(n(w,m),m=Ia(p,w.mode,x),m.return=w,w=m),s(w)):n(w,m)}return C}var Ir=vp(!0),yp=vp(!1),eo={},Ht=Rn(eo),Bi=Rn(eo),Ui=Rn(eo);function Un(e){if(e===eo)throw Error(F(174));return e}function Zc(e,t){switch(de(Ui,t),de(Bi,e),de(Ht,eo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_l(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_l(t,e)}ge(Ht),de(Ht,t)}function Lr(){ge(Ht),ge(Bi),ge(Ui)}function xp(e){Un(Ui.current);var t=Un(Ht.current),n=_l(t,e.type);t!==n&&(de(Bi,e),de(Ht,n))}function eu(e){Bi.current===e&&(ge(Ht),ge(Bi))}var xe=Rn(0);function ms(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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}var Oa=[];function tu(){for(var e=0;en?n:4,e(!0);var r=Pa.transition;Pa.transition={};try{e(!1),t()}finally{ce=n,Pa.transition=r}}function Lp(){return St().memoizedState}function Hv(e,t,n){var r=bn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fp(e))Mp(t,n);else if(n=hp(e,t,n,r),n!==null){var i=Qe();Rt(n,e,r,i),zp(n,t,r)}}function Wv(e,t,n){var r=bn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fp(e))Mp(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,At(a,s)){var c=t.interleaved;c===null?(i.next=i,Yc(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=hp(e,t,i,r),n!==null&&(i=Qe(),Rt(n,e,r,i),zp(n,t,r))}}function Fp(e){var t=e.alternate;return e===we||t!==null&&t===we}function Mp(e,t){Si=vs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function zp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mc(e,n)}}var ys={readContext:_t,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useInsertionEffect:$e,useLayoutEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useMutableSource:$e,useSyncExternalStore:$e,useId:$e,unstable_isNewReconciler:!1},qv={readContext:_t,useCallback:function(e,t){return Lt().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:Ad,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Mo(4194308,4,Tp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Mo(4,2,e,t)},useMemo:function(e,t){var n=Lt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Hv.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=Lt();return e={current:e},t.memoizedState=e},useState:Nd,useDebugValue:su,useDeferredValue:function(e){return Lt().memoizedState=e},useTransition:function(){var e=Nd(!1),t=e[0];return e=Dv.bind(null,e[1]),Lt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=we,i=Lt();if(ve){if(n===void 0)throw Error(F(407));n=n()}else{if(n=t(),Me===null)throw Error(F(349));Yn&30||Sp(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ad(bp.bind(null,r,o,e),[e]),r.flags|=2048,Hi(9,jp.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Lt(),t=Me.identifierPrefix;if(ve){var n=Yt,r=Gt;n=(r&~(1<<32-Tt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=$i++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Bt]=t,e[zi]=r,Kp(e,t,!1,!1),t.stateNode=e;e:{switch(s=jl(n,r),n){case"dialog":he("cancel",e),he("close",e),i=r;break;case"iframe":case"object":case"embed":he("load",e),i=r;break;case"video":case"audio":for(i=0;iMr&&(t.flags|=128,r=!0,oi(o,!1),t.lanes=4194304)}else{if(!r)if(e=ms(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),oi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!ve)return De(t),null}else 2*be()-o.renderingStartTime>Mr&&n!==1073741824&&(t.flags|=128,r=!0,oi(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=be(),t.sibling=null,n=xe.current,de(xe,r?n&1|2:n&1),t):(De(t),null);case 22:case 23:return fu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?st&1073741824&&(De(t),t.subtreeFlags&6&&(t.flags|=8192)):De(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function Zv(e,t){switch(Vc(t),t.tag){case 1:return rt(t.type)&&cs(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Lr(),ge(nt),ge(We),tu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return eu(t),null;case 13:if(ge(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));Ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(xe),null;case 4:return Lr(),null;case 10:return Gc(t.type._context),null;case 22:case 23:return fu(),null;case 24:return null;default:return null}}var jo=!1,He=!1,ey=typeof WeakSet=="function"?WeakSet:Set,D=null;function wr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Gl(e,t,n){try{n()}catch(r){je(e,t,r)}}var Dd=!1;function ty(e,t){if(Al=os,e=Zh(),Wc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,c=-1,u=0,d=0,f=e,g=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(c=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)g=f,f=h;for(;;){if(f===e)break t;if(g===n&&++u===i&&(a=s),g===o&&++d===r&&(c=s),(h=f.nextSibling)!==null)break;f=g,g=f.parentNode}f=h}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Il={focusedElem:e,selectionRange:n},os=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var y=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,C=y.memoizedState,w=t.stateNode,m=w.getSnapshotBeforeUpdate(t.elementType===t.type?_:Ct(t.type,_),C);w.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(x){je(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return y=Dd,Dd=!1,y}function ji(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Gl(t,n,o)}i=i.next}while(i!==r)}}function $s(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Yl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Gp(e){var t=e.alternate;t!==null&&(e.alternate=null,Gp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bt],delete t[zi],delete t[Ml],delete t[Mv],delete t[zv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Yp(e){return e.tag===5||e.tag===3||e.tag===4}function Hd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ls));else if(r!==4&&(e=e.child,e!==null))for(Xl(e,t,n),e=e.sibling;e!==null;)Xl(e,t,n),e=e.sibling}function Zl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zl(e,t,n),e=e.sibling;e!==null;)Zl(e,t,n),e=e.sibling}var ze=null,Ot=!1;function an(e,t,n){for(n=n.child;n!==null;)Xp(e,t,n),n=n.sibling}function Xp(e,t,n){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(As,n)}catch{}switch(n.tag){case 5:He||wr(n,t);case 6:var r=ze,i=Ot;ze=null,an(e,t,n),ze=r,Ot=i,ze!==null&&(Ot?(e=ze,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ze.removeChild(n.stateNode));break;case 18:ze!==null&&(Ot?(e=ze,n=n.stateNode,e.nodeType===8?Ea(e.parentNode,n):e.nodeType===1&&Ea(e,n),Ai(e)):Ea(ze,n.stateNode));break;case 4:r=ze,i=Ot,ze=n.stateNode.containerInfo,Ot=!0,an(e,t,n),ze=r,Ot=i;break;case 0:case 11:case 14:case 15:if(!He&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Gl(n,t,s),i=i.next}while(i!==r)}an(e,t,n);break;case 1:if(!He&&(wr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){je(n,t,a)}an(e,t,n);break;case 21:an(e,t,n);break;case 22:n.mode&1?(He=(r=He)||n.memoizedState!==null,an(e,t,n),He=r):an(e,t,n);break;default:an(e,t,n)}}function Wd(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ey),t.forEach(function(r){var i=uy.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=be()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ry(r/1960))-r,10e?16:e,mn===null)var r=!1;else{if(e=mn,mn=null,_s=0,re&6)throw Error(F(331));var i=re;for(re|=4,D=e.current;D!==null;){var o=D,s=o.child;if(D.flags&16){var a=o.deletions;if(a!==null){for(var c=0;cbe()-uu?Wn(e,0):cu|=n),it(e,t)}function sg(e,t){t===0&&(e.mode&1?(t=po,po<<=1,!(po&130023424)&&(po=4194304)):t=1);var n=Qe();e=nn(e,t),e!==null&&(Yi(e,t,n),it(e,n))}function cy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sg(e,n)}function uy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(F(314))}r!==null&&r.delete(t),sg(e,n)}var ag;ag=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||nt.current)et=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return et=!1,Yv(e,t,n);et=!!(e.flags&131072)}else et=!1,ve&&t.flags&1048576&&up(t,fs,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zo(e,t),e=t.pendingProps;var i=Nr(t,We.current);Cr(t,n),i=ru(null,t,r,e,i,n);var o=iu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,rt(r)?(o=!0,us(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xc(t),i.updater=Bs,t.stateNode=i,i._reactInternals=t,Hl(t,r,e,n),t=Vl(null,t,r,!0,o,n)):(t.tag=0,ve&&o&&qc(t),Ke(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zo(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=fy(r),e=Ct(r,e),i){case 0:t=ql(null,t,r,e,n);break e;case 1:t=Bd(null,t,r,e,n);break e;case 11:t=Md(null,t,r,e,n);break e;case 14:t=zd(null,t,r,Ct(r.type,e),n);break e}throw Error(F(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),ql(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),Bd(e,t,r,i,n);case 3:e:{if(Wp(t),e===null)throw Error(F(387));r=t.pendingProps,o=t.memoizedState,i=o.element,pp(e,t),gs(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Fr(Error(F(423)),t),t=Ud(e,t,r,n,i);break e}else if(r!==i){i=Fr(Error(F(424)),t),t=Ud(e,t,r,n,i);break e}else for(lt=_n(t.stateNode.containerInfo.firstChild),ct=t,ve=!0,Pt=null,n=yp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ar(),r===i){t=rn(e,t,n);break e}Ke(e,t,r,n)}t=t.child}return t;case 5:return xp(t),e===null&&Ul(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Ll(r,i)?s=null:o!==null&&Ll(r,o)&&(t.flags|=32),Hp(e,t),Ke(e,t,s,n),t.child;case 6:return e===null&&Ul(t),null;case 13:return qp(e,t,n);case 4:return Zc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ir(t,null,r,n):Ke(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),Md(e,t,r,i,n);case 7:return Ke(e,t,t.pendingProps,n),t.child;case 8:return Ke(e,t,t.pendingProps.children,n),t.child;case 12:return Ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,de(hs,r._currentValue),r._currentValue=s,o!==null)if(At(o.value,s)){if(o.children===i.children&&!nt.current){t=rn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Xt(-1,n&-n),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$l(o.return,n,t),a.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(F(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),$l(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ke(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Cr(t,n),i=_t(i),r=r(i),t.flags|=1,Ke(e,t,r,n),t.child;case 14:return r=t.type,i=Ct(r,t.pendingProps),i=Ct(r.type,i),zd(e,t,r,i,n);case 15:return $p(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ct(r,i),zo(e,t),t.tag=1,rt(r)?(e=!0,us(t)):e=!1,Cr(t,n),mp(t,r,i),Hl(t,r,i,n),Vl(null,t,r,!0,e,n);case 19:return Vp(e,t,n);case 22:return Dp(e,t,n)}throw Error(F(156,t.tag))};function lg(e,t){return Ih(e,t)}function dy(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vt(e,t,n,r){return new dy(e,t,n,r)}function pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fy(e){if(typeof e=="function")return pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ac)return 11;if(e===Ic)return 14}return 2}function kn(e,t){var n=e.alternate;return n===null?(n=vt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $o(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")pu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case dr:return qn(n.children,i,o,t);case Nc:s=8,i|=8;break;case hl:return e=vt(12,n,t,i|2),e.elementType=hl,e.lanes=o,e;case pl:return e=vt(13,n,t,i),e.elementType=pl,e.lanes=o,e;case gl:return e=vt(19,n,t,i),e.elementType=gl,e.lanes=o,e;case vh:return Hs(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gh:s=10;break e;case mh:s=9;break e;case Ac:s=11;break e;case Ic:s=14;break e;case un:s=16,r=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=vt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function qn(e,t,n,r){return e=vt(7,e,r,t),e.lanes=n,e}function Hs(e,t,n,r){return e=vt(22,e,r,t),e.elementType=vh,e.lanes=n,e.stateNode={isHidden:!1},e}function Ia(e,t,n){return e=vt(6,e,null,t),e.lanes=n,e}function La(e,t,n){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hy(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ga(0),this.expirationTimes=ga(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ga(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gu(e,t,n,r,i,o,s,a,c){return e=new hy(e,t,n,a,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=vt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xc(o),e}function py(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fg)}catch(e){console.error(e)}}fg(),uh.exports=dt;var xy=uh.exports,Xd=xy;dl.createRoot=Xd.createRoot,dl.hydrateRoot=Xd.hydrateRoot;/** * @remix-run/router v1.6.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function xu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function _y(){return Math.random().toString(36).substr(2,8)}function ef(e,t){return{usr:e.state,key:e.key,idx:t}}function ic(e,t,n,r){return n===void 0&&(n=null),qi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Kr(t):t,{state:n,key:t&&t.key||r||_y()})}function bs(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Kr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Sy(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=vn.Pop,c=null,u=d();u==null&&(u=0,s.replaceState(qi({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function f(){a=vn.Pop;let C=d(),w=C==null?null:C-u;u=C,c&&c({action:a,location:_.location,delta:w})}function g(C,w){a=vn.Push;let m=ic(_.location,C,w);n&&n(m,C),u=d()+1;let p=ef(m,u),x=_.createHref(m);try{s.pushState(p,"",x)}catch{i.location.assign(x)}o&&c&&c({action:a,location:_.location,delta:1})}function h(C,w){a=vn.Replace;let m=ic(_.location,C,w);n&&n(m,C),u=d();let p=ef(m,u),x=_.createHref(m);s.replaceState(p,"",x),o&&c&&c({action:a,location:_.location,delta:0})}function y(C){let w=i.location.origin!=="null"?i.location.origin:i.location.href,m=typeof C=="string"?C:bs(C);return Pe(w,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,w)}let _={get action(){return a},get location(){return e(i,s)},listen(C){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Zd,f),c=C,()=>{i.removeEventListener(Zd,f),c=null}},createHref(C){return t(i,C)},createURL:y,encodeLocation(C){let w=y(C);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:h,go(C){return s.go(C)}};return _}var tf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(tf||(tf={}));function jy(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Kr(t):t,i=wu(r.pathname||"/",n);if(i==null)return null;let o=hg(e);by(o);let s=null;for(let a=0;s==null&&a{let c={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};c.relativePath.startsWith("/")&&(Pe(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=En([r,c.relativePath]),d=n.concat(c);o.children&&o.children.length>0&&(Pe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),hg(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Ry(u,o.index),routesMeta:d})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let c of pg(o.path))i(o,s,c)}),t}function pg(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=pg(r.join("/")),a=[];return a.push(...s.map(c=>c===""?o:[o,c].join("/"))),i&&a.push(...s),a.map(c=>e.startsWith("/")&&c===""?"/":c)}function by(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ny(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ky=/^:\w+$/,Ey=3,Cy=2,Oy=1,Py=10,Ty=-2,nf=e=>e==="*";function Ry(e,t){let n=e.split("/"),r=n.length;return n.some(nf)&&(r+=Ty),t&&(r+=Cy),n.filter(i=>!nf(i)).reduce((i,o)=>i+(ky.test(o)?Ey:o===""?Oy:Py),r)}function Ny(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Ay(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{if(d==="*"){let g=a[f]||"";s=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}return u[d]=My(a[f]||"",d),u},{}),pathname:o,pathnameBase:s,pattern:e}}function Ly(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),xu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Fy(e){try{return decodeURI(e)}catch(t){return xu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function My(e,t){try{return decodeURIComponent(e)}catch(n){return xu(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function wu(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function zy(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Kr(e):e;return{pathname:n?n.startsWith("/")?n:By(n,t):t,search:$y(r),hash:Dy(i)}}function By(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Fa(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function gg(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mg(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Kr(e):(i=qi({},e),Pe(!i.pathname||!i.pathname.includes("?"),Fa("?","pathname","search",i)),Pe(!i.pathname||!i.pathname.includes("#"),Fa("#","pathname","hash",i)),Pe(!i.search||!i.search.includes("#"),Fa("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(r||s==null)a=n;else{let f=t.length-1;if(s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),f-=1;i.pathname=g.join("/")}a=f>=0?t[f]:"/"}let c=zy(i,a),u=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const En=e=>e.join("/").replace(/\/\/+/g,"/"),Uy=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$y=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Dy=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Hy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const vg=["post","put","patch","delete"];new Set(vg);const Wy=["get",...vg];new Set(Wy);/** * React Router v6.11.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ks(){return ks=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.pathnameBase)),o=N.useRef(!1);return wg(()=>{o.current=!0}),N.useCallback(function(a,c){if(c===void 0&&(c={}),!o.current)return;if(typeof a=="number"){t.go(a);return}let u=mg(a,JSON.parse(i),r,c.relative==="path");e!=="/"&&(u.pathname=u.pathname==="/"?e:En([e,u.pathname])),(c.replace?t.replace:t.push)(u,c.state,c)},[e,t,i,r])}function Qy(){let{matches:e}=N.useContext(An),t=e[e.length-1];return t?t.params:{}}function Sg(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=N.useContext(An),{pathname:i}=Js(),o=JSON.stringify(gg(r).map(s=>s.pathnameBase));return N.useMemo(()=>mg(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Jy(e,t){return Gy(e,t)}function Gy(e,t,n){to()||Pe(!1);let{navigator:r}=N.useContext(Qr),{matches:i}=N.useContext(An),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let c=Js(),u;if(t){var d;let _=typeof t=="string"?Kr(t):t;a==="/"||(d=_.pathname)!=null&&d.startsWith(a)||Pe(!1),u=_}else u=c;let f=u.pathname||"/",g=a==="/"?f:f.slice(a.length)||"/",h=jy(e,{pathname:g}),y=tx(h&&h.map(_=>Object.assign({},_,{params:Object.assign({},s,_.params),pathname:En([a,r.encodeLocation?r.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?a:En([a,r.encodeLocation?r.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),i,n);return t&&y?N.createElement(Qs.Provider,{value:{location:ks({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:vn.Pop}},y):y}function Yy(){let e=ox(),t=Hy(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},o=null;return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:i},n):null,o)}const Xy=N.createElement(Yy,null);class Zy extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?N.createElement(An.Provider,{value:this.props.routeContext},N.createElement(xg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ex(e){let{routeContext:t,match:n,children:r}=e,i=N.useContext(yg);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(An.Provider,{value:t},r)}function tx(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,s=(r=n)==null?void 0:r.errors;if(s!=null){let a=o.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id]));a>=0||Pe(!1),o=o.slice(0,Math.min(o.length,a+1))}return o.reduceRight((a,c,u)=>{let d=c.route.id?s==null?void 0:s[c.route.id]:null,f=null;n&&(f=c.route.errorElement||Xy);let g=t.concat(o.slice(0,u+1)),h=()=>{let y;return d?y=f:c.route.Component?y=N.createElement(c.route.Component,null):c.route.element?y=c.route.element:y=a,N.createElement(ex,{match:c,routeContext:{outlet:a,matches:g,isDataRoute:n!=null},children:y})};return n&&(c.route.ErrorBoundary||c.route.errorElement||u===0)?N.createElement(Zy,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:h(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):h()},null)}var oc;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(oc||(oc={}));var Vi;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(Vi||(Vi={}));function nx(e){let t=N.useContext(yg);return t||Pe(!1),t}function rx(e){let t=N.useContext(qy);return t||Pe(!1),t}function ix(e){let t=N.useContext(An);return t||Pe(!1),t}function jg(e){let t=ix(),n=t.matches[t.matches.length-1];return n.route.id||Pe(!1),n.route.id}function ox(){var e;let t=N.useContext(xg),n=rx(Vi.UseRouteError),r=jg(Vi.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function sx(){let{router:e}=nx(oc.UseNavigateStable),t=jg(Vi.UseNavigateStable),n=N.useRef(!1);return wg(()=>{n.current=!0}),N.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,ks({fromRouteId:t},o)))},[e,t])}function bg(e){Pe(!1)}function ax(e){let{basename:t="/",children:n=null,location:r,navigationType:i=vn.Pop,navigator:o,static:s=!1}=e;to()&&Pe(!1);let a=t.replace(/^\/*/,"/"),c=N.useMemo(()=>({basename:a,navigator:o,static:s}),[a,o,s]);typeof r=="string"&&(r=Kr(r));let{pathname:u="/",search:d="",hash:f="",state:g=null,key:h="default"}=r,y=N.useMemo(()=>{let _=wu(u,a);return _==null?null:{location:{pathname:_,search:d,hash:f,state:g,key:h},navigationType:i}},[a,u,d,f,g,h,i]);return y==null?null:N.createElement(Qr.Provider,{value:c},N.createElement(Qs.Provider,{children:n,value:y}))}function lx(e){let{children:t,location:n}=e;return Jy(sc(t),n)}var rf;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(rf||(rf={}));new Promise(()=>{});function sc(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,i)=>{if(!N.isValidElement(r))return;let o=[...t,i];if(r.type===N.Fragment){n.push.apply(n,sc(r.props.children,o));return}r.type!==bg&&Pe(!1),!r.props.index||!r.props.children||Pe(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=sc(r.props.children,o)),n.push(s)}),n}/** * React Router DOM v6.11.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ux(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function dx(e,t){return e.button===0&&(!t||t==="_self")&&!ux(e)}const fx=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function hx(e){let{basename:t,children:n,window:r}=e,i=N.useRef();i.current==null&&(i.current=wy({window:r,v5Compat:!0}));let o=i.current,[s,a]=N.useState({action:o.action,location:o.location});return N.useLayoutEffect(()=>o.listen(a),[o]),N.createElement(ax,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o})}const px=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",gx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mn=N.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:c,to:u,preventScrollReset:d}=t,f=cx(t,fx),{basename:g}=N.useContext(Qr),h,y=!1;if(typeof u=="string"&&gx.test(u)&&(h=u,px))try{let m=new URL(window.location.href),p=u.startsWith("//")?new URL(m.protocol+u):new URL(u),x=wu(p.pathname,g);p.origin===m.origin&&x!=null?u=x+p.search+p.hash:y=!0}catch{}let _=Vy(u,{relative:i}),C=mx(u,{replace:s,state:a,target:c,preventScrollReset:d,relative:i});function w(m){r&&r(m),m.defaultPrevented||C(m)}return N.createElement("a",ac({},f,{href:h||_,onClick:y||o?r:w,ref:n,target:c}))});var of;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(of||(of={}));var sf;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sf||(sf={}));function mx(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s}=t===void 0?{}:t,a=_g(),c=Js(),u=Sg(e,{relative:s});return N.useCallback(d=>{if(dx(d,n)){d.preventDefault();let f=r!==void 0?r:bs(c)===bs(u);a(e,{replace:f,state:i,preventScrollReset:o,relative:s})}},[c,a,u,r,i,n,e,o,s])}var tt=function(){return tt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r0?Fe(Jr,--jt):0,Br--,Ce===10&&(Br=1,Ys--),Ce}function Nt(){return Ce=jt2||lc(Ce)>3?"":" "}function Ox(e,t){for(;--t&&Nt()&&!(Ce<48||Ce>102||Ce>57&&Ce<65||Ce>70&&Ce<97););return Zs(e,Ho()+(t<6&&Vn()==32&&Nt()==32))}function cc(e){for(;Nt();)switch(Ce){case e:return jt;case 34:case 39:e!==34&&e!==39&&cc(Ce);break;case 40:e===41&&cc(e);break;case 92:Nt();break}return jt}function Px(e,t){for(;Nt()&&e+Ce!==47+10;)if(e+Ce===42+42&&Vn()===47)break;return"/*"+Zs(t,jt-1)+"*"+Su(e===47?e:Nt())}function Tx(e){for(;!lc(Vn());)Nt();return Zs(e,jt)}function Rx(e){return Ex(Wo("",null,null,null,[""],e=kx(e),0,[0],e))}function Wo(e,t,n,r,i,o,s,a,c){for(var u=0,d=0,f=s,g=0,h=0,y=0,_=1,C=1,w=1,m=0,p="",x=i,j=o,b=r,k=p;C;)switch(y=m,m=Nt()){case 40:if(y!=108&&Fe(k,f-1)==58){Do(k+=Z(Ma(m),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:k+=Ma(m);break;case 9:case 10:case 13:case 32:k+=Cx(y);break;case 92:k+=Ox(Ho()-1,7);continue;case 47:switch(Vn()){case 42:case 47:Eo(Nx(Px(Nt(),Ho()),t,n),c);break;default:k+="/"}break;case 123*_:a[u++]=Qt(k)*w;case 125*_:case 59:case 0:switch(m){case 0:case 125:C=0;case 59+d:w==-1&&(k=Z(k,/\f/g,"")),h>0&&Qt(k)-f&&Eo(h>32?lf(k+";",r,n,f-1):lf(Z(k," ","")+";",r,n,f-2),c);break;case 59:k+=";";default:if(Eo(b=af(k,t,n,u,d,i,a,p,x=[],j=[],f),o),m===123)if(d===0)Wo(k,t,b,b,x,o,f,a,j);else switch(g===99&&Fe(k,3)===110?100:g){case 100:case 108:case 109:case 115:Wo(e,b,b,r&&Eo(af(e,b,b,0,0,i,a,p,i,x=[],f),j),i,j,f,a,r?x:j);break;default:Wo(k,b,b,b,[""],j,0,a,j)}}u=d=h=0,_=w=1,p=k="",f=s;break;case 58:f=1+Qt(k),h=y;default:if(_<1){if(m==123)--_;else if(m==125&&_++==0&&bx()==125)continue}switch(k+=Su(m),m*_){case 38:w=d>0?1:(k+="\f",-1);break;case 44:a[u++]=(Qt(k)-1)*w,w=1;break;case 64:Vn()===45&&(k+=Ma(Nt())),g=Vn(),d=f=Qt(p=k+=Tx(Ho())),m++;break;case 45:y===45&&Qt(k)==2&&(_=0)}}return o}function af(e,t,n,r,i,o,s,a,c,u,d){for(var f=i-1,g=i===0?o:[""],h=ju(g),y=0,_=0,C=0;y0?g[w]+" "+m:Z(m,/&\f/g,g[w])))&&(c[C++]=p);return Xs(e,t,n,i===0?Gs:a,c,u,d)}function Nx(e,t,n){return Xs(e,t,n,kg,Su(jx()),zr(e,2,-2),0)}function lf(e,t,n,r){return Xs(e,t,n,_u,zr(e,0,r),zr(e,r+1,-1),r)}function Pg(e,t,n){switch(_x(e,t)){case 5103:return ae+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ae+e+e;case 4789:return Ei+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ae+e+Ei+e+pe+e+e;case 5936:switch(Fe(e,t+11)){case 114:return ae+e+pe+Z(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ae+e+pe+Z(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ae+e+pe+Z(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return ae+e+pe+e+e;case 6165:return ae+e+pe+"flex-"+e+e;case 5187:return ae+e+Z(e,/(\w+).+(:[^]+)/,ae+"box-$1$2"+pe+"flex-$1$2")+e;case 5443:return ae+e+pe+"flex-item-"+Z(e,/flex-|-self/g,"")+(cn(e,/flex-|baseline/)?"":pe+"grid-row-"+Z(e,/flex-|-self/g,""))+e;case 4675:return ae+e+pe+"flex-line-pack"+Z(e,/align-content|flex-|-self/g,"")+e;case 5548:return ae+e+pe+Z(e,"shrink","negative")+e;case 5292:return ae+e+pe+Z(e,"basis","preferred-size")+e;case 6060:return ae+"box-"+Z(e,"-grow","")+ae+e+pe+Z(e,"grow","positive")+e;case 4554:return ae+Z(e,/([^-])(transform)/g,"$1"+ae+"$2")+e;case 6187:return Z(Z(Z(e,/(zoom-|grab)/,ae+"$1"),/(image-set)/,ae+"$1"),e,"")+e;case 5495:case 3959:return Z(e,/(image-set\([^]*)/,ae+"$1$`$1");case 4968:return Z(Z(e,/(.+:)(flex-)?(.*)/,ae+"box-pack:$3"+pe+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ae+e+e;case 4200:if(!cn(e,/flex-|baseline/))return pe+"grid-column-align"+zr(e,t)+e;break;case 2592:case 3360:return pe+Z(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,i){return t=i,cn(r.props,/grid-\w+-end/)})?~Do(e+(n=n[t].value),"span")?e:pe+Z(e,"-start","")+e+pe+"grid-row-span:"+(~Do(n,"span")?cn(n,/\d+/):+cn(n,/\d+/)-+cn(e,/\d+/))+";":pe+Z(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return cn(r.props,/grid-\w+-start/)})?e:pe+Z(Z(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Z(e,/(.+)-inline(.+)/,ae+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Qt(e)-1-t>6)switch(Fe(e,t+1)){case 109:if(Fe(e,t+4)!==45)break;case 102:return Z(e,/(.+:)(.+)-([^]+)/,"$1"+ae+"$2-$3$1"+Ei+(Fe(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Do(e,"stretch")?Pg(Z(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return Z(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,i,o,s,a,c,u){return pe+i+":"+o+u+(s?pe+i+"-span:"+(a?c:+c-+o)+u:"")+e});case 4949:if(Fe(e,t+6)===121)return Z(e,":",":"+ae)+e;break;case 6444:switch(Fe(e,Fe(e,14)===45?18:11)){case 120:return Z(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+ae+(Fe(e,14)===45?"inline-":"")+"box$3$1"+ae+"$2$3$1"+pe+"$2box$3")+e;case 100:return Z(e,":",":"+pe)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Z(e,"scroll-","scroll-snap-")+e}return e}function Ci(e,t){for(var n="",r=ju(e),i=0;i-1&&!e.return)switch(e.type){case _u:e.return=Pg(e.value,e.length,n);return;case Eg:return Ci([ai(e,{value:Z(e.value,"@","@"+ae)})],r);case Gs:if(e.length)return Sx(e.props,function(i){switch(cn(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ci([ai(e,{props:[Z(i,/:(read-\w+)/,":"+Ei+"$1")]})],r);case"::placeholder":return Ci([ai(e,{props:[Z(i,/:(plac\w+)/,":"+ae+"input-$1")]}),ai(e,{props:[Z(i,/:(plac\w+)/,":"+Ei+"$1")]}),ai(e,{props:[Z(i,/:(plac\w+)/,pe+"input-$1")]})],r)}return""})}}var Fx={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ur=typeof process<"u"&&process.env!==void 0&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||"data-styled",bu=typeof window<"u"&&"HTMLElement"in window,Mx=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==""?{}.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&{}.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env!==void 0&&{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==""&&{}.SC_DISABLE_SPEEDY!=="false"&&{}.SC_DISABLE_SPEEDY),ku=Object.freeze([]),er=Object.freeze({});function zx(e,t,n){return n===void 0&&(n=er),e.theme!==n.theme&&e.theme||t||n.theme}var Tg=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Bx=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ux=/(^-|-$)/g;function cf(e){return e.replace(Bx,"-").replace(Ux,"")}var $x=/(a)(d)/gi,uf=function(e){return String.fromCharCode(e+(e>25?39:97))};function uc(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=uf(t%52)+n;return(uf(t%52)+n).replace($x,"$1-$2")}var za,Sr=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Rg=function(e){return Sr(5381,e)};function Ng(e){return uc(Rg(e)>>>0)}function Dx(e){return e.displayName||e.name||"Component"}function Ba(e){return typeof e=="string"&&!0}var Ag=typeof Symbol=="function"&&Symbol.for,Ig=Ag?Symbol.for("react.memo"):60115,Hx=Ag?Symbol.for("react.forward_ref"):60112,Wx={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},qx={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Lg={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Vx=((za={})[Hx]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},za[Ig]=Lg,za);function df(e){return("type"in(t=e)&&t.type.$$typeof)===Ig?Lg:"$$typeof"in e?Vx[e.$$typeof]:Wx;var t}var Kx=Object.defineProperty,Qx=Object.getOwnPropertyNames,ff=Object.getOwnPropertySymbols,Jx=Object.getOwnPropertyDescriptor,Gx=Object.getPrototypeOf,hf=Object.prototype;function Fg(e,t,n){if(typeof t!="string"){if(hf){var r=Gx(t);r&&r!==hf&&Fg(e,r,n)}var i=Qx(t);ff&&(i=i.concat(ff(t)));for(var o=df(e),s=df(t),a=0;a0?" Args: ".concat(t.join(", ")):""))}var Yx=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var n=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,o=i;t>=o;)if((o<<=1)<0)throw no(16,"".concat(t));this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var s=i;s=this.length||this.groupSizes[t]===0)return n;for(var r=this.groupSizes[t],i=this.indexOfGroup(t),o=i+r,s=i;s=0;u--){var d=c[u];if(d&&d.nodeType===1&&d.hasAttribute(Ur))return d}}(n),o=i!==void 0?i.nextSibling:null;r.setAttribute(Ur,"active"),r.setAttribute("data-styled-version","6.0.0-rc.1");var s=r1();return s&&r.setAttribute("nonce",s),n.insertBefore(r,o),r},i1=function(){function e(t){this.element=Mg(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(n){if(n.sheet)return n.sheet;for(var r=document.styleSheets,i=0,o=r.length;i=0){var r=document.createTextNode(n);return this.element.insertBefore(r,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t0&&(g+="".concat(h,","))}),i+="".concat(d).concat(f,'{content:"').concat(g,'"}').concat(`/*!sc*/ `)},s=0;s0?".".concat(t):g},d=c.slice();s.prefix&&d.unshift(Lx),d.push(function(g){g.type===Gs&&g.value.includes("&")&&(g.props[0]=g.props[0].replace(l1,n).replace(r,u))},Ax);var f=function(g,h,y,_){h===void 0&&(h=""),y===void 0&&(y=""),_===void 0&&(_="&"),t=_,n=h,r=new RegExp("\\".concat(n,"\\b"),"g");var C=g.replace(c1,""),w=Rx(y||h?"".concat(y," ").concat(h," { ").concat(C," }"):C);return s.namespace&&(w=Bg(w,s.namespace)),function(m,p){for(var x=[],j=0,b=void 0;j="A"&&e<="Z"};function mf(e){for(var t="",n=0;n>>0);if(!n.hasNameForId(this.componentId,s)){var a=r(o,".".concat(s),void 0,this.componentId);n.insertRules(this.componentId,s,a)}i=$n(i,s),this.staticRulesId=s}else{for(var c=Sr(this.baseHash,r.hash),u="",d=0;d>>0);n.hasNameForId(this.componentId,h)||n.insertRules(this.componentId,h,r(u,".".concat(h),void 0,this.componentId)),i=$n(i,h)}}return i},e}(),Wg=bt.createContext(void 0);Wg.Consumer;function m1(){return N.useContext(Wg)}var $a={};function v1(e,t,n){var r=Eu(e),i=e,o=!Ba(e),s=t.attrs,a=s===void 0?ku:s,c=t.componentId,u=c===void 0?function(j,b){var k=typeof j!="string"?"sc":cf(j);$a[k]=($a[k]||0)+1;var O="".concat(k,"-").concat(Ng("6.0.0-rc.1"+k+$a[k]));return b?"".concat(b,"-").concat(O):O}(t.displayName,t.parentComponentId):c,d=t.displayName,f=d===void 0?function(j){return Ba(j)?"styled.".concat(j):"Styled(".concat(Dx(j),")")}(e):d,g=t.displayName&&t.componentId?"".concat(cf(t.displayName),"-").concat(t.componentId):t.componentId||u,h=r&&i.attrs?i.attrs.concat(a).filter(Boolean):a,y=t.shouldForwardProp;if(r&&i.shouldForwardProp){var _=i.shouldForwardProp;if(t.shouldForwardProp){var C=t.shouldForwardProp;y=function(j,b){return _(j,b)&&C(j,b)}}else y=_}var w=new g1(n,g,r?i.componentStyle:void 0),m=w.isStatic&&a.length===0;function p(j,b){return function(k,O,M,z){var H=k.attrs,te=k.componentStyle,Q=k.defaultProps,$=k.foldedComponentIds,U=k.styledComponentId,J=k.target,fe=m1(),B=gf(),V=k.shouldForwardProp||B.shouldForwardProp,W=function(qe,ot,kt){for(var qt,ye=tt(tt({},ot),{className:void 0,theme:kt}),ir=0;ire.width?e.width:24}px; height: ${e=>e.height?e.height:24}px; background: url(${e=>e.src}); background-repeat: no-repeat; background-position: center; background-size: contain; margin: 0 8px; display: inline-block `,x1=P.header` min-width: 950px; display: flex; justify-content: space-between; align-items: center; margin: 18px 8%; `,w1=P.section` display: flex; align-items: center; `,_1=P.div` width: 1px; height: 37px; margin: 0px 17px; background-color: #a9a9a9; `,S1=P.button` width: 150px; height: 28px; margin-left: 20px; border-radius: 40px; background-color: #CCC; font-size: 15px; & ${Y} { margin-left: 0; } `,j1=P.h1` user-select: none; `,Vo=P.div` & a:hover { color: #0050A1; transition: 0.3s ease; } `,b1=P.nav` display: flex; align-items: center; & ${Vo} { margin-right: 55px } `,k1=function(){return l.jsxs(x1,{children:[l.jsxs(w1,{children:[l.jsx("a",{href:"https://vvsu.ru",children:l.jsx("img",{width:"100",height:"32",src:"/images/vvsu_logo.png"})}),l.jsx(_1,{}),l.jsx(Mn,{to:"/",children:l.jsx(j1,{children:"Pairent"})}),l.jsx(Mn,{to:"/",children:l.jsxs(S1,{children:[l.jsx(Y,{src:"/images/icons/pin.svg",width:"8",height:"14"}),"Владивосток"]})})]}),l.jsxs(b1,{children:[l.jsx(Vo,{children:l.jsxs(Mn,{to:"/favorites",children:[l.jsx(Y,{src:"/images/icons/heart.svg",width:"16",height:"14"}),"Избранное"]})}),l.jsx(Vo,{children:l.jsxs(Mn,{to:"/comparisons",children:[l.jsx(Y,{src:"/images/icons/stats.svg",width:"16",height:"14"}),"Сравнения"]})}),l.jsx(Vo,{children:l.jsxs(Mn,{to:"/",children:[l.jsx(Y,{src:"/images/icons/chat-bubble.svg",width:"16",height:"14"}),"Чаты"]})}),l.jsx(Mn,{to:"/",children:l.jsx(Y,{src:"/images/icons/user.svg",width:"32",height:"32"})})]})]})};function Kg(e,t){return function(){return e.apply(t,arguments)}}const{toString:E1}=Object.prototype,{getPrototypeOf:Cu}=Object,ea=(e=>t=>{const n=E1.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Wt=e=>(e=e.toLowerCase(),t=>ea(t)===e),ta=e=>t=>typeof t===e,{isArray:Gr}=Array,Ji=ta("undefined");function C1(e){return e!==null&&!Ji(e)&&e.constructor!==null&&!Ji(e.constructor)&&xt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Qg=Wt("ArrayBuffer");function O1(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Qg(e.buffer),t}const P1=ta("string"),xt=ta("function"),Jg=ta("number"),na=e=>e!==null&&typeof e=="object",T1=e=>e===!0||e===!1,Ko=e=>{if(ea(e)!=="object")return!1;const t=Cu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},R1=Wt("Date"),N1=Wt("File"),A1=Wt("Blob"),I1=Wt("FileList"),L1=e=>na(e)&&xt(e.pipe),F1=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||xt(e.append)&&((t=ea(e))==="formdata"||t==="object"&&xt(e.toString)&&e.toString()==="[object FormData]"))},M1=Wt("URLSearchParams"),z1=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ro(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Gr(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Yg=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Xg=e=>!Ji(e)&&e!==Yg;function gc(){const{caseless:e}=Xg(this)&&this||{},t={},n=(r,i)=>{const o=e&&Gg(t,i)||i;Ko(t[o])&&Ko(r)?t[o]=gc(t[o],r):Ko(r)?t[o]=gc({},r):Gr(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(ro(t,(i,o)=>{n&&xt(i)?e[o]=Kg(i,n):e[o]=i},{allOwnKeys:r}),e),U1=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),$1=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},D1=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&Cu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},H1=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},W1=e=>{if(!e)return null;if(Gr(e))return e;let t=e.length;if(!Jg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},q1=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Cu(Uint8Array)),V1=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},K1=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Q1=Wt("HTMLFormElement"),J1=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),xf=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),G1=Wt("RegExp"),Zg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ro(n,(i,o)=>{t(i,o,e)!==!1&&(r[o]=i)}),Object.defineProperties(e,r)},Y1=e=>{Zg(e,(t,n)=>{if(xt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(xt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},X1=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Gr(e)?r(e):r(String(e).split(t)),n},Z1=()=>{},ew=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Da="abcdefghijklmnopqrstuvwxyz",wf="0123456789",em={DIGIT:wf,ALPHA:Da,ALPHA_DIGIT:Da+Da.toUpperCase()+wf},tw=(e=16,t=em.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function nw(e){return!!(e&&xt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const rw=e=>{const t=new Array(10),n=(r,i)=>{if(na(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Gr(r)?[]:{};return ro(r,(s,a)=>{const c=n(s,i+1);!Ji(c)&&(o[a]=c)}),t[i]=void 0,o}}return r};return n(e,0)},iw=Wt("AsyncFunction"),ow=e=>e&&(na(e)||xt(e))&&xt(e.then)&&xt(e.catch),R={isArray:Gr,isArrayBuffer:Qg,isBuffer:C1,isFormData:F1,isArrayBufferView:O1,isString:P1,isNumber:Jg,isBoolean:T1,isObject:na,isPlainObject:Ko,isUndefined:Ji,isDate:R1,isFile:N1,isBlob:A1,isRegExp:G1,isFunction:xt,isStream:L1,isURLSearchParams:M1,isTypedArray:q1,isFileList:I1,forEach:ro,merge:gc,extend:B1,trim:z1,stripBOM:U1,inherits:$1,toFlatObject:D1,kindOf:ea,kindOfTest:Wt,endsWith:H1,toArray:W1,forEachEntry:V1,matchAll:K1,isHTMLForm:Q1,hasOwnProperty:xf,hasOwnProp:xf,reduceDescriptors:Zg,freezeMethods:Y1,toObjectSet:X1,toCamelCase:J1,noop:Z1,toFiniteNumber:ew,findKey:Gg,global:Yg,isContextDefined:Xg,ALPHABET:em,generateString:tw,isSpecCompliantForm:nw,toJSONObject:rw,isAsyncFn:iw,isThenable:ow};function ne(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}R.inherits(ne,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const tm=ne.prototype,nm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{nm[e]={value:e}});Object.defineProperties(ne,nm);Object.defineProperty(tm,"isAxiosError",{value:!0});ne.from=(e,t,n,r,i,o)=>{const s=Object.create(tm);return R.toFlatObject(e,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),ne.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const sw=null;function mc(e){return R.isPlainObject(e)||R.isArray(e)}function rm(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function _f(e,t,n){return e?e.concat(t).map(function(i,o){return i=rm(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function aw(e){return R.isArray(e)&&!e.some(mc)}const lw=R.toFlatObject(R,{},null,function(t){return/^is[A-Z]/.test(t)});function ra(e,t,n){if(!R.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=R.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,C){return!R.isUndefined(C[_])});const r=n.metaTokens,i=n.visitor||d,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(t);if(!R.isFunction(i))throw new TypeError("visitor must be a function");function u(y){if(y===null)return"";if(R.isDate(y))return y.toISOString();if(!c&&R.isBlob(y))throw new ne("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(y)||R.isTypedArray(y)?c&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function d(y,_,C){let w=y;if(y&&!C&&typeof y=="object"){if(R.endsWith(_,"{}"))_=r?_:_.slice(0,-2),y=JSON.stringify(y);else if(R.isArray(y)&&aw(y)||(R.isFileList(y)||R.endsWith(_,"[]"))&&(w=R.toArray(y)))return _=rm(_),w.forEach(function(p,x){!(R.isUndefined(p)||p===null)&&t.append(s===!0?_f([_],x,o):s===null?_:_+"[]",u(p))}),!1}return mc(y)?!0:(t.append(_f(C,_,o),u(y)),!1)}const f=[],g=Object.assign(lw,{defaultVisitor:d,convertValue:u,isVisitable:mc});function h(y,_){if(!R.isUndefined(y)){if(f.indexOf(y)!==-1)throw Error("Circular reference detected in "+_.join("."));f.push(y),R.forEach(y,function(w,m){(!(R.isUndefined(w)||w===null)&&i.call(t,w,R.isString(m)?m.trim():m,_,g))===!0&&h(w,_?_.concat(m):[m])}),f.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Sf(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ou(e,t){this._pairs=[],e&&ra(e,this,t)}const im=Ou.prototype;im.append=function(t,n){this._pairs.push([t,n])};im.toString=function(t){const n=t?function(r){return t.call(this,r,Sf)}:Sf;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function cw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function om(e,t,n){if(!t)return e;const r=n&&n.encode||cw,i=n&&n.serialize;let o;if(i?o=i(t,n):o=R.isURLSearchParams(t)?t.toString():new Ou(t,n).toString(r),o){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class uw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){R.forEach(this.handlers,function(r){r!==null&&t(r)})}}const jf=uw,sm={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},dw=typeof URLSearchParams<"u"?URLSearchParams:Ou,fw=typeof FormData<"u"?FormData:null,hw=typeof Blob<"u"?Blob:null,pw=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),gw=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Ut={isBrowser:!0,classes:{URLSearchParams:dw,FormData:fw,Blob:hw},isStandardBrowserEnv:pw,isStandardBrowserWebWorkerEnv:gw,protocols:["http","https","file","blob","url","data"]};function mw(e,t){return ra(e,new Ut.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Ut.isNode&&R.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function vw(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function yw(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return s=!s&&R.isArray(i)?i.length:s,c?(R.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!R.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&R.isArray(i[s])&&(i[s]=yw(i[s])),!a)}if(R.isFormData(e)&&R.isFunction(e.entries)){const n={};return R.forEachEntry(e,(r,i)=>{t(vw(r),i,n,0)}),n}return null}const xw={"Content-Type":void 0};function ww(e,t,n){if(R.isString(e))try{return(t||JSON.parse)(e),R.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ia={transitional:sm,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=R.isObject(t);if(o&&R.isHTMLForm(t)&&(t=new FormData(t)),R.isFormData(t))return i&&i?JSON.stringify(am(t)):t;if(R.isArrayBuffer(t)||R.isBuffer(t)||R.isStream(t)||R.isFile(t)||R.isBlob(t))return t;if(R.isArrayBufferView(t))return t.buffer;if(R.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return mw(t,this.formSerializer).toString();if((a=R.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ra(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),ww(t)):t}],transformResponse:[function(t){const n=this.transitional||ia.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&R.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(s)throw a.name==="SyntaxError"?ne.from(a,ne.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ut.classes.FormData,Blob:Ut.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],function(t){ia.headers[t]={}});R.forEach(["post","put","patch"],function(t){ia.headers[t]=R.merge(xw)});const Pu=ia,_w=R.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Sw=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&_w[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},bf=Symbol("internals");function li(e){return e&&String(e).trim().toLowerCase()}function Qo(e){return e===!1||e==null?e:R.isArray(e)?e.map(Qo):String(e)}function jw(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const bw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ha(e,t,n,r,i){if(R.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!R.isString(t)){if(R.isString(r))return t.indexOf(r)!==-1;if(R.isRegExp(r))return r.test(t)}}function kw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Ew(e,t){const n=R.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}class oa{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,c,u){const d=li(c);if(!d)throw new Error("header name must be a non-empty string");const f=R.findKey(i,d);(!f||i[f]===void 0||u===!0||u===void 0&&i[f]!==!1)&&(i[f||c]=Qo(a))}const s=(a,c)=>R.forEach(a,(u,d)=>o(u,d,c));return R.isPlainObject(t)||t instanceof this.constructor?s(t,n):R.isString(t)&&(t=t.trim())&&!bw(t)?s(Sw(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=li(t),t){const r=R.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return jw(i);if(R.isFunction(n))return n.call(this,i,r);if(R.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=li(t),t){const r=R.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ha(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=li(s),s){const a=R.findKey(r,s);a&&(!n||Ha(r,r[a],a,n))&&(delete r[a],i=!0)}}return R.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ha(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return R.forEach(this,(i,o)=>{const s=R.findKey(r,o);if(s){n[s]=Qo(i),delete n[o];return}const a=t?kw(o):String(o).trim();a!==o&&delete n[o],n[a]=Qo(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return R.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&R.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[bf]=this[bf]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=li(s);r[a]||(Ew(i,s),r[a]=!0)}return R.isArray(t)?t.forEach(o):o(t),this}}oa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.freezeMethods(oa.prototype);R.freezeMethods(oa);const Zt=oa;function Wa(e,t){const n=this||Pu,r=t||n,i=Zt.from(r.headers);let o=r.data;return R.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function lm(e){return!!(e&&e.__CANCEL__)}function io(e,t,n){ne.call(this,e??"canceled",ne.ERR_CANCELED,t,n),this.name="CanceledError"}R.inherits(io,ne,{__CANCEL__:!0});function Cw(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ne("Request failed with status code "+n.status,[ne.ERR_BAD_REQUEST,ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Ow=Ut.isStandardBrowserEnv?function(){return{write:function(n,r,i,o,s,a){const c=[];c.push(n+"="+encodeURIComponent(r)),R.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),R.isString(o)&&c.push("path="+o),R.isString(s)&&c.push("domain="+s),a===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function Pw(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Tw(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function cm(e,t){return e&&!Pw(t)?Tw(e,t):t}const Rw=Ut.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=R.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function Nw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Aw(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=r[o];s||(s=u),n[i]=c,r[i]=u;let f=o,g=0;for(;f!==i;)g+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-s{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,c=r(a),u=o<=s;n=o;const d={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&u?(s-o)/c:void 0,event:i};d[t?"download":"upload"]=!0,e(d)}}const Iw=typeof XMLHttpRequest<"u",Lw=Iw&&function(e){return new Promise(function(n,r){let i=e.data;const o=Zt.from(e.headers).normalize(),s=e.responseType;let a;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}R.isFormData(i)&&(Ut.isStandardBrowserEnv||Ut.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(h+":"+y))}const d=cm(e.baseURL,e.url);u.open(e.method.toUpperCase(),om(d,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function f(){if(!u)return;const h=Zt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),_={data:!s||s==="text"||s==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:h,config:e,request:u};Cw(function(w){n(w),c()},function(w){r(w),c()},_),u=null}if("onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(f)},u.onabort=function(){u&&(r(new ne("Request aborted",ne.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new ne("Network Error",ne.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const _=e.transitional||sm;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),r(new ne(y,_.clarifyTimeoutError?ne.ETIMEDOUT:ne.ECONNABORTED,e,u)),u=null},Ut.isStandardBrowserEnv){const h=(e.withCredentials||Rw(d))&&e.xsrfCookieName&&Ow.read(e.xsrfCookieName);h&&o.set(e.xsrfHeaderName,h)}i===void 0&&o.setContentType(null),"setRequestHeader"in u&&R.forEach(o.toJSON(),function(y,_){u.setRequestHeader(_,y)}),R.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),s&&s!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",kf(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",kf(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=h=>{u&&(r(!h||h.type?new io(null,e,u):h),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const g=Nw(d);if(g&&Ut.protocols.indexOf(g)===-1){r(new ne("Unsupported protocol "+g+":",ne.ERR_BAD_REQUEST,e));return}u.send(i||null)})},Jo={http:sw,xhr:Lw};R.forEach(Jo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Fw={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof Zt?e.toJSON():e;function Dr(e,t){t=t||{};const n={};function r(u,d,f){return R.isPlainObject(u)&&R.isPlainObject(d)?R.merge.call({caseless:f},u,d):R.isPlainObject(d)?R.merge({},d):R.isArray(d)?d.slice():d}function i(u,d,f){if(R.isUndefined(d)){if(!R.isUndefined(u))return r(void 0,u,f)}else return r(u,d,f)}function o(u,d){if(!R.isUndefined(d))return r(void 0,d)}function s(u,d){if(R.isUndefined(d)){if(!R.isUndefined(u))return r(void 0,u)}else return r(void 0,d)}function a(u,d,f){if(f in t)return r(u,d);if(f in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(u,d)=>i(Cf(u),Cf(d),!0)};return R.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=c[d]||i,g=f(e[d],t[d],d);R.isUndefined(g)&&f!==a||(n[d]=g)}),n}const um="1.4.0",Tu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Tu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Of={};Tu.transitional=function(t,n,r){function i(o,s){return"[Axios v"+um+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new ne(i(s," has been removed"+(n?" in "+n:"")),ne.ERR_DEPRECATED);return n&&!Of[s]&&(Of[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}};function Mw(e,t,n){if(typeof e!="object")throw new ne("options must be an object",ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],c=a===void 0||s(a,o,e);if(c!==!0)throw new ne("option "+o+" must be "+c,ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ne("Unknown option "+o,ne.ERR_BAD_OPTION)}}const vc={assertOptions:Mw,validators:Tu},ln=vc.validators;class Cs{constructor(t){this.defaults=t,this.interceptors={request:new jf,response:new jf}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Dr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&vc.assertOptions(r,{silentJSONParsing:ln.transitional(ln.boolean),forcedJSONParsing:ln.transitional(ln.boolean),clarifyTimeoutError:ln.transitional(ln.boolean)},!1),i!=null&&(R.isFunction(i)?n.paramsSerializer={serialize:i}:vc.assertOptions(i,{encode:ln.function,serialize:ln.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=o&&R.merge(o.common,o[n.method]),s&&R.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Zt.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(c=c&&_.synchronous,a.unshift(_.fulfilled,_.rejected))});const u=[];this.interceptors.response.forEach(function(_){u.push(_.fulfilled,_.rejected)});let d,f=0,g;if(!c){const y=[Ef.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,u),g=y.length,d=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new io(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ru(function(i){t=i}),cancel:t}}}const zw=Ru;function Bw(e){return function(n){return e.apply(null,n)}}function Uw(e){return R.isObject(e)&&e.isAxiosError===!0}const yc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(yc).forEach(([e,t])=>{yc[t]=e});const $w=yc;function dm(e){const t=new Go(e),n=Kg(Go.prototype.request,t);return R.extend(n,Go.prototype,t,{allOwnKeys:!0}),R.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return dm(Dr(e,i))},n}const Ne=dm(Pu);Ne.Axios=Go;Ne.CanceledError=io;Ne.CancelToken=zw;Ne.isCancel=lm;Ne.VERSION=um;Ne.toFormData=ra;Ne.AxiosError=ne;Ne.Cancel=Ne.CanceledError;Ne.all=function(t){return Promise.all(t)};Ne.spread=Bw;Ne.isAxiosError=Uw;Ne.mergeConfig=Dr;Ne.AxiosHeaders=Zt;Ne.formToJSON=e=>am(R.isHTMLForm(e)?new FormData(e):e);Ne.HttpStatusCode=$w;Ne.default=Ne;const Pr=Ne,fm=e=>hm+e,hm=window.location.protocol+"//127.0.0.1:8000",Dw={authority:fm("/api/auth/vvsu/"),client_id:"it-hub-client",redirect_uri:"https://pairent.vvsu.ru/sign-in/",scope:"openid vvsu_IdUser vvsu_IdEmpl vvsu_IdStud vvsu_login given_name family_name"},oo=Object.freeze({API_ROOT:hm,OIDCConfig:Dw,api_path:fm}),{API_ROOT:Va}=oo;class Yr{static async getAll(t,n){return await Pr.get(Va+"/api/apartaments/",{params:{limit:t,...n!==0?{offset:n}:{}}})}static async getById(t){return await Pr.get(Va+"/api/apartament/"+t+"/")}static async getComparisons(){return await Pr.get(Va+"/api/comparison/")}}const Hw=P.section` display: flex; justify-content: space-between; margin-top: 22px; `,Ww=P.div` display: flex; & img { } `,qw=P.img` width: 350px; height: 250px; `,Vw=P.div` padding-left: 34px; & h3 { font-weight: 600; font-size: 24px; color: #222; } `,Kw=P.p` margin-top: 4px; font-size: 16px; color: #222; `,Pf=P.div` display: flex; justify-content: space-around; align-items: center; width: fit-content; height: 38px; border: 1px solid #A9A9A9; border-radius: 16px; margin-right: 8px; padding-right: 8px; `,Qw=P.div` display: flex; margin-top: 10px; & p { font-weight: 500; font-size: 15px; color: #A9A9A9; } `,ar=P.td` width: fit-content; padding: 0 5px; border-right: 1px solid #e1e3e1; & ${Y} { display:inline-block; } `,Jw=P.div` width: 500px; padding-top: 10px; display: flex `,Yo=P.div` width: 32px; height: 32px; margin-right: 10px; user-select: none; font-weight: 600; font-size: 16px; display: flex; align-items: center; border: 1px solid black; border-color: #e2e0e2 #e2e0e2 #d1cfd1; border-radius: 32px; box-shadow: 0 1px 1px #00000020; `,Gw=P.div``,Yw=P(Yo)` width: fit-content; background: #E3F0FF; color: #007EFF; padding-right: 10px; `,pm=P.div``,Xw=P.div` text-align: right; & ${pm} { display: flex; justify-content: end; align-items: center; } `,Nu=P.p` color: gray; `,Zw=P(Nu)` font-size: 16px; margin-right: 18px `,e_=P(Nu)` margin-top: 48px; font-size: 15px; line-height: 18px; word-wrap: break-word; `,t_=P(Nu)` margin-top: 48px; font-size: 15px; `,n_=e=>l.jsx("svg",{width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${e.up?180:0}deg)`,marginRight:4},children:l.jsx("path",{d:"M7 12L13.9282 0H0.0717969L7 12Z",fill:e.up?"tomato":"limegreen"})}),r_=function(e){return l.jsxs(Hw,{children:[l.jsxs(Ww,{children:[l.jsx(qw,{src:"/images/apartment.png"}),l.jsxs(Vw,{children:[l.jsxs("h3",{children:[e.results.perimetrs," м², ",e.results.rooms==0?"":e.results.rooms,e.results.rooms==0?"Гостинка":e.results.rooms>1?"-х комнатная":" комнатная"]}),l.jsxs(Kw,{children:[e.results.address,", ",e.results.floor," этаж из ",e.results.floorHouse]}),l.jsxs(Qw,{children:[l.jsxs(Pf,{children:[l.jsx(Y,{src:"/images/icons/bus.svg",width:20,height:21}),l.jsxs("p",{children:[e.results.timeToBus," мин"]})]}),l.jsxs(Pf,{children:[l.jsx(Y,{src:"/images/icons/train.svg",width:18,height:20}),l.jsxs("p",{children:[e.results.timeToTrain," мин"]})]})]}),l.jsx("div",{style:{height:24}}),l.jsx("table",{children:l.jsxs("tbody",{children:[l.jsxs("tr",{children:[l.jsxs(ar,{children:[l.jsx(Y,{src:"/images/icons/chair.svg"}),l.jsx(Y,{src:"/images/icons/paw.svg"})]}),l.jsxs(ar,{children:[l.jsx(Y,{src:"/images/icons/parking.svg"}),l.jsx(Y,{src:"/images/icons/dish.svg"})]}),l.jsxs(ar,{style:{borderRight:0},children:[l.jsx(Y,{src:"/images/icons/burger.svg"}),l.jsx(Y,{src:"/images/icons/game.svg"})]})]}),l.jsxs("tr",{children:[l.jsxs(ar,{children:[l.jsx(Y,{src:"/images/icons/wifi.svg"}),l.jsx(Y,{src:"/images/icons/paint.svg"})]}),l.jsxs(ar,{children:[l.jsx(Y,{src:"/images/icons/recycle.svg"}),l.jsx(Y,{src:"/images/icons/up-down-arrows.svg"})]}),l.jsxs(ar,{style:{borderRight:0},children:[l.jsx(Y,{src:"/images/icons/store.svg"}),l.jsx(Y,{src:"/images/icons/drugs.svg"})]})]})]})}),l.jsx("div",{style:{height:12}}),l.jsxs(Jw,{children:[l.jsxs(Yw,{children:[l.jsx(Y,{src:"/images/icons/phone.svg",width:16,height:17}),l.jsx(Gw,{children:"Показать телефон"})]}),l.jsx(Yo,{children:l.jsx(Y,{src:"/images/icons/heart.svg",width:18,height:17})}),l.jsx(Yo,{children:l.jsx(Y,{src:"/images/icons/stack.svg",width:18,height:19})}),l.jsx(Yo,{children:l.jsx(Y,{src:"/images/icons/pencil.svg",width:16,height:17})})]})]})]}),l.jsxs(Xw,{children:[l.jsxs(pm,{children:[l.jsx(n_,{up:e.results.lastPrice>e.results.price}),l.jsxs("h3",{children:[e.results.price," ₽"]})]}),l.jsx(Zw,{children:"в месяц"}),l.jsx(e_,{children:e.results.description}),l.jsx(t_,{children:e.results.dateCreate})]})]})},i_=P.li` border-bottom: 1px solid; border-image: linear-gradient(to right, transparent 33.5%, #c2c4c2 33.5%) 100% 1; box-sizing: border-box; list-style-type: none; padding: 20px 0; & section { margin-top: 0; } `;function gm(e){const t=e.list;return t.length==0?null:l.jsx("ul",{children:t.map((n,r)=>l.jsx(i_,{children:l.jsx(r_,{results:n})},r))})}const Xr=e=>{const[t,n]=N.useState(!1),[r,i]=N.useState("");return[async(...s)=>{try{n(!0),await e(...s)}catch(a){i(a.message)}finally{n(!1)}},t,r]},sa=(e,t)=>Math.ceil(e/t),Au=e=>{let t=[];for(let n=0;n{let n=Au(e),r=t!==1?t-1:t,i=te.is_active?` color: royalblue; font-weight: 600; border: 1px solid royalblue; `:""} &:hover { background: #f2f2f2; } &:active { background: #eeefee; } `,a_=P(mi)` background: url(/images/icons/dots.svg) no-repeat; background-position: center; background-size: 20px; user-select: none; &:hover, &:active { background: url(/images/icons/caret-double-blue.svg) no-repeat; background-position: center; background-size: 14px; } `,l_=(e,t)=>{if(tthis.props.pages&&(n=this.props.pages)),this.props.onChange(n),!this.value_controlled&&this.setState({value:n})}render(){const{pages:n}=this.props;let r=this.state.value;return this.value_controlled&&(r=this.props.value),l.jsxs(s_,{children:[this.props.viewAllButton?l.jsx(mi,{style:{float:"left",padding:"0 16px"},children:"Показать все"}):null,this.props.sideButtons?l.jsx(mi,{onClick:()=>this.updateValue(r-1),children:l.jsx(Tf,{width:"16",height:"16",style:{transform:"rotate(180deg) translateY(-2px)"},src:"/images/icons/caret-right.svg"})}):null,l_(0,n).map((i,o)=>!(o==0|o==n-1)&&or+2?o==r-3|o==r+3?l.jsx(a_,{style:{transform:o==r-3?"rotate(180deg)":""},onClick:()=>{o==r-3?this.updateValue(r-3):this.updateValue(r+3)},children:" "}):null:l.jsx(mi,{is_active:r==o,onClick:()=>this.updateValue(o),children:o+1},o)),this.props.sideButtons?l.jsx(mi,{onClick:()=>this.updateValue(r+1),children:l.jsx(Tf,{width:"16",height:"16",src:"/images/icons/caret-right.svg"})}):null]})}}Ie(aa,"defaultProps",{onChange:()=>{},disabled:!1,sideButtons:!0,value:0,styles:{},viewAllButton:!1,onViewAll:()=>{}});const c_=()=>{const[e,t]=N.useState([]),[n,r]=N.useState(0),[i,o]=N.useState(1),[s,a]=N.useState(5),[c,u,d]=Xr(async h=>{let y=(i-1)*h;const _=await Yr.getAll(h,y);t(_.data.results);let C=_.data.count;r(sa(C,h))});N.useEffect(()=>{c(s)},[i,s]);const f=h=>{o(h)},g=()=>{a(n*s),o(1)};return!e.length&&!u&&!d?l.jsx("h1",{style:{textAlign:"center"},children:"В избранном ничего нет :/"}):d?l.jsxs("h1",{style:{textAlign:"center"},children:["Произошла ошибка (",d,")"]}):l.jsxs(l.Fragment,{children:[u&&l.jsx("h1",{style:{textAlign:"center"},children:"Идет загрузка..."}),l.jsx(gm,{list:e}),l.jsx(aa,{value:i,onChange:f,onViewAll:g,viewAllButton:!0,pages:n})]})};const mm=function(e){return l.jsxs("div",{className:"viewedElem",children:[l.jsx("img",{src:"/images/apartment.png",alt:""}),l.jsxs("p",{children:[e.results.perimetrs," м², ",e.results.rooms==0?"":e.results.rooms,e.results.rooms==0?"Гостинка":e.results.rooms>1?"-х комнатная":" комнатная"]}),l.jsxs("h3",{children:[e.results.price,"₽ / мес."]}),l.jsx("p",{children:e.results.address})]})};const Iu=function(){const[e,t]=N.useState([]),[n,r]=N.useState(0),[i,o]=N.useState(1),s=4,[a,c]=N.useState(0),[u,d,f]=Xr(async h=>{let y=(i-1)*h;const _=await Yr.getAll(h,y);t(_.data.results),c(_.data.count),r(sa(a,h))});N.useEffect(()=>{u(s)},[i]);const g=h=>{o(h)};return l.jsx(l.Fragment,{children:l.jsxs("section",{className:"viewedSection",children:[l.jsxs("div",{className:"viewedTittle",children:[l.jsxs("h2",{children:["Недавно просмотренные ",l.jsx("span",{children:a})]}),l.jsxs("div",{className:"viewedBtnSection",children:[l.jsx("button",{className:"btnViewed",children:"Посмотреть все Недавние"}),l.jsxs("div",{className:"viewedBtn",children:[l.jsx("button",{className:"btnPrevious",onClick:()=>g(i!==1?i-1:i),children:l.jsx("svg",{width:"9",height:"16",viewBox:"0 0 9 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M0.238707 8.62179L6.83881 15.7424C7.15713 16.0859 7.6732 16.0859 7.99148 15.7424L8.76127 14.9119C9.07904 14.5691 9.07965 14.0134 8.76263 13.6698L3.53193 7.99998L8.76263 2.33019C9.07965 1.98655 9.07904 1.43091 8.76127 1.08808L7.99148 0.257567C7.67316 -0.0858556 7.15709 -0.0858556 6.83881 0.257567L0.238741 7.37821C-0.0795746 7.72159 -0.0795746 8.27837 0.238707 8.62179Z",fill:"black"})})}),l.jsx("button",{className:"btnNext",onClick:()=>g(il.jsx(l.Fragment,{children:l.jsx(mm,{results:h},y)}))})})]})})};const Rf=function(){return l.jsxs(l.Fragment,{children:[l.jsx("h2",{children:"Избранное"}),l.jsx(c_,{}),l.jsx(Iu,{})]})},u_=P.section` display: flex; justify-content: space-between; margin-top: 24px; padding: 0 3% 0 3%; `,Nf=P.div` display: flex; align-items: center; & h2 { margin: 0px; padding: 0px; margin-left: 31px; font-size: 24px; color: #222; } `,d_=P.button` display: flex; justify-content: space-evenly; align-items: center; width: 180px; height: 36px; color: #BABABA; background: #fff; border: 1px solid #ccc; border-radius: 12px; font-size: 15px; `,Af=P.button` display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 20px; background: #fff; box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25); margin-right: 10px; `,f_=function({title:e,totalPages:t,page:n,changePage:r,displayPages:i}){let[o,s]=o_(t,n);return l.jsxs(u_,{children:[l.jsxs(Nf,{children:[l.jsx(Mn,{to:"/",children:l.jsxs(d_,{children:[l.jsx(Y,{src:"/images/icons/left-arrow-light.svg",width:10,height:16}),"Вернуться назад"]})}),l.jsx("h2",{children:e})]}),l.jsx(Nf,{children:i?l.jsxs(l.Fragment,{children:[l.jsx(Af,{onClick:()=>r(o),children:l.jsx(Y,{src:"/images/icons/left-arrow.svg",width:9,height:16})}),l.jsx(Af,{onClick:()=>r(s),children:l.jsx(Y,{src:"/images/icons/right-arrow.svg",width:9,height:16})})]}):null})]})},h_=P.div` width: 20%; margin-top: 26px; position:relative; `,p_=P.img` width: 100%; `,g_=P.h3` margin-top: 16px; font-weight: 600; font-size: 20px; color: #222; `,m_=P.p` margin-top: 16px; font-size: 16px; color: #0050A1; `,v_=P.div` display: flex; margin-top: 9px; & p { font-weight: 500; font-size: 15px; color: #A9A9A9; } `,If=P.div` display: flex; justify-content: space-around; align-items: center; width: fit-content; height: 38px; border: 1px solid #A9A9A9; border-radius: 16px; margin-right: 8px; padding-right: 8px; `,y_=P.button` width: 180px; height: 36px; background: #175FA9; border-radius: 12px; font-weight: 500; font-size: 16px; color: #fff; position: absolute; bottom:-62px; `,x_=function(e){return l.jsxs(h_,{children:[l.jsx(p_,{src:"/images/apartment.png"}),l.jsxs(g_,{children:[e.results.price," ₽ / мес."]}),l.jsx(m_,{children:e.results.address}),l.jsxs(v_,{children:[l.jsxs(If,{children:[l.jsx(Y,{src:"/images/icons/bus.svg",width:20,height:21}),l.jsxs("p",{children:[e.results.timeToBus," мин"]})]}),l.jsxs(If,{children:[l.jsx(Y,{src:"/images/icons/train.svg",width:18,height:20}),l.jsxs("p",{children:[e.results.timeToTrain," мин"]})]})]}),l.jsx(y_,{children:"Показать контакты"})]})},w_=P.section` display: flex; justify-content: space-between; padding-left: 3%; `,__=P.div` width: 19%; `,Ka=P.h3` font-weight: 600; font-size: 16px; display: flex; align-items: center; `,Qa=P.div` margin-top: 86px; `,Ja=P.p` margin-left: 3%; font-weight: 500; font-size: 16px; color: rgba(0, 0, 0, 0.5); `,Ga=P.div` height: 2px; margin-top: 8px; width: 100%; background-color: #CCC; `,Ya=P.section` display: flex; justify-content: space-between; margin-left: 3%; `,me=P.h3` margin-top: 33px; font-weight: 600; font-size: 16px; `,Xe=P.p` color: rgba(0, 0, 0, 0.5); margin-top: 33px; font-weight: 600; font-size: 16px; `,Xa=P.div` width: 20%; text-align: center; `,S_=()=>{const[e,t]=N.useState([]),[n,r]=N.useState(0),[i,o]=N.useState(1),s=4,[a,c,u]=Xr(async f=>{let g=(i-1)*f;const h=await Yr.getAll(f,g);t(h.data.results);let y=h.data.count;r(sa(y,f))});N.useEffect(()=>{a(s)},[i]);const d=f=>{o(f)};return l.jsxs(l.Fragment,{children:[l.jsx(f_,{title:"Сравнения квартир",totalPages:n,page:i,changePage:d,displayPages:!0}),l.jsxs(w_,{children:[l.jsxs(__,{children:[l.jsx(Ka,{style:{height:300},children:"Фото"}),l.jsx(Ka,{style:{height:1},children:"Cтоимость"}),l.jsx(Ka,{style:{height:65},children:"Адрес"})]}),e.map((f,g)=>l.jsx(l.Fragment,{children:l.jsx(x_,{results:f})}))]}),l.jsxs(Qa,{children:[l.jsx(Ja,{children:"Характеристики"}),l.jsx(Ga,{})]}),l.jsxs(Ya,{children:[l.jsxs("div",{children:[l.jsx(me,{children:"Количество комнат"}),l.jsx(me,{children:"Этаж"}),l.jsx(me,{children:"Общая площадь"}),l.jsx(me,{children:"Санузел"})]}),e.map((f,g)=>l.jsxs(Xa,{children:[l.jsx(me,{children:f.rooms===0?"Гостинка":f.rooms}),l.jsxs(me,{children:[f.floor," из ",f.floorHouse]}),l.jsxs(me,{children:[f.perimetrs," м²"]}),l.jsx(Xe,{children:f.isBathroom?"✓":"—"})]}))]}),l.jsxs(Qa,{children:[l.jsx(Ja,{children:"Удобства"}),l.jsx(Ga,{})]}),l.jsxs(Ya,{children:[l.jsxs("div",{children:[l.jsx(me,{children:"Мебель"}),l.jsx(me,{children:"Интернет"}),l.jsx(me,{children:"Телевизор"}),l.jsx(me,{children:"Стиральная машинка"}),l.jsx(me,{children:"Холодильник"}),l.jsx(me,{children:"Кондиционер"}),l.jsx(me,{children:"Можно с детьми"}),l.jsx(me,{children:"Можно с животными"}),l.jsx(me,{children:"Свежий ремонт"})]}),e.map((f,g)=>l.jsxs(Xa,{children:[l.jsx(Xe,{children:f.isFurniture?"✓":"—"}),l.jsx(Xe,{children:f.isInternet?"✓":"—"}),l.jsx(Xe,{children:f.isTelevision?"✓":"—"}),l.jsx(Xe,{children:f.isWasher?"✓":"—"}),l.jsx(Xe,{children:f.isRefrigerator?"✓":"—"}),l.jsx(Xe,{children:f.isAirConditioning?"✓":"—"}),l.jsx(Xe,{children:f.isChild?"✓":"—"}),l.jsx(Xe,{children:f.isAnimal?"✓":"—"}),l.jsx(Xe,{children:f.isFreshRepair?"✓":"—"})]}))]}),l.jsxs(Qa,{children:[l.jsx(Ja,{children:"О здании"}),l.jsx(Ga,{})]}),l.jsxs(Ya,{children:[l.jsxs("div",{children:[l.jsx(me,{children:"Высота потолков"}),l.jsx(me,{children:"Количество этажей"}),l.jsx(me,{children:"Лифт"}),l.jsx(me,{children:"Мусоропровод"}),l.jsx(me,{children:"Закрытая парковка"}),l.jsx(me,{children:"Охрана или консьерж"})]}),e.map((f,g)=>l.jsxs(Xa,{children:[l.jsxs(me,{children:[f.ceilingHeight," м"]}),l.jsx(me,{children:f.floorHouse}),l.jsx(Xe,{children:f.isElevator?"✓":"—"}),l.jsx(Xe,{children:f.isGarbageChute?"✓":"—"}),l.jsx(Xe,{children:f.isParking?"✓":"—"}),l.jsx(Xe,{children:f.isConcierge?"✓":"—"})]}))]})]})},Lf=function(){return l.jsxs(l.Fragment,{children:[l.jsx(S_,{}),l.jsx(Iu,{})]})},j_=function(){const[e,t]=N.useState([]),[n,r]=N.useState(0),[i,o]=N.useState(1),s=4,[a,c]=N.useState(0),[u,d,f]=Xr(async h=>{let y=(i-1)*h;const _=await Yr.getAll(h,y);t(_.data.results),c(_.data.count),r(sa(a,h))});N.useEffect(()=>{u(s)},[i]);const g=h=>{o(h)};return l.jsx(l.Fragment,{children:l.jsxs("section",{className:"viewedSection",children:[l.jsxs("div",{className:"viewedTittle",children:[l.jsxs("h2",{children:["Похожие объявления ",l.jsx("span",{children:a})]}),l.jsxs("div",{className:"viewedBtnSection",children:[l.jsx("button",{className:"btnViewed",children:"Посмотреть все Похожие"}),l.jsxs("div",{className:"viewedBtn",children:[l.jsx("button",{className:"btnPrevious",onClick:()=>g(i!==1?i-1:i),children:l.jsx("svg",{width:"9",height:"16",viewBox:"0 0 9 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("path",{d:"M0.238707 8.62179L6.83881 15.7424C7.15713 16.0859 7.6732 16.0859 7.99148 15.7424L8.76127 14.9119C9.07904 14.5691 9.07965 14.0134 8.76263 13.6698L3.53193 7.99998L8.76263 2.33019C9.07965 1.98655 9.07904 1.43091 8.76127 1.08808L7.99148 0.257567C7.67316 -0.0858556 7.15709 -0.0858556 6.83881 0.257567L0.238741 7.37821C-0.0795746 7.72159 -0.0795746 8.27837 0.238707 8.62179Z",fill:"black"})})}),l.jsx("button",{className:"btnNext",onClick:()=>g(il.jsx(l.Fragment,{children:l.jsx(mm,{results:h},y)}))})})]})})};var vm={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i{const u=r[c];delete r[c];let d,f,g;typeof u=="object"&&u!=null?{span:d,offset:f,order:g}=u:d=u;const h=c!==o?`-${c}`:"";d&&s.push(d===!0?`${t}${h}`:`${t}${h}-${d}`),g!=null&&a.push(`order${h}-${g}`),f!=null&&a.push(`offset${h}-${f}`)}),[{...r,className:so(n,...s,...a)},{as:e,bsPrefix:t,spans:s}]}const wm=N.forwardRef((e,t)=>{const[{className:n,...r},{as:i="div",bsPrefix:o,spans:s}]=C_(e);return l.jsx(i,{...r,ref:t,className:so(n,!s.length&&o)})});wm.displayName="Col";const le=wm,_m=N.forwardRef(({bsPrefix:e,fluid:t=!1,as:n="div",className:r,...i},o)=>{const s=la(e,"container"),a=typeof t=="string"?`-${t}`:"-fluid";return l.jsx(n,{ref:o,...i,className:so(r,t?`${s}${a}`:s)})});_m.displayName="Container";const O_=_m,Sm=N.forwardRef(({bsPrefix:e,className:t,as:n="div",...r},i)=>{const o=la(e,"row"),s=Fu(),a=Mu(),c=`${o}-cols`,u=[];return s.forEach(d=>{const f=r[d];delete r[d];let g;f!=null&&typeof f=="object"?{cols:g}=f:g=f;const h=d!==a?`-${d}`:"";g!=null&&u.push(`${c}${h}-${g}`)}),l.jsx(n,{ref:i,...r,className:so(t,o,...u)})});Sm.displayName="Row";const at=Sm;function P_(e,t=ym,n=xm){const r=[];return Object.entries(e).forEach(([i,o])=>{o!=null&&(typeof o=="object"?t.forEach(s=>{const a=o[s];if(a!=null){const c=s!==n?`-${s}`:"";r.push(`${i}${c}-${a}`)}}):r.push(`${i}-${o}`))}),r}const jm=N.forwardRef(({as:e="div",bsPrefix:t,className:n,direction:r,gap:i,...o},s)=>{t=la(t,r==="horizontal"?"hstack":"vstack");const a=Fu(),c=Mu();return l.jsx(e,{...o,ref:s,className:so(n,t,...P_({gap:i},a,c))})});jm.displayName="Stack";const Dn=jm;var bm={exports:{}};(function(e,t){(function(r,i){e.exports=i(zu(),N)})(Jt,function(n,r){return function(i){var o={};function s(a){if(o[a])return o[a].exports;var c=o[a]={i:a,l:!1,exports:{}};return i[a].call(c.exports,c,c.exports,s),c.l=!0,c.exports}return s.m=i,s.c=o,s.d=function(a,c,u){s.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:u})},s.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},s.t=function(a,c){if(1&c&&(a=s(a)),8&c||4&c&&typeof a=="object"&&a&&a.__esModule)return a;var u=Object.create(null);if(s.r(u),Object.defineProperty(u,"default",{enumerable:!0,value:a}),2&c&&typeof a!="string")for(var d in a)s.d(u,d,function(f){return a[f]}.bind(null,d));return u},s.n=function(a){var c=a&&a.__esModule?function(){return a.default}:function(){return a};return s.d(c,"a",c),c},s.o=function(a,c){return Object.prototype.hasOwnProperty.call(a,c)},s.p="",s(s.s=5)}([function(i,o,s){function a(f,g){for(var h=0;h0||y.image.height>0)&&_(!0))})}},{key:"loadImage",value:function(h){var y=this,_=new Image,C=!1;_.onload=function(){C||y.pumpLoaded()},_.onerror=function(){C||y.pumpLoaded()},_.src=h,C===!1&&(_.width>0||_.height>0)&&(C=!0,this.pumpLoaded())}},{key:"loadVideo",value:function(h){var y=this,_=document.createElement("video");_.addEventListener("loadeddata",function(){y.pumpLoaded()}),_.addEventListener("error",function(){y.pumpLoaded()}),_.setAttribute("src",h)}},{key:"pumpLoaded",value:function(){this.loaded+=1,this.loaded===this.toLoad&&this.resolver(!0)}},{key:"startLoad",value:function(h){h.match(/\.(mp4|webm)/i)&&this.loadVideo(h),h.match(/\.(png|jp(e)?g|gif|webp)/i)&&this.loadImage(h)}},{key:"loadMultiple",value:function(h){var y=this;return this.loaded=0,this.toLoad=h.length,new Promise(function(_){y.resolver=_,h.forEach(function(C){y.startLoad(C)})})}}]),f}();function u(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1?arguments[1]:void 0;if(!g)return f.join(" ").trim();for(var h=[],y=f.length;y--;)g[f[y]]&&h.push(g[f[y]]);return h}function d(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",g=arguments.length>1?arguments[1]:void 0;return g&&g[f]||f}},function(i,o,s){s.d(o,"a",function(){return g}),s.d(o,"b",function(){return h}),s.d(o,"c",function(){return y}),s.d(o,"e",function(){return _}),s.d(o,"d",function(){return C}),s.d(o,"g",function(){return w}),s.d(o,"f",function(){return m});var a=s(0);function c(p){return function(j){if(Array.isArray(j)){for(var b=0,k=new Array(j.length);b2&&arguments[2]!==void 0?arguments[2]:{},_=y.tolerance,C=_===void 0?0:_,w=y.propertyName;return new Promise(function(m){if(g){var p=null,x=h.charAt(0).toUpperCase()+h.slice(1),j=0;g.style["Webkit"+x]!==void 0&&(p="webkit"+x+"End"),g.style.OTransition!==void 0&&(p="o"+h+"End"),g.style[h]!==void 0&&(p=h+"end"),g.clearCssEndEvent&&g.clearCssEndEvent(),g.clearCssEndEvent=function(){g.removeEventListener(p,b)},g.addEventListener(p,b)}else m(!1);function b(k){if((k.srcElement||k.target)===g){if(j>=C){if(w&&w!==k.propertyName)return;g.removeEventListener(p,b),m(k)}j+=1}}})}function f(g){window&&window.requestAnimationFrame(function(){window.requestAnimationFrame(g)})}Object.defineProperty(c,"__esModule",{value:!0}),c.setCssEndEvent=d,c.beforeCssLayout=function(g){window&&window.requestAnimationFrame(g)},c.beforeNextCssLayout=f,c.beforeFutureCssLayout=function(g,h){(function y(_,C){window&&_&&Number.isInteger(_)&&_>0?window.requestAnimationFrame(function(){y(_-1,C)}):C()})(g+1,h)},c.onceNextCssLayout=function(){return new Promise(function(g){f(g)})},c.onceTransitionEnd=function(g){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(y){d(g,"transition",h).then(y)})},c.onceAnimationEnd=function(g){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(y){d(g,"animation",h).then(y)})}}])},function(i,o,s){i.exports=s(13)},,,,,,,,function(i,o,s){s.r(o);var a=s(3),c=s.n(a),u=s(2),d=s.n(u),f=s(4),g=s(0),h=s(1);function y(L){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(L)}function _(L,I){for(var E=0;EA);v.props.onClick({index:A,direction:q})}),v.rootElement=E.rootElement,v}return function(v,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(S&&S.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),S&&m(v,S)}(I,L),function(v,S,T){return S&&_(v.prototype,S),T&&_(v,T),v}(I,[{key:"renderBullets",value:function(){var v=this,S=this.props,T=S.cssModule,A=S.selected,q=S.media;return(q===void 0?[]:q).map(function(X,K){var se=K===A?Object(g.c)("".concat(v.rootElement,"__bullets--active"),T):null;return c.a.createElement("button",{key:"bullet-".concat(K),"data-index":K,onClick:v.bulletClick,className:se},K)})}},{key:"render",value:function(){var v=this.props,S=v.cssModule,T=v.rootElement;return c.a.createElement("nav",{className:Object(g.c)("".concat(T,"__bullets"),S)},this.renderBullets())}}]),I}(c.a.Component);function j(L){return(j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E})(L)}function b(L,I){for(var E=0;E=0||(Se[K]=q[K]);return Se}(L,I);if(Object.getOwnPropertySymbols){var T=Object.getOwnPropertySymbols(L);for(v=0;v=0||Object.prototype.propertyIsEnumerable.call(L,E)&&(S[E]=L[E])}return S}function U(L,I){for(var E=0;E0),se=Math.abs(A);v.touchEnabled!==!1?se>=10&&(v.loading===!1?v.goTo({index:K?v.index+1:v.index-1,direction:K,touch:!0}):v.direction===!0?(A+=10,Math.abs(A)>q.offsetWidth?A=-q.offsetWidth:A>0&&(A=0),q.style.transform="translate3d(".concat(A,"px, 0, 0)"),X.style.transform="translate3d(calc(100% + ".concat(A,"px), 0, 0)")):(A-=10,Math.abs(A)>q.offsetWidth?A=q.offsetWidth:A<0&&(A=0),q.style.transform="translate3d(".concat(A,"px, 0, 0)"),X.style.transform="translate3d(calc(-100% + ".concat(A,"px), 0, 0)"))):se>20&&(v.touchEnabled=!0,v.touchStartPoint=T.touches[0].clientX)}}),ye(kt(v),"touchEnd",function(){!v.animating&&v.touchStartPoint&&v.loading&&(v.touchStartPoint=null,v.animating=!0,v.touchEnabled=!1,v.animateMobileEnd(function(){v.index=v.nextIndex,v.setState({index:v.index}),v.onTransitionEnd(),v.animating=!1,v.loading=!1,v.unchargeIndex()}))}),ye(kt(v),"bulletClick",function(S){var T=S.currentTarget,A=parseInt(T.getAttribute("data-index"),10);v.goTo({index:A,direction:!(v.index>A)},function(){Object(f.onceNextCssLayout)().then(function(){Object(h.a)(T,v.classNames.bulletsLoading)})})}),v.rootElement=E.rootElement||ir,v.boxA=null,v.boxB=null,v.loaded=[],v.active="boxA",v.loader="boxB",v.nextIndex=null,v.loading=!1,v.media=null,v.started=!1,v.touchEnabled=!1,v.setupStartup(E),v}return function(v,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(S&&S.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),S&&qt(v,S)}(I,L),function(v,S,T){return S&&qe(v.prototype,S),T&&qe(v,T),v}(I,[{key:"componentDidMount",value:function(){var v=this;Object(h.a)(this.boxA,this.classNames.active),this.props.startupScreen&&(this.buttons&&(Object(h.a)(this.buttons.element,this.classNames.controlsHidden),Object(h.a)(this.buttons.element,this.classNames.controlsActive)),this.props.startup===!0&&this.media.length>0&&this.startup()),this.props.onFirstMount&&this.props.onFirstMount(Ee({},this.getInfo())),this.buttons&&Object(f.onceNextCssLayout)().then(function(){v.buttons&&v.buttons.element&&Object(h.b)(v.buttons.element,v.classNames.controlsHidden)})}},{key:"UNSAFE_componentWillReceiveProps",value:function(v){if(this.checkChildren(v),this.setupClassNames(Object(h.e)(v.cssModule)),v.name===this.props.name)if(v.startup!==!0||this.started!==!1)if(v.selected===this.props.selected)this.refreshSlider();else{var S=this.getIndex(v.selected),T=v.infinite===!0&&S===0&&this.index===this.media.length-1||!(this.index>S);this.goTo({index:S,direction:T})}else this.startup();else this.resetSlider(v.selected)}},{key:"onTransitionStart",value:function(){var v=this.media[this.index],S=this.media[this.nextIndex],T=Ee({},this.getInfo(),{nextSlide:this[this.loader],nextIndex:this.nextIndex,nextMedia:S});this.props.onTransitionStart&&this.props.onTransitionStart(T),v&&v.onTransitionStartOut&&v.onTransitionStartOut(T),S&&S.onTransitionStartIn&&S.onTransitionStartIn(T)}},{key:"onTransitionRequest",value:function(v,S){var T=this.media[this.index],A=this.checkIndex(S),q=this.media[A],X=Ee({eventName:v},this.getInfo(),{nextSlide:null,nextIndex:A,nextMedia:q});this.props.onTransitionRequest&&this.props.onTransitionRequest(X),T&&T.onTransitionRequestOut&&T.onTransitionRequestOut(X),q&&q.onTransitionRequestIn&&q.onTransitionRequestIn(X)}},{key:"onTransitionEnd",value:function(){var v=this.media[this.index],S=Ee({},this.getInfo());this.props.onTransitionEnd&&this.props.onTransitionEnd(S),v&&v.onTransitionEnd&&v.onTransitionEnd(S)}},{key:"getRootClassName",value:function(){var v=this.props,S=v.animation,T=v.className,A=v.cssModule,q=v.disabled,X=v.fillParent,K=v.infinite,se=v.organicArrows;return Object(h.d)({animation:S,className:T,cssModule:Object(h.e)(A),current:this.state.index,disabled:q,fillParent:X,infinite:K,organicArrows:se,rootElement:this.rootElement,total:this.media.length})}},{key:"setupStartup",value:function(v){if(this.checkChildren(v),this.setupClassNames(Object(h.e)(v.cssModule)),v.startupScreen){var S=this.getIndex(this.props.selected);this.index=null,this.state={index:this.index,boxA:{className:this.classNames.startUp,children:v.startupScreen},boxB:this.media[S]||null}}else this.started=!0,this.index=this.getIndex(this.props.selected),this.state={index:this.index,boxA:this.media[this.index]||null,boxB:null}}},{key:"getInfo",value:function(){return{slides:this.media.length,currentIndex:this.index,currentSlide:this[this.active],currentMedia:this.media[this.index],element:this.slider}}},{key:"getProgressBar",value:function(){if(!document)return{};var v=document.createElement("div");return v.className=this.classNames.bar,v}},{key:"setupClassNames",value:function(v){this.classNames=Object(h.f)(this.rootElement,v)}},{key:"getIndex",value:function(v){var S=0;return typeof v=="number"?v:(typeof v=="string"&&this.media.forEach(function(T,A){T.slug===v&&(S=A)}),S)}},{key:"refreshSlider",value:function(){var v;if(this.loading!==!0&&this.props.startup!==!1&&this.index!==null){var S=this.index;this.setState((ye(v={index:S},this.active,this.media[this.getIndex(S)]),ye(v,this.loader,null),v))}}},{key:"startup",value:function(){var v=this;this.started=!0,setTimeout(function(){v.goTo({index:v.props.selected,direction:!0,touch:!1})},this.props.startupDelay||75)}},{key:"resetSlider",value:function(){var v,S=this,T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.index=T,this.setState((ye(v={index:T},this.active,this.media[this.getIndex(T)]),ye(v,this.loader,null),v),function(){S.props.onResetSlider&&S.props.onResetSlider(Ee({},S.getInfo()))})}},{key:"checkChildren",value:function(v){v.children&&(v.children!==this.props.children||this.props.children&&!this.media)?this.media=Object(h.g)(v.children):v.media&&v.media.length?this.media=v.media:this.media||(this.media=[])}},{key:"startBarAnimation",value:function(v){var S=this,T=v.active;return new Promise(function(A){S.bar=S.getProgressBar(),T.appendChild(S.bar),Object(f.onceNextCssLayout)().then(function(){Object(f.onceNextCssLayout)().then(function(){Object(h.a)(S.bar,S.classNames.barActive),A()})})})}},{key:"endBarAnimation",value:function(v){var S=this;this.bar&&Object(f.onceNextCssLayout)().then(function(){Object(f.onceTransitionEnd)(S.bar).then(function(){v()}),Object(h.a)(S.bar,S.classNames.barEnd)})}},{key:"loadContent",value:function(v,S){var T=this;return new Promise(function(A,q){if(T.props.onLoadStart||S&&S.onLoadStart){var X=T.props.onLoadStart||S&&S.onLoadStart;return T.startBarAnimation({active:v}),void X(Ee({next:function(){T.endBarAnimation(function(){A(T.bar)})},error:q},T.getInfo()))}if(S&&(S.source||S.preload)){var K=S.preload?S.preload:S.source&&[S.source]||[];return T.checkLoadedUrls(K)===!0?void A(null):(T.startBarAnimation({active:v}),void or.loadMultiple(K).then(function(){T.pushLoaded(K),T.endBarAnimation(function(){A(T.bar)})}))}A(null)})}},{key:"pushLoaded",value:function(v){this.loaded=[].concat(ke(this.loaded),ke(v))}},{key:"checkLoadedUrls",value:function(v){var S=this,T=!0;return v.forEach(function(A){S.loaded.includes(A)||(T=!1)}),T}},{key:"startAnimationMobile",value:function(){var v=this.direction,S=this[this.active],T=this[this.loader],A=v?this.classNames.contentMoveRight:this.classNames.contentMoveLeft,q=v?this.classNames.contentMoveLeft:this.classNames.contentMoveRight;this.props.onTransitionStart&&this.props.onTransitionStart(Ee({},this.getInfo(),{nextSlide:this[this.loader],nextIndex:this.nextIndex,nextMedia:this.media[this.nextIndex]}));var X=S.querySelector(".".concat(Object(h.c)(this.classNames.content)));Object(h.a)(X,q),Object(h.a)(X,this.classNames.contentExit);var K=T.querySelector(".".concat(Object(h.c)(this.classNames.content)));Object(h.a)(K,A),Object(h.a)(K,this.classNames.contentStatic),Object(h.a)(S,this.classNames.animated),Object(h.a)(T,this.classNames.animated)}},{key:"animateMobileEnd",value:function(v){var S=this,T=this.direction,A=this[this.active],q=this[this.loader],X=T?this.classNames.moveLeft:this.classNames.moveRight,K=T?this.classNames.contentMoveRight:this.classNames.contentMoveLeft,se=T?this.classNames.contentMoveLeft:this.classNames.contentMoveRight,Se=q.querySelector(".".concat(Object(h.c)(this.classNames.content))),Ae=A.querySelector(".".concat(Object(h.c)(this.classNames.content)));Object(h.b)(Se,this.classNames.contentStatic),Object(h.a)(q,this.classNames.animatedMobile),Object(h.a)(A,this.classNames.animatedMobile),Object(f.onceNextCssLayout)().then(function(){q.style.transform="translate3d(0, 0, 0)",A.style.transform="translate3d(".concat(S.direction?"-":"","100%, 0, 0)"),Object(f.onceTransitionEnd)(A).then(function(){S.loading&&(Object(h.b)(A,S.classNames.animated),Object(h.b)(q,S.classNames.animated),Object(h.a)(q,S.classNames.active),Object(h.b)(A,S.classNames.active),Object(h.b)(A,X),Object(h.b)(q,S.classNames.animatedMobile),Object(h.b)(A,S.classNames.animatedMobile),Object(h.b)(Ae,se),Object(h.b)(Ae,S.classNames.contentExit),Object(h.b)(Se,K),S.buttons&&setTimeout(function(){S.buttons&&Object(h.b)(S.buttons.element,S.classNames.controlsActive)},S.props.controlsReturnDelay),S.activeArrow&&(Object(h.b)(S.activeArrow,S.activeArrowClass),S.activeArrow=null,S.activeArrowClass=null),S.active=S.active==="boxA"?"boxB":"boxA",S.loader=S.active==="boxA"?"boxB":"boxA",v&&v())})})}},{key:"runAnimation",value:function(v){var S=this,T=v.active,A=v.media,q=v.contentExitMoveClass,X=v.contentEnterMoveClass,K=v.activeContentElement,se=v.loaderContentElement,Se=v.loader,Ae=v.loaderPosition,Ve=v.exitPosition,sn=v.callback,Ye=v.transitionDelay;this.loadContent(T,A).then(function(Hu){Object(h.a)(K,q),Object(h.a)(K,S.classNames.contentExit),Object(h.a)(se,X),Object(h.a)(se,S.classNames.contentStatic),setTimeout(function(){Object(f.onceNextCssLayout)().then(function(){Object(h.a)(T,S.classNames.animated),Object(h.a)(Se,S.classNames.animated),Object(h.b)(se,S.classNames.contentStatic),Object(h.a)(T,S.classNames.exit),Object(h.a)(Se,Ae),Object(h.a)(T,Ve),Object(f.onceAnimationEnd)(T).then(function(){Object(h.a)(Se,S.classNames.active),Object(h.b)(Se,Ae),Object(h.b)(Se,S.classNames.animated),Object(h.b)(T,S.classNames.animated),Object(h.b)(T,S.classNames.active),Object(h.b)(T,Ve),Object(h.b)(T,S.classNames.exit),Object(h.b)(K,q),Object(h.b)(K,S.classNames.contentExit),Object(h.b)(se,X),Hu&&T.removeChild(Hu),S.buttons&&setTimeout(function(){S.buttons&&Object(h.b)(S.buttons.element,S.classNames.controlsActive)},S.props.controlsReturnDelay),S.active=S.active==="boxA"?"boxB":"boxA",S.loader=S.active==="boxA"?"boxB":"boxA";var qm=!S.activeArrow;S.activeArrow&&(Object(f.onceTransitionEnd)(S.activeArrow,{tolerance:S.index===null?0:2}).then(function(){S.releaseTransition()}),Object(h.b)(S.activeArrow,S.activeArrowClass),S.activeArrow=null,S.activeArrowClass=null),sn({release:qm})})})},Ye)})}},{key:"releaseTransition",value:function(){this.loading=!1}},{key:"startAnimation",value:function(v,S,T){var A=this.props.transitionDelay,q=this[this.active],X=this[this.loader],K=v?this.classNames.moveRight:this.classNames.moveLeft,se=v?this.classNames.moveLeft:this.classNames.moveRight,Se=v?this.classNames.contentMoveRight:this.classNames.contentMoveLeft,Ae=v?this.classNames.contentMoveLeft:this.classNames.contentMoveRight,Ve=q.querySelector(".".concat(Object(h.c)(this.classNames.content))),sn=X.querySelector(".".concat(Object(h.c)(this.classNames.content)));q.style.removeProperty("transform"),X.style.removeProperty("transform"),this.onTransitionStart();var Ye={active:q,media:S,contentExitMoveClass:Ae,contentEnterMoveClass:Se,activeContentElement:Ve,loaderContentElement:sn,loader:X,loaderPosition:K,exitPosition:se,callback:T,transitionDelay:A};this.runAnimation(Ye)}},{key:"goTo",value:function(v){var S=this,T=v.index,A=v.direction,q=v.touch,X=q!==void 0&&q,K=this.getIndex(T);this.loading!==!0&&T!==this.index?(this.loading=!0,this.direction=A,X!==!0?this.activateArrows(A,function(){S.chargeIndex(K,function(se){S.renderedLoader=!0,S.startAnimation(A,se,function(Se){var Ae=Se.release,Ve=Ae===void 0||Ae;S.index=S.nextIndex,S.setState({index:S.index},function(){S.onTransitionEnd(),Ve===!0&&S.releaseTransition()})})})}):this.chargeIndex(K,function(){S.activateArrows(A),S.startAnimationMobile()})):this.props.onTransitionReject&&this.props.onTransitionReject(Ee({},this.getInfo(),{forceTransition:function(){S.goTo({index:T,direction:A,touch:X})}}))}},{key:"checkIndex",value:function(v){return v>this.media.length-1?0:v<0?this.media.length-1:v}},{key:"chargeIndex",value:function(v,S){this.nextIndex=this.checkIndex(v);var T={},A=this.media[this.nextIndex];T[this.loader]=Ee({loader:!0},A),this.setState(T,function(){S(A)})}},{key:"unchargeIndex",value:function(){var v={};v[this.loader]=null,this.setState(v,function(){})}},{key:"activateArrows",value:function(v,S){var T=v?"right":"left",A=Object(h.e)(this.props.cssModule),q=Object(h.c)(Object(g.c)("".concat(this.rootElement,"__controls__arrow-").concat(T),A));if(this.buttons){var X=v?this.buttons.next:this.buttons.prev;this.activeArrow=X.querySelector(".".concat(q))}!this.activeArrow||this.buttons&&this.buttons.element&&this.buttons.element.classList.contains(this.classNames.controlsActive)?S&&S():(this.activeArrowClass=Object(g.c)("".concat(this.rootElement,"__controls__arrow-").concat(T,"--active"),A),Object(f.onceTransitionEnd)(this.activeArrow,{tolerance:this.index===null?0:2}).then(function(){S&&S()}),this.buttons&&this.buttons.element&&(Object(h.a)(this.buttons.element,this.classNames.controlsActive),Object(h.a)(this.activeArrow,this.activeArrowClass)))}},{key:"renderBox",value:function(v){var S=this,T={};return this.props.mobileTouch&&(T.onTouchStart=this.touchStart,T.onTouchMove=this.touchMove,T.onTouchEnd=this.touchEnd),c.a.createElement("div",oe({ref:function(q){S["box".concat(v)]=q},className:this.classNames.box},T),this.state["box".concat(v)]&&c.a.createElement(W,{media:this.state["box".concat(v)],className:this.classNames.content}))}},{key:"render",value:function(){var v=this,S=this.props,T=S.cssModule,A=S.organicArrows,q=S.bullets,X=S.style,K=S.customContent,se=S.buttons,Se=S.buttonContentLeft,Ae=S.buttonContentRight,Ve=this.rootElement;return c.a.createElement("div",{ref:function(Ye){v.slider=Ye},className:this.getRootClassName(),style:X},c.a.createElement("div",{ref:function(Ye){v.wrapper=Ye},className:this.classNames.wrapper},c.a.createElement("div",{ref:function(Ye){v.container=Ye},className:this.classNames.container},this.renderBox("A"),this.renderBox("B")),se&&c.a.createElement(H,{rootElement:Ve,cssModule:Object(h.e)(T),onMount:function(Ye){v.buttons=Ye},onNext:this.clickNext,onPrev:this.clickPrev,organicArrows:A,buttonContentLeft:Se,buttonContentRight:Ae}),K),q&&c.a.createElement(x,{cssModule:Object(h.e)(T),rootElement:Ve,media:this.media,selected:this.state.index,onClick:function(Ye){v.onTransitionRequest("bullet",Ye.index),v.goTo(Ye)}}))}}]),I}(c.a.Component);ye(ht,"propTypes",{animation:d.a.string,bullets:d.a.bool,buttonContentLeft:d.a.node,buttonContentRight:d.a.node,buttons:d.a.bool,children:d.a.node,className:d.a.string,controlsReturnDelay:d.a.number,cssModule:d.a.any,customContent:d.a.node,onLoadStart:d.a.func,disabled:d.a.bool,fillParent:d.a.bool,infinite:d.a.bool,media:d.a.array,name:d.a.string,onFirstMount:d.a.func,onResetSlider:d.a.func,onStartupRelease:d.a.func,onTransitionEnd:d.a.func,onTransitionRequest:d.a.func,onTransitionStart:d.a.func,organicArrows:d.a.bool,rootElement:d.a.string,selected:d.a.any,startup:d.a.bool,startupDelay:d.a.number,startupScreen:d.a.object,style:d.a.object,transitionDelay:d.a.number,mobileTouch:d.a.bool}),ye(ht,"defaultProps",{animation:null,bullets:!0,buttonContentLeft:null,buttonContentRight:null,buttons:!0,children:null,className:null,controlsReturnDelay:0,cssModule:null,customContent:null,onLoadStart:null,disabled:!1,fillParent:!1,infinite:!0,media:[],name:"awesome-slider",onFirstMount:null,onResetSlider:null,onStartupRelease:null,onTransitionEnd:null,onTransitionRequest:null,onTransitionStart:null,organicArrows:!0,rootElement:ir,selected:0,startup:!0,startupDelay:0,startupScreen:null,style:{},transitionDelay:0,mobileTouch:!0}),o.default=ht}])})})(bm);var T_=bm.exports;const km=Pn(T_),R_="";const zt=P(Y)` margin-left: 0px; margin-right: 0px; `,N_=P.div` max-width: 800px; `,A_=P.div` max-width: 800px; max-height: 500px; clip-path: inset(0% 0% 5% 0% round 20px); `,I_=P.div` font-size: 15px; line-height: 18px; font-weight: 300; color: #C0C0C0; margin-bottom: 8px; display: flex; align-items: center; & span { margin-left: 15px; font-size: 15px; line-height: 18px; font-weight: 300; color: #C0C0C0; } `,L_=P.h3` font-size: 20px; line-height: 24px; font-weight: 500; margin-bottom: 10px; `,F_=P.button` display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 20px; background: #FFFFFF; box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25); margin-right: 10px; `,M_=P.button` display: flex; align-items: center; justify-content: center; background: #FFFFFF; width: 201px; height: 28px; box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.25); border-radius: 8px; font-style: normal; font-weight: 500; font-size: 14px; margin-bottom: 12px; `,Bf=P.div` background: #E3F0FF; border-radius: 20px; padding: 13px 16px 11px 17px; `,z_=P.p` font-style: normal; font-weight: 600; font-size: 16px; line-height: 18px; margin-bottom: 15px; `,B_=P.h3` font-size: 15px; line-height: 18px; text-align: end; `,ci=P.div` height: 1px; margin-top: 9px; margin-bottom: 9px; width: 100%; background-color: #CCC; `,nl=P.div` max-width: 256px; max-height: 160px; background: #FFFFFF; border: 1px solid #C0C0C0; border-radius: 20px; padding: 8px; &:hover { box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25); cursor: pointer; } `,rl=P.img` width:100%; max-height: 120px; margin-bottom: 4px; border-radius: 12px; `,il=P.p` font-weight: 500; font-size: 16px; line-height: 15px; `,ol=P.span` font-weight: 500; font-size: 14px; line-height: 17px; color: #BABABA; `,U_=P.h3` font-weight: 600; font-size: 20px; line-height: 24px; padding-left: 0px; margin-top: 35px; margin-bottom: 10px; `,$_=P.p` font-weight: 500; font-size: 15px; line-height: 18px; `,Uf=P.button` background: #007EFF; border-radius: 12px; height: 36px; width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 500; font-size: 16px; line-height: 19px; color: #FFFFFF; &:hover { box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25); cursor: pointer; } `,D_=P.button` border-radius: 12px; background: #2348CC; height: 36px; width: 100%; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 500; font-size: 16px; line-height: 19px; color: #FFFFFF; &:hover { box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25); cursor: pointer; } `,H_=P.input` border: 1px solid #CCCCCC; border-radius: 12px; height: 36px; width: 100%; font-weight: 500; font-size: 15px; line-height: 18px; padding-left: 46px; &::placeholder { font-weight: 500; font-size: 15px; line-height: 18px; color: #CCCCCC; } `,W_=P.div` align-items: center; justify-content: center; text-align: center; `,Em=P.p` font-weight: 500; font-size: 20px; line-height: 24px; color: #000000; `,xc=P(Em)` font-size: 15px; line-height: 18px; `,q_=P.p` font-weight: 300; font-size: 16px; line-height: 24px; color: #C0C0C0; `,V_=P.div` position: relative; & input { padding-left: 30px; background-image: url("/images/icons/pencil-gray.svg"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 8px 0.6rem; } `,$f=P.table` margin-left: 15px; width: 100%; & td { padding-top: 19px; } `,lr=e=>l.jsxs(at,{children:[l.jsx(le,{xs:e.columnsize,children:l.jsx(z_,{children:e.title})}),l.jsx(le,{className:"end",children:l.jsx(B_,{children:e.price})})]}),sl=e=>l.jsx(le,{children:l.jsxs(W_,{children:[l.jsx(Em,{children:e.params}),l.jsx(q_,{children:e.title})]})}),al=e=>l.jsxs(at,{style:{marginBottom:16},children:[l.jsx(le,{xs:2,className:"d-flex justify-content-center",children:l.jsx(zt,{src:e.icon,width:e.width,height:e.height})}),l.jsx(le,{children:l.jsx(xc,{children:e.text})})]}),In=e=>l.jsxs(at,{children:[l.jsx(le,{xs:1,children:l.jsx(zt,{src:e.iconFirst,width:20,height:20})}),l.jsx(le,{xs:5,children:l.jsx(xc,{children:e.textFirst})}),l.jsx(le,{xs:1,children:l.jsx(zt,{src:e.iconSecond,width:20,height:20})}),l.jsx(le,{xs:5,children:l.jsx(xc,{children:e.textSecond})})]}),K_=function(){const t=Qy().id,[n,r]=N.useState([]),[i,o,s]=Xr(async a=>{const c=await Yr.getById(a);r(c.data)});return N.useEffect(()=>{i(t)},[]),l.jsx(O_,{fluid:"xl",style:{marginBottom:50,marginTop:50},children:l.jsxs(at,{children:[l.jsx(le,{xs:8,children:l.jsx(Dn,{children:l.jsxs(N_,{children:[l.jsx(A_,{children:l.jsxs(km,{cssModule:R_,bullets:!1,children:[l.jsx("div",{"data-src":"/images/house-s.jpg"}),l.jsx("div",{"data-src":"/images/house-s-2.jpg"})]})}),l.jsxs(at,{children:[l.jsx(le,{xs:4,children:l.jsxs(nl,{children:[l.jsx(rl,{src:"/images/plan.png"}),l.jsx(il,{children:"Планировка"}),l.jsx(ol,{children:"Схема помещений"})]})}),l.jsx(le,{xs:4,children:l.jsxs(nl,{children:[l.jsx(rl,{src:"/images/location.png"}),l.jsx(il,{children:"Расположение"}),l.jsx(ol,{children:"Показать на карте"})]})}),l.jsx(le,{xs:4,children:l.jsxs(nl,{children:[l.jsx(rl,{src:"/images/panorama.png"}),l.jsx(il,{children:"Панорама"}),l.jsx(ol,{children:"Обзор вокруг"})]})})]}),l.jsxs("div",{children:[l.jsx(U_,{children:"Описание"}),l.jsx($_,{children:n.description})]}),l.jsx(j_,{}),l.jsx(Iu,{})]})})}),l.jsx(le,{xs:4,children:l.jsxs(Dn,{children:[l.jsx("div",{style:{marginBottom:12},children:l.jsxs(I_,{children:[n.dateCreate," ",l.jsx("span",{children:"78"})," ",l.jsx(zt,{style:{marginLeft:5},src:"/images/icons/eye.svg",width:16,height:10})]})}),l.jsxs(L_,{children:[n.perimetrs," м², ",n.rooms==0?"":n.rooms,n.rooms==0?"Гостинка":n.rooms>1?"-х комнатная":" комнатная"]}),l.jsx("div",{children:l.jsxs(at,{children:[l.jsx(le,{xs:10,children:l.jsxs("h1",{style:{marginBottom:12},children:[n.price," ₽ / мес."]})}),l.jsx(le,{xs:2,children:l.jsx(F_,{children:l.jsx(zt,{src:"/images/icons/heart.svg",width:18,height:16})})})]})}),l.jsxs(M_,{children:[l.jsx(zt,{style:{marginRight:5},src:"/images/icons/stats.svg",width:16,height:12}),"Добавить к сравнению"]}),l.jsxs(Bf,{children:[l.jsxs(Dn,{children:[l.jsx(lr,{columnsize:9,title:"Оплата в первый месяц",price:`${n.price} ₽`}),l.jsx(lr,{columnsize:9,title:"Залог",price:`${n.bail} ₽`}),l.jsx(lr,{columnsize:9,title:"Комиссия агенству",price:`${n.agencyCommission} ₽`}),l.jsx(lr,{columnsize:9,title:"Коммун. услуги",price:`${n.utilitiesPrice}`})]}),l.jsx(ci,{}),l.jsxs(Dn,{children:[l.jsx(lr,{columnsize:8,title:"Итого",price:`${n.price+n.bail+n.agencyCommission} ₽ + КУ`}),l.jsx(lr,{columnsize:9,title:"Мин. срок аренды",price:`${n.minimumLeasePeriod} мес.`})]})]}),l.jsxs(at,{style:{marginTop:14},children:[l.jsx(le,{xs:7,children:l.jsxs(Uf,{children:[l.jsx(zt,{style:{marginRight:5},src:"/images/icons/two-people.svg",width:20,height:16}),"Снимать вдвоём"]})}),l.jsx(le,{children:l.jsxs(Uf,{children:[l.jsx(zt,{style:{marginRight:5},src:"/images/icons/people.svg",width:14,height:16}),"Снять"]})})]}),l.jsxs(D_,{style:{marginTop:12},children:[l.jsx(zt,{style:{marginRight:5},src:"/images/icons/phone-white.svg",width:16,height:16}),"Показать телефон +7 (xxx) xxx-xx-xx"]}),l.jsx(V_,{children:l.jsx(H_,{style:{marginTop:12},placeholder:"Добавить заметку"})}),l.jsx(ci,{style:{marginTop:17}}),l.jsxs(at,{children:[l.jsx(sl,{params:`${n.perimetrs} м²`,title:"общая"}),l.jsx(sl,{params:`${n.ceilingHeight} м`,title:"потолки"}),l.jsx(sl,{params:`${n.floor} этаж`,title:`из ${n.floorHouse}`})]}),l.jsx(ci,{}),l.jsxs($f,{children:[l.jsx("tr",{children:l.jsx("td",{children:l.jsx(In,{iconFirst:"/images/icons/chair-dark.svg",textFirst:"Мебель",iconSecond:"/images/icons/paw-dark.svg",textSecond:"Можно с питомцем"})})}),l.jsx("tr",{children:l.jsx("td",{children:l.jsx(In,{iconFirst:"/images/icons/tv-dark.svg",textFirst:"Телевизор",iconSecond:"/images/icons/child-dark.svg",textSecond:"Можно с детьми"})})}),l.jsx("tr",{children:l.jsx("td",{children:l.jsx(In,{iconFirst:"/images/icons/wifi-dark.svg",textFirst:"Интернет",iconSecond:"/images/icons/toilet-dark.svg",textSecond:"Санузел"})})}),l.jsx("tr",{children:l.jsx("td",{children:l.jsx(In,{iconFirst:"/images/icons/snowflake-dark.svg",textFirst:"Холодильник",iconSecond:"/images/icons/socks-dark.svg",textSecond:"Стиральная машина"})})}),l.jsx("tr",{children:l.jsx("td",{children:l.jsx(In,{iconFirst:"/images/icons/fan-dark.svg",textFirst:"Кондиционер",iconSecond:"/images/icons/paint-dark.svg",textSecond:"Свежий ремонт"})})})]}),l.jsx(ci,{style:{marginTop:19}}),l.jsxs($f,{children:[l.jsx("tr",{children:l.jsx("td",{children:l.jsx(In,{iconFirst:"/images/icons/up-down-arrows-dark.svg",textFirst:"Лифт",iconSecond:"/images/icons/parking-dark.svg",textSecond:"Парковка"})})}),l.jsx("tr",{children:l.jsx("td",{children:l.jsx(In,{iconFirst:"/images/icons/recycle-dark.svg",textFirst:"Мусоропровод",iconSecond:"/images/icons/dish-dark.svg",textSecond:"Консьерж"})})})]}),l.jsx(ci,{style:{marginTop:19,marginBottom:19}}),l.jsx(al,{icon:"/images/icons/pin.svg",width:12,height:20,text:n.address}),l.jsx(al,{icon:"/images/icons/bus-dark.svg",width:20,height:20,text:`${n.timeToBus} минут до остановки`}),l.jsx(al,{icon:"/images/icons/train-dark.svg",width:20,height:20,text:`${n.timeToTrain} минут до станции`}),l.jsx(Bf,{style:{marginTop:18},children:l.jsxs(at,{children:[l.jsx(le,{xs:2,children:l.jsx(zt,{style:{marginRight:5},src:"/images/icons/thinking-face.svg",width:60,height:64})}),l.jsxs(le,{children:[l.jsx("h4",{style:{marginBottom:4},children:"Не подходит квартира?"}),"Попробуйте сменить настройки поиска на главной странице."]})]})})]})})]})})};class Df{constructor(){Ie(this,"from");Ie(this,"to")}}let Q_=class{constructor(){Ie(this,"price_range");Ie(this,"area_range");Ie(this,"lease_period");Ie(this,"address");Ie(this,"rooms");this.price_range=new Df,this.area_range=new Df,this.lease_period=[],this.address="",this.rooms=0}};var J_={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function Cm(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return J_[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function Oo(e){var t=Cm(e);return"".concat(t.value).concat(t.unit)}var Hf=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if(typeof window>"u"||!window.document)return r;var i=document.createElement("style");document.head.appendChild(i);var o=i.sheet,s=` @keyframes `.concat(r,` { `).concat(t,` } `);return o&&o.insertRule(s,0),r},Os;(function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"})(Os||(Os={}));var G_=function(e,t){if(Object.keys(Os).includes(e)&&(e=Os[e]),e[0]==="#"&&(e=e.slice(1)),e.length===3){var n="";e.split("").forEach(function(i){n+=i,n+=i}),e=n}var r=(e.match(/.{2}/g)||[]).map(function(i){return parseInt(i,16)}).join(", ");return"rgba(".concat(r,", ").concat(t,")")},Ps=globalThis&&globalThis.__assign||function(){return Ps=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0||y.image.height>0)&&_(!0))})}},{key:"loadImage",value:function(h){var y=this,_=new Image,C=!1;_.onload=function(){C||y.pumpLoaded()},_.onerror=function(){C||y.pumpLoaded()},_.src=h,C===!1&&(_.width>0||_.height>0)&&(C=!0,this.pumpLoaded())}},{key:"loadVideo",value:function(h){var y=this,_=document.createElement("video");_.addEventListener("loadeddata",function(){y.pumpLoaded()}),_.addEventListener("error",function(){y.pumpLoaded()}),_.setAttribute("src",h)}},{key:"pumpLoaded",value:function(){this.loaded+=1,this.loaded===this.toLoad&&this.resolver(!0)}},{key:"startLoad",value:function(h){h.match(/\.(mp4|webm)/i)&&this.loadVideo(h),h.match(/\.(png|jp(e)?g|gif|webp)/i)&&this.loadImage(h)}},{key:"loadMultiple",value:function(h){var y=this;return this.loaded=0,this.toLoad=h.length,new Promise(function(_){y.resolver=_,h.forEach(function(C){y.startLoad(C)})})}}]),f}();function u(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],g=arguments.length>1?arguments[1]:void 0;if(!g)return f.join(" ").trim();for(var h=[],y=f.length;y--;)g[f[y]]&&h.push(g[f[y]]);return h}function d(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",g=arguments.length>1?arguments[1]:void 0;return g&&g[f]||f}},function(i,o,s){s.d(o,"a",function(){return g}),s.d(o,"b",function(){return h}),s.d(o,"c",function(){return y}),s.d(o,"e",function(){return _}),s.d(o,"d",function(){return C}),s.d(o,"g",function(){return w}),s.d(o,"f",function(){return m});var a=s(0);function c(p){return function(j){if(Array.isArray(j)){for(var b=0,k=new Array(j.length);b2&&arguments[2]!==void 0?arguments[2]:{},_=y.tolerance,C=_===void 0?0:_,w=y.propertyName;return new Promise(function(m){if(g){var p=null,x=h.charAt(0).toUpperCase()+h.slice(1),j=0;g.style["Webkit"+x]!==void 0&&(p="webkit"+x+"End"),g.style.OTransition!==void 0&&(p="o"+h+"End"),g.style[h]!==void 0&&(p=h+"end"),g.clearCssEndEvent&&g.clearCssEndEvent(),g.clearCssEndEvent=function(){g.removeEventListener(p,b)},g.addEventListener(p,b)}else m(!1);function b(k){if((k.srcElement||k.target)===g){if(j>=C){if(w&&w!==k.propertyName)return;g.removeEventListener(p,b),m(k)}j+=1}}})}function f(g){window&&window.requestAnimationFrame(function(){window.requestAnimationFrame(g)})}Object.defineProperty(c,"__esModule",{value:!0}),c.setCssEndEvent=d,c.beforeCssLayout=function(g){window&&window.requestAnimationFrame(g)},c.beforeNextCssLayout=f,c.beforeFutureCssLayout=function(g,h){(function y(_,C){window&&_&&Number.isInteger(_)&&_>0?window.requestAnimationFrame(function(){y(_-1,C)}):C()})(g+1,h)},c.onceNextCssLayout=function(){return new Promise(function(g){f(g)})},c.onceTransitionEnd=function(g){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(y){d(g,"transition",h).then(y)})},c.onceAnimationEnd=function(g){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(y){d(g,"animation",h).then(y)})}}])},,function(i,o,s){i.exports=s(7)},function(i,o,s){s.r(o),s.d(o,"default",function(){return k});var a=s(3),c=s.n(a),u=s(4),d=s(2),f=s.n(d),g=s(0),h=s(1);function y(O){return(y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(z){return typeof z}:function(z){return z&&typeof Symbol=="function"&&z.constructor===Symbol&&z!==Symbol.prototype?"symbol":typeof z})(O)}function _(){return(_=Object.assign||function(O){for(var M=1;M=0||(V[fe]=U[fe]);return V}(O,M);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(O);for(H=0;H=0||Object.prototype.propertyIsEnumerable.call(O,z)&&(te[z]=O[z])}return te}function w(O,M){for(var z=0;z$.slides-1?0:U;J!==this.state.selected?this.setState({selected:J}):this.forceClearBar(this.currentInfo)}},{key:"render",value:function(){var $=this,U=this.props,J=(U.inverval,U.play),fe=U.cancelOnInteraction,B=(U.showTimer,U.onTransitionStart),V=U.onTransitionEnd,W=U.onFirstMount,ie=U.onTransitionRequest,oe=C(U,["inverval","play","cancelOnInteraction","showTimer","onTransitionStart","onTransitionEnd","onFirstMount","onTransitionRequest"]);return c.a.createElement(O,_({},oe,{selected:this.state.selected,onFirstMount:function(ue){W&&W(ue),oe.startupScreen||($.setInfo(ue),J===!0&&$.setTimer(ue.currentSlide))},onTransitionStart:function(ue){var Ee=$.getBarFromSlide(ue.nextSlide);Ee&&$.restartBarAnimation(Ee),B&&B(ue)},onTransitionRequest:function(ue){$.clearBar(ue),$.currentInfo=ue,fe===!0&&($.forceStop=!0),ie&&ie(ue)},onTransitionEnd:function(ue){$.setInfo(ue),J===!0&&$.setTimer(ue.currentSlide),V&&V(ue)}}))}}]),te}(a.Component),j(M,"propTypes",{interval:f.a.number,cssModule:f.a.any,play:f.a.bool,cancelOnInteraction:f.a.bool,timerHeight:f.a.string,timerBackgroundColor:f.a.string,showTimer:f.a.bool,onTransitionStart:f.a.func,onTransitionEnd:f.a.func,onTransitionRequest:f.a.func,rootElement:f.a.string}),j(M,"defaultProps",{interval:2e3,play:!1,cancelOnInteraction:!1,timerHeight:"6px",cssModule:null,timerBackgroundColor:"rgba(0, 0, 0, 0.15)",showTimer:!0,onTransitionStart:null,onTransitionEnd:null,onTransitionRequest:null,rootElement:b}),z}}])})})(Om);var X_=Om.exports;const Z_=Pn(X_);const eS=Z_(km),tS=oo.API_ROOT,nS=P.select` padding: 6px 10px; border: 1px solid #c2c4c2; border-radius: 6px; box-shadow: 0 2px 2px #00000010 `,Po=P(Y)` margin-left:0; `,rS=P.p` font-size: 20pt; font-weight: 600; text-align: center; margin: 32px 0; text-shadow: 0 2px 1px #00000020; `,iS=P.div` background: url(/images/filter.png); height: 300px; width: 1150px; margin: 0 auto; margin-bottom: 60px; border-radius: 20px; box-shadow: 0 2px 12px #00000060; padding: 30px; text-shadow: 0 2px 16px #ffffffa0; `,oS=P.div` display: block; margin: 12px 0; `,wc=P.button` width: fit-content; height: 27px; display: inline-block; margin-right: 16px; border-radius: 10px; padding: 0 16px; box-shadow: 0 2px 16px #ffffff30; color: ${e=>e.active?"green":"black"}; box-sizing: border-box; ${e=>e.active?"font-weight: 600;":""} `,sS=P.h1` font-size: 16pt; color: #f0f4f0; user-select: none; padding-bottom: 6px; border-bottom: 1px solid #f0f2f060; margin-bottom: 20px; padding-bottom: 1px `,aS=P(wc)` float: right; color: darkred; margin-right: 0; `,lS=P.button` background: royalblue; padding: 10px; border-radius: 8px; color: #f9f9f9; width: 180px; &:disabled { background: #3a5dc8; } `,cS=P.div` background: #f2f3f2; border-radius: 12px; width: 100%; height: 56px; margin: 12px 0; font-weight: 400; padding: 0 16px `,uS=P.div` display: flex; align-items: center `,ll=P.div` height: 55px; width: 1px; border-left: 1px solid #c1c3c1; display: inline-block; margin: 0 20px `,ui=P.input` border: 0; background: 0; margin: 0 16px; margin-right: 0; font-size: 105%; width: 30px; outline: none; `,dS=P.div` width: 1150px; margin: 50px auto `,Wf=P.h3` font-weight: 500; margin: 48px 0; text-align: center; `,fS=P.div` filter: drop-shadow(0 2px 8px #00000060); clip-path: inset(0% 0% 0% 0% round 16px); & .awssld, .awssld__container { width: 1150px; height: 200px; } `,hS=e=>{const t=[{value:0,label:"Гостинка"},{value:1,label:"1 комната"},{value:2,label:"2 комнаты"},{value:3,label:"3 комнаты"},{value:4,label:"4 комнаты"},{value:-1,label:"Выберите"}],n={per_day:!1,per_month:!0,area_from:"",area_to:"",price_from:"",price_to:"",address:"",rooms:t[5],form_err:!1};let r=window.sessionStorage.getItem("pairent_filters");r&&(r=JSON.parse(r));const[i,o]=N.useState(r||n),s=c=>(window.sessionStorage.setItem("pairent_filters",JSON.stringify({...i,...c})),o({...i,...c})),a=()=>{let c=new Q_;c.address=i.address,c.area_range={from:i.area_from,to:i.area_to},c.price_range={from:i.price_from,to:i.price_to},i.per_day&&c.lease_period.push("day"),i.per_month&&c.lease_period.push("month"),i.rooms.value!=-1&&(c.rooms=i.rooms.value),e.onSubmit&&e.onSubmit(c)};return l.jsxs(iS,{children:[l.jsx(sS,{children:"Фильтры"}),l.jsxs(oS,{children:[l.jsxs(wc,{active:i.per_day?1:0,onClick:()=>s({per_day:!i.per_day}),children:[l.jsx(Po,{src:"/images/icons/calendar-day.svg",width:"14",height:"14"}),"Посуточно"]}),l.jsxs(wc,{active:i.per_month?1:0,onClick:()=>s({per_month:!i.per_month}),children:[l.jsx(Po,{src:"/images/icons/calendar.svg",width:"14",height:"14"}),"Ежемесячно"]}),l.jsxs(aS,{onClick:()=>s(n),children:[l.jsx(Po,{src:"/images/icons/eraser-fill.svg",width:"14",height:"14"}),"Сбросить"]})]}),l.jsx(cS,{children:l.jsxs(uS,{children:["Площадь",l.jsx("span",{style:{color:"gray",paddingLeft:10},children:" от "}),l.jsx(ui,{type:"text",placeholder:"—",maxLength:"3",value:i.area_from,onChange:c=>s({area_from:c.target.value})}),l.jsx("span",{style:{color:"gray",paddingLeft:10},children:" до "}),l.jsx(ui,{type:"text",placeholder:"—",maxLength:"3",value:i.area_to,onChange:c=>s({area_to:c.target.value})}),"м²",l.jsx(ll,{}),l.jsx(nS,{onChange:c=>s({rooms:t[c.target.value]??t[5]}),value:i.rooms.value,children:t.map((c,u)=>l.jsx("option",{value:c.value,label:c.label},u))}),l.jsx(ll,{}),"Цена",l.jsx("span",{style:{color:"gray",paddingLeft:6},children:" от "}),l.jsx(ui,{type:"text",placeholder:"—",value:i.price_from,onChange:c=>s({price_from:c.target.value}),style:{width:60}}),l.jsx("span",{style:{color:"gray",paddingLeft:6},children:" до "}),l.jsx(ui,{type:"text",placeholder:"—",value:i.price_to,onChange:c=>s({price_to:c.target.value}),style:{width:60}}),"₽",l.jsx(ll,{}),l.jsx(ui,{type:"text",placeholder:"Район, квартал, ж/д, индекс...",value:i.address,onChange:c=>s({address:c.target.value}),style:{width:300,marginLeft:0}})]})}),l.jsx("div",{style:{float:"right"},children:l.jsx(lS,{onClick:a,disabled:e.loading,children:e.loading?l.jsxs(l.Fragment,{children:[l.jsx(ao,{color:"#a1adb3",cssOverride:{marginRight:6,transform:"translate(-3px, 2px) scale(1.3)"},size:14}),"Загрузка данных..."]}):l.jsxs(l.Fragment,{children:[l.jsx(Po,{src:"/images/icons/search.svg",width:"14",height:"14"}),"Показать варианты"]})})})]})};class pS extends bt.Component{constructor(t){super(t),this.state={apartments:[],pageSize:10,page:1,data_loaded:!1,load_err:!1,loading_filters:!1},Yr.getAll(100).then(n=>{this.setState({apartments:n.data.results,data_loaded:!0})}).catch(n=>{this.setState({data_loaded:!0,apartments:[],load_err:n.message})}),this.filterData=this.filterData.bind(this)}async filterData(t){this.setState({loading_filters:!0});const r=await(await fetch(tS+"/api/apartaments/filters/",{method:"POST",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).catch(i=>console.error(i))).json();this.setState({apartments:r,data_loaded:!0,loading_filters:!1,load_err:!1})}render(){let{page:t,pageSize:n}=this.state,r=Math.floor(this.state.apartments.length/n),i=this.state.apartments.slice(t*n,t*n+n);return l.jsxs(dS,{children:[l.jsx(fS,{children:l.jsxs(eS,{play:!0,cancelOnInteraction:!1,interval:8e3,bullets:!1,children:[l.jsx("a",{href:"https://vvsu.ithub.ru/dod","data-src":"/images/OpenDoorDay.jpg"}),l.jsx("div",{"data-src":"/images/Business.jpg"})]})}),l.jsxs(rS,{children:["Выбор квартиры во",l.jsx("span",{style:{color:"#0066ff"},children:" Владивостоке"})]}),l.jsx(hS,{onSubmit:this.filterData,loading:this.state.loading_filters}),l.jsx(gm,{list:i,loading:this.state.loading_filters}),this.state.data_loaded?null:l.jsxs(l.Fragment,{children:[l.jsx(Wf,{children:"Данные загружаются, подождите немного"}),l.jsx("div",{style:{margin:"0 auto",width:"fit-content"},children:l.jsx(ao,{color:"#0077aa"})})]}),this.state.load_err?l.jsxs(Wf,{children:["Ошибка загрузки данных: ",l.jsx("br",{})," ",this.state.load_err]}):null,l.jsx(aa,{pages:r,onChange:o=>this.setState({page:o}),value:t})]})}}const pt=e=>{const t=n=>{e.onChangeAnswer(n.target.value,n.target.name)};return l.jsxs("div",{className:"question",children:[l.jsx("div",{className:"question__account",children:+e.account+1}),l.jsx("p",{className:"question__title",children:e.name}),l.jsxs("div",{className:"question__answers",children:[l.jsx("p",{children:"Не важно"}),l.jsxs("label",{className:"question__answer",children:[l.jsx("input",{name:e.account,type:"radio",value:"1",onChange:t}),l.jsx("span",{children:"1"})]}),l.jsxs("label",{className:"question__answer",children:[l.jsx("input",{name:e.account,type:"radio",value:"2",onChange:t}),l.jsx("span",{children:"2"})]}),l.jsxs("label",{className:"question__answer",children:[l.jsx("input",{name:e.account,type:"radio",value:"3",onChange:t}),l.jsx("span",{children:"3"})]}),l.jsxs("label",{className:"question__answer",children:[l.jsx("input",{name:e.account,type:"radio",value:"4",onChange:t}),l.jsx("span",{children:"4"})]}),l.jsxs("label",{className:"question__answer",children:[l.jsx("input",{name:e.account,type:"radio",value:"5",onChange:t}),l.jsx("span",{children:"5"})]}),l.jsx("p",{children:"Очень важно"})]})]})},{API_ROOT:gS}=oo;class mS{static async addById(t,n){await Pr.post(gS+"/api/psych_test/add_result/"+t,n)}}const vS=()=>{const[e,t]=N.useState(!0),n=_g(),[r,i]=N.useState(new Array(12)),o=(a,c)=>{r[c]=a,i(r)},s=async a=>{a.preventDefault();let c=!0;for(let u=0;u<12;u++)r[u]==null&&(t(!1),c=!1);c&&(await mS.addById(1,r),n("/"))};return l.jsxs("form",{onSubmit:s,className:"form",children:[l.jsx(pt,{name:"На сколько Вам важна национальность вашего соседа/соседки?",account:"0",onChangeAnswer:o}),l.jsx(pt,{name:"Согласны ли Вы делить одну комнату с вашим соседом/соседкой?",account:"1",onChangeAnswer:o}),l.jsx(pt,{name:"Какое число людей, снимающих квартиру (включая Вас), для вас приемлемо?",account:"2",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важно такое коммуникативное качество, как общительность, в вашем соседе/соседке?",account:"3",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важно такое коммуникативное качество, как эмпатия, в вашем соседе/соседке?",account:"4",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важно такое коммуникативное качество, как доброжелательность, в вашем соседе/соседке?",account:"5",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важно такое коммуникативное качество, как тактичность, в вашем соседе/соседке?",account:"6",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важно такое личностное качество, как ответственность, в вашем соседе/соседке?",account:"7",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важно такое личностное качество, как аккуратность, в вашем соседе/соседке?",account:"8",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важно такое личностное качество, как честность (искренность) , в вашем соседе/соседке ?",account:"9",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важно такое личностное качество, как чистоплотность , в вашем соседе/соседке ?",account:"10",onChangeAnswer:o}),l.jsx(pt,{name:"На сколько вам важна такия черта характера, как трудолюбие , в вашем соседе/соседке ?",account:"11",onChangeAnswer:o}),e&&l.jsx("div",{className:"btn-box",children:l.jsx("button",{className:"btn-box__form-btn",type:"submit",children:"Отправить"})}),!e&&l.jsxs("div",{className:"btn-box",children:[l.jsx("button",{className:"btn-box__form-btn",type:"submit",children:"Отправить"}),l.jsx("p",{className:"btn-box__text",children:"Вы не ответили на один из вопросов"})]})]})};const yS=()=>l.jsxs("div",{className:"header",children:[l.jsx("button",{type:"button",className:"header__btn",children:"Вернуться назад"}),l.jsx("h1",{className:"header__title",children:"Тест на совместимость"})]}),xS=()=>l.jsxs(l.Fragment,{children:[l.jsx(yS,{}),l.jsx(vS,{})]}),wS=()=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:l.jsx("path",{d:"M8 15c4.418 0 8-3.134 8-7s-3.582-7-8-7-8 3.134-8 7c0 1.76.743 3.37 1.97 4.6-.097 1.016-.417 2.13-.771 2.966-.079.186.074.394.273.362 2.256-.37 3.597-.938 4.18-1.234A9.06 9.06 0 0 0 8 15z"})}),Pm=P.div` box-shadow: 0 2px 1px #00000010; border: 1px solid #c2c4c2; border-radius: 14px; `,_S=P.button` border: 1px solid #c2c4c2; display: inline-block; padding: 12px 16px; border-radius: 14px; background: #ffffff; color: gray; box-shadow: 0 2px 1px #00000010; font-size: 12pt; float: left; & ${Y} { transform: translate(-4px, 2px) } `,SS=P.div` text-align: center; height: 100px; padding-top: 32px; z-index: 1; position: relative; top: 0; & h2 { font-weight: 600; text-align: center; padding: 0; display: inline-block; transform: translateY(6px); } `,jS=P.div` display: inline-block; float: right `,qf=P(Pm)` display: inline-block; border: 1px solid #c2c4c2; border-radius: 14px; padding: 6px 10px; margin: 0 12px; font-size: 11pt; width: 160px; & input[type=text] { margin: 0 8px; display: inline-block; width: 20px; border: 0; border-bottom: 1px solid gray; outline: none; padding-bottom: 2px; } `,Vf=P.div` border-top: 1px solid #c2c4c2; margin-top: 6px; padding-top: 8px; font-size: 10pt; transform: translate(4px) `,bS=P.button` background: royalblue; width: 40px; height: 40px; border-radius: 20px; float: right; margin: 0 10px; box-shadow: 0 2px 1px #00000020; transition: 250ms ease; transform: translateY(12px); &:hover { box-shadow: 0 2px 2px #00000060; } `,kS=P.div` margin: 32px auto; margin-bottom: 0; display: block; `,Tm=P.button` background: white; border: 2px solid royalblue; border-radius: 12px; color: royalblue; font-weight: 600; line-height: 20px; transition: 150ms ease; width: 100%; font-size: 10.5pt; height: 36px; opacity: 0; padding: 0px 10px; clip-path: border-box; box-sizing: border-box; & svg { fill: royalblue; margin: 0; margin-right: 6px; transform: translateY(2px); } &:hover { color: white; background: royalblue; } &:hover svg { fill: white } `,ES=y1` 0%, 50% { opacity: 0; transform: scale(1.05) } to { opacity: 1; transform: scale(1) } `,CS=P(Pm)` display: inline-block; padding: 10px; padding-top: 20px; background: white; width: 200px; height: 256px; margin-right: 20px; margin-bottom: 84px; text-align: center; animation: ${ES} 500ms ease; & h4 { margin: 10px 0; font-weight: 600; } & p { margin: 10px 0; height: 74px; color: gray; font-size: 10pt; } transition: 150ms ease; &:hover > ${Tm} { opacity: 1; padding: 6px 10px; } &:hover { height: 300px; margin-bottom: 40px; } `,OS=P.div` height: 0px; `,Rm=P.div` float: left; transform: translate(90%, -100%); background: lightgray; border: 3px solid white; border-radius: 100px; width: 36px; height: 36px; `,PS=P(Rm)` float: right; transform: translate(-75%, -100%); background: limegreen; & p { transform: translateY(6px); font-size: 11pt; font-weight: 600; color: white; text-shadow: 0 2px 1px #00000040; margin: 0; height: auto; } `,TS=P.h2` text-align: center; line-height: 3.5em; margin: 0; padding: 100px 0; & span { display: inline; margin: 0px auto } `;class RS extends bt.Component{constructor(n){super(n);Ie(this,"props")}render(){return l.jsxs("div",{children:["123",this.props.value.map(n=>l.jsxs(CS,{children:[l.jsx(Y,{src:"/images/icons/user.svg",width:"100",height:"100"}),l.jsxs(OS,{children:[l.jsx(Rm,{children:l.jsx(Y,{src:"/images/icons/question.svg",style:{margin:"5px 0"},width:"20",height:"20"})}),l.jsx(PS,{children:l.jsx("p",{children:"?"})})]}),l.jsx("h4",{className:"inner-element",children:"User, 0"}),l.jsx("p",{children:"No description provided."}),l.jsxs(Tm,{children:[l.jsx(wS,{}),"Перейти в чат"]})]}))]})}}class NS extends bt.Component{constructor(t){super(t),this.state={data:[{}],loading:!1}}componentDidMount(){}render(){return l.jsxs(kS,{children:[l.jsxs("h2",{style:{textAlign:"center",lineHeight:"11pt",marginBottom:32},children:["Выбери соседа",l.jsx("br",{}),l.jsx("br",{}),l.jsxs("span",{style:{fontSize:"11pt",fontWeight:500},children:["Не забывай, с этим человеком",l.jsx("br",{}),"придется жить бок-о-бок!"]})]}),this.state.loading?l.jsx(RS,{value:this.state.data}):l.jsxs(TS,{children:["Пожалуйста подождите, идет загрузка данных",l.jsx("br",{}),l.jsx(ao,{color:"#0077aa"})]})]})}}class AS extends bt.Component{render(){return l.jsxs(jS,{children:[l.jsxs(qf,{children:["Совместимость",l.jsxs(Vf,{children:["от",l.jsx("input",{type:"text"}),"до",l.jsx("input",{type:"text"})]})]}),l.jsxs(qf,{children:["Возраст",l.jsxs(Vf,{children:["от",l.jsx("input",{type:"text"}),"до",l.jsx("input",{type:"text"})]})]}),l.jsx(bS,{children:l.jsx(Y,{src:"/images/icons/search.svg",width:"18",height:"18"})})]})}}class IS extends bt.Component{constructor(t){super(t),this.state={}}render(){return l.jsxs(l.Fragment,{children:[l.jsxs(SS,{children:[l.jsxs(_S,{children:[l.jsx(Y,{src:"/images/icons/left-arrow-light.svg",width:10,height:16}),"Вернуться назад"]}),l.jsx(AS,{})]}),l.jsxs("div",{style:{transform:"translateY(-100px)",position:"relative",top:0,zIndex:0},children:[l.jsx(NS,{}),l.jsx(aa,{pages:0})]})]})}}const LS=P.button` background: white; border: 2px solid royalblue; border-radius: 12px; color: royalblue; font-weight: 600; line-height: 20px; transition: 150ms ease; width: 100%; font-size: 10.5pt; height: 36px; padding: 6px 10px; clip-path: border-box; box-sizing: border-box; & svg { fill: royalblue; margin: 0; margin-right: 6px; transform: translateY(2px); } &:hover { color: white; background: royalblue; } &:hover svg { fill: white } `,Nm=P.div` position: fixed; top: 45%; left: 50%; transform: translate(-50%, -50%); border: 1px solid #c2c4c2; border-radius: 12px; padding: 24px 36px; background: white; box-shadow: 0 2px 1px #00000010; text-align: center; & hr { margin-bottom: 24px; height: 0px; border: 0; border-bottom: 1px solid #c2c4c2; box-shadow: 0 2px 1px #c2c4c280; } `;function FS(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Am={exports:{}};const MS={},zS=Object.freeze(Object.defineProperty({__proto__:null,default:MS},Symbol.toStringTag,{value:"Module"})),BS=Qm(zS);(function(e,t){(function(n,r){e.exports=r()})(Jt,function(){var n=n||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Jt<"u"&&Jt.crypto&&(o=Jt.crypto),!o&&typeof FS=="function")try{o=BS}catch{}var s=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function m(){}return function(p){var x;return m.prototype=p,x=new m,m.prototype=null,x}}(),c={},u=c.lib={},d=u.Base=function(){return{extend:function(m){var p=a(this);return m&&p.mixIn(m),(!p.hasOwnProperty("init")||this.init===p.init)&&(p.init=function(){p.$super.init.apply(this,arguments)}),p.init.prototype=p,p.$super=this,p},create:function(){var m=this.extend();return m.init.apply(m,arguments),m},init:function(){},mixIn:function(m){for(var p in m)m.hasOwnProperty(p)&&(this[p]=m[p]);m.hasOwnProperty("toString")&&(this.toString=m.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),f=u.WordArray=d.extend({init:function(m,p){m=this.words=m||[],p!=i?this.sigBytes=p:this.sigBytes=m.length*4},toString:function(m){return(m||h).stringify(this)},concat:function(m){var p=this.words,x=m.words,j=this.sigBytes,b=m.sigBytes;if(this.clamp(),j%4)for(var k=0;k>>2]>>>24-k%4*8&255;p[j+k>>>2]|=O<<24-(j+k)%4*8}else for(var M=0;M>>2]=x[M>>>2];return this.sigBytes+=b,this},clamp:function(){var m=this.words,p=this.sigBytes;m[p>>>2]&=4294967295<<32-p%4*8,m.length=r.ceil(p/4)},clone:function(){var m=d.clone.call(this);return m.words=this.words.slice(0),m},random:function(m){for(var p=[],x=0;x>>2]>>>24-b%4*8&255;j.push((k>>>4).toString(16)),j.push((k&15).toString(16))}return j.join("")},parse:function(m){for(var p=m.length,x=[],j=0;j>>3]|=parseInt(m.substr(j,2),16)<<24-j%8*4;return new f.init(x,p/2)}},y=g.Latin1={stringify:function(m){for(var p=m.words,x=m.sigBytes,j=[],b=0;b>>2]>>>24-b%4*8&255;j.push(String.fromCharCode(k))}return j.join("")},parse:function(m){for(var p=m.length,x=[],j=0;j>>2]|=(m.charCodeAt(j)&255)<<24-j%4*8;return new f.init(x,p)}},_=g.Utf8={stringify:function(m){try{return decodeURIComponent(escape(y.stringify(m)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(m){return y.parse(unescape(encodeURIComponent(m)))}},C=u.BufferedBlockAlgorithm=d.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(m){typeof m=="string"&&(m=_.parse(m)),this._data.concat(m),this._nDataBytes+=m.sigBytes},_process:function(m){var p,x=this._data,j=x.words,b=x.sigBytes,k=this.blockSize,O=k*4,M=b/O;m?M=r.ceil(M):M=r.max((M|0)-this._minBufferSize,0);var z=M*k,H=r.min(z*4,b);if(z){for(var te=0;te>>7)^(M<<14|M>>>18)^M>>>3,H=f[O-2],te=(H<<15|H>>>17)^(H<<13|H>>>19)^H>>>10;f[O]=z+f[O-7]+te+f[O-16]}var Q=x&j^~x&b,$=C&w^C&m^w&m,U=(C<<30|C>>>2)^(C<<19|C>>>13)^(C<<10|C>>>22),J=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),fe=k+J+Q+d[O]+f[O],B=U+$;k=b,b=j,j=x,x=p+fe|0,p=m,m=w,w=C,C=fe+B|0}_[0]=_[0]+C|0,_[1]=_[1]+w|0,_[2]=_[2]+m|0,_[3]=_[3]+p|0,_[4]=_[4]+x|0,_[5]=_[5]+j|0,_[6]=_[6]+b|0,_[7]=_[7]+k|0},_doFinalize:function(){var h=this._data,y=h.words,_=this._nDataBytes*8,C=h.sigBytes*8;return y[C>>>5]|=128<<24-C%32,y[(C+64>>>9<<4)+14]=r.floor(_/4294967296),y[(C+64>>>9<<4)+15]=_,h.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=a._createHelper(g),i.HmacSHA256=a._createHmacHelper(g)}(Math),n.SHA256})})(Im);var $S=Im.exports;const DS=Pn($S);var Lm={exports:{}};(function(e,t){(function(n,r){e.exports=r(ca)})(Jt,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64={stringify:function(c){var u=c.words,d=c.sigBytes,f=this._map;c.clamp();for(var g=[],h=0;h>>2]>>>24-h%4*8&255,_=u[h+1>>>2]>>>24-(h+1)%4*8&255,C=u[h+2>>>2]>>>24-(h+2)%4*8&255,w=y<<16|_<<8|C,m=0;m<4&&h+m*.75>>6*(3-m)&63));var p=f.charAt(64);if(p)for(;g.length%4;)g.push(p);return g.join("")},parse:function(c){var u=c.length,d=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var g=0;g>>6-h%4*2,C=y|_;f[g>>>2]|=C<<24-g%4*8,g++}return o.create(f,g)}}(),n.enc.Base64})})(Lm);var HS=Lm.exports;const Kf=Pn(HS);var Fm={exports:{}};(function(e,t){(function(n,r){e.exports=r(ca)})(Jt,function(n){return n.enc.Utf8})})(Fm);var WS=Fm.exports;const qS=Pn(WS);function _c(e){this.message=e}_c.prototype=new Error,_c.prototype.name="InvalidCharacterError";var Qf=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new _c("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,s="";r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s};function VS(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(Qf(n).replace(/(.)/g,function(r,i){var o=i.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return Qf(t)}}function Ts(e){this.message=e}function KS(e,t){if(typeof e!="string")throw new Ts("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(VS(e.split(".")[n]))}catch(r){throw new Ts("Invalid token specified: "+r.message)}}Ts.prototype=new Error,Ts.prototype.name="InvalidTokenError";var QS={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},Ft,Mt,Qn=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(Qn||{});(e=>{function t(){Ft=3,Mt=QS}e.reset=t;function n(i){if(!(0<=i&&i<=4))throw new Error("Invalid log level");Ft=i}e.setLevel=n;function r(i){Mt=i}e.setLogger=r})(Qn||(Qn={}));var G=class{constructor(e){this._name=e}debug(...e){Ft>=4&&Mt.debug(G._format(this._name,this._method),...e)}info(...e){Ft>=3&&Mt.info(G._format(this._name,this._method),...e)}warn(...e){Ft>=2&&Mt.warn(G._format(this._name,this._method),...e)}error(...e){Ft>=1&&Mt.error(G._format(this._name,this._method),...e)}throw(e){throw this.error(e),e}create(e){const t=Object.create(this);return t._method=e,t.debug("begin"),t}static createStatic(e,t){const n=new G(`${e}.${t}`);return n.debug("begin"),n}static _format(e,t){const n=`[${e}]`;return t?`${n} ${t}:`:n}static debug(e,...t){Ft>=4&&Mt.debug(G._format(e),...t)}static info(e,...t){Ft>=3&&Mt.info(G._format(e),...t)}static warn(e,...t){Ft>=2&&Mt.warn(G._format(e),...t)}static error(e,...t){Ft>=1&&Mt.error(G._format(e),...t)}};Qn.reset();var JS="10000000-1000-4000-8000-100000000000",$t=class{static _randomWord(){return US.lib.WordArray.random(1).words[0]}static generateUUIDv4(){return JS.replace(/[018]/g,t=>(+t^$t._randomWord()&15>>+t/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return $t.generateUUIDv4()+$t.generateUUIDv4()+$t.generateUUIDv4()}static generateCodeChallenge(e){try{const t=DS(e);return Kf.stringify(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(t){throw G.error("CryptoUtils.generateCodeChallenge",t),t}}static generateBasicAuth(e,t){const n=qS.parse([e,t].join(":"));return Kf.stringify(n)}},fn=class{constructor(e){this._name=e,this._logger=new G(`Event('${this._name}')`),this._callbacks=[]}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){const t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}raise(...e){this._logger.debug("raise:",...e);for(const t of this._callbacks)t(...e)}},Sc=class{static decode(e){try{return KS(e)}catch(t){throw G.error("JwtUtils.decode",t),t}}},Jf=class{static center({...e}){var t,n,r;return e.width==null&&(e.width=(t=[800,720,600,480].find(i=>i<=window.outerWidth/1.618))!=null?t:360),(n=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((r=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}=${typeof n!="boolean"?n:n?"yes":"no"}`).join(",")}},wt=class extends fn{constructor(){super(...arguments),this._logger=new G(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const e=this._expiration-wt.getEpochTime();this._logger.debug("timer completes in",e),this._expiration<=wt.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(e){const t=this._logger.create("init");e=Math.max(Math.floor(e),1);const n=wt.getEpochTime()+e;if(this.expiration===n&&this._timerHandle){t.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),t.debug("using duration",e),this._expiration=n;const r=Math.min(e,5);this._timerHandle=setInterval(this._callback,r*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},jc=class{static readParams(e,t="query"){if(!e)throw new TypeError("Invalid URL");const r=new URL(e,window.location.origin)[t==="fragment"?"hash":"search"];return new URLSearchParams(r.slice(1))}},tr=class extends Error{constructor(e,t){var n,r,i;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw G.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(n=e.error_description)!=null?n:null,this.error_uri=(r=e.error_uri)!=null?r:null,this.state=e.userState,this.session_state=(i=e.session_state)!=null?i:null}},Bu=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},GS=class{constructor(e){this._logger=new G("AccessTokenEvents"),this._expiringTimer=new wt("Access token expiring"),this._expiredTimer=new wt("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}load(e){const t=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){const n=e.expires_in;if(t.debug("access token present, remaining duration:",n),n>0){let i=n-this._expiringNotificationTimeInSeconds;i<=0&&(i=1),t.debug("registering expiring timer, raising in",i,"seconds"),this._expiringTimer.init(i)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();const r=n+1;t.debug("registering expired timer, raising in",r,"seconds"),this._expiredTimer.init(r)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},YS=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new G("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=s=>{s.origin===this._frame_origin&&s.source===this._frame.contentWindow&&(s.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):s.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(s.data+" message from check session op iframe"))};const o=new URL(n);this._frame_origin=o.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=o.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;const t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},Mm=class{constructor(){this._logger=new G("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},Uu=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new G("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){const{timeoutInSeconds:n,...r}=t;if(!n)return await fetch(e,r);const i=new AbortController,o=setTimeout(()=>i.abort(),n*1e3);try{return await fetch(e,{...t,signal:i.signal})}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?new Bu("Network timed out"):s}finally{clearTimeout(o)}}async getJson(e,{token:t,credentials:n}={}){const r=this._logger.create("getJson"),i={Accept:this._contentTypes.join(", ")};t&&(r.debug("token passed, setting Authorization header"),i.Authorization="Bearer "+t),this.appendExtraHeaders(i);let o;try{r.debug("url:",e),o=await this.fetchWithTimeout(e,{method:"GET",headers:i,credentials:n})}catch(c){throw r.error("Network Error"),c}r.debug("HTTP response received, status",o.status);const s=o.headers.get("Content-Type");if(s&&!this._contentTypes.find(c=>s.startsWith(c))&&r.throw(new Error(`Invalid response Content-Type: ${s??"undefined"}, from URL: ${e}`)),o.ok&&this._jwtHandler&&(s!=null&&s.startsWith("application/jwt")))return await this._jwtHandler(await o.text());let a;try{a=await o.json()}catch(c){throw r.error("Error parsing JSON response",c),o.ok?c:new Error(`${o.statusText} (${o.status})`)}if(!o.ok)throw r.error("Error from server:",a),a.error?new tr(a):new Error(`${o.statusText} (${o.status}): ${JSON.stringify(a)}`);return a}async postForm(e,{body:t,basicAuth:n,timeoutInSeconds:r,initCredentials:i}){const o=this._logger.create("postForm"),s={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded"};n!==void 0&&(s.Authorization="Basic "+n),this.appendExtraHeaders(s);let a;try{o.debug("url:",e),a=await this.fetchWithTimeout(e,{method:"POST",headers:s,body:t,timeoutInSeconds:r,credentials:i})}catch(f){throw o.error("Network error"),f}o.debug("HTTP response received, status",a.status);const c=a.headers.get("Content-Type");if(c&&!this._contentTypes.find(f=>c.startsWith(f)))throw new Error(`Invalid response Content-Type: ${c??"undefined"}, from URL: ${e}`);const u=await a.text();let d={};if(u)try{d=JSON.parse(u)}catch(f){throw o.error("Error parsing JSON response",f),a.ok?f:new Error(`${a.statusText} (${a.status})`)}if(!a.ok)throw o.error("Error from server:",d),d.error?new tr(d,t):new Error(`${a.statusText} (${a.status}): ${JSON.stringify(d)}`);return d}appendExtraHeaders(e){const t=this._logger.create("appendExtraHeaders"),n=Object.keys(this._extraHeaders),r=["authorization","accept","content-type"];n.length!==0&&n.forEach(i=>{if(r.includes(i.toLocaleLowerCase())){t.warn("Protected header could not be overridden",i,r);return}const o=typeof this._extraHeaders[i]=="function"?this._extraHeaders[i]():this._extraHeaders[i];o&&o!==""&&(e[i]=o)})}},XS=class{constructor(e){this._settings=e,this._logger=new G("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new Uu(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){const e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);const t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},this._settings.metadataSeed,t),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){const n=this._logger.create(`_getMetadataProperty('${e}')`),r=await this.getMetadata();if(n.debug("resolved"),r[e]===void 0){if(t===!0){n.warn("Metadata does not contain optional property");return}n.throw(new Error("Metadata does not contain property "+e))}return r[e]}async getSigningKeys(){const e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;const t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);const n=await this._jsonService.getJson(t);if(e.debug("got key set",n),!Array.isArray(n.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=n.keys,this._signingKeys}},zm=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new G("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;const t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");const e=await this._store.length,t=[];for(let n=0;n{const r=this._logger.create("_getClaimsFromJwt");try{const i=Sc.decode(n);return r.debug("JWT decoding successful"),i}catch(i){throw r.error("Error parsing JWT response"),i}},this._jsonService=new Uu(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){const t=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));const n=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",n);const r=await this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials});return t.debug("got claims",r),r}},Um=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new G("TokenClient"),this._jsonService=new Uu(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:r=this._settings.client_secret,...i}){const o=this._logger.create("exchangeCode");n||o.throw(new Error("A client_id is required")),t||o.throw(new Error("A redirect_uri is required")),i.code||o.throw(new Error("A code is required"));const s=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[d,f]of Object.entries(i))f!=null&&s.set(d,f);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!r)throw o.throw(new Error("A client_secret is required")),null;a=$t.generateBasicAuth(n,r);break;case"client_secret_post":s.append("client_id",n),r&&s.append("client_secret",r);break}const c=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(c,{body:s,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:r=this._settings.scope,...i}){const o=this._logger.create("exchangeCredentials");t||o.throw(new Error("A client_id is required"));const s=new URLSearchParams({grant_type:e,scope:r});for(const[d,f]of Object.entries(i))f!=null&&s.set(d,f);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!n)throw o.throw(new Error("A client_secret is required")),null;a=$t.generateBasicAuth(t,n);break;case"client_secret_post":s.append("client_id",t),n&&s.append("client_secret",n);break}const c=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(c,{body:s,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:r,...i}){const o=this._logger.create("exchangeRefreshToken");t||o.throw(new Error("A client_id is required")),i.refresh_token||o.throw(new Error("A refresh_token is required"));const s=new URLSearchParams({grant_type:e});for(const[d,f]of Object.entries(i))f!=null&&s.set(d,f);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!n)throw o.throw(new Error("A client_secret is required")),null;a=$t.generateBasicAuth(t,n);break;case"client_secret_post":s.append("client_id",t),n&&s.append("client_secret",n);break}const c=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(c,{body:s,basicAuth:a,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async revoke(e){var t;const n=this._logger.create("revoke");e.token||n.throw(new Error("A token is required"));const r=await this._metadataService.getRevocationEndpoint(!1);n.debug(`got revocation endpoint, revoking ${(t=e.token_type_hint)!=null?t:"default token type"}`);const i=new URLSearchParams;for(const[o,s]of Object.entries(e))s!=null&&i.set(o,s);i.set("client_id",this._settings.client_id),this._settings.client_secret&&i.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(r,{body:i}),n.debug("got response")}},sj=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new G("ResponseValidator"),this._userInfoService=new oj(this._settings,this._metadataService),this._tokenClient=new Um(this._settings,this._metadataService)}async validateSigninResponse(e,t){const n=this._logger.create("validateSigninResponse");this._processSigninState(e,t),n.debug("state processed"),await this._processCode(e,t),n.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),await this._processClaims(e,t==null?void 0:t.skipUserInfo,e.isOpenId),n.debug("claims processed")}async validateCredentialsResponse(e,t){const n=this._logger.create("validateCredentialsResponse");e.isOpenId&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),await this._processClaims(e,t,e.isOpenId),n.debug("claims processed")}async validateRefreshResponse(e,t){var n,r;const i=this._logger.create("validateRefreshResponse");e.userState=t.data,(n=e.session_state)!=null||(e.session_state=t.session_state),(r=e.scope)!=null||(e.scope=t.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),i.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const o=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,o),i.debug("claims processed")}validateSignoutResponse(e,t){const n=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&n.throw(new Error("State does not match")),n.debug("state validated"),e.userState=t.data,e.error)throw n.warn("Response was error",e.error),new tr(e)}_processSigninState(e,t){var n;const r=this._logger.create("_processSigninState");if(t.id!==e.state&&r.throw(new Error("State does not match")),t.client_id||r.throw(new Error("No client_id on state")),t.authority||r.throw(new Error("No authority on state")),this._settings.authority!==t.authority&&r.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&r.throw(new Error("client_id mismatch on settings vs. signin state")),r.debug("state validated"),e.userState=t.data,(n=e.scope)!=null||(e.scope=t.scope),e.error)throw r.warn("Response was error",e.error),new tr(e);t.code_verifier&&!e.code&&r.throw(new Error("Expected code in response"))}async _processClaims(e,t=!1,n=!0){const r=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){r.debug("not loading user info");return}r.debug("loading user info");const i=await this._userInfoService.getClaims(e.access_token);r.debug("user info claims received from user info endpoint"),n&&i.sub!==e.profile.sub&&r.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(i)),r.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t){const n=this._logger.create("_processCode");if(e.code){n.debug("Validating code");const r=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,...t.extraTokenParams});Object.assign(e,r)}else n.debug("No code to process")}_validateIdTokenAttributes(e,t){var n;const r=this._logger.create("_validateIdTokenAttributes");r.debug("decoding ID Token JWT");const i=Sc.decode((n=e.id_token)!=null?n:"");if(i.sub||r.throw(new Error("ID Token is missing a subject claim")),t){const o=Sc.decode(t);o.sub!==i.sub&&r.throw(new Error("sub in id_token does not match current sub")),o.auth_time&&o.auth_time!==i.auth_time&&r.throw(new Error("auth_time in id_token does not match original auth_time")),o.azp&&o.azp!==i.azp&&r.throw(new Error("azp in id_token does not match original azp")),!o.azp&&i.azp&&r.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=i}},Hr=class{constructor(e){this.id=e.id||$t.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=wt.getEpochTime(),this.request_type=e.request_type}toStorageString(){return new G("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})}static fromStorageString(e){return G.createStatic("State","fromStorageString"),new Hr(JSON.parse(e))}static async clearStaleState(e,t){const n=G.createStatic("State","clearStaleState"),r=wt.getEpochTime()-t,i=await e.getAllKeys();n.debug("got keys",i);for(let o=0;ow.searchParams.append("resource",p));for(const[m,p]of Object.entries({response_mode:a,...C,...h}))p!=null&&w.searchParams.append(m,p.toString());this.url=w.href}},lj="openid",Xo=class{constructor(e){this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-wt.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+wt.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(lj))||!!this.id_token}},cj=class{constructor({url:e,state_data:t,id_token_hint:n,post_logout_redirect_uri:r,extraQueryParams:i,request_type:o}){if(this._logger=new G("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const s=new URL(e);n&&s.searchParams.append("id_token_hint",n),r&&(s.searchParams.append("post_logout_redirect_uri",r),t&&(this.state=new Hr({data:t,request_type:o}),s.searchParams.append("state",this.state.id)));for(const[a,c]of Object.entries({...i}))c!=null&&s.searchParams.append(a,c.toString());this.url=s.href}},uj=class{constructor(e){this.state=e.get("state"),this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},dj=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],fj=["sub","iss","aud","exp","iat"],hj=class{constructor(e){this._settings=e,this._logger=new G("ClaimsService")}filterProtocolClaims(e){const t={...e};if(this._settings.filterProtocolClaims){let n;Array.isArray(this._settings.filterProtocolClaims)?n=this._settings.filterProtocolClaims:n=dj;for(const r of n)fj.includes(r)||delete t[r]}return t}mergeClaims(e,t){const n={...e};for(const[r,i]of Object.entries(t))for(const o of Array.isArray(i)?i:[i]){const s=n[r];s?Array.isArray(s)?s.includes(o)||s.push(o):n[r]!==o&&(typeof o=="object"&&this._settings.mergeClaims?n[r]=this.mergeClaims(s,o):n[r]=[s,o]):n[r]=o}return n}},pj=class{constructor(e){this._logger=new G("OidcClient"),this.settings=new Bm(e),this.metadataService=new XS(this.settings),this._claimsService=new hj(this.settings),this._validator=new sj(this.settings,this.metadataService,this._claimsService),this._tokenClient=new Um(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:n,request_type:r,id_token_hint:i,login_hint:o,skipUserInfo:s,nonce:a,response_type:c=this.settings.response_type,scope:u=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:f=this.settings.prompt,display:g=this.settings.display,max_age:h=this.settings.max_age,ui_locales:y=this.settings.ui_locales,acr_values:_=this.settings.acr_values,resource:C=this.settings.resource,response_mode:w=this.settings.response_mode,extraQueryParams:m=this.settings.extraQueryParams,extraTokenParams:p=this.settings.extraTokenParams}){const x=this._logger.create("createSigninRequest");if(c!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const j=await this.metadataService.getAuthorizationEndpoint();x.debug("Received authorization endpoint",j);const b=new aj({url:j,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:c,scope:u,state_data:e,prompt:f,display:g,max_age:h,ui_locales:y,id_token_hint:i,login_hint:o,acr_values:_,resource:C,request:t,request_uri:n,extraQueryParams:m,extraTokenParams:p,request_type:r,response_mode:w,client_secret:this.settings.client_secret,skipUserInfo:s,nonce:a,disablePKCE:this.settings.disablePKCE});await this.clearStaleState();const k=b.state;return await this.settings.stateStore.set(k.id,k.toStorageString()),b}async readSigninResponseState(e,t=!1){const n=this._logger.create("readSigninResponseState"),r=new Xo(jc.readParams(e,this.settings.response_mode));if(!r.state)throw n.throw(new Error("No state in response")),null;const i=await this.settings.stateStore[t?"remove":"get"](r.state);if(!i)throw n.throw(new Error("No matching state found in storage")),null;return{state:$u.fromStorageString(i),response:r}}async processSigninResponse(e){const t=this._logger.create("processSigninResponse"),{state:n,response:r}=await this.readSigninResponseState(e,!0);return t.debug("received state from storage; validating response"),await this._validator.validateSigninResponse(r,n),r}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n=!1,extraTokenParams:r={}}){const i=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),o=new Xo(new URLSearchParams);return Object.assign(o,i),await this._validator.validateCredentialsResponse(o,n),o}async useRefreshToken({state:e,timeoutInSeconds:t}){var n;const r=this._logger.create("useRefreshToken");let i;if(this.settings.refreshTokenAllowedScope===void 0)i=e.scope;else{const a=this.settings.refreshTokenAllowedScope.split(" ");i=(((n=e.scope)==null?void 0:n.split(" "))||[]).filter(u=>a.includes(u)).join(" ")}const o=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,scope:i,timeoutInSeconds:t}),s=new Xo(new URLSearchParams);return Object.assign(s,o),r.debug("validating response",s),await this._validator.validateRefreshResponse(s,{...e,scope:i}),s}async createSignoutRequest({state:e,id_token_hint:t,request_type:n,post_logout_redirect_uri:r=this.settings.post_logout_redirect_uri,extraQueryParams:i=this.settings.extraQueryParams}={}){const o=this._logger.create("createSignoutRequest"),s=await this.metadataService.getEndSessionEndpoint();if(!s)throw o.throw(new Error("No end session endpoint")),null;o.debug("Received end session endpoint",s);const a=new cj({url:s,id_token_hint:t,post_logout_redirect_uri:r,state_data:e,extraQueryParams:i,request_type:n});await this.clearStaleState();const c=a.state;return c&&(o.debug("Signout request has state to persist"),await this.settings.stateStore.set(c.id,c.toStorageString())),a}async readSignoutResponseState(e,t=!1){const n=this._logger.create("readSignoutResponseState"),r=new uj(jc.readParams(e,this.settings.response_mode));if(!r.state){if(n.debug("No state in response"),r.error)throw n.warn("Response was error:",r.error),new tr(r);return{state:void 0,response:r}}const i=await this.settings.stateStore[t?"remove":"get"](r.state);if(!i)throw n.throw(new Error("No matching state found in storage")),null;return{state:Hr.fromStorageString(i),response:r}}async processSignoutResponse(e){const t=this._logger.create("processSignoutResponse"),{state:n,response:r}=await this.readSignoutResponseState(e,!0);return n?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(r,n)):t.debug("No state from storage; skipping response validation"),r}clearStaleState(){return this._logger.create("clearStaleState"),Hr.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},gj=class{constructor(e){this._userManager=e,this._logger=new G("SessionMonitor"),this._start=async t=>{const n=t.session_state;if(!n)return;const r=this._logger.create("_start");if(t.profile?(this._sub=t.profile.sub,this._sid=t.profile.sid,r.debug("session_state",n,", sub",this._sub)):(this._sub=void 0,this._sid=void 0,r.debug("session_state",n,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(n);return}try{const i=await this._userManager.metadataService.getCheckSessionIframe();if(i){r.debug("initializing check session iframe");const o=this._userManager.settings.client_id,s=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,c=new YS(this._callback,o,i,s,a);await c.load(),this._checkSessionIFrame=c,c.start(n)}else r.warn("no check session iframe found in the metadata")}catch(i){r.error("Error from getCheckSessionIframe:",i instanceof Error?i.message:i)}},this._stop=()=>{const t=this._logger.create("_stop");if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){const n=setInterval(async()=>{clearInterval(n);try{const r=await this._userManager.querySessionStatus();if(r){const i={session_state:r.session_state,profile:r.sub&&r.sid?{sub:r.sub,sid:r.sid}:null};this._start(i)}}catch(r){t.error("error from querySessionStatus",r instanceof Error?r.message:r)}},1e3)}},this._callback=async()=>{const t=this._logger.create("_callback");try{const n=await this._userManager.querySessionStatus();let r=!0;n&&this._checkSessionIFrame?n.sub===this._sub?(r=!1,this._checkSessionIFrame.start(n.session_state),n.sid===this._sid?t.debug("same sub still logged in at OP, restarting check session iframe; session_state",n.session_state):(t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",n.session_state),this._userManager.events._raiseUserSessionChanged())):t.debug("different subject signed into OP",n.sub):t.debug("subject no longer signed into OP"),r?this._sub?this._userManager.events._raiseUserSignedOut():this._userManager.events._raiseUserSignedIn():t.debug("no change in session detected, no event to raise")}catch(n){this._sub&&(t.debug("Error calling queryCurrentSigninSession; raising signed out event",n),this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(t=>{this._logger.error(t)})}async _init(){this._logger.create("_init");const e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){const t=await this._userManager.querySessionStatus();if(t){const n={session_state:t.session_state,profile:t.sub&&t.sid?{sub:t.sub,sid:t.sid}:null};this._start(n)}}}},Zo=class{constructor(t){var n;this.id_token=t.id_token,this.session_state=(n=t.session_state)!=null?n:null,this.access_token=t.access_token,this.refresh_token=t.refresh_token,this.token_type=t.token_type,this.scope=t.scope,this.profile=t.profile,this.expires_at=t.expires_at,this.state=t.userState}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-wt.getEpochTime()}set expires_in(t){t!==void 0&&(this.expires_at=Math.floor(t)+wt.getEpochTime())}get expired(){const t=this.expires_in;if(t!==void 0)return t<=0}get scopes(){var t,n;return(n=(t=this.scope)==null?void 0:t.split(" "))!=null?n:[]}toStorageString(){return new G("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(t){return G.createStatic("User","fromStorageString"),new Zo(JSON.parse(t))}},Gf="oidc-client",$m=class{constructor(){this._abort=new fn("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){const t=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);const{url:n,keepOpen:r}=await new Promise((i,o)=>{const s=a=>{var c;const u=a.data,d=(c=e.scriptOrigin)!=null?c:window.location.origin;if(!(a.origin!==d||(u==null?void 0:u.source)!==Gf)){try{const f=jc.readParams(u.url,e.response_mode).get("state");if(f||t.warn("no state found in response url"),a.source!==this._window&&f!==e.state)return}catch{this._dispose(),o(new Error("Invalid response from window"))}i(u)}};window.addEventListener("message",s,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",s,!1)),this._disposeHandlers.add(this._abort.addHandler(a=>{this._dispose(),o(a)}))});return t.debug("got response from window"),this._dispose(),r||this.close(),{url:n}}_dispose(){this._logger.create("_dispose");for(const e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,n=!1,r=window.location.origin){e.postMessage({source:Gf,url:t,keepOpen:n},r)}},Dm={location:!1,toolbar:!1,height:640},Hm="_blank",mj=60,vj=2,Wm=10,yj=class extends Bm{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=Dm,popupWindowTarget:i=Hm,redirectMethod:o="assign",redirectTarget:s="self",iframeNotifyParentOrigin:a=e.iframeNotifyParentOrigin,iframeScriptOrigin:c=e.iframeScriptOrigin,silent_redirect_uri:u=e.redirect_uri,silentRequestTimeoutInSeconds:d=Wm,automaticSilentRenew:f=!0,validateSubOnSilentRenew:g=!0,includeIdTokenInSilentRenew:h=!1,monitorSession:y=!1,monitorAnonymousSession:_=!1,checkSessionIntervalInSeconds:C=vj,query_status_response_type:w="code",stopCheckSessionOnError:m=!0,revokeTokenTypes:p=["access_token","refresh_token"],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:j=!1,accessTokenExpiringNotificationTimeInSeconds:b=mj,userStore:k}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=r,this.popupWindowTarget=i,this.redirectMethod=o,this.redirectTarget=s,this.iframeNotifyParentOrigin=a,this.iframeScriptOrigin=c,this.silent_redirect_uri=u,this.silentRequestTimeoutInSeconds=d,this.automaticSilentRenew=f,this.validateSubOnSilentRenew=g,this.includeIdTokenInSilentRenew=h,this.monitorSession=y,this.monitorAnonymousSession=_,this.checkSessionIntervalInSeconds=C,this.stopCheckSessionOnError=m,this.query_status_response_type=w,this.revokeTokenTypes=p,this.revokeTokensOnSignout=x,this.includeIdTokenInSilentSignout=j,this.accessTokenExpiringNotificationTimeInSeconds=b,k)this.userStore=k;else{const O=typeof window<"u"?window.sessionStorage:new Mm;this.userStore=new zm({store:O})}}},bc=class extends $m{constructor({silentRequestTimeoutInSeconds:e=Wm}){super(),this._logger=new G("IFrameWindow"),this._timeoutInSeconds=e,this._frame=bc.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){const e=window.document.createElement("iframe");return e.style.visibility="hidden",e.style.position="fixed",e.style.left="-1000px",e.style.top="0",e.width="0",e.height="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),window.document.body.appendChild(e),e}async navigate(e){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);const t=setTimeout(()=>this._abort.raise(new Bu("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(t)),await super.navigate(e)}close(){var e;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",t=>{var n;const r=t.target;(n=r.parentNode)==null||n.removeChild(r),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(e=this._frame.contentWindow)==null||e.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(e,t){return super._notifyParent(window.parent,e,!1,t)}},xj=class{constructor(e){this._settings=e,this._logger=new G("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new bc({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),bc.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},wj=500,Yf=class extends $m{constructor({popupWindowTarget:e=Hm,popupWindowFeatures:t={}}){super(),this._logger=new G("PopupWindow");const n=Jf.center({...Dm,...t});this._window=window.open(void 0,e,Jf.serialize(n))}async navigate(e){var t;(t=this._window)==null||t.focus();const n=setInterval(()=>{(!this._window||this._window.closed)&&this._abort.raise(new Error("Popup closed by user"))},wj);return this._disposeHandlers.add(()=>clearInterval(n)),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,t){if(!window.opener)throw new Error("No window.opener. Can't complete notification.");return super._notifyParent(window.opener,e,t)}},_j=class{constructor(e){this._settings=e,this._logger=new G("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget}){return new Yf({popupWindowFeatures:e,popupWindowTarget:t})}async callback(e,t=!1){this._logger.create("callback"),Yf.notifyOpener(e,t)}},Sj=class{constructor(e){this._settings=e,this._logger=new G("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var n;this._logger.create("prepare");let r=window.self;t==="top"&&(r=(n=window.top)!=null?n:window.self);const i=r.location[e].bind(r.location);let o;return{navigate:async s=>{this._logger.create("navigate");const a=new Promise((c,u)=>{o=u});return i(s.url),await a},close:()=>{this._logger.create("close"),o==null||o(new Error("Redirect aborted")),r.stop()}}}},jj=class extends GS{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new G("UserManagerEvents"),this._userLoaded=new fn("User loaded"),this._userUnloaded=new fn("User unloaded"),this._silentRenewError=new fn("Silent renew error"),this._userSignedIn=new fn("User signed in"),this._userSignedOut=new fn("User signed out"),this._userSessionChanged=new fn("User session changed")}load(e,t=!0){super.load(e),t&&this._userLoaded.raise(e)}unload(){super.unload(),this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}_raiseSilentRenewError(e){this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}_raiseUserSignedIn(){this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}_raiseUserSignedOut(){this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}_raiseUserSessionChanged(){this._userSessionChanged.raise()}},bj=class{constructor(e){this._userManager=e,this._logger=new G("SilentRenewService"),this._isStarted=!1,this._retryTimer=new wt("Retry Silent Renew"),this._tokenExpiring=async()=>{const t=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),t.debug("silent token renewal successful")}catch(n){if(n instanceof Bu){t.warn("ErrorTimeout from signinSilent:",n,"retry in 5s"),this._retryTimer.init(5);return}t.error("Error from signinSilent:",n),this._userManager.events._raiseSilentRenewError(n)}}}async start(){const e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},kj=class{constructor(e){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.data=e.state}},Ej=class{constructor(e){this._logger=new G("UserManager"),this.settings=new yj(e),this._client=new pj(e),this._redirectNavigator=new Sj(this.settings),this._popupNavigator=new _j(this.settings),this._iframeNavigator=new xj(this.settings),this._events=new jj(this.settings),this._silentRenewService=new bj(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new gj(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(){const e=this._logger.create("getUser"),t=await this._loadUser();return t?(e.info("user loaded"),this._events.load(t,!1),t):(e.info("user not found in storage"),null)}async removeUser(){const e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),this._events.unload()}async signinRedirect(e={}){this._logger.create("signinRedirect");const{redirectMethod:t,...n}=e,r=await this._redirectNavigator.prepare({redirectMethod:t});await this._signinStart({request_type:"si:r",...n},r)}async signinRedirectCallback(e=window.location.href){const t=this._logger.create("signinRedirectCallback"),n=await this._signinEnd(e);return n.profile&&n.profile.sub?t.info("success, signed in subject",n.profile.sub):t.info("no subject"),n}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:n=!1}){const r=this._logger.create("signinResourceOwnerCredential"),i=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});r.debug("got signin response");const o=await this._buildUser(i);return o.profile&&o.profile.sub?r.info("success, signed in subject",o.profile.sub):r.info("no subject"),o}async signinPopup(e={}){const t=this._logger.create("signinPopup"),{popupWindowFeatures:n,popupWindowTarget:r,...i}=e,o=this.settings.popup_redirect_uri;o||t.throw(new Error("No popup_redirect_uri configured"));const s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r}),a=await this._signin({request_type:"si:p",redirect_uri:o,display:"popup",...i},s);return a&&(a.profile&&a.profile.sub?t.info("success, signed in subject",a.profile.sub):t.info("no subject")),a}async signinPopupCallback(e=window.location.href,t=!1){const n=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,t),n.info("success")}async signinSilent(e={}){var t;const n=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:r,...i}=e;let o=await this._loadUser();if(o!=null&&o.refresh_token){n.debug("using refresh token");const u=new kj(o);return await this._useRefreshToken(u)}const s=this.settings.silent_redirect_uri;s||n.throw(new Error("No silent_redirect_uri configured"));let a;o&&this.settings.validateSubOnSilentRenew&&(n.debug("subject prior to silent renew:",o.profile.sub),a=o.profile.sub);const c=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});return o=await this._signin({request_type:"si:s",redirect_uri:s,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?o==null?void 0:o.id_token:void 0,...i},c,a),o&&((t=o.profile)!=null&&t.sub?n.info("success, signed in subject",o.profile.sub):n.info("no subject")),o}async _useRefreshToken(e){const t=await this._client.useRefreshToken({state:e,timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds}),n=new Zo({...e,...t});return await this.storeUser(n),this._events.load(n),n}async signinSilentCallback(e=window.location.href){const t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){const{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":return await this.signinPopupCallback(e);case"si:s":return await this.signinSilentCallback(e);default:throw new Error("invalid response_type in state")}}async signoutCallback(e=window.location.href,t=!1){const{state:n}=await this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case"so:r":await this.signoutRedirectCallback(e);break;case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async querySessionStatus(e={}){const t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.silent_redirect_uri;i||t.throw(new Error("No silent_redirect_uri configured"));const o=await this._loadUser(),s=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),a=await this._signinStart({request_type:"si:s",redirect_uri:i,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?o==null?void 0:o.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...r},s);try{const c=await this._client.processSigninResponse(a.url);return t.debug("got signin response"),c.session_state&&c.profile.sub?(t.info("success for subject",c.profile.sub),{session_state:c.session_state,sub:c.profile.sub,sid:c.profile.sid}):(t.info("success, user not authenticated"),null)}catch(c){if(this.settings.monitorAnonymousSession&&c instanceof tr)switch(c.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:c.session_state}}throw c}}async _signin(e,t,n){const r=await this._signinStart(e,t);return await this._signinEnd(r.url,n)}async _signinStart(e,t){const n=this._logger.create("_signinStart");try{const r=await this._client.createSigninRequest(e);return n.debug("got signin request"),await t.navigate({url:r.url,state:r.state.id,response_mode:r.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(r){throw n.debug("error after preparing navigator, closing navigator window"),t.close(),r}}async _signinEnd(e,t){const n=this._logger.create("_signinEnd"),r=await this._client.processSigninResponse(e);return n.debug("got signin response"),await this._buildUser(r,t)}async _buildUser(e,t){const n=this._logger.create("_buildUser"),r=new Zo(e);if(t){if(t!==r.profile.sub)throw n.debug("current user does not match user returned from signin. sub from signin:",r.profile.sub),new tr({...e,error:"login_required"});n.debug("current user matches user returned from signin")}return await this.storeUser(r),n.debug("user stored"),this._events.load(r),r}async signoutRedirect(e={}){const t=this._logger.create("signoutRedirect"),{redirectMethod:n,...r}=e,i=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},i),t.info("success")}async signoutRedirectCallback(e=window.location.href){const t=this._logger.create("signoutRedirectCallback"),n=await this._signoutEnd(e);return t.info("success"),n}async signoutPopup(e={}){const t=this._logger.create("signoutPopup"),{popupWindowFeatures:n,popupWindowTarget:r,...i}=e,o=this.settings.popup_post_logout_redirect_uri,s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r});await this._signout({request_type:"so:p",post_logout_redirect_uri:o,state:o==null?void 0:{},...i},s),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){const n=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,t),n.info("success")}async _signout(e,t){const n=await this._signoutStart(e,t);return await this._signoutEnd(n.url)}async _signoutStart(e={},t){var n;const r=this._logger.create("_signoutStart");try{const i=await this._loadUser();r.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(i);const o=e.id_token_hint||i&&i.id_token;o&&(r.debug("setting id_token_hint in signout request"),e.id_token_hint=o),await this.removeUser(),r.debug("user removed, creating signout request");const s=await this._client.createSignoutRequest(e);return r.debug("got signout request"),await t.navigate({url:s.url,state:(n=s.state)==null?void 0:n.id})}catch(i){throw r.debug("error after preparing navigator, closing navigator window"),t.close(),i}}async _signoutEnd(e){const t=this._logger.create("_signoutEnd"),n=await this._client.processSignoutResponse(e);return t.debug("got signout response"),n}async signoutSilent(e={}){var t;const n=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:r,...i}=e,o=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,s=this.settings.popup_post_logout_redirect_uri,a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});await this._signout({request_type:"so:s",post_logout_redirect_uri:s,id_token_hint:o,...i},a),n.info("success")}async signoutSilentCallback(e=window.location.href){const t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){const t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){const n=this._logger.create("_revokeInternal");if(!e)return;const r=t.filter(i=>typeof e[i]=="string");if(!r.length){n.debug("no need to revoke due to no token(s)");return}for(const i of r)await this._client.revokeToken(e[i],i),n.info(`${i} revoked successfully`),i!=="access_token"&&(e[i]=null);await this.storeUser(e),n.debug("user stored"),this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){const e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),Zo.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){const t=this._logger.create("storeUser");if(e){t.debug("storing user");const n=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey)}async clearStaleState(){await this._client.clearStaleState()}};class Du{static _checkStorageSupport(){if(this.storage_key===void 0)throw Error("This doesn't support local storage")}_getStorageKey(){return Object.getPrototypeOf(this).constructor.storage_key}_IcheckStorageSupport(){if(this._getStorageKey()===void 0)throw Error("This doesn't support local storage")}static restoreFromLocalStorage(){return _checkStorageSupport(),window.sessionStorage.getItem(this.storage_key)?new APIToken(window.sessionStorage.getItem(this.storage_key)):!1}static isCached(){return this._checkStorageSupport(),!!window.sessionStorage.getItem(this.storage_key)}saveToLocalStorage(){this._IcheckStorageSupport(),window.sessionStorage.setItem(this._getStorageKey(),JSON.stringify(this))}}Ie(Du,"storage_key");var ul;let Cj=(ul=class extends Du{constructor(n){super();Ie(this,"user");Ie(this,"key");Ie(this,"expires");Ie(this,"ip");this.user=n.user,this.key=n.key,this.expires=n.expires,this.ip=n.ip}},Ie(ul,"storage_key","pairent_api_key"),ul);const{API_ROOT:Oj,api_path:Pj}=oo,Rs=class extends Du{isLoggedIn(){return!1}constructor(t){super();for(const n in t)this[n]=t[n]}static restoreFromLocalStorage(){}static async getById(t){const n=await Pr.get(Oj+"/api/user/get",{params:{id:t}});if(n.data.error)throw new Error(n.data.error);return new Rs(n.data)}static async login(t){if(t.error!==null)throw new Error(t.error+": "+t.error_description);const n=await Pr.post(Pj("/api/auth/user/login"),t);return n.status!==200?!1:(n.data.error||(new Cj(n.data.token).saveToLocalStorage(),new Rs(n.data.user_data).saveToLocalStorage()),n.data)}};let Tr=Rs;Ie(Tr,"storage_key","pairent_user_data");const{OIDCConfig:Tj}=oo,Rj=P(LS)` font-size: 11pt; width: 250px; height: 60px; padding: 16px 20px; font-size: 11.5pt; font-weight: 700; cursor: ${e=>e.disabled?"default":"pointer"}; & svg { height: 14pt; transform: translateY(4px); margin-left: 10px; } &:hover { background: ${e=>e.disabled?"white":"royalblue"}; } `,Xf=P.p` font-size: 8pt; color: gray; margin-top: 16px; `,Nj=()=>l.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 451.5 155.9",children:l.jsx("path",{fillRule:"evenodd",d:"M408.7 0h42.8L416 102.5l-2.8 8.1c-8.2 23.9-33.9 43.6-58 45.2h-.6c-.8.1-1.6.1-2.5.1H348c-.8 0-1.6 0-2.4-.1h-43l15.7-45.2.3-.8h35.7c9.1 0 19.2-7.8 22.5-17.2l.4-1 1.2-3.5h-32.7c-4.4 0-19.5 0-13.1-18.5l4.4-12.9 3.9-11.2L356.5 0H393l-21.7 62.8H387c2.6-7.5 15.8-45.6 21.7-62.8zm-91.2 0h25.9l-15.7 45.3h-7c-9.6 0-20.1 7.9-23.5 17.4L265 155.9c-.5 0-1-.1-1.5-.1h-43l15.8-45.2 7.8-22.6 14.8-42.5c8.3-24.1 34.4-44 58.6-45.2V0zM208 0h48.7l-20.1 58.1c-3.2 9.1-9.4 15.2-19.4 17.2l16.8.1-12.3 35.2c-8.2 23.9-33.9 43.6-58 45.2h-.7c-.8.1-1.6.1-2.5.1h-4.1c-.8 0-1.6 0-2.4-.1h-43l38.2-110.4c8.4-24.1 34.4-44 58.7-45.2l.1-.2zm-12.7 40.8h15.4l-8.1 23h-23.9l4.4-12.5c1.7-4.6 7.3-10.5 12.2-10.5zm-25.6 48.8H194l-5.5 16.1c-1.1 3.4-6.1 10.8-13.6 10.8h-14.1l8.9-26.9zM96.9 0h48.7l-20.2 58.1c-3.2 9.1-9.4 15.2-19.4 17.2l16.8.1-9.3 27.1h-.2l-2.8 8.1c-8.2 23.9-33.9 43.6-58 45.2h-.6c-.8.1-1.7.1-2.5.1h-4.1c-.8 0-1.6 0-2.4-.1H0l15.7-45.2L23.6 88l14.7-42.5C46.7 21.4 72.7 1.5 97 .3V0zM84.2 40.8h15.4l-8.1 23H67.6L72 51.3c1.7-4.6 7.3-10.5 12.2-10.5zM58.6 89.6h24.3l-5.5 16.1c-1.1 3.4-6.1 10.8-13.5 10.8H49.7l8.9-26.9z",clipRule:"evenodd"})});class Aj extends bt.Component{constructor(t){super(t),this.state={loading:!1,error:JSON.parse(window.localStorage.getItem("auth_fail"))},window.localStorage.removeItem("auth_fail"),this.openid=this.openid.bind(this)}async openid(){if(this.state.loading===!0)return;this.setState({loading:!0}),Qn.setLogger(console),Qn.setLevel(Qn.NONE),new Ej(Tj).signinRedirect()}render(){return Tr.isCached()&&(window.location.href="/"),l.jsx("div",{style:{height:"65vh"},children:l.jsxs(Nm,{children:[l.jsx("h2",{children:"Вход"}),l.jsx("hr",{}),l.jsx(Rj,{onClick:this.openid,disabled:this.state.loading,children:this.state.loading?l.jsx(ao,{size:"24px",color:"#4169e1"}):l.jsxs(l.Fragment,{children:["Войти через",l.jsx(Nj,{})]})}),l.jsxs(Xf,{children:["Вход осуществляется только через",l.jsx("br",{}),"Систему Единого Входа ВВГУ"]}),this.state.error?l.jsxs(Xf,{style:{color:"darkred",fontWeight:"600"},children:["Произошла ошибка: ",this.state.error.error,this.state.error.error_description?l.jsxs(l.Fragment,{children:[l.jsx("br",{}),this.state.error.error_description]}):null]}):null]})})}}const Ij=P.div` position: relative; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 400px; text-align: center; & h2 { font-size: 1.8em; font-weight: 600; margin: 1.5em 0; } `,Lj=P.p` font-family: monospace; margin: 10px 0; width: 780px; `;class Fj extends bt.Component{constructor(t){super(t),this.response=new Xo(new URL(window.location.href).searchParams)}async componentDidMount(){if(this.response.error)return;window.localStorage.removeItem("auth_fail");let t="?";for(const r in localStorage)if(r.startsWith("oidc.")){t=JSON.parse(localStorage[r]).code_verifier,localStorage.removeItem(r);break}const n=await Tr.login({...this.response,code_verifier:t});if(n.error){window.localStorage.setItem("auth_fail",JSON.stringify(n)),window.location.href="/login";return}n.new_user?window.location.href="/register":window.location.href="/"}render(){return l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{height:"65vh"},children:l.jsxs(Ij,{children:[l.jsx("h2",{children:"Подождите пожалуйста"}),l.jsx("div",{style:{margin:"36px auto",width:"fit-content"},children:l.jsx(ao,{size:"80px",color:"#0077aa"})})]})}),this.response.error?l.jsx("div",{children:l.jsxs(Nm,{children:[l.jsx("h2",{children:"Ошибка авторизации"}),l.jsx("p",{children:this.response.error}),l.jsx(Lj,{children:this.response.error_description})]})}):null]})}}const Mj=P.button` border: 1px solid #c2c4c2; display: inline-block; padding: 12px 16px; border-radius: 14px; background: #ffffff; color: gray; box-shadow: 0 2px 1px #00000010; font-size: 12pt; float: left; & ${Y} { transform: translate(-4px, 2px) } `,zj=P.div` height: 100px; padding-top: 32px; z-index: 1; position: relative; display: flex; align-items: center; top: 0; & h2 { margin-left: 28px; font-weight: 600; padding: 0; display: inline-block; transform: translateY(4px); } & span { margin-left: 14px; font-weight: 500; font-size: 18px; line-height: 19px; } `,Bj=P.div` width: 1270px; height: 650px; background: #FFFFFF; box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.25); border-radius: 20px; margin: 27px auto; `,Uj=P(at)` padding: 30px 26px 30px 36px; `,$j=P.img` width: 256px; height: 256px; margin: 25px 0px 0px 65px; border-radius: 50%; box-shadow: 0px 0px 12px 2px rgba(0, 0, 0, 0.34); `,Dj=P.button` display: flex; align-items: center; justify-content: center; width: 192px; height: 32px; margin: 16px auto 0px; font-weight: 700; font-size: 16px; line-height: 19px; color: #FFFFFF; background: #007EFF; border-radius: 12px; `,Hj=P.p` font-weight: 700; font-size: 20px; line-height: 24px; `,Hn=P.p` font-weight: 500; font-size: 14px; line-height: 24px; `,Wj=P.input` border: 1px solid #CCCCCC; border-radius: 12px; width: ${e=>e.width}px; height: ${e=>e.height}px; padding-left: 10px; font-weight: 500; font-size: 14px; line-height: 18px; color: #000000; &::placeholder { font-weight: 500; font-size: 12px; line-height: 24px; color: #CCCCCC; } `,Zf=P.textarea` border: 1px solid #CCCCCC; border-radius: 12px; margin: 16px 0px 0px 55px; resize: none; padding: 8px; font-weight: 500; font-size: 14px; line-height: 18px; color: #000000; &::placeholder { font-weight: 500; font-size: 14px; line-height: 24px; color: #CCCCCC; } `,qj=P.div` width: calc(100% + 15px); height: 28px; padding: 0; font-size: 14px; line-height: 28px; display: inline-block; align-items: center; text-align: center; color: #FFFFFF; background: ${e=>e.background}; border-radius: 20px; `,Vj=P.button` width: 28px; height: 28px; padding: 0px; font-weight: 700; font-size: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border-radius: 70%; color: #FFFFFF; background: #D9D9D9; `,Kj=P.button` margin-top: 14px; width: auto; height: 27px; padding: 0; font-weight: 500; font-size: 14px; line-height: 17px; text-align: left; color: #007EFF; background: none; `,cr=e=>l.jsx(l.Fragment,{children:l.jsxs(at,{style:{marginTop:e.marginTop,marginLeft:19},children:[l.jsx(le,{xs:5,children:l.jsx(Hn,{children:e.title})}),l.jsx(le,{children:l.jsx(Hn,{children:e.text})})]})}),di=e=>l.jsx(l.Fragment,{children:l.jsxs(at,{style:{marginTop:e.marginTop,marginLeft:19},children:[l.jsx(le,{xs:5,children:l.jsx(Hn,{children:e.title})}),l.jsx(le,{xs:5,children:l.jsx(Wj,{width:e.width,height:e.height,placeholder:e.placeholderInput,value:e.valueInput})})]})}),cl=e=>{const t=e.list;return t.length==0?l.jsx(l.Fragment,{children:l.jsx("h1",{children:"Вы ничего не указали"})}):l.jsx(l.Fragment,{children:l.jsxs(at,{style:{marginLeft:19},children:[t.map((n,r)=>l.jsx(le,{style:{paddingLeft:0,marginRight:9,marginTop:10},children:l.jsx(qj,{background:n.color,children:n.text})},r)),e.button?l.jsx(l.Fragment,{children:l.jsx(le,{style:{paddingLeft:0,marginRight:9,marginTop:10},children:l.jsx(Vj,{children:"+"})})}):l.jsx(l.Fragment,{children:l.jsx(Kj,{children:"Изменить.."})})]})})},Qj=function(){const[e,t]=N.useState(),n=1,[r,i,o]=Xr(async u=>{const d=await Tr.getById(u);t(d),console.log(e.name)});N.useEffect(()=>{r(n)},[]);const s=[{text:"Честность",color:"#3F51B5"},{text:"Аккуратность",color:"#03BCD6"},{text:"Музыкальность",color:"#E91D65"},{text:"Общительность",color:"#03A9F4"},{text:"Дружелюбность",color:"#8CC34D"}],a=[{text:"Честность",color:"#3F51B5"},{text:"Аккуратность",color:"#03BCD6"},{text:"Музыкальность",color:"#E91D65"},{text:"Общительность",color:"#03A9F4"},{text:"Дружелюбность",color:"#8CC34D"},{text:"Мудрость",color:"#FF5923"},{text:"Адекватность",color:"#2196F4"},{text:"Щедрость",color:"#FFC308"},{text:"Вежливость",color:"#9D28B2"}],c=[{text:"Курит",color:"#94740B"},{text:"Равнодушие",color:"#D9B8B0"},{text:"Эгоист",color:"#6E3F58"},{text:"Лень",color:"#9F6844"},{text:"Лживость",color:"#AD9029"},{text:"Диструктивность",color:"#9A150C"},{text:"Токсичность",color:"#608426"}];return l.jsxs(l.Fragment,{children:[l.jsxs(zj,{children:[l.jsxs(Mj,{children:[l.jsx(Y,{src:"/images/icons/left-arrow-light.svg",width:10,height:16}),"Вернуться назад"]}),l.jsxs("h2",{children:["Личный кабинет",l.jsx("span",{children:"/ Мои данные"})]})]}),l.jsx(Bj,{children:l.jsxs(Uj,{children:[l.jsx(le,{children:l.jsxs(Dn,{children:[l.jsx(Hj,{children:"Добрый день, Александр!"}),l.jsx(Hn,{children:"Ваш статус - Студент"}),l.jsx($j,{src:"/images/avatar-test.jpg"}),l.jsxs(Dj,{children:[l.jsx(Y,{src:"/images/icons/camera.svg",width:18,height:16}),"Загрузить фото"]}),l.jsx(Zf,{rows:3,cols:30,placeholder:"Опиши себя парой предложений.."}),l.jsx(Zf,{style:{marginTop:9},rows:3,cols:30,placeholder:"Напишите сюда свои хобби.."})]})}),l.jsx(le,{children:l.jsxs(Dn,{style:{borderLeft:"1px solid #CCCCCC",height:"100%"},children:[l.jsx(cr,{marginTop:13,title:"Имя",text:"Александр"}),l.jsx(cr,{marginTop:13,title:"Фамилия",text:"Манаенков"}),l.jsx(cr,{marginTop:13,title:"Отчество",text:"Викторович"}),l.jsx(cr,{marginTop:13,title:"Дата рождения",text:"14.09.2004"}),l.jsx(cr,{marginTop:33,title:"Факультет",text:"Информационные системы (по отраслям)"}),l.jsx(cr,{marginTop:44,title:"Группа",text:"СО-ИС-20"}),l.jsx(di,{marginTop:33,title:"Телефон",width:190,height:32,placeholderInput:"Введите номер телефона"}),l.jsx(di,{marginTop:10,title:"E-mail",width:190,height:32,placeholderInput:"Введите E-mail"}),l.jsx(di,{marginTop:10,title:"Telegram",width:190,height:32,placeholderInput:"Введите Ваш телеграмм"}),l.jsx(di,{marginTop:10,title:"Discord",width:190,height:32,placeholderInput:"Введите Ваш дискорд"}),l.jsx(di,{marginTop:55,title:"Город",width:190,height:32,placeholderInput:"Введите город"})]})}),l.jsx(le,{children:l.jsxs(Dn,{style:{borderLeft:"1px solid #CCCCCC",height:"100%"},children:[l.jsx(Hn,{style:{marginLeft:19,marginTop:13},children:"Ваши личностные характеристики"}),l.jsx(cl,{list:s,button:!0}),l.jsx(Hn,{style:{marginLeft:19,marginTop:25},children:"Желаемые черты соседа"}),l.jsx(cl,{list:a}),l.jsx(Hn,{style:{marginLeft:19,marginTop:19},children:"Нежелаемые черты соседа"}),l.jsx(cl,{list:c})]})})]})})]})},Jj=Object.freeze({publicRoutes:[{path:"/",component:l.jsx(pS,{}),exact:!0},{path:"/favorites",component:l.jsx(Rf,{}),exact:!0},{path:"/comparisons",component:l.jsx(Lf,{}),exact:!0},{path:"/apartment/:id",component:l.jsx(K_,{}),exact:!0},{path:"/favorites",component:l.jsx(Rf,{}),exact:!0},{path:"/comparisons",component:l.jsx(Lf,{}),exact:!0},{path:"/tinder",component:l.jsx(IS,{}),exact:!0},{path:"/login",component:l.jsx(Aj,{}),exact:!0},{path:"/sign-in",component:l.jsx(Fj,{}),exact:!0},{path:"/psych_test",component:l.jsx(xS,{}),exact:!0},{path:"/personal_cabinet",component:l.jsx(Qj,{}),exact:!0}],privateRoutes:[]}),{publicRoutes:Gj}=Jj,Yj=()=>l.jsx(lx,{children:Gj.map(e=>l.jsx(bg,{element:e.component,path:e.path,exact:e.exact},e.path))});const Xj=function(){return l.jsxs("footer",{children:[l.jsxs("div",{className:"footerHouses",children:[l.jsxs("svg",{width:"64",height:"112",viewBox:"0 0 64 112",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("path",{d:"M0 16L31.5 0.5L64 16V112H0V16Z",fill:"#D9D9D9"}),l.jsx("rect",{x:"45",width:"8",height:"16",fill:"#D9D9D9"}),l.jsx("rect",{x:"37",y:"27",width:"16",height:"16",fill:"white"}),l.jsx("rect",{x:"10",y:"27",width:"16",height:"16",fill:"white"}),l.jsx("rect",{x:"37",y:"79",width:"16",height:"16",fill:"white"}),l.jsx("rect",{x:"10",y:"79",width:"16",height:"16",fill:"white"}),l.jsx("rect",{x:"37",y:"53",width:"16",height:"16",fill:"white"}),l.jsx("rect",{x:"10",y:"53",width:"16",height:"16",fill:"white"})]}),l.jsxs("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l.jsx("rect",{width:"64",height:"64",fill:"#D9D9D9"}),l.jsx("rect",{x:"38",y:"38",width:"16",height:"16",fill:"white"}),l.jsx("rect",{x:"11",y:"38",width:"16",height:"16",fill:"white"}),l.jsx("rect",{x:"38",y:"12",width:"16",height:"16",fill:"white"}),l.jsx("rect",{x:"11",y:"12",width:"16",height:"16",fill:"white"})]})]}),l.jsx("div",{className:"footerBlock"})]})};function Zj(){return l.jsxs(l.Fragment,{children:[l.jsxs(hx,{children:[l.jsx(k1,{}),l.jsxs("main",{children:[l.jsx("div",{className:"horizontalLine"}),l.jsx(Yj,{})]})]}),l.jsx(Xj,{})]})}const eb=dl.createRoot(document.getElementById("root"));eb.render(l.jsx(Zj,{}));