diff --git a/src/daemon/http/statics.rs b/src/daemon/http/statics.rs index c9b3bdb6f..ed40261fd 100644 --- a/src/daemon/http/statics.rs +++ b/src/daemon/http/statics.rs @@ -17,7 +17,7 @@ pub async fn statics(req: Request) -> RoutingResult { "/assets/favicon-f84116cb.ico" => Ok(HttpResponse::fav(FAVICON)), - "/assets/index-23df6ad0.js" => Ok(HttpResponse::js(JS_INDEX)), + "/assets/index-0659e542.js" => Ok(HttpResponse::js(JS_INDEX)), "/assets/en-d3d88bc8.js" => Ok(HttpResponse::js(JS_TRANSLATIONS_ENGLISH)), "/assets/de-aaa0f1e4.js" => Ok(HttpResponse::js(JS_TRANSLATIONS_GERMAN)), @@ -70,7 +70,7 @@ pub static INDEX: &[u8] = include_bytes!("../../../ui/index.html"); static FAVICON: &[u8] = include_bytes!("../../../ui/assets/favicon-f84116cb.ico"); -static JS_INDEX: &[u8] = include_bytes!("../../../ui/assets/index-23df6ad0.js"); +static JS_INDEX: &[u8] = include_bytes!("../../../ui/assets/index-0659e542.js"); static JS_TRANSLATIONS_GERMAN: &[u8] = include_bytes!("../../../ui/assets/de-aaa0f1e4.js"); static JS_TRANSLATIONS_ENGLISH: &[u8] = include_bytes!("../../../ui/assets/en-d3d88bc8.js"); diff --git a/ui/assets/index-23df6ad0.js b/ui/assets/index-0659e542.js similarity index 87% rename from ui/assets/index-23df6ad0.js rename to ui/assets/index-0659e542.js index 5fe74e410..1dc580878 100644 --- a/ui/assets/index-23df6ad0.js +++ b/ui/assets/index-0659e542.js @@ -35,9 +35,9 @@ var Dm=Object.defineProperty;var Im=(t,e,n)=>e in t?Dm(t,e,{enumerable:!0,config `),s=r.stack.split(` `),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=` `+i[a].replace(" at new "," at ");return t.displayName&&l.includes("")&&(l=l.replace("",t.displayName)),l}while(1<=a&&0<=o);break}}}finally{pa=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Rr(t):""}function lp(t){switch(t.tag){case 5:return Rr(t.type);case 16:return Rr("Lazy");case 13:return Rr("Suspense");case 19:return Rr("SuspenseList");case 0:case 2:case 15:return t=va(t.type,!1),t;case 11:return t=va(t.type.render,!1),t;case 1:return t=va(t.type,!0),t;default:return""}}function eo(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case zn:return"Fragment";case An:return"Portal";case Ga:return"Profiler";case ll:return"StrictMode";case Ja:return"Suspense";case Xa:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case gd:return(t.displayName||"Context")+".Consumer";case vd:return(t._context.displayName||"Context")+".Provider";case ul:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case cl:return e=t.displayName||null,e!==null?e:eo(t.type)||"Memo";case Ut:e=t._payload,t=t._init;try{return eo(t(e))}catch{}}return null}function up(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return eo(e);case 8:return e===ll?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function rn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function wd(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function cp(t){var e=wd(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ci(t){t._valueTracker||(t._valueTracker=cp(t))}function xd(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=wd(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function ds(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function to(t,e){var n=e.checked;return ee({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function hu(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=rn(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Sd(t,e){e=e.checked,e!=null&&ol(t,"checked",e,!1)}function no(t,e){Sd(t,e);var n=rn(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?ro(t,e.type,n):e.hasOwnProperty("defaultValue")&&ro(t,e.type,rn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function mu(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function ro(t,e,n){(e!=="number"||ds(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Dr=Array.isArray;function Kn(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i"+e.valueOf().toString()+"",e=_i.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Yr(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Ar={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dp=["Webkit","ms","Moz","O"];Object.keys(Ar).forEach(function(t){dp.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Ar[e]=Ar[t]})});function Nd(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Ar.hasOwnProperty(t)&&Ar[t]?(""+e).trim():e+"px"}function Cd(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Nd(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var fp=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ao(t,e){if(e){if(fp[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(E(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(E(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(E(61))}if(e.style!=null&&typeof e.style!="object")throw Error(E(62))}}function oo(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lo=null;function dl(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var uo=null,Gn=null,Jn=null;function gu(t){if(t=mi(t)){if(typeof uo!="function")throw Error(E(280));var e=t.stateNode;e&&(e=Bs(e),uo(t.stateNode,t.type,e))}}function _d(t){Gn?Jn?Jn.push(t):Jn=[t]:Gn=t}function jd(){if(Gn){var t=Gn,e=Jn;if(Jn=Gn=null,gu(t),e)for(t=0;t>>=0,t===0?32:31-(Ep(t)/Tp|0)|0}var ji=64,Oi=4194304;function Ir(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function ps(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,a=n&268435455;if(a!==0){var o=a&~i;o!==0?r=Ir(o):(s&=a,s!==0&&(r=Ir(s)))}else a=n&~i,a!==0?r=Ir(a):s!==0&&(r=Ir(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function fi(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ct(e),t[e]=n}function jp(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=$r),Cu=String.fromCharCode(32),_u=!1;function Qd(t,e){switch(t){case"keyup":return nv.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yd(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var $n=!1;function iv(t,e){switch(t){case"compositionend":return Yd(e);case"keypress":return e.which!==32?null:(_u=!0,Cu);case"textInput":return t=e.data,t===Cu&&_u?null:t;default:return null}}function sv(t,e){if($n)return t==="compositionend"||!wl&&Qd(t,e)?(t=Bd(),es=vl=Bt=null,$n=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ru(n)}}function Xd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Xd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function ef(){for(var t=window,e=ds();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ds(t.document)}return e}function xl(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function mv(t){var e=ef(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Xd(n.ownerDocument.documentElement,n)){if(r!==null&&xl(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=Du(n,s);var a=Du(n,r);i&&a&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Un=null,vo=null,br=null,go=!1;function Iu(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;go||Un==null||Un!==ds(r)||(r=Un,"selectionStart"in r&&xl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),br&&ti(br,r)||(br=r,r=ys(vo,"onSelect"),0Hn||(t.current=Eo[Hn],Eo[Hn]=null,Hn--)}function Z(t,e){Hn++,Eo[Hn]=t.current,t.current=e}var sn={},Te=on(sn),Me=on(!1),kn=sn;function ir(t,e){var n=t.type.contextTypes;if(!n)return sn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Le(t){return t=t.childContextTypes,t!=null}function xs(){K(Me),K(Te)}function Uu(t,e,n){if(Te.current!==sn)throw Error(E(168));Z(Te,e),Z(Me,n)}function cf(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(E(108,up(t)||"Unknown",i));return ee({},n,r)}function Ss(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||sn,kn=Te.current,Z(Te,t),Z(Me,Me.current),!0}function bu(t,e,n){var r=t.stateNode;if(!r)throw Error(E(169));n?(t=cf(t,e,kn),r.__reactInternalMemoizedMergedChildContext=t,K(Me),K(Te),Z(Te,t)):K(Me),Z(Me,n)}var Nt=null,Zs=!1,Pa=!1;function df(t){Nt===null?Nt=[t]:Nt.push(t)}function Cv(t){Zs=!0,df(t)}function ln(){if(!Pa&&Nt!==null){Pa=!0;var t=0,e=W;try{var n=Nt;for(W=1;t>=a,i-=a,Ct=1<<32-ct(e)+i|n<_?(D=N,N=null):D=N.sibling;var R=v(m,N,p[_],x);if(R===null){N===null&&(N=D);break}t&&N&&R.alternate===null&&e(m,N),h=s(R,h,_),T===null?S=R:T.sibling=R,T=R,N=D}if(_===p.length)return n(m,N),G&&fn(m,_),S;if(N===null){for(;__?(D=N,N=null):D=N.sibling;var q=v(m,N,R.value,x);if(q===null){N===null&&(N=D);break}t&&N&&q.alternate===null&&e(m,N),h=s(q,h,_),T===null?S=q:T.sibling=q,T=q,N=D}if(R.done)return n(m,N),G&&fn(m,_),S;if(N===null){for(;!R.done;_++,R=p.next())R=d(m,R.value,x),R!==null&&(h=s(R,h,_),T===null?S=R:T.sibling=R,T=R);return G&&fn(m,_),S}for(N=r(m,N);!R.done;_++,R=p.next())R=y(N,m,_,R.value,x),R!==null&&(t&&R.alternate!==null&&N.delete(R.key===null?_:R.key),h=s(R,h,_),T===null?S=R:T.sibling=R,T=R);return t&&N.forEach(function(he){return e(m,he)}),G&&fn(m,_),S}function k(m,h,p,x){if(typeof p=="object"&&p!==null&&p.type===zn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ni:e:{for(var S=p.key,T=h;T!==null;){if(T.key===S){if(S=p.type,S===zn){if(T.tag===7){n(m,T.sibling),h=i(T,p.props.children),h.return=m,m=h;break e}}else if(T.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ut&&Qu(S)===T.type){n(m,T.sibling),h=i(T,p.props),h.ref=Nr(m,T,p),h.return=m,m=h;break e}n(m,T);break}else e(m,T);T=T.sibling}p.type===zn?(h=xn(p.props.children,m.mode,x,p.key),h.return=m,m=h):(x=ls(p.type,p.key,p.props,null,m.mode,x),x.ref=Nr(m,h,p),x.return=m,m=x)}return a(m);case An:e:{for(T=p.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===p.containerInfo&&h.stateNode.implementation===p.implementation){n(m,h.sibling),h=i(h,p.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else e(m,h);h=h.sibling}h=za(p,m.mode,x),h.return=m,m=h}return a(m);case Ut:return T=p._init,k(m,h,T(p._payload),x)}if(Dr(p))return w(m,h,p,x);if(xr(p))return g(m,h,p,x);Fi(m,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,h!==null&&h.tag===6?(n(m,h.sibling),h=i(h,p),h.return=m,m=h):(n(m,h),h=Aa(p,m.mode,x),h.return=m,m=h),a(m)):n(m,h)}return k}var ar=wf(!0),xf=wf(!1),pi={},St=on(pi),si=on(pi),ai=on(pi);function gn(t){if(t===pi)throw Error(E(174));return t}function Ol(t,e){switch(Z(ai,e),Z(si,t),Z(St,pi),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:so(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=so(e,t)}K(St),Z(St,e)}function or(){K(St),K(si),K(ai)}function Sf(t){gn(ai.current);var e=gn(St.current),n=so(e,t.type);e!==n&&(Z(si,t),Z(St,n))}function Pl(t){si.current===t&&(K(St),K(si))}var J=on(0);function _s(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ra=[];function Rl(){for(var t=0;tn?n:4,t(!0);var r=Da.transition;Da.transition={};try{t(!1),e()}finally{W=n,Da.transition=r}}function Af(){return nt().memoizedState}function Pv(t,e,n){var r=tn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zf(t))$f(e,n);else if(n=pf(t,e,n,r),n!==null){var i=je();dt(n,t,r,i),Uf(n,e,r)}}function Rv(t,e,n){var r=tn(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zf(t))$f(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var a=e.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,ht(o,a)){var l=e.interleaved;l===null?(i.next=i,_l(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=pf(t,e,i,r),n!==null&&(i=je(),dt(n,t,r,i),Uf(n,e,r))}}function zf(t){var e=t.alternate;return t===X||e!==null&&e===X}function $f(t,e){Vr=js=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Uf(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,hl(t,n)}}var Os={readContext:tt,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useInsertionEffect:xe,useLayoutEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useMutableSource:xe,useSyncExternalStore:xe,useId:xe,unstable_isNewReconciler:!1},Dv={readContext:tt,useCallback:function(t,e){return gt().memoizedState=[t,e===void 0?null:e],t},useContext:tt,useEffect:Ku,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,is(4194308,4,Df.bind(null,e,t),n)},useLayoutEffect:function(t,e){return is(4194308,4,t,e)},useInsertionEffect:function(t,e){return is(4,2,t,e)},useMemo:function(t,e){var n=gt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=gt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Pv.bind(null,X,t),[r.memoizedState,t]},useRef:function(t){var e=gt();return t={current:t},e.memoizedState=t},useState:Yu,useDebugValue:Fl,useDeferredValue:function(t){return gt().memoizedState=t},useTransition:function(){var t=Yu(!1),e=t[0];return t=Ov.bind(null,t[1]),gt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=X,i=gt();if(G){if(n===void 0)throw Error(E(407));n=n()}else{if(n=e(),ve===null)throw Error(E(349));Tn&30||Tf(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Ku(Cf.bind(null,r,s,t),[t]),r.flags|=2048,ui(9,Nf.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=gt(),e=ve.identifierPrefix;if(G){var n=_t,r=Ct;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=oi++,0Hn||(t.current=Eo[Hn],Eo[Hn]=null,Hn--)}function Z(t,e){Hn++,Eo[Hn]=t.current,t.current=e}var sn={},Te=on(sn),Le=on(!1),kn=sn;function ir(t,e){var n=t.type.contextTypes;if(!n)return sn;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function Fe(t){return t=t.childContextTypes,t!=null}function xs(){K(Le),K(Te)}function Uu(t,e,n){if(Te.current!==sn)throw Error(E(168));Z(Te,e),Z(Le,n)}function cf(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(E(108,up(t)||"Unknown",i));return ee({},n,r)}function Ss(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||sn,kn=Te.current,Z(Te,t),Z(Le,Le.current),!0}function bu(t,e,n){var r=t.stateNode;if(!r)throw Error(E(169));n?(t=cf(t,e,kn),r.__reactInternalMemoizedMergedChildContext=t,K(Le),K(Te),Z(Te,t)):K(Le),Z(Le,n)}var Nt=null,Zs=!1,Pa=!1;function df(t){Nt===null?Nt=[t]:Nt.push(t)}function Cv(t){Zs=!0,df(t)}function ln(){if(!Pa&&Nt!==null){Pa=!0;var t=0,e=W;try{var n=Nt;for(W=1;t>=a,i-=a,Ct=1<<32-ct(e)+i|n<_?(D=N,N=null):D=N.sibling;var R=v(m,N,p[_],x);if(R===null){N===null&&(N=D);break}t&&N&&R.alternate===null&&e(m,N),h=s(R,h,_),T===null?S=R:T.sibling=R,T=R,N=D}if(_===p.length)return n(m,N),G&&fn(m,_),S;if(N===null){for(;__?(D=N,N=null):D=N.sibling;var q=v(m,N,R.value,x);if(q===null){N===null&&(N=D);break}t&&N&&q.alternate===null&&e(m,N),h=s(q,h,_),T===null?S=q:T.sibling=q,T=q,N=D}if(R.done)return n(m,N),G&&fn(m,_),S;if(N===null){for(;!R.done;_++,R=p.next())R=d(m,R.value,x),R!==null&&(h=s(R,h,_),T===null?S=R:T.sibling=R,T=R);return G&&fn(m,_),S}for(N=r(m,N);!R.done;_++,R=p.next())R=y(N,m,_,R.value,x),R!==null&&(t&&R.alternate!==null&&N.delete(R.key===null?_:R.key),h=s(R,h,_),T===null?S=R:T.sibling=R,T=R);return t&&N.forEach(function(he){return e(m,he)}),G&&fn(m,_),S}function k(m,h,p,x){if(typeof p=="object"&&p!==null&&p.type===zn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Ni:e:{for(var S=p.key,T=h;T!==null;){if(T.key===S){if(S=p.type,S===zn){if(T.tag===7){n(m,T.sibling),h=i(T,p.props.children),h.return=m,m=h;break e}}else if(T.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ut&&Qu(S)===T.type){n(m,T.sibling),h=i(T,p.props),h.ref=Nr(m,T,p),h.return=m,m=h;break e}n(m,T);break}else e(m,T);T=T.sibling}p.type===zn?(h=xn(p.props.children,m.mode,x,p.key),h.return=m,m=h):(x=ls(p.type,p.key,p.props,null,m.mode,x),x.ref=Nr(m,h,p),x.return=m,m=x)}return a(m);case An:e:{for(T=p.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===p.containerInfo&&h.stateNode.implementation===p.implementation){n(m,h.sibling),h=i(h,p.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else e(m,h);h=h.sibling}h=za(p,m.mode,x),h.return=m,m=h}return a(m);case Ut:return T=p._init,k(m,h,T(p._payload),x)}if(Dr(p))return w(m,h,p,x);if(xr(p))return g(m,h,p,x);Fi(m,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,h!==null&&h.tag===6?(n(m,h.sibling),h=i(h,p),h.return=m,m=h):(n(m,h),h=Aa(p,m.mode,x),h.return=m,m=h),a(m)):n(m,h)}return k}var ar=wf(!0),xf=wf(!1),pi={},St=on(pi),si=on(pi),ai=on(pi);function gn(t){if(t===pi)throw Error(E(174));return t}function Ol(t,e){switch(Z(ai,e),Z(si,t),Z(St,pi),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:so(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=so(e,t)}K(St),Z(St,e)}function or(){K(St),K(si),K(ai)}function Sf(t){gn(ai.current);var e=gn(St.current),n=so(e,t.type);e!==n&&(Z(si,t),Z(St,n))}function Pl(t){si.current===t&&(K(St),K(si))}var J=on(0);function _s(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Ra=[];function Rl(){for(var t=0;tn?n:4,t(!0);var r=Da.transition;Da.transition={};try{t(!1),e()}finally{W=n,Da.transition=r}}function Af(){return nt().memoizedState}function Pv(t,e,n){var r=tn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zf(t))$f(e,n);else if(n=pf(t,e,n,r),n!==null){var i=je();dt(n,t,r,i),Uf(n,e,r)}}function Rv(t,e,n){var r=tn(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zf(t))$f(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var a=e.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,ht(o,a)){var l=e.interleaved;l===null?(i.next=i,_l(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=pf(t,e,i,r),n!==null&&(i=je(),dt(n,t,r,i),Uf(n,e,r))}}function zf(t){var e=t.alternate;return t===X||e!==null&&e===X}function $f(t,e){Vr=js=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Uf(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,hl(t,n)}}var Os={readContext:tt,useCallback:xe,useContext:xe,useEffect:xe,useImperativeHandle:xe,useInsertionEffect:xe,useLayoutEffect:xe,useMemo:xe,useReducer:xe,useRef:xe,useState:xe,useDebugValue:xe,useDeferredValue:xe,useTransition:xe,useMutableSource:xe,useSyncExternalStore:xe,useId:xe,unstable_isNewReconciler:!1},Dv={readContext:tt,useCallback:function(t,e){return gt().memoizedState=[t,e===void 0?null:e],t},useContext:tt,useEffect:Ku,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,is(4194308,4,Df.bind(null,e,t),n)},useLayoutEffect:function(t,e){return is(4194308,4,t,e)},useInsertionEffect:function(t,e){return is(4,2,t,e)},useMemo:function(t,e){var n=gt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=gt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Pv.bind(null,X,t),[r.memoizedState,t]},useRef:function(t){var e=gt();return t={current:t},e.memoizedState=t},useState:Yu,useDebugValue:Fl,useDeferredValue:function(t){return gt().memoizedState=t},useTransition:function(){var t=Yu(!1),e=t[0];return t=Ov.bind(null,t[1]),gt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=X,i=gt();if(G){if(n===void 0)throw Error(E(407));n=n()}else{if(n=e(),ve===null)throw Error(E(349));Tn&30||Tf(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,Ku(Cf.bind(null,r,s,t),[t]),r.flags|=2048,ui(9,Nf.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=gt(),e=ve.identifierPrefix;if(G){var n=_t,r=Ct;n=(r&~(1<<32-ct(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=oi++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[wt]=e,t[ii]=r,Yf(t,e,!1,!1),e.stateNode=t;e:{switch(a=oo(n,r),n){case"dialog":Q("cancel",t),Q("close",t),i=r;break;case"iframe":case"object":case"embed":Q("load",t),i=r;break;case"video":case"audio":for(i=0;iur&&(e.flags|=128,r=!0,Cr(s,!1),e.lanes=4194304)}else{if(!r)if(t=_s(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Cr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!G)return Se(e),null}else 2*ie()-s.renderingStartTime>ur&&n!==1073741824&&(e.flags|=128,r=!0,Cr(s,!1),e.lanes=4194304);s.isBackwards?(a.sibling=e.child,e.child=a):(n=s.last,n!==null?n.sibling=a:e.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ie(),e.sibling=null,n=J.current,Z(J,r?n&1|2:n&1),e):(Se(e),null);case 22:case 23:return Vl(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?ze&1073741824&&(Se(e),e.subtreeFlags&6&&(e.flags|=8192)):Se(e),null;case 24:return null;case 25:return null}throw Error(E(156,e.tag))}function Uv(t,e){switch(kl(e),e.tag){case 1:return Le(e.type)&&xs(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return or(),K(Me),K(Te),Rl(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Pl(e),null;case 13:if(K(J),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(E(340));sr()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return K(J),null;case 4:return or(),null;case 10:return Cl(e.type._context),null;case 22:case 23:return Vl(),null;case 24:return null;default:return null}}var zi=!1,ke=!1,bv=typeof WeakSet=="function"?WeakSet:Set,j=null;function Zn(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ne(t,e,r)}else n.current=null}function Lo(t,e,n){try{n()}catch(r){ne(t,e,r)}}var sc=!1;function Vv(t,e){if(yo=vs,t=ef(),xl(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,c=0,f=0,d=t,v=null;t:for(;;){for(var y;d!==n||i!==0&&d.nodeType!==3||(o=a+i),d!==s||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(y=d.firstChild)!==null;)v=d,d=y;for(;;){if(d===t)break t;if(v===n&&++c===i&&(o=a),v===s&&++f===r&&(l=a),(y=d.nextSibling)!==null)break;d=v,v=d.parentNode}d=y}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(wo={focusedElem:t,selectionRange:n},vs=!1,j=e;j!==null;)if(e=j,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,j=t;else for(;j!==null;){e=j;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var g=w.memoizedProps,k=w.memoizedState,m=e.stateNode,h=m.getSnapshotBeforeUpdate(e.elementType===e.type?g:at(e.type,g),k);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var p=e.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(x){ne(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,j=t;break}j=e.return}return w=sc,sc=!1,w}function Hr(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Lo(e,n,s)}i=i.next}while(i!==r)}}function Ks(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Fo(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Jf(t){var e=t.alternate;e!==null&&(t.alternate=null,Jf(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[wt],delete e[ii],delete e[ko],delete e[Tv],delete e[Nv])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Xf(t){return t.tag===5||t.tag===3||t.tag===4}function ac(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Xf(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ao(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ws));else if(r!==4&&(t=t.child,t!==null))for(Ao(t,e,n),t=t.sibling;t!==null;)Ao(t,e,n),t=t.sibling}function zo(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(zo(t,e,n),t=t.sibling;t!==null;)zo(t,e,n),t=t.sibling}var ge=null,ot=!1;function At(t,e,n){for(n=n.child;n!==null;)eh(t,e,n),n=n.sibling}function eh(t,e,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Vs,n)}catch{}switch(n.tag){case 5:ke||Zn(n,e);case 6:var r=ge,i=ot;ge=null,At(t,e,n),ge=r,ot=i,ge!==null&&(ot?(t=ge,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ge.removeChild(n.stateNode));break;case 18:ge!==null&&(ot?(t=ge,n=n.stateNode,t.nodeType===8?Oa(t.parentNode,n):t.nodeType===1&&Oa(t,n),Xr(t)):Oa(ge,n.stateNode));break;case 4:r=ge,i=ot,ge=n.stateNode.containerInfo,ot=!0,At(t,e,n),ge=r,ot=i;break;case 0:case 11:case 14:case 15:if(!ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Lo(n,e,a),i=i.next}while(i!==r)}At(t,e,n);break;case 1:if(!ke&&(Zn(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ne(n,e,o)}At(t,e,n);break;case 21:At(t,e,n);break;case 22:n.mode&1?(ke=(r=ke)||n.memoizedState!==null,At(t,e,n),ke=r):At(t,e,n);break;default:At(t,e,n)}}function oc(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new bv),e.forEach(function(r){var i=Gv.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rt(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~s}if(r=i,r=ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wv(r/1960))-r,10t?16:t,Zt===null)var r=!1;else{if(t=Zt,Zt=null,Ds=0,U&6)throw Error(E(331));var i=U;for(U|=4,j=t.current;j!==null;){var s=j,a=s.child;if(j.flags&16){var o=s.deletions;if(o!==null){for(var l=0;lie()-Ul?wn(t,0):$l|=n),Fe(t,e)}function lh(t,e){e===0&&(t.mode&1?(e=Oi,Oi<<=1,!(Oi&130023424)&&(Oi=4194304)):e=1);var n=je();t=Dt(t,e),t!==null&&(fi(t,e,n),Fe(t,n))}function Kv(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),lh(t,n)}function Gv(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(e),lh(t,n)}var uh;uh=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Me.current)Ie=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Ie=!1,zv(t,e,n);Ie=!!(t.flags&131072)}else Ie=!1,G&&e.flags&1048576&&ff(e,Es,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ss(t,e),t=e.pendingProps;var i=ir(e,Te.current);er(e,n),i=Il(null,e,r,t,i,n);var s=Ml();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Le(r)?(s=!0,Ss(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jl(e),i.updater=Qs,e.stateNode=i,i._reactInternals=e,jo(e,r,t,n),e=Ro(null,e,r,!0,s,n)):(e.tag=0,G&&s&&Sl(e),Ce(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ss(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Xv(r),t=at(r,t),i){case 0:e=Po(null,e,r,t,n);break e;case 1:e=nc(null,e,r,t,n);break e;case 11:e=ec(null,e,r,t,n);break e;case 14:e=tc(null,e,r,at(r.type,t),n);break e}throw Error(E(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:at(r,i),Po(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:at(r,i),nc(t,e,r,i,n);case 3:e:{if(Bf(e),t===null)throw Error(E(387));r=e.pendingProps,s=e.memoizedState,i=s.element,vf(t,e),Cs(e,r,null,n);var a=e.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=lr(Error(E(423)),e),e=rc(t,e,r,n,i);break e}else if(r!==i){i=lr(Error(E(424)),e),e=rc(t,e,r,n,i);break e}else for($e=Jt(e.stateNode.containerInfo.firstChild),Ue=e,G=!0,lt=null,n=xf(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sr(),r===i){e=It(t,e,n);break e}Ce(t,e,r,n)}e=e.child}return e;case 5:return Sf(e),t===null&&No(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,a=i.children,xo(r,i)?a=null:s!==null&&xo(r,s)&&(e.flags|=32),qf(t,e),Ce(t,e,a,n),e.child;case 6:return t===null&&No(e),null;case 13:return Zf(t,e,n);case 4:return Ol(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=ar(e,null,r,n):Ce(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:at(r,i),ec(t,e,r,i,n);case 7:return Ce(t,e,e.pendingProps,n),e.child;case 8:return Ce(t,e,e.pendingProps.children,n),e.child;case 12:return Ce(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,a=i.value,Z(Ts,r._currentValue),r._currentValue=a,s!==null)if(ht(s.value,a)){if(s.children===i.children&&!Me.current){e=It(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Ot(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Co(s.return,n,e),o.lanes|=n;break}l=l.next}}else if(s.tag===10)a=s.type===e.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(E(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Co(a,n,e),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===e){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Ce(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,er(e,n),i=tt(i),r=r(i),e.flags|=1,Ce(t,e,r,n),e.child;case 14:return r=e.type,i=at(r,e.pendingProps),i=at(r.type,i),tc(t,e,r,i,n);case 15:return Hf(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:at(r,i),ss(t,e),e.tag=1,Le(r)?(t=!0,Ss(e)):t=!1,er(e,n),yf(e,r,i),jo(e,r,i,n),Ro(null,e,r,!0,t,n);case 19:return Qf(t,e,n);case 22:return Wf(t,e,n)}throw Error(E(156,e.tag))};function ch(t,e){return Ld(t,e)}function Jv(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ge(t,e,n,r){return new Jv(t,e,n,r)}function Wl(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xv(t){if(typeof t=="function")return Wl(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ul)return 11;if(t===cl)return 14}return 2}function nn(t,e){var n=t.alternate;return n===null?(n=Ge(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ls(t,e,n,r,i,s){var a=2;if(r=t,typeof t=="function")Wl(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case zn:return xn(n.children,i,s,e);case ll:a=8,i|=8;break;case Ga:return t=Ge(12,n,e,i|2),t.elementType=Ga,t.lanes=s,t;case Ja:return t=Ge(13,n,e,i),t.elementType=Ja,t.lanes=s,t;case Xa:return t=Ge(19,n,e,i),t.elementType=Xa,t.lanes=s,t;case yd:return Js(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case vd:a=10;break e;case gd:a=9;break e;case ul:a=11;break e;case cl:a=14;break e;case Ut:a=16,r=null;break e}throw Error(E(130,t==null?t:typeof t,""))}return e=Ge(a,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function xn(t,e,n,r){return t=Ge(7,t,r,e),t.lanes=n,t}function Js(t,e,n,r){return t=Ge(22,t,r,e),t.elementType=yd,t.lanes=n,t.stateNode={isHidden:!1},t}function Aa(t,e,n){return t=Ge(6,t,null,e),t.lanes=n,t}function za(t,e,n){return e=Ge(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function eg(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ya(0),this.expirationTimes=ya(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ya(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ql(t,e,n,r,i,s,a,o,l){return t=new eg(t,e,n,o,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ge(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jl(s),t}function tg(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mh)}catch(t){console.error(t)}}mh(),dd.exports=We;var ag=dd.exports,ph,pc=ag;ph=pc.createRoot,pc.hydrateRoot;var Ho=function(t){return t.split(".").reduce(function(e,n){return e.concat(e.length?e[e.length-1]+"."+n:n)},[])},og=function(t){return t!=null},Wo=function(t){return t&&t.meta&&t.meta.params},vc=function(t,e){return!Wo(e)||!og(e.meta.params[t])?{}:Object.keys(e.meta.params[t]).reduce(function(n,r){return n[r]=e.params[r],n},{})};function vh(t,e){var n=t.meta&&t.meta&&t.meta.options||{},r=e?Ho(e.name):[],i=Ho(t.name),s=Math.min(r.length,i.length);function a(){var d,v=function(){var w=r[d],g=i[d];if(w!==g)return{value:d};var k=vc(w,t),m=vc(g,e);if(Object.keys(k).length!==Object.keys(m).length)return{value:d};if(Object.keys(k).length===0)return"continue";var h=Object.keys(k).some(function(p){return m[p]!==k[p]});if(h)return{value:d}};for(d=0;d0?r[o-1]:"";return{intersection:f,toDeactivate:l,toActivate:c}}/*! ***************************************************************************** +`+s.stack}return{value:t,source:e,stack:i,digest:null}}function La(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function Oo(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var Lv=typeof WeakMap=="function"?WeakMap:Map;function bf(t,e,n){n=Ot(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Rs||(Rs=!0,$o=r),Oo(t,e)},n}function Vf(t,e,n){n=Ot(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){Oo(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Oo(t,e),typeof r!="function"&&(en===null?en=new Set([this]):en.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),n}function Gu(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new Lv;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=Yv.bind(null,t,e,n),e.then(t,t))}function Ju(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Xu(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Ot(-1,1),e.tag=2,Xt(n,e,1))),n.lanes|=1),t)}var Fv=Lt.ReactCurrentOwner,Me=!1;function Ce(t,e,n,r){e.child=t===null?xf(e,null,n,r):ar(e,t.child,n,r)}function ec(t,e,n,r,i){n=n.render;var s=e.ref;return er(e,i),r=Il(t,e,n,r,s,i),n=Ml(),t!==null&&!Me?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,It(t,e,i)):(G&&n&&Sl(e),e.flags|=1,Ce(t,e,r,i),e.child)}function tc(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!Wl(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,Hf(t,e,s,r,i)):(t=ls(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:ti,n(a,r)&&t.ref===e.ref)return It(t,e,i)}return e.flags|=1,t=nn(s,r),t.ref=e.ref,t.return=e,e.child=t}function Hf(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(ti(s,r)&&t.ref===e.ref)if(Me=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(Me=!0);else return e.lanes=t.lanes,It(t,e,i)}return Po(t,e,n,r,i)}function Wf(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Z(Qn,ze),ze|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,Z(Qn,ze),ze|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Z(Qn,ze),ze|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,Z(Qn,ze),ze|=r;return Ce(t,e,i,n),e.child}function qf(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Po(t,e,n,r,i){var s=Fe(n)?kn:Te.current;return s=ir(e,s),er(e,i),n=Il(t,e,n,r,s,i),r=Ml(),t!==null&&!Me?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,It(t,e,i)):(G&&r&&Sl(e),e.flags|=1,Ce(t,e,n,i),e.child)}function nc(t,e,n,r,i){if(Fe(n)){var s=!0;Ss(e)}else s=!1;if(er(e,i),e.stateNode===null)ss(t,e),yf(e,n,r),jo(e,n,r,i),r=!0;else if(t===null){var a=e.stateNode,o=e.memoizedProps;a.props=o;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=tt(c):(c=Fe(n)?kn:Te.current,c=ir(e,c));var f=n.getDerivedStateFromProps,d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||l!==c)&&Zu(e,a,r,c),bt=!1;var v=e.memoizedState;a.state=v,Cs(e,r,a,i),l=e.memoizedState,o!==r||v!==l||Le.current||bt?(typeof f=="function"&&(_o(e,n,f,r),l=e.memoizedState),(o=bt||Bu(e,n,o,r,v,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),a.props=r,a.state=l,a.context=c,r=o):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,vf(t,e),o=e.memoizedProps,c=e.type===e.elementType?o:at(e.type,o),a.props=c,d=e.pendingProps,v=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=tt(l):(l=Fe(n)?kn:Te.current,l=ir(e,l));var y=n.getDerivedStateFromProps;(f=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||v!==l)&&Zu(e,a,r,l),bt=!1,v=e.memoizedState,a.state=v,Cs(e,r,a,i);var w=e.memoizedState;o!==d||v!==w||Le.current||bt?(typeof y=="function"&&(_o(e,n,y,r),w=e.memoizedState),(c=bt||Bu(e,n,c,r,v,w,l)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,w,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,w,l)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&v===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&v===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=w),a.props=r,a.state=w,a.context=l,r=c):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&v===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&v===t.memoizedState||(e.flags|=1024),r=!1)}return Ro(t,e,n,r,s,i)}function Ro(t,e,n,r,i,s){qf(t,e);var a=(e.flags&128)!==0;if(!r&&!a)return i&&bu(e,n,!1),It(t,e,s);r=e.stateNode,Fv.current=e;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&a?(e.child=ar(e,t.child,null,s),e.child=ar(e,null,o,s)):Ce(t,e,o,s),e.memoizedState=r.state,i&&bu(e,n,!0),e.child}function Bf(t){var e=t.stateNode;e.pendingContext?Uu(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Uu(t,e.context,!1),Ol(t,e.containerInfo)}function rc(t,e,n,r,i){return sr(),El(i),e.flags|=256,Ce(t,e,n,r),e.child}var Do={dehydrated:null,treeContext:null,retryLane:0};function Io(t){return{baseLanes:t,cachePool:null,transitions:null}}function Zf(t,e,n){var r=e.pendingProps,i=J.current,s=!1,a=(e.flags&128)!==0,o;if((o=a)||(o=t!==null&&t.memoizedState===null?!1:(i&2)!==0),o?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),Z(J,i&1),t===null)return No(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=r.children,t=r.fallback,s?(r=e.mode,s=e.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Js(a,r,0,null),t=xn(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Io(n),e.memoizedState=Do,t):Al(e,a));if(i=t.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return Av(t,e,a,r,o,i,n);if(s){s=r.fallback,a=e.mode,i=t.child,o=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=nn(i,l),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=nn(o,s):(s=xn(s,a,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,a=t.child.memoizedState,a=a===null?Io(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=t.childLanes&~n,e.memoizedState=Do,r}return s=t.child,t=s.sibling,r=nn(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Al(t,e){return e=Js({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Ai(t,e,n,r){return r!==null&&El(r),ar(e,t.child,null,n),t=Al(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Av(t,e,n,r,i,s,a){if(n)return e.flags&256?(e.flags&=-257,r=La(Error(E(422))),Ai(t,e,a,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Js({mode:"visible",children:r.children},i,0,null),s=xn(s,i,a,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&ar(e,t.child,null,a),e.child.memoizedState=Io(a),e.memoizedState=Do,s);if(!(e.mode&1))return Ai(t,e,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(E(419)),r=La(s,r,void 0),Ai(t,e,a,r)}if(o=(a&t.childLanes)!==0,Me||o){if(r=ve,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Dt(t,i),dt(r,t,i,-1))}return Hl(),r=La(Error(E(421))),Ai(t,e,a,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=Kv.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,$e=Jt(i.nextSibling),Ue=e,G=!0,lt=null,t!==null&&(Qe[Ye++]=Ct,Qe[Ye++]=_t,Qe[Ye++]=En,Ct=t.id,_t=t.overflow,En=e),e=Al(e,r.children),e.flags|=4096,e)}function ic(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Co(t.return,e,n)}function Fa(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Qf(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Ce(t,e,r.children,n),r=J.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&ic(t,n,e);else if(t.tag===19)ic(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(Z(J,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&_s(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Fa(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&_s(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Fa(e,!0,n,null,s);break;case"together":Fa(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ss(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function It(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Nn|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(E(153));if(e.child!==null){for(t=e.child,n=nn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=nn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function zv(t,e,n){switch(e.tag){case 3:Bf(e),sr();break;case 5:Sf(e);break;case 1:Fe(e.type)&&Ss(e);break;case 4:Ol(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;Z(Ts,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(Z(J,J.current&1),e.flags|=128,null):n&e.child.childLanes?Zf(t,e,n):(Z(J,J.current&1),t=It(t,e,n),t!==null?t.sibling:null);Z(J,J.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return Qf(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Z(J,J.current),r)break;return null;case 22:case 23:return e.lanes=0,Wf(t,e,n)}return It(t,e,n)}var Yf,Mo,Kf,Gf;Yf=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Mo=function(){};Kf=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,gn(St.current);var s=null;switch(n){case"input":i=to(t,i),r=to(t,r),s=[];break;case"select":i=ee({},i,{value:void 0}),r=ee({},r,{value:void 0}),s=[];break;case"textarea":i=io(t,i),r=io(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=ws)}ao(n,r);var a;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Qr.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(o=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==o&&(l!=null||o!=null))if(c==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Qr.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Q("scroll",t),s||o===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};Gf=function(t,e,n,r){n!==r&&(e.flags|=4)};function Cr(t,e){if(!G)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Se(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function $v(t,e,n){var r=e.pendingProps;switch(kl(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Se(e),null;case 1:return Fe(e.type)&&xs(),Se(e),null;case 3:return r=e.stateNode,or(),K(Le),K(Te),Rl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Li(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,lt!==null&&(Vo(lt),lt=null))),Mo(t,e),Se(e),null;case 5:Pl(e);var i=gn(ai.current);if(n=e.type,t!==null&&e.stateNode!=null)Kf(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(E(166));return Se(e),null}if(t=gn(St.current),Li(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[wt]=e,r[ii]=s,t=(e.mode&1)!==0,n){case"dialog":Q("cancel",r),Q("close",r);break;case"iframe":case"object":case"embed":Q("load",r);break;case"video":case"audio":for(i=0;i<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[wt]=e,t[ii]=r,Yf(t,e,!1,!1),e.stateNode=t;e:{switch(a=oo(n,r),n){case"dialog":Q("cancel",t),Q("close",t),i=r;break;case"iframe":case"object":case"embed":Q("load",t),i=r;break;case"video":case"audio":for(i=0;iur&&(e.flags|=128,r=!0,Cr(s,!1),e.lanes=4194304)}else{if(!r)if(t=_s(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Cr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!G)return Se(e),null}else 2*ie()-s.renderingStartTime>ur&&n!==1073741824&&(e.flags|=128,r=!0,Cr(s,!1),e.lanes=4194304);s.isBackwards?(a.sibling=e.child,e.child=a):(n=s.last,n!==null?n.sibling=a:e.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ie(),e.sibling=null,n=J.current,Z(J,r?n&1|2:n&1),e):(Se(e),null);case 22:case 23:return Vl(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?ze&1073741824&&(Se(e),e.subtreeFlags&6&&(e.flags|=8192)):Se(e),null;case 24:return null;case 25:return null}throw Error(E(156,e.tag))}function Uv(t,e){switch(kl(e),e.tag){case 1:return Fe(e.type)&&xs(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return or(),K(Le),K(Te),Rl(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Pl(e),null;case 13:if(K(J),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(E(340));sr()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return K(J),null;case 4:return or(),null;case 10:return Cl(e.type._context),null;case 22:case 23:return Vl(),null;case 24:return null;default:return null}}var zi=!1,ke=!1,bv=typeof WeakSet=="function"?WeakSet:Set,j=null;function Zn(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ne(t,e,r)}else n.current=null}function Lo(t,e,n){try{n()}catch(r){ne(t,e,r)}}var sc=!1;function Vv(t,e){if(yo=vs,t=ef(),xl(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,c=0,f=0,d=t,v=null;t:for(;;){for(var y;d!==n||i!==0&&d.nodeType!==3||(o=a+i),d!==s||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(y=d.firstChild)!==null;)v=d,d=y;for(;;){if(d===t)break t;if(v===n&&++c===i&&(o=a),v===s&&++f===r&&(l=a),(y=d.nextSibling)!==null)break;d=v,v=d.parentNode}d=y}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(wo={focusedElem:t,selectionRange:n},vs=!1,j=e;j!==null;)if(e=j,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,j=t;else for(;j!==null;){e=j;try{var w=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var g=w.memoizedProps,k=w.memoizedState,m=e.stateNode,h=m.getSnapshotBeforeUpdate(e.elementType===e.type?g:at(e.type,g),k);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var p=e.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(x){ne(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,j=t;break}j=e.return}return w=sc,sc=!1,w}function Hr(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&Lo(e,n,s)}i=i.next}while(i!==r)}}function Ks(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function Fo(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function Jf(t){var e=t.alternate;e!==null&&(t.alternate=null,Jf(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[wt],delete e[ii],delete e[ko],delete e[Tv],delete e[Nv])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Xf(t){return t.tag===5||t.tag===3||t.tag===4}function ac(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Xf(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ao(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=ws));else if(r!==4&&(t=t.child,t!==null))for(Ao(t,e,n),t=t.sibling;t!==null;)Ao(t,e,n),t=t.sibling}function zo(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(zo(t,e,n),t=t.sibling;t!==null;)zo(t,e,n),t=t.sibling}var ge=null,ot=!1;function At(t,e,n){for(n=n.child;n!==null;)eh(t,e,n),n=n.sibling}function eh(t,e,n){if(xt&&typeof xt.onCommitFiberUnmount=="function")try{xt.onCommitFiberUnmount(Vs,n)}catch{}switch(n.tag){case 5:ke||Zn(n,e);case 6:var r=ge,i=ot;ge=null,At(t,e,n),ge=r,ot=i,ge!==null&&(ot?(t=ge,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ge.removeChild(n.stateNode));break;case 18:ge!==null&&(ot?(t=ge,n=n.stateNode,t.nodeType===8?Oa(t.parentNode,n):t.nodeType===1&&Oa(t,n),Xr(t)):Oa(ge,n.stateNode));break;case 4:r=ge,i=ot,ge=n.stateNode.containerInfo,ot=!0,At(t,e,n),ge=r,ot=i;break;case 0:case 11:case 14:case 15:if(!ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Lo(n,e,a),i=i.next}while(i!==r)}At(t,e,n);break;case 1:if(!ke&&(Zn(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ne(n,e,o)}At(t,e,n);break;case 21:At(t,e,n);break;case 22:n.mode&1?(ke=(r=ke)||n.memoizedState!==null,At(t,e,n),ke=r):At(t,e,n);break;default:At(t,e,n)}}function oc(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new bv),e.forEach(function(r){var i=Gv.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rt(t,e){var n=e.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~s}if(r=i,r=ie()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Wv(r/1960))-r,10t?16:t,Zt===null)var r=!1;else{if(t=Zt,Zt=null,Ds=0,U&6)throw Error(E(331));var i=U;for(U|=4,j=t.current;j!==null;){var s=j,a=s.child;if(j.flags&16){var o=s.deletions;if(o!==null){for(var l=0;lie()-Ul?wn(t,0):$l|=n),Ae(t,e)}function lh(t,e){e===0&&(t.mode&1?(e=Oi,Oi<<=1,!(Oi&130023424)&&(Oi=4194304)):e=1);var n=je();t=Dt(t,e),t!==null&&(fi(t,e,n),Ae(t,n))}function Kv(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),lh(t,n)}function Gv(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(e),lh(t,n)}var uh;uh=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Le.current)Me=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return Me=!1,zv(t,e,n);Me=!!(t.flags&131072)}else Me=!1,G&&e.flags&1048576&&ff(e,Es,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ss(t,e),t=e.pendingProps;var i=ir(e,Te.current);er(e,n),i=Il(null,e,r,t,i,n);var s=Ml();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Fe(r)?(s=!0,Ss(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,jl(e),i.updater=Qs,e.stateNode=i,i._reactInternals=e,jo(e,r,t,n),e=Ro(null,e,r,!0,s,n)):(e.tag=0,G&&s&&Sl(e),Ce(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ss(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=Xv(r),t=at(r,t),i){case 0:e=Po(null,e,r,t,n);break e;case 1:e=nc(null,e,r,t,n);break e;case 11:e=ec(null,e,r,t,n);break e;case 14:e=tc(null,e,r,at(r.type,t),n);break e}throw Error(E(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:at(r,i),Po(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:at(r,i),nc(t,e,r,i,n);case 3:e:{if(Bf(e),t===null)throw Error(E(387));r=e.pendingProps,s=e.memoizedState,i=s.element,vf(t,e),Cs(e,r,null,n);var a=e.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=lr(Error(E(423)),e),e=rc(t,e,r,n,i);break e}else if(r!==i){i=lr(Error(E(424)),e),e=rc(t,e,r,n,i);break e}else for($e=Jt(e.stateNode.containerInfo.firstChild),Ue=e,G=!0,lt=null,n=xf(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sr(),r===i){e=It(t,e,n);break e}Ce(t,e,r,n)}e=e.child}return e;case 5:return Sf(e),t===null&&No(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,a=i.children,xo(r,i)?a=null:s!==null&&xo(r,s)&&(e.flags|=32),qf(t,e),Ce(t,e,a,n),e.child;case 6:return t===null&&No(e),null;case 13:return Zf(t,e,n);case 4:return Ol(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=ar(e,null,r,n):Ce(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:at(r,i),ec(t,e,r,i,n);case 7:return Ce(t,e,e.pendingProps,n),e.child;case 8:return Ce(t,e,e.pendingProps.children,n),e.child;case 12:return Ce(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,a=i.value,Z(Ts,r._currentValue),r._currentValue=a,s!==null)if(ht(s.value,a)){if(s.children===i.children&&!Le.current){e=It(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Ot(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Co(s.return,n,e),o.lanes|=n;break}l=l.next}}else if(s.tag===10)a=s.type===e.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(E(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Co(a,n,e),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===e){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Ce(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,er(e,n),i=tt(i),r=r(i),e.flags|=1,Ce(t,e,r,n),e.child;case 14:return r=e.type,i=at(r,e.pendingProps),i=at(r.type,i),tc(t,e,r,i,n);case 15:return Hf(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:at(r,i),ss(t,e),e.tag=1,Fe(r)?(t=!0,Ss(e)):t=!1,er(e,n),yf(e,r,i),jo(e,r,i,n),Ro(null,e,r,!0,t,n);case 19:return Qf(t,e,n);case 22:return Wf(t,e,n)}throw Error(E(156,e.tag))};function ch(t,e){return Ld(t,e)}function Jv(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ge(t,e,n,r){return new Jv(t,e,n,r)}function Wl(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xv(t){if(typeof t=="function")return Wl(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ul)return 11;if(t===cl)return 14}return 2}function nn(t,e){var n=t.alternate;return n===null?(n=Ge(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ls(t,e,n,r,i,s){var a=2;if(r=t,typeof t=="function")Wl(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case zn:return xn(n.children,i,s,e);case ll:a=8,i|=8;break;case Ga:return t=Ge(12,n,e,i|2),t.elementType=Ga,t.lanes=s,t;case Ja:return t=Ge(13,n,e,i),t.elementType=Ja,t.lanes=s,t;case Xa:return t=Ge(19,n,e,i),t.elementType=Xa,t.lanes=s,t;case yd:return Js(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case vd:a=10;break e;case gd:a=9;break e;case ul:a=11;break e;case cl:a=14;break e;case Ut:a=16,r=null;break e}throw Error(E(130,t==null?t:typeof t,""))}return e=Ge(a,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function xn(t,e,n,r){return t=Ge(7,t,r,e),t.lanes=n,t}function Js(t,e,n,r){return t=Ge(22,t,r,e),t.elementType=yd,t.lanes=n,t.stateNode={isHidden:!1},t}function Aa(t,e,n){return t=Ge(6,t,null,e),t.lanes=n,t}function za(t,e,n){return e=Ge(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function eg(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ya(0),this.expirationTimes=ya(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ya(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ql(t,e,n,r,i,s,a,o,l){return t=new eg(t,e,n,o,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Ge(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},jl(s),t}function tg(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mh)}catch(t){console.error(t)}}mh(),dd.exports=We;var ag=dd.exports,ph,pc=ag;ph=pc.createRoot,pc.hydrateRoot;var Ho=function(t){return t.split(".").reduce(function(e,n){return e.concat(e.length?e[e.length-1]+"."+n:n)},[])},og=function(t){return t!=null},Wo=function(t){return t&&t.meta&&t.meta.params},vc=function(t,e){return!Wo(e)||!og(e.meta.params[t])?{}:Object.keys(e.meta.params[t]).reduce(function(n,r){return n[r]=e.params[r],n},{})};function vh(t,e){var n=t.meta&&t.meta&&t.meta.options||{},r=e?Ho(e.name):[],i=Ho(t.name),s=Math.min(r.length,i.length);function a(){var d,v=function(){var w=r[d],g=i[d];if(w!==g)return{value:d};var k=vc(w,t),m=vc(g,e);if(Object.keys(k).length!==Object.keys(m).length)return{value:d};if(Object.keys(k).length===0)return"continue";var h=Object.keys(k).some(function(p){return m[p]!==k[p]});if(h)return{value:d}};for(d=0;d0?r[o-1]:"";return{intersection:f,toDeactivate:l,toActivate:c}}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -63,7 +63,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */var qo=function(t,e){return qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},qo(t,e)};function Yl(t,e){qo(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var cr=function(){return cr=Object.assign||function(e){for(var n,r=1,i=arguments.length;r(t.success="success",t.warning="warning",t.error="error",t))(V||{}),Ae=(t=>(t.RoaSeen="roa_seen",t.RoaUnseen="roa_unseen",t.RoaNotHeld="roa_not_held",t.RoaNoAnnouncementInfo="roa_no_announcement_info",t.RoaTooPermissive="roa_too_permissive",t.RoaDisallowing="roa_disallowing",t.RoaRedundant="roa_redundant",t.RoaAs0="roa_as0",t.RoaAs0Redundant="roa_as0_redundant",t.AnnouncementNotFound="announcement_not_found",t.AnnouncementInvalidLength="announcement_invalid_length",t.AnnouncementInvalidAsn="announcement_invalid_asn",t.AnnouncementDisallowedAs0="announcement_disallowed",t))(Ae||{}),Yn=(t=>(t.asn="asn",t.comment="comment",t.prefix="prefix",t.state="state",t))(Yn||{}),ft=(t=>(t.asc="asc",t.desc="desc",t))(ft||{}),vt=(t=>(t.notFound="not_found",t.invalidAsn="invalid_asn",t.invalidLength="invalid_length",t.tooPermissive="too_permissive",t.disallowing="disallowing",t.stale="stale",t.redundant="redundant",t.as0Redundant="as0_redundant",t.specific="specific",t))(vt||{}),yt=(t=>(t[t.unchecked=0]="unchecked",t[t.checked=1]="checked",t[t.intermediate=2]="intermediate",t))(yt||{}),Ls=(t=>(t.action="action",t.reason="reason",t.asn="asn",t.maxLength="max_length",t.prefix="prefix",t))(Ls||{});class Pn extends Error{}class gg extends Pn{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class yg extends Pn{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class wg extends Pn{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Lr extends Pn{}class yh extends Pn{constructor(e){super(`Invalid unit ${e}`)}}class Ke extends Pn{}class zt extends Pn{constructor(){super("Zone is an abstract class")}}const C="numeric",mt="short",be="long",Fs={year:C,month:C,day:C},wh={year:C,month:mt,day:C},xg={year:C,month:mt,day:C,weekday:mt},xh={year:C,month:be,day:C},Sh={year:C,month:be,day:C,weekday:be},kh={hour:C,minute:C},Eh={hour:C,minute:C,second:C},Th={hour:C,minute:C,second:C,timeZoneName:mt},Nh={hour:C,minute:C,second:C,timeZoneName:be},Ch={hour:C,minute:C,hourCycle:"h23"},_h={hour:C,minute:C,second:C,hourCycle:"h23"},jh={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:mt},Oh={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:be},Ph={year:C,month:C,day:C,hour:C,minute:C},Rh={year:C,month:C,day:C,hour:C,minute:C,second:C},Dh={year:C,month:mt,day:C,hour:C,minute:C},Ih={year:C,month:mt,day:C,hour:C,minute:C,second:C},Sg={year:C,month:mt,day:C,weekday:mt,hour:C,minute:C},Mh={year:C,month:be,day:C,hour:C,minute:C,timeZoneName:mt},Lh={year:C,month:be,day:C,hour:C,minute:C,second:C,timeZoneName:mt},Fh={year:C,month:be,day:C,weekday:be,hour:C,minute:C,timeZoneName:be},Ah={year:C,month:be,day:C,weekday:be,hour:C,minute:C,second:C,timeZoneName:be};class vi{get type(){throw new zt}get name(){throw new zt}get ianaName(){return this.name}get isUniversal(){throw new zt}offsetName(e,n){throw new zt}formatOffset(e,n){throw new zt}offset(e){throw new zt}equals(e){throw new zt}get isValid(){throw new zt}}let $a=null;class ia extends vi{static get instance(){return $a===null&&($a=new ia),$a}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return $h(e,n,r)}formatOffset(e,n){return Zr(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let us={};function kg(t){return us[t]||(us[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),us[t]}const Eg={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Tg(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,a,o,l,c,f]=r;return[a,i,s,o,l,c,f]}function Ng(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i=0?w:1e3+w,(v-y)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let gc={};function Cg(t,e={}){const n=JSON.stringify([t,e]);let r=gc[n];return r||(r=new Intl.ListFormat(t,e),gc[n]=r),r}let Bo={};function Zo(t,e={}){const n=JSON.stringify([t,e]);let r=Bo[n];return r||(r=new Intl.DateTimeFormat(t,e),Bo[n]=r),r}let Qo={};function _g(t,e={}){const n=JSON.stringify([t,e]);let r=Qo[n];return r||(r=new Intl.NumberFormat(t,e),Qo[n]=r),r}let Yo={};function jg(t,e={}){const{base:n,...r}=e,i=JSON.stringify([t,r]);let s=Yo[i];return s||(s=new Intl.RelativeTimeFormat(t,e),Yo[i]=s),s}let Fr=null;function Og(){return Fr||(Fr=new Intl.DateTimeFormat().resolvedOptions().locale,Fr)}function Pg(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=Zo(t).resolvedOptions(),i=t}catch{const l=t.substring(0,n);r=Zo(l).resolvedOptions(),i=l}const{numberingSystem:s,calendar:a}=r;return[i,s,a]}}function Rg(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Dg(t){const e=[];for(let n=1;n<=12;n++){const r=M.utc(2016,n,1);e.push(t(r))}return e}function Ig(t){const e=[];for(let n=1;n<=7;n++){const r=M.utc(2016,11,13+n);e.push(t(r))}return e}function Vi(t,e,n,r,i){const s=t.listingMode(n);return s==="error"?null:s==="en"?r(e):i(e)}function Mg(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Lg{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:s,...a}=r;if(!n||Object.keys(a).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=_g(e,o)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):Jl(e,3);return oe(n,this.padTo)}}}class Fg{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Mt.create(o).valid?(i=o,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=Zo(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ag{constructor(e,n,r){this.opts={style:"long",...r},!n&&zh()&&(this.rtf=jg(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):ey(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}class Y{static fromOpts(e){return Y.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,n,r,i=!1){const s=e||ae.defaultLocale,a=s||(i?"en-US":Og()),o=n||ae.defaultNumberingSystem,l=r||ae.defaultOutputCalendar;return new Y(a,o,l,s)}static resetCache(){Fr=null,Bo={},Qo={},Yo={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r}={}){return Y.create(e,n,r)}constructor(e,n,r,i){const[s,a,o]=Pg(e);this.locale=s,this.numberingSystem=n||a||null,this.outputCalendar=r||o||null,this.intl=Rg(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Mg(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Y.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1,r=!0){return Vi(this,e,r,Vh,()=>{const i=n?{month:e,day:"numeric"}:{month:e},s=n?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=Dg(a=>this.extract(a,i,"month"))),this.monthsCache[s][e]})}weekdays(e,n=!1,r=!0){return Vi(this,e,r,qh,()=>{const i=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=n?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Ig(a=>this.extract(a,i,"weekday"))),this.weekdaysCache[s][e]})}meridiems(e=!0){return Vi(this,void 0,e,()=>Bh,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[M.utc(2016,11,13,9),M.utc(2016,11,13,19)].map(r=>this.extract(r,n,"dayperiod"))}return this.meridiemCache})}eras(e,n=!0){return Vi(this,e,n,Zh,()=>{const r={era:e};return this.eraCache[e]||(this.eraCache[e]=[M.utc(-40,1,1),M.utc(2017,1,1)].map(i=>this.extract(i,r,"era"))),this.eraCache[e]})}extract(e,n,r){const i=this.dtFormatter(e,n),s=i.formatToParts(),a=s.find(o=>o.type.toLowerCase()===r);return a?a.value:null}numberFormatter(e={}){return new Lg(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Fg(e,this.intl,n)}relFormatter(e={}){return new Ag(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Cg(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let Ua=null;class _e extends vi{static get utcInstance(){return Ua===null&&(Ua=new _e(0)),Ua}static instance(e){return e===0?_e.utcInstance:new _e(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new _e(aa(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Zr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Zr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Zr(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class zg extends vi{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function qt(t,e){if(z(t)||t===null)return e;if(t instanceof vi)return t;if($g(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?ia.instance:n==="utc"||n==="gmt"?_e.utcInstance:_e.parseSpecifier(n)||Mt.create(t)}else return Sn(t)?_e.instance(t):typeof t=="object"&&t.offset&&typeof t.offset=="number"?t:new zg(t)}let yc=()=>Date.now(),wc="system",xc=null,Sc=null,kc=null,Ec=60,Tc;class ae{static get now(){return yc}static set now(e){yc=e}static set defaultZone(e){wc=e}static get defaultZone(){return qt(wc,ia.instance)}static get defaultLocale(){return xc}static set defaultLocale(e){xc=e}static get defaultNumberingSystem(){return Sc}static set defaultNumberingSystem(e){Sc=e}static get defaultOutputCalendar(){return kc}static set defaultOutputCalendar(e){kc=e}static get twoDigitCutoffYear(){return Ec}static set twoDigitCutoffYear(e){Ec=e%100}static get throwOnInvalid(){return Tc}static set throwOnInvalid(e){Tc=e}static resetCaches(){Y.resetCache(),Mt.resetCache()}}function z(t){return typeof t>"u"}function Sn(t){return typeof t=="number"}function sa(t){return typeof t=="number"&&t%1===0}function $g(t){return typeof t=="string"}function Ug(t){return Object.prototype.toString.call(t)==="[object Date]"}function zh(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function bg(t){return Array.isArray(t)?t:[t]}function Nc(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{const s=[e(i),i];return r&&n(r[0],s[0])===r[0]?r:s},null)[1]}function Vg(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function dr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function jt(t,e,n){return sa(t)&&t>=e&&t<=n}function Hg(t,e){return t-e*Math.floor(t/e)}function oe(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function Vt(t){if(!(z(t)||t===null||t===""))return parseInt(t,10)}function dn(t){if(!(z(t)||t===null||t===""))return parseFloat(t)}function Gl(t){if(!(z(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Jl(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function gi(t){return t%4===0&&(t%100!==0||t%400===0)}function Br(t){return gi(t)?366:365}function As(t,e){const n=Hg(e-1,12)+1,r=t+(e-n)/12;return n===2?gi(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Xl(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function zs(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,n=t-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return e===4||r===3?53:52}function Ko(t){return t>99?t:t>ae.twoDigitCutoffYear?1900+t:2e3+t}function $h(t,e,n,r=null){const i=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const a={timeZoneName:e,...s},o=new Intl.DateTimeFormat(n,a).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return o?o.value:null}function aa(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Uh(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Ke(`Invalid unit value ${t}`);return e}function $s(t,e){const n={};for(const r in t)if(dr(t,r)){const i=t[r];if(i==null)continue;n[e(r)]=Uh(i)}return n}function Zr(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${oe(n,2)}:${oe(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${oe(n,2)}${oe(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function oa(t){return Vg(t,["hour","minute","second","millisecond"])}const Wg=["January","February","March","April","May","June","July","August","September","October","November","December"],bh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qg=["J","F","M","A","M","J","J","A","S","O","N","D"];function Vh(t){switch(t){case"narrow":return[...qg];case"short":return[...bh];case"long":return[...Wg];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Hh=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Wh=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Bg=["M","T","W","T","F","S","S"];function qh(t){switch(t){case"narrow":return[...Bg];case"short":return[...Wh];case"long":return[...Hh];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Bh=["AM","PM"],Zg=["Before Christ","Anno Domini"],Qg=["BC","AD"],Yg=["B","A"];function Zh(t){switch(t){case"narrow":return[...Yg];case"short":return[...Qg];case"long":return[...Zg];default:return null}}function Kg(t){return Bh[t.hour<12?0:1]}function Gg(t,e){return qh(e)[t.weekday-1]}function Jg(t,e){return Vh(e)[t.month-1]}function Xg(t,e){return Zh(e)[t.year<0?0:1]}function ey(t,e,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&s){const d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${i[t][0]}`;case-1:return d?"yesterday":`last ${i[t][0]}`;case 0:return d?"today":`this ${i[t][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),l=o===1,c=i[t],f=r?l?c[1]:c[2]||c[1]:l?i[t][0]:t;return a?`${o} ${f} ago`:`in ${o} ${f}`}function Cc(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const ty={D:Fs,DD:wh,DDD:xh,DDDD:Sh,t:kh,tt:Eh,ttt:Th,tttt:Nh,T:Ch,TT:_h,TTT:jh,TTTT:Oh,f:Ph,ff:Dh,fff:Mh,ffff:Fh,F:Rh,FF:Ih,FFF:Lh,FFFF:Ah};class Ee{static create(e,n={}){return new Ee(e,n)}static parseFormat(e){let n=null,r="",i=!1;const s=[];for(let a=0;a0&&s.push({literal:i||/^\s+$/.test(r),val:r}),n=null,r="",i=!i):i||o===n?r+=o:(r.length>0&&s.push({literal:/^\s+$/.test(r),val:r}),r=o,n=o)}return r.length>0&&s.push({literal:i||/^\s+$/.test(r),val:r}),s}static macroTokenToFormatOpts(e){return ty[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}formatDateTime(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n}).format()}formatDateTimeParts(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n}).formatToParts()}formatInterval(e,n={}){return this.loc.dtFormatter(e.start,{...this.opts,...n}).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n}).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return oe(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(y,w)=>this.loc.extract(e,y,w),a=y=>e.isOffsetFixed&&e.offset===0&&y.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,y.format):"",o=()=>r?Kg(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(y,w)=>r?Jg(e,y):s(w?{month:y}:{month:y,day:"numeric"},"month"),c=(y,w)=>r?Gg(e,y):s(w?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),f=y=>{const w=Ee.macroTokenToFormatOpts(y);return w?this.formatWithSystemDefault(e,w):y},d=y=>r?Xg(e,y):s({era:y},"era"),v=y=>{switch(y){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(y)}};return Cc(Ee.parseFormat(n),v)}formatDurationFromString(e,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>c=>{const f=r(c);return f?this.num(l.get(f),c.length):c},s=Ee.parseFormat(n),a=s.reduce((l,{literal:c,val:f})=>c?l:l.concat(f),[]),o=e.shiftTo(...a.map(r).filter(l=>l));return Cc(s,i(o))}}class ut{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Qh=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function vr(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function gr(...t){return e=>t.reduce(([n,r,i],s)=>{const[a,o,l]=s(e,i);return[{...n,...a},o||r,l]},[{},null,1]).slice(0,2)}function yr(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const i=n.exec(t);if(i)return r(i)}return[null,null]}function Yh(...t){return(e,n)=>{const r={};let i;for(i=0;iy!==void 0&&(w||y&&f)?-y:y;return[{years:v(dn(n)),months:v(dn(r)),weeks:v(dn(i)),days:v(dn(s)),hours:v(dn(a)),minutes:v(dn(o)),seconds:v(dn(l),l==="-0"),milliseconds:v(Gl(c),d)}]}const my={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function nu(t,e,n,r,i,s,a){const o={year:e.length===2?Ko(Vt(e)):Vt(e),month:bh.indexOf(n)+1,day:Vt(r),hour:Vt(i),minute:Vt(s)};return a&&(o.second=Vt(a)),t&&(o.weekday=t.length>3?Hh.indexOf(t)+1:Wh.indexOf(t)+1),o}const py=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function vy(t){const[,e,n,r,i,s,a,o,l,c,f,d]=t,v=nu(e,i,r,n,s,a,o);let y;return l?y=my[l]:c?y=0:y=aa(f,d),[v,new _e(y)]}function gy(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const yy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,wy=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,xy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function _c(t){const[,e,n,r,i,s,a,o]=t;return[nu(e,i,r,n,s,a,o),_e.utcInstance]}function Sy(t){const[,e,n,r,i,s,a,o]=t;return[nu(e,o,n,r,i,s,a),_e.utcInstance]}const ky=vr(ry,tu),Ey=vr(iy,tu),Ty=vr(sy,tu),Ny=vr(Gh),Xh=gr(cy,wr,yi,wi),Cy=gr(ay,wr,yi,wi),_y=gr(oy,wr,yi,wi),jy=gr(wr,yi,wi);function Oy(t){return yr(t,[ky,Xh],[Ey,Cy],[Ty,_y],[Ny,jy])}function Py(t){return yr(gy(t),[py,vy])}function Ry(t){return yr(t,[yy,_c],[wy,_c],[xy,Sy])}function Dy(t){return yr(t,[fy,hy])}const Iy=gr(wr);function My(t){return yr(t,[dy,Iy])}const Ly=vr(ly,uy),Fy=vr(Jh),Ay=gr(wr,yi,wi);function zy(t){return yr(t,[Ly,Xh],[Fy,Ay])}const $y="Invalid Duration",em={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Uy={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...em},Be=146097/400,In=146097/4800,by={years:{quarters:4,months:12,weeks:Be/7,days:Be,hours:Be*24,minutes:Be*24*60,seconds:Be*24*60*60,milliseconds:Be*24*60*60*1e3},quarters:{months:3,weeks:Be/28,days:Be/4,hours:Be*24/4,minutes:Be*24*60/4,seconds:Be*24*60*60/4,milliseconds:Be*24*60*60*1e3/4},months:{weeks:In/7,days:In,hours:In*24,minutes:In*24*60,seconds:In*24*60*60,milliseconds:In*24*60*60*1e3},...em},mn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Vy=mn.slice(0).reverse();function $t(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new $(r)}function Hy(t){return t<0?Math.floor(t):Math.ceil(t)}function tm(t,e,n,r,i){const s=t[i][n],a=e[n]/s,o=Math.sign(a)===Math.sign(r[i]),l=!o&&r[i]!==0&&Math.abs(a)<=1?Hy(a):Math.trunc(a);r[i]+=l,e[n]-=l*s}function Wy(t,e){Vy.reduce((n,r)=>z(e[r])?n:(n&&tm(t,e,n,e,r),r),null)}function qy(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}class ${constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?by:Uy;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Y.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return $.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Ke(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new $({values:$s(e,$.normalizeUnit),loc:Y.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Sn(e))return $.fromMillis(e);if($.isDuration(e))return e;if(typeof e=="object")return $.fromObject(e);throw new Ke(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=Dy(e);return r?$.fromObject(r,n):$.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=My(e);return r?$.fromObject(r,n):$.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Ke("need to specify a reason the Duration is invalid");const r=e instanceof ut?e:new ut(e,n);if(ae.throwOnInvalid)throw new wg(r);return new $({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new yh(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ee.create(this.loc,r).formatDurationFromString(this,e):$y}toHuman(e={}){const n=mn.map(r=>{const i=this.values[r];return z(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Jl(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let i=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||r.seconds!==0||r.milliseconds!==0)&&(i+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||r.milliseconds!==0)&&(i+=".SSS"));let s=r.toFormat(i);return e.includePrefix&&(s="T"+s),s}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=$.fromDurationLike(e),r={};for(const i of mn)(dr(n.values,i)||dr(this.values,i))&&(r[i]=n.get(i)+this.get(i));return $t(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=$.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Uh(e(this.values[r],r));return $t(this,{values:n},!0)}get(e){return this[$.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...$s(e,$.normalizeUnit)};return $t(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return $t(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Wy(this.matrix,e),$t(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=qy(this.normalize().shiftToAll().toObject());return $t(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>$.normalizeUnit(a));const n={},r={},i=this.toObject();let s;for(const a of mn)if(e.indexOf(a)>=0){s=a;let o=0;for(const c in r)o+=this.matrix[c][a]*r[c],r[c]=0;Sn(i[a])&&(o+=i[a]);const l=Math.trunc(o);n[a]=l,r[a]=(o*1e3-l*1e3)/1e3;for(const c in i)mn.indexOf(c)>mn.indexOf(a)&&tm(this.matrix,i,c,n,a)}else Sn(i[a])&&(r[a]=i[a]);for(const a in r)r[a]!==0&&(n[s]+=a===s?r[a]:r[a]/this.matrix[s][a]);return $t(this,{values:n},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return $t(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of mn)if(!n(this.values[r],e.values[r]))return!1;return!0}}const Mn="Invalid Interval";function By(t,e){return!t||!t.isValid?te.invalid("missing or invalid start"):!e||!e.isValid?te.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?te.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Pr).filter(a=>this.contains(a)).sort(),r=[];let{s:i}=this,s=0;for(;i+this.e?this.e:a;r.push(te.fromDateTimes(i,o)),i=o,s+=1}return r}splitBy(e){const n=$.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,s;const a=[];for(;rl*i));s=+o>+this.e?this.e:o,a.push(te.fromDateTimes(r,s)),r=s,i+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e=r?null:te.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.se.e?this.e:e.e;return te.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],a)=>s?s.overlaps(a)||s.abutsStart(a)?[i,s.union(a)]:[i.concat([s]),a]:[i,a],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const i=[],s=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...s),o=a.sort((l,c)=>l.time-c.time);for(const l of o)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&i.push(te.fromDateTimes(n,l.time)),n=null);return te.merge(i)}difference(...e){return te.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Mn}toLocaleString(e=Fs,n={}){return this.isValid?Ee.create(this.s.loc.clone(n),e).formatInterval(this):Mn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Mn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Mn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Mn}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Mn}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):$.invalid(this.invalidReason)}mapEndpoints(e){return te.fromDateTimes(e(this.s),e(this.e))}}class Hi{static hasDST(e=ae.defaultZone){const n=M.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return Mt.isValidZone(e)}static normalizeZone(e){return qt(e,ae.defaultZone)}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||Y.create(n,r,s)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||Y.create(n,r,s)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Y.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Y.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Y.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return Y.create(n,null,"gregory").eras(e)}static features(){return{relative:zh()}}}function jc(t,e){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor($.fromMillis(r).as("days"))}function Zy(t,e,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const f=jc(l,c);return(f-f%7)/7}],["days",jc]],i={},s=t;let a,o;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,i[l]=c(t,e),o=s.plus(i),o>e?(i[l]--,t=s.plus(i)):t=o);return[t,i,o,a]}function Qy(t,e,n,r){let[i,s,a,o]=Zy(t,e,n);const l=e-i,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a0?$.fromMillis(l,r).shiftTo(...c).plus(f):f}const ru={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Oc={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Yy=ru.hanidec.replace(/[\[|\]]/g,"").split("");function Ky(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n=s&&r<=a&&(e+=r-s)}}return parseInt(e,10)}else return e}function it({numberingSystem:t},e=""){return new RegExp(`${ru[t||"latn"]}${e}`)}const Gy="missing Intl.DateTimeFormat.formatToParts support";function b(t,e=n=>n){return{regex:t,deser:([n])=>e(Ky(n))}}const Jy=String.fromCharCode(160),nm=`[ ${Jy}]`,rm=new RegExp(nm,"g");function Xy(t){return t.replace(/\./g,"\\.?").replace(rm,nm)}function Pc(t){return t.replace(/\./g,"").replace(rm," ").toLowerCase()}function st(t,e){return t===null?null:{regex:RegExp(t.map(Xy).join("|")),deser:([n])=>t.findIndex(r=>Pc(n)===Pc(r))+e}}function Rc(t,e){return{regex:t,deser:([,n,r])=>aa(n,r),groups:e}}function Wi(t){return{regex:t,deser:([e])=>e}}function e0(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function t0(t,e){const n=it(e),r=it(e,"{2}"),i=it(e,"{3}"),s=it(e,"{4}"),a=it(e,"{6}"),o=it(e,"{1,2}"),l=it(e,"{1,3}"),c=it(e,"{1,6}"),f=it(e,"{1,9}"),d=it(e,"{2,4}"),v=it(e,"{4,6}"),y=k=>({regex:RegExp(e0(k.val)),deser:([m])=>m,literal:!0}),g=(k=>{if(t.literal)return y(k);switch(k.val){case"G":return st(e.eras("short",!1),0);case"GG":return st(e.eras("long",!1),0);case"y":return b(c);case"yy":return b(d,Ko);case"yyyy":return b(s);case"yyyyy":return b(v);case"yyyyyy":return b(a);case"M":return b(o);case"MM":return b(r);case"MMM":return st(e.months("short",!0,!1),1);case"MMMM":return st(e.months("long",!0,!1),1);case"L":return b(o);case"LL":return b(r);case"LLL":return st(e.months("short",!1,!1),1);case"LLLL":return st(e.months("long",!1,!1),1);case"d":return b(o);case"dd":return b(r);case"o":return b(l);case"ooo":return b(i);case"HH":return b(r);case"H":return b(o);case"hh":return b(r);case"h":return b(o);case"mm":return b(r);case"m":return b(o);case"q":return b(o);case"qq":return b(r);case"s":return b(o);case"ss":return b(r);case"S":return b(l);case"SSS":return b(i);case"u":return Wi(f);case"uu":return Wi(o);case"uuu":return b(n);case"a":return st(e.meridiems(),0);case"kkkk":return b(s);case"kk":return b(d,Ko);case"W":return b(o);case"WW":return b(r);case"E":case"c":return b(n);case"EEE":return st(e.weekdays("short",!1,!1),1);case"EEEE":return st(e.weekdays("long",!1,!1),1);case"ccc":return st(e.weekdays("short",!0,!1),1);case"cccc":return st(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Rc(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Rc(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Wi(/[a-z_+-/]{1,256}?/i);case" ":return Wi(/[^\S\n\r]/);default:return y(k)}})(t)||{invalidReason:Gy};return g.token=t,g}const n0={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function r0(t,e){const{type:n,value:r}=t;if(n==="literal"){const a=/^\s+$/.test(r);return{literal:!a,val:a?" ":r}}const i=e[n];let s=n0[n];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function i0(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function s0(t,e,n){const r=t.match(e);if(r){const i={};let s=1;for(const a in n)if(dr(n,a)){const o=n[a],l=o.groups?o.groups+1:1;!o.literal&&o.token&&(i[o.token.val[0]]=o.deser(r.slice(s,s+l))),s+=l}return[r,i]}else return[r,{}]}function a0(t){const e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return z(t.z)||(n=Mt.create(t.z)),z(t.Z)||(n||(n=new _e(t.Z)),r=t.Z),z(t.q)||(t.M=(t.q-1)*3+1),z(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),z(t.u)||(t.S=Gl(t.u)),[Object.keys(t).reduce((s,a)=>{const o=e(a);return o&&(s[o]=t[a]),s},{}),n,r]}let ba=null;function o0(){return ba||(ba=M.fromMillis(1555555555555)),ba}function l0(t,e){if(t.literal)return t;const n=Ee.macroTokenToFormatOpts(t.val),r=am(n,e);return r==null||r.includes(void 0)?t:r}function im(t,e){return Array.prototype.concat(...t.map(n=>l0(n,e)))}function sm(t,e,n){const r=im(Ee.parseFormat(n),t),i=r.map(a=>t0(a,t)),s=i.find(a=>a.invalidReason);if(s)return{input:e,tokens:r,invalidReason:s.invalidReason};{const[a,o]=i0(i),l=RegExp(a,"i"),[c,f]=s0(e,l,o),[d,v,y]=f?a0(f):[null,null,void 0];if(dr(f,"a")&&dr(f,"H"))throw new Lr("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:r,regex:l,rawMatches:c,matches:f,result:d,zone:v,specificOffset:y}}}function u0(t,e,n){const{result:r,zone:i,specificOffset:s,invalidReason:a}=sm(t,e,n);return[r,i,s,a]}function am(t,e){return t?Ee.create(e,t).formatDateTimeParts(o0()).map(i=>r0(i,t)):null}const om=[0,31,59,90,120,151,181,212,243,273,304,334],lm=[0,31,60,91,121,152,182,213,244,274,305,335];function Je(t,e){return new ut("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function um(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function cm(t,e,n){return n+(gi(t)?lm:om)[e-1]}function dm(t,e){const n=gi(t)?lm:om,r=n.findIndex(s=>szs(e)?(o=e+1,a=1):o=e,{weekYear:o,weekNumber:a,weekday:s,...oa(t)}}function Dc(t){const{weekYear:e,weekNumber:n,weekday:r}=t,i=um(e,1,4),s=Br(e);let a=n*7+r-i-3,o;a<1?(o=e-1,a+=Br(o)):a>s?(o=e+1,a-=Br(e)):o=e;const{month:l,day:c}=dm(o,a);return{year:o,month:l,day:c,...oa(t)}}function Va(t){const{year:e,month:n,day:r}=t,i=cm(e,n,r);return{year:e,ordinal:i,...oa(t)}}function Ic(t){const{year:e,ordinal:n}=t,{month:r,day:i}=dm(e,n);return{year:e,month:r,day:i,...oa(t)}}function c0(t){const e=sa(t.weekYear),n=jt(t.weekNumber,1,zs(t.weekYear)),r=jt(t.weekday,1,7);return e?n?r?!1:Je("weekday",t.weekday):Je("week",t.week):Je("weekYear",t.weekYear)}function d0(t){const e=sa(t.year),n=jt(t.ordinal,1,Br(t.year));return e?n?!1:Je("ordinal",t.ordinal):Je("year",t.year)}function fm(t){const e=sa(t.year),n=jt(t.month,1,12),r=jt(t.day,1,As(t.year,t.month));return e?n?r?!1:Je("day",t.day):Je("month",t.month):Je("year",t.year)}function hm(t){const{hour:e,minute:n,second:r,millisecond:i}=t,s=jt(e,0,23)||e===24&&n===0&&r===0&&i===0,a=jt(n,0,59),o=jt(r,0,59),l=jt(i,0,999);return s?a?o?l?!1:Je("millisecond",i):Je("second",r):Je("minute",n):Je("hour",e)}const Ha="Invalid DateTime",Mc=864e13;function qi(t){return new ut("unsupported zone",`the zone "${t.name}" is not supported`)}function Wa(t){return t.weekData===null&&(t.weekData=Go(t.c)),t.weekData}function jr(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new M({...n,...e,old:n})}function mm(t,e,n){let r=t-e*60*1e3;const i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const s=n.offset(r);return i===s?[r,i]:[t-Math.min(i,s)*60*1e3,Math.max(i,s)]}function Lc(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function cs(t,e,n){return mm(Xl(t),e,n)}function Fc(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...t.c,year:r,month:i,day:Math.min(t.c.day,As(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=$.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Xl(s);let[l,c]=mm(o,n,t.zone);return a!==0&&(l+=a,c=t.zone.offset(l)),{ts:l,o:c}}function Or(t,e,n,r,i,s){const{setZone:a,zone:o}=n;if(t&&Object.keys(t).length!==0||e){const l=e||o,c=M.fromObject(t,{...n,zone:l,specificOffset:s});return a?c:c.setZone(o)}else return M.invalid(new ut("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Bi(t,e,n=!0){return t.isValid?Ee.create(Y.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function qa(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=oe(t.c.year,n?6:4),e?(r+="-",r+=oe(t.c.month),r+="-",r+=oe(t.c.day)):(r+=oe(t.c.month),r+=oe(t.c.day)),r}function Ac(t,e,n,r,i,s){let a=oe(t.c.hour);return e?(a+=":",a+=oe(t.c.minute),(t.c.second!==0||!n)&&(a+=":")):a+=oe(t.c.minute),(t.c.second!==0||!n)&&(a+=oe(t.c.second),(t.c.millisecond!==0||!r)&&(a+=".",a+=oe(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!s?a+="Z":t.o<0?(a+="-",a+=oe(Math.trunc(-t.o/60)),a+=":",a+=oe(Math.trunc(-t.o%60))):(a+="+",a+=oe(Math.trunc(t.o/60)),a+=":",a+=oe(Math.trunc(t.o%60)))),s&&(a+="["+t.zone.ianaName+"]"),a}const pm={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},f0={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},h0={ordinal:1,hour:0,minute:0,second:0,millisecond:0},vm=["year","month","day","hour","minute","second","millisecond"],m0=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],p0=["year","ordinal","hour","minute","second","millisecond"];function zc(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new yh(t);return e}function $c(t,e){const n=qt(e.zone,ae.defaultZone),r=Y.fromObject(e),i=ae.now();let s,a;if(z(t.year))s=i;else{for(const c of vm)z(t[c])&&(t[c]=pm[c]);const o=fm(t)||hm(t);if(o)return M.invalid(o);const l=n.offset(i);[s,a]=cs(t,l,n)}return new M({ts:s,zone:n,loc:r,o:a})}function Uc(t,e,n){const r=z(n.round)?!0:n.round,i=(a,o)=>(a=Jl(a,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(a,o)),s=a=>n.calendary?e.hasSame(t,a)?0:e.startOf(a).diff(t.startOf(a),a).get(a):e.diff(t,a).get(a);if(n.unit)return i(s(n.unit),n.unit);for(const a of n.units){const o=s(a);if(Math.abs(o)>=1)return i(o,a)}return i(t>e?-0:0,n.units[n.units.length-1])}function bc(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}class M{constructor(e){const n=e.zone||ae.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new ut("invalid input"):null)||(n.isValid?null:qi(n));this.ts=z(e.ts)?ae.now():e.ts;let i=null,s=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,s]=[e.old.c,e.old.o];else{const o=n.offset(this.ts);i=Lc(this.ts,o),r=Number.isNaN(i.year)?new ut("invalid input"):null,i=r?null:i,s=r?null:o}this._zone=n,this.loc=e.loc||Y.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new M({})}static local(){const[e,n]=bc(arguments),[r,i,s,a,o,l,c]=n;return $c({year:r,month:i,day:s,hour:a,minute:o,second:l,millisecond:c},e)}static utc(){const[e,n]=bc(arguments),[r,i,s,a,o,l,c]=n;return e.zone=_e.utcInstance,$c({year:r,month:i,day:s,hour:a,minute:o,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const r=Ug(e)?e.valueOf():NaN;if(Number.isNaN(r))return M.invalid("invalid input");const i=qt(n.zone,ae.defaultZone);return i.isValid?new M({ts:r,zone:i,loc:Y.fromObject(n)}):M.invalid(qi(i))}static fromMillis(e,n={}){if(Sn(e))return e<-Mc||e>Mc?M.invalid("Timestamp out of range"):new M({ts:e,zone:qt(n.zone,ae.defaultZone),loc:Y.fromObject(n)});throw new Ke(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Sn(e))return new M({ts:e*1e3,zone:qt(n.zone,ae.defaultZone),loc:Y.fromObject(n)});throw new Ke("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=qt(n.zone,ae.defaultZone);if(!r.isValid)return M.invalid(qi(r));const i=ae.now(),s=z(n.specificOffset)?r.offset(i):n.specificOffset,a=$s(e,zc),o=!z(a.ordinal),l=!z(a.year),c=!z(a.month)||!z(a.day),f=l||c,d=a.weekYear||a.weekNumber,v=Y.fromObject(n);if((f||o)&&d)throw new Lr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new Lr("Can't mix ordinal dates with month/day");const y=d||a.weekday&&!f;let w,g,k=Lc(i,s);y?(w=m0,g=f0,k=Go(k)):o?(w=p0,g=h0,k=Va(k)):(w=vm,g=pm);let m=!1;for(const _ of w){const D=a[_];z(D)?m?a[_]=g[_]:a[_]=k[_]:m=!0}const h=y?c0(a):o?d0(a):fm(a),p=h||hm(a);if(p)return M.invalid(p);const x=y?Dc(a):o?Ic(a):a,[S,T]=cs(x,s,r),N=new M({ts:S,zone:r,o:T,loc:v});return a.weekday&&f&&e.weekday!==N.weekday?M.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${N.toISO()}`):N}static fromISO(e,n={}){const[r,i]=Oy(e);return Or(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,i]=Py(e);return Or(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,i]=Ry(e);return Or(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(z(e)||z(n))throw new Ke("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=r,a=Y.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[o,l,c,f]=u0(a,e,n);return f?M.invalid(f):Or(o,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return M.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,i]=zy(e);return Or(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Ke("need to specify a reason the DateTime is invalid");const r=e instanceof ut?e:new ut(e,n);if(ae.throwOnInvalid)throw new gg(r);return new M({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=am(e,Y.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return im(Ee.parseFormat(e),Y.fromObject(n)).map(i=>i.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wa(this).weekYear:NaN}get weekNumber(){return this.isValid?Wa(this).weekNumber:NaN}get weekday(){return this.isValid?Wa(this).weekday:NaN}get ordinal(){return this.isValid?Va(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return gi(this.year)}get daysInMonth(){return As(this.year,this.month)}get daysInYear(){return this.isValid?Br(this.year):NaN}get weeksInWeekYear(){return this.isValid?zs(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:i}=Ee.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(_e.instance(e),n)}toLocal(){return this.setZone(ae.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=qt(e,ae.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){const s=e.offset(this.ts),a=this.toObject();[i]=cs(a,s,e)}return jr(this,{ts:i,zone:e})}else return M.invalid(qi(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return jr(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=$s(e,zc),r=!z(n.weekYear)||!z(n.weekNumber)||!z(n.weekday),i=!z(n.ordinal),s=!z(n.year),a=!z(n.month)||!z(n.day),o=s||a,l=n.weekYear||n.weekNumber;if((o||i)&&l)throw new Lr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&i)throw new Lr("Can't mix ordinal dates with month/day");let c;r?c=Dc({...Go(this.c),...n}):z(n.ordinal)?(c={...this.toObject(),...n},z(n.day)&&(c.day=Math.min(As(c.year,c.month),c.day))):c=Ic({...Va(this.c),...n});const[f,d]=cs(c,this.o,this.zone);return jr(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const n=$.fromDurationLike(e);return jr(this,Fc(this,n))}minus(e){if(!this.isValid)return this;const n=$.fromDurationLike(e).negate();return jr(this,Fc(this,n))}startOf(e){if(!this.isValid)return this;const n={},r=$.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks"&&(n.weekday=1),r==="quarters"){const i=Math.ceil(this.month/3);n.month=(i-1)*3+1}return this.set(n)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,n={}){return this.isValid?Ee.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Ha}toLocaleString(e=Fs,n={}){return this.isValid?Ee.create(this.loc.clone(n),e).formatDateTime(this):Ha}toLocaleParts(e={}){return this.isValid?Ee.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const a=e==="extended";let o=qa(this,a);return o+="T",o+=Ac(this,a,n,r,i,s),o}toISODate({format:e="extended"}={}){return this.isValid?qa(this,e==="extended"):null}toISOWeekDate(){return Bi(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:s=!1,format:a="extended"}={}){return this.isValid?(i?"T":"")+Ac(this,a==="extended",n,e,r,s):null}toRFC2822(){return Bi(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bi(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?qa(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),Bi(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ha}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return $.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},s=bg(n).map($.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,l=a?e:this,c=Qy(o,l,s,i);return a?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(M.now(),e,n)}until(e){return this.isValid?te.fromDateTimes(this,e):this}hasSame(e,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n)<=r&&r<=i.endOf(n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||M.fromObject({},{zone:this.zone}),r=e.padding?thisn.valueOf(),Math.min)}static max(...e){if(!e.every(M.isDateTime))throw new Ke("max requires all arguments be DateTimes");return Nc(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:i=null,numberingSystem:s=null}=r,a=Y.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return sm(a,e,n)}static fromStringExplain(e,n,r={}){return M.fromFormatExplain(e,n,r)}static get DATE_SHORT(){return Fs}static get DATE_MED(){return wh}static get DATE_MED_WITH_WEEKDAY(){return xg}static get DATE_FULL(){return xh}static get DATE_HUGE(){return Sh}static get TIME_SIMPLE(){return kh}static get TIME_WITH_SECONDS(){return Eh}static get TIME_WITH_SHORT_OFFSET(){return Th}static get TIME_WITH_LONG_OFFSET(){return Nh}static get TIME_24_SIMPLE(){return Ch}static get TIME_24_WITH_SECONDS(){return _h}static get TIME_24_WITH_SHORT_OFFSET(){return jh}static get TIME_24_WITH_LONG_OFFSET(){return Oh}static get DATETIME_SHORT(){return Ph}static get DATETIME_SHORT_WITH_SECONDS(){return Rh}static get DATETIME_MED(){return Dh}static get DATETIME_MED_WITH_SECONDS(){return Ih}static get DATETIME_MED_WITH_WEEKDAY(){return Sg}static get DATETIME_FULL(){return Mh}static get DATETIME_FULL_WITH_SECONDS(){return Lh}static get DATETIME_HUGE(){return Fh}static get DATETIME_HUGE_WITH_SECONDS(){return Ah}}function Pr(t){if(M.isDateTime(t))return t;if(t&&t.valueOf&&Sn(t.valueOf()))return M.fromJSDate(t);if(t&&typeof t=="object")return M.fromObject(t);throw new Ke(`Unknown datetime argument: ${t}, of type ${typeof t}`)}function v0(t){return t.toString(16).padStart(2,"0")}function Vc(t){const e=new Uint8Array((t||40)/2);return window.crypto.getRandomValues(e),Array.from(e,v0).join("")}function g0(t,e,n,r){if(t[n]===e[n])return 0;const i=(t[n]||"")<(e[n]||"")?-1:1;return r===ft.asc?i:-i}function y0(t,e,n,r){if(t[n]===e[n])return 0;const i=t[n]1?e[e.length-1]:"1"}function gm(t,e){const n=M.fromSeconds(t,{zone:"UTC"}).setLocale(e);return`${n.toFormat("dd-MM-yyyy TTT")} (${n.toRelative()})`}function w0(t){return new RegExp("^(?:[a-z]+:)?//","i").test(t)}function x0(t){return t.includes("withId=true")}function ym(t){return t.getElementsByTagName("parsererror").length>0?t.getElementsByTagName("parsererror")[0].textContent:""}function S0(t){return` +***************************************************************************** */var qo=function(t,e){return qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},qo(t,e)};function Yl(t,e){qo(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var cr=function(){return cr=Object.assign||function(e){for(var n,r=1,i=arguments.length;r(t.success="success",t.warning="warning",t.error="error",t))(V||{}),Re=(t=>(t.RoaSeen="roa_seen",t.RoaUnseen="roa_unseen",t.RoaNotHeld="roa_not_held",t.RoaNoAnnouncementInfo="roa_no_announcement_info",t.RoaTooPermissive="roa_too_permissive",t.RoaDisallowing="roa_disallowing",t.RoaRedundant="roa_redundant",t.RoaAs0="roa_as0",t.RoaAs0Redundant="roa_as0_redundant",t.AnnouncementNotFound="announcement_not_found",t.AnnouncementInvalidLength="announcement_invalid_length",t.AnnouncementInvalidAsn="announcement_invalid_asn",t.AnnouncementDisallowedAs0="announcement_disallowed",t))(Re||{}),Yn=(t=>(t.asn="asn",t.comment="comment",t.prefix="prefix",t.state="state",t))(Yn||{}),ft=(t=>(t.asc="asc",t.desc="desc",t))(ft||{}),vt=(t=>(t.notFound="not_found",t.invalidAsn="invalid_asn",t.invalidLength="invalid_length",t.tooPermissive="too_permissive",t.disallowing="disallowing",t.stale="stale",t.redundant="redundant",t.as0Redundant="as0_redundant",t.specific="specific",t))(vt||{}),yt=(t=>(t[t.unchecked=0]="unchecked",t[t.checked=1]="checked",t[t.intermediate=2]="intermediate",t))(yt||{}),Ls=(t=>(t.action="action",t.reason="reason",t.asn="asn",t.maxLength="max_length",t.prefix="prefix",t))(Ls||{});class Pn extends Error{}class gg extends Pn{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class yg extends Pn{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class wg extends Pn{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Lr extends Pn{}class yh extends Pn{constructor(e){super(`Invalid unit ${e}`)}}class Ke extends Pn{}class zt extends Pn{constructor(){super("Zone is an abstract class")}}const C="numeric",mt="short",be="long",Fs={year:C,month:C,day:C},wh={year:C,month:mt,day:C},xg={year:C,month:mt,day:C,weekday:mt},xh={year:C,month:be,day:C},Sh={year:C,month:be,day:C,weekday:be},kh={hour:C,minute:C},Eh={hour:C,minute:C,second:C},Th={hour:C,minute:C,second:C,timeZoneName:mt},Nh={hour:C,minute:C,second:C,timeZoneName:be},Ch={hour:C,minute:C,hourCycle:"h23"},_h={hour:C,minute:C,second:C,hourCycle:"h23"},jh={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:mt},Oh={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:be},Ph={year:C,month:C,day:C,hour:C,minute:C},Rh={year:C,month:C,day:C,hour:C,minute:C,second:C},Dh={year:C,month:mt,day:C,hour:C,minute:C},Ih={year:C,month:mt,day:C,hour:C,minute:C,second:C},Sg={year:C,month:mt,day:C,weekday:mt,hour:C,minute:C},Mh={year:C,month:be,day:C,hour:C,minute:C,timeZoneName:mt},Lh={year:C,month:be,day:C,hour:C,minute:C,second:C,timeZoneName:mt},Fh={year:C,month:be,day:C,weekday:be,hour:C,minute:C,timeZoneName:be},Ah={year:C,month:be,day:C,weekday:be,hour:C,minute:C,second:C,timeZoneName:be};class vi{get type(){throw new zt}get name(){throw new zt}get ianaName(){return this.name}get isUniversal(){throw new zt}offsetName(e,n){throw new zt}formatOffset(e,n){throw new zt}offset(e){throw new zt}equals(e){throw new zt}get isValid(){throw new zt}}let $a=null;class ia extends vi{static get instance(){return $a===null&&($a=new ia),$a}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return $h(e,n,r)}formatOffset(e,n){return Zr(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let us={};function kg(t){return us[t]||(us[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),us[t]}const Eg={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Tg(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,a,o,l,c,f]=r;return[a,i,s,o,l,c,f]}function Ng(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i=0?w:1e3+w,(v-y)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let gc={};function Cg(t,e={}){const n=JSON.stringify([t,e]);let r=gc[n];return r||(r=new Intl.ListFormat(t,e),gc[n]=r),r}let Bo={};function Zo(t,e={}){const n=JSON.stringify([t,e]);let r=Bo[n];return r||(r=new Intl.DateTimeFormat(t,e),Bo[n]=r),r}let Qo={};function _g(t,e={}){const n=JSON.stringify([t,e]);let r=Qo[n];return r||(r=new Intl.NumberFormat(t,e),Qo[n]=r),r}let Yo={};function jg(t,e={}){const{base:n,...r}=e,i=JSON.stringify([t,r]);let s=Yo[i];return s||(s=new Intl.RelativeTimeFormat(t,e),Yo[i]=s),s}let Fr=null;function Og(){return Fr||(Fr=new Intl.DateTimeFormat().resolvedOptions().locale,Fr)}function Pg(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=Zo(t).resolvedOptions(),i=t}catch{const l=t.substring(0,n);r=Zo(l).resolvedOptions(),i=l}const{numberingSystem:s,calendar:a}=r;return[i,s,a]}}function Rg(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Dg(t){const e=[];for(let n=1;n<=12;n++){const r=M.utc(2016,n,1);e.push(t(r))}return e}function Ig(t){const e=[];for(let n=1;n<=7;n++){const r=M.utc(2016,11,13+n);e.push(t(r))}return e}function Vi(t,e,n,r,i){const s=t.listingMode(n);return s==="error"?null:s==="en"?r(e):i(e)}function Mg(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Lg{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:s,...a}=r;if(!n||Object.keys(a).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=_g(e,o)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):Jl(e,3);return oe(n,this.padTo)}}}class Fg{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Mt.create(o).valid?(i=o,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=Zo(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Ag{constructor(e,n,r){this.opts={style:"long",...r},!n&&zh()&&(this.rtf=jg(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):ey(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}class Y{static fromOpts(e){return Y.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,n,r,i=!1){const s=e||ae.defaultLocale,a=s||(i?"en-US":Og()),o=n||ae.defaultNumberingSystem,l=r||ae.defaultOutputCalendar;return new Y(a,o,l,s)}static resetCache(){Fr=null,Bo={},Qo={},Yo={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r}={}){return Y.create(e,n,r)}constructor(e,n,r,i){const[s,a,o]=Pg(e);this.locale=s,this.numberingSystem=n||a||null,this.outputCalendar=r||o||null,this.intl=Rg(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Mg(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Y.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1,r=!0){return Vi(this,e,r,Vh,()=>{const i=n?{month:e,day:"numeric"}:{month:e},s=n?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=Dg(a=>this.extract(a,i,"month"))),this.monthsCache[s][e]})}weekdays(e,n=!1,r=!0){return Vi(this,e,r,qh,()=>{const i=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=n?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=Ig(a=>this.extract(a,i,"weekday"))),this.weekdaysCache[s][e]})}meridiems(e=!0){return Vi(this,void 0,e,()=>Bh,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[M.utc(2016,11,13,9),M.utc(2016,11,13,19)].map(r=>this.extract(r,n,"dayperiod"))}return this.meridiemCache})}eras(e,n=!0){return Vi(this,e,n,Zh,()=>{const r={era:e};return this.eraCache[e]||(this.eraCache[e]=[M.utc(-40,1,1),M.utc(2017,1,1)].map(i=>this.extract(i,r,"era"))),this.eraCache[e]})}extract(e,n,r){const i=this.dtFormatter(e,n),s=i.formatToParts(),a=s.find(o=>o.type.toLowerCase()===r);return a?a.value:null}numberFormatter(e={}){return new Lg(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Fg(e,this.intl,n)}relFormatter(e={}){return new Ag(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Cg(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let Ua=null;class _e extends vi{static get utcInstance(){return Ua===null&&(Ua=new _e(0)),Ua}static instance(e){return e===0?_e.utcInstance:new _e(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new _e(aa(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Zr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Zr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Zr(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class zg extends vi{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function qt(t,e){if(z(t)||t===null)return e;if(t instanceof vi)return t;if($g(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?ia.instance:n==="utc"||n==="gmt"?_e.utcInstance:_e.parseSpecifier(n)||Mt.create(t)}else return Sn(t)?_e.instance(t):typeof t=="object"&&t.offset&&typeof t.offset=="number"?t:new zg(t)}let yc=()=>Date.now(),wc="system",xc=null,Sc=null,kc=null,Ec=60,Tc;class ae{static get now(){return yc}static set now(e){yc=e}static set defaultZone(e){wc=e}static get defaultZone(){return qt(wc,ia.instance)}static get defaultLocale(){return xc}static set defaultLocale(e){xc=e}static get defaultNumberingSystem(){return Sc}static set defaultNumberingSystem(e){Sc=e}static get defaultOutputCalendar(){return kc}static set defaultOutputCalendar(e){kc=e}static get twoDigitCutoffYear(){return Ec}static set twoDigitCutoffYear(e){Ec=e%100}static get throwOnInvalid(){return Tc}static set throwOnInvalid(e){Tc=e}static resetCaches(){Y.resetCache(),Mt.resetCache()}}function z(t){return typeof t>"u"}function Sn(t){return typeof t=="number"}function sa(t){return typeof t=="number"&&t%1===0}function $g(t){return typeof t=="string"}function Ug(t){return Object.prototype.toString.call(t)==="[object Date]"}function zh(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function bg(t){return Array.isArray(t)?t:[t]}function Nc(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{const s=[e(i),i];return r&&n(r[0],s[0])===r[0]?r:s},null)[1]}function Vg(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function dr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function jt(t,e,n){return sa(t)&&t>=e&&t<=n}function Hg(t,e){return t-e*Math.floor(t/e)}function oe(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function Vt(t){if(!(z(t)||t===null||t===""))return parseInt(t,10)}function dn(t){if(!(z(t)||t===null||t===""))return parseFloat(t)}function Gl(t){if(!(z(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Jl(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function gi(t){return t%4===0&&(t%100!==0||t%400===0)}function Br(t){return gi(t)?366:365}function As(t,e){const n=Hg(e-1,12)+1,r=t+(e-n)/12;return n===2?gi(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Xl(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function zs(t){const e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,n=t-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return e===4||r===3?53:52}function Ko(t){return t>99?t:t>ae.twoDigitCutoffYear?1900+t:2e3+t}function $h(t,e,n,r=null){const i=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const a={timeZoneName:e,...s},o=new Intl.DateTimeFormat(n,a).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return o?o.value:null}function aa(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Uh(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Ke(`Invalid unit value ${t}`);return e}function $s(t,e){const n={};for(const r in t)if(dr(t,r)){const i=t[r];if(i==null)continue;n[e(r)]=Uh(i)}return n}function Zr(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${oe(n,2)}:${oe(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${oe(n,2)}${oe(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function oa(t){return Vg(t,["hour","minute","second","millisecond"])}const Wg=["January","February","March","April","May","June","July","August","September","October","November","December"],bh=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],qg=["J","F","M","A","M","J","J","A","S","O","N","D"];function Vh(t){switch(t){case"narrow":return[...qg];case"short":return[...bh];case"long":return[...Wg];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Hh=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Wh=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Bg=["M","T","W","T","F","S","S"];function qh(t){switch(t){case"narrow":return[...Bg];case"short":return[...Wh];case"long":return[...Hh];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Bh=["AM","PM"],Zg=["Before Christ","Anno Domini"],Qg=["BC","AD"],Yg=["B","A"];function Zh(t){switch(t){case"narrow":return[...Yg];case"short":return[...Qg];case"long":return[...Zg];default:return null}}function Kg(t){return Bh[t.hour<12?0:1]}function Gg(t,e){return qh(e)[t.weekday-1]}function Jg(t,e){return Vh(e)[t.month-1]}function Xg(t,e){return Zh(e)[t.year<0?0:1]}function ey(t,e,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&s){const d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${i[t][0]}`;case-1:return d?"yesterday":`last ${i[t][0]}`;case 0:return d?"today":`this ${i[t][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),l=o===1,c=i[t],f=r?l?c[1]:c[2]||c[1]:l?i[t][0]:t;return a?`${o} ${f} ago`:`in ${o} ${f}`}function Cc(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const ty={D:Fs,DD:wh,DDD:xh,DDDD:Sh,t:kh,tt:Eh,ttt:Th,tttt:Nh,T:Ch,TT:_h,TTT:jh,TTTT:Oh,f:Ph,ff:Dh,fff:Mh,ffff:Fh,F:Rh,FF:Ih,FFF:Lh,FFFF:Ah};class Ee{static create(e,n={}){return new Ee(e,n)}static parseFormat(e){let n=null,r="",i=!1;const s=[];for(let a=0;a0&&s.push({literal:i||/^\s+$/.test(r),val:r}),n=null,r="",i=!i):i||o===n?r+=o:(r.length>0&&s.push({literal:/^\s+$/.test(r),val:r}),r=o,n=o)}return r.length>0&&s.push({literal:i||/^\s+$/.test(r),val:r}),s}static macroTokenToFormatOpts(e){return ty[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}formatDateTime(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n}).format()}formatDateTimeParts(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n}).formatToParts()}formatInterval(e,n={}){return this.loc.dtFormatter(e.start,{...this.opts,...n}).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n}).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return oe(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(y,w)=>this.loc.extract(e,y,w),a=y=>e.isOffsetFixed&&e.offset===0&&y.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,y.format):"",o=()=>r?Kg(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(y,w)=>r?Jg(e,y):s(w?{month:y}:{month:y,day:"numeric"},"month"),c=(y,w)=>r?Gg(e,y):s(w?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),f=y=>{const w=Ee.macroTokenToFormatOpts(y);return w?this.formatWithSystemDefault(e,w):y},d=y=>r?Xg(e,y):s({era:y},"era"),v=y=>{switch(y){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(y)}};return Cc(Ee.parseFormat(n),v)}formatDurationFromString(e,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>c=>{const f=r(c);return f?this.num(l.get(f),c.length):c},s=Ee.parseFormat(n),a=s.reduce((l,{literal:c,val:f})=>c?l:l.concat(f),[]),o=e.shiftTo(...a.map(r).filter(l=>l));return Cc(s,i(o))}}class ut{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Qh=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function vr(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function gr(...t){return e=>t.reduce(([n,r,i],s)=>{const[a,o,l]=s(e,i);return[{...n,...a},o||r,l]},[{},null,1]).slice(0,2)}function yr(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const i=n.exec(t);if(i)return r(i)}return[null,null]}function Yh(...t){return(e,n)=>{const r={};let i;for(i=0;iy!==void 0&&(w||y&&f)?-y:y;return[{years:v(dn(n)),months:v(dn(r)),weeks:v(dn(i)),days:v(dn(s)),hours:v(dn(a)),minutes:v(dn(o)),seconds:v(dn(l),l==="-0"),milliseconds:v(Gl(c),d)}]}const my={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function nu(t,e,n,r,i,s,a){const o={year:e.length===2?Ko(Vt(e)):Vt(e),month:bh.indexOf(n)+1,day:Vt(r),hour:Vt(i),minute:Vt(s)};return a&&(o.second=Vt(a)),t&&(o.weekday=t.length>3?Hh.indexOf(t)+1:Wh.indexOf(t)+1),o}const py=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function vy(t){const[,e,n,r,i,s,a,o,l,c,f,d]=t,v=nu(e,i,r,n,s,a,o);let y;return l?y=my[l]:c?y=0:y=aa(f,d),[v,new _e(y)]}function gy(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const yy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,wy=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,xy=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function _c(t){const[,e,n,r,i,s,a,o]=t;return[nu(e,i,r,n,s,a,o),_e.utcInstance]}function Sy(t){const[,e,n,r,i,s,a,o]=t;return[nu(e,o,n,r,i,s,a),_e.utcInstance]}const ky=vr(ry,tu),Ey=vr(iy,tu),Ty=vr(sy,tu),Ny=vr(Gh),Xh=gr(cy,wr,yi,wi),Cy=gr(ay,wr,yi,wi),_y=gr(oy,wr,yi,wi),jy=gr(wr,yi,wi);function Oy(t){return yr(t,[ky,Xh],[Ey,Cy],[Ty,_y],[Ny,jy])}function Py(t){return yr(gy(t),[py,vy])}function Ry(t){return yr(t,[yy,_c],[wy,_c],[xy,Sy])}function Dy(t){return yr(t,[fy,hy])}const Iy=gr(wr);function My(t){return yr(t,[dy,Iy])}const Ly=vr(ly,uy),Fy=vr(Jh),Ay=gr(wr,yi,wi);function zy(t){return yr(t,[Ly,Xh],[Fy,Ay])}const $y="Invalid Duration",em={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Uy={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...em},Be=146097/400,In=146097/4800,by={years:{quarters:4,months:12,weeks:Be/7,days:Be,hours:Be*24,minutes:Be*24*60,seconds:Be*24*60*60,milliseconds:Be*24*60*60*1e3},quarters:{months:3,weeks:Be/28,days:Be/4,hours:Be*24/4,minutes:Be*24*60/4,seconds:Be*24*60*60/4,milliseconds:Be*24*60*60*1e3/4},months:{weeks:In/7,days:In,hours:In*24,minutes:In*24*60,seconds:In*24*60*60,milliseconds:In*24*60*60*1e3},...em},mn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Vy=mn.slice(0).reverse();function $t(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new $(r)}function Hy(t){return t<0?Math.floor(t):Math.ceil(t)}function tm(t,e,n,r,i){const s=t[i][n],a=e[n]/s,o=Math.sign(a)===Math.sign(r[i]),l=!o&&r[i]!==0&&Math.abs(a)<=1?Hy(a):Math.trunc(a);r[i]+=l,e[n]-=l*s}function Wy(t,e){Vy.reduce((n,r)=>z(e[r])?n:(n&&tm(t,e,n,e,r),r),null)}function qy(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}class ${constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?by:Uy;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Y.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return $.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Ke(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new $({values:$s(e,$.normalizeUnit),loc:Y.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Sn(e))return $.fromMillis(e);if($.isDuration(e))return e;if(typeof e=="object")return $.fromObject(e);throw new Ke(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=Dy(e);return r?$.fromObject(r,n):$.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=My(e);return r?$.fromObject(r,n):$.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Ke("need to specify a reason the Duration is invalid");const r=e instanceof ut?e:new ut(e,n);if(ae.throwOnInvalid)throw new wg(r);return new $({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new yh(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ee.create(this.loc,r).formatDurationFromString(this,e):$y}toHuman(e={}){const n=mn.map(r=>{const i=this.values[r];return z(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Jl(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let i=e.format==="basic"?"hhmm":"hh:mm";(!e.suppressSeconds||r.seconds!==0||r.milliseconds!==0)&&(i+=e.format==="basic"?"ss":":ss",(!e.suppressMilliseconds||r.milliseconds!==0)&&(i+=".SSS"));let s=r.toFormat(i);return e.includePrefix&&(s="T"+s),s}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=$.fromDurationLike(e),r={};for(const i of mn)(dr(n.values,i)||dr(this.values,i))&&(r[i]=n.get(i)+this.get(i));return $t(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=$.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Uh(e(this.values[r],r));return $t(this,{values:n},!0)}get(e){return this[$.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...$s(e,$.normalizeUnit)};return $t(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return $t(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Wy(this.matrix,e),$t(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=qy(this.normalize().shiftToAll().toObject());return $t(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>$.normalizeUnit(a));const n={},r={},i=this.toObject();let s;for(const a of mn)if(e.indexOf(a)>=0){s=a;let o=0;for(const c in r)o+=this.matrix[c][a]*r[c],r[c]=0;Sn(i[a])&&(o+=i[a]);const l=Math.trunc(o);n[a]=l,r[a]=(o*1e3-l*1e3)/1e3;for(const c in i)mn.indexOf(c)>mn.indexOf(a)&&tm(this.matrix,i,c,n,a)}else Sn(i[a])&&(r[a]=i[a]);for(const a in r)r[a]!==0&&(n[s]+=a===s?r[a]:r[a]/this.matrix[s][a]);return $t(this,{values:n},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return $t(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of mn)if(!n(this.values[r],e.values[r]))return!1;return!0}}const Mn="Invalid Interval";function By(t,e){return!t||!t.isValid?te.invalid("missing or invalid start"):!e||!e.isValid?te.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?te.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Pr).filter(a=>this.contains(a)).sort(),r=[];let{s:i}=this,s=0;for(;i+this.e?this.e:a;r.push(te.fromDateTimes(i,o)),i=o,s+=1}return r}splitBy(e){const n=$.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,s;const a=[];for(;rl*i));s=+o>+this.e?this.e:o,a.push(te.fromDateTimes(r,s)),r=s,i+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e=r?null:te.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.se.e?this.e:e.e;return te.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],a)=>s?s.overlaps(a)||s.abutsStart(a)?[i,s.union(a)]:[i.concat([s]),a]:[i,a],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const i=[],s=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...s),o=a.sort((l,c)=>l.time-c.time);for(const l of o)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&i.push(te.fromDateTimes(n,l.time)),n=null);return te.merge(i)}difference(...e){return te.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Mn}toLocaleString(e=Fs,n={}){return this.isValid?Ee.create(this.s.loc.clone(n),e).formatInterval(this):Mn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Mn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Mn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Mn}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Mn}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):$.invalid(this.invalidReason)}mapEndpoints(e){return te.fromDateTimes(e(this.s),e(this.e))}}class Hi{static hasDST(e=ae.defaultZone){const n=M.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return Mt.isValidZone(e)}static normalizeZone(e){return qt(e,ae.defaultZone)}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||Y.create(n,r,s)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||Y.create(n,r,s)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Y.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Y.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Y.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return Y.create(n,null,"gregory").eras(e)}static features(){return{relative:zh()}}}function jc(t,e){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor($.fromMillis(r).as("days"))}function Zy(t,e,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const f=jc(l,c);return(f-f%7)/7}],["days",jc]],i={},s=t;let a,o;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,i[l]=c(t,e),o=s.plus(i),o>e?(i[l]--,t=s.plus(i)):t=o);return[t,i,o,a]}function Qy(t,e,n,r){let[i,s,a,o]=Zy(t,e,n);const l=e-i,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a0?$.fromMillis(l,r).shiftTo(...c).plus(f):f}const ru={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Oc={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Yy=ru.hanidec.replace(/[\[|\]]/g,"").split("");function Ky(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n=s&&r<=a&&(e+=r-s)}}return parseInt(e,10)}else return e}function it({numberingSystem:t},e=""){return new RegExp(`${ru[t||"latn"]}${e}`)}const Gy="missing Intl.DateTimeFormat.formatToParts support";function b(t,e=n=>n){return{regex:t,deser:([n])=>e(Ky(n))}}const Jy=String.fromCharCode(160),nm=`[ ${Jy}]`,rm=new RegExp(nm,"g");function Xy(t){return t.replace(/\./g,"\\.?").replace(rm,nm)}function Pc(t){return t.replace(/\./g,"").replace(rm," ").toLowerCase()}function st(t,e){return t===null?null:{regex:RegExp(t.map(Xy).join("|")),deser:([n])=>t.findIndex(r=>Pc(n)===Pc(r))+e}}function Rc(t,e){return{regex:t,deser:([,n,r])=>aa(n,r),groups:e}}function Wi(t){return{regex:t,deser:([e])=>e}}function e0(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function t0(t,e){const n=it(e),r=it(e,"{2}"),i=it(e,"{3}"),s=it(e,"{4}"),a=it(e,"{6}"),o=it(e,"{1,2}"),l=it(e,"{1,3}"),c=it(e,"{1,6}"),f=it(e,"{1,9}"),d=it(e,"{2,4}"),v=it(e,"{4,6}"),y=k=>({regex:RegExp(e0(k.val)),deser:([m])=>m,literal:!0}),g=(k=>{if(t.literal)return y(k);switch(k.val){case"G":return st(e.eras("short",!1),0);case"GG":return st(e.eras("long",!1),0);case"y":return b(c);case"yy":return b(d,Ko);case"yyyy":return b(s);case"yyyyy":return b(v);case"yyyyyy":return b(a);case"M":return b(o);case"MM":return b(r);case"MMM":return st(e.months("short",!0,!1),1);case"MMMM":return st(e.months("long",!0,!1),1);case"L":return b(o);case"LL":return b(r);case"LLL":return st(e.months("short",!1,!1),1);case"LLLL":return st(e.months("long",!1,!1),1);case"d":return b(o);case"dd":return b(r);case"o":return b(l);case"ooo":return b(i);case"HH":return b(r);case"H":return b(o);case"hh":return b(r);case"h":return b(o);case"mm":return b(r);case"m":return b(o);case"q":return b(o);case"qq":return b(r);case"s":return b(o);case"ss":return b(r);case"S":return b(l);case"SSS":return b(i);case"u":return Wi(f);case"uu":return Wi(o);case"uuu":return b(n);case"a":return st(e.meridiems(),0);case"kkkk":return b(s);case"kk":return b(d,Ko);case"W":return b(o);case"WW":return b(r);case"E":case"c":return b(n);case"EEE":return st(e.weekdays("short",!1,!1),1);case"EEEE":return st(e.weekdays("long",!1,!1),1);case"ccc":return st(e.weekdays("short",!0,!1),1);case"cccc":return st(e.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Rc(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Rc(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Wi(/[a-z_+-/]{1,256}?/i);case" ":return Wi(/[^\S\n\r]/);default:return y(k)}})(t)||{invalidReason:Gy};return g.token=t,g}const n0={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function r0(t,e){const{type:n,value:r}=t;if(n==="literal"){const a=/^\s+$/.test(r);return{literal:!a,val:a?" ":r}}const i=e[n];let s=n0[n];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function i0(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function s0(t,e,n){const r=t.match(e);if(r){const i={};let s=1;for(const a in n)if(dr(n,a)){const o=n[a],l=o.groups?o.groups+1:1;!o.literal&&o.token&&(i[o.token.val[0]]=o.deser(r.slice(s,s+l))),s+=l}return[r,i]}else return[r,{}]}function a0(t){const e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return z(t.z)||(n=Mt.create(t.z)),z(t.Z)||(n||(n=new _e(t.Z)),r=t.Z),z(t.q)||(t.M=(t.q-1)*3+1),z(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),z(t.u)||(t.S=Gl(t.u)),[Object.keys(t).reduce((s,a)=>{const o=e(a);return o&&(s[o]=t[a]),s},{}),n,r]}let ba=null;function o0(){return ba||(ba=M.fromMillis(1555555555555)),ba}function l0(t,e){if(t.literal)return t;const n=Ee.macroTokenToFormatOpts(t.val),r=am(n,e);return r==null||r.includes(void 0)?t:r}function im(t,e){return Array.prototype.concat(...t.map(n=>l0(n,e)))}function sm(t,e,n){const r=im(Ee.parseFormat(n),t),i=r.map(a=>t0(a,t)),s=i.find(a=>a.invalidReason);if(s)return{input:e,tokens:r,invalidReason:s.invalidReason};{const[a,o]=i0(i),l=RegExp(a,"i"),[c,f]=s0(e,l,o),[d,v,y]=f?a0(f):[null,null,void 0];if(dr(f,"a")&&dr(f,"H"))throw new Lr("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:r,regex:l,rawMatches:c,matches:f,result:d,zone:v,specificOffset:y}}}function u0(t,e,n){const{result:r,zone:i,specificOffset:s,invalidReason:a}=sm(t,e,n);return[r,i,s,a]}function am(t,e){return t?Ee.create(e,t).formatDateTimeParts(o0()).map(i=>r0(i,t)):null}const om=[0,31,59,90,120,151,181,212,243,273,304,334],lm=[0,31,60,91,121,152,182,213,244,274,305,335];function Je(t,e){return new ut("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function um(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function cm(t,e,n){return n+(gi(t)?lm:om)[e-1]}function dm(t,e){const n=gi(t)?lm:om,r=n.findIndex(s=>szs(e)?(o=e+1,a=1):o=e,{weekYear:o,weekNumber:a,weekday:s,...oa(t)}}function Dc(t){const{weekYear:e,weekNumber:n,weekday:r}=t,i=um(e,1,4),s=Br(e);let a=n*7+r-i-3,o;a<1?(o=e-1,a+=Br(o)):a>s?(o=e+1,a-=Br(e)):o=e;const{month:l,day:c}=dm(o,a);return{year:o,month:l,day:c,...oa(t)}}function Va(t){const{year:e,month:n,day:r}=t,i=cm(e,n,r);return{year:e,ordinal:i,...oa(t)}}function Ic(t){const{year:e,ordinal:n}=t,{month:r,day:i}=dm(e,n);return{year:e,month:r,day:i,...oa(t)}}function c0(t){const e=sa(t.weekYear),n=jt(t.weekNumber,1,zs(t.weekYear)),r=jt(t.weekday,1,7);return e?n?r?!1:Je("weekday",t.weekday):Je("week",t.week):Je("weekYear",t.weekYear)}function d0(t){const e=sa(t.year),n=jt(t.ordinal,1,Br(t.year));return e?n?!1:Je("ordinal",t.ordinal):Je("year",t.year)}function fm(t){const e=sa(t.year),n=jt(t.month,1,12),r=jt(t.day,1,As(t.year,t.month));return e?n?r?!1:Je("day",t.day):Je("month",t.month):Je("year",t.year)}function hm(t){const{hour:e,minute:n,second:r,millisecond:i}=t,s=jt(e,0,23)||e===24&&n===0&&r===0&&i===0,a=jt(n,0,59),o=jt(r,0,59),l=jt(i,0,999);return s?a?o?l?!1:Je("millisecond",i):Je("second",r):Je("minute",n):Je("hour",e)}const Ha="Invalid DateTime",Mc=864e13;function qi(t){return new ut("unsupported zone",`the zone "${t.name}" is not supported`)}function Wa(t){return t.weekData===null&&(t.weekData=Go(t.c)),t.weekData}function jr(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new M({...n,...e,old:n})}function mm(t,e,n){let r=t-e*60*1e3;const i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const s=n.offset(r);return i===s?[r,i]:[t-Math.min(i,s)*60*1e3,Math.max(i,s)]}function Lc(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function cs(t,e,n){return mm(Xl(t),e,n)}function Fc(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...t.c,year:r,month:i,day:Math.min(t.c.day,As(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=$.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Xl(s);let[l,c]=mm(o,n,t.zone);return a!==0&&(l+=a,c=t.zone.offset(l)),{ts:l,o:c}}function Or(t,e,n,r,i,s){const{setZone:a,zone:o}=n;if(t&&Object.keys(t).length!==0||e){const l=e||o,c=M.fromObject(t,{...n,zone:l,specificOffset:s});return a?c:c.setZone(o)}else return M.invalid(new ut("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Bi(t,e,n=!0){return t.isValid?Ee.create(Y.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function qa(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=oe(t.c.year,n?6:4),e?(r+="-",r+=oe(t.c.month),r+="-",r+=oe(t.c.day)):(r+=oe(t.c.month),r+=oe(t.c.day)),r}function Ac(t,e,n,r,i,s){let a=oe(t.c.hour);return e?(a+=":",a+=oe(t.c.minute),(t.c.second!==0||!n)&&(a+=":")):a+=oe(t.c.minute),(t.c.second!==0||!n)&&(a+=oe(t.c.second),(t.c.millisecond!==0||!r)&&(a+=".",a+=oe(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!s?a+="Z":t.o<0?(a+="-",a+=oe(Math.trunc(-t.o/60)),a+=":",a+=oe(Math.trunc(-t.o%60))):(a+="+",a+=oe(Math.trunc(t.o/60)),a+=":",a+=oe(Math.trunc(t.o%60)))),s&&(a+="["+t.zone.ianaName+"]"),a}const pm={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},f0={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},h0={ordinal:1,hour:0,minute:0,second:0,millisecond:0},vm=["year","month","day","hour","minute","second","millisecond"],m0=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],p0=["year","ordinal","hour","minute","second","millisecond"];function zc(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new yh(t);return e}function $c(t,e){const n=qt(e.zone,ae.defaultZone),r=Y.fromObject(e),i=ae.now();let s,a;if(z(t.year))s=i;else{for(const c of vm)z(t[c])&&(t[c]=pm[c]);const o=fm(t)||hm(t);if(o)return M.invalid(o);const l=n.offset(i);[s,a]=cs(t,l,n)}return new M({ts:s,zone:n,loc:r,o:a})}function Uc(t,e,n){const r=z(n.round)?!0:n.round,i=(a,o)=>(a=Jl(a,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(a,o)),s=a=>n.calendary?e.hasSame(t,a)?0:e.startOf(a).diff(t.startOf(a),a).get(a):e.diff(t,a).get(a);if(n.unit)return i(s(n.unit),n.unit);for(const a of n.units){const o=s(a);if(Math.abs(o)>=1)return i(o,a)}return i(t>e?-0:0,n.units[n.units.length-1])}function bc(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}class M{constructor(e){const n=e.zone||ae.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new ut("invalid input"):null)||(n.isValid?null:qi(n));this.ts=z(e.ts)?ae.now():e.ts;let i=null,s=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,s]=[e.old.c,e.old.o];else{const o=n.offset(this.ts);i=Lc(this.ts,o),r=Number.isNaN(i.year)?new ut("invalid input"):null,i=r?null:i,s=r?null:o}this._zone=n,this.loc=e.loc||Y.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new M({})}static local(){const[e,n]=bc(arguments),[r,i,s,a,o,l,c]=n;return $c({year:r,month:i,day:s,hour:a,minute:o,second:l,millisecond:c},e)}static utc(){const[e,n]=bc(arguments),[r,i,s,a,o,l,c]=n;return e.zone=_e.utcInstance,$c({year:r,month:i,day:s,hour:a,minute:o,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const r=Ug(e)?e.valueOf():NaN;if(Number.isNaN(r))return M.invalid("invalid input");const i=qt(n.zone,ae.defaultZone);return i.isValid?new M({ts:r,zone:i,loc:Y.fromObject(n)}):M.invalid(qi(i))}static fromMillis(e,n={}){if(Sn(e))return e<-Mc||e>Mc?M.invalid("Timestamp out of range"):new M({ts:e,zone:qt(n.zone,ae.defaultZone),loc:Y.fromObject(n)});throw new Ke(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Sn(e))return new M({ts:e*1e3,zone:qt(n.zone,ae.defaultZone),loc:Y.fromObject(n)});throw new Ke("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=qt(n.zone,ae.defaultZone);if(!r.isValid)return M.invalid(qi(r));const i=ae.now(),s=z(n.specificOffset)?r.offset(i):n.specificOffset,a=$s(e,zc),o=!z(a.ordinal),l=!z(a.year),c=!z(a.month)||!z(a.day),f=l||c,d=a.weekYear||a.weekNumber,v=Y.fromObject(n);if((f||o)&&d)throw new Lr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&o)throw new Lr("Can't mix ordinal dates with month/day");const y=d||a.weekday&&!f;let w,g,k=Lc(i,s);y?(w=m0,g=f0,k=Go(k)):o?(w=p0,g=h0,k=Va(k)):(w=vm,g=pm);let m=!1;for(const _ of w){const D=a[_];z(D)?m?a[_]=g[_]:a[_]=k[_]:m=!0}const h=y?c0(a):o?d0(a):fm(a),p=h||hm(a);if(p)return M.invalid(p);const x=y?Dc(a):o?Ic(a):a,[S,T]=cs(x,s,r),N=new M({ts:S,zone:r,o:T,loc:v});return a.weekday&&f&&e.weekday!==N.weekday?M.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${N.toISO()}`):N}static fromISO(e,n={}){const[r,i]=Oy(e);return Or(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,i]=Py(e);return Or(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,i]=Ry(e);return Or(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(z(e)||z(n))throw new Ke("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=r,a=Y.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[o,l,c,f]=u0(a,e,n);return f?M.invalid(f):Or(o,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return M.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,i]=zy(e);return Or(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Ke("need to specify a reason the DateTime is invalid");const r=e instanceof ut?e:new ut(e,n);if(ae.throwOnInvalid)throw new gg(r);return new M({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=am(e,Y.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return im(Ee.parseFormat(e),Y.fromObject(n)).map(i=>i.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wa(this).weekYear:NaN}get weekNumber(){return this.isValid?Wa(this).weekNumber:NaN}get weekday(){return this.isValid?Wa(this).weekday:NaN}get ordinal(){return this.isValid?Va(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hi.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hi.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hi.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hi.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return gi(this.year)}get daysInMonth(){return As(this.year,this.month)}get daysInYear(){return this.isValid?Br(this.year):NaN}get weeksInWeekYear(){return this.isValid?zs(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:i}=Ee.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(_e.instance(e),n)}toLocal(){return this.setZone(ae.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=qt(e,ae.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){const s=e.offset(this.ts),a=this.toObject();[i]=cs(a,s,e)}return jr(this,{ts:i,zone:e})}else return M.invalid(qi(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return jr(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=$s(e,zc),r=!z(n.weekYear)||!z(n.weekNumber)||!z(n.weekday),i=!z(n.ordinal),s=!z(n.year),a=!z(n.month)||!z(n.day),o=s||a,l=n.weekYear||n.weekNumber;if((o||i)&&l)throw new Lr("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&i)throw new Lr("Can't mix ordinal dates with month/day");let c;r?c=Dc({...Go(this.c),...n}):z(n.ordinal)?(c={...this.toObject(),...n},z(n.day)&&(c.day=Math.min(As(c.year,c.month),c.day))):c=Ic({...Va(this.c),...n});const[f,d]=cs(c,this.o,this.zone);return jr(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const n=$.fromDurationLike(e);return jr(this,Fc(this,n))}minus(e){if(!this.isValid)return this;const n=$.fromDurationLike(e).negate();return jr(this,Fc(this,n))}startOf(e){if(!this.isValid)return this;const n={},r=$.normalizeUnit(e);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks"&&(n.weekday=1),r==="quarters"){const i=Math.ceil(this.month/3);n.month=(i-1)*3+1}return this.set(n)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,n={}){return this.isValid?Ee.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Ha}toLocaleString(e=Fs,n={}){return this.isValid?Ee.create(this.loc.clone(n),e).formatDateTime(this):Ha}toLocaleParts(e={}){return this.isValid?Ee.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:s=!1}={}){if(!this.isValid)return null;const a=e==="extended";let o=qa(this,a);return o+="T",o+=Ac(this,a,n,r,i,s),o}toISODate({format:e="extended"}={}){return this.isValid?qa(this,e==="extended"):null}toISOWeekDate(){return Bi(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:s=!1,format:a="extended"}={}){return this.isValid?(i?"T":"")+Ac(this,a==="extended",n,e,r,s):null}toRFC2822(){return Bi(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Bi(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?qa(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),Bi(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Ha}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return $.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},s=bg(n).map($.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,l=a?e:this,c=Qy(o,l,s,i);return a?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(M.now(),e,n)}until(e){return this.isValid?te.fromDateTimes(this,e):this}hasSame(e,n){if(!this.isValid)return!1;const r=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(n)<=r&&r<=i.endOf(n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||M.fromObject({},{zone:this.zone}),r=e.padding?thisn.valueOf(),Math.min)}static max(...e){if(!e.every(M.isDateTime))throw new Ke("max requires all arguments be DateTimes");return Nc(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:i=null,numberingSystem:s=null}=r,a=Y.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return sm(a,e,n)}static fromStringExplain(e,n,r={}){return M.fromFormatExplain(e,n,r)}static get DATE_SHORT(){return Fs}static get DATE_MED(){return wh}static get DATE_MED_WITH_WEEKDAY(){return xg}static get DATE_FULL(){return xh}static get DATE_HUGE(){return Sh}static get TIME_SIMPLE(){return kh}static get TIME_WITH_SECONDS(){return Eh}static get TIME_WITH_SHORT_OFFSET(){return Th}static get TIME_WITH_LONG_OFFSET(){return Nh}static get TIME_24_SIMPLE(){return Ch}static get TIME_24_WITH_SECONDS(){return _h}static get TIME_24_WITH_SHORT_OFFSET(){return jh}static get TIME_24_WITH_LONG_OFFSET(){return Oh}static get DATETIME_SHORT(){return Ph}static get DATETIME_SHORT_WITH_SECONDS(){return Rh}static get DATETIME_MED(){return Dh}static get DATETIME_MED_WITH_SECONDS(){return Ih}static get DATETIME_MED_WITH_WEEKDAY(){return Sg}static get DATETIME_FULL(){return Mh}static get DATETIME_FULL_WITH_SECONDS(){return Lh}static get DATETIME_HUGE(){return Fh}static get DATETIME_HUGE_WITH_SECONDS(){return Ah}}function Pr(t){if(M.isDateTime(t))return t;if(t&&t.valueOf&&Sn(t.valueOf()))return M.fromJSDate(t);if(t&&typeof t=="object")return M.fromObject(t);throw new Ke(`Unknown datetime argument: ${t}, of type ${typeof t}`)}function v0(t){return t.toString(16).padStart(2,"0")}function Vc(t){const e=new Uint8Array((t||40)/2);return window.crypto.getRandomValues(e),Array.from(e,v0).join("")}function g0(t,e,n,r){if(t[n]===e[n])return 0;const i=(t[n]||"")<(e[n]||"")?-1:1;return r===ft.asc?i:-i}function y0(t,e,n,r){if(t[n]===e[n])return 0;const i=t[n]1?e[e.length-1]:"1"}function gm(t,e){const n=M.fromSeconds(t,{zone:"UTC"}).setLocale(e);return`${n.toFormat("dd-MM-yyyy TTT")} (${n.toRelative()})`}function w0(t){return new RegExp("^(?:[a-z]+:)?//","i").test(t)}function x0(t){return t.includes("withId=true")}function ym(t){return t.getElementsByTagName("parsererror").length>0?t.getElementsByTagName("parsererror")[0].textContent:""}function S0(t){return` ${t.id_cert} @@ -72,7 +72,7 @@ and limitations under the License. ${t.id_cert} -`}function E0(t){const e=[];if(t.too_permissive)for(const n of t.too_permissive){e.push({action:"remove",reason:vt.tooPermissive,prefix:n.current.prefix,asn:n.current.asn,max_length:n.current.max_length||parseInt(n.current.prefix.split("/")[1])});for(const r of n.new)e.push({action:"remove",reason:vt.specific,prefix:r.prefix,asn:r.asn,max_length:parseInt(r.prefix.split("/")[1])})}if(t.not_found)for(const n of t.not_found)e.push({action:"add",reason:vt.notFound,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.invalid_length)for(const n of t.invalid_length)e.push({action:"add",reason:vt.invalidLength,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.redundant)for(const n of t.redundant)e.push({action:"remove",reason:vt.redundant,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.stale)for(const n of t.stale)e.push({action:"remove",reason:vt.stale,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.invalid_asn)for(const n of t.invalid_asn)e.push({action:"remove",reason:vt.invalidAsn,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.as0_redundant)for(const n of t.as0_redundant)e.push({action:"remove",reason:vt.as0Redundant,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.disallowing)for(const n of t.disallowing)e.push({action:"remove",reason:vt.disallowing,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});return e}class wm{constructor(){ce(this,"baseUrl");ce(this,"VERSION_URL","https://api.github.com/repos/nlnetlabs/krill/releases/latest");ce(this,"token");this.baseUrl=window.location.origin,this.token=null}setToken(e){this.token=e}async get(e,n){const r=await fetch(`${this.baseUrl}${e}`,{...n,headers:{Authorization:`Bearer ${this.token}`,...(n==null?void 0:n.headers)||{}}});if((r.status===401||r.status===403)&&this.setToken(null),!(r.headers.get("Content-Type")==="application/json")){const a=await r.text();if(r.status===200)return a;throw{status:r.status,msg:a}}const s=await r.json();if(r.status===200)return s;throw{status:r.status,msg:s.msg||null}}post(e,n){return this.get(e,{method:"POST",...n})}postCas(e){return this.post("/api/v1/cas",{body:JSON.stringify({handle:e}),headers:{"Content-Type":"application/json"}})}getCas(){return this.get("/api/v1/cas").then(({cas:e})=>e.map(({handle:n})=>n).reverse())}getCaDetails(e){return this.get(`/api/v1/cas/${e}`)}getCaRoas(e){return this.get(`/api/v1/cas/${e}/routes/analysis/full`).then(n=>n.map(r=>({id:Vc(10),...r})))}getCaSuggestions(e){return this.get(`/api/v1/cas/${e}/routes/analysis/suggest`).then(n=>E0(n)).then(n=>n.map(r=>({id:Vc(10),...r})))}refreshCaParents(){return this.post("/api/v1/bulk/cas/sync/parent")}getCaParents(e){return this.get(`/api/v1/cas/${e}/parents`).then(n=>Object.entries(n).map(([r,i])=>({name:r,...i})))}refreshCaRepo(){return this.post("/api/v1/bulk/cas/sync/repo")}getCaRepoStatus(e){return this.get(`/api/v1/cas/${e}/repo/status`)}getInfo(){return this.get("/stats/info")}getVersion(){return fetch(this.VERSION_URL).then(e=>e.json())}getChildRequest(e){return this.get(`/api/v1/cas/${e}/id/child_request.xml`)}getPublisherRequest(e){return this.get(`/api/v1/cas/${e}/id/publisher_request.xml`)}postParent(e,n,r){return this.post(`/api/v1/cas/${e}/parents/${n}`,{body:r})}postRepository(e,n,r){return this.post(`/api/v1/cas/${e}/repo`,{body:r})}updateRoutes(e,n){return this.get(`/api/v1/cas/${e}/routes`,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}getLoginMethod(){return fetch(`${this.baseUrl}/auth/login`).then(e=>e.status===200?e.text().then(n=>w0(n)?{redirect_url:n}:{with_id:x0(n)}):Promise.reject(e))}postLogin(e,n){const r="/auth/login";if(n){this.setToken(null);const i=btoa(`${n}:${e}`);return this.post(r,{headers:{Authorization:`Basic ${i}`}})}return this.setToken(e),this.post(r)}checkToken(e){return this.setToken(e),this.get("/api/v1/authorized")}getTestBedEnabled(){return fetch("/testbed/enabled").then(e=>e.status===200?!0:e.status===400?!1:Promise.reject(e))}}let Wc=null;function T0(){const[t,e]=P.useState(Wc);return P.useEffect(()=>{t||new wm().getInfo().then(r=>{e(r),Wc=r})},[]),t}const N0="/assets/logout-c725fd2c.svg",C0="/assets/user-5d1f1b14.svg";function iu({initial:t}){const e=On(),[n,r]=P.useState(t);return P.useEffect(()=>e.usePlugin(()=>({onTransitionStart:()=>r(!0),onTransitionSuccess:()=>r(!1)})),[]),n?u.jsx("div",{className:"loader",children:u.jsx("span",{children:"Loading…"})}):null}function xm({options:t,value:e,onChange:n,className:r}){const[i,s]=P.useState(!1);return u.jsxs("div",{className:`select ${r||""}`,children:[u.jsx("button",{className:i?"open":"",onClick:()=>s(!i),onBlur:()=>{setTimeout(()=>s(!1),300)},onKeyDown:a=>{a.key==="Escape"&&s(!1)},children:t[e]}),u.jsx("ul",{className:i?"show":"hide",children:Object.entries(t).map(([a,o])=>u.jsx("li",{className:e===a?"selected":"",onClick:()=>n(a),children:o},a))})]})}function xi({notification:t,onClose:e}){return u.jsxs("div",{className:`notification popup ${t.type}`,children:[u.jsx("button",{className:"close",onClick:e,children:"×"}),u.jsx("span",{children:t.message})]})}function _0(){const t=Ne(),[e,n]=P.useState(!1),r=()=>{n(!0),t.setNotification(null)};return P.useEffect(()=>{if(t.notification){n(!1);const i=setTimeout(r,5e3);return()=>clearTimeout(i)}},[t.notification]),!t.notification||e?null:u.jsx(xi,{notification:t.notification,onClose:r})}function Rn({children:t}){const e=ue(),{route:n}=He(),r=T0(),i=Ne(),s=new Date().getFullYear(),a=H();return P.useEffect(()=>{document.title=i.ca?`Krill - ${i.ca}`:"Krill"},[i.ca]),u.jsxs(u.Fragment,{children:[u.jsx(iu,{initial:!1}),u.jsxs("header",{children:[u.jsx("h1",{onClick:()=>e({},"cas"),children:u.jsx("span",{children:"Krill"})}),u.jsxs("menu",{children:[u.jsx(xm,{options:pg,value:i.locale,onChange:o=>e({locale:o})}),i.userDetails&&u.jsxs(u.Fragment,{children:[u.jsxs("button",{className:"pop",children:[u.jsx("img",{src:C0}),u.jsxs("div",{children:[u.jsx("h5",{children:a.common.userInfo.title}),u.jsx("table",{children:u.jsxs("tbody",{children:[u.jsxs("tr",{children:[u.jsxs("th",{children:[a.common.userInfo.user,":"]}),u.jsx("td",{children:i.userDetails.id})]}),Object.entries(i.userDetails.attributes).map(([o,l])=>u.jsxs("tr",{children:[u.jsxs("th",{className:"user-attribute",children:[o,":"]}),u.jsx("td",{children:l})]},o))]})})]})]}),u.jsx("button",{onClick:()=>e({},"logout"),children:u.jsx("img",{src:N0})})]})]})]}),u.jsx(_0,{}),u.jsx("div",{className:`content route-${n.name}`,children:t}),u.jsxs("footer",{children:[u.jsxs("span",{children:["© ",s," Stichting NLnet Labs"," - ","Krill ",r==null?void 0:r.version]}),u.jsxs("span",{children:[u.jsx("a",{href:"https://nlnetlabs.nl/services/contracts/",target:"_blank",rel:"noreferrer",children:a.common.supportcontracts})," - ",u.jsx("a",{href:"https://krill.docs.nlnetlabs.nl/",target:"_blank",rel:"noreferrer",children:a.common.readthedocs})," - ",u.jsx("a",{href:"https://github.com/NLnetLabs/krill/issues/new",target:"_blank",rel:"noreferrer",children:a.common.report})]})]})]})}function j0({columns:t,filtering:e}){const n=ue(),r=i=>{const s=e.sort===i&&e.order===ft.asc?ft.desc:ft.asc;n({sort:i,order:s})};return u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{}),t.map(({label:i,accessor:s})=>u.jsxs("th",{onClick:()=>r(s),children:[i,s===e.sort&&u.jsx("span",{className:e.order})]},s)),u.jsx("th",{})]})})}function qc({announcements:t}){const e=H();return u.jsxs("table",{children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.announcements.asn}),u.jsx("th",{children:e.announcements.prefix})]})}),u.jsxs("tbody",{children:[t.length===0&&u.jsx("tr",{children:u.jsx("td",{colSpan:2,children:u.jsx("span",{className:"muted",children:e.common.nodata})})}),t.map((n,r)=>u.jsxs("tr",{children:[u.jsx("td",{children:n.asn}),u.jsx("td",{children:n.prefix})]},r))]})]})}function O0({authorizes:t,disallows:e}){const n=H();return u.jsxs("div",{className:"row",children:[u.jsxs("div",{children:[u.jsx("h3",{children:n.announcements.authorizes.replace("{number}",t.length.toString())}),u.jsx(qc,{announcements:t})]}),u.jsxs("div",{children:[u.jsx("h3",{children:n.announcements.disallows.replace("{number}",e.length.toString())}),u.jsx(qc,{announcements:e})]})]})}const P0="/assets/trash-d9c6ee55.svg",R0="/assets/edit-776bf3c3.svg",D0="/assets/plus-e8f1d182.svg";function I0({roa:t,allowAdd:e,allowDelete:n,hasAnnouncements:r}){var d;const i=ue(),[s,a]=P.useState(!1),o=H(),l={id:((d=t.id)==null?void 0:d.toString())||"new"},c=`${t.state}_help`,f=o.announcements.state[c];return u.jsxs(u.Fragment,{children:[u.jsxs("tr",{className:r?"announcements":"",children:[u.jsx("td",{children:r&&u.jsx("button",{className:`expand ${s?"open":""}`,onClick:()=>a(!s)})}),u.jsx("td",{children:t.asn}),u.jsxs("td",{children:[t.prefix,t.max_length&&-t.max_length]}),u.jsxs("td",{children:[t.comment,n&&u.jsx("button",{className:"button icon light right",onClick:()=>i(l,"cas.edit"),children:u.jsx("img",{src:R0})})]}),u.jsxs("td",{children:[u.jsx("span",{className:`state ${t.state}`,title:f,children:o.announcements.state[t.state]}),t.authorizes&&u.jsx("span",{className:"badge success",children:t.authorizes.length}),t.disallows&&u.jsx("span",{className:"badge warning",children:t.disallows.length})]}),u.jsxs("td",{className:"actions",children:[e&&u.jsx("button",{className:"button icon",onClick:()=>i(l,"cas.add"),children:u.jsx("img",{src:D0})}),n&&u.jsx("button",{className:"button icon",onClick:()=>i(l,"cas.delete"),children:u.jsx("img",{src:P0})})]})]}),r&&s&&u.jsx("tr",{className:"announcements",children:u.jsx("td",{colSpan:6,children:u.jsx(O0,{authorizes:t.authorizes||[],disallows:t.disallows||[]})})})]})}function M0({tableData:t}){return u.jsx("tbody",{children:t.filter(e=>e.state!=Ae.AnnouncementDisallowedAs0).map(e=>u.jsx(I0,{roa:e,hasAnnouncements:!!e.authorizes||!!e.disallows,allowDelete:e.state===Ae.RoaSeen||e.state==Ae.RoaAs0||e.state===Ae.RoaDisallowing||e.state===Ae.RoaUnseen||e.state===Ae.RoaRedundant||e.state===Ae.RoaAs0Redundant||e.state===Ae.RoaTooPermissive||e.state===Ae.RoaNotHeld,allowAdd:e.state===Ae.AnnouncementNotFound||e.state===Ae.AnnouncementInvalidAsn||e.state===Ae.AnnouncementInvalidLength},e.id))})}function L0({filtering:t}){const e=H(),r=Ne().getRoas(t),i=[{label:e.announcements.asn,accessor:Yn.asn},{label:e.announcements.prefix,accessor:Yn.prefix},{label:e.caDetails.comment,accessor:Yn.comment},{label:e.announcements.stateLabel,accessor:Yn.state}];return u.jsxs("table",{className:"roa-table",children:[u.jsx(j0,{columns:i,filtering:t}),u.jsx(M0,{tableData:r})]})}function F0({details:t}){return u.jsx("div",{className:"ca-details card",children:u.jsx("table",{children:u.jsx("tbody",{children:Object.entries(t.resources).map(([e,n])=>u.jsxs("tr",{children:[u.jsx("th",{children:e}),u.jsx("td",{children:n.split(",").map(r=>u.jsx("p",{children:r},r))})]},e))})})})}function A0({onClose:t,roa:e}){var w;const n=H(),r=ue(),[i,s]=P.useState((e==null?void 0:e.asn.toString())||""),[a,o]=P.useState((e==null?void 0:e.prefix)||""),[l,c]=P.useState((e==null?void 0:e.comment)||""),f=Hc(e==null?void 0:e.prefix),[d,v]=P.useState(((w=e==null?void 0:e.max_length)==null?void 0:w.toString())||f),y=g=>{g.preventDefault();const k=g.target;k.checkValidity()?r({asn:i,prefix:a,comment:l,max_length:d}):k.reportValidity()};return u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:n.caDetails.addRoa}),u.jsxs("form",{onSubmit:y,children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"asn required",children:n.announcements.asn}),u.jsx("input",{type:"number",min:"0",name:"asn",onInput:g=>g.target.setCustomValidity(""),onInvalid:g=>g.target.setCustomValidity(n.caDetails.addROAForm.asn_format),value:i,onChange:g=>s(g.target.value),required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"prefix required",children:n.announcements.prefix}),u.jsx("input",{name:"prefix",pattern:"^((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.(?!\\/)|\\/)){4}([0-9]|[1-2][0-9]|3[0-2]))|(([a-fA-F0-9:]+)\\/([1-9]|[1-9][0-9]|1[01][0-9]|12[0-8]))$",onInput:g=>g.target.setCustomValidity(""),onInvalid:g=>g.target.setCustomValidity(n.caDetails.addROAForm.prefix_format),title:n.caDetails.addROAForm.prefix_format,value:a,onChange:g=>o(g.target.value),required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"maxLength",children:n.caDetails.maxLength}),u.jsx("input",{type:"number",min:Hc(a)||1,max:a.includes(".")||!a.includes(":")?32:128,name:"maxLength",value:d,onChange:g=>v(g.target.value),placeholder:n.caDetails.maxLengthTooltip})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"comment",children:n.caDetails.comment}),u.jsx("input",{name:"comment",value:l,onChange:g=>c(g.target.value)})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{type:"submit",className:"button",children:n.common.confirm})]})]})]})}const z0="modulepreload",$0=function(t){return"/"+t},Bc={},Et=function(e,n,r){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=$0(s),s in Bc)return;Bc[s]=!0;const a=s.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!r)for(let f=i.length-1;f>=0;f--){const d=i[f];if(d.href===s&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":z0,a||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),a)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},U0=(t,e)=>{const n=t[e];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((r,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e)))})};async function b0(t){return(await U0(Object.assign({"../locales/de.ts":()=>Et(()=>import("./de-aaa0f1e4.js"),[]),"../locales/en.ts":()=>Et(()=>import("./en-d3d88bc8.js"),[]),"../locales/es.ts":()=>Et(()=>import("./es-52cbfc21.js"),[]),"../locales/fr.ts":()=>Et(()=>import("./fr-ac1aafd8.js"),[]),"../locales/gr.ts":()=>Et(()=>import("./gr-5a66c94a.js"),[]),"../locales/nl.ts":()=>Et(()=>import("./nl-f2dd1189.js"),[]),"../locales/pt.ts":()=>Et(()=>import("./pt-e9bf4047.js"),[]),"../locales/zh-Hans.ts":()=>Et(()=>import("./zh-Hans-f7c709f7.js"),[]),"../locales/zh-Hant.ts":()=>Et(()=>import("./zh-Hant-0d86c694.js"),[])}),`../locales/${t}.ts`)).translations}function V0(t,e){return Object.entries(e).reduce((n,[r,i])=>n.replace(`{${r}}`,i),t)}function H0({onClose:t,roa:e}){var s;const n=H(),r=ue(),i={asn:e.asn.toString(),prefix:e.prefix,max_length:((s=e.max_length)==null?void 0:s.toString())||""};return u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:n.common.warning}),u.jsx("p",{children:V0(n.caDetails.confirmation.message,i)}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{className:"button",onClick:()=>{r(i)},children:n.common.ok})]})]})}function W0({onClose:t,roa:e}){const n=H(),r=ue(),[i,s]=P.useState((e==null?void 0:e.comment)||"");return u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:n.common.edit}),u.jsxs("form",{autoComplete:"off",onSubmit:a=>{a.preventDefault(),i!==(e==null?void 0:e.comment)?r({comment:i}):t()},children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"comment required",children:n.caDetails.comment}),u.jsx("input",{name:"comment",value:i,onChange:a=>s(a.target.value)})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{type:"submit",className:"button",children:n.common.confirm})]})]})]})}function Si({onClose:t,children:e}){return u.jsx("div",{className:"modal",onMouseDown:t,children:u.jsx("div",{onMouseDown:n=>{n.stopPropagation()},children:e})})}function q0(){const{route:t}=He(),e=On(),{route:{params:n}}=He(),s=Ne().getRoas().find(o=>o.id===n.id),a=()=>{e.navigate("cas",{ca:n.ca})};return!s&&t.name!=="cas.add_new"?null:u.jsxs(Si,{onClose:a,children:[t.name.startsWith("cas.add")&&u.jsx(A0,{onClose:a,roa:s}),t.name.startsWith("cas.edit")&&u.jsx(W0,{onClose:a,roa:s}),t.name==="cas.delete"&&u.jsx(H0,{onClose:a,roa:s})]})}function su(){var s,a,o;const t=Ne(),e=H(),n=ue(),r=t.ca&&t.parents[t.ca].length>0,i=t.repoStatus&&t.ca&&((s=t.repoStatus[t.ca])==null?void 0:s.last_exchange);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"space-between border-bottom row",children:[u.jsxs("h2",{children:[e.cas.ca," ",u.jsx("strong",{children:t.ca})]}),t.cas&&((a=t.cas)==null?void 0:a.length)>1&&u.jsxs("div",{children:[u.jsx("label",{htmlFor:"ca",children:e.caDetails.current}),u.jsx(xm,{className:"wide",options:((o=t.cas)==null?void 0:o.sort().reduce((l,c)=>({...l,[c]:[c]}),{}))||{},value:t.ca||"",onChange:l=>n({ca:l},"cas")})]})]}),!r&&u.jsx("div",{className:"notification error",children:e.caDetails.onboardingWarning}),r&&!i&&u.jsx("div",{className:"notification error",children:e.caDetails.initializeRepository}),u.jsx("div",{children:u.jsxs("ul",{className:"tabs",children:[u.jsx("li",{children:u.jsx(yn,{routeName:"cas",activeStrict:!0,routeParams:{ca:t.ca},children:e.caDetails.roas})}),u.jsx("li",{children:u.jsx(yn,{routeName:"cas.parents",routeParams:{ca:t.ca},children:e.caDetails.parents})}),u.jsx("li",{children:u.jsx(yn,{routeName:"cas.repository",routeParams:{ca:t.ca},children:e.caDetails.repo})})]})})]})}function B0({currentPage:t,numPages:e}){const n=ue();let r;if(e<=7)r=[...Array(e).keys()].map(i=>(i+1).toString());else if(r=Array(7),r[0]="1",r[6]=e.toString(),t>=1&&t<=4){for(let i=1;i<5;i++)r[i]=(i+1).toString();r[5]="..."}else if(t>=e-3&&t<=e){r[1]="...";for(let i=2;i<7;i++)r[i]=(e-6+i).toString()}else{r[1]="...";for(let i=2;i<5;i++)r[i]=(t-3+i).toString();r[5]="..."}return u.jsx(u.Fragment,{children:r.map((i,s)=>u.jsx("button",{className:i===t.toString()?"number current":"number",disabled:i===t.toString()||i==="...",onClick:()=>n({page:i}),children:i},s))})}function Z0({filtering:t}){const e=H(),r=Ne().getRoas().length,i=ue(),s=Math.ceil(r/t.limit);return u.jsxs("div",{className:"pagination",children:[u.jsx("select",{value:t.limit,onChange:a=>i({limit:a.target.value,page:"1"}),children:mg.map(a=>u.jsxs("option",{value:a,children:[a," / ",e.common.page]},a))}),u.jsxs("div",{children:[u.jsx("button",{disabled:t.page===1,className:"arrow prev",onClick:()=>i({page:(t.page-1).toString()}),children:u.jsx("span",{children:"<"})}),u.jsx(B0,{currentPage:t.page,numPages:s}),u.jsx("button",{disabled:t.page>s-1,className:"arrow next",onClick:()=>i({page:(t.page+1).toString()}),children:u.jsx("span",{children:">"})})]})]})}function Q0({columns:t,filtering:e,setAllCheckboxes:n,checkBoxState:r}){const i=ue(),s=a=>{const o=e.sort===a&&e.order===ft.asc?ft.desc:ft.asc;i({sort:a,order:o})};return u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:u.jsx("input",{type:"checkbox",checked:r===yt.checked,onChange:n,ref:a=>{a&&(a.indeterminate=r===yt.intermediate)}})}),u.jsx("th",{}),t.map(({label:a,accessor:o})=>u.jsxs("th",{onClick:()=>s(o),children:[a,o===e.sort&&u.jsx("span",{className:e.order})]},o)),u.jsx("th",{})]})})}const Y0="/assets/trash-red-65027383.svg",K0="/assets/check-green-4525c79c.svg";function G0({suggestion:t,id:e,checked:n,handleCheckbox:r}){const i=H(),s=i.caDetails.suggestions.reasons[t.reason];return u.jsxs(u.Fragment,{children:[u.jsx("td",{children:u.jsx("input",{type:"checkbox",id:e,onChange:r,checked:n})}),u.jsxs("td",{children:[t.action==="add"&&u.jsx("span",{className:"add",title:i.caDetails.suggestions.adding,children:u.jsx("img",{src:K0,title:`${i.caDetails.suggestions.willAdd} (${s})`})}),t.action==="remove"&&u.jsx("span",{className:"remove",title:i.caDetails.suggestions.willRemove,children:u.jsx("img",{src:Y0,title:`${i.caDetails.suggestions.willRemove} (${s})`})})]}),u.jsx("td",{children:t.asn}),u.jsx("td",{children:t.prefix}),u.jsx("td",{children:i.caDetails.suggestions.reasons[t.reason]})]})}function J0({suggestions:t,checkedBoxes:e,handleCheckbox:n}){return u.jsx("tbody",{children:t.map(r=>u.jsx("tr",{children:u.jsx(G0,{checked:e.includes(r.id||""),suggestion:r,id:r.id||"",handleCheckbox:n})},r.id))})}function X0({suggestions:t,filtering:e,checkedBoxes:n,handleCheckbox:r,handleAllCheckboxes:i,topCheckBoxState:s}){const a=H(),o=[{label:a.announcements.asn,accessor:Ls.asn},{label:a.announcements.prefix,accessor:Ls.prefix}];return u.jsxs("table",{className:"roa-table",children:[u.jsx(Q0,{columns:o,filtering:e,setAllCheckboxes:i,checkBoxState:s}),u.jsx(J0,{checkedBoxes:n,suggestions:t,handleCheckbox:r})]})}function e1(t){const n=Ne().getSuggestions(t),r=[];for(const f of n)r.push(f.id||"");const[i,s]=P.useState([]),[a,o]=P.useState(yt.unchecked);return{checked:i,topCheckbox:a,suggestions:n,handleCheckbox:f=>{let d=[...i];f.target.checked?(d=[...i,f.target.id],r.every(v=>d.includes(v))?o(yt.checked):o(yt.intermediate)):(d.splice(i.indexOf(f.target.id),1),d.length>0?o(yt.intermediate):o(yt.unchecked)),s(d)},handleAllCheckboxes:f=>{f.target.checked?(s(r),o(yt.checked)):(s([]),o(yt.unchecked))}}}function t1({onClose:t,filtering:e}){const n=H(),r=ue(),{checked:i,topCheckbox:s,suggestions:a,handleCheckbox:o,handleAllCheckboxes:l}=e1(e);return u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:n.caDetails.analysis}),a.length>0&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[n.caDetails.suggestions.following," ",u.jsx("a",{href:"https://krill.docs.nlnetlabs.nl/en/stable/manage-roas.html",target:"_blank",rel:"noreferrer",children:n.caDetails.suggestions.readMore})]}),u.jsx(X0,{checkedBoxes:i,suggestions:a,filtering:e,handleCheckbox:o,handleAllCheckboxes:l,topCheckBoxState:s})]}),a.length===0&&n.caDetails.suggestions.nochanges,u.jsxs("div",{className:"actions",children:[a.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button",className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{className:"button",onClick:()=>r({ids:JSON.stringify(i)},"cas.change"),children:n.common.confirm})]}),a.length===0&&u.jsx("button",{className:"button",onClick:t,children:n.common.ok})]})]})}function n1(){const t=On(),{route:e,route:{params:n}}=He(),r=()=>{t.navigate("cas",{ca:n.ca})};if(e.name!=="cas.analyse")return null;const i={search:null,sort:n.sort||Ls.asn,order:n.order||ft.asc,limit:parseInt(n.limit,10)||10,page:parseInt(n.page,10)||1};return u.jsx(Si,{onClose:r,children:e.name==="cas.analyse"&&u.jsx(t1,{onClose:r,filtering:i})})}function r1({filtering:t}){const e=H(),n=ue(),[r,i]=P.useState(t.search);return P.useEffect(()=>{const s=setTimeout(()=>{n(r?{search:r}:{search:void 0})},500);return()=>clearTimeout(s)},[r]),P.useEffect(()=>{i(t.search)},[t.search]),u.jsx("input",{type:"search",value:r||"",placeholder:e.announcements.search,onChange:s=>i(s.target.value)})}function i1(){const t=H(),e=Ne(),{route:n}=He(),r=ue(),i=n.params,s={search:i.search||null,sort:i.sort||Yn.asn,order:i.order||ft.asc,limit:parseInt(i.limit,10)||25,page:parseInt(i.page,10)||1};return u.jsxs(Rn,{children:[u.jsx(q0,{}),n.name==="cas.analyse"&&u.jsx(n1,{}),u.jsx(su,{}),u.jsxs("div",{className:"row",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(r1,{filtering:s}),u.jsx(L0,{filtering:s}),u.jsx(Z0,{filtering:s}),u.jsxs("div",{className:"roa-actions",children:[u.jsx("div",{children:u.jsx("button",{className:"button",onClick:()=>r({},"cas.add_new"),children:t.caDetails.addRoa})}),u.jsx("div",{children:u.jsx("button",{className:"button inverted",onClick:()=>r({},"cas.analyse"),children:t.caDetails.analyseThis})})]})]}),e.ca&&u.jsx(F0,{details:e.caDetails[e.ca]})]})]})}const Sm="/assets/upload-87e6fdfd.svg";let Zc="";function s1(){const[t,e]=P.useState(Zc),n=Ne();return P.useEffect(()=>{n.ca&&n.api.getChildRequest(n.ca).then(r=>{e(r),Zc=r})},[]),t}function km(t){const[e,n]=P.useState(null),[r,i]=P.useState(t),[s,a]=P.useState("");return P.useEffect(()=>{i(t)},[t]),{notification:e,setNotification:n,request:r,setRequest:i,response:s,setResponse:a,handleUpload:l=>{if(l.currentTarget.files){const c=new FileReader;c.onload=()=>{a(c.result)},c.readAsText(l.currentTarget.files[0])}}}}function a1(){const t=s1(),e=On(),{route:{params:n}}=He(),r=ue(),[i,s]=P.useState(""),{notification:a,setNotification:o,request:l,setRequest:c,response:f,setResponse:d,handleUpload:v}=km(t);return{notification:a,setNotification:o,name:i,setName:s,request:l,setRequest:c,response:f,setResponse:d,onSubmit:async g=>{g.preventDefault(),r({name:i,response:f})},onClose:()=>{e.navigate("cas.parents",{ca:n.ca})},handleUpload:v}}const o1="/assets/clipboard-4659ffea.svg",l1="/assets/download-2dfead4c.svg";function la({xml:t,name:e,setNotification:n}){const r=H(),i=()=>{navigator.clipboard.writeText(t),n({type:V.success,message:r.common.copySuccess})};return u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"button large icon",type:"button",title:r.common.copy,onClick:i,children:u.jsx("img",{src:o1,alt:r.common.copy})}),u.jsx("a",{className:"button large icon",title:r.common.download,href:`data:application/xml;base64,${btoa(t)}`,download:`${e}.xml`,children:u.jsx("img",{src:l1,alt:r.common.download})})]})}function u1(){const t=H(),{notification:e,setNotification:n,name:r,setName:i,request:s,setRequest:a,response:o,setResponse:l,onSubmit:c,onClose:f,handleUpload:d}=a1();return u.jsxs(Si,{onClose:f,children:[e&&u.jsx(xi,{notification:e,onClose:()=>n(null)}),u.jsx("h3",{children:t.caDetails.parentsTab.addParent}),u.jsxs("form",{onSubmit:c,method:"POST",children:[u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.parentsTab.request}),u.jsx("textarea",{name:"request",readOnly:!0,value:s,id:"request",onChange:v=>a(v.target.value)}),u.jsx("div",{children:u.jsx(la,{xml:s,name:"child_request",setNotification:n})})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.parentsTab.response}),u.jsx("textarea",{name:"response",value:o,onChange:v=>l(v.target.value)}),u.jsx("input",{type:"file",id:"upload",onChange:d}),u.jsx("label",{className:"button large icon",htmlFor:"upload",title:t.common.dropOrClick,children:u.jsx("img",{src:Sm,alt:t.common.dropOrClick})})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.parentsTab.name}),u.jsx("input",{name:"name",value:r,onChange:v=>i(v.target.value),required:!0})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:f,children:t.common.cancel}),u.jsx("button",{type:"submit",className:"button",children:t.common.confirm})]})]})]})}function c1({parent:t,loading:e}){const n=H(),{locale:r}=Ne(),i=e?n.caDetails.loading.replace("{handle}","..."):gm(t.last_exchange.timestamp,r);return u.jsxs("div",{className:"info-table",children:[u.jsx("h4",{children:t.name}),u.jsx("table",{children:u.jsxs("tbody",{children:[u.jsxs("tr",{children:[u.jsx("th",{children:n.caDetails.parents}),u.jsx("td",{children:t.last_exchange.uri})]}),u.jsxs("tr",{children:[u.jsx("th",{children:n.caDetails.lastExchange}),u.jsx("td",{children:t.last_exchange.result!="Success"?u.jsxs("p",{className:"failure",children:[i,u.jsx("br",{}),t.last_exchange.result.Failure.msg]}):u.jsx("p",{className:"success",children:i})})]}),u.jsxs("tr",{children:[u.jsx("th",{children:n.caDetails.allResources}),u.jsxs("td",{children:["ASN: ",t.all_resources.asn,u.jsx("br",{}),"IPv4: ",t.all_resources.ipv4,u.jsx("br",{}),"IPv6: ",t.all_resources.ipv6,u.jsx("br",{})]})]})]})})]})}function d1(){var o;const t=H(),{route:e}=He(),n=Ne(),r=ue(),[i,s]=P.useState(!1),a=()=>{s(!0),n.refreshParents().then(()=>{s(!1)})};return u.jsxs(Rn,{children:[e.name==="cas.parents.add"&&u.jsx(u1,{}),i&&u.jsx(xi,{notification:{type:V.success,message:t.caDetails.refresh.replace("{handle}",t.caDetails.parents.toLowerCase())},onClose:()=>s(!1)}),u.jsx(su,{}),n.parents&&n.ca&&((o=n.parents[n.ca])==null?void 0:o.map(l=>u.jsx(c1,{parent:l,loading:i},l.name))),u.jsx("button",{className:"button",onClick:()=>r({},"cas.parents.add"),children:t.caDetails.parentsTab.addParent}),u.jsx("button",{className:"button inverted",onClick:a,children:t.caDetails.syncParents})]})}function f1({repo:t,locale:e,loading:n}){const r=H(),i=n?r.caDetails.loading.replace("{handle}","..."):gm(t.last_exchange.timestamp,e);return u.jsx("div",{className:"info-table",children:u.jsx("table",{children:u.jsxs("tbody",{children:[u.jsxs("tr",{children:[u.jsx("th",{children:r.caDetails.exchangeUri}),u.jsx("td",{children:t.last_exchange.uri})]}),u.jsxs("tr",{children:[u.jsx("th",{children:r.caDetails.lastExchange}),u.jsx("td",{children:t.last_exchange.result!="Success"?u.jsxs("p",{className:"failure",children:[i,u.jsx("br",{}),t.last_exchange.result.Failure.msg]}):u.jsx("p",{className:"success",children:i})})]})]})})})}let Qc="";function h1(){const[t,e]=P.useState(Qc),n=Ne();return P.useEffect(()=>{n.ca&&n.api.getPublisherRequest(n.ca).then(r=>{e(r),Qc=r})},[]),t}function m1(){const t=h1(),e=On(),{route:{params:n}}=He(),r=ue(),{notification:i,setNotification:s,request:a,setRequest:o,response:l,setResponse:c,handleUpload:f}=km(t);return{notification:i,setNotification:s,request:a,setRequest:o,response:l,setResponse:c,onSubmit:async y=>{y.preventDefault(),r({response:l})},onClose:()=>{e.navigate("cas.repository",{ca:n.ca})},handleUpload:f}}function p1(){const t=H(),{notification:e,setNotification:n,request:r,setRequest:i,response:s,setResponse:a,onSubmit:o,onClose:l,handleUpload:c}=m1();return u.jsxs(Si,{onClose:l,children:[e&&u.jsx(xi,{notification:e,onClose:()=>n(null)}),u.jsx("h3",{children:t.caDetails.repoTab.addRepo}),u.jsxs("form",{onSubmit:o,method:"POST",children:[u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.repoTab.request}),u.jsx("textarea",{name:"request",readOnly:!0,value:r,id:"request",onChange:f=>i(f.target.value)}),u.jsx("div",{children:u.jsx(la,{xml:r,name:"publisher_request",setNotification:n})})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.repoTab.response}),u.jsx("textarea",{name:"response",value:s,onChange:f=>a(f.target.value)}),u.jsx("input",{type:"file",id:"upload",onChange:c}),u.jsx("label",{className:"button large icon",htmlFor:"upload",title:t.common.dropOrClick,children:u.jsx("img",{src:Sm,alt:t.common.dropOrClick})})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:l,children:t.common.cancel}),u.jsx("button",{type:"submit",className:"button",children:t.common.confirm})]})]})]})}function v1(){var l;const t=H(),e=Ne(),n=ue(),{route:r}=He(),[i,s]=P.useState(!1),a=()=>{s(!0),e.refreshRepo().then(()=>{s(!1)})};if(!e.ca)return null;const o=e.repoStatus&&e.ca&&((l=e.repoStatus[e.ca])==null?void 0:l.last_exchange);return u.jsxs(Rn,{children:[r.name==="cas.repository.add"&&u.jsx(p1,{}),i&&u.jsx(xi,{notification:{type:V.success,message:t.caDetails.refresh.replace("{handle}",t.caDetails.repo.toLowerCase())},onClose:()=>s(!1)}),u.jsx(su,{}),o?u.jsx(f1,{repo:e.repoStatus[e.ca],locale:e.locale,loading:i}):u.jsx("button",{className:"button",onClick:()=>n({},"cas.repository.add"),children:t.caDetails.repoTab.addRepo}),u.jsx("button",{className:"button inverted",onClick:a,children:t.caDetails.syncRepo})]})}function Em(){const t=H();return u.jsxs(Rn,{children:[u.jsx("h1",{children:t.common.error}),u.jsx("pre",{children:window.location.pathname})]})}function g1(){const[t,e]=P.useState(""),[n,r]=P.useState(""),i=ue(),s=Ne(),a=H(),o=s.loginMethod;if(!o)return u.jsx(iu,{initial:!0});const l=async c=>{c.preventDefault(),o.with_id?i({password:n,username:t}):i({password:n})};return u.jsx(Rn,{children:u.jsxs("form",{onSubmit:l,method:"POST",className:`login card ${o.with_id?"vertical-form":""}`,children:[o.with_id&&u.jsxs("div",{children:[u.jsx("label",{htmlFor:"admin required",children:a.login.id}),u.jsx("input",{name:"token",type:"username",value:t,onChange:c=>e(c.target.value),placeholder:a.login.idPlaceholder,required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"token required",children:a.login.password}),u.jsx("input",{name:"token",type:"password",value:n,onChange:c=>r(c.target.value),placeholder:a.login.placeholder,required:!0})]}),u.jsx("div",{children:u.jsx("button",{type:"submit",className:"button",children:a.login.signin})})]})})}function fr({notification:t}){const e=ue();return u.jsxs("div",{className:`notification ${t.type}`,children:[u.jsx("button",{className:"close",onClick:()=>e({notification:"clear"}),children:"×"}),u.jsx("span",{children:t.message})]})}function ua({onClose:t,onConfirm:e}){const n=H(),{route:r}=He();let i="",s="";return r.name==="testbed"?(i=n.testbed.addChild.confirmation.title,s=n.testbed.addChild.confirmation.message):r.name==="testbed.add_pub"?(i=n.testbed.addPublisher.confirmation.title,s=n.testbed.addPublisher.confirmation.message):r.name==="testbed.del_ca"?(i=n.testbed.removeChild.confirmation.title,s=n.testbed.removeChild.confirmation.message):r.name==="testbed.del_pub"&&(i=n.testbed.removePublisher.confirmation.title,s=n.testbed.removePublisher.confirmation.message),u.jsxs(Si,{onClose:t,children:[u.jsx("h3",{children:i}),u.jsx("p",{children:s}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{className:"button",onClick:e,children:n.common.ok})]})]})}function y1(){const t=H(),[e,n]=P.useState(),[r,i]=P.useState(!1),[s,a]=P.useState(""),[o,l]=P.useState(""),[c,f]=P.useState(""),[d,v]=P.useState(""),[y,w]=P.useState(""),g=async(S,T,N,_,D)=>{const R=await fetch("/testbed/children",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:S,id_cert:T,resources:{asn:N,v4:_,v6:D}})});if(R.status===200){n({type:V.success,message:t.testbed.addChild.success.replace("{child_handle}",S)});const q=S0(await R.json());w(q)}else{const q=await R.json();q.label==="pub-duplicate"?await g(S+Date.now(),T,N,_,D):n({type:V.error,message:q.msg})}},k=async S=>{S.preventDefault(),p(s)&&i(!0)},m=async()=>{const S=p(s);S&&await g(S.handle,S.id_cert,o,c,d)},h=S=>{const T=ym(S);return T?(n({type:V.error,message:t.testbed.errors.invalid_xml.replace("{err}",T)}),!1):S.getElementsByTagName("child_request").length===0?(n({type:V.error,message:t.testbed.errors.missing_xml_el.replace("{el}","child_request")}),!1):S.getElementsByTagName("child_bpki_ta").length===0?(n({type:V.error,message:t.testbed.errors.missing_xml_el.replace("{el}","child_bpki_ta")}),!1):S.getElementsByTagName("child_request")[0].attributes.child_handle?S.getElementsByTagName("child_bpki_ta")[0].childNodes.length===0?(n({type:V.error,message:t.testbed.errors.empty_xml_el.replace("{el}","child_bpki_ta")}),!1):S.getElementsByTagName("child_bpki_ta")[0].childNodes[0].nodeValue.trim().length===0?(n({type:V.error,message:t.testbed.errors.empty_xml_el.replace("{el}","child_bpki_ta")}),!1):!0:(n({type:V.error,message:t.testbed.errors.missing_xml_attr.replace("{attr}","child_handle").replace("{el}","child_request")}),!1)},p=S=>{const T=new window.DOMParser().parseFromString(S,"text/xml");if(h(T))return{handle:T.getElementsByTagName("child_request")[0].attributes.child_handle.value,id_cert:T.getElementsByTagName("child_bpki_ta")[0].childNodes[0].nodeValue.trim()}},x=()=>{w(""),i(!1),a(t.testbed.addChild.requestXML.placeholder),l(""),f(""),v("")};return y!==""?u.jsxs("div",{className:"testbed-result",children:[e&&u.jsx(fr,{notification:e}),u.jsx("pre",{children:y}),u.jsx("p",{children:u.jsx(la,{xml:y,name:"parent_response",setNotification:n})}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:x,className:"button",children:t.testbed.addChild.registeranother})})]}):u.jsxs(u.Fragment,{children:[r&&u.jsx(ua,{onClose:()=>i(!1),onConfirm:m}),u.jsxs("form",{onSubmit:k,method:"POST",children:[e&&u.jsx(fr,{notification:e}),u.jsxs("div",{children:[u.jsxs("label",{children:[t.testbed.addChild.requestXML.label,u.jsx("a",{href:"https://tools.ietf.org/html/rfc8183#section-5.2.1",children:t.testbed.rfcdoclink})]}),u.jsx("textarea",{name:"request",value:s,placeholder:t.testbed.addChild.requestXML.placeholder,onChange:S=>a(S.target.value),required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.addChild.asnresources.label}),u.jsx("input",{name:"asn",value:o,onChange:S=>l(S.target.value),placeholder:t.testbed.addChild.asnresources.placeholder})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.addChild.ipv4resources.label}),u.jsx("input",{name:"v4",value:c,onChange:S=>f(S.target.value),placeholder:t.testbed.addChild.ipv4resources.placeholder})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.addChild.ipv6resources.label}),u.jsx("input",{name:"v6",value:d,onChange:S=>v(S.target.value),placeholder:t.testbed.addChild.ipv6resources.placeholder})]}),u.jsx("button",{type:"submit",className:"button",children:t.testbed.addChild.confirm})]})]})}function w1(){const t=H(),[e,n]=P.useState(),[r,i]=P.useState(!1),[s,a]=P.useState(""),[o,l]=P.useState(""),c=async(g,k)=>{const m=await fetch("/testbed/publishers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publisher_handle:g,id_cert:k,tag:null})});if(m.status===200)n({type:V.success,message:t.testbed.addPublisher.success.replace("{publisher_handle}",g)}),l(k0(await m.json()));else{const h=await m.json();h.label==="pub-duplicate"?await c(g+Date.now(),k):n({type:V.error,message:h.msg})}},f=g=>{const k=ym(g);return k?(n({type:V.error,message:t.testbed.errors.invalid_xml.replace("{err}",k)}),!1):g.getElementsByTagName("publisher_request").length===0?(n({type:V.error,message:t.testbed.errors.missing_xml_el.replace("{el}","publisher_request")}),!1):g.getElementsByTagName("publisher_bpki_ta").length===0?(n({type:V.error,message:t.testbed.errors.missing_xml_el.replace("{el}","publisher_bpki_ta")}),!1):g.getElementsByTagName("publisher_request")[0].attributes.publisher_handle?g.getElementsByTagName("publisher_bpki_ta")[0].childNodes.length===0?(n({type:V.error,message:t.testbed.errors.empty_xml_el.replace("{el}","publisher_bpki_ta")}),!1):g.getElementsByTagName("publisher_bpki_ta")[0].childNodes[0].nodeValue.trim().length===0?(n({type:V.error,message:t.testbed.errors.empty_xml_el.replace("{el}","publisher_bpki_ta")}),!1):!0:(n({type:V.error,message:t.testbed.errors.missing_xml_attr.replace("{attr}","publisher_handle").replace("{el}","publisher_request")}),!1)},d=g=>{const k=new window.DOMParser().parseFromString(g,"text/xml");if(f(k))return{publisher_handle:k.getElementsByTagName("publisher_request")[0].attributes.publisher_handle.value,id_cert:k.getElementsByTagName("publisher_bpki_ta")[0].childNodes[0].nodeValue.trim()}},v=async g=>{g.preventDefault(),d(s)&&i(!0)},y=async()=>{const g=d(s);g&&await c(g.publisher_handle,g.id_cert)},w=()=>{a(t.testbed.addPublisher.requestXML.placeholder),l(""),i(!1)};return o!==""?u.jsxs("div",{className:"testbed-result",children:[e&&u.jsx(fr,{notification:e}),u.jsx("pre",{children:o}),u.jsx("p",{children:u.jsx(la,{xml:o,name:"publisher_response",setNotification:n})}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:w,className:"button",children:t.testbed.addPublisher.registeranother})})]}):u.jsxs(u.Fragment,{children:[r&&u.jsx(ua,{onClose:()=>i(!1),onConfirm:y}),u.jsxs("form",{onSubmit:v,method:"POST",children:[e&&u.jsx(fr,{notification:e}),u.jsxs("div",{children:[u.jsxs("label",{children:[t.testbed.addPublisher.requestXML.label,u.jsx("a",{href:"https://tools.ietf.org/html/rfc8183#section-5.2.3",children:t.testbed.rfcdoclink})]}),u.jsx("textarea",{name:"request",value:s,placeholder:t.testbed.addPublisher.requestXML.placeholder,onChange:g=>a(g.target.value),required:!0})]}),u.jsx("button",{type:"submit",className:"button",children:t.testbed.addPublisher.confirm})]})]})}function x1(){const t=H(),[e,n]=P.useState(),[r,i]=P.useState(!1),[s,a]=P.useState(""),o=async()=>{const f=await fetch(`/testbed/children/${s}`,{method:"DELETE"});if(f.status===200)n({type:V.success,message:t.testbed.removeChild.success.replace("{child_handle}",s)}),a("");else{const d=await f.json();n({type:V.error,message:d.msg})}},l=f=>{f.preventDefault(),i(!0)},c=async()=>{await o(),i(!1)};return u.jsxs(u.Fragment,{children:[r&&u.jsx(ua,{onClose:()=>i(!1),onConfirm:c}),u.jsxs("form",{onSubmit:l,method:"POST",children:[e&&u.jsx(fr,{notification:e}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.childhandle}),u.jsx("input",{name:"handle",value:s,onChange:f=>a(f.target.value),placeholder:t.testbed.removeChild.placeholder,required:!0})]}),u.jsx("button",{type:"submit",className:"button",children:t.testbed.removeChild.confirm})]})]})}function S1(){const t=H(),[e,n]=P.useState(),[r,i]=P.useState(!1),[s,a]=P.useState(""),o=async()=>{const f=await fetch(`/testbed/publishers/${s}`,{method:"DELETE"});if(f.status===200)n({type:V.success,message:t.testbed.removePublisher.success.replace("{publisher_handle}",s)}),a("");else{const d=await f.json();n({type:V.error,message:d.msg})}},l=async f=>{f.preventDefault(),i(!0)},c=async()=>{await o(),i(!1)};return u.jsxs(u.Fragment,{children:[r&&u.jsx(ua,{onClose:()=>i(!1),onConfirm:c}),u.jsxs("form",{onSubmit:l,method:"POST",children:[e&&u.jsx(fr,{notification:e}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.publisherhandle}),u.jsx("input",{name:"handle",value:s,onChange:f=>a(f.target.value),placeholder:t.testbed.removePublisher.placeholder,required:!0})]}),u.jsx("button",{type:"submit",className:"button",children:t.testbed.removePublisher.confirm})]})]})}const Tm="/assets/welcome-9fadc7f2.svg";function Zi({children:t}){const e=H();return u.jsx(Rn,{children:u.jsxs("div",{className:"testbed",children:[u.jsxs("div",{children:[u.jsx("img",{src:Tm,className:"hero",alt:e.common.copy}),u.jsx("h2",{children:e.testbed.welcome})]}),u.jsxs("div",{children:[u.jsx("h3",{children:e.testbed.disclaimer.heading}),u.jsx("p",{dangerouslySetInnerHTML:{__html:e.testbed.disclaimer.body}}),u.jsx("h3",{children:e.testbed.rpconfighelp.heading}),u.jsx("p",{dangerouslySetInnerHTML:{__html:e.testbed.rpconfighelp.body.replace("{tallink}","/ta/ta.tal")}}),u.jsx("h3",{children:e.testbed.regunreg.heading}),u.jsx("p",{dangerouslySetInnerHTML:{__html:e.testbed.regunreg.body}})]}),u.jsx("div",{children:u.jsxs("ul",{className:"tabs",children:[u.jsx("li",{children:u.jsx(yn,{routeName:"testbed",activeStrict:!0,children:e.testbed.addChild.heading})}),u.jsx("li",{children:u.jsx(yn,{routeName:"testbed.del_ca",children:e.testbed.removeChild.heading})}),u.jsx("li",{children:u.jsx(yn,{routeName:"testbed.add_pub",children:e.testbed.addPublisher.heading})}),u.jsx("li",{children:u.jsx(yn,{routeName:"testbed.del_pub",children:e.testbed.removePublisher.heading})})]})}),t]})})}function k1(){const{route:t}=He();return Ne().testBedEnabled?t.name=="testbed.del_ca"?u.jsx(Zi,{children:u.jsx(x1,{})}):t.name=="testbed.add_pub"?u.jsx(Zi,{children:u.jsx(w1,{})}):t.name=="testbed.del_pub"?u.jsx(Zi,{children:u.jsx(S1,{})}):u.jsx(Zi,{children:u.jsx(y1,{})}):u.jsx(Em,{})}function E1(){const t=ue(),[e,n]=P.useState(""),r=H(),i=s=>{s.preventDefault(),t({name:e})};return u.jsx(Rn,{children:u.jsxs("form",{method:"POST",onSubmit:i,className:"center-form",children:[u.jsxs("div",{children:[u.jsx("img",{src:Tm,alt:r.common.copy}),u.jsx("h2",{children:r.onboarding.welcome}),u.jsx("div",{dangerouslySetInnerHTML:{__html:r.onboarding.welcomeHtml}})]}),u.jsxs("div",{children:[u.jsxs("label",{htmlFor:"token required",children:["CA ",r.caDetails.handle]}),u.jsx("input",{name:"name",type:"test",value:e,onChange:s=>n(s.target.value),required:!0})]}),u.jsx("div",{children:u.jsx("button",{type:"submit",className:"button",children:r.onboarding.addCAForm.confirm})})]})})}function T1(){const{route:t}=He();return!t||t.name==="loading"?u.jsx(iu,{initial:!0}):t.name==="login"?u.jsx(g1,{}):t.name==="onboarding"?u.jsx(E1,{}):t.name.startsWith("cas.parents")?u.jsx(d1,{}):t.name.startsWith("cas.repository")?u.jsx(v1,{}):t.name.startsWith("cas")?u.jsx(i1,{}):t.name.startsWith("testbed")?u.jsx(k1,{}):u.jsx(Em,{})}/*! ***************************************************************************** +`}function E0(t){const e=[];if(t.too_permissive)for(const n of t.too_permissive){e.push({action:"remove",reason:vt.tooPermissive,prefix:n.current.prefix,asn:n.current.asn,max_length:n.current.max_length||parseInt(n.current.prefix.split("/")[1])});for(const r of n.new)e.push({action:"remove",reason:vt.specific,prefix:r.prefix,asn:r.asn,max_length:parseInt(r.prefix.split("/")[1])})}if(t.not_found)for(const n of t.not_found)e.push({action:"add",reason:vt.notFound,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.invalid_length)for(const n of t.invalid_length)e.push({action:"add",reason:vt.invalidLength,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.redundant)for(const n of t.redundant)e.push({action:"remove",reason:vt.redundant,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.stale)for(const n of t.stale)e.push({action:"remove",reason:vt.stale,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.invalid_asn)for(const n of t.invalid_asn)e.push({action:"remove",reason:vt.invalidAsn,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.as0_redundant)for(const n of t.as0_redundant)e.push({action:"remove",reason:vt.as0Redundant,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});if(t.disallowing)for(const n of t.disallowing)e.push({action:"remove",reason:vt.disallowing,prefix:n.prefix,asn:n.asn,max_length:parseInt(n.prefix.split("/")[1])});return e}class wm{constructor(){ce(this,"baseUrl");ce(this,"VERSION_URL","https://api.github.com/repos/nlnetlabs/krill/releases/latest");ce(this,"token");this.baseUrl=window.location.origin,this.token=null}setToken(e){this.token=e}async get(e,n){const r=await fetch(`${this.baseUrl}${e}`,{...n,headers:{Authorization:`Bearer ${this.token}`,...(n==null?void 0:n.headers)||{}}});if((r.status===401||r.status===403)&&this.setToken(null),!(r.headers.get("Content-Type")==="application/json")){const a=await r.text();if(r.status===200)return a;throw{status:r.status,msg:a}}const s=await r.json();if(r.status===200)return s;throw{status:r.status,msg:s.msg||null}}post(e,n){return this.get(e,{method:"POST",...n})}postCas(e){return this.post("/api/v1/cas",{body:JSON.stringify({handle:e}),headers:{"Content-Type":"application/json"}})}getCas(){return this.get("/api/v1/cas").then(({cas:e})=>e.map(({handle:n})=>n).reverse())}getCaDetails(e){return this.get(`/api/v1/cas/${e}`)}getCaRoas(e){return this.get(`/api/v1/cas/${e}/routes/analysis/full`).then(n=>n.map(r=>({id:Vc(10),...r})))}getCaSuggestions(e){return this.get(`/api/v1/cas/${e}/routes/analysis/suggest`).then(n=>E0(n)).then(n=>n.map(r=>({id:Vc(10),...r})))}refreshCaParents(){return this.post("/api/v1/bulk/cas/sync/parent")}getCaParents(e){return this.get(`/api/v1/cas/${e}/parents`).then(n=>Object.entries(n).map(([r,i])=>({name:r,...i})))}refreshCaRepo(){return this.post("/api/v1/bulk/cas/sync/repo")}getCaRepoStatus(e){return this.get(`/api/v1/cas/${e}/repo/status`)}getInfo(){return this.get("/stats/info")}getVersion(){return fetch(this.VERSION_URL).then(e=>e.json())}getChildRequest(e){return this.get(`/api/v1/cas/${e}/id/child_request.xml`)}getPublisherRequest(e){return this.get(`/api/v1/cas/${e}/id/publisher_request.xml`)}postParent(e,n,r){return this.post(`/api/v1/cas/${e}/parents/${n}`,{body:r})}postRepository(e,n,r){return this.post(`/api/v1/cas/${e}/repo`,{body:r})}updateRoutes(e,n){return this.get(`/api/v1/cas/${e}/routes`,{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}})}getLoginMethod(){return fetch(`${this.baseUrl}/auth/login`).then(e=>e.status===200?e.text().then(n=>w0(n)?{redirect_url:n}:{with_id:x0(n)}):Promise.reject(e))}postLogin(e,n){const r="/auth/login";if(n){this.setToken(null);const i=btoa(`${n}:${e}`);return this.post(r,{headers:{Authorization:`Basic ${i}`}})}return this.setToken(e),this.post(r)}checkToken(e){return this.setToken(e),this.get("/api/v1/authorized")}getTestBedEnabled(){return fetch("/testbed/enabled").then(e=>e.status===200?!0:e.status===400?!1:Promise.reject(e))}}let Wc=null;function T0(){const[t,e]=P.useState(Wc);return P.useEffect(()=>{t||new wm().getInfo().then(r=>{e(r),Wc=r})},[]),t}const N0="/assets/logout-c725fd2c.svg",C0="/assets/user-5d1f1b14.svg";function iu({initial:t}){const e=On(),[n,r]=P.useState(t);return P.useEffect(()=>e.usePlugin(()=>({onTransitionStart:()=>r(!0),onTransitionSuccess:()=>r(!1)})),[]),n?u.jsx("div",{className:"loader",children:u.jsx("span",{children:"Loading…"})}):null}function xm({options:t,value:e,onChange:n,className:r}){const[i,s]=P.useState(!1);return u.jsxs("div",{className:`select ${r||""}`,children:[u.jsx("button",{className:i?"open":"",onClick:()=>s(!i),onBlur:()=>{setTimeout(()=>s(!1),300)},onKeyDown:a=>{a.key==="Escape"&&s(!1)},children:t[e]}),u.jsx("ul",{className:i?"show":"hide",children:Object.entries(t).map(([a,o])=>u.jsx("li",{className:e===a?"selected":"",onClick:()=>n(a),children:o},a))})]})}function xi({notification:t,onClose:e}){return u.jsxs("div",{className:`notification popup ${t.type}`,children:[u.jsx("button",{className:"close",onClick:e,children:"×"}),u.jsx("span",{children:t.message})]})}function _0(){const t=Ne(),[e,n]=P.useState(!1),r=()=>{n(!0),t.setNotification(null)};return P.useEffect(()=>{if(t.notification){n(!1);const i=setTimeout(r,5e3);return()=>clearTimeout(i)}},[t.notification]),!t.notification||e?null:u.jsx(xi,{notification:t.notification,onClose:r})}function Rn({children:t}){const e=ue(),{route:n}=He(),r=T0(),i=Ne(),s=new Date().getFullYear(),a=H();return P.useEffect(()=>{document.title=i.ca?`Krill - ${i.ca}`:"Krill"},[i.ca]),u.jsxs(u.Fragment,{children:[u.jsx(iu,{initial:!1}),u.jsxs("header",{children:[u.jsx("h1",{onClick:()=>e({},"cas"),children:u.jsx("span",{children:"Krill"})}),u.jsxs("menu",{children:[u.jsx(xm,{options:pg,value:i.locale,onChange:o=>e({locale:o})}),i.userDetails&&u.jsxs(u.Fragment,{children:[u.jsxs("button",{className:"pop",children:[u.jsx("img",{src:C0}),u.jsxs("div",{children:[u.jsx("h5",{children:a.common.userInfo.title}),u.jsx("table",{children:u.jsxs("tbody",{children:[u.jsxs("tr",{children:[u.jsxs("th",{children:[a.common.userInfo.user,":"]}),u.jsx("td",{children:i.userDetails.id})]}),Object.entries(i.userDetails.attributes).map(([o,l])=>u.jsxs("tr",{children:[u.jsxs("th",{className:"user-attribute",children:[o,":"]}),u.jsx("td",{children:l})]},o))]})})]})]}),u.jsx("button",{onClick:()=>e({},"logout"),children:u.jsx("img",{src:N0})})]})]})]}),u.jsx(_0,{}),u.jsx("div",{className:`content route-${n.name}`,children:t}),u.jsxs("footer",{children:[u.jsxs("span",{children:["© ",s," Stichting NLnet Labs"," - ","Krill ",r==null?void 0:r.version]}),u.jsxs("span",{children:[u.jsx("a",{href:"https://nlnetlabs.nl/services/contracts/",target:"_blank",rel:"noreferrer",children:a.common.supportcontracts})," - ",u.jsx("a",{href:"https://krill.docs.nlnetlabs.nl/",target:"_blank",rel:"noreferrer",children:a.common.readthedocs})," - ",u.jsx("a",{href:"https://github.com/NLnetLabs/krill/issues/new",target:"_blank",rel:"noreferrer",children:a.common.report})]})]})]})}function j0({columns:t,filtering:e}){const n=ue(),r=i=>{const s=e.sort===i&&e.order===ft.asc?ft.desc:ft.asc;n({sort:i,order:s})};return u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{}),t.map(({label:i,accessor:s})=>u.jsxs("th",{onClick:()=>r(s),children:[i,s===e.sort&&u.jsx("span",{className:e.order})]},s)),u.jsx("th",{})]})})}function qc({announcements:t}){const e=H();return u.jsxs("table",{children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:e.announcements.asn}),u.jsx("th",{children:e.announcements.prefix})]})}),u.jsxs("tbody",{children:[t.length===0&&u.jsx("tr",{children:u.jsx("td",{colSpan:2,children:u.jsx("span",{className:"muted",children:e.common.nodata})})}),t.map((n,r)=>u.jsxs("tr",{children:[u.jsx("td",{children:n.asn}),u.jsx("td",{children:n.prefix})]},r))]})]})}function O0({authorizes:t,disallows:e}){const n=H();return u.jsxs("div",{className:"row",children:[u.jsxs("div",{children:[u.jsx("h3",{children:n.announcements.authorizes.replace("{number}",t.length.toString())}),u.jsx(qc,{announcements:t})]}),u.jsxs("div",{children:[u.jsx("h3",{children:n.announcements.disallows.replace("{number}",e.length.toString())}),u.jsx(qc,{announcements:e})]})]})}const P0="/assets/trash-d9c6ee55.svg",R0="/assets/edit-776bf3c3.svg",D0="/assets/plus-e8f1d182.svg";function I0({roa:t,allowAdd:e,allowDelete:n,hasAnnouncements:r}){var d;const i=ue(),[s,a]=P.useState(!1),o=H(),l={id:((d=t.id)==null?void 0:d.toString())||"new"},c=`${t.state}_help`,f=o.announcements.state[c];return u.jsxs(u.Fragment,{children:[u.jsxs("tr",{className:r?"announcements":"",children:[u.jsx("td",{children:r&&u.jsx("button",{className:`expand ${s?"open":""}`,onClick:()=>a(!s)})}),u.jsx("td",{children:t.asn}),u.jsxs("td",{children:[t.prefix,t.max_length&&-t.max_length]}),u.jsxs("td",{children:[t.comment,n&&u.jsx("button",{className:"button icon light right",onClick:()=>i(l,"cas.edit"),children:u.jsx("img",{src:R0})})]}),u.jsxs("td",{children:[u.jsx("span",{className:`state ${t.state}`,title:f,children:o.announcements.state[t.state]}),t.authorizes&&u.jsx("span",{className:"badge success",children:t.authorizes.length}),t.disallows&&u.jsx("span",{className:"badge warning",children:t.disallows.length})]}),u.jsxs("td",{className:"actions",children:[e&&u.jsx("button",{className:"button icon",onClick:()=>i(l,"cas.add"),children:u.jsx("img",{src:D0})}),n&&u.jsx("button",{className:"button icon",onClick:()=>i(l,"cas.delete"),children:u.jsx("img",{src:P0})})]})]}),r&&s&&u.jsx("tr",{className:"announcements",children:u.jsx("td",{colSpan:6,children:u.jsx(O0,{authorizes:t.authorizes||[],disallows:t.disallows||[]})})})]})}function M0({tableData:t}){return u.jsx("tbody",{children:t.filter(e=>e.state!=Re.AnnouncementDisallowedAs0).map(e=>u.jsx(I0,{roa:e,hasAnnouncements:!!e.authorizes||!!e.disallows,allowDelete:e.state===Re.RoaSeen||e.state===Re.RoaUnseen||e.state===Re.RoaNotHeld||e.state==Re.RoaNoAnnouncementInfo||e.state===Re.RoaTooPermissive||e.state===Re.RoaDisallowing||e.state===Re.RoaRedundant||e.state==Re.RoaAs0||e.state===Re.RoaAs0Redundant,allowAdd:e.state===Re.AnnouncementNotFound||e.state===Re.AnnouncementInvalidLength||e.state===Re.AnnouncementInvalidAsn},e.id))})}function L0({filtering:t}){const e=H(),r=Ne().getRoas(t),i=[{label:e.announcements.asn,accessor:Yn.asn},{label:e.announcements.prefix,accessor:Yn.prefix},{label:e.caDetails.comment,accessor:Yn.comment},{label:e.announcements.stateLabel,accessor:Yn.state}];return u.jsxs("table",{className:"roa-table",children:[u.jsx(j0,{columns:i,filtering:t}),u.jsx(M0,{tableData:r})]})}function F0({details:t}){return u.jsx("div",{className:"ca-details card",children:u.jsx("table",{children:u.jsx("tbody",{children:Object.entries(t.resources).map(([e,n])=>u.jsxs("tr",{children:[u.jsx("th",{children:e}),u.jsx("td",{children:n.split(",").map(r=>u.jsx("p",{children:r},r))})]},e))})})})}function A0({onClose:t,roa:e}){var w;const n=H(),r=ue(),[i,s]=P.useState((e==null?void 0:e.asn.toString())||""),[a,o]=P.useState((e==null?void 0:e.prefix)||""),[l,c]=P.useState((e==null?void 0:e.comment)||""),f=Hc(e==null?void 0:e.prefix),[d,v]=P.useState(((w=e==null?void 0:e.max_length)==null?void 0:w.toString())||f),y=g=>{g.preventDefault();const k=g.target;k.checkValidity()?r({asn:i,prefix:a,comment:l,max_length:d}):k.reportValidity()};return u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:n.caDetails.addRoa}),u.jsxs("form",{onSubmit:y,children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"asn required",children:n.announcements.asn}),u.jsx("input",{type:"number",min:"0",name:"asn",onInput:g=>g.target.setCustomValidity(""),onInvalid:g=>g.target.setCustomValidity(n.caDetails.addROAForm.asn_format),value:i,onChange:g=>s(g.target.value),required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"prefix required",children:n.announcements.prefix}),u.jsx("input",{name:"prefix",pattern:"^((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\.(?!\\/)|\\/)){4}([0-9]|[1-2][0-9]|3[0-2]))|(([a-fA-F0-9:]+)\\/([1-9]|[1-9][0-9]|1[01][0-9]|12[0-8]))$",onInput:g=>g.target.setCustomValidity(""),onInvalid:g=>g.target.setCustomValidity(n.caDetails.addROAForm.prefix_format),title:n.caDetails.addROAForm.prefix_format,value:a,onChange:g=>o(g.target.value),required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"maxLength",children:n.caDetails.maxLength}),u.jsx("input",{type:"number",min:Hc(a)||1,max:a.includes(".")||!a.includes(":")?32:128,name:"maxLength",value:d,onChange:g=>v(g.target.value),placeholder:n.caDetails.maxLengthTooltip})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"comment",children:n.caDetails.comment}),u.jsx("input",{name:"comment",value:l,onChange:g=>c(g.target.value)})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{type:"submit",className:"button",children:n.common.confirm})]})]})]})}const z0="modulepreload",$0=function(t){return"/"+t},Bc={},Et=function(e,n,r){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(s=>{if(s=$0(s),s in Bc)return;Bc[s]=!0;const a=s.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(!!r)for(let f=i.length-1;f>=0;f--){const d=i[f];if(d.href===s&&(!a||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${s}"]${o}`))return;const c=document.createElement("link");if(c.rel=a?"stylesheet":z0,a||(c.as="script",c.crossOrigin=""),c.href=s,document.head.appendChild(c),a)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${s}`)))})})).then(()=>e())},U0=(t,e)=>{const n=t[e];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((r,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e)))})};async function b0(t){return(await U0(Object.assign({"../locales/de.ts":()=>Et(()=>import("./de-aaa0f1e4.js"),[]),"../locales/en.ts":()=>Et(()=>import("./en-d3d88bc8.js"),[]),"../locales/es.ts":()=>Et(()=>import("./es-52cbfc21.js"),[]),"../locales/fr.ts":()=>Et(()=>import("./fr-ac1aafd8.js"),[]),"../locales/gr.ts":()=>Et(()=>import("./gr-5a66c94a.js"),[]),"../locales/nl.ts":()=>Et(()=>import("./nl-f2dd1189.js"),[]),"../locales/pt.ts":()=>Et(()=>import("./pt-e9bf4047.js"),[]),"../locales/zh-Hans.ts":()=>Et(()=>import("./zh-Hans-f7c709f7.js"),[]),"../locales/zh-Hant.ts":()=>Et(()=>import("./zh-Hant-0d86c694.js"),[])}),`../locales/${t}.ts`)).translations}function V0(t,e){return Object.entries(e).reduce((n,[r,i])=>n.replace(`{${r}}`,i),t)}function H0({onClose:t,roa:e}){var s;const n=H(),r=ue(),i={asn:e.asn.toString(),prefix:e.prefix,max_length:((s=e.max_length)==null?void 0:s.toString())||""};return u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:n.common.warning}),u.jsx("p",{children:V0(n.caDetails.confirmation.message,i)}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{className:"button",onClick:()=>{r(i)},children:n.common.ok})]})]})}function W0({onClose:t,roa:e}){const n=H(),r=ue(),[i,s]=P.useState((e==null?void 0:e.comment)||"");return u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:n.common.edit}),u.jsxs("form",{autoComplete:"off",onSubmit:a=>{a.preventDefault(),i!==(e==null?void 0:e.comment)?r({comment:i}):t()},children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"comment required",children:n.caDetails.comment}),u.jsx("input",{name:"comment",value:i,onChange:a=>s(a.target.value)})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{type:"submit",className:"button",children:n.common.confirm})]})]})]})}function Si({onClose:t,children:e}){return u.jsx("div",{className:"modal",onMouseDown:t,children:u.jsx("div",{onMouseDown:n=>{n.stopPropagation()},children:e})})}function q0(){const{route:t}=He(),e=On(),{route:{params:n}}=He(),s=Ne().getRoas().find(o=>o.id===n.id),a=()=>{e.navigate("cas",{ca:n.ca})};return!s&&t.name!=="cas.add_new"?null:u.jsxs(Si,{onClose:a,children:[t.name.startsWith("cas.add")&&u.jsx(A0,{onClose:a,roa:s}),t.name.startsWith("cas.edit")&&u.jsx(W0,{onClose:a,roa:s}),t.name==="cas.delete"&&u.jsx(H0,{onClose:a,roa:s})]})}function su(){var s,a,o;const t=Ne(),e=H(),n=ue(),r=t.ca&&t.parents[t.ca].length>0,i=t.repoStatus&&t.ca&&((s=t.repoStatus[t.ca])==null?void 0:s.last_exchange);return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"space-between border-bottom row",children:[u.jsxs("h2",{children:[e.cas.ca," ",u.jsx("strong",{children:t.ca})]}),t.cas&&((a=t.cas)==null?void 0:a.length)>1&&u.jsxs("div",{children:[u.jsx("label",{htmlFor:"ca",children:e.caDetails.current}),u.jsx(xm,{className:"wide",options:((o=t.cas)==null?void 0:o.sort().reduce((l,c)=>({...l,[c]:[c]}),{}))||{},value:t.ca||"",onChange:l=>n({ca:l},"cas")})]})]}),!r&&u.jsx("div",{className:"notification error",children:e.caDetails.onboardingWarning}),r&&!i&&u.jsx("div",{className:"notification error",children:e.caDetails.initializeRepository}),u.jsx("div",{children:u.jsxs("ul",{className:"tabs",children:[u.jsx("li",{children:u.jsx(yn,{routeName:"cas",activeStrict:!0,routeParams:{ca:t.ca},children:e.caDetails.roas})}),u.jsx("li",{children:u.jsx(yn,{routeName:"cas.parents",routeParams:{ca:t.ca},children:e.caDetails.parents})}),u.jsx("li",{children:u.jsx(yn,{routeName:"cas.repository",routeParams:{ca:t.ca},children:e.caDetails.repo})})]})})]})}function B0({currentPage:t,numPages:e}){const n=ue();let r;if(e<=7)r=[...Array(e).keys()].map(i=>(i+1).toString());else if(r=Array(7),r[0]="1",r[6]=e.toString(),t>=1&&t<=4){for(let i=1;i<5;i++)r[i]=(i+1).toString();r[5]="..."}else if(t>=e-3&&t<=e){r[1]="...";for(let i=2;i<7;i++)r[i]=(e-6+i).toString()}else{r[1]="...";for(let i=2;i<5;i++)r[i]=(t-3+i).toString();r[5]="..."}return u.jsx(u.Fragment,{children:r.map((i,s)=>u.jsx("button",{className:i===t.toString()?"number current":"number",disabled:i===t.toString()||i==="...",onClick:()=>n({page:i}),children:i},s))})}function Z0({filtering:t}){const e=H(),r=Ne().getRoas().length,i=ue(),s=Math.ceil(r/t.limit);return u.jsxs("div",{className:"pagination",children:[u.jsx("select",{value:t.limit,onChange:a=>i({limit:a.target.value,page:"1"}),children:mg.map(a=>u.jsxs("option",{value:a,children:[a," / ",e.common.page]},a))}),u.jsxs("div",{children:[u.jsx("button",{disabled:t.page===1,className:"arrow prev",onClick:()=>i({page:(t.page-1).toString()}),children:u.jsx("span",{children:"<"})}),u.jsx(B0,{currentPage:t.page,numPages:s}),u.jsx("button",{disabled:t.page>s-1,className:"arrow next",onClick:()=>i({page:(t.page+1).toString()}),children:u.jsx("span",{children:">"})})]})]})}function Q0({columns:t,filtering:e,setAllCheckboxes:n,checkBoxState:r}){const i=ue(),s=a=>{const o=e.sort===a&&e.order===ft.asc?ft.desc:ft.asc;i({sort:a,order:o})};return u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:u.jsx("input",{type:"checkbox",checked:r===yt.checked,onChange:n,ref:a=>{a&&(a.indeterminate=r===yt.intermediate)}})}),u.jsx("th",{}),t.map(({label:a,accessor:o})=>u.jsxs("th",{onClick:()=>s(o),children:[a,o===e.sort&&u.jsx("span",{className:e.order})]},o)),u.jsx("th",{})]})})}const Y0="/assets/trash-red-65027383.svg",K0="/assets/check-green-4525c79c.svg";function G0({suggestion:t,id:e,checked:n,handleCheckbox:r}){const i=H(),s=i.caDetails.suggestions.reasons[t.reason];return u.jsxs(u.Fragment,{children:[u.jsx("td",{children:u.jsx("input",{type:"checkbox",id:e,onChange:r,checked:n})}),u.jsxs("td",{children:[t.action==="add"&&u.jsx("span",{className:"add",title:i.caDetails.suggestions.adding,children:u.jsx("img",{src:K0,title:`${i.caDetails.suggestions.willAdd} (${s})`})}),t.action==="remove"&&u.jsx("span",{className:"remove",title:i.caDetails.suggestions.willRemove,children:u.jsx("img",{src:Y0,title:`${i.caDetails.suggestions.willRemove} (${s})`})})]}),u.jsx("td",{children:t.asn}),u.jsx("td",{children:t.prefix}),u.jsx("td",{children:i.caDetails.suggestions.reasons[t.reason]})]})}function J0({suggestions:t,checkedBoxes:e,handleCheckbox:n}){return u.jsx("tbody",{children:t.map(r=>u.jsx("tr",{children:u.jsx(G0,{checked:e.includes(r.id||""),suggestion:r,id:r.id||"",handleCheckbox:n})},r.id))})}function X0({suggestions:t,filtering:e,checkedBoxes:n,handleCheckbox:r,handleAllCheckboxes:i,topCheckBoxState:s}){const a=H(),o=[{label:a.announcements.asn,accessor:Ls.asn},{label:a.announcements.prefix,accessor:Ls.prefix}];return u.jsxs("table",{className:"roa-table",children:[u.jsx(Q0,{columns:o,filtering:e,setAllCheckboxes:i,checkBoxState:s}),u.jsx(J0,{checkedBoxes:n,suggestions:t,handleCheckbox:r})]})}function e1(t){const n=Ne().getSuggestions(t),r=[];for(const f of n)r.push(f.id||"");const[i,s]=P.useState([]),[a,o]=P.useState(yt.unchecked);return{checked:i,topCheckbox:a,suggestions:n,handleCheckbox:f=>{let d=[...i];f.target.checked?(d=[...i,f.target.id],r.every(v=>d.includes(v))?o(yt.checked):o(yt.intermediate)):(d.splice(i.indexOf(f.target.id),1),d.length>0?o(yt.intermediate):o(yt.unchecked)),s(d)},handleAllCheckboxes:f=>{f.target.checked?(s(r),o(yt.checked)):(s([]),o(yt.unchecked))}}}function t1({onClose:t,filtering:e}){const n=H(),r=ue(),{checked:i,topCheckbox:s,suggestions:a,handleCheckbox:o,handleAllCheckboxes:l}=e1(e);return u.jsxs(u.Fragment,{children:[u.jsx("h3",{children:n.caDetails.analysis}),a.length>0&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[n.caDetails.suggestions.following," ",u.jsx("a",{href:"https://krill.docs.nlnetlabs.nl/en/stable/manage-roas.html",target:"_blank",rel:"noreferrer",children:n.caDetails.suggestions.readMore})]}),u.jsx(X0,{checkedBoxes:i,suggestions:a,filtering:e,handleCheckbox:o,handleAllCheckboxes:l,topCheckBoxState:s})]}),a.length===0&&n.caDetails.suggestions.nochanges,u.jsxs("div",{className:"actions",children:[a.length>0&&u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button",className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{className:"button",onClick:()=>r({ids:JSON.stringify(i)},"cas.change"),children:n.common.confirm})]}),a.length===0&&u.jsx("button",{className:"button",onClick:t,children:n.common.ok})]})]})}function n1(){const t=On(),{route:e,route:{params:n}}=He(),r=()=>{t.navigate("cas",{ca:n.ca})};if(e.name!=="cas.analyse")return null;const i={search:null,sort:n.sort||Ls.asn,order:n.order||ft.asc,limit:parseInt(n.limit,10)||10,page:parseInt(n.page,10)||1};return u.jsx(Si,{onClose:r,children:e.name==="cas.analyse"&&u.jsx(t1,{onClose:r,filtering:i})})}function r1({filtering:t}){const e=H(),n=ue(),[r,i]=P.useState(t.search);return P.useEffect(()=>{const s=setTimeout(()=>{n(r?{search:r}:{search:void 0})},500);return()=>clearTimeout(s)},[r]),P.useEffect(()=>{i(t.search)},[t.search]),u.jsx("input",{type:"search",value:r||"",placeholder:e.announcements.search,onChange:s=>i(s.target.value)})}function i1(){const t=H(),e=Ne(),{route:n}=He(),r=ue(),i=n.params,s={search:i.search||null,sort:i.sort||Yn.asn,order:i.order||ft.asc,limit:parseInt(i.limit,10)||25,page:parseInt(i.page,10)||1};return u.jsxs(Rn,{children:[u.jsx(q0,{}),n.name==="cas.analyse"&&u.jsx(n1,{}),u.jsx(su,{}),u.jsxs("div",{className:"row",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx(r1,{filtering:s}),u.jsx(L0,{filtering:s}),u.jsx(Z0,{filtering:s}),u.jsxs("div",{className:"roa-actions",children:[u.jsx("div",{children:u.jsx("button",{className:"button",onClick:()=>r({},"cas.add_new"),children:t.caDetails.addRoa})}),u.jsx("div",{children:u.jsx("button",{className:"button inverted",onClick:()=>r({},"cas.analyse"),children:t.caDetails.analyseThis})})]})]}),e.ca&&u.jsx(F0,{details:e.caDetails[e.ca]})]})]})}const Sm="/assets/upload-87e6fdfd.svg";let Zc="";function s1(){const[t,e]=P.useState(Zc),n=Ne();return P.useEffect(()=>{n.ca&&n.api.getChildRequest(n.ca).then(r=>{e(r),Zc=r})},[]),t}function km(t){const[e,n]=P.useState(null),[r,i]=P.useState(t),[s,a]=P.useState("");return P.useEffect(()=>{i(t)},[t]),{notification:e,setNotification:n,request:r,setRequest:i,response:s,setResponse:a,handleUpload:l=>{if(l.currentTarget.files){const c=new FileReader;c.onload=()=>{a(c.result)},c.readAsText(l.currentTarget.files[0])}}}}function a1(){const t=s1(),e=On(),{route:{params:n}}=He(),r=ue(),[i,s]=P.useState(""),{notification:a,setNotification:o,request:l,setRequest:c,response:f,setResponse:d,handleUpload:v}=km(t);return{notification:a,setNotification:o,name:i,setName:s,request:l,setRequest:c,response:f,setResponse:d,onSubmit:async g=>{g.preventDefault(),r({name:i,response:f})},onClose:()=>{e.navigate("cas.parents",{ca:n.ca})},handleUpload:v}}const o1="/assets/clipboard-4659ffea.svg",l1="/assets/download-2dfead4c.svg";function la({xml:t,name:e,setNotification:n}){const r=H(),i=()=>{navigator.clipboard.writeText(t),n({type:V.success,message:r.common.copySuccess})};return u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"button large icon",type:"button",title:r.common.copy,onClick:i,children:u.jsx("img",{src:o1,alt:r.common.copy})}),u.jsx("a",{className:"button large icon",title:r.common.download,href:`data:application/xml;base64,${btoa(t)}`,download:`${e}.xml`,children:u.jsx("img",{src:l1,alt:r.common.download})})]})}function u1(){const t=H(),{notification:e,setNotification:n,name:r,setName:i,request:s,setRequest:a,response:o,setResponse:l,onSubmit:c,onClose:f,handleUpload:d}=a1();return u.jsxs(Si,{onClose:f,children:[e&&u.jsx(xi,{notification:e,onClose:()=>n(null)}),u.jsx("h3",{children:t.caDetails.parentsTab.addParent}),u.jsxs("form",{onSubmit:c,method:"POST",children:[u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.parentsTab.request}),u.jsx("textarea",{name:"request",readOnly:!0,value:s,id:"request",onChange:v=>a(v.target.value)}),u.jsx("div",{children:u.jsx(la,{xml:s,name:"child_request",setNotification:n})})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.parentsTab.response}),u.jsx("textarea",{name:"response",value:o,onChange:v=>l(v.target.value)}),u.jsx("input",{type:"file",id:"upload",onChange:d}),u.jsx("label",{className:"button large icon",htmlFor:"upload",title:t.common.dropOrClick,children:u.jsx("img",{src:Sm,alt:t.common.dropOrClick})})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.parentsTab.name}),u.jsx("input",{name:"name",value:r,onChange:v=>i(v.target.value),required:!0})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:f,children:t.common.cancel}),u.jsx("button",{type:"submit",className:"button",children:t.common.confirm})]})]})]})}function c1({parent:t,loading:e}){const n=H(),{locale:r}=Ne(),i=e?n.caDetails.loading.replace("{handle}","..."):gm(t.last_exchange.timestamp,r);return u.jsxs("div",{className:"info-table",children:[u.jsx("h4",{children:t.name}),u.jsx("table",{children:u.jsxs("tbody",{children:[u.jsxs("tr",{children:[u.jsx("th",{children:n.caDetails.parents}),u.jsx("td",{children:t.last_exchange.uri})]}),u.jsxs("tr",{children:[u.jsx("th",{children:n.caDetails.lastExchange}),u.jsx("td",{children:t.last_exchange.result!="Success"?u.jsxs("p",{className:"failure",children:[i,u.jsx("br",{}),t.last_exchange.result.Failure.msg]}):u.jsx("p",{className:"success",children:i})})]}),u.jsxs("tr",{children:[u.jsx("th",{children:n.caDetails.allResources}),u.jsxs("td",{children:["ASN: ",t.all_resources.asn,u.jsx("br",{}),"IPv4: ",t.all_resources.ipv4,u.jsx("br",{}),"IPv6: ",t.all_resources.ipv6,u.jsx("br",{})]})]})]})})]})}function d1(){var o;const t=H(),{route:e}=He(),n=Ne(),r=ue(),[i,s]=P.useState(!1),a=()=>{s(!0),n.refreshParents().then(()=>{s(!1)})};return u.jsxs(Rn,{children:[e.name==="cas.parents.add"&&u.jsx(u1,{}),i&&u.jsx(xi,{notification:{type:V.success,message:t.caDetails.refresh.replace("{handle}",t.caDetails.parents.toLowerCase())},onClose:()=>s(!1)}),u.jsx(su,{}),n.parents&&n.ca&&((o=n.parents[n.ca])==null?void 0:o.map(l=>u.jsx(c1,{parent:l,loading:i},l.name))),u.jsx("button",{className:"button",onClick:()=>r({},"cas.parents.add"),children:t.caDetails.parentsTab.addParent}),u.jsx("button",{className:"button inverted",onClick:a,children:t.caDetails.syncParents})]})}function f1({repo:t,locale:e,loading:n}){const r=H(),i=n?r.caDetails.loading.replace("{handle}","..."):gm(t.last_exchange.timestamp,e);return u.jsx("div",{className:"info-table",children:u.jsx("table",{children:u.jsxs("tbody",{children:[u.jsxs("tr",{children:[u.jsx("th",{children:r.caDetails.exchangeUri}),u.jsx("td",{children:t.last_exchange.uri})]}),u.jsxs("tr",{children:[u.jsx("th",{children:r.caDetails.lastExchange}),u.jsx("td",{children:t.last_exchange.result!="Success"?u.jsxs("p",{className:"failure",children:[i,u.jsx("br",{}),t.last_exchange.result.Failure.msg]}):u.jsx("p",{className:"success",children:i})})]})]})})})}let Qc="";function h1(){const[t,e]=P.useState(Qc),n=Ne();return P.useEffect(()=>{n.ca&&n.api.getPublisherRequest(n.ca).then(r=>{e(r),Qc=r})},[]),t}function m1(){const t=h1(),e=On(),{route:{params:n}}=He(),r=ue(),{notification:i,setNotification:s,request:a,setRequest:o,response:l,setResponse:c,handleUpload:f}=km(t);return{notification:i,setNotification:s,request:a,setRequest:o,response:l,setResponse:c,onSubmit:async y=>{y.preventDefault(),r({response:l})},onClose:()=>{e.navigate("cas.repository",{ca:n.ca})},handleUpload:f}}function p1(){const t=H(),{notification:e,setNotification:n,request:r,setRequest:i,response:s,setResponse:a,onSubmit:o,onClose:l,handleUpload:c}=m1();return u.jsxs(Si,{onClose:l,children:[e&&u.jsx(xi,{notification:e,onClose:()=>n(null)}),u.jsx("h3",{children:t.caDetails.repoTab.addRepo}),u.jsxs("form",{onSubmit:o,method:"POST",children:[u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.repoTab.request}),u.jsx("textarea",{name:"request",readOnly:!0,value:r,id:"request",onChange:f=>i(f.target.value)}),u.jsx("div",{children:u.jsx(la,{xml:r,name:"publisher_request",setNotification:n})})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.caDetails.repoTab.response}),u.jsx("textarea",{name:"response",value:s,onChange:f=>a(f.target.value)}),u.jsx("input",{type:"file",id:"upload",onChange:c}),u.jsx("label",{className:"button large icon",htmlFor:"upload",title:t.common.dropOrClick,children:u.jsx("img",{src:Sm,alt:t.common.dropOrClick})})]}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{type:"button",className:"button outline",onClick:l,children:t.common.cancel}),u.jsx("button",{type:"submit",className:"button",children:t.common.confirm})]})]})]})}function v1(){var l;const t=H(),e=Ne(),n=ue(),{route:r}=He(),[i,s]=P.useState(!1),a=()=>{s(!0),e.refreshRepo().then(()=>{s(!1)})};if(!e.ca)return null;const o=e.repoStatus&&e.ca&&((l=e.repoStatus[e.ca])==null?void 0:l.last_exchange);return u.jsxs(Rn,{children:[r.name==="cas.repository.add"&&u.jsx(p1,{}),i&&u.jsx(xi,{notification:{type:V.success,message:t.caDetails.refresh.replace("{handle}",t.caDetails.repo.toLowerCase())},onClose:()=>s(!1)}),u.jsx(su,{}),o?u.jsx(f1,{repo:e.repoStatus[e.ca],locale:e.locale,loading:i}):u.jsx("button",{className:"button",onClick:()=>n({},"cas.repository.add"),children:t.caDetails.repoTab.addRepo}),u.jsx("button",{className:"button inverted",onClick:a,children:t.caDetails.syncRepo})]})}function Em(){const t=H();return u.jsxs(Rn,{children:[u.jsx("h1",{children:t.common.error}),u.jsx("pre",{children:window.location.pathname})]})}function g1(){const[t,e]=P.useState(""),[n,r]=P.useState(""),i=ue(),s=Ne(),a=H(),o=s.loginMethod;if(!o)return u.jsx(iu,{initial:!0});const l=async c=>{c.preventDefault(),o.with_id?i({password:n,username:t}):i({password:n})};return u.jsx(Rn,{children:u.jsxs("form",{onSubmit:l,method:"POST",className:`login card ${o.with_id?"vertical-form":""}`,children:[o.with_id&&u.jsxs("div",{children:[u.jsx("label",{htmlFor:"admin required",children:a.login.id}),u.jsx("input",{name:"token",type:"username",value:t,onChange:c=>e(c.target.value),placeholder:a.login.idPlaceholder,required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"token required",children:a.login.password}),u.jsx("input",{name:"token",type:"password",value:n,onChange:c=>r(c.target.value),placeholder:a.login.placeholder,required:!0})]}),u.jsx("div",{children:u.jsx("button",{type:"submit",className:"button",children:a.login.signin})})]})})}function fr({notification:t}){const e=ue();return u.jsxs("div",{className:`notification ${t.type}`,children:[u.jsx("button",{className:"close",onClick:()=>e({notification:"clear"}),children:"×"}),u.jsx("span",{children:t.message})]})}function ua({onClose:t,onConfirm:e}){const n=H(),{route:r}=He();let i="",s="";return r.name==="testbed"?(i=n.testbed.addChild.confirmation.title,s=n.testbed.addChild.confirmation.message):r.name==="testbed.add_pub"?(i=n.testbed.addPublisher.confirmation.title,s=n.testbed.addPublisher.confirmation.message):r.name==="testbed.del_ca"?(i=n.testbed.removeChild.confirmation.title,s=n.testbed.removeChild.confirmation.message):r.name==="testbed.del_pub"&&(i=n.testbed.removePublisher.confirmation.title,s=n.testbed.removePublisher.confirmation.message),u.jsxs(Si,{onClose:t,children:[u.jsx("h3",{children:i}),u.jsx("p",{children:s}),u.jsxs("div",{className:"actions",children:[u.jsx("button",{className:"button outline",onClick:t,children:n.common.cancel}),u.jsx("button",{className:"button",onClick:e,children:n.common.ok})]})]})}function y1(){const t=H(),[e,n]=P.useState(),[r,i]=P.useState(!1),[s,a]=P.useState(""),[o,l]=P.useState(""),[c,f]=P.useState(""),[d,v]=P.useState(""),[y,w]=P.useState(""),g=async(S,T,N,_,D)=>{const R=await fetch("/testbed/children",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:S,id_cert:T,resources:{asn:N,v4:_,v6:D}})});if(R.status===200){n({type:V.success,message:t.testbed.addChild.success.replace("{child_handle}",S)});const q=S0(await R.json());w(q)}else{const q=await R.json();q.label==="pub-duplicate"?await g(S+Date.now(),T,N,_,D):n({type:V.error,message:q.msg})}},k=async S=>{S.preventDefault(),p(s)&&i(!0)},m=async()=>{const S=p(s);S&&await g(S.handle,S.id_cert,o,c,d)},h=S=>{const T=ym(S);return T?(n({type:V.error,message:t.testbed.errors.invalid_xml.replace("{err}",T)}),!1):S.getElementsByTagName("child_request").length===0?(n({type:V.error,message:t.testbed.errors.missing_xml_el.replace("{el}","child_request")}),!1):S.getElementsByTagName("child_bpki_ta").length===0?(n({type:V.error,message:t.testbed.errors.missing_xml_el.replace("{el}","child_bpki_ta")}),!1):S.getElementsByTagName("child_request")[0].attributes.child_handle?S.getElementsByTagName("child_bpki_ta")[0].childNodes.length===0?(n({type:V.error,message:t.testbed.errors.empty_xml_el.replace("{el}","child_bpki_ta")}),!1):S.getElementsByTagName("child_bpki_ta")[0].childNodes[0].nodeValue.trim().length===0?(n({type:V.error,message:t.testbed.errors.empty_xml_el.replace("{el}","child_bpki_ta")}),!1):!0:(n({type:V.error,message:t.testbed.errors.missing_xml_attr.replace("{attr}","child_handle").replace("{el}","child_request")}),!1)},p=S=>{const T=new window.DOMParser().parseFromString(S,"text/xml");if(h(T))return{handle:T.getElementsByTagName("child_request")[0].attributes.child_handle.value,id_cert:T.getElementsByTagName("child_bpki_ta")[0].childNodes[0].nodeValue.trim()}},x=()=>{w(""),i(!1),a(t.testbed.addChild.requestXML.placeholder),l(""),f(""),v("")};return y!==""?u.jsxs("div",{className:"testbed-result",children:[e&&u.jsx(fr,{notification:e}),u.jsx("pre",{children:y}),u.jsx("p",{children:u.jsx(la,{xml:y,name:"parent_response",setNotification:n})}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:x,className:"button",children:t.testbed.addChild.registeranother})})]}):u.jsxs(u.Fragment,{children:[r&&u.jsx(ua,{onClose:()=>i(!1),onConfirm:m}),u.jsxs("form",{onSubmit:k,method:"POST",children:[e&&u.jsx(fr,{notification:e}),u.jsxs("div",{children:[u.jsxs("label",{children:[t.testbed.addChild.requestXML.label,u.jsx("a",{href:"https://tools.ietf.org/html/rfc8183#section-5.2.1",children:t.testbed.rfcdoclink})]}),u.jsx("textarea",{name:"request",value:s,placeholder:t.testbed.addChild.requestXML.placeholder,onChange:S=>a(S.target.value),required:!0})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.addChild.asnresources.label}),u.jsx("input",{name:"asn",value:o,onChange:S=>l(S.target.value),placeholder:t.testbed.addChild.asnresources.placeholder})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.addChild.ipv4resources.label}),u.jsx("input",{name:"v4",value:c,onChange:S=>f(S.target.value),placeholder:t.testbed.addChild.ipv4resources.placeholder})]}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.addChild.ipv6resources.label}),u.jsx("input",{name:"v6",value:d,onChange:S=>v(S.target.value),placeholder:t.testbed.addChild.ipv6resources.placeholder})]}),u.jsx("button",{type:"submit",className:"button",children:t.testbed.addChild.confirm})]})]})}function w1(){const t=H(),[e,n]=P.useState(),[r,i]=P.useState(!1),[s,a]=P.useState(""),[o,l]=P.useState(""),c=async(g,k)=>{const m=await fetch("/testbed/publishers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({publisher_handle:g,id_cert:k,tag:null})});if(m.status===200)n({type:V.success,message:t.testbed.addPublisher.success.replace("{publisher_handle}",g)}),l(k0(await m.json()));else{const h=await m.json();h.label==="pub-duplicate"?await c(g+Date.now(),k):n({type:V.error,message:h.msg})}},f=g=>{const k=ym(g);return k?(n({type:V.error,message:t.testbed.errors.invalid_xml.replace("{err}",k)}),!1):g.getElementsByTagName("publisher_request").length===0?(n({type:V.error,message:t.testbed.errors.missing_xml_el.replace("{el}","publisher_request")}),!1):g.getElementsByTagName("publisher_bpki_ta").length===0?(n({type:V.error,message:t.testbed.errors.missing_xml_el.replace("{el}","publisher_bpki_ta")}),!1):g.getElementsByTagName("publisher_request")[0].attributes.publisher_handle?g.getElementsByTagName("publisher_bpki_ta")[0].childNodes.length===0?(n({type:V.error,message:t.testbed.errors.empty_xml_el.replace("{el}","publisher_bpki_ta")}),!1):g.getElementsByTagName("publisher_bpki_ta")[0].childNodes[0].nodeValue.trim().length===0?(n({type:V.error,message:t.testbed.errors.empty_xml_el.replace("{el}","publisher_bpki_ta")}),!1):!0:(n({type:V.error,message:t.testbed.errors.missing_xml_attr.replace("{attr}","publisher_handle").replace("{el}","publisher_request")}),!1)},d=g=>{const k=new window.DOMParser().parseFromString(g,"text/xml");if(f(k))return{publisher_handle:k.getElementsByTagName("publisher_request")[0].attributes.publisher_handle.value,id_cert:k.getElementsByTagName("publisher_bpki_ta")[0].childNodes[0].nodeValue.trim()}},v=async g=>{g.preventDefault(),d(s)&&i(!0)},y=async()=>{const g=d(s);g&&await c(g.publisher_handle,g.id_cert)},w=()=>{a(t.testbed.addPublisher.requestXML.placeholder),l(""),i(!1)};return o!==""?u.jsxs("div",{className:"testbed-result",children:[e&&u.jsx(fr,{notification:e}),u.jsx("pre",{children:o}),u.jsx("p",{children:u.jsx(la,{xml:o,name:"publisher_response",setNotification:n})}),u.jsx("div",{className:"actions",children:u.jsx("button",{onClick:w,className:"button",children:t.testbed.addPublisher.registeranother})})]}):u.jsxs(u.Fragment,{children:[r&&u.jsx(ua,{onClose:()=>i(!1),onConfirm:y}),u.jsxs("form",{onSubmit:v,method:"POST",children:[e&&u.jsx(fr,{notification:e}),u.jsxs("div",{children:[u.jsxs("label",{children:[t.testbed.addPublisher.requestXML.label,u.jsx("a",{href:"https://tools.ietf.org/html/rfc8183#section-5.2.3",children:t.testbed.rfcdoclink})]}),u.jsx("textarea",{name:"request",value:s,placeholder:t.testbed.addPublisher.requestXML.placeholder,onChange:g=>a(g.target.value),required:!0})]}),u.jsx("button",{type:"submit",className:"button",children:t.testbed.addPublisher.confirm})]})]})}function x1(){const t=H(),[e,n]=P.useState(),[r,i]=P.useState(!1),[s,a]=P.useState(""),o=async()=>{const f=await fetch(`/testbed/children/${s}`,{method:"DELETE"});if(f.status===200)n({type:V.success,message:t.testbed.removeChild.success.replace("{child_handle}",s)}),a("");else{const d=await f.json();n({type:V.error,message:d.msg})}},l=f=>{f.preventDefault(),i(!0)},c=async()=>{await o(),i(!1)};return u.jsxs(u.Fragment,{children:[r&&u.jsx(ua,{onClose:()=>i(!1),onConfirm:c}),u.jsxs("form",{onSubmit:l,method:"POST",children:[e&&u.jsx(fr,{notification:e}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.childhandle}),u.jsx("input",{name:"handle",value:s,onChange:f=>a(f.target.value),placeholder:t.testbed.removeChild.placeholder,required:!0})]}),u.jsx("button",{type:"submit",className:"button",children:t.testbed.removeChild.confirm})]})]})}function S1(){const t=H(),[e,n]=P.useState(),[r,i]=P.useState(!1),[s,a]=P.useState(""),o=async()=>{const f=await fetch(`/testbed/publishers/${s}`,{method:"DELETE"});if(f.status===200)n({type:V.success,message:t.testbed.removePublisher.success.replace("{publisher_handle}",s)}),a("");else{const d=await f.json();n({type:V.error,message:d.msg})}},l=async f=>{f.preventDefault(),i(!0)},c=async()=>{await o(),i(!1)};return u.jsxs(u.Fragment,{children:[r&&u.jsx(ua,{onClose:()=>i(!1),onConfirm:c}),u.jsxs("form",{onSubmit:l,method:"POST",children:[e&&u.jsx(fr,{notification:e}),u.jsxs("div",{children:[u.jsx("label",{children:t.testbed.publisherhandle}),u.jsx("input",{name:"handle",value:s,onChange:f=>a(f.target.value),placeholder:t.testbed.removePublisher.placeholder,required:!0})]}),u.jsx("button",{type:"submit",className:"button",children:t.testbed.removePublisher.confirm})]})]})}const Tm="/assets/welcome-9fadc7f2.svg";function Zi({children:t}){const e=H();return u.jsx(Rn,{children:u.jsxs("div",{className:"testbed",children:[u.jsxs("div",{children:[u.jsx("img",{src:Tm,className:"hero",alt:e.common.copy}),u.jsx("h2",{children:e.testbed.welcome})]}),u.jsxs("div",{children:[u.jsx("h3",{children:e.testbed.disclaimer.heading}),u.jsx("p",{dangerouslySetInnerHTML:{__html:e.testbed.disclaimer.body}}),u.jsx("h3",{children:e.testbed.rpconfighelp.heading}),u.jsx("p",{dangerouslySetInnerHTML:{__html:e.testbed.rpconfighelp.body.replace("{tallink}","/ta/ta.tal")}}),u.jsx("h3",{children:e.testbed.regunreg.heading}),u.jsx("p",{dangerouslySetInnerHTML:{__html:e.testbed.regunreg.body}})]}),u.jsx("div",{children:u.jsxs("ul",{className:"tabs",children:[u.jsx("li",{children:u.jsx(yn,{routeName:"testbed",activeStrict:!0,children:e.testbed.addChild.heading})}),u.jsx("li",{children:u.jsx(yn,{routeName:"testbed.del_ca",children:e.testbed.removeChild.heading})}),u.jsx("li",{children:u.jsx(yn,{routeName:"testbed.add_pub",children:e.testbed.addPublisher.heading})}),u.jsx("li",{children:u.jsx(yn,{routeName:"testbed.del_pub",children:e.testbed.removePublisher.heading})})]})}),t]})})}function k1(){const{route:t}=He();return Ne().testBedEnabled?t.name=="testbed.del_ca"?u.jsx(Zi,{children:u.jsx(x1,{})}):t.name=="testbed.add_pub"?u.jsx(Zi,{children:u.jsx(w1,{})}):t.name=="testbed.del_pub"?u.jsx(Zi,{children:u.jsx(S1,{})}):u.jsx(Zi,{children:u.jsx(y1,{})}):u.jsx(Em,{})}function E1(){const t=ue(),[e,n]=P.useState(""),r=H(),i=s=>{s.preventDefault(),t({name:e})};return u.jsx(Rn,{children:u.jsxs("form",{method:"POST",onSubmit:i,className:"center-form",children:[u.jsxs("div",{children:[u.jsx("img",{src:Tm,alt:r.common.copy}),u.jsx("h2",{children:r.onboarding.welcome}),u.jsx("div",{dangerouslySetInnerHTML:{__html:r.onboarding.welcomeHtml}})]}),u.jsxs("div",{children:[u.jsxs("label",{htmlFor:"token required",children:["CA ",r.caDetails.handle]}),u.jsx("input",{name:"name",type:"test",value:e,onChange:s=>n(s.target.value),required:!0})]}),u.jsx("div",{children:u.jsx("button",{type:"submit",className:"button",children:r.onboarding.addCAForm.confirm})})]})})}function T1(){const{route:t}=He();return!t||t.name==="loading"?u.jsx(iu,{initial:!0}):t.name==="login"?u.jsx(g1,{}):t.name==="onboarding"?u.jsx(E1,{}):t.name.startsWith("cas.parents")?u.jsx(d1,{}):t.name.startsWith("cas.repository")?u.jsx(v1,{}):t.name.startsWith("cas")?u.jsx(i1,{}):t.name.startsWith("testbed")?u.jsx(k1,{}):u.jsx(Em,{})}/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -111,4 +111,4 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */var Re=function(){return Re=Object.assign||function(e){for(var n,r=1,i=arguments.length;rs.includes(c.id||"")),o=a.filter(c=>c.action==="add"),l=a.filter(c=>c.action==="remove");return await e.changeRoutes(o,l),Promise.reject({redirect:{name:"cas",params:{ca:e.ca}}})}if(t.name==="cas.parents.add"&&t.params.name&&await e.addParent(t.params))return Promise.reject({redirect:{name:"cas.parents",params:{ca:e.ca}}});if(t.name==="cas.repository.add"&&t.params.response&&await e.addRepository(t.params))return Promise.reject({redirect:{name:"cas.repository",params:{ca:e.ca}}});if(await e.loadCas(),((n=e.cas)==null?void 0:n.length)===0&&t.name!=="onboarding")return Promise.reject({redirect:{name:"onboarding"}});if(t.name==="onboarding"&&t.params.name&&await e.addCa(t.params.name))return Promise.reject({redirect:{name:"cas.repository",params:{ca:e.ca}}});if(e.ca&&((r=e.cas)!=null&&r.length)&&!((i=e.cas)!=null&&i.includes(e.ca)))return Promise.reject({redirect:{name:"cas",params:{ca:e.cas[0]}}});if(t.name==="home"&&e.ca)return Promise.reject({redirect:{name:"cas",params:{ca:e.ca}}});t.name.startsWith("cas")&&await Promise.all([e.loadCa(),e.loadParents(),e.loadRepoStatus()])}}async function Pw(t,e){t.params.locale&&(await e.setLocale(t.params.locale),delete t.params.locale)}function Rw(t){return async e=>{const n=t.getDependencies().store;try{await Pw(e,n),n.translations===null&&await n.loadTranslations(),await jw(e,n),await Ow(e,n)}catch(r){return Promise.reject(r)}return n.storePersistedData(),e}}const Ln="/ui",Dw=[{name:"home",path:Ln},{name:"onboarding",path:`${Ln}/onboarding`},{name:"cas",path:`${Ln}/cas/:ca`,children:[{name:"add_new",path:"/add"},{name:"add",path:"/add/:id"},{name:"delete",path:"/delete/:id"},{name:"edit",path:"/edit/:id"},{name:"change",path:"/change"},{name:"parents",path:"/parents",children:[{name:"add",path:"/add"}]},{name:"repository",path:"/repos",children:[{name:"add",path:"/add"}]},{name:"analyse",path:"/analyse"}]},{name:"testbed",path:`${Ln}/testbed`,children:[{name:"del_ca",path:"/remove"},{name:"add_pub",path:"/register-publisher"},{name:"del_pub",path:"/remove-publisher"}]},{name:"login",path:`${Ln}/login`},{name:"logout",path:`${Ln}/logout`}];function Iw(t){const e=hw(Dw,{allowNotFound:!0,queryParamsMode:"loose"});return e.setDependencies({store:t}),e.usePlugin(_w()),e.useMiddleware(Rw),e}class Mw{constructor(){ce(this,"notification",null);ce(this,"cas",null);ce(this,"ca",null);ce(this,"locale",vg);ce(this,"token",null);ce(this,"translations",null);ce(this,"caDetails",{});ce(this,"roas",{});ce(this,"suggestions",{});ce(this,"repoStatus",{});ce(this,"parents",{});ce(this,"userDetails",null);ce(this,"loginMethod",null);ce(this,"testBedEnabled",!1);ce(this,"api");this.api=new wm,this.loadPersistedState()}getRoas(e){let n=this.roas&&this.ca&&this.roas[this.ca]||[];if(n=n.filter(r=>!r.allowed_by),e){if(e.search){const i=e.search.toLowerCase().split(/\s/);n=n.filter(s=>i.some(a=>s.asn.toString().includes(a))||i.some(a=>s.prefix.includes(a))||i.some(a=>{var o;return s.state&&(s.state.includes(a)||((o=this.translations)==null?void 0:o.announcements.state[s.state].toLowerCase().includes(a)))}))}n=n.slice().sort((i,s)=>g0(i,s,e.sort,e.order));const r=(e.page-1)*e.limit;n=n.slice(r,r+e.limit)}return n}getSuggestions(e){let n=this.suggestions&&this.ca&&this.suggestions[this.ca]||[];return e&&(n=n.slice().sort((r,i)=>y0(r,i,e.sort,e.order))),n}async handleError(e){try{return await e()}catch(n){const r=n;return(r.status===401||r.status===403)&&this.setToken(null),this.setNotification({type:V.error,message:r.msg||"Error"}),!1}}loadPersistedState(){const e=window.localStorage.getItem("krill");if(this.setToken(window.sessionStorage.getItem("krillToken")),e!==null)try{const n=JSON.parse(e);this.ca=n.ca,this.locale=n.locale,this.userDetails=n.userDetails}catch(n){console.error(n)}}storePersistedData(){this.token?window.sessionStorage.setItem("krillToken",this.token):window.sessionStorage.removeItem("krillToken"),window.localStorage.setItem("krill",JSON.stringify({ca:this.ca,locale:this.locale,userDetails:this.userDetails}))}setLocale(e){return this.locale=e,this.loadTranslations()}async loadTranslations(){this.translations=await b0(this.locale)}async loadLoginMethod(){return this.loginMethod||await this.handleError(async()=>{this.loginMethod=await this.api.getLoginMethod()}),this.loginMethod}async loadTestBedEnabled(){return this.testBedEnabled||await this.handleError(async()=>{this.testBedEnabled=await this.api.getTestBedEnabled()}),this.testBedEnabled}async tryLogin(e,n){var r;try{const i=await this.api.postLogin(e,n);this.setNotification(null),this.setToken(i.token),this.setUserDetails({id:i.id,attributes:i.attributes})}catch{this.setUserDetails(null),this.setNotification({type:V.error,message:(r=this.translations)==null?void 0:r.login.error})}}async checkToken(){var e;if(this.token)try{this.setNotification(null),await this.api.checkToken(this.token)}catch{this.setToken(null),this.setUserDetails(null),this.storePersistedData(),this.setNotification({type:V.error,message:(e=this.translations)==null?void 0:e.login.error})}}async loadCas(e=!1){(this.cas!==null||!this.token)&&!e||await this.handleError(async()=>{this.cas=await this.api.getCas(),!this.ca&&this.cas.length>0&&(this.ca=this.cas[0])})}async addCa(e){return await this.handleError(async()=>(await this.api.postCas(e),await this.loadCas(!0),await this.loadCa(!0),!0))}async loadCa(e){!this.ca||this.ca&&this.caDetails[this.ca]&&this.roas[this.ca]&&e!==!0||await this.handleError(async()=>{if(this.ca!==null){const[n,r]=await Promise.all([this.api.getCaDetails(this.ca),this.api.getCaRoas(this.ca)]);this.caDetails[this.ca]=n,this.roas[this.ca]=r}})}async loadSuggestions(e){!this.ca||this.ca&&this.suggestions[this.ca]&&e!==!0||await this.handleError(async()=>{this.ca!==null&&(this.suggestions[this.ca]=await this.api.getCaSuggestions(this.ca))})}async refreshParents(){if(!this.ca)return;const e=this.ca;return await this.api.refreshCaParents(),new Promise(n=>{const r=setInterval(()=>{this.api.getCaParents(e).then(i=>{JSON.stringify(i)!==JSON.stringify(this.parents[e])&&(this.parents[e]=i,clearInterval(r),n(i))})},5e3)})}async loadParents(e){!this.ca||this.ca&&this.parents[this.ca]&&e!==!0||await this.handleError(async()=>{this.ca!==null&&(this.parents[this.ca]=await this.api.getCaParents(this.ca))})}async loadRepoStatus(e){!this.ca||this.ca&&this.repoStatus[this.ca]&&e!==!0||await this.handleError(async()=>{this.ca!==null&&(this.repoStatus[this.ca]=await this.api.getCaRepoStatus(this.ca))})}async refreshRepo(){if(!this.ca)return;const e=this.ca;return await this.api.refreshCaRepo(),new Promise(n=>{const r=setInterval(()=>{this.api.getCaRepoStatus(e).then(i=>{JSON.stringify(i)!==JSON.stringify(this.repoStatus[e])&&(this.repoStatus[e]=i,clearInterval(r),n(i))})},5e3)})}async changeRoutes(e,n){return this.ca===null?!1:await this.handleError(async()=>{var r;return await this.api.updateRoutes(this.ca,{added:e,removed:n}),await this.loadCa(!0),await this.loadSuggestions(!0),this.setNotification({type:V.success,message:(r=this.translations)==null?void 0:r.common.success}),!0})}async editRoute(e,n){if(this.ca===null||!this.roas[this.ca])return!1;const r=this.roas[this.ca].find(s=>s.id===e);if(!r)return!1;const i={...r,comment:n};return await this.handleError(async()=>{var s;return await this.api.updateRoutes(this.ca,{added:[i],removed:[]}),await this.loadCa(!0),this.setNotification({type:V.success,message:(s=this.translations)==null?void 0:s.caDetails.confirmation.commentUpdatedSuccess}),!0})}async addRoute(e){if(this.ca===null)return!1;const n={asn:parseInt(e.asn,10),prefix:e.prefix,comment:e.comment,max_length:parseInt(e.max_length,10)};return await this.handleError(async()=>{var r;return await this.api.updateRoutes(this.ca,{added:[n],removed:[]}),await this.loadCa(!0),this.setNotification({type:V.success,message:(r=this.translations)==null?void 0:r.caDetails.confirmation.addedSuccess}),!0})}async deleteRoute(e){if(this.ca===null)return!1;const n={asn:parseInt(e.asn,10),prefix:e.prefix,max_length:parseInt(e.max_length,10)};return await this.handleError(async()=>{var r;return await this.api.updateRoutes(this.ca,{added:[],removed:[n]}),await this.loadCa(!0),this.setNotification({type:V.success,message:(r=this.translations)==null?void 0:r.caDetails.confirmation.retiredSuccess}),!0})}async addParent(e){if(this.ca!==null)return await this.handleError(async()=>(await this.api.postParent(this.ca,e.name,e.response||""),await this.loadParents(!0),!0))}async addRepository(e){if(this.ca!==null)return await this.handleError(async()=>(await this.api.postRepository(this.ca,e.name,e.response||""),await this.loadRepoStatus(!0),!0))}setNotification(e){this.notification=e}setUserDetails(e){this.userDetails=e}setCa(e){this.ca=e}setToken(e){this.token=e,this.api.setToken(e)}}const Lw=new Mw,Rm=Iw(Lw),Fw=ph(document.getElementById("root"));Fw.render(u.jsx(dg,{router:Rm,children:u.jsx(T1,{})}));Rm.start()});export default Aw(); +***************************************************************************** */var De=function(){return De=Object.assign||function(e){for(var n,r=1,i=arguments.length;rs.includes(c.id||"")),o=a.filter(c=>c.action==="add"),l=a.filter(c=>c.action==="remove");return await e.changeRoutes(o,l),Promise.reject({redirect:{name:"cas",params:{ca:e.ca}}})}if(t.name==="cas.parents.add"&&t.params.name&&await e.addParent(t.params))return Promise.reject({redirect:{name:"cas.parents",params:{ca:e.ca}}});if(t.name==="cas.repository.add"&&t.params.response&&await e.addRepository(t.params))return Promise.reject({redirect:{name:"cas.repository",params:{ca:e.ca}}});if(await e.loadCas(),((n=e.cas)==null?void 0:n.length)===0&&t.name!=="onboarding")return Promise.reject({redirect:{name:"onboarding"}});if(t.name==="onboarding"&&t.params.name&&await e.addCa(t.params.name))return Promise.reject({redirect:{name:"cas.repository",params:{ca:e.ca}}});if(e.ca&&((r=e.cas)!=null&&r.length)&&!((i=e.cas)!=null&&i.includes(e.ca)))return Promise.reject({redirect:{name:"cas",params:{ca:e.cas[0]}}});if(t.name==="home"&&e.ca)return Promise.reject({redirect:{name:"cas",params:{ca:e.ca}}});t.name.startsWith("cas")&&await Promise.all([e.loadCa(),e.loadParents(),e.loadRepoStatus()])}}async function Pw(t,e){t.params.locale&&(await e.setLocale(t.params.locale),delete t.params.locale)}function Rw(t){return async e=>{const n=t.getDependencies().store;try{await Pw(e,n),n.translations===null&&await n.loadTranslations(),await jw(e,n),await Ow(e,n)}catch(r){return Promise.reject(r)}return n.storePersistedData(),e}}const Ln="/ui",Dw=[{name:"home",path:Ln},{name:"onboarding",path:`${Ln}/onboarding`},{name:"cas",path:`${Ln}/cas/:ca`,children:[{name:"add_new",path:"/add"},{name:"add",path:"/add/:id"},{name:"delete",path:"/delete/:id"},{name:"edit",path:"/edit/:id"},{name:"change",path:"/change"},{name:"parents",path:"/parents",children:[{name:"add",path:"/add"}]},{name:"repository",path:"/repos",children:[{name:"add",path:"/add"}]},{name:"analyse",path:"/analyse"}]},{name:"testbed",path:`${Ln}/testbed`,children:[{name:"del_ca",path:"/remove"},{name:"add_pub",path:"/register-publisher"},{name:"del_pub",path:"/remove-publisher"}]},{name:"login",path:`${Ln}/login`},{name:"logout",path:`${Ln}/logout`}];function Iw(t){const e=hw(Dw,{allowNotFound:!0,queryParamsMode:"loose"});return e.setDependencies({store:t}),e.usePlugin(_w()),e.useMiddleware(Rw),e}class Mw{constructor(){ce(this,"notification",null);ce(this,"cas",null);ce(this,"ca",null);ce(this,"locale",vg);ce(this,"token",null);ce(this,"translations",null);ce(this,"caDetails",{});ce(this,"roas",{});ce(this,"suggestions",{});ce(this,"repoStatus",{});ce(this,"parents",{});ce(this,"userDetails",null);ce(this,"loginMethod",null);ce(this,"testBedEnabled",!1);ce(this,"api");this.api=new wm,this.loadPersistedState()}getRoas(e){let n=this.roas&&this.ca&&this.roas[this.ca]||[];if(n=n.filter(r=>!r.allowed_by),e){if(e.search){const i=e.search.toLowerCase().split(/\s/);n=n.filter(s=>i.some(a=>s.asn.toString().includes(a))||i.some(a=>s.prefix.includes(a))||i.some(a=>{var o;return s.state&&(s.state.includes(a)||((o=this.translations)==null?void 0:o.announcements.state[s.state].toLowerCase().includes(a)))}))}n=n.slice().sort((i,s)=>g0(i,s,e.sort,e.order));const r=(e.page-1)*e.limit;n=n.slice(r,r+e.limit)}return n}getSuggestions(e){let n=this.suggestions&&this.ca&&this.suggestions[this.ca]||[];return e&&(n=n.slice().sort((r,i)=>y0(r,i,e.sort,e.order))),n}async handleError(e){try{return await e()}catch(n){const r=n;return(r.status===401||r.status===403)&&this.setToken(null),this.setNotification({type:V.error,message:r.msg||"Error"}),!1}}loadPersistedState(){const e=window.localStorage.getItem("krill");if(this.setToken(window.sessionStorage.getItem("krillToken")),e!==null)try{const n=JSON.parse(e);this.ca=n.ca,this.locale=n.locale,this.userDetails=n.userDetails}catch(n){console.error(n)}}storePersistedData(){this.token?window.sessionStorage.setItem("krillToken",this.token):window.sessionStorage.removeItem("krillToken"),window.localStorage.setItem("krill",JSON.stringify({ca:this.ca,locale:this.locale,userDetails:this.userDetails}))}setLocale(e){return this.locale=e,this.loadTranslations()}async loadTranslations(){this.translations=await b0(this.locale)}async loadLoginMethod(){return this.loginMethod||await this.handleError(async()=>{this.loginMethod=await this.api.getLoginMethod()}),this.loginMethod}async loadTestBedEnabled(){return this.testBedEnabled||await this.handleError(async()=>{this.testBedEnabled=await this.api.getTestBedEnabled()}),this.testBedEnabled}async tryLogin(e,n){var r;try{const i=await this.api.postLogin(e,n);this.setNotification(null),this.setToken(i.token),this.setUserDetails({id:i.id,attributes:i.attributes})}catch{this.setUserDetails(null),this.setNotification({type:V.error,message:(r=this.translations)==null?void 0:r.login.error})}}async checkToken(){var e;if(this.token)try{this.setNotification(null),await this.api.checkToken(this.token)}catch{this.setToken(null),this.setUserDetails(null),this.storePersistedData(),this.setNotification({type:V.error,message:(e=this.translations)==null?void 0:e.login.error})}}async loadCas(e=!1){(this.cas!==null||!this.token)&&!e||await this.handleError(async()=>{this.cas=await this.api.getCas(),!this.ca&&this.cas.length>0&&(this.ca=this.cas[0])})}async addCa(e){return await this.handleError(async()=>(await this.api.postCas(e),await this.loadCas(!0),await this.loadCa(!0),!0))}async loadCa(e){!this.ca||this.ca&&this.caDetails[this.ca]&&this.roas[this.ca]&&e!==!0||await this.handleError(async()=>{if(this.ca!==null){const[n,r]=await Promise.all([this.api.getCaDetails(this.ca),this.api.getCaRoas(this.ca)]);this.caDetails[this.ca]=n,this.roas[this.ca]=r}})}async loadSuggestions(e){!this.ca||this.ca&&this.suggestions[this.ca]&&e!==!0||await this.handleError(async()=>{this.ca!==null&&(this.suggestions[this.ca]=await this.api.getCaSuggestions(this.ca))})}async refreshParents(){if(!this.ca)return;const e=this.ca;return await this.api.refreshCaParents(),new Promise(n=>{const r=setInterval(()=>{this.api.getCaParents(e).then(i=>{JSON.stringify(i)!==JSON.stringify(this.parents[e])&&(this.parents[e]=i,clearInterval(r),n(i))})},5e3)})}async loadParents(e){!this.ca||this.ca&&this.parents[this.ca]&&e!==!0||await this.handleError(async()=>{this.ca!==null&&(this.parents[this.ca]=await this.api.getCaParents(this.ca))})}async loadRepoStatus(e){!this.ca||this.ca&&this.repoStatus[this.ca]&&e!==!0||await this.handleError(async()=>{this.ca!==null&&(this.repoStatus[this.ca]=await this.api.getCaRepoStatus(this.ca))})}async refreshRepo(){if(!this.ca)return;const e=this.ca;return await this.api.refreshCaRepo(),new Promise(n=>{const r=setInterval(()=>{this.api.getCaRepoStatus(e).then(i=>{JSON.stringify(i)!==JSON.stringify(this.repoStatus[e])&&(this.repoStatus[e]=i,clearInterval(r),n(i))})},5e3)})}async changeRoutes(e,n){return this.ca===null?!1:await this.handleError(async()=>{var r;return await this.api.updateRoutes(this.ca,{added:e,removed:n}),await this.loadCa(!0),await this.loadSuggestions(!0),this.setNotification({type:V.success,message:(r=this.translations)==null?void 0:r.common.success}),!0})}async editRoute(e,n){if(this.ca===null||!this.roas[this.ca])return!1;const r=this.roas[this.ca].find(s=>s.id===e);if(!r)return!1;const i={...r,comment:n};return await this.handleError(async()=>{var s;return await this.api.updateRoutes(this.ca,{added:[i],removed:[]}),await this.loadCa(!0),this.setNotification({type:V.success,message:(s=this.translations)==null?void 0:s.caDetails.confirmation.commentUpdatedSuccess}),!0})}async addRoute(e){if(this.ca===null)return!1;const n={asn:parseInt(e.asn,10),prefix:e.prefix,comment:e.comment,max_length:parseInt(e.max_length,10)};return await this.handleError(async()=>{var r;return await this.api.updateRoutes(this.ca,{added:[n],removed:[]}),await this.loadCa(!0),this.setNotification({type:V.success,message:(r=this.translations)==null?void 0:r.caDetails.confirmation.addedSuccess}),!0})}async deleteRoute(e){if(this.ca===null)return!1;const n={asn:parseInt(e.asn,10),prefix:e.prefix,max_length:parseInt(e.max_length,10)};return await this.handleError(async()=>{var r;return await this.api.updateRoutes(this.ca,{added:[],removed:[n]}),await this.loadCa(!0),this.setNotification({type:V.success,message:(r=this.translations)==null?void 0:r.caDetails.confirmation.retiredSuccess}),!0})}async addParent(e){if(this.ca!==null)return await this.handleError(async()=>(await this.api.postParent(this.ca,e.name,e.response||""),await this.loadParents(!0),!0))}async addRepository(e){if(this.ca!==null)return await this.handleError(async()=>(await this.api.postRepository(this.ca,e.name,e.response||""),await this.loadRepoStatus(!0),!0))}setNotification(e){this.notification=e}setUserDetails(e){this.userDetails=e}setCa(e){this.ca=e}setToken(e){this.token=e,this.api.setToken(e)}}const Lw=new Mw,Rm=Iw(Lw),Fw=ph(document.getElementById("root"));Fw.render(u.jsx(dg,{router:Rm,children:u.jsx(T1,{})}));Rm.start()});export default Aw(); diff --git a/ui/index.html b/ui/index.html index 18ad6c671..ca876a8f3 100644 --- a/ui/index.html +++ b/ui/index.html @@ -5,7 +5,7 @@ Krill-RPKI - +