@equinor/fusion-framework-cli 9.9.0 → 9.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/bin/public/assets/{index-DuWJZzf1.js → index-C29gzu5T.js} +6 -10
- package/dist/bin/public/index.html +1 -1
- package/dist/types/bin/build-application.d.ts +2 -2
- package/dist/types/lib/utils/config.d.ts +2 -2
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +20 -20
|
@@ -40,7 +40,7 @@ Error generating stack: `+o.message+`
|
|
|
40
40
|
`+o.stack}return{value:t,source:e,stack:i,digest:null}}function Jm(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function c4(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var nM=typeof WeakMap=="function"?WeakMap:Map;function pE(t,e,r){r=ta(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){f2||(f2=!0,y4=n),c4(t,e)},r}function mE(t,e,r){r=ta(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var i=e.value;r.payload=function(){return n(i)},r.callback=function(){c4(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){c4(t,e),typeof n!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),r}function b6(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new nM;var i=new Set;n.set(e,i)}else i=n.get(e),i===void 0&&(i=new Set,n.set(e,i));i.has(r)||(i.add(r),t=gM.bind(null,t,e,r),e.then(t,t))}function w6(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 x6(t,e,r,n,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=ta(-1,1),e.tag=2,Ga(r,e,1))),r.lanes|=1),t)}var iM=ua.ReactCurrentOwner,Mn=!1;function cn(t,e,r,n){e.child=t===null?WC(e,null,r,n):ed(e,t.child,r,n)}function C6(t,e,r,n,i){r=r.render;var o=e.ref;return jl(e,i),n=T3(t,e,r,n,o,i),r=P3(),t!==null&&!Mn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,la(t,e,i)):(Rt&&r&&g3(e),e.flags|=1,cn(t,e,n,i),e.child)}function E6(t,e,r,n,i){if(t===null){var o=r.type;return typeof o=="function"&&!V3(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,vE(t,e,o,n,i)):(t=sp(r.type,null,n,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&i)){var a=o.memoizedProps;if(r=r.compare,r=r!==null?r:kh,r(a,n)&&t.ref===e.ref)return la(t,e,i)}return e.flags|=1,t=Qa(o,n),t.ref=e.ref,t.return=e,e.child=t}function vE(t,e,r,n,i){if(t!==null){var o=t.memoizedProps;if(kh(o,n)&&t.ref===e.ref)if(Mn=!1,e.pendingProps=n=o,(t.lanes&i)!==0)t.flags&131072&&(Mn=!0);else return e.lanes=t.lanes,la(t,e,i)}return l4(t,e,r,n,i)}function gE(t,e,r){var n=e.pendingProps,i=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},wt(Il,zn),zn|=r;else{if(!(r&1073741824))return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,wt(Il,zn),zn|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,wt(Il,zn),zn|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,wt(Il,zn),zn|=n;return cn(t,e,i,r),e.child}function yE(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function l4(t,e,r,n,i){var o=Hn(r)?fc:nn.current;return o=Xl(e,o),jl(e,i),r=T3(t,e,r,n,o,i),n=P3(),t!==null&&!Mn?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,la(t,e,i)):(Rt&&n&&g3(e),e.flags|=1,cn(t,e,r,i),e.child)}function k6(t,e,r,n,i){if(Hn(r)){var o=!0;n2(e)}else o=!1;if(jl(e,i),e.stateNode===null)ip(t,e),BC(e,r,n),s4(e,r,n,i),n=!0;else if(t===null){var a=e.stateNode,s=e.memoizedProps;a.props=s;var c=a.context,l=r.contextType;typeof l=="object"&&l!==null?l=_i(l):(l=Hn(r)?fc:nn.current,l=Xl(e,l));var d=r.getDerivedStateFromProps,u=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";u||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==n||c!==l)&&v6(e,a,n,l),Ha=!1;var h=e.memoizedState;a.state=h,c2(e,n,a,i),c=e.memoizedState,s!==n||h!==c||Zn.current||Ha?(typeof d=="function"&&(a4(e,r,d,n),c=e.memoizedState),(s=Ha||m6(e,r,s,n,h,c,l))?(u||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=n,e.memoizedState=c),a.props=n,a.state=c,a.context=l,n=s):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{a=e.stateNode,jC(t,e),s=e.memoizedProps,l=e.type===e.elementType?s:Li(e.type,s),a.props=l,u=e.pendingProps,h=a.context,c=r.contextType,typeof c=="object"&&c!==null?c=_i(c):(c=Hn(r)?fc:nn.current,c=Xl(e,c));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==u||h!==c)&&v6(e,a,n,c),Ha=!1,h=e.memoizedState,a.state=h,c2(e,n,a,i);var p=e.memoizedState;s!==u||h!==p||Zn.current||Ha?(typeof f=="function"&&(a4(e,r,f,n),p=e.memoizedState),(l=Ha||m6(e,r,l,n,h,p,c)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(n,p,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(n,p,c)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=p),a.props=n,a.state=p,a.context=c,n=l):(typeof a.componentDidUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===t.memoizedProps&&h===t.memoizedState||(e.flags|=1024),n=!1)}return d4(t,e,r,n,o,i)}function d4(t,e,r,n,i,o){yE(t,e);var a=(e.flags&128)!==0;if(!n&&!a)return i&&d6(e,r,!1),la(t,e,o);n=e.stateNode,iM.current=e;var s=a&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&a?(e.child=ed(e,t.child,null,o),e.child=ed(e,null,s,o)):cn(t,e,s,o),e.memoizedState=n.state,i&&d6(e,r,!0),e.child}function _E(t){var e=t.stateNode;e.pendingContext?l6(t,e.pendingContext,e.pendingContext!==e.context):e.context&&l6(t,e.context,!1),k3(t,e.containerInfo)}function S6(t,e,r,n,i){return Jl(),_3(i),e.flags|=256,cn(t,e,r,n),e.child}var u4={dehydrated:null,treeContext:null,retryLane:0};function h4(t){return{baseLanes:t,cachePool:null,transitions:null}}function bE(t,e,r){var n=e.pendingProps,i=Nt.current,o=!1,a=(e.flags&128)!==0,s;if((s=a)||(s=t!==null&&t.memoizedState===null?!1:(i&2)!==0),s?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),wt(Nt,i&1),t===null)return i4(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=n.children,t=n.fallback,o?(n=e.mode,o=e.child,a={mode:"hidden",children:a},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=E0(a,n,0,null),t=nc(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=h4(r),e.memoizedState=u4,t):Z3(e,a));if(i=t.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return oM(t,e,a,n,s,i,r);if(o){o=n.fallback,a=e.mode,i=t.child,s=i.sibling;var c={mode:"hidden",children:n.children};return!(a&1)&&e.child!==i?(n=e.child,n.childLanes=0,n.pendingProps=c,e.deletions=null):(n=Qa(i,c),n.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Qa(s,o):(o=nc(o,a,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,a=t.child.memoizedState,a=a===null?h4(r):{baseLanes:a.baseLanes|r,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=t.childLanes&~r,e.memoizedState=u4,n}return o=t.child,t=o.sibling,n=Qa(o,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function Z3(t,e){return e=E0({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function sf(t,e,r,n){return n!==null&&_3(n),ed(e,t.child,null,r),t=Z3(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function oM(t,e,r,n,i,o,a){if(r)return e.flags&256?(e.flags&=-257,n=Jm(Error(X(422))),sf(t,e,a,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,i=e.mode,n=E0({mode:"visible",children:n.children},i,0,null),o=nc(o,i,a,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,e.mode&1&&ed(e,t.child,null,a),e.child.memoizedState=h4(a),e.memoizedState=u4,o);if(!(e.mode&1))return sf(t,e,a,null);if(i.data==="$!"){if(n=i.nextSibling&&i.nextSibling.dataset,n)var s=n.dgst;return n=s,o=Error(X(419)),n=Jm(o,n,void 0),sf(t,e,a,n)}if(s=(a&t.childLanes)!==0,Mn||s){if(n=Ir,n!==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&(n.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,ca(t,i),Ui(n,t,i,-1))}return D3(),n=Jm(Error(X(421))),sf(t,e,a,n)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=yM.bind(null,t),i._reactRetry=e,null):(t=o.treeContext,qn=Wa(i.nextSibling),Gn=e,Rt=!0,Di=null,t!==null&&(ui[hi++]=Ko,ui[hi++]=Yo,ui[hi++]=pc,Ko=t.id,Yo=t.overflow,pc=e),e=Z3(e,n.children),e.flags|=4096,e)}function A6(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),o4(t.return,e,r)}function ev(t,e,r,n,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=i)}function wE(t,e,r){var n=e.pendingProps,i=n.revealOrder,o=n.tail;if(cn(t,e,n.children,r),n=Nt.current,n&2)n=n&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&&A6(t,r,e);else if(t.tag===19)A6(t,r,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}n&=1}if(wt(Nt,n),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(r=e.child,i=null;r!==null;)t=r.alternate,t!==null&&l2(t)===null&&(i=r),r=r.sibling;r=i,r===null?(i=e.child,e.child=null):(i=r.sibling,r.sibling=null),ev(e,!1,i,r,o);break;case"backwards":for(r=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&l2(t)===null){e.child=i;break}t=i.sibling,i.sibling=r,r=i,i=t}ev(e,!0,r,null,o);break;case"together":ev(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ip(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function la(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),vc|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(X(153));if(e.child!==null){for(t=e.child,r=Qa(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=Qa(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function aM(t,e,r){switch(e.tag){case 3:_E(e),Jl();break;case 5:GC(e);break;case 1:Hn(e.type)&&n2(e);break;case 4:k3(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,i=e.memoizedProps.value;wt(a2,n._currentValue),n._currentValue=i;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(wt(Nt,Nt.current&1),e.flags|=128,null):r&e.child.childLanes?bE(t,e,r):(wt(Nt,Nt.current&1),t=la(t,e,r),t!==null?t.sibling:null);wt(Nt,Nt.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return wE(t,e,r);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),wt(Nt,Nt.current),n)break;return null;case 22:case 23:return e.lanes=0,gE(t,e,r)}return la(t,e,r)}var xE,f4,CE,EE;xE=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};f4=function(){};CE=function(t,e,r,n){var i=t.memoizedProps;if(i!==n){t=e.stateNode,Us(bo.current);var o=null;switch(r){case"input":i=$g(t,i),n=$g(t,n),o=[];break;case"select":i=Ft({},i,{value:void 0}),n=Ft({},n,{value:void 0}),o=[];break;case"textarea":i=Ng(t,i),n=Ng(t,n),o=[];break;default:typeof i.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=t2)}Vg(r,n);var a;r=null;for(l in i)if(!n.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(r||(r={}),r[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(yh.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in n){var c=n[l];if(s=i!=null?i[l]:void 0,n.hasOwnProperty(l)&&c!==s&&(c!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(r||(r={}),r[a]="");for(a in c)c.hasOwnProperty(a)&&s[a]!==c[a]&&(r||(r={}),r[a]=c[a])}else r||(o||(o=[]),o.push(l,r)),r=c;else l==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(o=o||[]).push(l,c)):l==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(l,""+c):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(yh.hasOwnProperty(l)?(c!=null&&l==="onScroll"&&Ct("scroll",t),o||s===c||(o=[])):(o=o||[]).push(l,c))}r&&(o=o||[]).push("style",r);var l=o;(e.updateQueue=l)&&(e.flags|=4)}};EE=function(t,e,r,n){r!==n&&(e.flags|=4)};function Kd(t,e){if(!Rt)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function qr(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags&14680064,n|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)r|=i.lanes|i.childLanes,n|=i.subtreeFlags,n|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function sM(t,e,r){var n=e.pendingProps;switch(y3(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qr(e),null;case 1:return Hn(e.type)&&r2(),qr(e),null;case 3:return n=e.stateNode,td(),It(Zn),It(nn),A3(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(of(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Di!==null&&(w4(Di),Di=null))),f4(t,e),qr(e),null;case 5:S3(e);var i=Us(Ph.current);if(r=e.type,t!==null&&e.stateNode!=null)CE(t,e,r,n,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(X(166));return qr(e),null}if(t=Us(bo.current),of(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[mo]=e,n[Ih]=o,t=(e.mode&1)!==0,r){case"dialog":Ct("cancel",n),Ct("close",n);break;case"iframe":case"object":case"embed":Ct("load",n);break;case"video":case"audio":for(i=0;i<_u.length;i++)Ct(_u[i],n);break;case"source":Ct("error",n);break;case"img":case"image":case"link":Ct("error",n),Ct("load",n);break;case"details":Ct("toggle",n);break;case"input":L_(n,o),Ct("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},Ct("invalid",n);break;case"textarea":N_(n,o),Ct("invalid",n)}Vg(r,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?n.textContent!==s&&(o.suppressHydrationWarning!==!0&&nf(n.textContent,s,t),i=["children",s]):typeof s=="number"&&n.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&nf(n.textContent,s,t),i=["children",""+s]):yh.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Ct("scroll",n)}switch(r){case"input":K1(n),O_(n,o,!0);break;case"textarea":K1(n),D_(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=t2)}n=i,e.updateQueue=n,n!==null&&(e.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Qx(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=a.createElement(r,{is:n.is}):(t=a.createElement(r),r==="select"&&(a=t,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):t=a.createElementNS(t,r),t[mo]=e,t[Ih]=n,xE(t,e,!1,!1),e.stateNode=t;e:{switch(a=Fg(r,n),r){case"dialog":Ct("cancel",t),Ct("close",t),i=n;break;case"iframe":case"object":case"embed":Ct("load",t),i=n;break;case"video":case"audio":for(i=0;i<_u.length;i++)Ct(_u[i],t);i=n;break;case"source":Ct("error",t),i=n;break;case"img":case"image":case"link":Ct("error",t),Ct("load",t),i=n;break;case"details":Ct("toggle",t),i=n;break;case"input":L_(t,n),i=$g(t,n),Ct("invalid",t);break;case"option":i=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},i=Ft({},n,{value:void 0}),Ct("invalid",t);break;case"textarea":N_(t,n),i=Ng(t,n),Ct("invalid",t);break;default:i=n}Vg(r,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var c=s[o];o==="style"?eC(t,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Xx(t,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&_h(t,c):typeof c=="number"&&_h(t,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(yh.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Ct("scroll",t):c!=null&&n3(t,o,c,a))}switch(r){case"input":K1(t),O_(t,n,!1);break;case"textarea":K1(t),D_(t);break;case"option":n.value!=null&&t.setAttribute("value",""+rs(n.value));break;case"select":t.multiple=!!n.multiple,o=n.value,o!=null?Dl(t,!!n.multiple,o,!1):n.defaultValue!=null&&Dl(t,!!n.multiple,n.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=t2)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return qr(e),null;case 6:if(t&&e.stateNode!=null)EE(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(X(166));if(r=Us(Ph.current),Us(bo.current),of(e)){if(n=e.stateNode,r=e.memoizedProps,n[mo]=e,(o=n.nodeValue!==r)&&(t=Gn,t!==null))switch(t.tag){case 3:nf(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&nf(n.nodeValue,r,(t.mode&1)!==0)}o&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[mo]=e,e.stateNode=n}return qr(e),null;case 13:if(It(Nt),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Rt&&qn!==null&&e.mode&1&&!(e.flags&128))FC(),Jl(),e.flags|=98560,o=!1;else if(o=of(e),n!==null&&n.dehydrated!==null){if(t===null){if(!o)throw Error(X(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(X(317));o[mo]=e}else Jl(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;qr(e),o=!1}else Di!==null&&(w4(Di),Di=null),o=!0;if(!o)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Nt.current&1?_r===0&&(_r=3):D3())),e.updateQueue!==null&&(e.flags|=4),qr(e),null);case 4:return td(),f4(t,e),t===null&&Sh(e.stateNode.containerInfo),qr(e),null;case 10:return x3(e.type._context),qr(e),null;case 17:return Hn(e.type)&&r2(),qr(e),null;case 19:if(It(Nt),o=e.memoizedState,o===null)return qr(e),null;if(n=(e.flags&128)!==0,a=o.rendering,a===null)if(n)Kd(o,!1);else{if(_r!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=l2(t),a!==null){for(e.flags|=128,Kd(o,!1),n=a.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)o=r,t=n,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,t=a.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return wt(Nt,Nt.current&1|2),e.child}t=t.sibling}o.tail!==null&&rr()>nd&&(e.flags|=128,n=!0,Kd(o,!1),e.lanes=4194304)}else{if(!n)if(t=l2(a),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Kd(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Rt)return qr(e),null}else 2*rr()-o.renderingStartTime>nd&&r!==1073741824&&(e.flags|=128,n=!0,Kd(o,!1),e.lanes=4194304);o.isBackwards?(a.sibling=e.child,e.child=a):(r=o.last,r!==null?r.sibling=a:e.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=rr(),e.sibling=null,r=Nt.current,wt(Nt,n?r&1|2:r&1),e):(qr(e),null);case 22:case 23:return N3(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?zn&1073741824&&(qr(e),e.subtreeFlags&6&&(e.flags|=8192)):qr(e),null;case 24:return null;case 25:return null}throw Error(X(156,e.tag))}function cM(t,e){switch(y3(e),e.tag){case 1:return Hn(e.type)&&r2(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return td(),It(Zn),It(nn),A3(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return S3(e),null;case 13:if(It(Nt),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(X(340));Jl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return It(Nt),null;case 4:return td(),null;case 10:return x3(e.type._context),null;case 22:case 23:return N3(),null;case 24:return null;default:return null}}var cf=!1,Yr=!1,lM=typeof WeakSet=="function"?WeakSet:Set,le=null;function Al(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Wt(t,e,n)}else r.current=null}function p4(t,e,r){try{r()}catch(n){Wt(t,e,n)}}var I6=!1;function dM(t,e){if(Qg=Xp,t=IC(),v3(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var i=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var a=0,s=-1,c=-1,l=0,d=0,u=t,h=null;t:for(;;){for(var f;u!==r||i!==0&&u.nodeType!==3||(s=a+i),u!==o||n!==0&&u.nodeType!==3||(c=a+n),u.nodeType===3&&(a+=u.nodeValue.length),(f=u.firstChild)!==null;)h=u,u=f;for(;;){if(u===t)break t;if(h===r&&++l===i&&(s=a),h===o&&++d===n&&(c=a),(f=u.nextSibling)!==null)break;u=h,h=u.parentNode}u=f}r=s===-1||c===-1?null:{start:s,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Xg={focusedElem:t,selectionRange:r},Xp=!1,le=e;le!==null;)if(e=le,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,le=t;else for(;le!==null;){e=le;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var m=p.memoizedProps,w=p.memoizedState,g=e.stateNode,v=g.getSnapshotBeforeUpdate(e.elementType===e.type?m:Li(e.type,m),w);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(X(163))}}catch(E){Wt(e,e.return,E)}if(t=e.sibling,t!==null){t.return=e.return,le=t;break}le=e.return}return p=I6,I6=!1,p}function Ku(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var i=n=n.next;do{if((i.tag&t)===t){var o=i.destroy;i.destroy=void 0,o!==void 0&&p4(e,r,o)}i=i.next}while(i!==n)}}function x0(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function m4(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function kE(t){var e=t.alternate;e!==null&&(t.alternate=null,kE(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[mo],delete e[Ih],delete e[t4],delete e[qR],delete e[WR])),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 SE(t){return t.tag===5||t.tag===3||t.tag===4}function T6(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||SE(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 v4(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=t2));else if(n!==4&&(t=t.child,t!==null))for(v4(t,e,r),t=t.sibling;t!==null;)v4(t,e,r),t=t.sibling}function g4(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(g4(t,e,r),t=t.sibling;t!==null;)g4(t,e,r),t=t.sibling}var Zr=null,Oi=!1;function _a(t,e,r){for(r=r.child;r!==null;)AE(t,e,r),r=r.sibling}function AE(t,e,r){if(_o&&typeof _o.onCommitFiberUnmount=="function")try{_o.onCommitFiberUnmount(p0,r)}catch{}switch(r.tag){case 5:Yr||Al(r,e);case 6:var n=Zr,i=Oi;Zr=null,_a(t,e,r),Zr=n,Oi=i,Zr!==null&&(Oi?(t=Zr,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Zr.removeChild(r.stateNode));break;case 18:Zr!==null&&(Oi?(t=Zr,r=r.stateNode,t.nodeType===8?Wm(t.parentNode,r):t.nodeType===1&&Wm(t,r),Ch(t)):Wm(Zr,r.stateNode));break;case 4:n=Zr,i=Oi,Zr=r.stateNode.containerInfo,Oi=!0,_a(t,e,r),Zr=n,Oi=i;break;case 0:case 11:case 14:case 15:if(!Yr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){i=n=n.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&p4(r,e,a),i=i.next}while(i!==n)}_a(t,e,r);break;case 1:if(!Yr&&(Al(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Wt(r,e,s)}_a(t,e,r);break;case 21:_a(t,e,r);break;case 22:r.mode&1?(Yr=(n=Yr)||r.memoizedState!==null,_a(t,e,r),Yr=n):_a(t,e,r);break;default:_a(t,e,r)}}function P6(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new lM),e.forEach(function(n){var i=_M.bind(null,t,n);r.has(n)||(r.add(n),n.then(i,i))})}}function Ii(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var i=r[n];try{var o=t,a=e,s=a;e:for(;s!==null;){switch(s.tag){case 5:Zr=s.stateNode,Oi=!1;break e;case 3:Zr=s.stateNode.containerInfo,Oi=!0;break e;case 4:Zr=s.stateNode.containerInfo,Oi=!0;break e}s=s.return}if(Zr===null)throw Error(X(160));AE(o,a,i),Zr=null,Oi=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(l){Wt(i,e,l)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)IE(e,t),e=e.sibling}function IE(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ii(e,t),to(t),n&4){try{Ku(3,t,t.return),x0(3,t)}catch(m){Wt(t,t.return,m)}try{Ku(5,t,t.return)}catch(m){Wt(t,t.return,m)}}break;case 1:Ii(e,t),to(t),n&512&&r!==null&&Al(r,r.return);break;case 5:if(Ii(e,t),to(t),n&512&&r!==null&&Al(r,r.return),t.flags&32){var i=t.stateNode;try{_h(i,"")}catch(m){Wt(t,t.return,m)}}if(n&4&&(i=t.stateNode,i!=null)){var o=t.memoizedProps,a=r!==null?r.memoizedProps:o,s=t.type,c=t.updateQueue;if(t.updateQueue=null,c!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&Kx(i,o),Fg(s,a);var l=Fg(s,o);for(a=0;a<c.length;a+=2){var d=c[a],u=c[a+1];d==="style"?eC(i,u):d==="dangerouslySetInnerHTML"?Xx(i,u):d==="children"?_h(i,u):n3(i,d,u,l)}switch(s){case"input":Lg(i,o);break;case"textarea":Yx(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var f=o.value;f!=null?Dl(i,!!o.multiple,f,!1):h!==!!o.multiple&&(o.defaultValue!=null?Dl(i,!!o.multiple,o.defaultValue,!0):Dl(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ih]=o}catch(m){Wt(t,t.return,m)}}break;case 6:if(Ii(e,t),to(t),n&4){if(t.stateNode===null)throw Error(X(162));i=t.stateNode,o=t.memoizedProps;try{i.nodeValue=o}catch(m){Wt(t,t.return,m)}}break;case 3:if(Ii(e,t),to(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ch(e.containerInfo)}catch(m){Wt(t,t.return,m)}break;case 4:Ii(e,t),to(t);break;case 13:Ii(e,t),to(t),i=t.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(L3=rr())),n&4&&P6(t);break;case 22:if(d=r!==null&&r.memoizedState!==null,t.mode&1?(Yr=(l=Yr)||d,Ii(e,t),Yr=l):Ii(e,t),to(t),n&8192){if(l=t.memoizedState!==null,(t.stateNode.isHidden=l)&&!d&&t.mode&1)for(le=t,d=t.child;d!==null;){for(u=le=d;le!==null;){switch(h=le,f=h.child,h.tag){case 0:case 11:case 14:case 15:Ku(4,h,h.return);break;case 1:Al(h,h.return);var p=h.stateNode;if(typeof p.componentWillUnmount=="function"){n=h,r=h.return;try{e=n,p.props=e.memoizedProps,p.state=e.memoizedState,p.componentWillUnmount()}catch(m){Wt(n,r,m)}}break;case 5:Al(h,h.return);break;case 22:if(h.memoizedState!==null){M6(u);continue}}f!==null?(f.return=h,le=f):M6(u)}d=d.sibling}e:for(d=null,u=t;;){if(u.tag===5){if(d===null){d=u;try{i=u.stateNode,l?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=u.stateNode,c=u.memoizedProps.style,a=c!=null&&c.hasOwnProperty("display")?c.display:null,s.style.display=Jx("display",a))}catch(m){Wt(t,t.return,m)}}}else if(u.tag===6){if(d===null)try{u.stateNode.nodeValue=l?"":u.memoizedProps}catch(m){Wt(t,t.return,m)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===t)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;d===u&&(d=null),u=u.return}d===u&&(d=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:Ii(e,t),to(t),n&4&&P6(t);break;case 21:break;default:Ii(e,t),to(t)}}function to(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(SE(r)){var n=r;break e}r=r.return}throw Error(X(160))}switch(n.tag){case 5:var i=n.stateNode;n.flags&32&&(_h(i,""),n.flags&=-33);var o=T6(t);g4(t,o,i);break;case 3:case 4:var a=n.stateNode.containerInfo,s=T6(t);v4(t,s,a);break;default:throw Error(X(161))}}catch(c){Wt(t,t.return,c)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function uM(t,e,r){le=t,TE(t)}function TE(t,e,r){for(var n=(t.mode&1)!==0;le!==null;){var i=le,o=i.child;if(i.tag===22&&n){var a=i.memoizedState!==null||cf;if(!a){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Yr;s=cf;var l=Yr;if(cf=a,(Yr=c)&&!l)for(le=i;le!==null;)a=le,c=a.child,a.tag===22&&a.memoizedState!==null?Z6(i):c!==null?(c.return=a,le=c):Z6(i);for(;o!==null;)le=o,TE(o),o=o.sibling;le=i,cf=s,Yr=l}R6(t)}else i.subtreeFlags&8772&&o!==null?(o.return=i,le=o):R6(t)}}function R6(t){for(;le!==null;){var e=le;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Yr||x0(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Yr)if(r===null)n.componentDidMount();else{var i=e.elementType===e.type?r.memoizedProps:Li(e.type,r.memoizedProps);n.componentDidUpdate(i,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&p6(e,o,n);break;case 3:var a=e.updateQueue;if(a!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}p6(e,a,r)}break;case 5:var s=e.stateNode;if(r===null&&e.flags&4){r=s;var c=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var l=e.alternate;if(l!==null){var d=l.memoizedState;if(d!==null){var u=d.dehydrated;u!==null&&Ch(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(X(163))}Yr||e.flags&512&&m4(e)}catch(h){Wt(e,e.return,h)}}if(e===t){le=null;break}if(r=e.sibling,r!==null){r.return=e.return,le=r;break}le=e.return}}function M6(t){for(;le!==null;){var e=le;if(e===t){le=null;break}var r=e.sibling;if(r!==null){r.return=e.return,le=r;break}le=e.return}}function Z6(t){for(;le!==null;){var e=le;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{x0(4,e)}catch(c){Wt(e,r,c)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var i=e.return;try{n.componentDidMount()}catch(c){Wt(e,i,c)}}var o=e.return;try{m4(e)}catch(c){Wt(e,o,c)}break;case 5:var a=e.return;try{m4(e)}catch(c){Wt(e,a,c)}}}catch(c){Wt(e,e.return,c)}if(e===t){le=null;break}var s=e.sibling;if(s!==null){s.return=e.return,le=s;break}le=e.return}}var hM=Math.ceil,h2=ua.ReactCurrentDispatcher,H3=ua.ReactCurrentOwner,vi=ua.ReactCurrentBatchConfig,Ge=0,Ir=null,dr=null,Nr=0,zn=0,Il=hs(0),_r=0,Hh=null,vc=0,C0=0,$3=0,Yu=null,Rn=null,L3=0,nd=1/0,Oo=null,f2=!1,y4=null,Ka=null,lf=!1,za=null,p2=0,Qu=0,_4=null,op=-1,ap=0;function pn(){return Ge&6?rr():op!==-1?op:op=rr()}function Ya(t){return t.mode&1?Ge&2&&Nr!==0?Nr&-Nr:KR.transition!==null?(ap===0&&(ap=hC()),ap):(t=ct,t!==0||(t=window.event,t=t===void 0?16:_C(t.type)),t):1}function Ui(t,e,r,n){if(50<Qu)throw Qu=0,_4=null,Error(X(185));i1(t,r,n),(!(Ge&2)||t!==Ir)&&(t===Ir&&(!(Ge&2)&&(C0|=r),_r===4&&Na(t,Nr)),$n(t,n),r===1&&Ge===0&&!(e.mode&1)&&(nd=rr()+500,_0&&fs()))}function $n(t,e){var r=t.callbackNode;KP(t,e);var n=Qp(t,t===Ir?Nr:0);if(n===0)r!==null&&z_(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&z_(r),e===1)t.tag===0?GR(H6.bind(null,t)):NC(H6.bind(null,t)),UR(function(){!(Ge&6)&&fs()}),r=null;else{switch(fC(n)){case 1:r=c3;break;case 4:r=dC;break;case 16:r=Yp;break;case 536870912:r=uC;break;default:r=Yp}r=OE(r,PE.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function PE(t,e){if(op=-1,ap=0,Ge&6)throw Error(X(327));var r=t.callbackNode;if(Ul()&&t.callbackNode!==r)return null;var n=Qp(t,t===Ir?Nr:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=m2(t,n);else{e=n;var i=Ge;Ge|=2;var o=ME();(Ir!==t||Nr!==e)&&(Oo=null,nd=rr()+500,rc(t,e));do try{mM();break}catch(s){RE(t,s)}while(!0);w3(),h2.current=o,Ge=i,dr!==null?e=0:(Ir=null,Nr=0,e=_r)}if(e!==0){if(e===2&&(i=qg(t),i!==0&&(n=i,e=b4(t,i))),e===1)throw r=Hh,rc(t,0),Na(t,n),$n(t,rr()),r;if(e===6)Na(t,n);else{if(i=t.current.alternate,!(n&30)&&!fM(i)&&(e=m2(t,n),e===2&&(o=qg(t),o!==0&&(n=o,e=b4(t,o))),e===1))throw r=Hh,rc(t,0),Na(t,n),$n(t,rr()),r;switch(t.finishedWork=i,t.finishedLanes=n,e){case 0:case 1:throw Error(X(345));case 2:Ts(t,Rn,Oo);break;case 3:if(Na(t,n),(n&130023424)===n&&(e=L3+500-rr(),10<e)){if(Qp(t,0)!==0)break;if(i=t.suspendedLanes,(i&n)!==n){pn(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=e4(Ts.bind(null,t,Rn,Oo),e);break}Ts(t,Rn,Oo);break;case 4:if(Na(t,n),(n&4194240)===n)break;for(e=t.eventTimes,i=-1;0<n;){var a=31-ji(n);o=1<<a,a=e[a],a>i&&(i=a),n&=~o}if(n=i,n=rr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*hM(n/1960))-n,10<n){t.timeoutHandle=e4(Ts.bind(null,t,Rn,Oo),n);break}Ts(t,Rn,Oo);break;case 5:Ts(t,Rn,Oo);break;default:throw Error(X(329))}}}return $n(t,rr()),t.callbackNode===r?PE.bind(null,t):null}function b4(t,e){var r=Yu;return t.current.memoizedState.isDehydrated&&(rc(t,e).flags|=256),t=m2(t,e),t!==2&&(e=Rn,Rn=r,e!==null&&w4(e)),t}function w4(t){Rn===null?Rn=t:Rn.push.apply(Rn,t)}function fM(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var i=r[n],o=i.getSnapshot;i=i.value;try{if(!Wi(o(),i))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Na(t,e){for(e&=~$3,e&=~C0,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-ji(e),n=1<<r;t[r]=-1,e&=~n}}function H6(t){if(Ge&6)throw Error(X(327));Ul();var e=Qp(t,0);if(!(e&1))return $n(t,rr()),null;var r=m2(t,e);if(t.tag!==0&&r===2){var n=qg(t);n!==0&&(e=n,r=b4(t,n))}if(r===1)throw r=Hh,rc(t,0),Na(t,e),$n(t,rr()),r;if(r===6)throw Error(X(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Ts(t,Rn,Oo),$n(t,rr()),null}function O3(t,e){var r=Ge;Ge|=1;try{return t(e)}finally{Ge=r,Ge===0&&(nd=rr()+500,_0&&fs())}}function gc(t){za!==null&&za.tag===0&&!(Ge&6)&&Ul();var e=Ge;Ge|=1;var r=vi.transition,n=ct;try{if(vi.transition=null,ct=1,t)return t()}finally{ct=n,vi.transition=r,Ge=e,!(Ge&6)&&fs()}}function N3(){zn=Il.current,It(Il)}function rc(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,jR(r)),dr!==null)for(r=dr.return;r!==null;){var n=r;switch(y3(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&r2();break;case 3:td(),It(Zn),It(nn),A3();break;case 5:S3(n);break;case 4:td();break;case 13:It(Nt);break;case 19:It(Nt);break;case 10:x3(n.type._context);break;case 22:case 23:N3()}r=r.return}if(Ir=t,dr=t=Qa(t.current,null),Nr=zn=e,_r=0,Hh=null,$3=C0=vc=0,Rn=Yu=null,js!==null){for(e=0;e<js.length;e++)if(r=js[e],n=r.interleaved,n!==null){r.interleaved=null;var i=n.next,o=r.pending;if(o!==null){var a=o.next;o.next=i,n.next=a}r.pending=n}js=null}return t}function RE(t,e){do{var r=dr;try{if(w3(),rp.current=u2,d2){for(var n=Vt.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}d2=!1}if(mc=0,kr=mr=Vt=null,Gu=!1,Rh=0,H3.current=null,r===null||r.return===null){_r=1,Hh=e,dr=null;break}e:{var o=t,a=r.return,s=r,c=e;if(e=Nr,s.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var l=c,d=s,u=d.tag;if(!(d.mode&1)&&(u===0||u===11||u===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=w6(a);if(f!==null){f.flags&=-257,x6(f,a,s,o,e),f.mode&1&&b6(o,l,e),e=f,c=l;var p=e.updateQueue;if(p===null){var m=new Set;m.add(c),e.updateQueue=m}else p.add(c);break e}else{if(!(e&1)){b6(o,l,e),D3();break e}c=Error(X(426))}}else if(Rt&&s.mode&1){var w=w6(a);if(w!==null){!(w.flags&65536)&&(w.flags|=256),x6(w,a,s,o,e),_3(rd(c,s));break e}}o=c=rd(c,s),_r!==4&&(_r=2),Yu===null?Yu=[o]:Yu.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var g=pE(o,c,e);f6(o,g);break e;case 1:s=c;var v=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ka===null||!Ka.has(b)))){o.flags|=65536,e&=-e,o.lanes|=e;var E=mE(o,s,e);f6(o,E);break e}}o=o.return}while(o!==null)}HE(r)}catch(k){e=k,dr===r&&r!==null&&(dr=r=r.return);continue}break}while(!0)}function ME(){var t=h2.current;return h2.current=u2,t===null?u2:t}function D3(){(_r===0||_r===3||_r===2)&&(_r=4),Ir===null||!(vc&268435455)&&!(C0&268435455)||Na(Ir,Nr)}function m2(t,e){var r=Ge;Ge|=2;var n=ME();(Ir!==t||Nr!==e)&&(Oo=null,rc(t,e));do try{pM();break}catch(i){RE(t,i)}while(!0);if(w3(),Ge=r,h2.current=n,dr!==null)throw Error(X(261));return Ir=null,Nr=0,_r}function pM(){for(;dr!==null;)ZE(dr)}function mM(){for(;dr!==null&&!VP();)ZE(dr)}function ZE(t){var e=LE(t.alternate,t,zn);t.memoizedProps=t.pendingProps,e===null?HE(t):dr=e,H3.current=null}function HE(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=cM(r,e),r!==null){r.flags&=32767,dr=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{_r=6,dr=null;return}}else if(r=sM(r,e,zn),r!==null){dr=r;return}if(e=e.sibling,e!==null){dr=e;return}dr=e=t}while(e!==null);_r===0&&(_r=5)}function Ts(t,e,r){var n=ct,i=vi.transition;try{vi.transition=null,ct=1,vM(t,e,r,n)}finally{vi.transition=i,ct=n}return null}function vM(t,e,r,n){do Ul();while(za!==null);if(Ge&6)throw Error(X(327));r=t.finishedWork;var i=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(X(177));t.callbackNode=null,t.callbackPriority=0;var o=r.lanes|r.childLanes;if(YP(t,o),t===Ir&&(dr=Ir=null,Nr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||lf||(lf=!0,OE(Yp,function(){return Ul(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=vi.transition,vi.transition=null;var a=ct;ct=1;var s=Ge;Ge|=4,H3.current=null,dM(t,r),IE(r,t),LR(Xg),Xp=!!Qg,Xg=Qg=null,t.current=r,uM(r),FP(),Ge=s,ct=a,vi.transition=o}else t.current=r;if(lf&&(lf=!1,za=t,p2=i),o=t.pendingLanes,o===0&&(Ka=null),UP(r.stateNode),$n(t,rr()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)i=e[r],n(i.value,{componentStack:i.stack,digest:i.digest});if(f2)throw f2=!1,t=y4,y4=null,t;return p2&1&&t.tag!==0&&Ul(),o=t.pendingLanes,o&1?t===_4?Qu++:(Qu=0,_4=t):Qu=0,fs(),null}function Ul(){if(za!==null){var t=fC(p2),e=vi.transition,r=ct;try{if(vi.transition=null,ct=16>t?16:t,za===null)var n=!1;else{if(t=za,za=null,p2=0,Ge&6)throw Error(X(331));var i=Ge;for(Ge|=4,le=t.current;le!==null;){var o=le,a=o.child;if(le.flags&16){var s=o.deletions;if(s!==null){for(var c=0;c<s.length;c++){var l=s[c];for(le=l;le!==null;){var d=le;switch(d.tag){case 0:case 11:case 15:Ku(8,d,o)}var u=d.child;if(u!==null)u.return=d,le=u;else for(;le!==null;){d=le;var h=d.sibling,f=d.return;if(kE(d),d===l){le=null;break}if(h!==null){h.return=f,le=h;break}le=f}}}var p=o.alternate;if(p!==null){var m=p.child;if(m!==null){p.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}le=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,le=a;else e:for(;le!==null;){if(o=le,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ku(9,o,o.return)}var g=o.sibling;if(g!==null){g.return=o.return,le=g;break e}le=o.return}}var v=t.current;for(le=v;le!==null;){a=le;var b=a.child;if(a.subtreeFlags&2064&&b!==null)b.return=a,le=b;else e:for(a=v;le!==null;){if(s=le,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:x0(9,s)}}catch(k){Wt(s,s.return,k)}if(s===a){le=null;break e}var E=s.sibling;if(E!==null){E.return=s.return,le=E;break e}le=s.return}}if(Ge=i,fs(),_o&&typeof _o.onPostCommitFiberRoot=="function")try{_o.onPostCommitFiberRoot(p0,t)}catch{}n=!0}return n}finally{ct=r,vi.transition=e}}return!1}function $6(t,e,r){e=rd(r,e),e=pE(t,e,1),t=Ga(t,e,1),e=pn(),t!==null&&(i1(t,1,e),$n(t,e))}function Wt(t,e,r){if(t.tag===3)$6(t,t,r);else for(;e!==null;){if(e.tag===3){$6(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Ka===null||!Ka.has(n))){t=rd(r,t),t=mE(e,t,1),e=Ga(e,t,1),t=pn(),e!==null&&(i1(e,1,t),$n(e,t));break}}e=e.return}}function gM(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=pn(),t.pingedLanes|=t.suspendedLanes&r,Ir===t&&(Nr&r)===r&&(_r===4||_r===3&&(Nr&130023424)===Nr&&500>rr()-L3?rc(t,0):$3|=r),$n(t,e)}function $E(t,e){e===0&&(t.mode&1?(e=X1,X1<<=1,!(X1&130023424)&&(X1=4194304)):e=1);var r=pn();t=ca(t,e),t!==null&&(i1(t,e,r),$n(t,r))}function yM(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),$E(t,r)}function _M(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,i=t.memoizedState;i!==null&&(r=i.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(X(314))}n!==null&&n.delete(e),$E(t,r)}var LE;LE=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Zn.current)Mn=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Mn=!1,aM(t,e,r);Mn=!!(t.flags&131072)}else Mn=!1,Rt&&e.flags&1048576&&DC(e,o2,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;ip(t,e),t=e.pendingProps;var i=Xl(e,nn.current);jl(e,r),i=T3(null,e,n,t,i,r);var o=P3();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,Hn(n)?(o=!0,n2(e)):o=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,E3(e),i.updater=b0,e.stateNode=i,i._reactInternals=e,s4(e,n,t,r),e=d4(null,e,n,!0,o,r)):(e.tag=0,Rt&&o&&g3(e),cn(null,e,i,r),e=e.child),e;case 16:n=e.elementType;e:{switch(ip(t,e),t=e.pendingProps,i=n._init,n=i(n._payload),e.type=n,i=e.tag=wM(n),t=Li(n,t),i){case 0:e=l4(null,e,n,t,r);break e;case 1:e=k6(null,e,n,t,r);break e;case 11:e=C6(null,e,n,t,r);break e;case 14:e=E6(null,e,n,Li(n.type,t),r);break e}throw Error(X(306,n,""))}return e;case 0:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Li(n,i),l4(t,e,n,i,r);case 1:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Li(n,i),k6(t,e,n,i,r);case 3:e:{if(_E(e),t===null)throw Error(X(387));n=e.pendingProps,o=e.memoizedState,i=o.element,jC(t,e),c2(e,n,null,r);var a=e.memoizedState;if(n=a.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){i=rd(Error(X(423)),e),e=S6(t,e,n,r,i);break e}else if(n!==i){i=rd(Error(X(424)),e),e=S6(t,e,n,r,i);break e}else for(qn=Wa(e.stateNode.containerInfo.firstChild),Gn=e,Rt=!0,Di=null,r=WC(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Jl(),n===i){e=la(t,e,r);break e}cn(t,e,n,r)}e=e.child}return e;case 5:return GC(e),t===null&&i4(e),n=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,a=i.children,Jg(n,i)?a=null:o!==null&&Jg(n,o)&&(e.flags|=32),yE(t,e),cn(t,e,a,r),e.child;case 6:return t===null&&i4(e),null;case 13:return bE(t,e,r);case 4:return k3(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=ed(e,null,n,r):cn(t,e,n,r),e.child;case 11:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Li(n,i),C6(t,e,n,i,r);case 7:return cn(t,e,e.pendingProps,r),e.child;case 8:return cn(t,e,e.pendingProps.children,r),e.child;case 12:return cn(t,e,e.pendingProps.children,r),e.child;case 10:e:{if(n=e.type._context,i=e.pendingProps,o=e.memoizedProps,a=i.value,wt(a2,n._currentValue),n._currentValue=a,o!==null)if(Wi(o.value,a)){if(o.children===i.children&&!Zn.current){e=la(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var c=s.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=ta(-1,r&-r),c.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var d=l.pending;d===null?c.next=c:(c.next=d.next,d.next=c),l.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),o4(o.return,r,e),s.lanes|=r;break}c=c.next}}else if(o.tag===10)a=o.type===e.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(X(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),o4(a,r,e),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===e){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}cn(t,e,i.children,r),e=e.child}return e;case 9:return i=e.type,n=e.pendingProps.children,jl(e,r),i=_i(i),n=n(i),e.flags|=1,cn(t,e,n,r),e.child;case 14:return n=e.type,i=Li(n,e.pendingProps),i=Li(n.type,i),E6(t,e,n,i,r);case 15:return vE(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,i=e.pendingProps,i=e.elementType===n?i:Li(n,i),ip(t,e),e.tag=1,Hn(n)?(t=!0,n2(e)):t=!1,jl(e,r),BC(e,n,i),s4(e,n,i,r),d4(null,e,n,!0,t,r);case 19:return wE(t,e,r);case 22:return gE(t,e,r)}throw Error(X(156,e.tag))};function OE(t,e){return lC(t,e)}function bM(t,e,r,n){this.tag=t,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pi(t,e,r,n){return new bM(t,e,r,n)}function V3(t){return t=t.prototype,!(!t||!t.isReactComponent)}function wM(t){if(typeof t=="function")return V3(t)?1:0;if(t!=null){if(t=t.$$typeof,t===o3)return 11;if(t===a3)return 14}return 2}function Qa(t,e){var r=t.alternate;return r===null?(r=pi(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function sp(t,e,r,n,i,o){var a=2;if(n=t,typeof t=="function")V3(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case yl:return nc(r.children,i,o,e);case i3:a=8,i|=8;break;case Rg:return t=pi(12,r,e,i|2),t.elementType=Rg,t.lanes=o,t;case Mg:return t=pi(13,r,e,i),t.elementType=Mg,t.lanes=o,t;case Zg:return t=pi(19,r,e,i),t.elementType=Zg,t.lanes=o,t;case qx:return E0(r,i,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Ux:a=10;break e;case Bx:a=9;break e;case o3:a=11;break e;case a3:a=14;break e;case Za:a=16,n=null;break e}throw Error(X(130,t==null?t:typeof t,""))}return e=pi(a,r,e,i),e.elementType=t,e.type=n,e.lanes=o,e}function nc(t,e,r,n){return t=pi(7,t,n,e),t.lanes=r,t}function E0(t,e,r,n){return t=pi(22,t,n,e),t.elementType=qx,t.lanes=r,t.stateNode={isHidden:!1},t}function tv(t,e,r){return t=pi(6,t,null,e),t.lanes=r,t}function rv(t,e,r){return e=pi(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function xM(t,e,r,n,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=Lm(0),this.expirationTimes=Lm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Lm(0),this.identifierPrefix=n,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function F3(t,e,r,n,i,o,a,s,c){return t=new xM(t,e,r,s,c),e===1?(e=1,o===!0&&(e|=8)):e=0,o=pi(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},E3(o),t}function CM(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gl,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function NE(t){if(!t)return ns;t=t._reactInternals;e:{if(Mc(t)!==t||t.tag!==1)throw Error(X(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Hn(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(X(171))}if(t.tag===1){var r=t.type;if(Hn(r))return OC(t,r,e)}return e}function DE(t,e,r,n,i,o,a,s,c){return t=F3(r,n,!0,t,i,o,a,s,c),t.context=NE(null),r=t.current,n=pn(),i=Ya(r),o=ta(n,i),o.callback=e??null,Ga(r,o,i),t.current.lanes=i,i1(t,i,n),$n(t,n),t}function k0(t,e,r,n){var i=e.current,o=pn(),a=Ya(i);return r=NE(r),e.context===null?e.context=r:e.pendingContext=r,e=ta(o,a),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=Ga(i,e,a),t!==null&&(Ui(t,i,a,o),tp(t,i,a)),a}function v2(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function L6(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function z3(t,e){L6(t,e),(t=t.alternate)&&L6(t,e)}function EM(){return null}var VE=typeof reportError=="function"?reportError:function(t){console.error(t)};function j3(t){this._internalRoot=t}S0.prototype.render=j3.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(X(409));k0(t,e,null,null)};S0.prototype.unmount=j3.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;gc(function(){k0(null,t,null,null)}),e[sa]=null}};function S0(t){this._internalRoot=t}S0.prototype.unstable_scheduleHydration=function(t){if(t){var e=vC();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Oa.length&&e!==0&&e<Oa[r].priority;r++);Oa.splice(r,0,t),r===0&&yC(t)}};function U3(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function A0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function O6(){}function kM(t,e,r,n,i){if(i){if(typeof n=="function"){var o=n;n=function(){var l=v2(a);o.call(l)}}var a=DE(e,n,t,0,null,!1,!1,"",O6);return t._reactRootContainer=a,t[sa]=a.current,Sh(t.nodeType===8?t.parentNode:t),gc(),a}for(;i=t.lastChild;)t.removeChild(i);if(typeof n=="function"){var s=n;n=function(){var l=v2(c);s.call(l)}}var c=F3(t,0,!1,null,null,!1,!1,"",O6);return t._reactRootContainer=c,t[sa]=c.current,Sh(t.nodeType===8?t.parentNode:t),gc(function(){k0(e,c,r,n)}),c}function I0(t,e,r,n,i){var o=r._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var c=v2(a);s.call(c)}}k0(e,a,t,i)}else a=kM(r,e,t,i,n);return v2(a)}pC=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=yu(e.pendingLanes);r!==0&&(l3(e,r|1),$n(e,rr()),!(Ge&6)&&(nd=rr()+500,fs()))}break;case 13:gc(function(){var n=ca(t,1);if(n!==null){var i=pn();Ui(n,t,1,i)}}),z3(t,1)}};d3=function(t){if(t.tag===13){var e=ca(t,134217728);if(e!==null){var r=pn();Ui(e,t,134217728,r)}z3(t,134217728)}};mC=function(t){if(t.tag===13){var e=Ya(t),r=ca(t,e);if(r!==null){var n=pn();Ui(r,t,e,n)}z3(t,e)}};vC=function(){return ct};gC=function(t,e){var r=ct;try{return ct=t,e()}finally{ct=r}};jg=function(t,e,r){switch(e){case"input":if(Lg(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var i=y0(n);if(!i)throw Error(X(90));Gx(n),Lg(n,i)}}}break;case"textarea":Yx(t,r);break;case"select":e=r.value,e!=null&&Dl(t,!!r.multiple,e,!1)}};nC=O3;iC=gc;var SM={usingClientEntryPoint:!1,Events:[a1,xl,y0,tC,rC,O3]},Yd={findFiberByHostInstance:zs,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},AM={bundleType:Yd.bundleType,version:Yd.version,rendererPackageName:Yd.rendererPackageName,rendererConfig:Yd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ua.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=sC(t),t===null?null:t.stateNode},findFiberByHostInstance:Yd.findFiberByHostInstance||EM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var df=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!df.isDisabled&&df.supportsFiber)try{p0=df.inject(AM),_o=df}catch{}}ti.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SM;ti.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!U3(e))throw Error(X(200));return CM(t,e,null,r)};ti.createRoot=function(t,e){if(!U3(t))throw Error(X(299));var r=!1,n="",i=VE;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=F3(t,1,!1,null,null,r,!1,n,i),t[sa]=e.current,Sh(t.nodeType===8?t.parentNode:t),new j3(e)};ti.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(X(188)):(t=Object.keys(t).join(","),Error(X(268,t)));return t=sC(e),t=t===null?null:t.stateNode,t};ti.flushSync=function(t){return gc(t)};ti.hydrate=function(t,e,r){if(!A0(e))throw Error(X(200));return I0(null,t,e,!0,r)};ti.hydrateRoot=function(t,e,r){if(!U3(t))throw Error(X(405));var n=r!=null&&r.hydratedSources||null,i=!1,o="",a=VE;if(r!=null&&(r.unstable_strictMode===!0&&(i=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(a=r.onRecoverableError)),e=DE(e,null,t,1,r??null,i,!1,o,a),t[sa]=e.current,Sh(t),n)for(t=0;t<n.length;t++)r=n[t],i=r._getVersion,i=i(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,i]:e.mutableSourceEagerHydrationData.push(r,i);return new S0(e)};ti.render=function(t,e,r){if(!A0(e))throw Error(X(200));return I0(null,t,e,!1,r)};ti.unmountComponentAtNode=function(t){if(!A0(t))throw Error(X(40));return t._reactRootContainer?(gc(function(){I0(null,null,t,!1,function(){t._reactRootContainer=null,t[sa]=null})}),!0):!1};ti.unstable_batchedUpdates=O3;ti.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!A0(r))throw Error(X(200));if(t==null||t._reactInternals===void 0)throw Error(X(38));return I0(t,e,r,!1,n)};ti.version="18.2.0-next-9e3b772b8-20220608";function FE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(FE)}catch(t){console.error(t)}}FE(),Dx.exports=ti;var Zc=Dx.exports;const IM=K5(Zc),TM=Ix({__proto__:null,default:IM},[Zc]);var N6=Zc;Tg.createRoot=N6.createRoot,Tg.hydrateRoot=N6.hydrateRoot;var x4={exports:{}};const PM="2.0.0",zE=256,RM=Number.MAX_SAFE_INTEGER||9007199254740991,MM=16,ZM=zE-6,HM=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var T0={MAX_LENGTH:zE,MAX_SAFE_COMPONENT_LENGTH:MM,MAX_SAFE_BUILD_LENGTH:ZM,MAX_SAFE_INTEGER:RM,RELEASE_TYPES:HM,SEMVER_SPEC_VERSION:PM,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},nv={};const $M=typeof process=="object"&&nv&&nv.NODE_DEBUG&&/\bsemver\b/i.test(nv.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};var P0=$M;(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:i}=T0,o=P0;e=t.exports={};const a=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.t={};let d=0;const u="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[u,n]],f=m=>{for(const[w,g]of h)m=m.split(`${w}*`).join(`${w}{0,${g}}`).split(`${w}+`).join(`${w}{1,${g}}`);return m},p=(m,w,g)=>{const v=f(w),b=d++;o(m,b,w),l[m]=b,c[b]=w,a[b]=new RegExp(w,g?"g":void 0),s[b]=new RegExp(v,g?"g":void 0)};p("NUMERICIDENTIFIER","0|[1-9]\\d*"),p("NUMERICIDENTIFIERLOOSE","\\d+"),p("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${u}*`),p("MAINVERSION",`(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})\\.(${c[l.NUMERICIDENTIFIER]})`),p("MAINVERSIONLOOSE",`(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})\\.(${c[l.NUMERICIDENTIFIERLOOSE]})`),p("PRERELEASEIDENTIFIER",`(?:${c[l.NUMERICIDENTIFIER]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASEIDENTIFIERLOOSE",`(?:${c[l.NUMERICIDENTIFIERLOOSE]}|${c[l.NONNUMERICIDENTIFIER]})`),p("PRERELEASE",`(?:-(${c[l.PRERELEASEIDENTIFIER]}(?:\\.${c[l.PRERELEASEIDENTIFIER]})*))`),p("PRERELEASELOOSE",`(?:-?(${c[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[l.PRERELEASEIDENTIFIERLOOSE]})*))`),p("BUILDIDENTIFIER",`${u}+`),p("BUILD",`(?:\\+(${c[l.BUILDIDENTIFIER]}(?:\\.${c[l.BUILDIDENTIFIER]})*))`),p("FULLPLAIN",`v?${c[l.MAINVERSION]}${c[l.PRERELEASE]}?${c[l.BUILD]}?`),p("FULL",`^${c[l.FULLPLAIN]}$`),p("LOOSEPLAIN",`[v=\\s]*${c[l.MAINVERSIONLOOSE]}${c[l.PRERELEASELOOSE]}?${c[l.BUILD]}?`),p("LOOSE",`^${c[l.LOOSEPLAIN]}$`),p("GTLT","((?:<|>)?=?)"),p("XRANGEIDENTIFIERLOOSE",`${c[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),p("XRANGEIDENTIFIER",`${c[l.NUMERICIDENTIFIER]}|x|X|\\*`),p("XRANGEPLAIN",`[v=\\s]*(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:\\.(${c[l.XRANGEIDENTIFIER]})(?:${c[l.PRERELEASE]})?${c[l.BUILD]}?)?)?`),p("XRANGEPLAINLOOSE",`[v=\\s]*(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[l.XRANGEIDENTIFIERLOOSE]})(?:${c[l.PRERELEASELOOSE]})?${c[l.BUILD]}?)?)?`),p("XRANGE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAIN]}$`),p("XRANGELOOSE",`^${c[l.GTLT]}\\s*${c[l.XRANGEPLAINLOOSE]}$`),p("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),p("COERCE",`${c[l.COERCEPLAIN]}(?:$|[^\\d])`),p("COERCEFULL",c[l.COERCEPLAIN]+`(?:${c[l.PRERELEASE]})?(?:${c[l.BUILD]})?(?:$|[^\\d])`),p("COERCERTL",c[l.COERCE],!0),p("COERCERTLFULL",c[l.COERCEFULL],!0),p("LONETILDE","(?:~>?)"),p("TILDETRIM",`(\\s*)${c[l.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",p("TILDE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAIN]}$`),p("TILDELOOSE",`^${c[l.LONETILDE]}${c[l.XRANGEPLAINLOOSE]}$`),p("LONECARET","(?:\\^)"),p("CARETTRIM",`(\\s*)${c[l.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",p("CARET",`^${c[l.LONECARET]}${c[l.XRANGEPLAIN]}$`),p("CARETLOOSE",`^${c[l.LONECARET]}${c[l.XRANGEPLAINLOOSE]}$`),p("COMPARATORLOOSE",`^${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]})$|^$`),p("COMPARATOR",`^${c[l.GTLT]}\\s*(${c[l.FULLPLAIN]})$|^$`),p("COMPARATORTRIM",`(\\s*)${c[l.GTLT]}\\s*(${c[l.LOOSEPLAIN]}|${c[l.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",p("HYPHENRANGE",`^\\s*(${c[l.XRANGEPLAIN]})\\s+-\\s+(${c[l.XRANGEPLAIN]})\\s*$`),p("HYPHENRANGELOOSE",`^\\s*(${c[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[l.XRANGEPLAINLOOSE]})\\s*$`),p("STAR","(<|>)?=?\\s*\\*"),p("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),p("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(x4,x4.exports);var c1=x4.exports;const LM=Object.freeze({loose:!0}),OM=Object.freeze({}),NM=t=>t?typeof t!="object"?LM:t:OM;var B3=NM;const D6=/^[0-9]+$/,jE=(t,e)=>{const r=D6.test(t),n=D6.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},DM=(t,e)=>jE(e,t);var UE={compareIdentifiers:jE,rcompareIdentifiers:DM};const uf=P0,{MAX_LENGTH:V6,MAX_SAFE_INTEGER:hf}=T0,{safeRe:F6,t:z6}=c1,VM=B3,{compareIdentifiers:jc}=UE;let FM=class no{constructor(e,r){if(r=VM(r),e instanceof no){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>V6)throw new TypeError(`version is longer than ${V6} characters`);uf("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=e.trim().match(r.loose?F6[z6.LOOSE]:F6[z6.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>hf||this.major<0)throw new TypeError("Invalid major version");if(this.minor>hf||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>hf||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const o=+i;if(o>=0&&o<hf)return o}return i}):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(uf("SemVer.compare",this.version,this.options,e),!(e instanceof no)){if(typeof e=="string"&&e===this.version)return 0;e=new no(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof no||(e=new no(e,this.options)),jc(this.major,e.major)||jc(this.minor,e.minor)||jc(this.patch,e.patch)}comparePre(e){if(e instanceof no||(e=new no(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let r=0;do{const n=this.prerelease[r],i=e.prerelease[r];if(uf("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return jc(n,i)}while(++r)}compareBuild(e){e instanceof no||(e=new no(e,this.options));let r=0;do{const n=this.build[r],i=e.build[r];if(uf("prerelease compare",r,n,i),n===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(n===void 0)return-1;if(n===i)continue;return jc(n,i)}while(++r)}inc(e,r,n){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(n)?1:0;if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let o=this.prerelease.length;for(;--o>=0;)typeof this.prerelease[o]=="number"&&(this.prerelease[o]++,o=-2);if(o===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(r){let o=[r,i];n===!1&&(o=[r]),jc(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=o):this.prerelease=o}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var _n=FM;const j6=_n,zM=(t,e,r=!1)=>{if(t instanceof j6)return t;try{return new j6(t,e)}catch(n){if(!r)return null;throw n}};var Cd=zM;const jM=Cd,UM=(t,e)=>{const r=jM(t,e);return r?r.version:null};var BM=UM;const qM=Cd,WM=(t,e)=>{const r=qM(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};var GM=WM;const U6=_n,KM=(t,e,r,n,i)=>{typeof r=="string"&&(i=n,n=r,r=void 0);try{return new U6(t instanceof U6?t.version:t,r).inc(e,n,i).version}catch{return null}};var YM=KM;const B6=Cd,QM=(t,e)=>{const r=B6(t,null,!0),n=B6(e,null,!0),i=r.compare(n);if(i===0)return null;const o=i>0,a=o?r:n,s=o?n:r,c=!!a.prerelease.length;if(!!s.prerelease.length&&!c)return!s.patch&&!s.minor?"major":a.patch?"patch":a.minor?"minor":"major";const d=c?"pre":"";return r.major!==n.major?d+"major":r.minor!==n.minor?d+"minor":r.patch!==n.patch?d+"patch":"prerelease"};var XM=QM;const JM=_n,eZ=(t,e)=>new JM(t,e).major;var tZ=eZ;const rZ=_n,nZ=(t,e)=>new rZ(t,e).minor;var iZ=nZ;const oZ=_n,aZ=(t,e)=>new oZ(t,e).patch;var sZ=aZ;const cZ=Cd,lZ=(t,e)=>{const r=cZ(t,e);return r&&r.prerelease.length?r.prerelease:null};var dZ=lZ;const q6=_n,uZ=(t,e,r)=>new q6(t,r).compare(new q6(e,r));var Ki=uZ;const hZ=Ki,fZ=(t,e,r)=>hZ(e,t,r);var pZ=fZ;const mZ=Ki,vZ=(t,e)=>mZ(t,e,!0);var gZ=vZ;const W6=_n,yZ=(t,e,r)=>{const n=new W6(t,r),i=new W6(e,r);return n.compare(i)||n.compareBuild(i)};var q3=yZ;const _Z=q3,bZ=(t,e)=>t.sort((r,n)=>_Z(r,n,e));var wZ=bZ;const xZ=q3,CZ=(t,e)=>t.sort((r,n)=>xZ(n,r,e));var EZ=CZ;const kZ=Ki,SZ=(t,e,r)=>kZ(t,e,r)>0;var R0=SZ;const AZ=Ki,IZ=(t,e,r)=>AZ(t,e,r)<0;var W3=IZ;const TZ=Ki,PZ=(t,e,r)=>TZ(t,e,r)===0;var BE=PZ;const RZ=Ki,MZ=(t,e,r)=>RZ(t,e,r)!==0;var qE=MZ;const ZZ=Ki,HZ=(t,e,r)=>ZZ(t,e,r)>=0;var G3=HZ;const $Z=Ki,LZ=(t,e,r)=>$Z(t,e,r)<=0;var K3=LZ;const OZ=BE,NZ=qE,DZ=R0,VZ=G3,FZ=W3,zZ=K3,jZ=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return OZ(t,r,n);case"!=":return NZ(t,r,n);case">":return DZ(t,r,n);case">=":return VZ(t,r,n);case"<":return FZ(t,r,n);case"<=":return zZ(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};var WE=jZ;const UZ=_n,BZ=Cd,{safeRe:ff,t:pf}=c1,qZ=(t,e)=>{if(t instanceof UZ)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?ff[pf.COERCEFULL]:ff[pf.COERCE]);else{const c=e.includePrerelease?ff[pf.COERCERTLFULL]:ff[pf.COERCERTL];let l;for(;(l=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||l.index+l[0].length!==r.index+r[0].length)&&(r=l),c.lastIndex=l.index+l[1].length+l[2].length;c.lastIndex=-1}if(r===null)return null;const n=r[2],i=r[3]||"0",o=r[4]||"0",a=e.includePrerelease&&r[5]?`-${r[5]}`:"",s=e.includePrerelease&&r[6]?`+${r[6]}`:"";return BZ(`${n}.${i}.${o}${a}${s}`,e)};var WZ=qZ,iv,G6;function GZ(){return G6||(G6=1,iv=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),iv}var KZ=Ye;Ye.Node=yc;Ye.create=Ye;function Ye(t){var e=this;if(e instanceof Ye||(e=new Ye),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(i){e.push(i)});else if(arguments.length>0)for(var r=0,n=arguments.length;r<n;r++)e.push(arguments[r]);return e}Ye.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};Ye.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};Ye.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};Ye.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)QZ(this,arguments[t]);return this.length};Ye.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)XZ(this,arguments[t]);return this.length};Ye.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};Ye.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};Ye.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,n=0;r!==null;n++)t.call(e,r.value,n,this),r=r.next};Ye.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,n=this.length-1;r!==null;n--)t.call(e,r.value,n,this),r=r.prev};Ye.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};Ye.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};Ye.prototype.map=function(t,e){e=e||this;for(var r=new Ye,n=this.head;n!==null;)r.push(t.call(e,n.value,this)),n=n.next;return r};Ye.prototype.mapReverse=function(t,e){e=e||this;for(var r=new Ye,n=this.tail;n!==null;)r.push(t.call(e,n.value,this)),n=n.prev;return r};Ye.prototype.reduce=function(t,e){var r,n=this.head;if(arguments.length>1)r=e;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=0;n!==null;i++)r=t(r,n.value,i),n=n.next;return r};Ye.prototype.reduceReverse=function(t,e){var r,n=this.tail;if(arguments.length>1)r=e;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var i=this.length-1;n!==null;i--)r=t(r,n.value,i),n=n.prev;return r};Ye.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Ye.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Ye.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Ye;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(;i!==null&&n<e;n++,i=i.next)r.push(i.value);return r};Ye.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Ye;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var n=this.length,i=this.tail;i!==null&&n>e;n--)i=i.prev;for(;i!==null&&n>t;n--,i=i.prev)r.push(i.value);return r};Ye.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,i=this.head;i!==null&&n<t;n++)i=i.next;for(var o=[],n=0;i&&n<e;n++)o.push(i.value),i=this.removeNode(i);i===null&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(var n=0;n<r.length;n++)i=YZ(this,i,r[n]);return o};Ye.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=e,this.tail=t,this};function YZ(t,e,r){var n=e===t.head?new yc(r,null,e,t):new yc(r,e,e.next,t);return n.next===null&&(t.tail=n),n.prev===null&&(t.head=n),t.length++,n}function QZ(t,e){t.tail=new yc(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function XZ(t,e){t.head=new yc(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function yc(t,e,r,n){if(!(this instanceof yc))return new yc(t,e,r,n);this.list=n,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{GZ()(Ye)}catch{}const JZ=KZ,Ds=Symbol("max"),jo=Symbol("length"),Uc=Symbol("lengthCalculator"),Xu=Symbol("allowStale"),Bs=Symbol("maxAge"),No=Symbol("dispose"),K6=Symbol("noDisposeOnSet"),Cr=Symbol("lruList"),$i=Symbol("cache"),GE=Symbol("updateAgeOnGet"),ov=()=>1;class eH{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[Ds]=e.max||1/0;const r=e.length||ov;if(this[Uc]=typeof r!="function"?ov:r,this[Xu]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Bs]=e.maxAge||0,this[No]=e.dispose,this[K6]=e.noDisposeOnSet||!1,this[GE]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Ds]=e||1/0,Qd(this)}get max(){return this[Ds]}set allowStale(e){this[Xu]=!!e}get allowStale(){return this[Xu]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Bs]=e,Qd(this)}get maxAge(){return this[Bs]}set lengthCalculator(e){typeof e!="function"&&(e=ov),e!==this[Uc]&&(this[Uc]=e,this[jo]=0,this[Cr].forEach(r=>{r.length=this[Uc](r.value,r.key),this[jo]+=r.length})),Qd(this)}get lengthCalculator(){return this[Uc]}get length(){return this[jo]}get itemCount(){return this[Cr].length}rforEach(e,r){r=r||this;for(let n=this[Cr].tail;n!==null;){const i=n.prev;Y6(this,e,n,r),n=i}}forEach(e,r){r=r||this;for(let n=this[Cr].head;n!==null;){const i=n.next;Y6(this,e,n,r),n=i}}keys(){return this[Cr].toArray().map(e=>e.key)}values(){return this[Cr].toArray().map(e=>e.value)}reset(){this[No]&&this[Cr]&&this[Cr].length&&this[Cr].forEach(e=>this[No](e.key,e.value)),this[$i]=new Map,this[Cr]=new JZ,this[jo]=0}dump(){return this[Cr].map(e=>g2(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Cr]}set(e,r,n){if(n=n||this[Bs],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const i=n?Date.now():0,o=this[Uc](r,e);if(this[$i].has(e)){if(o>this[Ds])return Bl(this,this[$i].get(e)),!1;const c=this[$i].get(e).value;return this[No]&&(this[K6]||this[No](e,c.value)),c.now=i,c.maxAge=n,c.value=r,this[jo]+=o-c.length,c.length=o,this.get(e),Qd(this),!0}const a=new tH(e,r,o,i,n);return a.length>this[Ds]?(this[No]&&this[No](e,r),!1):(this[jo]+=a.length,this[Cr].unshift(a),this[$i].set(e,this[Cr].head),Qd(this),!0)}has(e){if(!this[$i].has(e))return!1;const r=this[$i].get(e).value;return!g2(this,r)}get(e){return av(this,e,!0)}peek(e){return av(this,e,!1)}pop(){const e=this[Cr].tail;return e?(Bl(this,e),e.value):null}del(e){Bl(this,this[$i].get(e))}load(e){this.reset();const r=Date.now();for(let n=e.length-1;n>=0;n--){const i=e[n],o=i.e||0;if(o===0)this.set(i.k,i.v);else{const a=o-r;a>0&&this.set(i.k,i.v,a)}}}prune(){this[$i].forEach((e,r)=>av(this,r,!1))}}const av=(t,e,r)=>{const n=t[$i].get(e);if(n){const i=n.value;if(g2(t,i)){if(Bl(t,n),!t[Xu])return}else r&&(t[GE]&&(n.value.now=Date.now()),t[Cr].unshiftNode(n));return i.value}},g2=(t,e)=>{if(!e||!e.maxAge&&!t[Bs])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[Bs]&&r>t[Bs]},Qd=t=>{if(t[jo]>t[Ds])for(let e=t[Cr].tail;t[jo]>t[Ds]&&e!==null;){const r=e.prev;Bl(t,e),e=r}},Bl=(t,e)=>{if(e){const r=e.value;t[No]&&t[No](r.key,r.value),t[jo]-=r.length,t[$i].delete(r.key),t[Cr].removeNode(e)}};class tH{constructor(e,r,n,i,o){this.key=e,this.value=r,this.length=n,this.now=i,this.maxAge=o||0}}const Y6=(t,e,r,n)=>{let i=r.value;g2(t,i)&&(Bl(t,r),t[Xu]||(i=void 0)),i&&e.call(n,i.value,i.key,t)};var rH=eH,sv,Q6;function Yi(){if(Q6)return sv;Q6=1;class t{constructor(H,L){if(L=n(L),H instanceof t)return H.loose===!!L.loose&&H.includePrerelease===!!L.includePrerelease?H:new t(H.raw,L);if(H instanceof i)return this.raw=H.value,this.set=[[H]],this.format(),this;if(this.options=L,this.loose=!!L.loose,this.includePrerelease=!!L.includePrerelease,this.raw=H.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(q=>this.parseRange(q.trim())).filter(q=>q.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const q=this.set[0];if(this.set=this.set.filter($=>!p($[0])),this.set.length===0)this.set=[q];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&m($[0])){this.set=[$];break}}}this.format()}format(){return this.range=this.set.map(H=>H.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(H){const q=((this.options.includePrerelease&&h)|(this.options.loose&&f))+":"+H,$=r.get(q);if($)return $;const I=this.options.loose,N=I?s[c.HYPHENRANGELOOSE]:s[c.HYPHENRANGE];H=H.replace(N,ie(this.options.includePrerelease)),o("hyphen replace",H),H=H.replace(s[c.COMPARATORTRIM],l),o("comparator trim",H),H=H.replace(s[c.TILDETRIM],d),o("tilde trim",H),H=H.replace(s[c.CARETTRIM],u),o("caret trim",H);let J=H.split(" ").map(ve=>g(ve,this.options)).join(" ").split(/\s+/).map(ve=>K(ve,this.options));I&&(J=J.filter(ve=>(o("loose invalid filter",ve,this.options),!!ve.match(s[c.COMPARATORLOOSE])))),o("range list",J);const ee=new Map,pe=J.map(ve=>new i(ve,this.options));for(const ve of pe){if(p(ve))return[ve];ee.set(ve.value,ve)}ee.size>1&&ee.has("")&&ee.delete("");const nt=[...ee.values()];return r.set(q,nt),nt}intersects(H,L){if(!(H instanceof t))throw new TypeError("a Range is required");return this.set.some(q=>w(q,L)&&H.set.some($=>w($,L)&&q.every(I=>$.every(N=>I.intersects(N,L)))))}test(H){if(!H)return!1;if(typeof H=="string")try{H=new a(H,this.options)}catch{return!1}for(let L=0;L<this.set.length;L++)if(ce(this.set[L],H,this.options))return!0;return!1}}sv=t;const e=rH,r=new e({max:1e3}),n=B3,i=M0(),o=P0,a=_n,{safeRe:s,t:c,comparatorTrimReplace:l,tildeTrimReplace:d,caretTrimReplace:u}=c1,{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:f}=T0,p=z=>z.value==="<0.0.0-0",m=z=>z.value==="",w=(z,H)=>{let L=!0;const q=z.slice();let $=q.pop();for(;L&&q.length;)L=q.every(I=>$.intersects(I,H)),$=q.pop();return L},g=(z,H)=>(o("comp",z,H),z=k(z,H),o("caret",z),z=b(z,H),o("tildes",z),z=S(z,H),o("xrange",z),z=W(z,H),o("stars",z),z),v=z=>!z||z.toLowerCase()==="x"||z==="*",b=(z,H)=>z.trim().split(/\s+/).map(L=>E(L,H)).join(" "),E=(z,H)=>{const L=H.loose?s[c.TILDELOOSE]:s[c.TILDE];return z.replace(L,(q,$,I,N,J)=>{o("tilde",z,q,$,I,N,J);let ee;return v($)?ee="":v(I)?ee=`>=${$}.0.0 <${+$+1}.0.0-0`:v(N)?ee=`>=${$}.${I}.0 <${$}.${+I+1}.0-0`:J?(o("replaceTilde pr",J),ee=`>=${$}.${I}.${N}-${J} <${$}.${+I+1}.0-0`):ee=`>=${$}.${I}.${N} <${$}.${+I+1}.0-0`,o("tilde return",ee),ee})},k=(z,H)=>z.trim().split(/\s+/).map(L=>x(L,H)).join(" "),x=(z,H)=>{o("caret",z,H);const L=H.loose?s[c.CARETLOOSE]:s[c.CARET],q=H.includePrerelease?"-0":"";return z.replace(L,($,I,N,J,ee)=>{o("caret",z,$,I,N,J,ee);let pe;return v(I)?pe="":v(N)?pe=`>=${I}.0.0${q} <${+I+1}.0.0-0`:v(J)?I==="0"?pe=`>=${I}.${N}.0${q} <${I}.${+N+1}.0-0`:pe=`>=${I}.${N}.0${q} <${+I+1}.0.0-0`:ee?(o("replaceCaret pr",ee),I==="0"?N==="0"?pe=`>=${I}.${N}.${J}-${ee} <${I}.${N}.${+J+1}-0`:pe=`>=${I}.${N}.${J}-${ee} <${I}.${+N+1}.0-0`:pe=`>=${I}.${N}.${J}-${ee} <${+I+1}.0.0-0`):(o("no pr"),I==="0"?N==="0"?pe=`>=${I}.${N}.${J}${q} <${I}.${N}.${+J+1}-0`:pe=`>=${I}.${N}.${J}${q} <${I}.${+N+1}.0-0`:pe=`>=${I}.${N}.${J} <${+I+1}.0.0-0`),o("caret return",pe),pe})},S=(z,H)=>(o("replaceXRanges",z,H),z.split(/\s+/).map(L=>Z(L,H)).join(" ")),Z=(z,H)=>{z=z.trim();const L=H.loose?s[c.XRANGELOOSE]:s[c.XRANGE];return z.replace(L,(q,$,I,N,J,ee)=>{o("xRange",z,q,$,I,N,J,ee);const pe=v(I),nt=pe||v(N),ve=nt||v(J),Qe=ve;return $==="="&&Qe&&($=""),ee=H.includePrerelease?"-0":"",pe?$===">"||$==="<"?q="<0.0.0-0":q="*":$&&Qe?(nt&&(N=0),J=0,$===">"?($=">=",nt?(I=+I+1,N=0,J=0):(N=+N+1,J=0)):$==="<="&&($="<",nt?I=+I+1:N=+N+1),$==="<"&&(ee="-0"),q=`${$+I}.${N}.${J}${ee}`):nt?q=`>=${I}.0.0${ee} <${+I+1}.0.0-0`:ve&&(q=`>=${I}.${N}.0${ee} <${I}.${+N+1}.0-0`),o("xRange return",q),q})},W=(z,H)=>(o("replaceStars",z,H),z.trim().replace(s[c.STAR],"")),K=(z,H)=>(o("replaceGTE0",z,H),z.trim().replace(s[H.includePrerelease?c.GTE0PRE:c.GTE0],"")),ie=z=>(H,L,q,$,I,N,J,ee,pe,nt,ve,Qe,dt)=>(v(q)?L="":v($)?L=`>=${q}.0.0${z?"-0":""}`:v(I)?L=`>=${q}.${$}.0${z?"-0":""}`:N?L=`>=${L}`:L=`>=${L}${z?"-0":""}`,v(pe)?ee="":v(nt)?ee=`<${+pe+1}.0.0-0`:v(ve)?ee=`<${pe}.${+nt+1}.0-0`:Qe?ee=`<=${pe}.${nt}.${ve}-${Qe}`:z?ee=`<${pe}.${nt}.${+ve+1}-0`:ee=`<=${ee}`,`${L} ${ee}`.trim()),ce=(z,H,L)=>{for(let q=0;q<z.length;q++)if(!z[q].test(H))return!1;if(H.prerelease.length&&!L.includePrerelease){for(let q=0;q<z.length;q++)if(o(z[q].semver),z[q].semver!==i.ANY&&z[q].semver.prerelease.length>0){const $=z[q].semver;if($.major===H.major&&$.minor===H.minor&&$.patch===H.patch)return!0}return!1}return!0};return sv}var cv,X6;function M0(){if(X6)return cv;X6=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(d,u){if(u=r(u),d instanceof e){if(d.loose===!!u.loose)return d;d=d.value}d=d.trim().split(/\s+/).join(" "),a("comparator",d,u),this.options=u,this.loose=!!u.loose,this.parse(d),this.semver===t?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(d){const u=this.options.loose?n[i.COMPARATORLOOSE]:n[i.COMPARATOR],h=d.match(u);if(!h)throw new TypeError(`Invalid comparator: ${d}`);this.operator=h[1]!==void 0?h[1]:"",this.operator==="="&&(this.operator=""),h[2]?this.semver=new s(h[2],this.options.loose):this.semver=t}toString(){return this.value}test(d){if(a("Comparator.test",d,this.options.loose),this.semver===t||d===t)return!0;if(typeof d=="string")try{d=new s(d,this.options)}catch{return!1}return o(d,this.operator,this.semver,this.options)}intersects(d,u){if(!(d instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new c(d.value,u).test(this.value):d.operator===""?d.value===""?!0:new c(this.value,u).test(d.semver):(u=r(u),u.includePrerelease&&(this.value==="<0.0.0-0"||d.value==="<0.0.0-0")||!u.includePrerelease&&(this.value.startsWith("<0.0.0")||d.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&d.operator.startsWith(">")||this.operator.startsWith("<")&&d.operator.startsWith("<")||this.semver.version===d.semver.version&&this.operator.includes("=")&&d.operator.includes("=")||o(this.semver,"<",d.semver,u)&&this.operator.startsWith(">")&&d.operator.startsWith("<")||o(this.semver,">",d.semver,u)&&this.operator.startsWith("<")&&d.operator.startsWith(">")))}}cv=e;const r=B3,{safeRe:n,t:i}=c1,o=WE,a=P0,s=_n,c=Yi();return cv}const nH=Yi(),iH=(t,e,r)=>{try{e=new nH(e,r)}catch{return!1}return e.test(t)};var Z0=iH;const oH=Yi(),aH=(t,e)=>new oH(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var sH=aH;const cH=_n,lH=Yi(),dH=(t,e,r)=>{let n=null,i=null,o=null;try{o=new lH(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||i.compare(a)===-1)&&(n=a,i=new cH(n,r))}),n};var uH=dH;const hH=_n,fH=Yi(),pH=(t,e,r)=>{let n=null,i=null,o=null;try{o=new fH(e,r)}catch{return null}return t.forEach(a=>{o.test(a)&&(!n||i.compare(a)===1)&&(n=a,i=new hH(n,r))}),n};var mH=pH;const lv=_n,vH=Yi(),J6=R0,gH=(t,e)=>{t=new vH(t,e);let r=new lv("0.0.0");if(t.test(r)||(r=new lv("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){const i=t.set[n];let o=null;i.forEach(a=>{const s=new lv(a.semver.version);switch(a.operator){case">":s.prerelease.length===0?s.patch++:s.prerelease.push(0),s.raw=s.format();case"":case">=":(!o||J6(s,o))&&(o=s);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${a.operator}`)}}),o&&(!r||J6(r,o))&&(r=o)}return r&&t.test(r)?r:null};var yH=gH;const _H=Yi(),bH=(t,e)=>{try{return new _H(t,e).range||"*"}catch{return null}};var wH=bH;const xH=_n,KE=M0(),{ANY:CH}=KE,EH=Yi(),kH=Z0,e8=R0,t8=W3,SH=K3,AH=G3,IH=(t,e,r,n)=>{t=new xH(t,n),e=new EH(e,n);let i,o,a,s,c;switch(r){case">":i=e8,o=SH,a=t8,s=">",c=">=";break;case"<":i=t8,o=AH,a=e8,s="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(kH(t,e,n))return!1;for(let l=0;l<e.set.length;++l){const d=e.set[l];let u=null,h=null;if(d.forEach(f=>{f.semver===CH&&(f=new KE(">=0.0.0")),u=u||f,h=h||f,i(f.semver,u.semver,n)?u=f:a(f.semver,h.semver,n)&&(h=f)}),u.operator===s||u.operator===c||(!h.operator||h.operator===s)&&o(t,h.semver))return!1;if(h.operator===c&&a(t,h.semver))return!1}return!0};var Y3=IH;const TH=Y3,PH=(t,e,r)=>TH(t,e,">",r);var RH=PH;const MH=Y3,ZH=(t,e,r)=>MH(t,e,"<",r);var HH=ZH;const r8=Yi(),$H=(t,e,r)=>(t=new r8(t,r),e=new r8(e,r),t.intersects(e,r));var LH=$H;const OH=Z0,NH=Ki;var DH=(t,e,r)=>{const n=[];let i=null,o=null;const a=t.sort((d,u)=>NH(d,u,r));for(const d of a)OH(d,e,r)?(o=d,i||(i=d)):(o&&n.push([i,o]),o=null,i=null);i&&n.push([i,null]);const s=[];for(const[d,u]of n)d===u?s.push(d):!u&&d===a[0]?s.push("*"):u?d===a[0]?s.push(`<=${u}`):s.push(`${d} - ${u}`):s.push(`>=${d}`);const c=s.join(" || "),l=typeof e.raw=="string"?e.raw:String(e);return c.length<l.length?c:e};const n8=Yi(),Q3=M0(),{ANY:dv}=Q3,Xd=Z0,X3=Ki,VH=(t,e,r={})=>{if(t===e)return!0;t=new n8(t,r),e=new n8(e,r);let n=!1;e:for(const i of t.set){for(const o of e.set){const a=zH(i,o,r);if(n=n||a!==null,a)continue e}if(n)return!1}return!0},FH=[new Q3(">=0.0.0-0")],i8=[new Q3(">=0.0.0")],zH=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===dv){if(e.length===1&&e[0].semver===dv)return!0;r.includePrerelease?t=FH:t=i8}if(e.length===1&&e[0].semver===dv){if(r.includePrerelease)return!0;e=i8}const n=new Set;let i,o;for(const f of t)f.operator===">"||f.operator===">="?i=o8(i,f,r):f.operator==="<"||f.operator==="<="?o=a8(o,f,r):n.add(f.semver);if(n.size>1)return null;let a;if(i&&o){if(a=X3(i.semver,o.semver,r),a>0)return null;if(a===0&&(i.operator!==">="||o.operator!=="<="))return null}for(const f of n){if(i&&!Xd(f,String(i),r)||o&&!Xd(f,String(o),r))return null;for(const p of e)if(!Xd(f,String(p),r))return!1;return!0}let s,c,l,d,u=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1,h=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;u&&u.prerelease.length===1&&o.operator==="<"&&u.prerelease[0]===0&&(u=!1);for(const f of e){if(d=d||f.operator===">"||f.operator===">=",l=l||f.operator==="<"||f.operator==="<=",i){if(h&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===h.major&&f.semver.minor===h.minor&&f.semver.patch===h.patch&&(h=!1),f.operator===">"||f.operator===">="){if(s=o8(i,f,r),s===f&&s!==i)return!1}else if(i.operator===">="&&!Xd(i.semver,String(f),r))return!1}if(o){if(u&&f.semver.prerelease&&f.semver.prerelease.length&&f.semver.major===u.major&&f.semver.minor===u.minor&&f.semver.patch===u.patch&&(u=!1),f.operator==="<"||f.operator==="<="){if(c=a8(o,f,r),c===f&&c!==o)return!1}else if(o.operator==="<="&&!Xd(o.semver,String(f),r))return!1}if(!f.operator&&(o||i)&&a!==0)return!1}return!(i&&l&&!o&&a!==0||o&&d&&!i&&a!==0||h||u)},o8=(t,e,r)=>{if(!t)return e;const n=X3(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},a8=(t,e,r)=>{if(!t)return e;const n=X3(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};var jH=VH;const uv=c1,s8=T0,UH=_n,c8=UE,BH=Cd,qH=BM,WH=GM,GH=YM,KH=XM,YH=tZ,QH=iZ,XH=sZ,JH=dZ,e$=Ki,t$=pZ,r$=gZ,n$=q3,i$=wZ,o$=EZ,a$=R0,s$=W3,c$=BE,l$=qE,d$=G3,u$=K3,h$=WE,f$=WZ,p$=M0(),m$=Yi(),v$=Z0,g$=sH,y$=uH,_$=mH,b$=yH,w$=wH,x$=Y3,C$=RH,E$=HH,k$=LH,S$=DH,A$=jH;var l8={parse:BH,valid:qH,clean:WH,inc:GH,diff:KH,major:YH,minor:QH,patch:XH,prerelease:JH,compare:e$,rcompare:t$,compareLoose:r$,compareBuild:n$,sort:i$,rsort:o$,gt:a$,lt:s$,eq:c$,neq:l$,gte:d$,lte:u$,cmp:h$,coerce:f$,Comparator:p$,Range:m$,satisfies:v$,toComparators:g$,maxSatisfying:y$,minSatisfying:_$,minVersion:b$,validRange:w$,outside:x$,gtr:C$,ltr:E$,intersects:k$,simplifyRange:S$,subset:A$,SemVer:UH,re:uv.re,src:uv.src,tokens:uv.t,SEMVER_SPEC_VERSION:s8.SEMVER_SPEC_VERSION,RELEASE_TYPES:s8.RELEASE_TYPES,compareIdentifiers:c8.compareIdentifiers,rcompareIdentifiers:c8.rcompareIdentifiers};class Ju extends l8.SemVer{satisfies(e){return l8.satisfies(this,e)}}let I$=class{constructor(e){this.domain=e,this.level=1}_createMessage(e){return[`%c FUSION FRAMEWORK %c ${this.domain} %c %s`,"background: rgb(179, 13, 47); color: white; padding: 1px;","background: rgb(244, 244, 244); color: rgb(36, 55, 70); padding: 1px;","background: none; color: inherit",...e.reduce((r,n)=>[...r,n,`
|
|
41
41
|
`],[])]}debug(...e){this.level>3&&console.debug(...this._createMessage(e))}info(...e){this.level>2&&console.info(...this._createMessage(e))}warn(...e){this.level>1&&console.warn(...this._createMessage(e))}error(...e){this.level>0&&console.error(...this._createMessage(e))}};class YE extends I${formatModuleName(e){return`📦\x1B[1;32m${(typeof e=="string"?e:e.name).replace(/([A-Z])/g," $1").toUpperCase()}\x1B[0m`}}var C4=function(t,e){return C4=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},C4(t,e)};function on(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");C4(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var ur=function(){return ur=Object.assign||function(e){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ur.apply(this,arguments)};function QE(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r}function C(t,e,r,n){var i=arguments.length,o=i<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,r,o):a(e,r))||o);return i>3&&o&&Object.defineProperty(e,r,o),o}function ra(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})}function XE(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(l){return function(d){return c([l,d])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(r=0)),r;)try{if(n=1,i&&(o=l[0]&2?i.return:l[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,l[1])).done)return o;switch(i=0,o&&(l=[l[0]&2,o.value]),l[0]){case 0:case 1:o=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!o||l[1]>o[0]&&l[1]<o[3])){r.label=l[1];break}if(l[0]===6&&r.label<o[1]){r.label=o[1],o=l;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(l);break}o[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(d){l=[6,d],i=0}finally{n=o=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function fn(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function da(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function is(t,e,r){if(r||arguments.length===2)for(var n=0,i=e.length,o;n<i;n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}function ql(t){return this instanceof ql?(this.v=t,this):new ql(t)}function T$(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(h){n[h]&&(i[h]=function(f){return new Promise(function(p,m){o.push([h,f,p,m])>1||s(h,f)})})}function s(h,f){try{c(n[h](f))}catch(p){u(o[0][3],p)}}function c(h){h.value instanceof ql?Promise.resolve(h.value.v).then(l,d):u(o[0][2],h)}function l(h){s("next",h)}function d(h){s("throw",h)}function u(h,f){h(f),o.shift(),o.length&&s(o[0][0],o[0][1])}}function P$(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof fn=="function"?fn(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(a){return new Promise(function(s,c){a=t[o](a),i(s,c,a.done,a.value)})}}function i(o,a,s,c){Promise.resolve(c).then(function(l){o({value:l,done:s})},a)}}function re(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function qo(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r}function at(t){return typeof t=="function"}function H0(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var hv=H0(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription:
|
|
42
42
|
`+r.map(function(n,i){return i+1+") "+n.toString()}).join(`
|
|
43
|
-
`):"",this.name="UnsubscriptionError",this.errors=r}});function y2(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Tr=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=fn(a),c=s.next();!c.done;c=s.next()){var l=c.value;l.remove(this)}}catch(m){e={error:m}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}else a.remove(this);var d=this.initialTeardown;if(at(d))try{d()}catch(m){o=m instanceof hv?m.errors:[m]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var h=fn(u),f=h.next();!f.done;f=h.next()){var p=f.value;try{d8(p)}catch(m){o=o??[],m instanceof hv?o=is(is([],da(o)),da(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}if(o)throw new hv(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)d8(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&y2(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&y2(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),JE=Tr.EMPTY;function ek(t){return t instanceof Tr||t&&"closed"in t&&at(t.remove)&&at(t.add)&&at(t.unsubscribe)}function d8(t){at(t)?t():t.unsubscribe()}var tk={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},rk={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,is([t,e],da(r)))},clearTimeout:function(t){var e=rk.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function nk(t){rk.setTimeout(function(){throw t})}function _2(){}function cp(t){t()}var J3=function(t){on(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,ek(r)&&r.add(n)):n.destination=H$,n}return e.create=function(r,n,i){return new id(r,n,i)},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Tr),R$=Function.prototype.bind;function fv(t,e){return R$.call(t,e)}var M$=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){mf(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){mf(n)}else mf(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){mf(r)}},t}(),id=function(t){on(e,t);function e(r,n,i){var o=t.call(this)||this,a;if(at(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var s;o&&tk.useDeprecatedNextContext?(s=Object.create(r),s.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&fv(r.next,s),error:r.error&&fv(r.error,s),complete:r.complete&&fv(r.complete,s)}):a=r}return o.destination=new M$(a),o}return e}(J3);function mf(t){nk(t)}function Z$(t){throw t}var H$={closed:!0,next:_2,error:Z$,complete:_2},ey=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ha(t){return t}function $$(t){return t.length===0?ha:t.length===1?t[0]:function(r){return t.reduce(function(n,i){return i(n)},r)}}var Ne=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,o=O$(e)?e:new id(e,r,n);return cp(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=u8(r),new r(function(i,o){var a=new id({next:function(s){try{e(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[ey]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return $$(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=u8(e),new e(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},t.create=function(e){return new t(e)},t}();function u8(t){var e;return(e=t??tk.Promise)!==null&&e!==void 0?e:Promise}function L$(t){return t&&at(t.next)&&at(t.error)&&at(t.complete)}function O$(t){return t&&t instanceof J3||L$(t)&&ek(t)}function N$(t){return at(t==null?void 0:t.lift)}function $t(t){return function(e){if(N$(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Tt(t,e,r,n,i){return new D$(t,e,r,n,i)}var D$=function(t){on(e,t);function e(r,n,i,o,a,s){var c=t.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=n?function(l){try{n(l)}catch(d){r.error(d)}}:t.prototype._next,c._error=o?function(l){try{o(l)}catch(d){r.error(d)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(l){r.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e}(J3),V$=H0(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rn=function(t){on(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var n=new h8(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new V$},e.prototype.next=function(r){var n=this;cp(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=fn(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(r){var n=this;cp(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},e.prototype.complete=function(){var r=this;cp(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?JE:(this.currentObservers=null,s.push(r),new Tr(function(){n.currentObservers=null,y2(s,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},e.prototype.asObservable=function(){var r=new Ne;return r.source=this,r},e.create=function(r,n){return new h8(r,n)},e}(Ne),h8=function(t){on(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:JE},e}(rn),Ed=function(t){on(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,o=r._value;if(n)throw i;return this._throwIfClosed(),o},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(rn),ty={now:function(){return(ty.delegate||Date).now()},delegate:void 0},ik=function(t){on(e,t);function e(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=ty);var o=t.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return e.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,s=n._timestampProvider,c=n._windowTime;i||(o.push(r),!a&&o.push(s.now()+c)),this._trimBuffer(),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),c=0;c<s.length&&!r.closed;c+=o?1:2)r.next(s[c]);return this._checkFinalizedStatuses(r),n},e.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,a=r._infiniteTimeWindow,s=(a?1:2)*n;if(n<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var c=i.now(),l=0,d=1;d<o.length&&o[d]<=c;d+=2)l=d;l&&o.splice(0,l+1)}},e}(rn),F$=function(t){on(e,t);function e(r,n){return t.call(this)||this}return e.prototype.schedule=function(r,n){return this},e}(Tr),E4={setInterval:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,is([t,e],da(r)))},clearInterval:function(t){var e=E4.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},z$=function(t){on(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),E4.setInterval(r.flush.bind(r,this),i)},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&E4.clearInterval(n)},e.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(r,n){var i=!1,o;try{this.work(r)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,y2(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(F$),f8=function(){function t(e,r){r===void 0&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,e).schedule(n,r)},t.now=ty.now,t}(),j$=function(t){on(e,t);function e(r,n){n===void 0&&(n=f8.now);var i=t.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},e}(f8),b2=new j$(z$),U$=b2,Zt=new Ne(function(t){return t.complete()});function ok(t){return t&&at(t.schedule)}function ak(t){return t[t.length-1]}function ry(t){return at(ak(t))?t.pop():void 0}function ny(t){return ok(ak(t))?t.pop():void 0}var iy=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function sk(t){return at(t==null?void 0:t.then)}function ck(t){return at(t[ey])}function lk(t){return Symbol.asyncIterator&&at(t==null?void 0:t[Symbol.asyncIterator])}function dk(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function B$(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var uk=B$();function hk(t){return at(t==null?void 0:t[uk])}function fk(t){return T$(this,arguments,function(){var r,n,i,o;return XE(this,function(a){switch(a.label){case 0:r=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ql(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,ql(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ql(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function pk(t){return at(t==null?void 0:t.getReader)}function bn(t){if(t instanceof Ne)return t;if(t!=null){if(ck(t))return q$(t);if(iy(t))return W$(t);if(sk(t))return G$(t);if(lk(t))return mk(t);if(hk(t))return K$(t);if(pk(t))return Y$(t)}throw dk(t)}function q$(t){return new Ne(function(e){var r=t[ey]();if(at(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function W$(t){return new Ne(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}function G$(t){return new Ne(function(e){t.then(function(r){e.closed||(e.next(r),e.complete())},function(r){return e.error(r)}).then(null,nk)})}function K$(t){return new Ne(function(e){var r,n;try{for(var i=fn(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){r={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.complete()})}function mk(t){return new Ne(function(e){Q$(t,e).catch(function(r){return e.error(r)})})}function Y$(t){return mk(fk(t))}function Q$(t,e){var r,n,i,o;return ra(this,void 0,void 0,function(){var a,s;return XE(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=P$(t),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(a=n.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function wo(t,e,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!i)return o}function w2(t,e){return e===void 0&&(e=0),$t(function(r,n){r.subscribe(Tt(n,function(i){return wo(n,t,function(){return n.next(i)},e)},function(){return wo(n,t,function(){return n.complete()},e)},function(i){return wo(n,t,function(){return n.error(i)},e)}))})}function vk(t,e){return e===void 0&&(e=0),$t(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}function X$(t,e){return bn(t).pipe(vk(e),w2(e))}function J$(t,e){return bn(t).pipe(vk(e),w2(e))}function eL(t,e){return new Ne(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function tL(t,e){return new Ne(function(r){var n;return wo(r,e,function(){n=t[uk](),wo(r,e,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(s){r.error(s);return}a?r.complete():r.next(o)},0,!0)}),function(){return at(n==null?void 0:n.return)&&n.return()}})}function gk(t,e){if(!t)throw new Error("Iterable cannot be null");return new Ne(function(r){wo(r,e,function(){var n=t[Symbol.asyncIterator]();wo(r,e,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}function rL(t,e){return gk(fk(t),e)}function nL(t,e){if(t!=null){if(ck(t))return X$(t,e);if(iy(t))return eL(t,e);if(sk(t))return J$(t,e);if(lk(t))return gk(t,e);if(hk(t))return tL(t,e);if(pk(t))return rL(t,e)}throw dk(t)}function Dt(t,e){return e?nL(t,e):bn(t)}function mn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ny(t);return Dt(t,r)}function yk(t,e){var r=at(t)?t:function(){return t},n=function(i){return i.error(r())};return new Ne(e?function(i){return e.schedule(n,0,i)}:n)}var l1=H0(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function yr(t,e){var r=typeof e=="object";return new Promise(function(n,i){var o=!1,a;t.subscribe({next:function(s){a=s,o=!0},error:i,complete:function(){o?n(a):r?n(e.defaultValue):i(new l1)}})})}function $r(t,e){var r=typeof e=="object";return new Promise(function(n,i){var o=new id({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(e.defaultValue):i(new l1)}});t.subscribe(o)})}function _k(t){return t instanceof Date&&!isNaN(t)}var iL=H0(function(t){return function(r){r===void 0&&(r=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function oL(t,e){var r=_k(t)?{first:t}:typeof t=="number"?{each:t}:t,n=r.first,i=r.each,o=r.with,a=o===void 0?aL:o,s=r.scheduler,c=s===void 0?e??b2:s,l=r.meta,d=l===void 0?null:l;if(n==null&&i==null)throw new TypeError("No timeout provided.");return $t(function(u,h){var f,p,m=null,w=0,g=function(v){p=wo(h,c,function(){try{f.unsubscribe(),bn(a({meta:d,lastValue:m,seen:w})).subscribe(h)}catch(b){h.error(b)}},v)};f=u.subscribe(Tt(h,function(v){p==null||p.unsubscribe(),w++,h.next(m=v),i>0&&g(i)},void 0,void 0,function(){p!=null&&p.closed||p==null||p.unsubscribe(),m=null})),!w&&g(n!=null?typeof n=="number"?n:+n-c.now():i)})}function aL(t){throw new iL(t)}function Se(t,e){return $t(function(r,n){var i=0;r.subscribe(Tt(n,function(o){n.next(t.call(e,o,i++))}))})}var sL=Array.isArray;function cL(t,e){return sL(e)?t.apply(void 0,is([],da(e))):t(e)}function oy(t){return Se(function(e){return cL(t,e)})}var lL=Array.isArray,dL=Object.getPrototypeOf,uL=Object.prototype,hL=Object.keys;function bk(t){if(t.length===1){var e=t[0];if(lL(e))return{args:e,keys:null};if(fL(e)){var r=hL(e);return{args:r.map(function(n){return e[n]}),keys:r}}}return{args:t,keys:null}}function fL(t){return t&&typeof t=="object"&&dL(t)===uL}function wk(t,e){return t.reduce(function(r,n,i){return r[n]=e[i],r},{})}function pL(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ny(t),n=ry(t),i=bk(t),o=i.args,a=i.keys;if(o.length===0)return Dt([],r);var s=new Ne(mL(o,r,a?function(c){return wk(a,c)}:ha));return n?s.pipe(oy(n)):s}function mL(t,e,r){return r===void 0&&(r=ha),function(n){p8(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,c=function(d){p8(e,function(){var u=Dt(t[d],e),h=!1;u.subscribe(Tt(n,function(f){o[d]=f,h||(h=!0,s--),s||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},l=0;l<i;l++)c(l)},n)}}function p8(t,e,r){t?wo(r,t,e):e()}function xk(t,e,r,n,i,o,a,s){var c=[],l=0,d=0,u=!1,h=function(){u&&!c.length&&!l&&e.complete()},f=function(m){return l<n?p(m):c.push(m)},p=function(m){o&&e.next(m),l++;var w=!1;bn(r(m,d++)).subscribe(Tt(e,function(g){i==null||i(g),o?f(g):e.next(g)},function(){w=!0},void 0,function(){if(w)try{l--;for(var g=function(){var v=c.shift();a?wo(e,a,function(){return p(v)}):p(v)};c.length&&l<n;)g();h()}catch(v){e.error(v)}}))};return t.subscribe(Tt(e,f,function(){u=!0,h()})),function(){s==null||s()}}function Ln(t,e,r){return r===void 0&&(r=1/0),at(e)?Ln(function(n,i){return Se(function(o,a){return e(n,o,i,a)})(bn(t(n,i)))},r):(typeof e=="number"&&(r=e),$t(function(n,i){return xk(n,i,t,r)}))}function vL(t){return t===void 0&&(t=1/0),Ln(ha,t)}function gL(){return vL(1)}function Wl(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return gL()(Dt(t,ny(t)))}function yL(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ry(t),n=bk(t),i=n.args,o=n.keys,a=new Ne(function(s){var c=i.length;if(!c){s.complete();return}for(var l=new Array(c),d=c,u=c,h=function(p){var m=!1;bn(i[p]).subscribe(Tt(s,function(w){m||(m=!0,u--),l[p]=w},function(){return d--},void 0,function(){(!d||!m)&&(u||s.next(o?wk(o,l):l),s.complete())}))},f=0;f<c;f++)h(f)});return r?a.pipe(oy(r)):a}var _L=["addListener","removeListener"],bL=["addEventListener","removeEventListener"],wL=["on","off"];function eh(t,e,r,n){if(at(r)&&(n=r,r=void 0),n)return eh(t,e,r).pipe(oy(n));var i=da(EL(t)?bL.map(function(s){return function(c){return t[s](e,c,r)}}):xL(t)?_L.map(m8(t,e)):CL(t)?wL.map(m8(t,e)):[],2),o=i[0],a=i[1];if(!o&&iy(t))return Ln(function(s){return eh(s,e,r)})(bn(t));if(!o)throw new TypeError("Invalid event target");return new Ne(function(s){var c=function(){for(var l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return s.next(1<l.length?l:l[0])};return o(c),function(){return a(c)}})}function m8(t,e){return function(r){return function(n){return t[r](e,n)}}}function xL(t){return at(t.addListener)&&at(t.removeListener)}function CL(t){return at(t.on)&&at(t.off)}function EL(t){return at(t.addEventListener)&&at(t.removeEventListener)}function kL(t,e,r){t===void 0&&(t=0),r===void 0&&(r=U$);var n=-1;return e!=null&&(ok(e)?r=e:n=e),new Ne(function(i){var o=_k(t)?+t-r.now():t;o<0&&(o=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},o)})}function Ue(t,e){return $t(function(r,n){var i=0;r.subscribe(Tt(n,function(o){return t.call(e,o,i++)&&n.next(o)}))})}function Xt(t){return $t(function(e,r){var n=null,i=!1,o;n=e.subscribe(Tt(r,void 0,void 0,function(a){o=bn(t(a,Xt(t)(e))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}function Ck(t,e,r,n,i){return function(o,a){var s=r,c=e,l=0;o.subscribe(Tt(a,function(d){var u=l++;c=s?t(c,d,u):(s=!0,d),n&&a.next(c)},i&&function(){s&&a.next(c),a.complete()}))}}function x2(t,e){return $t(Ck(t,e,arguments.length>=2,!1,!0))}function k4(t,e){return at(e)?Ln(t,e,1):Ln(t,1)}function Ek(t){return $t(function(e,r){var n=!1;e.subscribe(Tt(r,function(i){n=!0,r.next(i)},function(){n||r.next(t),r.complete()}))})}function bu(t){return t<=0?function(){return Zt}:$t(function(e,r){var n=0;e.subscribe(Tt(r,function(i){++n<=t&&(r.next(i),t<=n&&r.complete())}))})}function kk(t,e){return e===void 0&&(e=ha),t=t??SL,$t(function(r,n){var i,o=!0;r.subscribe(Tt(n,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,n.next(a))}))})}function SL(t,e){return t===e}function Sk(t){return t===void 0&&(t=AL),$t(function(e,r){var n=!1;e.subscribe(Tt(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(t())}))})}function AL(){return new l1}function C2(t){return $t(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})}function Jd(t,e){return $t(IL(t,e,"value"))}function IL(t,e,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(Tt(o,function(s){var c=a++;t.call(e,s,c,i)&&(o.next(n?c:s),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}function TL(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Ue(function(i,o){return t(i,o,n)}):ha,bu(1),r?Ek(e):Sk(function(){return new l1}))}}function PL(t){return t<=0?function(){return Zt}:$t(function(e,r){var n=[];e.subscribe(Tt(r,function(i){n.push(i),t<n.length&&n.shift()},function(){var i,o;try{for(var a=fn(n),s=a.next();!s.done;s=a.next()){var c=s.value;r.next(c)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}function d1(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Ue(function(i,o){return t(i,o,n)}):ha,PL(1),r?Ek(e):Sk(function(){return new l1}))}}function RL(t,e,r){return r===void 0&&(r=1/0),$t(function(n,i){var o=e;return xk(n,i,function(a,s){return t(o,a,s)},r,function(a){o=a},!1,void 0,function(){return o=null})})}function E2(){return $t(function(t,e){var r,n=!1;t.subscribe(Tt(e,function(i){var o=r;r=i,n&&e.next([o,i]),n=!0}))})}function Ak(t,e){return $t(Ck(t,e,arguments.length>=2,!0))}function $0(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new rn}:e,n=t.resetOnError,i=n===void 0?!0:n,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,c=s===void 0?!0:s;return function(l){var d,u,h,f=0,p=!1,m=!1,w=function(){u==null||u.unsubscribe(),u=void 0},g=function(){w(),d=h=void 0,p=m=!1},v=function(){var b=d;g(),b==null||b.unsubscribe()};return $t(function(b,E){f++,!m&&!p&&w();var k=h=h??r();E.add(function(){f--,f===0&&!m&&!p&&(u=pv(v,c))}),k.subscribe(E),!d&&f>0&&(d=new id({next:function(x){return k.next(x)},error:function(x){m=!0,w(),u=pv(g,i,x),k.error(x)},complete:function(){p=!0,w(),u=pv(g,a),k.complete()}}),bn(b).subscribe(d))})(l)}}function pv(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(e===!0){t();return}if(e!==!1){var i=new id({next:function(){i.unsubscribe(),t()}});return bn(e.apply(void 0,is([],da(r)))).subscribe(i)}}function ML(t,e,r){var n,i,o,a,s=!1;return t&&typeof t=="object"?(n=t.bufferSize,a=n===void 0?1/0:n,i=t.windowTime,e=i===void 0?1/0:i,o=t.refCount,s=o===void 0?!1:o,r=t.scheduler):a=t??1/0,$0({connector:function(){return new ik(a,e,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}function mt(t,e){return $t(function(r,n){var i=null,o=0,a=!1,s=function(){return a&&!i&&n.complete()};r.subscribe(Tt(n,function(c){i==null||i.unsubscribe();var l=0,d=o++;bn(t(c,d)).subscribe(i=Tt(n,function(u){return n.next(e?e(c,u,d,l++):u)},function(){i=null,s()}))},function(){a=!0,s()}))})}function Gl(t){return $t(function(e,r){bn(t).subscribe(Tt(r,function(){return r.complete()},_2)),!r.closed&&e.subscribe(r)})}function Ik(t,e){return e===void 0&&(e=!1),$t(function(r,n){var i=0;r.subscribe(Tt(n,function(o){var a=t(o,i++);(a||e)&&n.next(o),!a&&n.complete()}))})}function od(t,e,r){var n=at(t)||e||r?{next:t,error:e,complete:r}:t;return n?$t(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var s=!0;i.subscribe(Tt(o,function(c){var l;(l=n.next)===null||l===void 0||l.call(n,c),o.next(c)},function(){var c;s=!1,(c=n.complete)===null||c===void 0||c.call(n),o.complete()},function(c){var l;s=!1,(l=n.error)===null||l===void 0||l.call(n,c),o.error(c)},function(){var c,l;s&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(l=n.finalize)===null||l===void 0||l.call(n)}))}):ha}function ay(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ry(t);return $t(function(n,i){for(var o=t.length,a=new Array(o),s=t.map(function(){return!1}),c=!1,l=function(u){bn(t[u]).subscribe(Tt(i,function(h){a[u]=h,!c&&!s[u]&&(s[u]=!0,(c=s.every(ha))&&(s=null))},_2))},d=0;d<o;d++)l(d);n.subscribe(Tt(i,function(u){if(c){var h=is([u],da(a));i.next(r?r.apply(void 0,is([],da(h))):h)}}))})}var v8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},g8=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},lp;const Tk=(t,e,r)=>{var n;const i=typeof e=="string"?e.split("."):e,o=i.shift();return o&&((n=t[o])!==null&&n!==void 0||(t[o]={}),i.length?Tk(t[o],i,r):Object.assign(t,{[o]:r})),t};class ZL{constructor(){lp.set(this,{})}createConfig(e,r){return this._createConfig(e,r)}createConfigAsync(e,r){return v8(this,void 0,void 0,function*(){return yr(this.createConfig(e,r))})}_set(e,r){g8(this,lp,"f")[e]=r}_createConfig(e,r){return this._buildConfig(e,r).pipe(Ln(n=>this._processConfig(n,e)))}_buildConfig(e,r){return Dt(Object.entries(g8(this,lp,"f"))).pipe(Ln(([n,i])=>v8(this,void 0,void 0,function*(){const o=yield i(e);return{target:n,value:o}})),x2((n,{target:i,value:o})=>Tk(n,i,o),r??{}))}_processConfig(e,r){return mn(e)}}lp=new WeakMap;var vf=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},y8=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},dp,al;class Pk{get version(){return vf(this,dp,"f")}constructor(e){dp.set(this,void 0),al.set(this,void 0);const{version:r}=e;y8(this,dp,new Ju(r),"f"),y8(this,al,new Tr,"f")}_addTeardown(e){return vf(this,al,"f").add(e),()=>vf(this,al,"f").remove(e)}dispose(){vf(this,al,"f").unsubscribe()}}dp=new WeakMap,al=new WeakMap;var Mo=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class HL extends Error{constructor(){super("It was too slow"),this.name="RequiredModuleTimeoutError"}}class $L{constructor(e){this.logger=new YE("ModulesConfigurator"),this._configs=[],this._afterConfiguration=[],this._afterInit=[],this._modules=new Set(e)}get modules(){return[...this._modules]}configure(...e){e.forEach(r=>this.addConfig(r))}addConfig(e){const{module:r,afterConfig:n,afterInit:i,configure:o}=e;this._modules.add(r),o&&this._configs.push((a,s)=>o(a[r.name],s)),n&&this._afterConfiguration.push(a=>n(a[r.name])),i&&this._afterInit.push(a=>i(a[r.name]))}onConfigured(e){this._afterConfiguration.push(e)}onInitialized(e){this._afterInit.push(e)}initialize(e){return Mo(this,void 0,void 0,function*(){const r=yield this._configure(e),n=yield this._initialize(r,e);return yield this._postInitialize(n,e),Object.seal(Object.assign({},n,{dispose:()=>this.dispose(n)}))})}_configure(e){return Mo(this,void 0,void 0,function*(){const r=yield this._createConfig(e);return yield Promise.all(this._configs.map(n=>Promise.resolve(n(r,e)))),yield this._postConfigure(r),r})}_createConfig(e){const{modules:r,logger:n,_afterConfiguration:i,_afterInit:o}=this,a=Dt(r).pipe(Ln(s=>Mo(this,void 0,void 0,function*(){var c;n.debug(`🛠 creating configurator ${n.formatModuleName(s)}`);try{const l=yield(c=s.configure)===null||c===void 0?void 0:c.call(s,e);return n.debug(`🛠 created configurator for ${n.formatModuleName(s)}`,l),{[s.name]:l}}catch(l){throw n.error(`🛠 Failed to created configurator for ${n.formatModuleName(s)}`,l),l}})),Ak((s,c)=>Object.assign(s,c),{onAfterConfiguration(s){i.push(s)},onAfterInit(s){o.push(s)}}));return yr(a)}_postConfigure(e){return Mo(this,void 0,void 0,function*(){const{modules:r,logger:n,_afterConfiguration:i}=this;if(yield Promise.allSettled(r.filter(o=>!!o.postConfigure).map(o=>Mo(this,void 0,void 0,function*(){var a;try{yield(a=o.postConfigure)===null||a===void 0?void 0:a.call(o,e),n.debug(`🏗📌 post configured ${n.formatModuleName(o)}`,o)}catch{n.warn(`🏗📌 post configure failed ${n.formatModuleName(o)}`)}}))),i.length)try{n.debug(`🏗📌 post configure hooks [${i.length}]`),yield Promise.allSettled(i.map(o=>Promise.resolve(o(e)))),n.debug("🏗📌 post configure hooks complete")}catch(o){n.warn("🏗📌 post configure hook failed",o)}})}_initialize(e,r){return Mo(this,void 0,void 0,function*(){const{modules:n,logger:i}=this,o=n.map(d=>d.name),a=new Ed({}),s=d=>o.includes(d),c=(d,u=60)=>{if(!o.includes(d))throw i.error(`🚀⌛️ Cannot not require ${i.formatModuleName(String(d))} since module is not defined!`),Error(`cannot not require [${String(d)}] since module is not defined!`);return a.value[d]?(i.debug(`🚀⌛️ ${i.formatModuleName(String(d))} is initiated, skipping queue`),Promise.resolve(a.value[d])):(i.debug(`🚀⌛️ Awaiting init ${i.formatModuleName(String(d))}, timeout ${u}s`),$r(a.pipe(Ue(h=>!!h[d]),Se(h=>h[d]),oL({each:u*1e3,with:()=>yk(()=>new HL)}))))};Dt(n).pipe(Ln(d=>{const u=d.name;return i.debug(`🚀 initializing ${i.formatModuleName(d)}`),Dt(Promise.resolve(d.initialize({ref:r,config:e[u],requireInstance:c,hasModule:s}))).pipe(Se(h=>{var f;if(!(h instanceof Pk)&&!(h.version instanceof Ju)){i.debug("🤷 module does not extends the [BaseModuleProvider] or exposes [SemanticVersion]");try{h.version=d.version instanceof Ju?d.version:new Ju((f=d.version)!==null&&f!==void 0?f:"0.0.0-unknown")}catch{i.error("🚨 failed to set module version")}}return i.debug(`🚀 initialized ${i.formatModuleName(d)}`),[u,h]}))})).subscribe({next:([d,u])=>{a.next(Object.assign(a.value,{[d]:u}))},complete:()=>a.complete()});const l=yield yr(a);return Object.seal(l),l})}_postInitialize(e,r){return Mo(this,void 0,void 0,function*(){const{modules:n,logger:i,_afterInit:o}=this,a=Dt(n).pipe(Ue(s=>!!s.postInitialize),od(s=>i.debug(`🚀📌 post initializing moule ${i.formatModuleName(s)}`)),Ln(s=>Dt(s.postInitialize({ref:r,modules:e,instance:e[s.name]})).pipe(od(()=>{i.debug(`🚀📌 post initialized moule ${i.formatModuleName(s)}`)}),Xt(c=>(i.warn(`🚀📌 post initialize failed moule ${i.formatModuleName(s)}`,c),Zt)))));if(yield yr(a),o.length)try{i.debug(`🚀📌 post configure hooks [${o.length}]`),yield Promise.allSettled(o.map(s=>Promise.resolve(s(e)))),i.debug("🚀📌 post configure hooks complete")}catch(s){i.warn("🚀📌 post configure hook failed",s)}i.debug(`🎉 Modules initialized ${n.map(i.formatModuleName)}`,e),i.info("🟢 Modules initialized")})}dispose(e,r){return Mo(this,void 0,void 0,function*(){const{modules:n}=this;yield Promise.allSettled(n.filter(i=>!!i.dispose).map(i=>Mo(this,void 0,void 0,function*(){var o;yield(o=i.dispose)===null||o===void 0?void 0:o.call(i,{ref:r,modules:e,instance:e[i.name]})})))})}}var Bc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},bs=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},up,hp,wu,fp,xu,S4;class LL{constructor(e,r){this.__type=e,up.set(this,void 0),hp.set(this,void 0),wu.set(this,!1),fp.set(this,void 0),xu.set(this,void 0),S4.set(this,Date.now()),Bc(this,up,r.detail,"f"),Bc(this,hp,r.source,"f"),Bc(this,fp,!!r.cancelable,"f"),Bc(this,xu,r.canBubble===void 0?!0:r.canBubble,"f")}get bubbles(){return bs(this,xu,"f")&&!bs(this,wu,"f")}get created(){return bs(this,S4,"f")}get cancelable(){return bs(this,fp,"f")}get canceled(){return bs(this,wu,"f")}get detail(){return bs(this,up,"f")}get source(){return bs(this,hp,"f")}get type(){return this.__type}preventDefault(){this.cancelable&&Bc(this,wu,!0,"f")}stopPropagation(){Bc(this,xu,!1,"f")}}up=new WeakMap,hp=new WeakMap,wu=new WeakMap,fp=new WeakMap,xu=new WeakMap,S4=new WeakMap;var OL=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class NL{constructor({onDispatch:e,onBubble:r}){this.__onDispatch=e,this.__onBubble=r}dispatch(e,r){var n,i;return OL(this,void 0,void 0,function*(){try{yield(n=this.__onDispatch)===null||n===void 0?void 0:n.call(this,e)}catch(a){throw a}const o=e;if(!o.dispatcher)o.dispatcher=this;else if(o.dispatcher===this)throw Error("loop detected");for(const a of r)e.cancelable?e.canceled||(yield Promise.resolve(a(e))):a(e);if(e.bubbles)try{yield(i=this.__onBubble)===null||i===void 0?void 0:i.call(this,e)}catch(a){throw a}})}}var _8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class DL extends Ne{get event$(){return this.__event$.asObservable()}get closed(){return this.__event$.closed}constructor(e){super(r=>{this.__event$.subscribe(r)}),this.__listeners=[],this.__event$=new rn,this.__dispatcher=new NL({onDispatch:e.onDispatch,onBubble:e.onBubble})}addEventListener(e,r){if(this.closed)throw Error("Cannot listen to events when provider is closed!");const n={type:e,handler:r};return this.__listeners.push(n),()=>{const i=this.__listeners.indexOf(n);0<=i&&this.__listeners.splice(i,1)}}dispatchEvent(e,r){return _8(this,void 0,void 0,function*(){if(typeof e=="string"){if(!r)throw Error("invalid arguments, missing [FrameworkEventInit]");return this._dispatchEvent(new LL(e,r))}else return this._dispatchEvent(e)})}_dispatchEvent(e){return _8(this,void 0,void 0,function*(){if(this.closed)throw Error("Cannot dispatch events when provider is closed!");this.__event$.next(e);try{const r=this.__listeners.filter(n=>n.type===e.type).map(({handler:n})=>n);yield this.__dispatcher.dispatch(e,r)}catch(r){throw r}return e})}dispose(){this.__listeners=[],this.__event$.complete()}}var b8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const VL="event",FL={name:VL,configure:t=>{const e={},r=t==null?void 0:t.event;return r&&(e.onBubble=n=>b8(void 0,void 0,void 0,function*(){yield r.dispatchEvent(n)})),e},initialize:({config:t})=>new DL(t),postInitialize:({instance:t,modules:e})=>b8(void 0,void 0,void 0,function*(){t.dispatchEvent("onModulesLoaded",{detail:e,source:t})}),dispose({instance:t}){t.dispose()}};class Rk{constructor(){this._operators={}}add(e,r){if(Object.keys(this._operators).includes(e))throw Error(`Operator [${e}] already defined`);return this.set(e,r)}set(e,r){return this._operators[e]=r,this}get(e){return this._operators[e]}process(e){return Object.values(this._operators).length?Dt(Object.values(this._operators)).pipe(RL((n,i)=>Promise.resolve(i(n)).then(o=>o??n),e,1),d1()):mn(e)}}const zL=(t,e)=>r=>{const n=new Headers(r.headers);return n.append(t,e),Object.assign(Object.assign({},r),{headers:n})};class Mk extends Rk{setHeader(e,r){const n=zL(e,r);return this.set("header-"+e,n)}}class jL extends Rk{}class UL{get clients(){return Object.assign({},this._clients)}constructor(e){this._clients={},this.defaultHttpRequestHandler=new Mk,this.defaultHttpClientCtor=e}hasClient(e){return Object.keys(this._clients).includes(e)}configureClient(e,r){const n=typeof r=="string"?o=>o.uri=String(r):r,i=typeof n=="function"?{onCreate:n}:n;return this._clients[e]=Object.assign(Object.assign({},this._clients[e]),i),this}}class BL extends Error{constructor(e){super(e)}}const qL=t=>new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(t);class WL{get defaultHttpRequestHandler(){return this.config.defaultHttpRequestHandler}constructor(e){this.config=e}hasClient(e){return Object.keys(this.config.clients).includes(e)}createClient(e){const r=this._resolveConfig(e),{baseUri:n,defaultScopes:i=[],onCreate:o,ctor:a=this.config.defaultHttpClientCtor,requestHandler:s=this.defaultHttpRequestHandler}=r,c={requestHandler:s},l=new a(n||"",c);return Object.assign(l,{defaultScopes:i}),o&&o(l),l}createCustomClient(e){return this.createClient(e)}_resolveConfig(e){if(typeof e=="string"){const r=this.config.clients[e];if(!r&&qL(e))return{baseUri:e};if(!r)throw new BL(`No registered http client for key [${e}]`);return r}return e}}function GL(t,e){e===void 0&&(e={});var r=e.selector,n=QE(e,["selector"]);return new Ne(function(i){var o=new AbortController,a=o.signal,s=!0,c=n.signal;if(c)if(c.aborted)o.abort();else{var l=function(){a.aborted||o.abort()};c.addEventListener("abort",l),i.add(function(){return c.removeEventListener("abort",l)})}var d=ur(ur({},n),{signal:a}),u=function(h){s=!1,i.error(h)};return fetch(t,d).then(function(h){r?bn(r(h)).subscribe(Tt(i,void 0,function(){s=!1,i.complete()},u)):(s=!1,i.next(h),i.complete())}).catch(u),function(){s&&o.abort()}})}class $h extends Error{constructor(e,r,n){super(e,n),this.response=r}}$h.Name="HttpResponseError";class Lh extends $h{constructor(e,r,n){super(e,r,n),this.name=Lh.Name,this.data=n==null?void 0:n.data}}Lh.Name="HttpJsonResponseError";var KL=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const YL=t=>KL(void 0,void 0,void 0,function*(){if(t.status===204)return Promise.resolve();try{const e=yield t.json();if(!t.ok)throw new Lh("network response was not OK",t,{data:e});return e}catch(e){throw new Lh("failed to parse response",t,{cause:e})}}),QL=t=>{if(!t.ok)throw new Error("network response was not OK");if(t.status===204)throw new Error("no content");try{return t.blob()}catch{throw Error("failed to parse response")}};var w8=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};class XL{get request$(){return this._request$.asObservable()}get response$(){return this._response$.asObservable()}constructor(e,r){var n,i;this.uri=e,this._request$=new rn,this._response$=new rn,this._abort$=new rn,this.requestHandler=(n=r==null?void 0:r.requestHandler)!==null&&n!==void 0?n:new Mk,this.responseHandler=(i=r==null?void 0:r.responseHandler)!==null&&i!==void 0?i:new jL,this._init()}_init(){}fetch$(e,r){return this._fetch$(e,r)}fetch(e,r){return $r(this.fetch$(e,r))}fetchAsync(e,r){return this.fetch(e,r)}json$(e,r){var n;const i=typeof(r==null?void 0:r.body)=="object"?JSON.stringify(r==null?void 0:r.body):r==null?void 0:r.body,o=(n=r==null?void 0:r.selector)!==null&&n!==void 0?n:YL,a=new Headers(r==null?void 0:r.headers);return a.append("Accept","application/json"),a.append("Content-Type","application/json"),this.fetch$(e,Object.assign(Object.assign({},r),{body:i,selector:o,headers:a}))}json(e,r){return $r(this.json$(e,r))}blob$(e,r){var n;const i=(n=r==null?void 0:r.selector)!==null&&n!==void 0?n:QL;return this.fetch$(e,Object.assign(Object.assign({},r),{selector:i}))}blob(e,r){return $r(this.blob$(e,r))}jsonAsync(e,r){return this.json(e,r)}execute(e,r,n){return this[e](r,n)}abort(){this._abort$.next()}_fetch$(e,r){const n=r||{},{selector:i}=n,o=w8(n,["selector"]);return mn(Object.assign(Object.assign({},o),{uri:this._resolveUrl(e)})).pipe(mt(s=>this._prepareRequest(s)),od(s=>this._request$.next(s)),mt(s=>{var{uri:c,path:l}=s,d=w8(s,["uri","path"]);return GL(c,d)}),mt(s=>this._prepareResponse(s)),od(s=>this._response$.next(s)),mt(s=>{if(i)try{return i(s)}catch(c){throw new $h("failed to execute response selector",s,{cause:c})}return mn(s)}),Gl(this._abort$))}_prepareRequest(e){return this.requestHandler.process(e)}_prepareResponse(e){return this.responseHandler.process(e)}_resolveUrl(e){const r=this.uri||window.location.origin;return new URL(e,r).href}}class JL extends XL{constructor(){super(...arguments),this.defaultScopes=[]}fetch$(e,r){const n=Object.assign(r||{},{scopes:this.defaultScopes.concat((r==null?void 0:r.scopes)||[])});return super._fetch$(e,n)}}var x8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const sy={name:"http",configure:()=>new UL(JL),initialize:({config:t,hasModule:e,requireInstance:r})=>x8(void 0,void 0,void 0,function*(){const n=new WL(t);if(e("auth")){const i=yield r("auth");n.defaultHttpRequestHandler.set("MSAL",o=>x8(void 0,void 0,void 0,function*(){const{scopes:a=[]}=o;if(a.length){const s=yield i.acquireToken({scopes:a});if(s){const c=new Headers(o.headers);return c.set("Authorization",`Bearer ${s.accessToken}`),Object.assign(Object.assign({},o),{headers:c})}}}))}return n})},eO=t=>({module:sy,configure:t}),Zk=(t,e)=>({module:sy,configure:r=>{r.configureClient(t,e)}}),mv="default";class tO{constructor(){this._configs={},this.requiresAuth=!0}get defaultConfig(){return this._configs[mv]}getClientConfig(e){return this._configs[e]}configureClient(e,r){return this._configs[e]=r,this}configureDefault(e){if(this._configs[mv])throw Error("Default AuthClient already provided");this.configureClient(mv,e)}}/*! @azure/msal-browser v2.38.3 2023-10-27 *//*! *****************************************************************************
|
|
43
|
+
`):"",this.name="UnsubscriptionError",this.errors=r}});function y2(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Tr=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,i,o;if(!this.closed){this.closed=!0;var a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=fn(a),c=s.next();!c.done;c=s.next()){var l=c.value;l.remove(this)}}catch(m){e={error:m}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}else a.remove(this);var d=this.initialTeardown;if(at(d))try{d()}catch(m){o=m instanceof hv?m.errors:[m]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var h=fn(u),f=h.next();!f.done;f=h.next()){var p=f.value;try{d8(p)}catch(m){o=o??[],m instanceof hv?o=is(is([],da(o)),da(m.errors)):o.push(m)}}}catch(m){n={error:m}}finally{try{f&&!f.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}if(o)throw new hv(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)d8(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&y2(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&y2(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),JE=Tr.EMPTY;function ek(t){return t instanceof Tr||t&&"closed"in t&&at(t.remove)&&at(t.add)&&at(t.unsubscribe)}function d8(t){at(t)?t():t.unsubscribe()}var tk={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},rk={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,is([t,e],da(r)))},clearTimeout:function(t){var e=rk.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function nk(t){rk.setTimeout(function(){throw t})}function _2(){}function cp(t){t()}var J3=function(t){on(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,ek(r)&&r.add(n)):n.destination=H$,n}return e.create=function(r,n,i){return new id(r,n,i)},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Tr),R$=Function.prototype.bind;function fv(t,e){return R$.call(t,e)}var M$=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){mf(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){mf(n)}else mf(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){mf(r)}},t}(),id=function(t){on(e,t);function e(r,n,i){var o=t.call(this)||this,a;if(at(r)||!r)a={next:r??void 0,error:n??void 0,complete:i??void 0};else{var s;o&&tk.useDeprecatedNextContext?(s=Object.create(r),s.unsubscribe=function(){return o.unsubscribe()},a={next:r.next&&fv(r.next,s),error:r.error&&fv(r.error,s),complete:r.complete&&fv(r.complete,s)}):a=r}return o.destination=new M$(a),o}return e}(J3);function mf(t){nk(t)}function Z$(t){throw t}var H$={closed:!0,next:_2,error:Z$,complete:_2},ey=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function ha(t){return t}function $$(t){return t.length===0?ha:t.length===1?t[0]:function(r){return t.reduce(function(n,i){return i(n)},r)}}var Ne=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var i=this,o=O$(e)?e:new id(e,r,n);return cp(function(){var a=i,s=a.operator,c=a.source;o.add(s?s.call(o,c):c?i._subscribe(o):i._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=u8(r),new r(function(i,o){var a=new id({next:function(s){try{e(s)}catch(c){o(c),a.unsubscribe()}},error:o,complete:i});n.subscribe(a)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[ey]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return $$(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=u8(e),new e(function(n,i){var o;r.subscribe(function(a){return o=a},function(a){return i(a)},function(){return n(o)})})},t.create=function(e){return new t(e)},t}();function u8(t){var e;return(e=t??tk.Promise)!==null&&e!==void 0?e:Promise}function L$(t){return t&&at(t.next)&&at(t.error)&&at(t.complete)}function O$(t){return t&&t instanceof J3||L$(t)&&ek(t)}function N$(t){return at(t==null?void 0:t.lift)}function $t(t){return function(e){if(N$(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Tt(t,e,r,n,i){return new D$(t,e,r,n,i)}var D$=function(t){on(e,t);function e(r,n,i,o,a,s){var c=t.call(this,r)||this;return c.onFinalize=a,c.shouldUnsubscribe=s,c._next=n?function(l){try{n(l)}catch(d){r.error(d)}}:t.prototype._next,c._error=o?function(l){try{o(l)}catch(d){r.error(d)}finally{this.unsubscribe()}}:t.prototype._error,c._complete=i?function(){try{i()}catch(l){r.error(l)}finally{this.unsubscribe()}}:t.prototype._complete,c}return e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e}(J3),V$=H0(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rn=function(t){on(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var n=new h8(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new V$},e.prototype.next=function(r){var n=this;cp(function(){var i,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var a=fn(n.currentObservers),s=a.next();!s.done;s=a.next()){var c=s.value;c.next(r)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}}})},e.prototype.error=function(r){var n=this;cp(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var i=n.observers;i.length;)i.shift().error(r)}})},e.prototype.complete=function(){var r=this;cp(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,i=this,o=i.hasError,a=i.isStopped,s=i.observers;return o||a?JE:(this.currentObservers=null,s.push(r),new Tr(function(){n.currentObservers=null,y2(s,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,i=n.hasError,o=n.thrownError,a=n.isStopped;i?r.error(o):a&&r.complete()},e.prototype.asObservable=function(){var r=new Ne;return r.source=this,r},e.create=function(r,n){return new h8(r,n)},e}(Ne),h8=function(t){on(e,t);function e(r,n){var i=t.call(this)||this;return i.destination=r,i.source=n,i}return e.prototype.next=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,r)},e.prototype.error=function(r){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&i!==void 0?i:JE},e}(rn),Ed=function(t){on(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,i=r.thrownError,o=r._value;if(n)throw i;return this._throwIfClosed(),o},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(rn),ty={now:function(){return(ty.delegate||Date).now()},delegate:void 0},ik=function(t){on(e,t);function e(r,n,i){r===void 0&&(r=1/0),n===void 0&&(n=1/0),i===void 0&&(i=ty);var o=t.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return e.prototype.next=function(r){var n=this,i=n.isStopped,o=n._buffer,a=n._infiniteTimeWindow,s=n._timestampProvider,c=n._windowTime;i||(o.push(r),!a&&o.push(s.now()+c)),this._trimBuffer(),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),i=this,o=i._infiniteTimeWindow,a=i._buffer,s=a.slice(),c=0;c<s.length&&!r.closed;c+=o?1:2)r.next(s[c]);return this._checkFinalizedStatuses(r),n},e.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,i=r._timestampProvider,o=r._buffer,a=r._infiniteTimeWindow,s=(a?1:2)*n;if(n<1/0&&s<o.length&&o.splice(0,o.length-s),!a){for(var c=i.now(),l=0,d=1;d<o.length&&o[d]<=c;d+=2)l=d;l&&o.splice(0,l+1)}},e}(rn),F$=function(t){on(e,t);function e(r,n){return t.call(this)||this}return e.prototype.schedule=function(r,n){return this},e}(Tr),E4={setInterval:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setInterval.apply(void 0,is([t,e],da(r)))},clearInterval:function(t){var e=E4.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(t)},delegate:void 0},z$=function(t){on(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.scheduler=r,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(r,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=r;var o=this.id,a=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(a,o,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(a,this.id,n),this},e.prototype.requestAsyncId=function(r,n,i){return i===void 0&&(i=0),E4.setInterval(r.flush.bind(r,this),i)},e.prototype.recycleAsyncId=function(r,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&E4.clearInterval(n)},e.prototype.execute=function(r,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(r,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(r,n){var i=!1,o;try{this.work(r)}catch(a){i=!0,o=a||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},e.prototype.unsubscribe=function(){if(!this.closed){var r=this,n=r.id,i=r.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,y2(o,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(F$),f8=function(){function t(e,r){r===void 0&&(r=t.now),this.schedulerActionCtor=e,this.now=r}return t.prototype.schedule=function(e,r,n){return r===void 0&&(r=0),new this.schedulerActionCtor(this,e).schedule(n,r)},t.now=ty.now,t}(),j$=function(t){on(e,t);function e(r,n){n===void 0&&(n=f8.now);var i=t.call(this,r,n)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(r){var n=this.actions;if(this._active){n.push(r);return}var i;this._active=!0;do if(i=r.execute(r.state,r.delay))break;while(r=n.shift());if(this._active=!1,i){for(;r=n.shift();)r.unsubscribe();throw i}},e}(f8),b2=new j$(z$),U$=b2,Zt=new Ne(function(t){return t.complete()});function ok(t){return t&&at(t.schedule)}function ak(t){return t[t.length-1]}function ry(t){return at(ak(t))?t.pop():void 0}function ny(t){return ok(ak(t))?t.pop():void 0}var iy=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function sk(t){return at(t==null?void 0:t.then)}function ck(t){return at(t[ey])}function lk(t){return Symbol.asyncIterator&&at(t==null?void 0:t[Symbol.asyncIterator])}function dk(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function B$(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var uk=B$();function hk(t){return at(t==null?void 0:t[uk])}function fk(t){return T$(this,arguments,function(){var r,n,i,o;return XE(this,function(a){switch(a.label){case 0:r=t.getReader(),a.label=1;case 1:a.trys.push([1,,9,10]),a.label=2;case 2:return[4,ql(r.read())];case 3:return n=a.sent(),i=n.value,o=n.done,o?[4,ql(void 0)]:[3,5];case 4:return[2,a.sent()];case 5:return[4,ql(i)];case 6:return[4,a.sent()];case 7:return a.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function pk(t){return at(t==null?void 0:t.getReader)}function bn(t){if(t instanceof Ne)return t;if(t!=null){if(ck(t))return q$(t);if(iy(t))return W$(t);if(sk(t))return G$(t);if(lk(t))return mk(t);if(hk(t))return K$(t);if(pk(t))return Y$(t)}throw dk(t)}function q$(t){return new Ne(function(e){var r=t[ey]();if(at(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function W$(t){return new Ne(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}function G$(t){return new Ne(function(e){t.then(function(r){e.closed||(e.next(r),e.complete())},function(r){return e.error(r)}).then(null,nk)})}function K$(t){return new Ne(function(e){var r,n;try{for(var i=fn(t),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.next(a),e.closed)return}}catch(s){r={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}e.complete()})}function mk(t){return new Ne(function(e){Q$(t,e).catch(function(r){return e.error(r)})})}function Y$(t){return mk(fk(t))}function Q$(t,e){var r,n,i,o;return ra(this,void 0,void 0,function(){var a,s;return XE(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),r=P$(t),c.label=1;case 1:return[4,r.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(a=n.value,e.next(a),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=c.sent(),i={error:s},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function wo(t,e,r,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var o=e.schedule(function(){r(),i?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!i)return o}function w2(t,e){return e===void 0&&(e=0),$t(function(r,n){r.subscribe(Tt(n,function(i){return wo(n,t,function(){return n.next(i)},e)},function(){return wo(n,t,function(){return n.complete()},e)},function(i){return wo(n,t,function(){return n.error(i)},e)}))})}function vk(t,e){return e===void 0&&(e=0),$t(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}function X$(t,e){return bn(t).pipe(vk(e),w2(e))}function J$(t,e){return bn(t).pipe(vk(e),w2(e))}function eL(t,e){return new Ne(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function tL(t,e){return new Ne(function(r){var n;return wo(r,e,function(){n=t[uk](),wo(r,e,function(){var i,o,a;try{i=n.next(),o=i.value,a=i.done}catch(s){r.error(s);return}a?r.complete():r.next(o)},0,!0)}),function(){return at(n==null?void 0:n.return)&&n.return()}})}function gk(t,e){if(!t)throw new Error("Iterable cannot be null");return new Ne(function(r){wo(r,e,function(){var n=t[Symbol.asyncIterator]();wo(r,e,function(){n.next().then(function(i){i.done?r.complete():r.next(i.value)})},0,!0)})})}function rL(t,e){return gk(fk(t),e)}function nL(t,e){if(t!=null){if(ck(t))return X$(t,e);if(iy(t))return eL(t,e);if(sk(t))return J$(t,e);if(lk(t))return gk(t,e);if(hk(t))return tL(t,e);if(pk(t))return rL(t,e)}throw dk(t)}function Dt(t,e){return e?nL(t,e):bn(t)}function mn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ny(t);return Dt(t,r)}function yk(t,e){var r=at(t)?t:function(){return t},n=function(i){return i.error(r())};return new Ne(e?function(i){return e.schedule(n,0,i)}:n)}var l1=H0(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function yr(t,e){var r=typeof e=="object";return new Promise(function(n,i){var o=!1,a;t.subscribe({next:function(s){a=s,o=!0},error:i,complete:function(){o?n(a):r?n(e.defaultValue):i(new l1)}})})}function $r(t,e){var r=typeof e=="object";return new Promise(function(n,i){var o=new id({next:function(a){n(a),o.unsubscribe()},error:i,complete:function(){r?n(e.defaultValue):i(new l1)}});t.subscribe(o)})}function _k(t){return t instanceof Date&&!isNaN(t)}var iL=H0(function(t){return function(r){r===void 0&&(r=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=r}});function oL(t,e){var r=_k(t)?{first:t}:typeof t=="number"?{each:t}:t,n=r.first,i=r.each,o=r.with,a=o===void 0?aL:o,s=r.scheduler,c=s===void 0?e??b2:s,l=r.meta,d=l===void 0?null:l;if(n==null&&i==null)throw new TypeError("No timeout provided.");return $t(function(u,h){var f,p,m=null,w=0,g=function(v){p=wo(h,c,function(){try{f.unsubscribe(),bn(a({meta:d,lastValue:m,seen:w})).subscribe(h)}catch(b){h.error(b)}},v)};f=u.subscribe(Tt(h,function(v){p==null||p.unsubscribe(),w++,h.next(m=v),i>0&&g(i)},void 0,void 0,function(){p!=null&&p.closed||p==null||p.unsubscribe(),m=null})),!w&&g(n!=null?typeof n=="number"?n:+n-c.now():i)})}function aL(t){throw new iL(t)}function Se(t,e){return $t(function(r,n){var i=0;r.subscribe(Tt(n,function(o){n.next(t.call(e,o,i++))}))})}var sL=Array.isArray;function cL(t,e){return sL(e)?t.apply(void 0,is([],da(e))):t(e)}function oy(t){return Se(function(e){return cL(t,e)})}var lL=Array.isArray,dL=Object.getPrototypeOf,uL=Object.prototype,hL=Object.keys;function bk(t){if(t.length===1){var e=t[0];if(lL(e))return{args:e,keys:null};if(fL(e)){var r=hL(e);return{args:r.map(function(n){return e[n]}),keys:r}}}return{args:t,keys:null}}function fL(t){return t&&typeof t=="object"&&dL(t)===uL}function wk(t,e){return t.reduce(function(r,n,i){return r[n]=e[i],r},{})}function pL(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ny(t),n=ry(t),i=bk(t),o=i.args,a=i.keys;if(o.length===0)return Dt([],r);var s=new Ne(mL(o,r,a?function(c){return wk(a,c)}:ha));return n?s.pipe(oy(n)):s}function mL(t,e,r){return r===void 0&&(r=ha),function(n){p8(e,function(){for(var i=t.length,o=new Array(i),a=i,s=i,c=function(d){p8(e,function(){var u=Dt(t[d],e),h=!1;u.subscribe(Tt(n,function(f){o[d]=f,h||(h=!0,s--),s||n.next(r(o.slice()))},function(){--a||n.complete()}))},n)},l=0;l<i;l++)c(l)},n)}}function p8(t,e,r){t?wo(r,t,e):e()}function xk(t,e,r,n,i,o,a,s){var c=[],l=0,d=0,u=!1,h=function(){u&&!c.length&&!l&&e.complete()},f=function(m){return l<n?p(m):c.push(m)},p=function(m){o&&e.next(m),l++;var w=!1;bn(r(m,d++)).subscribe(Tt(e,function(g){i==null||i(g),o?f(g):e.next(g)},function(){w=!0},void 0,function(){if(w)try{l--;for(var g=function(){var v=c.shift();a?wo(e,a,function(){return p(v)}):p(v)};c.length&&l<n;)g();h()}catch(v){e.error(v)}}))};return t.subscribe(Tt(e,f,function(){u=!0,h()})),function(){s==null||s()}}function Ln(t,e,r){return r===void 0&&(r=1/0),at(e)?Ln(function(n,i){return Se(function(o,a){return e(n,o,i,a)})(bn(t(n,i)))},r):(typeof e=="number"&&(r=e),$t(function(n,i){return xk(n,i,t,r)}))}function vL(t){return t===void 0&&(t=1/0),Ln(ha,t)}function gL(){return vL(1)}function Wl(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return gL()(Dt(t,ny(t)))}function yL(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ry(t),n=bk(t),i=n.args,o=n.keys,a=new Ne(function(s){var c=i.length;if(!c){s.complete();return}for(var l=new Array(c),d=c,u=c,h=function(p){var m=!1;bn(i[p]).subscribe(Tt(s,function(w){m||(m=!0,u--),l[p]=w},function(){return d--},void 0,function(){(!d||!m)&&(u||s.next(o?wk(o,l):l),s.complete())}))},f=0;f<c;f++)h(f)});return r?a.pipe(oy(r)):a}var _L=["addListener","removeListener"],bL=["addEventListener","removeEventListener"],wL=["on","off"];function eh(t,e,r,n){if(at(r)&&(n=r,r=void 0),n)return eh(t,e,r).pipe(oy(n));var i=da(EL(t)?bL.map(function(s){return function(c){return t[s](e,c,r)}}):xL(t)?_L.map(m8(t,e)):CL(t)?wL.map(m8(t,e)):[],2),o=i[0],a=i[1];if(!o&&iy(t))return Ln(function(s){return eh(s,e,r)})(bn(t));if(!o)throw new TypeError("Invalid event target");return new Ne(function(s){var c=function(){for(var l=[],d=0;d<arguments.length;d++)l[d]=arguments[d];return s.next(1<l.length?l:l[0])};return o(c),function(){return a(c)}})}function m8(t,e){return function(r){return function(n){return t[r](e,n)}}}function xL(t){return at(t.addListener)&&at(t.removeListener)}function CL(t){return at(t.on)&&at(t.off)}function EL(t){return at(t.addEventListener)&&at(t.removeEventListener)}function kL(t,e,r){t===void 0&&(t=0),r===void 0&&(r=U$);var n=-1;return e!=null&&(ok(e)?r=e:n=e),new Ne(function(i){var o=_k(t)?+t-r.now():t;o<0&&(o=0);var a=0;return r.schedule(function(){i.closed||(i.next(a++),0<=n?this.schedule(void 0,n):i.complete())},o)})}function Ue(t,e){return $t(function(r,n){var i=0;r.subscribe(Tt(n,function(o){return t.call(e,o,i++)&&n.next(o)}))})}function Xt(t){return $t(function(e,r){var n=null,i=!1,o;n=e.subscribe(Tt(r,void 0,void 0,function(a){o=bn(t(a,Xt(t)(e))),n?(n.unsubscribe(),n=null,o.subscribe(r)):i=!0})),i&&(n.unsubscribe(),n=null,o.subscribe(r))})}function Ck(t,e,r,n,i){return function(o,a){var s=r,c=e,l=0;o.subscribe(Tt(a,function(d){var u=l++;c=s?t(c,d,u):(s=!0,d),n&&a.next(c)},i&&function(){s&&a.next(c),a.complete()}))}}function x2(t,e){return $t(Ck(t,e,arguments.length>=2,!1,!0))}function k4(t,e){return at(e)?Ln(t,e,1):Ln(t,1)}function Ek(t){return $t(function(e,r){var n=!1;e.subscribe(Tt(r,function(i){n=!0,r.next(i)},function(){n||r.next(t),r.complete()}))})}function bu(t){return t<=0?function(){return Zt}:$t(function(e,r){var n=0;e.subscribe(Tt(r,function(i){++n<=t&&(r.next(i),t<=n&&r.complete())}))})}function kk(t,e){return e===void 0&&(e=ha),t=t??SL,$t(function(r,n){var i,o=!0;r.subscribe(Tt(n,function(a){var s=e(a);(o||!t(i,s))&&(o=!1,i=s,n.next(a))}))})}function SL(t,e){return t===e}function Sk(t){return t===void 0&&(t=AL),$t(function(e,r){var n=!1;e.subscribe(Tt(r,function(i){n=!0,r.next(i)},function(){return n?r.complete():r.error(t())}))})}function AL(){return new l1}function C2(t){return $t(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})}function Jd(t,e){return $t(IL(t,e,"value"))}function IL(t,e,r){var n=r==="index";return function(i,o){var a=0;i.subscribe(Tt(o,function(s){var c=a++;t.call(e,s,c,i)&&(o.next(n?c:s),o.complete())},function(){o.next(n?-1:void 0),o.complete()}))}}function TL(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Ue(function(i,o){return t(i,o,n)}):ha,bu(1),r?Ek(e):Sk(function(){return new l1}))}}function PL(t){return t<=0?function(){return Zt}:$t(function(e,r){var n=[];e.subscribe(Tt(r,function(i){n.push(i),t<n.length&&n.shift()},function(){var i,o;try{for(var a=fn(n),s=a.next();!s.done;s=a.next()){var c=s.value;r.next(c)}}catch(l){i={error:l}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}r.complete()},void 0,function(){n=null}))})}function d1(t,e){var r=arguments.length>=2;return function(n){return n.pipe(t?Ue(function(i,o){return t(i,o,n)}):ha,PL(1),r?Ek(e):Sk(function(){return new l1}))}}function RL(t,e,r){return r===void 0&&(r=1/0),$t(function(n,i){var o=e;return xk(n,i,function(a,s){return t(o,a,s)},r,function(a){o=a},!1,void 0,function(){return o=null})})}function E2(){return $t(function(t,e){var r,n=!1;t.subscribe(Tt(e,function(i){var o=r;r=i,n&&e.next([o,i]),n=!0}))})}function Ak(t,e){return $t(Ck(t,e,arguments.length>=2,!0))}function $0(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new rn}:e,n=t.resetOnError,i=n===void 0?!0:n,o=t.resetOnComplete,a=o===void 0?!0:o,s=t.resetOnRefCountZero,c=s===void 0?!0:s;return function(l){var d,u,h,f=0,p=!1,m=!1,w=function(){u==null||u.unsubscribe(),u=void 0},g=function(){w(),d=h=void 0,p=m=!1},v=function(){var b=d;g(),b==null||b.unsubscribe()};return $t(function(b,E){f++,!m&&!p&&w();var k=h=h??r();E.add(function(){f--,f===0&&!m&&!p&&(u=pv(v,c))}),k.subscribe(E),!d&&f>0&&(d=new id({next:function(x){return k.next(x)},error:function(x){m=!0,w(),u=pv(g,i,x),k.error(x)},complete:function(){p=!0,w(),u=pv(g,a),k.complete()}}),bn(b).subscribe(d))})(l)}}function pv(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(e===!0){t();return}if(e!==!1){var i=new id({next:function(){i.unsubscribe(),t()}});return bn(e.apply(void 0,is([],da(r)))).subscribe(i)}}function ML(t,e,r){var n,i,o,a,s=!1;return t&&typeof t=="object"?(n=t.bufferSize,a=n===void 0?1/0:n,i=t.windowTime,e=i===void 0?1/0:i,o=t.refCount,s=o===void 0?!1:o,r=t.scheduler):a=t??1/0,$0({connector:function(){return new ik(a,e,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:s})}function mt(t,e){return $t(function(r,n){var i=null,o=0,a=!1,s=function(){return a&&!i&&n.complete()};r.subscribe(Tt(n,function(c){i==null||i.unsubscribe();var l=0,d=o++;bn(t(c,d)).subscribe(i=Tt(n,function(u){return n.next(e?e(c,u,d,l++):u)},function(){i=null,s()}))},function(){a=!0,s()}))})}function Gl(t){return $t(function(e,r){bn(t).subscribe(Tt(r,function(){return r.complete()},_2)),!r.closed&&e.subscribe(r)})}function Ik(t,e){return e===void 0&&(e=!1),$t(function(r,n){var i=0;r.subscribe(Tt(n,function(o){var a=t(o,i++);(a||e)&&n.next(o),!a&&n.complete()}))})}function od(t,e,r){var n=at(t)||e||r?{next:t,error:e,complete:r}:t;return n?$t(function(i,o){var a;(a=n.subscribe)===null||a===void 0||a.call(n);var s=!0;i.subscribe(Tt(o,function(c){var l;(l=n.next)===null||l===void 0||l.call(n,c),o.next(c)},function(){var c;s=!1,(c=n.complete)===null||c===void 0||c.call(n),o.complete()},function(c){var l;s=!1,(l=n.error)===null||l===void 0||l.call(n,c),o.error(c)},function(){var c,l;s&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(l=n.finalize)===null||l===void 0||l.call(n)}))}):ha}function ay(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=ry(t);return $t(function(n,i){for(var o=t.length,a=new Array(o),s=t.map(function(){return!1}),c=!1,l=function(u){bn(t[u]).subscribe(Tt(i,function(h){a[u]=h,!c&&!s[u]&&(s[u]=!0,(c=s.every(ha))&&(s=null))},_2))},d=0;d<o;d++)l(d);n.subscribe(Tt(i,function(u){if(c){var h=is([u],da(a));i.next(r?r.apply(void 0,is([],da(h))):h)}}))})}var v8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},g8=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},lp;const Tk=(t,e,r)=>{var n;const i=typeof e=="string"?e.split("."):e,o=i.shift();return o&&((n=t[o])!==null&&n!==void 0||(t[o]={}),i.length?Tk(t[o],i,r):Object.assign(t,{[o]:r})),t};class ZL{constructor(){lp.set(this,{})}createConfig(e,r){return this._createConfig(e,r)}createConfigAsync(e,r){return v8(this,void 0,void 0,function*(){return yr(this.createConfig(e,r))})}_set(e,r){g8(this,lp,"f")[e]=r}_createConfig(e,r){return this._buildConfig(e,r).pipe(Ln(n=>this._processConfig(n,e)))}_buildConfig(e,r){return Dt(Object.entries(g8(this,lp,"f"))).pipe(Ln(n=>v8(this,[n],void 0,function*([i,o]){const a=yield o(e);return{target:i,value:a}})),x2((n,{target:i,value:o})=>Tk(n,i,o),r??{}))}_processConfig(e,r){return mn(e)}}lp=new WeakMap;var vf=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},y8=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},dp,al;class Pk{get version(){return vf(this,dp,"f")}constructor(e){dp.set(this,void 0),al.set(this,void 0);const{version:r}=e;y8(this,dp,new Ju(r),"f"),y8(this,al,new Tr,"f")}_addTeardown(e){return vf(this,al,"f").add(e),()=>vf(this,al,"f").remove(e)}dispose(){vf(this,al,"f").unsubscribe()}}dp=new WeakMap,al=new WeakMap;var Mo=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class HL extends Error{constructor(){super("It was too slow"),this.name="RequiredModuleTimeoutError"}}class $L{constructor(e){this.logger=new YE("ModulesConfigurator"),this._configs=[],this._afterConfiguration=[],this._afterInit=[],this._modules=new Set(e)}get modules(){return[...this._modules]}configure(...e){e.forEach(r=>this.addConfig(r))}addConfig(e){const{module:r,afterConfig:n,afterInit:i,configure:o}=e;this._modules.add(r),o&&this._configs.push((a,s)=>o(a[r.name],s)),n&&this._afterConfiguration.push(a=>n(a[r.name])),i&&this._afterInit.push(a=>i(a[r.name]))}onConfigured(e){this._afterConfiguration.push(e)}onInitialized(e){this._afterInit.push(e)}initialize(e){return Mo(this,void 0,void 0,function*(){const r=yield this._configure(e),n=yield this._initialize(r,e);return yield this._postInitialize(n,e),Object.seal(Object.assign({},n,{dispose:()=>this.dispose(n)}))})}_configure(e){return Mo(this,void 0,void 0,function*(){const r=yield this._createConfig(e);return yield Promise.all(this._configs.map(n=>Promise.resolve(n(r,e)))),yield this._postConfigure(r),r})}_createConfig(e){const{modules:r,logger:n,_afterConfiguration:i,_afterInit:o}=this,a=Dt(r).pipe(Ln(s=>Mo(this,void 0,void 0,function*(){var c;n.debug(`🛠 creating configurator ${n.formatModuleName(s)}`);try{const l=yield(c=s.configure)===null||c===void 0?void 0:c.call(s,e);return n.debug(`🛠 created configurator for ${n.formatModuleName(s)}`,l),{[s.name]:l}}catch(l){throw n.error(`🛠 Failed to created configurator for ${n.formatModuleName(s)}`,l),l}})),Ak((s,c)=>Object.assign(s,c),{onAfterConfiguration(s){i.push(s)},onAfterInit(s){o.push(s)}}));return yr(a)}_postConfigure(e){return Mo(this,void 0,void 0,function*(){const{modules:r,logger:n,_afterConfiguration:i}=this;if(yield Promise.allSettled(r.filter(o=>!!o.postConfigure).map(o=>Mo(this,void 0,void 0,function*(){var a;try{yield(a=o.postConfigure)===null||a===void 0?void 0:a.call(o,e),n.debug(`🏗📌 post configured ${n.formatModuleName(o)}`,o)}catch{n.warn(`🏗📌 post configure failed ${n.formatModuleName(o)}`)}}))),i.length)try{n.debug(`🏗📌 post configure hooks [${i.length}]`),yield Promise.allSettled(i.map(o=>Promise.resolve(o(e)))),n.debug("🏗📌 post configure hooks complete")}catch(o){n.warn("🏗📌 post configure hook failed",o)}})}_initialize(e,r){return Mo(this,void 0,void 0,function*(){const{modules:n,logger:i}=this,o=n.map(d=>d.name),a=new Ed({}),s=d=>o.includes(d),c=(d,u=60)=>{if(!o.includes(d))throw i.error(`🚀⌛️ Cannot not require ${i.formatModuleName(String(d))} since module is not defined!`),Error(`cannot not require [${String(d)}] since module is not defined!`);return a.value[d]?(i.debug(`🚀⌛️ ${i.formatModuleName(String(d))} is initiated, skipping queue`),Promise.resolve(a.value[d])):(i.debug(`🚀⌛️ Awaiting init ${i.formatModuleName(String(d))}, timeout ${u}s`),$r(a.pipe(Ue(h=>!!h[d]),Se(h=>h[d]),oL({each:u*1e3,with:()=>yk(()=>new HL)}))))};Dt(n).pipe(Ln(d=>{const u=d.name;return i.debug(`🚀 initializing ${i.formatModuleName(d)}`),Dt(Promise.resolve(d.initialize({ref:r,config:e[u],requireInstance:c,hasModule:s}))).pipe(Se(h=>{var f;if(!(h instanceof Pk)&&!(h.version instanceof Ju)){i.debug("🤷 module does not extends the [BaseModuleProvider] or exposes [SemanticVersion]");try{h.version=d.version instanceof Ju?d.version:new Ju((f=d.version)!==null&&f!==void 0?f:"0.0.0-unknown")}catch{i.error("🚨 failed to set module version")}}return i.debug(`🚀 initialized ${i.formatModuleName(d)}`),[u,h]}))})).subscribe({next:([d,u])=>{a.next(Object.assign(a.value,{[d]:u}))},complete:()=>a.complete()});const l=yield yr(a);return Object.seal(l),l})}_postInitialize(e,r){return Mo(this,void 0,void 0,function*(){const{modules:n,logger:i,_afterInit:o}=this,a=Dt(n).pipe(Ue(s=>!!s.postInitialize),od(s=>i.debug(`🚀📌 post initializing moule ${i.formatModuleName(s)}`)),Ln(s=>Dt(s.postInitialize({ref:r,modules:e,instance:e[s.name]})).pipe(od(()=>{i.debug(`🚀📌 post initialized moule ${i.formatModuleName(s)}`)}),Xt(c=>(i.warn(`🚀📌 post initialize failed moule ${i.formatModuleName(s)}`,c),Zt)))));if(yield yr(a),o.length)try{i.debug(`🚀📌 post configure hooks [${o.length}]`),yield Promise.allSettled(o.map(s=>Promise.resolve(s(e)))),i.debug("🚀📌 post configure hooks complete")}catch(s){i.warn("🚀📌 post configure hook failed",s)}i.debug(`🎉 Modules initialized ${n.map(i.formatModuleName)}`,e),i.info("🟢 Modules initialized")})}dispose(e,r){return Mo(this,void 0,void 0,function*(){const{modules:n}=this;yield Promise.allSettled(n.filter(i=>!!i.dispose).map(i=>Mo(this,void 0,void 0,function*(){var o;yield(o=i.dispose)===null||o===void 0?void 0:o.call(i,{ref:r,modules:e,instance:e[i.name]})})))})}}var Bc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},bs=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},up,hp,wu,fp,xu,S4;class LL{constructor(e,r){this.__type=e,up.set(this,void 0),hp.set(this,void 0),wu.set(this,!1),fp.set(this,void 0),xu.set(this,void 0),S4.set(this,Date.now()),Bc(this,up,r.detail,"f"),Bc(this,hp,r.source,"f"),Bc(this,fp,!!r.cancelable,"f"),Bc(this,xu,r.canBubble===void 0?!0:r.canBubble,"f")}get bubbles(){return bs(this,xu,"f")&&!bs(this,wu,"f")}get created(){return bs(this,S4,"f")}get cancelable(){return bs(this,fp,"f")}get canceled(){return bs(this,wu,"f")}get detail(){return bs(this,up,"f")}get source(){return bs(this,hp,"f")}get type(){return this.__type}preventDefault(){this.cancelable&&Bc(this,wu,!0,"f")}stopPropagation(){Bc(this,xu,!1,"f")}}up=new WeakMap,hp=new WeakMap,wu=new WeakMap,fp=new WeakMap,xu=new WeakMap,S4=new WeakMap;var OL=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class NL{constructor({onDispatch:e,onBubble:r}){this.__onDispatch=e,this.__onBubble=r}dispatch(e,r){return OL(this,void 0,void 0,function*(){var n,i;try{yield(n=this.__onDispatch)===null||n===void 0?void 0:n.call(this,e)}catch(a){throw a}const o=e;if(!o.dispatcher)o.dispatcher=this;else if(o.dispatcher===this)throw Error("loop detected");for(const a of r)e.cancelable?e.canceled||(yield Promise.resolve(a(e))):a(e);if(e.bubbles)try{yield(i=this.__onBubble)===null||i===void 0?void 0:i.call(this,e)}catch(a){throw a}})}}var _8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class DL extends Ne{get event$(){return this.__event$.asObservable()}get closed(){return this.__event$.closed}constructor(e){super(r=>{this.__event$.subscribe(r)}),this.__listeners=[],this.__event$=new rn,this.__dispatcher=new NL({onDispatch:e.onDispatch,onBubble:e.onBubble})}addEventListener(e,r){if(this.closed)throw Error("Cannot listen to events when provider is closed!");const n={type:e,handler:r};return this.__listeners.push(n),()=>{const i=this.__listeners.indexOf(n);0<=i&&this.__listeners.splice(i,1)}}dispatchEvent(e,r){return _8(this,void 0,void 0,function*(){if(typeof e=="string"){if(!r)throw Error("invalid arguments, missing [FrameworkEventInit]");return this._dispatchEvent(new LL(e,r))}else return this._dispatchEvent(e)})}_dispatchEvent(e){return _8(this,void 0,void 0,function*(){if(this.closed)throw Error("Cannot dispatch events when provider is closed!");this.__event$.next(e);try{const r=this.__listeners.filter(n=>n.type===e.type).map(({handler:n})=>n);yield this.__dispatcher.dispatch(e,r)}catch(r){throw r}return e})}dispose(){this.__listeners=[],this.__event$.complete()}}var b8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const VL="event",FL={name:VL,configure:t=>{const e={},r=t==null?void 0:t.event;return r&&(e.onBubble=n=>b8(void 0,void 0,void 0,function*(){yield r.dispatchEvent(n)})),e},initialize:({config:t})=>new DL(t),postInitialize:t=>b8(void 0,[t],void 0,function*({instance:e,modules:r}){e.dispatchEvent("onModulesLoaded",{detail:r,source:e})}),dispose({instance:t}){t.dispose()}};class Rk{constructor(){this._operators={}}add(e,r){if(Object.keys(this._operators).includes(e))throw Error(`Operator [${e}] already defined`);return this.set(e,r)}set(e,r){return this._operators[e]=r,this}get(e){return this._operators[e]}process(e){return Object.values(this._operators).length?Dt(Object.values(this._operators)).pipe(RL((n,i)=>Promise.resolve(i(n)).then(o=>o??n),e,1),d1()):mn(e)}}const zL=(t,e)=>r=>{const n=new Headers(r.headers);return n.append(t,e),Object.assign(Object.assign({},r),{headers:n})};class Mk extends Rk{setHeader(e,r){const n=zL(e,r);return this.set("header-"+e,n)}}class jL extends Rk{}class UL{get clients(){return Object.assign({},this._clients)}constructor(e){this._clients={},this.defaultHttpRequestHandler=new Mk,this.defaultHttpClientCtor=e}hasClient(e){return Object.keys(this._clients).includes(e)}configureClient(e,r){const n=typeof r=="string"?o=>o.uri=String(r):r,i=typeof n=="function"?{onCreate:n}:n;return this._clients[e]=Object.assign(Object.assign({},this._clients[e]),i),this}}class BL extends Error{constructor(e){super(e)}}const qL=t=>new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(t);class WL{get defaultHttpRequestHandler(){return this.config.defaultHttpRequestHandler}constructor(e){this.config=e}hasClient(e){return Object.keys(this.config.clients).includes(e)}createClient(e){const r=this._resolveConfig(e),{baseUri:n,defaultScopes:i=[],onCreate:o,ctor:a=this.config.defaultHttpClientCtor,requestHandler:s=this.defaultHttpRequestHandler}=r,c={requestHandler:s},l=new a(n||"",c);return Object.assign(l,{defaultScopes:i}),o&&o(l),l}createCustomClient(e){return this.createClient(e)}_resolveConfig(e){if(typeof e=="string"){const r=this.config.clients[e];if(!r&&qL(e))return{baseUri:e};if(!r)throw new BL(`No registered http client for key [${e}]`);return r}return e}}function GL(t,e){e===void 0&&(e={});var r=e.selector,n=QE(e,["selector"]);return new Ne(function(i){var o=new AbortController,a=o.signal,s=!0,c=n.signal;if(c)if(c.aborted)o.abort();else{var l=function(){a.aborted||o.abort()};c.addEventListener("abort",l),i.add(function(){return c.removeEventListener("abort",l)})}var d=ur(ur({},n),{signal:a}),u=function(h){s=!1,i.error(h)};return fetch(t,d).then(function(h){r?bn(r(h)).subscribe(Tt(i,void 0,function(){s=!1,i.complete()},u)):(s=!1,i.next(h),i.complete())}).catch(u),function(){s&&o.abort()}})}class $h extends Error{constructor(e,r,n){super(e,n),this.response=r}}$h.Name="HttpResponseError";class Lh extends $h{constructor(e,r,n){super(e,r,n),this.name=Lh.Name,this.data=n==null?void 0:n.data}}Lh.Name="HttpJsonResponseError";var KL=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const YL=t=>KL(void 0,void 0,void 0,function*(){if(t.status===204)return Promise.resolve();try{const e=yield t.json();if(!t.ok)throw new Lh("network response was not OK",t,{data:e});return e}catch(e){throw new Lh("failed to parse response",t,{cause:e})}}),QL=t=>{if(!t.ok)throw new Error("network response was not OK");if(t.status===204)throw new Error("no content");try{return t.blob()}catch{throw Error("failed to parse response")}};var w8=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};class XL{get request$(){return this._request$.asObservable()}get response$(){return this._response$.asObservable()}constructor(e,r){var n,i;this.uri=e,this._request$=new rn,this._response$=new rn,this._abort$=new rn,this.requestHandler=(n=r==null?void 0:r.requestHandler)!==null&&n!==void 0?n:new Mk,this.responseHandler=(i=r==null?void 0:r.responseHandler)!==null&&i!==void 0?i:new jL,this._init()}_init(){}fetch$(e,r){return this._fetch$(e,r)}fetch(e,r){return $r(this.fetch$(e,r))}fetchAsync(e,r){return this.fetch(e,r)}json$(e,r){var n;const i=typeof(r==null?void 0:r.body)=="object"?JSON.stringify(r==null?void 0:r.body):r==null?void 0:r.body,o=(n=r==null?void 0:r.selector)!==null&&n!==void 0?n:YL,a=new Headers(r==null?void 0:r.headers);return a.append("Accept","application/json"),a.append("Content-Type","application/json"),this.fetch$(e,Object.assign(Object.assign({},r),{body:i,selector:o,headers:a}))}json(e,r){return $r(this.json$(e,r))}blob$(e,r){var n;const i=(n=r==null?void 0:r.selector)!==null&&n!==void 0?n:QL;return this.fetch$(e,Object.assign(Object.assign({},r),{selector:i}))}blob(e,r){return $r(this.blob$(e,r))}jsonAsync(e,r){return this.json(e,r)}execute(e,r,n){return this[e](r,n)}abort(){this._abort$.next()}_fetch$(e,r){const n=r||{},{selector:i}=n,o=w8(n,["selector"]);return mn(Object.assign(Object.assign({},o),{uri:this._resolveUrl(e)})).pipe(mt(s=>this._prepareRequest(s)),od(s=>this._request$.next(s)),mt(s=>{var{uri:c,path:l}=s,d=w8(s,["uri","path"]);return GL(c,d)}),mt(s=>this._prepareResponse(s)),od(s=>this._response$.next(s)),mt(s=>{if(i)try{return i(s)}catch(c){throw new $h("failed to execute response selector",s,{cause:c})}return mn(s)}),Gl(this._abort$))}_prepareRequest(e){return this.requestHandler.process(e)}_prepareResponse(e){return this.responseHandler.process(e)}_resolveUrl(e){const r=this.uri||window.location.origin;return new URL(e,r).href}}class JL extends XL{constructor(){super(...arguments),this.defaultScopes=[]}fetch$(e,r){const n=Object.assign(r||{},{scopes:this.defaultScopes.concat((r==null?void 0:r.scopes)||[])});return super._fetch$(e,n)}}var x8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const sy={name:"http",configure:()=>new UL(JL),initialize:t=>x8(void 0,[t],void 0,function*({config:e,hasModule:r,requireInstance:n}){const i=new WL(e);if(r("auth")){const o=yield n("auth");i.defaultHttpRequestHandler.set("MSAL",a=>x8(void 0,void 0,void 0,function*(){const{scopes:s=[]}=a;if(s.length){const c=yield o.acquireToken({scopes:s});if(c){const l=new Headers(a.headers);return l.set("Authorization",`Bearer ${c.accessToken}`),Object.assign(Object.assign({},a),{headers:l})}}}))}return i})},eO=t=>({module:sy,configure:t}),Zk=(t,e)=>({module:sy,configure:r=>{r.configureClient(t,e)}}),mv="default";class tO{constructor(){this._configs={},this.requiresAuth=!0}get defaultConfig(){return this._configs[mv]}getClientConfig(e){return this._configs[e]}configureClient(e,r){return this._configs[e]=r,this}configureDefault(e){if(this._configs[mv])throw Error("Default AuthClient already provided");this.configureClient(mv,e)}}/*! @azure/msal-browser v2.38.3 2023-10-27 *//*! *****************************************************************************
|
|
44
44
|
Copyright (c) Microsoft Corporation.
|
|
45
45
|
|
|
46
46
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -70,8 +70,8 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
70
70
|
Error: `+c.errorCode+`
|
|
71
71
|
Error Description: `+c.errorMessage):(l=c,this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.
|
|
72
72
|
Error: `+l.name+`
|
|
73
|
-
Error Description: `+l.message)),[2,null];case 4:return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,i]}})})},t.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in T8?T8[this.canonicalAuthority]:null},t.prototype.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return je.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==Oh.None){var i=r.tenant?r.tenant:A.DEFAULT_COMMON_TENANT;n=r.azureCloudInstance+"/"+i+"/"}return n||e},t.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},t.getCloudDiscoveryMetadataFromNetworkResponse=function(e,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.aliases.indexOf(r)>-1)return i}return null},t.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw se.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return A.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var i=new je(e);i.validateAsUri();var o=i.getUrlComponents(),a=r+"."+o.HostNameAndPort;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=r+"."+A.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=je.constructAuthorityUriFromObject(tt(tt({},i.getUrlComponents()),{HostNameAndPort:a})).urlString;return n?s+"?"+n:s},t.replaceWithRegionalInformation=function(e,r){return e.authorization_endpoint=t.buildRegionalAuthorityString(e.authorization_endpoint,r),e.token_endpoint=t.buildRegionalAuthorityString(e.token_endpoint,r,A.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t.transformCIAMAuthority=function(e){var r=e.endsWith(A.FORWARD_SLASH)?e:""+e+A.FORWARD_SLASH,n=new je(e),i=n.getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(A.CIAM_AUTH_URL)){var o=i.HostNameAndPort.split(".")[0];r=""+r+o+A.AAD_TENANT_DOMAIN_SUFFIX}return r},t.reservedTenantDomains=new Set(["{tenant}","{tenantid}",ic.COMMON,ic.CONSUMERS,ic.ORGANIZATIONS]),t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Z2=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,i,o,a,s){return Ae(this,void 0,void 0,function(){var c,l,d;return Ie(this,function(u){switch(u.label){case 0:a==null||a.addQueueMeasurement(O.AuthorityFactoryCreateDiscoveredInstance,s),c=Dh.transformCIAMAuthority(e),l=t.createInstance(c,r,n,i,o,a,s),u.label=1;case 1:return u.trys.push([1,3,,4]),a==null||a.setPreQueueTime(O.AuthorityResolveEndpointsAsync,s),[4,l.resolveEndpointsAsync()];case 2:return u.sent(),[2,l];case 3:throw d=u.sent(),se.createEndpointDiscoveryIncompleteError(d);case 4:return[2]}})})},t.createInstance=function(e,r,n,i,o,a,s){if(ae.isEmpty(e))throw bt.createUrlEmptyError();return new Dh(e,r,n,i,o,a,s)},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var H2=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf(Rr.CACHE_KEY)===0,i=!0;return r&&(i=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&i},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var P8=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(ih.THROTTLING_PREFIX)===0);var i=!0;return r&&(i=r.hasOwnProperty("throttleTime")),n&&i},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var EO={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(fe.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(fe.createUnexpectedError(t))}};/*! @azure/msal-common v13.3.1 2023-10-27 */var yf={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},R8=function(t){Nn(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="JoseHeaderError",Object.setPrototypeOf(i,e.prototype),i}return e.createMissingKidError=function(){return new e(yf.missingKidError.code,yf.missingKidError.desc)},e.createMissingAlgError=function(){return new e(yf.missingAlgError.code,yf.missingAlgError.desc)},e}(fe);/*! @azure/msal-common v13.3.1 2023-10-27 */var kO=function(){function t(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return t.getShrHeaderString=function(e){if(!e.kid)throw R8.createMissingKidError();if(!e.alg)throw R8.createMissingAlgError();var r=new t({typ:e.typ||P4.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(r)},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var SO=function(){function t(e,r){this.cacheOutcome=Da.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||A.EMPTY_STRING,this.wrapperVer=e.wrapperVer||A.EMPTY_STRING,this.telemetryCacheKey=Rr.CACHE_KEY+vr.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Rr.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join(Rr.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),i=[e,n].join(Rr.VALUE_SEPARATOR);return[Rr.SCHEMA_VERSION,i,r].join(Rr.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(Rr.VALUE_SEPARATOR),i=e.errors.slice(0,r).join(Rr.VALUE_SEPARATOR),o=e.errors.length,a=r<o?Rr.OVERFLOW_TRUE:Rr.OVERFLOW_FALSE,s=[o,a].join(Rr.VALUE_SEPARATOR);return[Rr.SCHEMA_VERSION,e.cacheHits,n,i,s].join(Rr.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=Rr.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),ae.isEmpty(e.subError)?ae.isEmpty(e.errorCode)?e&&e.toString()?r.errors.push(e.toString()):r.errors.push(Rr.UNKNOWN_ERROR):r.errors.push(e.errorCode):r.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)},t.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},t.prototype.getLastRequests=function(){var e=new H2,r=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return r||e},t.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{var i=new H2;i.failedRequests=e.failedRequests.slice(r*2),i.errors=e.errors.slice(r),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}},t.maxErrorsToSend=function(e){var r,n=0,i=0,o=e.errors.length;for(r=0;r<o;r++){var a=e.failedRequests[2*r]||A.EMPTY_STRING,s=e.failedRequests[2*r+1]||A.EMPTY_STRING,c=e.errors[r]||A.EMPTY_STRING;if(i+=a.toString().length+s.toString().length+c.length+3,i<Rr.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||A.EMPTY_STRING),e.push(this.regionSource||A.EMPTY_STRING),e.push(this.regionOutcome||A.EMPTY_STRING),e.join(",")},t.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},t.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Dk=function(){function t(e,r,n,i,o,a){this.authority=r,this.libraryName=i,this.libraryVersion=o,this.applicationTelemetry=a,this.clientId=e,this.logger=n,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map}return t.prototype.startPerformanceMeasurement=function(e,r){return{}},t.prototype.startPerformanceMeasuremeant=function(e,r){return{}},t.prototype.getIntFields=function(){return gO},t.prototype.getPreQueueTime=function(e,r){var n=this.preQueueTimeByCorrelationId.get(r);if(n){if(n.name!==e){this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue time found for "+e+", unable to add queue measurement");return}}else{this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: "+r+", unable to add queue measurement");return}return n.time},t.prototype.calculateQueuedTime=function(e,r){return e<1?(this.logger.trace("PerformanceClient: preQueueTime should be a positive integer and not "+e),0):r<1?(this.logger.trace("PerformanceClient: currentTime should be a positive integer and not "+r),0):r<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):r-e},t.prototype.addQueueMeasurement=function(e,r,n,i){if(!r){this.logger.trace("PerformanceClient.addQueueMeasurement: correlationId not provided for "+e+", cannot add queue measurement");return}if(n===0)this.logger.trace("PerformanceClient.addQueueMeasurement: queue time provided for "+e+" is "+n);else if(!n){this.logger.trace("PerformanceClient.addQueueMeasurement: no queue time provided for "+e);return}var o={eventName:e,queueTime:n,manuallyCompleted:i},a=this.queueMeasurements.get(r);if(a)a.push(o),this.queueMeasurements.set(r,a);else{this.logger.trace("PerformanceClient.addQueueMeasurement: adding correlationId "+r+" to queue measurements");var s=[o];this.queueMeasurements.set(r,s)}this.preQueueTimeByCorrelationId.delete(r)},t.prototype.startMeasurement=function(e,r){var n=this,i,o,a=r||this.generateId();r||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",a),this.logger.trace("PerformanceClient: Performance measurement started for "+e,a);var s=this.startPerformanceMeasuremeant(e,a);s.startMeasurement();var c={eventId:this.generateId(),status:R2.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:a,appName:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appName,appVersion:(o=this.applicationTelemetry)===null||o===void 0?void 0:o.appVersion};return this.cacheEventByCorrelationId(c),{endMeasurement:function(l){return n.endMeasurement(tt(tt({},c),l),s)},discardMeasurement:function(){return n.discardMeasurements(c.correlationId)},addStaticFields:function(l){return n.addStaticFields(l,c.correlationId)},increment:function(l){return n.increment(l,c.correlationId)},measurement:s,event:c}},t.prototype.endMeasurement=function(e,r){var n=this,i,o,a=this.eventsByCorrelationId.get(e.correlationId);if(!a)return this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId),null;var s=e.eventId===a.eventId,c={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};s?(c=this.getQueueInfo(e.correlationId),this.discardCache(a.correlationId)):(i=a.incompleteSubMeasurements)===null||i===void 0||i.delete(e.eventId),r==null||r.endMeasurement();var l=r==null?void 0:r.flushMeasurement();if(!l)return this.logger.trace("PerformanceClient: Performance measurement not taken",a.correlationId),null;if(this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+l+" ms",e.correlationId),!s)return a[e.name+"DurationMs"]=Math.floor(l),tt({},a);var d=tt(tt({},a),e),u=0;return(o=d.incompleteSubMeasurements)===null||o===void 0||o.forEach(function(h){n.logger.trace("PerformanceClient: Incomplete submeasurement "+h.name+" found for "+e.name,d.correlationId),u++}),d.incompleteSubMeasurements=void 0,d=tt(tt({},d),{durationMs:Math.round(l),queuedTimeMs:c.totalQueueTime,queuedCount:c.totalQueueCount,queuedManuallyCompletedCount:c.manuallyCompletedCount,status:R2.Completed,incompleteSubsCount:u}),this.truncateIntegralFields(d,this.getIntFields()),this.emitEvents([d],e.correlationId),d},t.prototype.addStaticFields=function(e,r){this.logger.trace("PerformanceClient: Updating static fields");var n=this.eventsByCorrelationId.get(r);n?this.eventsByCorrelationId.set(r,tt(tt({},n),e)):this.logger.trace("PerformanceClient: Event not found for",r)},t.prototype.increment=function(e,r){this.logger.trace("PerformanceClient: Updating counters");var n=this.eventsByCorrelationId.get(r);if(n)for(var i in e)n.hasOwnProperty(i)||(n[i]=0),n[i]+=e[i];else this.logger.trace("PerformanceClient: Event not found for",r)},t.prototype.cacheEventByCorrelationId=function(e){var r=this.eventsByCorrelationId.get(e.correlationId);r?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),r.incompleteSubMeasurements=r.incompleteSubMeasurements||new Map,r.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,tt({},e)))},t.prototype.getQueueInfo=function(e){var r=this.queueMeasurements.get(e);r||this.logger.trace("PerformanceClient: no queue measurements found for for correlationId: "+e);var n=0,i=0,o=0;return r==null||r.forEach(function(a){n+=a.queueTime,i++,o+=a.manuallyCompleted?1:0}),{totalQueueTime:n,totalQueueCount:i,manuallyCompletedCount:o}},t.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},t.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: QueueMeasurements discarded",e),this.queueMeasurements.delete(e),this.logger.trace("PerformanceClient: Pre-queue times discarded",e),this.preQueueTimeByCorrelationId.delete(e)},t.prototype.addPerformanceCallback=function(e){var r=this.generateId();return this.callbacks.set(r,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+r),r},t.prototype.removePerformanceCallback=function(e){var r=this.callbacks.delete(e);return r?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),r},t.prototype.emitEvents=function(e,r){var n=this;this.logger.verbose("PerformanceClient: Emitting performance events",r),this.callbacks.forEach(function(i,o){n.logger.trace("PerformanceClient: Emitting event to callback "+o,r),i.apply(null,[e])})},t.prototype.truncateIntegralFields=function(e,r){r.forEach(function(n){n in e&&typeof e[n]=="number"&&(e[n]=Math.floor(e[n]))})},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var M8=function(){function t(){}return t.prototype.startMeasurement=function(){},t.prototype.endMeasurement=function(){},t.prototype.flushMeasurement=function(){return null},t}(),AO=function(t){Nn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new M8},e.prototype.startPerformanceMeasurement=function(){return new M8},e.prototype.calculateQueuedTime=function(r,n){return 0},e.prototype.addQueueMeasurement=function(r,n,i){},e.prototype.setPreQueueTime=function(r,n){},e}(Dk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Y={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},spaCodeAndNativeAccountPresent:{code:"spa_code_and_nativeAccountId_present",desc:"Request cannot contain both spa code and native account id."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},ne=function(t){Fr(e,t);function e(r,n){var i=t.call(this,r,n)||this;return Object.setPrototypeOf(i,e.prototype),i.name="BrowserAuthError",i}return e.createPkceNotGeneratedError=function(r){return new e(Y.pkceNotGenerated.code,Y.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(Y.cryptoDoesNotExist.code,Y.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(Y.httpMethodNotImplementedError.code,Y.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(Y.emptyNavigateUriError.code,Y.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(Y.hashEmptyError.code,Y.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(Y.hashDoesNotContainStateError.code,Y.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(Y.hashDoesNotContainKnownPropertiesError.code,Y.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(Y.unableToParseStateError.code,Y.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(Y.stateInteractionTypeMismatchError.code,Y.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(Y.interactionInProgress.code,Y.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=Y.popupWindowError.desc;return n=ae.isEmpty(r)?n:n+" Details: "+r,new e(Y.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(Y.emptyWindowError.code,Y.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(Y.userCancelledError.code,Y.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(Y.monitorPopupTimeoutError.code,Y.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(Y.monitorIframeTimeoutError.code,Y.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(Y.redirectInIframeError.code,Y.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(Y.blockTokenRequestsInHiddenIframeError.code,Y.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(Y.blockAcquireTokenInPopupsError.code,Y.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(Y.iframeClosedPrematurelyError.code,Y.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(Y.silentLogoutUnsupportedError.code,Y.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(Y.noAccountError.code,Y.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(Y.silentPromptValueError.code,Y.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(Y.unableToParseTokenRequestCacheError.code,Y.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(Y.noTokenRequestCacheError.code,Y.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(Y.authRequestNotSet.code,Y.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(Y.noCachedAuthorityError.code,Y.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(Y.invalidCacheType.code,""+Y.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(Y.notInBrowserEnvironment.code,Y.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(Y.databaseNotOpen.code,Y.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(Y.noNetworkConnectivity.code,Y.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(Y.postRequestFailed.code,Y.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(Y.getRequestFailed.code,Y.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(Y.failedToParseNetworkResponse.code,Y.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(Y.unableToLoadTokenError.code,Y.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(Y.signingKeyNotFoundInStorage.code,Y.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(Y.authCodeRequired.code,Y.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(Y.authCodeOrNativeAccountRequired.code,Y.authCodeOrNativeAccountRequired.desc)},e.createSpaCodeAndNativeAccountIdPresentError=function(){return new e(Y.spaCodeAndNativeAccountPresent.code,Y.spaCodeAndNativeAccountPresent.desc)},e.createDatabaseUnavailableError=function(){return new e(Y.databaseUnavailable.code,Y.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(Y.unableToAcquireTokenFromNativePlatform.code,Y.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(Y.nativeHandshakeTimeout.code,Y.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(Y.nativeExtensionNotInstalled.code,Y.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(Y.nativeConnectionNotEstablished.code,Y.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(Y.nativeBrokerCalledBeforeInitialize.code,Y.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(Y.nativePromptNotSupported.code,Y.nativePromptNotSupported.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Vi={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},Cu={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Xo;(function(t){t.HandshakeRequest="Handshake",t.HandshakeResponse="HandshakeResponse",t.GetToken="GetToken",t.Response="Response"})(Xo||(Xo={}));var sr;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(sr||(sr={}));var ho;(function(t){t.GET="GET",t.POST="POST"})(ho||(ho={}));var We;(function(t){t.AUTHORITY="authority",t.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",t.SESSION_STATE="session.state",t.REQUEST_STATE="request.state",t.NONCE_IDTOKEN="nonce.id_token",t.ORIGIN_URI="request.origin",t.RENEW_STATUS="token.renew.status",t.URL_HASH="urlHash",t.REQUEST_PARAMS="request.params",t.SCOPES="scopes",t.INTERACTION_STATUS_KEY="interaction.status",t.CCS_CREDENTIAL="ccs.credential",t.CORRELATION_ID="request.correlationId",t.NATIVE_REQUEST="request.native",t.REDIRECT_CONTEXT="request.redirect.context"})(We||(We={}));var co;(function(t){t.ACCOUNT_KEYS="msal.account.keys",t.TOKEN_KEYS="msal.token.keys"})(co||(co={}));var Hl;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(Hl||(Hl={}));var _t;(function(t){t[t.acquireTokenRedirect=861]="acquireTokenRedirect",t[t.acquireTokenPopup=862]="acquireTokenPopup",t[t.ssoSilent=863]="ssoSilent",t[t.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",t[t.handleRedirectPromise=865]="handleRedirectPromise",t[t.acquireTokenByCode=866]="acquireTokenByCode",t[t.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",t[t.logout=961]="logout",t[t.logoutPopup=962]="logoutPopup"})(_t||(_t={}));var de;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent",t.None="none"})(de||(de={}));var Z8;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(Z8||(Z8={}));var H8={scopes:u1},sd="jwk",$8;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})($8||($8={}));var H4="msal.db",IO=1,TO=H4+".keys",Pn;(function(t){t[t.Default=0]="Default",t[t.AccessToken=1]="AccessToken",t[t.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",t[t.RefreshToken=3]="RefreshToken",t[t.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",t[t.Skip=5]="Skip"})(Pn||(Pn={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Sn={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},$2=function(t){Fr(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="BrowserConfigurationAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.createRedirectUriEmptyError=function(){return new e(Sn.redirectUriNotSet.code,Sn.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Sn.postLogoutUriNotSet.code,Sn.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(Sn.storageNotSupportedError.code,Sn.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(Sn.noRedirectCallbacksSet.code,Sn.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(Sn.stubPcaInstanceCalled.code,Sn.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(Sn.inMemRedirectUnavailable.code,Sn.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(Sn.entropyNotProvided.code,Sn.entropyNotProvided.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var L8=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==sr.LocalStorage&&e!==sr.SessionStorage)throw $2.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw $2.createStorageNotSupportedError(e)},t.prototype.getItem=function(e){return this.windowStorage.getItem(e)},t.prototype.setItem=function(e,r){this.windowStorage.setItem(e,r)},t.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},t.prototype.getKeys=function(){return Object.keys(this.windowStorage)},t.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $4=function(){function t(){this.cache=new Map}return t.prototype.getItem=function(e){return this.cache.get(e)||null},t.prototype.setItem=function(e,r){this.cache.set(e,r)},t.prototype.removeItem=function(e){this.cache.delete(e)},t.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(r,n){e.push(n)}),e},t.prototype.containsKey=function(e){return this.cache.has(e)},t.prototype.clear=function(){this.cache.clear()},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Vk=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(ae.isEmpty(r))return null;try{var n=na.parseRequestState(e,r);return n.libraryState.meta}catch(i){throw se.createInvalidStateError(r,i)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new je(e);return je.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var L4=function(t){Fr(e,t);function e(r,n,i,o){var a=t.call(this,r,i,o)||this;return a.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,a.cacheConfig=n,a.logger=o,a.internalStorage=new $4,a.browserStorage=a.setupBrowserStorage(a.cacheConfig.cacheLocation),a.temporaryCacheStorage=a.setupTemporaryCacheStorage(a.cacheConfig.temporaryCacheLocation,a.cacheConfig.cacheLocation),n.cacheMigrationEnabled&&(a.migrateCacheEntries(),a.createKeyMaps()),a}return e.prototype.setupBrowserStorage=function(r){switch(r){case sr.LocalStorage:case sr.SessionStorage:try{return new L8(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=sr.MemoryStorage,new $4},e.prototype.setupTemporaryCacheStorage=function(r,n){switch(n){case sr.LocalStorage:case sr.SessionStorage:try{return new L8(r||sr.SessionStorage)}catch(i){return this.logger.verbose(i),this.internalStorage}case sr.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=A.CACHE_PREFIX+"."+pr.ID_TOKEN,i=A.CACHE_PREFIX+"."+pr.CLIENT_INFO,o=A.CACHE_PREFIX+"."+pr.ERROR,a=A.CACHE_PREFIX+"."+pr.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(i),l=this.browserStorage.getItem(o),d=this.browserStorage.getItem(a),u=[s,c,l,d],h=[pr.ID_TOKEN,pr.CLIENT_INFO,pr.ERROR,pr.ERROR_DESC];h.forEach(function(f,p){return r.migrateCacheEntry(f,u[p])})},e.prototype.migrateCacheEntry=function(r,n){n&&this.setTemporaryCache(r,n,!0)},e.prototype.createKeyMaps=function(){var r=this;this.logger.trace("BrowserCacheManager - createKeyMaps called.");var n=this.getItem(co.ACCOUNT_KEYS),i=this.getItem(co.TOKEN_KEYS+"."+this.clientId);if(n&&i){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}var o=this.browserStorage.getKeys();o.forEach(function(a){if(r.isCredentialKey(a)){var s=r.getItem(a);if(s){var c=r.validateAndParseJson(s);if(c&&c.hasOwnProperty("credentialType"))switch(c.credentialType){case ge.ID_TOKEN:if(qs.isIdTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: "+a+" found, saving key to token key map");var l=Tn.toObject(new qs,c),d=r.updateCredentialCacheKey(a,l);r.addTokenKey(d,ge.ID_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: "+a);break;case ge.ACCESS_TOKEN:case ge.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Ws.isAccessTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: "+a+" found, saving key to token key map");var u=Tn.toObject(new Ws,c),d=r.updateCredentialCacheKey(a,u);r.addTokenKey(d,ge.ACCESS_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: "+a);break;case ge.REFRESH_TOKEN:if(Ml.isRefreshTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: "+a+" found, saving key to token key map");var h=Tn.toObject(new Ml,c),d=r.updateCredentialCacheKey(a,h);r.addTokenKey(d,ge.REFRESH_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: "+a);break}}}if(r.isAccountKey(a)){var s=r.getItem(a);if(s){var f=r.validateAndParseJson(s);f&&Or.isAccountEntity(f)&&(r.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: "+a+" found, saving key to account key map"),r.addAccountKeyToMap(a))}}})},e.prototype.validateAndParseJson=function(r){try{var n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}},e.prototype.getItem=function(r){return this.browserStorage.getItem(r)},e.prototype.setItem=function(r,n){this.browserStorage.setItem(r,n)},e.prototype.getAccount=function(r){this.logger.trace("BrowserCacheManager.getAccount called");var n=this.getItem(r);if(!n)return this.removeAccountKeyFromMap(r),null;var i=this.validateAndParseJson(n);return!i||!Or.isAccountEntity(i)?(this.removeAccountKeyFromMap(r),null):Tn.toObject(new Or,i)},e.prototype.setAccount=function(r){this.logger.trace("BrowserCacheManager.setAccount called");var n=r.generateAccountKey();this.setItem(n,JSON.stringify(r)),this.addAccountKeyToMap(n)},e.prototype.getAccountKeys=function(){this.logger.trace("BrowserCacheManager.getAccountKeys called");var r=this.getItem(co.ACCOUNT_KEYS);return r?JSON.parse(r):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])},e.prototype.addAccountKeyToMap=function(r){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: "+r);var n=this.getAccountKeys();n.indexOf(r)===-1?(n.push(r),this.setItem(co.ACCOUNT_KEYS,JSON.stringify(n)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")},e.prototype.removeAccountKeyFromMap=function(r){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: "+r);var n=this.getAccountKeys(),i=n.indexOf(r);i>-1?(n.splice(i,1),this.setItem(co.ACCOUNT_KEYS,JSON.stringify(n)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")},e.prototype.removeAccount=function(r){return U(this,void 0,void 0,function(){return B(this,function(n){return t.prototype.removeAccount.call(this,r),this.removeAccountKeyFromMap(r),[2]})})},e.prototype.removeIdToken=function(r){t.prototype.removeIdToken.call(this,r),this.removeTokenKey(r,ge.ID_TOKEN)},e.prototype.removeAccessToken=function(r){return U(this,void 0,void 0,function(){return B(this,function(n){return t.prototype.removeAccessToken.call(this,r),this.removeTokenKey(r,ge.ACCESS_TOKEN),[2]})})},e.prototype.removeRefreshToken=function(r){t.prototype.removeRefreshToken.call(this,r),this.removeTokenKey(r,ge.REFRESH_TOKEN)},e.prototype.getTokenKeys=function(){this.logger.trace("BrowserCacheManager.getTokenKeys called");var r=this.getItem(co.TOKEN_KEYS+"."+this.clientId);if(r){var n=this.validateAndParseJson(r);if(n&&n.hasOwnProperty("idToken")&&n.hasOwnProperty("accessToken")&&n.hasOwnProperty("refreshToken"))return n;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}},e.prototype.addTokenKey=function(r,n){this.logger.trace("BrowserCacheManager addTokenKey called");var i=this.getTokenKeys();switch(n){case ge.ID_TOKEN:i.idToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),i.idToken.push(r));break;case ge.ACCESS_TOKEN:i.accessToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),i.accessToken.push(r));break;case ge.REFRESH_TOKEN:i.refreshToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),i.refreshToken.push(r));break;default:this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: "+n),se.createUnexpectedCredentialTypeError()}this.setItem(co.TOKEN_KEYS+"."+this.clientId,JSON.stringify(i))},e.prototype.removeTokenKey=function(r,n){this.logger.trace("BrowserCacheManager removeTokenKey called");var i=this.getTokenKeys();switch(n){case ge.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: "+r+" from map");var o=i.idToken.indexOf(r);o>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),i.idToken.splice(o,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: "+r+" from map");var a=i.accessToken.indexOf(r);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),i.accessToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: "+r+" from map");var s=i.refreshToken.indexOf(r);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),i.refreshToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: "+n),se.createUnexpectedCredentialTypeError()}this.setItem(co.TOKEN_KEYS+"."+this.clientId,JSON.stringify(i))},e.prototype.getIdTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ID_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!qs.isIdTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Tn.toObject(new qs,i))},e.prototype.setIdTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.ID_TOKEN)},e.prototype.getAccessTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ACCESS_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!Ws.isAccessTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Tn.toObject(new Ws,i))},e.prototype.setAccessTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.ACCESS_TOKEN)},e.prototype.getRefreshTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.REFRESH_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!Ml.isRefreshTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Tn.toObject(new Ml,i))},e.prototype.setRefreshTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.REFRESH_TOKEN)},e.prototype.getAppMetadata=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!M4.isAppMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Tn.toObject(new M4,i))},e.prototype.setAppMetadata=function(r){this.logger.trace("BrowserCacheManager.setAppMetadata called");var n=r.generateAppMetadataKey();this.setItem(n,JSON.stringify(r))},e.prototype.getServerTelemetry=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!H2.isServerTelemetryEntity(r,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Tn.toObject(new H2,i))},e.prototype.setServerTelemetry=function(r,n){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(r,JSON.stringify(n))},e.prototype.getAuthorityMetadata=function(r){var n=this.internalStorage.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return i&&Z4.isAuthorityMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Tn.toObject(new Z4,i)):null},e.prototype.getAuthorityMetadataKeys=function(){var r=this,n=this.internalStorage.getKeys();return n.filter(function(i){return r.isAuthorityMetadata(i)})},e.prototype.setWrapperMetadata=function(r,n){this.internalStorage.setItem(Hl.WRAPPER_SKU,r),this.internalStorage.setItem(Hl.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(Hl.WRAPPER_SKU)||A.EMPTY_STRING,n=this.internalStorage.getItem(Hl.WRAPPER_VER)||A.EMPTY_STRING;return[r,n]},e.prototype.setAuthorityMetadata=function(r,n){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(r,JSON.stringify(n))},e.prototype.getActiveAccount=function(){var r=this.generateCacheKey(pr.ACTIVE_ACCOUNT_FILTERS),n=this.getItem(r);if(!n){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var i=this.generateCacheKey(pr.ACTIVE_ACCOUNT),o=this.getItem(i);if(!o)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var a=this.getAccountInfoByFilter({localAccountId:o})[0]||null;return a?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(a),a):null}var s=this.validateAndParseJson(n);return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(r){var n=this.generateCacheKey(pr.ACTIVE_ACCOUNT_FILTERS),i=this.generateCacheKey(pr.ACTIVE_ACCOUNT);if(r){this.logger.verbose("setActiveAccount: Active account set");var o={homeAccountId:r.homeAccountId,localAccountId:r.localAccountId};this.browserStorage.setItem(n,JSON.stringify(o)),this.browserStorage.setItem(i,r.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n),this.browserStorage.removeItem(i)},e.prototype.getAccountInfoByFilter=function(r){var n=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+n.length+" accounts found"),n.filter(function(i){return!(r.username&&r.username.toLowerCase()!==i.username.toLowerCase()||r.homeAccountId&&r.homeAccountId!==i.homeAccountId||r.localAccountId&&r.localAccountId!==i.localAccountId||r.tenantId&&r.tenantId!==i.tenantId||r.environment&&r.environment!==i.environment)})},e.prototype.getAccountInfoByHints=function(r,n){var i=this.getAllAccounts().filter(function(o){if(n){var a=o.idTokenClaims&&o.idTokenClaims.sid;return n===a}return r?r===o.username:!1});if(i.length===1)return i[0];if(i.length>1)throw se.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!P8.isThrottlingEntity(r,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Tn.toObject(new P8,i))},e.prototype.setThrottlingCache=function(r,n){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(r,JSON.stringify(n))},e.prototype.getTemporaryCache=function(r,n){var i=n?this.generateCacheKey(r):r;if(this.cacheConfig.storeAuthStateInCookie){var o=this.getItemCookie(i);if(o)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),o}var a=this.temporaryCacheStorage.getItem(i);if(!a){if(this.cacheConfig.cacheLocation===sr.LocalStorage){var s=this.browserStorage.getItem(i);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),a},e.prototype.setTemporaryCache=function(r,n,i){var o=i?this.generateCacheKey(r):r;this.temporaryCacheStorage.setItem(o,n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(o,n))},e.prototype.removeItem=function(r){this.browserStorage.removeItem(r),this.temporaryCacheStorage.removeItem(r),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(r))},e.prototype.containsKey=function(r){return this.browserStorage.containsKey(r)||this.temporaryCacheStorage.containsKey(r)},e.prototype.getKeys=function(){return cy(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return U(this,void 0,void 0,function(){var r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.removeAllAccounts()];case 1:return n.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(i){(r.browserStorage.containsKey(i)||r.temporaryCacheStorage.containsKey(i))&&(i.indexOf(A.CACHE_PREFIX)!==-1||i.indexOf(r.clientId)!==-1)&&r.removeItem(i)}),this.internalStorage.clear(),[2]}})})},e.prototype.clearTokensAndKeysWithClaims=function(){return U(this,void 0,void 0,function(){var r,n,i=this;return B(this,function(o){switch(o.label){case 0:return this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called"),r=this.getTokenKeys(),n=[],r.accessToken.forEach(function(a){var s=i.getAccessTokenCredential(a);s!=null&&s.requestedClaimsHash&&a.includes(s.requestedClaimsHash.toLowerCase())&&n.push(i.removeAccessToken(a))}),[4,Promise.all(n)];case 1:return o.sent(),n.length>0&&this.logger.warning(n.length+" access tokens with claims in the cache keys have been removed from the cache."),[2]}})})},e.prototype.setItemCookie=function(r,n,i){var o=encodeURIComponent(r)+"="+encodeURIComponent(n)+";path=/;SameSite=Lax;";if(i){var a=this.getCookieExpirationTime(i);o+="expires="+a+";"}this.cacheConfig.secureCookies&&(o+="Secure;"),document.cookie=o},e.prototype.getItemCookie=function(r){for(var n=encodeURIComponent(r)+"=",i=document.cookie.split(";"),o=0;o<i.length;o++){for(var a=i[o];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(n)===0)return decodeURIComponent(a.substring(n.length,a.length))}return A.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var r=this,n=A.CACHE_PREFIX+"."+this.clientId,i=document.cookie.split(";");i.forEach(function(o){for(;o.charAt(0)===" ";)o=o.substring(1);if(o.indexOf(n)===0){var a=o.split("=")[0];r.clearItemCookie(a)}})},e.prototype.clearItemCookie=function(r){this.setItemCookie(r,A.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(r){var n=new Date,i=new Date(n.getTime()+r*this.COOKIE_LIFE_MULTIPLIER);return i.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(r){var n=this.validateAndParseJson(r);return n?JSON.stringify(r):ae.startsWith(r,A.CACHE_PREFIX)||ae.startsWith(r,pr.ADAL_ID_TOKEN)?r:A.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=na.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(We.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=na.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(We.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=na.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(We.REQUEST_STATE+"."+n)},e.prototype.getCachedAuthority=function(r){var n=this.generateStateKey(r),i=this.getTemporaryCache(n);if(!i)return null;var o=this.generateAuthorityKey(i);return this.getTemporaryCache(o)},e.prototype.updateCacheEntries=function(r,n,i,o,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(r);this.setTemporaryCache(s,r,!1);var c=this.generateNonceKey(r);this.setTemporaryCache(c,n,!1);var l=this.generateAuthorityKey(r);if(this.setTemporaryCache(l,i,!1),a){var d={credential:a.homeAccountId,type:Wn.HOME_ACCOUNT_ID};this.setTemporaryCache(We.CCS_CREDENTIAL,JSON.stringify(d),!0)}else if(!ae.isEmpty(o)){var d={credential:o,type:Wn.UPN};this.setTemporaryCache(We.CCS_CREDENTIAL,JSON.stringify(d),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),ae.isEmpty(r)||this.getKeys().forEach(function(i){i.indexOf(r)!==-1&&n.removeItem(i)}),r&&(this.removeItem(this.generateStateKey(r)),this.removeItem(this.generateNonceKey(r)),this.removeItem(this.generateAuthorityKey(r))),this.removeItem(this.generateCacheKey(We.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(We.ORIGIN_URI)),this.removeItem(this.generateCacheKey(We.URL_HASH)),this.removeItem(this.generateCacheKey(We.CORRELATION_ID)),this.removeItem(this.generateCacheKey(We.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(We.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(r){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),r){var n=this.generateStateKey(r),i=this.temporaryCacheStorage.getItem(n);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+i),this.resetRequestCache(i||A.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(r){var n=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(i){if(i.indexOf(We.REQUEST_STATE)!==-1){var o=n.temporaryCacheStorage.getItem(i);if(o){var a=Vk.extractBrowserRequestState(n.cryptoImpl,o);a&&a.interactionType===r&&(n.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+o),n.resetRequestCache(o))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(r,n){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var i=n.base64Encode(JSON.stringify(r));this.setTemporaryCache(We.REQUEST_PARAMS,i,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var i=this.getTemporaryCache(We.REQUEST_PARAMS,!0);if(!i)throw ne.createNoTokenRequestCacheError();var o=this.validateAndParseJson(n.base64Decode(i));if(!o)throw ne.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(We.REQUEST_PARAMS)),ae.isEmpty(o.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw ne.createNoCachedAuthorityError();o.authority=s}return o},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var r=this.getTemporaryCache(We.NATIVE_REQUEST,!0);if(!r)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var n=this.validateAndParseJson(r);return n||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(r){var n=this.getInteractionInProgress();return r?n===this.clientId:!!n},e.prototype.getInteractionInProgress=function(){var r=A.CACHE_PREFIX+"."+We.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=A.CACHE_PREFIX+"."+We.INTERACTION_STATUS_KEY;if(r){if(this.getInteractionInProgress())throw ne.createInteractionInProgressError();this.setTemporaryCache(n,this.clientId,!1)}else!r&&this.getInteractionInProgress()===this.clientId&&this.removeItem(n)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(pr.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(pr.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(pr.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(pr.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var i=n||r;if(i){var o=new Eo(i,this.cryptoImpl);if(o.claims&&o.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),o.claims.preferred_username;if(o.claims&&o.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.claims.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null},e.prototype.updateCredentialCacheKey=function(r,n){var i=n.generateCredentialKey();if(r!==i){var o=this.getItem(r);if(o)return this.removeItem(r),this.setItem(i,o),this.logger.verbose("Updated an outdated "+n.credentialType+" cache key"),i;this.logger.error("Attempted to update an outdated "+n.credentialType+" cache key but no item matching the outdated key was found in storage")}return r},e.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(We.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(r){this.setTemporaryCache(We.REDIRECT_CONTEXT,r,!0)},e}(Tn),PO=function(t,e){var r={cacheLocation:sr.MemoryStorage,temporaryCacheLocation:sr.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};return new L4(t,r,I2,e)};/*! @azure/msal-browser v2.38.3 2023-10-27 */var vv="@azure/msal-browser",ch="2.38.3";/*! @azure/msal-browser v2.38.3 2023-10-27 */var RO=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return U(this,void 0,void 0,function(){var n,i,o;return B(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:ho.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw i=a.sent(),window.navigator.onLine?ne.createGetRequestFailedError(i,e):ne.createNoNetworkConnectivityError();case 3:return a.trys.push([3,5,,6]),o={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 4:return[2,(o.body=a.sent(),o.status=n.status,o)];case 5:throw a.sent(),ne.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return U(this,void 0,void 0,function(){var n,i,o,a;return B(this,function(s){switch(s.label){case 0:n=r&&r.body||A.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:ho.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return i=s.sent(),[3,4];case 3:throw o=s.sent(),window.navigator.onLine?ne.createPostRequestFailedError(o,e):ne.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),a={headers:this.getHeaderDict(i.headers)},[4,i.json()];case 5:return[2,(a.body=s.sent(),a.status=i.status,a)];case 6:throw s.sent(),ne.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},t.prototype.getFetchHeaders=function(e){var r=new Headers;if(!(e&&e.headers))return r;var n=e.headers;return Object.keys(n).forEach(function(i){r.append(i,n[i])}),r},t.prototype.getHeaderDict=function(e){var r={};return e.forEach(function(n,i){r[i]=n}),r},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var MO=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,this.sendRequestAsync(e,ho.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,this.sendRequestAsync(e,ho.POST,r)]})})},t.prototype.sendRequestAsync=function(e,r,n){var i=this;return new Promise(function(o,a){var s=new XMLHttpRequest;if(s.open(r,e,!0),i.setXhrHeaders(s,n),s.onload=function(){(s.status<200||s.status>=300)&&(r===ho.POST?a(ne.createPostRequestFailedError("Failed with status "+s.status,e)):a(ne.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:i.getHeaderDict(s),body:c,status:s.status};o(l)}catch{a(ne.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===ho.POST?a(ne.createPostRequestFailedError("Failed with status "+s.status,e)):a(ne.createGetRequestFailedError("Failed with status "+s.status,e)):a(ne.createNoNetworkConnectivityError())},r===ho.POST&&n&&n.body)s.send(n.body);else if(r===ho.GET)s.send();else throw ne.createHttpMethodNotImplementedError(r)})},t.prototype.setXhrHeaders=function(e,r){if(r&&r.headers){var n=r.headers;Object.keys(n).forEach(function(i){e.setRequestHeader(i,n[i])})}},t.prototype.getHeaderDict=function(e){var r=e.getAllResponseHeaders(),n=r.trim().split(/[\r\n]+/),i={};return n.forEach(function(o){var a=o.split(": "),s=a.shift(),c=a.join(": ");s&&c&&(i[s]=c)}),i},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Yt=function(){function t(){}return t.clearHash=function(e){e.location.hash=A.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,A.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},t.replaceHash=function(e){var r=e.split("#");r.shift(),window.location.hash=r.length>0?r.join("#"):A.EMPTY_STRING},t.isInIframe=function(){return window.parent!==window},t.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(Vi.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new je(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new RO:new MO},t.blockReloadInHiddenIframes=function(){var e=je.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw ne.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===de.Redirect&&n&&!r)throw ne.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw ne.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw ne.createNonBrowserEnvironmentError()},t.blockNativeBrokerCalledBeforeInitialized=function(e,r){if(e&&!r)throw ne.createNativeBrokerCalledBeforeInitialize()},t.detectIEOrEdge=function(){var e=window.navigator.userAgent,r=e.indexOf("MSIE "),n=e.indexOf("Trident/"),i=e.indexOf("Edge/"),o=r>0||n>0,a=i>0;return o||a},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Fk=function(){function t(e,r,n,i,o,a,s,c,l){this.config=e,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=o,this.navigationClient=a,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=i.clone(Vi.MSAL_SKU,ch,this.correlationId),this.performanceClient=s}return t.prototype.clearCacheOnLogout=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){switch(r.label){case 0:if(!e)return[3,5];Or.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(Or.generateAccountCacheKey(e))];case 2:return r.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return r.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return r.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return r.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return r.sent(),[3,9];case 8:return r.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},t.prototype.initializeBaseRequest=function(e,r){return U(this,void 0,void 0,function(){var n,i,o,a;return B(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(O.InitializeBaseRequest,e.correlationId),this.logger.verbose("Initializing BaseAuthRequest"),n=e.authority||this.config.auth.authority,r?[4,this.validateRequestAuthority(n,r)]:[3,2];case 1:s.sent(),s.label=2;case 2:if(i=cy(e&&e.scopes||[]),o=ue(ue({},e),{correlationId:this.correlationId,authority:n,scopes:i}),!o.authenticationScheme)o.authenticationScheme=ot.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(o.authenticationScheme===ot.SSH){if(!e.sshJwk)throw bt.createMissingSshJwkError();if(!e.sshKid)throw bt.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+o.authenticationScheme+'" as configured in Auth request')}return this.config.cache.claimsBasedCachingEnabled&&e.claims&&!ae.isEmptyObj(e.claims)?(a=o,[4,this.browserCrypto.hashString(e.claims)]):[3,4];case 3:a.requestedClaimsHash=s.sent(),s.label=4;case 4:return[2,o]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||Yt.getCurrentUri();return je.getAbsoluteUrl(r,Yt.getCurrentUri())},t.prototype.validateRequestAuthority=function(e,r){return U(this,void 0,void 0,function(){var n;return B(this,function(i){switch(i.label){case 0:return[4,this.getDiscoveredAuthority(e)];case 1:if(n=i.sent(),!n.isAlias(r.environment))throw bt.createAuthorityMismatchError();return[2]}})})},t.prototype.initializeServerTelemetryManager=function(e,r){this.logger.verbose("initializeServerTelemetryManager called");var n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:r||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new SO(n,this.browserStorage)},t.prototype.getDiscoveredAuthority=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){switch(n.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),r={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,Z2.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,r,this.logger)]):[3,2];case 1:return[2,n.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,Z2.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,r,this.logger)];case 3:return[2,n.sent()]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var kd=function(t){Fr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(r){return U(this,void 0,void 0,function(){var n,i;return B(this,function(o){switch(o.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),this.logger.verbose("initializeAuthorizationRequest called",r.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return n=o.sent(),i=ue(ue({},r),{redirectUri:r.redirectUri,code:A.EMPTY_STRING,codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=A.S256_CODE_CHALLENGE_METHOD,[2,i]}})})},e.prototype.initializeLogoutRequest=function(r){this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId);var n=ue({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},r);if(r)if(r.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(r.account){var i=this.getLogoutHintFromIdTokenClaims(r.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),n.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!r||r.postLogoutRedirectUri!==null?r&&r.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",n.correlationId),n.postLogoutRedirectUri=je.getAbsoluteUrl(r.postLogoutRedirectUri,Yt.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",n.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",n.correlationId),n.postLogoutRedirectUri=je.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Yt.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=je.getAbsoluteUrl(Yt.getCurrentUri(),Yt.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",n.correlationId),n},e.prototype.getLogoutHintFromIdTokenClaims=function(r){var n=r.idTokenClaims;if(n){if(n.login_hint)return n.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},e.prototype.createAuthCodeClient=function(r,n,i){return U(this,void 0,void 0,function(){var o;return B(this,function(a){switch(a.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientCreateAuthCodeClient,this.correlationId),this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Lk(o,this.performanceClient)]}})})},e.prototype.getClientConfiguration=function(r,n,i){return U(this,void 0,void 0,function(){var o,a;return B(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientGetClientConfiguration,this.correlationId),this.logger.verbose("getClientConfiguration called",this.correlationId),this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),[4,this.getDiscoveredAuthority(n,i)];case 1:return o=s.sent(),a=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:o,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:a.loggerCallback,piiLoggingEnabled:a.piiLoggingEnabled,logLevel:a.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:r,libraryInfo:{sku:Vi.MSAL_SKU,version:ch,cpu:A.EMPTY_STRING,os:A.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,i){if(this.logger.verbose("validateAndExtractStateFromHash called",i),!r.state)throw ne.createHashDoesNotContainStateError();var o=Vk.extractBrowserRequestState(this.browserCrypto,r.state);if(!o)throw ne.createUnableToParseStateError();if(o.interactionType!==n)throw ne.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",i),r.state},e.prototype.getDiscoveredAuthority=function(r,n){var i;return U(this,void 0,void 0,function(){var o,a,s,c;return B(this,function(l){switch(l.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),this.logger.verbose("getDiscoveredAuthority called",this.correlationId),o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(O.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),a={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=r||this.config.auth.authority,c=Dh.generateAuthority(s,n||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),this.performanceClient.setPreQueueTime(O.AuthorityFactoryCreateDiscoveredInstance,this.correlationId),[4,Z2.createDiscoveredInstance(c,this.config.system.networkClient,this.browserStorage,a,this.logger,this.performanceClient,this.correlationId).then(function(d){return o.endMeasurement({success:!0}),d}).catch(function(d){throw o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})];case 1:return[2,l.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(r,n){return U(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return B(this,function(u){switch(u.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId),this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),i=this.getRedirectUri(r.redirectUri),o={interactionType:n},a=na.setRequestState(this.browserCrypto,r&&r.state||A.EMPTY_STRING,o),this.performanceClient.setPreQueueTime(O.InitializeBaseRequest,this.correlationId),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=ue.apply(void 0,[ue.apply(void 0,c.concat([u.sent()])),{redirectUri:i,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:k2.FRAGMENT}]),l=r.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),ae.isEmpty(s.loginHint)&&!l&&(d=this.browserStorage.getLegacyLoginHint(),d&&(s.loginHint=d)),[2,s]}})})},e}(Fk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var hy=function(){function t(e,r,n,i,o){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.logger=i,this.performanceClient=o}return t.prototype.handleCodeResponseFromHash=function(e,r,n,i){return U(this,void 0,void 0,function(){var o,a,s;return B(this,function(c){if(this.performanceClient.addQueueMeasurement(O.HandleCodeResponseFromHash,this.authCodeRequest.correlationId),this.logger.verbose("InteractionHandler.handleCodeResponse called"),ae.isEmpty(e))throw ne.createEmptyHashError(e);if(o=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(o),!a)throw se.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,a)}catch(l){throw l instanceof _c&&l.subError===Y.userCancelledError.code?ne.createUserCancelledError():l}return this.performanceClient.setPreQueueTime(O.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),[2,this.handleCodeResponseFromServer(s,r,n,i)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,i,o){return o===void 0&&(o=!0),U(this,void 0,void 0,function(){var a,s,c,l,d,u;return B(this,function(h){switch(h.label){case 0:if(this.performanceClient.addQueueMeasurement(O.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw se.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?(this.performanceClient.setPreQueueTime(O.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,i)]):[3,2];case 1:h.sent(),h.label=2;case 2:return o&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(d=this.checkCcsCredentials(),d&&(this.authCodeRequest.ccsCredential=d)),this.performanceClient.setPreQueueTime(O.AuthClientAcquireToken,this.authCodeRequest.correlationId),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return u=h.sent(),this.browserStorage.cleanRequestByState(r),[2,u]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return U(this,void 0,void 0,function(){var i,o;return B(this,function(a){switch(a.label){case 0:return this.performanceClient.addQueueMeasurement(O.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),i="https://"+e+"/"+r.tenant+"/",[4,Z2.createDiscoveredInstance(i,n,this.browserStorage,r.options,this.logger,this.performanceClient,this.authCodeRequest.correlationId)];case 1:return o=a.sent(),this.authModule.updateAuthority(o),[2]}})})},t.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(We.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var O8=function(t){Fr(e,t);function e(r,n,i,o,a,s){var c=t.call(this,r,n,i,o,s)||this;return c.browserCrypto=a,c}return e.prototype.initiateAuthRequest=function(r,n){return U(this,void 0,void 0,function(){var i,o;return B(this,function(a){switch(a.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),ae.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(We.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(We.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),i={apiId:_t.acquireTokenRedirect,timeout:n.redirectTimeout,noHistory:!1},typeof n.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),o=n.onRedirectNavigate(r),o===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,n.navigationClient.navigateExternal(r,i)])));case 1:return a.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,n.navigationClient.navigateExternal(r,i)];case 5:return a.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),ne.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,i,o){return U(this,void 0,void 0,function(){var a,s,c,l,d,u,h;return B(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),ae.isEmpty(r))throw ne.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(n),s=this.browserStorage.getTemporaryCache(a),!s)throw se.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(r,s)}catch(p){throw p instanceof _c&&p.subError===Y.userCancelledError.code?ne.createUserCancelledError():p}return l=this.browserStorage.generateNonceKey(s),d=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,i,o)]:[3,2];case 1:f.sent(),f.label=2;case 2:return c.nonce=d||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return h=f.sent(),this.browserStorage.cleanRequestByState(n),[2,h]}})})},e}(hy);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ce;(function(t){t.INITIALIZE_START="msal:initializeStart",t.INITIALIZE_END="msal:initializeEnd",t.ACCOUNT_ADDED="msal:accountAdded",t.ACCOUNT_REMOVED="msal:accountRemoved",t.LOGIN_START="msal:loginStart",t.LOGIN_SUCCESS="msal:loginSuccess",t.LOGIN_FAILURE="msal:loginFailure",t.ACQUIRE_TOKEN_START="msal:acquireTokenStart",t.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",t.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",t.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",t.SSO_SILENT_START="msal:ssoSilentStart",t.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",t.SSO_SILENT_FAILURE="msal:ssoSilentFailure",t.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",t.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",t.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",t.HANDLE_REDIRECT_START="msal:handleRedirectStart",t.HANDLE_REDIRECT_END="msal:handleRedirectEnd",t.POPUP_OPENED="msal:popupOpened",t.LOGOUT_START="msal:logoutStart",t.LOGOUT_SUCCESS="msal:logoutSuccess",t.LOGOUT_FAILURE="msal:logoutFailure",t.LOGOUT_END="msal:logoutEnd",t.RESTORE_FROM_BFCACHE="msal:restoreFromBFCache"})(Ce||(Ce={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var La;(function(t){t.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",t.USER_CANCEL="USER_CANCEL",t.NO_NETWORK="NO_NETWORK",t.TRANSIENT_ERROR="TRANSIENT_ERROR",t.PERSISTENT_ERROR="PERSISTENT_ERROR",t.DISABLED="DISABLED",t.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(La||(La={}));var eu={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},vo=function(t){Fr(e,t);function e(r,n,i){var o=t.call(this,r,n)||this;return Object.setPrototypeOf(o,e.prototype),o.name="NativeAuthError",o.ext=i,o}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===La.PERSISTENT_ERROR||this.ext.status===La.DISABLED))return!0;switch(this.errorCode){case eu.extensionError.code:return!0;default:return!1}},e.createError=function(r,n,i){if(i&&i.status)switch(i.status){case La.ACCOUNT_UNAVAILABLE:return zi.createNativeAccountUnavailableError();case La.USER_INTERACTION_REQUIRED:return new zi(r,n);case La.USER_CANCEL:return ne.createUserCancelledError();case La.NO_NETWORK:return ne.createNoNetworkConnectivityError()}return new e(r,n,i)},e.createUserSwitchError=function(){return new e(eu.userSwitch.code,eu.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(eu.tokensNotFoundInCache.code,eu.tokensNotFoundInCache.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var zk=function(t){Fr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s;return B(this,function(c){switch(c.label){case 0:return n=this.performanceClient.startMeasurement(O.SilentCacheClientAcquireToken,r.correlationId),i=this.initializeServerTelemetryManager(_t.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(i,r.authority,r.azureCloudOptions)];case 1:o=c.sent(),this.logger.verbose("Silent auth client created"),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,o.acquireCachedToken(r)];case 3:return a=c.sent(),n.endMeasurement({success:!0,fromCache:!0}),[2,a];case 4:throw s=c.sent(),s instanceof ne&&s.errorCode===Y.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),n.endMeasurement({errorCode:s instanceof fe&&s.errorCode||void 0,subErrorCode:s instanceof fe&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n,i){return U(this,void 0,void 0,function(){var o;return B(this,function(a){switch(a.label){case 0:return this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new _O(o,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(r,n){return U(this,void 0,void 0,function(){var i;return B(this,function(o){switch(o.label){case 0:return this.performanceClient.addQueueMeasurement(O.InitializeSilentRequest,this.correlationId),this.performanceClient.setPreQueueTime(O.InitializeBaseRequest,this.correlationId),i=[ue({},r)],[4,this.initializeBaseRequest(r,n)];case 1:return[2,ue.apply(void 0,[ue.apply(void 0,i.concat([o.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Kl=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u,h,f){var p=t.call(this,r,n,i,o,a,s,l,d,f)||this;return p.apiId=c,p.accountId=u,p.nativeMessageHandler=d,p.nativeStorageManager=h,p.silentCacheClient=new zk(r,p.nativeStorageManager,i,o,a,s,l,d,f),p}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return B(this,function(d){switch(d.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),n=this.performanceClient.startMeasurement(O.NativeInteractionClientAcquireToken,r.correlationId),i=gi.nowSeconds(),[4,this.initializeNativeRequest(r)];case 1:o=d.sent(),d.label=2;case 2:return d.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,o)];case 3:return a=d.sent(),n.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,a];case 4:return d.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:Xo.GetToken,request:o},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=d.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,o,i).then(function(u){return n.endMeasurement({success:!0,isNativeBroker:!0,requestId:u.requestId}),u}).catch(function(u){throw n.endMeasurement({success:!1,errorCode:u.errorCode,subErrorCode:u.subError,isNativeBroker:!0}),u})]}})})},e.prototype.createSilentCacheRequest=function(r,n){return{authority:r.authority,correlationId:this.correlationId,scopes:Qr.fromString(r.scope).asArray(),account:n,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(r,n){return U(this,void 0,void 0,function(){var i,o,a,s;return B(this,function(c){switch(c.label){case 0:if(!r)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),se.createNoAccountFoundError();if(i=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:r}),!i)throw se.createNoAccountFoundError();c.label=1;case 1:return c.trys.push([1,3,,4]),o=this.createSilentCacheRequest(n,i),[4,this.silentCacheClient.acquireToken(o)];case 2:return a=c.sent(),[2,a];case 3:throw s=c.sent(),s;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c;return B(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(r)];case 1:n=l.sent(),i={method:Xo.GetToken,request:n},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(i)];case 3:return o=l.sent(),this.validateNativeResponse(o),[3,5];case 4:if(a=l.sent(),a instanceof vo&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(We.NATIVE_REQUEST,JSON.stringify(n),!0),s={apiId:_t.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(r.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return U(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l;return B(this,function(d){switch(d.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(r=this.browserStorage.getCachedNativeRequest(),!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];n=r.prompt,i=C8(r,["prompt"]),n&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(We.NATIVE_REQUEST)),o={method:Xo.GetToken,request:i},a=gi.nowSeconds(),d.label=1;case 1:return d.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(o)];case 2:return s=d.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,i,a),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=d.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(r,n,i){return U(this,void 0,void 0,function(){var o,a,s,c,l,d;return B(this,function(u){switch(u.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),r.account.id!==n.accountId)throw vo.createUserSwitchError();return[4,this.getDiscoveredAuthority(n.authority)];case 1:return o=u.sent(),a=o.getPreferredCache(),s=this.createIdTokenObj(r),c=this.createHomeAccountIdentifier(r,s),l=this.createAccountEntity(r,c,s,a),[4,this.generateAuthenticationResult(r,n,s,l,o.canonicalAuthority,i)];case 2:return d=u.sent(),this.cacheAccount(l),this.cacheNativeTokens(r,n,c,l,s,d.accessToken,d.tenantId,i),[2,d]}})})},e.prototype.createIdTokenObj=function(r){return new Eo(r.id_token||A.EMPTY_STRING,this.browserCrypto)},e.prototype.createHomeAccountIdentifier=function(r,n){var i=Or.generateHomeAccountId(r.client_info||A.EMPTY_STRING,ln.Default,this.logger,this.browserCrypto,n);return i},e.prototype.createAccountEntity=function(r,n,i,o){return Or.createAccount(r.client_info,n,i,void 0,void 0,void 0,o,r.account.id)},e.prototype.generateScopes=function(r,n){return r.scope?Qr.fromString(r.scope):Qr.fromString(n.scope)},e.prototype.generatePopAccessToken=function(r,n){return U(this,void 0,void 0,function(){var i,o;return B(this,function(a){switch(a.label){case 0:if(n.tokenType!==ot.POP)return[3,2];if(r.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),[2,r.shr];if(i=new ad(this.browserCrypto),o={resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,shrNonce:n.shrNonce},!n.keyId)throw se.createKeyIdMissingError();return[4,i.signPopToken(r.access_token,n.keyId,o)];case 1:return[2,a.sent()];case 2:return[2,r.access_token]}})})},e.prototype.generateAuthenticationResult=function(r,n,i,o,a,s){return U(this,void 0,void 0,function(){var c,l,d,u,h,f,p,m;return B(this,function(w){switch(w.label){case 0:return c=this.addTelemetryFromNativeResponse(r),l=r.scope?Qr.fromString(r.scope):Qr.fromString(n.scope),d=r.account.properties||{},u=d.UID||i.claims.oid||i.claims.sub||A.EMPTY_STRING,h=d.TenantId||i.claims.tid||A.EMPTY_STRING,[4,this.generatePopAccessToken(r,n)];case 1:return f=w.sent(),p=n.tokenType===ot.POP?ot.POP:ot.BEARER,m={authority:a,uniqueId:u,tenantId:h,scopes:l.asArray(),account:o.getAccountInfo(),idToken:r.id_token,idTokenClaims:i.claims,accessToken:f,fromCache:c?this.isResponseFromCache(c):!1,expiresOn:new Date(Number(s+r.expires_in)*1e3),tokenType:p,correlationId:this.correlationId,state:r.state,fromNativeBroker:!0},[2,m]}})})},e.prototype.cacheAccount=function(r){var n=this;this.browserStorage.setAccount(r),this.browserStorage.removeAccountContext(r).catch(function(i){n.logger.error("Error occurred while removing account context from browser storage. "+i)})},e.prototype.cacheNativeTokens=function(r,n,i,o,a,s,c,l){var d=qs.createIdTokenEntity(i,n.authority,r.id_token||A.EMPTY_STRING,n.clientId,a.claims.tid||A.EMPTY_STRING),u=n.tokenType===ot.POP?A.SHR_NONCE_VALIDITY:(typeof r.expires_in=="string"?parseInt(r.expires_in,10):r.expires_in)||0,h=l+u,f=this.generateScopes(r,n),p=Ws.createAccessTokenEntity(i,n.authority,s,n.clientId,a?a.claims.tid||A.EMPTY_STRING:c,f.printScopes(),h,0,this.browserCrypto),m=new sh(o,d,p);this.nativeStorageManager.saveCacheRecord(m)},e.prototype.addTelemetryFromNativeResponse=function(r){var n=this.getMATSFromResponse(r);return n?(this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:n.broker_version,matsAccountJoinOnStart:n.account_join_on_start,matsAccountJoinOnEnd:n.account_join_on_end,matsDeviceJoin:n.device_join,matsPromptBehavior:n.prompt_behavior,matsApiErrorCode:n.api_error_code,matsUiVisible:n.ui_visible,matsSilentCode:n.silent_code,matsSilentBiSubCode:n.silent_bi_sub_code,matsSilentMessage:n.silent_message,matsSilentStatus:n.silent_status,matsHttpStatus:n.http_status,matsHttpEventCount:n.http_event_count},this.correlationId),n):null},e.prototype.validateNativeResponse=function(r){if(r.hasOwnProperty("access_token")&&r.hasOwnProperty("id_token")&&r.hasOwnProperty("client_info")&&r.hasOwnProperty("account")&&r.hasOwnProperty("scope")&&r.hasOwnProperty("expires_in"))return r;throw vo.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(r){if(r.properties.MATS)try{return JSON.parse(r.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(r){return typeof r.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!r.is_cached},e.prototype.initializeNativeRequest=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h,f=this;return B(this,function(p){switch(p.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),n=r.authority||this.config.auth.authority,r.account?[4,this.validateRequestAuthority(n,r.account)]:[3,2];case 1:p.sent(),p.label=2;case 2:return i=new je(n),i.validateAsUri(),o=r.scopes,a=C8(r,["scopes"]),s=new Qr(o||[]),s.appendScopes(u1),c=function(){switch(f.apiId){case _t.ssoSilent:case _t.acquireTokenSilent_silentFlow:return f.logger.trace("initializeNativeRequest: silent request sets prompt to none"),en.NONE}if(!r.prompt){f.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(r.prompt){case en.NONE:case en.CONSENT:case en.LOGIN:return f.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),r.prompt;default:throw f.logger.trace("initializeNativeRequest: prompt = "+r.prompt+" is not compatible with native flow"),ne.createNativePromptParameterNotSupportedError()}},l=ue(ue({},a),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:i.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(r.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:r.authenticationScheme,windowTitleSubstring:document.title,extraParameters:ue(ue(ue({},r.extraQueryParameters),r.tokenQueryParameters),{telemetry:Cu.MATS_TELEMETRY}),extendedExpiryToken:!1}),r.authenticationScheme!==ot.POP?[3,4]:(d={resourceRequestUri:r.resourceRequestUri,resourceRequestMethod:r.resourceRequestMethod,shrClaims:r.shrClaims,shrNonce:r.shrNonce},u=new ad(this.browserCrypto),[4,u.generateCnf(d)]);case 3:h=p.sent(),l.reqCnf=h.reqCnfString,l.keyId=h.kid,p.label=4;case 4:return[2,l]}})})},e}(Fk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var oc=function(){function t(e,r,n,i){this.logger=e,this.handshakeTimeoutMs=r,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(O.NativeMessageHandlerHandshake)}return t.prototype.sendMessage=function(e){return U(this,void 0,void 0,function(){var r,n=this;return B(this,function(i){return this.logger.trace("NativeMessageHandler - sendMessage called."),r={channel:Cu.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(r)),this.messageChannel.port1.postMessage(r),[2,new Promise(function(o,a){n.resolvers.set(r.responseId,{resolve:o,reject:a})})]})})},t.createProvider=function(e,r,n){return U(this,void 0,void 0,function(){var i,o;return B(this,function(a){switch(a.label){case 0:e.trace("NativeMessageHandler - createProvider called."),a.label=1;case 1:return a.trys.push([1,3,,5]),i=new t(e,r,n,Cu.PREFERRED_EXTENSION_ID),[4,i.sendHandshakeRequest()];case 2:return a.sent(),[2,i];case 3:return a.sent(),o=new t(e,r,n),[4,o.sendHandshakeRequest()];case 4:return a.sent(),[2,o];case 5:return[2]}})})},t.prototype.sendHandshakeRequest=function(){return U(this,void 0,void 0,function(){var e,r=this;return B(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:Cu.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Xo.HandshakeRequest}},this.handshakeEvent.addStaticFields({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=function(i){r.onChannelMessage(i)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(i,o){r.handshakeResolvers.set(e.responseId,{resolve:i,reject:o}),r.timeoutId=window.setTimeout(function(){window.removeEventListener("message",r.windowListener,!1),r.messageChannel.port1.close(),r.messageChannel.port2.close(),r.handshakeEvent.endMeasurement({extensionHandshakeTimedOut:!0,success:!1}),o(ne.createNativeHandshakeTimeoutError()),r.handshakeResolvers.delete(e.responseId)},r.handshakeTimeoutMs)})]})})},t.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var r=e.data;if(!(!r.channel||r.channel!==Cu.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===Xo.HandshakeRequest){this.logger.verbose(r.extensionId?"Extension with id: "+r.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var n=this.handshakeResolvers.get(r.responseId);n&&(this.handshakeEvent.endMeasurement({success:!1,extensionInstalled:!1}),n.reject(ne.createNativeExtensionNotInstalledError()))}}},t.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var r=e.data,n=this.resolvers.get(r.responseId),i=this.handshakeResolvers.get(r.responseId);try{var o=r.body.method;if(o===Xo.Response){if(!n)return;var a=r.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(a)),a.status!=="Success")n.reject(vo.createError(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(vo.createError(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw fe.createUnexpectedError("Event does not contain result.");this.resolvers.delete(r.responseId)}else if(o===Xo.HandshakeResponse){if(!i)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=r.extensionId,this.extensionVersion=r.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),this.handshakeEvent.endMeasurement({extensionInstalled:!0,success:!0}),i.resolve(),this.handshakeResolvers.delete(r.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+s.toString()),this.logger.errorPii("Unable to parse "+e),n?n.reject(s):i&&i.reject(s)}},t.prototype.getExtensionId=function(){return this.extensionId},t.prototype.getExtensionVersion=function(){return this.extensionVersion},t.isNativeAvailable=function(e,r,n,i){if(r.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return r.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return r.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case ot.BEARER:case ot.POP:return r.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return r.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ZO=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,c,d,u)||this;return h.nativeStorage=l,h}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h=this;return B(this,function(f){switch(f.label){case 0:return this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Redirect)];case 1:n=f.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||A.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(_t.acquireTokenRedirect),o=function(p){p.persisted&&(h.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),h.browserStorage.cleanRequestByState(n.state),h.eventHandler.emitEvent(Ce.RESTORE_FROM_BFCACHE,de.Redirect))},f.label=2;case 2:return f.trys.push([2,7,,8]),this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return a=f.sent(),this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(i,n.authority,n.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new O8(s,this.browserStorage,a,this.logger,this.browserCrypto,this.performanceClient),[4,s.getAuthCodeUrl(ue(ue({},n),{nativeBroker:oc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme)}))];case 5:return l=f.sent(),d=this.getRedirectStartPage(r.redirectStartPage),this.logger.verbosePii("Redirect start page: "+d),window.addEventListener("pageshow",o),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:d,onRedirectNavigate:r.onRedirectNavigate})];case 6:return[2,f.sent()];case 7:throw u=f.sent(),u instanceof fe&&u.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),i.cacheFailedRequest(u),this.browserStorage.cleanRequestByState(n.state),u;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h,f,p;return B(this,function(m){switch(m.label){case 0:n=this.initializeServerTelemetryManager(_t.handleRedirectPromise),m.label=1;case 1:if(m.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(i=this.getRedirectResponseHash(r||window.location.hash),!i)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(de.Redirect),[2,null];o=void 0;try{a=je.getDeserializedHash(i),o=this.validateAndExtractStateFromHash(a,de.Redirect),this.logger.verbose("State extracted from hash")}catch(w){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+w),this.browserStorage.cleanRequestByInteractionType(de.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(We.ORIGIN_URI,!0)||A.EMPTY_STRING,c=je.removeHashFromUrl(s),l=je.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(i,o,n)]):[3,3];case 2:return d=m.sent(),s.indexOf("#")>-1&&Yt.replaceHash(s),[2,d];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(i,o,n)]);case 4:return!Yt.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(We.URL_HASH,i,!0),u={apiId:_t.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},h=!0,!s||s==="null"?(f=Yt.getHomepage(),this.browserStorage.setTemporaryCache(We.ORIGIN_URI,f,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(f,u)]):[3,6]):[3,9];case 5:return h=m.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,u)];case 7:h=m.sent(),m.label=8;case 8:if(!h)return[2,this.handleHash(i,o,n)];m.label=9;case 9:return[2,null];case 10:throw p=m.sent(),p instanceof fe&&p.setCorrelationId(this.correlationId),n.cacheFailedRequest(p),this.browserStorage.cleanRequestByInteractionType(de.Redirect),p;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=je.hashContainsKnownProperties(r);if(n)return Yt.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),r;var i=this.browserStorage.getTemporaryCache(We.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(We.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),i},e.prototype.handleHash=function(r,n,i){return U(this,void 0,void 0,function(){var o,a,s,c,l,d,u,h=this;return B(this,function(f){switch(f.label){case 0:if(o=this.browserStorage.getCachedRequest(n,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),a=je.getDeserializedHash(r),a.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return s=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.nativeStorage,o.correlationId),c=na.parseRequestState(this.browserCrypto,n).userRequestState,[2,s.acquireToken(ue(ue({},o),{state:c,prompt:void 0})).finally(function(){h.browserStorage.cleanRequestByState(n)})]}if(l=this.browserStorage.getCachedAuthority(n),!l)throw ne.createNoCachedAuthorityError();return this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,o.correlationId),[4,this.createAuthCodeClient(i,l)];case 1:return d=f.sent(),this.logger.verbose("Auth code client created"),P2.removeThrottle(this.browserStorage,this.config.auth.clientId,o),u=new O8(d,this.browserStorage,o,this.logger,this.browserCrypto,this.performanceClient),[4,u.handleCodeResponseFromHash(r,n,d.authority,this.networkClient)];case 2:return[2,f.sent()]}})})},e.prototype.logout=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return B(this,function(d){switch(d.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),i=this.initializeServerTelemetryManager(_t.logout),d.label=1;case 1:return d.trys.push([1,10,,11]),this.eventHandler.emitEvent(Ce.LOGOUT_START,de.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return d.sent(),o={apiId:_t.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,n.correlationId),[4,this.createAuthCodeClient(i,r&&r.authority)];case 3:return a=d.sent(),this.logger.verbose("Auth code client created"),s=a.getLogoutUri(n),this.eventHandler.emitEvent(Ce.LOGOUT_SUCCESS,de.Redirect,n),r&&typeof r.onRedirectNavigate=="function"?(c=r.onRedirectNavigate(s),c===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)])):[3,7];case 4:return d.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),d.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)];case 8:return d.sent(),[2];case 9:return[3,11];case 10:throw l=d.sent(),l instanceof fe&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.eventHandler.emitEvent(Ce.LOGOUT_FAILURE,de.Redirect,null,l),this.eventHandler.emitEvent(Ce.LOGOUT_END,de.Redirect),l;case 11:return this.eventHandler.emitEvent(Ce.LOGOUT_END,de.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return je.getAbsoluteUrl(n,Yt.getCurrentUri())},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var HO=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,c,d,u)||this;return h.unloadWindow=h.unloadWindow.bind(h),h.nativeStorage=l,h}return e.prototype.acquireToken=function(r){try{var n=this.generatePopupName(r.scopes||u1,r.authority||this.config.auth.authority),i=r.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(r,n,i);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var o=this.openSizedPopup("about:blank",n,i);return this.acquireTokenPopupAsync(r,n,i,o)}catch(a){return Promise.reject(a)}},e.prototype.logout=function(r){try{this.logger.verbose("logoutPopup called");var n=this.initializeLogoutRequest(r),i=this.generateLogoutPopupName(n),o=r&&r.authority,a=r&&r.mainWindowRedirectUri,s=(r==null?void 0:r.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(n,i,s,o,void 0,a);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",i,s);return this.logoutPopupAsync(n,i,s,o,c,a)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(r,n,i,o){return U(this,void 0,void 0,function(){var a,s,c,l,d,u,h,f,p,m,w,g,v,b,E,k,x,S=this;return B(this,function(Z){switch(Z.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(_t.acquireTokenPopup),this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Popup)];case 1:s=Z.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||A.EMPTY_STRING,s.account||null),Z.label=2;case 2:return Z.trys.push([2,8,,9]),this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=Z.sent(),this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=Z.sent(),this.logger.verbose("Auth code client created"),d=oc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme),u=void 0,d&&(u=this.performanceClient.startMeasurement(O.FetchAccountIdWithNativeBroker,r.correlationId)),[4,l.getAuthCodeUrl(ue(ue({},s),{nativeBroker:d}))];case 5:return h=Z.sent(),f=new hy(l,this.browserStorage,c,this.logger,this.performanceClient),p={popup:o,popupName:n,popupWindowAttributes:i},m=this.initiateAuthRequest(h,p),this.eventHandler.emitEvent(Ce.POPUP_OPENED,de.Popup,{popupWindow:m},null),[4,this.monitorPopupForHash(m)];case 6:if(w=Z.sent(),g=je.getDeserializedHash(w),v=this.validateAndExtractStateFromHash(g,de.Popup,s.correlationId),P2.removeThrottle(this.browserStorage,this.config.auth.clientId,c),g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),u&&u.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return b=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,g.accountId,this.nativeStorage,s.correlationId),E=na.parseRequestState(this.browserCrypto,v).userRequestState,[2,b.acquireToken(ue(ue({},s),{state:E,prompt:void 0})).finally(function(){S.browserStorage.cleanRequestByState(v)})]}return[4,f.handleCodeResponseFromHash(w,v,l.authority,this.networkClient)];case 7:return k=Z.sent(),[2,k];case 8:throw x=Z.sent(),o&&o.close(),x instanceof fe&&x.setCorrelationId(this.correlationId),a.cacheFailedRequest(x),this.browserStorage.cleanRequestByState(s.state),x;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,i,o,a,s){return U(this,void 0,void 0,function(){var c,l,d,u,h,f,p;return B(this,function(m){switch(m.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(Ce.LOGOUT_START,de.Popup,r),c=this.initializeServerTelemetryManager(_t.logoutPopup),m.label=1;case 1:return m.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(r.account)];case 2:return m.sent(),this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(c,o)];case 3:return l=m.sent(),this.logger.verbose("Auth code client created"),d=l.getLogoutUri(r),this.eventHandler.emitEvent(Ce.LOGOUT_SUCCESS,de.Popup,r),u=this.openPopup(d,{popupName:n,popupWindowAttributes:i,popup:a}),this.eventHandler.emitEvent(Ce.POPUP_OPENED,de.Popup,{popupWindow:u},null),[4,this.waitForLogoutPopup(u)];case 4:return m.sent(),s?(h={apiId:_t.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=je.getAbsoluteUrl(s,Yt.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+f),this.navigationClient.navigateInternal(f,h)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw p=m.sent(),a&&a.close(),p instanceof fe&&p.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(Ce.LOGOUT_FAILURE,de.Popup,null,p),this.eventHandler.emitEvent(Ce.LOGOUT_END,de.Popup),c.cacheFailedRequest(p),p;case 6:return this.eventHandler.emitEvent(Ce.LOGOUT_END,de.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(r,n){if(ae.isEmpty(r))throw this.logger.error("Navigate url is empty"),ne.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+r),this.openPopup(r,n)},e.prototype.monitorPopupForHash=function(r){var n=this;return new Promise(function(i,o){var a=n.config.system.windowHashTimeout/n.config.system.pollIntervalMilliseconds,s=0;n.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(r.closed){n.logger.error("PopupHandler.monitorPopupForHash - window closed"),n.cleanPopup(),clearInterval(c),o(ne.createUserCancelledError());return}var l=A.EMPTY_STRING,d=A.EMPTY_STRING;try{l=r.location.href,d=r.location.hash}catch{}ae.isEmpty(l)||l==="about:blank"||(n.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,d?(n.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),n.cleanPopup(r),je.hashContainsKnownProperties(d)?(n.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),i(d)):(n.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),n.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+d),o(ne.createHashDoesNotContainKnownPropertiesError()))):s>a&&(n.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),o(ne.createMonitorPopupTimeoutError())))},n.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(r){var n=this;return new Promise(function(i){n.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var o=setInterval(function(){r.closed&&(n.logger.error("PopupHandler.waitForLogoutPopup - window closed"),n.cleanPopup(),clearInterval(o),i());var a=A.EMPTY_STRING;try{a=r.location.href}catch{}ae.isEmpty(a)||a==="about:blank"||(n.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(o),n.cleanPopup(r),i())},n.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(r,n){try{var i=void 0;if(n.popup?(i=n.popup,this.logger.verbosePii("Navigating popup window to: "+r),i.location.assign(r)):typeof n.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+r),i=this.openSizedPopup(r,n.popupName,n.popupWindowAttributes)),!i)throw ne.createEmptyWindowCreatedError();return i.focus&&i.focus(),this.currentWindow=i,window.addEventListener("beforeunload",this.unloadWindow),i}catch(o){throw this.logger.error("error opening popup "+o.message),this.browserStorage.setInteractionInProgress(!1),ne.createPopupWindowError(o.toString())}},e.prototype.openSizedPopup=function(r,n,i){var o,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,d=window.screenTop?window.screenTop:window.screenY,u=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(o=i.popupSize)===null||o===void 0?void 0:o.width,p=(a=i.popupSize)===null||a===void 0?void 0:a.height,m=(s=i.popupPosition)===null||s===void 0?void 0:s.top,w=(c=i.popupPosition)===null||c===void 0?void 0:c.left;return(!f||f<0||f>u)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=Vi.POPUP_WIDTH),(!p||p<0||p>h)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),p=Vi.POPUP_HEIGHT),(!m||m<0||m>h)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),m=Math.max(0,h/2-Vi.POPUP_HEIGHT/2+d)),(!w||w<0||w>u)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),w=Math.max(0,u/2-Vi.POPUP_WIDTH/2+l)),window.open(r,n,"width="+f+", height="+p+", top="+m+", left="+w+", scrollbars=yes")},e.prototype.unloadWindow=function(r){this.browserStorage.cleanRequestByInteractionType(de.Popup),this.currentWindow&&this.currentWindow.close(),r.preventDefault()},e.prototype.cleanPopup=function(r){r&&r.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(r,n){return Vi.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+r.join("-")+"."+n+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(r){var n=r.account&&r.account.homeAccountId;return Vi.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+n+"."+this.correlationId},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var $O=function(){function t(){}return t.prototype.navigateInternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.prototype.navigateExternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.defaultNavigateWindow=function(e,r){return r.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(n){setTimeout(function(){n(!0)},r.timeout)})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var LO=6e4,O4=6e3,OO=3e4,NO=2e3;function DO(t,e){var r=t.auth,n=t.cache,i=t.system,o=t.telemetry,a={clientId:A.EMPTY_STRING,authority:""+A.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:A.EMPTY_STRING,authorityMetadata:A.EMPTY_STRING,redirectUri:A.EMPTY_STRING,postLogoutRedirectUri:A.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Nh.AAD,azureCloudOptions:{azureCloudInstance:Oh.None,tenant:A.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:sr.SessionStorage,temporaryCacheLocation:sr.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(n&&n.cacheLocation===sr.LocalStorage),claimsBasedCachingEnabled:!0},c={loggerCallback:function(){},logLevel:Bt.Info,piiLoggingEnabled:!1},l=ue(ue({},$k),{loggerOptions:c,networkClient:e?Yt.getBrowserNetworkClient():EO,navigationClient:new $O,loadFrameTimeout:0,windowHashTimeout:(i==null?void 0:i.loadFrameTimeout)||LO,iframeHashTimeout:(i==null?void 0:i.loadFrameTimeout)||O4,navigateFrameWait:e&&Yt.detectIEOrEdge()?500:0,redirectNavigationTimeout:OO,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(i==null?void 0:i.nativeBrokerHandshakeTimeout)||NO,pollIntervalMilliseconds:Vi.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),d=ue(ue({},i),{loggerOptions:(i==null?void 0:i.loggerOptions)||c}),u={application:{appName:A.EMPTY_STRING,appVersion:A.EMPTY_STRING}},h={auth:ue(ue({},a),r),cache:ue(ue({},s),n),system:ue(ue({},l),d),telemetry:ue(ue({},u),o)};return h}/*! @azure/msal-browser v2.38.3 2023-10-27 */var jk=function(t){Fr(e,t);function e(r,n,i,o,a,s){var c=t.call(this,r,n,i,o,s)||this;return c.navigateFrameWait=a.navigateFrameWait,c.pollIntervalMilliseconds=a.pollIntervalMilliseconds,c}return e.prototype.initiateAuthRequest=function(r){return U(this,void 0,void 0,function(){return B(this,function(n){switch(n.label){case 0:if(this.performanceClient.addQueueMeasurement(O.SilentHandlerInitiateAuthRequest,this.authCodeRequest.correlationId),ae.isEmpty(r))throw this.logger.info("Navigate url is empty"),ne.createEmptyNavigationUriError();return this.navigateFrameWait?(this.performanceClient.setPreQueueTime(O.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),[4,this.loadFrame(r)]):[3,2];case 1:return[2,n.sent()];case 2:return[2,this.loadFrameSync(r)]}})})},e.prototype.monitorIframeForHash=function(r,n){var i=this;return this.performanceClient.addQueueMeasurement(O.SilentHandlerMonitorIframeForHash,this.authCodeRequest.correlationId),new Promise(function(o,a){n<O4&&i.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+O4+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+n,l=setInterval(function(){if(window.performance.now()>c){i.removeHiddenIframe(r),clearInterval(l),a(ne.createMonitorIframeTimeoutError());return}var d=A.EMPTY_STRING,u=r.contentWindow;try{d=u?u.location.href:A.EMPTY_STRING}catch{}if(!ae.isEmpty(d)){var h=u?u.location.hash:A.EMPTY_STRING;if(je.hashContainsKnownProperties(h)){i.removeHiddenIframe(r),clearInterval(l),o(h);return}}},i.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(r){var n=this;return this.performanceClient.addQueueMeasurement(O.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),new Promise(function(i,o){var a=n.createHiddenIframe();setTimeout(function(){if(!a){o("Unable to load iframe");return}a.src=r,i(a)},n.navigateFrameWait)})},e.prototype.loadFrameSync=function(r){var n=this.createHiddenIframe();return n.src=r,n},e.prototype.createHiddenIframe=function(){var r=document.createElement("iframe");return r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(r),r},e.prototype.removeHiddenIframe=function(r){document.body===r.parentNode&&document.body.removeChild(r)},e}(hy);/*! @azure/msal-browser v2.38.3 2023-10-27 */var VO=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u,h){var f=t.call(this,r,n,i,o,a,s,l,u,h)||this;return f.apiId=c,f.nativeStorage=d,f}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s;return B(this,function(c){switch(c.label){case 0:if(this.performanceClient.addQueueMeasurement(O.SilentIframeClientAcquireToken,r.correlationId),this.logger.verbose("acquireTokenByIframe called"),n=this.performanceClient.startMeasurement(O.SilentIframeClientAcquireToken,r.correlationId),ae.isEmpty(r.loginHint)&&ae.isEmpty(r.sid)&&(!r.account||ae.isEmpty(r.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),r.prompt&&r.prompt!==en.NONE&&r.prompt!==en.NO_SESSION)throw n.endMeasurement({success:!1}),ne.createSilentPromptValueError(r.prompt);return this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(ue(ue({},r),{prompt:r.prompt||en.NONE}),de.Silent)];case 1:i=c.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||A.EMPTY_STRING,i.account||null),o=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(o,i.authority,i.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),this.performanceClient.setPreQueueTime(O.SilentIframeClientTokenHelper,r.correlationId),[4,this.silentTokenHelper(a,i).then(function(l){return n.endMeasurement({success:!0,fromCache:!1,requestId:l.requestId}),l})];case 4:return[2,c.sent()];case 5:throw s=c.sent(),s instanceof fe&&s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(i.state),n.endMeasurement({errorCode:s instanceof fe&&s.errorCode||void 0,subErrorCode:s instanceof fe&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n){return U(this,void 0,void 0,function(){var i,o,a,s,c,l,d,u,h,f=this;return B(this,function(p){switch(p.label){case 0:return this.performanceClient.addQueueMeasurement(O.SilentIframeClientTokenHelper,n.correlationId),this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationCodeRequest,n.correlationId),[4,this.initializeAuthorizationCodeRequest(n)];case 1:return i=p.sent(),this.performanceClient.setPreQueueTime(O.GetAuthCodeUrl,n.correlationId),[4,r.getAuthCodeUrl(ue(ue({},n),{nativeBroker:oc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,n.authenticationScheme)}))];case 2:return o=p.sent(),a=new jk(r,this.browserStorage,i,this.logger,this.config.system,this.performanceClient),this.performanceClient.setPreQueueTime(O.SilentHandlerInitiateAuthRequest,n.correlationId),[4,a.initiateAuthRequest(o)];case 3:return s=p.sent(),this.performanceClient.setPreQueueTime(O.SilentHandlerMonitorIframeForHash,n.correlationId),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=p.sent(),l=je.getDeserializedHash(c),d=this.validateAndExtractStateFromHash(l,de.Silent,i.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return u=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),h=na.parseRequestState(this.browserCrypto,d).userRequestState,[2,u.acquireToken(ue(ue({},n),{state:h,prompt:n.prompt||en.NONE})).finally(function(){f.browserStorage.cleanRequestByState(d)})]}return this.performanceClient.setPreQueueTime(O.HandleCodeResponseFromHash,n.correlationId),[2,a.handleCodeResponseFromHash(c,d,r.authority,this.networkClient)]}})})},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var FO=function(t){Fr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c=this;return B(this,function(l){switch(l.label){case 0:return this.performanceClient.addQueueMeasurement(O.SilentRefreshClientAcquireToken,r.correlationId),this.performanceClient.setPreQueueTime(O.InitializeBaseRequest,r.correlationId),i=[ue({},r)],[4,this.initializeBaseRequest(r,r.account)];case 1:return n=ue.apply(void 0,i.concat([l.sent()])),o=this.performanceClient.startMeasurement(O.SilentRefreshClientAcquireToken,n.correlationId),a=this.initializeServerTelemetryManager(_t.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,n.authority,n.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),this.performanceClient.setPreQueueTime(O.RefreshTokenClientAcquireTokenByRefreshToken,r.correlationId),[2,s.acquireTokenByRefreshToken(n).then(function(d){return o.endMeasurement({success:!0,fromCache:d.fromCache,requestId:d.requestId}),d}).catch(function(d){throw d instanceof fe&&d.setCorrelationId(c.correlationId),a.cacheFailedRequest(d),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n,i){return U(this,void 0,void 0,function(){var o;return B(this,function(a){switch(a.label){case 0:return this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Ok(o,this.performanceClient)]}})})},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var zO=function(){function t(e,r){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=r,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return t.prototype.addEventCallback=function(e){if(typeof window<"u"){var r=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(r,e),this.logger.verbose("Event callback registered with id: "+r),r}return null},t.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},t.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))},t.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))},t.prototype.emitEvent=function(e,r,n,i){var o=this;if(typeof window<"u"){var a={eventType:e,interactionType:r||null,payload:n||null,error:i||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){o.logger.verbose("Emitting event to callback "+c+": "+e),s.apply(null,[a])})}},t.prototype.handleAccountCacheChange=function(e){try{var r=e.newValue||e.oldValue;if(!r)return;var n=JSON.parse(r);if(typeof n!="object"||!Or.isAccountEntity(n))return;var i=Tn.toObject(new Or,n),o=i.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(Ce.ACCOUNT_ADDED,void 0,o)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(Ce.ACCOUNT_REMOVED,void 0,o))}catch{return}},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wr=function(){function t(){}return t.decimalToHex=function(e){for(var r=e.toString(16);r.length<2;)r="0"+r;return r},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Uk=function(){function t(e){this.cryptoObj=e}return t.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,Wr.decimalToHex(e[0])+Wr.decimalToHex(e[1])+Wr.decimalToHex(e[2])+Wr.decimalToHex(e[3])+"-"+Wr.decimalToHex(e[4])+Wr.decimalToHex(e[5])+"-"+Wr.decimalToHex(e[6])+Wr.decimalToHex(e[7])+"-"+Wr.decimalToHex(e[8])+Wr.decimalToHex(e[9])+"-"+Wr.decimalToHex(e[10])+Wr.decimalToHex(e[11])+Wr.decimalToHex(e[12])+Wr.decimalToHex(e[13])+Wr.decimalToHex(e[14])+Wr.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",i=0,o=A.EMPTY_STRING,a=0;a<36;a++)r[a]!=="-"&&r[a]!=="4"&&(i=Math.random()*16|0),r[a]==="x"?o+=n[i]:r[a]==="y"?(i&=3,i|=8,o+=n[i]):o+=r[a];return o}},t.prototype.isGuid=function(e){var r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return r.test(e)},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ia=function(){function t(){}return t.stringToUtf8Arr=function(e){for(var r,n=0,i=e.length,o=0;o<i;o++)r=e.charCodeAt(o),n+=r<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;for(var a=new Uint8Array(n),s=0,c=0;s<n;c++)r=e.charCodeAt(c),r<128?a[s++]=r:r<2048?(a[s++]=192+(r>>>6),a[s++]=128+(r&63)):r<65536?(a[s++]=224+(r>>>12),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<2097152?(a[s++]=240+(r>>>18),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<67108864?(a[s++]=248+(r>>>24),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):(a[s++]=252+(r>>>30),a[s++]=128+(r>>>24&63),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63));return a},t.stringToArrayBuffer=function(e){for(var r=new ArrayBuffer(e.length),n=new Uint8Array(r),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return r},t.utf8ArrToString=function(e){for(var r=A.EMPTY_STRING,n=void 0,i=e.length,o=0;o<i;o++)n=e[o],r+=String.fromCharCode(n>251&&n<254&&o+5<i?(n-252)*1073741824+(e[++o]-128<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>247&&n<252&&o+4<i?(n-248<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>239&&n<248&&o+3<i?(n-240<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>223&&n<240&&o+2<i?(n-224<<12)+(e[++o]-128<<6)+e[++o]-128:n>191&&n<224&&o+1<i?(n-192<<6)+e[++o]-128:n);return r},t.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Bk=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,A.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,A.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=ia.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n=A.EMPTY_STRING,i=void 0,o=e.length,a=0,s=0;s<o;s++)i=s%3,a|=e[s]<<(16>>>i&24),(i===2||e.length-s===1)&&(n+=String.fromCharCode(this.uint6ToB64(a>>>18&63),this.uint6ToB64(a>>>12&63),this.uint6ToB64(a>>>6&63),this.uint6ToB64(a&63)),a=0);return r===0?n:n.substring(0,n.length-r)+(r===1?"=":"==")},t.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var jO=function(){function t(){}return t.prototype.decode=function(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("Invalid base64 string")}var n=this.base64DecToArr(r);return ia.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,A.EMPTY_STRING),i=n.length,o=r?Math.ceil((i*3+1>>>2)/r)*r:i*3+1>>>2,a=new Uint8Array(o),s=void 0,c=void 0,l=0,d=0,u=0;u<i;u++)if(c=u&3,l|=this.b64ToUint6(n.charCodeAt(u))<<18-6*c,c===3||i-u===1){for(s=0;s<3&&d<o;s++,d++)a[d]=l>>>(16>>>s&24)&255;l=0}return a},t.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var UO=32,BO=function(){function t(e){this.base64Encode=new Bk,this.cryptoObj=e}return t.prototype.generateCodes=function(){return U(this,void 0,void 0,function(){var e,r;return B(this,function(n){switch(n.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return r=n.sent(),[2,{verifier:e,challenge:r}]}})})},t.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(UO);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw ne.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return r=i.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(r))];case 2:throw n=i.sent(),ne.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var qO=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,window.crypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){return[2,window.crypto.subtle.exportKey(sd,e)]})})},t.prototype.importKey=function(e,r,n,i){return U(this,void 0,void 0,function(){return B(this,function(o){return[2,window.crypto.subtle.importKey(sd,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,window.crypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var WO=function(){function t(){}return t.prototype.initPrng=function(e){return window.msrCrypto.initPrng(cy(e))},t.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,window.msrCrypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){return[2,window.msrCrypto.subtle.exportKey(sd,e)]})})},t.prototype.importKey=function(e,r,n,i){return U(this,void 0,void 0,function(){return B(this,function(o){return[2,window.msrCrypto.subtle.importKey(sd,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,window.msrCrypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,window.msrCrypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var GO=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.generateKey(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.exportKey=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){return[2,new Promise(function(n,i){var o=window.msCrypto.subtle.exportKey(sd,e);o.addEventListener("complete",function(a){var s=a.target.result,c=ia.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,A.EMPTY_STRING).replace(/\n/g,A.EMPTY_STRING).replace(/\t/g,A.EMPTY_STRING).split(" ").join(A.EMPTY_STRING).replace("\0",A.EMPTY_STRING);try{n(JSON.parse(c))}catch(l){i(l)}}),o.addEventListener("error",function(a){i(a)})})]})})},t.prototype.importKey=function(e,r,n,i){return U(this,void 0,void 0,function(){var o,a;return B(this,function(s){return o=ia.getSortedObjectString(e),a=ia.stringToArrayBuffer(o),[2,new Promise(function(c,l){var d=window.msCrypto.subtle.importKey(sd,a,r,n,i);d.addEventListener("complete",function(u){c(u.target.result)}),d.addEventListener("error",function(u){l(u)})})]})})},t.prototype.sign=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.sign(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.digest=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,new Promise(function(i,o){var a=window.msCrypto.subtle.digest(e,r.buffer);a.addEventListener("complete",function(s){i(s.target.result)}),a.addEventListener("error",function(s){o(s)})})]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var KO="RSASSA-PKCS1-v1_5",N8="SHA-256",YO=2048,QO=new Uint8Array([1,0,1]),qk=function(){function t(e,r){var n,i;if(this.logger=e,this.cryptoOptions=r,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new qO;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new GO;else if(this.hasMsrCrypto()&&(!((n=this.cryptoOptions)===null||n===void 0)&&n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new WO;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),ne.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((i=this.cryptoOptions)===null||i===void 0)&&i.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),$2.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:KO,hash:N8,modulusLength:YO,publicExponent:QO}}return t.prototype.hasIECrypto=function(){return"msCrypto"in window},t.prototype.hasBrowserCrypto=function(){return"crypto"in window},t.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},t.prototype.sha256Digest=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){return r=ia.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:N8},r)]})})},t.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){return[2,this.subtleCrypto.exportKey(e)]})})},t.prototype.importJwk=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var XO=function(){function t(){this.dbName=H4,this.version=IO,this.tableName=TO,this.dbOpen=!1}return t.prototype.open=function(){return U(this,void 0,void 0,function(){var e=this;return B(this,function(r){return[2,new Promise(function(n,i){var o=window.indexedDB.open(e.dbName,e.version);o.addEventListener("upgradeneeded",function(a){var s=a;s.target.result.createObjectStore(e.tableName)}),o.addEventListener("success",function(a){var s=a;e.db=s.target.result,e.dbOpen=!0,n()}),o.addEventListener("error",function(){return i(ne.createDatabaseUnavailableError())})})]})})},t.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},t.prototype.validateDbIsOpen=function(){return U(this,void 0,void 0,function(){return B(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},t.prototype.getItem=function(e){return U(this,void 0,void 0,function(){var r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.get(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.setItem=function(e,r){return U(this,void 0,void 0,function(){var n=this;return B(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(o,a){if(!n.db)return a(ne.createDatabaseNotOpenError());var s=n.db.transaction([n.tableName],"readwrite"),c=s.objectStore(n.tableName),l=c.put(r,e);l.addEventListener("success",function(){n.closeConnection(),o()}),l.addEventListener("error",function(d){n.closeConnection(),a(d)})})]}})})},t.prototype.removeItem=function(e){return U(this,void 0,void 0,function(){var r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readwrite"),s=a.objectStore(r.tableName),c=s.delete(e);c.addEventListener("success",function(){r.closeConnection(),i()}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.getKeys=function(){return U(this,void 0,void 0,function(){var e=this;return B(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(n,i){if(!e.db)return i(ne.createDatabaseNotOpenError());var o=e.db.transaction([e.tableName],"readonly"),a=o.objectStore(e.tableName),s=a.getAllKeys();s.addEventListener("success",function(c){var l=c;e.closeConnection(),n(l.target.result)}),s.addEventListener("error",function(c){e.closeConnection(),i(c)})})]}})})},t.prototype.containsKey=function(e){return U(this,void 0,void 0,function(){var r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.count(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result===1)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.deleteDatabase=function(){return U(this,void 0,void 0,function(){return B(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(r,n){var i=window.indexedDB.deleteDatabase(H4);i.addEventListener("success",function(){return r(!0)}),i.addEventListener("blocked",function(){return r(!0)}),i.addEventListener("error",function(){return n(!1)})})]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var D8=function(){function t(e,r){this.inMemoryCache=new $4,this.indexedDBCache=new XO,this.logger=e,this.storeName=r}return t.prototype.handleDatabaseAccessError=function(e){if(e instanceof ne&&e.errorCode===Y.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},t.prototype.getItem=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.getItem(e),r)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.setItem=function(e,r){return U(this,void 0,void 0,function(){var n;return B(this,function(i){switch(i.label){case 0:this.inMemoryCache.setItem(e,r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,r)];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2]}})})},t.prototype.removeItem=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){switch(n.label){case 0:this.inMemoryCache.removeItem(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return n.sent(),[3,4];case 3:return r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2]}})})},t.prototype.getKeys=function(){return U(this,void 0,void 0,function(){var e,r;return B(this,function(n){switch(n.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,n.sent()];case 3:return r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2,e]}})})},t.prototype.containsKey=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.containsKey(e),r)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},t.prototype.clearPersistent=function(){return U(this,void 0,void 0,function(){var e,r;return B(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=n.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return r=n.sent(),this.handleDatabaseAccessError(r),[2,!1];case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var L2;(function(t){t.asymmetricKeys="asymmetricKeys",t.symmetricKeys="symmetricKeys"})(L2||(L2={}));var JO=function(){function t(e){this.logger=e,this.asymmetricKeys=new D8(this.logger,L2.asymmetricKeys),this.symmetricKeys=new D8(this.logger,L2.symmetricKeys)}return t.prototype.clear=function(){return U(this,void 0,void 0,function(){var e;return B(this,function(r){switch(r.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return r.sent(),[2,!0];case 3:return e=r.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var eN=function(){function t(e,r,n){this.logger=e,this.browserCrypto=new qk(this.logger,n),this.b64Encode=new Bk,this.b64Decode=new jO,this.guidGenerator=new Uk(this.browserCrypto),this.pkceGenerator=new BO(this.browserCrypto),this.cache=new JO(this.logger),this.performanceClient=r}return t.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},t.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},t.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},t.prototype.generatePkceCodes=function(){return U(this,void 0,void 0,function(){return B(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){var r;return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d;return B(this,function(u){switch(u.label){case 0:return n=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(O.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return i=u.sent(),[4,this.browserCrypto.exportJwk(i.publicKey)];case 2:return o=u.sent(),a={e:o.e,kty:o.kty,n:o.n},s=ia.getSortedObjectString(a),[4,this.hashString(s)];case 3:return c=u.sent(),[4,this.browserCrypto.exportJwk(i.privateKey)];case 4:return l=u.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return d=u.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:d,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return u.sent(),n&&n.endMeasurement({success:!0}),[2,c]}})})},t.prototype.removeTokenBindingKey=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){switch(n.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return n.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return r=n.sent(),[2,!r]}})})},t.prototype.clearKeystore=function(){return U(this,void 0,void 0,function(){return B(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},t.prototype.signJwt=function(e,r,n){var i;return U(this,void 0,void 0,function(){var o,a,s,c,l,d,u,h,f,p,m,w,g;return B(this,function(v){switch(v.label){case 0:return o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(O.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(a=v.sent(),!a)throw ne.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(a.publicKey)];case 2:return s=v.sent(),c=ia.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:r})),d=kO.getShrHeaderString({kid:l,alg:s.alg}),u=this.b64Encode.urlEncode(d),e.cnf={jwk:JSON.parse(c)},h=this.b64Encode.urlEncode(JSON.stringify(e)),f=u+"."+h,p=ia.stringToArrayBuffer(f),[4,this.browserCrypto.sign(a.privateKey,p)];case 3:return m=v.sent(),w=this.b64Encode.urlEncodeArr(new Uint8Array(m)),g=f+"."+w,o&&o.endMeasurement({success:!0}),[2,g]}})})},t.prototype.hashString=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){switch(i.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return r=i.sent(),n=new Uint8Array(r),[2,this.b64Encode.urlEncodeArr(n)]}})})},t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var V8=function(){function t(e,r){this.correlationId=r,this.measureName=t.makeMeasureName(e,r),this.startMark=t.makeStartMark(e,r),this.endMark=t.makeEndMark(e,r)}return t.makeMeasureName=function(e,r){return"msal.measure."+e+"."+r},t.makeStartMark=function(e,r){return"msal.start."+e+"."+r},t.makeEndMark=function(e,r){return"msal.end."+e+"."+r},t.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},t.flushMeasurements=function(e,r){if(t.supportsBrowserPerformance())try{r.forEach(function(n){var i=t.makeMeasureName(n.name,e),o=window.performance.getEntriesByName(i,"measure");o.length>0&&(window.performance.clearMeasures(i),window.performance.clearMarks(t.makeStartMark(i,e)),window.performance.clearMarks(t.makeEndMark(i,e)))})}catch{}},t.prototype.startMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},t.prototype.endMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},t.prototype.flushMeasurement=function(){if(t.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var r=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),r}}catch{}return null},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var tN=function(t){Fr(e,t);function e(r,n,i,o,a,s,c){var l=t.call(this,r,n,i,o,a,s)||this;return l.browserCrypto=new qk(l.logger,c),l.guidGenerator=new Uk(l.browserCrypto),l}return e.prototype.startPerformanceMeasuremeant=function(r,n){return new V8(r,n)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var r;return((r=document.visibilityState)===null||r===void 0?void 0:r.toString())||null},e.prototype.deleteIncompleteSubMeasurements=function(r){var n=this.eventsByCorrelationId.get(r.event.correlationId),i=n&&n.eventId===r.event.eventId,o=[];i&&(n!=null&&n.incompleteSubMeasurements)&&n.incompleteSubMeasurements.forEach(function(a){o.push(ue({},a))}),o.length>0&&V8.flushMeasurements(r.event.correlationId,o)},e.prototype.supportsBrowserPerformanceNow=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.now=="function"},e.prototype.startMeasurement=function(r,n){var i=this,o=this.getPageVisibility(),a=t.prototype.startMeasurement.call(this,r,n);return ue(ue({},a),{endMeasurement:function(s){var c=a.endMeasurement(ue({startPageVisibility:o,endPageVisibility:i.getPageVisibility()},s));return i.deleteIncompleteSubMeasurements(a),c},discardMeasurement:function(){a.discardMeasurement(),i.deleteIncompleteSubMeasurements(a),a.measurement.flushMeasurement()}})},e.prototype.setPreQueueTime=function(r,n){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for "+r);return}if(!n){this.logger.trace("BrowserPerformanceClient: correlationId for "+r+" not provided, unable to set telemetry queue time");return}var i=this.preQueueTimeByCorrelationId.get(n);i&&(this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue "+i.name+" found",n),this.addQueueMeasurement(i.name,n,void 0,!0)),this.preQueueTimeByCorrelationId.set(n,{name:r,time:window.performance.now()})},e.prototype.addQueueMeasurement=function(r,n,i,o){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for "+r);return}if(!n){this.logger.trace("BrowserPerformanceClient: correlationId for "+r+" not provided, unable to add queue measurement");return}var a=t.prototype.getPreQueueTime.call(this,r,n);if(a){var s=window.performance.now(),c=i||t.prototype.calculateQueuedTime.call(this,a,s);return t.prototype.addQueueMeasurement.call(this,r,n,c,o)}},e}(Dk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var rN=function(){function t(e,r,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=r,this.logger=n,this.cryptoObj=i}return t.prototype.loadExternalTokens=function(e,r,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!r.id_token)throw ne.createUnableToLoadTokenError("Please ensure server response includes id token.");var i=new Eo(r.id_token,this.cryptoObj),o,a;if(e.account){var s=this.loadAccount(i,e.account.environment,void 0,void 0,e.account.homeAccountId);o=new sh(s,this.loadIdToken(i,s.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,r,s.homeAccountId,e.account.environment,e.account.tenantId,n),this.loadRefreshToken(e,r,s.homeAccountId,e.account.environment))}else if(e.authority){var c=Dh.generateAuthority(e.authority,e.azureCloudOptions),l={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(a=new Dh(c,this.config.system.networkClient,this.storage,l,this.logger),n.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(i,a.hostnameAndPort,n.clientInfo,a.authorityType);o=new sh(s,this.loadIdToken(i,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else if(r.client_info){this.logger.trace("TokenCache - homeAccountId from response");var s=this.loadAccount(i,a.hostnameAndPort,r.client_info,a.authorityType);o=new sh(s,this.loadIdToken(i,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else throw ne.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw ne.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,i,o,a)},t.prototype.loadAccount=function(e,r,n,i,o){var a;if(o?a=o:i!==void 0&&n&&(a=Or.generateHomeAccountId(n,i,this.logger,this.cryptoObj,e)),!a)throw ne.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=n?Or.createAccount(n,a,e,void 0,void 0,void 0,r):Or.createGenericAccount(a,e,void 0,void 0,void 0,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(s),s;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadIdToken=function(e,r,n,i){var o=qs.createIdTokenEntity(r,n,e.rawToken,this.config.auth.clientId,i);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(o),o;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadAccessToken=function(e,r,n,i,o,a){if(!r.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!r.expires_in)throw ne.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw ne.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Qr(e.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,d=Ws.createAccessTokenEntity(n,i,r.access_token,this.config.auth.clientId,o,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(d),d;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadRefreshToken=function(e,r,n,i){if(!r.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var o=Ml.createRefreshTokenEntity(n,i,r.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(o),o;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.generateAuthenticationResult=function(e,r,n,i){var o,a,s,c=A.EMPTY_STRING,l=[],d=null,u;n!=null&&n.accessToken&&(c=n.accessToken.secret,l=Qr.fromString(n.accessToken.target).asArray(),d=new Date(Number(n.accessToken.expiresOn)*1e3),u=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));var h=(r==null?void 0:r.claims.oid)||(r==null?void 0:r.claims.sub)||A.EMPTY_STRING,f=(r==null?void 0:r.claims.tid)||A.EMPTY_STRING;return{authority:i?i.canonicalAuthority:A.EMPTY_STRING,uniqueId:h,tenantId:f,scopes:l,account:n!=null&&n.account?n.account.getAccountInfo():null,idToken:r?r.rawToken:A.EMPTY_STRING,idTokenClaims:r?r.claims:{},accessToken:c,fromCache:!0,expiresOn:d,correlationId:e.correlationId||A.EMPTY_STRING,requestId:A.EMPTY_STRING,extExpiresOn:u,familyId:A.EMPTY_STRING,tokenType:((o=n==null?void 0:n.accessToken)===null||o===void 0?void 0:o.tokenType)||A.EMPTY_STRING,state:A.EMPTY_STRING,cloudGraphHostName:((a=n==null?void 0:n.account)===null||a===void 0?void 0:a.cloudGraphHostName)||A.EMPTY_STRING,msGraphHost:((s=n==null?void 0:n.account)===null||s===void 0?void 0:s.msGraphHost)||A.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var nN=function(t){Fr(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(Lk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var iN=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,l,d,u)||this;return h.apiId=c,h}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return B(this,function(d){switch(d.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw ne.createAuthCodeRequiredError();return this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Silent)];case 1:n=d.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||A.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(this.apiId),d.label=2;case 2:return d.trys.push([2,4,,5]),o=ue(ue({},n),{code:r.code}),this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetClientConfiguration,r.correlationId),[4,this.getClientConfiguration(i,n.authority)];case 3:return a=d.sent(),s=new nN(a),this.logger.verbose("Auth code client created"),c=new jk(s,this.browserStorage,o,this.logger,this.config.system,this.performanceClient),[2,c.handleCodeResponseFromServer({code:r.code,msgraph_host:r.msGraphHost,cloud_graph_host_name:r.cloudGraphHostName,cloud_instance_host_name:r.cloudInstanceHostName},n.state,s.authority,this.networkClient,!1)];case 4:throw l=d.sent(),l instanceof fe&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var oN=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=DO(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new O0(this.config.system.loggerOptions,vv,ch),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new tN(this.config.auth.clientId,this.config.auth.authority,this.logger,vv,ch,this.config.telemetry.application,this.config.system.cryptoOptions):new AO(this.config.auth.clientId,this.config.auth.authority,this.logger,vv,ch,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new eN(this.logger,this.performanceClient,this.config.system.cryptoOptions):I2,this.eventHandler=new zO(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new L4(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):PO(this.config.auth.clientId,this.logger);var r={cacheLocation:sr.MemoryStorage,temporaryCacheLocation:sr.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};this.nativeInternalStorage=new L4(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new rN(this.config,this.browserStorage,this.logger,this.browserCrypto),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}return t.prototype.initialize=function(){return U(this,void 0,void 0,function(){var e,r,n,i,o;return B(this,function(a){switch(a.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(e=this.config.system.allowNativeBroker,r=this.performanceClient.startMeasurement(O.InitializeClientApplication),this.eventHandler.emitEvent(Ce.INITIALIZE_START),!e)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),n=this,[4,oc.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)];case 2:return n.nativeExtensionProvider=a.sent(),[3,4];case 3:return i=a.sent(),this.logger.verbose(i),[3,4];case 4:return this.config.cache.claimsBasedCachingEnabled?[3,6]:(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),o=this.performanceClient.startMeasurement(O.ClearTokensAndKeysWithClaims),[4,this.browserStorage.clearTokensAndKeysWithClaims()]);case 5:a.sent(),o.endMeasurement({success:!0}),a.label=6;case 6:return this.initialized=!0,this.eventHandler.emitEvent(Ce.INITIALIZE_END),r.endMeasurement({allowNativeBroker:e,success:!0}),[2]}})})},t.prototype.handleRedirectPromise=function(e){return U(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,d=this;return B(this,function(u){return this.logger.verbose("handleRedirectPromise called"),Yt.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||A.EMPTY_STRING,i=this.redirectResponse.get(n),typeof i>"u"?(this.eventHandler.emitEvent(Ce.HANDLE_REDIRECT_START,de.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),o=this.browserStorage.getCachedNativeRequest(),a=void 0,o&&oc.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,o.accountId,this.nativeInternalStorage,o.correlationId),a=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(We.CORRELATION_ID,!0)||A.EMPTY_STRING,l=this.createRedirectClient(c),a=l.handleRedirectPromise(e)),i=a.then(function(h){if(h){var f=r.length<d.getAllAccounts().length;f?(d.eventHandler.emitEvent(Ce.LOGIN_SUCCESS,de.Redirect,h),d.logger.verbose("handleRedirectResponse returned result, login success")):(d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_SUCCESS,de.Redirect,h),d.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return d.eventHandler.emitEvent(Ce.HANDLE_REDIRECT_END,de.Redirect),h}).catch(function(h){throw r.length>0?d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_FAILURE,de.Redirect,null,h):d.eventHandler.emitEvent(Ce.LOGIN_FAILURE,de.Redirect,null,h),d.eventHandler.emitEvent(Ce.HANDLE_REDIRECT_END,de.Redirect),h}),this.redirectResponse.set(n,i)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,i]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},t.prototype.acquireTokenRedirect=function(e){return U(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return B(this,function(c){return r=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(de.Redirect),n=this.getAllAccounts().length>0,n?this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_START,de.Redirect,e):this.eventHandler.emitEvent(Ce.LOGIN_START,de.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(o=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),i=o.acquireTokenRedirect(e).catch(function(l){if(l instanceof vo&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}else if(l instanceof zi){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(a=this.createRedirectClient(e.correlationId),i=a.acquireToken(e)),[2,i.catch(function(l){throw n?s.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_FAILURE,de.Redirect,null,l):s.eventHandler.emitEvent(Ce.LOGIN_FAILURE,de.Redirect,null,l),l})]})})},t.prototype.acquireTokenPopup=function(e){var r=this,n=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(O.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(de.Popup)}catch(c){return Promise.reject(c)}var o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_START,de.Popup,e):this.eventHandler.emitEvent(Ce.LOGIN_START,de.Popup,e);var a;if(this.canUseNative(e))a=this.acquireTokenNative(e,_t.acquireTokenPopup).then(function(c){return r.browserStorage.setInteractionInProgress(!1),i.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),c}).catch(function(c){if(c instanceof vo&&c.isFatal()){r.nativeExtensionProvider=void 0;var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof zi){r.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}throw r.browserStorage.setInteractionInProgress(!1),c});else{var s=this.createPopupClient(e.correlationId);a=s.acquireToken(e)}return a.then(function(c){var l=o.length<r.getAllAccounts().length;return l?r.eventHandler.emitEvent(Ce.LOGIN_SUCCESS,de.Popup,c):r.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_SUCCESS,de.Popup,c),i.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),i.endMeasurement({success:!0,requestId:c.requestId}),c}).catch(function(c){return o.length>0?r.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_FAILURE,de.Popup,null,c):r.eventHandler.emitEvent(Ce.LOGIN_FAILURE,de.Popup,null,c),i.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),Promise.reject(c)})},t.prototype.trackPageVisibilityWithMeasurement=function(){var e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))},t.prototype.ssoSilent=function(e){var r;return U(this,void 0,void 0,function(){var n,i,o,a,s=this;return B(this,function(c){return n=this.getRequestCorrelationId(e),i=ue(ue({},e),{prompt:e.prompt,correlationId:n}),this.preflightBrowserEnvironmentCheck(de.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(O.SsoSilent,n),(r=this.ssoSilentMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",n),this.eventHandler.emitEvent(Ce.SSO_SILENT_START,de.Silent,i),this.canUseNative(i)?o=this.acquireTokenNative(i,_t.ssoSilent).catch(function(l){if(l instanceof vo&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createSilentIframeClient(i.correlationId);return d.acquireToken(i)}throw l}):(a=this.createSilentIframeClient(i.correlationId),o=a.acquireToken(i)),[2,o.then(function(l){var d,u;return s.eventHandler.emitEvent(Ce.SSO_SILENT_SUCCESS,de.Silent,l),(d=s.ssoSilentMeasurement)===null||d===void 0||d.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),(u=s.ssoSilentMeasurement)===null||u===void 0||u.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),l}).catch(function(l){var d;throw s.eventHandler.emitEvent(Ce.SSO_SILENT_FAILURE,de.Silent,null,l),(d=s.ssoSilentMeasurement)===null||d===void 0||d.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l}).finally(function(){document.removeEventListener("visibilitychange",s.trackPageVisibilityWithMeasurement)})]})})},t.prototype.acquireTokenByCode=function(e){return U(this,void 0,void 0,function(){var r,n,i,o,a=this;return B(this,function(s){r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(de.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_BY_CODE_START,de.Silent,e),n=this.performanceClient.startMeasurement(O.AcquireTokenByCode,e.correlationId);try{if(e.code&&e.nativeAccountId)throw ne.createSpaCodeAndNativeAccountIdPresentError();if(e.code)return i=e.code,o=this.hybridAuthCodeResponses.get(i),o?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),o=this.acquireTokenByCodeAsync(ue(ue({},e),{correlationId:r})).then(function(c){return a.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_BY_CODE_SUCCESS,de.Silent,c),a.hybridAuthCodeResponses.delete(i),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),c}).catch(function(c){throw a.hybridAuthCodeResponses.delete(i),a.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_BY_CODE_FAILURE,de.Silent,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),c}),this.hybridAuthCodeResponses.set(i,o)),[2,o];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,_t.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof vo&&c.isFatal()&&(a.nativeExtensionProvider=void 0),c})];throw ne.createUnableToAcquireTokenFromNativePlatformError()}else throw ne.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_BY_CODE_FAILURE,de.Silent,null,c),n.endMeasurement({errorCode:c instanceof fe&&c.errorCode||void 0,subErrorCode:c instanceof fe&&c.subError||void 0,success:!1}),c}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){var r;return U(this,void 0,void 0,function(){var n,i,o=this;return B(this,function(a){switch(a.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(O.AcquireTokenByCodeAsync,e.correlationId),(r=this.acquireTokenByCodeAsyncMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),n=this.createSilentAuthCodeClient(e.correlationId),[4,n.acquireToken(e).then(function(s){var c;return(c=o.acquireTokenByCodeAsyncMeasurement)===null||c===void 0||c.endMeasurement({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker,requestId:s.requestId}),s}).catch(function(s){var c;throw(c=o.acquireTokenByCodeAsyncMeasurement)===null||c===void 0||c.endMeasurement({errorCode:s.errorCode,subErrorCode:s.subError,success:!1}),s}).finally(function(){document.removeEventListener("visibilitychange",o.trackPageVisibilityWithMeasurement)})];case 1:return i=a.sent(),[2,i]}})})},t.prototype.acquireTokenFromCache=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){switch(this.performanceClient.addQueueMeasurement(O.AcquireTokenFromCache,r.correlationId),n.cacheLookupPolicy){case Pn.Default:case Pn.AccessToken:case Pn.AccessTokenAndRefreshToken:return[2,e.acquireToken(r)];default:throw se.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenByRefreshToken=function(e,r){return U(this,void 0,void 0,function(){var n;return B(this,function(i){switch(this.performanceClient.addQueueMeasurement(O.AcquireTokenByRefreshToken,e.correlationId),r.cacheLookupPolicy){case Pn.Default:case Pn.AccessTokenAndRefreshToken:case Pn.RefreshToken:case Pn.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),this.performanceClient.setPreQueueTime(O.SilentRefreshClientAcquireToken,e.correlationId),[2,n.acquireToken(e)];default:throw se.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenBySilentIframe=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){return this.performanceClient.addQueueMeasurement(O.AcquireTokenBySilentIframe,e.correlationId),r=this.createSilentIframeClient(e.correlationId),this.performanceClient.setPreQueueTime(O.SilentIframeClientAcquireToken,e.correlationId),[2,r.acquireToken(e)]})})},t.prototype.logout=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){return r=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",r),[2,this.logoutRedirect(ue({correlationId:r},e))]})})},t.prototype.logoutRedirect=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){return r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(de.Redirect),n=this.createRedirectClient(r),[2,n.logout(e)]})})},t.prototype.logoutPopup=function(e){try{var r=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(de.Popup);var n=this.createPopupClient(r);return n.logout(e)}catch(i){return Promise.reject(i)}},t.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},t.prototype.getAccountByUsername=function(e){if(this.logger.trace("getAccountByUsername called"),!e)return this.logger.warning("getAccountByUsername: No username provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({username:e});return r?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: "+e),r):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},t.prototype.getAccountByHomeId=function(e){if(this.logger.trace("getAccountByHomeId called"),!e)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:e});return r?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: "+e),r):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},t.prototype.getAccountByLocalId=function(e){if(this.logger.trace("getAccountByLocalId called"),!e)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({localAccountId:e});return r?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: "+e),r):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},t.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},t.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},t.prototype.preflightBrowserEnvironmentCheck=function(e,r){if(r===void 0&&(r=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),Yt.blockNonBrowserEnvironment(this.isBrowserEnvironment),Yt.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Yt.blockReloadInHiddenIframes(),Yt.blockAcquireTokenInPopups(),Yt.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===de.Redirect&&this.config.cache.cacheLocation===sr.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw $2.createInMemoryRedirectUnavailableError();(e===de.Redirect||e===de.Popup)&&this.preflightInteractiveRequest(r)},t.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),Yt.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},t.prototype.acquireTokenNative=function(e,r,n){return U(this,void 0,void 0,function(){var i;return B(this,function(o){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw ne.createNativeConnectionNotEstablishedError();return i=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,r,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,i.acquireToken(e)]})})},t.prototype.canUseNative=function(e,r){if(this.logger.trace("canUseNative called"),!oc.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case en.NONE:case en.CONSENT:case en.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!r&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},t.prototype.getNativeAccountId=function(e){var r=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return r&&r.nativeAccountId||""},t.prototype.createPopupClient=function(e){return new HO(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createRedirectClient=function(e){return new ZO(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentIframeClient=function(e){return new VO(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentCacheClient=function(e){return new zk(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentRefreshClient=function(e){return new FO(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentAuthCodeClient=function(e){return new iN(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},t.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},t.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},t.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},t.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},t.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},t.prototype.getTokenCache=function(){return this.tokenCache},t.prototype.getLogger=function(){return this.logger},t.prototype.setLogger=function(e){this.logger=e},t.prototype.initializeWrapperLibrary=function(e,r){this.browserStorage.setWrapperMetadata(e,r)},t.prototype.setNavigationClient=function(e){this.navigationClient=e},t.prototype.getConfiguration=function(){return this.config},t.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():A.EMPTY_STRING},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var aN=function(t){Fr(e,t);function e(r){var n=t.call(this,r)||this;return n.astsAsyncMeasurement=void 0,n.activeSilentTokenRequests=new Map,n.trackPageVisibility=n.trackPageVisibility.bind(n),n}return e.prototype.loginRedirect=function(r){return U(this,void 0,void 0,function(){var n;return B(this,function(i){return n=this.getRequestCorrelationId(r),this.logger.verbose("loginRedirect called",n),[2,this.acquireTokenRedirect(ue({correlationId:n},r||H8))]})})},e.prototype.loginPopup=function(r){var n=this.getRequestCorrelationId(r);return this.logger.verbose("loginPopup called",n),this.acquireTokenPopup(ue({correlationId:n},r||H8))},e.prototype.acquireTokenSilent=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d=this;return B(this,function(u){if(n=this.getRequestCorrelationId(r),i=this.performanceClient.startMeasurement(O.AcquireTokenSilent,n),i.addStaticFields({cacheLookupPolicy:r.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(de.Silent),this.logger.verbose("acquireTokenSilent called",n),o=r.account||this.getActiveAccount(),!o)throw ne.createNoAccountError();return a={clientId:this.config.auth.clientId,authority:r.authority||A.EMPTY_STRING,scopes:r.scopes,homeAccountIdentifier:o.homeAccountId,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},s=JSON.stringify(a),c=this.activeSilentTokenRequests.get(s),typeof c>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",n),this.performanceClient.setPreQueueTime(O.AcquireTokenSilentAsync,n),l=this.acquireTokenSilentAsync(ue(ue({},r),{correlationId:n}),o).then(function(h){return d.activeSilentTokenRequests.delete(s),i.addStaticFields({accessTokenSize:h.accessToken.length,idTokenSize:h.idToken.length}),i.endMeasurement({success:!0,fromCache:h.fromCache,isNativeBroker:h.fromNativeBroker,cacheLookupPolicy:r.cacheLookupPolicy,requestId:h.requestId}),h}).catch(function(h){throw d.activeSilentTokenRequests.delete(s),i.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),i.discardMeasurement(),[2,c])})})},e.prototype.trackPageVisibility=function(){this.astsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.astsAsyncMeasurement.increment({visibilityChangeCount:1}))},e.prototype.acquireTokenSilentAsync=function(r,n){var i;return U(this,void 0,void 0,function(){var o,a,s,c,l,d=this;return B(this,function(u){switch(u.label){case 0:return this.performanceClient.addQueueMeasurement(O.AcquireTokenSilentAsync,r.correlationId),this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_START,de.Silent,r),this.astsAsyncMeasurement=this.performanceClient.startMeasurement(O.AcquireTokenSilentAsync,r.correlationId),(i=this.astsAsyncMeasurement)===null||i===void 0||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility),oc.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,r.authenticationScheme)&&n.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=ue(ue({},r),{account:n}),o=this.acquireTokenNative(a,_t.acquireTokenSilent_silentFlow).catch(function(h){return U(d,void 0,void 0,function(){var f;return B(this,function(p){if(h instanceof vo&&h.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,f=this.createSilentIframeClient(r.correlationId),[2,f.acquireToken(r)];throw h})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(r.correlationId),this.performanceClient.setPreQueueTime(O.InitializeSilentRequest,r.correlationId),[4,s.initializeSilentRequest(r,n)];case 2:c=u.sent(),l=ue(ue({},r),{cacheLookupPolicy:r.cacheLookupPolicy||Pn.Default}),this.performanceClient.setPreQueueTime(O.AcquireTokenFromCache,c.correlationId),o=this.acquireTokenFromCache(s,c,l).catch(function(h){if(l.cacheLookupPolicy===Pn.AccessToken)throw h;return Yt.blockReloadInHiddenIframes(),d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_NETWORK_START,de.Silent,c),d.performanceClient.setPreQueueTime(O.AcquireTokenByRefreshToken,c.correlationId),d.acquireTokenByRefreshToken(c,l).catch(function(f){var p=f instanceof _c,m=f instanceof zi,w=f.errorCode===Zl.noTokensFoundError.code,g=f.errorCode===Vi.INVALID_GRANT_ERROR;if((!p||!g||m||l.cacheLookupPolicy===Pn.AccessTokenAndRefreshToken||l.cacheLookupPolicy===Pn.RefreshToken)&&l.cacheLookupPolicy!==Pn.Skip&&!w)throw f;return d.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),d.performanceClient.setPreQueueTime(O.AcquireTokenBySilentIframe,c.correlationId),d.acquireTokenBySilentIframe(c)})}),u.label=3;case 3:return[2,o.then(function(h){var f;return d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_SUCCESS,de.Silent,h),(f=d.astsAsyncMeasurement)===null||f===void 0||f.endMeasurement({success:!0,fromCache:h.fromCache,isNativeBroker:h.fromNativeBroker,requestId:h.requestId}),h}).catch(function(h){var f;throw d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_FAILURE,de.Silent,null,h),(f=d.astsAsyncMeasurement)===null||f===void 0||f.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}).finally(function(){document.removeEventListener("visibilitychange",d.trackPageVisibility)})]}})})},e}(oN);const F8="redirect";var z8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class sN extends aN{get account(){return this.getAllAccounts().find(n=>{var i;return((i=n.idTokenClaims)===null||i===void 0?void 0:i.aud)===this.clientId})}get hasValidClaims(){var e;const r=(e=this.account)===null||e===void 0?void 0:e.idTokenClaims;if(r){const n=Math.ceil(Date.now()/1e3);return r.exp>n}return!1}get clientId(){var e;return(e=this.config.auth)===null||e===void 0?void 0:e.clientId}get requestOrigin(){return this.browserStorage.getTemporaryCache("request.origin",!0)}constructor(e,r){super(r),this.tenantId=e}login(e,r=F8,n=!0){var i;return z8(this,void 0,void 0,function*(){const o=(e==null?void 0:e.loginHint)||((i=this.account)===null||i===void 0?void 0:i.username),a=(e==null?void 0:e.scopes)||[],s=Object.assign(Object.assign({},e),{loginHint:o,scopes:a});if(o&&n){this.logger.verbose("Attempting to login in silently");try{return yield this.ssoSilent(s)}catch{this.logger.verbose("Silent login attempt failed")}}switch(this.logger.verbose(`Attempting to login in by [${r}]`),r){case"popup":return this.loginPopup(s);case"redirect":return this.loginRedirect(s)}})}acquireToken(e={scopes:[]},r=F8,n=!0){return z8(this,void 0,void 0,function*(){const i=yield this.account;if(n&&i){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:i},e))}catch{this.logger.info("Expected to navigate away from the current page but timeout occurred.")}}switch(this.logger.verbose(`Attempting to acquire token by [${r}]`),r){case"popup":return this.acquireTokenPopup(e);case"redirect":return this.acquireTokenRedirect(e)}})}}const cN=(t,e=window.location.origin)=>{t=t.match(/^http[s]?/)?t:e+t;const{origin:r,pathname:n}=new URL(t);return r+n.replace(/([^:]\/)\/+/g,"$1")},lN=(t,e,r,n,i)=>{const o=Object.assign({clientId:e,redirectUri:cN(r||""),navigateToLoginRequestUrl:!1,authority:`https://login.microsoftonline.com/${t}`},n==null?void 0:n.auth),a=Object.assign({cacheLocation:"localStorage"},n==null?void 0:n.cache),s=n==null?void 0:n.system;return new(i||sN)(t,{auth:o,cache:a,system:s})};class Wk extends O0{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case Bt.Error:return"error";case Bt.Warning:return"warn";case Bt.Info:return"info";case Bt.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var gv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const dN="default";class uN{get defaultClient(){return this.getClient(dN)}get defaultAccount(){return this.defaultClient.account}get defaultConfig(){return this._config.defaultConfig}constructor(e){this._config=e,this._clients={}}getClient(e){return this._clients[e]||(this._clients[e]=this.createClient(e)),this._clients[e]}createClient(e){const r=e?this._config.getClientConfig(e):this._config.defaultConfig;if(!r)throw Error("Could not find any config");const n=lN(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new Wk(0)),n}handleRedirect(){return gv(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const r=this.defaultClient,n=r.getLogger(),{requestOrigin:i}=r;yield r.handleRedirectPromise(),i===e?(n.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(i||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return gv(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return gv(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var hN=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Gk={name:"auth",configure:t=>{var e;const r=new tO;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:({config:t})=>hN(void 0,void 0,void 0,function*(){const e=new uN(t);return t.requiresAuth&&(yield e.handleRedirect(),e.defaultAccount||(yield e.login())),e})},fN=(t,e)=>({module:Gk,configure:r=>{r.configureDefault(t),(e==null?void 0:e.requiresAuth)!==void 0&&(r.requiresAuth=e==null?void 0:e.requiresAuth);const{clients:n}=e??{};n&&Object.entries(n).forEach(([i,o])=>r.configureClient(i,o))}});var fy=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const pN=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},py=t=>{var e,r,n,i;return{id:t.id,externalId:(e=t.externalId)!==null&&e!==void 0?e:void 0,isActive:t.isActive,isDeleted:t.isDeleted,created:new Date(t.created),source:(r=t.source)!==null&&r!==void 0?r:void 0,title:(n=t.title)!==null&&n!==void 0?n:void 0,type:pN(t.type),value:(i=t.value)!==null&&i!==void 0?i:{}}},mN=t=>fy(void 0,void 0,void 0,function*(){const e=yield t.json();return py(e)}),vN=t=>fy(void 0,void 0,void 0,function*(){return(yield t.json()).map(py)}),gN=t=>fy(void 0,void 0,void 0,function*(){return(yield t.json()).map(py)});var yN=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},_N=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},pp;class bN{constructor(e,r={}){this.config=r,pp.set(this,void 0),yN(this,pp,e,"f")}requireInstance(e){return _N(this,pp,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=e}connectParentContext(e){this.config.connectParentContext=e}setContextParameterFn(e){this.config.contextParameterFn=e}setValidateContext(e){this.config.validateContext=e}setResolveContext(e){this.config.resolveContext=e}setResolveInitialContext(e){this.config.resolveInitialContext=e}setContextClient(e,r=1*60*1e3){this.config.client={get:typeof e.get=="function"?{key:({id:n})=>n,client:{fn:e.get},expire:r}:e.get,query:typeof e.query=="function"?{key:n=>JSON.stringify(n),client:{fn:e.query},expire:r}:e.query},e.related&&(this.config.client.related=typeof e.related=="function"?{key:n=>JSON.stringify(n),client:{fn:e.related},expire:r}:e.related)}}pp=new WeakMap;const Kk=/^(?:(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12})$/,Yk=(t,e=Kk)=>t.replace(/^\/+/,"").split("/").find(r=>r.match(e)),wN=t=>!!t.match(Kk);function xN(t,e){return r=>{const{extract:n=Yk,validate:i=wN}=e??{},o=n(r);if(!o)return Zt;if(i(o))return t.contextClient.resolveContext(o);throw Error(`Failed to validate context [${o}] from path [${r}]`)}}const CN=({ref:t})=>{const e=t==null?void 0:t.context;if(!e)throw Error(["resolveContextFromNavigation","ref does not support context!"].join(`
|
|
74
|
-
`));return e.currentContext?mn(e.currentContext):Zt},EN=t=>({ref:e,modules:r})=>{var n,i;const{context:o,navigation:a}=r,s=xN(o,t==null?void 0:t.path),c=(n=a==null?void 0:a.path.pathname)!==null&&n!==void 0?n:(i=e.navigation)===null||i===void 0?void 0:i.path.pathname;return Wl(c?s(c):Zt,CN({ref:e,modules:r})).pipe(TL())};var _f=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},j8=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},mp;class kN{constructor(){this.defaultExpireTime=1*60*1e3,mp.set(this,[])}addConfigBuilder(e){j8(this,mp,"f").push(e)}_getServiceProvider(e){var r;return _f(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){var r,n;return _f(this,void 0,void 0,function*(){const i=yield j8(this,mp,"f").reduce((o,a)=>_f(this,void 0,void 0,function*(){const s=new bN(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({}));return(r=i.resolveInitialContext)!==null&&r!==void 0||(i.resolveInitialContext=EN()),(n=i.client)!==null&&n!==void 0||(i.client=yield _f(this,void 0,void 0,function*(){const a=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:s=>a.get("v1",s,{selector:mN})},key:({id:s})=>s,expire:this.defaultExpireTime},query:{client:{fn:s=>a.query("v1",{query:s},{selector:vN})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime},related:{client:{fn:s=>a.related("v1",{id:s.item.id,query:{filter:s.filter}},{selector:gN})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime}}})),i})}}mp=new WeakMap;var SN=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r};const AN=K5(SN);var U8;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(U8||(U8={}));const IN=t=>e=>e.pipe(k4(t)),TN=t=>e=>e.pipe(Ln(t)),PN=t=>e=>e.pipe(mt(t)),N4=t=>t.pipe(Se(e=>e.value));let bf;const RN=new Uint8Array(16);function MN(){if(!bf&&(bf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bf(RN)}const ZN=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function HN(t){return typeof t=="string"&&ZN.test(t)}const Mr=[];for(let t=0;t<256;++t)Mr.push((t+256).toString(16).slice(1));function Qk(t,e=0){return Mr[t[e+0]]+Mr[t[e+1]]+Mr[t[e+2]]+Mr[t[e+3]]+"-"+Mr[t[e+4]]+Mr[t[e+5]]+"-"+Mr[t[e+6]]+Mr[t[e+7]]+"-"+Mr[t[e+8]]+Mr[t[e+9]]+"-"+Mr[t[e+10]]+Mr[t[e+11]]+Mr[t[e+12]]+Mr[t[e+13]]+Mr[t[e+14]]+Mr[t[e+15]]}function $N(t){if(!HN(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function LN(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const ON="6ba7b810-9dad-11d1-80b4-00c04fd430c8",NN="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function DN(t,e,r){function n(i,o,a,s){var c;if(typeof i=="string"&&(i=LN(i)),typeof o=="string"&&(o=$N(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+i.length);if(l.set(o),l.set(i,o.length),l=r(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,a){s=s||0;for(let d=0;d<16;++d)a[s+d]=l[d];return a}return Qk(l)}try{n.name=t}catch{}return n.DNS=ON,n.URL=NN,n}const VN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),B8={randomUUID:VN};function O2(t,e,r){if(B8.randomUUID&&!e&&!t)return B8.randomUUID();t=t||{};const n=t.random||(t.rng||MN)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return Qk(n)}function FN(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function yv(t,e){return t<<e|t>>>32-e}function zN(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let s=0;s<a.length;++s)t.push(a.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const n=t.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let a=0;a<i;++a){const s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=t[a*64+c*4]<<24|t[a*64+c*4+1]<<16|t[a*64+c*4+2]<<8|t[a*64+c*4+3];o[a]=s}o[i-1][14]=(t.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<i;++a){const s=new Uint32Array(80);for(let f=0;f<16;++f)s[f]=o[a][f];for(let f=16;f<80;++f)s[f]=yv(s[f-3]^s[f-8]^s[f-14]^s[f-16],1);let c=r[0],l=r[1],d=r[2],u=r[3],h=r[4];for(let f=0;f<80;++f){const p=Math.floor(f/20),m=yv(c,5)+FN(p,l,d,u)+h+e[p]+s[f]>>>0;h=u,u=d,d=yv(l,30)>>>0,l=c,c=m}r[0]=r[0]+c>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+h>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const jN=DN("v5",80,zN);class D4 extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.name="QueryClientError",this.request=r.request}}function Bn(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function os(t){return!!t&&!!t[et]}function Gi(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===JN}(t)||Array.isArray(t)||!!t[J8]||!!(!((e=t.constructor)===null||e===void 0)&&e[J8])||my(t)||vy(t))}function q8(t){return os(t)||Bn(23,t),t[et].t}function cd(t,e,r){r===void 0&&(r=!1),Sd(t)===0?(r?Object.keys:wy)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Sd(t){var e=t[et];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:my(t)?2:vy(t)?3:0}function V4(t,e){return Sd(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function UN(t,e){return Sd(t)===2?t.get(e):t[e]}function Xk(t,e,r){var n=Sd(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function BN(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function my(t){return QN&&t instanceof Map}function vy(t){return XN&&t instanceof Set}function Er(t){return t.o||t.t}function gy(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=eD(t);delete e[et];for(var r=wy(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function yy(t,e){return e===void 0&&(e=!1),_y(t)||os(t)||!Gi(t)||(Sd(t)>1&&(t.set=t.add=t.clear=t.delete=qN),Object.freeze(t),e&&cd(t,function(r,n){return yy(n,!0)},!0)),t}function qN(){Bn(2)}function _y(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function xo(t){var e=z4[t];return e||Bn(18,t),e}function WN(t,e){z4[t]||(z4[t]=e)}function N2(){return Fh}function _v(t,e){e&&(xo("Patches"),t.u=[],t.s=[],t.v=e)}function D2(t){F4(t),t.p.forEach(GN),t.p=null}function F4(t){t===Fh&&(Fh=t.l)}function W8(t){return Fh={p:[],l:Fh,h:t,m:!0,_:0}}function GN(t){var e=t[et];e.i===0||e.i===1?e.j():e.g=!0}function bv(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||xo("ES5").S(e,t,n),n?(r[et].P&&(D2(e),Bn(4)),Gi(t)&&(t=V2(e,t),e.l||F2(e,t)),e.u&&xo("Patches").M(r[et].t,t,e.u,e.s)):t=V2(e,r,[]),D2(e),e.u&&e.v(e.u,e.s),t!==Jk?t:void 0}function V2(t,e,r){if(_y(e))return e;var n=e[et];if(!n)return cd(e,function(s,c){return G8(t,n,e,s,c,r)},!0),e;if(n.A!==t)return e;if(!n.P)return F2(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=gy(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),cd(o,function(s,c){return G8(t,n,i,s,c,r,a)}),F2(t,i,!1),r&&t.u&&xo("Patches").N(n,r,t.u,t.s)}return n.o}function G8(t,e,r,n,i,o,a){if(os(i)){var s=V2(t,i,o&&e&&e.i!==3&&!V4(e.R,n)?o.concat(n):void 0);if(Xk(r,n,s),!os(s))return;t.m=!1}else a&&r.add(i);if(Gi(i)&&!_y(i)){if(!t.h.D&&t._<1)return;V2(t,i),e&&e.A.l||F2(t,i)}}function F2(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&yy(e,r)}function wv(t,e){var r=t[et];return(r?Er(r):t)[e]}function K8(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Uo(t){t.P||(t.P=!0,t.l&&Uo(t.l))}function xv(t){t.o||(t.o=gy(t.t))}function Vh(t,e,r){var n=my(e)?xo("MapSet").F(e,r):vy(e)?xo("MapSet").T(e,r):t.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:N2(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=j4;a&&(c=[s],l=Eu);var d=Proxy.revocable(c,l),u=d.revoke,h=d.proxy;return s.k=h,s.j=u,h}(e,r):xo("ES5").J(e,r);return(r?r.A:N2()).p.push(n),n}function KN(t){return os(t)||Bn(22,t),function e(r){if(!Gi(r))return r;var n,i=r[et],o=Sd(r);if(i){if(!i.P&&(i.i<4||!xo("ES5").K(i)))return i.t;i.I=!0,n=Y8(r,o),i.I=!1}else n=Y8(r,o);return cd(n,function(a,s){i&&UN(i.t,a)===s||Xk(n,a,e(s))}),o===3?new Set(n):n}(t)}function Y8(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return gy(t)}function YN(){function t(s,c){function l(){this.constructor=s}i(s,c),s.prototype=(l.prototype=c.prototype,new l)}function e(s){s.o||(s.R=new Map,s.o=new Map(s.t))}function r(s){s.o||(s.o=new Set,s.t.forEach(function(c){if(Gi(c)){var l=Vh(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function n(s){s.g&&Bn(3,JSON.stringify(Er(s)))}var i=function(s,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var u in d)d.hasOwnProperty(u)&&(l[u]=d[u])})(s,c)},o=function(){function s(l,d){return this[et]={i:2,l:d,A:d?d.A:N2(),P:!1,I:!1,o:void 0,R:void 0,t:l,k:this,C:!1,g:!1},this}t(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Er(this[et]).size}}),c.has=function(l){return Er(this[et]).has(l)},c.set=function(l,d){var u=this[et];return n(u),Er(u).has(l)&&Er(u).get(l)===d||(e(u),Uo(u),u.R.set(l,!0),u.o.set(l,d),u.R.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[et];return n(d),e(d),Uo(d),d.t.has(l)?d.R.set(l,!1):d.R.delete(l),d.o.delete(l),!0},c.clear=function(){var l=this[et];n(l),Er(l).size&&(e(l),Uo(l),l.R=new Map,cd(l.t,function(d){l.R.set(d,!1)}),l.o.clear())},c.forEach=function(l,d){var u=this;Er(this[et]).forEach(function(h,f){l.call(d,u.get(f),f,u)})},c.get=function(l){var d=this[et];n(d);var u=Er(d).get(l);if(d.I||!Gi(u)||u!==d.t.get(l))return u;var h=Vh(d.A.h,u,d);return e(d),d.o.set(l,h),h},c.keys=function(){return Er(this[et]).keys()},c.values=function(){var l,d=this,u=this.keys();return(l={})[wf]=function(){return d.values()},l.next=function(){var h=u.next();return h.done?h:{done:!1,value:d.get(h.value)}},l},c.entries=function(){var l,d=this,u=this.keys();return(l={})[wf]=function(){return d.entries()},l.next=function(){var h=u.next();if(h.done)return h;var f=d.get(h.value);return{done:!1,value:[h.value,f]}},l},c[wf]=function(){return this.entries()},s}(),a=function(){function s(l,d){return this[et]={i:3,l:d,A:d?d.A:N2(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,g:!1,C:!1},this}t(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Er(this[et]).size}}),c.has=function(l){var d=this[et];return n(d),d.o?!!d.o.has(l)||!(!d.p.has(l)||!d.o.has(d.p.get(l))):d.t.has(l)},c.add=function(l){var d=this[et];return n(d),this.has(l)||(r(d),Uo(d),d.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[et];return n(d),r(d),Uo(d),d.o.delete(l)||!!d.p.has(l)&&d.o.delete(d.p.get(l))},c.clear=function(){var l=this[et];n(l),Er(l).size&&(r(l),Uo(l),l.o.clear())},c.values=function(){var l=this[et];return n(l),r(l),l.o.values()},c.entries=function(){var l=this[et];return n(l),r(l),l.o.entries()},c.keys=function(){return this.values()},c[wf]=function(){return this.values()},c.forEach=function(l,d){for(var u=this.values(),h=u.next();!h.done;)l.call(d,h.value,h.value,this),h=u.next()},s}();WN("MapSet",{F:function(s,c){return new o(s,c)},T:function(s,c){return new a(s,c)}})}var Q8,Fh,by=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",QN=typeof Map<"u",XN=typeof Set<"u",X8=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Jk=by?Symbol.for("immer-nothing"):((Q8={})["immer-nothing"]=!0,Q8),J8=by?Symbol.for("immer-draftable"):"__$immer_draftable",et=by?Symbol.for("immer-state"):"__$immer_state",wf=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",JN=""+Object.prototype.constructor,wy=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,eD=Object.getOwnPropertyDescriptors||function(t){var e={};return wy(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},z4={},j4={get:function(t,e){if(e===et)return t;var r=Er(t);if(!V4(r,e))return function(i,o,a){var s,c=K8(o,a);return c?"value"in c?c.value:(s=c.get)===null||s===void 0?void 0:s.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!Gi(n)?n:n===wv(t.t,e)?(xv(t),t.o[e]=Vh(t.A.h,n,t)):n},has:function(t,e){return e in Er(t)},ownKeys:function(t){return Reflect.ownKeys(Er(t))},set:function(t,e,r){var n=K8(Er(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=wv(Er(t),e),o=i==null?void 0:i[et];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(BN(r,i)&&(r!==void 0||V4(t.t,e)))return!0;xv(t),Uo(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return wv(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,xv(t),Uo(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Er(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Bn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Bn(12)}},Eu={};cd(j4,function(t,e){Eu[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Eu.deleteProperty=function(t,e){return Eu.set.call(this,t,e,void 0)},Eu.set=function(t,e,r){return j4.set.call(this,t[0],e,r,t[0])};var tD=function(){function t(r){var n=this;this.O=X8,this.D=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var c=n;return function(m){var w=this;m===void 0&&(m=s);for(var g=arguments.length,v=Array(g>1?g-1:0),b=1;b<g;b++)v[b-1]=arguments[b];return c.produce(m,function(E){var k;return(k=o).call.apply(k,[w,E].concat(v))})}}var l;if(typeof o!="function"&&Bn(6),a!==void 0&&typeof a!="function"&&Bn(7),Gi(i)){var d=W8(n),u=Vh(n,i,void 0),h=!0;try{l=o(u),h=!1}finally{h?D2(d):F4(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(m){return _v(d,a),bv(m,d)},function(m){throw D2(d),m}):(_v(d,a),bv(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===Jk&&(l=void 0),n.D&&yy(l,!0),a){var f=[],p=[];xo("Patches").M(i,l,f,p),a(f,p)}return l}Bn(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,u=Array(d>1?d-1:0),h=1;h<d;h++)u[h-1]=arguments[h];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(u))})};var a,s,c=n.produce(i,o,function(l,d){a=l,s=d});return typeof Promise<"u"&&c instanceof Promise?c.then(function(l){return[l,a,s]}):[c,a,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Gi(r)||Bn(8),os(r)&&(r=KN(r));var n=W8(this),i=Vh(this,r,void 0);return i[et].C=!0,F4(n),i},e.finishDraft=function(r,n){var i=r&&r[et],o=i.A;return _v(o,n),bv(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!X8&&Bn(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=xo("Patches").$;return os(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),Xn=new tD,eS=Xn.produce;Xn.produceWithPatches.bind(Xn);Xn.setAutoFreeze.bind(Xn);Xn.setUseProxies.bind(Xn);Xn.applyPatches.bind(Xn);Xn.createDraft.bind(Xn);Xn.finishDraft.bind(Xn);const Ad=(...t)=>Ue(e=>t.includes(e.type));var Gr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},io,Ri;class h1 extends Ne{get action$(){return Gr(this,io,"f").asObservable()}get value(){return Gr(this,Ri,"f").value}get closed(){return Gr(this,Ri,"f").closed||Gr(this,io,"f").closed}constructor(e,r){super(i=>Gr(this,Ri,"f").subscribe(i)),io.set(this,new rn),Ri.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;rD(this,Ri,new Ed(n),"f"),Gr(this,io,"f").pipe(Ak(e,n),kk()).subscribe(Gr(this,Ri,"f")),this.reset=()=>Gr(this,Ri,"f").next(n)}next(e){Gr(this,io,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Ad(e)):this.action$,i=r||e;return n.pipe(Ln(o=>Dt(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Xt(a=>(console.warn("unhandled effect",a),Zt)))),Ue(o=>!!o),w2(b2)).subscribe(Gr(this,io,"f"))}addEpic(e){return this.addFlow(e)}addFlow(e){const r=e(this.action$,this);if(!r)throw new TypeError(`addEpic: one of the provided effects "${e.name||"<anonymous>"}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(Xt(n=>(console.trace("unhandled exception, epic closed!",n),Zt)),w2(b2)).subscribe(Gr(this,io,"f"))}unsubscribe(){Gr(this,io,"f").unsubscribe(),Gr(this,Ri,"f").unsubscribe()}complete(){Gr(this,io,"f").complete(),Gr(this,Ri,"f").complete()}asObservable(){return Gr(this,Ri,"f").asObservable()}}io=new WeakMap,Ri=new WeakMap;const tS=(t,e)=>Object.entries(t).reduce((r,[n,i])=>Object.assign(r,{[n]:typeof i=="function"?(...o)=>e.next(i(...o)):tS(i,e)}),{});function gr(t,e){function r(...n){if(e){const i=e(...n);if(!i)throw new Error("prepareAction did not return an object");return Object.assign(Object.assign({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>n.type===t,r}const vp="::",xy=t=>new RegExp(`${vp}${t}$`),eb=t=>t.type.replace(xy("\\w+$"),"");function fo(t,e,r,n){const i=gr([t,"request"].join(vp),e);return r&&Object.assign(i,{success:gr([t,"success"].join(vp),r)}),n&&Object.assign(i,{failure:gr([t,"failure"].join(vp),n)}),i}const nD=t=>!!t.type.match(/::request$/),iD=t=>!!t.type.match(xy("success")),oD=t=>!!t.type.match(xy("failure")),aD=t=>iD(t)||oD(t);function tb(t){return Gi(t)?eS(t,()=>{}):t}function sD(t){return typeof t=="function"}function Id(t,e){const[r,n,i]=cD(e);let o;if(sD(t))o=()=>tb(t());else{const s=tb(t);o=()=>s}function a(s=o(),c){let l=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return l.filter(d=>!!d).length===0&&(l=[i]),l.reduce((d,u)=>{if(u)if(os(d)){const f=u(d,c);return f===void 0?d:f}else{if(Gi(d))return eS(d,h=>u(h,c));{const h=u(d,c);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},s)}return a.getInitialState=o,a}function cD(t){const e={},r=[];let n;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=a,i},addMatcher(o,a){return r.push({matcher:o,reducer:a}),i},addDefaultCase(o){return n=o,i}};return t(i),[e,r,n]}function lD(t,e){const r=typeof e=="function"?e:Id(e.initial,o=>e.builder(o,t)),n=new h1(r),i=tS(t,n);return{actions:t,dispatch:i,subject:n}}const dD=()=>({request:gr("client/request",(e,r)=>{var n,i,o;return r??(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=O2()),(i=r.created)!==null&&i!==void 0||(r.created=Date.now()),(o=r.task)!==null&&o!==void 0||(r.task=new ik),{payload:e,meta:r}}),retry:gr("client/retry",e=>({payload:e})),success:gr("client/success",(e,r)=>({payload:e,meta:r})),cancel:gr("client/cancel",e=>({payload:e})),failure:gr("client/failure",(e,r)=>({payload:e,meta:r})),error:gr("client/error",(e,r)=>({payload:e,meta:r}))}),Ar=dD(),rS=t=>e=>e.pipe(Ue(Ar.request.match),Ln(r=>{const{meta:n}=r,{transaction:i}=n,o=new AbortController,{signal:a}=o;return new Ne(s=>{s.add(e.pipe(Ue(Ar.cancel.match)).subscribe(c=>{c.payload.transaction===i&&(a.aborted||o.abort(),s.complete())})),s.add(Dt(t(r,a)).subscribe({next:c=>s.next(c),error:c=>s.next(Ar.error(c,{request:r})),complete:()=>s.complete()}))})})),uD=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(rS(n=>e.pipe(Ue(Ar.failure.match),Ue(i=>i.meta.request===n),ay(r),mt(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return Zt;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,u=Object.assign({},t,n.meta.retry);if(d>=u.count)throw u.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof u.delay=="function"?Dt(u.delay(i.payload.cause)).pipe(Xt(f=>{throw Error("failed to resolve delay",{cause:f})})):kL(u.delay)).pipe(Se(()=>Ar.retry(n)))}))))),hD=t=>e=>e.pipe(rS((r,n)=>Dt(t(r.payload,n)).pipe(Se(i=>Ar.success(i,{request:r})),Xt(i=>mn(Ar.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:i}),{request:r})))))),fD=t=>t.pipe(Ue(Ar.retry.match),Se(e=>e.payload)),nS=()=>Ue(t=>t.status==="complete"),pD=(t={})=>Id(t,e=>e.addCase(Ar.request,(r,n)=>{const{transaction:i,task:o,ref:a,created:s}=n.meta;r[i]={transaction:i,task:o,ref:a,created:s}}).addCase(Ar.success,(r,n)=>{const{request:i}=n.meta,{transaction:o,ref:a}=i.meta,s=r[o];if(s){const c={status:"complete",transaction:o,ref:a,value:n.payload,args:i.payload,created:s.created,completed:Date.now()};s.task.next(c),s.task.complete()}delete r[o]}).addCase(Ar.retry,(r,n)=>{var i;const{transaction:o}=n.payload.meta,a=r[o];a&&((i=a.retry)!==null&&i!==void 0||(a.retry=[]),a.retry.push(Date.now()))}).addCase(Ar.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},q8(r[i]));a.task.error(new D4("abort",{request:a,message:o??"request was canceled"})),delete r[i]}}).addCase(Ar.failure,(r,n)=>{var i;const{payload:o,meta:a}=n,{transaction:s}=a.request.meta,c=r[s];c&&((i=c.errors)!==null&&i!==void 0||(c.errors=[]),c.errors.push(o))}).addCase(Ar.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},q8(r[a]));s.task.error(new D4("error",{request:s,message:`failed to process task [${a}]`,cause:i.cause})),delete r[a]}}));var mD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},jt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},tr,Rs;class nb extends Ne{get closed(){return jt(this,tr,"f").closed}get state$(){return jt(this,tr,"f")}get action$(){return jt(this,tr,"f").action$}get success$(){return this.action$.pipe(Ue(Ar.success.match),Se(({payload:e})=>e))}get error$(){return this.action$.pipe(Ad("client/error"),ay(jt(this,tr,"f")),Se(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new D4("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>jt(this,tr,"f").subscribe(o)),tr.set(this,void 0),Rs.set(this,void 0);const n={};rb(this,tr,new h1(pD(n)),"f"),rb(this,Rs,new Tr(()=>jt(this,tr,"f").complete()),"f"),jt(this,Rs,"f").add(jt(this,tr,"f").addFlow(hD(e))),jt(this,Rs,"f").add(jt(this,tr,"f").addFlow(fD));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);jt(this,Rs,"f").add(jt(this,tr,"f").addFlow(uD(i)))}next(e,r){const{ref:n,retry:i,task:o}=r??{},a=Ar.request(e,{ref:n,retry:i,task:o});return jt(this,tr,"f").next(a),a.meta}nextAsync(e,r){return mD(this,void 0,void 0,function*(){return $r(this.next(e,r).task.pipe(nS()))})}getTaskByTransaction(e){const r=jt(this,tr,"f").value[e];return r==null?void 0:r.task}getTaskByRef(e){const r=Object.values(jt(this,tr,"f").value).find(n=>n.ref===e);return r==null?void 0:r.task}cancelTaskByRef(e,r){const n=Object.values(jt(this,tr,"f").value).find(i=>i.ref===e);n!=null&&n.ref&&this.cancel(n.transaction,r)}cancel(e,r){if(e)jt(this,tr,"f").value[e]&&(r??(r=`[${e}]: transaction canceled`),jt(this,tr,"f").next(Ar.cancel({transaction:e,reason:r})));else for(const n of Object.keys(jt(this,tr,"f").value))this.cancel(n,"all transactions canceled")}on(e,r){return jt(this,tr,"f").addEffect(Ar[e].type,n=>{r(n,this)})}complete(){jt(this,Rs,"f").unsubscribe()}asObservable(){return jt(this,tr,"f").asObservable()}}tr=new WeakMap,Rs=new WeakMap;function vD(){return{set:gr("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:gr("cache/remove",t=>({payload:t})),invalidate:gr("cache/invalidate",t=>({payload:t})),trim:gr("cache/trim",t=>({payload:t}))}}const qc=vD(),gD=(t,e)=>{var r,n;return((r=e.updated)!==null&&r!==void 0?r:0)-((n=t.updated)!==null&&n!==void 0?n:0)};function yD(t,e={}){return Id(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];if(c)c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++;else{const l=Date.now();n[a]=Object.assign(Object.assign({},s),{created:l,updated:l})}}).addCase(t.remove,(n,i)=>{delete n[i.payload]}).addCase(t.invalidate,(n,i)=>{const o=n[i.payload];o&&delete o.updated}).addCase(t.trim,(n,i)=>{var o,a;const{payload:s}=i,c=(o=s.sort)!==null&&o!==void 0?o:gD,l=Object.keys(n),d=Object.entries(n).filter(([u,h])=>!s.validate||s.validate(h)).sort((u,h)=>c(u[1],h[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([u])=>u);if(l.length!==d.length)for(const u of l){const h=d.indexOf(u);h!==-1?d.splice(h,1):delete n[u]}}))}var Ti=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},_D=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},An;class ib{get state(){return Ti(this,An,"f").value}get state$(){return Ti(this,An,"f").asObservable()}constructor(e){An.set(this,void 0);const{trimming:r,initial:n}=e??{};_D(this,An,new h1(yD(qc,n)),"f"),r&&Ti(this,An,"f").addEffect("cache/set",()=>Ti(this,An,"f").next(qc.trim(r)))}setItem(...e){Ti(this,An,"f").next(qc.set(...e))}getItem(e){return Ti(this,An,"f").value[e]}removeItem(e){Ti(this,An,"f").next(qc.remove(e))}invalidate(e){Ti(this,An,"f").next(qc.invalidate(e))}trim(e){Ti(this,An,"f").next(qc.trim(e))}reset(){Ti(this,An,"f").reset()}complete(){Ti(this,An,"f").complete()}}An=new WeakMap;var ft=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Wc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},bD=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},Ms,oo,ka,sl,cl,ku,gp,U4;const wD=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()},xD=t=>{if(typeof t=="function")return t;switch(t){case"concat":return IN;case"merge":return TN;case"switch":default:return PN}};class Hr{get client(){return ft(this,oo,"f")}get cache(){return ft(this,ka,"f")}constructor(e){var r;Ms.set(this,new Tr),oo.set(this,void 0),ka.set(this,void 0),sl.set(this,new rn),cl.set(this,{}),ku.set(this,void 0),gp.set(this,void 0),U4.set(this,O2()),Wc(this,ku,i=>jN(e.key(i),ft(this,U4,"f")),"f"),Wc(this,gp,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:wD(e==null?void 0:e.expire),"f"),e.client instanceof nb?Wc(this,oo,e.client,"f"):(Wc(this,oo,new nb(e.client.fn,e.client.options),"f"),ft(this,Ms,"f").add(()=>ft(this,oo,"f").complete())),e.cache instanceof ib?Wc(this,ka,e.cache,"f"):(Wc(this,ka,new ib(e.cache||{}),"f"),ft(this,Ms,"f").add(()=>ft(this,ka,"f").complete()));const n=xD(e.queueOperator);ft(this,Ms,"f").add(()=>ft(this,sl,"f").complete()),ft(this,Ms,"f").add(ft(this,sl,"f").pipe(n(i=>{const{args:o,options:a}=i;return new Ne(s=>{const{task:c,transaction:l}=ft(this,oo,"f").next(o,a);s.add(c.pipe(Xt(()=>Zt)).subscribe(s)),s.add(()=>{setTimeout(()=>ft(this,oo,"f").cancel(l))})})}),nS(),Ik(()=>!ft(this,oo,"f").closed)).subscribe(i=>{const{args:o,value:a,transaction:s,ref:c}=i,l=c??ft(this,ku,"f").call(this,o);ft(this,ka,"f").setItem(l,{value:a,args:o,transaction:s})}))}next(e,r){ft(this,sl,"f").next({args:e,options:r})}query(e,r){return this._query(e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=bD(n,["awaitResolve"]);return(i?yr:$r)(this._query(e,o))}complete(){ft(this,Ms,"f").unsubscribe()}_query(e,r){const n=ft(this,ku,"f").call(this,e),i=this._createTask(n,e,r);return r!=null&&r.signal&&r.signal.addEventListener("abort",()=>{ft(this,oo,"f").cancelTaskByRef(n,"abort signal triggered by caller")}),i}_createTask(e,r,n){const i=new rn,o=new Ne(a=>{var s;if(!ft(this,cl,"f")[e])ft(this,cl,"f")[e]=o;else return ft(this,cl,"f")[e].subscribe(a);i.pipe(C2(()=>{delete ft(this,cl,"f")[e]})).subscribe(a);const c=ft(this,ka,"f").getItem(e);c&&i.next(Object.assign(Object.assign({},c),{status:"cache"}));const l=((s=n==null?void 0:n.cache)===null||s===void 0?void 0:s.validate)||ft(this,gp,"f");c&&l(c,r)?i.complete():ft(this,sl,"f").next({args:r,options:{ref:e,task:i,retry:n==null?void 0:n.retry}})}).pipe(ML());return o}}Ms=new WeakMap,oo=new WeakMap,ka=new WeakMap,sl=new WeakMap,cl=new WeakMap,ku=new WeakMap,gp=new WeakMap,U4=new WeakMap;Hr.extractQueryValue=N4;var ba=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ob=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Su,$o;class CD extends Ne{get currentContext(){return ba(this,$o,"f").value}get currentContext$(){return ba(this,$o,"f").asObservable()}get client(){return ba(this,Su,"f")}constructor(e){super(r=>ba(this,$o,"f").subscribe(r)),Su.set(this,void 0),$o.set(this,void 0),ob(this,Su,new Hr(e),"f"),ob(this,$o,new Ed(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Xt(()=>Zt)).subscribe(r=>this.setCurrentContext(r)):AN(e,ba(this,$o,"f").value)||ba(this,$o,"f").next(e)}resolveContext(e){return ba(this,Su,"f").query({id:e}).pipe(Se(r=>r.value),Xt(r=>{throw r.cause?r.cause:r}))}resolveContextAsync(e,r){return(r!=null&&r.awaitResolve?yr:$r)(this.resolveContext(e))}dispose(){ba(this,$o,"f").complete()}}Su=new WeakMap,$o=new WeakMap;var tu=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Je=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ws=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Lo,yp,Au,Mi,Zs,Hs,Iu,_p,bp;let ED=class{get contextClient(){return Je(this,Lo,"f")}get queryClient(){return Je(this,yp,"f")}get currentContext$(){return Je(this,Lo,"f").currentContext$}get currentContext(){return Je(this,Lo,"f").currentContext}set currentContext(e){if(console.warn("@deprecated","ContextProvider.currentContext","use setCurrentContextById|setCurrentContext|clearCurrentContext"),e===void 0)throw Error("not allowed to set current context as undefined undefined!");this.setCurrentContextAsync(e)}constructor(e){var r,n,i;Lo.set(this,void 0),yp.set(this,void 0),Au.set(this,void 0),Mi.set(this,void 0),Zs.set(this,new Tr),Hs.set(this,void 0),Iu.set(this,void 0),_p.set(this,void 0),bp.set(this,new rn);const{config:o,event:a}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),ws(this,Mi,a,"f"),o.resolveContext&&(this.resolveContext=(r=o.resolveContext)===null||r===void 0?void 0:r.bind(this)),o.validateContext&&(this.validateContext=(n=o.validateContext)===null||n===void 0?void 0:n.bind(this)),ws(this,Hs,o.contextType,"f"),ws(this,Iu,o.contextFilter,"f"),ws(this,Lo,new CD(o.client.get),"f"),ws(this,yp,new Hr(o.client.query),"f"),o.client.related&&ws(this,Au,new Hr(o.client.related),"f"),ws(this,_p,(i=o.contextParameterFn)!==null&&i!==void 0?i:s=>({search:s.search,filter:{type:s.type}}),"f"),Je(this,Mi,"f")&&(Je(this,Zs,"f").add(this.currentContext$.pipe(E2()).subscribe(([s,c])=>{var l;(l=Je(this,Mi,"f"))===null||l===void 0||l.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:s,next:c}})})),Je(this,Zs,"f").add(Je(this,Mi,"f").addEventListener("onCurrentContextChanged",s=>{s.source!==this&&s.detail.next!==void 0&&this.setCurrentContext(s.detail.next)}))),Je(this,Zs,"f").add(Je(this,bp,"f").pipe(mt(s=>s),od(s=>console.debug("ContextProvider::#contextQueue",s))).subscribe(s=>{Je(this,Lo,"f").setCurrentContext(s??null)}))}connectParentContext(e,r){const i=e.currentContext$.pipe(Ue(o=>o!==void 0),Ue((o,a)=>{var s;return r!=null&&r.skipFirst&&a<=1?(console.debug("ContextProvider::connectParentContext","skipping first item",o),!1):((s=this.currentContext)===null||s===void 0?void 0:s.id)!==(o==null?void 0:o.id)}),mt(o=>tu(this,void 0,void 0,function*(){var a;if(!o)return{next:o};const s=yield(a=Je(this,Mi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onParentContextChanged",{source:this,detail:o,cancelable:!0});return{next:o,canceled:s==null?void 0:s.canceled}})),Ue(o=>!o.canceled),mt(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(Xt(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),Zt)))),Xt(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),Zt))).subscribe();return Je(this,Zs,"f").add(i),i}setCurrentContextById(e){return new Ne(r=>{try{Je(this,Lo,"f").resolveContext(e).pipe(Ue(n=>!!n),mt(n=>this.setCurrentContext(n))).subscribe(r)}catch(n){r.error(n)}})}setCurrentContextByIdAsync(e){return yr(this.setCurrentContextById(e))}setCurrentContext(e,r){const n=new rn,i=new rn,o=this._setCurrentContext(e,r).pipe(od(a=>i.next(a)),Gl(n),C2(()=>i.complete()),Xt(a=>(i.error(a),Zt)));return Je(this,bp,"f").next(o),i.pipe(C2(()=>n.next(!0)))}_setCurrentContext(e,r){return new Ne(n=>{var i;if(e===this.currentContext)return n.next(e),n.complete();if(e&&(r!=null&&r.validate)&&!this.validateContext(e)){if(!r.resolve)return(i=Je(this,Mi,"f"))===null||i===void 0||i.dispatchEvent("onSetContextValidationFailed",{source:this,detail:{context:e}}),n.error(Error("failed to validate provided context"));if(r.resolve)return mn(e).pipe(mt(o=>tu(this,void 0,void 0,function*(){var a;const s=yield(a=Je(this,Mi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("resolving of context was canceled");return o})),mt(o=>this.resolveContext(o).pipe(Se(a=>({context:o,resolved:a})))),mt(({context:o,resolved:a})=>tu(this,void 0,void 0,function*(){var s;const c=yield(s=Je(this,Mi,"f"))===null||s===void 0?void 0:s.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:o,resolved:a}});if(c!=null&&c.canceled)throw Error("resolving of context was canceled");return a})),mt(o=>this._setCurrentContext(o))).subscribe(n)}return mn(e).pipe(mt(o=>tu(this,void 0,void 0,function*(){var a;const s=yield(a=Je(this,Mi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("change of context was aborted");return o}))).subscribe(o=>{n.next(o),n.complete()})})}setCurrentContextAsync(e,r){return tu(this,void 0,void 0,function*(){return yr(this.setCurrentContext(e,r))})}queryContext(e){const r=this.queryClient.query(Je(this,_p,"f").call(this,{search:e,type:Je(this,Hs,"f")})).pipe(Xt(n=>{throw n.name==="QueryClientError"?n.cause:n}),Se(n=>n.value));return Je(this,Iu,"f")?r.pipe(Se(Je(this,Iu,"f"))):r}queryContextAsync(e){return yr(this.queryContext(e))}validateContext(e){return Je(this,Hs,"f")?Je(this,Hs,"f").map(r=>r.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:Je(this,Hs,"f")}}).pipe(Se(r=>r.filter(n=>this.validateContext(n))),Se(r=>{const n=r.shift();if(!n)throw Error("failed to resolve context");return r.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",r),n}))}resolveContextAsync(e){return yr(this.resolveContext(e))}relatedContexts(e){return Je(this,Au,"f")?Je(this,Au,"f").query(e).pipe(Se(({value:r})=>r),Xt(r=>{throw r.cause?r.cause:r})):yk(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return yr(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){Je(this,Zs,"f").unsubscribe(),Je(this,Lo,"f").dispose()}};Lo=new WeakMap,yp=new WeakMap,Au=new WeakMap,Mi=new WeakMap,Zs=new WeakMap,Hs=new WeakMap,Iu=new WeakMap,_p=new WeakMap,bp=new WeakMap;var kD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const SD="context",AD={name:SD,configure:()=>new kN,initialize:function(t){var e;return kD(this,void 0,void 0,function*(){const r=yield t.config.createConfig(t),n=t.hasModule("event")?yield t.requireInstance("event"):void 0,i=(e=t.ref)===null||e===void 0?void 0:e.context,o=new ED({config:r,event:n,parentContext:i}),a=new Tr(()=>o.dispose());return this.postInitialize=s=>new Ne(c=>{const l=r.resolveInitialContext?Dt(r.resolveInitialContext(s)).pipe(Ue(d=>!!d),mt(d=>s.modules.context.setCurrentContext(d,{validate:!0,resolve:!0}))):Zt;c.add(l.pipe(Xt(d=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",d),Zt))).subscribe({next:d=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${d?d.id:"none"}]`,d)},complete:()=>{r.connectParentContext!==!1&&i&&o.connectParentContext(i),c.complete()}}))}),this.dispose=()=>a.unsubscribe(),o})}};var ab=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class ID{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return ab(this,void 0,void 0,function*(){if(!this.clientKey)throw Error("no http client for service discovery is provided!");return e.createClient(this.clientKey)})}createClient(e){return ab(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var Cv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class TD{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return Cv(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return Cv(this,void 0,void 0,function*(){const n=yield this.resolveService(e);if(!n)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient(Object.assign(Object.assign({},r),{baseUri:n.uri,defaultScopes:n.defaultScopes}))})}configureClient(e,r){return Cv(this,void 0,void 0,function*(){const{key:n,alias:i}=typeof e=="string"?{key:e,alias:e}:e,{uri:o,defaultScopes:a}=yield this.resolveService(n);r.addConfig(Zk(i,{baseUri:o,defaultScopes:a}))})}}var Ev=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},sb=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},PD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Tu;const cb="services";class RD{get environment(){var e;const r=(e=sb(this,Tu,"f").cache.getItem(cb))===null||e===void 0?void 0:e.value;if(!r)throw Error("no cached environment found");return r}constructor({http:e,endpoint:r}){Tu.set(this,void 0),this.http=e,this.endpoint=r,PD(this,Tu,new Hr({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)})},key:()=>cb,expire:5*60*1e3}),"f")}fetchEnvironment(){return Ev(this,void 0,void 0,function*(){return $r(Hr.extractQueryValue(sb(this,Tu,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return Ev(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>{var a;return Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:(a=o.defaultScopes)!==null&&a!==void 0?a:[r.clientId+"/.default"]}})},{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return Ev(this,void 0,void 0,function*(){try{const{services:r}=yield this.fetchEnvironment();return r[e]}catch(r){throw console.error(r),r}})}}Tu=new WeakMap;const MD="serviceDiscovery";var ZD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const HD={name:MD,configure:()=>new ID({clientCtor:RD,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:({config:t,requireInstance:e})=>ZD(void 0,void 0,void 0,function*(){const r=yield e("http"),n=yield t.createHttpClientClient(r),i=yield t.createClient(n);return new TD(i,r)})};class $D{}var yi;(function(t){t.v1="1.0",t.v2="2.0"})(yi||(yi={}));class ni extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const LD=(t,e)=>{var r;const n=(r=yi[t])!==null&&r!==void 0?r:t;switch(n){case yi.v2:throw new ni(t);case yi.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},OD=(t,e,r)=>[LD(t,e),r],ND=(t,e,r="json")=>(n,i)=>t[r](...OD(e,n,i));var DD=["eq","ne","gt","ge","lt","le"],xf=["and","or","not"],VD=["any","all"],FD=["startswith","endswith","contains"],zD=["expand","levels","select","skip","top","count","orderby","filter"],lb=/\((.*)\)/,db=/(?!indexof)\((\w+)\)/,ub;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(ub||(ub={}));var Zo="";function iS(t){var e=t===void 0?{}:t,r=e.select,n=e.search,i=e.skiptoken,o=e.format,a=e.top,s=e.skip,c=e.filter,l=e.transform,d=e.orderBy,u=e.key,h=e.count,f=e.expand,p=e.action,m=e.func,w="",g=[],v={};if(u!=null&&(w+="(".concat(go(u,g),")")),(c||typeof h=="object")&&(v.$filter=zh(typeof h=="object"?h:c,g)),l&&(v.$apply=oS(l)),f&&(v.$expand=wp(f)),d&&(v.$orderby=Cy(d)),h&&(typeof h=="boolean"?v.$count=!0:w+="/$count"),typeof a=="number"&&(v.$top=a),typeof s=="number"&&(v.$skip=s),p&&(w+="/".concat(p)),m){if(typeof m=="string")w+="/".concat(m);else if(typeof m=="object"){var b=Object.keys(m)[0],E=go(m[b],g);w+="/".concat(b),E!==""&&(w+="(".concat(E,")"))}}return g.length>0&&Object.assign(v,g.reduce(function(k,x){var S;return Object.assign(k,(S={},S["@".concat(x.name)]=go(x.value),S))},{})),WD(w,ur({$select:r,$search:n,$skiptoken:i,$format:o},v))}function kv(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(go(e,r))}function zh(t,e,r){return t===void 0&&(t={}),e===void 0&&(e=[]),r===void 0&&(r=""),(Array.isArray(t)?t:[t]).reduce(function(o,a){if(a){var s=n(a,e,r);s&&o.push(s)}return o},[]).join(" and ");function n(o,a,s){o===void 0&&(o={}),a===void 0&&(a=[]),s===void 0&&(s="");var c="";if(typeof o=="string")c=o;else if(o&&typeof o=="object"){var l=Object.keys(o).reduce(function(d,u){var h=o[u];if(h===void 0)return d;var f="";if(s?u===Zo?f=s:db.test(u)?f=u.replace(db,function(v,b){return b.trim()===Zo?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):lb.test(u)?f=u.replace(lb,function(v,b){return b.trim()===Zo?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):f="".concat(s,"/").concat(u):f=u,u===Zo&&Array.isArray(h))return d.concat(h.map(function(v){return kv(f,v)}));if(["number","string","boolean"].indexOf(typeof h)!==-1||h instanceof Date||h===null)d.push(kv(f,h,a));else if(Array.isArray(h)){var p=u,m=h.map(function(v){return zh(v,a,s)}).filter(function(v){return v}).map(function(v){return xf.indexOf(p)!==-1?"(".concat(v,")"):v});m.length&&(xf.indexOf(p)!==-1?m.length&&(p==="not"?d.push(hb(m)):d.push("(".concat(m.join(" ".concat(p," ")),")"))):d.push(m.join(" ".concat(p," "))))}else if(xf.indexOf(f)!==-1){var w=f,m=Object.keys(h).map(function(b){var E;return n((E={},E[b]=h[b],E))});m.length&&(w==="not"?d.push(hb(m)):d.push("(".concat(m.join(" ".concat(w," ")),")")))}else if(typeof h=="object")if("type"in h)d.push(kv(f,h,a));else{var g=Object.keys(h);g.forEach(function(v){if(h[v]!==void 0)if(DD.indexOf(v)!==-1)d.push("".concat(f," ").concat(v," ").concat(go(h[v],a)));else if(xf.indexOf(v)!==-1)Array.isArray(h[v])?d.push(h[v].map(function(x){return"("+n(x,a,f)+")"}).join(" ".concat(v," "))):d.push("("+n(h[v],a,f)+")");else if(VD.indexOf(v)!==-1){var b=i(u.toLowerCase(),h[v],v,f);b&&d.push(b)}else if(v==="has")d.push("".concat(f," ").concat(v," ").concat(go(h[v],a)));else if(v==="in"){var E=Array.isArray(h[v])?h[v]:h[v].value.map(function(x){return{type:h[v].type,value:x}});d.push(f+" in ("+E.map(function(x){return go(x,a)}).join(",")+")")}else if(FD.indexOf(v)!==-1)d.push("".concat(v,"(").concat(f,",").concat(go(h[v],a),")"));else{var k=n(h,a,f);k&&d.push(k)}})}else throw new Error("Unexpected value type: ".concat(h));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=jD(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(h,f){return f.hasOwnProperty(Zo)?(h.hasOwnProperty(Zo)||(h[Zo]=[]),h[Zo].push(f[Zo]),h):ur(ur({},h),f)},{}):a,u=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(u?"".concat(o,":").concat(u):"",")")}return l}}function jD(t,e,r,n){var i="",o=r=="all"?"ne":"eq";return i="".concat(n,"/").concat(r,"(").concat(t,": ").concat(t," ").concat(o," '").concat(e,"')"),i}function UD(t){return t=t.replace(/%/g,"%25"),t=t.replace(/\+/g,"%2B"),t=t.replace(/\//g,"%2F"),t=t.replace(/\?/g,"%3F"),t=t.replace(/#/g,"%23"),t=t.replace(/&/g,"%26"),t=t.replace(/'/g,"''"),t}function go(t,e){if(typeof t=="string")return"'".concat(UD(t),"'");if(t instanceof Date)return t.toISOString();if(typeof t=="number")return t;if(Array.isArray(t))return"[".concat(t.map(function(r){return go(r)}).join(","),"]");if(t===null)return t;if(typeof t=="object")switch(t.type){case"raw":case"guid":return t.value;case"duration":return"duration'".concat(t.value,"'");case"binary":return"binary'".concat(t.value,"'");case"alias":return Array.isArray(e)&&e.push(t),"@".concat(t.name);case"json":return escape(JSON.stringify(t.value));case"decimal":return"".concat(t.value,"M");default:return Object.entries(t).filter(function(r){var n=r[1];return n!==void 0}).map(function(r){var n=r[0],i=r[1];return"".concat(n,"=").concat(go(i,e))}).join(",")}return t}function wp(t){if(typeof t=="number")return t;if(typeof t=="string")return t.indexOf("/")===-1?t:t.split("/").reverse().reduce(function(r,n,i,o){return i===0?"$expand=".concat(n):i===o.length-1?"".concat(n,"(").concat(r,")"):"$expand=".concat(n,"(").concat(r,")")},"");if(Array.isArray(t))return"".concat(t.map(function(r){return wp(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return zD.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=zh(t[r]);break;case"orderBy":n=Cy(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=wp(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=wp(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function oS(t){var e=Array.isArray(t)?t:[t],r=e.reduce(function(n,i){var o=i.aggregate,a=i.filter,s=i.groupBy,c=QE(i,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(o&&n.push("aggregate(".concat(BD(o),")")),a){var d=zh(a);d&&n.push("filter(".concat(zh(d),")"))}return s&&n.push("groupby(".concat(qD(s),")")),n},[]);return r.join("/")||void 0}function BD(t){var e=Array.isArray(t)?t:[t];return e.map(function(r){return typeof r=="string"?r:Object.keys(r).map(function(n){var i=r[n];if(!i.with&&i.as)return"".concat(n," as ").concat(i.as);if(!i.with)throw new Error("'with' property required for '".concat(n,"'"));if(!i.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(i.with," as ").concat(i.as)})}).join(",")}function qD(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(oS(t.transform))),e}function Cy(t,e){return e===void 0&&(e=""),Array.isArray(t)?t.map(function(r){return Array.isArray(r)&&r.length===2&&["asc","desc"].indexOf(r[1])!==-1?r.join(" "):r}).map(function(r){return"".concat(e).concat(String(r))}).join(","):typeof t=="object"?Object.entries(t).map(function(r){var n=r[0],i=r[1];return Cy(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function WD(t,e){var r=Object.getOwnPropertyNames(e).filter(function(n){return e[n]!==void 0&&e[n]!==""}).map(function(n){return"".concat(n,"=").concat(e[n])});return r.length?"".concat(t,"?").concat(r.join("&")):t}function hb(t){return"not(".concat(t.join(" and "),")")}const GD=t=>Object.keys(t).reduce((e,r)=>{var n;switch(r){case"type":return!((n=t[r])===null||n===void 0)&&n.length?Object.assign(Object.assign({},e),{[r]:{in:t[r]}}):e;default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),KD=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:GD(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),YD=t=>typeof t=="string"?t:iS(KD(t)),QD=(t,e)=>{var r;const n=(r=yi[t])!==null&&r!==void 0?r:t;switch(n){case yi.v2:throw new ni(t);case yi.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(YD(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},XD=(t,e,r)=>[QD(t,e),r],JD=(t,e,r="json")=>(n,i)=>t[r](...XD(e,n,i)),eV=t=>Object.keys(t).reduce((e,r)=>{var n;switch(r){case"type":return!((n=t[r])===null||n===void 0)&&n.length?Object.assign(Object.assign({},e),{[r]:{in:t[r]}}):e;default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),tV=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:eV(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),rV=t=>typeof t=="string"?t:iS(tV(t)),nV=(t,e)=>{var r;const n=(r=yi[t])!==null&&r!==void 0?r:t;switch(n){case yi.v2:throw new ni(t);case yi.v1:default:{const{id:i,query:o}=e,a=new URLSearchParams(rV(o||""));return a.append("api-version",n),`/contexts/${i}/relations?${String(a)}`}}},iV=(t,e,r)=>[nV(t,e),r],oV=(t,e,r="json")=>(n,i)=>t[r](...iV(e,n,i));class aV{get Version(){return yi}constructor(e,r){this._client=e,this._method=r}get(e,...r){return ND(this._client,e,this._method)(...r)}query(e,...r){return JD(this._client,e,this._method)(...r)}related(e,...r){return oV(this._client,e,this._method)(...r)}}const sV=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},cV=(t,e,r)=>{const n=sV(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},lV=(t,e,r="fetch")=>(n,i)=>t[r](...cV(e,n,i)),dV=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},uV=(t,e,r)=>[dV(t,e),r],hV=(t,e,r="json")=>(n,i)=>t[r](...uV(e,n,i)),fV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},pV=(t,e,r)=>{const n=fV(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},mV=(t,e,r="json")=>(n,i)=>t[r](...pV(e,n,i)),vV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks/${e.id}?${String(r)}`}}},gV=(t,e,r)=>{const n=vV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},yV=(t,e,r="json")=>(n,i)=>t[r](...gV(e,n,i)),_V=t=>{switch(t){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",t),`persons/me/bookmarks/?${String(e)}`}}},bV=(t,e)=>[_V(t),e],wV=(t,e,r="json")=>n=>t[r](...bV(e,n)),xV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/persons/me/bookmarks/favourites?${String(r)}`}}},CV=(t,e,r)=>{const n=xV(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},EV=(t,e,r="json")=>(n,i)=>t[r](...CV(e,n,i)),kV=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/persons/me/bookmarks/favourites/${r}/?${String(n)}`}}},SV=(t,e,r)=>{const n=kV(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},AV=(t,e,r="fetch")=>(n,i)=>t[r](...SV(e,n,i)),IV=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/persons/me/bookmarks/favourites/${r}?${String(n)}`}}},TV=(t,e,r)=>{const n=IV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"head",headers:i},r);return[n,o]},PV=(t,e,r="json")=>(n,i)=>t[r](...TV(e,n,i));class RV{constructor(e,r){this._client=e,this._method=r}get(e,...r){return hV(this._client,e,this._method)(...r)}getAll(e){return wV(this._client,e,this._method)()}post(e,...r){return mV(this._client,e,this._method)(...r)}patch(e,...r){return yV(this._client,e,this._method)(...r)}delete(e,...r){return lV(this._client,e,this._method)(...r)}addFavorite(e,...r){return EV(this._client,e,this._method)(...r)}removeFavorite(e,...r){return AV(this._client,e,this._method)(...r)}verifyFavorite(e,...r){return PV(this._client,e,this._method)(...r)}}const MV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},ZV=(t,e,r)=>[MV(t,e),r],HV=(t,e,r="json")=>(n,i)=>t[r](...ZV(e,n,i)),$V=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},LV=(t,e,r)=>{const n=$V(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},OV=(t,e,r="json")=>(n,i)=>t[r](...LV(e,n,i)),NV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},DV=(t,e,r)=>{const n=NV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},VV=(t,e,r="json")=>(n,i)=>t[r](...DV(e,n,i)),FV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},zV=(t,e,r)=>[FV(t,e),r],jV=(t,e,r="json")=>(n,i)=>t[r](...zV(e,n,i)),UV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},BV=(t,e,r)=>{const n=UV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"delete",headers:i},r);return[n,o]},qV=(t,e,r="json")=>(n,i)=>t[r](...BV(e,n,i));var Ht;(function(t){t.v1="1.0",t.v2="2.0"})(Ht||(Ht={}));const WV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},GV=(t,e,r)=>{const n=WV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"put",body:JSON.stringify(e),headers:i},r);return[n,o]},KV=(t,e,r="json")=>(n,i)=>t[r](...GV(e,n,i)),YV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},QV=(t,e,r)=>[YV(t,e),r],XV=(t,e,r="json")=>(n,i)=>t[r](...QV(e,n,i));class JV{get Version(){return Ht}constructor(e,r){this._client=e,this._method=r}getAll(e,...r){return jV(this._client,e,this._method)(...r)}getById(e,...r){return HV(this._client,e,this._method)(...r)}setSeenByUser(e,...r){return VV(this._client,e,this._method)(...r)}create(e,...r){return OV(this._client,e,this._method)(...r)}delete(e,...r){return qV(this._client,e,this._method)(...r)}getSettings(e,...r){return XV(this._client,e,this._method)(...r)}updateSettings(e,...r){return KV(this._client,e,this._method)(...r)}}var wi;(function(t){t.v2="2.0",t.v4="4.0"})(wi||(wi={}));const eF=(t,e)=>{var r;const n=(r=wi[t])!==null&&r!==void 0?r:t;switch(n){case wi.v4:{const{azureId:i,expand:o}=e,a=new URLSearchParams;return a.append("api-version",n),o&&a.append("$expand",o.join(",")),`/persons/${i}?${String(a)}`}default:throw new ni(t)}},tF=(t,e,r)=>[eF(t,e),r],rF=(t,e,r="json")=>(n,i)=>t[r](...tF(e,n,i)),nF=(t,e)=>{var r;const n=(r=wi[t])!==null&&r!==void 0?r:t;switch(n){case wi.v2:{const{search:i}=e,o=new URLSearchParams;return o.append("api-version",n),o.append("$search",i),`/persons?${String(o)}`}default:throw new ni(t)}},iF=(t,e,r)=>[nF(t,e),r],oF=(t,e,r="json")=>(n,i)=>t[r](...iF(e,n,i)),aF=(t,e)=>{var r;const n=(r=wi[t])!==null&&r!==void 0?r:t;switch(n){case wi.v2:{const{azureId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/persons/${i}/photo?${String(o)}`}default:throw new ni(t)}},sF=(t,e,r)=>[aF(t,e),r],cF=(t,e,r="blob")=>(n,i)=>t[r](...sF(e,n,i));class lF{get Version(){return wi}constructor(e){this._client=e}get(e,r,n,i){return rF(this._client,e,r)(n,i)}query(e,r,n,i){return oF(this._client,e,r)(n,i)}photo(e,r,n,i){return cF(this._client,e,r)(n,i)}}var Pu=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class dF extends Error{constructor(e,r,n){super(e,n),this.response=r,this.name="ApiProviderError"}}const Cf=t=>Pu(void 0,void 0,void 0,function*(){var e;if(!t.ok){const{headers:r,status:n,statusText:i,type:o,url:a,bodyUsed:s}=t,c=(e=r.get("content-type"))===null||e===void 0?void 0:e.match(/application\/(\w*)?[+]?json/),l=!s&&(yield c?t.json():t.text());throw new dF("failed to execute request, response was not ok",{headers:r,status:n,statusText:i,type:o,url:a,data:l})}});class uF{constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return Pu(this,void 0,void 0,function*(){const r=yield this._createClientFn("notification");return r.responseHandler.add("validate_api_request",Cf),new JV(r,e)})}createBookmarksClient(e){return Pu(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return r.responseHandler.add("validate_api_request",Cf),new RV(r,e)})}createContextClient(e){return Pu(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return r.responseHandler.add("validate_api_request",Cf),new aV(r,e)})}createPeopleClient(){return Pu(this,void 0,void 0,function*(){const e=yield this._createClientFn("people");return e.responseHandler.add("validate_api_request",Cf),new lF(e)})}}var aS=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const hF="services",fF=(t,e)=>r=>aS(void 0,void 0,void 0,function*(){if(t.hasClient(r))return t.createClient(r);if(e)return e.createClient(r);throw Error(`failed to create http client for service ${r}`)}),sS={name:hF,configure:()=>new $D,initialize:({ref:t,config:e,requireInstance:r,hasModule:n})=>aS(void 0,void 0,void 0,function*(){if(!e.createClient){const i=yield r("http"),o=n("serviceDiscovery")?yield r("serviceDiscovery"):t==null?void 0:t.serviceDiscovery;e.createClient=fF(i,o)}if(!e.createClient)throw Error("missing configuration for creating API client");return new uF(e)})},pF=t=>{t.addConfig({module:sS})};class mF extends $L{constructor(){super([FL,Gk,sy,HD,sS,AD]),this.logger=new YE("FrameworkConfigurator")}configureHttp(...e){this.addConfig(eO(...e))}configureHttpClient(...e){this.addConfig(Zk(...e))}configureMsal(...e){this.addConfig(fN(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var vF=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const gF=(t,e)=>vF(void 0,void 0,void 0,function*(){const r=yield t.initialize(e),n={modules:r};return window.Fusion=n,r.event.dispatchEvent("onFrameworkLoaded",{detail:n}),n}),cS=y.createContext(null),yF=cS.Provider,lS=y.createContext({}),_F=lS.Provider,bF=()=>y.useContext(lS),wF=t=>bF()[t];var xF=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const CF=t=>y.lazy(()=>xF(void 0,void 0,void 0,function*(){const e=new mF;yield t(e);const r=yield gF(e);return{default:({children:n})=>_.jsx(yF,{value:r,children:_.jsx(_F,{value:r.modules,children:n})})}})),an=()=>{let t=y.useContext(cS);return t||console.warn("could not locate fusion in context!"),t??(t=window.Fusion),t||console.error("Could not load framework, might not be initiated?"),t},dS=t=>{const r=an().modules[t];return r||console.warn(`the requested module [${r}] is not included in the framework instance`),r},EF=t=>{const{configure:e,fallback:r,children:n}=t,i=y.useMemo(()=>CF(e),[e]);return _.jsx(y.Suspense,{fallback:r,children:_.jsx(i,{children:n})})};function st(){return st=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},st.apply(this,arguments)}function ld(t){"@babel/helpers - typeof";return ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ld(t)}function Sv(t){return t&&ld(t)==="object"&&t.constructor===Object}function uS(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?st({},t):t;return Sv(t)&&Sv(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(Sv(e[i])&&i in t?n[i]=uS(t[i],e[i],r):n[i]=e[i])}),n}function kF(t,e){if(ld(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ld(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function SF(t){var e=kF(t,"string");return ld(e)=="symbol"?e:String(e)}var AF=typeof Symbol=="function"&&Symbol.for;const hS=AF?Symbol.for("mui.nested"):"__THEME_NESTED__";var IF=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function TF(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.disableGlobal,r=e===void 0?!1:e,n=t.productionPrefix,i=n===void 0?"jss":n,o=t.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),c=0,l=function(){return c+=1,c};return function(d,u){var h=u.options.name;if(h&&h.indexOf("Mui")===0&&!u.options.link&&!r){if(IF.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var f="".concat(s).concat(h,"-").concat(d.key);return!u.options.theme[hS]||a!==""?f:"".concat(f,"-").concat(l())}return"".concat(s).concat(i).concat(l())}}var fb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f1=(typeof window>"u"?"undefined":fb(window))==="object"&&(typeof document>"u"?"undefined":fb(document))==="object"&&document.nodeType===9;function pb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,SF(n.key),n)}}function fS(t,e,r){return e&&pb(t.prototype,e),r&&pb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function B4(t,e){return B4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},B4(t,e)}function pS(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,B4(t,e)}function mb(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mS(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var PF={}.constructor;function q4(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(q4);if(t.constructor!==PF)return t;var e={};for(var r in t)e[r]=q4(t[r]);return e}function Ey(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=q4(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var vb=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},ac=function(e){if(!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&e[n]!=="!important";n++)r&&(r+=", "),r+=vb(e[n]," ");else r=vb(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function Td(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
|
|
73
|
+
Error Description: `+l.message)),[2,null];case 4:return i||(this.logger.warning("The developer's authority was not found within the CloudInstanceDiscoveryMetadata returned from the network request."),this.logger.verbose("Creating custom Authority for custom domain scenario."),i=t.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),[2,i]}})})},t.prototype.getCloudDiscoveryMetadataFromHarcodedValues=function(){return this.canonicalAuthority in T8?T8[this.canonicalAuthority]:null},t.prototype.isInKnownAuthorities=function(){var e=this,r=this.authorityOptions.knownAuthorities.filter(function(n){return je.getDomainFromUrl(n).toLowerCase()===e.hostnameAndPort});return r.length>0},t.generateAuthority=function(e,r){var n;if(r&&r.azureCloudInstance!==Oh.None){var i=r.tenant?r.tenant:A.DEFAULT_COMMON_TENANT;n=r.azureCloudInstance+"/"+i+"/"}return n||e},t.createCloudDiscoveryMetadataFromHost=function(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}},t.getCloudDiscoveryMetadataFromNetworkResponse=function(e,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.aliases.indexOf(r)>-1)return i}return null},t.prototype.getPreferredCache=function(){if(this.discoveryComplete())return this.metadata.preferred_cache;throw se.createEndpointDiscoveryIncompleteError("Discovery incomplete.")},t.prototype.isAlias=function(e){return this.metadata.aliases.indexOf(e)>-1},t.isPublicCloudAuthority=function(e){return A.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0},t.buildRegionalAuthorityString=function(e,r,n){var i=new je(e);i.validateAsUri();var o=i.getUrlComponents(),a=r+"."+o.HostNameAndPort;this.isPublicCloudAuthority(o.HostNameAndPort)&&(a=r+"."+A.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX);var s=je.constructAuthorityUriFromObject(tt(tt({},i.getUrlComponents()),{HostNameAndPort:a})).urlString;return n?s+"?"+n:s},t.replaceWithRegionalInformation=function(e,r){return e.authorization_endpoint=t.buildRegionalAuthorityString(e.authorization_endpoint,r),e.token_endpoint=t.buildRegionalAuthorityString(e.token_endpoint,r,A.REGIONAL_AUTH_NON_MSI_QUERY_STRING),e.end_session_endpoint&&(e.end_session_endpoint=t.buildRegionalAuthorityString(e.end_session_endpoint,r)),e},t.transformCIAMAuthority=function(e){var r=e.endsWith(A.FORWARD_SLASH)?e:""+e+A.FORWARD_SLASH,n=new je(e),i=n.getUrlComponents();if(i.PathSegments.length===0&&i.HostNameAndPort.endsWith(A.CIAM_AUTH_URL)){var o=i.HostNameAndPort.split(".")[0];r=""+r+o+A.AAD_TENANT_DOMAIN_SUFFIX}return r},t.reservedTenantDomains=new Set(["{tenant}","{tenantid}",ic.COMMON,ic.CONSUMERS,ic.ORGANIZATIONS]),t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Z2=function(){function t(){}return t.createDiscoveredInstance=function(e,r,n,i,o,a,s){return Ae(this,void 0,void 0,function(){var c,l,d;return Ie(this,function(u){switch(u.label){case 0:a==null||a.addQueueMeasurement(O.AuthorityFactoryCreateDiscoveredInstance,s),c=Dh.transformCIAMAuthority(e),l=t.createInstance(c,r,n,i,o,a,s),u.label=1;case 1:return u.trys.push([1,3,,4]),a==null||a.setPreQueueTime(O.AuthorityResolveEndpointsAsync,s),[4,l.resolveEndpointsAsync()];case 2:return u.sent(),[2,l];case 3:throw d=u.sent(),se.createEndpointDiscoveryIncompleteError(d);case 4:return[2]}})})},t.createInstance=function(e,r,n,i,o,a,s){if(ae.isEmpty(e))throw bt.createUrlEmptyError();return new Dh(e,r,n,i,o,a,s)},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var H2=function(){function t(){this.failedRequests=[],this.errors=[],this.cacheHits=0}return t.isServerTelemetryEntity=function(e,r){var n=e.indexOf(Rr.CACHE_KEY)===0,i=!0;return r&&(i=r.hasOwnProperty("failedRequests")&&r.hasOwnProperty("errors")&&r.hasOwnProperty("cacheHits")),n&&i},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var P8=function(){function t(){}return t.isThrottlingEntity=function(e,r){var n=!1;e&&(n=e.indexOf(ih.THROTTLING_PREFIX)===0);var i=!0;return r&&(i=r.hasOwnProperty("throttleTime")),n&&i},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var EO={sendGetRequestAsync:function(){var t="Network interface - sendGetRequestAsync() has not been implemented for the Network interface.";return Promise.reject(fe.createUnexpectedError(t))},sendPostRequestAsync:function(){var t="Network interface - sendPostRequestAsync() has not been implemented for the Network interface.";return Promise.reject(fe.createUnexpectedError(t))}};/*! @azure/msal-common v13.3.1 2023-10-27 */var yf={missingKidError:{code:"missing_kid_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires a keyId to be configured as the 'kid' header claim. No 'kid' value was provided."},missingAlgError:{code:"missing_alg_error",desc:"The JOSE Header for the requested JWT, JWS or JWK object requires an algorithm to be specified as the 'alg' header claim. No 'alg' value was provided."}},R8=function(t){Nn(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="JoseHeaderError",Object.setPrototypeOf(i,e.prototype),i}return e.createMissingKidError=function(){return new e(yf.missingKidError.code,yf.missingKidError.desc)},e.createMissingAlgError=function(){return new e(yf.missingAlgError.code,yf.missingAlgError.desc)},e}(fe);/*! @azure/msal-common v13.3.1 2023-10-27 */var kO=function(){function t(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}return t.getShrHeaderString=function(e){if(!e.kid)throw R8.createMissingKidError();if(!e.alg)throw R8.createMissingAlgError();var r=new t({typ:e.typ||P4.Pop,kid:e.kid,alg:e.alg});return JSON.stringify(r)},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var SO=function(){function t(e,r){this.cacheOutcome=Da.NO_CACHE_HIT,this.cacheManager=r,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||A.EMPTY_STRING,this.wrapperVer=e.wrapperVer||A.EMPTY_STRING,this.telemetryCacheKey=Rr.CACHE_KEY+vr.CACHE_KEY_SEPARATOR+e.clientId}return t.prototype.generateCurrentRequestHeaderValue=function(){var e=""+this.apiId+Rr.VALUE_SEPARATOR+this.cacheOutcome,r=[this.wrapperSKU,this.wrapperVer].join(Rr.VALUE_SEPARATOR),n=this.getRegionDiscoveryFields(),i=[e,n].join(Rr.VALUE_SEPARATOR);return[Rr.SCHEMA_VERSION,i,r].join(Rr.CATEGORY_SEPARATOR)},t.prototype.generateLastRequestHeaderValue=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.failedRequests.slice(0,2*r).join(Rr.VALUE_SEPARATOR),i=e.errors.slice(0,r).join(Rr.VALUE_SEPARATOR),o=e.errors.length,a=r<o?Rr.OVERFLOW_TRUE:Rr.OVERFLOW_FALSE,s=[o,a].join(Rr.VALUE_SEPARATOR);return[Rr.SCHEMA_VERSION,e.cacheHits,n,i,s].join(Rr.CATEGORY_SEPARATOR)},t.prototype.cacheFailedRequest=function(e){var r=this.getLastRequests();r.errors.length>=Rr.MAX_CACHED_ERRORS&&(r.failedRequests.shift(),r.failedRequests.shift(),r.errors.shift()),r.failedRequests.push(this.apiId,this.correlationId),ae.isEmpty(e.subError)?ae.isEmpty(e.errorCode)?e&&e.toString()?r.errors.push(e.toString()):r.errors.push(Rr.UNKNOWN_ERROR):r.errors.push(e.errorCode):r.errors.push(e.subError),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r)},t.prototype.incrementCacheHits=function(){var e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e),e.cacheHits},t.prototype.getLastRequests=function(){var e=new H2,r=this.cacheManager.getServerTelemetry(this.telemetryCacheKey);return r||e},t.prototype.clearTelemetryCache=function(){var e=this.getLastRequests(),r=t.maxErrorsToSend(e),n=e.errors.length;if(r===n)this.cacheManager.removeItem(this.telemetryCacheKey);else{var i=new H2;i.failedRequests=e.failedRequests.slice(r*2),i.errors=e.errors.slice(r),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,i)}},t.maxErrorsToSend=function(e){var r,n=0,i=0,o=e.errors.length;for(r=0;r<o;r++){var a=e.failedRequests[2*r]||A.EMPTY_STRING,s=e.failedRequests[2*r+1]||A.EMPTY_STRING,c=e.errors[r]||A.EMPTY_STRING;if(i+=a.toString().length+s.toString().length+c.length+3,i<Rr.MAX_LAST_HEADER_BYTES)n+=1;else break}return n},t.prototype.getRegionDiscoveryFields=function(){var e=[];return e.push(this.regionUsed||A.EMPTY_STRING),e.push(this.regionSource||A.EMPTY_STRING),e.push(this.regionOutcome||A.EMPTY_STRING),e.join(",")},t.prototype.updateRegionDiscoveryMetadata=function(e){this.regionUsed=e.region_used,this.regionSource=e.region_source,this.regionOutcome=e.region_outcome},t.prototype.setCacheOutcome=function(e){this.cacheOutcome=e},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var Dk=function(){function t(e,r,n,i,o,a){this.authority=r,this.libraryName=i,this.libraryVersion=o,this.applicationTelemetry=a,this.clientId=e,this.logger=n,this.callbacks=new Map,this.eventsByCorrelationId=new Map,this.queueMeasurements=new Map,this.preQueueTimeByCorrelationId=new Map}return t.prototype.startPerformanceMeasurement=function(e,r){return{}},t.prototype.startPerformanceMeasuremeant=function(e,r){return{}},t.prototype.getIntFields=function(){return gO},t.prototype.getPreQueueTime=function(e,r){var n=this.preQueueTimeByCorrelationId.get(r);if(n){if(n.name!==e){this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue time found for "+e+", unable to add queue measurement");return}}else{this.logger.trace("PerformanceClient.getPreQueueTime: no pre-queue times found for correlationId: "+r+", unable to add queue measurement");return}return n.time},t.prototype.calculateQueuedTime=function(e,r){return e<1?(this.logger.trace("PerformanceClient: preQueueTime should be a positive integer and not "+e),0):r<1?(this.logger.trace("PerformanceClient: currentTime should be a positive integer and not "+r),0):r<e?(this.logger.trace("PerformanceClient: currentTime is less than preQueueTime, check how time is being retrieved"),0):r-e},t.prototype.addQueueMeasurement=function(e,r,n,i){if(!r){this.logger.trace("PerformanceClient.addQueueMeasurement: correlationId not provided for "+e+", cannot add queue measurement");return}if(n===0)this.logger.trace("PerformanceClient.addQueueMeasurement: queue time provided for "+e+" is "+n);else if(!n){this.logger.trace("PerformanceClient.addQueueMeasurement: no queue time provided for "+e);return}var o={eventName:e,queueTime:n,manuallyCompleted:i},a=this.queueMeasurements.get(r);if(a)a.push(o),this.queueMeasurements.set(r,a);else{this.logger.trace("PerformanceClient.addQueueMeasurement: adding correlationId "+r+" to queue measurements");var s=[o];this.queueMeasurements.set(r,s)}this.preQueueTimeByCorrelationId.delete(r)},t.prototype.startMeasurement=function(e,r){var n=this,i,o,a=r||this.generateId();r||this.logger.info("PerformanceClient: No correlation id provided for "+e+", generating",a),this.logger.trace("PerformanceClient: Performance measurement started for "+e,a);var s=this.startPerformanceMeasuremeant(e,a);s.startMeasurement();var c={eventId:this.generateId(),status:R2.InProgress,authority:this.authority,libraryName:this.libraryName,libraryVersion:this.libraryVersion,clientId:this.clientId,name:e,startTimeMs:Date.now(),correlationId:a,appName:(i=this.applicationTelemetry)===null||i===void 0?void 0:i.appName,appVersion:(o=this.applicationTelemetry)===null||o===void 0?void 0:o.appVersion};return this.cacheEventByCorrelationId(c),{endMeasurement:function(l){return n.endMeasurement(tt(tt({},c),l),s)},discardMeasurement:function(){return n.discardMeasurements(c.correlationId)},addStaticFields:function(l){return n.addStaticFields(l,c.correlationId)},increment:function(l){return n.increment(l,c.correlationId)},measurement:s,event:c}},t.prototype.endMeasurement=function(e,r){var n=this,i,o,a=this.eventsByCorrelationId.get(e.correlationId);if(!a)return this.logger.trace("PerformanceClient: Measurement not found for "+e.eventId,e.correlationId),null;var s=e.eventId===a.eventId,c={totalQueueTime:0,totalQueueCount:0,manuallyCompletedCount:0};s?(c=this.getQueueInfo(e.correlationId),this.discardCache(a.correlationId)):(i=a.incompleteSubMeasurements)===null||i===void 0||i.delete(e.eventId),r==null||r.endMeasurement();var l=r==null?void 0:r.flushMeasurement();if(!l)return this.logger.trace("PerformanceClient: Performance measurement not taken",a.correlationId),null;if(this.logger.trace("PerformanceClient: Performance measurement ended for "+e.name+": "+l+" ms",e.correlationId),!s)return a[e.name+"DurationMs"]=Math.floor(l),tt({},a);var d=tt(tt({},a),e),u=0;return(o=d.incompleteSubMeasurements)===null||o===void 0||o.forEach(function(h){n.logger.trace("PerformanceClient: Incomplete submeasurement "+h.name+" found for "+e.name,d.correlationId),u++}),d.incompleteSubMeasurements=void 0,d=tt(tt({},d),{durationMs:Math.round(l),queuedTimeMs:c.totalQueueTime,queuedCount:c.totalQueueCount,queuedManuallyCompletedCount:c.manuallyCompletedCount,status:R2.Completed,incompleteSubsCount:u}),this.truncateIntegralFields(d,this.getIntFields()),this.emitEvents([d],e.correlationId),d},t.prototype.addStaticFields=function(e,r){this.logger.trace("PerformanceClient: Updating static fields");var n=this.eventsByCorrelationId.get(r);n?this.eventsByCorrelationId.set(r,tt(tt({},n),e)):this.logger.trace("PerformanceClient: Event not found for",r)},t.prototype.increment=function(e,r){this.logger.trace("PerformanceClient: Updating counters");var n=this.eventsByCorrelationId.get(r);if(n)for(var i in e)n.hasOwnProperty(i)||(n[i]=0),n[i]+=e[i];else this.logger.trace("PerformanceClient: Event not found for",r)},t.prototype.cacheEventByCorrelationId=function(e){var r=this.eventsByCorrelationId.get(e.correlationId);r?(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" added/updated",e.correlationId),r.incompleteSubMeasurements=r.incompleteSubMeasurements||new Map,r.incompleteSubMeasurements.set(e.eventId,{name:e.name,startTimeMs:e.startTimeMs})):(this.logger.trace("PerformanceClient: Performance measurement for "+e.name+" started",e.correlationId),this.eventsByCorrelationId.set(e.correlationId,tt({},e)))},t.prototype.getQueueInfo=function(e){var r=this.queueMeasurements.get(e);r||this.logger.trace("PerformanceClient: no queue measurements found for for correlationId: "+e);var n=0,i=0,o=0;return r==null||r.forEach(function(a){n+=a.queueTime,i++,o+=a.manuallyCompleted?1:0}),{totalQueueTime:n,totalQueueCount:i,manuallyCompletedCount:o}},t.prototype.discardMeasurements=function(e){this.logger.trace("PerformanceClient: Performance measurements discarded",e),this.eventsByCorrelationId.delete(e)},t.prototype.discardCache=function(e){this.discardMeasurements(e),this.logger.trace("PerformanceClient: QueueMeasurements discarded",e),this.queueMeasurements.delete(e),this.logger.trace("PerformanceClient: Pre-queue times discarded",e),this.preQueueTimeByCorrelationId.delete(e)},t.prototype.addPerformanceCallback=function(e){var r=this.generateId();return this.callbacks.set(r,e),this.logger.verbose("PerformanceClient: Performance callback registered with id: "+r),r},t.prototype.removePerformanceCallback=function(e){var r=this.callbacks.delete(e);return r?this.logger.verbose("PerformanceClient: Performance callback "+e+" removed."):this.logger.verbose("PerformanceClient: Performance callback "+e+" not removed."),r},t.prototype.emitEvents=function(e,r){var n=this;this.logger.verbose("PerformanceClient: Emitting performance events",r),this.callbacks.forEach(function(i,o){n.logger.trace("PerformanceClient: Emitting event to callback "+o,r),i.apply(null,[e])})},t.prototype.truncateIntegralFields=function(e,r){r.forEach(function(n){n in e&&typeof e[n]=="number"&&(e[n]=Math.floor(e[n]))})},t}();/*! @azure/msal-common v13.3.1 2023-10-27 */var M8=function(){function t(){}return t.prototype.startMeasurement=function(){},t.prototype.endMeasurement=function(){},t.prototype.flushMeasurement=function(){return null},t}(),AO=function(t){Nn(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.generateId=function(){return"callback-id"},e.prototype.startPerformanceMeasuremeant=function(){return new M8},e.prototype.startPerformanceMeasurement=function(){return new M8},e.prototype.calculateQueuedTime=function(r,n){return 0},e.prototype.addQueueMeasurement=function(r,n,i){},e.prototype.setPreQueueTime=function(r,n){},e}(Dk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Y={pkceNotGenerated:{code:"pkce_not_created",desc:"The PKCE code challenge and verifier could not be generated."},cryptoDoesNotExist:{code:"crypto_nonexistent",desc:"The crypto object or function is not available."},httpMethodNotImplementedError:{code:"http_method_not_implemented",desc:"The HTTP method given has not been implemented in this library."},emptyNavigateUriError:{code:"empty_navigate_uri",desc:"Navigation URI is empty. Please check stack trace for more info."},hashEmptyError:{code:"hash_empty_error",desc:"Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. For more visit: aka.ms/msaljs/browser-errors."},hashDoesNotContainStateError:{code:"no_state_in_hash",desc:"Hash does not contain state. Please verify that the request originated from msal."},hashDoesNotContainKnownPropertiesError:{code:"hash_does_not_contain_known_properties",desc:"Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. For more visit: aka.ms/msaljs/browser-errors."},unableToParseStateError:{code:"unable_to_parse_state",desc:"Unable to parse state. Please verify that the request originated from msal."},stateInteractionTypeMismatchError:{code:"state_interaction_type_mismatch",desc:"Hash contains state but the interaction type does not match the caller."},interactionInProgress:{code:"interaction_in_progress",desc:"Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. For more visit: aka.ms/msaljs/browser-errors."},popupWindowError:{code:"popup_window_error",desc:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser."},emptyWindowError:{code:"empty_window_error",desc:"window.open returned null or undefined window object."},userCancelledError:{code:"user_cancelled",desc:"User cancelled the flow."},monitorPopupTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in popup failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},monitorIframeTimeoutError:{code:"monitor_window_timeout",desc:"Token acquisition in iframe failed due to timeout. For more visit: aka.ms/msaljs/browser-errors."},redirectInIframeError:{code:"redirect_in_iframe",desc:"Redirects are not supported for iframed or brokered applications. Please ensure you are using MSAL.js in a top frame of the window if using the redirect APIs, or use the popup APIs."},blockTokenRequestsInHiddenIframeError:{code:"block_iframe_reload",desc:"Request was blocked inside an iframe because MSAL detected an authentication response. For more visit: aka.ms/msaljs/browser-errors"},blockAcquireTokenInPopupsError:{code:"block_nested_popups",desc:"Request was blocked inside a popup because MSAL detected it was running in a popup."},iframeClosedPrematurelyError:{code:"iframe_closed_prematurely",desc:"The iframe being monitored was closed prematurely."},silentLogoutUnsupportedError:{code:"silent_logout_unsupported",desc:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead."},noAccountError:{code:"no_account_error",desc:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request."},silentPromptValueError:{code:"silent_prompt_value_error",desc:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'."},noTokenRequestCacheError:{code:"no_token_request_cache_error",desc:"No token request found in cache."},unableToParseTokenRequestCacheError:{code:"unable_to_parse_token_request_cache_error",desc:"The cached token request could not be parsed."},noCachedAuthorityError:{code:"no_cached_authority_error",desc:"No cached authority found."},authRequestNotSet:{code:"auth_request_not_set_error",desc:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler"},invalidCacheType:{code:"invalid_cache_type",desc:"Invalid cache type"},notInBrowserEnvironment:{code:"non_browser_environment",desc:"Login and token requests are not supported in non-browser environments."},databaseNotOpen:{code:"database_not_open",desc:"Database is not open!"},noNetworkConnectivity:{code:"no_network_connectivity",desc:"No network connectivity. Check your internet connection."},postRequestFailed:{code:"post_request_failed",desc:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'"},getRequestFailed:{code:"get_request_failed",desc:"Network request failed. Please check the network trace to determine root cause."},failedToParseNetworkResponse:{code:"failed_to_parse_response",desc:"Failed to parse network response. Check network trace."},unableToLoadTokenError:{code:"unable_to_load_token",desc:"Error loading token to cache."},signingKeyNotFoundInStorage:{code:"crypto_key_not_found",desc:"Cryptographic Key or Keypair not found in browser storage."},authCodeRequired:{code:"auth_code_required",desc:"An authorization code must be provided (as the `code` property on the request) to this flow."},authCodeOrNativeAccountRequired:{code:"auth_code_or_nativeAccountId_required",desc:"An authorization code or nativeAccountId must be provided to this flow."},spaCodeAndNativeAccountPresent:{code:"spa_code_and_nativeAccountId_present",desc:"Request cannot contain both spa code and native account id."},databaseUnavailable:{code:"database_unavailable",desc:"IndexedDB, which is required for persistent cryptographic key storage, is unavailable. This may be caused by browser privacy features which block persistent storage in third-party contexts."},unableToAcquireTokenFromNativePlatform:{code:"unable_to_acquire_token_from_native_platform",desc:"Unable to acquire token from native platform. For a list of possible reasons visit aka.ms/msaljs/browser-errors."},nativeHandshakeTimeout:{code:"native_handshake_timeout",desc:"Timed out while attempting to establish connection to browser extension"},nativeExtensionNotInstalled:{code:"native_extension_not_installed",desc:"Native extension is not installed. If you think this is a mistake call the initialize function."},nativeConnectionNotEstablished:{code:"native_connection_not_established",desc:"Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). For more please visit aka.ms/msaljs/browser-errors."},nativeBrokerCalledBeforeInitialize:{code:"native_broker_called_before_initialize",desc:"You must call and await the initialize function before attempting to call any other MSAL API when native brokering is enabled. For more please visit aka.ms/msaljs/browser-errors."},nativePromptNotSupported:{code:"native_prompt_not_supported",desc:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow."}},ne=function(t){Fr(e,t);function e(r,n){var i=t.call(this,r,n)||this;return Object.setPrototypeOf(i,e.prototype),i.name="BrowserAuthError",i}return e.createPkceNotGeneratedError=function(r){return new e(Y.pkceNotGenerated.code,Y.pkceNotGenerated.desc+" Detail:"+r)},e.createCryptoNotAvailableError=function(r){return new e(Y.cryptoDoesNotExist.code,Y.cryptoDoesNotExist.desc+" Detail:"+r)},e.createHttpMethodNotImplementedError=function(r){return new e(Y.httpMethodNotImplementedError.code,Y.httpMethodNotImplementedError.desc+" Given Method: "+r)},e.createEmptyNavigationUriError=function(){return new e(Y.emptyNavigateUriError.code,Y.emptyNavigateUriError.desc)},e.createEmptyHashError=function(r){return new e(Y.hashEmptyError.code,Y.hashEmptyError.desc+" Given Url: "+r)},e.createHashDoesNotContainStateError=function(){return new e(Y.hashDoesNotContainStateError.code,Y.hashDoesNotContainStateError.desc)},e.createHashDoesNotContainKnownPropertiesError=function(){return new e(Y.hashDoesNotContainKnownPropertiesError.code,Y.hashDoesNotContainKnownPropertiesError.desc)},e.createUnableToParseStateError=function(){return new e(Y.unableToParseStateError.code,Y.unableToParseStateError.desc)},e.createStateInteractionTypeMismatchError=function(){return new e(Y.stateInteractionTypeMismatchError.code,Y.stateInteractionTypeMismatchError.desc)},e.createInteractionInProgressError=function(){return new e(Y.interactionInProgress.code,Y.interactionInProgress.desc)},e.createPopupWindowError=function(r){var n=Y.popupWindowError.desc;return n=ae.isEmpty(r)?n:n+" Details: "+r,new e(Y.popupWindowError.code,n)},e.createEmptyWindowCreatedError=function(){return new e(Y.emptyWindowError.code,Y.emptyWindowError.desc)},e.createUserCancelledError=function(){return new e(Y.userCancelledError.code,Y.userCancelledError.desc)},e.createMonitorPopupTimeoutError=function(){return new e(Y.monitorPopupTimeoutError.code,Y.monitorPopupTimeoutError.desc)},e.createMonitorIframeTimeoutError=function(){return new e(Y.monitorIframeTimeoutError.code,Y.monitorIframeTimeoutError.desc)},e.createRedirectInIframeError=function(r){return new e(Y.redirectInIframeError.code,Y.redirectInIframeError.desc+" (window.parent !== window) => "+r)},e.createBlockReloadInHiddenIframeError=function(){return new e(Y.blockTokenRequestsInHiddenIframeError.code,Y.blockTokenRequestsInHiddenIframeError.desc)},e.createBlockAcquireTokenInPopupsError=function(){return new e(Y.blockAcquireTokenInPopupsError.code,Y.blockAcquireTokenInPopupsError.desc)},e.createIframeClosedPrematurelyError=function(){return new e(Y.iframeClosedPrematurelyError.code,Y.iframeClosedPrematurelyError.desc)},e.createSilentLogoutUnsupportedError=function(){return new e(Y.silentLogoutUnsupportedError.code,Y.silentLogoutUnsupportedError.desc)},e.createNoAccountError=function(){return new e(Y.noAccountError.code,Y.noAccountError.desc)},e.createSilentPromptValueError=function(r){return new e(Y.silentPromptValueError.code,Y.silentPromptValueError.desc+" Given value: "+r)},e.createUnableToParseTokenRequestCacheError=function(){return new e(Y.unableToParseTokenRequestCacheError.code,Y.unableToParseTokenRequestCacheError.desc)},e.createNoTokenRequestCacheError=function(){return new e(Y.noTokenRequestCacheError.code,Y.noTokenRequestCacheError.desc)},e.createAuthRequestNotSetError=function(){return new e(Y.authRequestNotSet.code,Y.authRequestNotSet.desc)},e.createNoCachedAuthorityError=function(){return new e(Y.noCachedAuthorityError.code,Y.noCachedAuthorityError.desc)},e.createInvalidCacheTypeError=function(){return new e(Y.invalidCacheType.code,""+Y.invalidCacheType.desc)},e.createNonBrowserEnvironmentError=function(){return new e(Y.notInBrowserEnvironment.code,Y.notInBrowserEnvironment.desc)},e.createDatabaseNotOpenError=function(){return new e(Y.databaseNotOpen.code,Y.databaseNotOpen.desc)},e.createNoNetworkConnectivityError=function(){return new e(Y.noNetworkConnectivity.code,Y.noNetworkConnectivity.desc)},e.createPostRequestFailedError=function(r,n){return new e(Y.postRequestFailed.code,Y.postRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createGetRequestFailedError=function(r,n){return new e(Y.getRequestFailed.code,Y.getRequestFailed.desc+" | Network client threw: "+r+" | Attempted to reach: "+n.split("?")[0])},e.createFailedToParseNetworkResponseError=function(r){return new e(Y.failedToParseNetworkResponse.code,Y.failedToParseNetworkResponse.desc+" | Attempted to reach: "+r.split("?")[0])},e.createUnableToLoadTokenError=function(r){return new e(Y.unableToLoadTokenError.code,Y.unableToLoadTokenError.desc+" | "+r)},e.createSigningKeyNotFoundInStorageError=function(r){return new e(Y.signingKeyNotFoundInStorage.code,Y.signingKeyNotFoundInStorage.desc+" | No match found for KeyId: "+r)},e.createAuthCodeRequiredError=function(){return new e(Y.authCodeRequired.code,Y.authCodeRequired.desc)},e.createAuthCodeOrNativeAccountIdRequiredError=function(){return new e(Y.authCodeOrNativeAccountRequired.code,Y.authCodeOrNativeAccountRequired.desc)},e.createSpaCodeAndNativeAccountIdPresentError=function(){return new e(Y.spaCodeAndNativeAccountPresent.code,Y.spaCodeAndNativeAccountPresent.desc)},e.createDatabaseUnavailableError=function(){return new e(Y.databaseUnavailable.code,Y.databaseUnavailable.desc)},e.createUnableToAcquireTokenFromNativePlatformError=function(){return new e(Y.unableToAcquireTokenFromNativePlatform.code,Y.unableToAcquireTokenFromNativePlatform.desc)},e.createNativeHandshakeTimeoutError=function(){return new e(Y.nativeHandshakeTimeout.code,Y.nativeHandshakeTimeout.desc)},e.createNativeExtensionNotInstalledError=function(){return new e(Y.nativeExtensionNotInstalled.code,Y.nativeExtensionNotInstalled.desc)},e.createNativeConnectionNotEstablishedError=function(){return new e(Y.nativeConnectionNotEstablished.code,Y.nativeConnectionNotEstablished.desc)},e.createNativeBrokerCalledBeforeInitialize=function(){return new e(Y.nativeBrokerCalledBeforeInitialize.code,Y.nativeBrokerCalledBeforeInitialize.desc)},e.createNativePromptParameterNotSupportedError=function(){return new e(Y.nativePromptNotSupported.code,Y.nativePromptNotSupported.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Vi={INTERACTION_IN_PROGRESS_VALUE:"interaction_in_progress",INVALID_GRANT_ERROR:"invalid_grant",POPUP_WIDTH:483,POPUP_HEIGHT:600,POPUP_NAME_PREFIX:"msal",DEFAULT_POLL_INTERVAL_MS:30,MSAL_SKU:"msal.js.browser"},Cu={CHANNEL_ID:"53ee284d-920a-4b59-9d30-a60315b26836",PREFERRED_EXTENSION_ID:"ppnbnpeolgkicgegkbkbjmhlideopiji",MATS_TELEMETRY:"MATS"},Xo;(function(t){t.HandshakeRequest="Handshake",t.HandshakeResponse="HandshakeResponse",t.GetToken="GetToken",t.Response="Response"})(Xo||(Xo={}));var sr;(function(t){t.LocalStorage="localStorage",t.SessionStorage="sessionStorage",t.MemoryStorage="memoryStorage"})(sr||(sr={}));var ho;(function(t){t.GET="GET",t.POST="POST"})(ho||(ho={}));var We;(function(t){t.AUTHORITY="authority",t.ACQUIRE_TOKEN_ACCOUNT="acquireToken.account",t.SESSION_STATE="session.state",t.REQUEST_STATE="request.state",t.NONCE_IDTOKEN="nonce.id_token",t.ORIGIN_URI="request.origin",t.RENEW_STATUS="token.renew.status",t.URL_HASH="urlHash",t.REQUEST_PARAMS="request.params",t.SCOPES="scopes",t.INTERACTION_STATUS_KEY="interaction.status",t.CCS_CREDENTIAL="ccs.credential",t.CORRELATION_ID="request.correlationId",t.NATIVE_REQUEST="request.native",t.REDIRECT_CONTEXT="request.redirect.context"})(We||(We={}));var co;(function(t){t.ACCOUNT_KEYS="msal.account.keys",t.TOKEN_KEYS="msal.token.keys"})(co||(co={}));var Hl;(function(t){t.WRAPPER_SKU="wrapper.sku",t.WRAPPER_VER="wrapper.version"})(Hl||(Hl={}));var _t;(function(t){t[t.acquireTokenRedirect=861]="acquireTokenRedirect",t[t.acquireTokenPopup=862]="acquireTokenPopup",t[t.ssoSilent=863]="ssoSilent",t[t.acquireTokenSilent_authCode=864]="acquireTokenSilent_authCode",t[t.handleRedirectPromise=865]="handleRedirectPromise",t[t.acquireTokenByCode=866]="acquireTokenByCode",t[t.acquireTokenSilent_silentFlow=61]="acquireTokenSilent_silentFlow",t[t.logout=961]="logout",t[t.logoutPopup=962]="logoutPopup"})(_t||(_t={}));var de;(function(t){t.Redirect="redirect",t.Popup="popup",t.Silent="silent",t.None="none"})(de||(de={}));var Z8;(function(t){t.Startup="startup",t.Login="login",t.Logout="logout",t.AcquireToken="acquireToken",t.SsoSilent="ssoSilent",t.HandleRedirect="handleRedirect",t.None="none"})(Z8||(Z8={}));var H8={scopes:u1},sd="jwk",$8;(function(t){t.React="@azure/msal-react",t.Angular="@azure/msal-angular"})($8||($8={}));var H4="msal.db",IO=1,TO=H4+".keys",Pn;(function(t){t[t.Default=0]="Default",t[t.AccessToken=1]="AccessToken",t[t.AccessTokenAndRefreshToken=2]="AccessTokenAndRefreshToken",t[t.RefreshToken=3]="RefreshToken",t[t.RefreshTokenAndNetwork=4]="RefreshTokenAndNetwork",t[t.Skip=5]="Skip"})(Pn||(Pn={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var Sn={redirectUriNotSet:{code:"redirect_uri_empty",desc:"A redirect URI is required for all calls, and none has been set."},postLogoutUriNotSet:{code:"post_logout_uri_empty",desc:"A post logout redirect has not been set."},storageNotSupportedError:{code:"storage_not_supported",desc:"Given storage configuration option was not supported."},noRedirectCallbacksSet:{code:"no_redirect_callbacks",desc:"No redirect callbacks have been set. Please call setRedirectCallbacks() with the appropriate function arguments before continuing. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},invalidCallbackObject:{code:"invalid_callback_object",desc:"The object passed for the callback was invalid. More information is available here: https://github.com/AzureAD/microsoft-authentication-library-for-js/wiki/MSAL-basics."},stubPcaInstanceCalled:{code:"stubbed_public_client_application_called",desc:"Stub instance of Public Client Application was called. If using msal-react, please ensure context is not used without a provider. For more visit: aka.ms/msaljs/browser-errors"},inMemRedirectUnavailable:{code:"in_mem_redirect_unavailable",desc:"Redirect cannot be supported. In-memory storage was selected and storeAuthStateInCookie=false, which would cause the library to be unable to handle the incoming hash. If you would like to use the redirect API, please use session/localStorage or set storeAuthStateInCookie=true."},entropyNotProvided:{code:"entropy_not_provided",desc:"The available browser crypto interface requires entropy set via system.cryptoOptions.entropy configuration option."}},$2=function(t){Fr(e,t);function e(r,n){var i=t.call(this,r,n)||this;return i.name="BrowserConfigurationAuthError",Object.setPrototypeOf(i,e.prototype),i}return e.createRedirectUriEmptyError=function(){return new e(Sn.redirectUriNotSet.code,Sn.redirectUriNotSet.desc)},e.createPostLogoutRedirectUriEmptyError=function(){return new e(Sn.postLogoutUriNotSet.code,Sn.postLogoutUriNotSet.desc)},e.createStorageNotSupportedError=function(r){return new e(Sn.storageNotSupportedError.code,Sn.storageNotSupportedError.desc+" Given Location: "+r)},e.createRedirectCallbacksNotSetError=function(){return new e(Sn.noRedirectCallbacksSet.code,Sn.noRedirectCallbacksSet.desc)},e.createStubPcaInstanceCalledError=function(){return new e(Sn.stubPcaInstanceCalled.code,Sn.stubPcaInstanceCalled.desc)},e.createInMemoryRedirectUnavailableError=function(){return new e(Sn.inMemRedirectUnavailable.code,Sn.inMemRedirectUnavailable.desc)},e.createEntropyNotProvided=function(){return new e(Sn.entropyNotProvided.code,Sn.entropyNotProvided.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var L8=function(){function t(e){this.validateWindowStorage(e),this.windowStorage=window[e]}return t.prototype.validateWindowStorage=function(e){if(e!==sr.LocalStorage&&e!==sr.SessionStorage)throw $2.createStorageNotSupportedError(e);var r=!!window[e];if(!r)throw $2.createStorageNotSupportedError(e)},t.prototype.getItem=function(e){return this.windowStorage.getItem(e)},t.prototype.setItem=function(e,r){this.windowStorage.setItem(e,r)},t.prototype.removeItem=function(e){this.windowStorage.removeItem(e)},t.prototype.getKeys=function(){return Object.keys(this.windowStorage)},t.prototype.containsKey=function(e){return this.windowStorage.hasOwnProperty(e)},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var $4=function(){function t(){this.cache=new Map}return t.prototype.getItem=function(e){return this.cache.get(e)||null},t.prototype.setItem=function(e,r){this.cache.set(e,r)},t.prototype.removeItem=function(e){this.cache.delete(e)},t.prototype.getKeys=function(){var e=[];return this.cache.forEach(function(r,n){e.push(n)}),e},t.prototype.containsKey=function(e){return this.cache.has(e)},t.prototype.clear=function(){this.cache.clear()},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Vk=function(){function t(){}return t.extractBrowserRequestState=function(e,r){if(ae.isEmpty(r))return null;try{var n=na.parseRequestState(e,r);return n.libraryState.meta}catch(i){throw se.createInvalidStateError(r,i)}},t.parseServerResponseFromHash=function(e){if(!e)return{};var r=new je(e);return je.getDeserializedHash(r.getHash())},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var L4=function(t){Fr(e,t);function e(r,n,i,o){var a=t.call(this,r,i,o)||this;return a.COOKIE_LIFE_MULTIPLIER=24*60*60*1e3,a.cacheConfig=n,a.logger=o,a.internalStorage=new $4,a.browserStorage=a.setupBrowserStorage(a.cacheConfig.cacheLocation),a.temporaryCacheStorage=a.setupTemporaryCacheStorage(a.cacheConfig.temporaryCacheLocation,a.cacheConfig.cacheLocation),n.cacheMigrationEnabled&&(a.migrateCacheEntries(),a.createKeyMaps()),a}return e.prototype.setupBrowserStorage=function(r){switch(r){case sr.LocalStorage:case sr.SessionStorage:try{return new L8(r)}catch(n){this.logger.verbose(n);break}}return this.cacheConfig.cacheLocation=sr.MemoryStorage,new $4},e.prototype.setupTemporaryCacheStorage=function(r,n){switch(n){case sr.LocalStorage:case sr.SessionStorage:try{return new L8(r||sr.SessionStorage)}catch(i){return this.logger.verbose(i),this.internalStorage}case sr.MemoryStorage:default:return this.internalStorage}},e.prototype.migrateCacheEntries=function(){var r=this,n=A.CACHE_PREFIX+"."+pr.ID_TOKEN,i=A.CACHE_PREFIX+"."+pr.CLIENT_INFO,o=A.CACHE_PREFIX+"."+pr.ERROR,a=A.CACHE_PREFIX+"."+pr.ERROR_DESC,s=this.browserStorage.getItem(n),c=this.browserStorage.getItem(i),l=this.browserStorage.getItem(o),d=this.browserStorage.getItem(a),u=[s,c,l,d],h=[pr.ID_TOKEN,pr.CLIENT_INFO,pr.ERROR,pr.ERROR_DESC];h.forEach(function(f,p){return r.migrateCacheEntry(f,u[p])})},e.prototype.migrateCacheEntry=function(r,n){n&&this.setTemporaryCache(r,n,!0)},e.prototype.createKeyMaps=function(){var r=this;this.logger.trace("BrowserCacheManager - createKeyMaps called.");var n=this.getItem(co.ACCOUNT_KEYS),i=this.getItem(co.TOKEN_KEYS+"."+this.clientId);if(n&&i){this.logger.verbose("BrowserCacheManager:createKeyMaps - account and token key maps already exist, skipping migration.");return}var o=this.browserStorage.getKeys();o.forEach(function(a){if(r.isCredentialKey(a)){var s=r.getItem(a);if(s){var c=r.validateAndParseJson(s);if(c&&c.hasOwnProperty("credentialType"))switch(c.credentialType){case ge.ID_TOKEN:if(qs.isIdTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - idToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - idToken with key: "+a+" found, saving key to token key map");var l=Tn.toObject(new qs,c),d=r.updateCredentialCacheKey(a,l);r.addTokenKey(d,ge.ID_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching idToken schema with value containing idToken credentialType field but value failed IdTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed idToken validation on key: "+a);break;case ge.ACCESS_TOKEN:case ge.ACCESS_TOKEN_WITH_AUTH_SCHEME:if(Ws.isAccessTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - accessToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - accessToken with key: "+a+" found, saving key to token key map");var u=Tn.toObject(new Ws,c),d=r.updateCredentialCacheKey(a,u);r.addTokenKey(d,ge.ACCESS_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching accessToken schema with value containing accessToken credentialType field but value failed AccessTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed accessToken validation on key: "+a);break;case ge.REFRESH_TOKEN:if(Ml.isRefreshTokenEntity(c)){r.logger.trace("BrowserCacheManager:createKeyMaps - refreshToken found, saving key to token key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - refreshToken with key: "+a+" found, saving key to token key map");var h=Tn.toObject(new Ml,c),d=r.updateCredentialCacheKey(a,h);r.addTokenKey(d,ge.REFRESH_TOKEN);return}else r.logger.trace("BrowserCacheManager:createKeyMaps - key found matching refreshToken schema with value containing refreshToken credentialType field but value failed RefreshTokenEntity validation, skipping."),r.logger.tracePii("BrowserCacheManager:createKeyMaps - failed refreshToken validation on key: "+a);break}}}if(r.isAccountKey(a)){var s=r.getItem(a);if(s){var f=r.validateAndParseJson(s);f&&Or.isAccountEntity(f)&&(r.logger.trace("BrowserCacheManager:createKeyMaps - account found, saving key to account key map"),r.logger.tracePii("BrowserCacheManager:createKeyMaps - account with key: "+a+" found, saving key to account key map"),r.addAccountKeyToMap(a))}}})},e.prototype.validateAndParseJson=function(r){try{var n=JSON.parse(r);return n&&typeof n=="object"?n:null}catch{return null}},e.prototype.getItem=function(r){return this.browserStorage.getItem(r)},e.prototype.setItem=function(r,n){this.browserStorage.setItem(r,n)},e.prototype.getAccount=function(r){this.logger.trace("BrowserCacheManager.getAccount called");var n=this.getItem(r);if(!n)return this.removeAccountKeyFromMap(r),null;var i=this.validateAndParseJson(n);return!i||!Or.isAccountEntity(i)?(this.removeAccountKeyFromMap(r),null):Tn.toObject(new Or,i)},e.prototype.setAccount=function(r){this.logger.trace("BrowserCacheManager.setAccount called");var n=r.generateAccountKey();this.setItem(n,JSON.stringify(r)),this.addAccountKeyToMap(n)},e.prototype.getAccountKeys=function(){this.logger.trace("BrowserCacheManager.getAccountKeys called");var r=this.getItem(co.ACCOUNT_KEYS);return r?JSON.parse(r):(this.logger.verbose("BrowserCacheManager.getAccountKeys - No account keys found"),[])},e.prototype.addAccountKeyToMap=function(r){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii("BrowserCacheManager.addAccountKeyToMap called with key: "+r);var n=this.getAccountKeys();n.indexOf(r)===-1?(n.push(r),this.setItem(co.ACCOUNT_KEYS,JSON.stringify(n)),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added")):this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map")},e.prototype.removeAccountKeyFromMap=function(r){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii("BrowserCacheManager.removeAccountKeyFromMap called with key: "+r);var n=this.getAccountKeys(),i=n.indexOf(r);i>-1?(n.splice(i,1),this.setItem(co.ACCOUNT_KEYS,JSON.stringify(n)),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")):this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")},e.prototype.removeAccount=function(r){return U(this,void 0,void 0,function(){return B(this,function(n){return t.prototype.removeAccount.call(this,r),this.removeAccountKeyFromMap(r),[2]})})},e.prototype.removeIdToken=function(r){t.prototype.removeIdToken.call(this,r),this.removeTokenKey(r,ge.ID_TOKEN)},e.prototype.removeAccessToken=function(r){return U(this,void 0,void 0,function(){return B(this,function(n){return t.prototype.removeAccessToken.call(this,r),this.removeTokenKey(r,ge.ACCESS_TOKEN),[2]})})},e.prototype.removeRefreshToken=function(r){t.prototype.removeRefreshToken.call(this,r),this.removeTokenKey(r,ge.REFRESH_TOKEN)},e.prototype.getTokenKeys=function(){this.logger.trace("BrowserCacheManager.getTokenKeys called");var r=this.getItem(co.TOKEN_KEYS+"."+this.clientId);if(r){var n=this.validateAndParseJson(r);if(n&&n.hasOwnProperty("idToken")&&n.hasOwnProperty("accessToken")&&n.hasOwnProperty("refreshToken"))return n;this.logger.error("BrowserCacheManager.getTokenKeys - Token keys found but in an unknown format. Returning empty key map.")}else this.logger.verbose("BrowserCacheManager.getTokenKeys - No token keys found");return{idToken:[],accessToken:[],refreshToken:[]}},e.prototype.addTokenKey=function(r,n){this.logger.trace("BrowserCacheManager addTokenKey called");var i=this.getTokenKeys();switch(n){case ge.ID_TOKEN:i.idToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),i.idToken.push(r));break;case ge.ACCESS_TOKEN:i.accessToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - accessToken added to map"),i.accessToken.push(r));break;case ge.REFRESH_TOKEN:i.refreshToken.indexOf(r)===-1&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),i.refreshToken.push(r));break;default:this.logger.error("BrowserCacheManager:addTokenKey - CredentialType provided invalid. CredentialType: "+n),se.createUnexpectedCredentialTypeError()}this.setItem(co.TOKEN_KEYS+"."+this.clientId,JSON.stringify(i))},e.prototype.removeTokenKey=function(r,n){this.logger.trace("BrowserCacheManager removeTokenKey called");var i=this.getTokenKeys();switch(n){case ge.ID_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove idToken with key: "+r+" from map");var o=i.idToken.indexOf(r);o>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - idToken removed from map"),i.idToken.splice(o,1)):this.logger.info("BrowserCacheManager: removeTokenKey - idToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.ACCESS_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove accessToken with key: "+r+" from map");var a=i.accessToken.indexOf(r);a>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - accessToken removed from map"),i.accessToken.splice(a,1)):this.logger.info("BrowserCacheManager: removeTokenKey - accessToken does not exist in map. Either it was previously removed or it was never added.");break;case ge.REFRESH_TOKEN:this.logger.infoPii("BrowserCacheManager: removeTokenKey - attempting to remove refreshToken with key: "+r+" from map");var s=i.refreshToken.indexOf(r);s>-1?(this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken removed from map"),i.refreshToken.splice(s,1)):this.logger.info("BrowserCacheManager: removeTokenKey - refreshToken does not exist in map. Either it was previously removed or it was never added.");break;default:this.logger.error("BrowserCacheManager:removeTokenKey - CredentialType provided invalid. CredentialType: "+n),se.createUnexpectedCredentialTypeError()}this.setItem(co.TOKEN_KEYS+"."+this.clientId,JSON.stringify(i))},e.prototype.getIdTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ID_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!qs.isIdTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ID_TOKEN),null):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),Tn.toObject(new qs,i))},e.prototype.setIdTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.ID_TOKEN)},e.prototype.getAccessTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ACCESS_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!Ws.isAccessTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.ACCESS_TOKEN),null):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),Tn.toObject(new Ws,i))},e.prototype.setAccessTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.ACCESS_TOKEN)},e.prototype.getRefreshTokenCredential=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.REFRESH_TOKEN),null;var i=this.validateAndParseJson(n);return!i||!Ml.isRefreshTokenEntity(i)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeTokenKey(r,ge.REFRESH_TOKEN),null):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),Tn.toObject(new Ml,i))},e.prototype.setRefreshTokenCredential=function(r){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");var n=r.generateCredentialKey();this.setItem(n,JSON.stringify(r)),this.addTokenKey(n,ge.REFRESH_TOKEN)},e.prototype.getAppMetadata=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!M4.isAppMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),Tn.toObject(new M4,i))},e.prototype.setAppMetadata=function(r){this.logger.trace("BrowserCacheManager.setAppMetadata called");var n=r.generateAppMetadataKey();this.setItem(n,JSON.stringify(r))},e.prototype.getServerTelemetry=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!H2.isServerTelemetryEntity(r,i)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),Tn.toObject(new H2,i))},e.prototype.setServerTelemetry=function(r,n){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(r,JSON.stringify(n))},e.prototype.getAuthorityMetadata=function(r){var n=this.internalStorage.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;var i=this.validateAndParseJson(n);return i&&Z4.isAuthorityMetadataEntity(r,i)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),Tn.toObject(new Z4,i)):null},e.prototype.getAuthorityMetadataKeys=function(){var r=this,n=this.internalStorage.getKeys();return n.filter(function(i){return r.isAuthorityMetadata(i)})},e.prototype.setWrapperMetadata=function(r,n){this.internalStorage.setItem(Hl.WRAPPER_SKU,r),this.internalStorage.setItem(Hl.WRAPPER_VER,n)},e.prototype.getWrapperMetadata=function(){var r=this.internalStorage.getItem(Hl.WRAPPER_SKU)||A.EMPTY_STRING,n=this.internalStorage.getItem(Hl.WRAPPER_VER)||A.EMPTY_STRING;return[r,n]},e.prototype.setAuthorityMetadata=function(r,n){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(r,JSON.stringify(n))},e.prototype.getActiveAccount=function(){var r=this.generateCacheKey(pr.ACTIVE_ACCOUNT_FILTERS),n=this.getItem(r);if(!n){this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters cache schema found, looking for legacy schema");var i=this.generateCacheKey(pr.ACTIVE_ACCOUNT),o=this.getItem(i);if(!o)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null;var a=this.getAccountInfoByFilter({localAccountId:o})[0]||null;return a?(this.logger.trace("BrowserCacheManager.getActiveAccount: Legacy active account cache schema found"),this.logger.trace("BrowserCacheManager.getActiveAccount: Adding active account filters cache schema"),this.setActiveAccount(a),a):null}var s=this.validateAndParseJson(n);return s?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoByFilter({homeAccountId:s.homeAccountId,localAccountId:s.localAccountId})[0]||null):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)},e.prototype.setActiveAccount=function(r){var n=this.generateCacheKey(pr.ACTIVE_ACCOUNT_FILTERS),i=this.generateCacheKey(pr.ACTIVE_ACCOUNT);if(r){this.logger.verbose("setActiveAccount: Active account set");var o={homeAccountId:r.homeAccountId,localAccountId:r.localAccountId};this.browserStorage.setItem(n,JSON.stringify(o)),this.browserStorage.setItem(i,r.localAccountId)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(n),this.browserStorage.removeItem(i)},e.prototype.getAccountInfoByFilter=function(r){var n=this.getAllAccounts();return this.logger.trace("BrowserCacheManager.getAccountInfoByFilter: total "+n.length+" accounts found"),n.filter(function(i){return!(r.username&&r.username.toLowerCase()!==i.username.toLowerCase()||r.homeAccountId&&r.homeAccountId!==i.homeAccountId||r.localAccountId&&r.localAccountId!==i.localAccountId||r.tenantId&&r.tenantId!==i.tenantId||r.environment&&r.environment!==i.environment)})},e.prototype.getAccountInfoByHints=function(r,n){var i=this.getAllAccounts().filter(function(o){if(n){var a=o.idTokenClaims&&o.idTokenClaims.sid;return n===a}return r?r===o.username:!1});if(i.length===1)return i[0];if(i.length>1)throw se.createMultipleMatchingAccountsInCacheError();return null},e.prototype.getThrottlingCache=function(r){var n=this.getItem(r);if(!n)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;var i=this.validateAndParseJson(n);return!i||!P8.isThrottlingEntity(r,i)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null):(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),Tn.toObject(new P8,i))},e.prototype.setThrottlingCache=function(r,n){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(r,JSON.stringify(n))},e.prototype.getTemporaryCache=function(r,n){var i=n?this.generateCacheKey(r):r;if(this.cacheConfig.storeAuthStateInCookie){var o=this.getItemCookie(i);if(o)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),o}var a=this.temporaryCacheStorage.getItem(i);if(!a){if(this.cacheConfig.cacheLocation===sr.LocalStorage){var s=this.browserStorage.getItem(i);if(s)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),s}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),a},e.prototype.setTemporaryCache=function(r,n,i){var o=i?this.generateCacheKey(r):r;this.temporaryCacheStorage.setItem(o,n),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.setItemCookie(o,n))},e.prototype.removeItem=function(r){this.browserStorage.removeItem(r),this.temporaryCacheStorage.removeItem(r),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.clearItemCookie(r))},e.prototype.containsKey=function(r){return this.browserStorage.containsKey(r)||this.temporaryCacheStorage.containsKey(r)},e.prototype.getKeys=function(){return cy(this.browserStorage.getKeys(),this.temporaryCacheStorage.getKeys())},e.prototype.clear=function(){return U(this,void 0,void 0,function(){var r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.removeAllAccounts()];case 1:return n.sent(),this.removeAppMetadata(),this.getKeys().forEach(function(i){(r.browserStorage.containsKey(i)||r.temporaryCacheStorage.containsKey(i))&&(i.indexOf(A.CACHE_PREFIX)!==-1||i.indexOf(r.clientId)!==-1)&&r.removeItem(i)}),this.internalStorage.clear(),[2]}})})},e.prototype.clearTokensAndKeysWithClaims=function(){return U(this,void 0,void 0,function(){var r,n,i=this;return B(this,function(o){switch(o.label){case 0:return this.logger.trace("BrowserCacheManager.clearTokensAndKeysWithClaims called"),r=this.getTokenKeys(),n=[],r.accessToken.forEach(function(a){var s=i.getAccessTokenCredential(a);s!=null&&s.requestedClaimsHash&&a.includes(s.requestedClaimsHash.toLowerCase())&&n.push(i.removeAccessToken(a))}),[4,Promise.all(n)];case 1:return o.sent(),n.length>0&&this.logger.warning(n.length+" access tokens with claims in the cache keys have been removed from the cache."),[2]}})})},e.prototype.setItemCookie=function(r,n,i){var o=encodeURIComponent(r)+"="+encodeURIComponent(n)+";path=/;SameSite=Lax;";if(i){var a=this.getCookieExpirationTime(i);o+="expires="+a+";"}this.cacheConfig.secureCookies&&(o+="Secure;"),document.cookie=o},e.prototype.getItemCookie=function(r){for(var n=encodeURIComponent(r)+"=",i=document.cookie.split(";"),o=0;o<i.length;o++){for(var a=i[o];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(n)===0)return decodeURIComponent(a.substring(n.length,a.length))}return A.EMPTY_STRING},e.prototype.clearMsalCookies=function(){var r=this,n=A.CACHE_PREFIX+"."+this.clientId,i=document.cookie.split(";");i.forEach(function(o){for(;o.charAt(0)===" ";)o=o.substring(1);if(o.indexOf(n)===0){var a=o.split("=")[0];r.clearItemCookie(a)}})},e.prototype.clearItemCookie=function(r){this.setItemCookie(r,A.EMPTY_STRING,-1)},e.prototype.getCookieExpirationTime=function(r){var n=new Date,i=new Date(n.getTime()+r*this.COOKIE_LIFE_MULTIPLIER);return i.toUTCString()},e.prototype.getCache=function(){return this.browserStorage},e.prototype.setCache=function(){},e.prototype.generateCacheKey=function(r){var n=this.validateAndParseJson(r);return n?JSON.stringify(r):ae.startsWith(r,A.CACHE_PREFIX)||ae.startsWith(r,pr.ADAL_ID_TOKEN)?r:A.CACHE_PREFIX+"."+this.clientId+"."+r},e.prototype.generateAuthorityKey=function(r){var n=na.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(We.AUTHORITY+"."+n)},e.prototype.generateNonceKey=function(r){var n=na.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(We.NONCE_IDTOKEN+"."+n)},e.prototype.generateStateKey=function(r){var n=na.parseRequestState(this.cryptoImpl,r).libraryState.id;return this.generateCacheKey(We.REQUEST_STATE+"."+n)},e.prototype.getCachedAuthority=function(r){var n=this.generateStateKey(r),i=this.getTemporaryCache(n);if(!i)return null;var o=this.generateAuthorityKey(i);return this.getTemporaryCache(o)},e.prototype.updateCacheEntries=function(r,n,i,o,a){this.logger.trace("BrowserCacheManager.updateCacheEntries called");var s=this.generateStateKey(r);this.setTemporaryCache(s,r,!1);var c=this.generateNonceKey(r);this.setTemporaryCache(c,n,!1);var l=this.generateAuthorityKey(r);if(this.setTemporaryCache(l,i,!1),a){var d={credential:a.homeAccountId,type:Wn.HOME_ACCOUNT_ID};this.setTemporaryCache(We.CCS_CREDENTIAL,JSON.stringify(d),!0)}else if(!ae.isEmpty(o)){var d={credential:o,type:Wn.UPN};this.setTemporaryCache(We.CCS_CREDENTIAL,JSON.stringify(d),!0)}},e.prototype.resetRequestCache=function(r){var n=this;this.logger.trace("BrowserCacheManager.resetRequestCache called"),ae.isEmpty(r)||this.getKeys().forEach(function(i){i.indexOf(r)!==-1&&n.removeItem(i)}),r&&(this.removeItem(this.generateStateKey(r)),this.removeItem(this.generateNonceKey(r)),this.removeItem(this.generateAuthorityKey(r))),this.removeItem(this.generateCacheKey(We.REQUEST_PARAMS)),this.removeItem(this.generateCacheKey(We.ORIGIN_URI)),this.removeItem(this.generateCacheKey(We.URL_HASH)),this.removeItem(this.generateCacheKey(We.CORRELATION_ID)),this.removeItem(this.generateCacheKey(We.CCS_CREDENTIAL)),this.removeItem(this.generateCacheKey(We.NATIVE_REQUEST)),this.setInteractionInProgress(!1)},e.prototype.cleanRequestByState=function(r){if(this.logger.trace("BrowserCacheManager.cleanRequestByState called"),r){var n=this.generateStateKey(r),i=this.temporaryCacheStorage.getItem(n);this.logger.infoPii("BrowserCacheManager.cleanRequestByState: Removing temporary cache items for state: "+i),this.resetRequestCache(i||A.EMPTY_STRING)}this.clearMsalCookies()},e.prototype.cleanRequestByInteractionType=function(r){var n=this;this.logger.trace("BrowserCacheManager.cleanRequestByInteractionType called"),this.getKeys().forEach(function(i){if(i.indexOf(We.REQUEST_STATE)!==-1){var o=n.temporaryCacheStorage.getItem(i);if(o){var a=Vk.extractBrowserRequestState(n.cryptoImpl,o);a&&a.interactionType===r&&(n.logger.infoPii("BrowserCacheManager.cleanRequestByInteractionType: Removing temporary cache items for state: "+o),n.resetRequestCache(o))}}}),this.clearMsalCookies(),this.setInteractionInProgress(!1)},e.prototype.cacheCodeRequest=function(r,n){this.logger.trace("BrowserCacheManager.cacheCodeRequest called");var i=n.base64Encode(JSON.stringify(r));this.setTemporaryCache(We.REQUEST_PARAMS,i,!0)},e.prototype.getCachedRequest=function(r,n){this.logger.trace("BrowserCacheManager.getCachedRequest called");var i=this.getTemporaryCache(We.REQUEST_PARAMS,!0);if(!i)throw ne.createNoTokenRequestCacheError();var o=this.validateAndParseJson(n.base64Decode(i));if(!o)throw ne.createUnableToParseTokenRequestCacheError();if(this.removeItem(this.generateCacheKey(We.REQUEST_PARAMS)),ae.isEmpty(o.authority)){var a=this.generateAuthorityKey(r),s=this.getTemporaryCache(a);if(!s)throw ne.createNoCachedAuthorityError();o.authority=s}return o},e.prototype.getCachedNativeRequest=function(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");var r=this.getTemporaryCache(We.NATIVE_REQUEST,!0);if(!r)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;var n=this.validateAndParseJson(r);return n||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)},e.prototype.isInteractionInProgress=function(r){var n=this.getInteractionInProgress();return r?n===this.clientId:!!n},e.prototype.getInteractionInProgress=function(){var r=A.CACHE_PREFIX+"."+We.INTERACTION_STATUS_KEY;return this.getTemporaryCache(r,!1)},e.prototype.setInteractionInProgress=function(r){var n=A.CACHE_PREFIX+"."+We.INTERACTION_STATUS_KEY;if(r){if(this.getInteractionInProgress())throw ne.createInteractionInProgressError();this.setTemporaryCache(n,this.clientId,!1)}else!r&&this.getInteractionInProgress()===this.clientId&&this.removeItem(n)},e.prototype.getLegacyLoginHint=function(){var r=this.getTemporaryCache(pr.ADAL_ID_TOKEN);r&&(this.browserStorage.removeItem(pr.ADAL_ID_TOKEN),this.logger.verbose("Cached ADAL id token retrieved."));var n=this.getTemporaryCache(pr.ID_TOKEN,!0);n&&(this.removeItem(this.generateCacheKey(pr.ID_TOKEN)),this.logger.verbose("Cached MSAL.js v1 id token retrieved"));var i=n||r;if(i){var o=new Eo(i,this.cryptoImpl);if(o.claims&&o.claims.preferred_username)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 preferred_username as loginHint"),o.claims.preferred_username;if(o.claims&&o.claims.upn)return this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, setting ADAL/MSAL v1 upn as loginHint"),o.claims.upn;this.logger.verbose("No SSO params used and ADAL/MSAL v1 token retrieved, however, no account hint claim found. Enable preferred_username or upn id token claim to get SSO.")}return null},e.prototype.updateCredentialCacheKey=function(r,n){var i=n.generateCredentialKey();if(r!==i){var o=this.getItem(r);if(o)return this.removeItem(r),this.setItem(i,o),this.logger.verbose("Updated an outdated "+n.credentialType+" cache key"),i;this.logger.error("Attempted to update an outdated "+n.credentialType+" cache key but no item matching the outdated key was found in storage")}return r},e.prototype.getRedirectRequestContext=function(){return this.getTemporaryCache(We.REDIRECT_CONTEXT,!0)},e.prototype.setRedirectRequestContext=function(r){this.setTemporaryCache(We.REDIRECT_CONTEXT,r,!0)},e}(Tn),PO=function(t,e){var r={cacheLocation:sr.MemoryStorage,temporaryCacheLocation:sr.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};return new L4(t,r,I2,e)};/*! @azure/msal-browser v2.38.3 2023-10-27 */var vv="@azure/msal-browser",ch="2.38.3";/*! @azure/msal-browser v2.38.3 2023-10-27 */var RO=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return U(this,void 0,void 0,function(){var n,i,o;return B(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,fetch(e,{method:ho.GET,headers:this.getFetchHeaders(r)})];case 1:return n=a.sent(),[3,3];case 2:throw i=a.sent(),window.navigator.onLine?ne.createGetRequestFailedError(i,e):ne.createNoNetworkConnectivityError();case 3:return a.trys.push([3,5,,6]),o={headers:this.getHeaderDict(n.headers)},[4,n.json()];case 4:return[2,(o.body=a.sent(),o.status=n.status,o)];case 5:throw a.sent(),ne.createFailedToParseNetworkResponseError(e);case 6:return[2]}})})},t.prototype.sendPostRequestAsync=function(e,r){return U(this,void 0,void 0,function(){var n,i,o,a;return B(this,function(s){switch(s.label){case 0:n=r&&r.body||A.EMPTY_STRING,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,fetch(e,{method:ho.POST,headers:this.getFetchHeaders(r),body:n})];case 2:return i=s.sent(),[3,4];case 3:throw o=s.sent(),window.navigator.onLine?ne.createPostRequestFailedError(o,e):ne.createNoNetworkConnectivityError();case 4:return s.trys.push([4,6,,7]),a={headers:this.getHeaderDict(i.headers)},[4,i.json()];case 5:return[2,(a.body=s.sent(),a.status=i.status,a)];case 6:throw s.sent(),ne.createFailedToParseNetworkResponseError(e);case 7:return[2]}})})},t.prototype.getFetchHeaders=function(e){var r=new Headers;if(!(e&&e.headers))return r;var n=e.headers;return Object.keys(n).forEach(function(i){r.append(i,n[i])}),r},t.prototype.getHeaderDict=function(e){var r={};return e.forEach(function(n,i){r[i]=n}),r},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var MO=function(){function t(){}return t.prototype.sendGetRequestAsync=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,this.sendRequestAsync(e,ho.GET,r)]})})},t.prototype.sendPostRequestAsync=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,this.sendRequestAsync(e,ho.POST,r)]})})},t.prototype.sendRequestAsync=function(e,r,n){var i=this;return new Promise(function(o,a){var s=new XMLHttpRequest;if(s.open(r,e,!0),i.setXhrHeaders(s,n),s.onload=function(){(s.status<200||s.status>=300)&&(r===ho.POST?a(ne.createPostRequestFailedError("Failed with status "+s.status,e)):a(ne.createGetRequestFailedError("Failed with status "+s.status,e)));try{var c=JSON.parse(s.responseText),l={headers:i.getHeaderDict(s),body:c,status:s.status};o(l)}catch{a(ne.createFailedToParseNetworkResponseError(e))}},s.onerror=function(){window.navigator.onLine?r===ho.POST?a(ne.createPostRequestFailedError("Failed with status "+s.status,e)):a(ne.createGetRequestFailedError("Failed with status "+s.status,e)):a(ne.createNoNetworkConnectivityError())},r===ho.POST&&n&&n.body)s.send(n.body);else if(r===ho.GET)s.send();else throw ne.createHttpMethodNotImplementedError(r)})},t.prototype.setXhrHeaders=function(e,r){if(r&&r.headers){var n=r.headers;Object.keys(n).forEach(function(i){e.setRequestHeader(i,n[i])})}},t.prototype.getHeaderDict=function(e){var r=e.getAllResponseHeaders(),n=r.trim().split(/[\r\n]+/),i={};return n.forEach(function(o){var a=o.split(": "),s=a.shift(),c=a.join(": ");s&&c&&(i[s]=c)}),i},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Yt=function(){function t(){}return t.clearHash=function(e){e.location.hash=A.EMPTY_STRING,typeof e.history.replaceState=="function"&&e.history.replaceState(null,A.EMPTY_STRING,""+e.location.origin+e.location.pathname+e.location.search)},t.replaceHash=function(e){var r=e.split("#");r.shift(),window.location.hash=r.length>0?r.join("#"):A.EMPTY_STRING},t.isInIframe=function(){return window.parent!==window},t.isInPopup=function(){return typeof window<"u"&&!!window.opener&&window.opener!==window&&typeof window.name=="string"&&window.name.indexOf(Vi.POPUP_NAME_PREFIX+".")===0},t.getCurrentUri=function(){return window.location.href.split("?")[0].split("#")[0]},t.getHomepage=function(){var e=new je(window.location.href),r=e.getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+"/"},t.getBrowserNetworkClient=function(){return window.fetch&&window.Headers?new RO:new MO},t.blockReloadInHiddenIframes=function(){var e=je.hashContainsKnownProperties(window.location.hash);if(e&&t.isInIframe())throw ne.createBlockReloadInHiddenIframeError()},t.blockRedirectInIframe=function(e,r){var n=t.isInIframe();if(e===de.Redirect&&n&&!r)throw ne.createRedirectInIframeError(n)},t.blockAcquireTokenInPopups=function(){if(t.isInPopup())throw ne.createBlockAcquireTokenInPopupsError()},t.blockNonBrowserEnvironment=function(e){if(!e)throw ne.createNonBrowserEnvironmentError()},t.blockNativeBrokerCalledBeforeInitialized=function(e,r){if(e&&!r)throw ne.createNativeBrokerCalledBeforeInitialize()},t.detectIEOrEdge=function(){var e=window.navigator.userAgent,r=e.indexOf("MSIE "),n=e.indexOf("Trident/"),i=e.indexOf("Edge/"),o=r>0||n>0,a=i>0;return o||a},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Fk=function(){function t(e,r,n,i,o,a,s,c,l){this.config=e,this.browserStorage=r,this.browserCrypto=n,this.networkClient=this.config.system.networkClient,this.eventHandler=o,this.navigationClient=a,this.nativeMessageHandler=c,this.correlationId=l||this.browserCrypto.createNewGuid(),this.logger=i.clone(Vi.MSAL_SKU,ch,this.correlationId),this.performanceClient=s}return t.prototype.clearCacheOnLogout=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){switch(r.label){case 0:if(!e)return[3,5];Or.accountInfoIsEqual(e,this.browserStorage.getActiveAccount(),!1)&&(this.logger.verbose("Setting active account to null"),this.browserStorage.setActiveAccount(null)),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.browserStorage.removeAccount(Or.generateAccountCacheKey(e))];case 2:return r.sent(),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request."),[3,4];case 3:return r.sent(),this.logger.error("Account provided in logout request was not found. Local cache unchanged."),[3,4];case 4:return[3,9];case 5:return r.trys.push([5,8,,9]),this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),[4,this.browserStorage.clear()];case 6:return r.sent(),[4,this.browserCrypto.clearKeystore()];case 7:return r.sent(),[3,9];case 8:return r.sent(),this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged."),[3,9];case 9:return[2]}})})},t.prototype.initializeBaseRequest=function(e,r){return U(this,void 0,void 0,function(){var n,i,o,a;return B(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(O.InitializeBaseRequest,e.correlationId),this.logger.verbose("Initializing BaseAuthRequest"),n=e.authority||this.config.auth.authority,r?[4,this.validateRequestAuthority(n,r)]:[3,2];case 1:s.sent(),s.label=2;case 2:if(i=cy(e&&e.scopes||[]),o=ue(ue({},e),{correlationId:this.correlationId,authority:n,scopes:i}),!o.authenticationScheme)o.authenticationScheme=ot.BEARER,this.logger.verbose(`Authentication Scheme wasn't explicitly set in request, defaulting to "Bearer" request`);else{if(o.authenticationScheme===ot.SSH){if(!e.sshJwk)throw bt.createMissingSshJwkError();if(!e.sshKid)throw bt.createMissingSshKidError()}this.logger.verbose('Authentication Scheme set to "'+o.authenticationScheme+'" as configured in Auth request')}return this.config.cache.claimsBasedCachingEnabled&&e.claims&&!ae.isEmptyObj(e.claims)?(a=o,[4,this.browserCrypto.hashString(e.claims)]):[3,4];case 3:a.requestedClaimsHash=s.sent(),s.label=4;case 4:return[2,o]}})})},t.prototype.getRedirectUri=function(e){this.logger.verbose("getRedirectUri called");var r=e||this.config.auth.redirectUri||Yt.getCurrentUri();return je.getAbsoluteUrl(r,Yt.getCurrentUri())},t.prototype.validateRequestAuthority=function(e,r){return U(this,void 0,void 0,function(){var n;return B(this,function(i){switch(i.label){case 0:return[4,this.getDiscoveredAuthority(e)];case 1:if(n=i.sent(),!n.isAlias(r.environment))throw bt.createAuthorityMismatchError();return[2]}})})},t.prototype.initializeServerTelemetryManager=function(e,r){this.logger.verbose("initializeServerTelemetryManager called");var n={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:r||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new SO(n,this.browserStorage)},t.prototype.getDiscoveredAuthority=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){switch(n.label){case 0:return this.logger.verbose("getDiscoveredAuthority called"),r={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata},e?(this.logger.verbose("Creating discovered authority with request authority"),[4,Z2.createDiscoveredInstance(e,this.config.system.networkClient,this.browserStorage,r,this.logger)]):[3,2];case 1:return[2,n.sent()];case 2:return this.logger.verbose("Creating discovered authority with configured authority"),[4,Z2.createDiscoveredInstance(this.config.auth.authority,this.config.system.networkClient,this.browserStorage,r,this.logger)];case 3:return[2,n.sent()]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var kd=function(t){Fr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.initializeAuthorizationCodeRequest=function(r){return U(this,void 0,void 0,function(){var n,i;return B(this,function(o){switch(o.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),this.logger.verbose("initializeAuthorizationRequest called",r.correlationId),[4,this.browserCrypto.generatePkceCodes()];case 1:return n=o.sent(),i=ue(ue({},r),{redirectUri:r.redirectUri,code:A.EMPTY_STRING,codeVerifier:n.verifier}),r.codeChallenge=n.challenge,r.codeChallengeMethod=A.S256_CODE_CHALLENGE_METHOD,[2,i]}})})},e.prototype.initializeLogoutRequest=function(r){this.logger.verbose("initializeLogoutRequest called",r==null?void 0:r.correlationId);var n=ue({correlationId:this.correlationId||this.browserCrypto.createNewGuid()},r);if(r)if(r.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(r.account){var i=this.getLogoutHintFromIdTokenClaims(r.account);i&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),n.logoutHint=i)}else this.logger.verbose("logoutHint was not set and account was not passed into logout request, logoutHint will not be set");else this.logger.verbose("logoutHint will not be set since no logout request was configured");return!r||r.postLogoutRedirectUri!==null?r&&r.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",n.correlationId),n.postLogoutRedirectUri=je.getAbsoluteUrl(r.postLogoutRedirectUri,Yt.getCurrentUri())):this.config.auth.postLogoutRedirectUri===null?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",n.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",n.correlationId),n.postLogoutRedirectUri=je.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Yt.getCurrentUri())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",n.correlationId),n.postLogoutRedirectUri=je.getAbsoluteUrl(Yt.getCurrentUri(),Yt.getCurrentUri())):this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",n.correlationId),n},e.prototype.getLogoutHintFromIdTokenClaims=function(r){var n=r.idTokenClaims;if(n){if(n.login_hint)return n.login_hint;this.logger.verbose("The ID Token Claims tied to the provided account do not contain a login_hint claim, logoutHint will not be added to logout request")}else this.logger.verbose("The provided account does not contain ID Token Claims, logoutHint will not be added to logout request");return null},e.prototype.createAuthCodeClient=function(r,n,i){return U(this,void 0,void 0,function(){var o;return B(this,function(a){switch(a.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientCreateAuthCodeClient,this.correlationId),this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Lk(o,this.performanceClient)]}})})},e.prototype.getClientConfiguration=function(r,n,i){return U(this,void 0,void 0,function(){var o,a;return B(this,function(s){switch(s.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientGetClientConfiguration,this.correlationId),this.logger.verbose("getClientConfiguration called",this.correlationId),this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),[4,this.getDiscoveredAuthority(n,i)];case 1:return o=s.sent(),a=this.config.system.loggerOptions,[2,{authOptions:{clientId:this.config.auth.clientId,authority:o,clientCapabilities:this.config.auth.clientCapabilities},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:a.loggerCallback,piiLoggingEnabled:a.piiLoggingEnabled,logLevel:a.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:r,libraryInfo:{sku:Vi.MSAL_SKU,version:ch,cpu:A.EMPTY_STRING,os:A.EMPTY_STRING},telemetry:this.config.telemetry}]}})})},e.prototype.validateAndExtractStateFromHash=function(r,n,i){if(this.logger.verbose("validateAndExtractStateFromHash called",i),!r.state)throw ne.createHashDoesNotContainStateError();var o=Vk.extractBrowserRequestState(this.browserCrypto,r.state);if(!o)throw ne.createUnableToParseStateError();if(o.interactionType!==n)throw ne.createStateInteractionTypeMismatchError();return this.logger.verbose("Returning state from hash",i),r.state},e.prototype.getDiscoveredAuthority=function(r,n){var i;return U(this,void 0,void 0,function(){var o,a,s,c;return B(this,function(l){switch(l.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),this.logger.verbose("getDiscoveredAuthority called",this.correlationId),o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(O.StandardInteractionClientGetDiscoveredAuthority,this.correlationId),a={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},s=r||this.config.auth.authority,c=Dh.generateAuthority(s,n||this.config.auth.azureCloudOptions),this.logger.verbose("Creating discovered authority with configured authority",this.correlationId),this.performanceClient.setPreQueueTime(O.AuthorityFactoryCreateDiscoveredInstance,this.correlationId),[4,Z2.createDiscoveredInstance(c,this.config.system.networkClient,this.browserStorage,a,this.logger,this.performanceClient,this.correlationId).then(function(d){return o.endMeasurement({success:!0}),d}).catch(function(d){throw o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})];case 1:return[2,l.sent()]}})})},e.prototype.initializeAuthorizationRequest=function(r,n){return U(this,void 0,void 0,function(){var i,o,a,s,c,l,d;return B(this,function(u){switch(u.label){case 0:return this.performanceClient.addQueueMeasurement(O.StandardInteractionClientInitializeAuthorizationRequest,this.correlationId),this.logger.verbose("initializeAuthorizationRequest called",this.correlationId),i=this.getRedirectUri(r.redirectUri),o={interactionType:n},a=na.setRequestState(this.browserCrypto,r&&r.state||A.EMPTY_STRING,o),this.performanceClient.setPreQueueTime(O.InitializeBaseRequest,this.correlationId),c=[{}],[4,this.initializeBaseRequest(r)];case 1:return s=ue.apply(void 0,[ue.apply(void 0,c.concat([u.sent()])),{redirectUri:i,state:a,nonce:r.nonce||this.browserCrypto.createNewGuid(),responseMode:k2.FRAGMENT}]),l=r.account||this.browserStorage.getActiveAccount(),l&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii("Setting validated request account: "+l.homeAccountId,this.correlationId),s.account=l),ae.isEmpty(s.loginHint)&&!l&&(d=this.browserStorage.getLegacyLoginHint(),d&&(s.loginHint=d)),[2,s]}})})},e}(Fk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var hy=function(){function t(e,r,n,i,o){this.authModule=e,this.browserStorage=r,this.authCodeRequest=n,this.logger=i,this.performanceClient=o}return t.prototype.handleCodeResponseFromHash=function(e,r,n,i){return U(this,void 0,void 0,function(){var o,a,s;return B(this,function(c){if(this.performanceClient.addQueueMeasurement(O.HandleCodeResponseFromHash,this.authCodeRequest.correlationId),this.logger.verbose("InteractionHandler.handleCodeResponse called"),ae.isEmpty(e))throw ne.createEmptyHashError(e);if(o=this.browserStorage.generateStateKey(r),a=this.browserStorage.getTemporaryCache(o),!a)throw se.createStateNotFoundError("Cached State");try{s=this.authModule.handleFragmentResponse(e,a)}catch(l){throw l instanceof _c&&l.subError===Y.userCancelledError.code?ne.createUserCancelledError():l}return this.performanceClient.setPreQueueTime(O.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),[2,this.handleCodeResponseFromServer(s,r,n,i)]})})},t.prototype.handleCodeResponseFromServer=function(e,r,n,i,o){return o===void 0&&(o=!0),U(this,void 0,void 0,function(){var a,s,c,l,d,u;return B(this,function(h){switch(h.label){case 0:if(this.performanceClient.addQueueMeasurement(O.HandleCodeResponseFromServer,this.authCodeRequest.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),a=this.browserStorage.generateStateKey(r),s=this.browserStorage.getTemporaryCache(a),!s)throw se.createStateNotFoundError("Cached State");return c=this.browserStorage.generateNonceKey(s),l=this.browserStorage.getTemporaryCache(c),this.authCodeRequest.code=e.code,e.cloud_instance_host_name?(this.performanceClient.setPreQueueTime(O.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),[4,this.updateTokenEndpointAuthority(e.cloud_instance_host_name,n,i)]):[3,2];case 1:h.sent(),h.label=2;case 2:return o&&(e.nonce=l||void 0),e.state=s,e.client_info?this.authCodeRequest.clientInfo=e.client_info:(d=this.checkCcsCredentials(),d&&(this.authCodeRequest.ccsCredential=d)),this.performanceClient.setPreQueueTime(O.AuthClientAcquireToken,this.authCodeRequest.correlationId),[4,this.authModule.acquireToken(this.authCodeRequest,e)];case 3:return u=h.sent(),this.browserStorage.cleanRequestByState(r),[2,u]}})})},t.prototype.updateTokenEndpointAuthority=function(e,r,n){return U(this,void 0,void 0,function(){var i,o;return B(this,function(a){switch(a.label){case 0:return this.performanceClient.addQueueMeasurement(O.UpdateTokenEndpointAuthority,this.authCodeRequest.correlationId),i="https://"+e+"/"+r.tenant+"/",[4,Z2.createDiscoveredInstance(i,n,this.browserStorage,r.options,this.logger,this.performanceClient,this.authCodeRequest.correlationId)];case 1:return o=a.sent(),this.authModule.updateAuthority(o),[2]}})})},t.prototype.checkCcsCredentials=function(){var e=this.browserStorage.getTemporaryCache(We.CCS_CREDENTIAL,!0);if(e)try{return JSON.parse(e)}catch{this.authModule.logger.error("Cache credential could not be parsed"),this.authModule.logger.errorPii("Cache credential could not be parsed: "+e)}return null},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var O8=function(t){Fr(e,t);function e(r,n,i,o,a,s){var c=t.call(this,r,n,i,o,s)||this;return c.browserCrypto=a,c}return e.prototype.initiateAuthRequest=function(r,n){return U(this,void 0,void 0,function(){var i,o;return B(this,function(a){switch(a.label){case 0:return this.logger.verbose("RedirectHandler.initiateAuthRequest called"),ae.isEmpty(r)?[3,7]:(n.redirectStartPage&&(this.logger.verbose("RedirectHandler.initiateAuthRequest: redirectStartPage set, caching start page"),this.browserStorage.setTemporaryCache(We.ORIGIN_URI,n.redirectStartPage,!0)),this.browserStorage.setTemporaryCache(We.CORRELATION_ID,this.authCodeRequest.correlationId,!0),this.browserStorage.cacheCodeRequest(this.authCodeRequest,this.browserCrypto),this.logger.infoPii("RedirectHandler.initiateAuthRequest: Navigate to: "+r),i={apiId:_t.acquireTokenRedirect,timeout:n.redirectTimeout,noHistory:!1},typeof n.onRedirectNavigate!="function"?[3,4]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),o=n.onRedirectNavigate(r),o===!1?[3,2]:(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),[4,n.navigationClient.navigateExternal(r,i)])));case 1:return a.sent(),[2];case 2:return this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation"),[2];case 3:return[3,6];case 4:return this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),[4,n.navigationClient.navigateExternal(r,i)];case 5:return a.sent(),[2];case 6:return[3,8];case 7:throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),ne.createEmptyNavigationUriError();case 8:return[2]}})})},e.prototype.handleCodeResponseFromHash=function(r,n,i,o){return U(this,void 0,void 0,function(){var a,s,c,l,d,u,h;return B(this,function(f){switch(f.label){case 0:if(this.logger.verbose("RedirectHandler.handleCodeResponse called"),ae.isEmpty(r))throw ne.createEmptyHashError(r);if(this.browserStorage.setInteractionInProgress(!1),a=this.browserStorage.generateStateKey(n),s=this.browserStorage.getTemporaryCache(a),!s)throw se.createStateNotFoundError("Cached State");try{c=this.authModule.handleFragmentResponse(r,s)}catch(p){throw p instanceof _c&&p.subError===Y.userCancelledError.code?ne.createUserCancelledError():p}return l=this.browserStorage.generateNonceKey(s),d=this.browserStorage.getTemporaryCache(l),this.authCodeRequest.code=c.code,c.cloud_instance_host_name?[4,this.updateTokenEndpointAuthority(c.cloud_instance_host_name,i,o)]:[3,2];case 1:f.sent(),f.label=2;case 2:return c.nonce=d||void 0,c.state=s,c.client_info?this.authCodeRequest.clientInfo=c.client_info:(u=this.checkCcsCredentials(),u&&(this.authCodeRequest.ccsCredential=u)),[4,this.authModule.acquireToken(this.authCodeRequest,c)];case 3:return h=f.sent(),this.browserStorage.cleanRequestByState(n),[2,h]}})})},e}(hy);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Ce;(function(t){t.INITIALIZE_START="msal:initializeStart",t.INITIALIZE_END="msal:initializeEnd",t.ACCOUNT_ADDED="msal:accountAdded",t.ACCOUNT_REMOVED="msal:accountRemoved",t.LOGIN_START="msal:loginStart",t.LOGIN_SUCCESS="msal:loginSuccess",t.LOGIN_FAILURE="msal:loginFailure",t.ACQUIRE_TOKEN_START="msal:acquireTokenStart",t.ACQUIRE_TOKEN_SUCCESS="msal:acquireTokenSuccess",t.ACQUIRE_TOKEN_FAILURE="msal:acquireTokenFailure",t.ACQUIRE_TOKEN_NETWORK_START="msal:acquireTokenFromNetworkStart",t.SSO_SILENT_START="msal:ssoSilentStart",t.SSO_SILENT_SUCCESS="msal:ssoSilentSuccess",t.SSO_SILENT_FAILURE="msal:ssoSilentFailure",t.ACQUIRE_TOKEN_BY_CODE_START="msal:acquireTokenByCodeStart",t.ACQUIRE_TOKEN_BY_CODE_SUCCESS="msal:acquireTokenByCodeSuccess",t.ACQUIRE_TOKEN_BY_CODE_FAILURE="msal:acquireTokenByCodeFailure",t.HANDLE_REDIRECT_START="msal:handleRedirectStart",t.HANDLE_REDIRECT_END="msal:handleRedirectEnd",t.POPUP_OPENED="msal:popupOpened",t.LOGOUT_START="msal:logoutStart",t.LOGOUT_SUCCESS="msal:logoutSuccess",t.LOGOUT_FAILURE="msal:logoutFailure",t.LOGOUT_END="msal:logoutEnd",t.RESTORE_FROM_BFCACHE="msal:restoreFromBFCache"})(Ce||(Ce={}));/*! @azure/msal-browser v2.38.3 2023-10-27 */var La;(function(t){t.USER_INTERACTION_REQUIRED="USER_INTERACTION_REQUIRED",t.USER_CANCEL="USER_CANCEL",t.NO_NETWORK="NO_NETWORK",t.TRANSIENT_ERROR="TRANSIENT_ERROR",t.PERSISTENT_ERROR="PERSISTENT_ERROR",t.DISABLED="DISABLED",t.ACCOUNT_UNAVAILABLE="ACCOUNT_UNAVAILABLE"})(La||(La={}));var eu={extensionError:{code:"ContentError"},userSwitch:{code:"user_switch",desc:"User attempted to switch accounts in the native broker, which is not allowed. All new accounts must sign-in through the standard web flow first, please try again."},tokensNotFoundInCache:{code:"tokens_not_found_in_internal_memory_cache",desc:"Tokens not cached in MSAL JS internal memory, please make the WAM request"}},vo=function(t){Fr(e,t);function e(r,n,i){var o=t.call(this,r,n)||this;return Object.setPrototypeOf(o,e.prototype),o.name="NativeAuthError",o.ext=i,o}return e.prototype.isFatal=function(){if(this.ext&&this.ext.status&&(this.ext.status===La.PERSISTENT_ERROR||this.ext.status===La.DISABLED))return!0;switch(this.errorCode){case eu.extensionError.code:return!0;default:return!1}},e.createError=function(r,n,i){if(i&&i.status)switch(i.status){case La.ACCOUNT_UNAVAILABLE:return zi.createNativeAccountUnavailableError();case La.USER_INTERACTION_REQUIRED:return new zi(r,n);case La.USER_CANCEL:return ne.createUserCancelledError();case La.NO_NETWORK:return ne.createNoNetworkConnectivityError()}return new e(r,n,i)},e.createUserSwitchError=function(){return new e(eu.userSwitch.code,eu.userSwitch.desc)},e.createTokensNotFoundInCacheError=function(){return new e(eu.tokensNotFoundInCache.code,eu.tokensNotFoundInCache.desc)},e}(fe);/*! @azure/msal-browser v2.38.3 2023-10-27 */var zk=function(t){Fr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s;return B(this,function(c){switch(c.label){case 0:return n=this.performanceClient.startMeasurement(O.SilentCacheClientAcquireToken,r.correlationId),i=this.initializeServerTelemetryManager(_t.acquireTokenSilent_silentFlow),[4,this.createSilentFlowClient(i,r.authority,r.azureCloudOptions)];case 1:o=c.sent(),this.logger.verbose("Silent auth client created"),c.label=2;case 2:return c.trys.push([2,4,,5]),[4,o.acquireCachedToken(r)];case 3:return a=c.sent(),n.endMeasurement({success:!0,fromCache:!0}),[2,a];case 4:throw s=c.sent(),s instanceof ne&&s.errorCode===Y.signingKeyNotFoundInStorage.code&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),n.endMeasurement({errorCode:s instanceof fe&&s.errorCode||void 0,subErrorCode:s instanceof fe&&s.subError||void 0,success:!1}),s;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.createSilentFlowClient=function(r,n,i){return U(this,void 0,void 0,function(){var o;return B(this,function(a){switch(a.label){case 0:return this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new _O(o,this.performanceClient)]}})})},e.prototype.initializeSilentRequest=function(r,n){return U(this,void 0,void 0,function(){var i;return B(this,function(o){switch(o.label){case 0:return this.performanceClient.addQueueMeasurement(O.InitializeSilentRequest,this.correlationId),this.performanceClient.setPreQueueTime(O.InitializeBaseRequest,this.correlationId),i=[ue({},r)],[4,this.initializeBaseRequest(r,n)];case 1:return[2,ue.apply(void 0,[ue.apply(void 0,i.concat([o.sent()])),{account:n,forceRefresh:r.forceRefresh||!1}])]}})})},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var Kl=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u,h,f){var p=t.call(this,r,n,i,o,a,s,l,d,f)||this;return p.apiId=c,p.accountId=u,p.nativeMessageHandler=d,p.nativeStorageManager=h,p.silentCacheClient=new zk(r,p.nativeStorageManager,i,o,a,s,l,d,f),p}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return B(this,function(d){switch(d.label){case 0:return this.logger.trace("NativeInteractionClient - acquireToken called."),n=this.performanceClient.startMeasurement(O.NativeInteractionClientAcquireToken,r.correlationId),i=gi.nowSeconds(),[4,this.initializeNativeRequest(r)];case 1:o=d.sent(),d.label=2;case 2:return d.trys.push([2,4,,5]),[4,this.acquireTokensFromCache(this.accountId,o)];case 3:return a=d.sent(),n.endMeasurement({success:!0,isNativeBroker:!1,fromCache:!0}),[2,a];case 4:return d.sent(),this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call"),[3,5];case 5:return s={method:Xo.GetToken,request:o},[4,this.nativeMessageHandler.sendMessage(s)];case 6:return c=d.sent(),l=this.validateNativeResponse(c),[2,this.handleNativeResponse(l,o,i).then(function(u){return n.endMeasurement({success:!0,isNativeBroker:!0,requestId:u.requestId}),u}).catch(function(u){throw n.endMeasurement({success:!1,errorCode:u.errorCode,subErrorCode:u.subError,isNativeBroker:!0}),u})]}})})},e.prototype.createSilentCacheRequest=function(r,n){return{authority:r.authority,correlationId:this.correlationId,scopes:Qr.fromString(r.scope).asArray(),account:n,forceRefresh:!1}},e.prototype.acquireTokensFromCache=function(r,n){return U(this,void 0,void 0,function(){var i,o,a,s;return B(this,function(c){switch(c.label){case 0:if(!r)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),se.createNoAccountFoundError();if(i=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:r}),!i)throw se.createNoAccountFoundError();c.label=1;case 1:return c.trys.push([1,3,,4]),o=this.createSilentCacheRequest(n,i),[4,this.silentCacheClient.acquireToken(o)];case 2:return a=c.sent(),[2,a];case 3:throw s=c.sent(),s;case 4:return[2]}})})},e.prototype.acquireTokenRedirect=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c;return B(this,function(l){switch(l.label){case 0:return this.logger.trace("NativeInteractionClient - acquireTokenRedirect called."),[4,this.initializeNativeRequest(r)];case 1:n=l.sent(),i={method:Xo.GetToken,request:n},l.label=2;case 2:return l.trys.push([2,4,,5]),[4,this.nativeMessageHandler.sendMessage(i)];case 3:return o=l.sent(),this.validateNativeResponse(o),[3,5];case 4:if(a=l.sent(),a instanceof vo&&a.isFatal())throw a;return[3,5];case 5:return this.browserStorage.setTemporaryCache(We.NATIVE_REQUEST,JSON.stringify(n),!0),s={apiId:_t.acquireTokenRedirect,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},c=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(r.redirectUri),[4,this.navigationClient.navigateExternal(c,s)];case 6:return l.sent(),[2]}})})},e.prototype.handleRedirectPromise=function(){return U(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l;return B(this,function(d){switch(d.label){case 0:if(this.logger.trace("NativeInteractionClient - handleRedirectPromise called."),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(r=this.browserStorage.getCachedNativeRequest(),!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),[2,null];n=r.prompt,i=C8(r,["prompt"]),n&&this.logger.verbose("NativeInteractionClient - handleRedirectPromise called and prompt was included in the original request, removing prompt from cached request to prevent second interaction with native broker window."),this.browserStorage.removeItem(this.browserStorage.generateCacheKey(We.NATIVE_REQUEST)),o={method:Xo.GetToken,request:i},a=gi.nowSeconds(),d.label=1;case 1:return d.trys.push([1,3,,4]),this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker."),[4,this.nativeMessageHandler.sendMessage(o)];case 2:return s=d.sent(),this.validateNativeResponse(s),c=this.handleNativeResponse(s,i,a),this.browserStorage.setInteractionInProgress(!1),[2,c];case 3:throw l=d.sent(),this.browserStorage.setInteractionInProgress(!1),l;case 4:return[2]}})})},e.prototype.logout=function(){return this.logger.trace("NativeInteractionClient - logout called."),Promise.reject("Logout not implemented yet")},e.prototype.handleNativeResponse=function(r,n,i){return U(this,void 0,void 0,function(){var o,a,s,c,l,d;return B(this,function(u){switch(u.label){case 0:if(this.logger.trace("NativeInteractionClient - handleNativeResponse called."),r.account.id!==n.accountId)throw vo.createUserSwitchError();return[4,this.getDiscoveredAuthority(n.authority)];case 1:return o=u.sent(),a=o.getPreferredCache(),s=this.createIdTokenObj(r),c=this.createHomeAccountIdentifier(r,s),l=this.createAccountEntity(r,c,s,a),[4,this.generateAuthenticationResult(r,n,s,l,o.canonicalAuthority,i)];case 2:return d=u.sent(),this.cacheAccount(l),this.cacheNativeTokens(r,n,c,l,s,d.accessToken,d.tenantId,i),[2,d]}})})},e.prototype.createIdTokenObj=function(r){return new Eo(r.id_token||A.EMPTY_STRING,this.browserCrypto)},e.prototype.createHomeAccountIdentifier=function(r,n){var i=Or.generateHomeAccountId(r.client_info||A.EMPTY_STRING,ln.Default,this.logger,this.browserCrypto,n);return i},e.prototype.createAccountEntity=function(r,n,i,o){return Or.createAccount(r.client_info,n,i,void 0,void 0,void 0,o,r.account.id)},e.prototype.generateScopes=function(r,n){return r.scope?Qr.fromString(r.scope):Qr.fromString(n.scope)},e.prototype.generatePopAccessToken=function(r,n){return U(this,void 0,void 0,function(){var i,o;return B(this,function(a){switch(a.label){case 0:if(n.tokenType!==ot.POP)return[3,2];if(r.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),[2,r.shr];if(i=new ad(this.browserCrypto),o={resourceRequestMethod:n.resourceRequestMethod,resourceRequestUri:n.resourceRequestUri,shrClaims:n.shrClaims,shrNonce:n.shrNonce},!n.keyId)throw se.createKeyIdMissingError();return[4,i.signPopToken(r.access_token,n.keyId,o)];case 1:return[2,a.sent()];case 2:return[2,r.access_token]}})})},e.prototype.generateAuthenticationResult=function(r,n,i,o,a,s){return U(this,void 0,void 0,function(){var c,l,d,u,h,f,p,m;return B(this,function(w){switch(w.label){case 0:return c=this.addTelemetryFromNativeResponse(r),l=r.scope?Qr.fromString(r.scope):Qr.fromString(n.scope),d=r.account.properties||{},u=d.UID||i.claims.oid||i.claims.sub||A.EMPTY_STRING,h=d.TenantId||i.claims.tid||A.EMPTY_STRING,[4,this.generatePopAccessToken(r,n)];case 1:return f=w.sent(),p=n.tokenType===ot.POP?ot.POP:ot.BEARER,m={authority:a,uniqueId:u,tenantId:h,scopes:l.asArray(),account:o.getAccountInfo(),idToken:r.id_token,idTokenClaims:i.claims,accessToken:f,fromCache:c?this.isResponseFromCache(c):!1,expiresOn:new Date(Number(s+r.expires_in)*1e3),tokenType:p,correlationId:this.correlationId,state:r.state,fromNativeBroker:!0},[2,m]}})})},e.prototype.cacheAccount=function(r){var n=this;this.browserStorage.setAccount(r),this.browserStorage.removeAccountContext(r).catch(function(i){n.logger.error("Error occurred while removing account context from browser storage. "+i)})},e.prototype.cacheNativeTokens=function(r,n,i,o,a,s,c,l){var d=qs.createIdTokenEntity(i,n.authority,r.id_token||A.EMPTY_STRING,n.clientId,a.claims.tid||A.EMPTY_STRING),u=n.tokenType===ot.POP?A.SHR_NONCE_VALIDITY:(typeof r.expires_in=="string"?parseInt(r.expires_in,10):r.expires_in)||0,h=l+u,f=this.generateScopes(r,n),p=Ws.createAccessTokenEntity(i,n.authority,s,n.clientId,a?a.claims.tid||A.EMPTY_STRING:c,f.printScopes(),h,0,this.browserCrypto),m=new sh(o,d,p);this.nativeStorageManager.saveCacheRecord(m)},e.prototype.addTelemetryFromNativeResponse=function(r){var n=this.getMATSFromResponse(r);return n?(this.performanceClient.addStaticFields({extensionId:this.nativeMessageHandler.getExtensionId(),extensionVersion:this.nativeMessageHandler.getExtensionVersion(),matsBrokerVersion:n.broker_version,matsAccountJoinOnStart:n.account_join_on_start,matsAccountJoinOnEnd:n.account_join_on_end,matsDeviceJoin:n.device_join,matsPromptBehavior:n.prompt_behavior,matsApiErrorCode:n.api_error_code,matsUiVisible:n.ui_visible,matsSilentCode:n.silent_code,matsSilentBiSubCode:n.silent_bi_sub_code,matsSilentMessage:n.silent_message,matsSilentStatus:n.silent_status,matsHttpStatus:n.http_status,matsHttpEventCount:n.http_event_count},this.correlationId),n):null},e.prototype.validateNativeResponse=function(r){if(r.hasOwnProperty("access_token")&&r.hasOwnProperty("id_token")&&r.hasOwnProperty("client_info")&&r.hasOwnProperty("account")&&r.hasOwnProperty("scope")&&r.hasOwnProperty("expires_in"))return r;throw vo.createUnexpectedError("Response missing expected properties.")},e.prototype.getMATSFromResponse=function(r){if(r.properties.MATS)try{return JSON.parse(r.properties.MATS)}catch{this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null},e.prototype.isResponseFromCache=function(r){return typeof r.is_cached>"u"?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!r.is_cached},e.prototype.initializeNativeRequest=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h,f=this;return B(this,function(p){switch(p.label){case 0:return this.logger.trace("NativeInteractionClient - initializeNativeRequest called"),n=r.authority||this.config.auth.authority,r.account?[4,this.validateRequestAuthority(n,r.account)]:[3,2];case 1:p.sent(),p.label=2;case 2:return i=new je(n),i.validateAsUri(),o=r.scopes,a=C8(r,["scopes"]),s=new Qr(o||[]),s.appendScopes(u1),c=function(){switch(f.apiId){case _t.ssoSilent:case _t.acquireTokenSilent_silentFlow:return f.logger.trace("initializeNativeRequest: silent request sets prompt to none"),en.NONE}if(!r.prompt){f.logger.trace("initializeNativeRequest: prompt was not provided");return}switch(r.prompt){case en.NONE:case en.CONSENT:case en.LOGIN:return f.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),r.prompt;default:throw f.logger.trace("initializeNativeRequest: prompt = "+r.prompt+" is not compatible with native flow"),ne.createNativePromptParameterNotSupportedError()}},l=ue(ue({},a),{accountId:this.accountId,clientId:this.config.auth.clientId,authority:i.urlString,scope:s.printScopes(),redirectUri:this.getRedirectUri(r.redirectUri),prompt:c(),correlationId:this.correlationId,tokenType:r.authenticationScheme,windowTitleSubstring:document.title,extraParameters:ue(ue(ue({},r.extraQueryParameters),r.tokenQueryParameters),{telemetry:Cu.MATS_TELEMETRY}),extendedExpiryToken:!1}),r.authenticationScheme!==ot.POP?[3,4]:(d={resourceRequestUri:r.resourceRequestUri,resourceRequestMethod:r.resourceRequestMethod,shrClaims:r.shrClaims,shrNonce:r.shrNonce},u=new ad(this.browserCrypto),[4,u.generateCnf(d)]);case 3:h=p.sent(),l.reqCnf=h.reqCnfString,l.keyId=h.kid,p.label=4;case 4:return[2,l]}})})},e}(Fk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var oc=function(){function t(e,r,n,i){this.logger=e,this.handshakeTimeoutMs=r,this.extensionId=i,this.resolvers=new Map,this.handshakeResolvers=new Map,this.responseId=0,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=n,this.handshakeEvent=n.startMeasurement(O.NativeMessageHandlerHandshake)}return t.prototype.sendMessage=function(e){return U(this,void 0,void 0,function(){var r,n=this;return B(this,function(i){return this.logger.trace("NativeMessageHandler - sendMessage called."),r={channel:Cu.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:e},this.logger.trace("NativeMessageHandler - Sending request to browser extension"),this.logger.tracePii("NativeMessageHandler - Sending request to browser extension: "+JSON.stringify(r)),this.messageChannel.port1.postMessage(r),[2,new Promise(function(o,a){n.resolvers.set(r.responseId,{resolve:o,reject:a})})]})})},t.createProvider=function(e,r,n){return U(this,void 0,void 0,function(){var i,o;return B(this,function(a){switch(a.label){case 0:e.trace("NativeMessageHandler - createProvider called."),a.label=1;case 1:return a.trys.push([1,3,,5]),i=new t(e,r,n,Cu.PREFERRED_EXTENSION_ID),[4,i.sendHandshakeRequest()];case 2:return a.sent(),[2,i];case 3:return a.sent(),o=new t(e,r,n),[4,o.sendHandshakeRequest()];case 4:return a.sent(),[2,o];case 5:return[2]}})})},t.prototype.sendHandshakeRequest=function(){return U(this,void 0,void 0,function(){var e,r=this;return B(this,function(n){return this.logger.trace("NativeMessageHandler - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1),e={channel:Cu.CHANNEL_ID,extensionId:this.extensionId,responseId:this.responseId++,body:{method:Xo.HandshakeRequest}},this.handshakeEvent.addStaticFields({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=function(i){r.onChannelMessage(i)},window.postMessage(e,window.origin,[this.messageChannel.port2]),[2,new Promise(function(i,o){r.handshakeResolvers.set(e.responseId,{resolve:i,reject:o}),r.timeoutId=window.setTimeout(function(){window.removeEventListener("message",r.windowListener,!1),r.messageChannel.port1.close(),r.messageChannel.port2.close(),r.handshakeEvent.endMeasurement({extensionHandshakeTimedOut:!0,success:!1}),o(ne.createNativeHandshakeTimeoutError()),r.handshakeResolvers.delete(e.responseId)},r.handshakeTimeoutMs)})]})})},t.prototype.onWindowMessage=function(e){if(this.logger.trace("NativeMessageHandler - onWindowMessage called"),e.source===window){var r=e.data;if(!(!r.channel||r.channel!==Cu.CHANNEL_ID)&&!(r.extensionId&&r.extensionId!==this.extensionId)&&r.body.method===Xo.HandshakeRequest){this.logger.verbose(r.extensionId?"Extension with id: "+r.extensionId+" not installed":"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1);var n=this.handshakeResolvers.get(r.responseId);n&&(this.handshakeEvent.endMeasurement({success:!1,extensionInstalled:!1}),n.reject(ne.createNativeExtensionNotInstalledError()))}}},t.prototype.onChannelMessage=function(e){this.logger.trace("NativeMessageHandler - onChannelMessage called.");var r=e.data,n=this.resolvers.get(r.responseId),i=this.handshakeResolvers.get(r.responseId);try{var o=r.body.method;if(o===Xo.Response){if(!n)return;var a=r.body.response;if(this.logger.trace("NativeMessageHandler - Received response from browser extension"),this.logger.tracePii("NativeMessageHandler - Received response from browser extension: "+JSON.stringify(a)),a.status!=="Success")n.reject(vo.createError(a.code,a.description,a.ext));else if(a.result)a.result.code&&a.result.description?n.reject(vo.createError(a.result.code,a.result.description,a.result.ext)):n.resolve(a.result);else throw fe.createUnexpectedError("Event does not contain result.");this.resolvers.delete(r.responseId)}else if(o===Xo.HandshakeResponse){if(!i)return;clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=r.extensionId,this.extensionVersion=r.body.version,this.logger.verbose("NativeMessageHandler - Received HandshakeResponse from extension: "+this.extensionId),this.handshakeEvent.endMeasurement({extensionInstalled:!0,success:!0}),i.resolve(),this.handshakeResolvers.delete(r.responseId)}}catch(s){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii("Error parsing response from WAM Extension: "+s.toString()),this.logger.errorPii("Unable to parse "+e),n?n.reject(s):i&&i.reject(s)}},t.prototype.getExtensionId=function(){return this.extensionId},t.prototype.getExtensionVersion=function(){return this.extensionVersion},t.isNativeAvailable=function(e,r,n,i){if(r.trace("isNativeAvailable called"),!e.system.allowNativeBroker)return r.trace("isNativeAvailable: allowNativeBroker is not enabled, returning false"),!1;if(!n)return r.trace("isNativeAvailable: WAM extension provider is not initialized, returning false"),!1;if(i)switch(i){case ot.BEARER:case ot.POP:return r.trace("isNativeAvailable: authenticationScheme is supported, returning true"),!0;default:return r.trace("isNativeAvailable: authenticationScheme is not supported, returning false"),!1}return!0},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ZO=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,c,d,u)||this;return h.nativeStorage=l,h}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h=this;return B(this,function(f){switch(f.label){case 0:return this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Redirect)];case 1:n=f.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||A.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(_t.acquireTokenRedirect),o=function(p){p.persisted&&(h.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),h.browserStorage.cleanRequestByState(n.state),h.eventHandler.emitEvent(Ce.RESTORE_FROM_BFCACHE,de.Redirect))},f.label=2;case 2:return f.trys.push([2,7,,8]),this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),[4,this.initializeAuthorizationCodeRequest(n)];case 3:return a=f.sent(),this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(i,n.authority,n.azureCloudOptions)];case 4:return s=f.sent(),this.logger.verbose("Auth code client created"),c=new O8(s,this.browserStorage,a,this.logger,this.browserCrypto,this.performanceClient),[4,s.getAuthCodeUrl(ue(ue({},n),{nativeBroker:oc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme)}))];case 5:return l=f.sent(),d=this.getRedirectStartPage(r.redirectStartPage),this.logger.verbosePii("Redirect start page: "+d),window.addEventListener("pageshow",o),[4,c.initiateAuthRequest(l,{navigationClient:this.navigationClient,redirectTimeout:this.config.system.redirectNavigationTimeout,redirectStartPage:d,onRedirectNavigate:r.onRedirectNavigate})];case 6:return[2,f.sent()];case 7:throw u=f.sent(),u instanceof fe&&u.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",o),i.cacheFailedRequest(u),this.browserStorage.cleanRequestByState(n.state),u;case 8:return[2]}})})},e.prototype.handleRedirectPromise=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d,u,h,f,p;return B(this,function(m){switch(m.label){case 0:n=this.initializeServerTelemetryManager(_t.handleRedirectPromise),m.label=1;case 1:if(m.trys.push([1,10,,11]),!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),[2,null];if(i=this.getRedirectResponseHash(r||window.location.hash),!i)return this.logger.info("handleRedirectPromise did not detect a response hash as a result of a redirect. Cleaning temporary cache."),this.browserStorage.cleanRequestByInteractionType(de.Redirect),[2,null];o=void 0;try{a=je.getDeserializedHash(i),o=this.validateAndExtractStateFromHash(a,de.Redirect),this.logger.verbose("State extracted from hash")}catch(w){return this.logger.info("handleRedirectPromise was unable to extract state due to: "+w),this.browserStorage.cleanRequestByInteractionType(de.Redirect),[2,null]}return s=this.browserStorage.getTemporaryCache(We.ORIGIN_URI,!0)||A.EMPTY_STRING,c=je.removeHashFromUrl(s),l=je.removeHashFromUrl(window.location.href),c===l&&this.config.auth.navigateToLoginRequestUrl?(this.logger.verbose("Current page is loginRequestUrl, handling hash"),[4,this.handleHash(i,o,n)]):[3,3];case 2:return d=m.sent(),s.indexOf("#")>-1&&Yt.replaceHash(s),[2,d];case 3:return this.config.auth.navigateToLoginRequestUrl?[3,4]:(this.logger.verbose("NavigateToLoginRequestUrl set to false, handling hash"),[2,this.handleHash(i,o,n)]);case 4:return!Yt.isInIframe()||this.config.system.allowRedirectInIframe?(this.browserStorage.setTemporaryCache(We.URL_HASH,i,!0),u={apiId:_t.handleRedirectPromise,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0},h=!0,!s||s==="null"?(f=Yt.getHomepage(),this.browserStorage.setTemporaryCache(We.ORIGIN_URI,f,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),[4,this.navigationClient.navigateInternal(f,u)]):[3,6]):[3,9];case 5:return h=m.sent(),[3,8];case 6:return this.logger.verbose("Navigating to loginRequestUrl: "+s),[4,this.navigationClient.navigateInternal(s,u)];case 7:h=m.sent(),m.label=8;case 8:if(!h)return[2,this.handleHash(i,o,n)];m.label=9;case 9:return[2,null];case 10:throw p=m.sent(),p instanceof fe&&p.setCorrelationId(this.correlationId),n.cacheFailedRequest(p),this.browserStorage.cleanRequestByInteractionType(de.Redirect),p;case 11:return[2]}})})},e.prototype.getRedirectResponseHash=function(r){this.logger.verbose("getRedirectResponseHash called");var n=je.hashContainsKnownProperties(r);if(n)return Yt.clearHash(window),this.logger.verbose("Hash contains known properties, returning response hash"),r;var i=this.browserStorage.getTemporaryCache(We.URL_HASH,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(We.URL_HASH)),this.logger.verbose("Hash does not contain known properties, returning cached hash"),i},e.prototype.handleHash=function(r,n,i){return U(this,void 0,void 0,function(){var o,a,s,c,l,d,u,h=this;return B(this,function(f){switch(f.label){case 0:if(o=this.browserStorage.getCachedRequest(n,this.browserCrypto),this.logger.verbose("handleHash called, retrieved cached request"),a=je.getDeserializedHash(r),a.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return s=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,a.accountId,this.nativeStorage,o.correlationId),c=na.parseRequestState(this.browserCrypto,n).userRequestState,[2,s.acquireToken(ue(ue({},o),{state:c,prompt:void 0})).finally(function(){h.browserStorage.cleanRequestByState(n)})]}if(l=this.browserStorage.getCachedAuthority(n),!l)throw ne.createNoCachedAuthorityError();return this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,o.correlationId),[4,this.createAuthCodeClient(i,l)];case 1:return d=f.sent(),this.logger.verbose("Auth code client created"),P2.removeThrottle(this.browserStorage,this.config.auth.clientId,o),u=new O8(d,this.browserStorage,o,this.logger,this.browserCrypto,this.performanceClient),[4,u.handleCodeResponseFromHash(r,n,d.authority,this.networkClient)];case 2:return[2,f.sent()]}})})},e.prototype.logout=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return B(this,function(d){switch(d.label){case 0:this.logger.verbose("logoutRedirect called"),n=this.initializeLogoutRequest(r),i=this.initializeServerTelemetryManager(_t.logout),d.label=1;case 1:return d.trys.push([1,10,,11]),this.eventHandler.emitEvent(Ce.LOGOUT_START,de.Redirect,r),[4,this.clearCacheOnLogout(n.account)];case 2:return d.sent(),o={apiId:_t.logout,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,n.correlationId),[4,this.createAuthCodeClient(i,r&&r.authority)];case 3:return a=d.sent(),this.logger.verbose("Auth code client created"),s=a.getLogoutUri(n),this.eventHandler.emitEvent(Ce.LOGOUT_SUCCESS,de.Redirect,n),r&&typeof r.onRedirectNavigate=="function"?(c=r.onRedirectNavigate(s),c===!1?[3,5]:(this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)])):[3,7];case 4:return d.sent(),[2];case 5:this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation"),d.label=6;case 6:return[3,9];case 7:return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0),[4,this.navigationClient.navigateExternal(s,o)];case 8:return d.sent(),[2];case 9:return[3,11];case 10:throw l=d.sent(),l instanceof fe&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.eventHandler.emitEvent(Ce.LOGOUT_FAILURE,de.Redirect,null,l),this.eventHandler.emitEvent(Ce.LOGOUT_END,de.Redirect),l;case 11:return this.eventHandler.emitEvent(Ce.LOGOUT_END,de.Redirect),[2]}})})},e.prototype.getRedirectStartPage=function(r){var n=r||window.location.href;return je.getAbsoluteUrl(n,Yt.getCurrentUri())},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var HO=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,c,d,u)||this;return h.unloadWindow=h.unloadWindow.bind(h),h.nativeStorage=l,h}return e.prototype.acquireToken=function(r){try{var n=this.generatePopupName(r.scopes||u1,r.authority||this.config.auth.authority),i=r.popupWindowAttributes||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(r,n,i);this.logger.verbose("asyncPopup set to false, opening popup before acquiring token");var o=this.openSizedPopup("about:blank",n,i);return this.acquireTokenPopupAsync(r,n,i,o)}catch(a){return Promise.reject(a)}},e.prototype.logout=function(r){try{this.logger.verbose("logoutPopup called");var n=this.initializeLogoutRequest(r),i=this.generateLogoutPopupName(n),o=r&&r.authority,a=r&&r.mainWindowRedirectUri,s=(r==null?void 0:r.popupWindowAttributes)||{};if(this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(n,i,s,o,void 0,a);this.logger.verbose("asyncPopup set to false, opening popup");var c=this.openSizedPopup("about:blank",i,s);return this.logoutPopupAsync(n,i,s,o,c,a)}catch(l){return Promise.reject(l)}},e.prototype.acquireTokenPopupAsync=function(r,n,i,o){return U(this,void 0,void 0,function(){var a,s,c,l,d,u,h,f,p,m,w,g,v,b,E,k,x,S=this;return B(this,function(Z){switch(Z.label){case 0:return this.logger.verbose("acquireTokenPopupAsync called"),a=this.initializeServerTelemetryManager(_t.acquireTokenPopup),this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Popup)];case 1:s=Z.sent(),this.browserStorage.updateCacheEntries(s.state,s.nonce,s.authority,s.loginHint||A.EMPTY_STRING,s.account||null),Z.label=2;case 2:return Z.trys.push([2,8,,9]),this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationCodeRequest,r.correlationId),[4,this.initializeAuthorizationCodeRequest(s)];case 3:return c=Z.sent(),this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(a,s.authority,s.azureCloudOptions)];case 4:return l=Z.sent(),this.logger.verbose("Auth code client created"),d=oc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,r.authenticationScheme),u=void 0,d&&(u=this.performanceClient.startMeasurement(O.FetchAccountIdWithNativeBroker,r.correlationId)),[4,l.getAuthCodeUrl(ue(ue({},s),{nativeBroker:d}))];case 5:return h=Z.sent(),f=new hy(l,this.browserStorage,c,this.logger,this.performanceClient),p={popup:o,popupName:n,popupWindowAttributes:i},m=this.initiateAuthRequest(h,p),this.eventHandler.emitEvent(Ce.POPUP_OPENED,de.Popup,{popupWindow:m},null),[4,this.monitorPopupForHash(m)];case 6:if(w=Z.sent(),g=je.getDeserializedHash(w),v=this.validateAndExtractStateFromHash(g,de.Popup,s.correlationId),P2.removeThrottle(this.browserStorage,this.config.auth.clientId,c),g.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),u&&u.endMeasurement({success:!0,isNativeBroker:!0}),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return b=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.acquireTokenPopup,this.performanceClient,this.nativeMessageHandler,g.accountId,this.nativeStorage,s.correlationId),E=na.parseRequestState(this.browserCrypto,v).userRequestState,[2,b.acquireToken(ue(ue({},s),{state:E,prompt:void 0})).finally(function(){S.browserStorage.cleanRequestByState(v)})]}return[4,f.handleCodeResponseFromHash(w,v,l.authority,this.networkClient)];case 7:return k=Z.sent(),[2,k];case 8:throw x=Z.sent(),o&&o.close(),x instanceof fe&&x.setCorrelationId(this.correlationId),a.cacheFailedRequest(x),this.browserStorage.cleanRequestByState(s.state),x;case 9:return[2]}})})},e.prototype.logoutPopupAsync=function(r,n,i,o,a,s){return U(this,void 0,void 0,function(){var c,l,d,u,h,f,p;return B(this,function(m){switch(m.label){case 0:this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(Ce.LOGOUT_START,de.Popup,r),c=this.initializeServerTelemetryManager(_t.logoutPopup),m.label=1;case 1:return m.trys.push([1,5,,6]),[4,this.clearCacheOnLogout(r.account)];case 2:return m.sent(),this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(c,o)];case 3:return l=m.sent(),this.logger.verbose("Auth code client created"),d=l.getLogoutUri(r),this.eventHandler.emitEvent(Ce.LOGOUT_SUCCESS,de.Popup,r),u=this.openPopup(d,{popupName:n,popupWindowAttributes:i,popup:a}),this.eventHandler.emitEvent(Ce.POPUP_OPENED,de.Popup,{popupWindow:u},null),[4,this.waitForLogoutPopup(u)];case 4:return m.sent(),s?(h={apiId:_t.logoutPopup,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},f=je.getAbsoluteUrl(s,Yt.getCurrentUri()),this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii("Redirecting main window to: "+f),this.navigationClient.navigateInternal(f,h)):this.logger.verbose("No main window navigation requested"),[3,6];case 5:throw p=m.sent(),a&&a.close(),p instanceof fe&&p.setCorrelationId(this.correlationId),this.browserStorage.setInteractionInProgress(!1),this.eventHandler.emitEvent(Ce.LOGOUT_FAILURE,de.Popup,null,p),this.eventHandler.emitEvent(Ce.LOGOUT_END,de.Popup),c.cacheFailedRequest(p),p;case 6:return this.eventHandler.emitEvent(Ce.LOGOUT_END,de.Popup),[2]}})})},e.prototype.initiateAuthRequest=function(r,n){if(ae.isEmpty(r))throw this.logger.error("Navigate url is empty"),ne.createEmptyNavigationUriError();return this.logger.infoPii("Navigate to: "+r),this.openPopup(r,n)},e.prototype.monitorPopupForHash=function(r){var n=this;return new Promise(function(i,o){var a=n.config.system.windowHashTimeout/n.config.system.pollIntervalMilliseconds,s=0;n.logger.verbose("PopupHandler.monitorPopupForHash - polling started");var c=setInterval(function(){if(r.closed){n.logger.error("PopupHandler.monitorPopupForHash - window closed"),n.cleanPopup(),clearInterval(c),o(ne.createUserCancelledError());return}var l=A.EMPTY_STRING,d=A.EMPTY_STRING;try{l=r.location.href,d=r.location.hash}catch{}ae.isEmpty(l)||l==="about:blank"||(n.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),s++,d?(n.logger.verbose("PopupHandler.monitorPopupForHash - found hash in url"),clearInterval(c),n.cleanPopup(r),je.hashContainsKnownProperties(d)?(n.logger.verbose("PopupHandler.monitorPopupForHash - hash contains known properties, returning."),i(d)):(n.logger.error("PopupHandler.monitorPopupForHash - found hash in url but it does not contain known properties. Check that your router is not changing the hash prematurely."),n.logger.errorPii("PopupHandler.monitorPopupForHash - hash found: "+d),o(ne.createHashDoesNotContainKnownPropertiesError()))):s>a&&(n.logger.error("PopupHandler.monitorPopupForHash - unable to find hash in url, timing out"),clearInterval(c),o(ne.createMonitorPopupTimeoutError())))},n.config.system.pollIntervalMilliseconds)})},e.prototype.waitForLogoutPopup=function(r){var n=this;return new Promise(function(i){n.logger.verbose("PopupHandler.waitForLogoutPopup - polling started");var o=setInterval(function(){r.closed&&(n.logger.error("PopupHandler.waitForLogoutPopup - window closed"),n.cleanPopup(),clearInterval(o),i());var a=A.EMPTY_STRING;try{a=r.location.href}catch{}ae.isEmpty(a)||a==="about:blank"||(n.logger.verbose("PopupHandler.waitForLogoutPopup - popup window is on same origin as caller, closing."),clearInterval(o),n.cleanPopup(r),i())},n.config.system.pollIntervalMilliseconds)})},e.prototype.openPopup=function(r,n){try{var i=void 0;if(n.popup?(i=n.popup,this.logger.verbosePii("Navigating popup window to: "+r),i.location.assign(r)):typeof n.popup>"u"&&(this.logger.verbosePii("Opening popup window to: "+r),i=this.openSizedPopup(r,n.popupName,n.popupWindowAttributes)),!i)throw ne.createEmptyWindowCreatedError();return i.focus&&i.focus(),this.currentWindow=i,window.addEventListener("beforeunload",this.unloadWindow),i}catch(o){throw this.logger.error("error opening popup "+o.message),this.browserStorage.setInteractionInProgress(!1),ne.createPopupWindowError(o.toString())}},e.prototype.openSizedPopup=function(r,n,i){var o,a,s,c,l=window.screenLeft?window.screenLeft:window.screenX,d=window.screenTop?window.screenTop:window.screenY,u=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,f=(o=i.popupSize)===null||o===void 0?void 0:o.width,p=(a=i.popupSize)===null||a===void 0?void 0:a.height,m=(s=i.popupPosition)===null||s===void 0?void 0:s.top,w=(c=i.popupPosition)===null||c===void 0?void 0:c.left;return(!f||f<0||f>u)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),f=Vi.POPUP_WIDTH),(!p||p<0||p>h)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),p=Vi.POPUP_HEIGHT),(!m||m<0||m>h)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),m=Math.max(0,h/2-Vi.POPUP_HEIGHT/2+d)),(!w||w<0||w>u)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),w=Math.max(0,u/2-Vi.POPUP_WIDTH/2+l)),window.open(r,n,"width="+f+", height="+p+", top="+m+", left="+w+", scrollbars=yes")},e.prototype.unloadWindow=function(r){this.browserStorage.cleanRequestByInteractionType(de.Popup),this.currentWindow&&this.currentWindow.close(),r.preventDefault()},e.prototype.cleanPopup=function(r){r&&r.close(),window.removeEventListener("beforeunload",this.unloadWindow),this.browserStorage.setInteractionInProgress(!1)},e.prototype.generatePopupName=function(r,n){return Vi.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+r.join("-")+"."+n+"."+this.correlationId},e.prototype.generateLogoutPopupName=function(r){var n=r.account&&r.account.homeAccountId;return Vi.POPUP_NAME_PREFIX+"."+this.config.auth.clientId+"."+n+"."+this.correlationId},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var $O=function(){function t(){}return t.prototype.navigateInternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.prototype.navigateExternal=function(e,r){return t.defaultNavigateWindow(e,r)},t.defaultNavigateWindow=function(e,r){return r.noHistory?window.location.replace(e):window.location.assign(e),new Promise(function(n){setTimeout(function(){n(!0)},r.timeout)})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var LO=6e4,O4=6e3,OO=3e4,NO=2e3;function DO(t,e){var r=t.auth,n=t.cache,i=t.system,o=t.telemetry,a={clientId:A.EMPTY_STRING,authority:""+A.DEFAULT_AUTHORITY,knownAuthorities:[],cloudDiscoveryMetadata:A.EMPTY_STRING,authorityMetadata:A.EMPTY_STRING,redirectUri:A.EMPTY_STRING,postLogoutRedirectUri:A.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:Nh.AAD,azureCloudOptions:{azureCloudInstance:Oh.None,tenant:A.EMPTY_STRING},skipAuthorityMetadataCache:!1},s={cacheLocation:sr.SessionStorage,temporaryCacheLocation:sr.SessionStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!!(n&&n.cacheLocation===sr.LocalStorage),claimsBasedCachingEnabled:!0},c={loggerCallback:function(){},logLevel:Bt.Info,piiLoggingEnabled:!1},l=ue(ue({},$k),{loggerOptions:c,networkClient:e?Yt.getBrowserNetworkClient():EO,navigationClient:new $O,loadFrameTimeout:0,windowHashTimeout:(i==null?void 0:i.loadFrameTimeout)||LO,iframeHashTimeout:(i==null?void 0:i.loadFrameTimeout)||O4,navigateFrameWait:e&&Yt.detectIEOrEdge()?500:0,redirectNavigationTimeout:OO,asyncPopups:!1,allowRedirectInIframe:!1,allowNativeBroker:!1,nativeBrokerHandshakeTimeout:(i==null?void 0:i.nativeBrokerHandshakeTimeout)||NO,pollIntervalMilliseconds:Vi.DEFAULT_POLL_INTERVAL_MS,cryptoOptions:{useMsrCrypto:!1,entropy:void 0}}),d=ue(ue({},i),{loggerOptions:(i==null?void 0:i.loggerOptions)||c}),u={application:{appName:A.EMPTY_STRING,appVersion:A.EMPTY_STRING}},h={auth:ue(ue({},a),r),cache:ue(ue({},s),n),system:ue(ue({},l),d),telemetry:ue(ue({},u),o)};return h}/*! @azure/msal-browser v2.38.3 2023-10-27 */var jk=function(t){Fr(e,t);function e(r,n,i,o,a,s){var c=t.call(this,r,n,i,o,s)||this;return c.navigateFrameWait=a.navigateFrameWait,c.pollIntervalMilliseconds=a.pollIntervalMilliseconds,c}return e.prototype.initiateAuthRequest=function(r){return U(this,void 0,void 0,function(){return B(this,function(n){switch(n.label){case 0:if(this.performanceClient.addQueueMeasurement(O.SilentHandlerInitiateAuthRequest,this.authCodeRequest.correlationId),ae.isEmpty(r))throw this.logger.info("Navigate url is empty"),ne.createEmptyNavigationUriError();return this.navigateFrameWait?(this.performanceClient.setPreQueueTime(O.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),[4,this.loadFrame(r)]):[3,2];case 1:return[2,n.sent()];case 2:return[2,this.loadFrameSync(r)]}})})},e.prototype.monitorIframeForHash=function(r,n){var i=this;return this.performanceClient.addQueueMeasurement(O.SilentHandlerMonitorIframeForHash,this.authCodeRequest.correlationId),new Promise(function(o,a){n<O4&&i.logger.warning("system.loadFrameTimeout or system.iframeHashTimeout set to lower ("+n+"ms) than the default ("+O4+"ms). This may result in timeouts.");var s=window.performance.now(),c=s+n,l=setInterval(function(){if(window.performance.now()>c){i.removeHiddenIframe(r),clearInterval(l),a(ne.createMonitorIframeTimeoutError());return}var d=A.EMPTY_STRING,u=r.contentWindow;try{d=u?u.location.href:A.EMPTY_STRING}catch{}if(!ae.isEmpty(d)){var h=u?u.location.hash:A.EMPTY_STRING;if(je.hashContainsKnownProperties(h)){i.removeHiddenIframe(r),clearInterval(l),o(h);return}}},i.pollIntervalMilliseconds)})},e.prototype.loadFrame=function(r){var n=this;return this.performanceClient.addQueueMeasurement(O.SilentHandlerLoadFrame,this.authCodeRequest.correlationId),new Promise(function(i,o){var a=n.createHiddenIframe();setTimeout(function(){if(!a){o("Unable to load iframe");return}a.src=r,i(a)},n.navigateFrameWait)})},e.prototype.loadFrameSync=function(r){var n=this.createHiddenIframe();return n.src=r,n},e.prototype.createHiddenIframe=function(){var r=document.createElement("iframe");return r.style.visibility="hidden",r.style.position="absolute",r.style.width=r.style.height="0",r.style.border="0",r.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.getElementsByTagName("body")[0].appendChild(r),r},e.prototype.removeHiddenIframe=function(r){document.body===r.parentNode&&document.body.removeChild(r)},e}(hy);/*! @azure/msal-browser v2.38.3 2023-10-27 */var VO=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u,h){var f=t.call(this,r,n,i,o,a,s,l,u,h)||this;return f.apiId=c,f.nativeStorage=d,f}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s;return B(this,function(c){switch(c.label){case 0:if(this.performanceClient.addQueueMeasurement(O.SilentIframeClientAcquireToken,r.correlationId),this.logger.verbose("acquireTokenByIframe called"),n=this.performanceClient.startMeasurement(O.SilentIframeClientAcquireToken,r.correlationId),ae.isEmpty(r.loginHint)&&ae.isEmpty(r.sid)&&(!r.account||ae.isEmpty(r.account.username))&&this.logger.warning("No user hint provided. The authorization server may need more information to complete this request."),r.prompt&&r.prompt!==en.NONE&&r.prompt!==en.NO_SESSION)throw n.endMeasurement({success:!1}),ne.createSilentPromptValueError(r.prompt);return this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(ue(ue({},r),{prompt:r.prompt||en.NONE}),de.Silent)];case 1:i=c.sent(),this.browserStorage.updateCacheEntries(i.state,i.nonce,i.authority,i.loginHint||A.EMPTY_STRING,i.account||null),o=this.initializeServerTelemetryManager(this.apiId),c.label=2;case 2:return c.trys.push([2,5,,6]),this.performanceClient.setPreQueueTime(O.StandardInteractionClientCreateAuthCodeClient,r.correlationId),[4,this.createAuthCodeClient(o,i.authority,i.azureCloudOptions)];case 3:return a=c.sent(),this.logger.verbose("Auth code client created"),this.performanceClient.setPreQueueTime(O.SilentIframeClientTokenHelper,r.correlationId),[4,this.silentTokenHelper(a,i).then(function(l){return n.endMeasurement({success:!0,fromCache:!1,requestId:l.requestId}),l})];case 4:return[2,c.sent()];case 5:throw s=c.sent(),s instanceof fe&&s.setCorrelationId(this.correlationId),o.cacheFailedRequest(s),this.browserStorage.cleanRequestByState(i.state),n.endMeasurement({errorCode:s instanceof fe&&s.errorCode||void 0,subErrorCode:s instanceof fe&&s.subError||void 0,success:!1}),s;case 6:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.silentTokenHelper=function(r,n){return U(this,void 0,void 0,function(){var i,o,a,s,c,l,d,u,h,f=this;return B(this,function(p){switch(p.label){case 0:return this.performanceClient.addQueueMeasurement(O.SilentIframeClientTokenHelper,n.correlationId),this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationCodeRequest,n.correlationId),[4,this.initializeAuthorizationCodeRequest(n)];case 1:return i=p.sent(),this.performanceClient.setPreQueueTime(O.GetAuthCodeUrl,n.correlationId),[4,r.getAuthCodeUrl(ue(ue({},n),{nativeBroker:oc.isNativeAvailable(this.config,this.logger,this.nativeMessageHandler,n.authenticationScheme)}))];case 2:return o=p.sent(),a=new jk(r,this.browserStorage,i,this.logger,this.config.system,this.performanceClient),this.performanceClient.setPreQueueTime(O.SilentHandlerInitiateAuthRequest,n.correlationId),[4,a.initiateAuthRequest(o)];case 3:return s=p.sent(),this.performanceClient.setPreQueueTime(O.SilentHandlerMonitorIframeForHash,n.correlationId),[4,a.monitorIframeForHash(s,this.config.system.iframeHashTimeout)];case 4:if(c=p.sent(),l=je.getDeserializedHash(c),d=this.validateAndExtractStateFromHash(l,de.Silent,i.correlationId),l.accountId){if(this.logger.verbose("Account id found in hash, calling WAM for token"),!this.nativeMessageHandler)throw ne.createNativeConnectionNotEstablishedError();return u=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.apiId,this.performanceClient,this.nativeMessageHandler,l.accountId,this.browserStorage,this.correlationId),h=na.parseRequestState(this.browserCrypto,d).userRequestState,[2,u.acquireToken(ue(ue({},n),{state:h,prompt:n.prompt||en.NONE})).finally(function(){f.browserStorage.cleanRequestByState(d)})]}return this.performanceClient.setPreQueueTime(O.HandleCodeResponseFromHash,n.correlationId),[2,a.handleCodeResponseFromHash(c,d,r.authority,this.networkClient)]}})})},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var FO=function(t){Fr(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c=this;return B(this,function(l){switch(l.label){case 0:return this.performanceClient.addQueueMeasurement(O.SilentRefreshClientAcquireToken,r.correlationId),this.performanceClient.setPreQueueTime(O.InitializeBaseRequest,r.correlationId),i=[ue({},r)],[4,this.initializeBaseRequest(r,r.account)];case 1:return n=ue.apply(void 0,i.concat([l.sent()])),o=this.performanceClient.startMeasurement(O.SilentRefreshClientAcquireToken,n.correlationId),a=this.initializeServerTelemetryManager(_t.acquireTokenSilent_silentFlow),[4,this.createRefreshTokenClient(a,n.authority,n.azureCloudOptions)];case 2:return s=l.sent(),this.logger.verbose("Refresh token client created"),this.performanceClient.setPreQueueTime(O.RefreshTokenClientAcquireTokenByRefreshToken,r.correlationId),[2,s.acquireTokenByRefreshToken(n).then(function(d){return o.endMeasurement({success:!0,fromCache:d.fromCache,requestId:d.requestId}),d}).catch(function(d){throw d instanceof fe&&d.setCorrelationId(c.correlationId),a.cacheFailedRequest(d),o.endMeasurement({errorCode:d.errorCode,subErrorCode:d.subError,success:!1}),d})]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e.prototype.createRefreshTokenClient=function(r,n,i){return U(this,void 0,void 0,function(){var o;return B(this,function(a){switch(a.label){case 0:return this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetClientConfiguration,this.correlationId),[4,this.getClientConfiguration(r,n,i)];case 1:return o=a.sent(),[2,new Ok(o,this.performanceClient)]}})})},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var zO=function(){function t(e,r){this.eventCallbacks=new Map,this.logger=e,this.browserCrypto=r,this.listeningToStorageEvents=!1,this.handleAccountCacheChange=this.handleAccountCacheChange.bind(this)}return t.prototype.addEventCallback=function(e){if(typeof window<"u"){var r=this.browserCrypto.createNewGuid();return this.eventCallbacks.set(r,e),this.logger.verbose("Event callback registered with id: "+r),r}return null},t.prototype.removeEventCallback=function(e){this.eventCallbacks.delete(e),this.logger.verbose("Event callback "+e+" removed.")},t.prototype.enableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?this.logger.verbose("Account storage listener already registered."):(this.logger.verbose("Adding account storage listener."),this.listeningToStorageEvents=!0,window.addEventListener("storage",this.handleAccountCacheChange)))},t.prototype.disableAccountStorageEvents=function(){typeof window>"u"||(this.listeningToStorageEvents?(this.logger.verbose("Removing account storage listener."),window.removeEventListener("storage",this.handleAccountCacheChange),this.listeningToStorageEvents=!1):this.logger.verbose("No account storage listener registered."))},t.prototype.emitEvent=function(e,r,n,i){var o=this;if(typeof window<"u"){var a={eventType:e,interactionType:r||null,payload:n||null,error:i||null,timestamp:Date.now()};this.logger.info("Emitting event: "+e),this.eventCallbacks.forEach(function(s,c){o.logger.verbose("Emitting event to callback "+c+": "+e),s.apply(null,[a])})}},t.prototype.handleAccountCacheChange=function(e){try{var r=e.newValue||e.oldValue;if(!r)return;var n=JSON.parse(r);if(typeof n!="object"||!Or.isAccountEntity(n))return;var i=Tn.toObject(new Or,n),o=i.getAccountInfo();!e.oldValue&&e.newValue?(this.logger.info("Account was added to cache in a different window"),this.emitEvent(Ce.ACCOUNT_ADDED,void 0,o)):!e.newValue&&e.oldValue&&(this.logger.info("Account was removed from cache in a different window"),this.emitEvent(Ce.ACCOUNT_REMOVED,void 0,o))}catch{return}},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Wr=function(){function t(){}return t.decimalToHex=function(e){for(var r=e.toString(16);r.length<2;)r="0"+r;return r},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Uk=function(){function t(e){this.cryptoObj=e}return t.prototype.generateGuid=function(){try{var e=new Uint8Array(16);return this.cryptoObj.getRandomValues(e),e[6]|=64,e[6]&=79,e[8]|=128,e[8]&=191,Wr.decimalToHex(e[0])+Wr.decimalToHex(e[1])+Wr.decimalToHex(e[2])+Wr.decimalToHex(e[3])+"-"+Wr.decimalToHex(e[4])+Wr.decimalToHex(e[5])+"-"+Wr.decimalToHex(e[6])+Wr.decimalToHex(e[7])+"-"+Wr.decimalToHex(e[8])+Wr.decimalToHex(e[9])+"-"+Wr.decimalToHex(e[10])+Wr.decimalToHex(e[11])+Wr.decimalToHex(e[12])+Wr.decimalToHex(e[13])+Wr.decimalToHex(e[14])+Wr.decimalToHex(e[15])}catch{for(var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx",n="0123456789abcdef",i=0,o=A.EMPTY_STRING,a=0;a<36;a++)r[a]!=="-"&&r[a]!=="4"&&(i=Math.random()*16|0),r[a]==="x"?o+=n[i]:r[a]==="y"?(i&=3,i|=8,o+=n[i]):o+=r[a];return o}},t.prototype.isGuid=function(e){var r=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;return r.test(e)},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var ia=function(){function t(){}return t.stringToUtf8Arr=function(e){for(var r,n=0,i=e.length,o=0;o<i;o++)r=e.charCodeAt(o),n+=r<128?1:r<2048?2:r<65536?3:r<2097152?4:r<67108864?5:6;for(var a=new Uint8Array(n),s=0,c=0;s<n;c++)r=e.charCodeAt(c),r<128?a[s++]=r:r<2048?(a[s++]=192+(r>>>6),a[s++]=128+(r&63)):r<65536?(a[s++]=224+(r>>>12),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<2097152?(a[s++]=240+(r>>>18),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):r<67108864?(a[s++]=248+(r>>>24),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63)):(a[s++]=252+(r>>>30),a[s++]=128+(r>>>24&63),a[s++]=128+(r>>>18&63),a[s++]=128+(r>>>12&63),a[s++]=128+(r>>>6&63),a[s++]=128+(r&63));return a},t.stringToArrayBuffer=function(e){for(var r=new ArrayBuffer(e.length),n=new Uint8Array(r),i=0;i<e.length;i++)n[i]=e.charCodeAt(i);return r},t.utf8ArrToString=function(e){for(var r=A.EMPTY_STRING,n=void 0,i=e.length,o=0;o<i;o++)n=e[o],r+=String.fromCharCode(n>251&&n<254&&o+5<i?(n-252)*1073741824+(e[++o]-128<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>247&&n<252&&o+4<i?(n-248<<24)+(e[++o]-128<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>239&&n<248&&o+3<i?(n-240<<18)+(e[++o]-128<<12)+(e[++o]-128<<6)+e[++o]-128:n>223&&n<240&&o+2<i?(n-224<<12)+(e[++o]-128<<6)+e[++o]-128:n>191&&n<224&&o+1<i?(n-192<<6)+e[++o]-128:n);return r},t.getSortedObjectString=function(e){return JSON.stringify(e,Object.keys(e).sort())},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var Bk=function(){function t(){}return t.prototype.urlEncode=function(e){return encodeURIComponent(this.encode(e).replace(/=/g,A.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_"))},t.prototype.urlEncodeArr=function(e){return this.base64EncArr(e).replace(/=/g,A.EMPTY_STRING).replace(/\+/g,"-").replace(/\//g,"_")},t.prototype.encode=function(e){var r=ia.stringToUtf8Arr(e);return this.base64EncArr(r)},t.prototype.base64EncArr=function(e){for(var r=(3-e.length%3)%3,n=A.EMPTY_STRING,i=void 0,o=e.length,a=0,s=0;s<o;s++)i=s%3,a|=e[s]<<(16>>>i&24),(i===2||e.length-s===1)&&(n+=String.fromCharCode(this.uint6ToB64(a>>>18&63),this.uint6ToB64(a>>>12&63),this.uint6ToB64(a>>>6&63),this.uint6ToB64(a&63)),a=0);return r===0?n:n.substring(0,n.length-r)+(r===1?"=":"==")},t.prototype.uint6ToB64=function(e){return e<26?e+65:e<52?e+71:e<62?e-4:e===62?43:e===63?47:65},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var jO=function(){function t(){}return t.prototype.decode=function(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw new Error("Invalid base64 string")}var n=this.base64DecToArr(r);return ia.utf8ArrToString(n)},t.prototype.base64DecToArr=function(e,r){for(var n=e.replace(/[^A-Za-z0-9\+\/]/g,A.EMPTY_STRING),i=n.length,o=r?Math.ceil((i*3+1>>>2)/r)*r:i*3+1>>>2,a=new Uint8Array(o),s=void 0,c=void 0,l=0,d=0,u=0;u<i;u++)if(c=u&3,l|=this.b64ToUint6(n.charCodeAt(u))<<18-6*c,c===3||i-u===1){for(s=0;s<3&&d<o;s++,d++)a[d]=l>>>(16>>>s&24)&255;l=0}return a},t.prototype.b64ToUint6=function(e){return e>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:e===43?62:e===47?63:0},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var UO=32,BO=function(){function t(e){this.base64Encode=new Bk,this.cryptoObj=e}return t.prototype.generateCodes=function(){return U(this,void 0,void 0,function(){var e,r;return B(this,function(n){switch(n.label){case 0:return e=this.generateCodeVerifier(),[4,this.generateCodeChallengeFromVerifier(e)];case 1:return r=n.sent(),[2,{verifier:e,challenge:r}]}})})},t.prototype.generateCodeVerifier=function(){try{var e=new Uint8Array(UO);this.cryptoObj.getRandomValues(e);var r=this.base64Encode.urlEncodeArr(e);return r}catch(n){throw ne.createPkceNotGeneratedError(n)}},t.prototype.generateCodeChallengeFromVerifier=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,this.cryptoObj.sha256Digest(e)];case 1:return r=i.sent(),[2,this.base64Encode.urlEncodeArr(new Uint8Array(r))];case 2:throw n=i.sent(),ne.createPkceNotGeneratedError(n);case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var qO=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.crypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,window.crypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){return[2,window.crypto.subtle.exportKey(sd,e)]})})},t.prototype.importKey=function(e,r,n,i){return U(this,void 0,void 0,function(){return B(this,function(o){return[2,window.crypto.subtle.importKey(sd,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,window.crypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,window.crypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var WO=function(){function t(){}return t.prototype.initPrng=function(e){return window.msrCrypto.initPrng(cy(e))},t.prototype.getRandomValues=function(e){return window.msrCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,window.msrCrypto.subtle.generateKey(e,r,n)]})})},t.prototype.exportKey=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){return[2,window.msrCrypto.subtle.exportKey(sd,e)]})})},t.prototype.importKey=function(e,r,n,i){return U(this,void 0,void 0,function(){return B(this,function(o){return[2,window.msrCrypto.subtle.importKey(sd,e,r,n,i)]})})},t.prototype.sign=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,window.msrCrypto.subtle.sign(e,r,n)]})})},t.prototype.digest=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,window.msrCrypto.subtle.digest(e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var GO=function(){function t(){}return t.prototype.getRandomValues=function(e){return window.msCrypto.getRandomValues(e)},t.prototype.generateKey=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.generateKey(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.exportKey=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){return[2,new Promise(function(n,i){var o=window.msCrypto.subtle.exportKey(sd,e);o.addEventListener("complete",function(a){var s=a.target.result,c=ia.utf8ArrToString(new Uint8Array(s)).replace(/\r/g,A.EMPTY_STRING).replace(/\n/g,A.EMPTY_STRING).replace(/\t/g,A.EMPTY_STRING).split(" ").join(A.EMPTY_STRING).replace("\0",A.EMPTY_STRING);try{n(JSON.parse(c))}catch(l){i(l)}}),o.addEventListener("error",function(a){i(a)})})]})})},t.prototype.importKey=function(e,r,n,i){return U(this,void 0,void 0,function(){var o,a;return B(this,function(s){return o=ia.getSortedObjectString(e),a=ia.stringToArrayBuffer(o),[2,new Promise(function(c,l){var d=window.msCrypto.subtle.importKey(sd,a,r,n,i);d.addEventListener("complete",function(u){c(u.target.result)}),d.addEventListener("error",function(u){l(u)})})]})})},t.prototype.sign=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,new Promise(function(o,a){var s=window.msCrypto.subtle.sign(e,r,n);s.addEventListener("complete",function(c){o(c.target.result)}),s.addEventListener("error",function(c){a(c)})})]})})},t.prototype.digest=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,new Promise(function(i,o){var a=window.msCrypto.subtle.digest(e,r.buffer);a.addEventListener("complete",function(s){i(s.target.result)}),a.addEventListener("error",function(s){o(s)})})]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var KO="RSASSA-PKCS1-v1_5",N8="SHA-256",YO=2048,QO=new Uint8Array([1,0,1]),qk=function(){function t(e,r){var n,i;if(this.logger=e,this.cryptoOptions=r,this.hasBrowserCrypto())this.logger.verbose("BrowserCrypto: modern crypto interface available"),this.subtleCrypto=new qO;else if(this.hasIECrypto())this.logger.verbose("BrowserCrypto: MS crypto interface available"),this.subtleCrypto=new GO;else if(this.hasMsrCrypto()&&(!((n=this.cryptoOptions)===null||n===void 0)&&n.useMsrCrypto))this.logger.verbose("BrowserCrypto: MSR crypto interface available"),this.subtleCrypto=new WO;else throw this.hasMsrCrypto()&&this.logger.info("BrowserCrypto: MSR Crypto interface available but system.cryptoOptions.useMsrCrypto not enabled"),this.logger.error("BrowserCrypto: No crypto interfaces available."),ne.createCryptoNotAvailableError("Browser crypto, msCrypto, or msrCrypto interfaces not available.");if(this.subtleCrypto.initPrng){if(this.logger.verbose("BrowserCrypto: Interface requires entropy"),!(!((i=this.cryptoOptions)===null||i===void 0)&&i.entropy))throw this.logger.error("BrowserCrypto: Interface requires entropy but none provided."),$2.createEntropyNotProvided();this.logger.verbose("BrowserCrypto: Entropy provided"),this.subtleCrypto.initPrng(this.cryptoOptions.entropy)}this.keygenAlgorithmOptions={name:KO,hash:N8,modulusLength:YO,publicExponent:QO}}return t.prototype.hasIECrypto=function(){return"msCrypto"in window},t.prototype.hasBrowserCrypto=function(){return"crypto"in window},t.prototype.hasMsrCrypto=function(){return"msrCrypto"in window},t.prototype.sha256Digest=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){return r=ia.stringToUtf8Arr(e),[2,this.subtleCrypto.digest({name:N8},r)]})})},t.prototype.getRandomValues=function(e){return this.subtleCrypto.getRandomValues(e)},t.prototype.generateKeyPair=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,this.subtleCrypto.generateKey(this.keygenAlgorithmOptions,e,r)]})})},t.prototype.exportJwk=function(e){return U(this,void 0,void 0,function(){return B(this,function(r){return[2,this.subtleCrypto.exportKey(e)]})})},t.prototype.importJwk=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){return[2,this.subtleCrypto.importKey(e,this.keygenAlgorithmOptions,r,n)]})})},t.prototype.sign=function(e,r){return U(this,void 0,void 0,function(){return B(this,function(n){return[2,this.subtleCrypto.sign(this.keygenAlgorithmOptions,e,r)]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var XO=function(){function t(){this.dbName=H4,this.version=IO,this.tableName=TO,this.dbOpen=!1}return t.prototype.open=function(){return U(this,void 0,void 0,function(){var e=this;return B(this,function(r){return[2,new Promise(function(n,i){var o=window.indexedDB.open(e.dbName,e.version);o.addEventListener("upgradeneeded",function(a){var s=a;s.target.result.createObjectStore(e.tableName)}),o.addEventListener("success",function(a){var s=a;e.db=s.target.result,e.dbOpen=!0,n()}),o.addEventListener("error",function(){return i(ne.createDatabaseUnavailableError())})})]})})},t.prototype.closeConnection=function(){var e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)},t.prototype.validateDbIsOpen=function(){return U(this,void 0,void 0,function(){return B(this,function(e){switch(e.label){case 0:return this.dbOpen?[3,2]:[4,this.open()];case 1:return[2,e.sent()];case 2:return[2]}})})},t.prototype.getItem=function(e){return U(this,void 0,void 0,function(){var r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.get(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.setItem=function(e,r){return U(this,void 0,void 0,function(){var n=this;return B(this,function(i){switch(i.label){case 0:return[4,this.validateDbIsOpen()];case 1:return i.sent(),[2,new Promise(function(o,a){if(!n.db)return a(ne.createDatabaseNotOpenError());var s=n.db.transaction([n.tableName],"readwrite"),c=s.objectStore(n.tableName),l=c.put(r,e);l.addEventListener("success",function(){n.closeConnection(),o()}),l.addEventListener("error",function(d){n.closeConnection(),a(d)})})]}})})},t.prototype.removeItem=function(e){return U(this,void 0,void 0,function(){var r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readwrite"),s=a.objectStore(r.tableName),c=s.delete(e);c.addEventListener("success",function(){r.closeConnection(),i()}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.getKeys=function(){return U(this,void 0,void 0,function(){var e=this;return B(this,function(r){switch(r.label){case 0:return[4,this.validateDbIsOpen()];case 1:return r.sent(),[2,new Promise(function(n,i){if(!e.db)return i(ne.createDatabaseNotOpenError());var o=e.db.transaction([e.tableName],"readonly"),a=o.objectStore(e.tableName),s=a.getAllKeys();s.addEventListener("success",function(c){var l=c;e.closeConnection(),n(l.target.result)}),s.addEventListener("error",function(c){e.closeConnection(),i(c)})})]}})})},t.prototype.containsKey=function(e){return U(this,void 0,void 0,function(){var r=this;return B(this,function(n){switch(n.label){case 0:return[4,this.validateDbIsOpen()];case 1:return n.sent(),[2,new Promise(function(i,o){if(!r.db)return o(ne.createDatabaseNotOpenError());var a=r.db.transaction([r.tableName],"readonly"),s=a.objectStore(r.tableName),c=s.count(e);c.addEventListener("success",function(l){var d=l;r.closeConnection(),i(d.target.result===1)}),c.addEventListener("error",function(l){r.closeConnection(),o(l)})})]}})})},t.prototype.deleteDatabase=function(){return U(this,void 0,void 0,function(){return B(this,function(e){return this.db&&this.dbOpen&&this.closeConnection(),[2,new Promise(function(r,n){var i=window.indexedDB.deleteDatabase(H4);i.addEventListener("success",function(){return r(!0)}),i.addEventListener("blocked",function(){return r(!0)}),i.addEventListener("error",function(){return n(!1)})})]})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var D8=function(){function t(e,r){this.inMemoryCache=new $4,this.indexedDBCache=new XO,this.logger=e,this.storeName=r}return t.prototype.handleDatabaseAccessError=function(e){if(e instanceof ne&&e.errorCode===Y.databaseUnavailable.code)this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.");else throw e},t.prototype.getItem=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.getItem(e),r)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.getItem(e)];case 2:return[2,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.setItem=function(e,r){return U(this,void 0,void 0,function(){var n;return B(this,function(i){switch(i.label){case 0:this.inMemoryCache.setItem(e,r),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.indexedDBCache.setItem(e,r)];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2]}})})},t.prototype.removeItem=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){switch(n.label){case 0:this.inMemoryCache.removeItem(e),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.indexedDBCache.removeItem(e)];case 2:return n.sent(),[3,4];case 3:return r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2]}})})},t.prototype.getKeys=function(){return U(this,void 0,void 0,function(){var e,r;return B(this,function(n){switch(n.label){case 0:if(e=this.inMemoryCache.getKeys(),e.length!==0)return[3,4];n.label=1;case 1:return n.trys.push([1,3,,4]),this.logger.verbose("In-memory cache is empty, now querying persistent storage."),[4,this.indexedDBCache.getKeys()];case 2:return[2,n.sent()];case 3:return r=n.sent(),this.handleDatabaseAccessError(r),[3,4];case 4:return[2,e]}})})},t.prototype.containsKey=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){switch(i.label){case 0:if(r=this.inMemoryCache.containsKey(e),r)return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),[4,this.indexedDBCache.containsKey(e)];case 2:return[2,i.sent()];case 3:return n=i.sent(),this.handleDatabaseAccessError(n),[3,4];case 4:return[2,r]}})})},t.prototype.clearInMemory=function(){this.logger.verbose("Deleting in-memory keystore "+this.storeName),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore "+this.storeName+" deleted")},t.prototype.clearPersistent=function(){return U(this,void 0,void 0,function(){var e,r;return B(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),this.logger.verbose("Deleting persistent keystore"),[4,this.indexedDBCache.deleteDatabase()];case 1:return e=n.sent(),e&&this.logger.verbose("Persistent keystore deleted"),[2,e];case 2:return r=n.sent(),this.handleDatabaseAccessError(r),[2,!1];case 3:return[2]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var L2;(function(t){t.asymmetricKeys="asymmetricKeys",t.symmetricKeys="symmetricKeys"})(L2||(L2={}));var JO=function(){function t(e){this.logger=e,this.asymmetricKeys=new D8(this.logger,L2.asymmetricKeys),this.symmetricKeys=new D8(this.logger,L2.symmetricKeys)}return t.prototype.clear=function(){return U(this,void 0,void 0,function(){var e;return B(this,function(r){switch(r.label){case 0:this.asymmetricKeys.clearInMemory(),this.symmetricKeys.clearInMemory(),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.asymmetricKeys.clearPersistent()];case 2:return r.sent(),[2,!0];case 3:return e=r.sent(),e instanceof Error?this.logger.error("Clearing keystore failed with error: "+e.message):this.logger.error("Clearing keystore failed with unknown error"),[2,!1];case 4:return[2]}})})},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var eN=function(){function t(e,r,n){this.logger=e,this.browserCrypto=new qk(this.logger,n),this.b64Encode=new Bk,this.b64Decode=new jO,this.guidGenerator=new Uk(this.browserCrypto),this.pkceGenerator=new BO(this.browserCrypto),this.cache=new JO(this.logger),this.performanceClient=r}return t.prototype.createNewGuid=function(){return this.guidGenerator.generateGuid()},t.prototype.base64Encode=function(e){return this.b64Encode.encode(e)},t.prototype.base64Decode=function(e){return this.b64Decode.decode(e)},t.prototype.generatePkceCodes=function(){return U(this,void 0,void 0,function(){return B(this,function(e){return[2,this.pkceGenerator.generateCodes()]})})},t.prototype.getPublicKeyThumbprint=function(e){var r;return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d;return B(this,function(u){switch(u.label){case 0:return n=(r=this.performanceClient)===null||r===void 0?void 0:r.startMeasurement(O.CryptoOptsGetPublicKeyThumbprint,e.correlationId),[4,this.browserCrypto.generateKeyPair(t.EXTRACTABLE,t.POP_KEY_USAGES)];case 1:return i=u.sent(),[4,this.browserCrypto.exportJwk(i.publicKey)];case 2:return o=u.sent(),a={e:o.e,kty:o.kty,n:o.n},s=ia.getSortedObjectString(a),[4,this.hashString(s)];case 3:return c=u.sent(),[4,this.browserCrypto.exportJwk(i.privateKey)];case 4:return l=u.sent(),[4,this.browserCrypto.importJwk(l,!1,["sign"])];case 5:return d=u.sent(),[4,this.cache.asymmetricKeys.setItem(c,{privateKey:d,publicKey:i.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri})];case 6:return u.sent(),n&&n.endMeasurement({success:!0}),[2,c]}})})},t.prototype.removeTokenBindingKey=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){switch(n.label){case 0:return[4,this.cache.asymmetricKeys.removeItem(e)];case 1:return n.sent(),[4,this.cache.asymmetricKeys.containsKey(e)];case 2:return r=n.sent(),[2,!r]}})})},t.prototype.clearKeystore=function(){return U(this,void 0,void 0,function(){return B(this,function(e){switch(e.label){case 0:return[4,this.cache.clear()];case 1:return[2,e.sent()]}})})},t.prototype.signJwt=function(e,r,n){var i;return U(this,void 0,void 0,function(){var o,a,s,c,l,d,u,h,f,p,m,w,g;return B(this,function(v){switch(v.label){case 0:return o=(i=this.performanceClient)===null||i===void 0?void 0:i.startMeasurement(O.CryptoOptsSignJwt,n),[4,this.cache.asymmetricKeys.getItem(r)];case 1:if(a=v.sent(),!a)throw ne.createSigningKeyNotFoundInStorageError(r);return[4,this.browserCrypto.exportJwk(a.publicKey)];case 2:return s=v.sent(),c=ia.getSortedObjectString(s),l=this.b64Encode.urlEncode(JSON.stringify({kid:r})),d=kO.getShrHeaderString({kid:l,alg:s.alg}),u=this.b64Encode.urlEncode(d),e.cnf={jwk:JSON.parse(c)},h=this.b64Encode.urlEncode(JSON.stringify(e)),f=u+"."+h,p=ia.stringToArrayBuffer(f),[4,this.browserCrypto.sign(a.privateKey,p)];case 3:return m=v.sent(),w=this.b64Encode.urlEncodeArr(new Uint8Array(m)),g=f+"."+w,o&&o.endMeasurement({success:!0}),[2,g]}})})},t.prototype.hashString=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){switch(i.label){case 0:return[4,this.browserCrypto.sha256Digest(e)];case 1:return r=i.sent(),n=new Uint8Array(r),[2,this.b64Encode.urlEncodeArr(n)]}})})},t.POP_KEY_USAGES=["sign","verify"],t.EXTRACTABLE=!0,t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var V8=function(){function t(e,r){this.correlationId=r,this.measureName=t.makeMeasureName(e,r),this.startMark=t.makeStartMark(e,r),this.endMark=t.makeEndMark(e,r)}return t.makeMeasureName=function(e,r){return"msal.measure."+e+"."+r},t.makeStartMark=function(e,r){return"msal.start."+e+"."+r},t.makeEndMark=function(e,r){return"msal.end."+e+"."+r},t.supportsBrowserPerformance=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.mark=="function"&&typeof window.performance.measure=="function"&&typeof window.performance.clearMarks=="function"&&typeof window.performance.clearMeasures=="function"&&typeof window.performance.getEntriesByName=="function"},t.flushMeasurements=function(e,r){if(t.supportsBrowserPerformance())try{r.forEach(function(n){var i=t.makeMeasureName(n.name,e),o=window.performance.getEntriesByName(i,"measure");o.length>0&&(window.performance.clearMeasures(i),window.performance.clearMarks(t.makeStartMark(i,e)),window.performance.clearMarks(t.makeEndMark(i,e)))})}catch{}},t.prototype.startMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.startMark)}catch{}},t.prototype.endMeasurement=function(){if(t.supportsBrowserPerformance())try{window.performance.mark(this.endMark),window.performance.measure(this.measureName,this.startMark,this.endMark)}catch{}},t.prototype.flushMeasurement=function(){if(t.supportsBrowserPerformance())try{var e=window.performance.getEntriesByName(this.measureName,"measure");if(e.length>0){var r=e[0].duration;return window.performance.clearMeasures(this.measureName),window.performance.clearMarks(this.startMark),window.performance.clearMarks(this.endMark),r}}catch{}return null},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var tN=function(t){Fr(e,t);function e(r,n,i,o,a,s,c){var l=t.call(this,r,n,i,o,a,s)||this;return l.browserCrypto=new qk(l.logger,c),l.guidGenerator=new Uk(l.browserCrypto),l}return e.prototype.startPerformanceMeasuremeant=function(r,n){return new V8(r,n)},e.prototype.generateId=function(){return this.guidGenerator.generateGuid()},e.prototype.getPageVisibility=function(){var r;return((r=document.visibilityState)===null||r===void 0?void 0:r.toString())||null},e.prototype.deleteIncompleteSubMeasurements=function(r){var n=this.eventsByCorrelationId.get(r.event.correlationId),i=n&&n.eventId===r.event.eventId,o=[];i&&(n!=null&&n.incompleteSubMeasurements)&&n.incompleteSubMeasurements.forEach(function(a){o.push(ue({},a))}),o.length>0&&V8.flushMeasurements(r.event.correlationId,o)},e.prototype.supportsBrowserPerformanceNow=function(){return typeof window<"u"&&typeof window.performance<"u"&&typeof window.performance.now=="function"},e.prototype.startMeasurement=function(r,n){var i=this,o=this.getPageVisibility(),a=t.prototype.startMeasurement.call(this,r,n);return ue(ue({},a),{endMeasurement:function(s){var c=a.endMeasurement(ue({startPageVisibility:o,endPageVisibility:i.getPageVisibility()},s));return i.deleteIncompleteSubMeasurements(a),c},discardMeasurement:function(){a.discardMeasurement(),i.deleteIncompleteSubMeasurements(a),a.measurement.flushMeasurement()}})},e.prototype.setPreQueueTime=function(r,n){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to set telemetry queue time for "+r);return}if(!n){this.logger.trace("BrowserPerformanceClient: correlationId for "+r+" not provided, unable to set telemetry queue time");return}var i=this.preQueueTimeByCorrelationId.get(n);i&&(this.logger.trace("BrowserPerformanceClient: Incomplete pre-queue "+i.name+" found",n),this.addQueueMeasurement(i.name,n,void 0,!0)),this.preQueueTimeByCorrelationId.set(n,{name:r,time:window.performance.now()})},e.prototype.addQueueMeasurement=function(r,n,i,o){if(!this.supportsBrowserPerformanceNow()){this.logger.trace("BrowserPerformanceClient: window performance API not available, unable to add queue measurement for "+r);return}if(!n){this.logger.trace("BrowserPerformanceClient: correlationId for "+r+" not provided, unable to add queue measurement");return}var a=t.prototype.getPreQueueTime.call(this,r,n);if(a){var s=window.performance.now(),c=i||t.prototype.calculateQueuedTime.call(this,a,s);return t.prototype.addQueueMeasurement.call(this,r,n,c,o)}},e}(Dk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var rN=function(){function t(e,r,n,i){this.isBrowserEnvironment=typeof window<"u",this.config=e,this.storage=r,this.logger=n,this.cryptoObj=i}return t.prototype.loadExternalTokens=function(e,r,n){if(this.logger.info("TokenCache - loadExternalTokens called"),!r.id_token)throw ne.createUnableToLoadTokenError("Please ensure server response includes id token.");var i=new Eo(r.id_token,this.cryptoObj),o,a;if(e.account){var s=this.loadAccount(i,e.account.environment,void 0,void 0,e.account.homeAccountId);o=new sh(s,this.loadIdToken(i,s.homeAccountId,e.account.environment,e.account.tenantId),this.loadAccessToken(e,r,s.homeAccountId,e.account.environment,e.account.tenantId,n),this.loadRefreshToken(e,r,s.homeAccountId,e.account.environment))}else if(e.authority){var c=Dh.generateAuthority(e.authority,e.azureCloudOptions),l={protocolMode:this.config.auth.protocolMode,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache};if(a=new Dh(c,this.config.system.networkClient,this.storage,l,this.logger),n.clientInfo){this.logger.trace("TokenCache - homeAccountId from options");var s=this.loadAccount(i,a.hostnameAndPort,n.clientInfo,a.authorityType);o=new sh(s,this.loadIdToken(i,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else if(r.client_info){this.logger.trace("TokenCache - homeAccountId from response");var s=this.loadAccount(i,a.hostnameAndPort,r.client_info,a.authorityType);o=new sh(s,this.loadIdToken(i,s.homeAccountId,a.hostnameAndPort,a.tenant),this.loadAccessToken(e,r,s.homeAccountId,a.hostnameAndPort,a.tenant,n),this.loadRefreshToken(e,r,s.homeAccountId,a.hostnameAndPort))}else throw ne.createUnableToLoadTokenError("Please provide clientInfo in the response or options.")}else throw ne.createUnableToLoadTokenError("Please provide a request with an account or a request with authority.");return this.generateAuthenticationResult(e,i,o,a)},t.prototype.loadAccount=function(e,r,n,i,o){var a;if(o?a=o:i!==void 0&&n&&(a=Or.generateHomeAccountId(n,i,this.logger,this.cryptoObj,e)),!a)throw ne.createUnableToLoadTokenError("Unexpected missing homeAccountId");var s=n?Or.createAccount(n,a,e,void 0,void 0,void 0,r):Or.createGenericAccount(a,e,void 0,void 0,void 0,r);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading account"),this.storage.setAccount(s),s;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadIdToken=function(e,r,n,i){var o=qs.createIdTokenEntity(r,n,e.rawToken,this.config.auth.clientId,i);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading id token"),this.storage.setIdTokenCredential(o),o;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadAccessToken=function(e,r,n,i,o,a){if(!r.access_token)return this.logger.verbose("TokenCache - No access token provided for caching"),null;if(!r.expires_in)throw ne.createUnableToLoadTokenError("Please ensure server response includes expires_in value.");if(!a.extendedExpiresOn)throw ne.createUnableToLoadTokenError("Please provide an extendedExpiresOn value in the options.");var s=new Qr(e.scopes).printScopes(),c=a.expiresOn||r.expires_in+new Date().getTime()/1e3,l=a.extendedExpiresOn,d=Ws.createAccessTokenEntity(n,i,r.access_token,this.config.auth.clientId,o,s,c,l,this.cryptoObj);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading access token"),this.storage.setAccessTokenCredential(d),d;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.loadRefreshToken=function(e,r,n,i){if(!r.refresh_token)return this.logger.verbose("TokenCache - No refresh token provided for caching"),null;var o=Ml.createRefreshTokenEntity(n,i,r.refresh_token,this.config.auth.clientId);if(this.isBrowserEnvironment)return this.logger.verbose("TokenCache - loading refresh token"),this.storage.setRefreshTokenCredential(o),o;throw ne.createUnableToLoadTokenError("loadExternalTokens is designed to work in browser environments only.")},t.prototype.generateAuthenticationResult=function(e,r,n,i){var o,a,s,c=A.EMPTY_STRING,l=[],d=null,u;n!=null&&n.accessToken&&(c=n.accessToken.secret,l=Qr.fromString(n.accessToken.target).asArray(),d=new Date(Number(n.accessToken.expiresOn)*1e3),u=new Date(Number(n.accessToken.extendedExpiresOn)*1e3));var h=(r==null?void 0:r.claims.oid)||(r==null?void 0:r.claims.sub)||A.EMPTY_STRING,f=(r==null?void 0:r.claims.tid)||A.EMPTY_STRING;return{authority:i?i.canonicalAuthority:A.EMPTY_STRING,uniqueId:h,tenantId:f,scopes:l,account:n!=null&&n.account?n.account.getAccountInfo():null,idToken:r?r.rawToken:A.EMPTY_STRING,idTokenClaims:r?r.claims:{},accessToken:c,fromCache:!0,expiresOn:d,correlationId:e.correlationId||A.EMPTY_STRING,requestId:A.EMPTY_STRING,extExpiresOn:u,familyId:A.EMPTY_STRING,tokenType:((o=n==null?void 0:n.accessToken)===null||o===void 0?void 0:o.tokenType)||A.EMPTY_STRING,state:A.EMPTY_STRING,cloudGraphHostName:((a=n==null?void 0:n.account)===null||a===void 0?void 0:a.cloudGraphHostName)||A.EMPTY_STRING,msGraphHost:((s=n==null?void 0:n.account)===null||s===void 0?void 0:s.msGraphHost)||A.EMPTY_STRING,code:void 0,fromNativeBroker:!1}},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var nN=function(t){Fr(e,t);function e(r){var n=t.call(this,r)||this;return n.includeRedirectUri=!1,n}return e}(Lk);/*! @azure/msal-browser v2.38.3 2023-10-27 */var iN=function(t){Fr(e,t);function e(r,n,i,o,a,s,c,l,d,u){var h=t.call(this,r,n,i,o,a,s,l,d,u)||this;return h.apiId=c,h}return e.prototype.acquireToken=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l;return B(this,function(d){switch(d.label){case 0:if(this.logger.trace("SilentAuthCodeClient.acquireToken called"),!r.code)throw ne.createAuthCodeRequiredError();return this.performanceClient.setPreQueueTime(O.StandardInteractionClientInitializeAuthorizationRequest,r.correlationId),[4,this.initializeAuthorizationRequest(r,de.Silent)];case 1:n=d.sent(),this.browserStorage.updateCacheEntries(n.state,n.nonce,n.authority,n.loginHint||A.EMPTY_STRING,n.account||null),i=this.initializeServerTelemetryManager(this.apiId),d.label=2;case 2:return d.trys.push([2,4,,5]),o=ue(ue({},n),{code:r.code}),this.performanceClient.setPreQueueTime(O.StandardInteractionClientGetClientConfiguration,r.correlationId),[4,this.getClientConfiguration(i,n.authority)];case 3:return a=d.sent(),s=new nN(a),this.logger.verbose("Auth code client created"),c=new jk(s,this.browserStorage,o,this.logger,this.config.system,this.performanceClient),[2,c.handleCodeResponseFromServer({code:r.code,msgraph_host:r.msGraphHost,cloud_graph_host_name:r.cloudGraphHostName,cloud_instance_host_name:r.cloudInstanceHostName},n.state,s.authority,this.networkClient,!1)];case 4:throw l=d.sent(),l instanceof fe&&l.setCorrelationId(this.correlationId),i.cacheFailedRequest(l),this.browserStorage.cleanRequestByState(n.state),l;case 5:return[2]}})})},e.prototype.logout=function(){return Promise.reject(ne.createSilentLogoutUnsupportedError())},e}(kd);/*! @azure/msal-browser v2.38.3 2023-10-27 */var oN=function(){function t(e){this.isBrowserEnvironment=typeof window<"u",this.config=DO(e,this.isBrowserEnvironment),this.initialized=!1,this.logger=new O0(this.config.system.loggerOptions,vv,ch),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.isBrowserEnvironment?new tN(this.config.auth.clientId,this.config.auth.authority,this.logger,vv,ch,this.config.telemetry.application,this.config.system.cryptoOptions):new AO(this.config.auth.clientId,this.config.auth.authority,this.logger,vv,ch,this.config.telemetry.application),this.browserCrypto=this.isBrowserEnvironment?new eN(this.logger,this.performanceClient,this.config.system.cryptoOptions):I2,this.eventHandler=new zO(this.logger,this.browserCrypto),this.browserStorage=this.isBrowserEnvironment?new L4(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger):PO(this.config.auth.clientId,this.logger);var r={cacheLocation:sr.MemoryStorage,temporaryCacheLocation:sr.MemoryStorage,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!0};this.nativeInternalStorage=new L4(this.config.auth.clientId,r,this.browserCrypto,this.logger),this.tokenCache=new rN(this.config,this.browserStorage,this.logger,this.browserCrypto),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}return t.prototype.initialize=function(){return U(this,void 0,void 0,function(){var e,r,n,i,o;return B(this,function(a){switch(a.label){case 0:if(this.logger.trace("initialize called"),this.initialized)return this.logger.info("initialize has already been called, exiting early."),[2];if(e=this.config.system.allowNativeBroker,r=this.performanceClient.startMeasurement(O.InitializeClientApplication),this.eventHandler.emitEvent(Ce.INITIALIZE_START),!e)return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),n=this,[4,oc.createProvider(this.logger,this.config.system.nativeBrokerHandshakeTimeout,this.performanceClient)];case 2:return n.nativeExtensionProvider=a.sent(),[3,4];case 3:return i=a.sent(),this.logger.verbose(i),[3,4];case 4:return this.config.cache.claimsBasedCachingEnabled?[3,6]:(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),o=this.performanceClient.startMeasurement(O.ClearTokensAndKeysWithClaims),[4,this.browserStorage.clearTokensAndKeysWithClaims()]);case 5:a.sent(),o.endMeasurement({success:!0}),a.label=6;case 6:return this.initialized=!0,this.eventHandler.emitEvent(Ce.INITIALIZE_END),r.endMeasurement({allowNativeBroker:e,success:!0}),[2]}})})},t.prototype.handleRedirectPromise=function(e){return U(this,void 0,void 0,function(){var r,n,i,o,a,s,c,l,d=this;return B(this,function(u){return this.logger.verbose("handleRedirectPromise called"),Yt.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),r=this.getAllAccounts(),this.isBrowserEnvironment?(n=e||A.EMPTY_STRING,i=this.redirectResponse.get(n),typeof i>"u"?(this.eventHandler.emitEvent(Ce.HANDLE_REDIRECT_START,de.Redirect),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise"),o=this.browserStorage.getCachedNativeRequest(),a=void 0,o&&oc.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider)&&this.nativeExtensionProvider&&!e?(this.logger.trace("handleRedirectPromise - acquiring token from native platform"),s=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.handleRedirectPromise,this.performanceClient,this.nativeExtensionProvider,o.accountId,this.nativeInternalStorage,o.correlationId),a=s.handleRedirectPromise()):(this.logger.trace("handleRedirectPromise - acquiring token from web flow"),c=this.browserStorage.getTemporaryCache(We.CORRELATION_ID,!0)||A.EMPTY_STRING,l=this.createRedirectClient(c),a=l.handleRedirectPromise(e)),i=a.then(function(h){if(h){var f=r.length<d.getAllAccounts().length;f?(d.eventHandler.emitEvent(Ce.LOGIN_SUCCESS,de.Redirect,h),d.logger.verbose("handleRedirectResponse returned result, login success")):(d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_SUCCESS,de.Redirect,h),d.logger.verbose("handleRedirectResponse returned result, acquire token success"))}return d.eventHandler.emitEvent(Ce.HANDLE_REDIRECT_END,de.Redirect),h}).catch(function(h){throw r.length>0?d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_FAILURE,de.Redirect,null,h):d.eventHandler.emitEvent(Ce.LOGIN_FAILURE,de.Redirect,null,h),d.eventHandler.emitEvent(Ce.HANDLE_REDIRECT_END,de.Redirect),h}),this.redirectResponse.set(n,i)):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),[2,i]):(this.logger.verbose("handleRedirectPromise returns null, not browser environment"),[2,null])})})},t.prototype.acquireTokenRedirect=function(e){return U(this,void 0,void 0,function(){var r,n,i,o,a,s=this;return B(this,function(c){return r=this.getRequestCorrelationId(e),this.logger.verbose("acquireTokenRedirect called",r),this.preflightBrowserEnvironmentCheck(de.Redirect),n=this.getAllAccounts().length>0,n?this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_START,de.Redirect,e):this.eventHandler.emitEvent(Ce.LOGIN_START,de.Redirect,e),this.nativeExtensionProvider&&this.canUseNative(e)?(o=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.acquireTokenRedirect,this.performanceClient,this.nativeExtensionProvider,this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),i=o.acquireTokenRedirect(e).catch(function(l){if(l instanceof vo&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}else if(l instanceof zi){s.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow");var d=s.createRedirectClient(e.correlationId);return d.acquireToken(e)}throw s.browserStorage.setInteractionInProgress(!1),l})):(a=this.createRedirectClient(e.correlationId),i=a.acquireToken(e)),[2,i.catch(function(l){throw n?s.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_FAILURE,de.Redirect,null,l):s.eventHandler.emitEvent(Ce.LOGIN_FAILURE,de.Redirect,null,l),l})]})})},t.prototype.acquireTokenPopup=function(e){var r=this,n=this.getRequestCorrelationId(e),i=this.performanceClient.startMeasurement(O.AcquireTokenPopup,n);try{this.logger.verbose("acquireTokenPopup called",n),this.preflightBrowserEnvironmentCheck(de.Popup)}catch(c){return Promise.reject(c)}var o=this.getAllAccounts();o.length>0?this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_START,de.Popup,e):this.eventHandler.emitEvent(Ce.LOGIN_START,de.Popup,e);var a;if(this.canUseNative(e))a=this.acquireTokenNative(e,_t.acquireTokenPopup).then(function(c){return r.browserStorage.setInteractionInProgress(!1),i.endMeasurement({success:!0,isNativeBroker:!0,requestId:c.requestId}),c}).catch(function(c){if(c instanceof vo&&c.isFatal()){r.nativeExtensionProvider=void 0;var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}else if(c instanceof zi){r.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow");var l=r.createPopupClient(e.correlationId);return l.acquireToken(e)}throw r.browserStorage.setInteractionInProgress(!1),c});else{var s=this.createPopupClient(e.correlationId);a=s.acquireToken(e)}return a.then(function(c){var l=o.length<r.getAllAccounts().length;return l?r.eventHandler.emitEvent(Ce.LOGIN_SUCCESS,de.Popup,c):r.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_SUCCESS,de.Popup,c),i.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),i.endMeasurement({success:!0,requestId:c.requestId}),c}).catch(function(c){return o.length>0?r.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_FAILURE,de.Popup,null,c):r.eventHandler.emitEvent(Ce.LOGIN_FAILURE,de.Popup,null,c),i.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),Promise.reject(c)})},t.prototype.trackPageVisibilityWithMeasurement=function(){var e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))},t.prototype.ssoSilent=function(e){var r;return U(this,void 0,void 0,function(){var n,i,o,a,s=this;return B(this,function(c){return n=this.getRequestCorrelationId(e),i=ue(ue({},e),{prompt:e.prompt,correlationId:n}),this.preflightBrowserEnvironmentCheck(de.Silent),this.ssoSilentMeasurement=this.performanceClient.startMeasurement(O.SsoSilent,n),(r=this.ssoSilentMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",n),this.eventHandler.emitEvent(Ce.SSO_SILENT_START,de.Silent,i),this.canUseNative(i)?o=this.acquireTokenNative(i,_t.ssoSilent).catch(function(l){if(l instanceof vo&&l.isFatal()){s.nativeExtensionProvider=void 0;var d=s.createSilentIframeClient(i.correlationId);return d.acquireToken(i)}throw l}):(a=this.createSilentIframeClient(i.correlationId),o=a.acquireToken(i)),[2,o.then(function(l){var d,u;return s.eventHandler.emitEvent(Ce.SSO_SILENT_SUCCESS,de.Silent,l),(d=s.ssoSilentMeasurement)===null||d===void 0||d.addStaticFields({accessTokenSize:l.accessToken.length,idTokenSize:l.idToken.length}),(u=s.ssoSilentMeasurement)===null||u===void 0||u.endMeasurement({success:!0,isNativeBroker:l.fromNativeBroker,requestId:l.requestId}),l}).catch(function(l){var d;throw s.eventHandler.emitEvent(Ce.SSO_SILENT_FAILURE,de.Silent,null,l),(d=s.ssoSilentMeasurement)===null||d===void 0||d.endMeasurement({errorCode:l.errorCode,subErrorCode:l.subError,success:!1}),l}).finally(function(){document.removeEventListener("visibilitychange",s.trackPageVisibilityWithMeasurement)})]})})},t.prototype.acquireTokenByCode=function(e){return U(this,void 0,void 0,function(){var r,n,i,o,a=this;return B(this,function(s){r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(de.Silent),this.logger.trace("acquireTokenByCode called",r),this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_BY_CODE_START,de.Silent,e),n=this.performanceClient.startMeasurement(O.AcquireTokenByCode,e.correlationId);try{if(e.code&&e.nativeAccountId)throw ne.createSpaCodeAndNativeAccountIdPresentError();if(e.code)return i=e.code,o=this.hybridAuthCodeResponses.get(i),o?(this.logger.verbose("Existing acquireTokenByCode request found",e.correlationId),n.discardMeasurement()):(this.logger.verbose("Initiating new acquireTokenByCode request",r),o=this.acquireTokenByCodeAsync(ue(ue({},e),{correlationId:r})).then(function(c){return a.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_BY_CODE_SUCCESS,de.Silent,c),a.hybridAuthCodeResponses.delete(i),n.addStaticFields({accessTokenSize:c.accessToken.length,idTokenSize:c.idToken.length}),n.endMeasurement({success:!0,isNativeBroker:c.fromNativeBroker,requestId:c.requestId}),c}).catch(function(c){throw a.hybridAuthCodeResponses.delete(i),a.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_BY_CODE_FAILURE,de.Silent,null,c),n.endMeasurement({errorCode:c.errorCode,subErrorCode:c.subError,success:!1}),c}),this.hybridAuthCodeResponses.set(i,o)),[2,o];if(e.nativeAccountId){if(this.canUseNative(e,e.nativeAccountId))return[2,this.acquireTokenNative(e,_t.acquireTokenByCode,e.nativeAccountId).catch(function(c){throw c instanceof vo&&c.isFatal()&&(a.nativeExtensionProvider=void 0),c})];throw ne.createUnableToAcquireTokenFromNativePlatformError()}else throw ne.createAuthCodeOrNativeAccountIdRequiredError()}catch(c){throw this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_BY_CODE_FAILURE,de.Silent,null,c),n.endMeasurement({errorCode:c instanceof fe&&c.errorCode||void 0,subErrorCode:c instanceof fe&&c.subError||void 0,success:!1}),c}return[2]})})},t.prototype.acquireTokenByCodeAsync=function(e){var r;return U(this,void 0,void 0,function(){var n,i,o=this;return B(this,function(a){switch(a.label){case 0:return this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(O.AcquireTokenByCodeAsync,e.correlationId),(r=this.acquireTokenByCodeAsyncMeasurement)===null||r===void 0||r.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),n=this.createSilentAuthCodeClient(e.correlationId),[4,n.acquireToken(e).then(function(s){var c;return(c=o.acquireTokenByCodeAsyncMeasurement)===null||c===void 0||c.endMeasurement({success:!0,fromCache:s.fromCache,isNativeBroker:s.fromNativeBroker,requestId:s.requestId}),s}).catch(function(s){var c;throw(c=o.acquireTokenByCodeAsyncMeasurement)===null||c===void 0||c.endMeasurement({errorCode:s.errorCode,subErrorCode:s.subError,success:!1}),s}).finally(function(){document.removeEventListener("visibilitychange",o.trackPageVisibilityWithMeasurement)})];case 1:return i=a.sent(),[2,i]}})})},t.prototype.acquireTokenFromCache=function(e,r,n){return U(this,void 0,void 0,function(){return B(this,function(i){switch(this.performanceClient.addQueueMeasurement(O.AcquireTokenFromCache,r.correlationId),n.cacheLookupPolicy){case Pn.Default:case Pn.AccessToken:case Pn.AccessTokenAndRefreshToken:return[2,e.acquireToken(r)];default:throw se.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenByRefreshToken=function(e,r){return U(this,void 0,void 0,function(){var n;return B(this,function(i){switch(this.performanceClient.addQueueMeasurement(O.AcquireTokenByRefreshToken,e.correlationId),r.cacheLookupPolicy){case Pn.Default:case Pn.AccessTokenAndRefreshToken:case Pn.RefreshToken:case Pn.RefreshTokenAndNetwork:return n=this.createSilentRefreshClient(e.correlationId),this.performanceClient.setPreQueueTime(O.SilentRefreshClientAcquireToken,e.correlationId),[2,n.acquireToken(e)];default:throw se.createRefreshRequiredError()}return[2]})})},t.prototype.acquireTokenBySilentIframe=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){return this.performanceClient.addQueueMeasurement(O.AcquireTokenBySilentIframe,e.correlationId),r=this.createSilentIframeClient(e.correlationId),this.performanceClient.setPreQueueTime(O.SilentIframeClientAcquireToken,e.correlationId),[2,r.acquireToken(e)]})})},t.prototype.logout=function(e){return U(this,void 0,void 0,function(){var r;return B(this,function(n){return r=this.getRequestCorrelationId(e),this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",r),[2,this.logoutRedirect(ue({correlationId:r},e))]})})},t.prototype.logoutRedirect=function(e){return U(this,void 0,void 0,function(){var r,n;return B(this,function(i){return r=this.getRequestCorrelationId(e),this.preflightBrowserEnvironmentCheck(de.Redirect),n=this.createRedirectClient(r),[2,n.logout(e)]})})},t.prototype.logoutPopup=function(e){try{var r=this.getRequestCorrelationId(e);this.preflightBrowserEnvironmentCheck(de.Popup);var n=this.createPopupClient(r);return n.logout(e)}catch(i){return Promise.reject(i)}},t.prototype.getAllAccounts=function(){return this.logger.verbose("getAllAccounts called"),this.isBrowserEnvironment?this.browserStorage.getAllAccounts():[]},t.prototype.getAccountByUsername=function(e){if(this.logger.trace("getAccountByUsername called"),!e)return this.logger.warning("getAccountByUsername: No username provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({username:e});return r?(this.logger.verbose("getAccountByUsername: Account matching username found, returning"),this.logger.verbosePii("getAccountByUsername: Returning signed-in accounts matching username: "+e),r):(this.logger.verbose("getAccountByUsername: No matching account found, returning null"),null)},t.prototype.getAccountByHomeId=function(e){if(this.logger.trace("getAccountByHomeId called"),!e)return this.logger.warning("getAccountByHomeId: No homeAccountId provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({homeAccountId:e});return r?(this.logger.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),this.logger.verbosePii("getAccountByHomeId: Returning signed-in accounts matching homeAccountId: "+e),r):(this.logger.verbose("getAccountByHomeId: No matching account found, returning null"),null)},t.prototype.getAccountByLocalId=function(e){if(this.logger.trace("getAccountByLocalId called"),!e)return this.logger.warning("getAccountByLocalId: No localAccountId provided"),null;var r=this.browserStorage.getAccountInfoFilteredBy({localAccountId:e});return r?(this.logger.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),this.logger.verbosePii("getAccountByLocalId: Returning signed-in accounts matching localAccountId: "+e),r):(this.logger.verbose("getAccountByLocalId: No matching account found, returning null"),null)},t.prototype.setActiveAccount=function(e){this.browserStorage.setActiveAccount(e)},t.prototype.getActiveAccount=function(){return this.browserStorage.getActiveAccount()},t.prototype.preflightBrowserEnvironmentCheck=function(e,r){if(r===void 0&&(r=!0),this.logger.verbose("preflightBrowserEnvironmentCheck started"),Yt.blockNonBrowserEnvironment(this.isBrowserEnvironment),Yt.blockRedirectInIframe(e,this.config.system.allowRedirectInIframe),Yt.blockReloadInHiddenIframes(),Yt.blockAcquireTokenInPopups(),Yt.blockNativeBrokerCalledBeforeInitialized(this.config.system.allowNativeBroker,this.initialized),e===de.Redirect&&this.config.cache.cacheLocation===sr.MemoryStorage&&!this.config.cache.storeAuthStateInCookie)throw $2.createInMemoryRedirectUnavailableError();(e===de.Redirect||e===de.Popup)&&this.preflightInteractiveRequest(r)},t.prototype.preflightInteractiveRequest=function(e){this.logger.verbose("preflightInteractiveRequest called, validating app environment"),Yt.blockReloadInHiddenIframes(),e&&this.browserStorage.setInteractionInProgress(!0)},t.prototype.acquireTokenNative=function(e,r,n){return U(this,void 0,void 0,function(){var i;return B(this,function(o){if(this.logger.trace("acquireTokenNative called"),!this.nativeExtensionProvider)throw ne.createNativeConnectionNotEstablishedError();return i=new Kl(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,r,this.performanceClient,this.nativeExtensionProvider,n||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId),[2,i.acquireToken(e)]})})},t.prototype.canUseNative=function(e,r){if(this.logger.trace("canUseNative called"),!oc.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,e.authenticationScheme))return this.logger.trace("canUseNative: isNativeAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case en.NONE:case en.CONSENT:case en.LOGIN:this.logger.trace("canUseNative: prompt is compatible with native flow");break;default:return this.logger.trace("canUseNative: prompt = "+e.prompt+" is not compatible with native flow, returning false"),!1}return!r&&!this.getNativeAccountId(e)?(this.logger.trace("canUseNative: nativeAccountId is not available, returning false"),!1):!0},t.prototype.getNativeAccountId=function(e){var r=e.account||this.browserStorage.getAccountInfoByHints(e.loginHint,e.sid)||this.getActiveAccount();return r&&r.nativeAccountId||""},t.prototype.createPopupClient=function(e){return new HO(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createRedirectClient=function(e){return new ZO(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentIframeClient=function(e){return new VO(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.ssoSilent,this.performanceClient,this.nativeInternalStorage,this.nativeExtensionProvider,e)},t.prototype.createSilentCacheClient=function(e){return new zk(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentRefreshClient=function(e){return new FO(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.createSilentAuthCodeClient=function(e){return new iN(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,_t.acquireTokenByCode,this.performanceClient,this.nativeExtensionProvider,e)},t.prototype.addEventCallback=function(e){return this.eventHandler.addEventCallback(e)},t.prototype.removeEventCallback=function(e){this.eventHandler.removeEventCallback(e)},t.prototype.addPerformanceCallback=function(e){return this.performanceClient.addPerformanceCallback(e)},t.prototype.removePerformanceCallback=function(e){return this.performanceClient.removePerformanceCallback(e)},t.prototype.enableAccountStorageEvents=function(){this.eventHandler.enableAccountStorageEvents()},t.prototype.disableAccountStorageEvents=function(){this.eventHandler.disableAccountStorageEvents()},t.prototype.getTokenCache=function(){return this.tokenCache},t.prototype.getLogger=function(){return this.logger},t.prototype.setLogger=function(e){this.logger=e},t.prototype.initializeWrapperLibrary=function(e,r){this.browserStorage.setWrapperMetadata(e,r)},t.prototype.setNavigationClient=function(e){this.navigationClient=e},t.prototype.getConfiguration=function(){return this.config},t.prototype.getRequestCorrelationId=function(e){return e!=null&&e.correlationId?e.correlationId:this.isBrowserEnvironment?this.browserCrypto.createNewGuid():A.EMPTY_STRING},t}();/*! @azure/msal-browser v2.38.3 2023-10-27 */var aN=function(t){Fr(e,t);function e(r){var n=t.call(this,r)||this;return n.astsAsyncMeasurement=void 0,n.activeSilentTokenRequests=new Map,n.trackPageVisibility=n.trackPageVisibility.bind(n),n}return e.prototype.loginRedirect=function(r){return U(this,void 0,void 0,function(){var n;return B(this,function(i){return n=this.getRequestCorrelationId(r),this.logger.verbose("loginRedirect called",n),[2,this.acquireTokenRedirect(ue({correlationId:n},r||H8))]})})},e.prototype.loginPopup=function(r){var n=this.getRequestCorrelationId(r);return this.logger.verbose("loginPopup called",n),this.acquireTokenPopup(ue({correlationId:n},r||H8))},e.prototype.acquireTokenSilent=function(r){return U(this,void 0,void 0,function(){var n,i,o,a,s,c,l,d=this;return B(this,function(u){if(n=this.getRequestCorrelationId(r),i=this.performanceClient.startMeasurement(O.AcquireTokenSilent,n),i.addStaticFields({cacheLookupPolicy:r.cacheLookupPolicy}),this.preflightBrowserEnvironmentCheck(de.Silent),this.logger.verbose("acquireTokenSilent called",n),o=r.account||this.getActiveAccount(),!o)throw ne.createNoAccountError();return a={clientId:this.config.auth.clientId,authority:r.authority||A.EMPTY_STRING,scopes:r.scopes,homeAccountIdentifier:o.homeAccountId,claims:r.claims,authenticationScheme:r.authenticationScheme,resourceRequestMethod:r.resourceRequestMethod,resourceRequestUri:r.resourceRequestUri,shrClaims:r.shrClaims,sshKid:r.sshKid},s=JSON.stringify(a),c=this.activeSilentTokenRequests.get(s),typeof c>"u"?(this.logger.verbose("acquireTokenSilent called for the first time, storing active request",n),this.performanceClient.setPreQueueTime(O.AcquireTokenSilentAsync,n),l=this.acquireTokenSilentAsync(ue(ue({},r),{correlationId:n}),o).then(function(h){return d.activeSilentTokenRequests.delete(s),i.addStaticFields({accessTokenSize:h.accessToken.length,idTokenSize:h.idToken.length}),i.endMeasurement({success:!0,fromCache:h.fromCache,isNativeBroker:h.fromNativeBroker,cacheLookupPolicy:r.cacheLookupPolicy,requestId:h.requestId}),h}).catch(function(h){throw d.activeSilentTokenRequests.delete(s),i.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}),this.activeSilentTokenRequests.set(s,l),[2,l]):(this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",n),i.discardMeasurement(),[2,c])})})},e.prototype.trackPageVisibility=function(){this.astsAsyncMeasurement&&(this.logger.info("Perf: Visibility change detected"),this.astsAsyncMeasurement.increment({visibilityChangeCount:1}))},e.prototype.acquireTokenSilentAsync=function(r,n){var i;return U(this,void 0,void 0,function(){var o,a,s,c,l,d=this;return B(this,function(u){switch(u.label){case 0:return this.performanceClient.addQueueMeasurement(O.AcquireTokenSilentAsync,r.correlationId),this.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_START,de.Silent,r),this.astsAsyncMeasurement=this.performanceClient.startMeasurement(O.AcquireTokenSilentAsync,r.correlationId),(i=this.astsAsyncMeasurement)===null||i===void 0||i.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibility),oc.isNativeAvailable(this.config,this.logger,this.nativeExtensionProvider,r.authenticationScheme)&&n.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),a=ue(ue({},r),{account:n}),o=this.acquireTokenNative(a,_t.acquireTokenSilent_silentFlow).catch(function(h){return U(d,void 0,void 0,function(){var f;return B(this,function(p){if(h instanceof vo&&h.isFatal())return this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.nativeExtensionProvider=void 0,f=this.createSilentIframeClient(r.correlationId),[2,f.acquireToken(r)];throw h})})}),[3,3]):[3,1];case 1:return this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),s=this.createSilentCacheClient(r.correlationId),this.performanceClient.setPreQueueTime(O.InitializeSilentRequest,r.correlationId),[4,s.initializeSilentRequest(r,n)];case 2:c=u.sent(),l=ue(ue({},r),{cacheLookupPolicy:r.cacheLookupPolicy||Pn.Default}),this.performanceClient.setPreQueueTime(O.AcquireTokenFromCache,c.correlationId),o=this.acquireTokenFromCache(s,c,l).catch(function(h){if(l.cacheLookupPolicy===Pn.AccessToken)throw h;return Yt.blockReloadInHiddenIframes(),d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_NETWORK_START,de.Silent,c),d.performanceClient.setPreQueueTime(O.AcquireTokenByRefreshToken,c.correlationId),d.acquireTokenByRefreshToken(c,l).catch(function(f){var p=f instanceof _c,m=f instanceof zi,w=f.errorCode===Zl.noTokensFoundError.code,g=f.errorCode===Vi.INVALID_GRANT_ERROR;if((!p||!g||m||l.cacheLookupPolicy===Pn.AccessTokenAndRefreshToken||l.cacheLookupPolicy===Pn.RefreshToken)&&l.cacheLookupPolicy!==Pn.Skip&&!w)throw f;return d.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",r.correlationId),d.performanceClient.setPreQueueTime(O.AcquireTokenBySilentIframe,c.correlationId),d.acquireTokenBySilentIframe(c)})}),u.label=3;case 3:return[2,o.then(function(h){var f;return d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_SUCCESS,de.Silent,h),(f=d.astsAsyncMeasurement)===null||f===void 0||f.endMeasurement({success:!0,fromCache:h.fromCache,isNativeBroker:h.fromNativeBroker,requestId:h.requestId}),h}).catch(function(h){var f;throw d.eventHandler.emitEvent(Ce.ACQUIRE_TOKEN_FAILURE,de.Silent,null,h),(f=d.astsAsyncMeasurement)===null||f===void 0||f.endMeasurement({errorCode:h.errorCode,subErrorCode:h.subError,success:!1}),h}).finally(function(){document.removeEventListener("visibilitychange",d.trackPageVisibility)})]}})})},e}(oN);const F8="redirect";var z8=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class sN extends aN{get account(){return this.getAllAccounts().find(n=>{var i;return((i=n.idTokenClaims)===null||i===void 0?void 0:i.aud)===this.clientId})}get hasValidClaims(){var e;const r=(e=this.account)===null||e===void 0?void 0:e.idTokenClaims;if(r){const n=Math.ceil(Date.now()/1e3);return r.exp>n}return!1}get clientId(){var e;return(e=this.config.auth)===null||e===void 0?void 0:e.clientId}get requestOrigin(){return this.browserStorage.getTemporaryCache("request.origin",!0)}constructor(e,r){super(r),this.tenantId=e}login(e){return z8(this,arguments,void 0,function*(r,n=F8,i=!0){var o;const a=(r==null?void 0:r.loginHint)||((o=this.account)===null||o===void 0?void 0:o.username),s=(r==null?void 0:r.scopes)||[],c=Object.assign(Object.assign({},r),{loginHint:a,scopes:s});if(a&&i){this.logger.verbose("Attempting to login in silently");try{return yield this.ssoSilent(c)}catch{this.logger.verbose("Silent login attempt failed")}}switch(this.logger.verbose(`Attempting to login in by [${n}]`),n){case"popup":return this.loginPopup(c);case"redirect":return this.loginRedirect(c)}})}acquireToken(){return z8(this,arguments,void 0,function*(e={scopes:[]},r=F8,n=!0){const i=yield this.account;if(n&&i){this.logger.verbose("Attempting to acquire token in silently");try{return yield this.acquireTokenSilent(Object.assign({account:i},e))}catch{this.logger.info("Expected to navigate away from the current page but timeout occurred.")}}switch(this.logger.verbose(`Attempting to acquire token by [${r}]`),r){case"popup":return this.acquireTokenPopup(e);case"redirect":return this.acquireTokenRedirect(e)}})}}const cN=(t,e=window.location.origin)=>{t=t.match(/^http[s]?/)?t:e+t;const{origin:r,pathname:n}=new URL(t);return r+n.replace(/([^:]\/)\/+/g,"$1")},lN=(t,e,r,n,i)=>{const o=Object.assign({clientId:e,redirectUri:cN(r||""),navigateToLoginRequestUrl:!1,authority:`https://login.microsoftonline.com/${t}`},n==null?void 0:n.auth),a=Object.assign({cacheLocation:"localStorage"},n==null?void 0:n.cache),s=n==null?void 0:n.system;return new(i||sN)(t,{auth:o,cache:a,system:s})};class Wk extends O0{constructor(e){super({logLevel:e,loggerCallback:(...r)=>this.loggerCallback(...r)}),this.getLogType=r=>{switch(r){case Bt.Error:return"error";case Bt.Warning:return"warn";case Bt.Info:return"info";case Bt.Verbose:default:return"debug"}}}loggerCallback(e,r,n){console[this.getLogType(e)]("%c FUSION::MSAL %c %s","border: 1px solid;","border: none;",r)}}var gv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const dN="default";class uN{get defaultClient(){return this.getClient(dN)}get defaultAccount(){return this.defaultClient.account}get defaultConfig(){return this._config.defaultConfig}constructor(e){this._config=e,this._clients={}}getClient(e){return this._clients[e]||(this._clients[e]=this.createClient(e)),this._clients[e]}createClient(e){const r=e?this._config.getClientConfig(e):this._config.defaultConfig;if(!r)throw Error("Could not find any config");const n=lN(r.tenantId,r.clientId,r.redirectUri,r.config);return n.setLogger(new Wk(0)),n}handleRedirect(){return gv(this,void 0,void 0,function*(){const{redirectUri:e}=this.defaultConfig||{};if(window.location.pathname===e){const r=this.defaultClient,n=r.getLogger(),{requestOrigin:i}=r;yield r.handleRedirectPromise(),i===e?(n.warning(`detected callback loop from url ${e}, redirecting to root`),window.location.replace("/")):window.location.replace(i||"/")}return null})}acquireToken(e){return this.defaultClient.acquireToken(e)}acquireAccessToken(e){return gv(this,void 0,void 0,function*(){const r=yield this.acquireToken(e);return r?r.accessToken:void 0})}login(){return gv(this,void 0,void 0,function*(){yield this.defaultClient.login()})}}var hN=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Gk={name:"auth",configure:t=>{var e;const r=new tO;return!((e=t==null?void 0:t.auth)===null||e===void 0)&&e.defaultConfig&&r.configureDefault(t.auth.defaultConfig),r},initialize:t=>hN(void 0,[t],void 0,function*({config:e}){const r=new uN(e);return e.requiresAuth&&(yield r.handleRedirect(),r.defaultAccount||(yield r.login())),r})},fN=(t,e)=>({module:Gk,configure:r=>{r.configureDefault(t),(e==null?void 0:e.requiresAuth)!==void 0&&(r.requiresAuth=e==null?void 0:e.requiresAuth);const{clients:n}=e??{};n&&Object.entries(n).forEach(([i,o])=>r.configureClient(i,o))}});var fy=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const pN=t=>{var e;return{id:t.id,isChildType:t.isChildType,parentTypeIds:(e=t.parentTypeIds)!==null&&e!==void 0?e:[]}},py=t=>{var e,r,n,i;return{id:t.id,externalId:(e=t.externalId)!==null&&e!==void 0?e:void 0,isActive:t.isActive,isDeleted:t.isDeleted,created:new Date(t.created),source:(r=t.source)!==null&&r!==void 0?r:void 0,title:(n=t.title)!==null&&n!==void 0?n:void 0,type:pN(t.type),value:(i=t.value)!==null&&i!==void 0?i:{}}},mN=t=>fy(void 0,void 0,void 0,function*(){const e=yield t.json();return py(e)}),vN=t=>fy(void 0,void 0,void 0,function*(){return(yield t.json()).map(py)}),gN=t=>fy(void 0,void 0,void 0,function*(){return(yield t.json()).map(py)});var yN=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},_N=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},pp;class bN{constructor(e,r={}){this.config=r,pp.set(this,void 0),yN(this,pp,e,"f")}requireInstance(e){return _N(this,pp,"f").requireInstance(e)}setContextType(e){this.config.contextType=e}setContextFilter(e){this.config.contextFilter=e}connectParentContext(e){this.config.connectParentContext=e}setContextParameterFn(e){this.config.contextParameterFn=e}setValidateContext(e){this.config.validateContext=e}setResolveContext(e){this.config.resolveContext=e}setResolveInitialContext(e){this.config.resolveInitialContext=e}setContextClient(e,r=1*60*1e3){this.config.client={get:typeof e.get=="function"?{key:({id:n})=>n,client:{fn:e.get},expire:r}:e.get,query:typeof e.query=="function"?{key:n=>JSON.stringify(n),client:{fn:e.query},expire:r}:e.query},e.related&&(this.config.client.related=typeof e.related=="function"?{key:n=>JSON.stringify(n),client:{fn:e.related},expire:r}:e.related)}}pp=new WeakMap;const Kk=/^(?:(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12})$/,Yk=(t,e=Kk)=>t.replace(/^\/+/,"").split("/").find(r=>r.match(e)),wN=t=>!!t.match(Kk);function xN(t,e){return r=>{const{extract:n=Yk,validate:i=wN}=e??{},o=n(r);if(!o)return Zt;if(i(o))return t.contextClient.resolveContext(o);throw Error(`Failed to validate context [${o}] from path [${r}]`)}}const CN=({ref:t})=>{const e=t==null?void 0:t.context;if(!e)throw Error(["resolveContextFromNavigation","ref does not support context!"].join(`
|
|
74
|
+
`));return e.currentContext?mn(e.currentContext):Zt},EN=t=>({ref:e,modules:r})=>{var n,i;const{context:o,navigation:a}=r,s=xN(o,t==null?void 0:t.path),c=(n=a==null?void 0:a.path.pathname)!==null&&n!==void 0?n:(i=e.navigation)===null||i===void 0?void 0:i.path.pathname;return Wl(c?s(c):Zt,CN({ref:e,modules:r})).pipe(TL())};var _f=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},j8=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},mp;class kN{constructor(){this.defaultExpireTime=1*60*1e3,mp.set(this,[])}addConfigBuilder(e){j8(this,mp,"f").push(e)}_getServiceProvider(e){return _f(this,void 0,void 0,function*(){var r;if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("no service services provider configures [ServicesModule]")}})}createConfig(e){return _f(this,void 0,void 0,function*(){var r,n;const i=yield j8(this,mp,"f").reduce((o,a)=>_f(this,void 0,void 0,function*(){const s=new bN(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({}));return(r=i.resolveInitialContext)!==null&&r!==void 0||(i.resolveInitialContext=EN()),(n=i.client)!==null&&n!==void 0||(i.client=yield _f(this,void 0,void 0,function*(){const a=yield(yield this._getServiceProvider(e)).createContextClient("json$");return{get:{client:{fn:s=>a.get("v1",s,{selector:mN})},key:({id:s})=>s,expire:this.defaultExpireTime},query:{client:{fn:s=>a.query("v1",{query:s},{selector:vN})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime},related:{client:{fn:s=>a.related("v1",{id:s.item.id,query:{filter:s.filter}},{selector:gN})},key:s=>JSON.stringify(s),expire:this.defaultExpireTime}}})),i})}}mp=new WeakMap;var SN=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!t(e[i],r[i]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(o=Object.keys(e),n=o.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;i--!==0;){var a=o[i];if(!t(e[a],r[a]))return!1}return!0}return e!==e&&r!==r};const AN=K5(SN);var U8;(function(t){t.IDLE="idle",t.ACTIVE="active",t.FAILED="failed",t.CANCELED="canceled"})(U8||(U8={}));const IN=t=>e=>e.pipe(k4(t)),TN=t=>e=>e.pipe(Ln(t)),PN=t=>e=>e.pipe(mt(t)),N4=t=>t.pipe(Se(e=>e.value));let bf;const RN=new Uint8Array(16);function MN(){if(!bf&&(bf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bf(RN)}const ZN=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function HN(t){return typeof t=="string"&&ZN.test(t)}const Mr=[];for(let t=0;t<256;++t)Mr.push((t+256).toString(16).slice(1));function Qk(t,e=0){return Mr[t[e+0]]+Mr[t[e+1]]+Mr[t[e+2]]+Mr[t[e+3]]+"-"+Mr[t[e+4]]+Mr[t[e+5]]+"-"+Mr[t[e+6]]+Mr[t[e+7]]+"-"+Mr[t[e+8]]+Mr[t[e+9]]+"-"+Mr[t[e+10]]+Mr[t[e+11]]+Mr[t[e+12]]+Mr[t[e+13]]+Mr[t[e+14]]+Mr[t[e+15]]}function $N(t){if(!HN(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function LN(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r));return e}const ON="6ba7b810-9dad-11d1-80b4-00c04fd430c8",NN="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function DN(t,e,r){function n(i,o,a,s){var c;if(typeof i=="string"&&(i=LN(i)),typeof o=="string"&&(o=$N(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+i.length);if(l.set(o),l.set(i,o.length),l=r(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,a){s=s||0;for(let d=0;d<16;++d)a[s+d]=l[d];return a}return Qk(l)}try{n.name=t}catch{}return n.DNS=ON,n.URL=NN,n}const VN=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),B8={randomUUID:VN};function O2(t,e,r){if(B8.randomUUID&&!e&&!t)return B8.randomUUID();t=t||{};const n=t.random||(t.rng||MN)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return Qk(n)}function FN(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function yv(t,e){return t<<e|t>>>32-e}function zN(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const a=unescape(encodeURIComponent(t));t=[];for(let s=0;s<a.length;++s)t.push(a.charCodeAt(s))}else Array.isArray(t)||(t=Array.prototype.slice.call(t));t.push(128);const n=t.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let a=0;a<i;++a){const s=new Uint32Array(16);for(let c=0;c<16;++c)s[c]=t[a*64+c*4]<<24|t[a*64+c*4+1]<<16|t[a*64+c*4+2]<<8|t[a*64+c*4+3];o[a]=s}o[i-1][14]=(t.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(t.length-1)*8&4294967295;for(let a=0;a<i;++a){const s=new Uint32Array(80);for(let f=0;f<16;++f)s[f]=o[a][f];for(let f=16;f<80;++f)s[f]=yv(s[f-3]^s[f-8]^s[f-14]^s[f-16],1);let c=r[0],l=r[1],d=r[2],u=r[3],h=r[4];for(let f=0;f<80;++f){const p=Math.floor(f/20),m=yv(c,5)+FN(p,l,d,u)+h+e[p]+s[f]>>>0;h=u,u=d,d=yv(l,30)>>>0,l=c,c=m}r[0]=r[0]+c>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+h>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const jN=DN("v5",80,zN);class D4 extends Error{constructor(e,r){super(r.message,{cause:r.cause}),this.type=e,this.name="QueryClientError",this.request=r.request}}function Bn(t){for(var e=arguments.length,r=Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];throw Error("[Immer] minified error nr: "+t+(r.length?" "+r.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function os(t){return!!t&&!!t[et]}function Gi(t){var e;return!!t&&(function(r){if(!r||typeof r!="object")return!1;var n=Object.getPrototypeOf(r);if(n===null)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===JN}(t)||Array.isArray(t)||!!t[J8]||!!(!((e=t.constructor)===null||e===void 0)&&e[J8])||my(t)||vy(t))}function q8(t){return os(t)||Bn(23,t),t[et].t}function cd(t,e,r){r===void 0&&(r=!1),Sd(t)===0?(r?Object.keys:wy)(t).forEach(function(n){r&&typeof n=="symbol"||e(n,t[n],t)}):t.forEach(function(n,i){return e(i,n,t)})}function Sd(t){var e=t[et];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:my(t)?2:vy(t)?3:0}function V4(t,e){return Sd(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function UN(t,e){return Sd(t)===2?t.get(e):t[e]}function Xk(t,e,r){var n=Sd(t);n===2?t.set(e,r):n===3?t.add(r):t[e]=r}function BN(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function my(t){return QN&&t instanceof Map}function vy(t){return XN&&t instanceof Set}function Er(t){return t.o||t.t}function gy(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=eD(t);delete e[et];for(var r=wy(e),n=0;n<r.length;n++){var i=r[n],o=e[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function yy(t,e){return e===void 0&&(e=!1),_y(t)||os(t)||!Gi(t)||(Sd(t)>1&&(t.set=t.add=t.clear=t.delete=qN),Object.freeze(t),e&&cd(t,function(r,n){return yy(n,!0)},!0)),t}function qN(){Bn(2)}function _y(t){return t==null||typeof t!="object"||Object.isFrozen(t)}function xo(t){var e=z4[t];return e||Bn(18,t),e}function WN(t,e){z4[t]||(z4[t]=e)}function N2(){return Fh}function _v(t,e){e&&(xo("Patches"),t.u=[],t.s=[],t.v=e)}function D2(t){F4(t),t.p.forEach(GN),t.p=null}function F4(t){t===Fh&&(Fh=t.l)}function W8(t){return Fh={p:[],l:Fh,h:t,m:!0,_:0}}function GN(t){var e=t[et];e.i===0||e.i===1?e.j():e.g=!0}function bv(t,e){e._=e.p.length;var r=e.p[0],n=t!==void 0&&t!==r;return e.h.O||xo("ES5").S(e,t,n),n?(r[et].P&&(D2(e),Bn(4)),Gi(t)&&(t=V2(e,t),e.l||F2(e,t)),e.u&&xo("Patches").M(r[et].t,t,e.u,e.s)):t=V2(e,r,[]),D2(e),e.u&&e.v(e.u,e.s),t!==Jk?t:void 0}function V2(t,e,r){if(_y(e))return e;var n=e[et];if(!n)return cd(e,function(s,c){return G8(t,n,e,s,c,r)},!0),e;if(n.A!==t)return e;if(!n.P)return F2(t,n.t,!0),n.t;if(!n.I){n.I=!0,n.A._--;var i=n.i===4||n.i===5?n.o=gy(n.k):n.o,o=i,a=!1;n.i===3&&(o=new Set(i),i.clear(),a=!0),cd(o,function(s,c){return G8(t,n,i,s,c,r,a)}),F2(t,i,!1),r&&t.u&&xo("Patches").N(n,r,t.u,t.s)}return n.o}function G8(t,e,r,n,i,o,a){if(os(i)){var s=V2(t,i,o&&e&&e.i!==3&&!V4(e.R,n)?o.concat(n):void 0);if(Xk(r,n,s),!os(s))return;t.m=!1}else a&&r.add(i);if(Gi(i)&&!_y(i)){if(!t.h.D&&t._<1)return;V2(t,i),e&&e.A.l||F2(t,i)}}function F2(t,e,r){r===void 0&&(r=!1),!t.l&&t.h.D&&t.m&&yy(e,r)}function wv(t,e){var r=t[et];return(r?Er(r):t)[e]}function K8(t,e){if(e in t)for(var r=Object.getPrototypeOf(t);r;){var n=Object.getOwnPropertyDescriptor(r,e);if(n)return n;r=Object.getPrototypeOf(r)}}function Uo(t){t.P||(t.P=!0,t.l&&Uo(t.l))}function xv(t){t.o||(t.o=gy(t.t))}function Vh(t,e,r){var n=my(e)?xo("MapSet").F(e,r):vy(e)?xo("MapSet").T(e,r):t.O?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:N2(),P:!1,I:!1,R:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=s,l=j4;a&&(c=[s],l=Eu);var d=Proxy.revocable(c,l),u=d.revoke,h=d.proxy;return s.k=h,s.j=u,h}(e,r):xo("ES5").J(e,r);return(r?r.A:N2()).p.push(n),n}function KN(t){return os(t)||Bn(22,t),function e(r){if(!Gi(r))return r;var n,i=r[et],o=Sd(r);if(i){if(!i.P&&(i.i<4||!xo("ES5").K(i)))return i.t;i.I=!0,n=Y8(r,o),i.I=!1}else n=Y8(r,o);return cd(n,function(a,s){i&&UN(i.t,a)===s||Xk(n,a,e(s))}),o===3?new Set(n):n}(t)}function Y8(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return gy(t)}function YN(){function t(s,c){function l(){this.constructor=s}i(s,c),s.prototype=(l.prototype=c.prototype,new l)}function e(s){s.o||(s.R=new Map,s.o=new Map(s.t))}function r(s){s.o||(s.o=new Set,s.t.forEach(function(c){if(Gi(c)){var l=Vh(s.A.h,c,s);s.p.set(c,l),s.o.add(l)}else s.o.add(c)}))}function n(s){s.g&&Bn(3,JSON.stringify(Er(s)))}var i=function(s,c){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,d){l.__proto__=d}||function(l,d){for(var u in d)d.hasOwnProperty(u)&&(l[u]=d[u])})(s,c)},o=function(){function s(l,d){return this[et]={i:2,l:d,A:d?d.A:N2(),P:!1,I:!1,o:void 0,R:void 0,t:l,k:this,C:!1,g:!1},this}t(s,Map);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Er(this[et]).size}}),c.has=function(l){return Er(this[et]).has(l)},c.set=function(l,d){var u=this[et];return n(u),Er(u).has(l)&&Er(u).get(l)===d||(e(u),Uo(u),u.R.set(l,!0),u.o.set(l,d),u.R.set(l,!0)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[et];return n(d),e(d),Uo(d),d.t.has(l)?d.R.set(l,!1):d.R.delete(l),d.o.delete(l),!0},c.clear=function(){var l=this[et];n(l),Er(l).size&&(e(l),Uo(l),l.R=new Map,cd(l.t,function(d){l.R.set(d,!1)}),l.o.clear())},c.forEach=function(l,d){var u=this;Er(this[et]).forEach(function(h,f){l.call(d,u.get(f),f,u)})},c.get=function(l){var d=this[et];n(d);var u=Er(d).get(l);if(d.I||!Gi(u)||u!==d.t.get(l))return u;var h=Vh(d.A.h,u,d);return e(d),d.o.set(l,h),h},c.keys=function(){return Er(this[et]).keys()},c.values=function(){var l,d=this,u=this.keys();return(l={})[wf]=function(){return d.values()},l.next=function(){var h=u.next();return h.done?h:{done:!1,value:d.get(h.value)}},l},c.entries=function(){var l,d=this,u=this.keys();return(l={})[wf]=function(){return d.entries()},l.next=function(){var h=u.next();if(h.done)return h;var f=d.get(h.value);return{done:!1,value:[h.value,f]}},l},c[wf]=function(){return this.entries()},s}(),a=function(){function s(l,d){return this[et]={i:3,l:d,A:d?d.A:N2(),P:!1,I:!1,o:void 0,t:l,k:this,p:new Map,g:!1,C:!1},this}t(s,Set);var c=s.prototype;return Object.defineProperty(c,"size",{get:function(){return Er(this[et]).size}}),c.has=function(l){var d=this[et];return n(d),d.o?!!d.o.has(l)||!(!d.p.has(l)||!d.o.has(d.p.get(l))):d.t.has(l)},c.add=function(l){var d=this[et];return n(d),this.has(l)||(r(d),Uo(d),d.o.add(l)),this},c.delete=function(l){if(!this.has(l))return!1;var d=this[et];return n(d),r(d),Uo(d),d.o.delete(l)||!!d.p.has(l)&&d.o.delete(d.p.get(l))},c.clear=function(){var l=this[et];n(l),Er(l).size&&(r(l),Uo(l),l.o.clear())},c.values=function(){var l=this[et];return n(l),r(l),l.o.values()},c.entries=function(){var l=this[et];return n(l),r(l),l.o.entries()},c.keys=function(){return this.values()},c[wf]=function(){return this.values()},c.forEach=function(l,d){for(var u=this.values(),h=u.next();!h.done;)l.call(d,h.value,h.value,this),h=u.next()},s}();WN("MapSet",{F:function(s,c){return new o(s,c)},T:function(s,c){return new a(s,c)}})}var Q8,Fh,by=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",QN=typeof Map<"u",XN=typeof Set<"u",X8=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Jk=by?Symbol.for("immer-nothing"):((Q8={})["immer-nothing"]=!0,Q8),J8=by?Symbol.for("immer-draftable"):"__$immer_draftable",et=by?Symbol.for("immer-state"):"__$immer_state",wf=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",JN=""+Object.prototype.constructor,wy=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,eD=Object.getOwnPropertyDescriptors||function(t){var e={};return wy(t).forEach(function(r){e[r]=Object.getOwnPropertyDescriptor(t,r)}),e},z4={},j4={get:function(t,e){if(e===et)return t;var r=Er(t);if(!V4(r,e))return function(i,o,a){var s,c=K8(o,a);return c?"value"in c?c.value:(s=c.get)===null||s===void 0?void 0:s.call(i.k):void 0}(t,r,e);var n=r[e];return t.I||!Gi(n)?n:n===wv(t.t,e)?(xv(t),t.o[e]=Vh(t.A.h,n,t)):n},has:function(t,e){return e in Er(t)},ownKeys:function(t){return Reflect.ownKeys(Er(t))},set:function(t,e,r){var n=K8(Er(t),e);if(n!=null&&n.set)return n.set.call(t.k,r),!0;if(!t.P){var i=wv(Er(t),e),o=i==null?void 0:i[et];if(o&&o.t===r)return t.o[e]=r,t.R[e]=!1,!0;if(BN(r,i)&&(r!==void 0||V4(t.t,e)))return!0;xv(t),Uo(t)}return t.o[e]===r&&(r!==void 0||e in t.o)||Number.isNaN(r)&&Number.isNaN(t.o[e])||(t.o[e]=r,t.R[e]=!0),!0},deleteProperty:function(t,e){return wv(t.t,e)!==void 0||e in t.t?(t.R[e]=!1,xv(t),Uo(t)):delete t.R[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var r=Er(t),n=Reflect.getOwnPropertyDescriptor(r,e);return n&&{writable:!0,configurable:t.i!==1||e!=="length",enumerable:n.enumerable,value:r[e]}},defineProperty:function(){Bn(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Bn(12)}},Eu={};cd(j4,function(t,e){Eu[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Eu.deleteProperty=function(t,e){return Eu.set.call(this,t,e,void 0)},Eu.set=function(t,e,r){return j4.set.call(this,t[0],e,r,t[0])};var tD=function(){function t(r){var n=this;this.O=X8,this.D=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var c=n;return function(m){var w=this;m===void 0&&(m=s);for(var g=arguments.length,v=Array(g>1?g-1:0),b=1;b<g;b++)v[b-1]=arguments[b];return c.produce(m,function(E){var k;return(k=o).call.apply(k,[w,E].concat(v))})}}var l;if(typeof o!="function"&&Bn(6),a!==void 0&&typeof a!="function"&&Bn(7),Gi(i)){var d=W8(n),u=Vh(n,i,void 0),h=!0;try{l=o(u),h=!1}finally{h?D2(d):F4(d)}return typeof Promise<"u"&&l instanceof Promise?l.then(function(m){return _v(d,a),bv(m,d)},function(m){throw D2(d),m}):(_v(d,a),bv(l,d))}if(!i||typeof i!="object"){if((l=o(i))===void 0&&(l=i),l===Jk&&(l=void 0),n.D&&yy(l,!0),a){var f=[],p=[];xo("Patches").M(i,l,f,p),a(f,p)}return l}Bn(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(l){for(var d=arguments.length,u=Array(d>1?d-1:0),h=1;h<d;h++)u[h-1]=arguments[h];return n.produceWithPatches(l,function(f){return i.apply(void 0,[f].concat(u))})};var a,s,c=n.produce(i,o,function(l,d){a=l,s=d});return typeof Promise<"u"&&c instanceof Promise?c.then(function(l){return[l,a,s]}):[c,a,s]},typeof(r==null?void 0:r.useProxies)=="boolean"&&this.setUseProxies(r.useProxies),typeof(r==null?void 0:r.autoFreeze)=="boolean"&&this.setAutoFreeze(r.autoFreeze)}var e=t.prototype;return e.createDraft=function(r){Gi(r)||Bn(8),os(r)&&(r=KN(r));var n=W8(this),i=Vh(this,r,void 0);return i[et].C=!0,F4(n),i},e.finishDraft=function(r,n){var i=r&&r[et],o=i.A;return _v(o,n),bv(void 0,o)},e.setAutoFreeze=function(r){this.D=r},e.setUseProxies=function(r){r&&!X8&&Bn(20),this.O=r},e.applyPatches=function(r,n){var i;for(i=n.length-1;i>=0;i--){var o=n[i];if(o.path.length===0&&o.op==="replace"){r=o.value;break}}i>-1&&(n=n.slice(i+1));var a=xo("Patches").$;return os(r)?a(r,n):this.produce(r,function(s){return a(s,n)})},t}(),Xn=new tD,eS=Xn.produce;Xn.produceWithPatches.bind(Xn);Xn.setAutoFreeze.bind(Xn);Xn.setUseProxies.bind(Xn);Xn.applyPatches.bind(Xn);Xn.createDraft.bind(Xn);Xn.finishDraft.bind(Xn);const Ad=(...t)=>Ue(e=>t.includes(e.type));var Gr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},io,Ri;class h1 extends Ne{get action$(){return Gr(this,io,"f").asObservable()}get value(){return Gr(this,Ri,"f").value}get closed(){return Gr(this,Ri,"f").closed||Gr(this,io,"f").closed}constructor(e,r){super(i=>Gr(this,Ri,"f").subscribe(i)),io.set(this,new rn),Ri.set(this,void 0);const n="getInitialState"in e?e.getInitialState():r;rD(this,Ri,new Ed(n),"f"),Gr(this,io,"f").pipe(Ak(e,n),kk()).subscribe(Gr(this,Ri,"f")),this.reset=()=>Gr(this,Ri,"f").next(n)}next(e){Gr(this,io,"f").next(e)}addEffect(e,r){const n=typeof e=="string"?this.action$.pipe(Ad(e)):this.action$,i=r||e;return n.pipe(Ln(o=>Dt(new Promise((a,s)=>{try{a(i(o,this.value))}catch(c){s(c)}})).pipe(Xt(a=>(console.warn("unhandled effect",a),Zt)))),Ue(o=>!!o),w2(b2)).subscribe(Gr(this,io,"f"))}addEpic(e){return this.addFlow(e)}addFlow(e){const r=e(this.action$,this);if(!r)throw new TypeError(`addEpic: one of the provided effects "${e.name||"<anonymous>"}" does not return a stream. Double check you're not missing a return statement!`);return r.pipe(Xt(n=>(console.trace("unhandled exception, epic closed!",n),Zt)),w2(b2)).subscribe(Gr(this,io,"f"))}unsubscribe(){Gr(this,io,"f").unsubscribe(),Gr(this,Ri,"f").unsubscribe()}complete(){Gr(this,io,"f").complete(),Gr(this,Ri,"f").complete()}asObservable(){return Gr(this,Ri,"f").asObservable()}}io=new WeakMap,Ri=new WeakMap;const tS=(t,e)=>Object.entries(t).reduce((r,[n,i])=>Object.assign(r,{[n]:typeof i=="function"?(...o)=>e.next(i(...o)):tS(i,e)}),{});function gr(t,e){function r(...n){if(e){const i=e(...n);if(!i)throw new Error("prepareAction did not return an object");return Object.assign(Object.assign({type:t,payload:i.payload},"meta"in i&&{meta:i.meta}),"error"in i&&{error:i.error})}return{type:t,payload:n[0]}}return r.toString=()=>`${t}`,r.type=t,r.match=n=>n.type===t,r}const vp="::",xy=t=>new RegExp(`${vp}${t}$`),eb=t=>t.type.replace(xy("\\w+$"),"");function fo(t,e,r,n){const i=gr([t,"request"].join(vp),e);return r&&Object.assign(i,{success:gr([t,"success"].join(vp),r)}),n&&Object.assign(i,{failure:gr([t,"failure"].join(vp),n)}),i}const nD=t=>!!t.type.match(/::request$/),iD=t=>!!t.type.match(xy("success")),oD=t=>!!t.type.match(xy("failure")),aD=t=>iD(t)||oD(t);function tb(t){return Gi(t)?eS(t,()=>{}):t}function sD(t){return typeof t=="function"}function Id(t,e){const[r,n,i]=cD(e);let o;if(sD(t))o=()=>tb(t());else{const s=tb(t);o=()=>s}function a(s=o(),c){let l=[r[c.type],...n.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return l.filter(d=>!!d).length===0&&(l=[i]),l.reduce((d,u)=>{if(u)if(os(d)){const f=u(d,c);return f===void 0?d:f}else{if(Gi(d))return eS(d,h=>u(h,c));{const h=u(d,c);if(h===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return d},s)}return a.getInitialState=o,a}function cD(t){const e={},r=[];let n;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(s in e)throw new Error("addCase cannot be called with two reducers for the same action type");return e[s]=a,i},addMatcher(o,a){return r.push({matcher:o,reducer:a}),i},addDefaultCase(o){return n=o,i}};return t(i),[e,r,n]}function lD(t,e){const r=typeof e=="function"?e:Id(e.initial,o=>e.builder(o,t)),n=new h1(r),i=tS(t,n);return{actions:t,dispatch:i,subject:n}}const dD=()=>({request:gr("client/request",(e,r)=>{var n,i,o;return r??(r={}),(n=r.transaction)!==null&&n!==void 0||(r.transaction=O2()),(i=r.created)!==null&&i!==void 0||(r.created=Date.now()),(o=r.task)!==null&&o!==void 0||(r.task=new ik),{payload:e,meta:r}}),retry:gr("client/retry",e=>({payload:e})),success:gr("client/success",(e,r)=>({payload:e,meta:r})),cancel:gr("client/cancel",e=>({payload:e})),failure:gr("client/failure",(e,r)=>({payload:e,meta:r})),error:gr("client/error",(e,r)=>({payload:e,meta:r}))}),Ar=dD(),rS=t=>e=>e.pipe(Ue(Ar.request.match),Ln(r=>{const{meta:n}=r,{transaction:i}=n,o=new AbortController,{signal:a}=o;return new Ne(s=>{s.add(e.pipe(Ue(Ar.cancel.match)).subscribe(c=>{c.payload.transaction===i&&(a.aborted||o.abort(),s.complete())})),s.add(Dt(t(r,a)).subscribe({next:c=>s.next(c),error:c=>s.next(Ar.error(c,{request:r})),complete:()=>s.complete()}))})})),uD=t=>(t=Object.assign({},{count:0,delay:0},t),(e,r)=>e.pipe(rS(n=>e.pipe(Ue(Ar.failure.match),Ue(i=>i.meta.request===n),ay(r),mt(([i,o])=>{var a,s;const{transaction:c}=n.meta,l=o[c];if(!l)return Zt;const d=(s=(a=l.retry)===null||a===void 0?void 0:a.length)!==null&&s!==void 0?s:0,u=Object.assign({},t,n.meta.retry);if(d>=u.count)throw u.count?Error("maximum retries executed!",{cause:i.payload}):i.payload;return(typeof u.delay=="function"?Dt(u.delay(i.payload.cause)).pipe(Xt(f=>{throw Error("failed to resolve delay",{cause:f})})):kL(u.delay)).pipe(Se(()=>Ar.retry(n)))}))))),hD=t=>e=>e.pipe(rS((r,n)=>Dt(t(r.payload,n)).pipe(Se(i=>Ar.success(i,{request:r})),Xt(i=>mn(Ar.failure(Error(`failed to execute request for transaction ${r.meta.transaction}`,{cause:i}),{request:r})))))),fD=t=>t.pipe(Ue(Ar.retry.match),Se(e=>e.payload)),nS=()=>Ue(t=>t.status==="complete"),pD=(t={})=>Id(t,e=>e.addCase(Ar.request,(r,n)=>{const{transaction:i,task:o,ref:a,created:s}=n.meta;r[i]={transaction:i,task:o,ref:a,created:s}}).addCase(Ar.success,(r,n)=>{const{request:i}=n.meta,{transaction:o,ref:a}=i.meta,s=r[o];if(s){const c={status:"complete",transaction:o,ref:a,value:n.payload,args:i.payload,created:s.created,completed:Date.now()};s.task.next(c),s.task.complete()}delete r[o]}).addCase(Ar.retry,(r,n)=>{var i;const{transaction:o}=n.payload.meta,a=r[o];a&&((i=a.retry)!==null&&i!==void 0||(a.retry=[]),a.retry.push(Date.now()))}).addCase(Ar.cancel,(r,n)=>{const{transaction:i,reason:o}=n.payload;if(r[i]){const a=Object.assign({},q8(r[i]));a.task.error(new D4("abort",{request:a,message:o??"request was canceled"})),delete r[i]}}).addCase(Ar.failure,(r,n)=>{var i;const{payload:o,meta:a}=n,{transaction:s}=a.request.meta,c=r[s];c&&((i=c.errors)!==null&&i!==void 0||(c.errors=[]),c.errors.push(o))}).addCase(Ar.error,(r,n)=>{const{payload:i,meta:o}=n,{transaction:a}=o.request.meta;if(r[a]){const s=Object.assign({},q8(r[a]));s.task.error(new D4("error",{request:s,message:`failed to process task [${a}]`,cause:i.cause})),delete r[a]}}));var mD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},jt=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},rb=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},tr,Rs;class nb extends Ne{get closed(){return jt(this,tr,"f").closed}get state$(){return jt(this,tr,"f")}get action$(){return jt(this,tr,"f").action$}get success$(){return this.action$.pipe(Ue(Ar.success.match),Se(({payload:e})=>e))}get error$(){return this.action$.pipe(Ad("client/error"),ay(jt(this,tr,"f")),Se(([e,r])=>{const{payload:n,meta:i}=e,{transaction:o}=i.request.meta,a=r[e.meta.request.meta.transaction];return new D4("error",{request:a,message:`failed to process task [${o}]`,cause:n})}))}constructor(e,r){super(o=>jt(this,tr,"f").subscribe(o)),tr.set(this,void 0),Rs.set(this,void 0);const n={};rb(this,tr,new h1(pD(n)),"f"),rb(this,Rs,new Tr(()=>jt(this,tr,"f").complete()),"f"),jt(this,Rs,"f").add(jt(this,tr,"f").addFlow(hD(e))),jt(this,Rs,"f").add(jt(this,tr,"f").addFlow(fD));const i=Object.assign({count:0,delay:0},r==null?void 0:r.retry);jt(this,Rs,"f").add(jt(this,tr,"f").addFlow(uD(i)))}next(e,r){const{ref:n,retry:i,task:o}=r??{},a=Ar.request(e,{ref:n,retry:i,task:o});return jt(this,tr,"f").next(a),a.meta}nextAsync(e,r){return mD(this,void 0,void 0,function*(){return $r(this.next(e,r).task.pipe(nS()))})}getTaskByTransaction(e){const r=jt(this,tr,"f").value[e];return r==null?void 0:r.task}getTaskByRef(e){const r=Object.values(jt(this,tr,"f").value).find(n=>n.ref===e);return r==null?void 0:r.task}cancelTaskByRef(e,r){const n=Object.values(jt(this,tr,"f").value).find(i=>i.ref===e);n!=null&&n.ref&&this.cancel(n.transaction,r)}cancel(e,r){if(e)jt(this,tr,"f").value[e]&&(r??(r=`[${e}]: transaction canceled`),jt(this,tr,"f").next(Ar.cancel({transaction:e,reason:r})));else for(const n of Object.keys(jt(this,tr,"f").value))this.cancel(n,"all transactions canceled")}on(e,r){return jt(this,tr,"f").addEffect(Ar[e].type,n=>{r(n,this)})}complete(){jt(this,Rs,"f").unsubscribe()}asObservable(){return jt(this,tr,"f").asObservable()}}tr=new WeakMap,Rs=new WeakMap;function vD(){return{set:gr("cache/set",(t,e)=>({payload:{key:t,entry:e}})),remove:gr("cache/remove",t=>({payload:t})),invalidate:gr("cache/invalidate",t=>({payload:t})),trim:gr("cache/trim",t=>({payload:t}))}}const qc=vD(),gD=(t,e)=>{var r,n;return((r=e.updated)!==null&&r!==void 0?r:0)-((n=t.updated)!==null&&n!==void 0?n:0)};function yD(t,e={}){return Id(e,r=>r.addCase(t.set,(n,i)=>{var o;const{key:a,entry:s}=i.payload,c=n[a];if(c)c.updated=Date.now(),(o=c.updates)!==null&&o!==void 0||(c.updates=0),c.updates++;else{const l=Date.now();n[a]=Object.assign(Object.assign({},s),{created:l,updated:l})}}).addCase(t.remove,(n,i)=>{delete n[i.payload]}).addCase(t.invalidate,(n,i)=>{const o=n[i.payload];o&&delete o.updated}).addCase(t.trim,(n,i)=>{var o,a;const{payload:s}=i,c=(o=s.sort)!==null&&o!==void 0?o:gD,l=Object.keys(n),d=Object.entries(n).filter(([u,h])=>!s.validate||s.validate(h)).sort((u,h)=>c(u[1],h[1])).slice(0,(a=s.size)!==null&&a!==void 0?a:Number.MAX_SAFE_INTEGER).map(([u])=>u);if(l.length!==d.length)for(const u of l){const h=d.indexOf(u);h!==-1?d.splice(h,1):delete n[u]}}))}var Ti=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},_D=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},An;class ib{get state(){return Ti(this,An,"f").value}get state$(){return Ti(this,An,"f").asObservable()}constructor(e){An.set(this,void 0);const{trimming:r,initial:n}=e??{};_D(this,An,new h1(yD(qc,n)),"f"),r&&Ti(this,An,"f").addEffect("cache/set",()=>Ti(this,An,"f").next(qc.trim(r)))}setItem(...e){Ti(this,An,"f").next(qc.set(...e))}getItem(e){return Ti(this,An,"f").value[e]}removeItem(e){Ti(this,An,"f").next(qc.remove(e))}invalidate(e){Ti(this,An,"f").next(qc.invalidate(e))}trim(e){Ti(this,An,"f").next(qc.trim(e))}reset(){Ti(this,An,"f").reset()}complete(){Ti(this,An,"f").complete()}}An=new WeakMap;var ft=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Wc=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},bD=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r},Ms,oo,ka,sl,cl,ku,gp,U4;const wD=(t=0)=>e=>{var r;return((r=e.updated)!==null&&r!==void 0?r:0)+t>Date.now()},xD=t=>{if(typeof t=="function")return t;switch(t){case"concat":return IN;case"merge":return TN;case"switch":default:return PN}};class Hr{get client(){return ft(this,oo,"f")}get cache(){return ft(this,ka,"f")}constructor(e){var r;Ms.set(this,new Tr),oo.set(this,void 0),ka.set(this,void 0),sl.set(this,new rn),cl.set(this,{}),ku.set(this,void 0),gp.set(this,void 0),U4.set(this,O2()),Wc(this,ku,i=>jN(e.key(i),ft(this,U4,"f")),"f"),Wc(this,gp,(r=e==null?void 0:e.validate)!==null&&r!==void 0?r:wD(e==null?void 0:e.expire),"f"),e.client instanceof nb?Wc(this,oo,e.client,"f"):(Wc(this,oo,new nb(e.client.fn,e.client.options),"f"),ft(this,Ms,"f").add(()=>ft(this,oo,"f").complete())),e.cache instanceof ib?Wc(this,ka,e.cache,"f"):(Wc(this,ka,new ib(e.cache||{}),"f"),ft(this,Ms,"f").add(()=>ft(this,ka,"f").complete()));const n=xD(e.queueOperator);ft(this,Ms,"f").add(()=>ft(this,sl,"f").complete()),ft(this,Ms,"f").add(ft(this,sl,"f").pipe(n(i=>{const{args:o,options:a}=i;return new Ne(s=>{const{task:c,transaction:l}=ft(this,oo,"f").next(o,a);s.add(c.pipe(Xt(()=>Zt)).subscribe(s)),s.add(()=>{setTimeout(()=>ft(this,oo,"f").cancel(l))})})}),nS(),Ik(()=>!ft(this,oo,"f").closed)).subscribe(i=>{const{args:o,value:a,transaction:s,ref:c}=i,l=c??ft(this,ku,"f").call(this,o);ft(this,ka,"f").setItem(l,{value:a,args:o,transaction:s})}))}next(e,r){ft(this,sl,"f").next({args:e,options:r})}query(e,r){return this._query(e,r)}queryAsync(e,r){const n=r||{},{awaitResolve:i}=n,o=bD(n,["awaitResolve"]);return(i?yr:$r)(this._query(e,o))}complete(){ft(this,Ms,"f").unsubscribe()}_query(e,r){const n=ft(this,ku,"f").call(this,e),i=this._createTask(n,e,r);return r!=null&&r.signal&&r.signal.addEventListener("abort",()=>{ft(this,oo,"f").cancelTaskByRef(n,"abort signal triggered by caller")}),i}_createTask(e,r,n){const i=new rn,o=new Ne(a=>{var s;if(!ft(this,cl,"f")[e])ft(this,cl,"f")[e]=o;else return ft(this,cl,"f")[e].subscribe(a);i.pipe(C2(()=>{delete ft(this,cl,"f")[e]})).subscribe(a);const c=ft(this,ka,"f").getItem(e);c&&i.next(Object.assign(Object.assign({},c),{status:"cache"}));const l=((s=n==null?void 0:n.cache)===null||s===void 0?void 0:s.validate)||ft(this,gp,"f");c&&l(c,r)?i.complete():ft(this,sl,"f").next({args:r,options:{ref:e,task:i,retry:n==null?void 0:n.retry}})}).pipe(ML());return o}}Ms=new WeakMap,oo=new WeakMap,ka=new WeakMap,sl=new WeakMap,cl=new WeakMap,ku=new WeakMap,gp=new WeakMap,U4=new WeakMap;Hr.extractQueryValue=N4;var ba=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ob=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Su,$o;class CD extends Ne{get currentContext(){return ba(this,$o,"f").value}get currentContext$(){return ba(this,$o,"f").asObservable()}get client(){return ba(this,Su,"f")}constructor(e){super(r=>ba(this,$o,"f").subscribe(r)),Su.set(this,void 0),$o.set(this,void 0),ob(this,Su,new Hr(e),"f"),ob(this,$o,new Ed(void 0),"f")}setCurrentContext(e){typeof e=="string"?this.resolveContext(e).pipe(Xt(()=>Zt)).subscribe(r=>this.setCurrentContext(r)):AN(e,ba(this,$o,"f").value)||ba(this,$o,"f").next(e)}resolveContext(e){return ba(this,Su,"f").query({id:e}).pipe(Se(r=>r.value),Xt(r=>{throw r.cause?r.cause:r}))}resolveContextAsync(e,r){return(r!=null&&r.awaitResolve?yr:$r)(this.resolveContext(e))}dispose(){ba(this,$o,"f").complete()}}Su=new WeakMap,$o=new WeakMap;var tu=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Je=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ws=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Lo,yp,Au,Mi,Zs,Hs,Iu,_p,bp;let ED=class{get contextClient(){return Je(this,Lo,"f")}get queryClient(){return Je(this,yp,"f")}get currentContext$(){return Je(this,Lo,"f").currentContext$}get currentContext(){return Je(this,Lo,"f").currentContext}set currentContext(e){if(console.warn("@deprecated","ContextProvider.currentContext","use setCurrentContextById|setCurrentContext|clearCurrentContext"),e===void 0)throw Error("not allowed to set current context as undefined undefined!");this.setCurrentContextAsync(e)}constructor(e){var r,n,i;Lo.set(this,void 0),yp.set(this,void 0),Au.set(this,void 0),Mi.set(this,void 0),Zs.set(this,new Tr),Hs.set(this,void 0),Iu.set(this,void 0),_p.set(this,void 0),bp.set(this,new rn);const{config:o,event:a}=e;e.parentContext&&console.warn("@deprecated","parentContext as arg is deprecated, use ContextProvider.connectParentContext"),ws(this,Mi,a,"f"),o.resolveContext&&(this.resolveContext=(r=o.resolveContext)===null||r===void 0?void 0:r.bind(this)),o.validateContext&&(this.validateContext=(n=o.validateContext)===null||n===void 0?void 0:n.bind(this)),ws(this,Hs,o.contextType,"f"),ws(this,Iu,o.contextFilter,"f"),ws(this,Lo,new CD(o.client.get),"f"),ws(this,yp,new Hr(o.client.query),"f"),o.client.related&&ws(this,Au,new Hr(o.client.related),"f"),ws(this,_p,(i=o.contextParameterFn)!==null&&i!==void 0?i:s=>({search:s.search,filter:{type:s.type}}),"f"),Je(this,Mi,"f")&&(Je(this,Zs,"f").add(this.currentContext$.pipe(E2()).subscribe(([s,c])=>{var l;(l=Je(this,Mi,"f"))===null||l===void 0||l.dispatchEvent("onCurrentContextChanged",{source:this,canBubble:!0,detail:{previous:s,next:c}})})),Je(this,Zs,"f").add(Je(this,Mi,"f").addEventListener("onCurrentContextChanged",s=>{s.source!==this&&s.detail.next!==void 0&&this.setCurrentContext(s.detail.next)}))),Je(this,Zs,"f").add(Je(this,bp,"f").pipe(mt(s=>s),od(s=>console.debug("ContextProvider::#contextQueue",s))).subscribe(s=>{Je(this,Lo,"f").setCurrentContext(s??null)}))}connectParentContext(e,r){const i=e.currentContext$.pipe(Ue(o=>o!==void 0),Ue((o,a)=>{var s;return r!=null&&r.skipFirst&&a<=1?(console.debug("ContextProvider::connectParentContext","skipping first item",o),!1):((s=this.currentContext)===null||s===void 0?void 0:s.id)!==(o==null?void 0:o.id)}),mt(o=>tu(this,void 0,void 0,function*(){var a;if(!o)return{next:o};const s=yield(a=Je(this,Mi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onParentContextChanged",{source:this,detail:o,cancelable:!0});return{next:o,canceled:s==null?void 0:s.canceled}})),Ue(o=>!o.canceled),mt(({next:o})=>this.setCurrentContext(o,{validate:!0,resolve:!0}).pipe(Xt(a=>(console.warn("ContextProvider::onParentContextChanged","setCurrentContext",a),Zt)))),Xt(o=>(console.warn("ContextProvider::onParentContextChanged","unhandled exception",o),Zt))).subscribe();return Je(this,Zs,"f").add(i),i}setCurrentContextById(e){return new Ne(r=>{try{Je(this,Lo,"f").resolveContext(e).pipe(Ue(n=>!!n),mt(n=>this.setCurrentContext(n))).subscribe(r)}catch(n){r.error(n)}})}setCurrentContextByIdAsync(e){return yr(this.setCurrentContextById(e))}setCurrentContext(e,r){const n=new rn,i=new rn,o=this._setCurrentContext(e,r).pipe(od(a=>i.next(a)),Gl(n),C2(()=>i.complete()),Xt(a=>(i.error(a),Zt)));return Je(this,bp,"f").next(o),i.pipe(C2(()=>n.next(!0)))}_setCurrentContext(e,r){return new Ne(n=>{var i;if(e===this.currentContext)return n.next(e),n.complete();if(e&&(r!=null&&r.validate)&&!this.validateContext(e)){if(!r.resolve)return(i=Je(this,Mi,"f"))===null||i===void 0||i.dispatchEvent("onSetContextValidationFailed",{source:this,detail:{context:e}}),n.error(Error("failed to validate provided context"));if(r.resolve)return mn(e).pipe(mt(o=>tu(this,void 0,void 0,function*(){var a;const s=yield(a=Je(this,Mi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onSetContextResolve",{source:this,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("resolving of context was canceled");return o})),mt(o=>this.resolveContext(o).pipe(Se(a=>({context:o,resolved:a})))),mt(o=>tu(this,[o],void 0,function*({context:a,resolved:s}){var c;const l=yield(c=Je(this,Mi,"f"))===null||c===void 0?void 0:c.dispatchEvent("onSetContextResolved",{source:this,cancelable:!0,detail:{context:a,resolved:s}});if(l!=null&&l.canceled)throw Error("resolving of context was canceled");return s})),mt(o=>this._setCurrentContext(o))).subscribe(n)}return mn(e).pipe(mt(o=>tu(this,void 0,void 0,function*(){var a;const s=yield(a=Je(this,Mi,"f"))===null||a===void 0?void 0:a.dispatchEvent("onCurrentContextChange",{source:this,canBubble:!0,cancelable:!0,detail:{context:o}});if(s!=null&&s.canceled)throw Error("change of context was aborted");return o}))).subscribe(o=>{n.next(o),n.complete()})})}setCurrentContextAsync(e,r){return tu(this,void 0,void 0,function*(){return yr(this.setCurrentContext(e,r))})}queryContext(e){const r=this.queryClient.query(Je(this,_p,"f").call(this,{search:e,type:Je(this,Hs,"f")})).pipe(Xt(n=>{throw n.name==="QueryClientError"?n.cause:n}),Se(n=>n.value));return Je(this,Iu,"f")?r.pipe(Se(Je(this,Iu,"f"))):r}queryContextAsync(e){return yr(this.queryContext(e))}validateContext(e){return Je(this,Hs,"f")?Je(this,Hs,"f").map(r=>r.toLowerCase()).includes(e.type.id.toLowerCase()):!0}resolveContext(e){return this.relatedContexts({item:e,filter:{type:Je(this,Hs,"f")}}).pipe(Se(r=>r.filter(n=>this.validateContext(n))),Se(r=>{const n=r.shift();if(!n)throw Error("failed to resolve context");return r.length&&console.warn("ContextProvider::relatedContext","multiple items found 🤣",r),n}))}resolveContextAsync(e){return yr(this.resolveContext(e))}relatedContexts(e){return Je(this,Au,"f")?Je(this,Au,"f").query(e).pipe(Se(({value:r})=>r),Xt(r=>{throw r.cause?r.cause:r})):yk(()=>Error("ContextProvider::relatedContexts - no client defined for resolving related context"))}relatedContextsAsync(e){return yr(this.relatedContexts(e))}clearCurrentContext(){this.setCurrentContext(null)}dispose(){Je(this,Zs,"f").unsubscribe(),Je(this,Lo,"f").dispose()}};Lo=new WeakMap,yp=new WeakMap,Au=new WeakMap,Mi=new WeakMap,Zs=new WeakMap,Hs=new WeakMap,Iu=new WeakMap,_p=new WeakMap,bp=new WeakMap;var kD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const SD="context",AD={name:SD,configure:()=>new kN,initialize:function(t){return kD(this,void 0,void 0,function*(){var e;const r=yield t.config.createConfig(t),n=t.hasModule("event")?yield t.requireInstance("event"):void 0,i=(e=t.ref)===null||e===void 0?void 0:e.context,o=new ED({config:r,event:n,parentContext:i}),a=new Tr(()=>o.dispose());return this.postInitialize=s=>new Ne(c=>{const l=r.resolveInitialContext?Dt(r.resolveInitialContext(s)).pipe(Ue(d=>!!d),mt(d=>s.modules.context.setCurrentContext(d,{validate:!0,resolve:!0}))):Zt;c.add(l.pipe(Xt(d=>(console.warn("ContextModule.postInitialize","failed to resolve initial context",d),Zt))).subscribe({next:d=>{console.debug("ContextModule.postInitialize",`initial context was resolved to [${d?d.id:"none"}]`,d)},complete:()=>{r.connectParentContext!==!1&&i&&o.connectParentContext(i),c.complete()}}))}),this.dispose=()=>a.unsubscribe(),o})}};var ab=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class ID{constructor(e){this.clientKey=e.clientKey,this.endpoint=e.endpoint,this.clientCtor=e.clientCtor}createHttpClientClient(e){return ab(this,void 0,void 0,function*(){if(!this.clientKey)throw Error("no http client for service discovery is provided!");return e.createClient(this.clientKey)})}createClient(e){return ab(this,void 0,void 0,function*(){if(!this.endpoint)throw Error("no endpoint defined!");return new this.clientCtor({http:e,endpoint:this.endpoint})})}}var Cv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class TD{constructor(e,r){this._client=e,this._http=r}get environment(){return this._client.environment}resolveServices(){return this._client.fetchEnvironment()}resolveService(e){return Cv(this,void 0,void 0,function*(){return this._client.resolveService(e)})}createClient(e,r){return Cv(this,void 0,void 0,function*(){const n=yield this.resolveService(e);if(!n)throw Error(`Could not load configuration of service [${e}]`);return this._http.createClient(Object.assign(Object.assign({},r),{baseUri:n.uri,defaultScopes:n.defaultScopes}))})}configureClient(e,r){return Cv(this,void 0,void 0,function*(){const{key:n,alias:i}=typeof e=="string"?{key:e,alias:e}:e,{uri:o,defaultScopes:a}=yield this.resolveService(n);r.addConfig(Zk(i,{baseUri:o,defaultScopes:a}))})}}var Ev=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},sb=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},PD=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Tu;const cb="services";class RD{get environment(){var e;const r=(e=sb(this,Tu,"f").cache.getItem(cb))===null||e===void 0?void 0:e.value;if(!r)throw Error("no cached environment found");return r}constructor({http:e,endpoint:r}){Tu.set(this,void 0),this.http=e,this.endpoint=r,PD(this,Tu,new Hr({client:{fn:()=>e.fetch$(r,{selector:this.selector.bind(this)})},key:()=>cb,expire:5*60*1e3}),"f")}fetchEnvironment(){return Ev(this,void 0,void 0,function*(){return $r(Hr.extractQueryValue(sb(this,Tu,"f").query(void 0,{cache:{suppressInvalid:!0}})))})}selector(e){return Ev(this,void 0,void 0,function*(){const r=yield e.json(),n=r.services.reduce((i,o)=>{var a;return Object.assign(i,{[o.key]:{clientId:r.clientId,uri:o.uri,defaultScopes:(a=o.defaultScopes)!==null&&a!==void 0?a:[r.clientId+"/.default"]}})},{});return Object.assign(Object.assign({},r),{services:n})})}resolveService(e){return Ev(this,void 0,void 0,function*(){try{const{services:r}=yield this.fetchEnvironment();return r[e]}catch(r){throw console.error(r),r}})}}Tu=new WeakMap;const MD="serviceDiscovery";var ZD=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const HD={name:MD,configure:()=>new ID({clientCtor:RD,clientKey:"service_discovery",endpoint:"/_discovery/environments/current"}),initialize:t=>ZD(void 0,[t],void 0,function*({config:e,requireInstance:r}){const n=yield r("http"),i=yield e.createHttpClientClient(n),o=yield e.createClient(i);return new TD(o,n)})};class $D{}var yi;(function(t){t.v1="1.0",t.v2="2.0"})(yi||(yi={}));class ni extends Error{constructor(e,r){super(`unsupported version ${e}`,{cause:r}),this.version=e}}const LD=(t,e)=>{var r;const n=(r=yi[t])!==null&&r!==void 0?r:t;switch(n){case yi.v2:throw new ni(t);case yi.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/contexts/${i}/?${String(o)}`}}},OD=(t,e,r)=>[LD(t,e),r],ND=(t,e,r="json")=>(n,i)=>t[r](...OD(e,n,i));var DD=["eq","ne","gt","ge","lt","le"],xf=["and","or","not"],VD=["any","all"],FD=["startswith","endswith","contains"],zD=["expand","levels","select","skip","top","count","orderby","filter"],lb=/\((.*)\)/,db=/(?!indexof)\((\w+)\)/,ub;(function(t){t.sum="sum",t.min="min",t.max="max",t.average="average",t.countdistinct="countdistinct"})(ub||(ub={}));var Zo="";function iS(t){var e=t===void 0?{}:t,r=e.select,n=e.search,i=e.skiptoken,o=e.format,a=e.top,s=e.skip,c=e.filter,l=e.transform,d=e.orderBy,u=e.key,h=e.count,f=e.expand,p=e.action,m=e.func,w="",g=[],v={};if(u!=null&&(w+="(".concat(go(u,g),")")),(c||typeof h=="object")&&(v.$filter=zh(typeof h=="object"?h:c,g)),l&&(v.$apply=oS(l)),f&&(v.$expand=wp(f)),d&&(v.$orderby=Cy(d)),h&&(typeof h=="boolean"?v.$count=!0:w+="/$count"),typeof a=="number"&&(v.$top=a),typeof s=="number"&&(v.$skip=s),p&&(w+="/".concat(p)),m){if(typeof m=="string")w+="/".concat(m);else if(typeof m=="object"){var b=Object.keys(m)[0],E=go(m[b],g);w+="/".concat(b),E!==""&&(w+="(".concat(E,")"))}}return g.length>0&&Object.assign(v,g.reduce(function(k,x){var S;return Object.assign(k,(S={},S["@".concat(x.name)]=go(x.value),S))},{})),WD(w,ur({$select:r,$search:n,$skiptoken:i,$format:o},v))}function kv(t,e,r){return r===void 0&&(r=[]),"".concat(t," eq ").concat(go(e,r))}function zh(t,e,r){return t===void 0&&(t={}),e===void 0&&(e=[]),r===void 0&&(r=""),(Array.isArray(t)?t:[t]).reduce(function(o,a){if(a){var s=n(a,e,r);s&&o.push(s)}return o},[]).join(" and ");function n(o,a,s){o===void 0&&(o={}),a===void 0&&(a=[]),s===void 0&&(s="");var c="";if(typeof o=="string")c=o;else if(o&&typeof o=="object"){var l=Object.keys(o).reduce(function(d,u){var h=o[u];if(h===void 0)return d;var f="";if(s?u===Zo?f=s:db.test(u)?f=u.replace(db,function(v,b){return b.trim()===Zo?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):lb.test(u)?f=u.replace(lb,function(v,b){return b.trim()===Zo?"(".concat(s,")"):"(".concat(s,"/").concat(b.trim(),")")}):f="".concat(s,"/").concat(u):f=u,u===Zo&&Array.isArray(h))return d.concat(h.map(function(v){return kv(f,v)}));if(["number","string","boolean"].indexOf(typeof h)!==-1||h instanceof Date||h===null)d.push(kv(f,h,a));else if(Array.isArray(h)){var p=u,m=h.map(function(v){return zh(v,a,s)}).filter(function(v){return v}).map(function(v){return xf.indexOf(p)!==-1?"(".concat(v,")"):v});m.length&&(xf.indexOf(p)!==-1?m.length&&(p==="not"?d.push(hb(m)):d.push("(".concat(m.join(" ".concat(p," ")),")"))):d.push(m.join(" ".concat(p," "))))}else if(xf.indexOf(f)!==-1){var w=f,m=Object.keys(h).map(function(b){var E;return n((E={},E[b]=h[b],E))});m.length&&(w==="not"?d.push(hb(m)):d.push("(".concat(m.join(" ".concat(w," ")),")")))}else if(typeof h=="object")if("type"in h)d.push(kv(f,h,a));else{var g=Object.keys(h);g.forEach(function(v){if(h[v]!==void 0)if(DD.indexOf(v)!==-1)d.push("".concat(f," ").concat(v," ").concat(go(h[v],a)));else if(xf.indexOf(v)!==-1)Array.isArray(h[v])?d.push(h[v].map(function(x){return"("+n(x,a,f)+")"}).join(" ".concat(v," "))):d.push("("+n(h[v],a,f)+")");else if(VD.indexOf(v)!==-1){var b=i(u.toLowerCase(),h[v],v,f);b&&d.push(b)}else if(v==="has")d.push("".concat(f," ").concat(v," ").concat(go(h[v],a)));else if(v==="in"){var E=Array.isArray(h[v])?h[v]:h[v].value.map(function(x){return{type:h[v].type,value:x}});d.push(f+" in ("+E.map(function(x){return go(x,a)}).join(",")+")")}else if(FD.indexOf(v)!==-1)d.push("".concat(v,"(").concat(f,",").concat(go(h[v],a),")"));else{var k=n(h,a,f);k&&d.push(k)}})}else throw new Error("Unexpected value type: ".concat(h));return d},[]);c=l.join(" and ")}return c}function i(o,a,s,c){var l="";if(typeof a=="string"||a instanceof String)l=jD(o,a,s,c);else if(a){var d=Array.isArray(a)?a.reduce(function(h,f){return f.hasOwnProperty(Zo)?(h.hasOwnProperty(Zo)||(h[Zo]=[]),h[Zo].push(f[Zo]),h):ur(ur({},h),f)},{}):a,u=n(d,e,o);l="".concat(c,"/").concat(s,"(").concat(u?"".concat(o,":").concat(u):"",")")}return l}}function jD(t,e,r,n){var i="",o=r=="all"?"ne":"eq";return i="".concat(n,"/").concat(r,"(").concat(t,": ").concat(t," ").concat(o," '").concat(e,"')"),i}function UD(t){return t=t.replace(/%/g,"%25"),t=t.replace(/\+/g,"%2B"),t=t.replace(/\//g,"%2F"),t=t.replace(/\?/g,"%3F"),t=t.replace(/#/g,"%23"),t=t.replace(/&/g,"%26"),t=t.replace(/'/g,"''"),t}function go(t,e){if(typeof t=="string")return"'".concat(UD(t),"'");if(t instanceof Date)return t.toISOString();if(typeof t=="number")return t;if(Array.isArray(t))return"[".concat(t.map(function(r){return go(r)}).join(","),"]");if(t===null)return t;if(typeof t=="object")switch(t.type){case"raw":case"guid":return t.value;case"duration":return"duration'".concat(t.value,"'");case"binary":return"binary'".concat(t.value,"'");case"alias":return Array.isArray(e)&&e.push(t),"@".concat(t.name);case"json":return escape(JSON.stringify(t.value));case"decimal":return"".concat(t.value,"M");default:return Object.entries(t).filter(function(r){var n=r[1];return n!==void 0}).map(function(r){var n=r[0],i=r[1];return"".concat(n,"=").concat(go(i,e))}).join(",")}return t}function wp(t){if(typeof t=="number")return t;if(typeof t=="string")return t.indexOf("/")===-1?t:t.split("/").reverse().reduce(function(r,n,i,o){return i===0?"$expand=".concat(n):i===o.length-1?"".concat(n,"(").concat(r,")"):"$expand=".concat(n,"(").concat(r,")")},"");if(Array.isArray(t))return"".concat(t.map(function(r){return wp(r)}).join(","));if(typeof t=="object"){var e=Object.keys(t);return e.some(function(r){return zD.indexOf(r.toLowerCase())!==-1})?e.map(function(r){var n;switch(r){case"filter":n=zh(t[r]);break;case"orderBy":n=Cy(t[r]);break;case"levels":case"count":case"skip":case"top":n="".concat(t[r]);break;default:n=wp(t[r])}return"$".concat(r.toLowerCase(),"=").concat(n)}).join(";"):e.map(function(r){var n=wp(t[r]);return n?"".concat(r,"(").concat(n,")"):r}).join(",")}return""}function oS(t){var e=Array.isArray(t)?t:[t],r=e.reduce(function(n,i){var o=i.aggregate,a=i.filter,s=i.groupBy,c=QE(i,["aggregate","filter","groupBy"]),l=Object.keys(c);if(l.length)throw new Error("Unsupported transform(s): ".concat(l));if(o&&n.push("aggregate(".concat(BD(o),")")),a){var d=zh(a);d&&n.push("filter(".concat(zh(d),")"))}return s&&n.push("groupby(".concat(qD(s),")")),n},[]);return r.join("/")||void 0}function BD(t){var e=Array.isArray(t)?t:[t];return e.map(function(r){return typeof r=="string"?r:Object.keys(r).map(function(n){var i=r[n];if(!i.with&&i.as)return"".concat(n," as ").concat(i.as);if(!i.with)throw new Error("'with' property required for '".concat(n,"'"));if(!i.as)throw new Error("'as' property required for '".concat(n,"'"));return"".concat(n," with ").concat(i.with," as ").concat(i.as)})}).join(",")}function qD(t){if(!t.properties)throw new Error("'properties' property required for groupBy");var e="(".concat(t.properties.join(","),")");return t.transform&&(e+=",".concat(oS(t.transform))),e}function Cy(t,e){return e===void 0&&(e=""),Array.isArray(t)?t.map(function(r){return Array.isArray(r)&&r.length===2&&["asc","desc"].indexOf(r[1])!==-1?r.join(" "):r}).map(function(r){return"".concat(e).concat(String(r))}).join(","):typeof t=="object"?Object.entries(t).map(function(r){var n=r[0],i=r[1];return Cy(i,"".concat(n,"/"))}).map(function(r){return"".concat(e).concat(r)}).join(","):"".concat(e).concat(String(t))}function WD(t,e){var r=Object.getOwnPropertyNames(e).filter(function(n){return e[n]!==void 0&&e[n]!==""}).map(function(n){return"".concat(n,"=").concat(e[n])});return r.length?"".concat(t,"?").concat(r.join("&")):t}function hb(t){return"not(".concat(t.join(" and "),")")}const GD=t=>Object.keys(t).reduce((e,r)=>{var n;switch(r){case"type":return!((n=t[r])===null||n===void 0)&&n.length?Object.assign(Object.assign({},e),{[r]:{in:t[r]}}):e;default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),KD=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:GD(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),YD=t=>typeof t=="string"?t:iS(KD(t)),QD=(t,e)=>{var r;const n=(r=yi[t])!==null&&r!==void 0?r:t;switch(n){case yi.v2:throw new ni(t);case yi.v1:default:{const{query:i,includeDeleted:o}=e,a=new URLSearchParams(YD(i));return a.append("api-version",n),o&&a.append("includeDeleted","true"),`/contexts/?${String(a)}`}}},XD=(t,e,r)=>[QD(t,e),r],JD=(t,e,r="json")=>(n,i)=>t[r](...XD(e,n,i)),eV=t=>Object.keys(t).reduce((e,r)=>{var n;switch(r){case"type":return!((n=t[r])===null||n===void 0)&&n.length?Object.assign(Object.assign({},e),{[r]:{in:t[r]}}):e;default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),tV=t=>Object.entries(t).filter(([e,r])=>!!r).reduce((e,[r,n])=>{switch(r){case"filter":return Object.assign(Object.assign({},e),{[r]:eV(n)});default:return Object.assign(Object.assign({},e),{[r]:t[r]})}},{}),rV=t=>typeof t=="string"?t:iS(tV(t)),nV=(t,e)=>{var r;const n=(r=yi[t])!==null&&r!==void 0?r:t;switch(n){case yi.v2:throw new ni(t);case yi.v1:default:{const{id:i,query:o}=e,a=new URLSearchParams(rV(o||""));return a.append("api-version",n),`/contexts/${i}/relations?${String(a)}`}}},iV=(t,e,r)=>[nV(t,e),r],oV=(t,e,r="json")=>(n,i)=>t[r](...iV(e,n,i));class aV{get Version(){return yi}constructor(e,r){this._client=e,this._method=r}get(e,...r){return ND(this._client,e,this._method)(...r)}query(e,...r){return JD(this._client,e,this._method)(...r)}related(e,...r){return oV(this._client,e,this._method)(...r)}}const sV=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},cV=(t,e,r)=>{const n=sV(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},lV=(t,e,r="fetch")=>(n,i)=>t[r](...cV(e,n,i)),dV=(t,e)=>{switch(t){case"v1":{const{id:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/bookmarks/${r}/?${String(n)}`}default:{const{id:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/bookmarks/${r}/?${String(n)}`}}},uV=(t,e,r)=>[dV(t,e),r],hV=(t,e,r="json")=>(n,i)=>t[r](...uV(e,n,i)),fV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks?${String(r)}`}}},pV=(t,e,r)=>{const n=fV(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},mV=(t,e,r="json")=>(n,i)=>t[r](...pV(e,n,i)),vV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/bookmarks/${e.id}?${String(r)}`}}},gV=(t,e,r)=>{const n=vV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},yV=(t,e,r="json")=>(n,i)=>t[r](...gV(e,n,i)),_V=t=>{switch(t){case"v1":default:{const e=new URLSearchParams;return e.append("api-version",t),`persons/me/bookmarks/?${String(e)}`}}},bV=(t,e)=>[_V(t),e],wV=(t,e,r="json")=>n=>t[r](...bV(e,n)),xV=(t,e)=>{switch(t){case"v1":default:{const r=new URLSearchParams;return r.append("api-version",t),`/persons/me/bookmarks/favourites?${String(r)}`}}},CV=(t,e,r)=>{const n=xV(t),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},EV=(t,e,r="json")=>(n,i)=>t[r](...CV(e,n,i)),kV=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version","1.0"),`/persons/me/bookmarks/favourites/${r}/?${String(n)}`}}},SV=(t,e,r)=>{const n=kV(t,e),i=Object.assign({},{method:"Delete"},r);return[n,i]},AV=(t,e,r="fetch")=>(n,i)=>t[r](...SV(e,n,i)),IV=(t,e)=>{switch(t){case"v1":default:{const{bookmarkId:r}=e,n=new URLSearchParams;return n.append("api-version",t),`/persons/me/bookmarks/favourites/${r}?${String(n)}`}}},TV=(t,e,r)=>{const n=IV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"head",headers:i},r);return[n,o]},PV=(t,e,r="json")=>(n,i)=>t[r](...TV(e,n,i));class RV{constructor(e,r){this._client=e,this._method=r}get(e,...r){return hV(this._client,e,this._method)(...r)}getAll(e){return wV(this._client,e,this._method)()}post(e,...r){return mV(this._client,e,this._method)(...r)}patch(e,...r){return yV(this._client,e,this._method)(...r)}delete(e,...r){return lV(this._client,e,this._method)(...r)}addFavorite(e,...r){return EV(this._client,e,this._method)(...r)}removeFavorite(e,...r){return AV(this._client,e,this._method)(...r)}verifyFavorite(e,...r){return PV(this._client,e,this._method)(...r)}}const MV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},ZV=(t,e,r)=>[MV(t,e),r],HV=(t,e,r="json")=>(n,i)=>t[r](...ZV(e,n,i)),$V=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},LV=(t,e,r)=>{const n=$V(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"post",body:JSON.stringify(e),headers:i},r);return[n,o]},OV=(t,e,r="json")=>(n,i)=>t[r](...LV(e,n,i)),NV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},DV=(t,e,r)=>{const n=NV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"patch",body:JSON.stringify(e),headers:i},r);return[n,o]},VV=(t,e,r="json")=>(n,i)=>t[r](...DV(e,n,i)),FV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/?${String(o)}`}}},zV=(t,e,r)=>[FV(t,e),r],jV=(t,e,r="json")=>(n,i)=>t[r](...zV(e,n,i)),UV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{id:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/notification/${i}/?${String(o)}`}}},BV=(t,e,r)=>{const n=UV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"delete",headers:i},r);return[n,o]},qV=(t,e,r="json")=>(n,i)=>t[r](...BV(e,n,i));var Ht;(function(t){t.v1="1.0",t.v2="2.0"})(Ht||(Ht={}));const WV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},GV=(t,e,r)=>{const n=WV(t,e),i=new Headers;i.append("content-type","application/json");const o=Object.assign({},{method:"put",body:JSON.stringify(e),headers:i},r);return[n,o]},KV=(t,e,r="json")=>(n,i)=>t[r](...GV(e,n,i)),YV=(t,e)=>{var r;const n=(r=Ht[t])!==null&&r!==void 0?r:t;switch(n){case Ht.v2:throw new ni(t);case Ht.v1:default:{const{userId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/person/${i}/notifications/settings/?${String(o)}`}}},QV=(t,e,r)=>[YV(t,e),r],XV=(t,e,r="json")=>(n,i)=>t[r](...QV(e,n,i));class JV{get Version(){return Ht}constructor(e,r){this._client=e,this._method=r}getAll(e,...r){return jV(this._client,e,this._method)(...r)}getById(e,...r){return HV(this._client,e,this._method)(...r)}setSeenByUser(e,...r){return VV(this._client,e,this._method)(...r)}create(e,...r){return OV(this._client,e,this._method)(...r)}delete(e,...r){return qV(this._client,e,this._method)(...r)}getSettings(e,...r){return XV(this._client,e,this._method)(...r)}updateSettings(e,...r){return KV(this._client,e,this._method)(...r)}}var wi;(function(t){t.v2="2.0",t.v4="4.0"})(wi||(wi={}));const eF=(t,e)=>{var r;const n=(r=wi[t])!==null&&r!==void 0?r:t;switch(n){case wi.v4:{const{azureId:i,expand:o}=e,a=new URLSearchParams;return a.append("api-version",n),o&&a.append("$expand",o.join(",")),`/persons/${i}?${String(a)}`}default:throw new ni(t)}},tF=(t,e,r)=>[eF(t,e),r],rF=(t,e,r="json")=>(n,i)=>t[r](...tF(e,n,i)),nF=(t,e)=>{var r;const n=(r=wi[t])!==null&&r!==void 0?r:t;switch(n){case wi.v2:{const{search:i}=e,o=new URLSearchParams;return o.append("api-version",n),o.append("$search",i),`/persons?${String(o)}`}default:throw new ni(t)}},iF=(t,e,r)=>[nF(t,e),r],oF=(t,e,r="json")=>(n,i)=>t[r](...iF(e,n,i)),aF=(t,e)=>{var r;const n=(r=wi[t])!==null&&r!==void 0?r:t;switch(n){case wi.v2:{const{azureId:i}=e,o=new URLSearchParams;return o.append("api-version",n),`/persons/${i}/photo?${String(o)}`}default:throw new ni(t)}},sF=(t,e,r)=>[aF(t,e),r],cF=(t,e,r="blob")=>(n,i)=>t[r](...sF(e,n,i));class lF{get Version(){return wi}constructor(e){this._client=e}get(e,r,n,i){return rF(this._client,e,r)(n,i)}query(e,r,n,i){return oF(this._client,e,r)(n,i)}photo(e,r,n,i){return cF(this._client,e,r)(n,i)}}var Pu=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};class dF extends Error{constructor(e,r,n){super(e,n),this.response=r,this.name="ApiProviderError"}}const Cf=t=>Pu(void 0,void 0,void 0,function*(){var e;if(!t.ok){const{headers:r,status:n,statusText:i,type:o,url:a,bodyUsed:s}=t,c=(e=r.get("content-type"))===null||e===void 0?void 0:e.match(/application\/(\w*)?[+]?json/),l=!s&&(yield c?t.json():t.text());throw new dF("failed to execute request, response was not ok",{headers:r,status:n,statusText:i,type:o,url:a,data:l})}});class uF{constructor({createClient:e}){this._createClientFn=e}createNotificationClient(e){return Pu(this,void 0,void 0,function*(){const r=yield this._createClientFn("notification");return r.responseHandler.add("validate_api_request",Cf),new JV(r,e)})}createBookmarksClient(e){return Pu(this,void 0,void 0,function*(){const r=yield this._createClientFn("bookmarks");return r.responseHandler.add("validate_api_request",Cf),new RV(r,e)})}createContextClient(e){return Pu(this,void 0,void 0,function*(){const r=yield this._createClientFn("context");return r.responseHandler.add("validate_api_request",Cf),new aV(r,e)})}createPeopleClient(){return Pu(this,void 0,void 0,function*(){const e=yield this._createClientFn("people");return e.responseHandler.add("validate_api_request",Cf),new lF(e)})}}var aS=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const hF="services",fF=(t,e)=>r=>aS(void 0,void 0,void 0,function*(){if(t.hasClient(r))return t.createClient(r);if(e)return e.createClient(r);throw Error(`failed to create http client for service ${r}`)}),sS={name:hF,configure:()=>new $D,initialize:t=>aS(void 0,[t],void 0,function*({ref:e,config:r,requireInstance:n,hasModule:i}){if(!r.createClient){const o=yield n("http"),a=i("serviceDiscovery")?yield n("serviceDiscovery"):e==null?void 0:e.serviceDiscovery;r.createClient=fF(o,a)}if(!r.createClient)throw Error("missing configuration for creating API client");return new uF(r)})},pF=t=>{t.addConfig({module:sS})};class mF extends $L{constructor(){super([FL,Gk,sy,HD,sS,AD]),this.logger=new YE("FrameworkConfigurator")}configureHttp(...e){this.addConfig(eO(...e))}configureHttpClient(...e){this.addConfig(Zk(...e))}configureMsal(...e){this.addConfig(fN(...e))}configureServiceDiscovery(e){this.configureHttpClient("service_discovery",e.client)}}var vF=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const gF=(t,e)=>vF(void 0,void 0,void 0,function*(){const r=yield t.initialize(e),n={modules:r};return window.Fusion=n,r.event.dispatchEvent("onFrameworkLoaded",{detail:n}),n}),cS=y.createContext(null),yF=cS.Provider,lS=y.createContext({}),_F=lS.Provider,bF=()=>y.useContext(lS),wF=t=>bF()[t];var xF=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const CF=t=>y.lazy(()=>xF(void 0,void 0,void 0,function*(){const e=new mF;yield t(e);const r=yield gF(e);return{default:({children:n})=>_.jsx(yF,{value:r,children:_.jsx(_F,{value:r.modules,children:n})})}})),an=()=>{let t=y.useContext(cS);return t||console.warn("could not locate fusion in context!"),t??(t=window.Fusion),t||console.error("Could not load framework, might not be initiated?"),t},dS=t=>{const r=an().modules[t];return r||console.warn(`the requested module [${r}] is not included in the framework instance`),r},EF=t=>{const{configure:e,fallback:r,children:n}=t,i=y.useMemo(()=>CF(e),[e]);return _.jsx(y.Suspense,{fallback:r,children:_.jsx(i,{children:n})})};function st(){return st=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},st.apply(this,arguments)}function ld(t){"@babel/helpers - typeof";return ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ld(t)}function Sv(t){return t&&ld(t)==="object"&&t.constructor===Object}function uS(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{clone:!0},n=r.clone?st({},t):t;return Sv(t)&&Sv(e)&&Object.keys(e).forEach(function(i){i!=="__proto__"&&(Sv(e[i])&&i in t?n[i]=uS(t[i],e[i],r):n[i]=e[i])}),n}function kF(t,e){if(ld(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(ld(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function SF(t){var e=kF(t,"string");return ld(e)=="symbol"?e:String(e)}var AF=typeof Symbol=="function"&&Symbol.for;const hS=AF?Symbol.for("mui.nested"):"__THEME_NESTED__";var IF=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function TF(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.disableGlobal,r=e===void 0?!1:e,n=t.productionPrefix,i=n===void 0?"jss":n,o=t.seed,a=o===void 0?"":o,s=a===""?"":"".concat(a,"-"),c=0,l=function(){return c+=1,c};return function(d,u){var h=u.options.name;if(h&&h.indexOf("Mui")===0&&!u.options.link&&!r){if(IF.indexOf(d.key)!==-1)return"Mui-".concat(d.key);var f="".concat(s).concat(h,"-").concat(d.key);return!u.options.theme[hS]||a!==""?f:"".concat(f,"-").concat(l())}return"".concat(s).concat(i).concat(l())}}var fb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},f1=(typeof window>"u"?"undefined":fb(window))==="object"&&(typeof document>"u"?"undefined":fb(document))==="object"&&document.nodeType===9;function pb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,SF(n.key),n)}}function fS(t,e,r){return e&&pb(t.prototype,e),r&&pb(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function B4(t,e){return B4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},B4(t,e)}function pS(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,B4(t,e)}function mb(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mS(t,e){if(t==null)return{};var r={},n=Object.keys(t),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var PF={}.constructor;function q4(t){if(t==null||typeof t!="object")return t;if(Array.isArray(t))return t.map(q4);if(t.constructor!==PF)return t;var e={};for(var r in t)e[r]=q4(t[r]);return e}function Ey(t,e,r){t===void 0&&(t="unnamed");var n=r.jss,i=q4(e),o=n.plugins.onCreateRule(t,i,r);return o||(t[0],null)}var vb=function(e,r){for(var n="",i=0;i<e.length&&e[i]!=="!important";i++)n&&(n+=r),n+=e[i];return n},ac=function(e){if(!Array.isArray(e))return e;var r="";if(Array.isArray(e[0]))for(var n=0;n<e.length&&e[n]!=="!important";n++)r&&(r+=", "),r+=vb(e[n]," ");else r=vb(e,", ");return e[e.length-1]==="!important"&&(r+=" !important"),r};function Td(t){return t&&t.format===!1?{linebreak:"",space:""}:{linebreak:`
|
|
75
75
|
`,space:" "}}function ru(t,e){for(var r="",n=0;n<e;n++)r+=" ";return r+t}function jh(t,e,r){r===void 0&&(r={});var n="";if(!e)return n;var i=r,o=i.indent,a=o===void 0?0:o,s=e.fallbacks;r.format===!1&&(a=-1/0);var c=Td(r),l=c.linebreak,d=c.space;if(t&&a++,s)if(Array.isArray(s))for(var u=0;u<s.length;u++){var h=s[u];for(var f in h){var p=h[f];p!=null&&(n&&(n+=l),n+=ru(f+":"+d+ac(p)+";",a))}}else for(var m in s){var w=s[m];w!=null&&(n&&(n+=l),n+=ru(m+":"+d+ac(w)+";",a))}for(var g in e){var v=e[g];v!=null&&g!=="fallbacks"&&(n&&(n+=l),n+=ru(g+":"+d+ac(v)+";",a))}return!n&&!r.allowEmpty||!t?n:(a--,n&&(n=""+l+n+l),ru(""+t+d+"{"+n,a)+ru("}",a))}var RF=/([[\].#*$><+~=|^:(),"'`\s])/g,gb=typeof CSS<"u"&&CSS.escape,ky=function(t){return gb?gb(t):t.replace(RF,"\\$1")},vS=function(){function t(r,n,i){this.type="style",this.isProcessed=!1;var o=i.sheet,a=i.Renderer;this.key=r,this.options=i,this.style=n,o?this.renderer=o.renderer:a&&(this.renderer=new a)}var e=t.prototype;return e.prop=function(n,i,o){if(i===void 0)return this.style[n];var a=o?o.force:!1;if(!a&&this.style[n]===i)return this;var s=i;(!o||o.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(i,n,this));var c=s==null||s===!1,l=n in this.style;if(c&&!l&&!a)return this;var d=c&&l;if(d?delete this.style[n]:this.style[n]=s,this.renderable&&this.renderer)return d?this.renderer.removeProperty(this.renderable,n):this.renderer.setProperty(this.renderable,n,s),this;var u=this.options.sheet;return u&&u.attached,this},t}(),W4=function(t){pS(e,t);function e(n,i,o){var a;a=t.call(this,n,i,o)||this;var s=o.selector,c=o.scoped,l=o.sheet,d=o.generateId;return s?a.selectorText=s:c!==!1&&(a.id=d(mb(mb(a)),l),a.selectorText="."+ky(a.id)),a}var r=e.prototype;return r.applyTo=function(i){var o=this.renderer;if(o){var a=this.toJSON();for(var s in a)o.setProperty(i,s,a[s])}return this},r.toJSON=function(){var i={};for(var o in this.style){var a=this.style[o];typeof a!="object"?i[o]=a:Array.isArray(a)&&(i[o]=ac(a))}return i},r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?st({},i,{allowEmpty:!0}):i;return jh(this.selectorText,this.style,s)},fS(e,[{key:"selector",set:function(i){if(i!==this.selectorText){this.selectorText=i;var o=this.renderer,a=this.renderable;if(!(!a||!o)){var s=o.setSelector(a,i);s||o.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),e}(vS),MF={onCreateRule:function(e,r,n){return e[0]==="@"||n.parent&&n.parent.type==="keyframes"?null:new W4(e,r,n)}},Av={indent:1,children:!0},ZF=/@([\w-]+)/,HF=function(){function t(r,n,i){this.type="conditional",this.isProcessed=!1,this.key=r;var o=r.match(ZF);this.at=o?o[1]:"unknown",this.query=i.name||"@"+this.at,this.options=i,this.rules=new N0(st({},i,{parent:this}));for(var a in n)this.rules.add(a,n[a]);this.rules.process()}var e=t.prototype;return e.getRule=function(n){return this.rules.get(n)},e.indexOf=function(n){return this.rules.indexOf(n)},e.addRule=function(n,i,o){var a=this.rules.add(n,i,o);return a?(this.options.jss.plugins.onProcessRule(a),a):null},e.replaceRule=function(n,i,o){var a=this.rules.replace(n,i,o);return a&&this.options.jss.plugins.onProcessRule(a),a},e.toString=function(n){n===void 0&&(n=Av);var i=Td(n),o=i.linebreak;if(n.indent==null&&(n.indent=Av.indent),n.children==null&&(n.children=Av.children),n.children===!1)return this.query+" {}";var a=this.rules.toString(n);return a?this.query+" {"+o+a+o+"}":""},t}(),$F=/@container|@media|@supports\s+/,LF={onCreateRule:function(e,r,n){return $F.test(e)?new HF(e,r,n):null}},Iv={indent:1,children:!0},OF=/@keyframes\s+([\w-]+)/,G4=function(){function t(r,n,i){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var o=r.match(OF);o&&o[1]?this.name=o[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=i;var a=i.scoped,s=i.sheet,c=i.generateId;this.id=a===!1?this.name:ky(c(this,s)),this.rules=new N0(st({},i,{parent:this}));for(var l in n)this.rules.add(l,n[l],st({},i,{parent:this}));this.rules.process()}var e=t.prototype;return e.toString=function(n){n===void 0&&(n=Iv);var i=Td(n),o=i.linebreak;if(n.indent==null&&(n.indent=Iv.indent),n.children==null&&(n.children=Iv.children),n.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(n);return a&&(a=""+o+a+o),this.at+" "+this.id+" {"+a+"}"},t}(),NF=/@keyframes\s+/,DF=/\$([\w-]+)/g,K4=function(e,r){return typeof e=="string"?e.replace(DF,function(n,i){return i in r?r[i]:n}):e},yb=function(e,r,n){var i=e[r],o=K4(i,n);o!==i&&(e[r]=o)},VF={onCreateRule:function(e,r,n){return typeof e=="string"&&NF.test(e)?new G4(e,r,n):null},onProcessStyle:function(e,r,n){return r.type!=="style"||!n||("animation-name"in e&&yb(e,"animation-name",n.keyframes),"animation"in e&&yb(e,"animation",n.keyframes)),e},onChangeValue:function(e,r,n){var i=n.options.sheet;if(!i)return e;switch(r){case"animation":return K4(e,i.keyframes);case"animation-name":return K4(e,i.keyframes);default:return e}}},FF=function(t){pS(e,t);function e(){return t.apply(this,arguments)||this}var r=e.prototype;return r.toString=function(i){var o=this.options.sheet,a=o?o.options.link:!1,s=a?st({},i,{allowEmpty:!0}):i;return jh(this.key,this.style,s)},e}(vS),zF={onCreateRule:function(e,r,n){return n.parent&&n.parent.type==="keyframes"?new FF(e,r,n):null}},jF=function(){function t(r,n,i){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var e=t.prototype;return e.toString=function(n){var i=Td(n),o=i.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s<this.style.length;s++)a+=jh(this.at,this.style[s]),this.style[s+1]&&(a+=o);return a}return jh(this.at,this.style,n)},t}(),UF=/@font-face/,BF={onCreateRule:function(e,r,n){return UF.test(e)?new jF(e,r,n):null}},qF=function(){function t(r,n,i){this.type="viewport",this.at="@viewport",this.isProcessed=!1,this.key=r,this.style=n,this.options=i}var e=t.prototype;return e.toString=function(n){return jh(this.key,this.style,n)},t}(),WF={onCreateRule:function(e,r,n){return e==="@viewport"||e==="@-ms-viewport"?new qF(e,r,n):null}},GF=function(){function t(r,n,i){this.type="simple",this.isProcessed=!1,this.key=r,this.value=n,this.options=i}var e=t.prototype;return e.toString=function(n){if(Array.isArray(this.value)){for(var i="",o=0;o<this.value.length;o++)i+=this.key+" "+this.value[o]+";",this.value[o+1]&&(i+=`
|
|
76
76
|
`);return i}return this.key+" "+this.value+";"},t}(),KF={"@charset":!0,"@import":!0,"@namespace":!0},YF={onCreateRule:function(e,r,n){return e in KF?new GF(e,r,n):null}},_b=[MF,LF,VF,zF,BF,WF,YF],QF={process:!0},bb={force:!0,process:!0},N0=function(){function t(r){this.map={},this.raw={},this.index=[],this.counter=0,this.options=r,this.classes=r.classes,this.keyframes=r.keyframes}var e=t.prototype;return e.add=function(n,i,o){var a=this.options,s=a.parent,c=a.sheet,l=a.jss,d=a.Renderer,u=a.generateId,h=a.scoped,f=st({classes:this.classes,parent:s,sheet:c,jss:l,Renderer:d,generateId:u,scoped:h,name:n,keyframes:this.keyframes,selector:void 0},o),p=n;n in this.raw&&(p=n+"-d"+this.counter++),this.raw[p]=i,p in this.classes&&(f.selector="."+ky(this.classes[p]));var m=Ey(p,i,f);if(!m)return null;this.register(m);var w=f.index===void 0?this.index.length:f.index;return this.index.splice(w,0,m),m},e.replace=function(n,i,o){var a=this.get(n),s=this.index.indexOf(a);a&&this.remove(a);var c=o;return s!==-1&&(c=st({},o,{index:s})),this.add(n,i,c)},e.get=function(n){return this.map[n]},e.remove=function(n){this.unregister(n),delete this.raw[n.key],this.index.splice(this.index.indexOf(n),1)},e.indexOf=function(n){return this.index.indexOf(n)},e.process=function(){var n=this.options.jss.plugins;this.index.slice(0).forEach(n.onProcessRule,n)},e.register=function(n){this.map[n.key]=n,n instanceof W4?(this.map[n.selector]=n,n.id&&(this.classes[n.key]=n.id)):n instanceof G4&&this.keyframes&&(this.keyframes[n.name]=n.id)},e.unregister=function(n){delete this.map[n.key],n instanceof W4?(delete this.map[n.selector],delete this.classes[n.key]):n instanceof G4&&delete this.keyframes[n.name]},e.update=function(){var n,i,o;if(typeof(arguments.length<=0?void 0:arguments[0])=="string"?(n=arguments.length<=0?void 0:arguments[0],i=arguments.length<=1?void 0:arguments[1],o=arguments.length<=2?void 0:arguments[2]):(i=arguments.length<=0?void 0:arguments[0],o=arguments.length<=1?void 0:arguments[1],n=null),n)this.updateOne(this.get(n),i,o);else for(var a=0;a<this.index.length;a++)this.updateOne(this.index[a],i,o)},e.updateOne=function(n,i,o){o===void 0&&(o=QF);var a=this.options,s=a.jss.plugins,c=a.sheet;if(n.rules instanceof t){n.rules.update(i,o);return}var l=n.style;if(s.onUpdate(i,n,c,o),o.process&&l&&l!==n.style){s.onProcessStyle(n.style,n,c);for(var d in n.style){var u=n.style[d],h=l[d];u!==h&&n.prop(d,u,bb)}for(var f in l){var p=n.style[f],m=l[f];p==null&&p!==m&&n.prop(f,null,bb)}}},e.toString=function(n){for(var i="",o=this.options.sheet,a=o?o.options.link:!1,s=Td(n),c=s.linebreak,l=0;l<this.index.length;l++){var d=this.index[l],u=d.toString(n);!u&&!a||(i&&(i+=c),i+=u)}return i},t}(),gS=function(){function t(r,n){this.attached=!1,this.deployed=!1,this.classes={},this.keyframes={},this.options=st({},n,{sheet:this,parent:this,classes:this.classes,keyframes:this.keyframes}),n.Renderer&&(this.renderer=new n.Renderer(this)),this.rules=new N0(this.options);for(var i in r)this.rules.add(i,r[i]);this.rules.process()}var e=t.prototype;return e.attach=function(){return this.attached?this:(this.renderer&&this.renderer.attach(),this.attached=!0,this.deployed||this.deploy(),this)},e.detach=function(){return this.attached?(this.renderer&&this.renderer.detach(),this.attached=!1,this):this},e.addRule=function(n,i,o){var a=this.queue;this.attached&&!a&&(this.queue=[]);var s=this.rules.add(n,i,o);return s?(this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&(a?a.push(s):(this.insertRule(s),this.queue&&(this.queue.forEach(this.insertRule,this),this.queue=void 0))),s):(this.deployed=!1,s)):null},e.replaceRule=function(n,i,o){var a=this.rules.get(n);if(!a)return this.addRule(n,i,o);var s=this.rules.replace(n,i,o);return s&&this.options.jss.plugins.onProcessRule(s),this.attached?(this.deployed&&this.renderer&&(s?a.renderable&&this.renderer.replaceRule(a.renderable,s):this.renderer.deleteRule(a)),s):(this.deployed=!1,s)},e.insertRule=function(n){this.renderer&&this.renderer.insertRule(n)},e.addRules=function(n,i){var o=[];for(var a in n){var s=this.addRule(a,n[a],i);s&&o.push(s)}return o},e.getRule=function(n){return this.rules.get(n)},e.deleteRule=function(n){var i=typeof n=="object"?n:this.rules.get(n);return!i||this.attached&&!i.renderable?!1:(this.rules.remove(i),this.attached&&i.renderable&&this.renderer?this.renderer.deleteRule(i.renderable):!0)},e.indexOf=function(n){return this.rules.indexOf(n)},e.deploy=function(){return this.renderer&&this.renderer.deploy(),this.deployed=!0,this},e.update=function(){var n;return(n=this.rules).update.apply(n,arguments),this},e.updateOne=function(n,i,o){return this.rules.updateOne(n,i,o),this},e.toString=function(n){return this.rules.toString(n)},t}(),XF=function(){function t(){this.plugins={internal:[],external:[]},this.registry={}}var e=t.prototype;return e.onCreateRule=function(n,i,o){for(var a=0;a<this.registry.onCreateRule.length;a++){var s=this.registry.onCreateRule[a](n,i,o);if(s)return s}return null},e.onProcessRule=function(n){if(!n.isProcessed){for(var i=n.options.sheet,o=0;o<this.registry.onProcessRule.length;o++)this.registry.onProcessRule[o](n,i);n.style&&this.onProcessStyle(n.style,n,i),n.isProcessed=!0}},e.onProcessStyle=function(n,i,o){for(var a=0;a<this.registry.onProcessStyle.length;a++)i.style=this.registry.onProcessStyle[a](i.style,i,o)},e.onProcessSheet=function(n){for(var i=0;i<this.registry.onProcessSheet.length;i++)this.registry.onProcessSheet[i](n)},e.onUpdate=function(n,i,o,a){for(var s=0;s<this.registry.onUpdate.length;s++)this.registry.onUpdate[s](n,i,o,a)},e.onChangeValue=function(n,i,o){for(var a=n,s=0;s<this.registry.onChangeValue.length;s++)a=this.registry.onChangeValue[s](a,i,o);return a},e.use=function(n,i){i===void 0&&(i={queue:"external"});var o=this.plugins[i.queue];o.indexOf(n)===-1&&(o.push(n),this.registry=[].concat(this.plugins.external,this.plugins.internal).reduce(function(a,s){for(var c in s)c in a&&a[c].push(s[c]);return a},{onCreateRule:[],onProcessRule:[],onProcessStyle:[],onProcessSheet:[],onChangeValue:[],onUpdate:[]}))},t}(),JF=function(){function t(){this.registry=[]}var e=t.prototype;return e.add=function(n){var i=this.registry,o=n.options.index;if(i.indexOf(n)===-1){if(i.length===0||o>=this.index){i.push(n);return}for(var a=0;a<i.length;a++)if(i[a].options.index>o){i.splice(a,0,n);return}}},e.reset=function(){this.registry=[]},e.remove=function(n){var i=this.registry.indexOf(n);this.registry.splice(i,1)},e.toString=function(n){for(var i=n===void 0?{}:n,o=i.attached,a=mS(i,["attached"]),s=Td(a),c=s.linebreak,l="",d=0;d<this.registry.length;d++){var u=this.registry[d];o!=null&&u.attached!==o||(l&&(l+=c),l+=u.toString(a))}return l},fS(t,[{key:"index",get:function(){return this.registry.length===0?0:this.registry[this.registry.length-1].options.index}}]),t}(),lh=new JF,Y4=typeof globalThis<"u"?globalThis:typeof window<"u"&&window.Math===Math?window:typeof self<"u"&&self.Math===Math?self:Function("return this")(),Q4="2f1acc6c3a606b082e5eef5e54414ffb";Y4[Q4]==null&&(Y4[Q4]=0);var wb=Y4[Q4]++,xb=function(e){e===void 0&&(e={});var r=0,n=function(o,a){r+=1;var s="",c="";return a&&(a.options.classNamePrefix&&(c=a.options.classNamePrefix),a.options.jss.id!=null&&(s=String(a.options.jss.id))),e.minify?""+(c||"c")+wb+s+r:c+o.key+"-"+wb+(s?"-"+s:"")+"-"+r};return n},yS=function(e){var r;return function(){return r||(r=e()),r}},ez=function(e,r){try{return e.attributeStyleMap?e.attributeStyleMap.get(r):e.style.getPropertyValue(r)}catch{return""}},tz=function(e,r,n){try{var i=n;if(Array.isArray(n)&&(i=ac(n)),e.attributeStyleMap)e.attributeStyleMap.set(r,i);else{var o=i?i.indexOf("!important"):-1,a=o>-1?i.substr(0,o-1):i;e.style.setProperty(r,a,o>-1?"important":"")}}catch{return!1}return!0},rz=function(e,r){try{e.attributeStyleMap?e.attributeStyleMap.delete(r):e.style.removeProperty(r)}catch{}},nz=function(e,r){return e.selectorText=r,e.selectorText===r},_S=yS(function(){return document.querySelector("head")});function iz(t,e){for(var r=0;r<t.length;r++){var n=t[r];if(n.attached&&n.options.index>e.index&&n.options.insertionPoint===e.insertionPoint)return n}return null}function oz(t,e){for(var r=t.length-1;r>=0;r--){var n=t[r];if(n.attached&&n.options.insertionPoint===e.insertionPoint)return n}return null}function az(t){for(var e=_S(),r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];if(n.nodeType===8&&n.nodeValue.trim()===t)return n}return null}function sz(t){var e=lh.registry;if(e.length>0){var r=iz(e,t);if(r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element};if(r=oz(e,t),r&&r.renderer)return{parent:r.renderer.element.parentNode,node:r.renderer.element.nextSibling}}var n=t.insertionPoint;if(n&&typeof n=="string"){var i=az(n);if(i)return{parent:i.parentNode,node:i.nextSibling}}return!1}function cz(t,e){var r=e.insertionPoint,n=sz(e);if(n!==!1&&n.parent){n.parent.insertBefore(t,n.node);return}if(r&&typeof r.nodeType=="number"){var i=r,o=i.parentNode;o&&o.insertBefore(t,i.nextSibling);return}_S().appendChild(t)}var lz=yS(function(){var t=document.querySelector('meta[property="csp-nonce"]');return t?t.getAttribute("content"):null}),Cb=function(e,r,n){try{"insertRule"in e?e.insertRule(r,n):"appendRule"in e&&e.appendRule(r)}catch{return!1}return e.cssRules[n]},Eb=function(e,r){var n=e.cssRules.length;return r===void 0||r>n?n:r},dz=function(){var e=document.createElement("style");return e.textContent=`
|
|
77
77
|
`,e},uz=function(){function t(r){this.getPropertyValue=ez,this.setProperty=tz,this.removeProperty=rz,this.setSelector=nz,this.hasInsertedRules=!1,this.cssRules=[],r&&lh.add(r),this.sheet=r;var n=this.sheet?this.sheet.options:{},i=n.media,o=n.meta,a=n.element;this.element=a||dz(),this.element.setAttribute("data-jss",""),i&&this.element.setAttribute("media",i),o&&this.element.setAttribute("data-meta",o);var s=lz();s&&this.element.setAttribute("nonce",s)}var e=t.prototype;return e.attach=function(){if(!(this.element.parentNode||!this.sheet)){cz(this.element,this.sheet.options);var n=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&n&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var n=this.element.parentNode;n&&n.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=`
|
|
@@ -402,7 +402,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
402
402
|
class="progress">
|
|
403
403
|
</circle>
|
|
404
404
|
</svg>
|
|
405
|
-
`}}C([G({type:String,reflect:!0})],b1.prototype,"size",void 0);C([G({type:String,reflect:!0})],b1.prototype,"color",void 0);b1.styles=OU;const iA="fwc-circular-progress";let qb=class extends b1{};qb=C([gt(iA)],qb);const NU=v1(y1,rA);v1(b1,iA);v1(_1,nA);const oA=({children:t,text:e})=>_.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh",overflow:"hidden"},children:_.jsx(NU,{text:e,children:t})});var DU=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},VU=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Cp;class FU{constructor(e,r={}){this.config=r,Cp.set(this,void 0),DU(this,Cp,e,"f")}requireInstance(e){return VU(this,Cp,"f").requireInstance(e)}setAppClient(e,r=1*60*1e3){this.config.client={getAppManifest:typeof e.getAppManifest=="function"?{key:({appKey:n})=>n,client:{fn:e.getAppManifest},expire:r}:e.getAppManifest,getAppManifests:typeof e.getAppManifests=="function"?{key:()=>"app_manifests",client:{fn:e.getAppManifests},expire:r}:e.getAppManifests,getAppConfig:typeof e.getAppConfig=="function"?{key:n=>JSON.stringify(n),client:{fn:e.getAppConfig},expire:r}:e.getAppConfig}}}Cp=new WeakMap;const zU=()=>({setManifest:gr("set_manifest",(t,e)=>({payload:t,meta:{created:Date.now(),update:e}})),fetchManifest:fo("fetch_manifest",(t,e)=>({payload:t,meta:{update:e}}),t=>({payload:t}),t=>({payload:t})),setConfig:gr("set_config",t=>({payload:t})),fetchConfig:fo("fetch_config",t=>({payload:t}),t=>({payload:t}),t=>({payload:t})),setModule:gr("set_module",t=>({payload:t})),importApp:fo("import_app",t=>({payload:t}),t=>({payload:t}),t=>({payload:t})),setInstance:gr("set_instance",t=>({payload:t})),initialize:fo("initialize_app",()=>({payload:null}),()=>({payload:null}),t=>({payload:t}))}),Ve=zU();YN();const jU=t=>Id(Object.assign(Object.assign({},t),{status:new Set}),e=>e.addCase(Ve.setManifest,(r,n)=>{n.meta.update?r.manifest=Object.assign(Object.assign({},r.manifest),n.payload):r.manifest=n.payload}).addCase(Ve.setConfig,(r,n)=>{r.config=n.payload}).addCase(Ve.setModule,(r,n)=>{r.modules=n.payload}).addCase(Ve.setInstance,(r,n)=>{r.instance=n.payload}).addMatcher(nD,(r,n)=>{r.status.add(eb(n))}).addMatcher(aD,(r,n)=>{r.status.delete(eb(n))})),UU="modulepreload",BU=function(t){return"/"+t},Wb={},aA=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){const o=document.getElementsByTagName("link");i=Promise.all(r.map(a=>{if(a=BU(a),a in Wb)return;Wb[a]=!0;const s=a.endsWith(".css"),c=s?'[rel="stylesheet"]':"";if(!!n)for(let u=o.length-1;u>=0;u--){const h=o[u];if(h.href===a&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":UU,s||(d.as="script",d.crossOrigin=""),d.href=a,document.head.appendChild(d),s)return new Promise((u,h)=>{d.addEventListener("load",u),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>e()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},qU=t=>e=>e.pipe(Ue(Ve.fetchManifest.match),mt(r=>{const{payload:n,meta:{update:i}}=r,o=Dt(t.getAppManifest(n)).pipe(Ue(a=>!!a),$0());return Wl(o.pipe(Se(a=>Ve.setManifest(a,i))),o.pipe(d1(),Se(a=>Ve.fetchManifest.success(a)))).pipe(Xt(a=>mn(Ve.fetchManifest.failure(a))))})),WU=t=>e=>e.pipe(Ue(Ve.fetchConfig.match),mt(({payload:r})=>{const n=Dt(t.getAppConfig(r)).pipe(Ue(i=>!!i),$0());return Wl(n.pipe(Se(i=>Ve.setConfig(i))),n.pipe(d1(),Se(i=>Ve.fetchConfig.success(i)))).pipe(Xt(i=>mn(Ve.fetchConfig.failure(i))))})),GU=()=>t=>t.pipe(Ue(Ve.importApp.match),mt(({payload:e})=>Dt(aA(()=>import(e),__vite__mapDeps([]))).pipe(Se(Ve.importApp.success),Xt(r=>mn(Ve.importApp.failure(r)))))),KU=(t,e)=>{const r=jU(t),n=new h1(r);return n.addFlow(qU(e)),n.addFlow(WU(e)),n.addFlow(GU()),n};var YU=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},xe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},QU=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},n5,we,sA;function Zu(){return Ue(t=>t!=null)}class XU{get manifest$(){return xe(this,we,"f").pipe(Se(({manifest:e})=>e),Zu())}get config$(){return xe(this,we,"f").pipe(Se(({config:e})=>e),Zu())}get modules$(){return xe(this,we,"f").pipe(Se(({modules:e})=>e),Zu())}get instance$(){return xe(this,we,"f").pipe(Se(({instance:e})=>e),Zu())}get state(){return Object.freeze(xe(this,we,"f").value)}get appKey(){return xe(this,we,"f").value.appKey}get manifest(){return this.state.manifest}get manifestAsync(){return $r(this.manifest$)}get config(){return this.state.config}get configAsync(){return $r(this.config$)}get instance(){return xe(this,we,"f").value.instance}constructor(e,r){n5.add(this),we.set(this,void 0),QU(this,we,KU(e,r.provider),"f");const{appKey:n}=e,{event:i}=r;i&&xe(this,n5,"m",sA).call(this,i);const o=new Tr;i&&(o.add(()=>{i.dispatchEvent("onAppDispose",{detail:{appKey:n}})}),o.add(i.addEventListener("onAppModulesLoaded",a=>{a.detail.appKey===n&&xe(this,we,"f").next(Ve.setInstance(a.detail.modules))}))),this.dispose=()=>{o==null||o.unsubscribe(),xe(this,we,"f").value.instance&&xe(this,we,"f").value.instance.dispose(),xe(this,we,"f").complete()}}initialize(){return new Ne(e=>{xe(this,we,"f").next(Ve.initialize()),e.add(pL([this.getManifest(),this.getAppModule(),this.getConfig()]).subscribe({next:([r,n,i])=>e.next({manifest:r,script:n,config:i}),error:r=>{e.error(r),xe(this,we,"f").next(Ve.initialize.failure(r))},complete:()=>{xe(this,we,"f").next(Ve.initialize.success()),e.complete()}}))})}loadConfig(){xe(this,we,"f").next(Ve.fetchConfig(this.appKey))}loadManifest(e){xe(this,we,"f").next(Ve.fetchManifest(this.appKey,e))}updateManifest(e,r){xe(this,we,"f").next(Ve.setManifest(e,!r))}loadAppModule(e=!0){return YU(this,void 0,void 0,function*(){const r=yield this.getManifestAsync(e);xe(this,we,"f").next(Ve.importApp(r.entry))})}getConfig(e=!1){return new Ne(r=>{if(xe(this,we,"f").value.config&&(r.next(xe(this,we,"f").value.config),!e))return r.complete();r.add(xe(this,we,"f").addEffect("set_config",({payload:n})=>{r.next(n)})),r.add(xe(this,we,"f").addEffect("fetch_config::success",({payload:n})=>{r.next(n),r.complete()})),r.add(xe(this,we,"f").addEffect("fetch_config::failure",({payload:n})=>{r.error(Error("failed to load application config",{cause:n}))})),this.loadConfig()})}getConfigAsync(e=!0){return(e?$r:yr)(this.getConfig(!e))}getManifest(e=!1){return new Ne(r=>{if(xe(this,we,"f").value.manifest&&(r.next(xe(this,we,"f").value.manifest),!e))return r.complete();r.add(xe(this,we,"f").addEffect("set_manifest",({payload:n})=>{r.next(n)})),r.add(xe(this,we,"f").addEffect("fetch_manifest::success",({payload:n})=>{r.next(n),r.complete()})),r.add(xe(this,we,"f").addEffect("fetch_manifest::failure",({payload:n})=>{r.error(Error("failed to load application manifest",{cause:n}))})),this.loadManifest()})}getManifestAsync(e=!0){return(e?$r:yr)(this.getManifest(!e))}getAppModule(e=!1){return new Ne(r=>{if(xe(this,we,"f").value.modules&&(r.next(xe(this,we,"f").value.modules),!e))return r.complete();r.add(xe(this,we,"f").addEffect("set_module",({payload:n})=>{r.next(n)})),r.add(xe(this,we,"f").addEffect("import_app::success",({payload:n})=>{r.next(n),r.complete()})),r.add(xe(this,we,"f").addEffect("import_app::failure",({payload:n})=>{r.error(Error("failed to load application modules from script",{cause:n}))})),r.add(this.getManifest().subscribe(n=>{xe(this,we,"f").next(Ve.importApp(n.entry))}))})}getAppModuleAsync(e=!0){return(e?$r:yr)(this.getAppModule(!e))}}we=new WeakMap,n5=new WeakSet,sA=function(e){const{appKey:r}=this;xe(this,we,"f").addEffect(Ve.fetchManifest.type,()=>{e.dispatchEvent("onAppManifestLoad",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.fetchManifest.success.type,n=>{e.dispatchEvent("onAppManifestLoaded",{detail:{appKey:r,manifest:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.fetchManifest.failure.type,n=>{e.dispatchEvent("onAppManifestFailure",{detail:{appKey:r,error:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.fetchConfig.type,()=>{e.dispatchEvent("onAppConfigLoad",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.fetchConfig.success.type,n=>{e.dispatchEvent("onAppConfigLoaded",{detail:{appKey:r,config:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.fetchConfig.failure.type,n=>{e.dispatchEvent("onAppConfigFailure",{detail:{appKey:r,error:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.importApp.type,()=>{e.dispatchEvent("onAppScriptLoad",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.importApp.success.type,n=>{e.dispatchEvent("onAppScriptLoaded",{detail:{appKey:r,script:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.importApp.failure.type,n=>{e.dispatchEvent("onAppScriptFailure",{detail:{appKey:r,error:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.initialize.type,()=>{e.dispatchEvent("onAppInitialize",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.initialize.success.type,()=>{e.dispatchEvent("onAppInitialized",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.initialize.failure.type,({payload:n})=>{e.dispatchEvent("onAppInitializeFailure",{detail:{appKey:r,error:n},source:this})})};class es extends Error{static fromHttpResponse(e,r){switch(e.status){case 401:return new es("unauthorized","failed to load application manifest, request not authorized",r);case 404:return new es("not_found","application manifest not found",r)}return new es("unknown",`failed to load application manifest, status code ${e.status}`,r)}constructor(e,r,n){super(r,n),this.type=e}}class sc extends Error{static fromHttpResponse(e,r){switch(e.status){case 401:return new sc("unauthorized","failed to load application config, request not authorized",r);case 404:return new sc("not_found","application config not found",r)}return new sc("unknown",`failed to load application config, status code ${e.status}`,r)}constructor(e,r,n){super(r,n),this.type=e}}var Kr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kf=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Hu,$u,Aa,Ia,Ep;class JU{static compareAppManifest(e,r){return JSON.stringify(e)===JSON.stringify(r)}get current(){return Kr(this,Aa,"f").value}get current$(){return Kr(this,Aa,"f").pipe(kk((e,r)=>e&&r?e.appKey===r.appKey:e===r))}constructor(e){Hu.set(this,void 0),$u.set(this,void 0),Aa.set(this,void 0),Ia.set(this,new Tr),Ep.set(this,void 0);const{event:r,config:n}=e;kf(this,Ep,r,"f"),kf(this,Aa,new Ed(void 0),"f"),this.appClient=new Hr(n.client.getAppManifest),kf(this,Hu,new Hr(n.client.getAppManifests),"f"),kf(this,$u,new Hr(n.client.getAppConfig),"f"),Kr(this,Ia,"f").add(()=>this.appClient.complete()),Kr(this,Ia,"f").add(()=>Kr(this,Hu,"f").complete()),Kr(this,Ia,"f").add(()=>Kr(this,$u,"f").complete()),Kr(this,Ia,"f").add(this.current$.pipe(E2(),Ik(()=>!!r)).subscribe(([i,o])=>{r==null||r.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:i,next:o}})})),Kr(this,Ia,"f").add(Kr(this,Aa,"f").pipe(E2(),Se(([i])=>i),Zu()).subscribe(i=>i.dispose()))}getAppManifest(e){return Hr.extractQueryValue(this.appClient.query({appKey:e}).pipe(Xt(r=>{const{cause:n}=r;throw n instanceof es?n:n instanceof $h?es.fromHttpResponse(n.response,{cause:n}):new es("unknown","failed to load manifest",{cause:n})})))}getAllAppManifests(){return Hr.extractQueryValue(Kr(this,Hu,"f").query())}getAppConfig(e,r){return Hr.extractQueryValue(Kr(this,$u,"f").query({appKey:e,tag:r}).pipe(Xt(n=>{const{cause:i}=n;throw i instanceof sc?i:i instanceof $h?sc.fromHttpResponse(i.response,{cause:i}):new sc("unknown","failed to load config",{cause:i})})))}setCurrentApp(e){const r=typeof e=="string"?this.createApp({appKey:e}):e;Kr(this,Aa,"f").next(r)}clearCurrentApp(){Kr(this,Aa,"f").next(null)}createApp(e){return console.warn(),new XU(e,{provider:this,event:Kr(this,Ep,"f")})}dispose(){Kr(this,Ia,"f").unsubscribe()}}Hu=new WeakMap,$u=new WeakMap,Aa=new WeakMap,Ia=new WeakMap,Ep=new WeakMap;var eB=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const i5="app",tB={name:i5,configure:()=>new rB,initialize:t=>eB(void 0,void 0,void 0,function*(){const e=yield t.config.createConfig(t),r=yield t.requireInstance("event").catch(()=>{});return new JU({config:e,event:r})}),dispose:t=>{t.instance.dispose()}};var Sf=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Gb=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kp;class rB{constructor(){this.defaultExpireTime=1*60*1e3,kp.set(this,[])}addConfigBuilder(e){Gb(this,kp,"f").push(e)}_createHttpClient(e){return Sf(this,void 0,void 0,function*(){const r=yield e.requireInstance("http");if(r.hasClient(i5))return r.createClient(i5);{const n=yield e.requireInstance("serviceDiscovery");try{return yield n.createClient("app")}catch{return yield n.createClient("portal")}}})}createConfig(e){var r;return Sf(this,void 0,void 0,function*(){const n=yield Gb(this,kp,"f").reduce((i,o)=>Sf(this,void 0,void 0,function*(){const a=new FU(e,yield i);return yield Promise.resolve(o(a)),Object.assign(i,a.config)}),Promise.resolve({}));return(r=n.client)!==null&&r!==void 0||(n.client=yield Sf(this,void 0,void 0,function*(){const i=yield this._createHttpClient(e);return{getAppManifest:{client:{fn:({appKey:o})=>i.json$(`/api/apps/${o}`)},key:({appKey:o})=>o,expire:this.defaultExpireTime},getAppManifests:{client:{fn:()=>i.json$("/api/apps")},key:()=>"manifests",expire:this.defaultExpireTime},getAppConfig:{client:{fn:({appKey:o,tag:a})=>i.json$(`/api/apps/${o}/config${a?`?tag=${a}`:""}`)},key:o=>JSON.stringify(o),expire:this.defaultExpireTime}}})),n})}}kp=new WeakMap;const nB=(t,e)=>{t.addConfig({module:tB,configure:r=>{e&&r.addConfigBuilder(e)}})},iB="bookmarkId",oB=()=>new URLSearchParams(document.location.search).get(iB);var aB=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},sB=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Sp;class cB{constructor(e,r={}){this.config=r,Sp.set(this,void 0),aB(this,Sp,e,"f")}requireInstance(e){return sB(this,Sp,"f").requireInstance(e)}setSourceSystem(e){this.config.sourceSystem=e}setBookmarkIdResolver(e){this.config.resolveBookmarkId=e}serCustomBookmarkApiClient(e){this.config.clientConfiguration&&(this.config.clientConfiguration.client=e)}setContextIdResolver(e){this.config.getContextId=e}setCurrentAppIdResolver(e){this.config.getCurrentAppIdentification=e}setEventProvider(e){this.config.event=e}setBookmarkQueryClient(e){this.config.clientConfiguration&&(this.config.clientConfiguration.queryClientConfig={getAllBookmarks:typeof e.getAllBookmarks=="function"?{key:()=>"all-bookmarks",client:{fn:e.getAllBookmarks},validate:({args:n})=>n.isValid}:e.getAllBookmarks,getBookmarkById:typeof e.getBookmarkById=="function"?{key:({id:n})=>n,client:{fn:e.getBookmarkById},expire:6e4,validate:()=>!1}:e.getBookmarkById})}}Sp=new WeakMap;var Cs=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},zv=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},o5,Ap,cA;class lB{constructor(){o5.add(this),this.defaultExpireTime=1*60*1e3,Ap.set(this,[])}addConfigBuilder(e){zv(this,Ap,"f").push(e)}createConfig(e,r){return Cs(this,void 0,void 0,function*(){const n=yield zv(this,Ap,"f").reduce((o,a)=>Cs(this,void 0,void 0,function*(){const s=new cB(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({})),i=yield this._getAppProvider(e);if(zv(this,o5,"m",cA).call(this,r,n),n.resolveBookmarkId||(n.resolveBookmarkId=oB),n.getCurrentAppIdentification||(n.getCurrentAppIdentification=()=>{var o;return(o=i.current)===null||o===void 0?void 0:o.appKey}),!n.getContextId){const o=yield this._getContextProvider(e);n.getContextId=()=>{var a;return(a=o.currentContext)===null||a===void 0?void 0:a.id}}if(!n.event){const o=yield this._getEventProvider(e);n.event=o}return n.clientConfiguration=yield this._createClientConfiguration(e,n.clientConfiguration),n})}_createClientConfiguration(e,r={}){return Cs(this,void 0,void 0,function*(){if(!r.client){const n=yield this._getServiceProvider(e);r.client=yield n.createBookmarksClient("fetch")}if(!r.queryClientConfig){const i=yield(yield this._getServiceProvider(e)).createBookmarksClient("json$");r.queryClientConfig=Object.assign({getBookmarkById:{client:{fn:o=>i.get("v1",o)},key:({id:o})=>o,expire:this.defaultExpireTime},getAllBookmarks:{client:{fn:()=>i.getAll("v1")},key:()=>"all-bookmarks",validate:({args:o})=>o.isValid,expire:this.defaultExpireTime}},i)}return r})}_getServiceProvider(e){var r;return Cs(this,void 0,void 0,function*(){if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("[BookmarkConfigurator] No service provider configures [ServicesModule] ")}})}_getContextProvider(e){var r;return Cs(this,void 0,void 0,function*(){if(e.hasModule("context"))return e.requireInstance("context");{const n=(r=e.ref)===null||r===void 0?void 0:r.context;if(n)return n;throw Error("[BookmarkConfigurator] No context provider configures [ContextModule]")}})}_getAppProvider(e){var r;return Cs(this,void 0,void 0,function*(){if(e.hasModule("app"))return e.requireInstance("app");{const n=(r=e.ref)===null||r===void 0?void 0:r.app;if(n)return n;throw Error("[BookmarkConfigurator] No app provider configures [AppModule]")}})}_getEventProvider(e){var r;return Cs(this,void 0,void 0,function*(){if(e.hasModule("event"))return e.requireInstance("event");{const n=(r=e.ref)===null||r===void 0?void 0:r.event;if(n)return n;throw Error("[BookmarkConfigurator] No event provider configures [EventModule]")}})}}Ap=new WeakMap,o5=new WeakSet,cA=function(e,r){e&&(r.clientConfiguration=e.config.clientConfiguration,r.sourceSystem=e.config.sourceSystem,r.getContextId=e.config.getContextId,r.getCurrentAppIdentification=e.config.getCurrentAppIdentification)};const Xr={getAll:fo("getAll",t=>({payload:t}),t=>({payload:t}),t=>({payload:t})),delete:fo("delete",t=>({payload:t}),t=>({payload:t})),addFavorite:fo("addFavorite",t=>({payload:t}),t=>({payload:t})),removeFavorite:fo("removeFavorite",t=>({payload:t}),t=>({payload:t})),update:fo("update",t=>({payload:t}),t=>({payload:t})),create:fo("create",t=>({payload:t}),t=>({payload:t}),t=>({payload:t}))},dB={bookmarks:{}},uB=Id(dB,t=>{t.addCase(Xr.create.success,(e,{payload:r})=>{e.bookmarks[r.id]=r}).addCase(Xr.getAll.success,(e,{payload:r})=>{r.forEach(n=>{e.bookmarks[n.id]=n})}).addCase(Xr.delete.success,(e,{payload:r})=>{delete e.bookmarks[r]}).addCase(Xr.removeFavorite,(e,{payload:r})=>{delete e.bookmarks[r]}).addCase(Xr.addFavorite,(e,{payload:r})=>{e.bookmarks[r.id]=r}).addCase(Xr.update.success,(e,{payload:r})=>{e.bookmarks[r.id]=r})});var Hy=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const hB=(t,e)=>r=>r.pipe(Ad(Xr.getAll.type),mt(n=>t.query({isValid:n.payload}).pipe(d1(),Se(i=>Xr.getAll.success(i.value.filter(o=>{var a;return((a=o.sourceSystem)===null||a===void 0?void 0:a.identifier)===e}))),Xt(()=>Zt)))),fB=t=>e=>e.pipe(Ad(Xr.create.type),mt(r=>Hy(void 0,void 0,void 0,function*(){const n=yield t.post("v1",r.payload);return Xr.create.success(yield n.json())}))),Kb=t=>e=>e.pipe(Ad(Xr.update.type),mt(r=>Hy(void 0,void 0,void 0,function*(){const n=yield t.patch("v1",r.payload);return Xr.update.success(yield n.json())}))),pB=t=>e=>e.pipe(Ad(Xr.delete.type),mt(r=>Hy(void 0,void 0,void 0,function*(){return(yield t.delete("v1",{id:r.payload})).ok,Xr.delete.success(r.payload)})));var ro=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Es=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},he=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ip,dl,Vo,Fi,Zi,B2,Go,kt,Bo,lA,dA;class mB{constructor(e,r,n){Ip.add(this),dl.set(this,void 0),Vo.set(this,void 0),Fi.set(this,void 0),Zi.set(this,void 0),B2.set(this,void 0),Go.set(this,void 0),kt.set(this,void 0),Bo.set(this,new Tr),Es(this,Zi,new Ed(void 0),"f"),Es(this,Fi,e.client,"f"),Es(this,dl,new Hr(e.queryClientConfig.getBookmarkById),"f"),Es(this,Vo,new Hr(e.queryClientConfig.getAllBookmarks),"f"),Es(this,B2,r,"f"),Es(this,Go,n,"f"),Es(this,kt,lD(Xr,uB),"f"),he(this,Ip,"m",dA).call(this),he(this,Ip,"m",lA).call(this),n&&he(this,Bo,"f").add(he(this,Zi,"f").subscribe(i=>{n.dispatchEvent("onBookmarkChanged",{detail:i,canBubble:!0,source:this})}))}get currentBookmark$(){return he(this,Zi,"f").asObservable()}get bookmarks$(){return he(this,kt,"f").subject.pipe(Se(e=>Object.values(e.bookmarks).map(r=>r)))}setCurrentBookmark(e){return ro(this,void 0,void 0,function*(){if(!e)return he(this,Zi,"f").next(void 0);if(typeof e=="string"){const r=yield this.resolverBookmarkAsync(e);return this.setBookmark(r)}else if(e!==he(this,Zi,"f").value)return this.setBookmark(e)})}setBookmark(e){return ro(this,void 0,void 0,function*(){he(this,Go,"f")?(yield he(this,Go,"f").dispatchEvent("onBookmarkChange",{detail:e,cancelable:!0,canBubble:!0,source:this})).canceled||he(this,Zi,"f").next(e):he(this,Zi,"f").next(e)})}resolverBookmark(e){return he(this,dl,"f").query({id:e}).pipe(Se(r=>r.value))}resolverBookmarkAsync(e){return yr(this.resolverBookmark(e))}getAllBookmarks(e={isValid:!1}){const{isValid:r}=e;return new Ne(n=>{he(this,kt,"f").dispatch.getAll(r),n.add(he(this,kt,"f").subject.addEffect("getAll::success",i=>{var o;n.next(i.payload),n.complete(),(o=he(this,Go,"f"))===null||o===void 0||o.dispatchEvent("onBookmarksChanged",{detail:i.payload,source:this})}))})}getAllBookmarksAsync(e={isValid:!1}){return ro(this,void 0,void 0,function*(){return yr(this.getAllBookmarks(e))})}getBookmarkById(e){return ro(this,void 0,void 0,function*(){return yield(yield he(this,Fi,"f").get("v1",{id:e})).json()})}createBookmark(e){return new Ne(r=>{he(this,kt,"f").dispatch.create(e),r.add(he(this,kt,"f").subject.addEffect("create::success",n=>{r.next(n.payload),r.complete()})),r.add(he(this,kt,"f").subject.addEffect("create::failure",n=>{r.error(n.payload)}))})}createBookmarkAsync(e){return ro(this,void 0,void 0,function*(){return yr(this.createBookmark(e))})}updateBookmark(e){return new Ne(r=>{he(this,kt,"f").dispatch.update(e),r.add(he(this,kt,"f").subject.addEffect("update::success",n=>{r.next(n.payload),r.complete(),he(this,dl,"f").cache.invalidate(n.payload.id)}))})}updateBookmarkAsync(e){return ro(this,void 0,void 0,function*(){return yr(this.updateBookmark(e))})}deleteBookmarkById(e){return new Ne(r=>{he(this,kt,"f").dispatch.delete(e),r.add(he(this,kt,"f").subject.addEffect("delete::success",n=>{r.next(n.payload),r.complete(),he(this,dl,"f").cache.invalidate(n.payload)}))})}deleteBookmarkByIdAsync(e){return ro(this,void 0,void 0,function*(){return yr(this.deleteBookmarkById(e))})}addBookmarkFavoriteAsync(e){return ro(this,void 0,void 0,function*(){(yield he(this,Fi,"f").addFavorite("v1",{bookmarkId:e})).ok&&he(this,Zi,"f").value&&he(this,kt,"f").dispatch.addFavorite(he(this,Zi,"f").value)})}removeBookmarkFavoriteAsync(e){return ro(this,void 0,void 0,function*(){(yield he(this,Fi,"f").removeFavorite("v1",{bookmarkId:e})).ok&&he(this,kt,"f").dispatch.removeFavorite(e)})}verifyBookmarkFavoriteAsync(e){return ro(this,void 0,void 0,function*(){return!!(yield he(this,Fi,"f").verifyFavorite("v1",{bookmarkId:e})).ok})}dispose(){he(this,Bo,"f").unsubscribe()}}dl=new WeakMap,Vo=new WeakMap,Fi=new WeakMap,Zi=new WeakMap,B2=new WeakMap,Go=new WeakMap,kt=new WeakMap,Bo=new WeakMap,Ip=new WeakSet,lA=function(){he(this,kt,"f").subject.addEffect("create::success",e=>{var r;he(this,Vo,"f").cache.invalidate("all-bookmarks"),(r=he(this,Go,"f"))===null||r===void 0||r.dispatchEvent("onBookmarkCreated",{detail:e.payload,canBubble:!0,source:this})}),he(this,kt,"f").subject.addEffect("delete::success",e=>{var r;console.log("here"),he(this,Vo,"f").cache.invalidate("all-bookmarks"),(r=he(this,Go,"f"))===null||r===void 0||r.dispatchEvent("onBookmarkDeleted",{detail:e.payload,canBubble:!0,source:this})}),he(this,kt,"f").subject.addEffect("update::success",e=>{var r;he(this,Vo,"f").cache.invalidate("all-bookmarks"),(r=he(this,Go,"f"))===null||r===void 0||r.dispatchEvent("onBookmarkUpdated",{detail:e.payload,canBubble:!0,source:this})}),he(this,kt,"f").subject.addEffect("addFavorite::request",()=>{he(this,Vo,"f").cache.invalidate("all-bookmarks")}),he(this,kt,"f").subject.addEffect("removeFavorite::request",()=>{he(this,Vo,"f").cache.invalidate("all-bookmarks")})},dA=function(){var e;he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(hB(he(this,Vo,"f"),(e=he(this,B2,"f"))===null||e===void 0?void 0:e.identifier))),he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(fB(he(this,Fi,"f")))),he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(pB(he(this,Fi,"f")))),he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(Kb(he(this,Fi,"f")))),he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(Kb(he(this,Fi,"f"))))};var lo=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},vB=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Pi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ul,$s,Tp,a5,s5,c5;class gB{get currentBookmark$(){return this._bookmarkClient.currentBookmark$}get bookmarks$(){return this._bookmarkClient.bookmarks$}constructor(e,r){ul.add(this),$s.set(this,void 0),Tp.set(this,new Tr),this.bookmarkCreators={},a5.set(this,()=>{this.bookmarkCreators={}}),this.config=e,vB(this,$s,e.event,"f"),this._bookmarkClient=r?r._bookmarkClient:new mB(e.clientConfiguration,e.sourceSystem,e.event);const n=e.resolveBookmarkId&&e.resolveBookmarkId();n&&this._bookmarkClient.setCurrentBookmark(n),Pi(this,$s,"f")&&Pi(this,Tp,"f").add(Pi(this,$s,"f").addEventListener("onCurrentAppChanged",Pi(this,a5,"f")))}getBookmarkById(e){return lo(this,void 0,void 0,function*(){return yield this._bookmarkClient.getBookmarkById(e)})}setCurrentBookmark(e){return lo(this,void 0,void 0,function*(){this._bookmarkClient.setCurrentBookmark(e)})}getAllBookmarks(){return this._bookmarkClient.getAllBookmarks()}getAllBookmarksAsync(){return lo(this,void 0,void 0,function*(){return this._bookmarkClient.getAllBookmarksAsync()})}updateBookmark(e){return this._bookmarkClient.updateBookmark(e)}updateBookmarkAsync(e,r){return lo(this,void 0,void 0,function*(){if(Pi(this,ul,"m",c5).call(this)===e.appKey){if(r!=null&&r.updatePayload){const n=yield Pi(this,ul,"m",s5).call(this);e=Object.assign(Object.assign({},e),{payload:n})}return this._bookmarkClient.updateBookmarkAsync(e)}})}deleteBookmarkById(e){return this._bookmarkClient.deleteBookmarkById(e)}deleteBookmarkByIdAsync(e){return this._bookmarkClient.deleteBookmarkByIdAsync(e)}addBookmarkFavoriteAsync(e){return lo(this,void 0,void 0,function*(){yield this._bookmarkClient.addBookmarkFavoriteAsync(e)})}removeBookmarkFavoriteAsync(e){return lo(this,void 0,void 0,function*(){yield this._bookmarkClient.removeBookmarkFavoriteAsync(e)})}verifyBookmarkFavoriteAsync(e){return lo(this,void 0,void 0,function*(){return yield this._bookmarkClient.verifyBookmarkFavoriteAsync(e)})}addStateCreator(e,r){var n;const i=r||"#creator";return Pi(this,$s,"f")&&((n=Pi(this,$s,"f"))===null||n===void 0||n.dispatchEvent("onAddCreator",{source:this,canBubble:!0,detail:{key:r,cb:e}})),this.bookmarkCreators[i]=e,()=>{delete this.bookmarkCreators[i]}}createBookmark(e){return lo(this,void 0,void 0,function*(){const r=yield Pi(this,ul,"m",s5).call(this),n=this.config.getContextId&&this.config.getContextId(),i=Pi(this,ul,"m",c5).call(this),o=Object.assign(Object.assign({},e),{appKey:i,contextId:n,sourceSystem:this.config.sourceSystem,payload:r});return this._bookmarkClient.createBookmarkAsync(o)})}dispose(){Pi(this,Tp,"f").unsubscribe(),this._bookmarkClient.dispose()}}$s=new WeakMap,Tp=new WeakMap,a5=new WeakMap,ul=new WeakSet,s5=function(){return lo(this,void 0,void 0,function*(){const e=this.bookmarkCreators;if(!e||Object.keys(e).length===0)throw Error("No creator registered on this BookmarkProvider");return typeof e["#creator"]=="function"?e["#creator"]():yield Object.entries(e).reduce((r,[n,i])=>lo(this,void 0,void 0,function*(){return Object.assign(yield r,{[n]:yield i()})}),Promise.resolve({}))})},c5=function(){const e=this.config.getCurrentAppIdentification&&this.config.getCurrentAppIdentification();if(!e)throw new Error("There is noe current application selected, can't create bookmark.");return e};var yB=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const _B="bookmark",bB={name:_B,configure:()=>new lB,initialize:t=>yB(void 0,void 0,void 0,function*(){var e;const r=(e=t.ref)===null||e===void 0?void 0:e.bookmark,n=yield t.config.createConfig(t,r);return new gB(n,r)}),dispose:t=>{t.instance.dispose()}},wB=(t,e)=>{t.addConfig({module:bB,configure:r=>{e&&r.addConfigBuilder(e)}})};class xB{}/**
|
|
405
|
+
`}}C([G({type:String,reflect:!0})],b1.prototype,"size",void 0);C([G({type:String,reflect:!0})],b1.prototype,"color",void 0);b1.styles=OU;const iA="fwc-circular-progress";let qb=class extends b1{};qb=C([gt(iA)],qb);const NU=v1(y1,rA);v1(b1,iA);v1(_1,nA);const oA=({children:t,text:e})=>_.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh",overflow:"hidden"},children:_.jsx(NU,{text:e,children:t})});var DU=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},VU=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Cp;class FU{constructor(e,r={}){this.config=r,Cp.set(this,void 0),DU(this,Cp,e,"f")}requireInstance(e){return VU(this,Cp,"f").requireInstance(e)}setAppClient(e,r=1*60*1e3){this.config.client={getAppManifest:typeof e.getAppManifest=="function"?{key:({appKey:n})=>n,client:{fn:e.getAppManifest},expire:r}:e.getAppManifest,getAppManifests:typeof e.getAppManifests=="function"?{key:()=>"app_manifests",client:{fn:e.getAppManifests},expire:r}:e.getAppManifests,getAppConfig:typeof e.getAppConfig=="function"?{key:n=>JSON.stringify(n),client:{fn:e.getAppConfig},expire:r}:e.getAppConfig}}}Cp=new WeakMap;const zU=()=>({setManifest:gr("set_manifest",(t,e)=>({payload:t,meta:{created:Date.now(),update:e}})),fetchManifest:fo("fetch_manifest",(t,e)=>({payload:t,meta:{update:e}}),t=>({payload:t}),t=>({payload:t})),setConfig:gr("set_config",t=>({payload:t})),fetchConfig:fo("fetch_config",t=>({payload:t}),t=>({payload:t}),t=>({payload:t})),setModule:gr("set_module",t=>({payload:t})),importApp:fo("import_app",t=>({payload:t}),t=>({payload:t}),t=>({payload:t})),setInstance:gr("set_instance",t=>({payload:t})),initialize:fo("initialize_app",()=>({payload:null}),()=>({payload:null}),t=>({payload:t}))}),Ve=zU();YN();const jU=t=>Id(Object.assign(Object.assign({},t),{status:new Set}),e=>e.addCase(Ve.setManifest,(r,n)=>{n.meta.update?r.manifest=Object.assign(Object.assign({},r.manifest),n.payload):r.manifest=n.payload}).addCase(Ve.setConfig,(r,n)=>{r.config=n.payload}).addCase(Ve.setModule,(r,n)=>{r.modules=n.payload}).addCase(Ve.setInstance,(r,n)=>{r.instance=n.payload}).addMatcher(nD,(r,n)=>{r.status.add(eb(n))}).addMatcher(aD,(r,n)=>{r.status.delete(eb(n))})),UU="modulepreload",BU=function(t){return"/"+t},Wb={},aA=function(e,r,n){let i=Promise.resolve();if(r&&r.length>0){const o=document.getElementsByTagName("link");i=Promise.all(r.map(a=>{if(a=BU(a),a in Wb)return;Wb[a]=!0;const s=a.endsWith(".css"),c=s?'[rel="stylesheet"]':"";if(!!n)for(let u=o.length-1;u>=0;u--){const h=o[u];if(h.href===a&&(!s||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":UU,s||(d.as="script",d.crossOrigin=""),d.href=a,document.head.appendChild(d),s)return new Promise((u,h)=>{d.addEventListener("load",u),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>e()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})},qU=t=>e=>e.pipe(Ue(Ve.fetchManifest.match),mt(r=>{const{payload:n,meta:{update:i}}=r,o=Dt(t.getAppManifest(n)).pipe(Ue(a=>!!a),$0());return Wl(o.pipe(Se(a=>Ve.setManifest(a,i))),o.pipe(d1(),Se(a=>Ve.fetchManifest.success(a)))).pipe(Xt(a=>mn(Ve.fetchManifest.failure(a))))})),WU=t=>e=>e.pipe(Ue(Ve.fetchConfig.match),mt(({payload:r})=>{const n=Dt(t.getAppConfig(r)).pipe(Ue(i=>!!i),$0());return Wl(n.pipe(Se(i=>Ve.setConfig(i))),n.pipe(d1(),Se(i=>Ve.fetchConfig.success(i)))).pipe(Xt(i=>mn(Ve.fetchConfig.failure(i))))})),GU=()=>t=>t.pipe(Ue(Ve.importApp.match),mt(({payload:e})=>Dt(aA(()=>import(e),__vite__mapDeps([]))).pipe(Se(Ve.importApp.success),Xt(r=>mn(Ve.importApp.failure(r)))))),KU=(t,e)=>{const r=jU(t),n=new h1(r);return n.addFlow(qU(e)),n.addFlow(WU(e)),n.addFlow(GU()),n};var YU=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},xe=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},QU=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},n5,we,sA;function Zu(){return Ue(t=>t!=null)}class XU{get manifest$(){return xe(this,we,"f").pipe(Se(({manifest:e})=>e),Zu())}get config$(){return xe(this,we,"f").pipe(Se(({config:e})=>e),Zu())}get modules$(){return xe(this,we,"f").pipe(Se(({modules:e})=>e),Zu())}get instance$(){return xe(this,we,"f").pipe(Se(({instance:e})=>e),Zu())}get state(){return Object.freeze(xe(this,we,"f").value)}get appKey(){return xe(this,we,"f").value.appKey}get manifest(){return this.state.manifest}get manifestAsync(){return $r(this.manifest$)}get config(){return this.state.config}get configAsync(){return $r(this.config$)}get instance(){return xe(this,we,"f").value.instance}constructor(e,r){n5.add(this),we.set(this,void 0),QU(this,we,KU(e,r.provider),"f");const{appKey:n}=e,{event:i}=r;i&&xe(this,n5,"m",sA).call(this,i);const o=new Tr;i&&(o.add(()=>{i.dispatchEvent("onAppDispose",{detail:{appKey:n}})}),o.add(i.addEventListener("onAppModulesLoaded",a=>{a.detail.appKey===n&&xe(this,we,"f").next(Ve.setInstance(a.detail.modules))}))),this.dispose=()=>{o==null||o.unsubscribe(),xe(this,we,"f").value.instance&&xe(this,we,"f").value.instance.dispose(),xe(this,we,"f").complete()}}initialize(){return new Ne(e=>{xe(this,we,"f").next(Ve.initialize()),e.add(pL([this.getManifest(),this.getAppModule(),this.getConfig()]).subscribe({next:([r,n,i])=>e.next({manifest:r,script:n,config:i}),error:r=>{e.error(r),xe(this,we,"f").next(Ve.initialize.failure(r))},complete:()=>{xe(this,we,"f").next(Ve.initialize.success()),e.complete()}}))})}loadConfig(){xe(this,we,"f").next(Ve.fetchConfig(this.appKey))}loadManifest(e){xe(this,we,"f").next(Ve.fetchManifest(this.appKey,e))}updateManifest(e,r){xe(this,we,"f").next(Ve.setManifest(e,!r))}loadAppModule(){return YU(this,arguments,void 0,function*(e=!0){const r=yield this.getManifestAsync(e);xe(this,we,"f").next(Ve.importApp(r.entry))})}getConfig(e=!1){return new Ne(r=>{if(xe(this,we,"f").value.config&&(r.next(xe(this,we,"f").value.config),!e))return r.complete();r.add(xe(this,we,"f").addEffect("set_config",({payload:n})=>{r.next(n)})),r.add(xe(this,we,"f").addEffect("fetch_config::success",({payload:n})=>{r.next(n),r.complete()})),r.add(xe(this,we,"f").addEffect("fetch_config::failure",({payload:n})=>{r.error(Error("failed to load application config",{cause:n}))})),this.loadConfig()})}getConfigAsync(e=!0){return(e?$r:yr)(this.getConfig(!e))}getManifest(e=!1){return new Ne(r=>{if(xe(this,we,"f").value.manifest&&(r.next(xe(this,we,"f").value.manifest),!e))return r.complete();r.add(xe(this,we,"f").addEffect("set_manifest",({payload:n})=>{r.next(n)})),r.add(xe(this,we,"f").addEffect("fetch_manifest::success",({payload:n})=>{r.next(n),r.complete()})),r.add(xe(this,we,"f").addEffect("fetch_manifest::failure",({payload:n})=>{r.error(Error("failed to load application manifest",{cause:n}))})),this.loadManifest()})}getManifestAsync(e=!0){return(e?$r:yr)(this.getManifest(!e))}getAppModule(e=!1){return new Ne(r=>{if(xe(this,we,"f").value.modules&&(r.next(xe(this,we,"f").value.modules),!e))return r.complete();r.add(xe(this,we,"f").addEffect("set_module",({payload:n})=>{r.next(n)})),r.add(xe(this,we,"f").addEffect("import_app::success",({payload:n})=>{r.next(n),r.complete()})),r.add(xe(this,we,"f").addEffect("import_app::failure",({payload:n})=>{r.error(Error("failed to load application modules from script",{cause:n}))})),r.add(this.getManifest().subscribe(n=>{xe(this,we,"f").next(Ve.importApp(n.entry))}))})}getAppModuleAsync(e=!0){return(e?$r:yr)(this.getAppModule(!e))}}we=new WeakMap,n5=new WeakSet,sA=function(e){const{appKey:r}=this;xe(this,we,"f").addEffect(Ve.fetchManifest.type,()=>{e.dispatchEvent("onAppManifestLoad",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.fetchManifest.success.type,n=>{e.dispatchEvent("onAppManifestLoaded",{detail:{appKey:r,manifest:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.fetchManifest.failure.type,n=>{e.dispatchEvent("onAppManifestFailure",{detail:{appKey:r,error:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.fetchConfig.type,()=>{e.dispatchEvent("onAppConfigLoad",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.fetchConfig.success.type,n=>{e.dispatchEvent("onAppConfigLoaded",{detail:{appKey:r,config:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.fetchConfig.failure.type,n=>{e.dispatchEvent("onAppConfigFailure",{detail:{appKey:r,error:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.importApp.type,()=>{e.dispatchEvent("onAppScriptLoad",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.importApp.success.type,n=>{e.dispatchEvent("onAppScriptLoaded",{detail:{appKey:r,script:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.importApp.failure.type,n=>{e.dispatchEvent("onAppScriptFailure",{detail:{appKey:r,error:n.payload},source:this})}),xe(this,we,"f").addEffect(Ve.initialize.type,()=>{e.dispatchEvent("onAppInitialize",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.initialize.success.type,()=>{e.dispatchEvent("onAppInitialized",{detail:{appKey:r},source:this})}),xe(this,we,"f").addEffect(Ve.initialize.failure.type,({payload:n})=>{e.dispatchEvent("onAppInitializeFailure",{detail:{appKey:r,error:n},source:this})})};class es extends Error{static fromHttpResponse(e,r){switch(e.status){case 401:return new es("unauthorized","failed to load application manifest, request not authorized",r);case 404:return new es("not_found","application manifest not found",r)}return new es("unknown",`failed to load application manifest, status code ${e.status}`,r)}constructor(e,r,n){super(r,n),this.type=e}}class sc extends Error{static fromHttpResponse(e,r){switch(e.status){case 401:return new sc("unauthorized","failed to load application config, request not authorized",r);case 404:return new sc("not_found","application config not found",r)}return new sc("unknown",`failed to load application config, status code ${e.status}`,r)}constructor(e,r,n){super(r,n),this.type=e}}var Kr=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kf=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Hu,$u,Aa,Ia,Ep;class JU{static compareAppManifest(e,r){return JSON.stringify(e)===JSON.stringify(r)}get current(){return Kr(this,Aa,"f").value}get current$(){return Kr(this,Aa,"f").pipe(kk((e,r)=>e&&r?e.appKey===r.appKey:e===r))}constructor(e){Hu.set(this,void 0),$u.set(this,void 0),Aa.set(this,void 0),Ia.set(this,new Tr),Ep.set(this,void 0);const{event:r,config:n}=e;kf(this,Ep,r,"f"),kf(this,Aa,new Ed(void 0),"f"),this.appClient=new Hr(n.client.getAppManifest),kf(this,Hu,new Hr(n.client.getAppManifests),"f"),kf(this,$u,new Hr(n.client.getAppConfig),"f"),Kr(this,Ia,"f").add(()=>this.appClient.complete()),Kr(this,Ia,"f").add(()=>Kr(this,Hu,"f").complete()),Kr(this,Ia,"f").add(()=>Kr(this,$u,"f").complete()),Kr(this,Ia,"f").add(this.current$.pipe(E2(),Ik(()=>!!r)).subscribe(([i,o])=>{r==null||r.dispatchEvent("onCurrentAppChanged",{source:this,detail:{previous:i,next:o}})})),Kr(this,Ia,"f").add(Kr(this,Aa,"f").pipe(E2(),Se(([i])=>i),Zu()).subscribe(i=>i.dispose()))}getAppManifest(e){return Hr.extractQueryValue(this.appClient.query({appKey:e}).pipe(Xt(r=>{const{cause:n}=r;throw n instanceof es?n:n instanceof $h?es.fromHttpResponse(n.response,{cause:n}):new es("unknown","failed to load manifest",{cause:n})})))}getAllAppManifests(){return Hr.extractQueryValue(Kr(this,Hu,"f").query())}getAppConfig(e,r){return Hr.extractQueryValue(Kr(this,$u,"f").query({appKey:e,tag:r}).pipe(Xt(n=>{const{cause:i}=n;throw i instanceof sc?i:i instanceof $h?sc.fromHttpResponse(i.response,{cause:i}):new sc("unknown","failed to load config",{cause:i})})))}setCurrentApp(e){const r=typeof e=="string"?this.createApp({appKey:e}):e;Kr(this,Aa,"f").next(r)}clearCurrentApp(){Kr(this,Aa,"f").next(null)}createApp(e){return console.warn(),new XU(e,{provider:this,event:Kr(this,Ep,"f")})}dispose(){Kr(this,Ia,"f").unsubscribe()}}Hu=new WeakMap,$u=new WeakMap,Aa=new WeakMap,Ia=new WeakMap,Ep=new WeakMap;var eB=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const i5="app",tB={name:i5,configure:()=>new rB,initialize:t=>eB(void 0,void 0,void 0,function*(){const e=yield t.config.createConfig(t),r=yield t.requireInstance("event").catch(()=>{});return new JU({config:e,event:r})}),dispose:t=>{t.instance.dispose()}};var Sf=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Gb=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},kp;class rB{constructor(){this.defaultExpireTime=1*60*1e3,kp.set(this,[])}addConfigBuilder(e){Gb(this,kp,"f").push(e)}_createHttpClient(e){return Sf(this,void 0,void 0,function*(){const r=yield e.requireInstance("http");if(r.hasClient(i5))return r.createClient(i5);{const n=yield e.requireInstance("serviceDiscovery");try{return yield n.createClient("app")}catch{return yield n.createClient("portal")}}})}createConfig(e){return Sf(this,void 0,void 0,function*(){var r;const n=yield Gb(this,kp,"f").reduce((i,o)=>Sf(this,void 0,void 0,function*(){const a=new FU(e,yield i);return yield Promise.resolve(o(a)),Object.assign(i,a.config)}),Promise.resolve({}));return(r=n.client)!==null&&r!==void 0||(n.client=yield Sf(this,void 0,void 0,function*(){const i=yield this._createHttpClient(e);return{getAppManifest:{client:{fn:({appKey:o})=>i.json$(`/api/apps/${o}`)},key:({appKey:o})=>o,expire:this.defaultExpireTime},getAppManifests:{client:{fn:()=>i.json$("/api/apps")},key:()=>"manifests",expire:this.defaultExpireTime},getAppConfig:{client:{fn:({appKey:o,tag:a})=>i.json$(`/api/apps/${o}/config${a?`?tag=${a}`:""}`)},key:o=>JSON.stringify(o),expire:this.defaultExpireTime}}})),n})}}kp=new WeakMap;const nB=(t,e)=>{t.addConfig({module:tB,configure:r=>{e&&r.addConfigBuilder(e)}})},iB="bookmarkId",oB=()=>new URLSearchParams(document.location.search).get(iB);var aB=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},sB=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Sp;class cB{constructor(e,r={}){this.config=r,Sp.set(this,void 0),aB(this,Sp,e,"f")}requireInstance(e){return sB(this,Sp,"f").requireInstance(e)}setSourceSystem(e){this.config.sourceSystem=e}setBookmarkIdResolver(e){this.config.resolveBookmarkId=e}serCustomBookmarkApiClient(e){this.config.clientConfiguration&&(this.config.clientConfiguration.client=e)}setContextIdResolver(e){this.config.getContextId=e}setCurrentAppIdResolver(e){this.config.getCurrentAppIdentification=e}setEventProvider(e){this.config.event=e}setBookmarkQueryClient(e){this.config.clientConfiguration&&(this.config.clientConfiguration.queryClientConfig={getAllBookmarks:typeof e.getAllBookmarks=="function"?{key:()=>"all-bookmarks",client:{fn:e.getAllBookmarks},validate:({args:n})=>n.isValid}:e.getAllBookmarks,getBookmarkById:typeof e.getBookmarkById=="function"?{key:({id:n})=>n,client:{fn:e.getBookmarkById},expire:6e4,validate:()=>!1}:e.getBookmarkById})}}Sp=new WeakMap;var Cs=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},zv=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},o5,Ap,cA;class lB{constructor(){o5.add(this),this.defaultExpireTime=1*60*1e3,Ap.set(this,[])}addConfigBuilder(e){zv(this,Ap,"f").push(e)}createConfig(e,r){return Cs(this,void 0,void 0,function*(){const n=yield zv(this,Ap,"f").reduce((o,a)=>Cs(this,void 0,void 0,function*(){const s=new cB(e,yield o);return yield Promise.resolve(a(s)),Object.assign(o,s.config)}),Promise.resolve({})),i=yield this._getAppProvider(e);if(zv(this,o5,"m",cA).call(this,r,n),n.resolveBookmarkId||(n.resolveBookmarkId=oB),n.getCurrentAppIdentification||(n.getCurrentAppIdentification=()=>{var o;return(o=i.current)===null||o===void 0?void 0:o.appKey}),!n.getContextId){const o=yield this._getContextProvider(e);n.getContextId=()=>{var a;return(a=o.currentContext)===null||a===void 0?void 0:a.id}}if(!n.event){const o=yield this._getEventProvider(e);n.event=o}return n.clientConfiguration=yield this._createClientConfiguration(e,n.clientConfiguration),n})}_createClientConfiguration(e){return Cs(this,arguments,void 0,function*(r,n={}){if(!n.client){const i=yield this._getServiceProvider(r);n.client=yield i.createBookmarksClient("fetch")}if(!n.queryClientConfig){const o=yield(yield this._getServiceProvider(r)).createBookmarksClient("json$");n.queryClientConfig=Object.assign({getBookmarkById:{client:{fn:a=>o.get("v1",a)},key:({id:a})=>a,expire:this.defaultExpireTime},getAllBookmarks:{client:{fn:()=>o.getAll("v1")},key:()=>"all-bookmarks",validate:({args:a})=>a.isValid,expire:this.defaultExpireTime}},o)}return n})}_getServiceProvider(e){return Cs(this,void 0,void 0,function*(){var r;if(e.hasModule("services"))return e.requireInstance("services");{const n=(r=e.ref)===null||r===void 0?void 0:r.services;if(n)return n;throw Error("[BookmarkConfigurator] No service provider configures [ServicesModule] ")}})}_getContextProvider(e){return Cs(this,void 0,void 0,function*(){var r;if(e.hasModule("context"))return e.requireInstance("context");{const n=(r=e.ref)===null||r===void 0?void 0:r.context;if(n)return n;throw Error("[BookmarkConfigurator] No context provider configures [ContextModule]")}})}_getAppProvider(e){return Cs(this,void 0,void 0,function*(){var r;if(e.hasModule("app"))return e.requireInstance("app");{const n=(r=e.ref)===null||r===void 0?void 0:r.app;if(n)return n;throw Error("[BookmarkConfigurator] No app provider configures [AppModule]")}})}_getEventProvider(e){return Cs(this,void 0,void 0,function*(){var r;if(e.hasModule("event"))return e.requireInstance("event");{const n=(r=e.ref)===null||r===void 0?void 0:r.event;if(n)return n;throw Error("[BookmarkConfigurator] No event provider configures [EventModule]")}})}}Ap=new WeakMap,o5=new WeakSet,cA=function(e,r){e&&(r.clientConfiguration=e.config.clientConfiguration,r.sourceSystem=e.config.sourceSystem,r.getContextId=e.config.getContextId,r.getCurrentAppIdentification=e.config.getCurrentAppIdentification)};const Xr={getAll:fo("getAll",t=>({payload:t}),t=>({payload:t}),t=>({payload:t})),delete:fo("delete",t=>({payload:t}),t=>({payload:t})),addFavorite:fo("addFavorite",t=>({payload:t}),t=>({payload:t})),removeFavorite:fo("removeFavorite",t=>({payload:t}),t=>({payload:t})),update:fo("update",t=>({payload:t}),t=>({payload:t})),create:fo("create",t=>({payload:t}),t=>({payload:t}),t=>({payload:t}))},dB={bookmarks:{}},uB=Id(dB,t=>{t.addCase(Xr.create.success,(e,{payload:r})=>{e.bookmarks[r.id]=r}).addCase(Xr.getAll.success,(e,{payload:r})=>{r.forEach(n=>{e.bookmarks[n.id]=n})}).addCase(Xr.delete.success,(e,{payload:r})=>{delete e.bookmarks[r]}).addCase(Xr.removeFavorite,(e,{payload:r})=>{delete e.bookmarks[r]}).addCase(Xr.addFavorite,(e,{payload:r})=>{e.bookmarks[r.id]=r}).addCase(Xr.update.success,(e,{payload:r})=>{e.bookmarks[r.id]=r})});var Hy=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const hB=(t,e)=>r=>r.pipe(Ad(Xr.getAll.type),mt(n=>t.query({isValid:n.payload}).pipe(d1(),Se(i=>Xr.getAll.success(i.value.filter(o=>{var a;return((a=o.sourceSystem)===null||a===void 0?void 0:a.identifier)===e}))),Xt(()=>Zt)))),fB=t=>e=>e.pipe(Ad(Xr.create.type),mt(r=>Hy(void 0,void 0,void 0,function*(){const n=yield t.post("v1",r.payload);return Xr.create.success(yield n.json())}))),Kb=t=>e=>e.pipe(Ad(Xr.update.type),mt(r=>Hy(void 0,void 0,void 0,function*(){const n=yield t.patch("v1",r.payload);return Xr.update.success(yield n.json())}))),pB=t=>e=>e.pipe(Ad(Xr.delete.type),mt(r=>Hy(void 0,void 0,void 0,function*(){return(yield t.delete("v1",{id:r.payload})).ok,Xr.delete.success(r.payload)})));var ro=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},Es=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},he=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Ip,dl,Vo,Fi,Zi,B2,Go,kt,Bo,lA,dA;class mB{constructor(e,r,n){Ip.add(this),dl.set(this,void 0),Vo.set(this,void 0),Fi.set(this,void 0),Zi.set(this,void 0),B2.set(this,void 0),Go.set(this,void 0),kt.set(this,void 0),Bo.set(this,new Tr),Es(this,Zi,new Ed(void 0),"f"),Es(this,Fi,e.client,"f"),Es(this,dl,new Hr(e.queryClientConfig.getBookmarkById),"f"),Es(this,Vo,new Hr(e.queryClientConfig.getAllBookmarks),"f"),Es(this,B2,r,"f"),Es(this,Go,n,"f"),Es(this,kt,lD(Xr,uB),"f"),he(this,Ip,"m",dA).call(this),he(this,Ip,"m",lA).call(this),n&&he(this,Bo,"f").add(he(this,Zi,"f").subscribe(i=>{n.dispatchEvent("onBookmarkChanged",{detail:i,canBubble:!0,source:this})}))}get currentBookmark$(){return he(this,Zi,"f").asObservable()}get bookmarks$(){return he(this,kt,"f").subject.pipe(Se(e=>Object.values(e.bookmarks).map(r=>r)))}setCurrentBookmark(e){return ro(this,void 0,void 0,function*(){if(!e)return he(this,Zi,"f").next(void 0);if(typeof e=="string"){const r=yield this.resolverBookmarkAsync(e);return this.setBookmark(r)}else if(e!==he(this,Zi,"f").value)return this.setBookmark(e)})}setBookmark(e){return ro(this,void 0,void 0,function*(){he(this,Go,"f")?(yield he(this,Go,"f").dispatchEvent("onBookmarkChange",{detail:e,cancelable:!0,canBubble:!0,source:this})).canceled||he(this,Zi,"f").next(e):he(this,Zi,"f").next(e)})}resolverBookmark(e){return he(this,dl,"f").query({id:e}).pipe(Se(r=>r.value))}resolverBookmarkAsync(e){return yr(this.resolverBookmark(e))}getAllBookmarks(e={isValid:!1}){const{isValid:r}=e;return new Ne(n=>{he(this,kt,"f").dispatch.getAll(r),n.add(he(this,kt,"f").subject.addEffect("getAll::success",i=>{var o;n.next(i.payload),n.complete(),(o=he(this,Go,"f"))===null||o===void 0||o.dispatchEvent("onBookmarksChanged",{detail:i.payload,source:this})}))})}getAllBookmarksAsync(){return ro(this,arguments,void 0,function*(e={isValid:!1}){return yr(this.getAllBookmarks(e))})}getBookmarkById(e){return ro(this,void 0,void 0,function*(){return yield(yield he(this,Fi,"f").get("v1",{id:e})).json()})}createBookmark(e){return new Ne(r=>{he(this,kt,"f").dispatch.create(e),r.add(he(this,kt,"f").subject.addEffect("create::success",n=>{r.next(n.payload),r.complete()})),r.add(he(this,kt,"f").subject.addEffect("create::failure",n=>{r.error(n.payload)}))})}createBookmarkAsync(e){return ro(this,void 0,void 0,function*(){return yr(this.createBookmark(e))})}updateBookmark(e){return new Ne(r=>{he(this,kt,"f").dispatch.update(e),r.add(he(this,kt,"f").subject.addEffect("update::success",n=>{r.next(n.payload),r.complete(),he(this,dl,"f").cache.invalidate(n.payload.id)}))})}updateBookmarkAsync(e){return ro(this,void 0,void 0,function*(){return yr(this.updateBookmark(e))})}deleteBookmarkById(e){return new Ne(r=>{he(this,kt,"f").dispatch.delete(e),r.add(he(this,kt,"f").subject.addEffect("delete::success",n=>{r.next(n.payload),r.complete(),he(this,dl,"f").cache.invalidate(n.payload)}))})}deleteBookmarkByIdAsync(e){return ro(this,void 0,void 0,function*(){return yr(this.deleteBookmarkById(e))})}addBookmarkFavoriteAsync(e){return ro(this,void 0,void 0,function*(){(yield he(this,Fi,"f").addFavorite("v1",{bookmarkId:e})).ok&&he(this,Zi,"f").value&&he(this,kt,"f").dispatch.addFavorite(he(this,Zi,"f").value)})}removeBookmarkFavoriteAsync(e){return ro(this,void 0,void 0,function*(){(yield he(this,Fi,"f").removeFavorite("v1",{bookmarkId:e})).ok&&he(this,kt,"f").dispatch.removeFavorite(e)})}verifyBookmarkFavoriteAsync(e){return ro(this,void 0,void 0,function*(){return!!(yield he(this,Fi,"f").verifyFavorite("v1",{bookmarkId:e})).ok})}dispose(){he(this,Bo,"f").unsubscribe()}}dl=new WeakMap,Vo=new WeakMap,Fi=new WeakMap,Zi=new WeakMap,B2=new WeakMap,Go=new WeakMap,kt=new WeakMap,Bo=new WeakMap,Ip=new WeakSet,lA=function(){he(this,kt,"f").subject.addEffect("create::success",e=>{var r;he(this,Vo,"f").cache.invalidate("all-bookmarks"),(r=he(this,Go,"f"))===null||r===void 0||r.dispatchEvent("onBookmarkCreated",{detail:e.payload,canBubble:!0,source:this})}),he(this,kt,"f").subject.addEffect("delete::success",e=>{var r;console.log("here"),he(this,Vo,"f").cache.invalidate("all-bookmarks"),(r=he(this,Go,"f"))===null||r===void 0||r.dispatchEvent("onBookmarkDeleted",{detail:e.payload,canBubble:!0,source:this})}),he(this,kt,"f").subject.addEffect("update::success",e=>{var r;he(this,Vo,"f").cache.invalidate("all-bookmarks"),(r=he(this,Go,"f"))===null||r===void 0||r.dispatchEvent("onBookmarkUpdated",{detail:e.payload,canBubble:!0,source:this})}),he(this,kt,"f").subject.addEffect("addFavorite::request",()=>{he(this,Vo,"f").cache.invalidate("all-bookmarks")}),he(this,kt,"f").subject.addEffect("removeFavorite::request",()=>{he(this,Vo,"f").cache.invalidate("all-bookmarks")})},dA=function(){var e;he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(hB(he(this,Vo,"f"),(e=he(this,B2,"f"))===null||e===void 0?void 0:e.identifier))),he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(fB(he(this,Fi,"f")))),he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(pB(he(this,Fi,"f")))),he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(Kb(he(this,Fi,"f")))),he(this,Bo,"f").add(he(this,kt,"f").subject.addFlow(Kb(he(this,Fi,"f"))))};var lo=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},vB=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Pi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},ul,$s,Tp,a5,s5,c5;class gB{get currentBookmark$(){return this._bookmarkClient.currentBookmark$}get bookmarks$(){return this._bookmarkClient.bookmarks$}constructor(e,r){ul.add(this),$s.set(this,void 0),Tp.set(this,new Tr),this.bookmarkCreators={},a5.set(this,()=>{this.bookmarkCreators={}}),this.config=e,vB(this,$s,e.event,"f"),this._bookmarkClient=r?r._bookmarkClient:new mB(e.clientConfiguration,e.sourceSystem,e.event);const n=e.resolveBookmarkId&&e.resolveBookmarkId();n&&this._bookmarkClient.setCurrentBookmark(n),Pi(this,$s,"f")&&Pi(this,Tp,"f").add(Pi(this,$s,"f").addEventListener("onCurrentAppChanged",Pi(this,a5,"f")))}getBookmarkById(e){return lo(this,void 0,void 0,function*(){return yield this._bookmarkClient.getBookmarkById(e)})}setCurrentBookmark(e){return lo(this,void 0,void 0,function*(){this._bookmarkClient.setCurrentBookmark(e)})}getAllBookmarks(){return this._bookmarkClient.getAllBookmarks()}getAllBookmarksAsync(){return lo(this,void 0,void 0,function*(){return this._bookmarkClient.getAllBookmarksAsync()})}updateBookmark(e){return this._bookmarkClient.updateBookmark(e)}updateBookmarkAsync(e,r){return lo(this,void 0,void 0,function*(){if(Pi(this,ul,"m",c5).call(this)===e.appKey){if(r!=null&&r.updatePayload){const n=yield Pi(this,ul,"m",s5).call(this);e=Object.assign(Object.assign({},e),{payload:n})}return this._bookmarkClient.updateBookmarkAsync(e)}})}deleteBookmarkById(e){return this._bookmarkClient.deleteBookmarkById(e)}deleteBookmarkByIdAsync(e){return this._bookmarkClient.deleteBookmarkByIdAsync(e)}addBookmarkFavoriteAsync(e){return lo(this,void 0,void 0,function*(){yield this._bookmarkClient.addBookmarkFavoriteAsync(e)})}removeBookmarkFavoriteAsync(e){return lo(this,void 0,void 0,function*(){yield this._bookmarkClient.removeBookmarkFavoriteAsync(e)})}verifyBookmarkFavoriteAsync(e){return lo(this,void 0,void 0,function*(){return yield this._bookmarkClient.verifyBookmarkFavoriteAsync(e)})}addStateCreator(e,r){var n;const i=r||"#creator";return Pi(this,$s,"f")&&((n=Pi(this,$s,"f"))===null||n===void 0||n.dispatchEvent("onAddCreator",{source:this,canBubble:!0,detail:{key:r,cb:e}})),this.bookmarkCreators[i]=e,()=>{delete this.bookmarkCreators[i]}}createBookmark(e){return lo(this,void 0,void 0,function*(){const r=yield Pi(this,ul,"m",s5).call(this),n=this.config.getContextId&&this.config.getContextId(),i=Pi(this,ul,"m",c5).call(this),o=Object.assign(Object.assign({},e),{appKey:i,contextId:n,sourceSystem:this.config.sourceSystem,payload:r});return this._bookmarkClient.createBookmarkAsync(o)})}dispose(){Pi(this,Tp,"f").unsubscribe(),this._bookmarkClient.dispose()}}$s=new WeakMap,Tp=new WeakMap,a5=new WeakMap,ul=new WeakSet,s5=function(){return lo(this,void 0,void 0,function*(){const e=this.bookmarkCreators;if(!e||Object.keys(e).length===0)throw Error("No creator registered on this BookmarkProvider");return typeof e["#creator"]=="function"?e["#creator"]():yield Object.entries(e).reduce((r,n)=>lo(this,[r,n],void 0,function*(i,[o,a]){return Object.assign(yield i,{[o]:yield a()})}),Promise.resolve({}))})},c5=function(){const e=this.config.getCurrentAppIdentification&&this.config.getCurrentAppIdentification();if(!e)throw new Error("There is noe current application selected, can't create bookmark.");return e};var yB=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const _B="bookmark",bB={name:_B,configure:()=>new lB,initialize:t=>yB(void 0,void 0,void 0,function*(){var e;const r=(e=t.ref)===null||e===void 0?void 0:e.bookmark,n=yield t.config.createConfig(t,r);return new gB(n,r)}),dispose:t=>{t.instance.dispose()}},wB=(t,e)=>{t.addConfig({module:bB,configure:r=>{e&&r.addConfigBuilder(e)}})};class xB{}/**
|
|
406
406
|
* @remix-run/router v1.15.2
|
|
407
407
|
*
|
|
408
408
|
* Copyright (c) Remix Software Inc.
|
|
@@ -412,7 +412,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
412
412
|
*
|
|
413
413
|
* @license MIT
|
|
414
414
|
*/function Gt(){return Gt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Gt.apply(this,arguments)}var St;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(St||(St={}));const Yb="popstate";function CB(t){t===void 0&&(t={});let{initialEntries:e=["/"],initialIndex:r,v5Compat:n=!1}=t,i;i=e.map((f,p)=>d(f,typeof f=="string"?null:f.state,p===0?"default":void 0));let o=c(r??i.length-1),a=St.Pop,s=null;function c(f){return Math.min(Math.max(f,0),i.length-1)}function l(){return i[o]}function d(f,p,m){p===void 0&&(p=null);let w=xc(i?l().pathname:"/",f,p,m);return ss(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(f)),w}function u(f){return typeof f=="string"?f:Hc(f)}return{get index(){return o},get action(){return a},get location(){return l()},createHref:u,createURL(f){return new URL(u(f),"http://localhost")},encodeLocation(f){let p=typeof f=="string"?Qi(f):f;return{pathname:p.pathname||"",search:p.search||"",hash:p.hash||""}},push(f,p){a=St.Push;let m=d(f,p);o+=1,i.splice(o,i.length,m),n&&s&&s({action:a,location:m,delta:1})},replace(f,p){a=St.Replace;let m=d(f,p);i[o]=m,n&&s&&s({action:a,location:m,delta:0})},go(f){a=St.Pop;let p=c(o+f),m=i[p];o=p,s&&s({action:a,location:m,delta:f})},listen(f){return s=f,()=>{s=null}}}}function EB(t){t===void 0&&(t={});function e(n,i){let{pathname:o,search:a,hash:s}=n.location;return xc("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function r(n,i){return typeof i=="string"?i:Hc(i)}return uA(e,r,null,t)}function kB(t){t===void 0&&(t={});function e(i,o){let{pathname:a="/",search:s="",hash:c=""}=Qi(i.location.hash.substr(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),xc("",{pathname:a,search:s,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(i,o){let a=i.document.querySelector("base"),s="";if(a&&a.getAttribute("href")){let c=i.location.href,l=c.indexOf("#");s=l===-1?c:c.slice(0,l)}return s+"#"+(typeof o=="string"?o:Hc(o))}function n(i,o){ss(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return uA(e,r,n,t)}function qe(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function ss(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function SB(){return Math.random().toString(36).substr(2,8)}function Qb(t,e){return{usr:t.state,key:t.key,idx:e}}function xc(t,e,r,n){return r===void 0&&(r=null),Gt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Qi(e):e,{state:r,key:e&&e.key||n||SB()})}function Hc(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Qi(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function uA(t,e,r,n){n===void 0&&(n={});let{window:i=document.defaultView,v5Compat:o=!1}=n,a=i.history,s=St.Pop,c=null,l=d();l==null&&(l=0,a.replaceState(Gt({},a.state,{idx:l}),""));function d(){return(a.state||{idx:null}).idx}function u(){s=St.Pop;let w=d(),g=w==null?null:w-l;l=w,c&&c({action:s,location:m.location,delta:g})}function h(w,g){s=St.Push;let v=xc(m.location,w,g);r&&r(v,w),l=d()+1;let b=Qb(v,l),E=m.createHref(v);try{a.pushState(b,"",E)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(E)}o&&c&&c({action:s,location:m.location,delta:1})}function f(w,g){s=St.Replace;let v=xc(m.location,w,g);r&&r(v,w),l=d();let b=Qb(v,l),E=m.createHref(v);a.replaceState(b,"",E),o&&c&&c({action:s,location:m.location,delta:0})}function p(w){let g=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof w=="string"?w:Hc(w);return v=v.replace(/ $/,"%20"),qe(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let m={get action(){return s},get location(){return t(i,a)},listen(w){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Yb,u),c=w,()=>{i.removeEventListener(Yb,u),c=null}},createHref(w){return e(i,w)},createURL:p,encodeLocation(w){let g=p(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:f,go(w){return a.go(w)}};return m}var qt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(qt||(qt={}));const AB=new Set(["lazy","caseSensitive","path","id","index","children"]);function IB(t){return t.index===!0}function l5(t,e,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),t.map((i,o)=>{let a=[...r,o],s=typeof i.id=="string"?i.id:a.join("-");if(qe(i.index!==!0||!i.children,"Cannot specify children on an index route"),qe(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),IB(i)){let c=Gt({},i,e(i),{id:s});return n[s]=c,c}else{let c=Gt({},i,e(i),{id:s,children:void 0});return n[s]=c,i.children&&(c.children=l5(i.children,e,a,n)),c}})}function Ll(t,e,r){r===void 0&&(r="/");let n=typeof e=="string"?Qi(e):e,i=w1(n.pathname||"/",r);if(i==null)return null;let o=hA(t);PB(o);let a=null;for(let s=0;a==null&&s<o.length;++s){let c=zB(i);a=DB(o[s],c)}return a}function TB(t,e){let{route:r,pathname:n,params:i}=t;return{id:r.id,pathname:n,params:i,data:e[r.id],handle:r.handle}}function hA(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let i=(o,a,s)=>{let c={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};c.relativePath.startsWith("/")&&(qe(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let l=cc([n,c.relativePath]),d=r.concat(c);o.children&&o.children.length>0&&(qe(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),hA(o.children,e,d,l)),!(o.path==null&&!o.index)&&e.push({path:l,score:OB(l,o.index),routesMeta:d})};return t.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let c of fA(o.path))i(o,a,c)}),e}function fA(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,i=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return i?[o,""]:[o];let a=fA(n.join("/")),s=[];return s.push(...a.map(c=>c===""?o:[o,c].join("/"))),i&&s.push(...a),s.map(c=>t.startsWith("/")&&c===""?"/":c)}function PB(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:NB(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const RB=/^:[\w-]+$/,MB=3,ZB=2,HB=1,$B=10,LB=-2,Xb=t=>t==="*";function OB(t,e){let r=t.split("/"),n=r.length;return r.some(Xb)&&(n+=LB),e&&(n+=ZB),r.filter(i=>!Xb(i)).reduce((i,o)=>i+(RB.test(o)?MB:o===""?HB:$B),n)}function NB(t,e){return t.length===e.length&&t.slice(0,-1).every((n,i)=>n===e[i])?t[t.length-1]-e[e.length-1]:0}function DB(t,e){let{routesMeta:r}=t,n={},i="/",o=[];for(let a=0;a<r.length;++a){let s=r[a],c=a===r.length-1,l=i==="/"?e:e.slice(i.length)||"/",d=VB({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l);if(!d)return null;Object.assign(n,d.params);let u=s.route;o.push({params:n,pathname:cc([i,d.pathname]),pathnameBase:WB(cc([i,d.pathnameBase])),route:u}),d.pathnameBase!=="/"&&(i=cc([i,d.pathnameBase]))}return o}function VB(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=FB(t.path,t.caseSensitive,t.end),i=e.match(r);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:n.reduce((l,d,u)=>{let{paramName:h,isOptional:f}=d;if(h==="*"){let m=s[u]||"";a=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const p=s[u];return f&&!p?l[h]=void 0:l[h]=(p||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:t}}function FB(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),ss(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,c)=>(n.push({paramName:s,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),n]}function zB(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return ss(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function w1(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function jB(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:i=""}=typeof t=="string"?Qi(t):t;return{pathname:r?r.startsWith("/")?r:UB(r,e):e,search:GB(n),hash:KB(i)}}function UB(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}function jv(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function pA(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function BB(t,e){let r=pA(t);return e?r.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function qB(t,e,r,n){n===void 0&&(n=!1);let i;typeof t=="string"?i=Qi(t):(i=Gt({},t),qe(!i.pathname||!i.pathname.includes("?"),jv("?","pathname","search",i)),qe(!i.pathname||!i.pathname.includes("#"),jv("#","pathname","hash",i)),qe(!i.search||!i.search.includes("#"),jv("#","search","hash",i)));let o=t===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=r;else{let u=e.length-1;if(!n&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),u-=1;i.pathname=h.join("/")}s=u>=0?e[u]:"/"}let c=jB(i,s),l=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(l||d)&&(c.pathname+="/"),c}const cc=t=>t.join("/").replace(/\/\/+/g,"/"),WB=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),GB=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,KB=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class mA{constructor(e,r,n,i){i===void 0&&(i=!1),this.status=e,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function vA(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const gA=["post","put","patch","delete"],YB=new Set(gA),QB=["get",...gA],XB=new Set(QB),JB=new Set([301,302,303,307,308]),eq=new Set([307,308]),Uv={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tq={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ou={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},yA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rq=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),_A="remix-router-transitions";function nq(t){const e=t.window?t.window:typeof window<"u"?window:void 0,r=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",n=!r;qe(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(t.mapRouteProperties)i=t.mapRouteProperties;else if(t.detectErrorBoundary){let T=t.detectErrorBoundary;i=R=>({hasErrorBoundary:T(R)})}else i=rq;let o={},a=l5(t.routes,i,void 0,o),s,c=t.basename||"/",l=Gt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},t.future),d=null,u=new Set,h=null,f=null,p=null,m=t.hydrationData!=null,w=Ll(a,t.history.location,c),g=null;if(w==null){let T=di(404,{pathname:t.history.location.pathname}),{matches:R,route:F}=a9(a);w=R,g={[F.id]:T}}let v,b=w.some(T=>T.route.lazy),E=w.some(T=>T.route.loader);if(b)v=!1;else if(!E)v=!0;else if(l.v7_partialHydration){let T=t.hydrationData?t.hydrationData.loaderData:null,R=t.hydrationData?t.hydrationData.errors:null;v=w.every(F=>F.route.loader&&F.route.loader.hydrate!==!0&&(T&&T[F.route.id]!==void 0||R&&R[F.route.id]!==void 0))}else v=t.hydrationData!=null;let k,x={historyAction:t.history.action,location:t.history.location,matches:w,initialized:v,navigation:Uv,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||g,fetchers:new Map,blockers:new Map},S=St.Pop,Z=!1,W,K=!1,ie=new Map,ce=null,z=!1,H=!1,L=[],q=[],$=new Map,I=0,N=-1,J=new Map,ee=new Set,pe=new Map,nt=new Map,ve=new Set,Qe=new Map,dt=new Map,Cn=!1;function gs(){if(d=t.history.listen(T=>{let{action:R,location:F,delta:oe}=T;if(Cn){Cn=!1;return}ss(dt.size===0||oe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let me=A_({currentLocation:x.location,nextLocation:F,historyAction:R});if(me&&oe!=null){Cn=!0,t.history.go(oe*-1),U1(me,{state:"blocked",location:F,proceed(){U1(me,{state:"proceeding",proceed:void 0,reset:void 0,location:F}),t.history.go(oe)},reset(){let Le=new Map(x.blockers);Le.set(me,ou),br({blockers:Le})}});return}return ys(R,F)}),r){pq(e,ie);let T=()=>mq(e,ie);e.addEventListener("pagehide",T),ce=()=>e.removeEventListener("pagehide",T)}return x.initialized||ys(St.Pop,x.location,{initialHydration:!0}),k}function Ro(){d&&d(),ce&&ce(),u.clear(),W&&W.abort(),x.fetchers.forEach((T,R)=>j1(R)),x.blockers.forEach((T,R)=>S_(R))}function Dd(T){return u.add(T),()=>u.delete(T)}function br(T,R){R===void 0&&(R={}),x=Gt({},x,T);let F=[],oe=[];l.v7_fetcherPersist&&x.fetchers.forEach((me,Le)=>{me.state==="idle"&&(ve.has(Le)?oe.push(Le):F.push(Le))}),[...u].forEach(me=>me(x,{deletedFetchers:oe,unstable_viewTransitionOpts:R.viewTransitionOpts,unstable_flushSync:R.flushSync===!0})),l.v7_fetcherPersist&&(F.forEach(me=>x.fetchers.delete(me)),oe.forEach(me=>j1(me)))}function En(T,R,F){var oe,me;let{flushSync:Le}=F===void 0?{}:F,Ee=x.actionData!=null&&x.navigation.formMethod!=null&&Ni(x.navigation.formMethod)&&x.navigation.state==="loading"&&((oe=T.state)==null?void 0:oe._isRedirect)!==!0,be;R.actionData?Object.keys(R.actionData).length>0?be=R.actionData:be=null:Ee?be=x.actionData:be=null;let _e=R.loaderData?o9(x.loaderData,R.loaderData,R.matches||[],R.errors):x.loaderData,ze=x.blockers;ze.size>0&&(ze=new Map(ze),ze.forEach((yt,Pr)=>ze.set(Pr,ou)));let wr=Z===!0||x.navigation.formMethod!=null&&Ni(x.navigation.formMethod)&&((me=T.state)==null?void 0:me._isRedirect)!==!0;s&&(a=s,s=void 0),z||S===St.Pop||(S===St.Push?t.history.push(T,T.state):S===St.Replace&&t.history.replace(T,T.state));let Ze;if(S===St.Pop){let yt=ie.get(x.location.pathname);yt&&yt.has(T.pathname)?Ze={currentLocation:x.location,nextLocation:T}:ie.has(T.pathname)&&(Ze={currentLocation:T,nextLocation:x.location})}else if(K){let yt=ie.get(x.location.pathname);yt?yt.add(T.pathname):(yt=new Set([T.pathname]),ie.set(x.location.pathname,yt)),Ze={currentLocation:x.location,nextLocation:T}}br(Gt({},R,{actionData:be,loaderData:_e,historyAction:S,location:T,initialized:!0,navigation:Uv,revalidation:"idle",restoreScrollPosition:T_(T,R.matches||x.matches),preventScrollReset:wr,blockers:ze}),{viewTransitionOpts:Ze,flushSync:Le===!0}),S=St.Pop,Z=!1,K=!1,z=!1,H=!1,L=[],q=[]}async function b_(T,R){if(typeof T=="number"){t.history.go(T);return}let F=d5(x.location,x.matches,c,l.v7_prependBasename,T,l.v7_relativeSplatPath,R==null?void 0:R.fromRouteId,R==null?void 0:R.relative),{path:oe,submission:me,error:Le}=Jb(l.v7_normalizeFormMethod,!1,F,R),Ee=x.location,be=xc(x.location,oe,R&&R.state);be=Gt({},be,t.history.encodeLocation(be));let _e=R&&R.replace!=null?R.replace:void 0,ze=St.Push;_e===!0?ze=St.Replace:_e===!1||me!=null&&Ni(me.formMethod)&&me.formAction===x.location.pathname+x.location.search&&(ze=St.Replace);let wr=R&&"preventScrollReset"in R?R.preventScrollReset===!0:void 0,Ze=(R&&R.unstable_flushSync)===!0,yt=A_({currentLocation:Ee,nextLocation:be,historyAction:ze});if(yt){U1(yt,{state:"blocked",location:be,proceed(){U1(yt,{state:"proceeding",proceed:void 0,reset:void 0,location:be}),b_(T,R)},reset(){let Pr=new Map(x.blockers);Pr.set(yt,ou),br({blockers:Pr})}});return}return await ys(ze,be,{submission:me,pendingError:Le,preventScrollReset:wr,replace:R&&R.replace,enableViewTransition:R&&R.unstable_viewTransition,flushSync:Ze})}function qT(){if(Sm(),br({revalidation:"loading"}),x.navigation.state!=="submitting"){if(x.navigation.state==="idle"){ys(x.historyAction,x.location,{startUninterruptedRevalidation:!0});return}ys(S||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation})}}async function ys(T,R,F){W&&W.abort(),W=null,S=T,z=(F&&F.startUninterruptedRevalidation)===!0,tP(x.location,x.matches),Z=(F&&F.preventScrollReset)===!0,K=(F&&F.enableViewTransition)===!0;let oe=s||a,me=F&&F.overrideNavigation,Le=Ll(oe,R,c),Ee=(F&&F.flushSync)===!0;if(!Le){let Pr=di(404,{pathname:R.pathname}),{matches:Vn,route:xr}=a9(oe);Am(),En(R,{matches:Vn,loaderData:{},errors:{[xr.id]:Pr}},{flushSync:Ee});return}if(x.initialized&&!H&&cq(x.location,R)&&!(F&&F.submission&&Ni(F.submission.formMethod))){En(R,{matches:Le},{flushSync:Ee});return}W=new AbortController;let be=su(t.history,R,W.signal,F&&F.submission),_e,ze;if(F&&F.pendingError)ze={[fh(Le).route.id]:F.pendingError};else if(F&&F.submission&&Ni(F.submission.formMethod)){let Pr=await WT(be,R,F.submission,Le,{replace:F.replace,flushSync:Ee});if(Pr.shortCircuited)return;_e=Pr.pendingActionData,ze=Pr.pendingActionError,me=Bv(R,F.submission),Ee=!1,be=new Request(be.url,{signal:be.signal})}let{shortCircuited:wr,loaderData:Ze,errors:yt}=await GT(be,R,Le,me,F&&F.submission,F&&F.fetcherSubmission,F&&F.replace,F&&F.initialHydration===!0,Ee,_e,ze);wr||(W=null,En(R,Gt({matches:Le},_e?{actionData:_e}:{},{loaderData:Ze,errors:yt})))}async function WT(T,R,F,oe,me){me===void 0&&(me={}),Sm();let Le=hq(R,F);br({navigation:Le},{flushSync:me.flushSync===!0});let Ee,be=h5(oe,R);if(!be.route.action&&!be.route.lazy)Ee={type:qt.error,error:di(405,{method:T.method,pathname:R.pathname,routeId:be.route.id})};else if(Ee=await au("action",T,be,oe,o,i,c,l.v7_relativeSplatPath),T.signal.aborted)return{shortCircuited:!0};if(Ys(Ee)){let _e;return me&&me.replace!=null?_e=me.replace:_e=Ee.location===x.location.pathname+x.location.search,await Vd(x,Ee,{submission:F,replace:_e}),{shortCircuited:!0}}if(Ol(Ee)){let _e=fh(oe,be.route.id);return(me&&me.replace)!==!0&&(S=St.Push),{pendingActionData:{},pendingActionError:{[_e.route.id]:Ee.error}}}if(Ks(Ee))throw di(400,{type:"defer-action"});return{pendingActionData:{[be.route.id]:Ee.data}}}async function GT(T,R,F,oe,me,Le,Ee,be,_e,ze,wr){let Ze=oe||Bv(R,me),yt=me||Le||l9(Ze),Pr=s||a,[Vn,xr]=e9(t.history,x,F,yt,R,l.v7_partialHydration&&be===!0,H,L,q,ve,pe,ee,Pr,c,ze,wr);if(Am(Xe=>!(F&&F.some(ut=>ut.route.id===Xe))||Vn&&Vn.some(ut=>ut.route.id===Xe)),N=++I,Vn.length===0&&xr.length===0){let Xe=E_();return En(R,Gt({matches:F,loaderData:{},errors:wr||null},ze?{actionData:ze}:{},Xe?{fetchers:new Map(x.fetchers)}:{}),{flushSync:_e}),{shortCircuited:!0}}if(!z&&(!l.v7_partialHydration||!be)){xr.forEach(ut=>{let kn=x.fetchers.get(ut.key),q1=cu(void 0,kn?kn.data:void 0);x.fetchers.set(ut.key,q1)});let Xe=ze||x.actionData;br(Gt({navigation:Ze},Xe?Object.keys(Xe).length===0?{actionData:null}:{actionData:Xe}:{},xr.length>0?{fetchers:new Map(x.fetchers)}:{}),{flushSync:_e})}xr.forEach(Xe=>{$.has(Xe.key)&&ga(Xe.key),Xe.controller&&$.set(Xe.key,Xe.controller)});let Dc=()=>xr.forEach(Xe=>ga(Xe.key));W&&W.signal.addEventListener("abort",Dc);let{results:Im,loaderResults:Vc,fetcherResults:ya}=await w_(x.matches,F,Vn,xr,T);if(T.signal.aborted)return{shortCircuited:!0};W&&W.signal.removeEventListener("abort",Dc),xr.forEach(Xe=>$.delete(Xe.key));let _s=s9(Im);if(_s){if(_s.idx>=Vn.length){let Xe=xr[_s.idx-Vn.length].key;ee.add(Xe)}return await Vd(x,_s.result,{replace:Ee}),{shortCircuited:!0}}let{loaderData:Tm,errors:zd}=i9(x,F,Vn,Vc,wr,xr,ya,Qe);Qe.forEach((Xe,ut)=>{Xe.subscribe(kn=>{(kn||Xe.done)&&Qe.delete(ut)})}),l.v7_partialHydration&&be&&x.errors&&Object.entries(x.errors).filter(Xe=>{let[ut]=Xe;return!Vn.some(kn=>kn.route.id===ut)}).forEach(Xe=>{let[ut,kn]=Xe;zd=Object.assign(zd||{},{[ut]:kn})});let Pm=E_(),Fc=k_(N),B1=Pm||Fc||xr.length>0;return Gt({loaderData:Tm,errors:zd},B1?{fetchers:new Map(x.fetchers)}:{})}function KT(T,R,F,oe){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");$.has(T)&&ga(T);let me=(oe&&oe.unstable_flushSync)===!0,Le=s||a,Ee=d5(x.location,x.matches,c,l.v7_prependBasename,F,l.v7_relativeSplatPath,R,oe==null?void 0:oe.relative),be=Ll(Le,Ee,c);if(!be){Fd(T,R,di(404,{pathname:Ee}),{flushSync:me});return}let{path:_e,submission:ze,error:wr}=Jb(l.v7_normalizeFormMethod,!0,Ee,oe);if(wr){Fd(T,R,wr,{flushSync:me});return}let Ze=h5(be,_e);if(Z=(oe&&oe.preventScrollReset)===!0,ze&&Ni(ze.formMethod)){YT(T,R,_e,Ze,be,me,ze);return}pe.set(T,{routeId:R,path:_e}),QT(T,R,_e,Ze,be,me,ze)}async function YT(T,R,F,oe,me,Le,Ee){if(Sm(),pe.delete(T),!oe.route.action&&!oe.route.lazy){let ut=di(405,{method:Ee.formMethod,pathname:F,routeId:R});Fd(T,R,ut,{flushSync:Le});return}let be=x.fetchers.get(T);va(T,fq(Ee,be),{flushSync:Le});let _e=new AbortController,ze=su(t.history,F,_e.signal,Ee);$.set(T,_e);let wr=I,Ze=await au("action",ze,oe,me,o,i,c,l.v7_relativeSplatPath);if(ze.signal.aborted){$.get(T)===_e&&$.delete(T);return}if(l.v7_fetcherPersist&&ve.has(T)){if(Ys(Ze)||Ol(Ze)){va(T,Ta(void 0));return}}else{if(Ys(Ze))if($.delete(T),N>wr){va(T,Ta(void 0));return}else return ee.add(T),va(T,cu(Ee)),Vd(x,Ze,{fetcherSubmission:Ee});if(Ol(Ze)){Fd(T,R,Ze.error);return}}if(Ks(Ze))throw di(400,{type:"defer-action"});let yt=x.navigation.location||x.location,Pr=su(t.history,yt,_e.signal),Vn=s||a,xr=x.navigation.state!=="idle"?Ll(Vn,x.navigation.location,c):x.matches;qe(xr,"Didn't find any matches after fetcher action");let Dc=++I;J.set(T,Dc);let Im=cu(Ee,Ze.data);x.fetchers.set(T,Im);let[Vc,ya]=e9(t.history,x,xr,Ee,yt,!1,H,L,q,ve,pe,ee,Vn,c,{[oe.route.id]:Ze.data},void 0);ya.filter(ut=>ut.key!==T).forEach(ut=>{let kn=ut.key,q1=x.fetchers.get(kn),nP=cu(void 0,q1?q1.data:void 0);x.fetchers.set(kn,nP),$.has(kn)&&ga(kn),ut.controller&&$.set(kn,ut.controller)}),br({fetchers:new Map(x.fetchers)});let _s=()=>ya.forEach(ut=>ga(ut.key));_e.signal.addEventListener("abort",_s);let{results:Tm,loaderResults:zd,fetcherResults:Pm}=await w_(x.matches,xr,Vc,ya,Pr);if(_e.signal.aborted)return;_e.signal.removeEventListener("abort",_s),J.delete(T),$.delete(T),ya.forEach(ut=>$.delete(ut.key));let Fc=s9(Tm);if(Fc){if(Fc.idx>=Vc.length){let ut=ya[Fc.idx-Vc.length].key;ee.add(ut)}return Vd(x,Fc.result)}let{loaderData:B1,errors:Xe}=i9(x,x.matches,Vc,zd,void 0,ya,Pm,Qe);if(x.fetchers.has(T)){let ut=Ta(Ze.data);x.fetchers.set(T,ut)}k_(Dc),x.navigation.state==="loading"&&Dc>N?(qe(S,"Expected pending action"),W&&W.abort(),En(x.navigation.location,{matches:xr,loaderData:B1,errors:Xe,fetchers:new Map(x.fetchers)})):(br({errors:Xe,loaderData:o9(x.loaderData,B1,xr,Xe),fetchers:new Map(x.fetchers)}),H=!1)}async function QT(T,R,F,oe,me,Le,Ee){let be=x.fetchers.get(T);va(T,cu(Ee,be?be.data:void 0),{flushSync:Le});let _e=new AbortController,ze=su(t.history,F,_e.signal);$.set(T,_e);let wr=I,Ze=await au("loader",ze,oe,me,o,i,c,l.v7_relativeSplatPath);if(Ks(Ze)&&(Ze=await xA(Ze,ze.signal,!0)||Ze),$.get(T)===_e&&$.delete(T),!ze.signal.aborted){if(ve.has(T)){va(T,Ta(void 0));return}if(Ys(Ze))if(N>wr){va(T,Ta(void 0));return}else{ee.add(T),await Vd(x,Ze);return}if(Ol(Ze)){Fd(T,R,Ze.error);return}qe(!Ks(Ze),"Unhandled fetcher deferred data"),va(T,Ta(Ze.data))}}async function Vd(T,R,F){let{submission:oe,fetcherSubmission:me,replace:Le}=F===void 0?{}:F;R.revalidate&&(H=!0);let Ee=xc(T.location,R.location,{_isRedirect:!0});if(qe(Ee,"Expected a location on the redirect navigation"),r){let yt=!1;if(R.reloadDocument)yt=!0;else if(yA.test(R.location)){const Pr=t.history.createURL(R.location);yt=Pr.origin!==e.location.origin||w1(Pr.pathname,c)==null}if(yt){Le?e.location.replace(R.location):e.location.assign(R.location);return}}W=null;let be=Le===!0?St.Replace:St.Push,{formMethod:_e,formAction:ze,formEncType:wr}=T.navigation;!oe&&!me&&_e&&ze&&wr&&(oe=l9(T.navigation));let Ze=oe||me;if(eq.has(R.status)&&Ze&&Ni(Ze.formMethod))await ys(be,Ee,{submission:Gt({},Ze,{formAction:R.location}),preventScrollReset:Z});else{let yt=Bv(Ee,oe);await ys(be,Ee,{overrideNavigation:yt,fetcherSubmission:me,preventScrollReset:Z})}}async function w_(T,R,F,oe,me){let Le=await Promise.all([...F.map(_e=>au("loader",me,_e,R,o,i,c,l.v7_relativeSplatPath)),...oe.map(_e=>_e.matches&&_e.match&&_e.controller?au("loader",su(t.history,_e.path,_e.controller.signal),_e.match,_e.matches,o,i,c,l.v7_relativeSplatPath):{type:qt.error,error:di(404,{pathname:_e.path})})]),Ee=Le.slice(0,F.length),be=Le.slice(F.length);return await Promise.all([c9(T,F,Ee,Ee.map(()=>me.signal),!1,x.loaderData),c9(T,oe.map(_e=>_e.match),be,oe.map(_e=>_e.controller?_e.controller.signal:null),!0)]),{results:Le,loaderResults:Ee,fetcherResults:be}}function Sm(){H=!0,L.push(...Am()),pe.forEach((T,R)=>{$.has(R)&&(q.push(R),ga(R))})}function va(T,R,F){F===void 0&&(F={}),x.fetchers.set(T,R),br({fetchers:new Map(x.fetchers)},{flushSync:(F&&F.flushSync)===!0})}function Fd(T,R,F,oe){oe===void 0&&(oe={});let me=fh(x.matches,R);j1(T),br({errors:{[me.route.id]:F},fetchers:new Map(x.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function x_(T){return l.v7_fetcherPersist&&(nt.set(T,(nt.get(T)||0)+1),ve.has(T)&&ve.delete(T)),x.fetchers.get(T)||tq}function j1(T){let R=x.fetchers.get(T);$.has(T)&&!(R&&R.state==="loading"&&J.has(T))&&ga(T),pe.delete(T),J.delete(T),ee.delete(T),ve.delete(T),x.fetchers.delete(T)}function XT(T){if(l.v7_fetcherPersist){let R=(nt.get(T)||0)-1;R<=0?(nt.delete(T),ve.add(T)):nt.set(T,R)}else j1(T);br({fetchers:new Map(x.fetchers)})}function ga(T){let R=$.get(T);qe(R,"Expected fetch controller: "+T),R.abort(),$.delete(T)}function C_(T){for(let R of T){let F=x_(R),oe=Ta(F.data);x.fetchers.set(R,oe)}}function E_(){let T=[],R=!1;for(let F of ee){let oe=x.fetchers.get(F);qe(oe,"Expected fetcher: "+F),oe.state==="loading"&&(ee.delete(F),T.push(F),R=!0)}return C_(T),R}function k_(T){let R=[];for(let[F,oe]of J)if(oe<T){let me=x.fetchers.get(F);qe(me,"Expected fetcher: "+F),me.state==="loading"&&(ga(F),J.delete(F),R.push(F))}return C_(R),R.length>0}function JT(T,R){let F=x.blockers.get(T)||ou;return dt.get(T)!==R&&dt.set(T,R),F}function S_(T){x.blockers.delete(T),dt.delete(T)}function U1(T,R){let F=x.blockers.get(T)||ou;qe(F.state==="unblocked"&&R.state==="blocked"||F.state==="blocked"&&R.state==="blocked"||F.state==="blocked"&&R.state==="proceeding"||F.state==="blocked"&&R.state==="unblocked"||F.state==="proceeding"&&R.state==="unblocked","Invalid blocker state transition: "+F.state+" -> "+R.state);let oe=new Map(x.blockers);oe.set(T,R),br({blockers:oe})}function A_(T){let{currentLocation:R,nextLocation:F,historyAction:oe}=T;if(dt.size===0)return;dt.size>1&&ss(!1,"A router only supports one blocker at a time");let me=Array.from(dt.entries()),[Le,Ee]=me[me.length-1],be=x.blockers.get(Le);if(!(be&&be.state==="proceeding")&&Ee({currentLocation:R,nextLocation:F,historyAction:oe}))return Le}function Am(T){let R=[];return Qe.forEach((F,oe)=>{(!T||T(oe))&&(F.cancel(),R.push(oe),Qe.delete(oe))}),R}function eP(T,R,F){if(h=T,p=R,f=F||null,!m&&x.navigation===Uv){m=!0;let oe=T_(x.location,x.matches);oe!=null&&br({restoreScrollPosition:oe})}return()=>{h=null,p=null,f=null}}function I_(T,R){return f&&f(T,R.map(oe=>TB(oe,x.loaderData)))||T.key}function tP(T,R){if(h&&p){let F=I_(T,R);h[F]=p()}}function T_(T,R){if(h){let F=I_(T,R),oe=h[F];if(typeof oe=="number")return oe}return null}function rP(T){o={},s=l5(T,i,void 0,o)}return k={get basename(){return c},get future(){return l},get state(){return x},get routes(){return a},get window(){return e},initialize:gs,subscribe:Dd,enableScrollRestoration:eP,navigate:b_,fetch:KT,revalidate:qT,createHref:T=>t.history.createHref(T),encodeLocation:T=>t.history.encodeLocation(T),getFetcher:x_,deleteFetcher:XT,dispose:Ro,getBlocker:JT,deleteBlocker:S_,_internalFetchControllers:$,_internalActiveDeferreds:Qe,_internalSetRoutes:rP},k}function iq(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function d5(t,e,r,n,i,o,a,s){let c,l;if(a){c=[];for(let u of e)if(c.push(u),u.route.id===a){l=u;break}}else c=e,l=e[e.length-1];let d=qB(i||".",BB(c,o),w1(t.pathname,r)||t.pathname,s==="path");return i==null&&(d.search=t.search,d.hash=t.hash),(i==null||i===""||i===".")&&l&&l.route.index&&!$y(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:cc([r,d.pathname])),Hc(d)}function Jb(t,e,r,n){if(!n||!iq(n))return{path:r};if(n.formMethod&&!uq(n.formMethod))return{path:r,error:di(405,{method:n.formMethod})};let i=()=>({path:r,error:di(400,{type:"invalid-body"})}),o=n.formMethod||"get",a=t?o.toUpperCase():o.toLowerCase(),s=wA(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Ni(a))return i();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((f,p)=>{let[m,w]=p;return""+f+m+"="+w+`
|
|
415
|
-
`},""):String(n.body);return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!Ni(a))return i();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}qe(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=u5(n.formData),l=n.formData;else if(n.body instanceof FormData)c=u5(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=n9(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=n9(c)}catch{return i()}let d={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Ni(d.formMethod))return{path:r,submission:d};let u=Qi(r);return e&&u.search&&$y(u.search)&&c.append("index",""),u.search="?"+c,{path:Hc(u),submission:d}}function oq(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function e9(t,e,r,n,i,o,a,s,c,l,d,u,h,f,p,m){let w=m?Object.values(m)[0]:p?Object.values(p)[0]:void 0,g=t.createURL(e.location),v=t.createURL(i),b=m?Object.keys(m)[0]:void 0,k=oq(r,b).filter((S,Z)=>{let{route:W}=S;if(W.lazy)return!0;if(W.loader==null)return!1;if(o)return W.loader.hydrate?!0:e.loaderData[W.id]===void 0&&(!e.errors||e.errors[W.id]===void 0);if(aq(e.loaderData,e.matches[Z],S)||s.some(ce=>ce===S.route.id))return!0;let K=e.matches[Z],ie=S;return t9(S,Gt({currentUrl:g,currentParams:K.params,nextUrl:v,nextParams:ie.params},n,{actionResult:w,defaultShouldRevalidate:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||bA(K,ie)}))}),x=[];return d.forEach((S,Z)=>{if(o||!r.some(z=>z.route.id===S.routeId)||l.has(Z))return;let W=Ll(h,S.path,f);if(!W){x.push({key:Z,routeId:S.routeId,path:S.path,matches:null,match:null,controller:null});return}let K=e.fetchers.get(Z),ie=h5(W,S.path),ce=!1;u.has(Z)?ce=!1:c.includes(Z)?ce=!0:K&&K.state!=="idle"&&K.data===void 0?ce=a:ce=t9(ie,Gt({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:w,defaultShouldRevalidate:a})),ce&&x.push({key:Z,routeId:S.routeId,path:S.path,matches:W,match:ie,controller:new AbortController})}),[k,x]}function aq(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function bA(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function t9(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function r9(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];qe(i,"No route found in manifest");let o={};for(let a in n){let c=i[a]!==void 0&&a!=="hasErrorBoundary";ss(!c,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!AB.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Gt({},e(i),{lazy:void 0}))}async function au(t,e,r,n,i,o,a,s,c){c===void 0&&(c={});let l,d,u,h=m=>{let w,g=new Promise((v,b)=>w=b);return u=()=>w(),e.signal.addEventListener("abort",u),Promise.race([m({request:e,params:r.params,context:c.requestContext}),g])};try{let m=r.route[t];if(r.route.lazy)if(m){let w,g=await Promise.all([h(m).catch(v=>{w=v}),r9(r.route,o,i)]);if(w)throw w;d=g[0]}else if(await r9(r.route,o,i),m=r.route[t],m)d=await h(m);else if(t==="action"){let w=new URL(e.url),g=w.pathname+w.search;throw di(405,{method:e.method,pathname:g,routeId:r.route.id})}else return{type:qt.data,data:void 0};else if(m)d=await h(m);else{let w=new URL(e.url),g=w.pathname+w.search;throw di(404,{pathname:g})}qe(d!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(m){l=qt.error,d=m}finally{u&&e.signal.removeEventListener("abort",u)}if(dq(d)){let m=d.status;if(JB.has(m)){let g=d.headers.get("Location");if(qe(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!yA.test(g))g=d5(new URL(e.url),n.slice(0,n.indexOf(r)+1),a,!0,g,s);else if(!c.isStaticRequest){let v=new URL(e.url),b=g.startsWith("//")?new URL(v.protocol+g):new URL(g),E=w1(b.pathname,a)!=null;b.origin===v.origin&&E&&(g=b.pathname+b.search+b.hash)}if(c.isStaticRequest)throw d.headers.set("Location",g),d;return{type:qt.redirect,status:m,location:g,revalidate:d.headers.get("X-Remix-Revalidate")!==null,reloadDocument:d.headers.get("X-Remix-Reload-Document")!==null}}if(c.isRouteRequest)throw{type:l===qt.error?qt.error:qt.data,response:d};let w;try{let g=d.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?d.body==null?w=null:w=await d.json():w=await d.text()}catch(g){return{type:qt.error,error:g}}return l===qt.error?{type:l,error:new mA(m,d.statusText,w),headers:d.headers}:{type:qt.data,data:w,statusCode:d.status,headers:d.headers}}if(l===qt.error)return{type:l,error:d};if(lq(d)){var f,p;return{type:qt.deferred,deferredData:d,statusCode:(f=d.init)==null?void 0:f.status,headers:((p=d.init)==null?void 0:p.headers)&&new Headers(d.init.headers)}}return{type:qt.data,data:d}}function su(t,e,r,n){let i=t.createURL(wA(e)).toString(),o={signal:r};if(n&&Ni(n.formMethod)){let{formMethod:a,formEncType:s}=n;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=u5(n.formData):o.body=n.formData}return new Request(i,o)}function u5(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function n9(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function sq(t,e,r,n,i){let o={},a=null,s,c=!1,l={};return r.forEach((d,u)=>{let h=e[u].route.id;if(qe(!Ys(d),"Cannot handle redirect results in processLoaderData"),Ol(d)){let f=fh(t,h),p=d.error;n&&(p=Object.values(n)[0],n=void 0),a=a||{},a[f.route.id]==null&&(a[f.route.id]=p),o[h]=void 0,c||(c=!0,s=vA(d.error)?d.error.status:500),d.headers&&(l[h]=d.headers)}else Ks(d)?(i.set(h,d.deferredData),o[h]=d.deferredData.data):o[h]=d.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(s=d.statusCode),d.headers&&(l[h]=d.headers)}),n&&(a=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function i9(t,e,r,n,i,o,a,s){let{loaderData:c,errors:l}=sq(e,r,n,i,s);for(let d=0;d<o.length;d++){let{key:u,match:h,controller:f}=o[d];qe(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let p=a[d];if(!(f&&f.signal.aborted))if(Ol(p)){let m=fh(t.matches,h==null?void 0:h.route.id);l&&l[m.route.id]||(l=Gt({},l,{[m.route.id]:p.error})),t.fetchers.delete(u)}else if(Ys(p))qe(!1,"Unhandled fetcher revalidation redirect");else if(Ks(p))qe(!1,"Unhandled fetcher deferred data");else{let m=Ta(p.data);t.fetchers.set(u,m)}}return{loaderData:c,errors:l}}function o9(t,e,r,n){let i=Gt({},e);for(let o of r){let a=o.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):t[a]!==void 0&&o.route.loader&&(i[a]=t[a]),n&&n.hasOwnProperty(a))break}return i}function fh(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function a9(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function di(t,e){let{pathname:r,routeId:n,method:i,type:o}=e===void 0?{}:e,a="Unknown Server Error",s="Unknown @remix-run/router error";return t===400?(a="Bad Request",i&&r&&n?s="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):t===403?(a="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",s='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",i&&r&&n?s="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new mA(t||500,a,new Error(s),!0)}function s9(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(Ys(r))return{result:r,idx:e}}}function wA(t){let e=typeof t=="string"?Qi(t):t;return Hc(Gt({},e,{hash:""}))}function cq(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Ks(t){return t.type===qt.deferred}function Ol(t){return t.type===qt.error}function Ys(t){return(t&&t.type)===qt.redirect}function lq(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function dq(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function uq(t){return XB.has(t.toLowerCase())}function Ni(t){return YB.has(t.toLowerCase())}async function c9(t,e,r,n,i,o){for(let a=0;a<r.length;a++){let s=r[a],c=e[a];if(!c)continue;let l=t.find(u=>u.route.id===c.route.id),d=l!=null&&!bA(l,c)&&(o&&o[c.route.id])!==void 0;if(Ks(s)&&(i||d)){let u=n[a];qe(u,"Expected an AbortSignal for revalidating fetcher deferred result"),await xA(s,u,i).then(h=>{h&&(r[a]=h||r[a])})}}}async function xA(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:qt.data,data:t.deferredData.unwrappedData}}catch(i){return{type:qt.error,error:i}}return{type:qt.data,data:t.deferredData.data}}}function $y(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function h5(t,e){let r=typeof e=="string"?Qi(e).search:e.search;if(t[t.length-1].route.index&&$y(r||""))return t[t.length-1];let n=pA(t);return n[n.length-1]}function l9(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:o,json:a}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function Bv(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function hq(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function cu(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function fq(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ta(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function pq(t,e){try{let r=t.sessionStorage.getItem(_A);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function mq(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem(_A,JSON.stringify(r))}catch(n){ss(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}const vq=t=>{switch(t){case"hash":return kB({v5Compat:!0});case"memory":return CB({v5Compat:!0});case"browser":default:return EB({v5Compat:!0})}};var Ut=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Af=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ci,Pp,f5,Rp,ao,Lu;const d9=t=>typeof t=="object"&&"key"in t;class gq extends Ne{get basename(){return Ut(this,Pp,"f")}get origin(){return Ut(this,f5,"f")}get state(){return Ut(this,ao,"f").asObservable()}get value(){return Ut(this,ao,"f").value}get location(){return this.value.location}get action(){return this.value.action}constructor(e){super(i=>Ut(this,ao,"f").subscribe(i)),ci.set(this,void 0),Pp.set(this,void 0),f5.set(this,window.location.origin),Rp.set(this,new Tr),ao.set(this,void 0),Lu.set(this,void 0);const{basename:r,history:n}=e;Af(this,Lu,e.logger||console,"f"),Af(this,Pp,r,"f"),Af(this,ci,n,"f"),Af(this,ao,new Ed({action:Ut(this,ci,"f").action,location:Ut(this,ci,"f").location,delta:null}),"f"),Ut(this,Rp,"f").add(Ut(this,ci,"f").listen(i=>{i.location.key!==Ut(this,ao,"f").value.location.key&&Ut(this,ao,"f").next(i)}))}encodeLocation(e){return Ut(this,ci,"f").encodeLocation(e)}listen(e){const r=Ut(this,ao,"f").subscribe(e);return Ut(this,Lu,"f").debug("Navigator::listen",e),()=>(Ut(this,Lu,"f").debug("Navigator::listen[unsubscribe]",e),r.unsubscribe())}createHref(e){return Ut(this,ci,"f").createHref(e)}go(e){Ut(this,ci,"f").go(e)}push(e,r){if(!(d9(e)&&this._isDuplicateLocation(e)))return Ut(this,ci,"f").push(e,r)}replace(e,r){if(!(d9(e)&&this._isDuplicateLocation(e)))return Ut(this,ci,"f").replace(e,r)}createURL(e){return Ut(this,ci,"f").createURL(e)}_isDuplicateLocation(e){return e.key===Ut(this,ao,"f").value.location.key}dispose(){Ut(this,Rp,"f").unsubscribe()}}ci=new WeakMap,Pp=new WeakMap,f5=new WeakMap,Rp=new WeakMap,ao=new WeakMap,Lu=new WeakMap;var oi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},u9=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Hi,Ls;const h9=t=>t.replace(/\/+/g,"/");class yq extends Pk{get state$(){return oi(this,Hi,"f").pipe(Ue(e=>oi(this,Ls,"f")?e.location.pathname.startsWith(oi(this,Ls,"f")):!0),Se(({action:e,location:r})=>({action:e,location:this._localizePath(r)})))}get navigator(){return oi(this,Hi,"f")}get path(){return this._localizePath(this.navigator.location)}constructor(e){super(e),Hi.set(this,void 0),Ls.set(this,void 0);const{basename:r,history:n}=e.config;if(u9(this,Ls,r,"f"),!n)throw Error("no history provided!");u9(this,Hi,new gq({basename:r,history:n}),"f"),this._addTeardown(()=>oi(this,Hi,"f").dispose())}createRouter(e){const r=oi(this,Hi,"f");console.debug("NavigationProvider::createRouter",e);const n=nq({basename:r.basename,history:r,routes:e,future:{v7_prependBasename:!0}});return n.initialize(),n}createHref(e){return oi(this,Hi,"f").createHref(this._createToPath(e??this.path))}createURL(e){return oi(this,Hi,"f").createURL(this._createToPath(e??this.path))}push(e,r){return oi(this,Hi,"f").push(this._createToPath(e),r)}replace(e,r){return oi(this,Hi,"f").replace(this._createToPath(e),r)}_localizePath(e){var r;const{pathname:n,search:i,hash:o}=e;return{pathname:h9(n.replace((r=oi(this,Ls,"f"))!==null&&r!==void 0?r:"","")),search:i,hash:o}}_createToPath(e){const{pathname:r,search:n,hash:i}=typeof e=="string"?{pathname:e,search:void 0,hash:void 0}:e;return{pathname:h9([oi(this,Ls,"f"),r==="/"?void 0:r].filter(o=>!!o).join("/")),search:n,hash:i}}}Hi=new WeakMap,Ls=new WeakMap;const f9="3.1.4",_q="navigation",bq={version:new Ju(f9),name:_q,configure:t=>{const e=new xB;return t&&(e.history=t.navigation.navigator),e},initialize:({config:t})=>{var e;return(e=t.history)!==null&&e!==void 0||(t.history=vq()),new yq({version:f9,config:t})},dispose({instance:t}){t.dispose()}},wq=(t,e)=>{const r=typeof e=="string"?{configure:n=>{n.basename=e}}:e;t.addConfig(Object.assign({module:bq},r))};var xq=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},lu=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},wa;const CA="::",Cq=t=>{const[e,r]=t.split(CA);return{namespace:e,id:r}};class EA{constructor(e,r){this.namespace=e,wa.set(this,void 0),xq(this,wa,r,"f")}*[(wa=new WeakMap,Symbol.iterator)](){for(const e of Object.values(this.getItems()))yield e}generateId(e){return[this.namespace,e].join(CA)}setItem(e,r){lu(this,wa,"f").setItem(this.generateId(e),JSON.stringify(r))}removeItem(e){lu(this,wa,"f").removeItem(this.generateId(e))}getItem(e){const r=lu(this,wa,"f").getItem(this.generateId(e));return r?JSON.parse(r):void 0}getItems(){return this._getItems().reduce((e,{id:r,value:n})=>Object.assign(e,{[r]:n}),{})}clear(){this._getItems().forEach(e=>{lu(this,wa,"f").removeItem(e.key)})}_getItems(){const{namespace:e}=this;return Object.entries(lu(this,wa,"f")).map(([r,n])=>Object.assign(Object.assign({},Cq(r)),{key:r,value:n})).filter(r=>r.namespace===e).map(r=>Object.assign(r,{value:JSON.parse(r.value)}))}}class Eq extends EA{constructor(e){super(e,window.localStorage)}}class kq extends EA{constructor(e){super(e,window.sessionStorage)}}const Sq=(t,e)=>{switch(e){case"local":return new Eq(t);case"session":return new kq(t)}throw Error("invalid type provided")};var p9=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const kA=(t,e)=>()=>p9(void 0,void 0,void 0,function*(){const{name:r,type:n="local"}=e??{},i=["FEATURES",r].filter(a=>!!a).join("_"),o=Sq(i,n);return{connect:({provider:a})=>a.onFeatureToggle(({features:s})=>{s.map(c=>o.setItem(c.key,c))}),initial:()=>p9(void 0,void 0,void 0,function*(){const a=yield o.getItems();return t.map(s=>{const c=a[s.key];return Object.assign(Object.assign({},s),{enabled:c?c.enabled:s.enabled})})})}}),Aq=t=>!(t.value==="0"||t.value==="false");var m9=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const SA=(t,e)=>{if(!t.length)return()=>Promise.resolve({});const r=t.map(n=>typeof n=="string"?n:n.key);return n=>m9(void 0,void 0,void 0,function*(){if(!n.hasModule("navigation"))throw Error("missing navigation module");const i=yield n.requireInstance("navigation"),{isFeatureEnabled:o=Aq}=e??{};return{order:-1,initial:()=>m9(void 0,void 0,void 0,function*(){return t.filter(a=>typeof a!="string")}),connect(a){const{provider:s}=a,c=new Tr,l=new rn,d=new rn,u=s.features$.pipe(Se(f=>Object.values(f)),Se(f=>f.filter(p=>r.includes(p.key)))),h=d.pipe(ay(u),Se(([f,p])=>{const m=new URLSearchParams(f.search);return p.reduce((w,g)=>{const{key:v}=g;if(m.has(v)){const b=m.get(v),E=o({feature:g,value:b,path:f});w.push({key:v,enabled:E})}return w},[])}),Gl(l));return c.add(h.subscribe(f=>s.toggleFeatures(f))),c.add(()=>d.complete()),c.add(i.navigator.listen(f=>{d.next(f.location)})),d.next(i.path),c}}})};var v9=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Mp,AA;class Iq extends ZL{constructor(){super(...arguments),Mp.set(this,[]),AA.set(this,[])}addPlugin(e){return v9(this,Mp,"f").push(e),this}enableLocalFeatures(...e){return this.addPlugin(kA(...e))}enableUrlToggle(...e){return this.addPlugin(SA(...e))}_processConfig(e,r){const n=Dt(v9(this,Mp,"f")).pipe(Ln(a=>a(r)),Ue(a=>Object.keys(a).length>0),x2((a,s)=>(a.push(s),a),[]),d1(),$0()),i=n.pipe(k4(a=>Dt(a.sort((s,c)=>{var l,d;return((l=s.order)!==null&&l!==void 0?l:0)-((d=c.order)!==null&&d!==void 0?d:0)})).pipe(Ue(s=>!!s.initial),k4(s=>s.initial()),x2((s,c)=>{for(const l in c)l in s&&console.warn("FeatureFlagConfigurator",`duplicate entry of ${l}`);return s.push(...c),s},[]))));return yL({initial:i,plugins:n}).pipe(Se(a=>Object.assign(Object.assign({},e),a)))}}Mp=new WeakMap,AA=new WeakMap;const q2={setFeatures:gr("set_features_enabled",t=>({payload:t})),toggleFeatures:gr("toggle_features_enabled",t=>({payload:t}))},Tq=t=>Id(t,e=>{e.addCase(q2.setFeatures,(r,n)=>{n.payload.forEach(i=>{r.features[i.key]=i})}),e.addCase(q2.toggleFeatures,(r,n)=>{n.payload.filter(i=>i.key in r.features).forEach(i=>{const{key:o}=i;r.features[o].enabled=!!i.enabled})})}),Pq={features:{}},Rq=t=>new h1(Tq(t??Pq)),Mq=t=>t.reduce((e,r)=>Object.assign(e,{[r.key]:r}),{});var qv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},ai=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},g9=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Pa,Ra,Zp;class Zq{get features(){return ai(this,Ra,"f").value.features}get features$(){return ai(this,Ra,"f").pipe(Se(e=>e.features))}constructor(e){Pa.set(this,new Tr),Ra.set(this,void 0),Zp.set(this,void 0);const{config:r,event:n}=e;g9(this,Zp,n,"f"),g9(this,Ra,Rq({features:Mq(r.initial)}),"f"),Object.values(r.plugins).forEach(i=>{i.connect&&ai(this,Pa,"f").add(i.connect({provider:this}))}),n&&this.onFeatureToggle(({features:i})=>n.dispatchEvent("onFeatureFlagsToggled",{detail:{features:i}}))}hasFeature(e){return e in this.features}setFeatures(e){ai(this,Ra,"f").next(q2.setFeatures(e))}onFeatureToggle(e){const r=this.features$.pipe(E2(),Se(([n,i])=>Object.values(i).filter(o=>{var a;return o.enabled!==((a=n[o.key])===null||a===void 0?void 0:a.enabled)})),Se(n=>({features:n}))).subscribe(e);return ai(this,Pa,"f").add(r),()=>ai(this,Pa,"f").remove(r)}toggleFeature(e){return qv(this,void 0,void 0,function*(){return this.toggleFeatures([e])})}toggleFeatures(e){return qv(this,void 0,void 0,function*(){const{features:r}=ai(this,Ra,"f").value,n=Dt(e).pipe(mt(i=>qv(this,void 0,void 0,function*(){var o;const a=r[i.key];if(a){if(a.readonly){console.warn(`skipped toggling flag [${a.key}], since readonly!`);return}}else{console.warn(`toggling flag [${i.key}] which is not registered`);return}const s=yield(o=ai(this,Zp,"f"))===null||o===void 0?void 0:o.dispatchEvent("onFeatureFlagToggle",{source:this,detail:{feature:a,enable:i.enabled},cancelable:!0});if(s!=null&&s.canceled)console.debug(`skipped toggling flag [${a.key}], since aborted!`);else return i})),Ue(i=>!!i),x2((i,o)=>i.concat([o]),[]),C2(()=>{ai(this,Pa,"f").remove(n)})).subscribe(i=>{ai(this,Ra,"f").next(q2.toggleFeatures(i))});ai(this,Pa,"f").add(n)})}getFeature(e){return this.features[e]}getFeatures(e){return Object.values(this.features).filter(e)}dispose(){ai(this,Pa,"f").unsubscribe()}}Pa=new WeakMap,Ra=new WeakMap,Zp=new WeakMap;var IA=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Hq="featureFlag",$q={name:Hq,configure:()=>new Iq,initialize:t=>IA(void 0,void 0,void 0,function*(){const e=yield t.config.createConfigAsync(t),r=t.hasModule("event")?yield t.requireInstance("event"):void 0;return new Zq({config:e,event:r})})},Lq=(t,e)=>{t.addConfig({module:$q,configure:r=>IA(void 0,void 0,void 0,function*(){if(e)return Promise.resolve(e(r))})})},Oq=async t=>{t.logger.level=0,t.configureServiceDiscovery({client:{baseUri:import.meta.url,defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}}),t.configureMsal({tenantId:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",clientId:"9b707e3a-3e90-41ed-a47e-652a1e3b53d0",redirectUri:"/authentication/login-callback"},{requiresAuth:!0}),nB(t),wq(t),pF(t),wB(t,e=>{e.setSourceSystem({subSystem:"CLI",identifier:"fusion-cli",name:"Fusion CLI"})}),Lq(t,e=>{e.addPlugin(kA([{key:"fusionDebug",title:"Fusion debug log",description:"Show Fusion debug log in console"},{key:"pinkBg",title:"Use pink bg?",description:"When enabled the background should be pink"}])),e.addPlugin(SA(["fusionDebug"]))}),t.onConfigured(()=>{console.log("framework config done")}),t.onInitialized(async e=>{e.auth.defaultClient.setLogger(new Wk(0)),console.debug("📒 subscribing to all events")})},Nq="bookmarkId",Dq=t=>{const{event:e,context:r,navigation:{navigator:n}}=an().modules;y.useLayoutEffect(()=>e.addEventListener("onBookmarkChanged",o=>{var a;const{appKey:s,context:c}=o.detail,l=t.resolveAppPath(s);if(n.location.pathname!==l){const{hash:d,search:u}=n.location,h={pathname:l,search:Vq(u),hash:d};n.push(h)}c&&((a=r.currentContext)===null||a===void 0?void 0:a.id)!==c.id&&r.setCurrentContextByIdAsync(c.id)}),[t,r,e,n])};function Vq(t){const e=new URLSearchParams(t);return e.delete(Nq),`?${e.toString()}`}const Fq=()=>{const t=an().modules.event,[e,r]=y.useState(!1);return y.useEffect(()=>{const n=t.addEventListener("onBookmarkChanged",()=>{r(!1)}),i=t.addEventListener("onAddCreator",()=>{r(!0)});return()=>{n(),i()}},[t]),e};/**
|
|
415
|
+
`},""):String(n.body);return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!Ni(a))return i();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:a,formAction:s,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}qe(typeof FormData=="function","FormData is not available in this environment");let c,l;if(n.formData)c=u5(n.formData),l=n.formData;else if(n.body instanceof FormData)c=u5(n.body),l=n.body;else if(n.body instanceof URLSearchParams)c=n.body,l=n9(c);else if(n.body==null)c=new URLSearchParams,l=new FormData;else try{c=new URLSearchParams(n.body),l=n9(c)}catch{return i()}let d={formMethod:a,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Ni(d.formMethod))return{path:r,submission:d};let u=Qi(r);return e&&u.search&&$y(u.search)&&c.append("index",""),u.search="?"+c,{path:Hc(u),submission:d}}function oq(t,e){let r=t;if(e){let n=t.findIndex(i=>i.route.id===e);n>=0&&(r=t.slice(0,n))}return r}function e9(t,e,r,n,i,o,a,s,c,l,d,u,h,f,p,m){let w=m?Object.values(m)[0]:p?Object.values(p)[0]:void 0,g=t.createURL(e.location),v=t.createURL(i),b=m?Object.keys(m)[0]:void 0,k=oq(r,b).filter((S,Z)=>{let{route:W}=S;if(W.lazy)return!0;if(W.loader==null)return!1;if(o)return W.loader.hydrate?!0:e.loaderData[W.id]===void 0&&(!e.errors||e.errors[W.id]===void 0);if(aq(e.loaderData,e.matches[Z],S)||s.some(ce=>ce===S.route.id))return!0;let K=e.matches[Z],ie=S;return t9(S,Gt({currentUrl:g,currentParams:K.params,nextUrl:v,nextParams:ie.params},n,{actionResult:w,defaultShouldRevalidate:a||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||bA(K,ie)}))}),x=[];return d.forEach((S,Z)=>{if(o||!r.some(z=>z.route.id===S.routeId)||l.has(Z))return;let W=Ll(h,S.path,f);if(!W){x.push({key:Z,routeId:S.routeId,path:S.path,matches:null,match:null,controller:null});return}let K=e.fetchers.get(Z),ie=h5(W,S.path),ce=!1;u.has(Z)?ce=!1:c.includes(Z)?ce=!0:K&&K.state!=="idle"&&K.data===void 0?ce=a:ce=t9(ie,Gt({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:w,defaultShouldRevalidate:a})),ce&&x.push({key:Z,routeId:S.routeId,path:S.path,matches:W,match:ie,controller:new AbortController})}),[k,x]}function aq(t,e,r){let n=!e||r.route.id!==e.route.id,i=t[r.route.id]===void 0;return n||i}function bA(t,e){let r=t.route.path;return t.pathname!==e.pathname||r!=null&&r.endsWith("*")&&t.params["*"]!==e.params["*"]}function t9(t,e){if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate(e);if(typeof r=="boolean")return r}return e.defaultShouldRevalidate}async function r9(t,e,r){if(!t.lazy)return;let n=await t.lazy();if(!t.lazy)return;let i=r[t.id];qe(i,"No route found in manifest");let o={};for(let a in n){let c=i[a]!==void 0&&a!=="hasErrorBoundary";ss(!c,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!AB.has(a)&&(o[a]=n[a])}Object.assign(i,o),Object.assign(i,Gt({},e(i),{lazy:void 0}))}async function au(t,e,r,n,i,o,a,s,c){c===void 0&&(c={});let l,d,u,h=m=>{let w,g=new Promise((v,b)=>w=b);return u=()=>w(),e.signal.addEventListener("abort",u),Promise.race([m({request:e,params:r.params,context:c.requestContext}),g])};try{let m=r.route[t];if(r.route.lazy)if(m){let w,g=await Promise.all([h(m).catch(v=>{w=v}),r9(r.route,o,i)]);if(w)throw w;d=g[0]}else if(await r9(r.route,o,i),m=r.route[t],m)d=await h(m);else if(t==="action"){let w=new URL(e.url),g=w.pathname+w.search;throw di(405,{method:e.method,pathname:g,routeId:r.route.id})}else return{type:qt.data,data:void 0};else if(m)d=await h(m);else{let w=new URL(e.url),g=w.pathname+w.search;throw di(404,{pathname:g})}qe(d!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(m){l=qt.error,d=m}finally{u&&e.signal.removeEventListener("abort",u)}if(dq(d)){let m=d.status;if(JB.has(m)){let g=d.headers.get("Location");if(qe(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!yA.test(g))g=d5(new URL(e.url),n.slice(0,n.indexOf(r)+1),a,!0,g,s);else if(!c.isStaticRequest){let v=new URL(e.url),b=g.startsWith("//")?new URL(v.protocol+g):new URL(g),E=w1(b.pathname,a)!=null;b.origin===v.origin&&E&&(g=b.pathname+b.search+b.hash)}if(c.isStaticRequest)throw d.headers.set("Location",g),d;return{type:qt.redirect,status:m,location:g,revalidate:d.headers.get("X-Remix-Revalidate")!==null,reloadDocument:d.headers.get("X-Remix-Reload-Document")!==null}}if(c.isRouteRequest)throw{type:l===qt.error?qt.error:qt.data,response:d};let w;try{let g=d.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?d.body==null?w=null:w=await d.json():w=await d.text()}catch(g){return{type:qt.error,error:g}}return l===qt.error?{type:l,error:new mA(m,d.statusText,w),headers:d.headers}:{type:qt.data,data:w,statusCode:d.status,headers:d.headers}}if(l===qt.error)return{type:l,error:d};if(lq(d)){var f,p;return{type:qt.deferred,deferredData:d,statusCode:(f=d.init)==null?void 0:f.status,headers:((p=d.init)==null?void 0:p.headers)&&new Headers(d.init.headers)}}return{type:qt.data,data:d}}function su(t,e,r,n){let i=t.createURL(wA(e)).toString(),o={signal:r};if(n&&Ni(n.formMethod)){let{formMethod:a,formEncType:s}=n;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=u5(n.formData):o.body=n.formData}return new Request(i,o)}function u5(t){let e=new URLSearchParams;for(let[r,n]of t.entries())e.append(r,typeof n=="string"?n:n.name);return e}function n9(t){let e=new FormData;for(let[r,n]of t.entries())e.append(r,n);return e}function sq(t,e,r,n,i){let o={},a=null,s,c=!1,l={};return r.forEach((d,u)=>{let h=e[u].route.id;if(qe(!Ys(d),"Cannot handle redirect results in processLoaderData"),Ol(d)){let f=fh(t,h),p=d.error;n&&(p=Object.values(n)[0],n=void 0),a=a||{},a[f.route.id]==null&&(a[f.route.id]=p),o[h]=void 0,c||(c=!0,s=vA(d.error)?d.error.status:500),d.headers&&(l[h]=d.headers)}else Ks(d)?(i.set(h,d.deferredData),o[h]=d.deferredData.data):o[h]=d.data,d.statusCode!=null&&d.statusCode!==200&&!c&&(s=d.statusCode),d.headers&&(l[h]=d.headers)}),n&&(a=n,o[Object.keys(n)[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function i9(t,e,r,n,i,o,a,s){let{loaderData:c,errors:l}=sq(e,r,n,i,s);for(let d=0;d<o.length;d++){let{key:u,match:h,controller:f}=o[d];qe(a!==void 0&&a[d]!==void 0,"Did not find corresponding fetcher result");let p=a[d];if(!(f&&f.signal.aborted))if(Ol(p)){let m=fh(t.matches,h==null?void 0:h.route.id);l&&l[m.route.id]||(l=Gt({},l,{[m.route.id]:p.error})),t.fetchers.delete(u)}else if(Ys(p))qe(!1,"Unhandled fetcher revalidation redirect");else if(Ks(p))qe(!1,"Unhandled fetcher deferred data");else{let m=Ta(p.data);t.fetchers.set(u,m)}}return{loaderData:c,errors:l}}function o9(t,e,r,n){let i=Gt({},e);for(let o of r){let a=o.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(i[a]=e[a]):t[a]!==void 0&&o.route.loader&&(i[a]=t[a]),n&&n.hasOwnProperty(a))break}return i}function fh(t,e){return(e?t.slice(0,t.findIndex(n=>n.route.id===e)+1):[...t]).reverse().find(n=>n.route.hasErrorBoundary===!0)||t[0]}function a9(t){let e=t.length===1?t[0]:t.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function di(t,e){let{pathname:r,routeId:n,method:i,type:o}=e===void 0?{}:e,a="Unknown Server Error",s="Unknown @remix-run/router error";return t===400?(a="Bad Request",i&&r&&n?s="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?s="defer() is not supported in actions":o==="invalid-body"&&(s="Unable to encode submission body")):t===403?(a="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):t===404?(a="Not Found",s='No route matches URL "'+r+'"'):t===405&&(a="Method Not Allowed",i&&r&&n?s="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(s='Invalid request method "'+i.toUpperCase()+'"')),new mA(t||500,a,new Error(s),!0)}function s9(t){for(let e=t.length-1;e>=0;e--){let r=t[e];if(Ys(r))return{result:r,idx:e}}}function wA(t){let e=typeof t=="string"?Qi(t):t;return Hc(Gt({},e,{hash:""}))}function cq(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function Ks(t){return t.type===qt.deferred}function Ol(t){return t.type===qt.error}function Ys(t){return(t&&t.type)===qt.redirect}function lq(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function dq(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function uq(t){return XB.has(t.toLowerCase())}function Ni(t){return YB.has(t.toLowerCase())}async function c9(t,e,r,n,i,o){for(let a=0;a<r.length;a++){let s=r[a],c=e[a];if(!c)continue;let l=t.find(u=>u.route.id===c.route.id),d=l!=null&&!bA(l,c)&&(o&&o[c.route.id])!==void 0;if(Ks(s)&&(i||d)){let u=n[a];qe(u,"Expected an AbortSignal for revalidating fetcher deferred result"),await xA(s,u,i).then(h=>{h&&(r[a]=h||r[a])})}}}async function xA(t,e,r){if(r===void 0&&(r=!1),!await t.deferredData.resolveData(e)){if(r)try{return{type:qt.data,data:t.deferredData.unwrappedData}}catch(i){return{type:qt.error,error:i}}return{type:qt.data,data:t.deferredData.data}}}function $y(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function h5(t,e){let r=typeof e=="string"?Qi(e).search:e.search;if(t[t.length-1].route.index&&$y(r||""))return t[t.length-1];let n=pA(t);return n[n.length-1]}function l9(t){let{formMethod:e,formAction:r,formEncType:n,text:i,formData:o,json:a}=t;if(!(!e||!r||!n)){if(i!=null)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:e,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:r,formEncType:n,formData:void 0,json:a,text:void 0}}}function Bv(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function hq(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function cu(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function fq(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function Ta(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function pq(t,e){try{let r=t.sessionStorage.getItem(_A);if(r){let n=JSON.parse(r);for(let[i,o]of Object.entries(n||{}))o&&Array.isArray(o)&&e.set(i,new Set(o||[]))}}catch{}}function mq(t,e){if(e.size>0){let r={};for(let[n,i]of e)r[n]=[...i];try{t.sessionStorage.setItem(_A,JSON.stringify(r))}catch(n){ss(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}const vq=t=>{switch(t){case"hash":return kB({v5Compat:!0});case"memory":return CB({v5Compat:!0});case"browser":default:return EB({v5Compat:!0})}};var Ut=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Af=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},ci,Pp,f5,Rp,ao,Lu;const d9=t=>typeof t=="object"&&"key"in t;class gq extends Ne{get basename(){return Ut(this,Pp,"f")}get origin(){return Ut(this,f5,"f")}get state(){return Ut(this,ao,"f").asObservable()}get value(){return Ut(this,ao,"f").value}get location(){return this.value.location}get action(){return this.value.action}constructor(e){super(i=>Ut(this,ao,"f").subscribe(i)),ci.set(this,void 0),Pp.set(this,void 0),f5.set(this,window.location.origin),Rp.set(this,new Tr),ao.set(this,void 0),Lu.set(this,void 0);const{basename:r,history:n}=e;Af(this,Lu,e.logger||console,"f"),Af(this,Pp,r,"f"),Af(this,ci,n,"f"),Af(this,ao,new Ed({action:Ut(this,ci,"f").action,location:Ut(this,ci,"f").location,delta:null}),"f"),Ut(this,Rp,"f").add(Ut(this,ci,"f").listen(i=>{i.location.key!==Ut(this,ao,"f").value.location.key&&Ut(this,ao,"f").next(i)}))}encodeLocation(e){return Ut(this,ci,"f").encodeLocation(e)}listen(e){const r=Ut(this,ao,"f").subscribe(e);return Ut(this,Lu,"f").debug("Navigator::listen",e),()=>(Ut(this,Lu,"f").debug("Navigator::listen[unsubscribe]",e),r.unsubscribe())}createHref(e){return Ut(this,ci,"f").createHref(e)}go(e){Ut(this,ci,"f").go(e)}push(e,r){if(!(d9(e)&&this._isDuplicateLocation(e)))return Ut(this,ci,"f").push(e,r)}replace(e,r){if(!(d9(e)&&this._isDuplicateLocation(e)))return Ut(this,ci,"f").replace(e,r)}createURL(e){return Ut(this,ci,"f").createURL(e)}_isDuplicateLocation(e){return e.key===Ut(this,ao,"f").value.location.key}dispose(){Ut(this,Rp,"f").unsubscribe()}}ci=new WeakMap,Pp=new WeakMap,f5=new WeakMap,Rp=new WeakMap,ao=new WeakMap,Lu=new WeakMap;var oi=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},u9=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Hi,Ls;const h9=t=>t.replace(/\/+/g,"/");class yq extends Pk{get state$(){return oi(this,Hi,"f").pipe(Ue(e=>oi(this,Ls,"f")?e.location.pathname.startsWith(oi(this,Ls,"f")):!0),Se(({action:e,location:r})=>({action:e,location:this._localizePath(r)})))}get navigator(){return oi(this,Hi,"f")}get path(){return this._localizePath(this.navigator.location)}constructor(e){super(e),Hi.set(this,void 0),Ls.set(this,void 0);const{basename:r,history:n}=e.config;if(u9(this,Ls,r,"f"),!n)throw Error("no history provided!");u9(this,Hi,new gq({basename:r,history:n}),"f"),this._addTeardown(()=>oi(this,Hi,"f").dispose())}createRouter(e){const r=oi(this,Hi,"f");console.debug("NavigationProvider::createRouter",e);const n=nq({basename:r.basename,history:r,routes:e,future:{v7_prependBasename:!0}});return n.initialize(),n}createHref(e){return oi(this,Hi,"f").createHref(this._createToPath(e??this.path))}createURL(e){return oi(this,Hi,"f").createURL(this._createToPath(e??this.path))}push(e,r){return oi(this,Hi,"f").push(this._createToPath(e),r)}replace(e,r){return oi(this,Hi,"f").replace(this._createToPath(e),r)}_localizePath(e){var r;const{pathname:n,search:i,hash:o}=e;return{pathname:h9(n.replace((r=oi(this,Ls,"f"))!==null&&r!==void 0?r:"","")),search:i,hash:o}}_createToPath(e){const{pathname:r,search:n,hash:i}=typeof e=="string"?{pathname:e,search:void 0,hash:void 0}:e;return{pathname:h9([oi(this,Ls,"f"),r==="/"?void 0:r].filter(o=>!!o).join("/")),search:n,hash:i}}}Hi=new WeakMap,Ls=new WeakMap;const f9="4.0.0",_q="navigation",bq={version:new Ju(f9),name:_q,configure:t=>{const e=new xB;return t&&(e.history=t.navigation.navigator),e},initialize:({config:t})=>{var e;return(e=t.history)!==null&&e!==void 0||(t.history=vq()),new yq({version:f9,config:t})},dispose({instance:t}){t.dispose()}},wq=(t,e)=>{const r=typeof e=="string"?{configure:n=>{n.basename=e}}:e;t.addConfig(Object.assign({module:bq},r))};var xq=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},lu=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},wa;const CA="::",Cq=t=>{const[e,r]=t.split(CA);return{namespace:e,id:r}};class EA{constructor(e,r){this.namespace=e,wa.set(this,void 0),xq(this,wa,r,"f")}*[(wa=new WeakMap,Symbol.iterator)](){for(const e of Object.values(this.getItems()))yield e}generateId(e){return[this.namespace,e].join(CA)}setItem(e,r){lu(this,wa,"f").setItem(this.generateId(e),JSON.stringify(r))}removeItem(e){lu(this,wa,"f").removeItem(this.generateId(e))}getItem(e){const r=lu(this,wa,"f").getItem(this.generateId(e));return r?JSON.parse(r):void 0}getItems(){return this._getItems().reduce((e,{id:r,value:n})=>Object.assign(e,{[r]:n}),{})}clear(){this._getItems().forEach(e=>{lu(this,wa,"f").removeItem(e.key)})}_getItems(){const{namespace:e}=this;return Object.entries(lu(this,wa,"f")).map(([r,n])=>Object.assign(Object.assign({},Cq(r)),{key:r,value:n})).filter(r=>r.namespace===e).map(r=>Object.assign(r,{value:JSON.parse(r.value)}))}}class Eq extends EA{constructor(e){super(e,window.localStorage)}}class kq extends EA{constructor(e){super(e,window.sessionStorage)}}const Sq=(t,e)=>{switch(e){case"local":return new Eq(t);case"session":return new kq(t)}throw Error("invalid type provided")};var p9=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const kA=(t,e)=>()=>p9(void 0,void 0,void 0,function*(){const{name:r,type:n="local"}=e??{},i=["FEATURES",r].filter(a=>!!a).join("_"),o=Sq(i,n);return{connect:({provider:a})=>a.onFeatureToggle(({features:s})=>{s.map(c=>o.setItem(c.key,c))}),initial:()=>p9(void 0,void 0,void 0,function*(){const a=yield o.getItems();return t.map(s=>{const c=a[s.key];return Object.assign(Object.assign({},s),{enabled:c?c.enabled:s.enabled})})})}}),Aq=t=>!(t.value==="0"||t.value==="false");var m9=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const SA=(t,e)=>{if(!t.length)return()=>Promise.resolve({});const r=t.map(n=>typeof n=="string"?n:n.key);return n=>m9(void 0,void 0,void 0,function*(){if(!n.hasModule("navigation"))throw Error("missing navigation module");const i=yield n.requireInstance("navigation"),{isFeatureEnabled:o=Aq}=e??{};return{order:-1,initial:()=>m9(void 0,void 0,void 0,function*(){return t.filter(a=>typeof a!="string")}),connect(a){const{provider:s}=a,c=new Tr,l=new rn,d=new rn,u=s.features$.pipe(Se(f=>Object.values(f)),Se(f=>f.filter(p=>r.includes(p.key)))),h=d.pipe(ay(u),Se(([f,p])=>{const m=new URLSearchParams(f.search);return p.reduce((w,g)=>{const{key:v}=g;if(m.has(v)){const b=m.get(v),E=o({feature:g,value:b,path:f});w.push({key:v,enabled:E})}return w},[])}),Gl(l));return c.add(h.subscribe(f=>s.toggleFeatures(f))),c.add(()=>d.complete()),c.add(i.navigator.listen(f=>{d.next(f.location)})),d.next(i.path),c}}})};var v9=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},Mp,AA;class Iq extends ZL{constructor(){super(...arguments),Mp.set(this,[]),AA.set(this,[])}addPlugin(e){return v9(this,Mp,"f").push(e),this}enableLocalFeatures(...e){return this.addPlugin(kA(...e))}enableUrlToggle(...e){return this.addPlugin(SA(...e))}_processConfig(e,r){const n=Dt(v9(this,Mp,"f")).pipe(Ln(a=>a(r)),Ue(a=>Object.keys(a).length>0),x2((a,s)=>(a.push(s),a),[]),d1(),$0()),i=n.pipe(k4(a=>Dt(a.sort((s,c)=>{var l,d;return((l=s.order)!==null&&l!==void 0?l:0)-((d=c.order)!==null&&d!==void 0?d:0)})).pipe(Ue(s=>!!s.initial),k4(s=>s.initial()),x2((s,c)=>{for(const l in c)l in s&&console.warn("FeatureFlagConfigurator",`duplicate entry of ${l}`);return s.push(...c),s},[]))));return yL({initial:i,plugins:n}).pipe(Se(a=>Object.assign(Object.assign({},e),a)))}}Mp=new WeakMap,AA=new WeakMap;const q2={setFeatures:gr("set_features_enabled",t=>({payload:t})),toggleFeatures:gr("toggle_features_enabled",t=>({payload:t}))},Tq=t=>Id(t,e=>{e.addCase(q2.setFeatures,(r,n)=>{n.payload.forEach(i=>{r.features[i.key]=i})}),e.addCase(q2.toggleFeatures,(r,n)=>{n.payload.filter(i=>i.key in r.features).forEach(i=>{const{key:o}=i;r.features[o].enabled=!!i.enabled})})}),Pq={features:{}},Rq=t=>new h1(Tq(t??Pq)),Mq=t=>t.reduce((e,r)=>Object.assign(e,{[r.key]:r}),{});var qv=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})},ai=function(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)},g9=function(t,e,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r},Pa,Ra,Zp;class Zq{get features(){return ai(this,Ra,"f").value.features}get features$(){return ai(this,Ra,"f").pipe(Se(e=>e.features))}constructor(e){Pa.set(this,new Tr),Ra.set(this,void 0),Zp.set(this,void 0);const{config:r,event:n}=e;g9(this,Zp,n,"f"),g9(this,Ra,Rq({features:Mq(r.initial)}),"f"),Object.values(r.plugins).forEach(i=>{i.connect&&ai(this,Pa,"f").add(i.connect({provider:this}))}),n&&this.onFeatureToggle(({features:i})=>n.dispatchEvent("onFeatureFlagsToggled",{detail:{features:i}}))}hasFeature(e){return e in this.features}setFeatures(e){ai(this,Ra,"f").next(q2.setFeatures(e))}onFeatureToggle(e){const r=this.features$.pipe(E2(),Se(([n,i])=>Object.values(i).filter(o=>{var a;return o.enabled!==((a=n[o.key])===null||a===void 0?void 0:a.enabled)})),Se(n=>({features:n}))).subscribe(e);return ai(this,Pa,"f").add(r),()=>ai(this,Pa,"f").remove(r)}toggleFeature(e){return qv(this,void 0,void 0,function*(){return this.toggleFeatures([e])})}toggleFeatures(e){return qv(this,void 0,void 0,function*(){const{features:r}=ai(this,Ra,"f").value,n=Dt(e).pipe(mt(i=>qv(this,void 0,void 0,function*(){var o;const a=r[i.key];if(a){if(a.readonly){console.warn(`skipped toggling flag [${a.key}], since readonly!`);return}}else{console.warn(`toggling flag [${i.key}] which is not registered`);return}const s=yield(o=ai(this,Zp,"f"))===null||o===void 0?void 0:o.dispatchEvent("onFeatureFlagToggle",{source:this,detail:{feature:a,enable:i.enabled},cancelable:!0});if(s!=null&&s.canceled)console.debug(`skipped toggling flag [${a.key}], since aborted!`);else return i})),Ue(i=>!!i),x2((i,o)=>i.concat([o]),[]),C2(()=>{ai(this,Pa,"f").remove(n)})).subscribe(i=>{ai(this,Ra,"f").next(q2.toggleFeatures(i))});ai(this,Pa,"f").add(n)})}getFeature(e){return this.features[e]}getFeatures(e){return Object.values(this.features).filter(e)}dispose(){ai(this,Pa,"f").unsubscribe()}}Pa=new WeakMap,Ra=new WeakMap,Zp=new WeakMap;var IA=function(t,e,r,n){function i(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function s(d){try{l(n.next(d))}catch(u){a(u)}}function c(d){try{l(n.throw(d))}catch(u){a(u)}}function l(d){d.done?o(d.value):i(d.value).then(s,c)}l((n=n.apply(t,e||[])).next())})};const Hq="featureFlag",$q={name:Hq,configure:()=>new Iq,initialize:t=>IA(void 0,void 0,void 0,function*(){const e=yield t.config.createConfigAsync(t),r=t.hasModule("event")?yield t.requireInstance("event"):void 0;return new Zq({config:e,event:r})})},Lq=(t,e)=>{t.addConfig({module:$q,configure:r=>IA(void 0,void 0,void 0,function*(){if(e)return Promise.resolve(e(r))})})},Oq=async t=>{t.logger.level=0,t.configureServiceDiscovery({client:{baseUri:import.meta.url,defaultScopes:["5a842df8-3238-415d-b168-9f16a6a6031b/.default"]}}),t.configureMsal({tenantId:"3aa4a235-b6e2-48d5-9195-7fcf05b459b0",clientId:"9b707e3a-3e90-41ed-a47e-652a1e3b53d0",redirectUri:"/authentication/login-callback"},{requiresAuth:!0}),nB(t),wq(t),pF(t),wB(t,e=>{e.setSourceSystem({subSystem:"CLI",identifier:"fusion-cli",name:"Fusion CLI"})}),Lq(t,e=>{e.addPlugin(kA([{key:"fusionDebug",title:"Fusion debug log",description:"Show Fusion debug log in console"},{key:"pinkBg",title:"Use pink bg?",description:"When enabled the background should be pink"}])),e.addPlugin(SA(["fusionDebug"]))}),t.onConfigured(()=>{console.log("framework config done")}),t.onInitialized(async e=>{e.auth.defaultClient.setLogger(new Wk(0)),console.debug("📒 subscribing to all events")})},Nq="bookmarkId",Dq=t=>{const{event:e,context:r,navigation:{navigator:n}}=an().modules;y.useLayoutEffect(()=>e.addEventListener("onBookmarkChanged",o=>{var a;const{appKey:s,context:c}=o.detail,l=t.resolveAppPath(s);if(n.location.pathname!==l){const{hash:d,search:u}=n.location,h={pathname:l,search:Vq(u),hash:d};n.push(h)}c&&((a=r.currentContext)===null||a===void 0?void 0:a.id)!==c.id&&r.setCurrentContextByIdAsync(c.id)}),[t,r,e,n])};function Vq(t){const e=new URLSearchParams(t);return e.delete(Nq),`?${e.toString()}`}const Fq=()=>{const t=an().modules.event,[e,r]=y.useState(!1);return y.useEffect(()=>{const n=t.addEventListener("onBookmarkChanged",()=>{r(!1)}),i=t.addEventListener("onAddCreator",()=>{r(!0)});return()=>{n(),i()}},[t]),e};/**
|
|
416
416
|
* React Router v6.22.2
|
|
417
417
|
*
|
|
418
418
|
* Copyright (c) Remix Software Inc.
|
|
@@ -3131,11 +3131,7 @@ cursor: pointer;`),r},Xi=({left:t,right:e,top:r,bottom:n})=>ye({paddingLeft:t,pa
|
|
|
3131
3131
|
>
|
|
3132
3132
|
${(r=this.tasks)===null||r===void 0?void 0:r.photo.render({complete:a=>V`<img src=${a} alt="${i}" />`,pending:()=>this.renderImagePlaceholder(!0),error:()=>{var a;return console.log("failed"),V`${(a=i==null?void 0:i.substring(0,1))===null||a===void 0?void 0:a.toUpperCase()}`}})}
|
|
3133
3133
|
</fwc-avatar>
|
|
3134
|
-
</div>`},pending:()=>V`<fwc-avatar
|
|
3135
|
-
>${this.renderImagePlaceholder(!0)}</fwc-skeleton
|
|
3136
|
-
></fwc-avatar>`,error:()=>V`<fwc-avatar inactive
|
|
3137
|
-
>${this.renderImagePlaceholder(!1)}</fwc-skeleton
|
|
3138
|
-
></fwc-avatar>`})}
|
|
3134
|
+
</div>`},pending:()=>V`<fwc-avatar size=${this.size}>${this.renderImagePlaceholder(!0)}</fwc-avatar>`,error:()=>V`<fwc-avatar size=${this.size} inactive>${this.renderImagePlaceholder(!1)}</fwc-avatar>`})}
|
|
3139
3135
|
<div id="floating">
|
|
3140
3136
|
<slot name="floating">
|
|
3141
3137
|
${W0e(this.isFloatingOpen,()=>V`<fwc-person-card .azureId="${this.azureId}" .upn="${this.upn}"></fwc-person-card>`)}
|