(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))o(m);new MutationObserver(m=>{for(const y of m)if(y.type==="childList")for(const O of y.addedNodes)O.tagName==="LINK"&&O.rel==="modulepreload"&&o(O)}).observe(document,{childList:!0,subtree:!0});function u(m){const y={};return m.integrity&&(y.integrity=m.integrity),m.referrerPolicy&&(y.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?y.credentials="include":m.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function o(m){if(m.ep)return;m.ep=!0;const y=u(m);fetch(m.href,y)}})();var Eu={exports:{}},Un={};var eh;function dg(){if(eh)return Un;eh=1;var d=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function u(o,m,y){var O=null;if(y!==void 0&&(O=""+y),m.key!==void 0&&(O=""+m.key),"key"in m){y={};for(var G in m)G!=="key"&&(y[G]=m[G])}else y=m;return m=y.ref,{$$typeof:d,type:o,key:O,ref:m!==void 0?m:null,props:y}}return Un.Fragment=c,Un.jsx=u,Un.jsxs=u,Un}var th;function fg(){return th||(th=1,Eu.exports=dg()),Eu.exports}var s=fg(),Cu={exports:{}},ne={};var ah;function hg(){if(ah)return ne;ah=1;var d=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),O=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),N=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),q=Symbol.iterator;function Z(h){return h===null||typeof h!="object"?null:(h=q&&h[q]||h["@@iterator"],typeof h=="function"?h:null)}var ae={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,fe={};function ge(h,S,C){this.props=h,this.context=S,this.refs=fe,this.updater=C||ae}ge.prototype.isReactComponent={},ge.prototype.setState=function(h,S){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,S,"setState")},ge.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function je(){}je.prototype=ge.prototype;function ie(h,S,C){this.props=h,this.context=S,this.refs=fe,this.updater=C||ae}var re=ie.prototype=new je;re.constructor=ie,Y(re,ge.prototype),re.isPureReactComponent=!0;var de=Array.isArray;function K(){}var M={H:null,A:null,T:null,S:null},ye=Object.prototype.hasOwnProperty;function Ae(h,S,C){var B=C.ref;return{$$typeof:d,type:h,key:S,ref:B!==void 0?B:null,props:C}}function ze(h,S){return Ae(h.type,S,h.props)}function R(h){return typeof h=="object"&&h!==null&&h.$$typeof===d}function Q(h){var S={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(C){return S[C]})}var le=/\/+/g;function I(h,S){return typeof h=="object"&&h!==null&&h.key!=null?Q(""+h.key):S.toString(36)}function oe(h){switch(h.status){case"fulfilled":return h.value;case"rejected":throw h.reason;default:switch(typeof h.status=="string"?h.then(K,K):(h.status="pending",h.then(function(S){h.status==="pending"&&(h.status="fulfilled",h.value=S)},function(S){h.status==="pending"&&(h.status="rejected",h.reason=S)})),h.status){case"fulfilled":return h.value;case"rejected":throw h.reason}}throw h}function _(h,S,C,B,te){var ee=typeof h;(ee==="undefined"||ee==="boolean")&&(h=null);var _e=!1;if(h===null)_e=!0;else switch(ee){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(h.$$typeof){case d:case c:_e=!0;break;case V:return _e=h._init,_(_e(h._payload),S,C,B,te)}}if(_e)return te=te(h),_e=B===""?"."+I(h,0):B,de(te)?(C="",_e!=null&&(C=_e.replace(le,"$&/")+"/"),_(te,S,C,"",function(Vl){return Vl})):te!=null&&(R(te)&&(te=ze(te,C+(te.key==null||h&&h.key===te.key?"":(""+te.key).replace(le,"$&/")+"/")+_e)),S.push(te)),1;_e=0;var at=B===""?".":B+":";if(de(h))for(var Ve=0;Ve>>1,ce=_[$];if(0>>1;$m(C,U))Bm(te,C)?(_[$]=te,_[B]=U,$=B):(_[$]=C,_[S]=U,$=S);else if(Bm(te,U))_[$]=te,_[B]=U,$=B;else break e}}return H}function m(_,H){var U=_.sortIndex-H.sortIndex;return U!==0?U:_.id-H.id}if(d.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;d.unstable_now=function(){return y.now()}}else{var O=Date,G=O.now();d.unstable_now=function(){return O.now()-G}}var w=[],N=[],V=1,z=null,q=3,Z=!1,ae=!1,Y=!1,fe=!1,ge=typeof setTimeout=="function"?setTimeout:null,je=typeof clearTimeout=="function"?clearTimeout:null,ie=typeof setImmediate<"u"?setImmediate:null;function re(_){for(var H=u(N);H!==null;){if(H.callback===null)o(N);else if(H.startTime<=_)o(N),H.sortIndex=H.expirationTime,c(w,H);else break;H=u(N)}}function de(_){if(Y=!1,re(_),!ae)if(u(w)!==null)ae=!0,K||(K=!0,Q());else{var H=u(N);H!==null&&oe(de,H.startTime-_)}}var K=!1,M=-1,ye=5,Ae=-1;function ze(){return fe?!0:!(d.unstable_now()-Ae_&&ze());){var $=z.callback;if(typeof $=="function"){z.callback=null,q=z.priorityLevel;var ce=$(z.expirationTime<=_);if(_=d.unstable_now(),typeof ce=="function"){z.callback=ce,re(_),H=!0;break t}z===u(w)&&o(w),re(_)}else o(w);z=u(w)}if(z!==null)H=!0;else{var h=u(N);h!==null&&oe(de,h.startTime-_),H=!1}}break e}finally{z=null,q=U,Z=!1}H=void 0}}finally{H?Q():K=!1}}}var Q;if(typeof ie=="function")Q=function(){ie(R)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,I=le.port2;le.port1.onmessage=R,Q=function(){I.postMessage(null)}}else Q=function(){ge(R,0)};function oe(_,H){M=ge(function(){_(d.unstable_now())},H)}d.unstable_IdlePriority=5,d.unstable_ImmediatePriority=1,d.unstable_LowPriority=4,d.unstable_NormalPriority=3,d.unstable_Profiling=null,d.unstable_UserBlockingPriority=2,d.unstable_cancelCallback=function(_){_.callback=null},d.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ye=0<_?Math.floor(1e3/_):5},d.unstable_getCurrentPriorityLevel=function(){return q},d.unstable_next=function(_){switch(q){case 1:case 2:case 3:var H=3;break;default:H=q}var U=q;q=H;try{return _()}finally{q=U}},d.unstable_requestPaint=function(){fe=!0},d.unstable_runWithPriority=function(_,H){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var U=q;q=_;try{return H()}finally{q=U}},d.unstable_scheduleCallback=function(_,H,U){var $=d.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0$?(_.sortIndex=U,c(N,_),u(w)===null&&_===u(N)&&(Y?(je(M),M=-1):Y=!0,oe(de,U-$))):(_.sortIndex=ce,c(w,_),ae||Z||(ae=!0,K||(K=!0,Q()))),_},d.unstable_shouldYield=ze,d.unstable_wrapCallback=function(_){var H=q;return function(){var U=q;q=H;try{return _.apply(this,arguments)}finally{q=U}}}})(wu)),wu}var ih;function gg(){return ih||(ih=1,Ou.exports=mg()),Ou.exports}var Lu={exports:{}},tt={};var sh;function vg(){if(sh)return tt;sh=1;var d=Zu();function c(w){var N="https://react.dev/errors/"+w;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d)}catch(c){console.error(c)}}return d(),Lu.exports=vg(),Lu.exports}var uh;function yg(){if(uh)return On;uh=1;var d=gg(),c=Zu(),u=pg();function o(e){var t="https://react.dev/errors/"+e;if(1ce||(e.current=$[ce],$[ce]=null,ce--)}function C(e,t){ce++,$[ce]=e.current,e.current=t}var B=h(null),te=h(null),ee=h(null),_e=h(null);function at(e,t){switch(C(ee,t),C(te,e),C(B,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Nf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Nf(t),e=Af(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}S(B),C(B,e)}function Ve(){S(B),S(te),S(ee)}function Vl(e){e.memoizedState!==null&&C(_e,e);var t=B.current,a=Af(t,e.type);t!==a&&(C(te,e),C(B,a))}function Bn(e){te.current===e&&(S(B),S(te)),_e.current===e&&(S(_e),Dn._currentValue=U)}var hs,$u;function Da(e){if(hs===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);hs=t&&t[1]||"",$u=-1)":-1n||g[l]!==j[n]){var T=` `+g[l].replace(" at new "," at ");return e.displayName&&T.includes("")&&(T=T.replace("",e.displayName)),T}while(1<=l&&0<=n);break}}}finally{ms=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Da(a):""}function Yh(e,t){switch(e.tag){case 26:case 27:case 5:return Da(e.type);case 16:return Da("Lazy");case 13:return e.child!==t&&t!==null?Da("Suspense Fallback"):Da("Suspense");case 19:return Da("SuspenseList");case 0:case 15:return gs(e.type,!1);case 11:return gs(e.type.render,!1);case 1:return gs(e.type,!0);case 31:return Da("Activity");default:return""}}function Iu(e){try{var t="",a=null;do t+=Yh(e,a),a=e,e=e.return;while(e);return t}catch(l){return` Error generating stack: `+l.message+` `+l.stack}}var vs=Object.prototype.hasOwnProperty,ps=d.unstable_scheduleCallback,ys=d.unstable_cancelCallback,Qh=d.unstable_shouldYield,Gh=d.unstable_requestPaint,dt=d.unstable_now,Jh=d.unstable_getCurrentPriorityLevel,Pu=d.unstable_ImmediatePriority,er=d.unstable_UserBlockingPriority,Yn=d.unstable_NormalPriority,Xh=d.unstable_LowPriority,tr=d.unstable_IdlePriority,Zh=d.log,Kh=d.unstable_setDisableYieldValue,ql=null,ft=null;function la(e){if(typeof Zh=="function"&&Kh(e),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(ql,e)}catch{}}var ht=Math.clz32?Math.clz32:$h,Wh=Math.log,Fh=Math.LN2;function $h(e){return e>>>=0,e===0?32:31-(Wh(e)/Fh|0)|0}var Qn=256,Gn=262144,Jn=4194304;function Ma(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xn(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var n=0,i=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var f=l&134217727;return f!==0?(l=f&~i,l!==0?n=Ma(l):(r&=f,r!==0?n=Ma(r):a||(a=f&~e,a!==0&&(n=Ma(a))))):(f=l&~i,f!==0?n=Ma(f):r!==0?n=Ma(r):a||(a=l&~e,a!==0&&(n=Ma(a)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:n}function Bl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ih(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ar(){var e=Jn;return Jn<<=1,(Jn&62914560)===0&&(Jn=4194304),e}function bs(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Yl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ph(e,t,a,l,n,i){var r=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var f=e.entanglements,g=e.expirationTimes,j=e.hiddenUpdates;for(a=r&~a;0"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var im=/[\n"\\]/g;function xt(e){return e.replace(im,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function _s(e,t,a,l,n,i,r,f){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+St(t)):e.value!==""+St(t)&&(e.value=""+St(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?ks(e,r,St(t)):a!=null?ks(e,r,St(a)):l!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.name=""+St(f):e.removeAttribute("name")}function gr(e,t,a,l,n,i,r,f){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){As(e);return}a=a!=null?""+St(a):"",t=t!=null?""+St(t):a,f||t===e.value||(e.value=t),e.defaultValue=t}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=f?e.checked:!!l,e.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),As(e)}function ks(e,t,a){t==="number"&&Wn(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function el(e,t,a,l){if(e=e.options,t){t={};for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Es=!1;if(Bt)try{var Xl={};Object.defineProperty(Xl,"passive",{get:function(){Es=!0}}),window.addEventListener("test",Xl,Xl),window.removeEventListener("test",Xl,Xl)}catch{Es=!1}var ia=null,Cs=null,$n=null;function xr(){if($n)return $n;var e,t=Cs,a=t.length,l,n="value"in ia?ia.value:ia.textContent,i=n.length;for(e=0;e=Wl),zr=" ",Dr=!1;function Mr(e,t){switch(e){case"keyup":return Um.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Er(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nl=!1;function wm(e,t){switch(e){case"compositionend":return Er(t);case"keypress":return t.which!==32?null:(Dr=!0,zr);case"textInput":return e=t.data,e===zr&&Dr?null:e;default:return null}}function Lm(e,t){if(nl)return e==="compositionend"||!Rs&&Mr(e,t)?(e=xr(),$n=Cs=ia=null,nl=!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:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Vr(a)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wn(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Wn(e.document)}return t}function qs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Gm=Bt&&"documentMode"in document&&11>=document.documentMode,il=null,Bs=null,Pl=null,Ys=!1;function Qr(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ys||il==null||il!==Wn(l)||(l=il,"selectionStart"in l&&qs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Pl&&Il(Pl,l)||(Pl=l,l=Gi(Bs,"onSelect"),0>=r,n-=r,wt=1<<32-ht(t)+n|a<ue?(pe=X,X=null):pe=X.sibling;var xe=x(p,X,b[ue],D);if(xe===null){X===null&&(X=pe);break}e&&X&&xe.alternate===null&&t(p,X),v=i(xe,v,ue),Se===null?F=xe:Se.sibling=xe,Se=xe,X=pe}if(ue===b.length)return a(p,X),be&&Qt(p,ue),F;if(X===null){for(;ueue?(pe=X,X=null):pe=X.sibling;var Ta=x(p,X,xe.value,D);if(Ta===null){X===null&&(X=pe);break}e&&X&&Ta.alternate===null&&t(p,X),v=i(Ta,v,ue),Se===null?F=Ta:Se.sibling=Ta,Se=Ta,X=pe}if(xe.done)return a(p,X),be&&Qt(p,ue),F;if(X===null){for(;!xe.done;ue++,xe=b.next())xe=E(p,xe.value,D),xe!==null&&(v=i(xe,v,ue),Se===null?F=xe:Se.sibling=xe,Se=xe);return be&&Qt(p,ue),F}for(X=l(X);!xe.done;ue++,xe=b.next())xe=A(X,p,ue,xe.value,D),xe!==null&&(e&&xe.alternate!==null&&X.delete(xe.key===null?ue:xe.key),v=i(xe,v,ue),Se===null?F=xe:Se.sibling=xe,Se=xe);return e&&X.forEach(function(og){return t(p,og)}),be&&Qt(p,ue),F}function Ee(p,v,b,D){if(typeof b=="object"&&b!==null&&b.type===Y&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Z:e:{for(var F=b.key;v!==null;){if(v.key===F){if(F=b.type,F===Y){if(v.tag===7){a(p,v.sibling),D=n(v,b.props.children),D.return=p,p=D;break e}}else if(v.elementType===F||typeof F=="object"&&F!==null&&F.$$typeof===ye&&Ba(F)===v.type){a(p,v.sibling),D=n(v,b.props),sn(D,b),D.return=p,p=D;break e}a(p,v);break}else t(p,v);v=v.sibling}b.type===Y?(D=La(b.props.children,p.mode,D,b.key),D.return=p,p=D):(D=ci(b.type,b.key,b.props,null,p.mode,D),sn(D,b),D.return=p,p=D)}return r(p);case ae:e:{for(F=b.key;v!==null;){if(v.key===F)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){a(p,v.sibling),D=n(v,b.children||[]),D.return=p,p=D;break e}else{a(p,v);break}else t(p,v);v=v.sibling}D=Ws(b,p.mode,D),D.return=p,p=D}return r(p);case ye:return b=Ba(b),Ee(p,v,b,D)}if(oe(b))return J(p,v,b,D);if(Q(b)){if(F=Q(b),typeof F!="function")throw Error(o(150));return b=F.call(b),P(p,v,b,D)}if(typeof b.then=="function")return Ee(p,v,mi(b),D);if(b.$$typeof===ie)return Ee(p,v,oi(p,b),D);gi(p,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,v!==null&&v.tag===6?(a(p,v.sibling),D=n(v,b),D.return=p,p=D):(a(p,v),D=Ks(b,p.mode,D),D.return=p,p=D),r(p)):a(p,v)}return function(p,v,b,D){try{nn=0;var F=Ee(p,v,b,D);return vl=null,F}catch(X){if(X===gl||X===fi)throw X;var Se=gt(29,X,null,p.mode);return Se.lanes=D,Se.return=p,Se}}}var Qa=ho(!0),mo=ho(!1),oa=!1;function cc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function da(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fa(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&2)!==0){var n=l.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),l.pending=t,t=si(e),Fr(e,null,a),t}return ii(e,l,t,a),si(e)}function cn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,nr(e,a)}}function rc(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var n=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var r={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?n=i=r:i=i.next=r,a=a.next}while(a!==null);i===null?n=i=t:i=i.next=t}else n=i=t;a={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var oc=!1;function un(){if(oc){var e=ml;if(e!==null)throw e}}function rn(e,t,a,l){oc=!1;var n=e.updateQueue;oa=!1;var i=n.firstBaseUpdate,r=n.lastBaseUpdate,f=n.shared.pending;if(f!==null){n.shared.pending=null;var g=f,j=g.next;g.next=null,r===null?i=j:r.next=j,r=g;var T=e.alternate;T!==null&&(T=T.updateQueue,f=T.lastBaseUpdate,f!==r&&(f===null?T.firstBaseUpdate=j:f.next=j,T.lastBaseUpdate=g))}if(i!==null){var E=n.baseState;r=0,T=j=g=null,f=i;do{var x=f.lane&-536870913,A=x!==f.lane;if(A?(ve&x)===x:(l&x)===x){x!==0&&x===hl&&(oc=!0),T!==null&&(T=T.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});e:{var J=e,P=f;x=t;var Ee=a;switch(P.tag){case 1:if(J=P.payload,typeof J=="function"){E=J.call(Ee,E,x);break e}E=J;break e;case 3:J.flags=J.flags&-65537|128;case 0:if(J=P.payload,x=typeof J=="function"?J.call(Ee,E,x):J,x==null)break e;E=z({},E,x);break e;case 2:oa=!0}}x=f.callback,x!==null&&(e.flags|=64,A&&(e.flags|=8192),A=n.callbacks,A===null?n.callbacks=[x]:A.push(x))}else A={lane:x,tag:f.tag,payload:f.payload,callback:f.callback,next:null},T===null?(j=T=A,g=E):T=T.next=A,r|=x;if(f=f.next,f===null){if(f=n.shared.pending,f===null)break;A=f,f=A.next,A.next=null,n.lastBaseUpdate=A,n.shared.pending=null}}while(!0);T===null&&(g=E),n.baseState=g,n.firstBaseUpdate=j,n.lastBaseUpdate=T,i===null&&(n.shared.lanes=0),pa|=r,e.lanes=r,e.memoizedState=E}}function go(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function vo(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;ei?i:8;var r=_.T,f={};_.T=f,Dc(e,!1,t,a);try{var g=n(),j=_.S;if(j!==null&&j(f,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var T=Pm(g,l);fn(e,t,T,jt(e))}else fn(e,t,l,jt(e))}catch(E){fn(e,t,{then:function(){},status:"rejected",reason:E},jt())}finally{H.p=i,r!==null&&f.types!==null&&(r.types=f.types),_.T=r}}function i1(){}function Tc(e,t,a,l){if(e.tag!==5)throw Error(o(476));var n=Ko(e).queue;Zo(e,n,t,U,a===null?i1:function(){return Wo(e),a(l)})}function Ko(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:U},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zt,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wo(e){var t=Ko(e);t.next===null&&(t=e.alternate.memoizedState),fn(e,t.next.queue,{},jt())}function zc(){return Ie(Dn)}function Fo(){return Be().memoizedState}function $o(){return Be().memoizedState}function s1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=jt();e=da(a);var l=fa(t,e,a);l!==null&&(ot(l,t,a),cn(l,t,a)),t={cache:lc()},e.payload=t;return}t=t.return}}function c1(e,t,a){var l=jt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},_i(e)?Po(t,a):(a=Xs(e,t,a,l),a!==null&&(ot(a,e,l),ed(a,t,l)))}function Io(e,t,a){var l=jt();fn(e,t,a,l)}function fn(e,t,a,l){var n={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(_i(e))Po(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var r=t.lastRenderedState,f=i(r,a);if(n.hasEagerState=!0,n.eagerState=f,mt(f,r))return ii(e,t,n,0),Ce===null&&ni(),!1}catch{}if(a=Xs(e,t,n,l),a!==null)return ot(a,e,l),ed(a,t,l),!0}return!1}function Dc(e,t,a,l){if(l={lane:2,revertLane:cu(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},_i(e)){if(t)throw Error(o(479))}else t=Xs(e,a,l,2),t!==null&&ot(t,e,2)}function _i(e){var t=e.alternate;return e===se||t!==null&&t===se}function Po(e,t){yl=yi=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function ed(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,nr(e,a)}}var hn={readContext:Ie,use:Si,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useInsertionEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useSyncExternalStore:Le,useId:Le,useHostTransitionStatus:Le,useFormState:Le,useActionState:Le,useOptimistic:Le,useMemoCache:Le,useCacheRefresh:Le};hn.useEffectEvent=Le;var td={readContext:Ie,use:Si,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Ie,useEffect:Ho,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,Ni(4194308,4,Yo.bind(null,t,e),a)},useLayoutEffect:function(e,t){return Ni(4194308,4,e,t)},useInsertionEffect:function(e,t){Ni(4,2,e,t)},useMemo:function(e,t){var a=lt();t=t===void 0?null:t;var l=e();if(Ga){la(!0);try{e()}finally{la(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=lt();if(a!==void 0){var n=a(t);if(Ga){la(!0);try{a(t)}finally{la(!1)}}}else n=t;return l.memoizedState=l.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=c1.bind(null,se,e),[l.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=xc(e);var t=e.queue,a=Io.bind(null,se,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:_c,useDeferredValue:function(e,t){var a=lt();return kc(a,e,t)},useTransition:function(){var e=xc(!1);return e=Zo.bind(null,se,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=se,n=lt();if(be){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),Ce===null)throw Error(o(349));(ve&127)!==0||xo(l,t,a)}n.memoizedState=a;var i={value:a,getSnapshot:t};return n.queue=i,Ho(Ao.bind(null,l,i,e),[e]),l.flags|=2048,jl(9,{destroy:void 0},No.bind(null,l,i,a,t),null),a},useId:function(){var e=lt(),t=Ce.identifierPrefix;if(be){var a=Lt,l=wt;a=(l&~(1<<32-ht(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=bi++,0<\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?r.createElement(n,{is:l.is}):r.createElement(n)}}i[Fe]=t,i[nt]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)i.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=i;e:switch(et(i,n,l),n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Wt(t)}}return Oe(t),Qc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Wt(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(o(166));if(e=ee.current,dl(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,n=$e,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}e[Fe]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Sf(e.nodeValue,a)),e||ua(t,!0)}else e=Ji(e).createTextNode(l),e[Fe]=t,t.stateNode=e}return Oe(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=dl(t),a!==null){if(e===null){if(!l)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Fe]=t}else Ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),e=!1}else a=Ps(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(pt(t),t):(pt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Oe(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=dl(t),l!==null&&l.dehydrated!==null){if(e===null){if(!n)throw Error(o(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(o(317));n[Fe]=t}else Ra(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Oe(t),n=!1}else n=Ps(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(pt(t),t):(pt(t),null)}return pt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==n&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Mi(t,t.updateQueue),Oe(t),null);case 4:return Ve(),e===null&&du(t.stateNode.containerInfo),Oe(t),null;case 10:return Jt(t.type),Oe(t),null;case 19:if(S(qe),l=t.memoizedState,l===null)return Oe(t),null;if(n=(t.flags&128)!==0,i=l.rendering,i===null)if(n)gn(l,!1);else{if(Re!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=pi(e),i!==null){for(t.flags|=128,gn(l,!1),e=i.updateQueue,t.updateQueue=e,Mi(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)$r(a,e),a=a.sibling;return C(qe,qe.current&1|2),be&&Qt(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&dt()>wi&&(t.flags|=128,n=!0,gn(l,!1),t.lanes=4194304)}else{if(!n)if(e=pi(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,Mi(t,e),gn(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!be)return Oe(t),null}else 2*dt()-l.renderingStartTime>wi&&a!==536870912&&(t.flags|=128,n=!0,gn(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=dt(),e.sibling=null,a=qe.current,C(qe,n?a&1|2:a&1),be&&Qt(t,l.treeForkCount),e):(Oe(t),null);case 22:case 23:return pt(t),fc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),a=t.updateQueue,a!==null&&Mi(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&S(qa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Jt(Ye),Oe(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function f1(e,t){switch($s(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jt(Ye),Ve(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Bn(t),null;case 31:if(t.memoizedState!==null){if(pt(t),t.alternate===null)throw Error(o(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(pt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ra()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return S(qe),null;case 4:return Ve(),null;case 10:return Jt(t.type),null;case 22:case 23:return pt(t),fc(),e!==null&&S(qa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jt(Ye),null;case 25:return null;default:return null}}function _d(e,t){switch($s(t),t.tag){case 3:Jt(Ye),Ve();break;case 26:case 27:case 5:Bn(t);break;case 4:Ve();break;case 31:t.memoizedState!==null&&pt(t);break;case 13:pt(t);break;case 19:S(qe);break;case 10:Jt(t.type);break;case 22:case 23:pt(t),fc(),e!==null&&S(qa);break;case 24:Jt(Ye)}}function vn(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var n=l.next;a=n;do{if((a.tag&e)===e){l=void 0;var i=a.create,r=a.inst;l=i(),r.destroy=l}a=a.next}while(a!==n)}}catch(f){Te(t,t.return,f)}}function ga(e,t,a){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&e)===e){var r=l.inst,f=r.destroy;if(f!==void 0){r.destroy=void 0,n=t;var g=a,j=f;try{j()}catch(T){Te(n,g,T)}}}l=l.next}while(l!==i)}}catch(T){Te(t,t.return,T)}}function kd(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{vo(t,a)}catch(l){Te(e,e.return,l)}}}function Td(e,t,a){a.props=Ja(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Te(e,t,l)}}function pn(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(n){Te(e,t,n)}}function Rt(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(n){Te(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){Te(e,t,n)}else a.current=null}function zd(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(n){Te(e,e.return,n)}}function Gc(e,t,a){try{var l=e.stateNode;O1(l,e.type,a,t),l[nt]=t}catch(n){Te(e,e.return,n)}}function Dd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&xa(e.type)||e.tag===4}function Jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&xa(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=qt));else if(l!==4&&(l===27&&xa(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,a),e=e.sibling;e!==null;)Xc(e,t,a),e=e.sibling}function Ei(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&xa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Ei(e,t,a),e=e.sibling;e!==null;)Ei(e,t,a),e=e.sibling}function Md(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);et(t,l,a),t[Fe]=e,t[nt]=a}catch(i){Te(e,e.return,i)}}var Ft=!1,Je=!1,Zc=!1,Ed=typeof WeakSet=="function"?WeakSet:Set,We=null;function h1(e,t){if(e=e.containerInfo,mu=Ii,e=Yr(e),qs(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var n=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var r=0,f=-1,g=-1,j=0,T=0,E=e,x=null;t:for(;;){for(var A;E!==a||n!==0&&E.nodeType!==3||(f=r+n),E!==i||l!==0&&E.nodeType!==3||(g=r+l),E.nodeType===3&&(r+=E.nodeValue.length),(A=E.firstChild)!==null;)x=E,E=A;for(;;){if(E===e)break t;if(x===a&&++j===n&&(f=r),x===i&&++T===l&&(g=r),(A=E.nextSibling)!==null)break;E=x,x=E.parentNode}E=A}a=f===-1||g===-1?null:{start:f,end:g}}else a=null}a=a||{start:0,end:0}}else a=null;for(gu={focusedElem:e,selectionRange:a},Ii=!1,We=t;We!==null;)if(t=We,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,We=e;else for(;We!==null;){switch(t=We,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a title"))),et(i,l,a),i[Fe]=e,Ke(i),l=i;break e;case"link":var r=Hf("link","href",n).get(l+(a.href||""));if(r){for(var f=0;fEe&&(r=Ee,Ee=P,P=r);var p=qr(f,P),v=qr(f,Ee);if(p&&v&&(A.rangeCount!==1||A.anchorNode!==p.node||A.anchorOffset!==p.offset||A.focusNode!==v.node||A.focusOffset!==v.offset)){var b=E.createRange();b.setStart(p.node,p.offset),A.removeAllRanges(),P>Ee?(A.addRange(b),A.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),A.addRange(b))}}}}for(E=[],A=f;A=A.parentNode;)A.nodeType===1&&E.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;fa?32:a,_.T=null,a=eu,eu=null;var i=ba,r=ta;if(Ze=0,_l=ba=null,ta=0,(Ne&6)!==0)throw Error(o(331));var f=Ne;if(Ne|=4,Yd(i.current),Vd(i,i.current,r,a),Ne=f,Nn(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(ql,i)}catch{}return!0}finally{H.p=n,_.T=l,cf(e,t)}}function rf(e,t,a){t=At(a,t),t=Uc(e.stateNode,t,2),e=fa(e,t,2),e!==null&&(Yl(e,2),Ht(e))}function Te(e,t,a){if(e.tag===3)rf(e,e,a);else for(;t!==null;){if(t.tag===3){rf(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ya===null||!ya.has(l))){e=At(a,e),a=rd(2),l=fa(t,a,2),l!==null&&(od(a,l,t,e),Yl(l,2),Ht(l));break}}t=t.return}}function nu(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new v1;var n=new Set;l.set(t,n)}else n=l.get(t),n===void 0&&(n=new Set,l.set(t,n));n.has(a)||(Fc=!0,n.add(a),e=S1.bind(null,e,t,a),t.then(e,e))}function S1(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ce===e&&(ve&a)===a&&(Re===4||Re===3&&(ve&62914560)===ve&&300>dt()-Oi?(Ne&2)===0&&kl(e,0):$c|=a,Al===ve&&(Al=0)),Ht(e)}function of(e,t){t===0&&(t=ar()),e=wa(e,t),e!==null&&(Yl(e,t),Ht(e))}function x1(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),of(e,a)}function N1(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(o(314))}l!==null&&l.delete(t),of(e,a)}function A1(e,t){return ps(e,t)}var Bi=null,zl=null,iu=!1,Yi=!1,su=!1,Sa=0;function Ht(e){e!==zl&&e.next===null&&(zl===null?Bi=zl=e:zl=zl.next=e),Yi=!0,iu||(iu=!0,k1())}function Nn(e,t){if(!su&&Yi){su=!0;do for(var a=!1,l=Bi;l!==null;){if(e!==0){var n=l.pendingLanes;if(n===0)var i=0;else{var r=l.suspendedLanes,f=l.pingedLanes;i=(1<<31-ht(42|e)+1)-1,i&=n&~(r&~f),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,mf(l,i))}else i=ve,i=Xn(l,l===Ce?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Bl(l,i)||(a=!0,mf(l,i));l=l.next}while(a);su=!1}}function _1(){df()}function df(){Yi=iu=!1;var e=0;Sa!==0&&L1()&&(e=Sa);for(var t=dt(),a=null,l=Bi;l!==null;){var n=l.next,i=ff(l,t);i===0?(l.next=null,a===null?Bi=n:a.next=n,n===null&&(zl=a)):(a=l,(e!==0||(i&3)!==0)&&(Yi=!0)),l=n}Ze!==0&&Ze!==5||Nn(e),Sa!==0&&(Sa=0)}function ff(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0f)break;var T=g.transferSize,E=g.initiatorType;T&&xf(E)&&(g=g.responseEnd,r+=T*(g"u"?null:document;function Of(e,t,a){var l=Dl;if(l&&typeof t=="string"&&t){var n=xt(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),Uf.has(n)||(Uf.add(n),e={rel:e,crossOrigin:a,href:t},l.querySelector(n)===null&&(t=l.createElement("link"),et(t,"link",e),Ke(t),l.head.appendChild(t)))}}function J1(e){aa.D(e),Of("dns-prefetch",e,null)}function X1(e,t){aa.C(e,t),Of("preconnect",e,t)}function Z1(e,t,a){aa.L(e,t,a);var l=Dl;if(l&&e&&t){var n='link[rel="preload"][as="'+xt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+xt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+xt(a.imageSizes)+'"]')):n+='[href="'+xt(e)+'"]';var i=n;switch(t){case"style":i=Ml(e);break;case"script":i=El(e)}Mt.has(i)||(e=z({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Mt.set(i,e),l.querySelector(n)!==null||t==="style"&&l.querySelector(Tn(i))||t==="script"&&l.querySelector(zn(i))||(t=l.createElement("link"),et(t,"link",e),Ke(t),l.head.appendChild(t)))}}function K1(e,t){aa.m(e,t);var a=Dl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+xt(l)+'"][href="'+xt(e)+'"]',i=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=El(e)}if(!Mt.has(i)&&(e=z({rel:"modulepreload",href:e},t),Mt.set(i,e),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(zn(i)))return}l=a.createElement("link"),et(l,"link",e),Ke(l),a.head.appendChild(l)}}}function W1(e,t,a){aa.S(e,t,a);var l=Dl;if(l&&e){var n=Ia(l).hoistableStyles,i=Ml(e);t=t||"default";var r=n.get(i);if(!r){var f={loading:0,preload:null};if(r=l.querySelector(Tn(i)))f.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Mt.get(i))&&xu(e,a);var g=r=l.createElement("link");Ke(g),et(g,"link",e),g._p=new Promise(function(j,T){g.onload=j,g.onerror=T}),g.addEventListener("load",function(){f.loading|=1}),g.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Zi(r,t,l)}r={type:"stylesheet",instance:r,count:1,state:f},n.set(i,r)}}}function F1(e,t){aa.X(e,t);var a=Dl;if(a&&e){var l=Ia(a).hoistableScripts,n=El(e),i=l.get(n);i||(i=a.querySelector(zn(n)),i||(e=z({src:e,async:!0},t),(t=Mt.get(n))&&Nu(e,t),i=a.createElement("script"),Ke(i),et(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function $1(e,t){aa.M(e,t);var a=Dl;if(a&&e){var l=Ia(a).hoistableScripts,n=El(e),i=l.get(n);i||(i=a.querySelector(zn(n)),i||(e=z({src:e,async:!0,type:"module"},t),(t=Mt.get(n))&&Nu(e,t),i=a.createElement("script"),Ke(i),et(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function wf(e,t,a,l){var n=(n=ee.current)?Xi(n):null;if(!n)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Ml(a.href),a=Ia(n).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ml(a.href);var i=Ia(n).hoistableStyles,r=i.get(e);if(r||(n=n.ownerDocument||n,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,r),(i=n.querySelector(Tn(e)))&&!i._p&&(r.instance=i,r.state.loading=5),Mt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Mt.set(e,a),i||I1(n,e,a,r.state))),t&&l===null)throw Error(o(528,""));return r}if(t&&l!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=El(a),a=Ia(n).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Ml(e){return'href="'+xt(e)+'"'}function Tn(e){return'link[rel="stylesheet"]['+e+"]"}function Lf(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function I1(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),et(t,"link",a),Ke(t),e.head.appendChild(t))}function El(e){return'[src="'+xt(e)+'"]'}function zn(e){return"script[async]"+e}function Rf(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+xt(a.href)+'"]');if(l)return t.instance=l,Ke(l),l;var n=z({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Ke(l),et(l,"style",n),Zi(l,a.precedence,e),t.instance=l;case"stylesheet":n=Ml(a.href);var i=e.querySelector(Tn(n));if(i)return t.state.loading|=4,t.instance=i,Ke(i),i;l=Lf(a),(n=Mt.get(n))&&xu(l,n),i=(e.ownerDocument||e).createElement("link"),Ke(i);var r=i;return r._p=new Promise(function(f,g){r.onload=f,r.onerror=g}),et(i,"link",l),t.state.loading|=4,Zi(i,a.precedence,e),t.instance=i;case"script":return i=El(a.src),(n=e.querySelector(zn(i)))?(t.instance=n,Ke(n),n):(l=a,(n=Mt.get(i))&&(l=z({},a),Nu(l,n)),e=e.ownerDocument||e,n=e.createElement("script"),Ke(n),et(n,"link",l),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Zi(l,a.precedence,e));return t.instance}function Zi(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,i=n,r=0;r title"):null)}function P1(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function qf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function eg(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Ml(l.href),i=t.querySelector(Tn(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Wi.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,Ke(i);return}i=t.ownerDocument||t,l=Lf(l),(n=Mt.get(n))&&xu(l,n),i=i.createElement("link"),Ke(i);var r=i;r._p=new Promise(function(f,g){r.onload=f,r.onerror=g}),et(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Wi.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Au=0;function tg(e,t){return e.stylesheets&&e.count===0&&$i(e,e.stylesheets),0Au?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(n)}}:null}function Wi(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$i(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Fi=null;function $i(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Fi=new Map,t.forEach(ag,e),Fi=null,Wi.call(e))}function ag(e,t){if(!(t.state.loading&4)){var a=Fi.get(e);if(a)var l=a.get(null);else{a=new Map,Fi.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d)}catch(c){console.error(c)}}return d(),Uu.exports=yg(),Uu.exports}var jg=bg();class Sg{observers=new Set;next(c){this.observers.forEach(u=>u(c))}asObservable(){return{subscribe:c=>(this.observers.add(c),{unsubscribe:()=>this.observers.delete(c)})}}}class xg extends Sg{currentValue;constructor(c){super(),this.currentValue=c}next(c){this.currentValue=c,super.next(c)}get value(){return this.currentValue}asObservable(){return{subscribe:c=>(c(this.currentValue),super.asObservable().subscribe(c))}}}class Ng{authId="id";authToken="token";authEmail="email";runOutDate="runOutDate";authTokenSubject=new xg(null);constructor(){}async loadAuthTokenFromStorage(){const c=window.localStorage.getItem(this.authToken);this.authTokenSubject.next(c)}async setAuthData(c,u){if(await this.setPreference(this.authId,c.id),await this.setPreference(this.authToken,c.token),await this.setPreference(this.authEmail,c.email),u)await this.setPreference(this.runOutDate,"forever");else{const o=new Date,m=new Date(o);m.setDate(o.getDate()+1);const y=m.toISOString();await this.setPreference(this.runOutDate,y)}}async setPreference(c,u){window.localStorage.setItem(c,u)}async getCandidateId(){return window.localStorage.getItem(this.authId)}async getCandidateEmail(){return window.localStorage.getItem(this.authEmail)}async getAuthToken(){return window.localStorage.getItem(this.authToken)}getAuthTokenNoneAsync(){return this.authTokenSubject.value}async getRunOutDate(){return window.localStorage.getItem(this.runOutDate)}async clearCredentials(){window.localStorage.removeItem(this.authId),window.localStorage.removeItem(this.authToken),window.localStorage.removeItem(this.runOutDate)}async getAuth(){let c=await this.getCandidateId(),u=await this.getAuthToken(),o=await this.getCandidateEmail(),m=await this.getRunOutDate();return c&&u&&o&&m?{id:c,token:u,email:o,runOutDate:m}:null}getAuthTokenWithoutWindow(){const c=this.getAuthTokenNoneAsync();return c||""}getAuthWithoutWindow(){const c=this.getAuthTokenNoneAsync();return c?{id:"",token:c,email:"",runOutDate:"forever"}:null}}const wl=new Ng;const zh=(...d)=>d.filter((c,u,o)=>!!c&&c.trim()!==""&&o.indexOf(c)===u).join(" ").trim();const Ag=d=>d.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const _g=d=>d.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,u,o)=>o?o.toUpperCase():u.toLowerCase());const oh=d=>{const c=_g(d);return c.charAt(0).toUpperCase()+c.slice(1)};var kg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Tg=d=>{for(const c in d)if(c.startsWith("aria-")||c==="role"||c==="title")return!0;return!1};const zg=L.forwardRef(({color:d="currentColor",size:c=24,strokeWidth:u=2,absoluteStrokeWidth:o,className:m="",children:y,iconNode:O,...G},w)=>L.createElement("svg",{ref:w,...kg,width:c,height:c,stroke:d,strokeWidth:o?Number(u)*24/Number(c):u,className:zh("lucide",m),...!y&&!Tg(G)&&{"aria-hidden":"true"},...G},[...O.map(([N,V])=>L.createElement(N,V)),...Array.isArray(y)?y:[y]]));const W=(d,c)=>{const u=L.forwardRef(({className:o,...m},y)=>L.createElement(zg,{ref:y,iconNode:c,className:zh(`lucide-${Ag(oh(d))}`,`lucide-${d}`,o),...m}));return u.displayName=oh(d),u};const Dg=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Mg=W("arrow-left",Dg);const Eg=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ol=W("arrow-right",Eg);const Cg=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],Ug=W("arrow-up-down",Cg);const Og=[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],wg=W("badge-check",Og);const Lg=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],Rg=W("bolt",Lg);const Hg=[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]],Vg=W("bookmark",Hg);const qg=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Dh=W("bot",qg);const Bg=[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2",key:"1ksdt3"}],["path",{d:"M22 13a18.15 18.15 0 0 1-20 0",key:"12hx5q"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Qu=W("briefcase-business",Bg);const Yg=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],Mh=W("briefcase",Yg);const Qg=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],Gg=W("car",Qg);const Jg=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],Xg=W("check-check",Jg);const Zg=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Kg=W("chevron-down",Zg);const Wg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],za=W("circle-check",Wg);const Fg=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],$g=W("circle-user",Fg);const Ig=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],Pg=W("clock-3",Ig);const e0=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],dh=W("code-xml",e0);const t0=[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]],a0=W("file-plus-corner",t0);const l0=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Gu=W("file-text",l0);const n0=[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]],i0=W("gamepad-2",n0);const s0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Eh=W("globe",s0);const c0=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],u0=W("graduation-cap",c0);const r0=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],Ch=W("grid-3x3",r0);const o0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],d0=W("info",o0);const f0=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],Ju=W("laptop",f0);const h0=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],m0=W("layout-grid",h0);const g0=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}]],Uh=W("layout-panel-top",g0);const v0=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],p0=W("link-2",v0);const y0=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],Oh=W("lock-keyhole",y0);const b0=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],j0=W("log-out",b0);const S0=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],ds=W("mail",S0);const x0=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Vn=W("map-pin",x0);const N0=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],wh=W("message-circle",N0);const A0=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],_0=W("monitor",A0);const k0=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],T0=W("moon",k0);const z0=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],D0=W("paperclip",z0);const M0=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],E0=W("pen-line",M0);const C0=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],U0=W("phone",C0);const O0=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],w0=W("plus",O0);const L0=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],R0=W("presentation",L0);const H0=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],V0=W("radar",H0);const q0=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],B0=W("rocket",q0);const Y0=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],fh=W("route",Y0);const Q0=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],G0=W("save",Q0);const J0=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Xu=W("search",J0);const X0=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Z0=W("send",X0);const K0=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lh=W("settings",K0);const W0=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],F0=W("smile",W0);const $0=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],fs=W("sparkles",$0);const I0=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Rh=W("square-pen",I0);const P0=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],ev=W("star",P0);const tv=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],av=W("sun",tv);const lv=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],nv=W("target",lv);const iv=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],sv=W("user-round",iv);const cv=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],hh=W("user",cv);const uv=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],rv=W("users",uv);const ov=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],mh=W("x",ov);function Ul({icon:d,label:c,...u}){return s.jsxs("label",{className:"auth-field",children:[s.jsx("span",{children:c}),s.jsxs("div",{className:"auth-input-wrap",children:[s.jsx("span",{className:"auth-input-icon","aria-hidden":!0,children:d}),s.jsx("input",{...u})]})]})}function dv({email:d,loading:c,onBackToLogin:u,onChangeEmail:o,onSubmit:m}){return s.jsxs("div",{className:"auth-view view-enter",children:[s.jsxs("div",{className:"auth-head",children:[s.jsx("button",{className:"link-btn back-link",type:"button",onClick:u,children:"Tilbage"}),s.jsx("h1",{children:"Glemt kodeord?"}),s.jsx("p",{children:"Indtast din e-mail, sa sender vi instruktioner til at nulstille din kode."})]}),s.jsxs("form",{className:"auth-form",onSubmit:m,children:[s.jsx(Ul,{icon:s.jsx(ds,{size:16,strokeWidth:1.8}),label:"E-mail",type:"email",placeholder:"navn@eksempel.dk",value:d,onChange:y=>o(y.target.value),required:!0}),s.jsx("button",{className:"submit-btn",type:"submit",disabled:c,children:c?"Sender...":"Send nulstillingslink"})]})]})}function fv({email:d,loading:c,onChangeEmail:u,onChangePassword:o,onChangeRememberMe:m,onForgotPassword:y,onRegister:O,onSubmit:G,password:w,rememberMe:N}){return s.jsxs("div",{className:"auth-view view-enter",children:[s.jsxs("div",{className:"auth-head auth-head-center",children:[s.jsx("h1",{children:"Velkommen tilbage"}),s.jsx("p",{children:"Indtast dine oplysninger for at logge ind pa din konto."})]}),s.jsxs("form",{className:"auth-form",onSubmit:G,children:[s.jsx(Ul,{icon:s.jsx(ds,{size:16,strokeWidth:1.8}),label:"E-mail",type:"email",placeholder:"navn@eksempel.dk",value:d,onChange:V=>u(V.target.value),required:!0}),s.jsxs("label",{className:"auth-field",children:[s.jsxs("div",{className:"auth-field-row",children:[s.jsx("span",{children:"Adgangskode"}),s.jsx("button",{className:"link-btn",type:"button",onClick:y,children:"Glemt adgangskode?"})]}),s.jsxs("div",{className:"auth-input-wrap",children:[s.jsx("span",{className:"auth-input-icon","aria-hidden":!0,children:s.jsx(Oh,{size:16,strokeWidth:1.8})}),s.jsx("input",{type:"password",placeholder:"••••••••",value:w,onChange:V=>o(V.target.value),required:!0})]})]}),s.jsxs("label",{className:"check-row",children:[s.jsx("input",{type:"checkbox",checked:N,onChange:V=>m(V.target.checked)}),s.jsx("span",{children:"Husk mig i 30 dage"})]}),s.jsx("button",{className:"submit-btn",type:"submit",disabled:c,children:c?"Logger ind...":"Log ind"})]}),s.jsxs("p",{className:"auth-foot",children:["Har du ikke en konto?",s.jsx("button",{className:"link-btn",type:"button",onClick:O,children:"Opret bruger"})]})]})}function hv({email:d,firstName:c,lastName:u,loading:o,locationQuery:m,locationSuggestions:y,onBackToLogin:O,onChangeEmail:G,onChangeFirstName:w,onChangeLastName:N,onChangeLocationQuery:V,onChangePassword:z,onSelectLocation:q,onSubmit:Z,password:ae}){return s.jsxs("div",{className:"auth-view view-enter",children:[s.jsxs("div",{className:"auth-head auth-head-center",children:[s.jsx("h1",{children:"Opret konto"}),s.jsx("p",{children:"Start din karriere-rejse med os i dag."})]}),s.jsxs("form",{className:"auth-form",onSubmit:Z,children:[s.jsx(Ul,{icon:s.jsx(hh,{size:16,strokeWidth:1.8}),label:"Fornavn",type:"text",placeholder:"Lasse",value:c,onChange:Y=>w(Y.target.value),required:!0}),s.jsx(Ul,{icon:s.jsx(hh,{size:16,strokeWidth:1.8}),label:"Efternavn",type:"text",placeholder:"Hansen",value:u,onChange:Y=>N(Y.target.value),required:!0}),s.jsx(Ul,{icon:s.jsx(ds,{size:16,strokeWidth:1.8}),label:"E-mail",type:"email",placeholder:"navn@eksempel.dk",value:d,onChange:Y=>G(Y.target.value),required:!0}),s.jsx(Ul,{icon:s.jsx(Oh,{size:16,strokeWidth:1.8}),label:"Adgangskode",type:"password",placeholder:"Skab en staerk kode",value:ae,onChange:Y=>z(Y.target.value),required:!0,minLength:8}),s.jsxs("label",{className:"auth-field",children:[s.jsx("span",{children:"Lokation"}),s.jsxs("div",{className:"auth-input-wrap",children:[s.jsx("span",{className:"auth-input-icon","aria-hidden":!0,children:s.jsx(Vn,{size:16,strokeWidth:1.8})}),s.jsx("input",{type:"text",placeholder:"Soeg by eller adresse",value:m,onChange:Y=>V(Y.target.value),autoComplete:"off",required:!0})]}),y.length>0?s.jsx("div",{className:"location-suggestions",children:y.map(Y=>s.jsx("button",{type:"button",className:"location-suggestion-item",onClick:()=>{q(Y.placeId,Y.description)},children:Y.description},Y.placeId))}):null]}),s.jsx("button",{className:"submit-btn",type:"submit",disabled:o,children:o?"Opretter...":"Opret bruger"})]}),s.jsxs("p",{className:"auth-foot",children:["Har du allerede en konto?",s.jsx("button",{className:"link-btn",type:"button",onClick:O,children:"Log ind"})]})]})}class Ka{searchParams;constructor(c){this.searchParams=c?new URLSearchParams(c):new URLSearchParams}append(c,u){const o=new URLSearchParams(this.searchParams);return o.append(c,String(u)),new Ka(o)}set(c,u){const o=new URLSearchParams(this.searchParams);return o.set(c,String(u)),new Ka(o)}toString(){return this.searchParams.toString()}}function is(d,c){if(!c)return d;const u=new URL(d);if(c instanceof Ka){const o=c.toString();return o&&new URLSearchParams(o).forEach((y,O)=>u.searchParams.append(O,y)),u.toString()}return Object.entries(c).forEach(([o,m])=>{if(Array.isArray(m)){m.forEach(y=>u.searchParams.append(o,String(y)));return}u.searchParams.set(o,String(m))}),u.toString()}async function ss(d,c="json"){if(!d.ok){const u=await d.text();throw new Error(u||`HTTP ${d.status}`)}if(d.status!==204)return c==="blob"?await d.blob():await d.json()}function cs(d){const c=typeof window>"u"?null:window.localStorage.getItem("token");return{...c?{Authorization:`Bearer ${c}`}:{},...d??{}}}class mv{async get(c,u){const o=await fetch(is(c,u?.params),{method:"GET",headers:cs(u?.headers)});return ss(o,u?.responseType)}async post(c,u,o){const m=await fetch(is(c,o?.params),{method:"POST",headers:{"Content-Type":"application/json",...cs(o?.headers)},body:u===void 0?void 0:JSON.stringify(u)});return ss(m)}async put(c,u,o){const m=await fetch(is(c,o?.params),{method:"PUT",headers:{"Content-Type":"application/json",...cs(o?.headers)},body:u===void 0?void 0:JSON.stringify(u)});return ss(m)}async delete(c,u){const o=await fetch(is(c,u?.params),{method:"DELETE",headers:cs(u?.headers)});return ss(o)}}const He=new mv,k={backendApi:"https://api.arbejd.com/",backendApiV2:"https://api2.arbejd.com/api/"};class gv{http;constructor(c=He){this.http=c}login(c,u){let o=k.backendApi+"api/1.1.0/candidate/login",m={email:c,password:u};return this.http.post(o,m)}forgotPassword(c){let u=k.backendApi+"api/1.1.0/candidate/resetPassword/"+c.toLowerCase();return this.http.get(u)}}class Ll{constructor(c=He,u=wl){this.http=c,this.localStorageService=u}closeAccount(c){let u=k.backendApi+"api/1.1.0/candidate/"+c.toLowerCase();return this.http.delete(u)}accountRetention(c){let u=k.backendApi+"api/1.1.0/candidate/"+c+"/account-retention/";return this.http.get(u)}getCandidatesQualifications(){let c=k.backendApi+"api/1.1.0/candidate/skill/";return this.http.get(c)}getCandidatesCertifications(){let c=k.backendApi+"api/1.1.0/candidate/certificate/";return this.http.get(c)}getCandidatesLanguages(){let c=k.backendApi+"api/1.1.0/candidate/language/";return this.http.get(c)}getCandidatesDriverLicenses(){let c=k.backendApi+"api/1.1.0/candidate/driversLicense/";return this.http.get(c)}changePassword(c,u){let o=k.backendApi+"api/1.1.0/candidate/resetPassword",m={key:c,password:u};return this.http.post(o,m)}getCandidatesEducations(){let c=k.backendApiV2+"1.0.0/client/candidate_education";return this.http.get(c)}updateExperience(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_experience/"+c.id,m={comments:c.comments,company_name:c.companyName,is_current:c.isCurrent,from_date:c.fromDate,to_date:c.toDate,language:u};return this.http.put(o,m)}createAccountV2(c){let u=k.backendApiV2+"1.0.0/client/candidate";return this.http.post(u,c)}updateCandidate(c,u){let o=k.backendApiV2+"1.0.0/client/candidate/v2/"+c.id,m={...c};c.birthday&&(c.birthday=new Date(c.birthday)),c.birthday instanceof Date&&(m.birthday=c.birthday.toISOString());let y={language:u,candidate:m};return this.http.put(o,y)}getCandidate(){let c=k.backendApiV2+"1.0.0/client/candidate";return this.http.get(c)}getCvSuggestion(){let c=k.backendApiV2+"1.0.0/client/suggestion";return this.http.get(c)}saveExperience(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_experience",m={comments:c.comments,company_name:c.companyName,is_current:c.isCurrent,esco_id:c.occupation.id,from_date:c.fromDate,to_date:c.toDate,language:u};return this.http.post(o,m)}removeExperience(c){let u=k.backendApiV2+"1.0.0/client/candidate_experience/"+c;return this.http.delete(u)}getCandidatesExperiences(){let c=k.backendApiV2+"1.0.0/client/candidate_experience";return this.http.get(c)}getJobAgentFilters(){let c=k.backendApiV2+"1.0.0/client/job_agent_filter";return this.http.get(c)}updateJobAgentFilter(c){let u=k.backendApiV2+"1.0.0/client/job_agent_filter/"+c.id,o=c;return this.http.put(u,o)}removeJobAgentFilter(c){let u=k.backendApiV2+"1.0.0/client/job_agent_filter/"+c;return this.http.delete(u)}updateCandidateJobSeeker(c){let u=k.backendApiV2+"1.0.0/client/candidate/update_job_seeker/"+c.id;return this.http.put(u,c)}updateCvUploadProfileText(c,u,o){let m=k.backendApiV2+"1.0.0/client/candidate/update_cv_upload_profile/"+c,y={description:u,language:o};return this.http.put(m,y)}saveExperienceV2(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_experience",m={comments:c.comments,company_name:c.companyName,is_current:c.isCurrent,esco_id:c.escoId,from_date:c.fromDate,to_date:c.toDate,language:u};return this.http.post(o,m)}updateProfileText(c){let u=k.backendApiV2+"1.0.0/client/candidate/update_profile_text";return this.http.put(u,c)}}function Ru(d,c){const u=d[c];return typeof u=="string"?u:null}class vv{authService;candidateService;constructor(c=new gv,u=new Ll){this.authService=c,this.candidateService=u}async login(c,u,o){const y=await this.authService.login(c,u)??{},O=Ru(y,"token");if(!O)return{ok:!1,message:"Login fejlede: token mangler i svaret fra serveren."};const G={id:Ru(y,"id")??"",token:O,email:Ru(y,"email")??c,runOutDate:"forever"};return await wl.setAuthData(G,o),{ok:!0,message:"Du er nu logget ind."}}async forgotPassword(c){return await this.authService.forgotPassword(c),{ok:!0,message:"Anmodning om nulstilling af kodeord er sendt."}}async register(c){const u=Number.parseInt(c.zip,10);if(Number.isNaN(u))return{ok:!1,message:"Postnummer skal være et tal."};const o={email:c.email,password:c.password,zip:u,zipName:c.zipName,awsUrl:"",latitude:0,longitude:0,firstName:c.firstName,lastName:c.lastName,subscribe:c.subscribe};return await this.candidateService.createAccountV2(o),{ok:!0,message:"Kontoen er oprettet."}}}class Hh{constructor(c=He){this.http=c}searchPlaces(c){const u=k.backendApiV2+"client/google_maps/1.0.0/get_places?query="+encodeURIComponent(c);return this.http.get(u)}getPlaceDetails(c){const u=k.backendApiV2+"client/google_maps/1.0.0/get_place_details?place_id="+encodeURIComponent(c);return this.http.get(u)}}function pv(d){const c=L.useMemo(()=>new vv,[]),u=L.useMemo(()=>new Hh,[]),[o,m]=L.useState(""),[y,O]=L.useState(!1),[G,w]=L.useState(""),[N,V]=L.useState(""),[z,q]=L.useState(""),[Z,ae]=L.useState(""),[Y,fe]=L.useState(""),[ge,je]=L.useState(""),[ie,re]=L.useState([]),[de,K]=L.useState(null),[M,ye]=L.useState(""),[Ae,ze]=L.useState(!1),[R,Q]=L.useState(null),[le,I]=L.useState("login");function oe(S){Q(null),I(S)}async function _(S){const C=S.trim();if(C.length<3){re([]);return}try{const te=((await u.searchPlaces(C)).predictions??[]).filter(ee=>typeof ee.place_id=="string"&&typeof ee.description=="string").map(ee=>({description:ee.description,placeId:ee.place_id}));re(te)}catch{re([])}}function H(S){const C=S.match(/\b(\d{4})\b/);if(!C)return null;const B=C[1],ee=S.slice(S.indexOf(B)+B.length).trim().split(",")[0]?.trim()||"";return ee?{cityName:ee,zip:B}:null}async function U(S,C){let B=C;try{const ee=await u.getPlaceDetails(S);typeof ee.result?.formatted_address=="string"&&ee.result.formatted_address.trim()&&(B=ee.result.formatted_address.trim())}catch{}const te=H(B)??H(C);if(je(B),re([]),!te){K(null);return}K({cityName:te.cityName,description:B,zip:te.zip})}async function $(S){S.preventDefault(),O(!0),Q(null);try{const C=await c.login(G.trim(),N,Ae);Q(C),C.ok&&d?.()}catch(C){const B=C instanceof Error?C.message:"Login mislykkedes.";Q({ok:!1,message:B})}finally{O(!1)}}async function ce(S){S.preventDefault(),O(!0),Q(null);try{if(!de){Q({ok:!1,message:"Vaelg en lokation fra listen (med postnummer)."});return}const C=await c.register({email:Z.trim(),firstName:z.trim(),lastName:Y.trim(),password:M,subscribe:!0,zip:de.zip,zipName:de.cityName});Q(C),C.ok&&I("login")}catch(C){const B=C instanceof Error?C.message:"Oprettelse mislykkedes.";Q({ok:!1,message:B})}finally{O(!1)}}async function h(S){S.preventDefault(),O(!0),Q(null);try{const C=await c.forgotPassword(o.trim());Q(C)}catch(C){const B=C instanceof Error?C.message:"Kunne ikke sende nulstillingslink.";Q({ok:!1,message:B})}finally{O(!1)}}return{forgotEmail:o,handleForgotSubmit:h,handleLoginSubmit:$,handleRegisterSubmit:ce,loading:y,loginEmail:G,loginPassword:N,registerFirstName:z,registerEmail:Z,registerLastName:Y,registerLocationQuery:ge,registerLocationSuggestions:ie,registerPassword:M,rememberMe:Ae,result:R,setForgotEmail:m,setLoginEmail:w,setLoginPassword:V,setRegisterEmail:ae,setRegisterFirstName:q,setRegisterLastName:fe,setRegisterLocationQuery:S=>{je(S),K(null),_(S)},setRegisterPassword:ye,setRememberMe:ze,selectRegisterLocation:U,switchView:oe,view:le}}function yv({onAuthenticated:d}){const{forgotEmail:c,handleForgotSubmit:u,handleLoginSubmit:o,handleRegisterSubmit:m,loading:y,loginEmail:O,loginPassword:G,registerFirstName:w,registerEmail:N,registerLastName:V,registerLocationQuery:z,registerLocationSuggestions:q,registerPassword:Z,rememberMe:ae,result:Y,setForgotEmail:fe,setLoginEmail:ge,setLoginPassword:je,setRegisterEmail:ie,setRegisterFirstName:re,setRegisterLastName:de,setRegisterLocationQuery:K,setRegisterPassword:M,setRememberMe:ye,selectRegisterLocation:Ae,switchView:ze,view:R}=pv(d);return s.jsxs("main",{className:"auth-page",children:[s.jsx("div",{className:"orb orb-1"}),s.jsx("div",{className:"orb orb-2"}),s.jsx("div",{className:"orb orb-3"}),s.jsxs("div",{className:"auth-logo-wrap",children:[s.jsx("div",{className:"auth-logo-dot",children:"A"}),s.jsx("span",{className:"auth-logo-text",children:"ARBEJD"})]}),s.jsxs("section",{className:"auth-card",children:[R==="login"?s.jsx(fv,{email:O,loading:y,onChangeEmail:ge,onChangePassword:je,onChangeRememberMe:ye,onForgotPassword:()=>ze("forgot"),onRegister:()=>ze("register"),onSubmit:o,password:G,rememberMe:ae}):null,R==="register"?s.jsx(hv,{email:N,firstName:w,lastName:V,loading:y,locationQuery:z,locationSuggestions:q,onBackToLogin:()=>ze("login"),onChangeEmail:ie,onChangeFirstName:re,onChangeLastName:de,onChangeLocationQuery:K,onChangePassword:M,onSelectLocation:Ae,onSubmit:m,password:Z}):null,R==="forgot"?s.jsx(dv,{email:c,loading:y,onBackToLogin:()=>ze("login"),onChangeEmail:fe,onSubmit:u}):null,Y?s.jsx("p",{className:Y.ok?"status success":"status error",children:Y.message}):null]},R)]})}class Vh{constructor(c=He){this.http=c}listEscoByParent(c){let u=k.backendApiV2+"1.0.0/client/esco";return c&&(u+="/"+c),this.http.get(u)}listAllEscos(){let c=k.backendApiV2+"1.0.0/client/esco";return this.http.get(c)}}class bv{constructor(c=He){this.http=c}addEscoToJobAgent(c){let u=k.backendApiV2+"1.0.0/client/job_agent_filter",o={esco_id:c};return this.http.post(u,o)}removeJobAgentFilter(c){let u=k.backendApiV2+"1.0.0/client/job_agent_filter/"+c;return this.http.delete(u)}}class Ku{constructor(c=He){this.http=c}getPaymentOverview(){let c=k.backendApiV2+"client/end_user_subscription/1.0.0/payment_overview";return this.http.get(c)}getSubscriptionProducts(){let c=k.backendApiV2+"client/end_user_subscription/1.0.0/get_products";return this.http.get(c)}deactivateAutoRenew(){let c=k.backendApiV2+"client/end_user_subscription/1.0.0/deactivate_auto_renew";return this.http.put(c,{})}activateAutoRenew(){let c=k.backendApiV2+"client/end_user_subscription/1.0.0/activate_auto_renew";return this.http.put(c,{})}redeemCode(c){let u=k.backendApiV2+"client/candidate_redeem_code/v1";return this.http.post(u,{code:c})}}class jv{constructor(c=new Ll,u=new Ku,o=new bv,m=new Vh){this.candidateService=c,this.subscriptionService=u,this.jobAgentService=o,this.escoService=m}async loadInitialData(){const[c,u,o,m]=await Promise.allSettled([this.subscriptionService.getPaymentOverview(),this.candidateService.getJobAgentFilters(),this.candidateService.getCvSuggestion(),this.escoService.listAllEscos()]);return{paymentOverview:c.status==="fulfilled"?c.value:null,jobAgentFilters:u.status==="fulfilled"?u.value:[],cvSuggestions:o.status==="fulfilled"?this.withImprovements(o.value):[],escos:m.status==="fulfilled"?m.value:[]}}async getCandidateProfile(){try{const c=await this.candidateService.getCandidate(),u=c.firstName?.trim()||c.name?.trim()||"Lasse",o=c.imageUrl||c.image||void 0;return{name:u,imageUrl:o}}catch{return{name:"Lasse"}}}async addEscoToFilter(c){await this.jobAgentService.addEscoToJobAgent(c)}async removeFilter(c){await this.jobAgentService.removeJobAgentFilter(c)}async setFilterVisibility(c,u){await this.candidateService.updateJobAgentFilter({...c,visible:u})}getEscoSuggestions(c,u,o){const m=c.trim().toLowerCase();if(!m)return[];const y=new Set(o.map(O=>O.escoId));return u.filter(O=>!y.has(O.id)).filter(O=>O.preferedLabelDa.toLowerCase().includes(m)).slice(0,10)}getSuggestionText(c){return c>=0&&c<50?"Et godt første skridt mod flere relevante job.":c>=50&&c<100?"Kan styrke dine chancer i ansøgningsbunken.":c>=100&&c<150?"Ofte efterspurgt og forbedrer dine jobmuligheder markant.":c>=150&&c<200?"Et klart plus som gør dig mere attraktiv for arbejdsgivere.":c>=200?"En afgørende faktor der åbner langt flere jobmuligheder.":"Forbedrer din profil til kommende jobmatch."}withImprovements(c){return c.map(u=>{const o=[],m=[{items:u.jobImprovementSuggestion.educations??[],type:"education"},{items:u.jobImprovementSuggestion.languages??[],type:"language"},{items:u.jobImprovementSuggestion.driversLicenses??[],type:"driversLicense"},{items:u.jobImprovementSuggestion.qualifications??[],type:"qualification"},{items:u.jobImprovementSuggestion.certificates??[],type:"certificate"}];for(const y of m)for(const O of y.items)o.push({...O,improvementType:y.type});return o.sort((y,O)=>O.jobChanceIncrease-y.jobChanceIncrease),{...u,improvements:o}})}}class Sv{constructor(c=He){this.http=c}saveJobFilter(c){let u=k.backendApiV2+"1.0.0/client/candidate_search_filter";return this.http.post(u,c)}getJobFilter(){let c=k.backendApiV2+"1.0.0/client/candidate_search_filter";return this.http.get(c)}resetJobFilter(){let c=k.backendApiV2+"1.0.0/client/candidate_search_filter/reset_job_filter";return this.http.put(c,{})}}class Wu{http;constructor(c=He){this.http=c}getSearchWords(){let c=k.backendApiV2+"1.0.0/client/candidate_search/list_search_words";return this.http.get(c)}getJobs(c,u,o){let m=k.backendApi+"api/1.1.0/jobs/all/"+u+"/"+o;return this.http.post(m,c)}getJobsV2(c,u,o,m){let y=k.backendApiV2+"1.0.0/client/candidate_search/v2/"+c+"/"+u+"/"+o,O=new Ka;return m.length>0&&m.forEach(G=>{O=O.append("terms",G)}),this.http.get(y,{params:O})}getSavedJobs(c,u){let o=k.backendApi+"api/1.1.0/candidate/jobs/saved";return this.http.get(o)}getSavedJobsV2(c,u){let o=k.backendApiV2+"1.0.0/client/job/bookmarked_jobs/"+c+"/"+u;return this.http.get(o)}getAppliedJobs(c,u){let o=k.backendApi+"api/1.1.0/applications/candidate/";return this.http.get(o)}getAppliedJobsV2(c,u){let o=k.backendApiV2+"1.0.0/client/job/applied_jobs/"+c+"/"+u;return this.http.get(o)}payWithStripe(c,u){const o=k.backendApiV2+"1.0.0/client/payment/create-payment-intent",m={paymentMethodId:c,amount:u};return this.http.post(o,m)}bookmarkJob(c){let u=k.backendApi+"api/1.1.0/candidate/jobs/"+c+"/jobnet/updateSavedStatus",o={saved:!0};return this.http.post(u,o)}unbookmarkJob(c){let u=k.backendApi+"api/1.1.0/candidate/jobs/"+c+"/jobnet/updateSavedStatus",o={saved:!1};return this.http.post(u,o)}bookmarkJobV2(c,u,o){let m=k.backendApiV2+"1.0.0/client/job/bookmark/"+c,y={job_type:o,save:u};return this.http.post(m,y)}getJobNetJobDetail(c){let u=k.backendApiV2+"1.0.0/client/job/detail/star/"+c;return this.http.get(u)}getJobDetail(c){let u=k.backendApi+"api/1.1.0/jobs/"+c;return this.http.get(u)}getOccupationCategorizations(){let c=k.backendApiV2+"1.0.0/client/ds_tree";return this.http.get(c)}getJobSummary(c){let u=k.backendApi+"api/1.1.0/jobs/"+c+"/summary";return this.http.get(u)}applyJob(c){let u=k.backendApi+"api/1.1.0/applications/job/"+c,o={jobPostingId:c};return this.http.post(u,o)}undoApplyJob(c){let u=k.backendApi+"api/1.1.0/applications/"+c;return this.http.delete(u)}toggleApplyJobnetjob(c,u){let o=k.backendApiV2+"1.0.0/client/job/detail/star/apply/"+c,m={apply:u};return this.http.put(o,m)}}const Hu={escoIds:[],workTypePermanent:!1,workTypePartTime:!1,workDistance:50,partTimeHours:null,distanceCenterName:"",latitude:null,longitude:null};function Xe(d){return typeof d=="string"?d:""}function Rn(d){return typeof d=="object"&&d!==null?d:null}function Vu(d,c){if(!d)return[];const u=d[c];return Array.isArray(u)?u:[]}function qu(d){if(Array.isArray(d))return d;const c=Rn(d);if(!c)return[];const u=Vu(c,"searchList");if(u.length>0)return u;const o=Rn(c.data),m=Vu(o,"searchList");if(m.length>0)return m;const y=Vu(c,"items");return y.length>0?y:[]}function gh(d,c){if(!d)return null;const u=d[c];return typeof u=="number"?u:null}function xv(d){return d.trim()}function Nv(d){if(!d)return[];const c=new Set,u=d.searchText?.trim();u&&u.length>0&&c.add(u);for(const o of d.desiredTitles??[]){const m=xv(o);m.length>0&&c.add(m)}return Array.from(c)}function Av(d,c){return{id:Xe(d.id),title:Xe(d.title),companyName:Xe(d.companyName),occupationName:Xe(d.occupationName),descriptionIntro:Xe(d.descriptionIntro),address:Xe(d.address),time:Xe(d.time),applicationDeadline:d.applicationDeadline instanceof Date?d.applicationDeadline.toISOString():Xe(String(d.applicationDeadline??"")),candidateDistance:typeof d.candidateDistance=="number"?d.candidateDistance:null,logoUrl:Xe(d.logoUrl),companyLogoImage:Xe(d.companyLogoImage),fromJobnet:!!d.fromJobnet,isSaved:!!d.saved,matchPercent:c}}function vh(d){return{id:Xe(d.id),title:Xe(d.title),companyName:Xe(d.companyName),occupationName:Xe(d.occupationName),descriptionIntro:Xe(d.descriptionIntro),address:Xe(d.address),time:Xe(d.time),applicationDeadline:d.applicationDeadline instanceof Date?d.applicationDeadline.toISOString():Xe(String(d.applicationDeadline??"")),candidateDistance:typeof d.candidateDistance=="number"?d.candidateDistance:null,logoUrl:Xe(d.logoUrl),companyLogoImage:Xe(d.companyLogoImage),isActive:typeof d.isActive=="boolean"?d.isActive:void 0,fromJobnet:!!d.fromJobnet,isSaved:!0}}class Fu{constructor(c=new Wu,u=new Sv,o=new Hh,m=new Ll){this.jobService=c,this.filterService=u,this.placesService=o,this.candidateService=m}async getCandidateProfile(){try{const c=await this.candidateService.getCandidate(),u=c.firstName?.trim()||c.name?.trim()||"Lasse",o=c.imageUrl||c.image||void 0;return{name:u,imageUrl:o}}catch{return{name:"Lasse"}}}async getOccupationOptions(){const c=await this.jobService.getOccupationCategorizations(),u=[];for(const o of c)for(const m of o.subAreas)for(const y of m.occupations)typeof y.id=="number"&&typeof y.name=="string"&&y.name.trim().length>0&&u.push({id:y.id,name:y.name});return u.sort((o,m)=>o.name.localeCompare(m.name,"da"))}async getJobSearchWords(){return(await this.jobService.getSearchWords()).filter(u=>typeof u=="string"&&u.trim().length>0)}async getSavedFilter(){try{const c=await this.filterService.getJobFilter(),u=c?.candidateSearchFilter;return u?{escoIds:c.escoIds??[],workTypePermanent:!!u.workTypePermanent,workTypePartTime:!!u.workTypePartTime,workDistance:u.workDistance??u.defaultDistance??50,partTimeHours:u.partTimeHours??null,distanceCenterName:u.distanceCenterName??u.defaultCenterName??"",latitude:u.latitude??null,longitude:u.longitude??null}:{...Hu}}catch{return{...Hu}}}async saveFilter(c){const u=c.workTypePartTime&&c.partTimeHours&&c.partTimeHours>0&&c.partTimeHours<=37?c.partTimeHours:null,o={escoIds:c.escoIds,candidateSearchFilter:{workTimeDay:!1,workTimeEvening:!1,workTimeNight:!1,workTimeWeekend:!1,workTypePermanent:c.workTypePermanent,workTypeFreelance:!1,workTypePartTime:c.workTypePartTime,workTypeSubstitute:!1,workTypeTemporary:!1,workDistance:c.workDistance,partTimeHours:u,distanceCenterName:c.distanceCenterName,latitude:c.latitude,longitude:c.longitude}};await this.filterService.saveJobFilter(o)}async resetFilter(){return await this.filterService.resetJobFilter(),{...Hu}}async searchPlaceSuggestions(c){const u=c.trim();return u.length<3?[]:((await this.placesService.searchPlaces(u)).predictions??[]).filter(m=>typeof m.place_id=="string"&&typeof m.description=="string").map(m=>({placeId:m.place_id,description:m.description}))}async getPlaceSelection(c){const o=(await this.placesService.getPlaceDetails(c)).result;return!o||typeof o.formatted_address!="string"?null:{description:o.formatted_address,latitude:typeof o.geometry?.location?.lat=="number"?o.geometry.location.lat:null,longitude:typeof o.geometry?.location?.lng=="number"?o.geometry.location.lng:null}}async getTabItems(c,u){if(c==="gemte"){const o=await this.jobService.getSavedJobsV2(0,100);return qu(o).map(y=>vh(y))}if(c==="sogte"){const o=await this.jobService.getAppliedJobsV2(0,100);return qu(o).map(y=>vh(y))}return this.getJobsFeedItems(u?[u]:void 0)}async applyFiltersAndGetJobs(c,u){await this.saveFilter(c);const o=Nv(u);return this.getJobsFeedItems(o)}async toggleBookmark(c,u){const o=c.fromJobnet?"star":"arbejd.com";await this.jobService.bookmarkJobV2(c.id,u,o)}async getJobsFeedItems(c){let o=10,m=0;const y=12,O=120,G=new Set,w=[];let N=[];const V=(c??[]).map(z=>z.trim()).filter(z=>z.length>0);if(V.length>0)N=V;else try{N=(await this.jobService.getSearchWords()).filter(q=>typeof q=="string"&&q.trim().length>0)}catch{N=[]}for(let z=0;z{const o=u.icon,m=u.key===d;return s.jsxs("button",{type:"button",className:m?"dash-nav-item active":"dash-nav-item",onClick:()=>c?.(u.key),children:[s.jsx("span",{className:u.accent?"dash-nav-icon accent":"dash-nav-icon",children:s.jsx(o,{size:19,strokeWidth:1.7})}),s.jsx("span",{className:"dash-nav-label",children:u.label}),u.badge?s.jsx("span",{className:"dash-nav-badge",children:u.badge}):null]},u.key)}),s.jsx("div",{className:"dash-nav-divider"}),kv.map(u=>{const o=u.icon,m=u.key===d;return s.jsxs("button",{type:"button",className:m?"dash-nav-item active":"dash-nav-item",onClick:()=>c?.(u.key),children:[s.jsx("span",{className:u.accent?"dash-nav-icon accent":"dash-nav-icon",children:s.jsx(o,{size:19,strokeWidth:1.7})}),s.jsx("span",{className:"dash-nav-label",children:u.label}),u.dot?s.jsx("span",{className:"dash-nav-dot"}):null]},u.key)})]}),s.jsxs("div",{className:"dash-sidebar-pro",children:[s.jsx("div",{className:"dash-sidebar-pro-glow"}),s.jsx(fs,{size:19,strokeWidth:1.8}),s.jsx("h4",{children:"Pro-medlemskab"}),s.jsx("p",{children:"Faa ubegrænsede simuleringer"})]})]})}function Hl({actions:d,imageUrl:c,name:u,onLogout:o,onToggleTheme:m,theme:y="light"}){return s.jsxs("header",{className:"dash-topbar",children:[m?s.jsxs("button",{type:"button",className:"dash-theme-btn",onClick:m,children:[y==="dark"?s.jsx(av,{size:15,strokeWidth:1.8}):s.jsx(T0,{size:15,strokeWidth:1.8}),s.jsx("span",{children:y==="dark"?"Light":"Dark"})]}):null,d?s.jsx("div",{className:"dash-topbar-actions",children:d}):null,s.jsxs("div",{className:"dash-profile-wrap",children:[s.jsxs("button",{className:"dash-profile-btn",type:"button",children:[c?s.jsx("img",{src:c,alt:u,className:"dash-profile-avatar"}):s.jsx("div",{className:"dash-profile-avatar dash-profile-avatar-fallback",children:u.slice(0,1).toUpperCase()}),s.jsx("span",{children:u}),s.jsx(Kg,{size:15,strokeWidth:1.8})]}),s.jsxs("div",{className:"dash-profile-menu",children:[s.jsxs("button",{type:"button",children:[s.jsx($g,{size:16,strokeWidth:1.8})," Profil"]}),s.jsxs("button",{type:"button",children:[s.jsx(Lh,{size:16,strokeWidth:1.8})," Indstillinger"]}),s.jsx("div",{className:"dash-profile-divider"}),s.jsxs("button",{type:"button",className:"danger",onClick:o,children:[s.jsx(j0,{size:16,strokeWidth:1.8})," Log ud"]})]})]})]})}const Tv={paymentOverview:null,jobAgentFilters:[],cvSuggestions:[],escos:[]};function zv(d){return d.trim().slice(0,1).toUpperCase()||"A"}function Dv(d){return Math.max(68,98-d*4)}function Mv(d,c){const u=c.trim().toLowerCase();return u?d.filter(o=>o.preferedLabelDa.toLowerCase().includes(u)).slice(0,8):[]}function Ev({onLogout:d,onNavigate:c,onOpenJobDetail:u,onToggleTheme:o,theme:m}){const y=L.useMemo(()=>new jv,[]),O=L.useMemo(()=>new Fu,[]),[G,w]=L.useState("Lasse"),[N,V]=L.useState(void 0),[z,q]=L.useState(Tv),[Z,ae]=L.useState([]),[Y,fe]=L.useState(!0),[ge,je]=L.useState(""),[ie,re]=L.useState(""),[de,K]=L.useState(""),[M,ye]=L.useState(""),[Ae,ze]=L.useState(""),[R,Q]=L.useState(25);L.useEffect(()=>{let U=!0;async function $(){fe(!0);const[ce,h,S]=await Promise.all([y.getCandidateProfile(),y.loadInitialData(),O.getTabItems("jobs")]);U&&(w(ce.name),V(ce.imageUrl),q(h),ae(S),fe(!1))}return $(),()=>{U=!1}},[y,O]);async function le(){const U=await y.loadInitialData();q(U)}async function I(){const U=ie.trim()||ge.trim()||de.trim(),$=y.getEscoSuggestions(U,z.escos,z.jobAgentFilters)[0]||Mv(z.escos,U)[0];$&&(await y.addEscoToFilter($.id),await le(),je(""),re(""),K(""),ye(""),ze(""),Q(25))}async function oe(U){await y.setFilterVisibility(U,!U.visible),await le()}const _=z.jobAgentFilters,H=(Z.length>0?Z:[]).slice(0,6);return s.jsxs("section",{className:`dash-root ${m==="dark"?"theme-dark":""}`,children:[s.jsx("div",{className:"dash-orb dash-orb-1"}),s.jsx("div",{className:"dash-orb dash-orb-2"}),s.jsx("div",{className:"dash-orb dash-orb-3"}),s.jsx(Rl,{active:"ai-agent",onNavigate:c}),s.jsxs("main",{className:"dash-main custom-scrollbar ai-agent-main",children:[s.jsx(Hl,{name:G,imageUrl:N,onLogout:d,theme:m,onToggleTheme:o}),s.jsxs("div",{className:"ai-head",children:[s.jsx("h1",{children:"AI-agenter"}),s.jsx("p",{children:"Saet din jobsogning pa autopilot. Lad AI overvage og matche dig med de perfekte jobs."})]}),s.jsxs("section",{className:"ai-create-card",children:[s.jsxs("div",{className:"ai-create-title",children:[s.jsx("div",{className:"ai-create-icon",children:s.jsx(Dh,{size:20,strokeWidth:1.8})}),s.jsx("h2",{children:"Opret ny AI-agent"})]}),s.jsxs("div",{className:"ai-form-grid",children:[s.jsxs("div",{className:"ai-field",children:[s.jsx("label",{children:"Agentens navn"}),s.jsx("input",{value:ge,onChange:U=>je(U.target.value),placeholder:"F.eks. Frontend Udvikler CPH"})]}),s.jsxs("div",{className:"ai-field",children:[s.jsx("label",{children:"Sogetekst / Nogleord"}),s.jsx("input",{value:ie,onChange:U=>re(U.target.value),placeholder:"F.eks. React, TypeScript, Tailwind"})]}),s.jsxs("div",{className:"ai-field",children:[s.jsx("label",{children:"Arbejdsomrade"}),s.jsxs("select",{value:de,onChange:U=>K(U.target.value),children:[s.jsx("option",{value:"",children:"Vaelg branche"}),s.jsx("option",{value:"IT & Udvikling",children:"IT & Udvikling"}),s.jsx("option",{value:"Design & UX",children:"Design & UX"}),s.jsx("option",{value:"Salg & Marketing",children:"Salg & Marketing"}),s.jsx("option",{value:"HR & Ledelse",children:"HR & Ledelse"})]})]}),s.jsxs("div",{className:"ai-field",children:[s.jsx("label",{children:"Arbejdstype"}),s.jsxs("select",{value:M,onChange:U=>ye(U.target.value),children:[s.jsx("option",{value:"",children:"Vaelg type"}),s.jsx("option",{value:"Fuldtid",children:"Fuldtid"}),s.jsx("option",{value:"Deltid",children:"Deltid"}),s.jsx("option",{value:"Freelance",children:"Freelance / Konsulent"}),s.jsx("option",{value:"Studiejob",children:"Studiejob"})]})]}),s.jsxs("div",{className:"ai-field",children:[s.jsx("label",{children:"Arbejdssted"}),s.jsxs("div",{className:"ai-location-wrap",children:[s.jsx(Vn,{size:16,strokeWidth:1.8}),s.jsx("input",{value:Ae,onChange:U=>ze(U.target.value),placeholder:"By eller postnummer"})]})]}),s.jsxs("div",{className:"ai-field ai-distance-field",children:[s.jsxs("div",{className:"ai-distance-head",children:[s.jsx("label",{children:"Maks. distance"}),s.jsxs("span",{children:[R," km"]})]}),s.jsx("input",{type:"range",min:0,max:100,value:R,onChange:U=>Q(Number(U.target.value))})]})]}),s.jsx("div",{className:"ai-create-actions",children:s.jsxs("button",{type:"button",onClick:()=>{I()},children:[s.jsx(G0,{size:16,strokeWidth:1.8})," Gem AI-agent"]})})]}),s.jsxs("section",{className:"ai-agents-section",children:[s.jsx("h3",{children:"Dine aktive agenter"}),s.jsxs("div",{className:"ai-agents-row custom-scrollbar",children:[_.length===0?s.jsx("p",{className:"dash-loading",children:"Ingen aktive agenter endnu."}):null,_.map((U,$)=>s.jsxs("article",{className:"ai-agent-chip-card",children:[s.jsxs("div",{className:"ai-agent-card-head",children:[s.jsxs("div",{className:"ai-agent-chip-left",children:[s.jsx("div",{className:`ai-agent-mini-icon ${$%2===0?"teal":"indigo"}`,children:$%2===0?s.jsx(_0,{size:16,strokeWidth:1.8}):s.jsx(Rh,{size:16,strokeWidth:1.8})}),s.jsxs("div",{children:[s.jsx("h4",{children:U.escoName}),s.jsx("p",{children:U.isCalculated?"Aktiv siden i går":"Aktiv"})]})]}),s.jsx("button",{type:"button",className:U.visible?"ai-toggle on":"ai-toggle",onClick:()=>{oe(U)},children:s.jsx("span",{})})]}),s.jsxs("div",{className:"ai-tags",children:[s.jsx("span",{children:U.escoName}),s.jsx("span",{children:Ae||"København"}),s.jsxs("span",{children:[R," km"]})]})]},U.id))]})]}),s.jsxs("section",{className:"ai-jobs-section",children:[s.jsxs("div",{className:"ai-jobs-head",children:[s.jsxs("h3",{children:[s.jsx(fs,{size:16,strokeWidth:1.8})," Anbefalede jobs til dig"]}),s.jsx("span",{children:"Opdateret for 5 min siden"})]}),s.jsxs("div",{className:"ai-jobs-grid",children:[Y?s.jsx("p",{className:"dash-loading",children:"Indlaeser anbefalinger..."}):null,!Y&&H.length===0?s.jsx("p",{className:"dash-loading",children:"Ingen jobanbefalinger fundet endnu."}):null,H.map((U,$)=>s.jsxs("article",{className:"ai-job-card",role:"button",tabIndex:0,onClick:()=>u(U.id,U.fromJobnet,"ai-agent"),onKeyDown:ce=>{(ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),u(U.id,U.fromJobnet,"ai-agent"))},children:[s.jsx("div",{className:`ai-job-rail ${$%3===2?"indigo":"teal"}`}),s.jsxs("div",{className:"ai-job-top",children:[U.companyLogoImage||U.logoUrl?s.jsx("img",{src:U.companyLogoImage||U.logoUrl,alt:U.companyName,className:"ai-company-logo"}):s.jsx("div",{className:"ai-company-logo-fallback",children:zv(U.companyName)}),s.jsxs("div",{className:"ai-match-col",children:[s.jsxs("div",{className:"ai-match-pill",children:[s.jsx(nv,{size:13,strokeWidth:1.8})," ",Dv($),"% Match"]}),s.jsxs("small",{children:["Via: ",_[0]?.escoName||"AI-agent"]})]})]}),s.jsxs("div",{className:"ai-job-title-wrap",children:[s.jsx("h4",{children:U.title}),s.jsxs("p",{children:[U.companyName," • ",U.address||"Lokation"]})]}),s.jsxs("div",{className:"ai-job-tags",children:[s.jsx("span",{children:U.occupationName||"Frontend"}),s.jsx("span",{children:U.fromJobnet?"Jobnet":"Arbejd.com"}),s.jsx("span",{children:U.candidateDistance!=null?`${Math.round(U.candidateDistance)} km`:"Remote"})]}),s.jsxs("div",{className:"ai-job-bottom",children:[s.jsx("span",{children:"Slået op for nyligt"}),s.jsxs("button",{type:"button",onClick:ce=>{ce.stopPropagation(),u(U.id,U.fromJobnet,"ai-agent")},children:["Læs mere ",s.jsx(Ol,{size:14,strokeWidth:1.8})]})]})]},U.id))]})]})]})]})}class Cv{constructor(c=He){this.http=c}generateApplication(c,u,o,m){let y=k.backendApiV2+"1.0.0/client/ai_handler/create_my_application",O={isStar:c,jobId:u,language:o,userInput:m};return this.http.post(y,O)}listGeneratedJobApplications(c){let u=k.backendApiV2+"1.0.0/client/ai_handler/list_created_job_application/"+c;return this.http.get(u)}listPredefinedUserInput(){let c=k.backendApiV2+"1.0.0/client/ai_handler/list_predefined_user_input";return this.http.get(c)}getJobApplication(c){let u=k.backendApiV2+"1.0.0/client/ai_handler/"+c;return this.http.get(u)}updateMyCvDescriptions(c){let u=k.backendApiV2+"1.0.0/client/ai_handler/update_my_cv_descriptions",o={language:c};return this.http.post(u,o)}updateStatesOnMyCvDescription(c,u,o){let m=k.backendApiV2+"1.0.0/client/ai_handler/update_states_on_my_cv_descriptions/"+c,y={state:u,subState:o};return this.http.put(m,y)}getMyCvDescriptions(){let c=k.backendApiV2+"1.0.0/client/ai_handler/get_my_cv_descriptions";return this.http.get(c)}submitJobApplicationRating(c,u,o){let m=k.backendApiV2+"1.0.0/client/ai_handler/job_application_rating",y={ai_generated_job_application_id:c,rating:u,rating_text:o};return this.http.post(m,y)}startApplicationExamination(c){const u=k.backendApiV2+"1.0.0/client/ai_handler/create_application_examination",o={ai_generated_job_application_id:c};return this.http.post(u,o)}getApplicationExamination(c){const u=k.backendApiV2+"1.0.0/client/ai_handler/application_examination/"+encodeURIComponent(c);return this.http.get(u)}getApplicationExaminationByJobApplicationId(c){const u=k.backendApiV2+"1.0.0/client/ai_handler/application_examination_by_job_application/"+c;return this.http.get(u)}}class Uv{constructor(c=He){this.http=c}searchForCertification(c){let u=encodeURIComponent(c),o=k.backendApiV2+`1.0.0/client/certificate?search_text=${u}`;return this.http.get(o)}saveCertification(c){let u=k.backendApiV2+"1.0.0/client/candidate_certificate",o={qualification_id:c};return this.http.post(u,o)}updateCertification(c){let u=k.backendApiV2+"1.0.0/client/candidate_certificate/"+c.id,o=c;return this.http.put(u,o)}removeCertification(c){let u=k.backendApiV2+"1.0.0/client/candidate_certificate/"+c;return this.http.delete(u)}addUnknownCertificate(c){let u=k.backendApiV2+"1.0.0/client/certificate",o={certificate_name:c};return this.http.post(u,o)}}class Ov{constructor(c=He){this.http=c}sendMyCvToEmail(){let c=k.backendApi+"api/1.1.0/candidate/sendPdf",u={};return this.http.post(c,u)}getMyCv(){let c=k.backendApiV2+"1.0.0/client/candidate/pdf";return this.http.get(c,{responseType:"blob"})}getMyCvV2(c){let u=k.backendApiV2+"1.0.0/client/candidate/pdf_url?language="+c;return this.http.get(u)}generateCv(c){let u=k.backendApiV2+"1.0.0/client/candidate/generateCv",o={language:c};return this.http.post(u,o)}}class wv{constructor(c=He,u=wl){this.http=c,this.localStorageService=u}uploadCv(c,u){const o=k.backendApiV2+"1.0.0/client/cv_upload";return this.http.post(o,c,{headers:{Authorization:`Bearer ${u}`}})}getCvUploadData(){let c=k.backendApiV2+"1.0.0/client/cv_upload/get_upload_cv";return this.http.get(c)}setProfileTextToDone(c){let u=k.backendApiV2+"1.0.0/client/cv_upload/profile_text_is_done/"+c,o={};return this.http.put(u,o)}setExperienceToDone(c){let u=k.backendApiV2+"1.0.0/client/cv_upload/experience_is_done/"+c,o={};return this.http.put(u,o)}setEducationToDone(c){let u=k.backendApiV2+"1.0.0/client/cv_upload/education_is_done/"+c,o={};return this.http.put(u,o)}setQualificationToDone(c){let u=k.backendApiV2+"1.0.0/client/cv_upload/qualification_is_done/"+c,o={};return this.http.put(u,o)}setCertificateToDone(c){let u=k.backendApiV2+"1.0.0/client/cv_upload/certificate_is_done/"+c,o={};return this.http.put(u,o)}setLanguageToDone(c){let u=k.backendApiV2+"1.0.0/client/cv_upload/language_is_done/"+c,o={};return this.http.put(u,o)}setDriversLicenseToDone(c){let u=k.backendApiV2+"1.0.0/client/cv_upload/drivers_license_is_done/"+c,o={};return this.http.put(u,o)}setCvUploadToDone(c){let u=k.backendApiV2+"1.0.0/client/cv_upload/cv_is_done/"+c,o={};return this.http.put(u,o)}}class Lv{constructor(c=He){this.http=c}getAllDriverLicenses(){let c=k.backendApi+"api/1.1.0/driversLicenses";return this.http.get(c)}updateDriverLicense(c,u){let o=k.backendApi+"api/1.1.0/candidate/driversLicense/"+c,m={};return this.http.put(o,m)}removeLanguage(c){let u=k.backendApiV2+"1.0.0/client/candidate_drivers_license/"+c;return this.http.delete(u)}saveDriverLicense(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_drivers_license",m={level:u,drivers_license_id:c.id};return this.http.post(o,m)}saveDriverLicenseV2(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_drivers_license",m={level:c,drivers_license_id:u};return this.http.post(o,m)}}class Rv{constructor(c=He){this.http=c}searchForEducations(c){let u=k.backendApi+"api/1.1.0/educations/search/"+c;return this.http.get(u)}searchForSchools(c){let u=k.backendApi+"api/1.1.0/institutions/search/"+c;return this.http.get(u)}saveEducation(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_education",m={comments:c.comments,education_disced_15:c.education.disced15,from_date:c.fromDate,to_date:c.toDate,institution_number:c.institution?.instNumber,is_current:c.isCurrent,language:u};return this.http.post(o,m)}removeEducation(c){let u=k.backendApiV2+"1.0.0/client/candidate_education/"+c;return this.http.delete(u)}updateEducation(c,u,o){let m=k.backendApiV2+"1.0.0/client/candidate_education/"+c,y={comments:u.comments,from_date:u.fromDate,to_date:u.toDate,is_current:u.isCurrent,language:o};return this.http.put(m,y)}getEducationOccupationSuggestions(c){let u=k.backendApi+"api/1.1.0/educations/suggestions/occupation/"+c;return this.http.get(u)}saveUnknownEducation(c){let u=k.backendApiV2+"1.0.0/client/education/save_unknown_education",o={education_name:c};return this.http.post(u,o)}saveEducationV2(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_education",m={comments:c.comments,education_disced_15:c.education_disced_15,from_date:c.from_date,to_date:c.to_date,institution_number:c.institution_number,is_current:c.is_current,language:u};return this.http.post(o,m)}}class Hv{constructor(c=He){this.http=c}getAllLanguages(){let c=k.backendApi+"api/1.1.0/languages";return this.http.get(c)}saveLanguage(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_language",m={language_id:u.id,level:c};return this.http.post(o,m)}updateLanguage(c,u,o){let m=k.backendApiV2+"1.0.0/client/candidate_language/"+c,y={level:u};return this.http.put(m,y)}removeLanguage(c){let u=k.backendApiV2+"1.0.0/client/candidate_language/"+c;return this.http.delete(u)}saveLanguageV2(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_language",m={language_id:u,level:c};return this.http.post(o,m)}}class Vv{constructor(c=He){this.http=c}searchForQualification(c){let u=k.backendApi+"api/1.1.0/qualifications/type/3/search/"+c;return this.http.get(u)}updateQualification(c,u){let o=k.backendApiV2+"1.0.0/client/candidate_qualification/"+c,m={level:u};return this.http.put(o,m)}saveQualification(c){let u=k.backendApiV2+"1.0.0/client/candidate_qualification",o={level:c.level,qualification_id:c.qualification.id};return this.http.post(u,o)}removeQualification(c){let u=k.backendApiV2+"1.0.0/client/candidate_qualification/"+c;return this.http.delete(u)}getQualificationsOccupationSuggestions(c,u){let o=k.backendApi+"api/1.1.0/qualifications/type/"+u+"/suggestions/occupation/"+c;return this.http.get(o)}addUnknownQualification(c){let u=k.backendApi+"api/1.1.0/qualifications/type/3/fromCandidate",o={name:c,type:3};return this.http.post(u,o)}saveQualificationV2(c){let u=k.backendApiV2+"1.0.0/client/candidate_qualification",o={level:c.level,qualification_id:c.qualification_id};return this.http.post(u,o)}}class qv{constructor(c=He){this.http=c}addUnknownOccupation(c){let u=k.backendApi+"api/1.1.0/occupations/fromCandidate",o={name:c};return this.http.post(u,o)}}class Bv{constructor(c=He){this.http=c}saveUnknownInstitution(c){let u=k.backendApiV2+"1.0.0/client/institution/save_unknown_institution",o={institution_name:c};return this.http.post(u,o)}}class Yv{constructor(c=new Ll,u=new Ov,o=new wv,m=new Ku,y=new Cv,O=new Rv,G=new Vv,w=new Uv,N=new Hv,V=new Lv,z=new Vh,q=new qv,Z=new Bv,ae=wl){this.candidateService=c,this.cvService=u,this.cvUploadService=o,this.subscriptionService=m,this.aiHandlerService=y,this.educationService=O,this.qualificationService=G,this.certificationService=w,this.languageService=N,this.driverLicenseService=V,this.escoService=z,this.occupationService=q,this.institutionService=Z,this.localStorageService=ae}escosCache=null;async getSnapshot(){const[c,u,o,m,y,O,G,w,N,V]=await Promise.allSettled([this.candidateService.getCandidate(),this.candidateService.getCandidatesExperiences(),this.candidateService.getCandidatesEducations(),this.candidateService.getCandidatesQualifications(),this.candidateService.getCandidatesCertifications(),this.candidateService.getCandidatesLanguages(),this.candidateService.getCandidatesDriverLicenses(),this.subscriptionService.getPaymentOverview(),this.cvUploadService.getCvUploadData(),this.aiHandlerService.getMyCvDescriptions()]);return{candidate:c.status==="fulfilled"?c.value:null,experiences:u.status==="fulfilled"?u.value:[],educations:o.status==="fulfilled"?o.value:[],skills:m.status==="fulfilled"?m.value:[],certifications:y.status==="fulfilled"?y.value:[],languages:O.status==="fulfilled"?O.value:[],driverLicenses:G.status==="fulfilled"?G.value:[],paymentOverview:w.status==="fulfilled"?w.value:null,cvUploadData:N.status==="fulfilled"?N.value:null,aiGeneratedCVDescription:V.status==="fulfilled"&&V.value?.id?V.value:null}}async setActiveSeeker(c,u,o){const m={...c,isActive:u};return this.candidateService.updateCandidate(m,o)}async updateCandidate(c,u){return this.candidateService.updateCandidate(c,u)}async generateCv(c){await this.cvService.generateCv(c)}async getCvDownloadUrl(c){return(await this.cvService.getMyCvV2(c)).url}async uploadCv(c,u){const o=await this.localStorageService.getAuthToken();if(!o)throw new Error("No auth token found.");await this.cvUploadService.uploadCv({base_64_cv_file:c,cv_file_type:u},o)}async optimizeCv(c){await this.aiHandlerService.updateMyCvDescriptions(c)}async updateExperience(c,u){await this.candidateService.updateExperience(c,u)}async updateEducation(c,u){const o={comments:c.comments,education:c.education,institution:c.institution,fromDate:new Date(c.fromDate),toDate:new Date(c.toDate),isCurrent:c.isCurrent};await this.educationService.updateEducation(c.id,o,u)}async updateCertification(c){await this.certificationService.updateCertification(c)}async updateLanguage(c){const u={id:c.language.id,isO639:c.language.isO639,name:c.language.name,ownName:c.language.ownName,priority:c.language.priority};await this.languageService.updateLanguage(c.id,c.level,u)}async removeExperience(c){await this.candidateService.removeExperience(c)}async removeEducation(c){await this.educationService.removeEducation(c)}async removeQualification(c){await this.qualificationService.removeQualification(c)}async removeCertification(c){await this.certificationService.removeCertification(c)}async removeLanguage(c){await this.languageService.removeLanguage(c)}async removeDriverLicense(c){await this.driverLicenseService.removeLanguage(c)}async getEscoSuggestions(c,u=25){this.escosCache||(this.escosCache=await this.escoService.listAllEscos());const o=c.trim().toLowerCase();return o?this.escosCache.filter(m=>m.preferedLabelDa.toLowerCase().includes(o)).slice(0,u):this.escosCache.slice(0,u)}async getLanguageOptions(){return(await this.languageService.getAllLanguages()).allLanguages??[]}async getDriverLicenseOptions(){return this.driverLicenseService.getAllDriverLicenses()}async createExperience(c,u){let o=c.escoId??null;if(!o&&c.occupationName?.trim()&&(o=(await this.occupationService.addUnknownOccupation(c.occupationName.trim())).id),!o)throw new Error("Vælg eller opret en stilling først.");await this.candidateService.saveExperienceV2({companyName:c.companyName,comments:c.comments,fromDate:c.fromDate,toDate:c.toDate,isCurrent:c.isCurrent,escoId:o},u)}async createEducation(c,u){let o=c.educationDisced15??null;if(!o&&c.educationName?.trim()&&(o=(await this.educationService.saveUnknownEducation(c.educationName)).disced15),!o)throw new Error("Vælg eller opret en uddannelse først.");let m=c.institutionNumber;!m&&c.institutionName?.trim()&&(m=(await this.institutionService.saveUnknownInstitution(c.institutionName.trim())).inst_number),await this.educationService.saveEducationV2({comments:c.comments,institution_number:m,from_date:c.fromDate,to_date:c.toDate,education_disced_15:o,is_current:c.isCurrent},u)}async createCertification(c){let u=c.certificateId??null;if(!u&&c.certificateName?.trim()&&(u=(await this.certificationService.addUnknownCertificate(c.certificateName.trim())).certificate_id),!u)throw new Error("Vælg eller opret et certifikat først.");await this.certificationService.saveCertification(u)}async createLanguage(c,u){await this.languageService.saveLanguageV2(u,c)}async getQualificationSuggestions(c){const u=c.trim();return u?this.qualificationService.searchForQualification(u):[]}async createQualification(c){let u=c.qualificationId?.trim()||"";if(!u&&c.qualificationName?.trim()&&(u=(await this.qualificationService.addUnknownQualification(c.qualificationName.trim())).id),!u)throw new Error("Vælg eller opret en kvalifikation først.");await this.qualificationService.saveQualificationV2({qualification_id:u,level:c.level})}async getEducationSuggestions(c){const u=c.trim();return u?this.educationService.searchForEducations(u):[]}async getSchoolSuggestions(c){const u=c.trim();return u?this.educationService.searchForSchools(u):[]}async getCertificationSuggestions(c){const u=c.trim();return u?this.certificationService.searchForCertification(u):[]}async createDriverLicense(c,u){await this.driverLicenseService.saveDriverLicenseV2(u,c)}}const Qv={candidate:null,experiences:[],educations:[],skills:[],certifications:[],languages:[],driverLicenses:[],paymentOverview:null,cvUploadData:null,aiGeneratedCVDescription:null},Gv=[{id:"e1",title:"Senior Frontend-udvikler",company:"Lunar",from:"2020-08-01",to:null,description:"Udvikling og vedligeholdelse af core-features i bankens app samt performance-optimering."},{id:"e2",title:"Web-udvikler",company:"Trustpilot",from:"2017-01-01",to:"2020-07-01",description:"Udviklede dashboards og analysevaerktojer i taet samarbejde med UX-teamet."}],Jv=[{id:"ed1",title:"Cand.it i Webudvikling",school:"IT-Universitetet i Kobenhavn",from:"2013-08-01",to:"2015-06-01",description:"Specialisering i webteknologier, databaser og brugercentreret design."},{id:"ed2",title:"Datamatiker",school:"KEA - Kobenhavns Erhvervsakademi",from:"2010-08-01",to:"2013-06-01",description:"Softwarekonstruktion, systemarkitektur og programmering i Java og C#."}];function rs(d){if(!d)return null;const c=d instanceof Date?d:new Date(d);return Number.isNaN(c.getTime())?null:c}function ph(d){const c=rs(d);return c?new Intl.DateTimeFormat("da-DK",{month:"short",year:"numeric"}).format(c):"Ukendt"}function yh(d,c,u){const o=ph(d),m=u?"Nu":ph(c);return`${o} - ${m}`}function Xv(d){const c=rs(d);return c?new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"long",year:"numeric"}).format(c):"Ikke angivet"}function bh(d){return[...d].sort((c,u)=>{const o=rs(c.fromDate)?.getTime()??0;return(rs(u.fromDate)?.getTime()??0)-o})}function Zv(d){return d.qualification?.name||"Kvalifikation"}function Kv(d){return d.qualification?.name||d.levelName||"Certificering"}function Wv(d){return d.driversLicense?.name||d.levelName||"Korekort"}function Fv(d){return d.levelName||"Niveau ukendt"}function $v({onLogout:d,onNavigate:c,onToggleTheme:u,theme:o}){const m=L.useMemo(()=>new Yv,[]),[y,O]=L.useState("standard"),[G,w]=L.useState(Qv),[N,V]=L.useState(!0);L.useEffect(()=>{let M=!0;return m.getSnapshot().then(ye=>{M&&w(ye)}).finally(()=>{M&&V(!1)}),()=>{M=!1}},[m]);const z=G.candidate,q=z?.firstName?.trim()||z?.name?.trim()||"Lasse",Z=z?.firstName||"Lasse",ae=z?.lastName||"Hansen",Y=z?.imageUrl||z?.image||"",fe=G.experiences.length>0?bh(G.experiences):[],ge=G.educations.length>0?bh(G.educations):[],je=G.skills,ie=G.languages,re=G.certifications,de=G.driverLicenses,K=ie.length>0?ie.map(M=>({id:M.id,name:M.language?.name||"Sprog",level:Fv(M)})):[{id:"da",name:"Dansk",level:"Modersmal"},{id:"en",name:"Engelsk",level:"Flydende"}];return s.jsxs("section",{className:`dash-root ${o==="dark"?"theme-dark":""}`,children:[s.jsx("div",{className:"dash-orb dash-orb-1"}),s.jsx("div",{className:"dash-orb dash-orb-2"}),s.jsx("div",{className:"dash-orb dash-orb-3"}),s.jsx(Rl,{active:"cv",onNavigate:c}),s.jsxs("main",{className:`dash-main custom-scrollbar cv-page ${y==="reference"?"cv-design-reference":""}`,children:[s.jsx(Hl,{name:q,imageUrl:Y||void 0,onLogout:d,theme:o,onToggleTheme:u,actions:s.jsxs("button",{type:"button",className:"cv-design-toggle",onClick:()=>O(M=>M==="standard"?"reference":"standard"),children:[y==="reference"?s.jsx(Ch,{size:16,strokeWidth:1.8}):s.jsx(Uh,{size:16,strokeWidth:1.8}),s.jsx("span",{children:y==="reference"?"Skift til standard design":"Skift til reference design"})]})}),s.jsxs("div",{className:"cv-head",children:[s.jsxs("div",{children:[s.jsx("h1",{children:"Dit CV"}),s.jsx("p",{children:"Handter dine faglige oplysninger, erfaringer og uddannelser."})]}),s.jsxs("button",{type:"button",className:"cv-edit-btn",children:[s.jsx(E0,{size:16,strokeWidth:1.8})," Rediger CV"]})]}),N?s.jsx("p",{className:"dash-loading",children:"Indlaeser CV..."}):null,s.jsxs("div",{className:"cv-layout",children:[s.jsxs("div",{className:"cv-left",children:[s.jsxs("article",{className:"cv-card",children:[s.jsx("div",{className:"cv-avatar-wrap",children:Y?s.jsx("img",{src:Y,alt:q,className:"cv-avatar"}):s.jsx("div",{className:"cv-avatar cv-avatar-fallback",children:q.slice(0,1).toUpperCase()})}),s.jsxs("div",{className:"cv-section-head",children:[s.jsx(sv,{size:18,strokeWidth:1.8}),s.jsx("h2",{children:"Personlige oplysninger"})]}),s.jsxs("div",{className:"cv-personal-list",children:[s.jsxs("div",{children:[s.jsx("span",{children:"Fornavn"}),s.jsx("strong",{children:Z})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Efternavn"}),s.jsx("strong",{children:ae})]}),s.jsxs("div",{children:[s.jsx("span",{children:"E-mail"}),s.jsx("strong",{children:z?.email||"lasse@eksempel.dk"})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Telefon"}),s.jsx("strong",{children:z?.phoneNumber||"+45 12 34 56 78"})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Fodselsdato"}),s.jsx("strong",{children:Xv(z?.birthday)})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Kon"}),s.jsx("strong",{children:z?.gender||"Mand"})]})]})]}),s.jsxs("article",{className:"cv-card",children:[s.jsxs("div",{className:"cv-section-head",children:[s.jsx(ev,{size:18,strokeWidth:1.8}),s.jsx("h2",{children:"Kvalifikationer"})]}),s.jsx("div",{className:"cv-chip-wrap",children:(je.length>0?je.map(Zv):["HTML & CSS","Tailwind CSS","JavaScript","React","UI/UX Design"]).slice(0,12).map(M=>s.jsx("span",{className:"cv-chip",children:M},M))})]}),s.jsxs("article",{className:"cv-card",children:[s.jsxs("div",{className:"cv-section-head",children:[s.jsx(Eh,{size:18,strokeWidth:1.8}),s.jsx("h2",{children:"Sprog"})]}),s.jsx("div",{className:"cv-language-list",children:K.map(M=>s.jsxs("div",{children:[s.jsx("strong",{children:M.name}),s.jsx("span",{children:M.level})]},M.id))})]}),s.jsxs("div",{className:"cv-mini-grid",children:[s.jsxs("article",{className:"cv-card",children:[s.jsxs("div",{className:"cv-section-head",children:[s.jsx(wg,{size:18,strokeWidth:1.8}),s.jsx("h2",{children:"Certificeringer"})]}),s.jsxs("ul",{className:"cv-list",children:[(re.length>0?re:[]).slice(0,4).map(M=>s.jsxs("li",{children:[s.jsx(za,{size:15,strokeWidth:1.8})," ",Kv(M)]},M.id)),re.length===0?s.jsxs(s.Fragment,{children:[s.jsxs("li",{children:[s.jsx(za,{size:15,strokeWidth:1.8})," AWS Certified Developer"]}),s.jsxs("li",{children:[s.jsx(za,{size:15,strokeWidth:1.8})," Certificeret Scrum Master"]})]}):null]})]}),s.jsxs("article",{className:"cv-card",children:[s.jsxs("div",{className:"cv-section-head",children:[s.jsx(Gg,{size:18,strokeWidth:1.8}),s.jsx("h2",{children:"Korekort"})]}),s.jsx("div",{className:"cv-chip-wrap",children:(de.length>0?de.map(Wv):["B (Almindelig bil)","A (Motorcykel)"]).map(M=>s.jsx("span",{className:"cv-chip",children:M},M))})]})]})]}),s.jsxs("div",{className:"cv-right",children:[s.jsxs("section",{children:[s.jsxs("div",{className:"cv-timeline-head",children:[s.jsx("div",{className:"cv-timeline-icon",children:s.jsx(Mh,{size:19,strokeWidth:1.8})}),s.jsx("h2",{children:"Erhvervserfaring"})]}),s.jsx("div",{className:"cv-timeline",children:(fe.length>0?fe:Gv).map((M,ye)=>{const Ae="occupation"in M?M.occupation?.name||"Stilling":M.title,ze="companyName"in M?M.companyName:M.company,R="comments"in M?M.comments:M.description,Q="fromDate"in M?M.fromDate:M.from,le="toDate"in M?M.toDate:M.to,I="isCurrent"in M?!!M.isCurrent:!1;return s.jsxs("article",{className:"cv-timeline-item",children:[s.jsx("div",{className:"cv-timeline-dot",children:s.jsx(Gu,{size:15,strokeWidth:1.8})}),s.jsxs("div",{className:"cv-timeline-card",children:[s.jsx("h3",{children:Ae}),s.jsxs("div",{className:"cv-meta",children:[s.jsx("strong",{children:ze}),s.jsx("span",{children:yh(Q,le,I)})]}),s.jsx("p",{children:R||"Ingen beskrivelse."})]})]},"id"in M?String(M.id):`exp-${ye}`)})})]}),s.jsx("div",{className:"cv-divider"}),s.jsxs("section",{children:[s.jsxs("div",{className:"cv-timeline-head",children:[s.jsx("div",{className:"cv-timeline-icon",children:s.jsx(u0,{size:19,strokeWidth:1.8})}),s.jsx("h2",{children:"Uddannelse"})]}),s.jsx("div",{className:"cv-timeline",children:(ge.length>0?ge:Jv).map((M,ye)=>{const Ae="education"in M?M.education?.name||"Uddannelse":M.title,ze="institution"in M?M.institution?.name||"Institution":M.school,R="comments"in M?M.comments:M.description,Q="fromDate"in M?M.fromDate:M.from,le="toDate"in M?M.toDate:M.to,I="isCurrent"in M?!!M.isCurrent:!1;return s.jsxs("article",{className:"cv-timeline-item",children:[s.jsx("div",{className:"cv-timeline-dot",children:s.jsx(Gu,{size:15,strokeWidth:1.8})}),s.jsxs("div",{className:"cv-timeline-card",children:[s.jsx("h3",{children:Ae}),s.jsxs("div",{className:"cv-meta",children:[s.jsx("strong",{children:ze}),s.jsx("span",{children:yh(Q,le,I)})]}),s.jsx("p",{children:R||"Ingen beskrivelse."})]})]},"id"in M?String(M.id):`edu-${ye}`)})})]})]})]})]})]})}class Iv{constructor(c=He){this.http=c}getNotificationSetting(){const c=k.backendApiV2+"2.0.0/client/notification/settings";return this.http.get(c)}createNotificationSetting(c){const u=k.backendApiV2+"2.0.0/client/notification/settings";return this.http.post(u,c)}updateNotificationSetting(c,u){const o=k.backendApiV2+"2.0.0/client/notification/settings/"+c;return this.http.put(o,u)}deleteNotificationSetting(c){const u=k.backendApiV2+"2.0.0/client/notification/settings/"+c;return this.http.delete(u)}getNewNotificationCount(){let c=k.backendApiV2+"1.0.0/client/notification/unseen_notifications";return this.http.get(c)}getNotifications(c,u){let o=k.backendApiV2+"1.0.0/client/notification/"+c+"/"+u;return this.http.get(o)}notificationSeenByUser(c){let u=k.backendApiV2+"1.0.0/client/notification/seen_by_user/"+c,o={};return this.http.put(u,o)}}class Pv{constructor(c=He,u=wl){this.http=c,this.localStorage=u}listSimulationPersonalities(){let c=k.backendApiV2+"client/simulation/1.0.0/list_simulation_personalities",u=new Ka().set("language","da");return this.http.get(c,{params:u})}getInterviewEvaluation(c){const u=k.backendApiV2+`client/simulation/1.0.0/interview_evaluation/${c}`;return this.http.get(u)}listInterviews(c=20,u=0){const o=k.backendApiV2+"client/job_simulator/1.0.0/list_interviews",m=new Ka().set("limit",c.toString()).set("offset",u.toString());return this.http.get(o,{params:m})}submitEvaluationRating(c,u,o){const m=k.backendApiV2+"client/simulation/1.0.0/evaluation_rating",y={interview_id:c,rating:u,rating_text:o};return this.http.post(m,y)}submitInterviewRating(c,u,o){const m=k.backendApiV2+"client/simulation/1.0.0/interview_rating",y={interview_id:c,rating:u,rating_text:o};return this.http.post(m,y)}}class ep{constructor(c=He){this.http=c}chatMessageThreads=[];getChatMessages(){let c=k.backendApi+"api/1.1.0/chatMessages/forCandidate/";return this.http.get(c)}sendMessage(c){let u=k.backendApi+"api/1.1.0/chatMessages/"+c.threadId+"/fromCandidate";return this.http.post(u,c)}markThreadRead(c){let u=k.backendApi+"api/1.1.0/chatMessages/markRead/"+c;return this.http.get(u)}}class tp{constructor(c=He){this.http=c}getUnreadMessages(){let c=k.backendApi+"api/1.1.0/chatMessages/getUnreadCount";return this.http.get(c)}}function us(d){if(!d)return 0;const u=(d instanceof Date?d:new Date(d)).getTime();return Number.isNaN(u)?0:u}function Bu(d,c){const u=d?.timeSent?new Date(d.timeSent):new Date,o=d?.seen?new Date(d.seen):void 0;return{id:d?.id,threadId:d?.threadId??c,timeSent:u,fromCandidate:!!d?.fromCandidate,text:d?.text??"",seen:o}}class qh{constructor(c=new ep,u=new tp,o=new Ll){this.chatMessagesService=c,this.messageService=u,this.candidateService=o}async getCandidateProfile(){try{const c=await this.candidateService.getCandidate(),u=c.firstName?.trim()||c.name?.trim()||"Lasse",o=c.imageUrl||c.image||void 0;return{name:u,imageUrl:o}}catch{return{name:"Lasse"}}}async getThreads(){return(await this.chatMessagesService.getChatMessages()??[]).map(u=>{const o=(u.allMessages??[]).map(y=>Bu(y,u.id));o.sort((y,O)=>us(y.timeSent)-us(O.timeSent));const m=u.latestMessage?Bu(u.latestMessage,u.id):o[o.length-1]??Bu(void 0,u.id);return{...u,allMessages:o,latestMessage:m}}).sort((u,o)=>us(o.latestMessage?.timeSent)-us(u.latestMessage?.timeSent))}async getUnreadCount(){const c=await this.messageService.getUnreadMessages();return Number(c?.unreadCount??0)}async sendMessage(c,u){const o={threadId:c,text:u.trim(),fromCandidate:!0,timeSent:new Date};return this.chatMessagesService.sendMessage(o)}async markThreadReadByMessageId(c){c&&await this.chatMessagesService.markThreadRead(c)}}function qn(d){return typeof d=="object"&&d!==null?d:null}function Et(d){return typeof d=="string"?d:""}function ap(d){return typeof d=="number"?d:null}function lp(d){const c=qn(d);if(!c)return null;const o=qn(c.jobPosting)??c,m=Et(o.id);return m?{id:m,title:Et(o.title),companyName:Et(o.companyName),address:Et(o.address),applicationDeadline:Et(o.applicationDeadline),candidateDistance:ap(o.candidateDistance),fromJobnet:!!o.fromJobnet,logoUrl:Et(o.logoUrl),companyLogoImage:Et(o.companyLogoImage)}:null}function np(d){const c=qn(d);return(Array.isArray(c?.interviews)?c.interviews:[]).map(o=>{const m=qn(o);if(!m)return null;const y=Et(m.id);return y?{id:y,jobName:Et(m.job_name)||"Interview",companyName:Et(m.company_name)||null,interviewDate:Et(m.interview_date)||null,recommendation:Et(m.recommendation)||null,isCompleted:!!m.is_completed}:null}).filter(o=>!!o).sort((o,m)=>{const y=o.interviewDate?new Date(o.interviewDate).getTime():0;return(m.interviewDate?new Date(m.interviewDate).getTime():0)-y}).slice(0,5)}function ip(d){const c=qn(d);return c?Array.isArray(c.searchList)?c.searchList:[]:[]}class sp{constructor(c=new Ll,u=new Iv,o=new Wu,m=new Ku,y=new Pv,O=new qh){this.candidateService=c,this.notificationService=u,this.jobService=o,this.subscriptionService=m,this.simulationService=y,this.messagesViewModel=O}async loadInitialData(){const[c,u,o,m,y,O]=await Promise.allSettled([this.candidateService.getCandidate(),this.notificationService.getNotifications(0,5),this.messagesViewModel.getThreads(),this.loadBestJobs(),this.subscriptionService.getPaymentOverview(),this.simulationService.listInterviews(5,0)]);return{candidate:c.status==="fulfilled"?c.value:null,notifications:u.status==="fulfilled"?u.value.slice(0,5):[],messages:o.status==="fulfilled"?o.value.slice(0,5):[],bestJobs:m.status==="fulfilled"?m.value:[],subscription:y.status==="fulfilled"?y.value:null,evaluations:O.status==="fulfilled"?np(O.value):[]}}async loadBestJobs(){const c=await this.jobService.getJobsV2(10,0,5,[]);return ip(c).map(o=>lp(o)).filter(o=>!!o).slice(0,5)}}const cp={bestJobs:[],candidate:null,evaluations:[],messages:[],notifications:[],subscription:null};function jh(d){return d.trim().slice(0,1).toUpperCase()||"A"}function up({onLogout:d,onNavigate:c,onOpenJobDetail:u,onToggleTheme:o,theme:m}){const y=L.useMemo(()=>new sp,[]),[O,G]=L.useState(cp),[w,N]=L.useState(!0);L.useEffect(()=>{let q=!0;return y.loadInitialData().then(Z=>{q&&G(Z)}).finally(()=>{q&&N(!1)}),()=>{q=!1}},[y]);const V=O.candidate?.firstName?.trim()||O.candidate?.name?.trim()||"Lasse",z=O.candidate?.imageUrl||O.candidate?.image||"";return s.jsxs("section",{className:`dash-root ${m==="dark"?"theme-dark":""}`,children:[s.jsx("div",{className:"dash-orb dash-orb-1"}),s.jsx("div",{className:"dash-orb dash-orb-2"}),s.jsx("div",{className:"dash-orb dash-orb-3"}),s.jsx(Rl,{active:"dashboard",onNavigate:c}),s.jsxs("main",{className:"dash-main custom-scrollbar",children:[s.jsx(Hl,{name:V,imageUrl:z||void 0,onLogout:d,theme:m,onToggleTheme:o}),s.jsxs("div",{className:"dash-welcome",children:[s.jsxs("h1",{children:["Velkommen tilbage ",V," ",s.jsx("span",{children:"👋"})]}),s.jsx("p",{children:"Her er, hvad der sker med din jobsøgning i dag."})]}),w?s.jsx("p",{className:"dash-loading",children:"Indlaeser dashboard..."}):null,s.jsxs("div",{className:"dash-grid",children:[s.jsxs("div",{className:"dash-grid-main",children:[s.jsxs("article",{className:"dash-card",children:[s.jsx("div",{className:"dash-card-head",children:s.jsx("h2",{children:"Anbefalet til dig"})}),s.jsx("div",{className:"dash-job-list",children:(O.bestJobs.length>0?O.bestJobs:[{id:"d1",title:"Senior Frontend-udvikler",companyName:"Lunar",address:"Kobenhavn, DK",applicationDeadline:"",candidateDistance:null,fromJobnet:!1,logoUrl:"",companyLogoImage:""},{id:"d2",title:"React-udvikler",companyName:"Pleo",address:"Remote",applicationDeadline:"",candidateDistance:null,fromJobnet:!1,logoUrl:"",companyLogoImage:""}]).slice(0,5).map(q=>s.jsxs("div",{className:"dash-job-item",role:"button",tabIndex:0,onClick:()=>u(q.id,!!q.fromJobnet,"dashboard"),onKeyDown:Z=>{(Z.key==="Enter"||Z.key===" ")&&(Z.preventDefault(),u(q.id,!!q.fromJobnet,"dashboard"))},children:[s.jsxs("div",{className:"dash-job-left",children:[s.jsx("div",{className:"dash-company-chip",children:jh(q.companyName)}),s.jsxs("div",{children:[s.jsx("h4",{children:q.title}),s.jsxs("p",{children:[q.companyName," • ",q.address||"Lokation ikke angivet"]})]})]}),s.jsx("button",{type:"button",className:"dash-job-arrow-btn","aria-label":"Se job",onClick:Z=>{Z.stopPropagation(),u(q.id,!!q.fromJobnet,"dashboard")},children:s.jsx(Ol,{size:16,strokeWidth:1.8})})]},q.id))})]}),s.jsxs("div",{className:"dash-split-grid",children:[s.jsxs("article",{className:"dash-card",children:[s.jsx("h3",{children:"Seneste beskeder"}),s.jsxs("div",{className:"dash-message-list",children:[(O.messages.length>0?O.messages:[]).slice(0,5).map(q=>s.jsxs("div",{className:"dash-message-item",children:[s.jsx("div",{className:"dash-avatar",children:jh(q.companyName||"A")}),s.jsxs("div",{children:[s.jsx("h4",{children:q.companyName||"Samtale"}),s.jsx("p",{children:q.latestMessage?.text||"Ingen besked endnu"})]})]},q.id)),O.messages.length===0?s.jsx("p",{className:"dash-muted",children:"Ingen beskeder endnu."}):null]})]}),s.jsxs("article",{className:"dash-card",children:[s.jsxs("div",{className:"dash-card-head dash-card-head-inline",children:[s.jsx("h3",{children:"Seneste simuleringer"}),s.jsx("button",{type:"button",className:"dash-icon-btn",children:s.jsx(w0,{size:16,strokeWidth:1.8})})]}),s.jsxs("div",{className:"dash-sim-list",children:[s.jsxs("div",{className:"dash-sim-item",children:[s.jsxs("div",{className:"dash-sim-left",children:[s.jsx("span",{className:"dash-sim-icon teal",children:s.jsx(dh,{size:16,strokeWidth:1.8})}),s.jsxs("div",{children:[s.jsx("h4",{children:"Teknisk samtale"}),s.jsx("p",{children:"Frontend-fokus"})]})]}),s.jsxs("div",{className:"dash-sim-right",children:[s.jsx("strong",{children:"92/100"}),s.jsx("div",{className:"dash-progress",children:s.jsx("span",{style:{width:"92%"}})})]})]}),s.jsxs("div",{className:"dash-sim-item",children:[s.jsxs("div",{className:"dash-sim-left",children:[s.jsx("span",{className:"dash-sim-icon purple",children:s.jsx(rv,{size:16,strokeWidth:1.8})}),s.jsxs("div",{children:[s.jsx("h4",{children:"Kulturelt match"}),s.jsx("p",{children:"Lunar Bank"})]})]}),s.jsxs("div",{className:"dash-sim-right",children:[s.jsx("strong",{children:"88/100"}),s.jsx("div",{className:"dash-progress",children:s.jsx("span",{style:{width:"88%"}})})]})]}),s.jsxs("div",{className:"dash-sim-item",children:[s.jsxs("div",{className:"dash-sim-left",children:[s.jsx("span",{className:"dash-sim-icon amber",children:s.jsx(R0,{size:16,strokeWidth:1.8})}),s.jsxs("div",{children:[s.jsx("h4",{children:"Systemdesign"}),s.jsx("p",{children:"Arkitektur"})]})]}),s.jsxs("div",{className:"dash-sim-right",children:[s.jsx("strong",{className:"warn",children:"65/100"}),s.jsx("div",{className:"dash-progress",children:s.jsx("span",{className:"warn",style:{width:"65%"}})})]})]}),s.jsxs("div",{className:"dash-sim-item",children:[s.jsxs("div",{className:"dash-sim-left",children:[s.jsx("span",{className:"dash-sim-icon blue",children:s.jsx(dh,{size:16,strokeWidth:1.8})}),s.jsxs("div",{children:[s.jsx("h4",{children:"Live-kodning"}),s.jsx("p",{children:"React.js"})]})]}),s.jsxs("div",{className:"dash-sim-right",children:[s.jsx("strong",{children:"95/100"}),s.jsx("div",{className:"dash-progress",children:s.jsx("span",{style:{width:"95%"}})})]})]}),s.jsxs("div",{className:"dash-sim-item",children:[s.jsxs("div",{className:"dash-sim-left",children:[s.jsx("span",{className:"dash-sim-icon gray",children:s.jsx(wh,{size:16,strokeWidth:1.8})}),s.jsxs("div",{children:[s.jsx("h4",{children:"HR-screening"}),s.jsx("p",{children:"Generelt"})]})]}),s.jsxs("div",{className:"dash-sim-right",children:[s.jsx("strong",{className:"na",children:"N/A"}),s.jsx("div",{className:"dash-progress"})]})]})]})]})]})]}),s.jsxs("div",{className:"dash-grid-side",children:[s.jsxs("article",{className:"dash-card dash-ai-card dash-ai-card-group",children:[s.jsx("div",{className:"dash-ai-peel"}),s.jsxs("div",{className:"dash-ai-content",children:[s.jsxs("div",{className:"dash-ai-head",children:[s.jsx(fs,{size:22,strokeWidth:1.8}),s.jsx("h3",{children:"AI-indsigter til dit CV"})]}),s.jsx("p",{children:"Vi analyserede dit seneste CV op imod dine målroller."}),s.jsxs("ul",{className:"dash-ai-list",children:[s.jsxs("li",{className:"dash-ai-item",children:[s.jsx("span",{className:"dash-ai-item-icon",children:s.jsx(Rg,{size:13,strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("strong",{children:"Kvantificer dine resultater"}),s.jsx("small",{children:'Tilføj tal til din rolle hos TechCorp (f.eks. \\"Forbedrede loadhastighed med 40%\\").'})]})]}),s.jsxs("li",{className:"dash-ai-item",children:[s.jsx("span",{className:"dash-ai-item-icon",children:s.jsx(Ug,{size:13,strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("strong",{children:"Omorganiser dine færdigheder"}),s.jsx("small",{children:"Flyt React & TypeScript til toppen baseret på aktive Jobagenter."})]})]}),s.jsxs("li",{className:"dash-ai-item",children:[s.jsx("span",{className:"dash-ai-item-icon",children:s.jsx(a0,{size:13,strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("strong",{children:"Tilføj manglende nøgleord"}),s.jsx("small",{children:'Inkluder \\"Tailwind CSS\\" for at matche 85% af dine anbefalede jobs.'})]})]}),s.jsxs("li",{className:"dash-ai-item dash-ai-xl-only",children:[s.jsx("span",{className:"dash-ai-item-icon",children:s.jsx(Rh,{size:13,strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("strong",{children:"Omskriv dit resumé"}),s.jsx("small",{children:"Gør din målsætning mere handlingsorienteret."})]})]}),s.jsxs("li",{className:"dash-ai-item dash-ai-xl-only",children:[s.jsx("span",{className:"dash-ai-item-icon",children:s.jsx(p0,{size:13,strokeWidth:2})}),s.jsxs("div",{children:[s.jsx("strong",{children:"Opdater porteføljelink"}),s.jsx("small",{children:"Dit GitHub-link gav en 404-fejl i vores test."})]})]})]}),s.jsx("button",{type:"button",children:"Anvend alle ændringer"})]})]}),s.jsxs("article",{className:"dash-card",children:[s.jsxs("div",{className:"dash-card-head dash-card-head-inline",children:[s.jsx("h3",{children:"Aktive Jobagenter"}),s.jsx("button",{type:"button",className:"dash-icon-btn",children:s.jsx(Lh,{size:16,strokeWidth:1.8})})]}),s.jsxs("div",{className:"dash-agent-list",children:[s.jsxs("div",{className:"dash-agent-item",children:[s.jsxs("div",{children:[s.jsx("span",{children:"Frontend-udvikler"}),s.jsxs("small",{children:[s.jsx(Vn,{size:13,strokeWidth:1.8})," Kobenhavn"]})]}),s.jsxs("label",{className:"dash-switch",children:[s.jsx("input",{type:"checkbox",defaultChecked:!0}),s.jsx("span",{})]})]}),s.jsxs("div",{className:"dash-agent-item",children:[s.jsxs("div",{children:[s.jsx("span",{children:"React-udvikler"}),s.jsxs("small",{children:[s.jsx(Ju,{size:13,strokeWidth:1.8})," Remote (EU)"]})]}),s.jsxs("label",{className:"dash-switch",children:[s.jsx("input",{type:"checkbox",defaultChecked:!0}),s.jsx("span",{})]})]}),s.jsxs("div",{className:"dash-agent-item muted",children:[s.jsxs("div",{children:[s.jsx("span",{children:"UI/UX-designer"}),s.jsxs("small",{children:[s.jsx(Vn,{size:13,strokeWidth:1.8})," Aarhus"]})]}),s.jsxs("label",{className:"dash-switch",children:[s.jsx("input",{type:"checkbox"}),s.jsx("span",{})]})]})]}),s.jsx("button",{type:"button",className:"dash-outline-btn",children:"Opret ny agent"})]})]})]})]})]})}function Hn(d){return d instanceof Date?d.toISOString():typeof d=="string"?d:""}function Sh(d){const c=[d.road,d.houseNum,d.zip,d.zipName].filter(u=>typeof u=="string"&&u.trim().length>0).join(" ");return{id:d.id,title:d.title??"Job",companyName:d.hiringCompanyName??"Ukendt virksomhed",occupationName:d.occupation?.name??"",address:c||d.zipName||"Ukendt adresse",description:d.description??"",applicationDeadline:Hn(d.applicationDeadline),websiteUrl:d.applicationUrl||d.hiringCompanyUrl||"",logoUrl:d.logoUrl||"",fromJobnet:!0,isSaved:!1,isApplied:!!d.applied,isFullTime:typeof d.isFullTime=="boolean"?d.isFullTime:null,workTimes:Array.isArray(d.workTimes)?d.workTimes:[],contactName:d.contactName??"",hiringCompanyName:d.hiringCompanyName??"",datePosted:Hn(d.datePosted),employmentDate:Hn(d.employmentDate),startAsSoonAsPossible:typeof d.startAsSoonAsPossible=="boolean"?d.startAsSoonAsPossible:null,numberOfPositions:typeof d.numberOfPositions=="number"?d.numberOfPositions:null}}function xh(d,c){return{id:d,title:c.title??"Job",companyName:c.companyName??"Ukendt virksomhed",occupationName:c.position??"",address:"",description:[c.descriptionIntro,c.descriptionPosition,c.descriptionOffer].filter(u=>typeof u=="string"&&u.trim().length>0).join(` `),applicationDeadline:Hn(c.applicationDeadline),websiteUrl:c.website??"",logoUrl:"",fromJobnet:!1,isSaved:!1,isApplied:!!c.appliedJob,isFullTime:null,workTimes:Array.isArray(c.workTimes)?c.workTimes:[],contactName:"",hiringCompanyName:c.companyName??"",datePosted:"",employmentDate:Hn(c.fromDate),startAsSoonAsPossible:null,numberOfPositions:typeof c.numberOfPositions=="number"?c.numberOfPositions:null}}class rp{constructor(c=new Wu){this.jobService=c}async getDetail(c,u){if(u)try{const o=await this.jobService.getJobNetJobDetail(c);return Sh(o)}catch{const o=await this.jobService.getJobDetail(c);return xh(c,o)}try{const o=await this.jobService.getJobDetail(c);return xh(c,o)}catch{const o=await this.jobService.getJobNetJobDetail(c);return Sh(o)}}async toggleBookmark(c,u,o){const m=u?"star":"arbejd.com";await this.jobService.bookmarkJobV2(c,o,m)}async markAsApplied(c,u){if(u){await this.jobService.toggleApplyJobnetjob(c,!0);return}await this.jobService.applyJob(c)}}function op(d){return d.trim().slice(0,1).toUpperCase()||"A"}function Yu(d){if(!d)return"Ikke angivet";const c=new Date(d);return Number.isNaN(c.getTime())?d:new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"short",year:"numeric"}).format(c)}function dp(d){if(!d.trim())return"";if(typeof window>"u")return d;const u=new DOMParser().parseFromString(d,"text/html");u.querySelectorAll("script, style, iframe, object, embed, link, meta").forEach(o=>o.remove());for(const o of Array.from(u.body.querySelectorAll("*")))for(const m of Array.from(o.attributes)){const y=m.name.toLowerCase(),G=m.value.trim().toLowerCase();if(y.startsWith("on")){o.removeAttribute(m.name);continue}if((y==="href"||y==="src")&&G.startsWith("javascript:")){o.removeAttribute(m.name);continue}(y==="style"||y==="srcdoc")&&o.removeAttribute(m.name)}return u.body.innerHTML}function fp(d){return d.isFullTime===!0?"Fuldtid":d.isFullTime===!1?"Deltid":d.workTimes.length>0?"Fleksibel arbejdstid":"Ikke oplyst"}function hp({fromJobnet:d,jobId:c,onBack:u,onLogout:o,onNavigate:m,onToggleTheme:y,theme:O}){const G=L.useMemo(()=>new rp,[]),w=L.useMemo(()=>new Fu,[]),[N,V]=L.useState({name:"Lasse"}),[z,q]=L.useState(null),[Z,ae]=L.useState(!0),[Y,fe]=L.useState(""),[ge,je]=L.useState(!1),[ie,re]=L.useState(!1),[de,K]=L.useState(!1),[M,ye]=L.useState(!1);L.useEffect(()=>{let Q=!0;async function le(){ae(!0),fe("");const[I,oe]=await Promise.allSettled([w.getCandidateProfile(),G.getDetail(c,d)]);Q&&(I.status==="fulfilled"&&V(I.value),oe.status==="fulfilled"?(q(oe.value),je(!!oe.value.isSaved),re(!!oe.value.isApplied)):(q(null),fe("Kunne ikke hente jobdetaljer. Proev igen.")),ae(!1))}return le(),()=>{Q=!1}},[G,d,c,w]);async function Ae(){if(!(!z||de)){K(!0);try{await G.toggleBookmark(z.id,z.fromJobnet,!ge),je(Q=>!Q)}finally{K(!1)}}}async function ze(){if(!(!z||ie||M)){ye(!0);try{await G.markAsApplied(z.id,z.fromJobnet),re(!0)}finally{ye(!1)}}}const R=L.useMemo(()=>dp(z?.description??""),[z?.description]);return s.jsxs("section",{className:`dash-root ${O==="dark"?"theme-dark":""}`,children:[s.jsx("div",{className:"dash-orb dash-orb-1"}),s.jsx("div",{className:"dash-orb dash-orb-2"}),s.jsx("div",{className:"dash-orb dash-orb-3"}),s.jsx(Rl,{active:"jobs",onNavigate:m}),s.jsxs("main",{className:"dash-main custom-scrollbar",children:[s.jsx(Hl,{name:N.name,imageUrl:N.imageUrl,onLogout:o,theme:O,onToggleTheme:y}),s.jsx("div",{className:"job-detail-back-row",children:s.jsxs("button",{type:"button",className:"job-detail-back-btn",onClick:u,children:[s.jsx(Mg,{size:15,strokeWidth:1.8}),s.jsx("span",{children:"Tilbage til jobs"})]})}),Z?s.jsx("p",{className:"dash-loading",children:"Indlaeser jobdetaljer..."}):null,!Z&&Y?s.jsx("p",{className:"dash-loading",children:Y}):null,!Z&&z?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"job-detail-header",children:[s.jsx("div",{className:"job-detail-logo-wrap",children:z.logoUrl?s.jsx("img",{src:z.logoUrl,alt:z.companyName,className:"job-detail-logo-image"}):s.jsx("div",{className:"job-detail-logo-fallback",children:op(z.companyName)})}),s.jsxs("div",{className:"job-detail-heading",children:[s.jsx("h1",{children:z.title||"Jobdetaljer"}),s.jsxs("div",{className:"job-detail-meta",children:[s.jsxs("span",{children:[s.jsx(Qu,{size:14,strokeWidth:1.8})," ",z.companyName||"Virksomhed"]}),s.jsxs("span",{children:[s.jsx(Vn,{size:14,strokeWidth:1.8})," ",z.address||"Lokation ikke angivet"]}),s.jsxs("span",{children:[s.jsx(Pg,{size:14,strokeWidth:1.8})," ",fp(z)]})]})]})]}),s.jsxs("div",{className:"job-detail-grid",children:[s.jsxs("section",{className:"job-detail-main-card dash-card",children:[s.jsxs("div",{className:"job-detail-section",children:[s.jsx("h2",{children:"Om rollen"}),R?s.jsx("div",{className:"job-detail-rich-html",dangerouslySetInnerHTML:{__html:R}}):s.jsx("p",{children:"Ingen jobbeskrivelse er tilgaengelig endnu."})]}),s.jsxs("div",{className:"job-detail-section",children:[s.jsx("h3",{children:"Jobinformation"}),s.jsxs("div",{className:"job-detail-info-grid",children:[s.jsxs("div",{children:[s.jsx("span",{children:"Ansøgningsfrist"}),s.jsx("strong",{children:Yu(z.applicationDeadline)})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Opslået"}),s.jsx("strong",{children:Yu(z.datePosted)})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Startdato"}),s.jsx("strong",{children:Yu(z.employmentDate)})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Stillinger"}),s.jsx("strong",{children:z.numberOfPositions??"Ikke angivet"})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Kontaktperson"}),s.jsx("strong",{children:z.contactName||"Ikke angivet"})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Kilde"}),s.jsx("strong",{children:z.fromJobnet?"Jobnet":"Arbejd.com"})]})]})]})]}),s.jsxs("aside",{className:"job-detail-side-col",children:[s.jsxs("article",{className:"dash-card job-detail-actions-card",children:[s.jsx("h2",{children:"Handlinger"}),s.jsxs("button",{type:"button",className:"job-detail-action-primary",children:[s.jsxs("span",{children:[s.jsx(fs,{size:16,strokeWidth:1.8})," Generer ansøgning"]}),s.jsx(Ol,{size:14,strokeWidth:1.8})]}),s.jsxs("button",{type:"button",className:"job-detail-action-secondary",children:[s.jsxs("span",{children:[s.jsx(B0,{size:16,strokeWidth:1.8})," Simuler jobsamtale"]}),s.jsx(Ol,{size:14,strokeWidth:1.8})]}),s.jsx("div",{className:"job-detail-action-divider"}),s.jsxs("button",{type:"button",className:"job-detail-text-action",onClick:()=>{Ae()},disabled:de,children:[s.jsx(Vg,{size:16,strokeWidth:1.8}),ge?"Fjern fra gemte jobs":"Gem job"]}),s.jsxs("button",{type:"button",className:"job-detail-text-action",children:[s.jsx(ds,{size:16,strokeWidth:1.8}),"Del via email"]}),z.websiteUrl?s.jsxs("a",{href:z.websiteUrl,target:"_blank",rel:"noreferrer",className:"job-detail-text-action link",children:[s.jsx(Eh,{size:16,strokeWidth:1.8}),"Åbn på nettet"]}):null,s.jsxs("button",{type:"button",className:ie?"job-detail-text-action success is-done":"job-detail-text-action success",onClick:()=>{ze()},disabled:ie||M,children:[s.jsx(za,{size:16,strokeWidth:1.8}),ie?"Markeret som søgt":"Marker som søgt"]})]}),s.jsxs("article",{className:"dash-card job-detail-company-card",children:[s.jsx("h3",{children:"Om virksomheden"}),s.jsxs("div",{className:"job-detail-company-list",children:[s.jsxs("div",{children:[s.jsx("span",{children:"Virksomhed"}),s.jsx("strong",{children:z.hiringCompanyName||z.companyName||"Ukendt"})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Stilling"}),s.jsx("strong",{children:z.occupationName||"Ikke angivet"})]}),s.jsxs("div",{children:[s.jsx("span",{children:"Website"}),s.jsx("strong",{children:z.websiteUrl||"Ikke angivet"})]})]})]})]})]})]}):null]})]})}const Nh=[2,4,6,8,10,12,24],mp=[{id:"job-1",title:"Senior Frontend-udvikler",companyName:"Lunar",occupationName:"Frontend",descriptionIntro:"Vi søger en erfaren frontend-udvikler til at lede vores nye team.",address:"Kobenhavn",time:"",applicationDeadline:"",candidateDistance:5,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:98},{id:"job-2",title:"UX/UI Designer (Deltid)",companyName:"Pleo",occupationName:"Design",descriptionIntro:"Hjælp os med at skabe brugervenlige flows for vores expense management platform.",address:"Kobenhavn",time:"",applicationDeadline:"",candidateDistance:12,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:95},{id:"job-3",title:"React-udvikler",companyName:"Zendesk",occupationName:"Frontend",descriptionIntro:"Bliv en del af vores kerne-team i Kobenhavn og byg software i topklasse.",address:"Kobenhavn",time:"",applicationDeadline:"",candidateDistance:2,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:89},{id:"job-4",title:"Full Stack Web-udvikler",companyName:"Trustpilot",occupationName:"Full stack",descriptionIntro:"Vi leder efter en passioneret Full Stack Developer (Node.js/React).",address:"Remote",time:"",applicationDeadline:"",candidateDistance:null,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:85},{id:"job-5",title:"Frontend-arkitekt",companyName:"Novo Nordisk",occupationName:"Frontend",descriptionIntro:"Vær med til at designe arkitekturen for interne medicinske data-platforme.",address:"Bagsvaerd",time:"",applicationDeadline:"",candidateDistance:18,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:72},{id:"job-6",title:"Product Designer",companyName:"Podimo",occupationName:"Design",descriptionIntro:"Vi mangler en skarp Product Designer til at forme fremtidens lytteoplevelse.",address:"Kobenhavn",time:"",applicationDeadline:"",candidateDistance:3,logoUrl:"",companyLogoImage:"",fromJobnet:!1,isSaved:!1,matchPercent:68}];function gp(d){return d.trim().slice(0,1).toUpperCase()||"A"}function Ah(d){return d.address.toLowerCase().includes("remote")?"Remote":typeof d.candidateDistance=="number"?`${Math.max(0,Math.round(d.candidateDistance))} km vaek`:d.address||"Lokation ikke angivet"}function vp(d){return d.companyLogoImage||d.logoUrl||""}function _h({item:d}){const[c,u]=L.useState(!1),o=vp(d);return o.length>0&&!c?s.jsx("div",{className:"jobs-card-logo jobs-card-logo-image-wrap",children:s.jsx("img",{src:o,alt:d.companyName||"Virksomhed",className:"jobs-card-logo-image",onError:()=>u(!0)})}):s.jsx("div",{className:"jobs-card-logo",children:gp(d.companyName)})}function pp(d){return d.workTypePartTime?"deltid":"fast"}function yp({onLogout:d,onNavigate:c,onOpenJobDetail:u,onToggleTheme:o,theme:m}){const y=L.useMemo(()=>new Fu,[]),[O,G]=L.useState({name:"Lasse"}),[w,N]=L.useState(""),[V,z]=L.useState("sidebar"),[q,Z]=L.useState("fast"),[ae,Y]=L.useState(15),[fe,ge]=L.useState(24),[je,ie]=L.useState(["Frontend-udvikler","UX/UI Designer"]),[re,de]=L.useState(""),[K,M]=L.useState([]),[ye,Ae]=L.useState(!0),[ze,R]=L.useState(6),Q=L.useCallback(async()=>{try{const h=await y.getTabItems("jobs");M(h),R(6)}catch{M([]),R(6)}},[y]);L.useEffect(()=>{let h=!0;async function S(){try{const C=await y.getSavedFilter();if(!h)return;Z(pp(C)),Y(C.workDistance??15),ge(C.partTimeHours??24),N(C.distanceCenterName??"")}catch{}if(await Q(),h){const C=await y.getCandidateProfile();h&&G(C),Ae(!1)}}return S(),()=>{h=!1}},[Q,y]);async function le(){const h={escoIds:[],workTypePermanent:q==="fast",workTypePartTime:q==="deltid",workDistance:ae,partTimeHours:q==="deltid"?fe:null,distanceCenterName:w,latitude:null,longitude:null};Ae(!0);try{const S=await y.applyFiltersAndGetJobs(h,{searchText:w,desiredTitles:je});M(S),R(6)}catch{M([]),R(6)}Ae(!1)}const I=K.length>0?K:mp,oe=I.slice(0,Math.min(ze,I.length)),_=zeh==="sidebar"?"top":"sidebar")}function U(h){ie(S=>S.filter(C=>C!==h))}function $(h){const S=h.trim();S&&(ie(C=>C.includes(S)?C:[...C,S]),de(""))}function ce(){R(h=>Math.min(h+6,I.length))}return s.jsxs("section",{className:`dash-root ${m==="dark"?"theme-dark":""}`,children:[s.jsx("div",{className:"dash-orb dash-orb-1"}),s.jsx("div",{className:"dash-orb dash-orb-2"}),s.jsx("div",{className:"dash-orb dash-orb-3"}),s.jsx(Rl,{active:"jobs",onNavigate:c}),s.jsxs("main",{className:"dash-main custom-scrollbar",children:[s.jsx(Hl,{name:O.name,imageUrl:O.imageUrl,onLogout:d,theme:m,onToggleTheme:o,actions:s.jsxs("button",{type:"button",className:"jobs-layout-toggle",onClick:H,children:[V==="sidebar"?s.jsx(Uh,{size:16,strokeWidth:1.8}):s.jsx(Ch,{size:16,strokeWidth:1.8}),s.jsx("span",{children:V==="sidebar"?"Top-layout":"Side-layout"})]})}),s.jsxs("div",{className:"jobs-page-head",children:[s.jsx("h1",{children:"Find dit naeste job"}),s.jsx("p",{children:"Sog og filtrer for at finde det perfekte match til din profil."})]}),V==="sidebar"?s.jsxs("div",{className:"jobs-grid",children:[s.jsxs("aside",{className:"jobs-filter dash-card",children:[s.jsxs("h2",{children:[s.jsx(Qu,{size:18,strokeWidth:1.8})," Filtre"]}),s.jsxs("div",{className:"jobs-filter-block",children:[s.jsx("label",{children:"Sog jobtitel eller virksomhed"}),s.jsxs("div",{className:"jobs-search-wrap",children:[s.jsx(Xu,{size:16,strokeWidth:1.8}),s.jsx("input",{type:"text",placeholder:"F.eks. Frontend Udvikler...",value:w,onChange:h=>N(h.target.value)})]})]}),s.jsxs("div",{className:"jobs-filter-block",children:[s.jsx("label",{children:"Onskede jobtitler"}),s.jsxs("div",{className:"jobs-title-picker",children:[s.jsxs("div",{className:"jobs-title-input-wrap",children:[je.map(h=>s.jsxs("span",{className:"jobs-title-chip",children:[h,s.jsx("button",{type:"button",onClick:()=>U(h),"aria-label":`Fjern ${h}`,children:s.jsx(mh,{size:12,strokeWidth:2})})]},h)),s.jsx("input",{type:"text",value:re,onChange:h=>de(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),$(re))},placeholder:"Sog og tilfoj flere jobtitler..."})]}),s.jsxs("div",{className:"jobs-title-suggestions",children:[s.jsxs("button",{type:"button",className:"jobs-title-option active",onClick:()=>$("Frontend-udvikler"),children:[s.jsx("span",{children:"Frontend-udvikler"}),s.jsx(za,{size:16,strokeWidth:1.8})]}),s.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Backend-udvikler"),children:s.jsx("span",{children:"Backend-udvikler"})}),s.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Full Stack-udvikler"),children:s.jsx("span",{children:"Full Stack-udvikler"})}),s.jsxs("button",{type:"button",className:"jobs-title-option active",onClick:()=>$("UX/UI Designer"),children:[s.jsx("span",{children:"UX/UI Designer"}),s.jsx(za,{size:16,strokeWidth:1.8})]}),s.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Product Manager"),children:s.jsx("span",{children:"Product Manager"})})]})]})]}),s.jsx("div",{className:"jobs-separator"}),s.jsxs("div",{className:"jobs-filter-block",children:[s.jsx("label",{children:"Ansaettelsestype"}),s.jsxs("div",{className:"jobs-radio-grid",children:[s.jsx("button",{type:"button",className:q==="fast"?"jobs-radio-btn active":"jobs-radio-btn",onClick:()=>Z("fast"),children:"Fast (Fuldtid)"}),s.jsx("button",{type:"button",className:q==="deltid"?"jobs-radio-btn active":"jobs-radio-btn",onClick:()=>Z("deltid"),children:"Deltid"})]})]}),s.jsxs("div",{className:"jobs-filter-block jobs-range-block",children:[s.jsxs("div",{className:"jobs-range-head",children:[s.jsx("label",{children:"Maks. afstand"}),s.jsxs("span",{children:[ae," km"]})]}),s.jsx("input",{type:"range",min:0,max:50,value:ae,onChange:h=>Y(Number(h.target.value))}),s.jsxs("div",{className:"jobs-range-labels",children:[s.jsx("span",{children:"0 km"}),s.jsx("span",{children:"50+ km"})]})]}),s.jsx("div",{className:"jobs-separator"}),s.jsxs("div",{className:"jobs-filter-block",children:[s.jsx("label",{children:"Timer (ved deltid)"}),s.jsx("p",{children:"Vaelg onsket timeantal pr. uge"}),s.jsx("div",{className:"jobs-hours-grid",children:Nh.map(h=>s.jsx("button",{type:"button",className:fe===h?"jobs-hour-btn active":"jobs-hour-btn",onClick:()=>ge(h),children:h},h))})]}),s.jsx("button",{type:"button",className:"jobs-apply-btn",onClick:()=>{le()},children:"Opdater resultater"})]}),s.jsxs("section",{className:"jobs-content",children:[s.jsxs("div",{className:"jobs-content-head",children:[s.jsx("h2",{children:"Seneste jobs"}),s.jsxs("span",{children:["Viser ",K.length>0?K.length:142," resultater"]})]}),ye?s.jsx("p",{className:"dash-loading",children:"Indlaeser jobs..."}):null,s.jsx("div",{className:"jobs-cards",children:oe.map(h=>s.jsxs("article",{className:"jobs-card",role:"button",tabIndex:0,onClick:()=>u(h.id,h.fromJobnet,"jobs"),onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),u(h.id,h.fromJobnet,"jobs"))},children:[s.jsx("div",{className:"jobs-card-top",children:s.jsx(_h,{item:h})}),s.jsxs("div",{className:"jobs-card-title",children:[s.jsx("h3",{children:h.title||"Stilling"}),s.jsx("p",{children:h.companyName||"Virksomhed"})]}),s.jsx("p",{className:"jobs-card-description",children:h.descriptionIntro||"Beskrivelse er ikke tilgaengelig endnu."}),s.jsxs("div",{className:"jobs-card-bottom",children:[s.jsxs("div",{className:"jobs-card-distance",children:[h.address.toLowerCase().includes("remote")?s.jsx(Ju,{size:15,strokeWidth:1.8}):s.jsx(fh,{size:15,strokeWidth:1.8}),s.jsx("span",{children:Ah(h)})]}),s.jsx("button",{type:"button",className:"jobs-card-arrow","aria-label":"Se job",onClick:S=>{S.stopPropagation(),u(h.id,h.fromJobnet,"jobs")},children:s.jsx(Ol,{size:16,strokeWidth:1.8})})]})]},h.id))}),s.jsx("div",{className:"jobs-load-more-wrap",children:s.jsx("button",{type:"button",className:"jobs-load-more",onClick:ce,disabled:!_,children:_?"Indlaes flere jobs":"Alle jobs er vist"})})]})]}):s.jsxs("section",{className:"jobs-top-layout",children:[s.jsxs("div",{className:"jobs-top-filters dash-card",children:[s.jsxs("div",{className:"jobs-top-filter-title",children:[s.jsx(Qu,{size:18,strokeWidth:1.8}),s.jsx("h2",{children:"Filtre"})]}),s.jsxs("div",{className:"jobs-top-controls",children:[s.jsxs("div",{className:"jobs-filter-block no-margin",children:[s.jsx("label",{children:"Sog noegleord eller virksomhed"}),s.jsxs("div",{className:"jobs-search-wrap",children:[s.jsx(Xu,{size:16,strokeWidth:1.8}),s.jsx("input",{type:"text",placeholder:"F.eks. Lunar, React...",value:w,onChange:h=>N(h.target.value)})]})]}),s.jsxs("div",{className:"jobs-filter-block no-margin",children:[s.jsx("label",{children:"Ansaettelsestype"}),s.jsxs("div",{className:"jobs-radio-grid",children:[s.jsx("button",{type:"button",className:q==="fast"?"jobs-radio-btn active":"jobs-radio-btn",onClick:()=>Z("fast"),children:"Fast"}),s.jsx("button",{type:"button",className:q==="deltid"?"jobs-radio-btn active":"jobs-radio-btn",onClick:()=>Z("deltid"),children:"Deltid"})]})]}),s.jsxs("div",{className:"jobs-filter-block no-margin jobs-top-range",children:[s.jsxs("div",{className:"jobs-range-head",children:[s.jsx("label",{children:"Maks. afstand"}),s.jsxs("span",{children:[ae," km"]})]}),s.jsx("input",{type:"range",min:0,max:50,value:ae,onChange:h=>Y(Number(h.target.value))})]}),s.jsx("button",{type:"button",className:"jobs-apply-btn jobs-top-apply",onClick:()=>{le()},children:"Opdater resultater"})]}),s.jsxs("div",{className:"jobs-filter-block no-margin",children:[s.jsx("label",{children:"Onskede jobtitler"}),s.jsxs("div",{className:"jobs-title-picker",children:[s.jsxs("div",{className:"jobs-title-input-wrap",children:[je.map(h=>s.jsxs("span",{className:"jobs-title-chip",children:[h,s.jsx("button",{type:"button",onClick:()=>U(h),"aria-label":`Fjern ${h}`,children:s.jsx(mh,{size:12,strokeWidth:2})})]},h)),s.jsx("input",{type:"text",value:re,onChange:h=>de(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),$(re))},placeholder:"Sog og tilfoj flere jobtitler..."})]}),s.jsxs("div",{className:"jobs-title-suggestions",children:[s.jsxs("button",{type:"button",className:"jobs-title-option active",onClick:()=>$("Frontend-udvikler"),children:[s.jsx("span",{children:"Frontend-udvikler"}),s.jsx(za,{size:16,strokeWidth:1.8})]}),s.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Backend-udvikler"),children:s.jsx("span",{children:"Backend-udvikler"})}),s.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Full Stack-udvikler"),children:s.jsx("span",{children:"Full Stack-udvikler"})}),s.jsxs("button",{type:"button",className:"jobs-title-option active",onClick:()=>$("UX/UI Designer"),children:[s.jsx("span",{children:"UX/UI Designer"}),s.jsx(za,{size:16,strokeWidth:1.8})]}),s.jsx("button",{type:"button",className:"jobs-title-option",onClick:()=>$("Product Manager"),children:s.jsx("span",{children:"Product Manager"})})]})]})]}),s.jsx("div",{className:"jobs-separator top-margin"}),s.jsxs("div",{className:"jobs-hours-row",children:[s.jsxs("div",{children:[s.jsx("label",{children:"Timer (ved deltid)"}),s.jsx("p",{children:"Vaelg onsket timeantal pr. uge"})]}),s.jsx("div",{className:"jobs-hours-grid",children:Nh.map(h=>s.jsx("button",{type:"button",className:fe===h?"jobs-hour-btn active":"jobs-hour-btn",onClick:()=>ge(h),children:h},h))})]})]}),s.jsxs("section",{className:"jobs-content",children:[s.jsxs("div",{className:"jobs-content-head",children:[s.jsx("h2",{children:"Seneste jobs"}),s.jsxs("span",{children:["Viser ",K.length>0?K.length:142," resultater"]})]}),ye?s.jsx("p",{className:"dash-loading",children:"Indlaeser jobs..."}):null,s.jsx("div",{className:"jobs-cards jobs-cards-top",children:oe.map(h=>s.jsxs("article",{className:"jobs-card",role:"button",tabIndex:0,onClick:()=>u(h.id,h.fromJobnet,"jobs"),onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),u(h.id,h.fromJobnet,"jobs"))},children:[s.jsx("div",{className:"jobs-card-top",children:s.jsx(_h,{item:h})}),s.jsxs("div",{className:"jobs-card-title",children:[s.jsx("h3",{children:h.title||"Stilling"}),s.jsx("p",{children:h.companyName||"Virksomhed"})]}),s.jsx("p",{className:"jobs-card-description",children:h.descriptionIntro||"Beskrivelse er ikke tilgaengelig endnu."}),s.jsxs("div",{className:"jobs-card-bottom",children:[s.jsxs("div",{className:"jobs-card-distance",children:[h.address.toLowerCase().includes("remote")?s.jsx(Ju,{size:15,strokeWidth:1.8}):s.jsx(fh,{size:15,strokeWidth:1.8}),s.jsx("span",{children:Ah(h)})]}),s.jsx("button",{type:"button",className:"jobs-card-arrow","aria-label":"Se job",onClick:S=>{S.stopPropagation(),u(h.id,h.fromJobnet,"jobs")},children:s.jsx(Ol,{size:16,strokeWidth:1.8})})]})]},h.id))}),s.jsx("div",{className:"jobs-load-more-wrap",children:s.jsx("button",{type:"button",className:"jobs-load-more",onClick:ce,disabled:!_,children:_?"Indlaes flere jobs":"Alle jobs er vist"})})]})]})]})]})}function os(d){if(!d)return 0;const u=(d instanceof Date?d:new Date(d)).getTime();return Number.isNaN(u)?0:u}function Bh(d){if(!d)return"--:--";const c=d instanceof Date?d:new Date(d);return Number.isNaN(c.getTime())?"--:--":new Intl.DateTimeFormat("da-DK",{hour:"2-digit",minute:"2-digit"}).format(c)}function bp(d){if(!d)return"";const c=d instanceof Date?d:new Date(d);if(Number.isNaN(c.getTime()))return"";const u=new Date,o=1440*60*1e3,m=Math.floor((new Date(u.getFullYear(),u.getMonth(),u.getDate()).getTime()-new Date(c.getFullYear(),c.getMonth(),c.getDate()).getTime())/o);return m===0?Bh(c):m===1?"I går":new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"short"}).format(c)}function jp(d){const c=new Date,u=new Date(d.getFullYear(),d.getMonth(),d.getDate()),o=new Date(c.getFullYear(),c.getMonth(),c.getDate()),m=Math.floor((o.getTime()-u.getTime())/(1440*60*1e3));return m===0?"I dag":m===1?"I går":new Intl.DateTimeFormat("da-DK",{day:"2-digit",month:"short"}).format(d)}function Ln(d){return!d.fromCandidate&&!d.seen}function kh(d){return d.allMessages.filter(Ln).length}function wn(d){return d.companyLogoUrl||d.companyLogo||""}function Sp(d){return{...d,allMessages:[...d.allMessages??[]].sort((c,u)=>os(c.timeSent)-os(u.timeSent))}}function Th(){const d=new Date,c=new Date(d.getTime()-600*1e3),u=new Date(d.getTime()-7200*1e3),o=(O,G,w,N,V)=>({threadId:O,text:G,fromCandidate:w,timeSent:N,seen:V}),m=[o("thread-techcorp","Hej Lasse! Mange tak for din ansøgning.",!1,u),o("thread-techcorp","Mange tak, det lyder rigtig spændende.",!0,new Date(u.getTime()+1200*1e3),new Date(u.getTime()+1800*1e3)),o("thread-techcorp","Vi vil gerne invitere dig til samtale.",!1,c)],y=[o("thread-lunar","Mange tak for din opdaterede portefølje.",!1,new Date(d.getTime()-1560*60*1e3),new Date(d.getTime()-1500*60*1e3))];return[{id:"thread-techcorp",companyLogo:"",companyLogoUrl:"https://i.pravatar.cc/150?img=33",companyName:"TechCorp A/S",candidateFirstName:"Lasse",candidateLastName:"Hansen",candidateImage:"https://i.pravatar.cc/150?img=11",allMessages:m,latestMessage:m[m.length-1],title:"Frontend Udvikler",messagesLoaded:!0,jobPostingId:"job-1",jobPosting:void 0,isFromSupport:!1},{id:"thread-lunar",companyLogo:"",companyLogoUrl:"https://i.pravatar.cc/150?img=12",companyName:"Lunar Bank",candidateFirstName:"Lasse",candidateLastName:"Hansen",candidateImage:"https://i.pravatar.cc/150?img=11",allMessages:y,latestMessage:y[y.length-1],title:"Senior UX Designer",messagesLoaded:!0,jobPostingId:"job-2",jobPosting:void 0,isFromSupport:!1}]}function xp({onLogout:d,onNavigate:c,onToggleTheme:u,theme:o}){const m=L.useMemo(()=>new qh,[]),[y,O]=L.useState("Lasse"),[G,w]=L.useState(void 0),[N,V]=L.useState([]),[z,q]=L.useState(!0),[Z,ae]=L.useState(""),[Y,fe]=L.useState("all"),[ge,je]=L.useState(""),[ie,re]=L.useState("");L.useEffect(()=>{let R=!0;async function Q(){q(!0);try{const le=await m.getCandidateProfile();R&&(O(le.name),w(le.imageUrl));const I=await m.getThreads();if(!R)return;const oe=(I.length>0?I:Th()).map(Sp);V(oe),je(oe[0]?.id||"")}catch{if(!R)return;const le=Th();V(le),je(le[0]?.id||"")}finally{R&&q(!1)}}return Q(),()=>{R=!1}},[m]);const de=L.useMemo(()=>{const R=Z.trim().toLowerCase();return N.filter(Q=>Y==="unread"&&kh(Q)===0||Y==="companies"&&Q.isFromSupport?!1:R?Q.companyName.toLowerCase().includes(R)||(Q.latestMessage?.text||"").toLowerCase().includes(R):!0)},[Y,Z,N]),K=L.useMemo(()=>N.find(R=>R.id===ge)||de[0],[ge,de,N]),M=L.useMemo(()=>[...K?.allMessages||[]].sort((R,Q)=>os(R.timeSent)-os(Q.timeSent)),[K]);async function ye(R){je(R.id);const Q=[...R.allMessages].reverse().find(le=>Ln(le));Q?.id&&(m.markThreadReadByMessageId(Q.id),V(le=>le.map(I=>I.id!==R.id?I:{...I,allMessages:I.allMessages.map(oe=>Ln(oe)?{...oe,seen:new Date}:oe)})))}async function Ae(){const R=N.flatMap(Q=>Q.allMessages).filter(Q=>Ln(Q)&&!!Q.id);await Promise.all(R.map(Q=>m.markThreadReadByMessageId(Q.id))),V(Q=>Q.map(le=>({...le,allMessages:le.allMessages.map(I=>Ln(I)?{...I,seen:new Date}:I)})))}async function ze(){const R=ie.trim();if(!K||!R)return;const Q={threadId:K.id,text:R,fromCandidate:!0,timeSent:new Date};re(""),V(le=>le.map(I=>{if(I.id!==K.id)return I;const oe=[...I.allMessages,Q];return{...I,allMessages:oe,latestMessage:Q}}));try{const le=await m.sendMessage(K.id,R);V(I=>I.map(oe=>{if(oe.id!==K.id)return oe;const H=[...oe.allMessages.filter(U=>U!==Q),le];return{...oe,allMessages:H,latestMessage:le}}))}catch{}}return s.jsxs("section",{className:`dash-root ${o==="dark"?"theme-dark":""}`,children:[s.jsx("div",{className:"dash-orb dash-orb-1"}),s.jsx("div",{className:"dash-orb dash-orb-2"}),s.jsx("div",{className:"dash-orb dash-orb-3"}),s.jsx(Rl,{active:"messages",onNavigate:c}),s.jsxs("main",{className:"dash-main custom-scrollbar msg-main",children:[s.jsx(Hl,{name:y,imageUrl:G,onLogout:d,theme:o,onToggleTheme:u}),s.jsxs("div",{className:"msg-head",children:[s.jsxs("div",{children:[s.jsx("h1",{children:"Beskeder"}),s.jsx("p",{children:"Kommuniker med virksomheder og hold styr på dine ansøgninger."})]}),s.jsxs("button",{type:"button",className:"msg-mark-btn",onClick:()=>{Ae()},children:[s.jsx(Xg,{size:16,strokeWidth:1.8})," Marker alle som læst"]})]}),s.jsxs("div",{className:"msg-layout",children:[s.jsxs("section",{className:"msg-threads",children:[s.jsxs("div",{className:"msg-threads-head",children:[s.jsxs("div",{className:"msg-search-wrap",children:[s.jsx(Xu,{size:16,strokeWidth:1.8}),s.jsx("input",{value:Z,onChange:R=>ae(R.target.value),type:"text",placeholder:"Søg i beskeder..."})]}),s.jsxs("div",{className:"msg-filter-row",children:[s.jsx("button",{type:"button",className:Y==="all"?"active":"",onClick:()=>fe("all"),children:"Alle"}),s.jsx("button",{type:"button",className:Y==="unread"?"active":"",onClick:()=>fe("unread"),children:"Ulæste"}),s.jsx("button",{type:"button",className:Y==="companies"?"active":"",onClick:()=>fe("companies"),children:"Virksomheder"})]})]}),s.jsxs("div",{className:"msg-thread-list custom-scrollbar",children:[z?s.jsx("p",{className:"dash-loading",children:"Indlaeser beskeder..."}):null,!z&&de.length===0?s.jsx("p",{className:"dash-loading",children:"Ingen tråde fundet."}):null,de.map(R=>{const Q=kh(R),le=K?.id===R.id,I=wn(R);return s.jsxs("button",{type:"button",className:le?"msg-thread-item active":"msg-thread-item",onClick:()=>{ye(R)},children:[s.jsxs("div",{className:"msg-thread-avatar-wrap",children:[I?s.jsx("img",{src:I,alt:R.companyName,className:"msg-thread-avatar"}):s.jsx("div",{className:"msg-thread-avatar-fallback",children:R.companyName.slice(0,1).toUpperCase()}),s.jsx("span",{className:"msg-thread-online"})]}),s.jsxs("div",{className:"msg-thread-content",children:[s.jsxs("div",{className:"msg-thread-row",children:[s.jsx("h3",{children:R.companyName}),s.jsx("span",{children:bp(R.latestMessage?.timeSent)})]}),s.jsx("p",{className:Q>0?"unread":"",children:R.latestMessage?.text||"Ingen beskeder endnu"}),s.jsx("small",{children:R.title||"Stilling"})]}),Q>0?s.jsx("div",{className:"msg-thread-unread",children:Q}):null]},R.id)})]})]}),s.jsxs("section",{className:"msg-chat",children:[s.jsx("div",{className:"msg-chat-head",children:K?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"msg-chat-company",children:[wn(K)?s.jsx("img",{src:wn(K),alt:K.companyName,className:"msg-chat-avatar"}):s.jsx("div",{className:"msg-chat-avatar-fallback",children:K.companyName.slice(0,1).toUpperCase()}),s.jsxs("div",{children:[s.jsx("h2",{children:K.companyName}),s.jsx("p",{children:K.title||"Rekruttering"})]})]}),s.jsxs("div",{className:"msg-chat-actions",children:[s.jsx("button",{type:"button","aria-label":"Ring",children:s.jsx(U0,{size:16,strokeWidth:1.8})}),s.jsx("button",{type:"button","aria-label":"Info",children:s.jsx(d0,{size:16,strokeWidth:1.8})})]})]}):s.jsx("h2",{children:"Vælg en samtale"})}),s.jsx("div",{className:"msg-chat-body custom-scrollbar",children:M.map((R,Q)=>{const le=R.timeSent instanceof Date?R.timeSent:new Date(R.timeSent),I=Q>0?M[Q-1]:void 0,oe=I?.timeSent instanceof Date?I.timeSent:I?.timeSent?new Date(I.timeSent):void 0,_=!oe||le.toDateString()!==oe.toDateString();return s.jsxs("div",{children:[_?s.jsx("div",{className:"msg-day-sep",children:jp(le)}):null,s.jsxs("div",{className:R.fromCandidate?"msg-bubble-row mine":"msg-bubble-row",children:[R.fromCandidate?null:wn(K)?s.jsx("img",{src:wn(K),alt:K.companyName,className:"msg-mini-avatar"}):s.jsx("div",{className:"msg-mini-avatar msg-mini-avatar-fallback",children:K.companyName.slice(0,1).toUpperCase()}),s.jsxs("div",{className:"msg-bubble-wrap",children:[s.jsx("span",{className:"msg-time",children:Bh(R.timeSent)}),s.jsx("div",{className:R.fromCandidate?"msg-bubble mine":"msg-bubble",children:R.text})]})]})]},`${R.threadId}-${Q}`)})}),s.jsx("div",{className:"msg-input-area",children:s.jsxs("div",{className:"msg-input-wrap",children:[s.jsx("button",{type:"button","aria-label":"Vedhæft",children:s.jsx(D0,{size:18,strokeWidth:1.8})}),s.jsx("textarea",{rows:1,value:ie,onChange:R=>re(R.target.value),onKeyDown:R=>{R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),ze())},placeholder:"Skriv din besked her..."}),s.jsx("button",{type:"button","aria-label":"Emoji",children:s.jsx(F0,{size:18,strokeWidth:1.8})}),s.jsxs("button",{type:"button",className:"msg-send-btn",onClick:()=>{ze()},children:["Send ",s.jsx(Z0,{size:15,strokeWidth:1.8})]})]})})]})]})]})]})}function Np(){const d=L.useMemo(()=>!!window.localStorage.getItem("token"),[]),c=L.useMemo(()=>window.localStorage.getItem("theme")==="dark"?"dark":"light",[]),[u,o]=L.useState(d),[m,y]=L.useState(c),[O,G]=L.useState("dashboard"),[w,N]=L.useState(null);function V(Y){(Y==="dashboard"||Y==="jobs"||Y==="cv"||Y==="messages"||Y==="agents"||Y==="ai-agent")&&G(Y)}function z(Y,fe,ge="jobs"){N({id:Y,fromJobnet:fe,returnPage:ge}),G("job-detail")}function q(){G(w?.returnPage??"jobs")}async function Z(){await wl.clearCredentials(),G("dashboard"),N(null),o(!1)}function ae(){y(Y=>{const fe=Y==="light"?"dark":"light";return window.localStorage.setItem("theme",fe),fe})}return u?O==="jobs"?s.jsx(yp,{onLogout:Z,onNavigate:V,onOpenJobDetail:z,theme:m,onToggleTheme:ae}):O==="cv"?s.jsx($v,{onLogout:Z,onNavigate:V,theme:m,onToggleTheme:ae}):O==="messages"?s.jsx(xp,{onLogout:Z,onNavigate:V,theme:m,onToggleTheme:ae}):O==="agents"||O==="ai-agent"?s.jsx(Ev,{onLogout:Z,onNavigate:V,onOpenJobDetail:z,theme:m,onToggleTheme:ae}):O==="job-detail"&&w?s.jsx(hp,{jobId:w.id,fromJobnet:w.fromJobnet,onBack:q,onLogout:Z,onNavigate:V,theme:m,onToggleTheme:ae}):s.jsx(up,{onLogout:Z,onNavigate:V,onOpenJobDetail:z,theme:m,onToggleTheme:ae}):s.jsx(yv,{onAuthenticated:()=>o(!0)})}jg.createRoot(document.getElementById("root")).render(s.jsx(L.StrictMode,{children:s.jsx(Np,{})}));