/*! For license information please see taskpane.js.LICENSE.txt */ "use strict";(self.webpackChunkoffice_addin_taskpane=self.webpackChunkoffice_addin_taskpane||[]).push([[926],{5338:function(e,t,r){var o=r(40961);t.H=o.createRoot,o.hydrateRoot},7463:function(e,t){function r(e,t){var r=e.length;e.push(t);e:for(;0>>1,n=e[o];if(!(0>>1;oi(c,r))li(d,c)?(e[o]=d,e[l]=r,o=l):(e[o]=c,e[s]=r,o=s);else{if(!(li(d,r)))break e;e[o]=d,e[l]=r,o=l}}}return t}function i(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,c=s.now();t.unstable_now=function(){return s.now()-c}}var l=[],d=[],u=1,f=null,h=3,p=!1,g=!1,m=!1,v="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=o(d);null!==t;){if(null===t.callback)n(d);else{if(!(t.startTime<=e))break;n(d),t.sortIndex=t.expirationTime,r(l,t)}t=o(d)}}function k(e){if(m=!1,w(e),!g)if(null!==o(l))g=!0,j(C);else{var t=o(d);null!==t&&P(k,t.startTime-e)}}function C(e,r){g=!1,m&&(m=!1,b(I),I=-1),p=!0;var i=h;try{for(w(r),f=o(l);null!==f&&(!(f.expirationTime>r)||e&&!A());){var a=f.callback;if("function"==typeof a){f.callback=null,h=f.priorityLevel;var s=a(f.expirationTime<=r);r=t.unstable_now(),"function"==typeof s?f.callback=s:f===o(l)&&n(l),w(r)}else n(l);f=o(l)}if(null!==f)var c=!0;else{var u=o(d);null!==u&&P(k,u.startTime-r),c=!1}return c}finally{f=null,h=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var T,x=!1,S=null,I=-1,_=5,E=-1;function A(){return!(t.unstable_now()-E<_)}function B(){if(null!==S){var e=t.unstable_now();E=e;var r=!0;try{r=S(!0,e)}finally{r?T():(x=!1,S=null)}}else x=!1}if("function"==typeof y)T=function(){y(B)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,R=O.port2;O.port1.onmessage=B,T=function(){R.postMessage(null)}}else T=function(){v(B,0)};function j(e){S=e,x||(x=!0,T())}function P(e,r){I=v(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,j(C))},t.unstable_forceFrameRate=function(e){0>e||125a?(e.sortIndex=i,r(d,e),null===o(l)&&e===o(d)&&(m?(b(I),I=-1):m=!0,P(k,i-a))):(e.sortIndex=s,r(l,e),g||p||(g=!0,j(C))),e},t.unstable_shouldYield=A,t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},21020:function(e,t,r){var o=r(96540),n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var o,i={},l=null,d=null;for(o in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(d=t.ref),t)a.call(t,o)&&!c.hasOwnProperty(o)&&(i[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===i[o]&&(i[o]=t[o]);return{$$typeof:n,type:e,key:l,ref:d,props:i,_owner:s.current}}t.Fragment=i,t.jsx=l,t.jsxs=l},22799:function(e,t){if("function"==typeof Symbol&&Symbol.for){var r=Symbol.for;r("react.element"),r("react.portal"),r("react.fragment"),r("react.strict_mode"),r("react.profiler"),r("react.provider"),r("react.context"),r("react.forward_ref"),r("react.suspense"),r("react.suspense_list"),r("react.memo"),r("react.lazy"),r("react.block"),r("react.server.block"),r("react.fundamental"),r("react.debug_trace_mode"),r("react.legacy_hidden")}},32025:function(e,t,r){var o=r(96540),n=r.t(o,2),i=r(5338);const a=o.createContext(void 0);function s(e,t){return function(e,t,r){if(!e)return t;t={...t};const{generatedControlId:o,hintId:n,labelFor:i,labelId:a,required:s,validationMessageId:c,validationState:l}=e;var d,u,f,h,p,g,m,v,b,y,w,k,C;(o&&(null!==(u=(d=t).id)&&void 0!==u||(d.id=o)),!a||(null==r?void 0:r.supportsLabelFor)&&i===t.id||null!==(p=(f=t)[h="aria-labelledby"])&&void 0!==p||(f[h]=a),(c||n)&&(t["aria-describedby"]=[c,n,null==t?void 0:t["aria-describedby"]].filter(Boolean).join(" ")),"error"===l&&(null!==(m=(g=t)["aria-invalid"])&&void 0!==m||(g["aria-invalid"]=!0)),s)&&((null==r?void 0:r.supportsRequired)?null!==(w=(y=t).required)&&void 0!==w||(y.required=!0):null!==(C=(k=t)["aria-required"])&&void 0!==C||(k["aria-required"]=!0));return(null==r?void 0:r.supportsSize)&&(null!==(b=(v=t).size)&&void 0!==b||(v.size=e.size)),t}(o.useContext(a),e,t)}a.Provider;const c=e=>{const[t,r]=o.useState(()=>void 0===e.defaultState?e.initialState:"function"==typeof e.defaultState?e.defaultState():e.defaultState),n=o.useRef(e.state);o.useEffect(()=>{n.current=e.state},[e.state]);const i=o.useCallback(e=>{(function(e){return"function"==typeof e})(e)&&e(n.current)},[]);return l(e.state)?[e.state,i]:[t,r]},l=e=>{const[t]=o.useState(()=>void 0!==e);return t},d=(...e)=>{const t={};for(const r of e){const e=Array.isArray(r)?r:Object.keys(r);for(const r of e)t[r]=1}return t},u=d(["onAuxClick","onAnimationEnd","onAnimationStart","onCopy","onCut","onPaste","onCompositionEnd","onCompositionStart","onCompositionUpdate","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onInput","onSubmit","onLoad","onError","onKeyDown","onKeyDownCapture","onKeyPress","onKeyUp","onAbort","onCanPlay","onCanPlayThrough","onDurationChange","onEmptied","onEncrypted","onEnded","onLoadedData","onLoadedMetadata","onLoadStart","onPause","onPlay","onPlaying","onProgress","onRateChange","onSeeked","onSeeking","onStalled","onSuspend","onTimeUpdate","onVolumeChange","onWaiting","onClick","onClickCapture","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseUpCapture","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onScroll","onWheel","onPointerCancel","onPointerDown","onPointerEnter","onPointerLeave","onPointerMove","onPointerOut","onPointerOver","onPointerUp","onGotPointerCapture","onLostPointerCapture"]),f=d(["accessKey","children","className","contentEditable","dir","draggable","hidden","htmlFor","id","lang","ref","role","style","tabIndex","title","translate","spellCheck","name"]),h=d(["itemID","itemProp","itemRef","itemScope","itemType"]),p=d(f,u,h),g=d(p,["form"]),m=d(p,["height","loop","muted","preload","src","width"]),v=d(m,["poster"]),b=d(p,["start"]),y=d(p,["value"]),w=d(p,["download","href","hrefLang","media","rel","target","type"]),k=d(p,["dateTime"]),C=d(p,["autoFocus","disabled","form","formAction","formEncType","formMethod","formNoValidate","formTarget","type","value"]),T={label:g,audio:m,video:v,ol:b,li:y,a:w,button:C,input:d(C,["accept","alt","autoCorrect","autoCapitalize","autoComplete","checked","dirname","form","height","inputMode","list","max","maxLength","min","minLength","multiple","pattern","placeholder","readOnly","required","src","step","size","type","value","width"]),textarea:d(C,["autoCapitalize","cols","dirname","form","maxLength","placeholder","readOnly","required","rows","wrap"]),select:d(C,["form","multiple","required"]),option:d(p,["selected","value"]),table:d(p,["cellPadding","cellSpacing"]),tr:p,th:d(p,["colSpan","rowSpan","scope"]),td:d(p,["colSpan","headers","rowSpan","scope"]),colGroup:d(p,["span"]),col:d(p,["span"]),fieldset:d(p,["disabled","form"]),form:d(p,["acceptCharset","action","encType","encType","method","noValidate","target"]),iframe:d(p,["allow","allowFullScreen","allowPaymentRequest","allowTransparency","csp","height","importance","referrerPolicy","sandbox","src","srcDoc","width"]),img:d(p,["alt","crossOrigin","height","src","srcSet","useMap","width"]),time:k,dialog:d(p,["open","onCancel","onClose"])};function x(e,t,r){const o=e&&T[e]||p;return o.as=1,function(e,t,r){const o=Array.isArray(t),n={},i=Object.keys(e);for(const a of i)!(!o&&t[a]||o&&t.indexOf(a)>=0||0===a.indexOf("data-")||0===a.indexOf("aria-"))||r&&-1!==(null==r?void 0:r.indexOf(a))||(n[a]=e[a]);return n}(t,o,r)}const S=({primarySlotTagName:e,props:t,excludedPropNames:r})=>({root:{style:t.style,className:t.className},primary:x(e,t,[...r||[],"style","className"])});function I(){return"undefined"!=typeof window&&!(!window.document||!window.document.createElement)}const _={current:0},E=o.createContext(void 0);function A(){var e;return null!==(e=o.useContext(E))&&void 0!==e?e:_}const B=o.createContext(void 0);function O(e="fui-",t){const r=A(),i=o.useContext(B)||"",a=n.useId;if(a){const r=a(),n=o.useMemo(()=>r.replace(/:/g,""),[r]);return t||`${i}${e}${n}`}return o.useMemo(()=>t||`${i}${e}${++r.current}`,[i,e,t,r])}B.Provider;const R=Symbol.for("fui.slotRenderFunction"),j=Symbol.for("fui.slotElementType"),P=Symbol.for("fui.slotClassNameProp");function N(e,t){const{defaultProps:r,elementType:n}=t,i=function(e){return"string"==typeof e||"number"==typeof e||q(e)||o.isValidElement(e)?{children:e}:e}(e),a={...r,...i,[j]:n,[P]:null==i?void 0:i.className};return i&&"function"==typeof i.children&&(a[R]=i.children,a.children=null==r?void 0:r.children),a}function z(e,t){if(null!==e&&(void 0!==e||t.renderByDefault))return N(e,t)}const q=e=>"object"==typeof e&&null!==e&&Symbol.iterator in e,M=I()?o.useLayoutEffect:o.useEffect,F=e=>{const t=o.useRef(()=>{throw new Error("Cannot call an event handler while rendering")});return M(()=>{t.current=e},[e]),o.useCallback((...e)=>(0,t.current)(...e),[t])};function D(...e){const t=o.useCallback(r=>{t.current=r;for(const t of e)"function"==typeof t?t(r):t&&(t.current=r)},[...e]);return t}const L="undefined"==typeof window?r.g:window,H="@griffel/";function U(e,t){return L[Symbol.for(H+e)]||(L[Symbol.for(H+e)]=t),L[Symbol.for(H+e)]}const W=U("DEFINITION_LOOKUP_TABLE",{}),V="data-make-styles-bucket",$={all:1,borderColor:1,borderStyle:1,borderWidth:1,borderBlock:1,borderBlockEnd:1,borderBlockStart:1,borderInline:1,borderInlineEnd:1,borderInlineStart:1},K="DO_NOT_USE_DIRECTLY: @griffel/reset-value";function G(e){for(var t,r=0,o=0,n=e.length;n>=4;++o,n-=4)t=1540483477*(65535&(t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(o)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}function J(e,t,r=[]){return"___"+function(e){const t=e.length;if(7===t)return e;for(let r=t;r<7;r++)e+="0";return e}(G(e+t))}function Q(e,t){let r="",o="";for(const n in e){const i=e[n];if(0===i){o+=n+" ";continue}const a=Array.isArray(i),s="rtl"===t?(a?i[1]:i)+" ":(a?i[0]:i)+" ";r+=s,o+=s}return[r.slice(0,-1),o.slice(0,-1)]}function X(e,t){const r={};for(const o in e){const[n,i]=Q(e[o],t);if(""===i){r[o]="";continue}const a=J(i,t),s=a+(""===n?"":" "+n);W[a]=[e[o],t],r[o]=s}return r}const Y={};function Z(){let e=null,t="",r="";const o=new Array(arguments.length);for(let e=0;e0&&(t+=n.slice(0,i)),r+=a,o[e]=a}}}if(""===r)return t.slice(0,-1);const n=Y[r];if(void 0!==n)return t+n;const i=[];for(let t=0;t{const e={};return function(t,r){void 0===e[t.id]&&(t.insertCSSRules(r),e[t.id]=!0)}};function ne(e,t,r=oe){const o=r();let n=null,i=null;return function(r){const{dir:a,renderer:s}=r,c="ltr"===a;return c?null===n&&(n=X(e,a)):null===i&&(i=X(e,a)),o(s,t),c?n:i}}const ie=n.useInsertionEffect?n.useInsertionEffect:void 0,ae=()=>{const e={};return function(t,r){ie&&"undefined"!=typeof window&&window.document&&window.document.createElement?ie(()=>{t.insertCSSRules(r)},[t,r]):void 0===e[t.id]&&(t.insertCSSRules(r),e[t.id]=!0)}};function se(e){return Array.isArray(e)?e:[e]}const ce=["r","d","l","v","w","f","i","h","a","s","k","t","m","c"].reduce((e,t,r)=>(e[t]=r,e),{});function le(e,t,r,o,n={}){var i,a;const s="m"===e,c=null!==(i=n.m)&&void 0!==i?i:"0",l=null!==(a=n.p)&&void 0!==a?a:0,d=function(e,t,r){return("m"===e?e+t:e)+r}(e,c,l);if(!o.stylesheets[d]){const i=t&&t.createElement("style"),a=function(e,t,r,o){const n=[];if(o[V]=t,o["data-priority"]=String(r),e)for(const t in o)e.setAttribute(t,o[t]);return{elementAttributes:o,insertRule:function(t){return(null==e?void 0:e.sheet)?e.sheet.insertRule(t,e.sheet.cssRules.length):n.push(t)},element:e,bucketName:t,cssRules(){return(null==e?void 0:e.sheet)?Array.from(e.sheet.cssRules).map(e=>e.cssText):n}}}(i,e,l,Object.assign({},o.styleElementAttributes,s&&{media:c}));o.stylesheets[d]=a,(null==t?void 0:t.head)&&i&&t.head.insertBefore(i,function(e,t,r,o,n={}){var i,a;const s=ce[r],c=null!==(i=n.m)&&void 0!==i?i:"",l=null!==(a=n.p)&&void 0!==a?a:0;let d=e=>s-ce[e.getAttribute(V)],u=e.head.querySelectorAll(`[${V}]`);if("m"===r){const t=e.head.querySelectorAll(`[${V}="${r}"]`);t.length&&(u=t,d=e=>o.compareMediaQueries(c,e.media))}const f=e=>function(e,t,r){var o,n;return t+(null!==(o=r.m)&&void 0!==o?o:"")===e.getAttribute(V)+(null!==(n=e.media)&&void 0!==n?n:"")}(e,r,n)?l-Number(e.getAttribute("data-priority")):d(e),h=u.length;let p=h-1;for(;p>=0;){const e=u.item(p);if(f(e)>0)return e.nextSibling;p--}return h>0?u.item(0):t?t.nextSibling:null}(t,r,e,o,n))}return o.stylesheets[d]}function de(e,t){try{e.insertRule(t)}catch(e){}}let ue=0;const fe=(e,t)=>et?1:0;function he(e=("undefined"==typeof document?void 0:document),t={}){const{classNameHashSalt:r,unstable_filterCSSRule:o,insertionPoint:n,styleElementAttributes:i,compareMediaQueries:a=fe}=t,s={classNameHashSalt:r,insertionCache:{},stylesheets:{},styleElementAttributes:Object.freeze(i),compareMediaQueries:a,id:"d"+ue++,insertCSSRules(t){for(const r in t){const i=t[r];for(let t=0,a=i.length;to.createElement(me.Provider,{value:t},e);function be(){return o.useContext(me)}function ye(e,t){const r=ne(e,t,ae);return function(){const e=be(),t=ge();return r({dir:e,renderer:t})}}const we=ye({root:{mc9l5x:"f1w7gpdv",Bg96gwp:"fez10in"},rtl:{Bz10aip:"f13rod7r"}},{d:[".f1w7gpdv{display:inline;}",".fez10in{line-height:0;}",".f13rod7r{-webkit-transform:scaleX(-1);-moz-transform:scaleX(-1);-ms-transform:scaleX(-1);transform:scaleX(-1);}"]}),ke=ye({root:{ycbfsm:"fg4l7m0"}},{t:["@media (forced-colors: active){.fg4l7m0{forced-color-adjust:auto;}}"]}),Ce=(e,t,r,n)=>{const i="1em"===t?"20":t,a=o.forwardRef((e,a)=>{const s=ke(),c=((e,t)=>{const{title:r,primaryFill:n="currentColor",...i}=e,a={...i,title:void 0,fill:n},s=we(),c=(()=>{const e=o.useContext(ee);return null!=e?e:te})();return a.className=Z(s.root,(null==t?void 0:t.flipInRtl)&&"rtl"===(null==c?void 0:c.textDirection)&&s.rtl,a.className),r&&(a["aria-label"]=r),a["aria-label"]||a["aria-labelledby"]?a.role="img":a["aria-hidden"]=!0,a})(e,{flipInRtl:null==n?void 0:n.flipInRtl}),l={...c,className:Z(c.className,s.root),ref:a,width:t,height:t,viewBox:`0 0 ${i} ${i}`,xmlns:"http://www.w3.org/2000/svg"};return"string"==typeof r?o.createElement("svg",{...l,dangerouslySetInnerHTML:{__html:r}}):o.createElement("svg",l,...r.map(e=>o.createElement("path",{d:e,fill:l.fill})))});return a.displayName=e,a},Te=Ce("CheckmarkFilled","1em",["M7.03 13.9 3.56 10a.75.75 0 0 0-1.12 1l4 4.5c.29.32.79.34 1.09.03l10.5-10.5a.75.75 0 0 0-1.06-1.06l-9.94 9.94Z"]),xe=Ce("CheckmarkCircleFilled","1em",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm3.36 5.65a.5.5 0 0 0-.64-.06l-.07.06L9 11.3 7.35 9.65l-.07-.06a.5.5 0 0 0-.7.7l.07.07 2 2 .07.06c.17.11.4.11.56 0l.07-.06 4-4 .07-.08a.5.5 0 0 0-.06-.63Z"]),Se=Ce("ChevronDownRegular","1em",["M15.85 7.65c.2.2.2.5 0 .7l-5.46 5.49a.55.55 0 0 1-.78 0L4.15 8.35a.5.5 0 1 1 .7-.7L10 12.8l5.15-5.16c.2-.2.5-.2.7 0Z"]),Ie=Ce("ChevronUpRegular","1em",["M4.15 12.35a.5.5 0 0 1 0-.7L9.6 6.16a.55.55 0 0 1 .78 0l5.46 5.49a.5.5 0 0 1-.7.7L10 7.2l-5.15 5.16a.5.5 0 0 1-.7 0Z"]),_e=Ce("CircleFilled","1em",["M10 2a8 8 0 1 0 0 16 8 8 0 0 0 0-16Z"]),Ee=Ce("CopyRegular","1em",["M8 2a2 2 0 0 0-2 2v10c0 1.1.9 2 2 2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8ZM7 4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4ZM4 6a2 2 0 0 1 1-1.73V14.5A2.5 2.5 0 0 0 7.5 17h6.23A2 2 0 0 1 12 18H7.5A3.5 3.5 0 0 1 4 14.5V6Z"]),Ae=Ce("DismissRegular","1em",["m4.09 4.22.06-.07a.5.5 0 0 1 .63-.06l.07.06L10 9.29l5.15-5.14a.5.5 0 0 1 .63-.06l.07.06c.18.17.2.44.06.63l-.06.07L10.71 10l5.14 5.15c.18.17.2.44.06.63l-.06.07a.5.5 0 0 1-.63.06l-.07-.06L10 10.71l-5.15 5.14a.5.5 0 0 1-.63.06l-.07-.06a.5.5 0 0 1-.06-.63l.06-.07L9.29 10 4.15 4.85a.5.5 0 0 1-.06-.63l.06-.07-.06.07Z"]),Be=Ce("DismissCircleFilled","1em",["M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16ZM7.8 7.11a.5.5 0 0 0-.63.06l-.06.07a.5.5 0 0 0 .06.64L9.3 10l-2.12 2.12-.06.07a.5.5 0 0 0 .06.64l.07.06c.2.13.47.11.64-.06L10 10.7l2.12 2.12.07.06c.2.13.46.11.64-.06l.06-.07a.5.5 0 0 0-.06-.64L10.7 10l2.12-2.12.06-.07a.5.5 0 0 0-.06-.64l-.07-.06a.5.5 0 0 0-.64.06L10 9.3 7.88 7.17l-.07-.06Z"]),Oe=Ce("DocumentRegular","1em",["M6 2a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V7.41c0-.4-.16-.78-.44-1.06l-3.91-3.91A1.5 1.5 0 0 0 10.59 2H6ZM5 4a1 1 0 0 1 1-1h4v3.5c0 .83.67 1.5 1.5 1.5H15v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V4Zm9.8 3h-3.3a.5.5 0 0 1-.5-.5V3.2L14.8 7Z"]),Re=Ce("DocumentPdfRegular","1em",["M3 12a2 2 0 1 1 0 4H2v1.5a.5.5 0 0 1-1 0v-5c0-.28.22-.5.5-.5H3Zm-1 3h1a1 1 0 1 0 0-2H2v2Zm6-3a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H6.5a.5.5 0 0 1-.5-.5v-5c0-.28.22-.5.5-.5H8Zm-1 5h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1H7v4Zm7.1-4.99a.5.5 0 0 1 0 .98L14 13h-2v1.5h1.5a.5.5 0 0 1 0 1H12v2a.5.5 0 0 1-1 0v-5c0-.28.22-.5.5-.5H14l.1.01ZM10.6 2c.4 0 .78.16 1.06.44l3.91 3.91c.28.28.44.67.44 1.06V16a2 2 0 0 1-2 2h-1.09c.06-.16.09-.32.09-.5V17h1a1 1 0 0 0 1-1v-2.39a1.49 1.49 0 0 0 0-2.23V8h-3.5A1.5 1.5 0 0 1 10 6.5V3H6a1 1 0 0 0-1 1v7.63a2.74 2.74 0 0 0-1-.52V4c0-1.1.9-2 2-2h4.59ZM11 6.5c0 .28.22.5.5.5h3.3L11 3.2v3.3Z"]),je=Ce("Square12Filled","12",["M2 4c0-1.1.9-2 2-2h4a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4Z"]),Pe=Ce("Square16Filled","16",["M2 4.5A2.5 2.5 0 0 1 4.5 2h7A2.5 2.5 0 0 1 14 4.5v7a2.5 2.5 0 0 1-2.5 2.5h-7A2.5 2.5 0 0 1 2 11.5v-7Z"]),Ne=Ce("Checkmark12Filled","12",["M9.76 3.2c.3.29.32.76.04 1.06l-4.25 4.5a.75.75 0 0 1-1.08.02L2.22 6.53a.75.75 0 0 1 1.06-1.06l1.7 1.7L8.7 3.24a.75.75 0 0 1 1.06-.04Z"]),ze=Ce("Checkmark16Filled","16",["M14.05 3.49c.28.3.27.77-.04 1.06l-7.93 7.47A.85.85 0 0 1 4.9 12L2.22 9.28a.75.75 0 1 1 1.06-1.06l2.24 2.27 7.47-7.04a.75.75 0 0 1 1.06.04Z"]),qe=(e,t,r)=>{var o;return x(null!==(o=t.as)&&void 0!==o?o:e,t,r)};function Me(e){return Boolean(null==e?void 0:e.hasOwnProperty(j))}function Fe(e,t){return function(r,o,n,i,a){return Me(o)?t(function(e,t){return{...t,[j]:e}}(r,o),null,n,i,a):Me(r)?t(r,o,n,i,a):e(r,o,n,i,a)}}function De(e){const{as:t,[P]:r,[j]:o,[R]:n,...i}=e,a=i,s="string"==typeof o&&null!=t?t:o;return"string"!=typeof s&&t&&(a.as=t),{elementType:s,props:a,renderFunction:n}}r(44363);var Le=r(74848);const He=r.t(Le,2),Ue=Fe(He.jsx,(e,t,r)=>{const{elementType:n,renderFunction:i,props:a}=De(e),s={...a,...t};return i?He.jsx(o.Fragment,{children:i(n,s)},r):He.jsx(n,s,r)}),We=Fe(He.jsxs,(e,t,r)=>{const{elementType:n,renderFunction:i,props:a}=De(e),s={...a,...t};return i?He.jsx(o.Fragment,{children:i(n,{...s,children:He.jsxs(o.Fragment,{children:s.children},void 0)})},r):He.jsxs(n,s,r)});const Ve=ye({root:{Bahqtrf:"fk6fouc",sj55zd:"f19n0e5"},disabled:{sj55zd:"f1s2aq7o",Bbusuzp:"f1dcs8yz"},required:{sj55zd:"f1whyuy6",uwmqm3:["fruq291","f7x41pl"]},small:{Be2twd7:"fy9rknc",Bg96gwp:"fwrc4pm"},medium:{Be2twd7:"fkhj508",Bg96gwp:"f1i3iumi"},large:{Be2twd7:"fod5ikn",Bg96gwp:"faaz57k",Bhrd7zp:"fl43uef"},semibold:{Bhrd7zp:"fl43uef"}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".f19n0e5{color:var(--colorNeutralForeground1);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f1whyuy6{color:var(--colorPaletteRedForeground3);}",".fruq291{padding-left:var(--spacingHorizontalXS);}",".f7x41pl{padding-right:var(--spacingHorizontalXS);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fl43uef{font-weight:var(--fontWeightSemibold);}"],m:[["@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}",{m:"(forced-colors: active)"}]]}),$e=o.createContext(void 0),Ke=()=>{},Ge=$e.Provider,Je=e=>{var t,r;return null!==(r=null===(t=o.useContext($e))||void 0===t?void 0:t[e])&&void 0!==r?r:Ke},Qe=o.forwardRef((e,t)=>{const r=((e,t)=>{const{disabled:r=!1,required:o=!1,weight:n="regular",size:i="medium"}=e;return{disabled:r,required:z(!0===o?"*":o||void 0,{defaultProps:{"aria-hidden":"true"},elementType:"span"}),weight:n,size:i,components:{root:"label",required:"span"},root:N(qe("label",{ref:t,...e}),{elementType:"label"})}})(e,t);return(e=>{const t=Ve();e.root.className=Z("fui-Label",t.root,e.disabled&&t.disabled,t[e.size],"semibold"===e.weight&&t.semibold,e.root.className),e.required&&(e.required.className=Z("fui-Label__required",t.required,e.disabled&&t.disabled,e.required.className))})(r),Je("useLabelStyles_unstable")(r),(e=>We(e.root,{children:[e.root.children,e.required&&Ue(e.required,{})]}))(r)});Qe.displayName="Label";const Xe=o.createContext(void 0),Ye={targetDocument:"object"==typeof document?document:void 0,dir:"ltr"},Ze=Xe.Provider;function et(){var e;return null!==(e=o.useContext(Xe))&&void 0!==e?e:Ye}var tt="undefined"!=typeof WeakRef,rt=class{constructor(e){tt&&"object"==typeof e?this._weakRef=new WeakRef(e):this._instance=e}deref(){var e,t;let r;return this._weakRef?(r=null==(e=this._weakRef)?void 0:e.deref(),r||delete this._weakRef):(r=this._instance,(null==(t=null==r?void 0:r.isDisposed)?void 0:t.call(r))&&delete this._instance),r}},ot="keyborg:focusin",nt="keyborg:focusout",it=!1;function at(e){const t=e.focus;t.__keyborgNativeFocus?t.__keyborgNativeFocus.call(e):e.focus()}var st=0,ct=class{constructor(e,t){this._isNavigatingWithKeyboard_DO_NOT_USE=!1,this._onFocusIn=e=>{if(this._isMouseOrTouchUsedTimer)return;if(this.isNavigatingWithKeyboard)return;const t=e.detail;t.relatedTarget&&(t.isFocusedProgrammatically||void 0===t.isFocusedProgrammatically||(this.isNavigatingWithKeyboard=!0))},this._onMouseDown=e=>{0===e.buttons||0===e.clientX&&0===e.clientY&&0===e.screenX&&0===e.screenY||this._onMouseOrTouch()},this._onMouseOrTouch=()=>{const e=this._win;e&&(this._isMouseOrTouchUsedTimer&&e.clearTimeout(this._isMouseOrTouchUsedTimer),this._isMouseOrTouchUsedTimer=e.setTimeout(()=>{delete this._isMouseOrTouchUsedTimer},1e3)),this.isNavigatingWithKeyboard=!1},this._onKeyDown=e=>{this.isNavigatingWithKeyboard?this._shouldDismissKeyboardNavigation(e)&&this._scheduleDismiss():this._shouldTriggerKeyboardNavigation(e)&&(this.isNavigatingWithKeyboard=!0)},this.id="c"+ ++st,this._win=e;const r=e.document;if(t){const e=t.triggerKeys,r=t.dismissKeys;(null==e?void 0:e.length)&&(this._triggerKeys=new Set(e)),(null==r?void 0:r.length)&&(this._dismissKeys=new Set(r))}r.addEventListener(ot,this._onFocusIn,!0),r.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("keydown",this._onKeyDown,!0),r.addEventListener("touchstart",this._onMouseOrTouch,!0),r.addEventListener("touchend",this._onMouseOrTouch,!0),r.addEventListener("touchcancel",this._onMouseOrTouch,!0),function(e){const t=e;it||(it=function(e){const t=e.HTMLElement,r=t.prototype.focus;let o=!1;return t.prototype.focus=function(){o=!0},e.document.createElement("button").focus(),t.prototype.focus=r,o}(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=c;const o=new Set,n=e=>{const t=e.target;if(!t)return;const r=new CustomEvent(nt,{cancelable:!0,bubbles:!0,composed:!0,detail:{originalEvent:e}});t.dispatchEvent(r)},i=e=>{const t=e.target;if(!t)return;let r=e.composedPath()[0];const s=new Set;for(;r;)r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(s.add(r),r=r.host):r=r.parentNode;for(const e of o){const t=e.deref();t&&s.has(t)||(o.delete(e),t&&(t.removeEventListener("focusin",i,!0),t.removeEventListener("focusout",n,!0)))}a(t,e.relatedTarget||void 0)},a=(e,t,r)=>{var a;const c=e.shadowRoot;if(c){for(const e of o)if(e.deref()===c)return;return c.addEventListener("focusin",i,!0),c.addEventListener("focusout",n,!0),void o.add(new rt(c))}const l={relatedTarget:t,originalEvent:r},d=new CustomEvent(ot,{cancelable:!0,bubbles:!0,composed:!0,detail:l});d.details=l,(it||s.lastFocusedProgrammatically)&&(l.isFocusedProgrammatically=e===(null==(a=s.lastFocusedProgrammatically)?void 0:a.deref()),s.lastFocusedProgrammatically=void 0),e.dispatchEvent(d)},s=t.__keyborgData={focusInHandler:i,focusOutHandler:n,shadowTargets:o};function c(){const e=t.__keyborgData;return e&&(e.lastFocusedProgrammatically=new rt(this)),r.apply(this,arguments)}t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0),t.document.addEventListener("focusout",t.__keyborgData.focusOutHandler,!0);let l=t.document.activeElement;for(;l&&l.shadowRoot;)a(l),l=l.shadowRoot.activeElement;c.__keyborgNativeFocus=r}(e)}get isNavigatingWithKeyboard(){return this._isNavigatingWithKeyboard_DO_NOT_USE}set isNavigatingWithKeyboard(e){this._isNavigatingWithKeyboard_DO_NOT_USE!==e&&(this._isNavigatingWithKeyboard_DO_NOT_USE=e,this.update())}dispose(){const e=this._win;if(e){this._isMouseOrTouchUsedTimer&&(e.clearTimeout(this._isMouseOrTouchUsedTimer),this._isMouseOrTouchUsedTimer=void 0),this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),function(e){const t=e,r=t.HTMLElement.prototype,o=r.focus.__keyborgNativeFocus,n=t.__keyborgData;if(n){t.document.removeEventListener("focusin",n.focusInHandler,!0),t.document.removeEventListener("focusout",n.focusOutHandler,!0);for(const e of n.shadowTargets){const t=e.deref();t&&(t.removeEventListener("focusin",n.focusInHandler,!0),t.removeEventListener("focusout",n.focusOutHandler,!0))}n.shadowTargets.clear(),delete t.__keyborgData}o&&(r.focus=o)}(e);const t=e.document;t.removeEventListener(ot,this._onFocusIn,!0),t.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keydown",this._onKeyDown,!0),t.removeEventListener("touchstart",this._onMouseOrTouch,!0),t.removeEventListener("touchend",this._onMouseOrTouch,!0),t.removeEventListener("touchcancel",this._onMouseOrTouch,!0),delete this._win}}isDisposed(){return!!this._win}update(){var e,t;const r=null==(t=null==(e=this._win)?void 0:e.__keyborg)?void 0:t.refs;if(r)for(const e of Object.keys(r))lt.update(r[e],this.isNavigatingWithKeyboard)}_shouldTriggerKeyboardNavigation(e){var t;if("Tab"===e.key)return!0;const r=null==(t=this._win)?void 0:t.document.activeElement,o=!this._triggerKeys||this._triggerKeys.has(e.keyCode),n=r&&("INPUT"===r.tagName||"TEXTAREA"===r.tagName||r.isContentEditable);return o&&!n}_shouldDismissKeyboardNavigation(e){var t;return null==(t=this._dismissKeys)?void 0:t.has(e.keyCode)}_scheduleDismiss(){const e=this._win;if(e){this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const t=e.document.activeElement;this._dismissTimer=e.setTimeout(()=>{this._dismissTimer=void 0;const r=e.document.activeElement;t&&r&&t===r&&(this.isNavigatingWithKeyboard=!1)},500)}}},lt=class e{constructor(e,t){this._cb=[],this._id="k"+ ++st,this._win=e;const r=e.__keyborg;r?(this._core=r.core,r.refs[this._id]=this):(this._core=new ct(e,t),e.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new e(t,r)}static dispose(e){e.dispose()}static update(e,t){e._cb.forEach(e=>e(t))}dispose(){var e;const t=null==(e=this._win)?void 0:e.__keyborg;(null==t?void 0:t.refs[this._id])&&(delete t.refs[this._id],0===Object.keys(t.refs).length&&(t.core.dispose(),delete this._win.__keyborg)),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){var e;return!!(null==(e=this._core)?void 0:e.isNavigatingWithKeyboard)}subscribe(e){this._cb.push(e)}unsubscribe(e){const t=this._cb.indexOf(e);t>=0&&this._cb.splice(t,1)}setVal(e){this._core&&(this._core.isNavigatingWithKeyboard=e)}};function dt(e,t){return lt.create(e,t)}function ut(e){lt.dispose(e)}const ft="data-fui-focus-visible",ht="data-fui-focus-within";function pt(e){e.removeAttribute(ht)}function gt(e){return!!e&&Boolean(e&&"object"==typeof e&&"classList"in e&&"contains"in e)}function mt(){const{targetDocument:e}=et(),t=o.useRef(null);return o.useEffect(()=>{if((null==e?void 0:e.defaultView)&&t.current)return function(e,t){const r=dt(t);r.subscribe(t=>{t||pt(e)});const o=t=>{r.isNavigatingWithKeyboard()&>(t.target)&&e.setAttribute(ht,"")},n=t=>{(!t.relatedTarget||gt(t.relatedTarget)&&!e.contains(t.relatedTarget))&&pt(e)};return e.addEventListener(ot,o),e.addEventListener("focusout",n),()=>{e.removeEventListener(ot,o),e.removeEventListener("focusout",n),ut(r)}}(t.current,e.defaultView)},[t,e]),t}function vt(e,t,r){const o=function(e,t,r,o=oe){const n=o();return function(o){const{dir:i,renderer:a}=o,s="ltr"===i?e:t||e;return n(a,Array.isArray(r)?{r:r}:r),s}}(e,t,r,ae);return function(){const e=be(),t=ge();return o({dir:e,renderer:t})}}const bt=vt("r1q22k1j","r18ze4k2",{r:[".r1q22k1j{position:relative;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}",".r1q22k1j:focus{outline-style:none;}",".r1q22k1j:focus-visible{outline-style:none;}",".r1q22k1j[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",'.r1q22k1j[data-fui-focus-within]:focus-within::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}',".r18ze4k2{position:relative;display:inline-flex;cursor:pointer;vertical-align:middle;color:var(--colorNeutralForeground3);}",".r18ze4k2:focus{outline-style:none;}",".r18ze4k2:focus-visible{outline-style:none;}",".r18ze4k2[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",'.r18ze4k2[data-fui-focus-within]:focus-within::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}'],s:["@media (forced-colors: active){.r1q22k1j[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}","@media (forced-colors: active){.r18ze4k2[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}"]}),yt=ye({unchecked:{Bi91k9c:"f3p8bqa",pv5h1i:"fium13f",lj723h:"f1r2dosr",Hnthvo:"f1729es6"},checked:{sj55zd:"f19n0e5",wkncrt:"f35ds98",zxk7z7:"f12mnkne",Hmsnfy:"fei9a8h",e6czan:"fix56y3",pv5h1i:"f1bcv2js",qbydtz:"f7dr4go",Hnthvo:"f1r5cpua"},mixed:{sj55zd:"f19n0e5",Hmsnfy:"f1l27tf0",zxk7z7:"fcilktj",pv5h1i:"f1lphd54",Bunfa6h:"f1obkvq7",Hnthvo:"f2gmbuh",B15ykmv:"f1oy4fa1"},disabled:{Bceei9c:"f158kwzp",sj55zd:"f1s2aq7o",Hmsnfy:"f1w7mfl5",zxk7z7:"fcoafq6",Bbusuzp:"f1dcs8yz",mrqfp9:"fxb3eh3"}},{h:[".f3p8bqa:hover{color:var(--colorNeutralForeground2);}",".fium13f:hover{--fui-Checkbox__indicator--borderColor:var(--colorNeutralStrokeAccessibleHover);}",".fix56y3:hover{--fui-Checkbox__indicator--backgroundColor:var(--colorCompoundBrandBackgroundHover);}",".f1bcv2js:hover{--fui-Checkbox__indicator--borderColor:var(--colorCompoundBrandBackgroundHover);}",".f1lphd54:hover{--fui-Checkbox__indicator--borderColor:var(--colorCompoundBrandStrokeHover);}",".f1obkvq7:hover{--fui-Checkbox__indicator--color:var(--colorCompoundBrandForeground1Hover);}"],a:[".f1r2dosr:active{color:var(--colorNeutralForeground1);}",".f1729es6:active{--fui-Checkbox__indicator--borderColor:var(--colorNeutralStrokeAccessiblePressed);}",".f7dr4go:active{--fui-Checkbox__indicator--backgroundColor:var(--colorCompoundBrandBackgroundPressed);}",".f1r5cpua:active{--fui-Checkbox__indicator--borderColor:var(--colorCompoundBrandBackgroundPressed);}",".f2gmbuh:active{--fui-Checkbox__indicator--borderColor:var(--colorCompoundBrandStrokePressed);}",".f1oy4fa1:active{--fui-Checkbox__indicator--color:var(--colorCompoundBrandForeground1Pressed);}"],d:[".f19n0e5{color:var(--colorNeutralForeground1);}",".f35ds98{--fui-Checkbox__indicator--backgroundColor:var(--colorCompoundBrandBackground);}",".f12mnkne{--fui-Checkbox__indicator--color:var(--colorNeutralForegroundInverted);}",".fei9a8h{--fui-Checkbox__indicator--borderColor:var(--colorCompoundBrandBackground);}",".f1l27tf0{--fui-Checkbox__indicator--borderColor:var(--colorCompoundBrandStroke);}",".fcilktj{--fui-Checkbox__indicator--color:var(--colorCompoundBrandForeground1);}",".f158kwzp{cursor:default;}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f1w7mfl5{--fui-Checkbox__indicator--borderColor:var(--colorNeutralStrokeDisabled);}",".fcoafq6{--fui-Checkbox__indicator--color:var(--colorNeutralForegroundDisabled);}"],m:[["@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fxb3eh3{--fui-Checkbox__indicator--color:GrayText;}}",{m:"(forced-colors: active)"}]]}),wt=vt("ruo9svu",null,[".ruo9svu{box-sizing:border-box;cursor:inherit;height:100%;margin:0;opacity:0;position:absolute;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));}"]),kt=ye({before:{j35jbq:["f1e31b4d","f1vgc2s3"]},after:{oyh7mz:["f1vgc2s3","f1e31b4d"]},large:{a9b677:"f1mq5jt6"}},{d:[".f1e31b4d{right:0;}",".f1vgc2s3{left:0;}",".f1mq5jt6{width:calc(20px + 2 * var(--spacingHorizontalS));}"]}),Ct=vt("rl7ci6d",null,[".rl7ci6d{align-self:flex-start;box-sizing:border-box;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--fui-Checkbox__indicator--color);background-color:var(--fui-Checkbox__indicator--backgroundColor);border-color:var(--fui-Checkbox__indicator--borderColor, var(--colorNeutralStrokeAccessible));border-style:solid;border-width:var(--strokeWidthThin);border-radius:var(--borderRadiusSmall);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;font-size:12px;height:16px;width:16px;}"]),Tt=ye({large:{Be2twd7:"f4ybsrx",Bqenvij:"fjamq6b",a9b677:"f64fuq3"},circular:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f44lkw9"}},{d:[".f4ybsrx{font-size:16px;}",".fjamq6b{height:20px;}",".f64fuq3{width:20px;}",[".f44lkw9{border-radius:var(--borderRadiusCircular);}",{p:-1}]]}),xt=ye({base:{qb2dma:"f7nlbp4",sj55zd:"f1ym3bx4",Bceei9c:"fpo1scq",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1f5q0n8"},before:{z189sj:["f7x41pl","fruq291"]},after:{uwmqm3:["fruq291","f7x41pl"]},medium:{B6of3ja:"fjzwpt6",jrapky:"fh6j2fo"},large:{B6of3ja:"f1xlvstr",jrapky:"f49ad5g"}},{d:[".f7nlbp4{align-self:center;}",".f1ym3bx4{color:inherit;}",".fpo1scq{cursor:inherit;}",[".f1f5q0n8{padding:var(--spacingVerticalS) var(--spacingHorizontalS);}",{p:-1}],".f7x41pl{padding-right:var(--spacingHorizontalXS);}",".fruq291{padding-left:var(--spacingHorizontalXS);}",".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}",".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}",".f1xlvstr{margin-top:calc((20px - var(--lineHeightBase300)) / 2);}",".f49ad5g{margin-bottom:calc((20px - var(--lineHeightBase300)) / 2);}"]}),St=o.forwardRef((e,t)=>{const r=((e,t)=>{e=s(e,{supportsLabelFor:!0,supportsRequired:!0});const{disabled:r=!1,required:n,shape:i="square",size:a="medium",labelPosition:l="after",onChange:d}=e,[u,f]=c({defaultState:e.defaultChecked,state:e.checked,initialState:!1}),h=S({props:e,primarySlotTagName:"input",excludedPropNames:["checked","defaultChecked","size","onChange"]}),p="mixed"===u,g=O("checkbox-",h.primary.id);let m;p?m="circular"===i?o.createElement(_e,null):"large"===a?o.createElement(Pe,null):o.createElement(je,null):u&&(m="large"===a?o.createElement(ze,null):o.createElement(Ne,null));const v={shape:i,checked:u,disabled:r,size:a,labelPosition:l,components:{root:"span",input:"input",indicator:"div",label:Qe},root:N(e.root,{defaultProps:{ref:mt(),...h.root},elementType:"span"}),input:N(e.input,{defaultProps:{type:"checkbox",id:g,ref:t,checked:!0===u,...h.primary},elementType:"input"}),label:z(e.label,{defaultProps:{htmlFor:g,disabled:r,required:n,size:"medium"},elementType:Qe}),indicator:z(e.indicator,{renderByDefault:!0,defaultProps:{"aria-hidden":!0,children:m},elementType:"div"})};v.input.onChange=F(e=>{const t=e.currentTarget.indeterminate?"mixed":e.currentTarget.checked;null==d||d(e,{checked:t}),f(t)});const b=D(v.input.ref);return v.input.ref=b,M(()=>{b.current&&(b.current.indeterminate=p)},[b,p]),v})(e,t);return(e=>{const{checked:t,disabled:r,labelPosition:o,shape:n,size:i}=e,a=bt(),s=yt();e.root.className=Z("fui-Checkbox",a,r?s.disabled:"mixed"===t?s.mixed:t?s.checked:s.unchecked,e.root.className);const c=wt(),l=kt();e.input.className=Z("fui-Checkbox__input",c,"large"===i&&l.large,l[o],e.input.className);const d=Ct(),u=Tt();e.indicator&&(e.indicator.className=Z("fui-Checkbox__indicator",d,"large"===i&&u.large,"circular"===n&&u.circular,e.indicator.className));const f=xt();e.label&&(e.label.className=Z("fui-Checkbox__label",f.base,f[i],f[o],e.label.className))})(r),Je("useCheckboxStyles_unstable")(r),(e=>We(e.root,{children:[Ue(e.input,{}),"before"===e.labelPosition&&e.label&&Ue(e.label,{}),e.indicator&&Ue(e.indicator,{}),"after"===e.labelPosition&&e.label&&Ue(e.label,{})]}))(r)});St.displayName="Checkbox";const It="Enter",_t=" ",Et="ArrowDown",At="ArrowLeft",Bt="ArrowRight",Ot="ArrowUp",Rt="Home",jt="Escape";function Pt(e,t){const{disabled:r,disabledFocusable:o=!1,"aria-disabled":n,onClick:i,onKeyDown:a,onKeyUp:s,...c}=null!=t?t:{},l="string"==typeof n?"true"===n:n,d=r||o||l,u=F(e=>{d?(e.preventDefault(),e.stopPropagation()):null==i||i(e)}),f=F(e=>{if(null==a||a(e),e.isDefaultPrevented())return;const t=e.key;if(d&&(t===It||t===_t))return e.preventDefault(),void e.stopPropagation();t!==_t?t===It&&(e.preventDefault(),e.currentTarget.click()):e.preventDefault()}),h=F(e=>{if(null==s||s(e),e.isDefaultPrevented())return;const t=e.key;if(d&&(t===It||t===_t))return e.preventDefault(),void e.stopPropagation();t===_t&&(e.preventDefault(),e.currentTarget.click())});if("button"===e||void 0===e)return{...c,disabled:r&&!o,"aria-disabled":!!o||l,onClick:o?void 0:u,onKeyUp:o?void 0:s,onKeyDown:o?void 0:a};{const t=!!c.href;let n=t?void 0:"button";!n&&d&&(n="link");const i={role:n,tabIndex:o||!t&&!r?0:void 0,...c,onClick:u,onKeyUp:h,onKeyDown:f,"aria-disabled":d};return"a"===e&&d&&(i.href=void 0),i}}const Nt=o.createContext(void 0),zt={},qt=Nt.Provider,Mt=vt("r1alrhcs",null,{r:[".r1alrhcs{align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;text-decoration-line:none;vertical-align:middle;margin:0;overflow:hidden;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);font-family:var(--fontFamilyBase);outline-style:none;padding:5px var(--spacingHorizontalM);min-width:96px;border-radius:var(--borderRadiusMedium);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase300);transition-duration:var(--durationFaster);transition-property:background,border,color;transition-timing-function:var(--curveEasyEase);}",".r1alrhcs:hover{background-color:var(--colorNeutralBackground1Hover);border-color:var(--colorNeutralStroke1Hover);color:var(--colorNeutralForeground1Hover);cursor:pointer;}",".r1alrhcs:hover:active{background-color:var(--colorNeutralBackground1Pressed);border-color:var(--colorNeutralStroke1Pressed);color:var(--colorNeutralForeground1Pressed);outline-style:none;}",".r1alrhcs[data-fui-focus-visible]{border-color:var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);border-width:1px;outline:var(--strokeWidthThick) solid var(--colorTransparentStroke);box-shadow:0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset;z-index:1;}"],s:["@media screen and (prefers-reduced-motion: reduce){.r1alrhcs{transition-duration:0.01ms;}}","@media (forced-colors: active){.r1alrhcs:focus{border-color:ButtonText;}.r1alrhcs:hover{background-color:HighlightText;border-color:Highlight;color:Highlight;forced-color-adjust:none;}.r1alrhcs:hover:active{background-color:HighlightText;border-color:Highlight;color:Highlight;forced-color-adjust:none;}}","@supports (-moz-appearance:button){.r1alrhcs[data-fui-focus-visible]{box-shadow:0 0 0 calc(var(--strokeWidthThin) + 0.25px) var(--colorStrokeFocus2) inset;}}"]}),Ft=vt("rywnvv2",null,[".rywnvv2{align-items:center;display:inline-flex;justify-content:center;font-size:20px;height:20px;width:20px;--fui-Button__icon--spacing:var(--spacingHorizontalSNudge);}"]),Dt=ye({outline:{De3pzq:"f1c21dwh",Jwef8y:"fjxutwb",iro3zm:"fwiml72"},primary:{De3pzq:"ffp7eso",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],sj55zd:"f1phragk",Jwef8y:"f15wkkf3",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],Bi91k9c:"f1rq72xc",iro3zm:"fnp9lpt",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"],B2d53fq:"f1d6v5y2",Bsw6fvg:"f1rirnrt",Bjwas2f:"f1uu00uk",Bn1d65q:["fkvaka8","f9a0qzu"],Bxeuatn:"f1ux7til",n51gp8:["f9a0qzu","fkvaka8"],Bbusuzp:"f1lkg8j3",ycbfsm:"fkc42ay",Bqrx1nm:"fq7113v",pgvf35:"ff1wgvm",Bh7lczh:["fiob0tu","f1x4h75k"],dpv3f4:"f1j6scgf",Bpnjhaq:["f1x4h75k","fiob0tu"],ze5xyy:"f4xjyn1",g2kj27:"fbgcvur",Bf756sw:"f1ks1yx8",Bow2dr7:["f1o6qegi","fmxjhhp"],Bvhedfk:"fcnxywj",Gye4lf:["fmxjhhp","f1o6qegi"],pc6evw:"f9ddjv3"},secondary:{},subtle:{De3pzq:"fhovq9v",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],sj55zd:"fkfq4zb",Jwef8y:"f1t94bn6",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],Bi91k9c:"fnwyq0v",Bk3fhr4:"ft1hn21",Bmfj8id:"fuxngvv",Bbdnnc7:"fy5bs14",iro3zm:"fsv2rcd",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"],B2d53fq:"f1omzyqd",em6i61:"f1dfjoow",vm6p8p:"f1j98vj9",x3br3k:"fj8yq94",ze5xyy:"f4xjyn1",Bx3q9su:"f1et0tmh",pc6evw:"f9ddjv3",xd2cci:"f1wi8ngl"},transparent:{De3pzq:"f1c21dwh",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],sj55zd:"fkfq4zb",Jwef8y:"fjxutwb",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],Bi91k9c:"f139oj5f",Bk3fhr4:"ft1hn21",Bmfj8id:"fuxngvv",iro3zm:"fwiml72",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"],B2d53fq:"f1fg1p5m",em6i61:"f1dfjoow",vm6p8p:"f1j98vj9",Bqrx1nm:"f1tme0vf",ze5xyy:"f4xjyn1",g2kj27:"f18onu3q",pc6evw:"f9ddjv3"},circular:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f44lkw9"},rounded:{},square:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f1fabniw"},small:{Bf4jedk:"fh7ncta",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"fneth5b",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm"},smallWithIcon:{Byoj8tv:"f1brlhvm",z8tnut:"f1sl3k7w"},medium:{},large:{Bf4jedk:"f14es27b",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f4db1ww",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},largeWithIcon:{Byoj8tv:"fy7v416",z8tnut:"f1a1bwwz"}},{d:[".f1c21dwh{background-color:var(--colorTransparentBackground);}",".ffp7eso{background-color:var(--colorBrandBackground);}",".f1p3nwhy{border-top-color:transparent;}",".f11589ue{border-right-color:transparent;}",".f1pdflbu{border-left-color:transparent;}",".f1q5o8ev{border-bottom-color:transparent;}",".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",".fhovq9v{background-color:var(--colorSubtleBackground);}",".fkfq4zb{color:var(--colorNeutralForeground2);}",[".f44lkw9{border-radius:var(--borderRadiusCircular);}",{p:-1}],[".f1fabniw{border-radius:var(--borderRadiusNone);}",{p:-1}],".fh7ncta{min-width:64px;}",[".fneth5b{padding:3px var(--spacingHorizontalS);}",{p:-1}],[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f1brlhvm{padding-bottom:1px;}",".f1sl3k7w{padding-top:1px;}",".f14es27b{min-width:96px;}",[".f4db1ww{padding:8px var(--spacingHorizontalL);}",{p:-1}],[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".fod5ikn{font-size:var(--fontSizeBase400);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fy7v416{padding-bottom:7px;}",".f1a1bwwz{padding-top:7px;}"],h:[".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}",".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}",".f15wkkf3:hover{background-color:var(--colorBrandBackgroundHover);}",".f1s2uweq:hover{border-top-color:transparent;}",".fr80ssc:hover{border-right-color:transparent;}",".fecsdlb:hover{border-left-color:transparent;}",".f1ukrpxl:hover{border-bottom-color:transparent;}",".f1rq72xc:hover{color:var(--colorNeutralForegroundOnBrand);}",".fnp9lpt:hover:active{background-color:var(--colorBrandBackgroundPressed);}",".f1h0usnq:hover:active{border-top-color:transparent;}",".fs4ktlq:hover:active{border-right-color:transparent;}",".fx2bmrt:hover:active{border-left-color:transparent;}",".f16h9ulv:hover:active{border-bottom-color:transparent;}",".f1d6v5y2:hover:active{color:var(--colorNeutralForegroundOnBrand);}",".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}",".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}",".ft1hn21:hover .fui-Icon-filled{display:inline;}",".fuxngvv:hover .fui-Icon-regular{display:none;}",".fy5bs14:hover .fui-Button__icon{color:var(--colorNeutralForeground2BrandHover);}",".fsv2rcd:hover:active{background-color:var(--colorSubtleBackgroundPressed);}",".f1omzyqd:hover:active{color:var(--colorNeutralForeground2Pressed);}",".f1dfjoow:hover:active .fui-Icon-filled{display:inline;}",".f1j98vj9:hover:active .fui-Icon-regular{display:none;}",".fj8yq94:hover:active .fui-Button__icon{color:var(--colorNeutralForeground2BrandPressed);}",".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}",".f1fg1p5m:hover:active{color:var(--colorNeutralForeground2BrandPressed);}"],m:[["@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1uu00uk{border-top-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f9a0qzu{border-left-color:HighlightText;}.fkvaka8{border-right-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1ux7til{border-bottom-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1lkg8j3{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fq7113v:hover{background-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.ff1wgvm:hover{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1x4h75k:hover{border-left-color:Highlight;}.fiob0tu:hover{border-right-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1j6scgf:hover{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f4xjyn1:hover{color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fbgcvur:hover:active{background-color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1ks1yx8:hover:active{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1o6qegi:hover:active{border-right-color:Highlight;}.fmxjhhp:hover:active{border-left-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fcnxywj:hover:active{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f9ddjv3:hover:active{color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1et0tmh:hover .fui-Button__icon{color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1wi8ngl:hover:active .fui-Button__icon{color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1tme0vf:hover{background-color:var(--colorTransparentBackground);}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f18onu3q:hover:active{background-color:var(--colorTransparentBackground);}}",{m:"(forced-colors: active)"}]]}),Lt=ye({base:{De3pzq:"f1bg9a2p",g2u3we:"f1jj8ep1",h3c5rm:["f15xbau","fy0fskl"],B9xav0g:"f4ikngz",zhjwy3:["fy0fskl","f15xbau"],sj55zd:"f1s2aq7o",Bceei9c:"fdrzuqr",Bfinmwp:"f15x8b5r",Jwef8y:"f1falr9n",Bgoe8wy:"f12mpcsy",Bwzppfd:["f1gwvigk","f18rmfxp"],oetu4i:"f1jnshp0",gg5e9n:["f18rmfxp","f1gwvigk"],Bi91k9c:"fvgxktp",eoavqd:"fphbwmw",Bk3fhr4:"f19vpps7",Bmfj8id:"fv5swzo",Bbdnnc7:"f1al02dq",iro3zm:"f1t6o4dc",b661bw:"f10ztigi",Bk6r4ia:["f1ft5sdu","f1gzf82w"],B9zn80p:"f12zbtn2",Bpld233:["f1gzf82w","f1ft5sdu"],B2d53fq:"fcvwxyo",c3iz72:"f8w4c43",em6i61:"f1ol4fw6",vm6p8p:"f1q1lw4e",x3br3k:"f1dwjv2g"},highContrast:{Bsw6fvg:"f4lkoma",Bjwas2f:"fg455y9",Bn1d65q:["f1rvyvqg","f14g86mu"],Bxeuatn:"f1cwzwz",n51gp8:["f14g86mu","f1rvyvqg"],Bbusuzp:"f1dcs8yz",Bm2fdqk:"fuigjrg",G867l3:"fjwq6ea",gdbnj:["f1lr3nhc","f1mbxvi6"],mxns5l:"fn5gmvv",o3nasb:["f1mbxvi6","f1lr3nhc"],Bqrx1nm:"f1vmkb5g",pgvf35:"f53ppgq",Bh7lczh:["f1663y11","f80fkiy"],dpv3f4:"f18v5270",Bpnjhaq:["f80fkiy","f1663y11"],ze5xyy:"f1kc2mi9",Bx3q9su:"f4dhi0o",g2kj27:"f1y0svfh",Bf756sw:"fihuait",Bow2dr7:["fnxhupq","fyd6l6x"],Bvhedfk:"fx507ft",Gye4lf:["fyd6l6x","fnxhupq"],pc6evw:"fb3rf2x",xd2cci:"fequ9m0"},outline:{De3pzq:"f1c21dwh",Jwef8y:"f9ql6rf",iro3zm:"f3h1zc4"},primary:{g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"]},secondary:{},subtle:{De3pzq:"f1c21dwh",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],Jwef8y:"f9ql6rf",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],iro3zm:"f3h1zc4",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"]},transparent:{De3pzq:"f1c21dwh",g2u3we:"f1p3nwhy",h3c5rm:["f11589ue","f1pdflbu"],B9xav0g:"f1q5o8ev",zhjwy3:["f1pdflbu","f11589ue"],Jwef8y:"f9ql6rf",Bgoe8wy:"f1s2uweq",Bwzppfd:["fr80ssc","fecsdlb"],oetu4i:"f1ukrpxl",gg5e9n:["fecsdlb","fr80ssc"],iro3zm:"f3h1zc4",b661bw:"f1h0usnq",Bk6r4ia:["fs4ktlq","fx2bmrt"],B9zn80p:"f16h9ulv",Bpld233:["fx2bmrt","fs4ktlq"]}},{d:[".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}",".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}",".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}",".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}",".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}",".f15x8b5r .fui-Button__icon{color:var(--colorNeutralForegroundDisabled);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f1p3nwhy{border-top-color:transparent;}",".f11589ue{border-right-color:transparent;}",".f1pdflbu{border-left-color:transparent;}",".f1q5o8ev{border-bottom-color:transparent;}"],h:[".f1falr9n:hover{background-color:var(--colorNeutralBackgroundDisabled);}",".f12mpcsy:hover{border-top-color:var(--colorNeutralStrokeDisabled);}",".f1gwvigk:hover{border-right-color:var(--colorNeutralStrokeDisabled);}",".f18rmfxp:hover{border-left-color:var(--colorNeutralStrokeDisabled);}",".f1jnshp0:hover{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}",".fphbwmw:hover{cursor:not-allowed;}",".f19vpps7:hover .fui-Icon-filled{display:none;}",".fv5swzo:hover .fui-Icon-regular{display:inline;}",".f1al02dq:hover .fui-Button__icon{color:var(--colorNeutralForegroundDisabled);}",".f1t6o4dc:hover:active{background-color:var(--colorNeutralBackgroundDisabled);}",".f10ztigi:hover:active{border-top-color:var(--colorNeutralStrokeDisabled);}",".f1ft5sdu:hover:active{border-right-color:var(--colorNeutralStrokeDisabled);}",".f1gzf82w:hover:active{border-left-color:var(--colorNeutralStrokeDisabled);}",".f12zbtn2:hover:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".fcvwxyo:hover:active{color:var(--colorNeutralForegroundDisabled);}",".f8w4c43:hover:active{cursor:not-allowed;}",".f1ol4fw6:hover:active .fui-Icon-filled{display:none;}",".f1q1lw4e:hover:active .fui-Icon-regular{display:inline;}",".f1dwjv2g:hover:active .fui-Button__icon{color:var(--colorNeutralForegroundDisabled);}",".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}",".f3h1zc4:hover:active{background-color:var(--colorTransparentBackground);}",".f1s2uweq:hover{border-top-color:transparent;}",".fr80ssc:hover{border-right-color:transparent;}",".fecsdlb:hover{border-left-color:transparent;}",".f1ukrpxl:hover{border-bottom-color:transparent;}",".f1h0usnq:hover:active{border-top-color:transparent;}",".fs4ktlq:hover:active{border-right-color:transparent;}",".fx2bmrt:hover:active{border-left-color:transparent;}",".f16h9ulv:hover:active{border-bottom-color:transparent;}"],m:[["@media (forced-colors: active){.f4lkoma{background-color:ButtonFace;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fuigjrg .fui-Button__icon{color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fjwq6ea:focus{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1lr3nhc:focus{border-right-color:GrayText;}.f1mbxvi6:focus{border-left-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fn5gmvv:focus{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1vmkb5g:hover{background-color:ButtonFace;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f53ppgq:hover{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1663y11:hover{border-right-color:GrayText;}.f80fkiy:hover{border-left-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f18v5270:hover{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1kc2mi9:hover{color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f4dhi0o:hover .fui-Button__icon{color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1y0svfh:hover:active{background-color:ButtonFace;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fihuait:hover:active{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fnxhupq:hover:active{border-right-color:GrayText;}.fyd6l6x:hover:active{border-left-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fx507ft:hover:active{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fb3rf2x:hover:active{color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fequ9m0:hover:active .fui-Button__icon{color:GrayText;}}",{m:"(forced-colors: active)"}]]}),Ht=ye({circular:{Bw81rd7:0,kdpuga:0,dm238s:0,B6xbmo0:0,B3whbx2:"f1062rbf"},rounded:{},square:{Bw81rd7:0,kdpuga:0,dm238s:0,B6xbmo0:0,B3whbx2:"fj0ryk1"},primary:{B8q5s1w:"f17t0x8g",Bci5o5g:["f194v5ow","fk7jm04"],n8qw10:"f1qgg65p",Bdrgwmp:["fk7jm04","f194v5ow"],j6ew2k:["fhgccpy","fjo7pq6"],he4mth:"f32wu9k",Byr4aka:"fu5nqqq",lks7q5:["f13prjl2","f1nl83rv"],Bnan3qt:"f1czftr5",k1dn9:["f1nl83rv","f13prjl2"],Boium3a:["f12k37oa","fdnykm2"],tm8e47:"fr96u23"},small:{Bw81rd7:0,kdpuga:0,dm238s:0,B6xbmo0:0,B3whbx2:"fazmxh"},medium:{},large:{Bw81rd7:0,kdpuga:0,dm238s:0,B6xbmo0:0,B3whbx2:"f1b6alqh"}},{d:[[".f1062rbf[data-fui-focus-visible]{border-radius:var(--borderRadiusCircular);}",{p:-1}],[".fj0ryk1[data-fui-focus-visible]{border-radius:var(--borderRadiusNone);}",{p:-1}],".f17t0x8g[data-fui-focus-visible]{border-top-color:var(--colorStrokeFocus2);}",".f194v5ow[data-fui-focus-visible]{border-right-color:var(--colorStrokeFocus2);}",".fk7jm04[data-fui-focus-visible]{border-left-color:var(--colorStrokeFocus2);}",".f1qgg65p[data-fui-focus-visible]{border-bottom-color:var(--colorStrokeFocus2);}",".fhgccpy[data-fui-focus-visible]{box-shadow:var(--shadow2),0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset,0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;}",".fjo7pq6[data-fui-focus-visible]{box-shadow:var(--shadow2),0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset,0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;}",".f32wu9k[data-fui-focus-visible]:hover{box-shadow:var(--shadow2),0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset;}",".fu5nqqq[data-fui-focus-visible]:hover{border-top-color:var(--colorStrokeFocus2);}",".f13prjl2[data-fui-focus-visible]:hover{border-right-color:var(--colorStrokeFocus2);}",".f1nl83rv[data-fui-focus-visible]:hover{border-left-color:var(--colorStrokeFocus2);}",".f1czftr5[data-fui-focus-visible]:hover{border-bottom-color:var(--colorStrokeFocus2);}",[".fazmxh[data-fui-focus-visible]{border-radius:var(--borderRadiusSmall);}",{p:-1}],[".f1b6alqh[data-fui-focus-visible]{border-radius:var(--borderRadiusLarge);}",{p:-1}]],t:["@supports (-moz-appearance:button){.f12k37oa[data-fui-focus-visible]{box-shadow:var(--shadow2),0 0 0 calc(var(--strokeWidthThin) + 0.25px) var(--colorStrokeFocus2) inset,0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;}.fdnykm2[data-fui-focus-visible]{box-shadow:var(--shadow2),0 0 0 calc(var(--strokeWidthThin) + 0.25px) var(--colorStrokeFocus2) inset,0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;}}","@supports (-moz-appearance:button){.fr96u23[data-fui-focus-visible]:hover{box-shadow:var(--shadow2),0 0 0 calc(var(--strokeWidthThin) + 0.25px) var(--colorStrokeFocus2) inset;}}"]}),Ut=ye({small:{Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"fu97m5z",Bf4jedk:"f17fgpbq",B2u0y6b:"f1jt17bm"},medium:{Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f18ktai2",Bf4jedk:"fwbmr0d",B2u0y6b:"f44c6la"},large:{Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1hbd1aw",Bf4jedk:"f12clzc2",B2u0y6b:"fjy1crr"}},{d:[[".fu97m5z{padding:1px;}",{p:-1}],".f17fgpbq{min-width:24px;}",".f1jt17bm{max-width:24px;}",[".f18ktai2{padding:5px;}",{p:-1}],".fwbmr0d{min-width:32px;}",".f44c6la{max-width:32px;}",[".f1hbd1aw{padding:7px;}",{p:-1}],".f12clzc2{min-width:40px;}",".fjy1crr{max-width:40px;}"]}),Wt=ye({small:{Be2twd7:"fe5j1ua",Bqenvij:"fjamq6b",a9b677:"f64fuq3",Bqrlyyl:"fbaiahx"},medium:{},large:{Be2twd7:"f1rt2boy",Bqenvij:"frvgh55",a9b677:"fq4mcun",Bqrlyyl:"f1exjqw5"},before:{t21cq0:["f1nizpg2","f1a695kz"]},after:{Frg6f3:["f1a695kz","f1nizpg2"]}},{d:[".fe5j1ua{font-size:20px;}",".fjamq6b{height:20px;}",".f64fuq3{width:20px;}",".fbaiahx{--fui-Button__icon--spacing:var(--spacingHorizontalXS);}",".f1rt2boy{font-size:24px;}",".frvgh55{height:24px;}",".fq4mcun{width:24px;}",".f1exjqw5{--fui-Button__icon--spacing:var(--spacingHorizontalSNudge);}",".f1nizpg2{margin-right:var(--fui-Button__icon--spacing);}",".f1a695kz{margin-left:var(--fui-Button__icon--spacing);}"]}),Vt=o.forwardRef((e,t)=>{const r=((e,t)=>{const{size:r}=null!==(n=o.useContext(Nt))&&void 0!==n?n:zt;var n;const{appearance:i="secondary",as:a="button",disabled:s=!1,disabledFocusable:c=!1,icon:l,iconPosition:d="before",shape:u="rounded",size:f=(null!=r?r:"medium")}=e,h=z(l,{elementType:"span"});return{appearance:i,disabled:s,disabledFocusable:c,iconPosition:d,shape:u,size:f,iconOnly:Boolean((null==h?void 0:h.children)&&!e.children),components:{root:"button",icon:"span"},root:N(qe(a,Pt(e.as,e)),{elementType:"button",defaultProps:{ref:t,type:"button"===a?"button":void 0}}),icon:h}})(e,t);return(e=>{const t=Mt(),r=Ft(),o=Dt(),n=Lt(),i=Ht(),a=Ut(),s=Wt(),{appearance:c,disabled:l,disabledFocusable:d,icon:u,iconOnly:f,iconPosition:h,shape:p,size:g}=e;e.root.className=Z("fui-Button",t,c&&o[c],o[g],u&&"small"===g&&o.smallWithIcon,u&&"large"===g&&o.largeWithIcon,o[p],(l||d)&&n.base,(l||d)&&n.highContrast,c&&(l||d)&&n[c],"primary"===c&&i.primary,i[g],i[p],f&&a[g],e.root.className),e.icon&&(e.icon.className=Z("fui-Button__icon",r,!!e.root.children&&s[h],s[g],e.icon.className))})(r),Je("useButtonStyles_unstable")(r),(e=>{const{iconOnly:t,iconPosition:r}=e;return We(e.root,{children:["after"!==r&&e.icon&&Ue(e.icon,{}),!t&&e.root.children,"after"===r&&e.icon&&Ue(e.icon,{})]})})(r)});Vt.displayName="Button";const $t=Ce("Ribbon24Regular","24",["M12 2a7 7 0 0 1 5 11.9v7.35c0 .57-.6.92-1.1.67l-.08-.06L12 19.18l-3.82 2.68a.75.75 0 0 1-1.17-.5v-.11L7 13.9A7 7 0 0 1 12 2Zm3.5 17.8v-4.74a6.97 6.97 0 0 1-7 0v4.74l3.07-2.15a.75.75 0 0 1 .76-.06l.1.06 3.07 2.16v-4.75 4.75ZM12 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11Z"]),Kt=Ce("LockOpen24Regular","24",["M16 5a2.5 2.5 0 0 1 5 0v.25a.75.75 0 0 0 1.5 0V5a4 4 0 0 0-8 0v2H7.25A3.25 3.25 0 0 0 4 10.25v7.5C4 19.55 5.46 21 7.25 21h9.5c1.8 0 3.25-1.46 3.25-3.25v-7.5C20 8.45 18.54 7 16.75 7H16V5ZM7.25 8.5h9.5c.97 0 1.75.78 1.75 1.75v7.5c0 .97-.78 1.75-1.75 1.75h-9.5c-.97 0-1.75-.78-1.75-1.75v-7.5c0-.97.78-1.75 1.75-1.75Zm4.75 7a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"]),Gt=Ce("DesignIdeas24Regular","24",["M6 2.75a.75.75 0 0 0-1.22-.59 8.1 8.1 0 0 0-2.4 2.77A3.96 3.96 0 0 0 2 6.75c0 .95.48 1.78 1.2 2.27-.19.16-.36.36-.5.6-.48.77-.7 1.94-.7 3.63 0 1.72.23 3.77.6 5.41.2.82.42 1.57.7 2.14a3 3 0 0 0 .5.77c.21.21.53.43.95.43.42 0 .74-.22.94-.43a3 3 0 0 0 .51-.77c.28-.57.5-1.32.7-2.14.37-1.64.6-3.7.6-5.4 0-1.7-.22-2.87-.7-3.64a2.44 2.44 0 0 0-.5-.6c.72-.49 1.2-1.32 1.2-2.27 0-.93-.44-1.57-.77-2.07l-.03-.04C6.31 4.06 6 3.58 6 2.75Zm-2.5 4c0-.3 0-.67.24-1.18.17-.36.47-.82 1.01-1.37.2.52.47.92.7 1.26v.02C5.83 6 6 6.3 6 6.75a1.25 1.25 0 0 1-2.5 0Zm0 6.5c0-1.62.23-2.44.47-2.84a.79.79 0 0 1 .33-.32c.1-.05.25-.09.45-.09s.34.04.45.09c.1.05.21.13.33.32.24.4.47 1.22.47 2.84 0 1.6-.22 3.55-.57 5.08a8.91 8.91 0 0 1-.68 2 8.91 8.91 0 0 1-.68-2 24.56 24.56 0 0 1-.57-5.08Zm4.98.83c.48.2.99.34 1.52.4v-2.23C10 10.45 11.46 9 13.25 9h2.23a5 5 0 0 0-7.35-3.9c-.18-.4-.39-.71-.55-.94l-.05-.08-.18-.27A6.5 6.5 0 0 1 16.98 9h1.77c1.8 0 3.25 1.46 3.25 3.25v5.5c0 1.8-1.46 3.25-3.25 3.25h-5.5A3.25 3.25 0 0 1 10 17.75v-1.77a6.47 6.47 0 0 1-1.62-.33c.05-.53.09-1.06.1-1.57Zm10.27-3.58h-1.83a6.5 6.5 0 0 1-5.42 5.42v1.83c0 .97.78 1.75 1.75 1.75h5.5c.97 0 1.75-.78 1.75-1.75v-5.5c0-.97-.78-1.75-1.75-1.75Zm-7.25 3.9a5 5 0 0 0 3.9-3.9h-2.15c-.97 0-1.75.78-1.75 1.75v2.15Z"]),Jt={LIBRARY_NAME:"MSAL.JS",SKU:"msal.js.common",DEFAULT_AUTHORITY:"https://login.microsoftonline.com/common/",DEFAULT_AUTHORITY_HOST:"login.microsoftonline.com",DEFAULT_COMMON_TENANT:"common",ADFS:"adfs",DSTS:"dstsv2",AAD_INSTANCE_DISCOVERY_ENDPT:"https://login.microsoftonline.com/common/discovery/instance?api-version=1.1&authorization_endpoint=",CIAM_AUTH_URL:".ciamlogin.com",AAD_TENANT_DOMAIN_SUFFIX:".onmicrosoft.com",RESOURCE_DELIM:"|",NO_ACCOUNT:"NO_ACCOUNT",CLAIMS:"claims",CONSUMER_UTID:"9188040d-6c67-4c5b-b112-36a304b66dad",OPENID_SCOPE:"openid",PROFILE_SCOPE:"profile",OFFLINE_ACCESS_SCOPE:"offline_access",EMAIL_SCOPE:"email",CODE_GRANT_TYPE:"authorization_code",RT_GRANT_TYPE:"refresh_token",S256_CODE_CHALLENGE_METHOD:"S256",URL_FORM_CONTENT_TYPE:"application/x-www-form-urlencoded;charset=utf-8",AUTHORIZATION_PENDING:"authorization_pending",NOT_DEFINED:"not_defined",EMPTY_STRING:"",NOT_APPLICABLE:"N/A",NOT_AVAILABLE:"Not Available",FORWARD_SLASH:"/",IMDS_ENDPOINT:"http://169.254.169.254/metadata/instance/compute/location",IMDS_VERSION:"2020-06-01",IMDS_TIMEOUT:2e3,AZURE_REGION_AUTO_DISCOVER_FLAG:"TryAutoDetect",REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX:"login.microsoft.com",KNOWN_PUBLIC_CLOUDS:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"],SHR_NONCE_VALIDITY:240,INVALID_INSTANCE:"invalid_instance"},Qt="POST",Xt=[Jt.OPENID_SCOPE,Jt.PROFILE_SCOPE,Jt.OFFLINE_ACCESS_SCOPE],Yt=[...Xt,Jt.EMAIL_SCOPE],Zt="Content-Type",er="Retry-After",tr="X-AnchorMailbox",rr="x-ms-request-id",or="x-ms-httpver",nr="active-account-filters",ir="common",ar="organizations",sr="consumers",cr="access_token",lr="xms_cc",dr="login",ur="consent",fr="none",hr="code",pr="query",gr="Generic",mr={ID_TOKEN:"IdToken",ACCESS_TOKEN:"AccessToken",ACCESS_TOKEN_WITH_AUTH_SCHEME:"AccessToken_With_AuthScheme",REFRESH_TOKEN:"RefreshToken"},vr="appmetadata",br="1",yr="authority-metadata",wr="config",kr="cache",Cr="network",Tr="hardcoded_values",xr={SCHEMA_VERSION:5,MAX_LAST_HEADER_BYTES:330,MAX_CACHED_ERRORS:50,CACHE_KEY:"server-telemetry",CATEGORY_SEPARATOR:"|",VALUE_SEPARATOR:",",OVERFLOW_TRUE:"1",OVERFLOW_FALSE:"0",UNKNOWN_ERROR:"unknown_error"},Sr={BEARER:"Bearer",POP:"pop",SSH:"ssh-cert"},Ir="throttling";var _r;!function(e){e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Info=2]="Info",e[e.Verbose=3]="Verbose",e[e.Trace=4]="Trace"}(_r||(_r={}));class Er{constructor(e,t,r){this.level=_r.Info;const o=e||Er.createDefaultLoggerOptions();this.localCallback=o.loggerCallback||(()=>{}),this.piiLoggingEnabled=o.piiLoggingEnabled||!1,this.level="number"==typeof o.logLevel?o.logLevel:_r.Info,this.correlationId=o.correlationId||Jt.EMPTY_STRING,this.packageName=t||Jt.EMPTY_STRING,this.packageVersion=r||Jt.EMPTY_STRING}static createDefaultLoggerOptions(){return{loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:_r.Info}}clone(e,t,r){return new Er({loggerCallback:this.localCallback,piiLoggingEnabled:this.piiLoggingEnabled,logLevel:this.level,correlationId:r||this.correlationId},e,t)}logMessage(e,t){if(t.logLevel>this.level||!this.piiLoggingEnabled&&t.containsPii)return;const r=`[${(new Date).toUTCString()}] : [${t.correlationId||this.correlationId||""}] : ${this.packageName}@${this.packageVersion} : ${_r[t.logLevel]} - ${e}`;this.executeCallback(t.logLevel,r,t.containsPii||!1)}executeCallback(e,t,r){this.localCallback&&this.localCallback(e,t,r)}error(e,t){this.logMessage(e,{logLevel:_r.Error,containsPii:!1,correlationId:t||Jt.EMPTY_STRING})}errorPii(e,t){this.logMessage(e,{logLevel:_r.Error,containsPii:!0,correlationId:t||Jt.EMPTY_STRING})}warning(e,t){this.logMessage(e,{logLevel:_r.Warning,containsPii:!1,correlationId:t||Jt.EMPTY_STRING})}warningPii(e,t){this.logMessage(e,{logLevel:_r.Warning,containsPii:!0,correlationId:t||Jt.EMPTY_STRING})}info(e,t){this.logMessage(e,{logLevel:_r.Info,containsPii:!1,correlationId:t||Jt.EMPTY_STRING})}infoPii(e,t){this.logMessage(e,{logLevel:_r.Info,containsPii:!0,correlationId:t||Jt.EMPTY_STRING})}verbose(e,t){this.logMessage(e,{logLevel:_r.Verbose,containsPii:!1,correlationId:t||Jt.EMPTY_STRING})}verbosePii(e,t){this.logMessage(e,{logLevel:_r.Verbose,containsPii:!0,correlationId:t||Jt.EMPTY_STRING})}trace(e,t){this.logMessage(e,{logLevel:_r.Trace,containsPii:!1,correlationId:t||Jt.EMPTY_STRING})}tracePii(e,t){this.logMessage(e,{logLevel:_r.Trace,containsPii:!0,correlationId:t||Jt.EMPTY_STRING})}isPiiLoggingEnabled(){return this.piiLoggingEnabled||!1}}const Ar="OIDC",Br="EAR",Or="none",Rr="unexpected_error",jr="post_request_failed",Pr={[Rr]:"Unexpected error in authentication.",[jr]:"Post request failed from the network, could be a 4xx/5xx or a network unavailability. Please check the exact error code for details."};class Nr extends Error{constructor(e,t,r){super(t?`${e}: ${t}`:e),Object.setPrototypeOf(this,Nr.prototype),this.errorCode=e||Jt.EMPTY_STRING,this.errorMessage=t||Jt.EMPTY_STRING,this.subError=r||Jt.EMPTY_STRING,this.name="AuthError"}setCorrelationId(e){this.correlationId=e}}function zr(e,t){return new Nr(e,t?`${Pr[e]} ${t}`:Pr[e])}const qr="client_info_decoding_error",Mr="client_info_empty_error",Fr="token_parsing_error",Dr="null_or_empty_token",Lr="endpoints_resolution_error",Hr="network_error",Ur="openid_config_error",Wr="hash_not_deserialized",Vr="invalid_state",$r="state_mismatch",Kr="state_not_found",Gr="nonce_mismatch",Jr="auth_time_not_found",Qr="max_age_transpired",Xr="multiple_matching_tokens",Yr="multiple_matching_accounts",Zr="multiple_matching_appMetadata",eo="request_cannot_be_made",to="cannot_remove_empty_scope",ro="cannot_append_scopeset",oo="empty_input_scopeset",no="device_code_polling_cancelled",io="device_code_expired",ao="device_code_unknown_error",so="no_account_in_silent_request",co="invalid_cache_record",lo="invalid_cache_environment",uo="no_account_found",fo="no_crypto_object",ho="unexpected_credential_type",po="invalid_assertion",go="invalid_client_credential",mo="token_refresh_required",vo="user_timeout_reached",bo="token_claims_cnf_required_for_signedjwt",yo="authorization_code_missing_from_server_response",wo="binding_key_not_removed",ko="end_session_endpoint_not_supported",Co="key_id_missing",To="no_network_connectivity",xo="user_canceled",So="missing_tenant_id_error",Io="method_not_implemented",_o="nested_app_auth_bridge_disabled",Eo={[qr]:"The client info could not be parsed/decoded correctly",[Mr]:"The client info was empty",[Fr]:"Token cannot be parsed",[Dr]:"The token is null or empty",[Lr]:"Endpoints cannot be resolved",[Hr]:"Network request failed",[Ur]:"Could not retrieve endpoints. Check your authority and verify the .well-known/openid-configuration endpoint returns the required endpoints.",[Wr]:"The hash parameters could not be deserialized",[Vr]:"State was not the expected format",[$r]:"State mismatch error",[Kr]:"State not found",[Gr]:"Nonce mismatch error",[Jr]:"Max Age was requested and the ID token is missing the auth_time variable. auth_time is an optional claim and is not enabled by default - it must be enabled. See https://aka.ms/msaljs/optional-claims for more information.",[Qr]:"Max Age is set to 0, or too much time has elapsed since the last end-user authentication.",[Xr]:"The cache contains multiple tokens satisfying the requirements. Call AcquireToken again providing more requirements such as authority or account.",[Yr]:"The cache contains multiple accounts satisfying the given parameters. Please pass more info to obtain the correct account",[Zr]:"The cache contains multiple appMetadata satisfying the given parameters. Please pass more info to obtain the correct appMetadata",[eo]:"Token request cannot be made without authorization code or refresh token.",[to]:"Cannot remove null or empty scope from ScopeSet",[ro]:"Cannot append ScopeSet",[oo]:"Empty input ScopeSet cannot be processed",[no]:"Caller has cancelled token endpoint polling during device code flow by setting DeviceCodeRequest.cancel = true.",[io]:"Device code is expired.",[ao]:"Device code stopped polling for unknown reasons.",[so]:"Please pass an account object, silent flow is not supported without account information",[co]:"Cache record object was null or undefined.",[lo]:"Invalid environment when attempting to create cache entry",[uo]:"No account found in cache for given key.",[fo]:"No crypto object detected.",[ho]:"Unexpected credential type.",[po]:"Client assertion must meet requirements described in https://tools.ietf.org/html/rfc7515",[go]:"Client credential (secret, certificate, or assertion) must not be empty when creating a confidential client. An application should at most have one credential",[mo]:"Cannot return token from cache because it must be refreshed. This may be due to one of the following reasons: forceRefresh parameter is set to true, claims have been requested, there is no cached access token or it is expired.",[vo]:"User defined timeout for device code polling reached",[bo]:"Cannot generate a POP jwt if the token_claims are not populated",[yo]:"Server response does not contain an authorization code to proceed",[wo]:"Could not remove the credential's binding key from storage.",[ko]:"The provided authority does not support logout",[Co]:"A keyId value is missing from the requested bound token's cache record and is required to match the token to it's stored binding key.",[To]:"No network connectivity. Check your internet connection.",[xo]:"User cancelled the flow.",[So]:"A tenant id - not common, organizations, or consumers - must be specified when using the client_credentials flow.",[Io]:"This method has not been implemented",[_o]:"The nested app auth bridge is disabled"};class Ao extends Nr{constructor(e,t){super(e,t?`${Eo[e]}: ${t}`:Eo[e]),this.name="ClientAuthError",Object.setPrototypeOf(this,Ao.prototype)}}function Bo(e,t){return new Ao(e,t)}const Oo={createNewGuid:()=>{throw Bo(Io)},base64Decode:()=>{throw Bo(Io)},base64Encode:()=>{throw Bo(Io)},base64UrlEncode:()=>{throw Bo(Io)},encodeKid:()=>{throw Bo(Io)},async getPublicKeyThumbprint(){throw Bo(Io)},async removeTokenBindingKey(){throw Bo(Io)},async clearKeystore(){throw Bo(Io)},async signJwt(){throw Bo(Io)},async hashString(){throw Bo(Io)}},Ro="@azure/msal-common",jo="15.12.0",Po="redirect_uri_empty",No="claims_request_parsing_error",zo="authority_uri_insecure",qo="url_parse_error",Mo="empty_url_error",Fo="empty_input_scopes_error",Do="invalid_claims",Lo="token_request_empty",Ho="logout_request_empty",Uo="invalid_code_challenge_method",Wo="pkce_params_missing",Vo="invalid_cloud_discovery_metadata",$o="invalid_authority_metadata",Ko="untrusted_authority",Go="missing_ssh_jwk",Jo="missing_ssh_kid",Qo="missing_nonce_authentication_header",Xo="invalid_authentication_header",Yo="cannot_set_OIDCOptions",Zo="cannot_allow_platform_broker",en="authority_mismatch",tn="invalid_request_method_for_EAR",rn="invalid_authorize_post_body_parameters",on={[Po]:"A redirect URI is required for all calls, and none has been set.",[No]:"Could not parse the given claims request object.",[zo]:"Authority URIs must use https. Please see here for valid authority configuration options: https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-js-initializing-client-applications#configuration-options",[qo]:"URL could not be parsed into appropriate segments.",[Mo]:"URL was empty or null.",[Fo]:"Scopes cannot be passed as null, undefined or empty array because they are required to obtain an access token.",[Do]:"Given claims parameter must be a stringified JSON object.",[Lo]:"Token request was empty and not found in cache.",[Ho]:"The logout request was null or undefined.",[Uo]:'code_challenge_method passed is invalid. Valid values are "plain" and "S256".',[Wo]:"Both params: code_challenge and code_challenge_method are to be passed if to be sent in the request",[Vo]:"Invalid cloudDiscoveryMetadata provided. Must be a stringified JSON object containing tenant_discovery_endpoint and metadata fields",[$o]:"Invalid authorityMetadata provided. Must by a stringified JSON object containing authorization_endpoint, token_endpoint, issuer fields.",[Ko]:"The provided authority is not a trusted authority. Please include this authority in the knownAuthorities config parameter.",[Go]:"Missing sshJwk in SSH certificate request. A stringified JSON Web Key is required when using the SSH authentication scheme.",[Jo]:"Missing sshKid in SSH certificate request. A string that uniquely identifies the public SSH key is required when using the SSH authentication scheme.",[Qo]:"Unable to find an authentication header containing server nonce. Either the Authentication-Info or WWW-Authenticate headers must be present in order to obtain a server nonce.",[Xo]:"Invalid authentication header provided",[Yo]:"Cannot set OIDCOptions parameter. Please change the protocol mode to OIDC or use a non-Microsoft authority.",[Zo]:"Cannot set allowPlatformBroker parameter to true when not in AAD protocol mode.",[en]:"Authority mismatch error. Authority provided in login request or PublicClientApplication config does not match the environment of the provided account. Please use a matching account or make an interactive request to login to this authority.",[rn]:"Invalid authorize post body parameters provided. If you are using authorizePostBodyParameters, the request method must be POST. Please check the request method and parameters.",[tn]:"Invalid request method for EAR protocol mode. The request method cannot be GET when using EAR protocol mode. Please change the request method to POST."};class nn extends Nr{constructor(e){super(e,on[e]),this.name="ClientConfigurationError",Object.setPrototypeOf(this,nn.prototype)}}function an(e){return new nn(e)}class sn{static isEmptyObj(e){if(e)try{const t=JSON.parse(e);return 0===Object.keys(t).length}catch(e){}return!0}static startsWith(e,t){return 0===e.indexOf(t)}static endsWith(e,t){return e.length>=t.length&&e.lastIndexOf(t)===e.length-t.length}static queryStringToObject(e){const t={},r=e.split("&"),o=e=>decodeURIComponent(e.replace(/\+/g," "));return r.forEach(e=>{if(e.trim()){const[r,n]=e.split(/=(.+)/g,2);r&&n&&(t[o(r)]=o(n))}}),t}static trimArrayEntries(e){return e.map(e=>e.trim())}static removeEmptyStringsFromArray(e){return e.filter(e=>!!e)}static jsonParseHelper(e){try{return JSON.parse(e)}catch(e){return null}}static matchPattern(e,t){return new RegExp(e.replace(/\\/g,"\\\\").replace(/\*/g,"[^ ]*").replace(/\?/g,"\\?")).test(t)}}class cn{constructor(e){const t=e?sn.trimArrayEntries([...e]):[],r=t?sn.removeEmptyStringsFromArray(t):[];if(!r||!r.length)throw an(Fo);this.scopes=new Set,r.forEach(e=>this.scopes.add(e))}static fromString(e){const t=(e||Jt.EMPTY_STRING).split(" ");return new cn(t)}static createSearchScopes(e){const t=e&&e.length>0?e:[...Xt],r=new cn(t);return r.containsOnlyOIDCScopes()?r.removeScope(Jt.OFFLINE_ACCESS_SCOPE):r.removeOIDCScopes(),r}containsScope(e){const t=this.printScopesLowerCase().split(" "),r=new cn(t);return!!e&&r.scopes.has(e.toLowerCase())}containsScopeSet(e){return!(!e||e.scopes.size<=0)&&this.scopes.size>=e.scopes.size&&e.asArray().every(e=>this.containsScope(e))}containsOnlyOIDCScopes(){let e=0;return Yt.forEach(t=>{this.containsScope(t)&&(e+=1)}),this.scopes.size===e}appendScope(e){e&&this.scopes.add(e.trim())}appendScopes(e){try{e.forEach(e=>this.appendScope(e))}catch(e){throw Bo(ro)}}removeScope(e){if(!e)throw Bo(to);this.scopes.delete(e.trim())}removeOIDCScopes(){Yt.forEach(e=>{this.scopes.delete(e)})}unionScopeSets(e){if(!e)throw Bo(oo);const t=new Set;return e.scopes.forEach(e=>t.add(e.toLowerCase())),this.scopes.forEach(e=>t.add(e.toLowerCase())),t}intersectingScopeSets(e){if(!e)throw Bo(oo);e.containsOnlyOIDCScopes()||e.removeOIDCScopes();const t=this.unionScopeSets(e),r=e.getScopeCount(),o=this.getScopeCount();return t.sizee.push(t)),e}printScopes(){return this.scopes?this.asArray().join(" "):Jt.EMPTY_STRING}printScopesLowerCase(){return this.printScopes().toLowerCase()}}function ln(e,t){return!!e&&!!t&&e===t.split(".")[1]}function dn(e,t,r,o){if(o){const{oid:t,sub:r,tid:n,name:i,tfp:a,acr:s,preferred_username:c,upn:l,login_hint:d}=o,u=n||a||s||"";return{tenantId:u,localAccountId:t||r||"",name:i,username:c||l||"",loginHint:d,isHomeTenant:ln(u,e)}}return{tenantId:r,localAccountId:t,username:"",isHomeTenant:ln(r,e)}}function un(e,t,r,o){let n=e;if(t){const{isHomeTenant:r,...o}=t;n={...e,...o}}if(r){const{isHomeTenant:t,...i}=dn(e.homeAccountId,e.localAccountId,e.tenantId,r);return n={...n,...i,idTokenClaims:r,idToken:o},n}return n}function fn(e,t){const r=function(e){if(!e)throw Bo(Dr);const t=/^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);if(!t||t.length<4)throw Bo(Fr);return t[2]}(e);try{const e=t(r);return JSON.parse(e)}catch(e){throw Bo(Fr)}}function hn(e,t){if(0===t||Date.now()-3e5>e+t)throw Bo(Qr)}function pn(e){if(!e)return e;let t=e.toLowerCase();return sn.endsWith(t,"?")?t=t.slice(0,-1):sn.endsWith(t,"?/")&&(t=t.slice(0,-2)),sn.endsWith(t,"/")||(t+="/"),t}function gn(e){return e.startsWith("#/")?e.substring(2):e.startsWith("#")||e.startsWith("?")?e.substring(1):e}function mn(e){if(!e||e.indexOf("=")<0)return null;try{const t=gn(e),r=Object.fromEntries(new URLSearchParams(t));if(r.code||r.ear_jwe||r.error||r.error_description||r.state)return r}catch(e){throw Bo(Wr)}return null}function vn(e,t=!0,r){const o=new Array;return e.forEach((e,n)=>{!t&&r&&n in r?o.push(`${n}=${e}`):o.push(`${n}=${encodeURIComponent(e)}`)}),o.join("&")}function bn(e){if(!e)return e;const t=e.split("#")[0];try{const e=new URL(t);return pn(e.origin+e.pathname+e.search)}catch(e){return pn(t)}}class yn{get urlString(){return this._urlString}constructor(e){if(this._urlString=e,!this._urlString)throw an(Mo);e.includes("#")||(this._urlString=yn.canonicalizeUri(e))}static canonicalizeUri(e){if(e){let t=e.toLowerCase();return sn.endsWith(t,"?")?t=t.slice(0,-1):sn.endsWith(t,"?/")&&(t=t.slice(0,-2)),sn.endsWith(t,"/")||(t+="/"),t}return e}validateAsUri(){let e;try{e=this.getUrlComponents()}catch(e){throw an(qo)}if(!e.HostNameAndPort||!e.PathSegments)throw an(qo);if(!e.Protocol||"https:"!==e.Protocol.toLowerCase())throw an(zo)}static appendQueryString(e,t){return t?e.indexOf("?")<0?`${e}?${t}`:`${e}&${t}`:e}static removeHashFromUrl(e){return yn.canonicalizeUri(e.split("#")[0])}replaceTenantPath(e){const t=this.getUrlComponents(),r=t.PathSegments;return!e||0===r.length||r[0]!==ir&&r[0]!==ar||(r[0]=e),yn.constructAuthorityUriFromObject(t)}getUrlComponents(){const e=RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"),t=this.urlString.match(e);if(!t)throw an(qo);const r={Protocol:t[1],HostNameAndPort:t[4],AbsolutePath:t[5],QueryString:t[7]};let o=r.AbsolutePath.split("/");return o=o.filter(e=>e&&e.length>0),r.PathSegments=o,r.QueryString&&r.QueryString.endsWith("/")&&(r.QueryString=r.QueryString.substring(0,r.QueryString.length-1)),r}static getDomainFromUrl(e){const t=RegExp("^([^:/?#]+://)?([^/?#]*)"),r=e.match(t);if(!r)throw an(qo);return r[2]}static getAbsoluteUrl(e,t){if(e[0]===Jt.FORWARD_SLASH){const r=new yn(t).getUrlComponents();return r.Protocol+"//"+r.HostNameAndPort+e}return e}static constructAuthorityUriFromObject(e){return new yn(e.Protocol+"//"+e.HostNameAndPort+"/"+e.PathSegments.join("/"))}static hashContainsKnownProperties(e){return!!mn(e)}}const wn={"login.microsoftonline.com":{token_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.com/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.com/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/logout"},"login.chinacloudapi.cn":{token_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.chinacloudapi.cn/{tenantid}/discovery/v2.0/keys",issuer:"https://login.partner.microsoftonline.cn/{tenantid}/v2.0",authorization_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.chinacloudapi.cn/{tenantid}/oauth2/v2.0/logout"},"login.microsoftonline.us":{token_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/token",jwks_uri:"https://login.microsoftonline.us/{tenantid}/discovery/v2.0/keys",issuer:"https://login.microsoftonline.us/{tenantid}/v2.0",authorization_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/authorize",end_session_endpoint:"https://login.microsoftonline.us/{tenantid}/oauth2/v2.0/logout"}},kn={metadata:[{preferred_network:"login.microsoftonline.com",preferred_cache:"login.windows.net",aliases:["login.microsoftonline.com","login.windows.net","login.microsoft.com","sts.windows.net"]},{preferred_network:"login.partner.microsoftonline.cn",preferred_cache:"login.partner.microsoftonline.cn",aliases:["login.partner.microsoftonline.cn","login.chinacloudapi.cn"]},{preferred_network:"login.microsoftonline.de",preferred_cache:"login.microsoftonline.de",aliases:["login.microsoftonline.de"]},{preferred_network:"login.microsoftonline.us",preferred_cache:"login.microsoftonline.us",aliases:["login.microsoftonline.us","login.usgovcloudapi.net"]},{preferred_network:"login-us.microsoftonline.com",preferred_cache:"login-us.microsoftonline.com",aliases:["login-us.microsoftonline.com"]}]},Cn=new Set;function Tn(e,t,r,o){if(o?.trace(`getAliasesFromMetadata called with source: ${r}`),e&&t){const n=xn(t,e);if(n)return o?.trace(`getAliasesFromMetadata: found cloud discovery metadata in ${r}, returning aliases`),n.aliases;o?.trace(`getAliasesFromMetadata: did not find cloud discovery metadata in ${r}`)}return null}function xn(e,t){for(let r=0;r{e.aliases.forEach(e=>{Cn.add(e)})});const Sn="cache_quota_exceeded",In="cache_error_unknown",_n={[Sn]:"Exceeded cache storage capacity.",[In]:"Unexpected error occurred when using cache storage."};class En extends Nr{constructor(e,t){const r=t||(_n[e]?_n[e]:_n[In]);super(`${e}: ${r}`),Object.setPrototypeOf(this,En.prototype),this.name="CacheError",this.errorCode=e,this.errorMessage=r}}function An(e){return e instanceof Error?"QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name||e.message.includes("exceeded the quota")?new En(Sn):new En(e.name,e.message):new En(In)}class Bn{constructor(e,t,r,o,n){this.clientId=e,this.cryptoImpl=t,this.commonLogger=r.clone(Ro,jo),this.staticAuthorityOptions=n,this.performanceClient=o}getAllAccounts(e,t){return this.buildTenantProfiles(this.getAccountsFilteredBy(e,t),t,e)}getAccountInfoFilteredBy(e,t){if(0===Object.keys(e).length||Object.values(e).every(e=>!e))return this.commonLogger.warning("getAccountInfoFilteredBy: Account filter is empty or invalid, returning null"),null;const r=this.getAllAccounts(e,t);return r.length>1?r.sort(e=>e.idTokenClaims?-1:1)[0]:1===r.length?r[0]:null}getBaseAccountInfo(e,t){const r=this.getAccountsFilteredBy(e,t);return r.length>0?r[0].getAccountInfo():null}buildTenantProfiles(e,t,r){return e.flatMap(e=>this.getTenantProfilesFromAccountEntity(e,t,r?.tenantId,r))}getTenantedAccountInfoByFilter(e,t,r,o,n){let i,a=null;if(n&&!this.tenantProfileMatchesFilter(r,n))return null;const s=this.getIdToken(e,o,t,r.tenantId);return s&&(i=fn(s.secret,this.cryptoImpl.base64Decode),!this.idTokenClaimsMatchTenantProfileFilter(i,n))?null:(a=un(e,r,i,s?.secret),a)}getTenantProfilesFromAccountEntity(e,t,r,o){const n=e.getAccountInfo();let i=n.tenantProfiles||new Map;const a=this.getTokenKeys();if(r){const e=i.get(r);if(!e)return[];i=new Map([[r,e]])}const s=[];return i.forEach(e=>{const r=this.getTenantedAccountInfoByFilter(n,a,e,t,o);r&&s.push(r)}),s}tenantProfileMatchesFilter(e,t){return!(t.localAccountId&&!this.matchLocalAccountIdFromTenantProfile(e,t.localAccountId)||t.name&&e.name!==t.name||void 0!==t.isHomeTenant&&e.isHomeTenant!==t.isHomeTenant)}idTokenClaimsMatchTenantProfileFilter(e,t){if(t){if(t.localAccountId&&!this.matchLocalAccountIdFromTokenClaims(e,t.localAccountId))return!1;if(t.loginHint&&!this.matchLoginHintFromTokenClaims(e,t.loginHint))return!1;if(t.username&&!this.matchUsername(e.preferred_username,t.username))return!1;if(t.name&&!this.matchName(e,t.name))return!1;if(t.sid&&!this.matchSid(e,t.sid))return!1}return!0}async saveCacheRecord(e,t,r){if(!e)throw Bo(co);try{e.account&&await this.setAccount(e.account,t),e.idToken&&!1!==r?.idToken&&await this.setIdTokenCredential(e.idToken,t),e.accessToken&&!1!==r?.accessToken&&await this.saveAccessToken(e.accessToken,t),e.refreshToken&&!1!==r?.refreshToken&&await this.setRefreshTokenCredential(e.refreshToken,t),e.appMetadata&&this.setAppMetadata(e.appMetadata,t)}catch(e){throw this.commonLogger?.error("CacheManager.saveCacheRecord: failed"),e instanceof Nr?e:An(e)}}async saveAccessToken(e,t){const r={clientId:e.clientId,credentialType:e.credentialType,environment:e.environment,homeAccountId:e.homeAccountId,realm:e.realm,tokenType:e.tokenType,requestedClaimsHash:e.requestedClaimsHash},o=this.getTokenKeys(),n=cn.fromString(e.target);o.accessToken.forEach(e=>{if(!this.accessTokenKeyMatchesFilter(e,r,!1))return;const o=this.getAccessTokenCredential(e,t);o&&this.credentialMatchesFilter(o,r)&&cn.fromString(o.target).intersectingScopeSets(n)&&this.removeAccessToken(e,t)}),await this.setAccessTokenCredential(e,t)}getAccountsFilteredBy(e,t){const r=this.getAccountKeys(),o=[];return r.forEach(r=>{const n=this.getAccount(r,t);if(!n)return;if(e.homeAccountId&&!this.matchHomeAccountId(n,e.homeAccountId))return;if(e.username&&!this.matchUsername(n.username,e.username))return;if(e.environment&&!this.matchEnvironment(n,e.environment))return;if(e.realm&&!this.matchRealm(n,e.realm))return;if(e.nativeAccountId&&!this.matchNativeAccountId(n,e.nativeAccountId))return;if(e.authorityType&&!this.matchAuthorityType(n,e.authorityType))return;const i={localAccountId:e?.localAccountId,name:e?.name},a=n.tenantProfiles?.filter(e=>this.tenantProfileMatchesFilter(e,i));a&&0===a.length||o.push(n)}),o}credentialMatchesFilter(e,t){if(t.clientId&&!this.matchClientId(e,t.clientId))return!1;if(t.userAssertionHash&&!this.matchUserAssertionHash(e,t.userAssertionHash))return!1;if("string"==typeof t.homeAccountId&&!this.matchHomeAccountId(e,t.homeAccountId))return!1;if(t.environment&&!this.matchEnvironment(e,t.environment))return!1;if(t.realm&&!this.matchRealm(e,t.realm))return!1;if(t.credentialType&&!this.matchCredentialType(e,t.credentialType))return!1;if(t.familyId&&!this.matchFamilyId(e,t.familyId))return!1;if(t.target&&!this.matchTarget(e,t.target))return!1;if((t.requestedClaimsHash||e.requestedClaimsHash)&&e.requestedClaimsHash!==t.requestedClaimsHash)return!1;if(e.credentialType===mr.ACCESS_TOKEN_WITH_AUTH_SCHEME){if(t.tokenType&&!this.matchTokenType(e,t.tokenType))return!1;if(t.tokenType===Sr.SSH&&t.keyId&&!this.matchKeyId(e,t.keyId))return!1}return!0}getAppMetadataFilteredBy(e){const t=this.getKeys(),r={};return t.forEach(t=>{if(!this.isAppMetadata(t))return;const o=this.getAppMetadata(t);o&&(e.environment&&!this.matchEnvironment(o,e.environment)||e.clientId&&!this.matchClientId(o,e.clientId)||(r[t]=o))}),r}getAuthorityMetadataByAlias(e){const t=this.getAuthorityMetadataKeys();let r=null;return t.forEach(t=>{if(!this.isAuthorityMetadata(t)||-1===t.indexOf(this.clientId))return;const o=this.getAuthorityMetadata(t);o&&-1!==o.aliases.indexOf(e)&&(r=o)}),r}removeAllAccounts(e){this.getAllAccounts({},e).forEach(t=>{this.removeAccount(t,e)})}removeAccount(e,t){this.removeAccountContext(e,t),this.getAccountKeys().filter(t=>t.includes(e.homeAccountId)&&t.includes(e.environment)).forEach(e=>{this.removeItem(e,t),this.performanceClient.incrementFields({accountsRemoved:1},t)})}removeAccountContext(e,t){const r=this.getTokenKeys(),o=t=>t.includes(e.homeAccountId)&&t.includes(e.environment);r.idToken.filter(o).forEach(e=>{this.removeIdToken(e,t)}),r.accessToken.filter(o).forEach(e=>{this.removeAccessToken(e,t)}),r.refreshToken.filter(o).forEach(e=>{this.removeRefreshToken(e,t)})}removeAccessToken(e,t){const r=this.getAccessTokenCredential(e,t);if(this.removeItem(e,t),this.performanceClient.incrementFields({accessTokensRemoved:1},t),!r||r.credentialType.toLowerCase()!==mr.ACCESS_TOKEN_WITH_AUTH_SCHEME.toLowerCase()||r.tokenType!==Sr.POP)return;const o=r.keyId;o&&this.cryptoImpl.removeTokenBindingKey(o).catch(()=>{this.commonLogger.error(`Failed to remove token binding key ${o}`,t),this.performanceClient?.incrementFields({removeTokenBindingKeyFailure:1},t)})}removeAppMetadata(e){return this.getKeys().forEach(t=>{this.isAppMetadata(t)&&this.removeItem(t,e)}),!0}getIdToken(e,t,r,o,n){this.commonLogger.trace("CacheManager - getIdToken called");const i={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:mr.ID_TOKEN,clientId:this.clientId,realm:o},a=this.getIdTokensByFilter(i,t,r),s=a.size;if(s<1)return this.commonLogger.info("CacheManager:getIdToken - No token found"),null;if(s>1){let r=a;if(!o){const t=new Map;a.forEach((r,o)=>{r.realm===e.tenantId&&t.set(o,r)});const o=t.size;if(o<1)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account but none match account entity tenant id, returning first result"),a.values().next().value;if(1===o)return this.commonLogger.info("CacheManager:getIdToken - Multiple ID tokens found for account, defaulting to home tenant profile"),t.values().next().value;r=t}return this.commonLogger.info("CacheManager:getIdToken - Multiple matching ID tokens found, clearing them"),r.forEach((e,r)=>{this.removeIdToken(r,t)}),n&&t&&n.addFields({multiMatchedID:a.size},t),null}return this.commonLogger.info("CacheManager:getIdToken - Returning ID token"),a.values().next().value}getIdTokensByFilter(e,t,r){const o=r&&r.idToken||this.getTokenKeys().idToken,n=new Map;return o.forEach(r=>{if(!this.idTokenKeyMatchesFilter(r,{clientId:this.clientId,...e}))return;const o=this.getIdTokenCredential(r,t);o&&this.credentialMatchesFilter(o,e)&&n.set(r,o)}),n}idTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.clientId&&-1===r.indexOf(t.clientId.toLowerCase())||t.homeAccountId&&-1===r.indexOf(t.homeAccountId.toLowerCase()))}removeIdToken(e,t){this.removeItem(e,t)}removeRefreshToken(e,t){this.removeItem(e,t)}getAccessToken(e,t,r,o){const n=t.correlationId;this.commonLogger.trace("CacheManager - getAccessToken called",n);const i=cn.createSearchScopes(t.scopes),a=t.authenticationScheme||Sr.BEARER,s=a&&a.toLowerCase()!==Sr.BEARER.toLowerCase()?mr.ACCESS_TOKEN_WITH_AUTH_SCHEME:mr.ACCESS_TOKEN,c={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:s,clientId:this.clientId,realm:o||e.tenantId,target:i,tokenType:a,keyId:t.sshKid,requestedClaimsHash:t.requestedClaimsHash},l=r&&r.accessToken||this.getTokenKeys().accessToken,d=[];l.forEach(e=>{if(this.accessTokenKeyMatchesFilter(e,c,!0)){const t=this.getAccessTokenCredential(e,n);t&&this.credentialMatchesFilter(t,c)&&d.push(t)}});const u=d.length;return u<1?(this.commonLogger.info("CacheManager:getAccessToken - No token found",n),null):u>1?(this.commonLogger.info("CacheManager:getAccessToken - Multiple access tokens found, clearing them",n),d.forEach(e=>{this.removeAccessToken(this.generateCredentialKey(e),n)}),this.performanceClient.addFields({multiMatchedAT:d.length},n),null):(this.commonLogger.info("CacheManager:getAccessToken - Returning access token",n),d[0])}accessTokenKeyMatchesFilter(e,t,r){const o=e.toLowerCase();if(t.clientId&&-1===o.indexOf(t.clientId.toLowerCase()))return!1;if(t.homeAccountId&&-1===o.indexOf(t.homeAccountId.toLowerCase()))return!1;if(t.realm&&-1===o.indexOf(t.realm.toLowerCase()))return!1;if(t.requestedClaimsHash&&-1===o.indexOf(t.requestedClaimsHash.toLowerCase()))return!1;if(t.target){const e=t.target.asArray();for(let t=0;t{if(!this.accessTokenKeyMatchesFilter(r,e,!0))return;const n=this.getAccessTokenCredential(r,t);n&&this.credentialMatchesFilter(n,e)&&o.push(n)}),o}getRefreshToken(e,t,r,o,n){this.commonLogger.trace("CacheManager - getRefreshToken called");const i=t?br:void 0,a={homeAccountId:e.homeAccountId,environment:e.environment,credentialType:mr.REFRESH_TOKEN,clientId:this.clientId,familyId:i},s=o&&o.refreshToken||this.getTokenKeys().refreshToken,c=[];s.forEach(e=>{if(this.refreshTokenKeyMatchesFilter(e,a)){const t=this.getRefreshTokenCredential(e,r);t&&this.credentialMatchesFilter(t,a)&&c.push(t)}});const l=c.length;return l<1?(this.commonLogger.info("CacheManager:getRefreshToken - No refresh token found."),null):(l>1&&n&&r&&n.addFields({multiMatchedRT:l},r),this.commonLogger.info("CacheManager:getRefreshToken - returning refresh token"),c[0])}refreshTokenKeyMatchesFilter(e,t){const r=e.toLowerCase();return!(t.familyId&&-1===r.indexOf(t.familyId.toLowerCase())||!t.familyId&&t.clientId&&-1===r.indexOf(t.clientId.toLowerCase())||t.homeAccountId&&-1===r.indexOf(t.homeAccountId.toLowerCase()))}readAppMetadataFromCache(e){const t={environment:e,clientId:this.clientId},r=this.getAppMetadataFilteredBy(t),o=Object.keys(r).map(e=>r[e]),n=o.length;if(n<1)return null;if(n>1)throw Bo(Zr);return o[0]}isAppMetadataFOCI(e){const t=this.readAppMetadataFromCache(e);return!(!t||t.familyId!==br)}matchHomeAccountId(e,t){return!("string"!=typeof e.homeAccountId||t!==e.homeAccountId)}matchLocalAccountIdFromTokenClaims(e,t){return t===(e.oid||e.sub)}matchLocalAccountIdFromTenantProfile(e,t){return e.localAccountId===t}matchName(e,t){return!(t.toLowerCase()!==e.name?.toLowerCase())}matchUsername(e,t){return!(!e||"string"!=typeof e||t?.toLowerCase()!==e.toLowerCase())}matchUserAssertionHash(e,t){return!(!e.userAssertionHash||t!==e.userAssertionHash)}matchEnvironment(e,t){if(this.staticAuthorityOptions){const r=function(e,t){let r;const o=e.canonicalAuthority;if(o){const n=new yn(o).getUrlComponents().HostNameAndPort;r=Tn(n,e.cloudDiscoveryMetadata?.metadata,wr,t)||Tn(n,kn.metadata,Tr,t)||e.knownAuthorities}return r||[]}(this.staticAuthorityOptions,this.commonLogger);if(r.includes(t)&&r.includes(e.environment))return!0}const r=this.getAuthorityMetadataByAlias(t);return!!(r&&r.aliases.indexOf(e.environment)>-1)}matchCredentialType(e,t){return e.credentialType&&t.toLowerCase()===e.credentialType.toLowerCase()}matchClientId(e,t){return!(!e.clientId||t!==e.clientId)}matchFamilyId(e,t){return!(!e.familyId||t!==e.familyId)}matchRealm(e,t){return!(e.realm?.toLowerCase()!==t.toLowerCase())}matchNativeAccountId(e,t){return!(!e.nativeAccountId||t!==e.nativeAccountId)}matchLoginHintFromTokenClaims(e,t){return e.login_hint===t||e.preferred_username===t||e.upn===t}matchSid(e,t){return e.sid===t}matchAuthorityType(e,t){return!(!e.authorityType||t.toLowerCase()!==e.authorityType.toLowerCase())}matchTarget(e,t){return!(e.credentialType!==mr.ACCESS_TOKEN&&e.credentialType!==mr.ACCESS_TOKEN_WITH_AUTH_SCHEME||!e.target)&&cn.fromString(e.target).containsScopeSet(t)}matchTokenType(e,t){return!(!e.tokenType||e.tokenType!==t)}matchKeyId(e,t){return!(!e.keyId||e.keyId!==t)}isAppMetadata(e){return-1!==e.indexOf(vr)}isAuthorityMetadata(e){return-1!==e.indexOf(yr)}generateAuthorityMetadataCacheKey(e){return`${yr}-${this.clientId}-${e}`}static toObject(e,t){for(const r in t)e[r]=t[r];return e}}class On extends Bn{async setAccount(){throw Bo(Io)}getAccount(){throw Bo(Io)}async setIdTokenCredential(){throw Bo(Io)}getIdTokenCredential(){throw Bo(Io)}async setAccessTokenCredential(){throw Bo(Io)}getAccessTokenCredential(){throw Bo(Io)}async setRefreshTokenCredential(){throw Bo(Io)}getRefreshTokenCredential(){throw Bo(Io)}setAppMetadata(){throw Bo(Io)}getAppMetadata(){throw Bo(Io)}setServerTelemetry(){throw Bo(Io)}getServerTelemetry(){throw Bo(Io)}setAuthorityMetadata(){throw Bo(Io)}getAuthorityMetadata(){throw Bo(Io)}getAuthorityMetadataKeys(){throw Bo(Io)}setThrottlingCache(){throw Bo(Io)}getThrottlingCache(){throw Bo(Io)}removeItem(){throw Bo(Io)}getKeys(){throw Bo(Io)}getAccountKeys(){throw Bo(Io)}getTokenKeys(){throw Bo(Io)}generateCredentialKey(){throw Bo(Io)}generateAccountKey(){throw Bo(Io)}}const Rn="acquireTokenByCode",jn="acquireTokenByRefreshToken",Pn="acquireTokenSilent",Nn="acquireTokenSilentAsync",zn="acquireTokenPopup",qn="acquireTokenRedirect",Mn="cryptoOptsGetPublicKeyThumbprint",Fn="cryptoOptsSignJwt",Dn="silentCacheClientAcquireToken",Ln="silentIframeClientAcquireToken",Hn="silentRefreshClientAcquireToken",Un="ssoSilent",Wn="standardInteractionClientGetDiscoveredAuthority",Vn="nativeInteractionClientAcquireToken",$n="networkClientSendPostRequestAsync",Kn="refreshTokenClientExecutePostToTokenEndpoint",Gn="authorizationCodeClientExecutePostToTokenEndpoint",Jn="refreshTokenClientExecuteTokenRequest",Qn="refreshTokenClientAcquireToken",Xn="refreshTokenClientAcquireTokenWithCachedRefreshToken",Yn="refreshTokenClientAcquireTokenByRefreshToken",Zn="refreshTokenClientCreateTokenRequestBody",ei="acquireTokenFromCache",ti="silentFlowClientAcquireCachedToken",ri="silentFlowClientGenerateResultFromCacheRecord",oi="acquireTokenBySilentIframe",ni="initializeBaseRequest",ii="initializeSilentRequest",ai="initializeClientApplication",si="initializeCache",ci="silentIframeClientTokenHelper",li="silentHandlerInitiateAuthRequest",di="silentHandlerMonitorIframeForHash",ui="silentHandlerLoadFrame",fi="silentHandlerLoadFrameSync",hi="standardInteractionClientCreateAuthCodeClient",pi="standardInteractionClientGetClientConfiguration",gi="standardInteractionClientInitializeAuthorizationRequest",mi="getAuthCodeUrl",vi="handleCodeResponseFromServer",bi="handleCodeResponse",yi="handleResponseEar",wi="handleResponsePlatformBroker",ki="handleResponseCode",Ci="updateTokenEndpointAuthority",Ti="authClientAcquireToken",xi="authClientExecuteTokenRequest",Si="authClientCreateTokenRequestBody",Ii="popTokenGenerateCnf",_i="popTokenGenerateKid",Ei="handleServerTokenResponse",Ai="deserializeResponse",Bi="authorityFactoryCreateDiscoveredInstance",Oi="authorityResolveEndpointsAsync",Ri="authorityGetCloudDiscoveryMetadataFromNetwork",ji="authorityUpdateCloudDiscoveryMetadata",Pi="authorityGetEndpointMetadataFromNetwork",Ni="authorityUpdateEndpointMetadata",zi="authorityUpdateMetadataWithRegionalInformation",qi="regionDiscoveryDetectRegion",Mi="regionDiscoveryGetRegionFromIMDS",Fi="regionDiscoveryGetCurrentVersion",Di="acquireTokenByCodeAsync",Li="handleRedirectPromise",Hi="handleNativeRedirectPromise",Ui="nativeMessageHandlerHandshake",Wi="removeHiddenIframe",Vi="clearTokensAndKeysWithClaims",$i="cacheManagerGetRefreshToken",Ki="importExistingCache",Gi="setUserData",Ji="localStorageUpdated",Qi="generatePkceCodes",Xi="generateCodeVerifier",Yi="generateCodeChallengeFromVerifier",Zi="sha256Digest",ea="getRandomValues",ta="generateHKDF",ra="generateBaseKey",oa="base64Decode",na="urlEncodeArr",ia="encrypt",aa="decrypt",sa="generateEarKey",ca="decryptEarResponse",la=(new Map([[Rn,"ATByCode"],[jn,"ATByRT"],[Pn,"ATS"],[Nn,"ATSAsync"],[zn,"ATPopup"],[qn,"ATRedirect"],[Mn,"CryptoGetPKThumb"],[Fn,"CryptoSignJwt"],[Dn,"SltCacheClientAT"],[Ln,"SltIframeClientAT"],[Hn,"SltRClientAT"],[Un,"SsoSlt"],[Wn,"StdIntClientGetDiscAuth"],["fetchAccountIdWithNativeBroker","FetchAccIdWithNtvBroker"],[Vn,"NtvIntClientAT"],["baseClientCreateTokenRequestHeaders","BaseClientCreateTReqHead"],[$n,"NetClientSendPost"],[Kn,"RTClientExecPost"],[Gn,"AuthCodeClientExecPost"],["brokerHandshake","BrokerHandshake"],["acquireTokenByRefreshTokenInBroker","ATByRTInBroker"],["acquireTokenByBroker","ATByBroker"],[Jn,"RTClientExecTReq"],[Qn,"RTClientAT"],[Xn,"RTClientATWithCachedRT"],[Yn,"RTClientATByRT"],[Zn,"RTClientCreateTReqBody"],[ei,"ATFromCache"],[ti,"SltFlowClientATCached"],[ri,"SltFlowClientGenResFromCache"],[oi,"ATBySltIframe"],[ni,"InitBaseReq"],[ii,"InitSltReq"],[ai,"InitClientApplication"],[si,"InitCache"],[Ki,"importCache"],[Gi,"setUserData"],[Ji,"localStorageUpdated"],[ci,"SIClientTHelper"],[li,"SHandlerInitAuthReq"],[di,"SltHandlerMonitorIframeForHash"],[ui,"SHandlerLoadFrame"],[fi,"SHandlerLoadFrameSync"],[hi,"StdIntClientCreateAuthCodeClient"],[pi,"StdIntClientGetClientConf"],[gi,"StdIntClientInitAuthReq"],[mi,"GetAuthCodeUrl"],[vi,"HandleCodeResFromServer"],[bi,"HandleCodeResp"],[yi,"HandleRespEar"],[ki,"HandleRespCode"],[wi,"HandleRespPlatBroker"],[Ci,"UpdTEndpointAuth"],[Ti,"AuthClientAT"],[xi,"AuthClientExecTReq"],[Si,"AuthClientCreateTReqBody"],[Ii,"PopTGenCnf"],[_i,"PopTGenKid"],[Ei,"HandleServerTRes"],[Ai,"DeserializeRes"],[Bi,"AuthFactCreateDiscInst"],[Oi,"AuthResolveEndpointsAsync"],["authorityResolveEndpointsFromLocalSources","AuthResolveEndpointsFromLocal"],[Ri,"AuthGetCDMetaFromNet"],[ji,"AuthUpdCDMeta"],[Pi,"AuthUpdCDMetaFromNet"],[Ni,"AuthUpdEndpointMeta"],[zi,"AuthUpdMetaWithRegInfo"],[qi,"RegDiscDetectReg"],[Mi,"RegDiscGetRegFromIMDS"],[Fi,"RegDiscGetCurrentVer"],[Di,"ATByCodeAsync"],["getEndpointMetadataFromNetwork","GetEndpointMetaFromNet"],["getCloudDiscoveryMetadataFromNetworkMeasurement","GetCDMetaFromNet"],[Li,"HandleRedirectPromise"],[Hi,"HandleNtvRedirectPromise"],["updateCloudDiscoveryMetadataMeasurement","UpdateCDMeta"],["usernamePasswordClientAcquireToken","UserPassClientAT"],[Ui,"NtvMsgHandlerHandshake"],["nativeGenerateAuthResult","NtvGenAuthRes"],[Wi,"RemoveHiddenIframe"],[Vi,"ClearTAndKeysWithClaims"],[$i,"CacheManagerGetRT"],[Qi,"GenPkceCodes"],[Xi,"GenCodeVerifier"],[Yi,"GenCodeChallengeFromVerifier"],[Zi,"Sha256Digest"],[ea,"GetRandomValues"],[ta,"genHKDF"],[ra,"genBaseKey"],[oa,"b64Decode"],[na,"urlEncArr"],[ia,"encrypt"],[aa,"decrypt"],[sa,"genEarKey"],[ca,"decryptEarResp"]]),1);new Set(["accessTokenSize","durationMs","idTokenSize","matsSilentStatus","matsHttpStatus","refreshTokenSize","queuedTimeMs","startTimeMs","status","multiMatchedAT","multiMatchedID","multiMatchedRT","unencryptedCacheCount","encryptedCacheExpiredCount","oldAccountCount","oldAccessCount","oldIdCount","oldRefreshCount","currAccountCount","currAccessCount","currIdCount","currRefreshCount","expiredCacheRemovedCount","upgradedCacheCount"]);class da{startMeasurement(){}endMeasurement(){}flushMeasurement(){return null}}class ua{generateId(){return"callback-id"}startMeasurement(e,t){return{end:()=>null,discard:()=>{},add:()=>{},increment:()=>{},event:{eventId:this.generateId(),status:la,authority:"",libraryName:"",libraryVersion:"",clientId:"",name:e,startTimeMs:Date.now(),correlationId:t||""},measurement:new da}}startPerformanceMeasurement(){return new da}calculateQueuedTime(){return 0}addQueueMeasurement(){}setPreQueueTime(){}endMeasurement(){return null}discardMeasurements(){}removePerformanceCallback(){return!0}addPerformanceCallback(){return""}emitEvents(){}addFields(){}incrementFields(){}cacheEventByCorrelationId(){}}const fa={tokenRenewalOffsetSeconds:300,preventCorsPreflight:!1},ha={loggerCallback:()=>{},piiLoggingEnabled:!1,logLevel:_r.Info,correlationId:Jt.EMPTY_STRING},pa={claimsBasedCachingEnabled:!1},ga={async sendGetRequestAsync(){throw Bo(Io)},async sendPostRequestAsync(){throw Bo(Io)}},ma={sku:Jt.SKU,version:jo,cpu:Jt.EMPTY_STRING,os:Jt.EMPTY_STRING},va={clientSecret:Jt.EMPTY_STRING,clientAssertion:void 0},ba={azureCloudInstance:Or,tenant:`${Jt.DEFAULT_COMMON_TENANT}`},ya={application:{appName:"",appVersion:""}};function wa(e){return e.authOptions.authority.options.protocolMode===Ar}var ka=r(64583).Promise;const Ca={sendGetRequestAsync:()=>ka.reject(Bo(Io)),sendPostRequestAsync:()=>ka.reject(Bo(Io))},Ta="invalid_grant",xa="msal",Sa="msal.js.browser",Ia="53ee284d-920a-4b59-9d30-a60315b26836",_a="ppnbnpeolgkicgegkbkbjmhlideopiji",Ea="MicrosoftEntra",Aa="Handshake",Ba="localStorage",Oa="sessionStorage",Ra="memoryStorage",ja="signin",Pa="signout",Na="request.origin",za="urlHash",qa="request.params",Ma="code.verifier",Fa="interaction.status",Da="request.native",La="wrapper.sku",Ha="wrapper.version",Ua=861,Wa=862;var Va;!function(e){e.Redirect="redirect",e.Popup="popup",e.Silent="silent",e.None="none"}(Va||(Va={}));const $a={scopes:Xt},Ka="msal.db",Ga=`${Ka}.keys`,Ja=[0,5,4],Qa="pkce_not_created",Xa="ear_jwk_empty",Ya="ear_jwe_empty",Za="crypto_nonexistent",es="empty_navigate_uri",ts="hash_empty_error",rs="no_state_in_hash",os="hash_does_not_contain_known_properties",ns="unable_to_parse_state",is="state_interaction_type_mismatch",as="interaction_in_progress",ss="popup_window_error",cs="empty_window_error",ls="user_cancelled",ds="monitor_popup_timeout",us="monitor_window_timeout",fs="redirect_in_iframe",hs="block_iframe_reload",ps="block_nested_popups",gs="iframe_closed_prematurely",ms="silent_logout_unsupported",vs="no_account_error",bs="silent_prompt_value_error",ys="no_token_request_cache_error",ws="unable_to_parse_token_request_cache_error",ks="auth_request_not_set_error",Cs="invalid_cache_type",Ts="non_browser_environment",xs="database_not_open",Ss="no_network_connectivity",Is="post_request_failed",_s="get_request_failed",Es="failed_to_parse_response",As="unable_to_load_token",Bs="crypto_key_not_found",Os="auth_code_required",Rs="auth_code_or_nativeAccountId_required",js="spa_code_and_nativeAccountId_present",Ps="database_unavailable",Ns="unable_to_acquire_token_from_native_platform",zs="native_handshake_timeout",qs="native_extension_not_installed",Ms="native_connection_not_established",Fs="uninitialized_public_client_application",Ds="native_prompt_not_supported",Ls="invalid_base64_string",Hs="invalid_pop_token_request",Us="failed_to_build_headers",Ws="failed_to_parse_headers",Vs="failed_to_decrypt_ear_response",$s="timed_out",Ks="For more visit: aka.ms/msaljs/browser-errors",Gs={[Qa]:"The PKCE code challenge and verifier could not be generated.",[Xa]:"No EAR encryption key provided. This is unexpected.",[Ya]:"Server response does not contain ear_jwe property. This is unexpected.",[Za]:"The crypto object or function is not available.",[es]:"Navigation URI is empty. Please check stack trace for more info.",[ts]:`Hash value cannot be processed because it is empty. Please verify that your redirectUri is not clearing the hash. ${Ks}`,[rs]:"Hash does not contain state. Please verify that the request originated from msal.",[os]:`Hash does not contain known properites. Please verify that your redirectUri is not changing the hash. ${Ks}`,[ns]:"Unable to parse state. Please verify that the request originated from msal.",[is]:"Hash contains state but the interaction type does not match the caller.",[as]:`Interaction is currently in progress. Please ensure that this interaction has been completed before calling an interactive API. ${Ks}`,[ss]:"Error opening popup window. This can happen if you are using IE or if popups are blocked in the browser.",[cs]:"window.open returned null or undefined window object.",[ls]:"User cancelled the flow.",[ds]:`Token acquisition in popup failed due to timeout. ${Ks}`,[us]:`Token acquisition in iframe failed due to timeout. ${Ks}`,[fs]:"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.",[hs]:`Request was blocked inside an iframe because MSAL detected an authentication response. ${Ks}`,[ps]:"Request was blocked inside a popup because MSAL detected it was running in a popup.",[gs]:"The iframe being monitored was closed prematurely.",[ms]:"Silent logout not supported. Please call logoutRedirect or logoutPopup instead.",[vs]:"No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.",[bs]:"The value given for the prompt value is not valid for silent requests - must be set to 'none' or 'no_session'.",[ys]:"No token request found in cache.",[ws]:"The cached token request could not be parsed.",[ks]:"Auth Request not set. Please ensure initiateAuthRequest was called from the InteractionHandler",[Cs]:"Invalid cache type",[Ts]:"Login and token requests are not supported in non-browser environments.",[xs]:"Database is not open!",[Ss]:"No network connectivity. Check your internet connection.",[Is]:"Network request failed: If the browser threw a CORS error, check that the redirectUri is registered in the Azure App Portal as type 'SPA'",[_s]:"Network request failed. Please check the network trace to determine root cause.",[Es]:"Failed to parse network response. Check network trace.",[As]:"Error loading token to cache.",[Bs]:"Cryptographic Key or Keypair not found in browser storage.",[Os]:"An authorization code must be provided (as the `code` property on the request) to this flow.",[Rs]:"An authorization code or nativeAccountId must be provided to this flow.",[js]:"Request cannot contain both spa code and native account id.",[Ps]:"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.",[Ns]:`Unable to acquire token from native platform. ${Ks}`,[zs]:"Timed out while attempting to establish connection to browser extension",[qs]:"Native extension is not installed. If you think this is a mistake call the initialize function.",[Ms]:`Connection to native platform has not been established. Please install a compatible browser extension and run initialize(). ${Ks}`,[Fs]:`You must call and await the initialize function before attempting to call any other MSAL API. ${Ks}`,[Ds]:"The provided prompt is not supported by the native platform. This request should be routed to the web based flow.",[Ls]:"Invalid base64 encoded string.",[Hs]:"Invalid PoP token request. The request should not have both a popKid value and signPopToken set to true.",[Us]:"Failed to build request headers object.",[Ws]:"Failed to parse response headers",[Vs]:"Failed to decrypt ear response",[$s]:"The request timed out."};class Js extends Nr{constructor(e,t){super(e,Gs[e],t),Object.setPrototypeOf(this,Js.prototype),this.name="BrowserAuthError"}}function Qs(e,t){return new Js(e,t)}var Xs=r(64583).Promise;class Ys{navigateInternal(e,t){return Ys.defaultNavigateWindow(e,t)}navigateExternal(e,t){return Ys.defaultNavigateWindow(e,t)}static defaultNavigateWindow(e,t){return t.noHistory?window.location.replace(e):window.location.assign(e),new Xs((e,r)=>{setTimeout(()=>{r(Qs($s,"failed_to_redirect"))},t.timeout)})}}class Zs extends Nr{constructor(e,t,r){super(e.errorCode,e.errorMessage,e.subError),Object.setPrototypeOf(this,Zs.prototype),this.name="NetworkError",this.error=e,this.httpStatus=t,this.responseHeaders=r}}function ec(e,t,r,o){return e.errorMessage=`${e.errorMessage}, additionalErrorInfo: error.name:${o?.name}, error.message:${o?.message}`,new Zs(e,t,r)}class tc{async sendGetRequestAsync(e,t){let r,o={},n=0;const i=rc(t);try{r=await fetch(e,{method:"GET",headers:i})}catch(e){throw ec(Qs(window.navigator.onLine?_s:Ss),void 0,void 0,e)}o=oc(r.headers);try{return n=r.status,{headers:o,body:await r.json(),status:n}}catch(e){throw ec(Qs(Es),n,o,e)}}async sendPostRequestAsync(e,t){const r=t&&t.body||"",o=rc(t);let n,i=0,a={};try{n=await fetch(e,{method:"POST",headers:o,body:r})}catch(e){throw ec(Qs(window.navigator.onLine?Is:Ss),void 0,void 0,e)}a=oc(n.headers);try{return i=n.status,{headers:a,body:await n.json(),status:i}}catch(e){throw ec(Qs(Es),i,a,e)}}}function rc(e){try{const t=new Headers;if(!e||!e.headers)return t;const r=e.headers;return Object.entries(r).forEach(([e,r])=>{t.append(e,r)}),t}catch(e){throw ec(Qs(Us),void 0,void 0,e)}}function oc(e){try{const t={};return e.forEach((e,r)=>{t[r]=e}),t}catch(e){throw Qs(Ws)}}const nc="client_id",ic="redirect_uri",ac="token_type",sc="req_cnf",cc="return_spa_code",lc="x-client-xtra-sku",dc="brk_client_id",uc="brk_redirect_uri",fc="instance_aware";function hc(e,t,r){if(!t)return;const o=e.get(nc);o&&e.has(dc)&&r?.addFields({embeddedClientId:o,embeddedRedirectUri:e.get(ic)},t)}function pc(e,t){e.set("response_type",t)}function gc(e,t,r=!0,o=Xt){!r||o.includes("openid")||t.includes("openid")||o.push("openid");const n=r?[...t||[],...o]:t||[],i=new cn(n);e.set("scope",i.printScopes())}function mc(e,t){e.set(nc,t)}function vc(e,t){e.set(ic,t)}function bc(e,t){e.set("login_hint",t)}function yc(e,t){e.set(tr,`UPN:${t}`)}function wc(e,t){e.set(tr,`Oid:${t.uid}@${t.utid}`)}function kc(e,t){e.set("sid",t)}function Cc(e,t,r){const o=function(e,t){let r;if(e)try{r=JSON.parse(e)}catch(e){throw an(Do)}else r={};return t&&t.length>0&&(r.hasOwnProperty(cr)||(r[cr]={}),r[cr][lr]={values:t}),JSON.stringify(r)}(t,r);try{JSON.parse(o)}catch(e){throw an(Do)}e.set("claims",o)}function Tc(e,t){e.set("client-request-id",t)}function xc(e,t){e.set("x-client-SKU",t.sku),e.set("x-client-VER",t.version),t.os&&e.set("x-client-OS",t.os),t.cpu&&e.set("x-client-CPU",t.cpu)}function Sc(e,t){t?.appName&&e.set("x-app-name",t.appName),t?.appVersion&&e.set("x-app-ver",t.appVersion)}function Ic(e,t){t&&e.set("state",t)}function _c(e,t,r){if(!t||!r)throw an(Wo);e.set("code_challenge",t),e.set("code_challenge_method",r)}function Ec(e,t){e.set("client_secret",t)}function Ac(e,t){t&&e.set("client_assertion",t)}function Bc(e,t){t&&e.set("client_assertion_type",t)}function Oc(e,t){e.set("grant_type",t)}function Rc(e){e.set("client_info","1")}function jc(e){e.has(fc)||e.set(fc,"true")}function Pc(e,t){Object.entries(t).forEach(([t,r])=>{!e.has(t)&&r&&e.set(t,r)})}function Nc(e,t){t&&(e.set(ac,Sr.POP),e.set(sc,t))}function zc(e,t){t&&(e.set(ac,Sr.SSH),e.set(sc,t))}function qc(e,t){e.set("x-client-current-telemetry",t.generateCurrentRequestHeaderValue()),e.set("x-client-last-telemetry",t.generateLastRequestHeaderValue())}function Mc(e){e.set("x-ms-lib-capability","retry-after, h429")}function Fc(e,t,r){e.has(dc)||e.set(dc,t),e.has(uc)||e.set(uc,r)}function Dc(e){return encodeURIComponent(Hc(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_"))}function Lc(e){return Uc(e).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Hc(e){return Uc((new TextEncoder).encode(e))}function Uc(e){const t=Array.from(e,e=>String.fromCodePoint(e)).join("");return btoa(t)}function Wc(e){return(new TextDecoder).decode(Vc(e))}function Vc(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw Qs(Ls)}const r=atob(t);return Uint8Array.from(r,e=>e.codePointAt(0)||0)}const $c="AES-GCM",Kc="HKDF",Gc="SHA-256",Jc=new Uint8Array([1,0,1]),Qc="0123456789abcdef",Xc=new Uint32Array(1),Yc="raw",Zc="encrypt",el="decrypt",tl={name:"RSASSA-PKCS1-v1_5",hash:Gc,modulusLength:2048,publicExponent:Jc};async function rl(e,t,r){t?.addQueueMeasurement(Zi,r);const o=(new TextEncoder).encode(e);return window.crypto.subtle.digest(Gc,o)}function ol(e){return window.crypto.getRandomValues(e)}function nl(){return window.crypto.getRandomValues(Xc),Xc[0]}function il(){const e=Date.now(),t=1024*nl()+(1023&nl()),r=new Uint8Array(16),o=Math.trunc(t/2**30),n=t&2**30-1,i=nl();r[0]=e/2**40,r[1]=e/2**32,r[2]=e/2**24,r[3]=e/65536,r[4]=e/256,r[5]=e,r[6]=112|o>>>8,r[7]=o,r[8]=128|n>>>24,r[9]=n>>>16,r[10]=n>>>8,r[11]=n,r[12]=i>>>24,r[13]=i>>>16,r[14]=i>>>8,r[15]=i;let a="";for(let e=0;e>>4),a+=Qc.charAt(15&r[e]),3!==e&&5!==e&&7!==e&&9!==e||(a+="-");return a}async function al(e){return window.crypto.subtle.exportKey("jwk",e)}async function sl(){const e=await ll(),t={alg:"dir",kty:"oct",k:Lc(new Uint8Array(e))};return Hc(JSON.stringify(t))}async function cl(e,t){const r=t.split(".");if(5!==r.length)throw Qs(Vs,"jwe_length");const o=await async function(e){const t=Wc(e),r=Vc(JSON.parse(t).k);return window.crypto.subtle.importKey(Yc,r,$c,!1,[el])}(e).catch(()=>{throw Qs(Vs,"import_key")});try{const e=(new TextEncoder).encode(r[0]),t=Vc(r[2]),n=Vc(r[3]),i=Vc(r[4]),a=8*i.byteLength,s=new Uint8Array(n.length+i.length);s.set(n),s.set(i,n.length);const c=await window.crypto.subtle.decrypt({name:$c,iv:t,tagLength:a,additionalData:e},o,s);return(new TextDecoder).decode(c)}catch(e){throw Qs(Vs,"decrypt")}}async function ll(){const e=await window.crypto.subtle.generateKey({name:$c,length:256},!0,[Zc,el]);return window.crypto.subtle.exportKey(Yc,e)}async function dl(e){return window.crypto.subtle.importKey(Yc,e,Kc,!1,["deriveKey"])}async function ul(e,t,r){return window.crypto.subtle.deriveKey({name:Kc,salt:t,hash:Gc,info:(new TextEncoder).encode(r)},e,{name:$c,length:256},!1,[Zc,el])}async function fl(e,t,r){const o=(new TextEncoder).encode(t),n=window.crypto.getRandomValues(new Uint8Array(16)),i=await ul(e,n,r),a=await window.crypto.subtle.encrypt({name:$c,iv:new Uint8Array(12)},i,o);return{data:Lc(new Uint8Array(a)),nonce:Lc(n)}}async function hl(e,t,r,o){const n=Vc(o),i=await ul(e,Vc(t),r),a=await window.crypto.subtle.decrypt({name:$c,iv:new Uint8Array(12)},i,n);return(new TextDecoder).decode(a)}async function pl(e){const t=await rl(e);return Lc(new Uint8Array(t))}const gl="storage_not_supported",ml="stubbed_public_client_application_called",vl="in_mem_redirect_unavailable",bl={[gl]:"Given storage configuration option was not supported.",[ml]:"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",[vl]:"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."};class yl extends Nr{constructor(e,t){super(e,t),this.name="BrowserConfigurationAuthError",Object.setPrototypeOf(this,yl.prototype)}}function wl(e){return new yl(e,bl[e])}function kl(e){e.location.hash="","function"==typeof e.history.replaceState&&e.history.replaceState(null,"",`${e.location.origin}${e.location.pathname}${e.location.search}`)}function Cl(){return window.parent!==window}function Tl(){return"undefined"!=typeof window&&window.location?window.location.href.split("?")[0].split("#")[0]:""}function xl(){if("undefined"==typeof window)throw Qs(Ts)}function Sl(e){if(!e)throw Qs(Fs)}function Il(e){xl(),function(){if(yn.hashContainsKnownProperties(window.location.hash)&&Cl())throw Qs(hs)}(),function(){if("undefined"!=typeof window&&window.opener&&window.opener!==window&&"string"==typeof window.name&&0===window.name.indexOf(`${xa}.`))throw Qs(ps)}(),Sl(e)}function _l(e,t){if(Il(e),function(e){if(Cl()&&!e)throw Qs(fs)}(t.system.allowRedirectInIframe),t.cache.cacheLocation===Ra&&!t.cache.storeAuthStateInCookie)throw wl(vl)}function El(e){const t=document.createElement("link");t.rel="preconnect",t.href=new URL(e).origin,t.crossOrigin="anonymous",document.head.appendChild(t),window.setTimeout(()=>{try{document.head.removeChild(t)}catch{}},1e4)}const Al="4.22.1",Bl="msal",Ol="browser",Rl=`${Bl}.${Ol}.log.level`,jl=`${Bl}.${Ol}.log.pii`,Pl=`${Bl}.${Ol}.platform.auth.dom`,Nl=`${Bl}.version`,zl="account.keys",ql="token.keys";function Ml(e=1){return e<1?`${Bl}.${zl}`:`${Bl}.${e}.${zl}`}function Fl(e,t=1){return t<1?`${Bl}.${ql}.${e}`:`${Bl}.${t}.${ql}.${e}`}class Dl{static loggerCallback(e,t){switch(e){case _r.Error:return void console.error(t);case _r.Info:return void console.info(t);case _r.Verbose:return void console.debug(t);case _r.Warning:return void console.warn(t);default:return void console.log(t)}}constructor(e){let t;this.browserEnvironment="undefined"!=typeof window,this.config=function({auth:e,cache:t,system:r,telemetry:o},n){const i={clientId:Jt.EMPTY_STRING,authority:`${Jt.DEFAULT_AUTHORITY}`,knownAuthorities:[],cloudDiscoveryMetadata:Jt.EMPTY_STRING,authorityMetadata:Jt.EMPTY_STRING,redirectUri:"undefined"!=typeof window?Tl():"",postLogoutRedirectUri:Jt.EMPTY_STRING,navigateToLoginRequestUrl:!0,clientCapabilities:[],protocolMode:"AAD",OIDCOptions:{serverResponseType:"fragment",defaultScopes:[Jt.OPENID_SCOPE,Jt.PROFILE_SCOPE,Jt.OFFLINE_ACCESS_SCOPE]},azureCloudOptions:{azureCloudInstance:Or,tenant:Jt.EMPTY_STRING},skipAuthorityMetadataCache:!1,supportsNestedAppAuth:!1,instanceAware:!1,encodeExtraQueryParams:!1},a={cacheLocation:Oa,cacheRetentionDays:5,temporaryCacheLocation:Oa,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!(!t||t.cacheLocation!==Ba),claimsBasedCachingEnabled:!1},s={loggerCallback:()=>{},logLevel:_r.Info,piiLoggingEnabled:!1},c={...{...fa,loggerOptions:s,networkClient:n?new tc:Ca,navigationClient:new Ys,loadFrameTimeout:0,windowHashTimeout:r?.loadFrameTimeout||6e4,iframeHashTimeout:r?.loadFrameTimeout||1e4,navigateFrameWait:0,redirectNavigationTimeout:3e4,asyncPopups:!1,allowRedirectInIframe:!1,allowPlatformBroker:!1,nativeBrokerHandshakeTimeout:r?.nativeBrokerHandshakeTimeout||2e3,pollIntervalMilliseconds:30},...r,loggerOptions:r?.loggerOptions||s},l={application:{appName:Jt.EMPTY_STRING,appVersion:Jt.EMPTY_STRING},client:new ua};if(e?.protocolMode!==Ar&&e?.OIDCOptions&&new Er(c.loggerOptions).warning(JSON.stringify(an(Yo))),e?.protocolMode&&e.protocolMode===Ar&&c?.allowPlatformBroker)throw an(Zo);return{auth:{...i,...e,OIDCOptions:{...i.OIDCOptions,...e?.OIDCOptions}},cache:{...a,...t},system:c,telemetry:{...l,...o}}}(e,this.browserEnvironment);try{t=window[Oa]}catch(e){}const r=t?.getItem(Rl),o=t?.getItem(jl)?.toLowerCase(),n="true"===o||"false"!==o&&void 0,i={...this.config.system.loggerOptions},a=r&&Object.keys(_r).includes(r)?_r[r]:void 0;a&&(i.loggerCallback=Dl.loggerCallback,i.logLevel=a),void 0!==n&&(i.piiLoggingEnabled=n),this.logger=new Er(i,"@azure/msal-browser",Al),this.available=!1}getConfig(){return this.config}getLogger(){return this.logger}isAvailable(){return this.available}isBrowserEnvironment(){return this.browserEnvironment}}class Ll extends Dl{getModuleName(){return Ll.MODULE_NAME}getId(){return Ll.ID}async initialize(){return this.available="undefined"!=typeof window,this.available}}Ll.MODULE_NAME="",Ll.ID="StandardOperatingContext";const Hl="missing_kid_error",Ul="missing_alg_error",Wl={[Hl]:"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.",[Ul]:"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."};class Vl extends Nr{constructor(e,t){super(e,t),this.name="JoseHeaderError",Object.setPrototypeOf(this,Vl.prototype)}}function $l(e){return new Vl(e,Wl[e])}class Kl{constructor(e){this.typ=e.typ,this.alg=e.alg,this.kid=e.kid}static getShrHeaderString(e){if(!e.kid)throw $l(Hl);if(!e.alg)throw $l(Ul);const t=new Kl({typ:e.typ||"pop",kid:e.kid,alg:e.alg});return JSON.stringify(t)}}var Gl=r(64583).Promise;class Jl{constructor(){this.dbName=Ka,this.version=1,this.tableName=Ga,this.dbOpen=!1}async open(){return new Gl((e,t)=>{const r=window.indexedDB.open(this.dbName,this.version);r.addEventListener("upgradeneeded",e=>{e.target.result.createObjectStore(this.tableName)}),r.addEventListener("success",t=>{const r=t;this.db=r.target.result,this.dbOpen=!0,e()}),r.addEventListener("error",()=>t(Qs(Ps)))})}closeConnection(){const e=this.db;e&&this.dbOpen&&(e.close(),this.dbOpen=!1)}async validateDbIsOpen(){if(!this.dbOpen)return this.open()}async getItem(e){return await this.validateDbIsOpen(),new Gl((t,r)=>{if(!this.db)return r(Qs(xs));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);o.addEventListener("success",e=>{const r=e;this.closeConnection(),t(r.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),r(e)})})}async setItem(e,t){return await this.validateDbIsOpen(),new Gl((r,o)=>{if(!this.db)return o(Qs(xs));const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(t,e);n.addEventListener("success",()=>{this.closeConnection(),r()}),n.addEventListener("error",e=>{this.closeConnection(),o(e)})})}async removeItem(e){return await this.validateDbIsOpen(),new Gl((t,r)=>{if(!this.db)return r(Qs(xs));const o=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);o.addEventListener("success",()=>{this.closeConnection(),t()}),o.addEventListener("error",e=>{this.closeConnection(),r(e)})})}async getKeys(){return await this.validateDbIsOpen(),new Gl((e,t)=>{if(!this.db)return t(Qs(xs));const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAllKeys();r.addEventListener("success",t=>{const r=t;this.closeConnection(),e(r.target.result)}),r.addEventListener("error",e=>{this.closeConnection(),t(e)})})}async containsKey(e){return await this.validateDbIsOpen(),new Gl((t,r)=>{if(!this.db)return r(Qs(xs));const o=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).count(e);o.addEventListener("success",e=>{const r=e;this.closeConnection(),t(1===r.target.result)}),o.addEventListener("error",e=>{this.closeConnection(),r(e)})})}async deleteDatabase(){return this.db&&this.dbOpen&&this.closeConnection(),new Gl((e,t)=>{const r=window.indexedDB.deleteDatabase(Ka),o=setTimeout(()=>t(!1),200);r.addEventListener("success",()=>(clearTimeout(o),e(!0))),r.addEventListener("blocked",()=>(clearTimeout(o),e(!0))),r.addEventListener("error",()=>(clearTimeout(o),t(!1)))})}}var Ql=r(64583).Promise;class Xl{constructor(){this.cache=new Map}async initialize(){}getItem(e){return this.cache.get(e)||null}getUserData(e){return this.getItem(e)}setItem(e,t){this.cache.set(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){this.cache.delete(e)}getKeys(){const e=[];return this.cache.forEach((t,r)=>{e.push(r)}),e}containsKey(e){return this.cache.has(e)}clear(){this.cache.clear()}decryptData(){return Ql.resolve(null)}}class Yl{constructor(e){this.inMemoryCache=new Xl,this.indexedDBCache=new Jl,this.logger=e}handleDatabaseAccessError(e){if(!(e instanceof Js&&e.errorCode===Ps))throw e;this.logger.error("Could not access persistent storage. This may be caused by browser privacy features which block persistent storage in third-party contexts.")}async getItem(e){const t=this.inMemoryCache.getItem(e);if(!t)try{return this.logger.verbose("Queried item not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.getItem(e)}catch(e){this.handleDatabaseAccessError(e)}return t}async setItem(e,t){this.inMemoryCache.setItem(e,t);try{await this.indexedDBCache.setItem(e,t)}catch(e){this.handleDatabaseAccessError(e)}}async removeItem(e){this.inMemoryCache.removeItem(e);try{await this.indexedDBCache.removeItem(e)}catch(e){this.handleDatabaseAccessError(e)}}async getKeys(){const e=this.inMemoryCache.getKeys();if(0===e.length)try{return this.logger.verbose("In-memory cache is empty, now querying persistent storage."),await this.indexedDBCache.getKeys()}catch(e){this.handleDatabaseAccessError(e)}return e}async containsKey(e){const t=this.inMemoryCache.containsKey(e);if(!t)try{return this.logger.verbose("Key not found in in-memory cache, now querying persistent storage."),await this.indexedDBCache.containsKey(e)}catch(e){this.handleDatabaseAccessError(e)}return t}clearInMemory(){this.logger.verbose("Deleting in-memory keystore"),this.inMemoryCache.clear(),this.logger.verbose("In-memory keystore deleted")}async clearPersistent(){try{this.logger.verbose("Deleting persistent keystore");const e=await this.indexedDBCache.deleteDatabase();return e&&this.logger.verbose("Persistent keystore deleted"),e}catch(e){return this.handleDatabaseAccessError(e),!1}}}class Zl{constructor(e,t,r){this.logger=e,function(e){if(!window)throw Qs(Ts);if(!window.crypto)throw Qs(Za);if(!e&&!window.crypto.subtle)throw Qs(Za,"crypto_subtle_undefined")}(r??!1),this.cache=new Yl(this.logger),this.performanceClient=t}createNewGuid(){return il()}base64Encode(e){return Hc(e)}base64Decode(e){return Wc(e)}base64UrlEncode(e){return Dc(e)}encodeKid(e){return this.base64UrlEncode(JSON.stringify({kid:e}))}async getPublicKeyThumbprint(e){const t=this.performanceClient?.startMeasurement(Mn,e.correlationId),r=await async function(e,t){return window.crypto.subtle.generateKey(tl,e,t)}(Zl.EXTRACTABLE,Zl.POP_KEY_USAGES),o=await al(r.publicKey),n=ed({e:o.e,kty:o.kty,n:o.n}),i=await this.hashString(n),a=await al(r.privateKey),s=await async function(e){return window.crypto.subtle.importKey("jwk",e,tl,!1,["sign"])}(a);return await this.cache.setItem(i,{privateKey:s,publicKey:r.publicKey,requestMethod:e.resourceRequestMethod,requestUri:e.resourceRequestUri}),t&&t.end({success:!0}),i}async removeTokenBindingKey(e){if(await this.cache.removeItem(e),await this.cache.containsKey(e))throw Bo(wo)}async clearKeystore(){this.cache.clearInMemory();try{return await this.cache.clearPersistent(),!0}catch(e){return e instanceof Error?this.logger.error(`Clearing keystore failed with error: ${e.message}`):this.logger.error("Clearing keystore failed with unknown error"),!1}}async signJwt(e,t,r,o){const n=this.performanceClient?.startMeasurement(Fn,o),i=await this.cache.getItem(t);if(!i)throw Qs(Bs);const a=await al(i.publicKey),s=ed(a),c=Dc(JSON.stringify({kid:t})),l=Dc(Kl.getShrHeaderString({...r?.header,alg:a.alg,kid:c}));e.cnf={jwk:JSON.parse(s)};const d=`${l}.${Dc(JSON.stringify(e))}`,u=(new TextEncoder).encode(d),f=await async function(e,t){return window.crypto.subtle.sign(tl,e,t)}(i.privateKey,u),h=`${d}.${Lc(new Uint8Array(f))}`;return n&&n.end({success:!0}),h}async hashString(e){return pl(e)}}function ed(e){return JSON.stringify(e,Object.keys(e).sort())}Zl.POP_KEY_USAGES=["sign","verify"],Zl.EXTRACTABLE=!0;const td=(e,t,r,o,n)=>(...i)=>{r.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,n);if(n){const e=t+"CallCount";o?.incrementFields({[e]:1},n)}try{const o=e(...i);return a?.end({success:!0}),r.trace(`Returning result from ${t}`),o}catch(e){r.trace(`Error occurred in ${t}`);try{r.trace(JSON.stringify(e))}catch(e){r.trace("Unable to print error message.")}throw a?.end({success:!1},e),e}},rd=(e,t,r,o,n)=>(...i)=>{r.trace(`Executing function ${t}`);const a=o?.startMeasurement(t,n);if(n){const e=t+"CallCount";o?.incrementFields({[e]:1},n)}return o?.setPreQueueTime(t,n),e(...i).then(e=>(r.trace(`Returning result from ${t}`),a?.end({success:!0}),e)).catch(e=>{r.trace(`Error occurred in ${t}`);try{r.trace(JSON.stringify(e))}catch(e){r.trace("Unable to print error message.")}throw a?.end({success:!1},e),e})};class od{constructor(e,t,r,o){this.networkInterface=e,this.logger=t,this.performanceClient=r,this.correlationId=o}async detectRegion(e,t){this.performanceClient?.addQueueMeasurement(qi,this.correlationId);let r=e;if(r)t.region_source="3";else{const e=od.IMDS_OPTIONS;try{const o=await rd(this.getRegionFromIMDS.bind(this),Mi,this.logger,this.performanceClient,this.correlationId)(Jt.IMDS_VERSION,e);if(200===o.status&&(r=o.body,t.region_source="4"),400===o.status){const o=await rd(this.getCurrentVersion.bind(this),Fi,this.logger,this.performanceClient,this.correlationId)(e);if(!o)return t.region_source="1",null;const n=await rd(this.getRegionFromIMDS.bind(this),Mi,this.logger,this.performanceClient,this.correlationId)(o,e);200===n.status&&(r=n.body,t.region_source="4")}}catch(e){return t.region_source="1",null}}return r||(t.region_source="1"),r||null}async getRegionFromIMDS(e,t){return this.performanceClient?.addQueueMeasurement(Mi,this.correlationId),this.networkInterface.sendGetRequestAsync(`${Jt.IMDS_ENDPOINT}?api-version=${e}&format=text`,t,Jt.IMDS_TIMEOUT)}async getCurrentVersion(e){this.performanceClient?.addQueueMeasurement(Fi,this.correlationId);try{const t=await this.networkInterface.sendGetRequestAsync(`${Jt.IMDS_ENDPOINT}?format=json`,e);return 400===t.status&&t.body&&t.body["newest-versions"]&&t.body["newest-versions"].length>0?t.body["newest-versions"][0]:null}catch(e){return null}}}function nd(){return Math.round((new Date).getTime()/1e3)}function id(e){return e.getTime()/1e3}function ad(e){return e?new Date(1e3*Number(e)):new Date}function sd(e,t){const r=Number(e)||0;return nd()+t>r}function cd(e,t){const r=Number(e)+24*t*60*60*1e3;return Date.now()>r}function ld(e,t,r,o,n){return{credentialType:mr.ID_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:r,realm:n,lastUpdatedAt:Date.now().toString()}}function dd(e,t,r,o,n,i,a,s,c,l,d,u,f,h,p){const g={homeAccountId:e,credentialType:mr.ACCESS_TOKEN,secret:r,cachedAt:nd().toString(),expiresOn:a.toString(),extendedExpiresOn:s.toString(),environment:t,clientId:o,realm:n,target:i,tokenType:d||Sr.BEARER,lastUpdatedAt:Date.now().toString()};if(u&&(g.userAssertionHash=u),l&&(g.refreshOn=l.toString()),h&&(g.requestedClaims=h,g.requestedClaimsHash=p),g.tokenType?.toLowerCase()!==Sr.BEARER.toLowerCase())switch(g.credentialType=mr.ACCESS_TOKEN_WITH_AUTH_SCHEME,g.tokenType){case Sr.POP:const e=fn(r,c);if(!e?.cnf?.kid)throw Bo(bo);g.keyId=e.cnf.kid;break;case Sr.SSH:g.keyId=f}return g}function ud(e,t,r,o,n,i,a){const s={credentialType:mr.REFRESH_TOKEN,homeAccountId:e,environment:t,clientId:o,secret:r,lastUpdatedAt:Date.now().toString()};return i&&(s.userAssertionHash=i),n&&(s.familyId=n),a&&(s.expiresOn=a.toString()),s}function fd(e){return e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("credentialType")&&e.hasOwnProperty("clientId")&&e.hasOwnProperty("secret")}function hd(e){return!!e&&fd(e)&&e.hasOwnProperty("realm")&&e.hasOwnProperty("target")&&(e.credentialType===mr.ACCESS_TOKEN||e.credentialType===mr.ACCESS_TOKEN_WITH_AUTH_SCHEME)}function pd(e){return!!e&&fd(e)&&e.credentialType===mr.REFRESH_TOKEN}function gd(){return nd()+86400}function md(e,t,r){e.authorization_endpoint=t.authorization_endpoint,e.token_endpoint=t.token_endpoint,e.end_session_endpoint=t.end_session_endpoint,e.issuer=t.issuer,e.endpointsFromNetwork=r,e.jwks_uri=t.jwks_uri}function vd(e,t,r){e.aliases=t.aliases,e.preferred_cache=t.preferred_cache,e.preferred_network=t.preferred_network,e.aliasesFromNetwork=r}function bd(e){return e.expiresAt<=nd()}od.IMDS_OPTIONS={headers:{Metadata:"true"}},r(64583).Promise;class yd{constructor(e,t,r,o,n,i,a,s){this.canonicalAuthority=e,this._canonicalAuthority.validateAsUri(),this.networkInterface=t,this.cacheManager=r,this.authorityOptions=o,this.regionDiscoveryMetadata={region_used:void 0,region_source:void 0,region_outcome:void 0},this.logger=n,this.performanceClient=a,this.correlationId=i,this.managedIdentity=s||!1,this.regionDiscovery=new od(t,this.logger,this.performanceClient,this.correlationId)}getAuthorityType(e){if(e.HostNameAndPort.endsWith(Jt.CIAM_AUTH_URL))return 3;const t=e.PathSegments;if(t.length)switch(t[0].toLowerCase()){case Jt.ADFS:return 1;case Jt.DSTS:return 2}return 0}get authorityType(){return this.getAuthorityType(this.canonicalAuthorityUrlComponents)}get protocolMode(){return this.authorityOptions.protocolMode}get options(){return this.authorityOptions}get canonicalAuthority(){return this._canonicalAuthority.urlString}set canonicalAuthority(e){this._canonicalAuthority=new yn(e),this._canonicalAuthority.validateAsUri(),this._canonicalAuthorityUrlComponents=null}get canonicalAuthorityUrlComponents(){return this._canonicalAuthorityUrlComponents||(this._canonicalAuthorityUrlComponents=this._canonicalAuthority.getUrlComponents()),this._canonicalAuthorityUrlComponents}get hostnameAndPort(){return this.canonicalAuthorityUrlComponents.HostNameAndPort.toLowerCase()}get tenant(){return this.canonicalAuthorityUrlComponents.PathSegments[0]}get authorizationEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.authorization_endpoint);throw Bo(Lr)}get tokenEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint);throw Bo(Lr)}get deviceCodeEndpoint(){if(this.discoveryComplete())return this.replacePath(this.metadata.token_endpoint.replace("/token","/devicecode"));throw Bo(Lr)}get endSessionEndpoint(){if(this.discoveryComplete()){if(!this.metadata.end_session_endpoint)throw Bo(ko);return this.replacePath(this.metadata.end_session_endpoint)}throw Bo(Lr)}get selfSignedJwtAudience(){if(this.discoveryComplete())return this.replacePath(this.metadata.issuer);throw Bo(Lr)}get jwksUri(){if(this.discoveryComplete())return this.replacePath(this.metadata.jwks_uri);throw Bo(Lr)}canReplaceTenant(e){return 1===e.PathSegments.length&&!yd.reservedTenantDomains.has(e.PathSegments[0])&&0===this.getAuthorityType(e)&&this.protocolMode!==Ar}replaceTenant(e){return e.replace(/{tenant}|{tenantid}/g,this.tenant)}replacePath(e){let t=e;const r=new yn(this.metadata.canonical_authority).getUrlComponents(),o=r.PathSegments;return this.canonicalAuthorityUrlComponents.PathSegments.forEach((e,n)=>{let i=o[n];if(0===n&&this.canReplaceTenant(r)){const e=new yn(this.metadata.authorization_endpoint).getUrlComponents().PathSegments[0];i!==e&&(this.logger.verbose(`Replacing tenant domain name ${i} with id ${e}`),i=e)}e!==i&&(t=t.replace(`/${i}/`,`/${e}/`))}),this.replaceTenant(t)}get defaultOpenIdConfigurationEndpoint(){const e=this.hostnameAndPort;return this.canonicalAuthority.endsWith("v2.0/")||1===this.authorityType||this.protocolMode===Ar&&!this.isAliasOfKnownMicrosoftAuthority(e)?`${this.canonicalAuthority}.well-known/openid-configuration`:`${this.canonicalAuthority}v2.0/.well-known/openid-configuration`}discoveryComplete(){return!!this.metadata}async resolveEndpointsAsync(){this.performanceClient?.addQueueMeasurement(Oi,this.correlationId);const e=this.getCurrentMetadataEntity(),t=await rd(this.updateCloudDiscoveryMetadata.bind(this),ji,this.logger,this.performanceClient,this.correlationId)(e);this.canonicalAuthority=this.canonicalAuthority.replace(this.hostnameAndPort,e.preferred_network);const r=await rd(this.updateEndpointMetadata.bind(this),Ni,this.logger,this.performanceClient,this.correlationId)(e);this.updateCachedMetadata(e,t,{source:r}),this.performanceClient?.addFields({cloudDiscoverySource:t,authorityEndpointSource:r},this.correlationId)}getCurrentMetadataEntity(){let e=this.cacheManager.getAuthorityMetadataByAlias(this.hostnameAndPort);return e||(e={aliases:[],preferred_cache:this.hostnameAndPort,preferred_network:this.hostnameAndPort,canonical_authority:this.canonicalAuthority,authorization_endpoint:"",token_endpoint:"",end_session_endpoint:"",issuer:"",aliasesFromNetwork:!1,endpointsFromNetwork:!1,expiresAt:gd(),jwks_uri:""}),e}updateCachedMetadata(e,t,r){t!==kr&&r?.source!==kr&&(e.expiresAt=gd(),e.canonical_authority=this.canonicalAuthority);const o=this.cacheManager.generateAuthorityMetadataCacheKey(e.preferred_cache);this.cacheManager.setAuthorityMetadata(o,e),this.metadata=e}async updateEndpointMetadata(e){this.performanceClient?.addQueueMeasurement(Ni,this.correlationId);const t=this.updateEndpointMetadataFromLocalSources(e);if(t)return t.source===Tr&&this.authorityOptions.azureRegionConfiguration?.azureRegion&&t.metadata&&(md(e,await rd(this.updateMetadataWithRegionalInformation.bind(this),zi,this.logger,this.performanceClient,this.correlationId)(t.metadata),!1),e.canonical_authority=this.canonicalAuthority),t.source;let r=await rd(this.getEndpointMetadataFromNetwork.bind(this),Pi,this.logger,this.performanceClient,this.correlationId)();if(r)return this.authorityOptions.azureRegionConfiguration?.azureRegion&&(r=await rd(this.updateMetadataWithRegionalInformation.bind(this),zi,this.logger,this.performanceClient,this.correlationId)(r)),md(e,r,!0),Cr;throw Bo(Ur,this.defaultOpenIdConfigurationEndpoint)}updateEndpointMetadataFromLocalSources(e){this.logger.verbose("Attempting to get endpoint metadata from authority configuration");const t=this.getEndpointMetadataFromConfig();if(t)return this.logger.verbose("Found endpoint metadata in authority configuration"),md(e,t,!1),{source:wr};if(this.logger.verbose("Did not find endpoint metadata in the config... Attempting to get endpoint metadata from the hardcoded values."),this.authorityOptions.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get endpoint metadata from the network metadata cache.");else{const t=this.getEndpointMetadataFromHardcodedValues();if(t)return md(e,t,!1),{source:Tr,metadata:t};this.logger.verbose("Did not find endpoint metadata in hardcoded values... Attempting to get endpoint metadata from the network metadata cache.")}const r=bd(e);return this.isAuthoritySameType(e)&&e.endpointsFromNetwork&&!r?(this.logger.verbose("Found endpoint metadata in the cache."),{source:kr}):(r&&this.logger.verbose("The metadata entity is expired."),null)}isAuthoritySameType(e){return new yn(e.canonical_authority).getUrlComponents().PathSegments.length===this.canonicalAuthorityUrlComponents.PathSegments.length}getEndpointMetadataFromConfig(){if(this.authorityOptions.authorityMetadata)try{return JSON.parse(this.authorityOptions.authorityMetadata)}catch(e){throw an($o)}return null}async getEndpointMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Pi,this.correlationId);const e={},t=this.defaultOpenIdConfigurationEndpoint;this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: attempting to retrieve OAuth endpoints from ${t}`);try{const r=await this.networkInterface.sendGetRequestAsync(t,e),o=function(e){return e.hasOwnProperty("authorization_endpoint")&&e.hasOwnProperty("token_endpoint")&&e.hasOwnProperty("issuer")&&e.hasOwnProperty("jwks_uri")}(r.body);return o?r.body:(this.logger.verbose("Authority.getEndpointMetadataFromNetwork: could not parse response as OpenID configuration"),null)}catch(e){return this.logger.verbose(`Authority.getEndpointMetadataFromNetwork: ${e}`),null}}getEndpointMetadataFromHardcodedValues(){return this.hostnameAndPort in wn?wn[this.hostnameAndPort]:null}async updateMetadataWithRegionalInformation(e){this.performanceClient?.addQueueMeasurement(zi,this.correlationId);const t=this.authorityOptions.azureRegionConfiguration?.azureRegion;if(t){if(t!==Jt.AZURE_REGION_AUTO_DISCOVER_FLAG)return this.regionDiscoveryMetadata.region_outcome="2",this.regionDiscoveryMetadata.region_used=t,yd.replaceWithRegionalInformation(e,t);const r=await rd(this.regionDiscovery.detectRegion.bind(this.regionDiscovery),qi,this.logger,this.performanceClient,this.correlationId)(this.authorityOptions.azureRegionConfiguration?.environmentRegion,this.regionDiscoveryMetadata);if(r)return this.regionDiscoveryMetadata.region_outcome="4",this.regionDiscoveryMetadata.region_used=r,yd.replaceWithRegionalInformation(e,r);this.regionDiscoveryMetadata.region_outcome="5"}return e}async updateCloudDiscoveryMetadata(e){this.performanceClient?.addQueueMeasurement(ji,this.correlationId);const t=this.updateCloudDiscoveryMetadataFromLocalSources(e);if(t)return t;const r=await rd(this.getCloudDiscoveryMetadataFromNetwork.bind(this),Ri,this.logger,this.performanceClient,this.correlationId)();if(r)return vd(e,r,!0),Cr;throw an(Ko)}updateCloudDiscoveryMetadataFromLocalSources(e){this.logger.verbose("Attempting to get cloud discovery metadata from authority configuration"),this.logger.verbosePii(`Known Authorities: ${this.authorityOptions.knownAuthorities||Jt.NOT_APPLICABLE}`),this.logger.verbosePii(`Authority Metadata: ${this.authorityOptions.authorityMetadata||Jt.NOT_APPLICABLE}`),this.logger.verbosePii(`Canonical Authority: ${e.canonical_authority||Jt.NOT_APPLICABLE}`);const t=this.getCloudDiscoveryMetadataFromConfig();if(t)return this.logger.verbose("Found cloud discovery metadata in authority configuration"),vd(e,t,!1),wr;if(this.logger.verbose("Did not find cloud discovery metadata in the config... Attempting to get cloud discovery metadata from the hardcoded values."),this.options.skipAuthorityMetadataCache)this.logger.verbose("Skipping hardcoded cloud discovery metadata cache since skipAuthorityMetadataCache is set to true. Attempting to get cloud discovery metadata from the network metadata cache.");else{const t=(r=this.hostnameAndPort,xn(kn.metadata,r));if(t)return this.logger.verbose("Found cloud discovery metadata from hardcoded values."),vd(e,t,!1),Tr;this.logger.verbose("Did not find cloud discovery metadata in hardcoded values... Attempting to get cloud discovery metadata from the network metadata cache.")}var r;const o=bd(e);return this.isAuthoritySameType(e)&&e.aliasesFromNetwork&&!o?(this.logger.verbose("Found cloud discovery metadata in the cache."),kr):(o&&this.logger.verbose("The metadata entity is expired."),null)}getCloudDiscoveryMetadataFromConfig(){if(3===this.authorityType)return this.logger.verbose("CIAM authorities do not support cloud discovery metadata, generate the aliases from authority host."),yd.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort);if(this.authorityOptions.cloudDiscoveryMetadata){this.logger.verbose("The cloud discovery metadata has been provided as a network response, in the config.");try{this.logger.verbose("Attempting to parse the cloud discovery metadata.");const e=xn(JSON.parse(this.authorityOptions.cloudDiscoveryMetadata).metadata,this.hostnameAndPort);if(this.logger.verbose("Parsed the cloud discovery metadata."),e)return this.logger.verbose("There is returnable metadata attached to the parsed cloud discovery metadata."),e;this.logger.verbose("There is no metadata attached to the parsed cloud discovery metadata.")}catch(e){throw this.logger.verbose("Unable to parse the cloud discovery metadata. Throwing Invalid Cloud Discovery Metadata Error."),an(Vo)}}return this.isInKnownAuthorities()?(this.logger.verbose("The host is included in knownAuthorities. Creating new cloud discovery metadata from the host."),yd.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)):null}async getCloudDiscoveryMetadataFromNetwork(){this.performanceClient?.addQueueMeasurement(Ri,this.correlationId);const e=`${Jt.AAD_INSTANCE_DISCOVERY_ENDPT}${this.canonicalAuthority}oauth2/v2.0/authorize`,t={};let r=null;try{const o=await this.networkInterface.sendGetRequestAsync(e,t);let n,i;if(function(e){return e.hasOwnProperty("tenant_discovery_endpoint")&&e.hasOwnProperty("metadata")}(o.body))n=o.body,i=n.metadata,this.logger.verbosePii(`tenant_discovery_endpoint is: ${n.tenant_discovery_endpoint}`);else{if(!function(e){return e.hasOwnProperty("error")&&e.hasOwnProperty("error_description")}(o.body))return this.logger.error("AAD did not return a CloudInstanceDiscoveryResponse or CloudInstanceDiscoveryErrorResponse"),null;if(this.logger.warning(`A CloudInstanceDiscoveryErrorResponse was returned. The cloud instance discovery network request's status code is: ${o.status}`),n=o.body,n.error===Jt.INVALID_INSTANCE)return this.logger.error("The CloudInstanceDiscoveryErrorResponse error is invalid_instance."),null;this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error is ${n.error}`),this.logger.warning(`The CloudInstanceDiscoveryErrorResponse error description is ${n.error_description}`),this.logger.warning("Setting the value of the CloudInstanceDiscoveryMetadata (returned from the network) to []"),i=[]}this.logger.verbose("Attempting to find a match between the developer's authority and the CloudInstanceDiscoveryMetadata returned from the network request."),r=xn(i,this.hostnameAndPort)}catch(e){if(e instanceof Nr)this.logger.error(`There was a network error while attempting to get the cloud discovery instance metadata.\nError: ${e.errorCode}\nError Description: ${e.errorMessage}`);else{const t=e;this.logger.error(`A non-MSALJS error was thrown while attempting to get the cloud instance discovery metadata.\nError: ${t.name}\nError Description: ${t.message}`)}return null}return r||(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."),r=yd.createCloudDiscoveryMetadataFromHost(this.hostnameAndPort)),r}isInKnownAuthorities(){return this.authorityOptions.knownAuthorities.filter(e=>e&&yn.getDomainFromUrl(e).toLowerCase()===this.hostnameAndPort).length>0}static generateAuthority(e,t){let r;if(t&&t.azureCloudInstance!==Or){const e=t.tenant?t.tenant:Jt.DEFAULT_COMMON_TENANT;r=`${t.azureCloudInstance}/${e}/`}return r||e}static createCloudDiscoveryMetadataFromHost(e){return{preferred_network:e,preferred_cache:e,aliases:[e]}}getPreferredCache(){if(this.managedIdentity)return Jt.DEFAULT_AUTHORITY_HOST;if(this.discoveryComplete())return this.metadata.preferred_cache;throw Bo(Lr)}isAlias(e){return this.metadata.aliases.indexOf(e)>-1}isAliasOfKnownMicrosoftAuthority(e){return Cn.has(e)}static isPublicCloudAuthority(e){return Jt.KNOWN_PUBLIC_CLOUDS.indexOf(e)>=0}static buildRegionalAuthorityString(e,t,r){const o=new yn(e);o.validateAsUri();const n=o.getUrlComponents();let i=`${t}.${n.HostNameAndPort}`;this.isPublicCloudAuthority(n.HostNameAndPort)&&(i=`${t}.${Jt.REGIONAL_AUTH_PUBLIC_CLOUD_SUFFIX}`);const a=yn.constructAuthorityUriFromObject({...o.getUrlComponents(),HostNameAndPort:i}).urlString;return r?`${a}?${r}`:a}static replaceWithRegionalInformation(e,t){const r={...e};return r.authorization_endpoint=yd.buildRegionalAuthorityString(r.authorization_endpoint,t),r.token_endpoint=yd.buildRegionalAuthorityString(r.token_endpoint,t),r.end_session_endpoint&&(r.end_session_endpoint=yd.buildRegionalAuthorityString(r.end_session_endpoint,t)),r}static transformCIAMAuthority(e){let t=e;const r=new yn(e).getUrlComponents();return 0===r.PathSegments.length&&r.HostNameAndPort.endsWith(Jt.CIAM_AUTH_URL)&&(t=`${t}${r.HostNameAndPort.split(".")[0]}${Jt.AAD_TENANT_DOMAIN_SUFFIX}`),t}}function wd(e){return e.endsWith(Jt.FORWARD_SLASH)?e:`${e}${Jt.FORWARD_SLASH}`}yd.reservedTenantDomains=new Set(["{tenant}","{tenantid}",ir,sr,ar]);const kd="no_tokens_found",Cd="native_account_unavailable",Td="refresh_token_expired",xd="ux_not_allowed",Sd="bad_token",Id=["interaction_required","consent_required","login_required",Sd,xd],_d=["message_only","additional_action","basic_action","user_password_expired","consent_required","bad_token"],Ed={[kd]:"No refresh token found in the cache. Please sign-in.",[Cd]:"The requested account is not available in the native broker. It may have been deleted or logged out. Please sign-in again using an interactive API.",[Td]:"Refresh token has expired.",[Sd]:"Identity provider returned bad_token due to an expired or invalid refresh token. Please invoke an interactive API to resolve.",[xd]:"`canShowUI` flag in Edge was set to false. User interaction required on web page. Please invoke an interactive API to resolve."};class Ad extends Nr{constructor(e,t,r,o,n,i,a,s){super(e,t,r),Object.setPrototypeOf(this,Ad.prototype),this.timestamp=o||Jt.EMPTY_STRING,this.traceId=n||Jt.EMPTY_STRING,this.correlationId=i||Jt.EMPTY_STRING,this.claims=a||Jt.EMPTY_STRING,this.name="InteractionRequiredAuthError",this.errorNo=s}}function Bd(e,t,r){const o=!!e&&Id.indexOf(e)>-1,n=!!r&&_d.indexOf(r)>-1,i=!!t&&Id.some(e=>t.indexOf(e)>-1);return o||i||n}function Od(e){return new Ad(e,Ed[e])}function Rd(e,t){if(!e)throw Bo(Mr);try{const r=t(e);return JSON.parse(r)}catch(e){throw Bo(qr)}}function jd(e){if(!e)throw Bo(qr);const t=e.split(".",2);return{uid:t[0],utid:t.length<2?Jt.EMPTY_STRING:t[1]}}function Pd(e){return e&&(e.tid||e.tfp||e.acr)||null}class Nd{getAccountInfo(){return{homeAccountId:this.homeAccountId,environment:this.environment,tenantId:this.realm,username:this.username,localAccountId:this.localAccountId,loginHint:this.loginHint,name:this.name,nativeAccountId:this.nativeAccountId,authorityType:this.authorityType,tenantProfiles:new Map((this.tenantProfiles||[]).map(e=>[e.tenantId,e]))}}isSingleTenant(){return!this.tenantProfiles}static createAccount(e,t,r){const o=new Nd;let n;1===t.authorityType?o.authorityType="ADFS":t.protocolMode===Ar?o.authorityType=gr:o.authorityType="MSSTS",e.clientInfo&&r&&(n=Rd(e.clientInfo,r)),o.clientInfo=e.clientInfo,o.homeAccountId=e.homeAccountId,o.nativeAccountId=e.nativeAccountId;const i=e.environment||t&&t.getPreferredCache();if(!i)throw Bo(lo);o.environment=i,o.realm=n?.utid||Pd(e.idTokenClaims)||"",o.localAccountId=n?.uid||e.idTokenClaims?.oid||e.idTokenClaims?.sub||"";const a=e.idTokenClaims?.preferred_username||e.idTokenClaims?.upn,s=e.idTokenClaims?.emails?e.idTokenClaims.emails[0]:null;if(o.username=a||s||"",o.loginHint=e.idTokenClaims?.login_hint,o.name=e.idTokenClaims?.name||"",o.cloudGraphHostName=e.cloudGraphHostName,o.msGraphHost=e.msGraphHost,e.tenantProfiles)o.tenantProfiles=e.tenantProfiles;else{const t=dn(e.homeAccountId,o.localAccountId,o.realm,e.idTokenClaims);o.tenantProfiles=[t]}return o}static createFromAccountInfo(e,t,r){const o=new Nd;return o.authorityType=e.authorityType||gr,o.homeAccountId=e.homeAccountId,o.localAccountId=e.localAccountId,o.nativeAccountId=e.nativeAccountId,o.realm=e.tenantId,o.environment=e.environment,o.username=e.username,o.name=e.name,o.loginHint=e.loginHint,o.cloudGraphHostName=t,o.msGraphHost=r,o.tenantProfiles=Array.from(e.tenantProfiles?.values()||[]),o}static generateHomeAccountId(e,t,r,o,n){if(1!==t&&2!==t){if(e)try{const t=Rd(e,o.base64Decode);if(t.uid&&t.utid)return`${t.uid}.${t.utid}`}catch(e){}r.warning("No client info in response")}return n?.sub||""}static isAccountEntity(e){return!!e&&e.hasOwnProperty("homeAccountId")&&e.hasOwnProperty("environment")&&e.hasOwnProperty("realm")&&e.hasOwnProperty("localAccountId")&&e.hasOwnProperty("username")&&e.hasOwnProperty("authorityType")}static accountInfoIsEqual(e,t,r){if(!e||!t)return!1;let o=!0;if(r){const r=e.idTokenClaims||{},n=t.idTokenClaims||{};o=r.iat===n.iat&&r.nonce===n.nonce}return e.homeAccountId===t.homeAccountId&&e.localAccountId===t.localAccountId&&e.username===t.username&&e.tenantId===t.tenantId&&e.loginHint===t.loginHint&&e.environment===t.environment&&e.nativeAccountId===t.nativeAccountId&&o}}function zd(e,t,r){return{clientId:e,authority:t.authority,scopes:t.scopes,homeAccountIdentifier:r,claims:t.claims,authenticationScheme:t.authenticationScheme,resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,sshKid:t.sshKid,embeddedClientId:t.embeddedClientId||t.tokenBodyParameters?.clientId}}var qd=r(64583).Promise;const Md="None";class Fd{initialize(){return qd.resolve()}getItem(e){const t=`${encodeURIComponent(e)}`,r=document.cookie.split(";");for(let e=0;e{const r=decodeURIComponent(e).trim().split("=");t.push(r[0])}),t}containsKey(e){return this.getKeys().includes(e)}decryptData(){return qd.resolve(null)}}function Dd(e,t){const r=e.getItem(Ml(t));return r?JSON.parse(r):[]}function Ld(e,t,r){const o=t.getItem(Fl(e,r));if(o){const e=JSON.parse(o);if(e&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("accessToken")&&e.hasOwnProperty("refreshToken"))return e}return{idToken:[],accessToken:[],refreshToken:[]}}function Hd(e){return e.hasOwnProperty("id")&&e.hasOwnProperty("nonce")&&e.hasOwnProperty("data")}var Ud=r(64583).Promise;const Wd="msal.cache.encryption";class Vd{constructor(e,t,r){if(!window.localStorage)throw wl(gl);this.memoryStorage=new Xl,this.initialized=!1,this.clientId=e,this.logger=t,this.performanceClient=r,this.broadcast=new BroadcastChannel("msal.broadcast.cache")}async initialize(e){const t=new Fd,r=t.getItem(Wd);let o={key:"",id:""};if(r)try{o=JSON.parse(r)}catch(e){}if(o.key&&o.id){const t=td(Vc,oa,this.logger,this.performanceClient,e)(o.key);this.encryptionCookie={id:o.id,key:await rd(dl,ta,this.logger,this.performanceClient,e)(t)}}else{const r=il(),o=await rd(ll,ra,this.logger,this.performanceClient,e)(),n=td(Lc,na,this.logger,this.performanceClient,e)(new Uint8Array(o));this.encryptionCookie={id:r,key:await rd(dl,ta,this.logger,this.performanceClient,e)(o)};const i={id:r,key:n};t.setItem(Wd,JSON.stringify(i),0,!0,Md)}await rd(this.importExistingCache.bind(this),Ki,this.logger,this.performanceClient,e)(e),this.broadcast.addEventListener("message",this.updateCache.bind(this)),this.initialized=!0}getItem(e){return window.localStorage.getItem(e)}getUserData(e){if(!this.initialized)throw Qs(Fs);return this.memoryStorage.getItem(e)}async decryptData(e,t,r){if(!this.initialized||!this.encryptionCookie)throw Qs(Fs);if(t.id!==this.encryptionCookie.id)return this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},r),null;const o=await rd(hl,aa,this.logger,this.performanceClient,r)(this.encryptionCookie.key,t.nonce,this.getContext(e),t.data);if(!o)return null;try{return JSON.parse(o)}catch(e){return this.performanceClient.incrementFields({encryptedCacheCorruptionCount:1},r),null}}setItem(e,t){window.localStorage.setItem(e,t)}async setUserData(e,t,r,o){if(!this.initialized||!this.encryptionCookie)throw Qs(Fs);const{data:n,nonce:i}=await rd(fl,ia,this.logger,this.performanceClient,r)(this.encryptionCookie.key,t,this.getContext(e)),a={id:this.encryptionCookie.id,nonce:i,data:n,lastUpdatedAt:o};this.memoryStorage.setItem(e,t),this.setItem(e,JSON.stringify(a)),this.broadcast.postMessage({key:e,value:t,context:this.getContext(e)})}removeItem(e){this.memoryStorage.containsKey(e)&&(this.memoryStorage.removeItem(e),this.broadcast.postMessage({key:e,value:null,context:this.getContext(e)})),window.localStorage.removeItem(e)}getKeys(){return Object.keys(window.localStorage)}containsKey(e){return window.localStorage.hasOwnProperty(e)}clear(){this.memoryStorage.clear(),Dd(this).forEach(e=>this.removeItem(e));const e=Ld(this.clientId,this);e.idToken.forEach(e=>this.removeItem(e)),e.accessToken.forEach(e=>this.removeItem(e)),e.refreshToken.forEach(e=>this.removeItem(e)),this.getKeys().forEach(e=>{(e.startsWith(Bl)||-1!==e.indexOf(this.clientId))&&this.removeItem(e)})}async importExistingCache(e){if(!this.encryptionCookie)return;let t=Dd(this);t=await this.importArray(t,e),t.length?this.setItem(Ml(),JSON.stringify(t)):this.removeItem(Ml());const r=Ld(this.clientId,this);r.idToken=await this.importArray(r.idToken,e),r.accessToken=await this.importArray(r.accessToken,e),r.refreshToken=await this.importArray(r.refreshToken,e),r.idToken.length||r.accessToken.length||r.refreshToken.length?this.setItem(Fl(this.clientId),JSON.stringify(r)):this.removeItem(Fl(this.clientId))}async getItemFromEncryptedCache(e,t){if(!this.encryptionCookie)return null;const r=this.getItem(e);if(!r)return null;let o;try{o=JSON.parse(r)}catch(e){return null}return Hd(o)?o.id!==this.encryptionCookie.id?(this.performanceClient.incrementFields({encryptedCacheExpiredCount:1},t),null):rd(hl,aa,this.logger,this.performanceClient,t)(this.encryptionCookie.key,o.nonce,this.getContext(e),o.data):(this.performanceClient.incrementFields({unencryptedCacheCount:1},t),o)}async importArray(e,t){const r=[],o=[];return e.forEach(e=>{const n=this.getItemFromEncryptedCache(e,t).then(t=>{t?(this.memoryStorage.setItem(e,t),r.push(e)):this.removeItem(e)});o.push(n)}),await Ud.all(o),r}getContext(e){let t="";return e.includes(this.clientId)&&(t=this.clientId),t}updateCache(e){this.logger.trace("Updating internal cache from broadcast event");const t=this.performanceClient.startMeasurement(Ji);t.add({isBackground:!0});const{key:r,value:o,context:n}=e.data;return r?n&&n!==this.clientId?(this.logger.trace(`Ignoring broadcast event from clientId: ${n}`),void t.end({success:!1,errorCode:"contextMismatch"})):(o?(this.memoryStorage.setItem(r,o),this.logger.verbose("Updated item in internal cache")):(this.memoryStorage.removeItem(r),this.logger.verbose("Removed item from internal cache")),void t.end({success:!0})):(this.logger.error("Broadcast event missing key"),void t.end({success:!1,errorCode:"noKey"}))}}var $d=r(64583).Promise;class Kd{constructor(){if(!window.sessionStorage)throw wl(gl)}async initialize(){}getItem(e){return window.sessionStorage.getItem(e)}getUserData(e){return this.getItem(e)}setItem(e,t){window.sessionStorage.setItem(e,t)}async setUserData(e,t){this.setItem(e,t)}removeItem(e){window.sessionStorage.removeItem(e)}getKeys(){return Object.keys(window.sessionStorage)}containsKey(e){return window.sessionStorage.hasOwnProperty(e)}decryptData(){return $d.resolve(null)}}const Gd="msal:initializeEnd",Jd="msal:accountAdded",Qd="msal:accountRemoved",Xd="msal:activeAccountChanged",Yd="msal:loginStart",Zd="msal:loginSuccess",eu="msal:loginFailure",tu="msal:acquireTokenStart",ru="msal:acquireTokenSuccess",ou="msal:acquireTokenFailure",nu="msal:acquireTokenByCodeFailure",iu="msal:handleRedirectEnd",au="msal:popupOpened",su="msal:logoutStart",cu="msal:logoutSuccess",lu="msal:logoutFailure",du="msal:logoutEnd";function uu(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}var fu=r(64583).Promise;class hu extends Bn{constructor(e,t,r,o,n,i,a){super(e,r,o,n,a),this.cacheConfig=t,this.logger=o,this.internalStorage=new Xl,this.browserStorage=pu(e,t.cacheLocation,o,n),this.temporaryCacheStorage=pu(e,t.temporaryCacheLocation,o,n),this.cookieStorage=new Fd,this.eventHandler=i}async initialize(e){this.performanceClient.addFields({cacheLocation:this.cacheConfig.cacheLocation,cacheRetentionDays:this.cacheConfig.cacheRetentionDays},e),await this.browserStorage.initialize(e),await this.migrateExistingCache(e),this.trackVersionChanges(e)}async migrateExistingCache(e){const t=Dd(this.browserStorage,0),r=Ld(this.clientId,this.browserStorage,0);this.performanceClient.addFields({oldAccountCount:t.length,oldAccessCount:r.accessToken.length,oldIdCount:r.idToken.length,oldRefreshCount:r.refreshToken.length},e);const o=Dd(this.browserStorage,1),n=Ld(this.clientId,this.browserStorage,1);this.performanceClient.addFields({currAccountCount:o.length,currAccessCount:n.accessToken.length,currIdCount:n.idToken.length,currRefreshCount:n.refreshToken.length},e),await fu.all([this.updateV0ToCurrent(1,t,o,e),this.updateV0ToCurrent(1,r.idToken,n.idToken,e),this.updateV0ToCurrent(1,r.accessToken,n.accessToken,e),this.updateV0ToCurrent(1,r.refreshToken,n.refreshToken,e)]),t.length>0?this.browserStorage.setItem(Ml(0),JSON.stringify(t)):this.browserStorage.removeItem(Ml(0)),o.length>0?this.browserStorage.setItem(Ml(1),JSON.stringify(o)):this.browserStorage.removeItem(Ml(1)),this.setTokenKeys(r,e,0),this.setTokenKeys(n,e,1)}async updateV0ToCurrent(e,t,r,o){const n=[];for(const i of[...t]){const a=this.browserStorage.getItem(i),s=this.validateAndParseJson(a||"");if(!s){uu(t,i);continue}s.lastUpdatedAt||(s.lastUpdatedAt=Date.now().toString(),this.setItem(i,JSON.stringify(s),o));const c=Hd(s)?await this.browserStorage.decryptData(i,s,o):s;let l;if(c&&(hd(c)||pd(c))&&(l=c.expiresOn),!c||cd(s.lastUpdatedAt,this.cacheConfig.cacheRetentionDays)||l&&sd(l,300))this.browserStorage.removeItem(i),uu(t,i),this.performanceClient.incrementFields({expiredCacheRemovedCount:1},o);else if(this.cacheConfig.cacheLocation!==Ba||Hd(s)){const t=`${Bl}.${e}-${i}`,a=this.browserStorage.getItem(t);if(!a){n.push(this.setUserData(t,JSON.stringify(c),o,s.lastUpdatedAt).then(()=>{r.push(t),this.performanceClient.incrementFields({upgradedCacheCount:1},o)}));continue}{const e=this.validateAndParseJson(a);if(Number(s.lastUpdatedAt)>Number(e.lastUpdatedAt)){n.push(this.setUserData(t,JSON.stringify(c),o,s.lastUpdatedAt).then(()=>{this.performanceClient.incrementFields({updatedCacheFromV0Count:1},o)}));continue}}}}return fu.all(n)}trackVersionChanges(e){const t=this.browserStorage.getItem(Nl);t&&(this.logger.info(`MSAL.js was last initialized by version: ${t}`),this.performanceClient.addFields({previousLibraryVersion:t},e)),t!==Al&&this.setItem(Nl,Al,e)}validateAndParseJson(e){if(!e)return null;try{const t=JSON.parse(e);return t&&"object"==typeof t?t:null}catch(e){return null}}setItem(e,t,r){let o=0,n=[];for(let i=0;i<=20;i++)try{this.browserStorage.setItem(e,t),i>0&&(i<=o?this.removeAccessTokenKeys(n.slice(0,i),r,0):(this.removeAccessTokenKeys(n.slice(0,o),r,0),this.removeAccessTokenKeys(n.slice(o,i),r)));break}catch(a){const s=An(a);if(!(s.errorCode===Sn&&i<20))throw s;if(!n.length){const r=e===Fl(this.clientId,0)?JSON.parse(t).accessToken:this.getTokenKeys(0).accessToken,i=e===Fl(this.clientId)?JSON.parse(t).accessToken:this.getTokenKeys().accessToken;n=[...r,...i],o=r.length}if(n.length<=i)throw s;this.removeAccessToken(n[i],r,!1)}}async setUserData(e,t,r,o){let n=0,i=[];for(let a=0;a<=20;a++)try{await rd(this.browserStorage.setUserData.bind(this.browserStorage),Gi,this.logger,this.performanceClient)(e,t,r,o),a>0&&(a<=n?this.removeAccessTokenKeys(i.slice(0,a),r,0):(this.removeAccessTokenKeys(i.slice(0,n),r,0),this.removeAccessTokenKeys(i.slice(n,a),r)));break}catch(e){const t=An(e);if(!(t.errorCode===Sn&&a<20))throw t;if(!i.length){const e=this.getTokenKeys(0).accessToken,t=this.getTokenKeys().accessToken;i=[...e,...t],n=e.length}if(i.length<=a)throw t;this.removeAccessToken(i[a],r,!1)}}getAccount(e,t){this.logger.trace("BrowserCacheManager.getAccount called");const r=this.browserStorage.getUserData(e);if(!r)return this.removeAccountKeyFromMap(e,t),null;const o=this.validateAndParseJson(r);return o&&Nd.isAccountEntity(o)?Bn.toObject(new Nd,o):null}async setAccount(e,t){this.logger.trace("BrowserCacheManager.setAccount called");const r=this.generateAccountKey(e.getAccountInfo()),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(r,JSON.stringify(e),t,o);const n=this.addAccountKeyToMap(r,t);this.cacheConfig.cacheLocation===Ba&&n&&this.eventHandler.emitEvent(Jd,void 0,e.getAccountInfo())}getAccountKeys(){return Dd(this.browserStorage)}addAccountKeyToMap(e,t){this.logger.trace("BrowserCacheManager.addAccountKeyToMap called"),this.logger.tracePii(`BrowserCacheManager.addAccountKeyToMap called with key: ${e}`);const r=this.getAccountKeys();return-1===r.indexOf(e)?(r.push(e),this.setItem(Ml(),JSON.stringify(r),t),this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key added"),!0):(this.logger.verbose("BrowserCacheManager.addAccountKeyToMap account key already exists in map"),!1)}removeAccountKeyFromMap(e,t){this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap called"),this.logger.tracePii(`BrowserCacheManager.removeAccountKeyFromMap called with key: ${e}`);const r=this.getAccountKeys(),o=r.indexOf(e);if(o>-1){if(r.splice(o,1),0===r.length)return void this.removeItem(Ml());this.setItem(Ml(),JSON.stringify(r),t),this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap account key removed")}else this.logger.trace("BrowserCacheManager.removeAccountKeyFromMap key not found in existing map")}removeAccount(e,t){const r=this.getActiveAccount(t);r?.homeAccountId===e.homeAccountId&&r?.environment===e.environment&&this.setActiveAccount(null,t),super.removeAccount(e,t),this.removeAccountKeyFromMap(this.generateAccountKey(e),t),this.browserStorage.getKeys().forEach(t=>{t.includes(e.homeAccountId)&&t.includes(e.environment)&&this.browserStorage.removeItem(t)}),this.cacheConfig.cacheLocation===Ba&&this.eventHandler.emitEvent(Qd,void 0,e)}removeIdToken(e,t){super.removeIdToken(e,t);const r=this.getTokenKeys(),o=r.idToken.indexOf(e);o>-1&&(this.logger.info("idToken removed from tokenKeys map"),r.idToken.splice(o,1),this.setTokenKeys(r,t))}removeAccessToken(e,t,r=!0){super.removeAccessToken(e,t),r&&this.removeAccessTokenKeys([e],t)}removeAccessTokenKeys(e,t,r=1){this.logger.trace("removeAccessTokenKey called");const o=this.getTokenKeys(r);let n=0;if(e.forEach(e=>{const t=o.accessToken.indexOf(e);t>-1&&(o.accessToken.splice(t,1),n++)}),n>0)return this.logger.info(`removed ${n} accessToken keys from tokenKeys map`),void this.setTokenKeys(o,t,r)}removeRefreshToken(e,t){super.removeRefreshToken(e,t);const r=this.getTokenKeys(),o=r.refreshToken.indexOf(e);o>-1&&(this.logger.info("refreshToken removed from tokenKeys map"),r.refreshToken.splice(o,1),this.setTokenKeys(r,t))}getTokenKeys(e=1){return Ld(this.clientId,this.browserStorage,e)}setTokenKeys(e,t,r=1){0!==e.idToken.length||0!==e.accessToken.length||0!==e.refreshToken.length?this.setItem(Fl(this.clientId,r),JSON.stringify(e),t):this.removeItem(Fl(this.clientId,r))}getIdTokenCredential(e,t){const r=this.browserStorage.getUserData(e);if(!r)return this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),this.removeIdToken(e,t),null;const o=this.validateAndParseJson(r);return o&&(n=o)&&fd(n)&&n.hasOwnProperty("realm")&&n.credentialType===mr.ID_TOKEN?(this.logger.trace("BrowserCacheManager.getIdTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getIdTokenCredential: called, no cache hit"),null);var n}async setIdTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setIdTokenCredential called");const r=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(r,JSON.stringify(e),t,o);const n=this.getTokenKeys();-1===n.idToken.indexOf(r)&&(this.logger.info("BrowserCacheManager: addTokenKey - idToken added to map"),n.idToken.push(r),this.setTokenKeys(n,t))}getAccessTokenCredential(e,t){const r=this.browserStorage.getUserData(e);if(!r)return this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),this.removeAccessTokenKeys([e],t),null;const o=this.validateAndParseJson(r);return o&&hd(o)?(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getAccessTokenCredential: called, no cache hit"),null)}async setAccessTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setAccessTokenCredential called");const r=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(r,JSON.stringify(e),t,o);const n=this.getTokenKeys(),i=n.accessToken.indexOf(r);-1!==i&&n.accessToken.splice(i,1),this.logger.trace(`access token ${-1===i?"added to":"updated in"} map`),n.accessToken.push(r),this.setTokenKeys(n,t)}getRefreshTokenCredential(e,t){const r=this.browserStorage.getUserData(e);if(!r)return this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),this.removeRefreshToken(e,t),null;const o=this.validateAndParseJson(r);return o&&pd(o)?(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: cache hit"),o):(this.logger.trace("BrowserCacheManager.getRefreshTokenCredential: called, no cache hit"),null)}async setRefreshTokenCredential(e,t){this.logger.trace("BrowserCacheManager.setRefreshTokenCredential called");const r=this.generateCredentialKey(e),o=Date.now().toString();e.lastUpdatedAt=o,await this.setUserData(r,JSON.stringify(e),t,o);const n=this.getTokenKeys();-1===n.refreshToken.indexOf(r)&&(this.logger.info("BrowserCacheManager: addTokenKey - refreshToken added to map"),n.refreshToken.push(r),this.setTokenKeys(n,t))}getAppMetadata(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return r&&((o=r)&&0===e.indexOf(vr)&&o.hasOwnProperty("clientId")&&o.hasOwnProperty("environment"))?(this.logger.trace("BrowserCacheManager.getAppMetadata: cache hit"),r):(this.logger.trace("BrowserCacheManager.getAppMetadata: called, no cache hit"),null);var o}setAppMetadata(e,t){this.logger.trace("BrowserCacheManager.setAppMetadata called");const r=function({environment:e,clientId:t}){return[vr,e,t].join("-").toLowerCase()}(e);this.setItem(r,JSON.stringify(e),t)}getServerTelemetry(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null;const r=this.validateAndParseJson(t);return r&&function(e,t){const r=0===e.indexOf(xr.CACHE_KEY);let o=!0;return t&&(o=t.hasOwnProperty("failedRequests")&&t.hasOwnProperty("errors")&&t.hasOwnProperty("cacheHits")),r&&o}(e,r)?(this.logger.trace("BrowserCacheManager.getServerTelemetry: cache hit"),r):(this.logger.trace("BrowserCacheManager.getServerTelemetry: called, no cache hit"),null)}setServerTelemetry(e,t,r){this.logger.trace("BrowserCacheManager.setServerTelemetry called"),this.setItem(e,JSON.stringify(t),r)}getAuthorityMetadata(e){const t=this.internalStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getAuthorityMetadata: called, no cache hit"),null;const r=this.validateAndParseJson(t);return r&&function(e,t){return!!t&&0===e.indexOf(yr)&&t.hasOwnProperty("aliases")&&t.hasOwnProperty("preferred_cache")&&t.hasOwnProperty("preferred_network")&&t.hasOwnProperty("canonical_authority")&&t.hasOwnProperty("authorization_endpoint")&&t.hasOwnProperty("token_endpoint")&&t.hasOwnProperty("issuer")&&t.hasOwnProperty("aliasesFromNetwork")&&t.hasOwnProperty("endpointsFromNetwork")&&t.hasOwnProperty("expiresAt")&&t.hasOwnProperty("jwks_uri")}(e,r)?(this.logger.trace("BrowserCacheManager.getAuthorityMetadata: cache hit"),r):null}getAuthorityMetadataKeys(){return this.internalStorage.getKeys().filter(e=>this.isAuthorityMetadata(e))}setWrapperMetadata(e,t){this.internalStorage.setItem(La,e),this.internalStorage.setItem(Ha,t)}getWrapperMetadata(){return[this.internalStorage.getItem(La)||Jt.EMPTY_STRING,this.internalStorage.getItem(Ha)||Jt.EMPTY_STRING]}setAuthorityMetadata(e,t){this.logger.trace("BrowserCacheManager.setAuthorityMetadata called"),this.internalStorage.setItem(e,JSON.stringify(t))}getActiveAccount(e){const t=this.generateCacheKey(nr),r=this.browserStorage.getItem(t);if(!r)return this.logger.trace("BrowserCacheManager.getActiveAccount: No active account filters found"),null;const o=this.validateAndParseJson(r);return o?(this.logger.trace("BrowserCacheManager.getActiveAccount: Active account filters schema found"),this.getAccountInfoFilteredBy({homeAccountId:o.homeAccountId,localAccountId:o.localAccountId,tenantId:o.tenantId},e)):(this.logger.trace("BrowserCacheManager.getActiveAccount: No active account found"),null)}setActiveAccount(e,t){const r=this.generateCacheKey(nr);if(e){this.logger.verbose("setActiveAccount: Active account set");const o={homeAccountId:e.homeAccountId,localAccountId:e.localAccountId,tenantId:e.tenantId,lastUpdatedAt:nd().toString()};this.setItem(r,JSON.stringify(o),t)}else this.logger.verbose("setActiveAccount: No account passed, active account not set"),this.browserStorage.removeItem(r);this.eventHandler.emitEvent(Xd)}getThrottlingCache(e){const t=this.browserStorage.getItem(e);if(!t)return this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null;const r=this.validateAndParseJson(t);return r&&function(e,t){let r=!1;e&&(r=0===e.indexOf(Ir));let o=!0;return t&&(o=t.hasOwnProperty("throttleTime")),r&&o}(e,r)?(this.logger.trace("BrowserCacheManager.getThrottlingCache: cache hit"),r):(this.logger.trace("BrowserCacheManager.getThrottlingCache: called, no cache hit"),null)}setThrottlingCache(e,t,r){this.logger.trace("BrowserCacheManager.setThrottlingCache called"),this.setItem(e,JSON.stringify(t),r)}getTemporaryCache(e,t){const r=t?this.generateCacheKey(e):e;if(this.cacheConfig.storeAuthStateInCookie){const e=this.cookieStorage.getItem(r);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: storeAuthStateInCookies set to true, retrieving from cookies"),e}const o=this.temporaryCacheStorage.getItem(r);if(!o){if(this.cacheConfig.cacheLocation===Ba){const e=this.browserStorage.getItem(r);if(e)return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item found in local storage"),e}return this.logger.trace("BrowserCacheManager.getTemporaryCache: No cache item found in local storage"),null}return this.logger.trace("BrowserCacheManager.getTemporaryCache: Temporary cache item returned"),o}setTemporaryCache(e,t,r){const o=r?this.generateCacheKey(e):e;this.temporaryCacheStorage.setItem(o,t),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.setTemporaryCache: storeAuthStateInCookie set to true, setting item cookie"),this.cookieStorage.setItem(o,t,void 0,this.cacheConfig.secureCookies))}removeItem(e){this.browserStorage.removeItem(e)}removeTemporaryItem(e){this.temporaryCacheStorage.removeItem(e),this.cacheConfig.storeAuthStateInCookie&&(this.logger.trace("BrowserCacheManager.removeItem: storeAuthStateInCookie is true, clearing item cookie"),this.cookieStorage.removeItem(e))}getKeys(){return this.browserStorage.getKeys()}clear(e){this.removeAllAccounts(e),this.removeAppMetadata(e),this.temporaryCacheStorage.getKeys().forEach(e=>{-1===e.indexOf(Bl)&&-1===e.indexOf(this.clientId)||this.removeTemporaryItem(e)}),this.browserStorage.getKeys().forEach(e=>{-1===e.indexOf(Bl)&&-1===e.indexOf(this.clientId)||this.browserStorage.removeItem(e)}),this.internalStorage.clear()}clearTokensAndKeysWithClaims(e){this.performanceClient.addQueueMeasurement(Vi,e);const t=this.getTokenKeys();let r=0;t.accessToken.forEach(t=>{const o=this.getAccessTokenCredential(t,e);o?.requestedClaimsHash&&t.includes(o.requestedClaimsHash.toLowerCase())&&(this.removeAccessToken(t,e),r++)}),r>0&&this.logger.warning(`${r} access tokens with claims in the cache keys have been removed from the cache.`)}generateCacheKey(e){return sn.startsWith(e,Bl)?e:`${Bl}.${this.clientId}.${e}`}generateCredentialKey(e){const t=e.credentialType===mr.REFRESH_TOKEN&&e.familyId||e.clientId,r=e.tokenType&&e.tokenType.toLowerCase()!==Sr.BEARER.toLowerCase()?e.tokenType.toLowerCase():"";return[`${Bl}.1`,e.homeAccountId,e.environment,e.credentialType,t,e.realm||"",e.target||"",e.requestedClaimsHash||"",r].join("-").toLowerCase()}generateAccountKey(e){const t=e.homeAccountId.split(".")[1];return[`${Bl}.1`,e.homeAccountId,e.environment,t||e.tenantId||""].join("-").toLowerCase()}resetRequestCache(){this.logger.trace("BrowserCacheManager.resetRequestCache called"),this.removeTemporaryItem(this.generateCacheKey(qa)),this.removeTemporaryItem(this.generateCacheKey(Ma)),this.removeTemporaryItem(this.generateCacheKey(Na)),this.removeTemporaryItem(this.generateCacheKey(za)),this.removeTemporaryItem(this.generateCacheKey(Da)),this.setInteractionInProgress(!1)}cacheAuthorizeRequest(e,t){this.logger.trace("BrowserCacheManager.cacheAuthorizeRequest called");const r=Hc(JSON.stringify(e));if(this.setTemporaryCache(qa,r,!0),t){const e=Hc(t);this.setTemporaryCache(Ma,e,!0)}}getCachedRequest(){this.logger.trace("BrowserCacheManager.getCachedRequest called");const e=this.getTemporaryCache(qa,!0);if(!e)throw Qs(ys);const t=this.getTemporaryCache(Ma,!0);let r,o="";try{r=JSON.parse(Wc(e)),t&&(o=Wc(t))}catch(t){throw this.logger.errorPii(`Attempted to parse: ${e}`),this.logger.error(`Parsing cached token request threw with error: ${t}`),Qs(ws)}return[r,o]}getCachedNativeRequest(){this.logger.trace("BrowserCacheManager.getCachedNativeRequest called");const e=this.getTemporaryCache(Da,!0);if(!e)return this.logger.trace("BrowserCacheManager.getCachedNativeRequest: No cached native request found"),null;return this.validateAndParseJson(e)||(this.logger.error("BrowserCacheManager.getCachedNativeRequest: Unable to parse native request"),null)}isInteractionInProgress(e){const t=this.getInteractionInProgress()?.clientId;return e?t===this.clientId:!!t}getInteractionInProgress(){const e=`${Bl}.${Fa}`,t=this.getTemporaryCache(e,!1);try{return t?JSON.parse(t):null}catch(t){return this.logger.error("Cannot parse interaction status. Removing temporary cache items and clearing url hash. Retrying interaction should fix the error"),this.removeTemporaryItem(e),this.resetRequestCache(),kl(window),null}}setInteractionInProgress(e,t=ja){const r=`${Bl}.${Fa}`;if(e){if(this.getInteractionInProgress())throw Qs(as);this.setTemporaryCache(r,JSON.stringify({clientId:this.clientId,type:t}),!1)}else e||this.getInteractionInProgress()?.clientId!==this.clientId||this.removeTemporaryItem(r)}async hydrateCache(e,t){const r=ld(e.account?.homeAccountId,e.account?.environment,e.idToken,this.clientId,e.tenantId);let o;t.claims&&(o=await this.cryptoImpl.hashString(t.claims));const n={idToken:r,accessToken:dd(e.account?.homeAccountId,e.account.environment,e.accessToken,this.clientId,e.tenantId,e.scopes.join(" "),e.expiresOn?id(e.expiresOn):0,e.extExpiresOn?id(e.extExpiresOn):0,Wc,void 0,e.tokenType,void 0,t.sshKid,t.claims,o)};return this.saveCacheRecord(n,e.correlationId)}async saveCacheRecord(e,t,r){try{await super.saveCacheRecord(e,t,r)}catch(e){if(e instanceof En&&this.performanceClient&&t)try{const e=this.getTokenKeys();this.performanceClient.addFields({cacheRtCount:e.refreshToken.length,cacheIdCount:e.idToken.length,cacheAtCount:e.accessToken.length},t)}catch(e){}throw e}}}function pu(e,t,r,o){try{switch(t){case Ba:return new Vd(e,r,o);case Oa:return new Kd}}catch(e){r.error(e)}return new Xl}class gu{constructor(e){this.eventCallbacks=new Map,this.logger=e||new Er({}),"undefined"!=typeof BroadcastChannel&&(this.broadcastChannel=new BroadcastChannel("msal.broadcast.event")),this.invokeCrossTabCallbacks=this.invokeCrossTabCallbacks.bind(this)}addEventCallback(e,t,r){if("undefined"!=typeof window){const o=r||il();return this.eventCallbacks.has(o)?(this.logger.error(`Event callback with id: ${o} is already registered. Please provide a unique id or remove the existing callback and try again.`),null):(this.eventCallbacks.set(o,[e,t||[]]),this.logger.verbose(`Event callback registered with id: ${o}`),o)}return null}removeEventCallback(e){this.eventCallbacks.delete(e),this.logger.verbose(`Event callback ${e} removed.`)}emitEvent(e,t,r,o){const n={eventType:e,interactionType:t||null,payload:r||null,error:o||null,timestamp:Date.now()};switch(e){case Jd:case Qd:case Xd:this.broadcastChannel?.postMessage(n);break;default:this.invokeCallbacks(n)}}invokeCallbacks(e){this.eventCallbacks.forEach(([t,r],o)=>{(0===r.length||r.includes(e.eventType))&&(this.logger.verbose(`Emitting event to callback ${o}: ${e.eventType}`),t.apply(null,[e]))})}invokeCrossTabCallbacks(e){const t=e.data;this.invokeCallbacks(t)}subscribeCrossTab(){this.broadcastChannel?.addEventListener("message",this.invokeCrossTabCallbacks)}unsubscribeCrossTab(){this.broadcastChannel?.removeEventListener("message",this.invokeCrossTabCallbacks)}}const mu="home_account_id",vu="UPN";async function bu(e,t,r,o,n,i,a){a?.addQueueMeasurement(Bi,i);const s=yd.transformCIAMAuthority(wd(e)),c=new yd(s,t,r,o,n,i,a);try{return await rd(c.resolveEndpointsAsync.bind(c),Oi,n,a,i)(),c}catch(e){throw Bo(Lr)}}class yu extends Nr{constructor(e,t,r,o,n){super(e,t,r),this.name="ServerError",this.errorNo=o,this.status=n,Object.setPrototypeOf(this,yu.prototype)}}class wu{static generateThrottlingStorageKey(e){return`${Ir}.${JSON.stringify(e)}`}static preProcess(e,t,r){const o=wu.generateThrottlingStorageKey(t),n=e.getThrottlingCache(o);if(n){if(n.throttleTime=500&&e.status<600}static checkResponseForRetryAfter(e){return!!e.headers&&e.headers.hasOwnProperty(er)&&(e.status<200||e.status>=300)}static calculateThrottleTime(e){const t=e<=0?0:e,r=Date.now()/1e3;return Math.floor(1e3*Math.min(r+(t||60),r+3600))}static removeThrottle(e,t,r,o){const n=zd(t,r,o),i=this.generateThrottlingStorageKey(n);e.removeItem(i,r.correlationId)}}class ku{constructor(e,t){this.config=function({authOptions:e,systemOptions:t,loggerOptions:r,cacheOptions:o,storageInterface:n,networkInterface:i,cryptoInterface:a,clientCredentials:s,libraryInfo:c,telemetry:l,serverTelemetryManager:d,persistencePlugin:u,serializableCache:f}){const h={...ha,...r};return{authOptions:(p=e,{clientCapabilities:[],azureCloudOptions:ba,skipAuthorityMetadataCache:!1,instanceAware:!1,encodeExtraQueryParams:!1,...p}),systemOptions:{...fa,...t},loggerOptions:h,cacheOptions:{...pa,...o},storageInterface:n||new On(e.clientId,Oo,new Er(h),new ua),networkInterface:i||ga,cryptoInterface:a||Oo,clientCredentials:s||va,libraryInfo:{...ma,...c},telemetry:{...ya,...l},serverTelemetryManager:d||null,persistencePlugin:u||null,serializableCache:f||null};var p}(e),this.logger=new Er(this.config.loggerOptions,Ro,jo),this.cryptoUtils=this.config.cryptoInterface,this.cacheManager=this.config.storageInterface,this.networkClient=this.config.networkInterface,this.serverTelemetryManager=this.config.serverTelemetryManager,this.authority=this.config.authOptions.authority,this.performanceClient=t}createTokenRequestHeaders(e){const t={};if(t[Zt]=Jt.URL_FORM_CONTENT_TYPE,!this.config.systemOptions.preventCorsPreflight&&e)switch(e.type){case mu:try{const r=jd(e.credential);t[tr]=`Oid:${r.uid}@${r.utid}`}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case vu:t[tr]=`UPN: ${e.credential}`}return t}async executePostToTokenEndpoint(e,t,r,o,n,i){i&&this.performanceClient?.addQueueMeasurement(i,n);const a=await this.sendPostRequest(o,e,{body:t,headers:r},n);return this.config.serverTelemetryManager&&a.status<500&&429!==a.status&&this.config.serverTelemetryManager.clearTelemetryCache(),a}async sendPostRequest(e,t,r,o){let n;wu.preProcess(this.cacheManager,e,o);try{n=await rd(this.networkClient.sendPostRequestAsync.bind(this.networkClient),$n,this.logger,this.performanceClient,o)(t,r);const e=n.headers||{};this.performanceClient?.addFields({refreshTokenSize:n.body.refresh_token?.length||0,httpVerToken:e[or]||"",requestId:e[rr]||""},o)}catch(e){if(e instanceof Zs){const t=e.responseHeaders;throw t&&this.performanceClient?.addFields({httpVerToken:t[or]||"",requestId:t[rr]||"",contentTypeHeader:t[Zt]||void 0,contentLengthHeader:t["Content-Length"]||void 0,httpStatus:e.httpStatus},o),e.error}throw e instanceof Nr?e:Bo(Hr)}return wu.postProcess(this.cacheManager,e,n,o),n}async updateAuthority(e,t){this.performanceClient?.addQueueMeasurement(Ci,t);const r=`https://${e}/${this.authority.tenant}/`,o=await bu(r,this.networkClient,this.cacheManager,this.authority.options,this.logger,t,this.performanceClient);this.authority=o}createTokenQueryParameters(e){const t=new Map;return e.embeddedClientId&&Fc(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenQueryParameters&&Pc(t,e.tokenQueryParameters),Tc(t,e.correlationId),hc(t,e.correlationId,this.performanceClient),vn(t)}}class Cu{static setRequestState(e,t,r){const o=Cu.generateLibraryState(e,r);return t?`${o}${Jt.RESOURCE_DELIM}${t}`:o}static generateLibraryState(e,t){if(!e)throw Bo(fo);const r={id:e.createNewGuid()};t&&(r.meta=t);const o=JSON.stringify(r);return e.base64Encode(o)}static parseRequestState(e,t){if(!e)throw Bo(fo);if(!t)throw Bo(Vr);try{const r=t.split(Jt.RESOURCE_DELIM),o=r[0],n=r.length>1?r.slice(1).join(Jt.RESOURCE_DELIM):Jt.EMPTY_STRING,i=e.base64Decode(o),a=JSON.parse(i);return{userRequestState:n||Jt.EMPTY_STRING,libraryState:a}}catch(e){throw Bo(Vr)}}}class Tu{constructor(e,t){this.cryptoUtils=e,this.performanceClient=t}async generateCnf(e,t){this.performanceClient?.addQueueMeasurement(Ii,e.correlationId);const r=await rd(this.generateKid.bind(this),Ii,t,this.performanceClient,e.correlationId)(e),o=this.cryptoUtils.base64UrlEncode(JSON.stringify(r));return{kid:r.kid,reqCnfString:o}}async generateKid(e){return this.performanceClient?.addQueueMeasurement(_i,e.correlationId),{kid:await this.cryptoUtils.getPublicKeyThumbprint(e),xms_ksl:"sw"}}async signPopToken(e,t,r){return this.signPayload(e,t,r)}async signPayload(e,t,r,o){const{resourceRequestMethod:n,resourceRequestUri:i,shrClaims:a,shrNonce:s,shrOptions:c}=r,l=i?new yn(i):void 0,d=l?.getUrlComponents();return this.cryptoUtils.signJwt({at:e,ts:nd(),m:n?.toUpperCase(),u:d?.HostNameAndPort,nonce:s||this.cryptoUtils.createNewGuid(),p:d?.AbsolutePath,q:d?.QueryString?[[],d.QueryString]:void 0,client_claims:a||void 0,...o},t,c,r.correlationId)}}class xu{constructor(e,t){this.cache=e,this.hasChanged=t}get cacheHasChanged(){return this.hasChanged}get tokenCache(){return this.cache}}class Su{constructor(e,t,r,o,n,i,a){this.clientId=e,this.cacheStorage=t,this.cryptoObj=r,this.logger=o,this.serializableCache=n,this.persistencePlugin=i,this.performanceClient=a}validateTokenResponse(e,t){if(e.error||e.error_description||e.suberror){const r=`Error(s): ${e.error_codes||Jt.NOT_AVAILABLE} - Timestamp: ${e.timestamp||Jt.NOT_AVAILABLE} - Description: ${e.error_description||Jt.NOT_AVAILABLE} - Correlation ID: ${e.correlation_id||Jt.NOT_AVAILABLE} - Trace ID: ${e.trace_id||Jt.NOT_AVAILABLE}`,o=e.error_codes?.length?e.error_codes[0]:void 0,n=new yu(e.error,r,e.suberror,o,e.status);if(t&&e.status&&e.status>=500&&e.status<=599)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently unavailable and the access token is unable to be refreshed.\n${n}`);if(t&&e.status&&e.status>=400&&e.status<=499)return void this.logger.warning(`executeTokenRequest:validateTokenResponse - AAD is currently available but is unable to refresh the access token.\n${n}`);if(Bd(e.error,e.error_description,e.suberror))throw new Ad(e.error,e.error_description,e.suberror,e.timestamp||Jt.EMPTY_STRING,e.trace_id||Jt.EMPTY_STRING,e.correlation_id||Jt.EMPTY_STRING,e.claims||Jt.EMPTY_STRING,o);throw n}}async handleServerTokenResponse(e,t,r,o,n,i,a,s,c){let l,d;if(this.performanceClient?.addQueueMeasurement(Ei,e.correlation_id),e.id_token){if(l=fn(e.id_token||Jt.EMPTY_STRING,this.cryptoObj.base64Decode),n&&n.nonce&&l.nonce!==n.nonce)throw Bo(Gr);if(o.maxAge||0===o.maxAge){const e=l.auth_time;if(!e)throw Bo(Jr);hn(e,o.maxAge)}}this.homeAccountIdentifier=Nd.generateHomeAccountId(e.client_info||Jt.EMPTY_STRING,t.authorityType,this.logger,this.cryptoObj,l),n&&n.state&&(d=Cu.parseRequestState(this.cryptoObj,n.state)),e.key_id=e.key_id||o.sshKid||void 0;const u=this.generateCacheRecord(e,t,r,o,l,i,n);let f;try{if(this.persistencePlugin&&this.serializableCache&&(this.logger.verbose("Persistence enabled, calling beforeCacheAccess"),f=new xu(this.serializableCache,!0),await this.persistencePlugin.beforeCacheAccess(f)),a&&!s&&u.account){const e=this.cacheStorage.generateAccountKey(u.account.getAccountInfo());if(!this.cacheStorage.getAccount(e,o.correlationId))return this.logger.warning("Account used to refresh tokens not in persistence, refreshed tokens will not be stored in the cache"),await Su.generateAuthenticationResult(this.cryptoObj,t,u,!1,o,l,d,void 0,c)}await this.cacheStorage.saveCacheRecord(u,o.correlationId,o.storeInCache)}finally{this.persistencePlugin&&this.serializableCache&&f&&(this.logger.verbose("Persistence enabled, calling afterCacheAccess"),await this.persistencePlugin.afterCacheAccess(f))}return Su.generateAuthenticationResult(this.cryptoObj,t,u,!1,o,l,d,e,c)}generateCacheRecord(e,t,r,o,n,i,a){const s=t.getPreferredCache();if(!s)throw Bo(lo);const c=Pd(n);let l,d;e.id_token&&n&&(l=ld(this.homeAccountIdentifier,s,e.id_token,this.clientId,c||""),d=Iu(this.cacheStorage,t,this.homeAccountIdentifier,this.cryptoObj.base64Decode,o.correlationId,n,e.client_info,s,c,a,void 0,this.logger));let u=null;if(e.access_token){const n=e.scope?cn.fromString(e.scope):new cn(o.scopes||[]),a=("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0,l=("string"==typeof e.ext_expires_in?parseInt(e.ext_expires_in,10):e.ext_expires_in)||0,d=("string"==typeof e.refresh_in?parseInt(e.refresh_in,10):e.refresh_in)||void 0,f=r+a,h=f+l,p=d&&d>0?r+d:void 0;u=dd(this.homeAccountIdentifier,s,e.access_token,this.clientId,c||t.tenant||"",n.printScopes(),f,h,this.cryptoObj.base64Decode,p,e.token_type,i,e.key_id,o.claims,o.requestedClaimsHash)}let f=null;if(e.refresh_token){let t;e.refresh_token_expires_in&&(t=r+("string"==typeof e.refresh_token_expires_in?parseInt(e.refresh_token_expires_in,10):e.refresh_token_expires_in)),f=ud(this.homeAccountIdentifier,s,e.refresh_token,this.clientId,e.foci,i,t)}let h=null;return e.foci&&(h={clientId:this.clientId,environment:s,familyId:e.foci}),{account:d,idToken:l,accessToken:u,refreshToken:f,appMetadata:h}}static async generateAuthenticationResult(e,t,r,o,n,i,a,s,c){let l,d,u=Jt.EMPTY_STRING,f=[],h=null,p=Jt.EMPTY_STRING;if(r.accessToken){if(r.accessToken.tokenType!==Sr.POP||n.popKid)u=r.accessToken.secret;else{const t=new Tu(e),{secret:o,keyId:i}=r.accessToken;if(!i)throw Bo(Co);u=await t.signPopToken(o,i,n)}f=cn.fromString(r.accessToken.target).asArray(),h=ad(r.accessToken.expiresOn),l=ad(r.accessToken.extendedExpiresOn),r.accessToken.refreshOn&&(d=ad(r.accessToken.refreshOn))}r.appMetadata&&(p=r.appMetadata.familyId===br?br:"");const g=i?.oid||i?.sub||"",m=i?.tid||"";s?.spa_accountid&&r.account&&(r.account.nativeAccountId=s?.spa_accountid);const v=r.account?un(r.account.getAccountInfo(),void 0,i,r.idToken?.secret):null;return{authority:t.canonicalAuthority,uniqueId:g,tenantId:m,scopes:f,account:v,idToken:r?.idToken?.secret||"",idTokenClaims:i||{},accessToken:u,fromCache:o,expiresOn:h,extExpiresOn:l,refreshOn:d,correlationId:n.correlationId,requestId:c||Jt.EMPTY_STRING,familyId:p,tokenType:r.accessToken?.tokenType||Jt.EMPTY_STRING,state:a?a.userRequestState:Jt.EMPTY_STRING,cloudGraphHostName:r.account?.cloudGraphHostName||Jt.EMPTY_STRING,msGraphHost:r.account?.msGraphHost||Jt.EMPTY_STRING,code:s?.spa_code,fromNativeBroker:!1}}}function Iu(e,t,r,o,n,i,a,s,c,l,d,u){u?.verbose("setCachedAccount called");const f=e.getAccountKeys().find(e=>e.startsWith(r));let h=null;f&&(h=e.getAccount(f,n));const p=h||Nd.createAccount({homeAccountId:r,idTokenClaims:i,clientInfo:a,environment:s,cloudGraphHostName:l?.cloud_graph_host_name,msGraphHost:l?.msgraph_host,nativeAccountId:d},t,o),g=p.tenantProfiles||[],m=c||p.realm;if(m&&!g.find(e=>e.tenantId===m)){const e=dn(r,p.localAccountId,m,i);g.push(e)}return p.tenantProfiles=g,p}async function _u(e,t,r){return"string"==typeof e?e:e({clientId:t,tokenEndpoint:r})}class Eu extends ku{constructor(e,t){super(e,t),this.includeRedirectUri=!0,this.oidcDefaultScopes=this.config.authOptions.authority.options.OIDCOptions?.defaultScopes}async acquireToken(e,t){if(this.performanceClient?.addQueueMeasurement(Ti,e.correlationId),!e.code)throw Bo(eo);const r=nd(),o=await rd(this.executeTokenRequest.bind(this),xi,this.logger,this.performanceClient,e.correlationId)(this.authority,e),n=o.headers?.[rr],i=new Su(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin,this.performanceClient);return i.validateTokenResponse(o.body),rd(i.handleServerTokenResponse.bind(i),Ei,this.logger,this.performanceClient,e.correlationId)(o.body,this.authority,r,e,t,void 0,void 0,void 0,n)}getLogoutUri(e){if(!e)throw an(Ho);const t=this.createLogoutUrlQueryString(e);return yn.appendQueryString(this.authority.endSessionEndpoint,t)}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(xi,t.correlationId);const r=this.createTokenQueryParameters(t),o=yn.appendQueryString(e.tokenEndpoint,r),n=await rd(this.createTokenRequestBody.bind(this),Si,this.logger,this.performanceClient,t.correlationId)(t);let i;if(t.clientInfo)try{const e=Rd(t.clientInfo,this.cryptoUtils.base64Decode);i={credential:`${e.uid}.${e.utid}`,type:mu}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}const a=this.createTokenRequestHeaders(i||t.ccsCredential),s=zd(this.config.authOptions.clientId,t);return rd(this.executePostToTokenEndpoint.bind(this),Gn,this.logger,this.performanceClient,t.correlationId)(o,n,a,s,t.correlationId,Gn)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Si,e.correlationId);const t=new Map;if(mc(t,e.embeddedClientId||e.tokenBodyParameters?.[nc]||this.config.authOptions.clientId),this.includeRedirectUri)vc(t,e.redirectUri);else if(!e.redirectUri)throw an(Po);if(gc(t,e.scopes,!0,this.oidcDefaultScopes),function(e,t){e.set("code",t)}(t,e.code),xc(t,this.config.libraryInfo),Sc(t,this.config.telemetry.application),Mc(t),this.serverTelemetryManager&&!wa(this.config)&&qc(t,this.serverTelemetryManager),e.codeVerifier&&function(e,t){e.set("code_verifier",t)}(t,e.codeVerifier),this.config.clientCredentials.clientSecret&&Ec(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const r=this.config.clientCredentials.clientAssertion;Ac(t,await _u(r.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Bc(t,r.assertionType)}if(Oc(t,"authorization_code"),Rc(t),e.authenticationScheme===Sr.POP){const r=new Tu(this.cryptoUtils,this.performanceClient);let o;o=e.popKid?this.cryptoUtils.encodeKid(e.popKid):(await rd(r.generateCnf.bind(r),Ii,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,Nc(t,o)}else if(e.authenticationScheme===Sr.SSH){if(!e.sshJwk)throw an(Go);zc(t,e.sshJwk)}let r;if((!sn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Cc(t,e.claims,this.config.authOptions.clientCapabilities),e.clientInfo)try{const t=Rd(e.clientInfo,this.cryptoUtils.base64Decode);r={credential:`${t.uid}.${t.utid}`,type:mu}}catch(e){this.logger.verbose("Could not parse client info for CCS Header: "+e)}else r=e.ccsCredential;if(this.config.systemOptions.preventCorsPreflight&&r)switch(r.type){case mu:try{wc(t,jd(r.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case vu:yc(t,r.credential)}return e.embeddedClientId&&Fc(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&Pc(t,e.tokenBodyParameters),!e.enableSpaAuthorizationCode||e.tokenBodyParameters&&e.tokenBodyParameters[cc]||Pc(t,{[cc]:"1"}),hc(t,e.correlationId,this.performanceClient),vn(t)}createLogoutUrlQueryString(e){const t=new Map;return e.postLogoutRedirectUri&&function(e,t){e.set("post_logout_redirect_uri",t)}(t,e.postLogoutRedirectUri),e.correlationId&&Tc(t,e.correlationId),e.idTokenHint&&function(e,t){e.set("id_token_hint",t)}(t,e.idTokenHint),e.state&&Ic(t,e.state),e.logoutHint&&function(e,t){e.set("logout_hint",t)}(t,e.logoutHint),e.extraQueryParameters&&Pc(t,e.extraQueryParameters),this.config.authOptions.instanceAware&&jc(t),vn(t,this.config.authOptions.encodeExtraQueryParams,e.extraQueryParameters)}}class Au{constructor(e,t){this.cacheOutcome="0",this.cacheManager=t,this.apiId=e.apiId,this.correlationId=e.correlationId,this.wrapperSKU=e.wrapperSKU||Jt.EMPTY_STRING,this.wrapperVer=e.wrapperVer||Jt.EMPTY_STRING,this.telemetryCacheKey=xr.CACHE_KEY+"-"+e.clientId}generateCurrentRequestHeaderValue(){const e=`${this.apiId}${xr.VALUE_SEPARATOR}${this.cacheOutcome}`,t=[this.wrapperSKU,this.wrapperVer],r=this.getNativeBrokerErrorCode();r?.length&&t.push(`broker_error=${r}`);const o=t.join(xr.VALUE_SEPARATOR),n=[e,this.getRegionDiscoveryFields()].join(xr.VALUE_SEPARATOR);return[xr.SCHEMA_VERSION,n,o].join(xr.CATEGORY_SEPARATOR)}generateLastRequestHeaderValue(){const e=this.getLastRequests(),t=Au.maxErrorsToSend(e),r=e.failedRequests.slice(0,2*t).join(xr.VALUE_SEPARATOR),o=e.errors.slice(0,t).join(xr.VALUE_SEPARATOR),n=e.errors.length,i=[n,t=xr.MAX_CACHED_ERRORS&&(t.failedRequests.shift(),t.failedRequests.shift(),t.errors.shift()),t.failedRequests.push(this.apiId,this.correlationId),e instanceof Error&&e&&e.toString()?e instanceof Nr?e.subError?t.errors.push(e.subError):e.errorCode?t.errors.push(e.errorCode):t.errors.push(e.toString()):t.errors.push(e.toString()):t.errors.push(xr.UNKNOWN_ERROR),this.cacheManager.setServerTelemetry(this.telemetryCacheKey,t,this.correlationId)}incrementCacheHits(){const e=this.getLastRequests();return e.cacheHits+=1,this.cacheManager.setServerTelemetry(this.telemetryCacheKey,e,this.correlationId),e.cacheHits}getLastRequests(){return this.cacheManager.getServerTelemetry(this.telemetryCacheKey)||{failedRequests:[],errors:[],cacheHits:0}}clearTelemetryCache(){const e=this.getLastRequests(),t=Au.maxErrorsToSend(e);if(t===e.errors.length)this.cacheManager.removeItem(this.telemetryCacheKey,this.correlationId);else{const r={failedRequests:e.failedRequests.slice(2*t),errors:e.errors.slice(t),cacheHits:0};this.cacheManager.setServerTelemetry(this.telemetryCacheKey,r,this.correlationId)}}static maxErrorsToSend(e){let t,r=0,o=0;const n=e.errors.length;for(t=0;t"|");return a.forEach((e,t)=>{2===e.length&&e[0]?.length&&e[1]?.length&&function(e){const{skuArr:t,index:r,skuName:o,skuVersion:n}=e;r>=t.length||(t[r]=[o,n].join("|"))}({skuArr:s,index:t,skuName:e[0],skuVersion:e[1]})}),s.join(",")}(e)}}class Bu{constructor(e,t,r,o,n,i,a,s,c){this.config=e,this.browserStorage=t,this.browserCrypto=r,this.networkClient=this.config.system.networkClient,this.eventHandler=n,this.navigationClient=i,this.platformAuthProvider=s,this.correlationId=c||il(),this.logger=o.clone(Sa,Al,this.correlationId),this.performanceClient=a}async clearCacheOnLogout(e,t){if(t)try{this.browserStorage.removeAccount(t,e),this.logger.verbose("Cleared cache items belonging to the account provided in the logout request.")}catch(e){this.logger.error("Account provided in logout request was not found. Local cache unchanged.")}else try{this.logger.verbose("No account provided in logout request, clearing all cache items.",this.correlationId),this.browserStorage.clear(e),await this.browserCrypto.clearKeystore()}catch(e){this.logger.error("Attempted to clear all MSAL cache items and failed. Local cache unchanged.")}}getRedirectUri(e){this.logger.verbose("getRedirectUri called");const t=e||this.config.auth.redirectUri;return yn.getAbsoluteUrl(t,Tl())}initializeServerTelemetryManager(e,t){this.logger.verbose("initializeServerTelemetryManager called");const r={clientId:this.config.auth.clientId,correlationId:this.correlationId,apiId:e,forceRefresh:t||!1,wrapperSKU:this.browserStorage.getWrapperMetadata()[0],wrapperVer:this.browserStorage.getWrapperMetadata()[1]};return new Au(r,this.browserStorage)}async getDiscoveredAuthority(e){const{account:t}=e,r=e.requestExtraQueryParameters&&e.requestExtraQueryParameters.hasOwnProperty("instance_aware")?e.requestExtraQueryParameters.instance_aware:void 0;this.performanceClient.addQueueMeasurement(Wn,this.correlationId);const o={protocolMode:this.config.auth.protocolMode,OIDCOptions:this.config.auth.OIDCOptions,knownAuthorities:this.config.auth.knownAuthorities,cloudDiscoveryMetadata:this.config.auth.cloudDiscoveryMetadata,authorityMetadata:this.config.auth.authorityMetadata,skipAuthorityMetadataCache:this.config.auth.skipAuthorityMetadataCache},n=e.requestAuthority||this.config.auth.authority,i=r?.length?"true"===r:this.config.auth.instanceAware,a=t&&i?this.config.auth.authority.replace(yn.getDomainFromUrl(n),t.environment):n,s=yd.generateAuthority(a,e.requestAzureCloudOptions||this.config.auth.azureCloudOptions),c=await rd(bu,Bi,this.logger,this.performanceClient,this.correlationId)(s,this.config.system.networkClient,this.browserStorage,o,this.logger,this.correlationId,this.performanceClient);if(t&&!c.isAlias(t.environment))throw an(en);return c}}async function Ou(e,t,r,o){r.addQueueMeasurement(ni,e.correlationId);const n=e.authority||t.auth.authority,i=[...e&&e.scopes||[]],a={...e,correlationId:e.correlationId,authority:n,scopes:i};if(a.authenticationScheme){if(a.authenticationScheme===Sr.SSH){if(!e.sshJwk)throw an(Go);if(!e.sshKid)throw an(Jo)}o.verbose(`Authentication Scheme set to "${a.authenticationScheme}" as configured in Auth request`)}else a.authenticationScheme=Sr.BEARER,o.verbose('Authentication Scheme wasn\'t explicitly set in request, defaulting to "Bearer" request');return t.cache.claimsBasedCachingEnabled&&e.claims&&!sn.isEmptyObj(e.claims)&&(a.requestedClaimsHash=await pl(e.claims)),a}async function Ru(e,t,r,o,n){o.addQueueMeasurement(ii,e.correlationId);const i=await rd(Ou,ni,n,o,e.correlationId)(e,r,o,n);return{...e,...i,account:t,forceRefresh:e.forceRefresh||!1}}function ju(e,t){let r;const o=e.httpMethod;if(t===Br){if(r=o||Qt,r!==Qt)throw an(tn)}else r=o||"GET";if(e.authorizePostBodyParameters&&r!==Qt)throw an(rn);return r}class Pu extends Bu{initializeLogoutRequest(e){this.logger.verbose("initializeLogoutRequest called",e?.correlationId);const t={correlationId:this.correlationId||il(),...e};if(e)if(e.logoutHint)this.logger.verbose("logoutHint has already been set in logoutRequest");else if(e.account){const r=this.getLogoutHintFromIdTokenClaims(e.account);r&&(this.logger.verbose("Setting logoutHint to login_hint ID Token Claim value for the account provided"),t.logoutHint=r)}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 e&&null===e.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri passed as null, not setting post logout redirect uri",t.correlationId):e&&e.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to uri set on logout request",t.correlationId),t.postLogoutRedirectUri=yn.getAbsoluteUrl(e.postLogoutRedirectUri,Tl())):null===this.config.auth.postLogoutRedirectUri?this.logger.verbose("postLogoutRedirectUri configured as null and no uri set on request, not passing post logout redirect",t.correlationId):this.config.auth.postLogoutRedirectUri?(this.logger.verbose("Setting postLogoutRedirectUri to configured uri",t.correlationId),t.postLogoutRedirectUri=yn.getAbsoluteUrl(this.config.auth.postLogoutRedirectUri,Tl())):(this.logger.verbose("Setting postLogoutRedirectUri to current page",t.correlationId),t.postLogoutRedirectUri=yn.getAbsoluteUrl(Tl(),Tl())),t}getLogoutHintFromIdTokenClaims(e){const t=e.idTokenClaims;if(t){if(t.login_hint)return t.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}async createAuthCodeClient(e){this.performanceClient.addQueueMeasurement(hi,this.correlationId);const t=await rd(this.getClientConfiguration.bind(this),pi,this.logger,this.performanceClient,this.correlationId)(e);return new Eu(t,this.performanceClient)}async getClientConfiguration(e){const{serverTelemetryManager:t,requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:n,account:i}=e;this.performanceClient.addQueueMeasurement(pi,this.correlationId);const a=await rd(this.getDiscoveredAuthority.bind(this),Wn,this.logger,this.performanceClient,this.correlationId)({requestAuthority:r,requestAzureCloudOptions:o,requestExtraQueryParameters:n,account:i}),s=this.config.system.loggerOptions;return{authOptions:{clientId:this.config.auth.clientId,authority:a,clientCapabilities:this.config.auth.clientCapabilities,redirectUri:this.config.auth.redirectUri},systemOptions:{tokenRenewalOffsetSeconds:this.config.system.tokenRenewalOffsetSeconds,preventCorsPreflight:!0},loggerOptions:{loggerCallback:s.loggerCallback,piiLoggingEnabled:s.piiLoggingEnabled,logLevel:s.logLevel,correlationId:this.correlationId},cacheOptions:{claimsBasedCachingEnabled:this.config.cache.claimsBasedCachingEnabled},cryptoInterface:this.browserCrypto,networkInterface:this.networkClient,storageInterface:this.browserStorage,serverTelemetryManager:t,libraryInfo:{sku:Sa,version:Al,cpu:Jt.EMPTY_STRING,os:Jt.EMPTY_STRING},telemetry:this.config.telemetry}}async initializeAuthorizationRequest(e,t){this.performanceClient.addQueueMeasurement(gi,this.correlationId);const r=this.getRedirectUri(e.redirectUri),o={interactionType:t},n=Cu.setRequestState(this.browserCrypto,e&&e.state||Jt.EMPTY_STRING,o),i={...await rd(Ou,ni,this.logger,this.performanceClient,this.correlationId)({...e,correlationId:this.correlationId},this.config,this.performanceClient,this.logger),redirectUri:r,state:n,nonce:e.nonce||il(),responseMode:this.config.auth.OIDCOptions.serverResponseType},a={...i,httpMethod:ju(i,this.config.auth.protocolMode)};if(e.loginHint||e.sid)return a;const s=e.account||this.browserStorage.getActiveAccount(this.correlationId);return s&&(this.logger.verbose("Setting validated request account",this.correlationId),this.logger.verbosePii(`Setting validated request account: ${s.homeAccountId}`,this.correlationId),a.account=s),a}}function Nu(e,t,r){const o=mn(e);if(!o)throw gn(e)?(r.error(`A ${t} is present in the iframe but it does not contain known properties. It's likely that the ${t} has been replaced by code running on the redirectUri page.`),r.errorPii(`The ${t} detected is: ${e}`),Qs(os)):(r.error(`The request has returned to the redirectUri but a ${t} is not present. It's likely that the ${t} has been removed or the page has been redirected by code running on the redirectUri page.`),Qs(ts));return o}function zu(e,t,r,o){const n=vn(t,r,o);return yn.appendQueryString(e.authorizationEndpoint,n)}function qu(e,t){if(!e.state||!t)throw e.state?Bo(Kr,"Cached State"):Bo(Kr,"Server State");let r,o;try{r=decodeURIComponent(e.state)}catch(t){throw Bo(Vr,e.state)}try{o=decodeURIComponent(t)}catch(t){throw Bo(Vr,e.state)}if(r!==o)throw Bo($r);if(e.error||e.error_description||e.suberror){const t=function(e){const t="code=",r=e.error_uri?.lastIndexOf(t);return r&&r>=0?e.error_uri?.substring(r+5):void 0}(e);if(Bd(e.error,e.error_description,e.suberror))throw new Ad(e.error||"",e.error_description,e.suberror,e.timestamp||"",e.trace_id||"",e.correlation_id||"",e.claims||"",t);throw new yu(e.error||"",e.error_description,e.suberror,t)}}class Mu{constructor(e,t,r,o,n){this.authModule=e,this.browserStorage=t,this.authCodeRequest=r,this.logger=o,this.performanceClient=n}async handleCodeResponse(e,t){let r;this.performanceClient.addQueueMeasurement(bi,t.correlationId);try{r=function(e,t){if(qu(e,t),!e.code)throw Bo(yo);return e}(e,t.state)}catch(e){throw e instanceof yu&&e.subError===ls?Qs(ls):e}return rd(this.handleCodeResponseFromServer.bind(this),vi,this.logger,this.performanceClient,t.correlationId)(r,t)}async handleCodeResponseFromServer(e,t,r=!0){if(this.performanceClient.addQueueMeasurement(vi,t.correlationId),this.logger.trace("InteractionHandler.handleCodeResponseFromServer called"),this.authCodeRequest.code=e.code,e.cloud_instance_host_name&&await rd(this.authModule.updateAuthority.bind(this.authModule),Ci,this.logger,this.performanceClient,t.correlationId)(e.cloud_instance_host_name,t.correlationId),r&&(e.nonce=t.nonce||void 0),e.state=t.state,e.client_info)this.authCodeRequest.clientInfo=e.client_info;else{const e=this.createCcsCredentials(t);e&&(this.authCodeRequest.ccsCredential=e)}return await rd(this.authModule.acquireToken.bind(this.authModule),Ti,this.logger,this.performanceClient,t.correlationId)(this.authCodeRequest,e)}createCcsCredentials(e){return e.account?{credential:e.account.homeAccountId,type:mu}:e.loginHint?{credential:e.loginHint,type:vu}:null}}const Fu="user_switch",Du={[Fu]:"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."};class Lu extends Nr{constructor(e,t,r){super(e,t),Object.setPrototypeOf(this,Lu.prototype),this.name="NativeAuthError",this.ext=r}}function Hu(e){return!(!e.ext||!e.ext.status||"DISABLED"!==e.ext.status)||!(!e.ext||!e.ext.error||-2147186943!==e.ext.error)||"ContentError"===e.errorCode}function Uu(e,t,r){if(r&&r.status)switch(r.status){case"ACCOUNT_UNAVAILABLE":return Od(Cd);case"USER_INTERACTION_REQUIRED":return new Ad(e,t);case"USER_CANCEL":return Qs(ls);case"NO_NETWORK":return Qs(Ss);case"UX_NOT_ALLOWED":return Od(xd)}return new Lu(e,Du[e]||t,r)}class Wu extends ku{constructor(e,t){super(e,t)}async acquireCachedToken(e){this.performanceClient?.addQueueMeasurement(ti,e.correlationId);let t="0";if(e.forceRefresh||!this.config.cacheOptions.claimsBasedCachingEnabled&&!sn.isEmptyObj(e.claims))throw this.setCacheOutcome("1",e.correlationId),Bo(mo);if(!e.account)throw Bo(so);const r=e.account.tenantId||function(e){const t=new yn(e).getUrlComponents(),r=t.PathSegments.slice(-1)[0]?.toLowerCase();switch(r){case ir:case ar:case sr:return;default:return r}}(e.authority),o=this.cacheManager.getTokenKeys(),n=this.cacheManager.getAccessToken(e.account,e,o,r);if(!n)throw this.setCacheOutcome("2",e.correlationId),Bo(mo);if(i=n.cachedAt,Number(i)>nd()||sd(n.expiresOn,this.config.systemOptions.tokenRenewalOffsetSeconds))throw this.setCacheOutcome("3",e.correlationId),Bo(mo);var i;n.refreshOn&&sd(n.refreshOn,0)&&(t="4");const a=e.authority||this.authority.getPreferredCache(),s={account:this.cacheManager.getAccount(this.cacheManager.generateAccountKey(e.account),e.correlationId),accessToken:n,idToken:this.cacheManager.getIdToken(e.account,e.correlationId,o,r,this.performanceClient),refreshToken:null,appMetadata:this.cacheManager.readAppMetadataFromCache(a)};return this.setCacheOutcome(t,e.correlationId),this.config.serverTelemetryManager&&this.config.serverTelemetryManager.incrementCacheHits(),[await rd(this.generateResultFromCacheRecord.bind(this),ri,this.logger,this.performanceClient,e.correlationId)(s,e),t]}setCacheOutcome(e,t){this.serverTelemetryManager?.setCacheOutcome(e),this.performanceClient?.addFields({cacheOutcome:e},t),"0"!==e&&this.logger.info(`Token refresh is required due to cache outcome: ${e}`)}async generateResultFromCacheRecord(e,t){let r;if(this.performanceClient?.addQueueMeasurement(ri,t.correlationId),e.idToken&&(r=fn(e.idToken.secret,this.config.cryptoInterface.base64Decode)),t.maxAge||0===t.maxAge){const e=r?.auth_time;if(!e)throw Bo(Jr);hn(e,t.maxAge)}return Su.generateAuthenticationResult(this.cryptoUtils,this.authority,e,!0,t,r)}}class Vu extends Pu{async acquireToken(e){this.performanceClient.addQueueMeasurement(Dn,e.correlationId);const t=this.initializeServerTelemetryManager(61),r=await rd(this.getClientConfiguration.bind(this),pi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:t,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,account:e.account}),o=new Wu(r,this.performanceClient);this.logger.verbose("Silent auth client created");try{const t=(await rd(o.acquireCachedToken.bind(o),ti,this.logger,this.performanceClient,e.correlationId)(e))[0];return this.performanceClient.addFields({fromCache:!0},e.correlationId),t}catch(e){throw e instanceof Js&&e.errorCode===Bs&&this.logger.verbose("Signing keypair for bound access token not found. Refreshing bound access token and generating a new crypto keypair."),e}}logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e);return this.clearCacheOnLogout(t.correlationId,t?.account)}}var $u=r(64583).Promise;class Ku extends Bu{constructor(e,t,r,o,n,i,a,s,c,l,d,u){super(e,t,r,o,n,i,s,c,u),this.apiId=a,this.accountId=l,this.platformAuthProvider=c,this.nativeStorageManager=d,this.silentCacheClient=new Vu(e,this.nativeStorageManager,r,o,n,i,s,c,u);const f=this.platformAuthProvider.getExtensionName();this.skus=Au.makeExtraSkuString({libraryName:Sa,libraryVersion:Al,extensionName:f,extensionVersion:this.platformAuthProvider.getExtensionVersion()})}addRequestSKUs(e){e.extraParameters={...e.extraParameters,[lc]:this.skus}}async acquireToken(e,t){this.performanceClient.addQueueMeasurement(Vn,this.correlationId),this.logger.trace("NativeInteractionClient - acquireToken called.");const r=this.performanceClient.startMeasurement(Vn,this.correlationId),o=nd(),n=this.initializeServerTelemetryManager(this.apiId);try{const i=await this.initializeNativeRequest(e);try{const e=await this.acquireTokensFromCache(this.accountId,i);return r.end({success:!0,isNativeBroker:!1,fromCache:!0}),e}catch(e){if(1===t)throw this.logger.info("MSAL internal Cache does not contain tokens, return error as per cache policy"),r.end({success:!1,brokerErrorCode:"cache_request_failed"}),e;this.logger.info("MSAL internal Cache does not contain tokens, proceed to make a native call")}const a=await this.platformAuthProvider.sendMessage(i);return await this.handleNativeResponse(a,i,o).then(e=>(r.end({success:!0,isNativeBroker:!0,requestId:e.requestId}),n.clearNativeBrokerErrorCode(),e)).catch(e=>{throw r.end({success:!1,errorCode:e.errorCode,subErrorCode:e.subError}),e})}catch(e){throw e instanceof Lu&&n.setNativeBrokerErrorCode(e.errorCode),r.end({success:!1}),e}}createSilentCacheRequest(e,t){return{authority:e.authority,correlationId:this.correlationId,scopes:cn.fromString(e.scope).asArray(),account:t,forceRefresh:!1}}async acquireTokensFromCache(e,t){if(!e)throw this.logger.warning("NativeInteractionClient:acquireTokensFromCache - No nativeAccountId provided"),Bo(uo);const r=this.browserStorage.getBaseAccountInfo({nativeAccountId:e},this.correlationId);if(!r)throw Bo(uo);try{const e=this.createSilentCacheRequest(t,r),o=await this.silentCacheClient.acquireToken(e),n={...r,idTokenClaims:o?.idTokenClaims,idToken:o?.idToken};return{...o,account:n}}catch(e){throw e}}async acquireTokenRedirect(e,t){this.logger.trace("NativeInteractionClient - acquireTokenRedirect called.");const{...r}=e;delete r.onRedirectNavigate;const o=await this.initializeNativeRequest(r);try{await this.platformAuthProvider.sendMessage(o)}catch(e){if(e instanceof Lu&&(this.initializeServerTelemetryManager(this.apiId).setNativeBrokerErrorCode(e.errorCode),Hu(e)))throw e}this.browserStorage.setTemporaryCache(Da,JSON.stringify(o),!0);const n={apiId:Ua,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},i=this.config.auth.navigateToLoginRequestUrl?window.location.href:this.getRedirectUri(e.redirectUri);t.end({success:!0}),await this.navigationClient.navigateExternal(i,n)}async handleRedirectPromise(e,t){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."),null;const r=this.browserStorage.getCachedNativeRequest();if(!r)return this.logger.verbose("NativeInteractionClient - handleRedirectPromise called but there is no cached request, returning null."),e&&t&&e?.addFields({errorCode:"no_cached_request"},t),null;const{prompt:o,...n}=r;o&&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(Da));const i=nd();try{this.logger.verbose("NativeInteractionClient - handleRedirectPromise sending message to native broker.");const t=await this.platformAuthProvider.sendMessage(n),r=await this.handleNativeResponse(t,n,i);return this.initializeServerTelemetryManager(this.apiId).clearNativeBrokerErrorCode(),e&&this.correlationId&&this.performanceClient.addFields({isNativeBroker:!0},this.correlationId),r}catch(e){throw e}}logout(){return this.logger.trace("NativeInteractionClient - logout called."),$u.reject("Logout not implemented yet")}async handleNativeResponse(e,t,r){this.logger.trace("NativeInteractionClient - handleNativeResponse called.");const o=fn(e.id_token,Wc),n=this.createHomeAccountIdentifier(e,o),i=this.browserStorage.getAccountInfoFilteredBy({nativeAccountId:t.accountId},this.correlationId)?.homeAccountId;if(t.extraParameters?.child_client_id&&e.account.id!==t.accountId)this.logger.info("handleNativeServerResponse: Double broker flow detected, ignoring accountId mismatch");else if(n!==i&&e.account.id!==t.accountId)throw Uu(Fu);const a=await this.getDiscoveredAuthority({requestAuthority:t.authority}),s=Iu(this.browserStorage,a,n,Wc,this.correlationId,o,e.client_info,void 0,o.tid,void 0,e.account.id,this.logger);e.expires_in=Number(e.expires_in);const c=await this.generateAuthenticationResult(e,t,o,s,a.canonicalAuthority,r);return await this.cacheAccount(s,this.correlationId),await this.cacheNativeTokens(e,t,n,o,e.access_token,c.tenantId,r),c}createHomeAccountIdentifier(e,t){return Nd.generateHomeAccountId(e.client_info||Jt.EMPTY_STRING,0,this.logger,this.browserCrypto,t)}generateScopes(e,t){return t?cn.fromString(t):cn.fromString(e)}async generatePopAccessToken(e,t){if(t.tokenType===Sr.POP&&t.signPopToken){if(e.shr)return this.logger.trace("handleNativeServerResponse: SHR is enabled in native layer"),e.shr;const r=new Tu(this.browserCrypto),o={resourceRequestMethod:t.resourceRequestMethod,resourceRequestUri:t.resourceRequestUri,shrClaims:t.shrClaims,shrNonce:t.shrNonce};if(!t.keyId)throw Bo(Co);return r.signPopToken(e.access_token,t.keyId,o)}return e.access_token}async generateAuthenticationResult(e,t,r,o,n,i){const a=this.addTelemetryFromNativeResponse(e.properties.MATS),s=this.generateScopes(t.scope,e.scope),c=e.account.properties||{},l=c.UID||r.oid||r.sub||Jt.EMPTY_STRING,d=c.TenantId||r.tid||Jt.EMPTY_STRING,u=un(o.getAccountInfo(),void 0,r,e.id_token);u.nativeAccountId!==e.account.id&&(u.nativeAccountId=e.account.id);const f=await this.generatePopAccessToken(e,t),h=t.tokenType===Sr.POP?Sr.POP:Sr.BEARER;return{authority:n,uniqueId:l,tenantId:d,scopes:s.asArray(),account:u,idToken:e.id_token,idTokenClaims:r,accessToken:f,fromCache:!!a&&this.isResponseFromCache(a),expiresOn:ad(i+e.expires_in),tokenType:h,correlationId:this.correlationId,state:e.state,fromNativeBroker:!0}}async cacheAccount(e,t){await this.browserStorage.setAccount(e,this.correlationId),this.browserStorage.removeAccountContext(e.getAccountInfo(),t)}cacheNativeTokens(e,t,r,o,n,i,a){const s=ld(r,t.authority,e.id_token||"",t.clientId,o.tid||""),c=a+(t.tokenType===Sr.POP?Jt.SHR_NONCE_VALIDITY:("string"==typeof e.expires_in?parseInt(e.expires_in,10):e.expires_in)||0),l=this.generateScopes(e.scope,t.scope),d={idToken:s,accessToken:dd(r,t.authority,n,t.clientId,o.tid||i,l.printScopes(),c,0,Wc,void 0,t.tokenType,void 0,t.keyId)};return this.nativeStorageManager.saveCacheRecord(d,this.correlationId,t.storeInCache)}getExpiresInValue(e,t){return e===Sr.POP?Jt.SHR_NONCE_VALIDITY:("string"==typeof t?parseInt(t,10):t)||0}addTelemetryFromNativeResponse(e){const t=this.getMATSFromResponse(e);return t?(this.performanceClient.addFields({extensionId:this.platformAuthProvider.getExtensionId(),extensionVersion:this.platformAuthProvider.getExtensionVersion(),matsBrokerVersion:t.broker_version,matsAccountJoinOnStart:t.account_join_on_start,matsAccountJoinOnEnd:t.account_join_on_end,matsDeviceJoin:t.device_join,matsPromptBehavior:t.prompt_behavior,matsApiErrorCode:t.api_error_code,matsUiVisible:t.ui_visible,matsSilentCode:t.silent_code,matsSilentBiSubCode:t.silent_bi_sub_code,matsSilentMessage:t.silent_message,matsSilentStatus:t.silent_status,matsHttpStatus:t.http_status,matsHttpEventCount:t.http_event_count},this.correlationId),t):null}getMATSFromResponse(e){if(e)try{return JSON.parse(e)}catch(e){this.logger.error("NativeInteractionClient - Error parsing MATS telemetry, returning null instead")}return null}isResponseFromCache(e){return void 0===e.is_cached?(this.logger.verbose("NativeInteractionClient - MATS telemetry does not contain field indicating if response was served from cache. Returning false."),!1):!!e.is_cached}async initializeNativeRequest(e){this.logger.trace("NativeInteractionClient - initializeNativeRequest called");const t=await this.getCanonicalAuthority(e),{scopes:r,...o}=e,n=new cn(r||[]);n.appendScopes(Xt);const i={...o,accountId:this.accountId,clientId:this.config.auth.clientId,authority:t.urlString,scope:n.printScopes(),redirectUri:this.getRedirectUri(e.redirectUri),prompt:this.getPrompt(e.prompt),correlationId:this.correlationId,tokenType:e.authenticationScheme,windowTitleSubstring:document.title,extraParameters:{...e.extraQueryParameters,...e.tokenQueryParameters},extendedExpiryToken:!1,keyId:e.popKid};if(i.signPopToken&&e.popKid)throw Qs(Hs);if(this.handleExtraBrokerParams(i),i.extraParameters=i.extraParameters||{},i.extraParameters.telemetry="MATS",e.authenticationScheme===Sr.POP){const t={resourceRequestUri:e.resourceRequestUri,resourceRequestMethod:e.resourceRequestMethod,shrClaims:e.shrClaims,shrNonce:e.shrNonce},r=new Tu(this.browserCrypto);let o;if(i.keyId)o=this.browserCrypto.base64UrlEncode(JSON.stringify({kid:i.keyId})),i.signPopToken=!1;else{const e=await rd(r.generateCnf.bind(r),Ii,this.logger,this.performanceClient,this.correlationId)(t,this.logger);o=e.reqCnfString,i.keyId=e.kid,i.signPopToken=!0}i.reqCnf=o}return this.addRequestSKUs(i),i}async getCanonicalAuthority(e){const t=e.authority||this.config.auth.authority;e.account&&await this.getDiscoveredAuthority({requestAuthority:t,requestAzureCloudOptions:e.azureCloudOptions,account:e.account});const r=new yn(t);return r.validateAsUri(),r}getPrompt(e){switch(this.apiId){case 863:case 61:return this.logger.trace("initializeNativeRequest: silent request sets prompt to none"),fr}if(e)switch(e){case fr:case ur:case dr:return this.logger.trace("initializeNativeRequest: prompt is compatible with native flow"),e;default:throw this.logger.trace(`initializeNativeRequest: prompt = ${e} is not compatible with native flow`),Qs(Ds)}else this.logger.trace("initializeNativeRequest: prompt was not provided")}handleExtraBrokerParams(e){const t=e.extraParameters&&e.extraParameters.hasOwnProperty(dc)&&e.extraParameters.hasOwnProperty(uc)&&e.extraParameters.hasOwnProperty(nc);if(!e.embeddedClientId&&!t)return;let r="";const o=e.redirectUri;e.embeddedClientId?(e.redirectUri=this.config.auth.redirectUri,r=e.embeddedClientId):e.extraParameters&&(e.redirectUri=e.extraParameters[uc],r=e.extraParameters[nc]),e.extraParameters={child_client_id:r,child_redirect_uri:o},this.performanceClient?.addFields({embeddedClientId:r,embeddedRedirectUri:o},this.correlationId)}}async function Gu(e,t,r,o,n){const i=function(e,t,r,o){const n=t.correlationId,i=new Map;if(mc(i,t.embeddedClientId||t.extraQueryParameters?.[nc]||e.clientId),gc(i,[...t.scopes||[],...t.extraScopesToConsent||[]],!0,e.authority.options.OIDCOptions?.defaultScopes),vc(i,t.redirectUri),Tc(i,n),function(e,t){e.set("response_mode",t||"query")}(i,t.responseMode),Rc(i),t.prompt&&(function(e,t){e.set("prompt",t)}(i,t.prompt),o?.addFields({prompt:t.prompt},n)),t.domainHint&&(function(e,t){e.set("domain_hint",t)}(i,t.domainHint),o?.addFields({domainHintFromRequest:!0},n)),"select_account"!==t.prompt)if(t.sid&&t.prompt===fr)r.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from request"),kc(i,t.sid),o?.addFields({sidFromRequest:!0},n);else if(t.account){const e=(a=t.account,a.idTokenClaims?.sid||null);let s=function(e){return e.loginHint||e.idTokenClaims?.login_hint||null}(t.account);if(s&&t.domainHint&&(r.warning('AuthorizationCodeClient.createAuthCodeUrlQueryString: "domainHint" param is set, skipping opaque "login_hint" claim. Please consider not passing domainHint'),s=null),s){r.verbose("createAuthCodeUrlQueryString: login_hint claim present on account"),bc(i,s),o?.addFields({loginHintFromClaim:!0},n);try{wc(i,jd(t.account.homeAccountId))}catch(e){r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(e&&t.prompt===fr){r.verbose("createAuthCodeUrlQueryString: Prompt is none, adding sid from account"),kc(i,e),o?.addFields({sidFromClaim:!0},n);try{wc(i,jd(t.account.homeAccountId))}catch(e){r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}else if(t.loginHint)r.verbose("createAuthCodeUrlQueryString: Adding login_hint from request"),bc(i,t.loginHint),yc(i,t.loginHint),o?.addFields({loginHintFromRequest:!0},n);else if(t.account.username){r.verbose("createAuthCodeUrlQueryString: Adding login_hint from account"),bc(i,t.account.username),o?.addFields({loginHintFromUpn:!0},n);try{wc(i,jd(t.account.homeAccountId))}catch(e){r.verbose("createAuthCodeUrlQueryString: Could not parse home account ID for CCS Header")}}}else t.loginHint&&(r.verbose("createAuthCodeUrlQueryString: No account, adding login_hint from request"),bc(i,t.loginHint),yc(i,t.loginHint),o?.addFields({loginHintFromRequest:!0},n));else r.verbose("createAuthCodeUrlQueryString: Prompt is select_account, ignoring account hints");var a;return t.nonce&&function(e,t){e.set("nonce",t)}(i,t.nonce),t.state&&Ic(i,t.state),(t.claims||e.clientCapabilities&&e.clientCapabilities.length>0)&&Cc(i,t.claims,e.clientCapabilities),t.embeddedClientId&&Fc(i,e.clientId,e.redirectUri),!e.instanceAware||t.extraQueryParameters&&Object.keys(t.extraQueryParameters).includes(fc)||jc(i),i}({...e.auth,authority:t},r,o,n);if(xc(i,{sku:Sa,version:Al,os:"",cpu:""}),e.auth.protocolMode!==Ar&&Sc(i,e.telemetry.application),r.platformBroker&&(function(e){e.set("nativebroker","1")}(i),n.addFields({isPlatformAuthorizeRequest:!0},r.correlationId),r.authenticationScheme===Sr.POP)){const e=new Zl(o,n),t=new Tu(e);let a;a=r.popKid?e.encodeKid(r.popKid):(await rd(t.generateCnf.bind(t),Ii,o,n,r.correlationId)(r,o)).reqCnfString,Nc(i,a)}return hc(i,r.correlationId,n),i}async function Ju(e,t,r,o,n){if(!r.codeChallenge)throw an(Wo);const i=await rd(Gu,"getStandardParams",o,n,r.correlationId)(e,t,r,o,n);return pc(i,hr),_c(i,r.codeChallenge,Jt.S256_CODE_CHALLENGE_METHOD),Pc(i,r.extraQueryParameters||{}),zu(t,i,e.auth.encodeExtraQueryParams,r.extraQueryParameters)}async function Qu(e,t,r,o,n,i){if(!o.earJwk)throw Qs(Xa);const a=await Gu(t,r,o,n,i);pc(a,"id_token token refresh_token"),function(e,t){e.set("ear_jwk",encodeURIComponent(t)),e.set("ear_jwe_crypto","eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0")}(a,o.earJwk);const s=new Map;return Pc(s,o.extraQueryParameters||{}),Yu(e,zu(r,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}async function Xu(e,t,r,o,n,i){const a=await Gu(t,r,o,n,i);pc(a,hr),_c(a,o.codeChallenge,o.codeChallengeMethod||Jt.S256_CODE_CHALLENGE_METHOD),function(e,t){Object.entries(t).forEach(([t,r])=>{r&&e.set(t,r)})}(a,o.authorizePostBodyParameters||{});const s=new Map;return Pc(s,o.extraQueryParameters||{}),Yu(e,zu(r,s,t.auth.encodeExtraQueryParams,o.extraQueryParameters),a)}function Yu(e,t,r){const o=e.createElement("form");return o.method="post",o.action=t,r.forEach((t,r)=>{const n=e.createElement("input");n.hidden=!0,n.name=r,n.value=t,o.appendChild(n)}),e.body.appendChild(o),o}async function Zu(e,t,r,o,n,i,a,s,c,l){if(s.verbose("Account id found, calling WAM for token"),!l)throw Qs(Ms);const d=new Zl(s,c),u=new Ku(o,n,d,s,a,o.system.navigationClient,r,c,l,t,i,e.correlationId),{userRequestState:f}=Cu.parseRequestState(d,e.state);return rd(u.acquireToken.bind(u),Vn,s,c,e.correlationId)({...e,state:f,prompt:void 0})}async function ef(e,t,r,o,n,i,a,s,c,l,d,u){if(wu.removeThrottle(a,n.auth.clientId,e),t.accountId)return rd(Zu,wi,l,d,e.correlationId)(e,t.accountId,o,n,a,s,c,l,d,u);const f={...e,code:t.code||"",codeVerifier:r},h=new Mu(i,a,f,l,d);return await rd(h.handleCodeResponse.bind(h),bi,l,d,e.correlationId)(t,e)}async function tf(e,t,r,o,n,i,a,s,c,l,d){if(wu.removeThrottle(i,o.auth.clientId,e),qu(t,e.state),!t.ear_jwe)throw Qs(Ya);if(!e.earJwk)throw Qs(Xa);const u=JSON.parse(await rd(cl,ca,c,l,e.correlationId)(e.earJwk,t.ear_jwe));if(u.accountId)return rd(Zu,wi,c,l,e.correlationId)(e,u.accountId,r,o,i,a,s,c,l,d);const f=new Su(o.auth.clientId,i,new Zl(c,l),c,null,null,l);f.validateTokenResponse(u);const h={code:"",state:e.state,nonce:e.nonce,client_info:u.client_info,cloud_graph_host_name:u.cloud_graph_host_name,cloud_instance_host_name:u.cloud_instance_host_name,cloud_instance_name:u.cloud_instance_name,msgraph_host:u.msgraph_host};return await rd(f.handleServerTokenResponse.bind(f),Ei,c,l,e.correlationId)(u,n,nd(),e,h,void 0,void 0,void 0,void 0)}async function rf(e,t,r){e.addQueueMeasurement(Qi,r);const o=td(of,Xi,t,e,r)(e,t,r);return{verifier:o,challenge:await rd(nf,Yi,t,e,r)(o,e,t,r)}}function of(e,t,r){try{const o=new Uint8Array(32);return td(ol,ea,t,e,r)(o),Lc(o)}catch(e){throw Qs(Qa)}}async function nf(e,t,r,o){t.addQueueMeasurement(Yi,o);try{const n=await rd(rl,Zi,r,t,o)(e,t,o);return Lc(new Uint8Array(n))}catch(e){throw Qs(Qa)}}var af=r(64583).Promise;class sf{constructor(e,t,r,o){this.logger=e,this.handshakeTimeoutMs=t,this.extensionId=o,this.resolvers=new Map,this.handshakeResolvers=new Map,this.messageChannel=new MessageChannel,this.windowListener=this.onWindowMessage.bind(this),this.performanceClient=r,this.handshakeEvent=r.startMeasurement(Ui),this.platformAuthType="PlatformAuthExtensionHandler"}async sendMessage(e){this.logger.trace(this.platformAuthType+" - sendMessage called.");const t={method:"GetToken",request:e},r={channel:Ia,extensionId:this.extensionId,responseId:il(),body:t};this.logger.trace(this.platformAuthType+" - Sending request to browser extension"),this.logger.tracePii(this.platformAuthType+` - Sending request to browser extension: ${JSON.stringify(r)}`),this.messageChannel.port1.postMessage(r);const o=await new af((e,t)=>{this.resolvers.set(r.responseId,{resolve:e,reject:t})});return this.validatePlatformBrokerResponse(o)}static async createProvider(e,t,r){e.trace("PlatformAuthExtensionHandler - createProvider called.");try{const o=new sf(e,t,r,_a);return await o.sendHandshakeRequest(),o}catch(o){const n=new sf(e,t,r);return await n.sendHandshakeRequest(),n}}async sendHandshakeRequest(){this.logger.trace(this.platformAuthType+" - sendHandshakeRequest called."),window.addEventListener("message",this.windowListener,!1);const e={channel:Ia,extensionId:this.extensionId,responseId:il(),body:{method:Aa}};return this.handshakeEvent.add({extensionId:this.extensionId,extensionHandshakeTimeoutMs:this.handshakeTimeoutMs}),this.messageChannel.port1.onmessage=e=>{this.onChannelMessage(e)},window.postMessage(e,window.origin,[this.messageChannel.port2]),new af((t,r)=>{this.handshakeResolvers.set(e.responseId,{resolve:t,reject:r}),this.timeoutId=window.setTimeout(()=>{window.removeEventListener("message",this.windowListener,!1),this.messageChannel.port1.close(),this.messageChannel.port2.close(),this.handshakeEvent.end({extensionHandshakeTimedOut:!0,success:!1}),r(Qs(zs)),this.handshakeResolvers.delete(e.responseId)},this.handshakeTimeoutMs)})}onWindowMessage(e){if(this.logger.trace(this.platformAuthType+" - onWindowMessage called"),e.source!==window)return;const t=e.data;if(t.channel&&t.channel===Ia&&(!t.extensionId||t.extensionId===this.extensionId)&&t.body.method===Aa){const e=this.handshakeResolvers.get(t.responseId);if(!e)return void this.logger.trace(this.platformAuthType+`.onWindowMessage - resolver can't be found for request ${t.responseId}`);this.logger.verbose(t.extensionId?`Extension with id: ${t.extensionId} not installed`:"No extension installed"),clearTimeout(this.timeoutId),this.messageChannel.port1.close(),this.messageChannel.port2.close(),window.removeEventListener("message",this.windowListener,!1),this.handshakeEvent.end({success:!1,extensionInstalled:!1}),e.reject(Qs(qs))}}onChannelMessage(e){this.logger.trace(this.platformAuthType+" - onChannelMessage called.");const t=e.data,r=this.resolvers.get(t.responseId),o=this.handshakeResolvers.get(t.responseId);try{const e=t.body.method;if("Response"===e){if(!r)return;const e=t.body.response;if(this.logger.trace(this.platformAuthType+" - Received response from browser extension"),this.logger.tracePii(this.platformAuthType+` - Received response from browser extension: ${JSON.stringify(e)}`),"Success"!==e.status)r.reject(Uu(e.code,e.description,e.ext));else{if(!e.result)throw zr(Rr,"Event does not contain result.");e.result.code&&e.result.description?r.reject(Uu(e.result.code,e.result.description,e.result.ext)):r.resolve(e.result)}this.resolvers.delete(t.responseId)}else if("HandshakeResponse"===e){if(!o)return void this.logger.trace(this.platformAuthType+`.onChannelMessage - resolver can't be found for request ${t.responseId}`);clearTimeout(this.timeoutId),window.removeEventListener("message",this.windowListener,!1),this.extensionId=t.extensionId,this.extensionVersion=t.body.version,this.logger.verbose(this.platformAuthType+` - Received HandshakeResponse from extension: ${this.extensionId}`),this.handshakeEvent.end({extensionInstalled:!0,success:!0}),o.resolve(),this.handshakeResolvers.delete(t.responseId)}}catch(t){this.logger.error("Error parsing response from WAM Extension"),this.logger.errorPii(`Error parsing response from WAM Extension: ${t}`),this.logger.errorPii(`Unable to parse ${e}`),r?r.reject(t):o&&o.reject(t)}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("access_token")&&e.hasOwnProperty("id_token")&&e.hasOwnProperty("client_info")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scope")&&e.hasOwnProperty("expires_in"))return e;throw zr(Rr,"Response missing expected properties.")}getExtensionId(){return this.extensionId}getExtensionVersion(){return this.extensionVersion}getExtensionName(){return this.getExtensionId()===_a?"chrome":this.getExtensionId()?.length?"unknown":void 0}}class cf{constructor(e,t,r){this.logger=e,this.performanceClient=t,this.correlationId=r,this.platformAuthType="PlatformAuthDOMHandler"}static async createProvider(e,t,r){if(e.trace("PlatformAuthDOMHandler: createProvider called"),window.navigator?.platformAuthentication){const o=await window.navigator.platformAuthentication.getSupportedContracts(Ea);if(o?.includes("get-token-and-sign-out"))return e.trace("Platform auth api available in DOM"),new cf(e,t,r)}}getExtensionId(){return Ea}getExtensionVersion(){return""}getExtensionName(){return"DOM API"}async sendMessage(e){this.logger.trace(this.platformAuthType+" - Sending request to browser DOM API");try{const t=this.initializePlatformDOMRequest(e),r=await window.navigator.platformAuthentication.executeGetToken(t);return this.validatePlatformBrokerResponse(r)}catch(e){throw this.logger.error(this.platformAuthType+" - executeGetToken DOM API error"),e}}initializePlatformDOMRequest(e){this.logger.trace(this.platformAuthType+" - initializeNativeDOMRequest called");const{accountId:t,clientId:r,authority:o,scope:n,redirectUri:i,correlationId:a,state:s,storeInCache:c,embeddedClientId:l,extraParameters:d,...u}=e,f=this.getDOMExtraParams(u);return{accountId:t,brokerId:this.getExtensionId(),authority:o,clientId:r,correlationId:a||this.correlationId,extraParameters:{...d,...f},isSecurityTokenService:!1,redirectUri:i,scope:n,state:s,storeInCache:c,embeddedClientId:l}}validatePlatformBrokerResponse(e){if(e.hasOwnProperty("isSuccess")){if(e.hasOwnProperty("accessToken")&&e.hasOwnProperty("idToken")&&e.hasOwnProperty("clientInfo")&&e.hasOwnProperty("account")&&e.hasOwnProperty("scopes")&&e.hasOwnProperty("expiresIn"))return this.logger.trace(this.platformAuthType+" - platform broker returned successful and valid response"),this.convertToPlatformBrokerResponse(e);if(e.hasOwnProperty("error")){const t=e;if(!1===t.isSuccess&&t.error&&t.error.code)throw this.logger.trace(this.platformAuthType+" - platform broker returned error response"),Uu(t.error.code,t.error.description,{error:parseInt(t.error.errorCode),protocol_error:t.error.protocolError,status:t.error.status,properties:t.error.properties})}}throw zr(Rr,"Response missing expected properties.")}convertToPlatformBrokerResponse(e){return this.logger.trace(this.platformAuthType+" - convertToNativeResponse called"),{access_token:e.accessToken,id_token:e.idToken,client_info:e.clientInfo,account:e.account,expires_in:e.expiresIn,scope:e.scopes,state:e.state||"",properties:e.properties||{},extendedLifetimeToken:e.extendedLifetimeToken??!1,shr:e.proofOfPossessionPayload}}getDOMExtraParams(e){return{...Object.entries(e).reduce((e,[t,r])=>(e[t]=String(r),e),{})}}}function lf(e,t,r,o){if(t.trace("isPlatformAuthAllowed called"),!e.system.allowPlatformBroker)return t.trace("isPlatformAuthAllowed: allowPlatformBroker is not enabled, returning false"),!1;if(!r)return t.trace("isPlatformAuthAllowed: Platform auth provider is not initialized, returning false"),!1;if(o)switch(o){case Sr.BEARER:case Sr.POP:return t.trace("isPlatformAuthAllowed: authenticationScheme is supported, returning true"),!0;default:return t.trace("isPlatformAuthAllowed: authenticationScheme is not supported, returning false"),!1}return!0}var df=r(64583).Promise;class uf extends Pu{constructor(e,t,r,o,n,i,a,s,c,l){super(e,t,r,o,n,i,a,c,l),this.unloadWindow=this.unloadWindow.bind(this),this.nativeStorage=s,this.eventHandler=n}acquireToken(e,t){let r;try{if(r={popupName:this.generatePopupName(e.scopes||Xt,e.authority||this.config.auth.authority),popupWindowAttributes:e.popupWindowAttributes||{},popupWindowParent:e.popupWindowParent??window},this.performanceClient.addFields({isAsyncPopup:this.config.system.asyncPopups},this.correlationId),this.config.system.asyncPopups)return this.logger.verbose("asyncPopups set to true, acquiring token"),this.acquireTokenPopupAsync(e,r,t);{const o={...e,httpMethod:ju(e,this.config.auth.protocolMode)};return this.logger.verbose("asyncPopup set to false, opening popup before acquiring token"),r.popup=this.openSizedPopup("about:blank",r),this.acquireTokenPopupAsync(o,r,t)}}catch(e){return df.reject(e)}}logout(e){try{this.logger.verbose("logoutPopup called");const t=this.initializeLogoutRequest(e),r={popupName:this.generateLogoutPopupName(t),popupWindowAttributes:e?.popupWindowAttributes||{},popupWindowParent:e?.popupWindowParent??window},o=e&&e.authority,n=e&&e.mainWindowRedirectUri;return this.config.system.asyncPopups?(this.logger.verbose("asyncPopups set to true"),this.logoutPopupAsync(t,r,o,n)):(this.logger.verbose("asyncPopup set to false, opening popup"),r.popup=this.openSizedPopup("about:blank",r),this.logoutPopupAsync(t,r,o,n))}catch(e){return df.reject(e)}}async acquireTokenPopupAsync(e,t,r){this.logger.verbose("acquireTokenPopupAsync called");const o=await rd(this.initializeAuthorizationRequest.bind(this),gi,this.logger,this.performanceClient,this.correlationId)(e,Va.Popup);t.popup&&El(o.authority);const n=lf(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);return o.platformBroker=n,this.config.auth.protocolMode===Br?this.executeEarFlow(o,t):this.executeCodeFlow(o,t,r)}async executeCodeFlow(e,t,r){const o=e.correlationId,n=this.initializeServerTelemetryManager(Wa),i=r||await rd(rf,Qi,this.logger,this.performanceClient,o)(this.performanceClient,this.logger,o),a={...e,codeChallenge:i.challenge};try{const r=await rd(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,o)({serverTelemetryManager:n,requestAuthority:a.authority,requestAzureCloudOptions:a.azureCloudOptions,requestExtraQueryParameters:a.extraQueryParameters,account:a.account});if(a.httpMethod===Qt)return await this.executeCodeFlowWithPost(a,t,r,i.verifier);{const n=await rd(Ju,mi,this.logger,this.performanceClient,o)(this.config,r.authority,a,this.logger,this.performanceClient),s=this.initiateAuthRequest(n,t);this.eventHandler.emitEvent(au,Va.Popup,{popupWindow:s},null);const c=await this.monitorPopupForHash(s,t.popupWindowParent),l=td(Nu,Ai,this.logger,this.performanceClient,this.correlationId)(c,this.config.auth.OIDCOptions.serverResponseType,this.logger);return await rd(ef,ki,this.logger,this.performanceClient,o)(e,l,i.verifier,Wa,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}catch(e){throw t.popup?.close(),e instanceof Nr&&(e.setCorrelationId(this.correlationId),n.cacheFailedRequest(e)),e}}async executeEarFlow(e,t){const r=e.correlationId,o=await rd(this.getDiscoveredAuthority.bind(this),Wn,this.logger,this.performanceClient,r)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),n=await rd(sl,sa,this.logger,this.performanceClient,r)(),i={...e,earJwk:n},a=t.popup||this.openPopup("about:blank",t);(await Qu(a.document,this.config,o,i,this.logger,this.performanceClient)).submit();const s=await rd(this.monitorPopupForHash.bind(this),di,this.logger,this.performanceClient,r)(a,t.popupWindowParent),c=td(Nu,Ai,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return rd(tf,yi,this.logger,this.performanceClient,r)(i,c,Wa,this.config,o,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async executeCodeFlowWithPost(e,t,r,o){const n=e.correlationId,i=await rd(this.getDiscoveredAuthority.bind(this),Wn,this.logger,this.performanceClient,n)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),a=t.popup||this.openPopup("about:blank",t);(await Xu(a.document,this.config,i,e,this.logger,this.performanceClient)).submit();const s=await rd(this.monitorPopupForHash.bind(this),di,this.logger,this.performanceClient,n)(a,t.popupWindowParent),c=td(Nu,Ai,this.logger,this.performanceClient,this.correlationId)(s,this.config.auth.OIDCOptions.serverResponseType,this.logger);return rd(ef,ki,this.logger,this.performanceClient,n)(e,c,o,Wa,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async logoutPopupAsync(e,t,r,o){this.logger.verbose("logoutPopupAsync called"),this.eventHandler.emitEvent(su,Va.Popup,e);const n=this.initializeServerTelemetryManager(962);try{await this.clearCacheOnLogout(this.correlationId,e.account);const i=await rd(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:n,requestAuthority:r,account:e.account||void 0});try{i.authority.endSessionEndpoint}catch{if(e.account?.homeAccountId&&e.postLogoutRedirectUri&&i.authority.protocolMode===Ar){if(this.eventHandler.emitEvent(cu,Va.Popup,e),o){const e={apiId:962,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=yn.getAbsoluteUrl(o,Tl());await this.navigationClient.navigateInternal(t,e)}return void t.popup?.close()}}const a=i.getLogoutUri(e);this.eventHandler.emitEvent(cu,Va.Popup,e);const s=this.openPopup(a,t);if(this.eventHandler.emitEvent(au,Va.Popup,{popupWindow:s},null),await this.monitorPopupForHash(s,t.popupWindowParent).catch(()=>{}),o){const e={apiId:962,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},t=yn.getAbsoluteUrl(o,Tl());this.logger.verbose("Redirecting main window to url specified in the request"),this.logger.verbosePii(`Redirecting main window to: ${t}`),await this.navigationClient.navigateInternal(t,e)}else this.logger.verbose("No main window navigation requested")}catch(e){throw t.popup?.close(),e instanceof Nr&&(e.setCorrelationId(this.correlationId),n.cacheFailedRequest(e)),this.eventHandler.emitEvent(lu,Va.Popup,null,e),this.eventHandler.emitEvent(du,Va.Popup),e}this.eventHandler.emitEvent(du,Va.Popup)}initiateAuthRequest(e,t){if(e)return this.logger.infoPii(`Navigate to: ${e}`),this.openPopup(e,t);throw this.logger.error("Navigate url is empty"),Qs(es)}monitorPopupForHash(e,t){return new df((t,r)=>{this.logger.verbose("PopupHandler.monitorPopupForHash - polling started");const o=setInterval(()=>{if(e.closed)return this.logger.error("PopupHandler.monitorPopupForHash - window closed"),clearInterval(o),void r(Qs(ls));let n="";try{n=e.location.href}catch(e){}if(!n||"about:blank"===n)return;clearInterval(o);let i="";const a=this.config.auth.OIDCOptions.serverResponseType;e&&(i=a===pr?e.location.search:e.location.hash),this.logger.verbose("PopupHandler.monitorPopupForHash - popup window is on same origin as caller"),t(i)},this.config.system.pollIntervalMilliseconds)}).finally(()=>{this.cleanPopup(e,t)})}openPopup(e,t){try{let r;if(t.popup?(r=t.popup,this.logger.verbosePii(`Navigating popup window to: ${e}`),r.location.assign(e)):void 0===t.popup&&(this.logger.verbosePii(`Opening popup window to: ${e}`),r=this.openSizedPopup(e,t)),!r)throw Qs(cs);return r.focus&&r.focus(),this.currentWindow=r,t.popupWindowParent.addEventListener("beforeunload",this.unloadWindow),r}catch(e){throw this.logger.error("error opening popup "+e.message),Qs(ss)}}openSizedPopup(e,{popupName:t,popupWindowAttributes:r,popupWindowParent:o}){const n=o.screenLeft?o.screenLeft:o.screenX,i=o.screenTop?o.screenTop:o.screenY,a=o.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,s=o.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;let c=r.popupSize?.width,l=r.popupSize?.height,d=r.popupPosition?.top,u=r.popupPosition?.left;return(!c||c<0||c>a)&&(this.logger.verbose("Default popup window width used. Window width not configured or invalid."),c=483),(!l||l<0||l>s)&&(this.logger.verbose("Default popup window height used. Window height not configured or invalid."),l=600),(!d||d<0||d>s)&&(this.logger.verbose("Default popup window top position used. Window top not configured or invalid."),d=Math.max(0,s/2-300+i)),(!u||u<0||u>a)&&(this.logger.verbose("Default popup window left position used. Window left not configured or invalid."),u=Math.max(0,a/2-241.5+n)),o.open(e,t,`width=${c}, height=${l}, top=${d}, left=${u}, scrollbars=yes`)}unloadWindow(e){this.currentWindow&&this.currentWindow.close(),e.preventDefault()}cleanPopup(e,t){e.close(),t.removeEventListener("beforeunload",this.unloadWindow)}generatePopupName(e,t){return`${xa}.${this.config.auth.clientId}.${e.join("-")}.${t}.${this.correlationId}`}generateLogoutPopupName(e){const t=e.account&&e.account.homeAccountId;return`${xa}.${this.config.auth.clientId}.${t}.${this.correlationId}`}}var ff=r(64583).Promise;class hf extends Pu{constructor(e,t,r,o,n,i,a,s,c,l){super(e,t,r,o,n,i,a,c,l),this.nativeStorage=s}async acquireToken(e){const t=await rd(this.initializeAuthorizationRequest.bind(this),gi,this.logger,this.performanceClient,this.correlationId)(e,Va.Redirect);t.platformBroker=lf(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme);const r=e=>{e.persisted&&(this.logger.verbose("Page was restored from back/forward cache. Clearing temporary cache."),this.browserStorage.resetRequestCache(),this.eventHandler.emitEvent("msal:restoreFromBFCache",Va.Redirect))},o=this.getRedirectStartPage(e.redirectStartPage);this.logger.verbosePii(`Redirect start page: ${o}`),this.browserStorage.setTemporaryCache(Na,o,!0),window.addEventListener("pageshow",r);try{this.config.auth.protocolMode===Br?await this.executeEarFlow(t):await this.executeCodeFlow(t,e.onRedirectNavigate)}catch(e){throw e instanceof Nr&&e.setCorrelationId(this.correlationId),window.removeEventListener("pageshow",r),e}}async executeCodeFlow(e,t){const r=e.correlationId,o=this.initializeServerTelemetryManager(Ua),n=await rd(rf,Qi,this.logger,this.performanceClient,r)(this.performanceClient,this.logger,r),i={...e,codeChallenge:n.challenge};this.browserStorage.cacheAuthorizeRequest(i,n.verifier);try{if(i.httpMethod===Qt)return await this.executeCodeFlowWithPost(i);{const r=await rd(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:i.authority,requestAzureCloudOptions:i.azureCloudOptions,requestExtraQueryParameters:i.extraQueryParameters,account:i.account}),n=await rd(Ju,mi,this.logger,this.performanceClient,e.correlationId)(this.config,r.authority,i,this.logger,this.performanceClient);return await this.initiateAuthRequest(n,t)}}catch(e){throw e instanceof Nr&&(e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e)),e}}async executeEarFlow(e){const t=e.correlationId,r=await rd(this.getDiscoveredAuthority.bind(this),Wn,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await rd(sl,sa,this.logger,this.performanceClient,t)(),n={...e,earJwk:o};return this.browserStorage.cacheAuthorizeRequest(n),(await Qu(document,this.config,r,n,this.logger,this.performanceClient)).submit(),new ff((e,t)=>{setTimeout(()=>{t(Qs($s,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async executeCodeFlowWithPost(e){const t=e.correlationId,r=await rd(this.getDiscoveredAuthority.bind(this),Wn,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return this.browserStorage.cacheAuthorizeRequest(e),(await Xu(document,this.config,r,e,this.logger,this.performanceClient)).submit(),new ff((e,t)=>{setTimeout(()=>{t(Qs($s,"failed_to_redirect"))},this.config.system.redirectNavigationTimeout)})}async handleRedirectPromise(e="",t,r,o){const n=this.initializeServerTelemetryManager(865);try{const[i,a]=this.getRedirectResponse(e||"");if(!i)return this.logger.info("handleRedirectPromise did not detect a response as a result of a redirect. Cleaning temporary cache."),this.browserStorage.resetRequestCache(),"back_forward"!==function(){if("undefined"==typeof window||void 0===window.performance||"function"!=typeof window.performance.getEntriesByType)return;const e=window.performance.getEntriesByType("navigation"),t=e.length?e[0]:void 0;return t?.type}()?o.event.errorCode="no_server_response":this.logger.verbose("Back navigation event detected. Muting no_server_response error"),null;const s=this.browserStorage.getTemporaryCache(Na,!0)||Jt.EMPTY_STRING;if(bn(s)===bn(window.location.href)&&this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("Current page is loginRequestUrl, handling response"),s.indexOf("#")>-1&&function(e){const t=e.split("#");t.shift(),window.location.hash=t.length>0?t.join("#"):""}(s),await this.handleResponse(i,t,r,n);if(!this.config.auth.navigateToLoginRequestUrl)return this.logger.verbose("NavigateToLoginRequestUrl set to false, handling response"),await this.handleResponse(i,t,r,n);if(!Cl()||this.config.system.allowRedirectInIframe){this.browserStorage.setTemporaryCache(za,a,!0);const e={apiId:865,timeout:this.config.system.redirectNavigationTimeout,noHistory:!0};let o=!0;if(s&&"null"!==s)this.logger.verbose(`Navigating to loginRequestUrl: ${s}`),o=await this.navigationClient.navigateInternal(s,e);else{const t=function(){const e=new yn(window.location.href).getUrlComponents();return`${e.Protocol}//${e.HostNameAndPort}/`}();this.browserStorage.setTemporaryCache(Na,t,!0),this.logger.warning("Unable to get valid login request url from cache, redirecting to home page"),o=await this.navigationClient.navigateInternal(t,e)}if(!o)return await this.handleResponse(i,t,r,n)}return null}catch(e){throw e instanceof Nr&&(e.setCorrelationId(this.correlationId),n.cacheFailedRequest(e)),e}}getRedirectResponse(e){this.logger.verbose("getRedirectResponseHash called");let t=e;t||(t=this.config.auth.OIDCOptions.serverResponseType===pr?window.location.search:window.location.hash);let r=mn(t);if(r){try{!function(e,t,r){if(!e.state)throw Qs(rs);const o=function(e,t){if(!t)return null;try{return Cu.parseRequestState(e,t).libraryState.meta}catch(e){throw Bo(Vr)}}(t,e.state);if(!o)throw Qs(ns);if(o.interactionType!==r)throw Qs(is)}(r,this.browserCrypto,Va.Redirect)}catch(e){return e instanceof Nr&&this.logger.error(`Interaction type validation failed due to ${e.errorCode}: ${e.errorMessage}`),[null,""]}return kl(window),this.logger.verbose("Hash contains known properties, returning response hash"),[r,t]}const o=this.browserStorage.getTemporaryCache(za,!0);return this.browserStorage.removeItem(this.browserStorage.generateCacheKey(za)),o&&(r=mn(o),r)?(this.logger.verbose("Hash does not contain known properties, returning cached hash"),[r,o]):[null,""]}async handleResponse(e,t,r,o){if(!e.state)throw Qs(rs);if(e.ear_jwe){const r=await rd(this.getDiscoveredAuthority.bind(this),Wn,this.logger,this.performanceClient,t.correlationId)({requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account});return rd(tf,yi,this.logger,this.performanceClient,t.correlationId)(t,e,Ua,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}const n=await rd(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:o,requestAuthority:t.authority});return rd(ef,ki,this.logger,this.performanceClient,t.correlationId)(t,e,r,Ua,this.config,n,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}async initiateAuthRequest(e,t){if(this.logger.verbose("RedirectHandler.initiateAuthRequest called"),e){this.logger.infoPii(`RedirectHandler.initiateAuthRequest: Navigate to: ${e}`);const r={apiId:Ua,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},o=t||this.config.auth.onRedirectNavigate;return"function"==typeof o?(this.logger.verbose("RedirectHandler.initiateAuthRequest: Invoking onRedirectNavigate callback"),!1!==o(e)?(this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate did not return false, navigating"),void await this.navigationClient.navigateExternal(e,r)):void this.logger.verbose("RedirectHandler.initiateAuthRequest: onRedirectNavigate returned false, stopping navigation")):(this.logger.verbose("RedirectHandler.initiateAuthRequest: Navigating window to navigate url"),void await this.navigationClient.navigateExternal(e,r))}throw this.logger.info("RedirectHandler.initiateAuthRequest: Navigate url is empty"),Qs(es)}async logout(e){this.logger.verbose("logoutRedirect called");const t=this.initializeLogoutRequest(e),r=this.initializeServerTelemetryManager(961);try{this.eventHandler.emitEvent(su,Va.Redirect,e),await this.clearCacheOnLogout(this.correlationId,t.account);const o={apiId:961,timeout:this.config.system.redirectNavigationTimeout,noHistory:!1},n=await rd(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:r,requestAuthority:e&&e.authority,requestExtraQueryParameters:e?.extraQueryParameters,account:e&&e.account||void 0});if(n.authority.protocolMode===Ar)try{n.authority.endSessionEndpoint}catch{if(t.account?.homeAccountId)return void this.eventHandler.emitEvent(cu,Va.Redirect,t)}const i=n.getLogoutUri(t);if(this.eventHandler.emitEvent(cu,Va.Redirect,t),!e||"function"!=typeof e.onRedirectNavigate)return this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Pa),void await this.navigationClient.navigateExternal(i,o);if(!1!==e.onRedirectNavigate(i))return this.logger.verbose("Logout onRedirectNavigate did not return false, navigating"),this.browserStorage.getInteractionInProgress()||this.browserStorage.setInteractionInProgress(!0,Pa),void await this.navigationClient.navigateExternal(i,o);this.browserStorage.setInteractionInProgress(!1),this.logger.verbose("Logout onRedirectNavigate returned false, stopping navigation")}catch(e){throw e instanceof Nr&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),this.eventHandler.emitEvent(lu,Va.Redirect,null,e),this.eventHandler.emitEvent(du,Va.Redirect),e}this.eventHandler.emitEvent(du,Va.Redirect)}getRedirectStartPage(e){const t=e||window.location.href;return yn.getAbsoluteUrl(t,Tl())}}var pf=r(64583).Promise;async function gf(e,t,r,o,n){if(t.addQueueMeasurement(li,o),!e)throw r.info("Navigate url is empty"),Qs(es);return n?rd(yf,ui,r,t,o)(e,n,t,o):td(wf,fi,r,t,o)(e)}async function mf(e,t,r,o,n){const i=kf();if(!i.contentDocument)throw"No document associated with iframe!";return(await Xu(i.contentDocument,e,t,r,o,n)).submit(),i}async function vf(e,t,r,o,n){const i=kf();if(!i.contentDocument)throw"No document associated with iframe!";return(await Qu(i.contentDocument,e,t,r,o,n)).submit(),i}async function bf(e,t,r,o,n,i,a){return o.addQueueMeasurement(di,i),new pf((o,i)=>{t<1e4&&n.warning(`system.loadFrameTimeout or system.iframeHashTimeout set to lower (${t}ms) than the default (10000ms). This may result in timeouts.`);const s=window.setTimeout(()=>{window.clearInterval(c),i(Qs(us))},t),c=window.setInterval(()=>{let t="";const r=e.contentWindow;try{t=r?r.location.href:""}catch(e){}if(!t||"about:blank"===t)return;let n="";r&&(n=a===pr?r.location.search:r.location.hash),window.clearTimeout(s),window.clearInterval(c),o(n)},r)}).finally(()=>{td(Cf,Wi,n,o,i)(e)})}function yf(e,t,r,o){return r.addQueueMeasurement(ui,o),new pf((r,o)=>{const n=kf();window.setTimeout(()=>{n?(n.src=e,r(n)):o("Unable to load iframe")},t)})}function wf(e){const t=kf();return t.src=e,t}function kf(){const e=document.createElement("iframe");return e.className="msalSilentIframe",e.style.visibility="hidden",e.style.position="absolute",e.style.width=e.style.height="0",e.style.border="0",e.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms"),document.body.appendChild(e),e}function Cf(e){document.body===e.parentNode&&document.body.removeChild(e)}var Tf=r(64583).Promise;class xf extends Pu{constructor(e,t,r,o,n,i,a,s,c,l,d){super(e,t,r,o,n,i,s,l,d),this.apiId=a,this.nativeStorage=c}async acquireToken(e){this.performanceClient.addQueueMeasurement(Ln,e.correlationId),e.loginHint||e.sid||e.account&&e.account.username||this.logger.warning("No user hint provided. The authorization server may need more information to complete this request.");const t={...e};t.prompt?t.prompt!==fr&&"no_session"!==t.prompt&&(this.logger.warning(`SilentIframeClient. Replacing invalid prompt ${t.prompt} with ${fr}`),t.prompt=fr):t.prompt=fr;const r=await rd(this.initializeAuthorizationRequest.bind(this),gi,this.logger,this.performanceClient,e.correlationId)(t,Va.Silent);return r.platformBroker=lf(this.config,this.logger,this.platformAuthProvider,r.authenticationScheme),El(r.authority),this.config.auth.protocolMode===Br?this.executeEarFlow(r):this.executeCodeFlow(r)}async executeCodeFlow(e){let t;const r=this.initializeServerTelemetryManager(this.apiId);try{return t=await rd(this.createAuthCodeClient.bind(this),hi,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:r,requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),await rd(this.silentTokenHelper.bind(this),ci,this.logger,this.performanceClient,e.correlationId)(t,e)}catch(o){if(o instanceof Nr&&(o.setCorrelationId(this.correlationId),r.cacheFailedRequest(o)),!(t&&o instanceof Nr&&o.errorCode===Ta))throw o;return this.performanceClient.addFields({retryError:o.errorCode},this.correlationId),await rd(this.silentTokenHelper.bind(this),ci,this.logger,this.performanceClient,this.correlationId)(t,e)}}async executeEarFlow(e){const t=e.correlationId,r=await rd(this.getDiscoveredAuthority.bind(this),Wn,this.logger,this.performanceClient,t)({requestAuthority:e.authority,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account}),o=await rd(sl,sa,this.logger,this.performanceClient,t)(),n={...e,earJwk:o},i=await rd(vf,li,this.logger,this.performanceClient,t)(this.config,r,n,this.logger,this.performanceClient),a=this.config.auth.OIDCOptions.serverResponseType,s=await rd(bf,di,this.logger,this.performanceClient,t)(i,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,t,a),c=td(Nu,Ai,this.logger,this.performanceClient,t)(s,a,this.logger);return rd(tf,yi,this.logger,this.performanceClient,t)(n,c,this.apiId,this.config,r,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}logout(){return Tf.reject(Qs(ms))}async silentTokenHelper(e,t){const r=t.correlationId;this.performanceClient.addQueueMeasurement(ci,r);const o=await rd(rf,Qi,this.logger,this.performanceClient,r)(this.performanceClient,this.logger,r),n={...t,codeChallenge:o.challenge};let i;if(t.httpMethod===Qt)i=await rd(mf,li,this.logger,this.performanceClient,r)(this.config,e.authority,n,this.logger,this.performanceClient);else{const t=await rd(Ju,mi,this.logger,this.performanceClient,r)(this.config,e.authority,n,this.logger,this.performanceClient);i=await rd(gf,li,this.logger,this.performanceClient,r)(t,this.performanceClient,this.logger,r,this.config.system.navigateFrameWait)}const a=this.config.auth.OIDCOptions.serverResponseType,s=await rd(bf,di,this.logger,this.performanceClient,r)(i,this.config.system.iframeHashTimeout,this.config.system.pollIntervalMilliseconds,this.performanceClient,this.logger,r,a),c=td(Nu,Ai,this.logger,this.performanceClient,r)(s,a,this.logger);return rd(ef,ki,this.logger,this.performanceClient,r)(t,c,o.verifier,this.apiId,this.config,e,this.browserStorage,this.nativeStorage,this.eventHandler,this.logger,this.performanceClient,this.platformAuthProvider)}}class Sf extends ku{constructor(e,t){super(e,t)}async acquireToken(e){this.performanceClient?.addQueueMeasurement(Qn,e.correlationId);const t=nd(),r=await rd(this.executeTokenRequest.bind(this),Jn,this.logger,this.performanceClient,e.correlationId)(e,this.authority),o=r.headers?.[rr],n=new Su(this.config.authOptions.clientId,this.cacheManager,this.cryptoUtils,this.logger,this.config.serializableCache,this.config.persistencePlugin);return n.validateTokenResponse(r.body),rd(n.handleServerTokenResponse.bind(n),Ei,this.logger,this.performanceClient,e.correlationId)(r.body,this.authority,t,e,void 0,void 0,!0,e.forceCache,o)}async acquireTokenByRefreshToken(e){if(!e)throw an(Lo);if(this.performanceClient?.addQueueMeasurement(Yn,e.correlationId),!e.account)throw Bo(so);if(this.cacheManager.isAppMetadataFOCI(e.account.environment))try{return await rd(this.acquireTokenWithCachedRefreshToken.bind(this),Xn,this.logger,this.performanceClient,e.correlationId)(e,!0)}catch(t){const r=t instanceof Ad&&t.errorCode===kd,o=t instanceof yu&&"invalid_grant"===t.errorCode&&"client_mismatch"===t.subError;if(r||o)return rd(this.acquireTokenWithCachedRefreshToken.bind(this),Xn,this.logger,this.performanceClient,e.correlationId)(e,!1);throw t}return rd(this.acquireTokenWithCachedRefreshToken.bind(this),Xn,this.logger,this.performanceClient,e.correlationId)(e,!1)}async acquireTokenWithCachedRefreshToken(e,t){this.performanceClient?.addQueueMeasurement(Xn,e.correlationId);const r=td(this.cacheManager.getRefreshToken.bind(this.cacheManager),$i,this.logger,this.performanceClient,e.correlationId)(e.account,t,e.correlationId,void 0,this.performanceClient);if(!r)throw Od(kd);if(r.expiresOn&&sd(r.expiresOn,e.refreshTokenExpirationOffsetSeconds||300))throw this.performanceClient?.addFields({rtExpiresOnMs:Number(r.expiresOn)},e.correlationId),Od(Td);const o={...e,refreshToken:r.secret,authenticationScheme:e.authenticationScheme||Sr.BEARER,ccsCredential:{credential:e.account.homeAccountId,type:mu}};try{return await rd(this.acquireToken.bind(this),Qn,this.logger,this.performanceClient,e.correlationId)(o)}catch(t){if(t instanceof Ad&&(this.performanceClient?.addFields({rtExpiresOnMs:Number(r.expiresOn)},e.correlationId),t.subError===Sd)){this.logger.verbose("acquireTokenWithRefreshToken: bad refresh token, removing from cache");const t=this.cacheManager.generateCredentialKey(r);this.cacheManager.removeRefreshToken(t,e.correlationId)}throw t}}async executeTokenRequest(e,t){this.performanceClient?.addQueueMeasurement(Jn,e.correlationId);const r=this.createTokenQueryParameters(e),o=yn.appendQueryString(t.tokenEndpoint,r),n=await rd(this.createTokenRequestBody.bind(this),Zn,this.logger,this.performanceClient,e.correlationId)(e),i=this.createTokenRequestHeaders(e.ccsCredential),a=zd(this.config.authOptions.clientId,e);return rd(this.executePostToTokenEndpoint.bind(this),Kn,this.logger,this.performanceClient,e.correlationId)(o,n,i,a,e.correlationId,Kn)}async createTokenRequestBody(e){this.performanceClient?.addQueueMeasurement(Zn,e.correlationId);const t=new Map;if(mc(t,e.embeddedClientId||e.tokenBodyParameters?.[nc]||this.config.authOptions.clientId),e.redirectUri&&vc(t,e.redirectUri),gc(t,e.scopes,!0,this.config.authOptions.authority.options.OIDCOptions?.defaultScopes),Oc(t,"refresh_token"),Rc(t),xc(t,this.config.libraryInfo),Sc(t,this.config.telemetry.application),Mc(t),this.serverTelemetryManager&&!wa(this.config)&&qc(t,this.serverTelemetryManager),function(e,t){e.set("refresh_token",t)}(t,e.refreshToken),this.config.clientCredentials.clientSecret&&Ec(t,this.config.clientCredentials.clientSecret),this.config.clientCredentials.clientAssertion){const r=this.config.clientCredentials.clientAssertion;Ac(t,await _u(r.assertion,this.config.authOptions.clientId,e.resourceRequestUri)),Bc(t,r.assertionType)}if(e.authenticationScheme===Sr.POP){const r=new Tu(this.cryptoUtils,this.performanceClient);let o;o=e.popKid?this.cryptoUtils.encodeKid(e.popKid):(await rd(r.generateCnf.bind(r),Ii,this.logger,this.performanceClient,e.correlationId)(e,this.logger)).reqCnfString,Nc(t,o)}else if(e.authenticationScheme===Sr.SSH){if(!e.sshJwk)throw an(Go);zc(t,e.sshJwk)}if((!sn.isEmptyObj(e.claims)||this.config.authOptions.clientCapabilities&&this.config.authOptions.clientCapabilities.length>0)&&Cc(t,e.claims,this.config.authOptions.clientCapabilities),this.config.systemOptions.preventCorsPreflight&&e.ccsCredential)switch(e.ccsCredential.type){case mu:try{wc(t,jd(e.ccsCredential.credential))}catch(e){this.logger.verbose("Could not parse home account ID for CCS Header: "+e)}break;case vu:yc(t,e.ccsCredential.credential)}return e.embeddedClientId&&Fc(t,this.config.authOptions.clientId,this.config.authOptions.redirectUri),e.tokenBodyParameters&&Pc(t,e.tokenBodyParameters),hc(t,e.correlationId,this.performanceClient),vn(t)}}var If=r(64583).Promise;class _f extends Pu{async acquireToken(e){this.performanceClient.addQueueMeasurement(Hn,e.correlationId);const t=await rd(Ou,ni,this.logger,this.performanceClient,e.correlationId)(e,this.config,this.performanceClient,this.logger),r={...e,...t};e.redirectUri&&(r.redirectUri=this.getRedirectUri(e.redirectUri));const o=this.initializeServerTelemetryManager(61),n=await this.createRefreshTokenClient({serverTelemetryManager:o,authorityUrl:r.authority,azureCloudOptions:r.azureCloudOptions,account:r.account});return rd(n.acquireTokenByRefreshToken.bind(n),Yn,this.logger,this.performanceClient,e.correlationId)(r).catch(e=>{throw e.setCorrelationId(this.correlationId),o.cacheFailedRequest(e),e})}logout(){return If.reject(Qs(ms))}async createRefreshTokenClient(e){const t=await rd(this.getClientConfiguration.bind(this),pi,this.logger,this.performanceClient,this.correlationId)({serverTelemetryManager:e.serverTelemetryManager,requestAuthority:e.authorityUrl,requestAzureCloudOptions:e.azureCloudOptions,requestExtraQueryParameters:e.extraQueryParameters,account:e.account});return new Sf(t,this.performanceClient)}}class Ef{constructor(e,t,r,o){this.isBrowserEnvironment="undefined"!=typeof window,this.config=e,this.storage=t,this.logger=r,this.cryptoObj=o}async loadExternalTokens(e,t,r){if(!this.isBrowserEnvironment)throw Qs(Ts);const o=e.correlationId||il(),n=t.id_token?fn(t.id_token,Wc):void 0,i={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},a=e.authority?new yd(yd.generateAuthority(e.authority,e.azureCloudOptions),this.config.system.networkClient,this.storage,i,this.logger,e.correlationId||il()):void 0,s=await this.loadAccount(e,r.clientInfo||t.client_info||"",o,n,a),c=await this.loadIdToken(t,s.homeAccountId,s.environment,s.realm,o),l=await this.loadAccessToken(e,t,s.homeAccountId,s.environment,s.realm,r,o),d=await this.loadRefreshToken(t,s.homeAccountId,s.environment,o);return this.generateAuthenticationResult(e,{account:s,idToken:c,accessToken:l,refreshToken:d},n,a)}async loadAccount(e,t,r,o,n){if(this.logger.verbose("TokenCache - loading account"),e.account){const t=Nd.createFromAccountInfo(e.account);return await this.storage.setAccount(t,r),t}if(!n||!t&&!o)throw this.logger.error("TokenCache - if an account is not provided on the request, authority and either clientInfo or idToken must be provided instead."),Qs(As);const i=Nd.generateHomeAccountId(t,n.authorityType,this.logger,this.cryptoObj,o),a=o?.tid,s=Iu(this.storage,n,i,Wc,r,o,t,n.hostnameAndPort,a,void 0,void 0,this.logger);return await this.storage.setAccount(s,r),s}async loadIdToken(e,t,r,o,n){if(!e.id_token)return this.logger.verbose("TokenCache - no id token found in response"),null;this.logger.verbose("TokenCache - loading id token");const i=ld(t,r,e.id_token,this.config.auth.clientId,o);return await this.storage.setIdTokenCredential(i,n),i}async loadAccessToken(e,t,r,o,n,i,a){if(!t.access_token)return this.logger.verbose("TokenCache - no access token found in response"),null;if(!t.expires_in)return this.logger.error("TokenCache - no expiration set on the access token. Cannot add it to the cache."),null;if(!(t.scope||e.scopes&&e.scopes.length))return this.logger.error("TokenCache - scopes not specified in the request or response. Cannot add token to the cache."),null;this.logger.verbose("TokenCache - loading access token");const s=t.scope?cn.fromString(t.scope):new cn(e.scopes),c=i.expiresOn||t.expires_in+nd(),l=i.extendedExpiresOn||(t.ext_expires_in||t.expires_in)+nd(),d=dd(r,o,t.access_token,this.config.auth.clientId,n,s.printScopes(),c,l,Wc);return await this.storage.setAccessTokenCredential(d,a),d}async loadRefreshToken(e,t,r,o){if(!e.refresh_token)return this.logger.verbose("TokenCache - no refresh token found in response"),null;this.logger.verbose("TokenCache - loading refresh token");const n=ud(t,r,e.refresh_token,this.config.auth.clientId,e.foci,void 0,e.refresh_token_expires_in);return await this.storage.setRefreshTokenCredential(n,o),n}generateAuthenticationResult(e,t,r,o){let n,i="",a=[],s=null;t?.accessToken&&(i=t.accessToken.secret,a=cn.fromString(t.accessToken.target).asArray(),s=ad(t.accessToken.expiresOn),n=ad(t.accessToken.extendedExpiresOn));const c=t.account;return{authority:o?o.canonicalAuthority:"",uniqueId:t.account.localAccountId,tenantId:t.account.realm,scopes:a,account:c.getAccountInfo(),idToken:t.idToken?.secret||"",idTokenClaims:r||{},accessToken:i,fromCache:!0,expiresOn:s,correlationId:e.correlationId||"",requestId:"",extExpiresOn:n,familyId:t.refreshToken?.familyId||"",tokenType:t?.accessToken?.tokenType||"",state:e.state||"",cloudGraphHostName:c.cloudGraphHostName||"",msGraphHost:c.msGraphHost||"",fromNativeBroker:!1}}}class Af extends Eu{constructor(e){super(e),this.includeRedirectUri=!1}}var Bf=r(64583).Promise;class Of extends Pu{constructor(e,t,r,o,n,i,a,s,c,l){super(e,t,r,o,n,i,s,c,l),this.apiId=a}async acquireToken(e){if(!e.code)throw Qs(Os);const t=await rd(this.initializeAuthorizationRequest.bind(this),gi,this.logger,this.performanceClient,e.correlationId)(e,Va.Silent),r=this.initializeServerTelemetryManager(this.apiId);try{const o={...t,code:e.code},n=await rd(this.getClientConfiguration.bind(this),pi,this.logger,this.performanceClient,e.correlationId)({serverTelemetryManager:r,requestAuthority:t.authority,requestAzureCloudOptions:t.azureCloudOptions,requestExtraQueryParameters:t.extraQueryParameters,account:t.account}),i=new Af(n);this.logger.verbose("Auth code client created");const a=new Mu(i,this.browserStorage,o,this.logger,this.performanceClient);return await rd(a.handleCodeResponseFromServer.bind(a),vi,this.logger,this.performanceClient,e.correlationId)({code:e.code,msgraph_host:e.msGraphHost,cloud_graph_host_name:e.cloudGraphHostName,cloud_instance_host_name:e.cloudInstanceHostName},t,!1)}catch(e){throw e instanceof Nr&&(e.setCorrelationId(this.correlationId),r.cacheFailedRequest(e)),e}}logout(){return Bf.reject(Qs(ms))}}var Rf=r(64583).Promise;function jf(e){const t=e?.idTokenClaims;return t?.tfp||t?.acr?"B2C":t?.tid?"9188040d-6c67-4c5b-b112-36a304b66dad"===t?.tid?"MSA":"AAD":void 0}function Pf(e,t){try{Il(e)}catch(e){throw t.end({success:!1},e),e}}class Nf{constructor(e){var t,r,o,n;this.operatingContext=e,this.isBrowserEnvironment=this.operatingContext.isBrowserEnvironment(),this.config=e.getConfig(),this.initialized=!1,this.logger=this.operatingContext.getLogger(),this.networkClient=this.config.system.networkClient,this.navigationClient=this.config.system.navigationClient,this.redirectResponse=new Map,this.hybridAuthCodeResponses=new Map,this.performanceClient=this.config.telemetry.client,this.browserCrypto=this.isBrowserEnvironment?new Zl(this.logger,this.performanceClient):Oo,this.eventHandler=new gu(this.logger),this.browserStorage=this.isBrowserEnvironment?new hu(this.config.auth.clientId,this.config.cache,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler,function(e){const t=e.cloudDiscoveryMetadata;let r;if(t)try{r=JSON.parse(t)}catch(e){throw an(Vo)}return{canonicalAuthority:e.authority?wd(e.authority):void 0,knownAuthorities:e.knownAuthorities,cloudDiscoveryMetadata:r}}(this.config.auth)):(t=this.config.auth.clientId,r=this.logger,o=this.performanceClient,n=this.eventHandler,new hu(t,{cacheLocation:Ra,cacheRetentionDays:5,temporaryCacheLocation:Ra,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1},Oo,r,o,n));const i={cacheLocation:Ra,cacheRetentionDays:5,temporaryCacheLocation:Ra,storeAuthStateInCookie:!1,secureCookies:!1,cacheMigrationEnabled:!1,claimsBasedCachingEnabled:!1};this.nativeInternalStorage=new hu(this.config.auth.clientId,i,this.browserCrypto,this.logger,this.performanceClient,this.eventHandler),this.tokenCache=new Ef(this.config,this.browserStorage,this.logger,this.browserCrypto),this.activeSilentTokenRequests=new Map,this.trackPageVisibility=this.trackPageVisibility.bind(this),this.trackPageVisibilityWithMeasurement=this.trackPageVisibilityWithMeasurement.bind(this)}static async createController(e,t){const r=new Nf(e);return await r.initialize(t),r}trackPageVisibility(e){e&&(this.logger.info("Perf: Visibility change detected"),this.performanceClient.incrementFields({visibilityChangeCount:1},e))}async initialize(e,t){if(this.logger.trace("initialize called"),this.initialized)return void this.logger.info("initialize has already been called, exiting early.");if(!this.isBrowserEnvironment)return this.logger.info("in non-browser environment, exiting early."),this.initialized=!0,void this.eventHandler.emitEvent(Gd);const r=e?.correlationId||this.getRequestCorrelationId(),o=this.config.system.allowPlatformBroker,n=this.performanceClient.startMeasurement(ai,r);if(this.eventHandler.emitEvent("msal:initializeStart"),!t)try{this.logMultipleInstances(n)}catch{}if(await rd(this.browserStorage.initialize.bind(this.browserStorage),si,this.logger,this.performanceClient,r)(r),o)try{this.platformAuthProvider=await async function(e,t,r,o){e.trace("getPlatformAuthProvider called",r);const n=function(){let e;try{return e=window[Oa],"true"===e?.getItem(Pl)}catch(e){return!1}}();let i;e.trace("Has client allowed platform auth via DOM API: "+n);try{n&&(i=await cf.createProvider(e,t,r)),i||(e.trace("Platform auth via DOM API not available, checking for extension"),i=await sf.createProvider(e,o||2e3,t))}catch(t){e.trace("Platform auth not available",t)}return i}(this.logger,this.performanceClient,r,this.config.system.nativeBrokerHandshakeTimeout)}catch(e){this.logger.verbose(e)}this.config.cache.claimsBasedCachingEnabled||(this.logger.verbose("Claims-based caching is disabled. Clearing the previous cache with claims"),td(this.browserStorage.clearTokensAndKeysWithClaims.bind(this.browserStorage),Vi,this.logger,this.performanceClient,r)(r)),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(r),this.initialized=!0,this.eventHandler.emitEvent(Gd),n.end({allowPlatformBroker:o,success:!0})}async handleRedirectPromise(e){if(this.logger.verbose("handleRedirectPromise called"),Sl(this.initialized),this.isBrowserEnvironment){const t=e||"";let r=this.redirectResponse.get(t);return void 0===r?(r=this.handleRedirectPromiseInternal(e),this.redirectResponse.set(t,r),this.logger.verbose("handleRedirectPromise has been called for the first time, storing the promise")):this.logger.verbose("handleRedirectPromise has been called previously, returning the result from the first call"),r}return this.logger.verbose("handleRedirectPromise returns null, not browser environment"),null}async handleRedirectPromiseInternal(e){if(!this.browserStorage.isInteractionInProgress(!0))return this.logger.info("handleRedirectPromise called but there is no interaction in progress, returning null."),null;const t=this.browserStorage.getInteractionInProgress()?.type;if(t===Pa)return this.logger.verbose("handleRedirectPromise removing interaction_in_progress flag and returning null after sign-out"),this.browserStorage.setInteractionInProgress(!1),Rf.resolve(null);const r=this.getAllAccounts(),o=this.browserStorage.getCachedNativeRequest(),n=o&&this.platformAuthProvider&&!e;let i,a;this.eventHandler.emitEvent("msal:handleRedirectStart",Va.Redirect);try{if(n&&this.platformAuthProvider){i=this.performanceClient.startMeasurement(qn,o?.correlationId||""),this.logger.trace("handleRedirectPromise - acquiring token from native platform"),i.add({isPlatformBrokerRequest:!0});const e=new Ku(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,865,this.performanceClient,this.platformAuthProvider,o.accountId,this.nativeInternalStorage,o.correlationId);a=rd(e.handleRedirectPromise.bind(e),Hi,this.logger,this.performanceClient,i.event.correlationId)(this.performanceClient,i.event.correlationId)}else{const[t,r]=this.browserStorage.getCachedRequest(),o=t.correlationId;i=this.performanceClient.startMeasurement(qn,o),this.logger.trace("handleRedirectPromise - acquiring token from web flow");const n=this.createRedirectClient(o);a=rd(n.handleRedirectPromise.bind(n),Li,this.logger,this.performanceClient,i.event.correlationId)(e,t,r,i)}}catch(e){throw this.browserStorage.resetRequestCache(),e}return a.then(e=>(e?(this.browserStorage.resetRequestCache(),r.length{this.browserStorage.resetRequestCache();const t=e;throw r.length>0?this.eventHandler.emitEvent(ou,Va.Redirect,null,t):this.eventHandler.emitEvent(eu,Va.Redirect,null,t),this.eventHandler.emitEvent(iu,Va.Redirect),i.end({success:!1},t),e})}async acquireTokenRedirect(e){const t=this.getRequestCorrelationId(e);this.logger.verbose("acquireTokenRedirect called",t);const r=this.performanceClient.startMeasurement("acquireTokenPreRedirect",t);r.add({accountType:jf(e.account),scenarioId:e.scenarioId});const o=e.onRedirectNavigate;if(o)e.onRedirectNavigate=e=>{const t="function"==typeof o?o(e):void 0;return r.add({navigateCallbackResult:!1!==t}),r.event=r.end({success:!0})||r.event,t};else{const e=this.config.auth.onRedirectNavigate;this.config.auth.onRedirectNavigate=t=>{const o="function"==typeof e?e(t):void 0;return r.add({navigateCallbackResult:!1!==o}),r.event=r.end({success:!0})||r.event,o}}const n=this.getAllAccounts().length>0;try{let o;return _l(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,ja),n?this.eventHandler.emitEvent(tu,Va.Redirect,e):this.eventHandler.emitEvent(Yd,Va.Redirect,e),o=this.platformAuthProvider&&this.canUsePlatformBroker(e)?new Ku(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,Ua,this.performanceClient,this.platformAuthProvider,this.getNativeAccountId(e),this.nativeInternalStorage,t).acquireTokenRedirect(e,r).catch(o=>{if(r.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof Lu&&Hu(o))return this.platformAuthProvider=void 0,this.createRedirectClient(t).acquireToken(e);if(o instanceof Ad)return this.logger.verbose("acquireTokenRedirect - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createRedirectClient(t).acquireToken(e);throw o}):this.createRedirectClient(t).acquireToken(e),await o}catch(e){throw this.browserStorage.resetRequestCache(),2===r.event.status?this.performanceClient.startMeasurement(qn,t).end({success:!1},e):r.end({success:!1},e),n?this.eventHandler.emitEvent(ou,Va.Redirect,null,e):this.eventHandler.emitEvent(eu,Va.Redirect,null,e),e}}acquireTokenPopup(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(zn,t);r.add({scenarioId:e.scenarioId,accountType:jf(e.account)});try{this.logger.verbose("acquireTokenPopup called",t),Pf(this.initialized,r),this.browserStorage.setInteractionInProgress(!0,ja)}catch(e){return Rf.reject(e)}const o=this.getAllAccounts();let n;o.length>0?this.eventHandler.emitEvent(tu,Va.Popup,e):this.eventHandler.emitEvent(Yd,Va.Popup,e);const i=this.getPreGeneratedPkceCodes(t);return this.canUsePlatformBroker(e)?(r.add({isPlatformBrokerRequest:!0}),n=this.acquireTokenNative({...e,correlationId:t},Wa).then(e=>(r.end({success:!0,accountType:jf(e.account)}),e)).catch(o=>{if(r.add({brokerErrorName:o.name,brokerErrorCode:o.errorCode}),o instanceof Lu&&Hu(o))return this.platformAuthProvider=void 0,this.createPopupClient(t).acquireToken(e,i);if(o instanceof Ad)return this.logger.verbose("acquireTokenPopup - Resolving interaction required error thrown by native broker by falling back to web flow"),this.createPopupClient(t).acquireToken(e,i);throw o})):n=this.createPopupClient(t).acquireToken(e,i),n.then(e=>(o.length(o.length>0?this.eventHandler.emitEvent(ou,Va.Popup,null,e):this.eventHandler.emitEvent(eu,Va.Popup,null,e),r.end({success:!1},e),Rf.reject(e))).finally(async()=>{this.browserStorage.setInteractionInProgress(!1),this.config.system.asyncPopups&&await this.preGeneratePkceCodes(t)})}trackPageVisibilityWithMeasurement(){const e=this.ssoSilentMeasurement||this.acquireTokenByCodeAsyncMeasurement;e&&(this.logger.info("Perf: Visibility change detected in ",e.event.name),e.increment({visibilityChangeCount:1}))}async ssoSilent(e){const t=this.getRequestCorrelationId(e),r={...e,prompt:e.prompt,correlationId:t};let o;return this.ssoSilentMeasurement=this.performanceClient.startMeasurement(Un,t),this.ssoSilentMeasurement?.add({scenarioId:e.scenarioId,accountType:jf(e.account)}),Pf(this.initialized,this.ssoSilentMeasurement),this.ssoSilentMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement),this.logger.verbose("ssoSilent called",t),this.eventHandler.emitEvent("msal:ssoSilentStart",Va.Silent,r),this.canUsePlatformBroker(r)?(this.ssoSilentMeasurement?.add({isPlatformBrokerRequest:!0}),o=this.acquireTokenNative(r,863).catch(e=>{if(this.ssoSilentMeasurement?.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e instanceof Lu&&Hu(e))return this.platformAuthProvider=void 0,this.createSilentIframeClient(r.correlationId).acquireToken(r);throw e})):o=this.createSilentIframeClient(r.correlationId).acquireToken(r),o.then(e=>(this.eventHandler.emitEvent("msal:ssoSilentSuccess",Va.Silent,e),this.ssoSilentMeasurement?.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:jf(e.account)}),e)).catch(e=>{throw this.eventHandler.emitEvent("msal:ssoSilentFailure",Va.Silent,null,e),this.ssoSilentMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenByCode(e){const t=this.getRequestCorrelationId(e);this.logger.trace("acquireTokenByCode called",t);const r=this.performanceClient.startMeasurement(Rn,t);Pf(this.initialized,r),this.eventHandler.emitEvent("msal:acquireTokenByCodeStart",Va.Silent,e),r.add({scenarioId:e.scenarioId});try{if(e.code&&e.nativeAccountId)throw Qs(js);if(e.code){const o=e.code;let n=this.hybridAuthCodeResponses.get(o);return n?(this.logger.verbose("Existing acquireTokenByCode request found",t),r.discard()):(this.logger.verbose("Initiating new acquireTokenByCode request",t),n=this.acquireTokenByCodeAsync({...e,correlationId:t}).then(e=>(this.eventHandler.emitEvent("msal:acquireTokenByCodeSuccess",Va.Silent,e),this.hybridAuthCodeResponses.delete(o),r.end({success:!0,accessTokenSize:e.accessToken.length,idTokenSize:e.idToken.length,accountType:jf(e.account)}),e)).catch(e=>{throw this.hybridAuthCodeResponses.delete(o),this.eventHandler.emitEvent(nu,Va.Silent,null,e),r.end({success:!1},e),e}),this.hybridAuthCodeResponses.set(o,n)),await n}if(e.nativeAccountId){if(this.canUsePlatformBroker(e,e.nativeAccountId)){r.add({isPlatformBrokerRequest:!0});const o=await this.acquireTokenNative({...e,correlationId:t},866,e.nativeAccountId).catch(e=>{throw e instanceof Lu&&Hu(e)&&(this.platformAuthProvider=void 0),r.add({brokerErrorName:e.name,brokerErrorCode:e.errorCode}),e});return r.end({accountType:jf(o.account),success:!0}),o}throw Qs(Ns)}throw Qs(Rs)}catch(e){throw this.eventHandler.emitEvent(nu,Va.Silent,null,e),r.end({success:!1},e),e}}async acquireTokenByCodeAsync(e){this.logger.trace("acquireTokenByCodeAsync called",e.correlationId),this.acquireTokenByCodeAsyncMeasurement=this.performanceClient.startMeasurement(Di,e.correlationId),this.acquireTokenByCodeAsyncMeasurement?.increment({visibilityChangeCount:0}),document.addEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement);const t=this.createSilentAuthCodeClient(e.correlationId);return await t.acquireToken(e).then(e=>(this.acquireTokenByCodeAsyncMeasurement?.end({success:!0,fromCache:e.fromCache}),e)).catch(e=>{throw this.acquireTokenByCodeAsyncMeasurement?.end({success:!1},e),e}).finally(()=>{document.removeEventListener("visibilitychange",this.trackPageVisibilityWithMeasurement)})}async acquireTokenFromCache(e,t){switch(this.performanceClient.addQueueMeasurement(ei,e.correlationId),t){case 0:case 1:case 2:const t=this.createSilentCacheClient(e.correlationId);return rd(t.acquireToken.bind(t),Dn,this.logger,this.performanceClient,e.correlationId)(e);default:throw Bo(mo)}}async acquireTokenByRefreshToken(e,t){switch(this.performanceClient.addQueueMeasurement(jn,e.correlationId),t){case 0:case 2:case 3:case 4:const t=this.createSilentRefreshClient(e.correlationId);return rd(t.acquireToken.bind(t),Hn,this.logger,this.performanceClient,e.correlationId)(e);default:throw Bo(mo)}}async acquireTokenBySilentIframe(e){this.performanceClient.addQueueMeasurement(oi,e.correlationId);const t=this.createSilentIframeClient(e.correlationId);return rd(t.acquireToken.bind(t),Ln,this.logger,this.performanceClient,e.correlationId)(e)}async logout(e){const t=this.getRequestCorrelationId(e);return this.logger.warning("logout API is deprecated and will be removed in msal-browser v3.0.0. Use logoutRedirect instead.",t),this.logoutRedirect({correlationId:t,...e})}async logoutRedirect(e){const t=this.getRequestCorrelationId(e);return _l(this.initialized,this.config),this.browserStorage.setInteractionInProgress(!0,Pa),this.createRedirectClient(t).logout(e)}logoutPopup(e){try{const t=this.getRequestCorrelationId(e);return Il(this.initialized),this.browserStorage.setInteractionInProgress(!0,Pa),this.createPopupClient(t).logout(e).finally(()=>{this.browserStorage.setInteractionInProgress(!1)})}catch(e){return Rf.reject(e)}}async clearCache(e){if(!this.isBrowserEnvironment)return void this.logger.info("in non-browser environment, returning early.");const t=this.getRequestCorrelationId(e);return this.createSilentCacheClient(t).logout(e)}getAllAccounts(e){const t=this.getRequestCorrelationId();return function(e,t,r,o,n){return e.verbose("getAllAccounts called"),r?t.getAllAccounts(n||{},o):[]}(this.logger,this.browserStorage,this.isBrowserEnvironment,t,e)}getAccount(e){const t=this.getRequestCorrelationId();return function(e,t,r,o){const n=r.getAccountInfoFilteredBy(e,o);return n?(t.verbose("getAccount: Account matching provided filter found, returning"),n):(t.verbose("getAccount: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByUsername(e){const t=this.getRequestCorrelationId();return function(e,t,r,o){if(t.trace("getAccountByUsername called"),!e)return t.warning("getAccountByUsername: No username provided"),null;const n=r.getAccountInfoFilteredBy({username:e},o);return n?(t.verbose("getAccountByUsername: Account matching username found, returning"),t.verbosePii(`getAccountByUsername: Returning signed-in accounts matching username: ${e}`),n):(t.verbose("getAccountByUsername: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByHomeId(e){const t=this.getRequestCorrelationId();return function(e,t,r,o){if(t.trace("getAccountByHomeId called"),!e)return t.warning("getAccountByHomeId: No homeAccountId provided"),null;const n=r.getAccountInfoFilteredBy({homeAccountId:e},o);return n?(t.verbose("getAccountByHomeId: Account matching homeAccountId found, returning"),t.verbosePii(`getAccountByHomeId: Returning signed-in accounts matching homeAccountId: ${e}`),n):(t.verbose("getAccountByHomeId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}getAccountByLocalId(e){const t=this.getRequestCorrelationId();return function(e,t,r,o){if(t.trace("getAccountByLocalId called"),!e)return t.warning("getAccountByLocalId: No localAccountId provided"),null;const n=r.getAccountInfoFilteredBy({localAccountId:e},o);return n?(t.verbose("getAccountByLocalId: Account matching localAccountId found, returning"),t.verbosePii(`getAccountByLocalId: Returning signed-in accounts matching localAccountId: ${e}`),n):(t.verbose("getAccountByLocalId: No matching account found, returning null"),null)}(e,this.logger,this.browserStorage,t)}setActiveAccount(e){const t=this.getRequestCorrelationId();!function(e,t,r){t.setActiveAccount(e,r)}(e,this.browserStorage,t)}getActiveAccount(){const e=this.getRequestCorrelationId();return function(e,t){return e.getActiveAccount(t)}(this.browserStorage,e)}async hydrateCache(e,t){this.logger.verbose("hydrateCache called");const r=Nd.createFromAccountInfo(e.account,e.cloudGraphHostName,e.msGraphHost);return await this.browserStorage.setAccount(r,e.correlationId),e.fromNativeBroker?(this.logger.verbose("Response was from native broker, storing in-memory"),this.nativeInternalStorage.hydrateCache(e,t)):this.browserStorage.hydrateCache(e,t)}async acquireTokenNative(e,t,r,o){if(this.logger.trace("acquireTokenNative called"),!this.platformAuthProvider)throw Qs(Ms);return new Ku(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,t,this.performanceClient,this.platformAuthProvider,r||this.getNativeAccountId(e),this.nativeInternalStorage,e.correlationId).acquireToken(e,o)}canUsePlatformBroker(e,t){if(this.logger.trace("canUsePlatformBroker called"),!this.platformAuthProvider)return this.logger.trace("canUsePlatformBroker: platform broker unavilable, returning false"),!1;if(!lf(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme))return this.logger.trace("canUsePlatformBroker: isBrokerAvailable returned false, returning false"),!1;if(e.prompt)switch(e.prompt){case fr:case ur:case dr:this.logger.trace("canUsePlatformBroker: prompt is compatible with platform broker flow");break;default:return this.logger.trace(`canUsePlatformBroker: prompt = ${e.prompt} is not compatible with platform broker flow, returning false`),!1}return!(!t&&!this.getNativeAccountId(e)&&(this.logger.trace("canUsePlatformBroker: nativeAccountId is not available, returning false"),1))}getNativeAccountId(e){const t=e.account||this.getAccount({loginHint:e.loginHint,sid:e.sid})||this.getActiveAccount();return t&&t.nativeAccountId||""}createPopupClient(e){return new uf(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createRedirectClient(e){return new hf(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentIframeClient(e){return new xf(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,863,this.performanceClient,this.nativeInternalStorage,this.platformAuthProvider,e)}createSilentCacheClient(e){return new Vu(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentRefreshClient(e){return new _f(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,this.performanceClient,this.platformAuthProvider,e)}createSilentAuthCodeClient(e){return new Of(this.config,this.browserStorage,this.browserCrypto,this.logger,this.eventHandler,this.navigationClient,866,this.performanceClient,this.platformAuthProvider,e)}addEventCallback(e,t){return this.eventHandler.addEventCallback(e,t)}removeEventCallback(e){this.eventHandler.removeEventCallback(e)}addPerformanceCallback(e){return xl(),this.performanceClient.addPerformanceCallback(e)}removePerformanceCallback(e){return this.performanceClient.removePerformanceCallback(e)}enableAccountStorageEvents(){this.config.cache.cacheLocation===Ba?this.eventHandler.subscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}disableAccountStorageEvents(){this.config.cache.cacheLocation===Ba?this.eventHandler.unsubscribeCrossTab():this.logger.info("Account storage events are only available when cacheLocation is set to localStorage")}getTokenCache(){return this.tokenCache}getLogger(){return this.logger}setLogger(e){this.logger=e}initializeWrapperLibrary(e,t){this.browserStorage.setWrapperMetadata(e,t)}setNavigationClient(e){this.navigationClient=e}getConfiguration(){return this.config}getPerformanceClient(){return this.performanceClient}isBrowserEnv(){return this.isBrowserEnvironment}getRequestCorrelationId(e){return e?.correlationId?e.correlationId:this.isBrowserEnvironment?il():Jt.EMPTY_STRING}async loginRedirect(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginRedirect called",t),this.acquireTokenRedirect({correlationId:t,...e||$a})}loginPopup(e){const t=this.getRequestCorrelationId(e);return this.logger.verbose("loginPopup called",t),this.acquireTokenPopup({correlationId:t,...e||$a})}async acquireTokenSilent(e){const t=this.getRequestCorrelationId(e),r=this.performanceClient.startMeasurement(Pn,t);r.add({cacheLookupPolicy:e.cacheLookupPolicy,scenarioId:e.scenarioId}),Pf(this.initialized,r),this.logger.verbose("acquireTokenSilent called",t);const o=e.account||this.getActiveAccount();if(!o)throw Qs(vs);return r.add({accountType:jf(o)}),this.acquireTokenSilentDeduped(e,o,t).then(o=>(r.end({success:!0,fromCache:o.fromCache,accessTokenSize:o.accessToken.length,idTokenSize:o.idToken.length}),{...o,state:e.state,correlationId:t})).catch(e=>{throw e instanceof Nr&&e.setCorrelationId(t),r.end({success:!1},e),e})}async acquireTokenSilentDeduped(e,t,r){const o=zd(this.config.auth.clientId,{...e,authority:e.authority||this.config.auth.authority,correlationId:r},t.homeAccountId),n=JSON.stringify(o),i=this.activeSilentTokenRequests.get(n);if(void 0===i){this.logger.verbose("acquireTokenSilent called for the first time, storing active request",r),this.performanceClient.addFields({deduped:!1},r);const o=rd(this.acquireTokenSilentAsync.bind(this),Nn,this.logger,this.performanceClient,r)({...e,correlationId:r},t);return this.activeSilentTokenRequests.set(n,o),o.finally(()=>{this.activeSilentTokenRequests.delete(n)})}return this.logger.verbose("acquireTokenSilent has been called previously, returning the result from the first call",r),this.performanceClient.addFields({deduped:!0},r),i}async acquireTokenSilentAsync(e,t){const r=()=>this.trackPageVisibility(e.correlationId);this.performanceClient.addQueueMeasurement(Nn,e.correlationId),this.eventHandler.emitEvent(tu,Va.Silent,e),e.correlationId&&this.performanceClient.incrementFields({visibilityChangeCount:0},e.correlationId),document.addEventListener("visibilitychange",r);const o=await rd(Ru,ii,this.logger,this.performanceClient,e.correlationId)(e,t,this.config,this.performanceClient,this.logger),n=e.cacheLookupPolicy||0;return this.acquireTokenSilentNoIframe(o,n).catch(async e=>{const t=function(e,t){const r=!(e instanceof Ad&&e.subError!==Sd),o=e.errorCode===Ta||e.errorCode===mo,n=r&&o||e.errorCode===kd||e.errorCode===Td,i=Ja.includes(t);return n&&i}(e,n);if(t){if(this.activeIframeRequest){if(5!==n){const[t,r]=this.activeIframeRequest;this.logger.verbose(`Iframe request is already in progress, awaiting resolution for request with correlationId: ${r}`,o.correlationId);const i=this.performanceClient.startMeasurement("awaitConcurrentIframe",o.correlationId);i.add({awaitIframeCorrelationId:r});const a=await t;if(i.end({success:a}),a)return this.logger.verbose(`Parallel iframe request with correlationId: ${r} succeeded. Retrying cache and/or RT redemption`,o.correlationId),this.acquireTokenSilentNoIframe(o,n);throw this.logger.info(`Iframe request with correlationId: ${r} failed. Interaction is required.`),e}return this.logger.warning("Another iframe request is currently in progress and CacheLookupPolicy is set to Skip. This may result in degraded performance and/or reliability for both calls. Please consider changing the CacheLookupPolicy to take advantage of request queuing and token cache.",o.correlationId),rd(this.acquireTokenBySilentIframe.bind(this),oi,this.logger,this.performanceClient,o.correlationId)(o)}{let e;return this.activeIframeRequest=[new Rf(t=>{e=t}),o.correlationId],this.logger.verbose("Refresh token expired/invalid or CacheLookupPolicy is set to Skip, attempting acquire token by iframe.",o.correlationId),rd(this.acquireTokenBySilentIframe.bind(this),oi,this.logger,this.performanceClient,o.correlationId)(o).then(t=>(e(!0),t)).catch(t=>{throw e(!1),t}).finally(()=>{this.activeIframeRequest=void 0})}}throw e}).then(t=>(this.eventHandler.emitEvent(ru,Va.Silent,t),e.correlationId&&this.performanceClient.addFields({fromCache:t.fromCache},e.correlationId),t)).catch(e=>{throw this.eventHandler.emitEvent(ou,Va.Silent,null,e),e}).finally(()=>{document.removeEventListener("visibilitychange",r)})}async acquireTokenSilentNoIframe(e,t){return lf(this.config,this.logger,this.platformAuthProvider,e.authenticationScheme)&&e.account.nativeAccountId?(this.logger.verbose("acquireTokenSilent - attempting to acquire token from native platform"),this.performanceClient.addFields({isPlatformBrokerRequest:!0},e.correlationId),this.acquireTokenNative(e,61,e.account.nativeAccountId,t).catch(async t=>{if(this.performanceClient.addFields({brokerErrorName:t.name,brokerErrorCode:t.errorCode},e.correlationId),t instanceof Lu&&Hu(t))throw this.logger.verbose("acquireTokenSilent - native platform unavailable, falling back to web flow"),this.platformAuthProvider=void 0,Bo(mo);throw t})):(this.logger.verbose("acquireTokenSilent - attempting to acquire token from web flow"),1===t&&this.logger.verbose("acquireTokenSilent - cache lookup policy set to AccessToken, attempting to acquire token from local cache"),rd(this.acquireTokenFromCache.bind(this),ei,this.logger,this.performanceClient,e.correlationId)(e,t).catch(r=>{if(1===t)throw r;return this.eventHandler.emitEvent("msal:acquireTokenFromNetworkStart",Va.Silent,e),rd(this.acquireTokenByRefreshToken.bind(this),jn,this.logger,this.performanceClient,e.correlationId)(e,t)}))}async preGeneratePkceCodes(e){return this.logger.verbose("Generating new PKCE codes"),this.pkceCode=await rd(rf,Qi,this.logger,this.performanceClient,e)(this.performanceClient,this.logger,e),Rf.resolve()}getPreGeneratedPkceCodes(e){this.logger.verbose("Attempting to pick up pre-generated PKCE codes");const t=this.pkceCode?{...this.pkceCode}:void 0;return this.pkceCode=void 0,this.logger.verbose((t?"Found":"Did not find")+" pre-generated PKCE codes"),this.performanceClient.addFields({usePreGeneratedPkce:!!t},e),t}logMultipleInstances(e){const t=this.config.auth.clientId;window&&(window.msal=window.msal||{},window.msal.clientIds=window.msal.clientIds||[],window.msal.clientIds.length>0&&this.logger.verbose("There is already an instance of MSAL.js in the window."),window.msal.clientIds.push(t),function(e,t,r){const o=window.msal?.clientIds||[],n=o.length,i=o.filter(t=>t===e).length;i>1&&r.warning("There is already an instance of MSAL.js in the window with the same client id."),t.add({msalInstanceCount:n,sameClientIdInstanceCount:i})}(t,e,this.logger))}}r(64583).Promise;class zf{static async createPublicClientApplication(e){const t=await async function(e){const t=new Ll(e);return await t.initialize(),Nf.createController(t,void 0)}(e);return new zf(e,t)}constructor(e,t){this.isBroker=!1,this.controller=t||new Nf(new Ll(e))}async initialize(e){return this.controller.initialize(e,this.isBroker)}async acquireTokenPopup(e){return this.controller.acquireTokenPopup(e)}acquireTokenRedirect(e){return this.controller.acquireTokenRedirect(e)}acquireTokenSilent(e){return this.controller.acquireTokenSilent(e)}acquireTokenByCode(e){return this.controller.acquireTokenByCode(e)}addEventCallback(e,t){return this.controller.addEventCallback(e,t)}removeEventCallback(e){return this.controller.removeEventCallback(e)}addPerformanceCallback(e){return this.controller.addPerformanceCallback(e)}removePerformanceCallback(e){return this.controller.removePerformanceCallback(e)}enableAccountStorageEvents(){this.controller.enableAccountStorageEvents()}disableAccountStorageEvents(){this.controller.disableAccountStorageEvents()}getAccount(e){return this.controller.getAccount(e)}getAccountByHomeId(e){return this.controller.getAccountByHomeId(e)}getAccountByLocalId(e){return this.controller.getAccountByLocalId(e)}getAccountByUsername(e){return this.controller.getAccountByUsername(e)}getAllAccounts(e){return this.controller.getAllAccounts(e)}handleRedirectPromise(e){return this.controller.handleRedirectPromise(e)}loginPopup(e){return this.controller.loginPopup(e)}loginRedirect(e){return this.controller.loginRedirect(e)}logout(e){return this.controller.logout(e)}logoutRedirect(e){return this.controller.logoutRedirect(e)}logoutPopup(e){return this.controller.logoutPopup(e)}ssoSilent(e){return this.controller.ssoSilent(e)}getTokenCache(){return this.controller.getTokenCache()}getLogger(){return this.controller.getLogger()}setLogger(e){this.controller.setLogger(e)}setActiveAccount(e){this.controller.setActiveAccount(e)}getActiveAccount(){return this.controller.getActiveAccount()}initializeWrapperLibrary(e,t){return this.controller.initializeWrapperLibrary(e,t)}setNavigationClient(e){this.controller.setNavigationClient(e)}getConfiguration(){return this.controller.getConfiguration()}async hydrateCache(e,t){return this.controller.hydrateCache(e,t)}clearCache(e){return this.controller.clearCache(e)}}var qf,Mf=r(64583).Promise;function Ff(e,t,r,o){return new(r||(r=Mf))(function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"}(qf||(qf={}));var Df=r(64583).Promise;class Lf{static validateDependencies(e){if(0===e.size){const e=new Error("Empty requests map, Please provide at least one request.");throw e.name="Empty Requests Error",e}return(e=>{const t=e.entries();let r=t.next();for(;!r.done;){const e=r.value[1];if(void 0!==e.dependsOn&&e.dependsOn.length>0)return!1;r=t.next()}return!0})(e)||(e=>{const t=e.entries();let r=t.next();const o=r.value[1];if(void 0!==o.dependsOn&&o.dependsOn.length>0)return!1;let n=r;for(r=t.next();!r.done;){const e=r.value[1];if(void 0===e.dependsOn||1!==e.dependsOn.length||e.dependsOn[0]!==n.value[1].id)return!1;n=r,r=t.next()}return!0})(e)||(e=>{const t=e.entries();let r=t.next();const o=r.value[1];let n;if(void 0===o.dependsOn||0===o.dependsOn.length)n=o.id;else{if(1!==o.dependsOn.length)return!1;{const t=o.dependsOn[0];if(t===o.id||!e.has(t))return!1;n=t}}for(r=t.next();!r.done;){const e=r.value[1];if((void 0===e.dependsOn||0===e.dependsOn.length)&&n!==e.id)return!1;if(void 0!==e.dependsOn&&0!==e.dependsOn.length){if(1===e.dependsOn.length&&(e.id===n||e.dependsOn[0]!==n))return!1;if(e.dependsOn.length>1)return!1}r=t.next()}return!0})(e)}static getRequestData(e){return Ff(this,void 0,void 0,function*(){const t={url:""},r=new RegExp("^https?://");t.url=r.test(e.url)?"/"+e.url.split(/.*?\/\/.*?\//)[1]:e.url,t.method=e.method;const o={};return e.headers.forEach((e,t)=>{o[t]=e}),Object.keys(o).length&&(t.headers=o),e.method!==qf.PATCH&&e.method!==qf.POST&&e.method!==qf.PUT||(t.body=yield Lf.getRequestBody(e)),t})}static getRequestBody(e){return Ff(this,void 0,void 0,function*(){let t,r=!1;try{const o=e.clone();t=yield o.json(),r=!0}catch(e){}if(!r)try{if("undefined"!=typeof Blob){const r=yield e.blob(),o=new FileReader;t=yield new Df(e=>{o.addEventListener("load",()=>{const t=o.result,r=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$").exec(t);e(r[4])},!1),o.readAsDataURL(r)})}else"undefined"!=typeof Buffer&&(t=(yield e.buffer()).toString("base64"));r=!0}catch(e){}return t})}constructor(e){if(this.requests=new Map,void 0!==e){const t=Lf.requestLimit;if(e.length>t){const e=new Error(`Maximum requests limit exceeded, Max allowed number of requests are ${t}`);throw e.name="Limit Exceeded Error",e}for(const t of e)this.addRequest(t)}}addRequest(e){const t=Lf.requestLimit;if(""===e.id){const e=new Error("Id for a request is empty, Please provide an unique id");throw e.name="Empty Id For Request",e}if(this.requests.size===t){const e=new Error(`Maximum requests limit exceeded, Max allowed number of requests are ${t}`);throw e.name="Limit Exceeded Error",e}if(this.requests.has(e.id)){const t=new Error(`Adding request with duplicate id ${e.id}, Make the id of the requests unique`);throw t.name="Duplicate RequestId Error",t}return this.requests.set(e.id,e),e.id}removeRequest(e){const t=this.requests.delete(e),r=this.requests.entries();let o=r.next();for(;!o.done;){const t=o.value[1].dependsOn;if(void 0!==t){const r=t.indexOf(e);-1!==r&&t.splice(r,1),0===t.length&&delete o.value[1].dependsOn}o=r.next()}return t}getContent(){return Ff(this,void 0,void 0,function*(){const e=[],t={requests:e},r=this.requests.entries();let o=r.next();if(o.done){const e=new Error("No requests added yet, Please add at least one request.");throw e.name="Empty Payload",e}if(!Lf.validateDependencies(this.requests)){const e=new Error("Invalid dependency found, Dependency should be:\n1. Parallel - no individual request states a dependency in the dependsOn property.\n2. Serial - all individual requests depend on the previous individual request.\n3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.");throw e.name="Invalid Dependency",e}for(;!o.done;){const t=o.value[1],n=yield Lf.getRequestData(t.request);if(void 0!==n.body&&(void 0===n.headers||void 0===n.headers["content-type"])){const e=new Error(`Content-type header is not mentioned for request #${t.id}, For request having body, Content-type header should be mentioned`);throw e.name="Invalid Content-type header",e}n.id=t.id,void 0!==t.dependsOn&&t.dependsOn.length>0&&(n.dependsOn=t.dependsOn),e.push(n),o=r.next()}return t.requests=e,t})}addDependency(e,t){if(!this.requests.has(e)){const t=new Error(`Dependent ${e} does not exists, Please check the id`);throw t.name="Invalid Dependent",t}if(void 0!==t&&!this.requests.has(t)){const e=new Error(`Dependency ${t} does not exists, Please check the id`);throw e.name="Invalid Dependency",e}if(void 0!==t){const r=this.requests.get(e);if(void 0===r.dependsOn&&(r.dependsOn=[]),-1!==r.dependsOn.indexOf(t)){const r=new Error(`Dependency ${t} is already added for the request ${e}`);throw r.name="Duplicate Dependency",r}r.dependsOn.push(t)}else{const r=this.requests.entries();let o,n=r.next();for(;!n.done&&n.value[1].id!==e;)o=n,n=r.next();if(void 0===o){const e=new Error(`Can't add dependency ${t}, There is only a dependent request in the batch`);throw e.name="Invalid Dependency Addition",e}{const t=o.value[0];if(void 0===n.value[1].dependsOn&&(n.value[1].dependsOn=[]),-1!==n.value[1].dependsOn.indexOf(t)){const r=new Error(`Dependency ${t} is already added for the request ${e}`);throw r.name="Duplicate Dependency",r}n.value[1].dependsOn.push(t)}}}removeDependency(e,t){const r=this.requests.get(e);if(void 0===r||void 0===r.dependsOn||0===r.dependsOn.length)return!1;if(void 0!==t){const e=r.dependsOn.indexOf(t);return-1!==e&&(r.dependsOn.splice(e,1),!0)}return delete r.dependsOn,!0}}Lf.requestLimit=20;const Hf=new Set(["graph.microsoft.com","graph.microsoft.us","dod-graph.microsoft.us","graph.microsoft.de","microsoftgraph.chinacloudapi.cn","canary.graph.microsoft.com"]);class Uf extends Error{static setGraphClientError(e){let t;return e instanceof Error?t=e:(t=new Uf,t.customError=e),t}constructor(e){super(e),Object.setPrototypeOf(this,Uf.prototype)}}const Wf=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"],Vf=e=>{const t=e&&e.constructor&&e.constructor.name;if("Buffer"===t||"Blob"===t||"File"===t||"FormData"===t||"string"==typeof e)return e;if("ArrayBuffer"===t)e=Buffer.from(e);else if("Int8Array"===t||"Int16Array"===t||"Int32Array"===t||"Uint8Array"===t||"Uint16Array"===t||"Uint32Array"===t||"Uint8ClampedArray"===t||"Float32Array"===t||"Float64Array"===t||"DataView"===t)e=Buffer.from(e.buffer);else try{e=JSON.stringify(e)}catch(e){throw new Error("Unable to stringify the content")}return e},$f=e=>Gf(e),Kf=(e,t)=>(t.forEach(e=>Jf(e)),Gf(e,t)),Gf=(e,t=Hf)=>{if(-1!==(e=e.toLowerCase()).indexOf("https://")){const r=(e=e.replace("https://","")).indexOf(":"),o=e.indexOf("/");let n="";if(-1!==o)return-1!==r&&r{if(-1!==e.indexOf("/"))throw new Uf("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`")};class Qf{constructor(e=[]){this.middlewareOptions=new Map;for(const t of e){const e=t.constructor;this.middlewareOptions.set(e,t)}}getMiddlewareOptions(e){return this.middlewareOptions.get(e)}setMiddlewareOptions(e,t){this.middlewareOptions.set(e,t)}}var Xf=r(64583).Promise;const Yf=(e,t,r)=>{let o=null;if("undefined"!=typeof Request&&e instanceof Request)o=e.headers.get(r);else if(void 0!==t&&void 0!==t.headers)if("undefined"!=typeof Headers&&t.headers instanceof Headers)o=t.headers.get(r);else if(t.headers instanceof Array){const e=t.headers;for(let t=0,n=e.length;t{if("undefined"!=typeof Request&&e instanceof Request)e.headers.set(r,o);else if(void 0!==t)if(void 0===t.headers)t.headers=new Headers({[r]:o});else if("undefined"!=typeof Headers&&t.headers instanceof Headers)t.headers.set(r,o);else if(t.headers instanceof Array){let e=0;const n=t.headers.length;for(;e{"undefined"!=typeof Request&&e instanceof Request?e.headers.append(r,o):void 0!==t&&(void 0===t.headers?t.headers=new Headers({[r]:o}):"undefined"!=typeof Headers&&t.headers instanceof Headers?t.headers.append(r,o):t.headers instanceof Array?t.headers.push([r,o]):void 0===t.headers?t.headers={[r]:o}:void 0===t.headers[r]?t.headers[r]=o:t.headers[r]+=`, ${o}`)};class th{constructor(e,t){this.authenticationProvider=e,this.authenticationProviderOptions=t}}var rh;!function(e){e[e.NONE=0]="NONE",e[e.REDIRECT_HANDLER_ENABLED=1]="REDIRECT_HANDLER_ENABLED",e[e.RETRY_HANDLER_ENABLED=2]="RETRY_HANDLER_ENABLED",e[e.AUTHENTICATION_HANDLER_ENABLED=4]="AUTHENTICATION_HANDLER_ENABLED"}(rh||(rh={}));class oh{constructor(){this.featureUsage=rh.NONE}static updateFeatureUsageFlag(e,t){let r;e.middlewareControl instanceof Qf?r=e.middlewareControl.getMiddlewareOptions(oh):e.middlewareControl=new Qf,void 0===r&&(r=new oh,e.middlewareControl.setMiddlewareOptions(oh,r)),r.setFeatureUsage(t)}setFeatureUsage(e){this.featureUsage=this.featureUsage|e}getFeatureUsage(){return this.featureUsage.toString(16)}}class nh{constructor(e){this.authenticationProvider=e}execute(e){return Ff(this,void 0,void 0,function*(){const t="string"==typeof e.request?e.request:e.request.url;if($f(t)||e.customHosts&&Kf(t,e.customHosts)){let t,r,o;e.middlewareControl instanceof Qf&&(t=e.middlewareControl.getMiddlewareOptions(th)),t&&(r=t.authenticationProvider,o=t.authenticationProviderOptions),r||(r=this.authenticationProvider);const n=`Bearer ${yield r.getAccessToken(o)}`;eh(e.request,e.options,nh.AUTHORIZATION_HEADER,n),oh.updateFeatureUsageFlag(e,rh.AUTHENTICATION_HANDLER_ENABLED)}else e.options.headers&&delete e.options.headers[nh.AUTHORIZATION_HEADER];return yield this.nextMiddleware.execute(e)})}setNext(e){this.nextMiddleware=e}}nh.AUTHORIZATION_HEADER="Authorization";class ih{constructor(e=ih.DEFAULT_DELAY,t=ih.DEFAULT_MAX_RETRIES,r=ih.defaultShouldRetry){if(e>ih.MAX_DELAY&&t>ih.MAX_MAX_RETRIES){const e=new Error(`Delay and MaxRetries should not be more than ${ih.MAX_DELAY} and ${ih.MAX_MAX_RETRIES}`);throw e.name="MaxLimitExceeded",e}if(e>ih.MAX_DELAY){const e=new Error(`Delay should not be more than ${ih.MAX_DELAY}`);throw e.name="MaxLimitExceeded",e}if(t>ih.MAX_MAX_RETRIES){const e=new Error(`MaxRetries should not be more than ${ih.MAX_MAX_RETRIES}`);throw e.name="MaxLimitExceeded",e}if(e<0&&t<0){const e=new Error("Delay and MaxRetries should not be negative");throw e.name="MinExpectationNotMet",e}if(e<0){const e=new Error("Delay should not be negative");throw e.name="MinExpectationNotMet",e}if(t<0){const e=new Error("MaxRetries should not be negative");throw e.name="MinExpectationNotMet",e}this.delay=Math.min(e,ih.MAX_DELAY),this.maxRetries=Math.min(t,ih.MAX_MAX_RETRIES),this.shouldRetry=r}getMaxDelay(){return ih.MAX_DELAY}}ih.DEFAULT_DELAY=3,ih.DEFAULT_MAX_RETRIES=3,ih.MAX_DELAY=180,ih.MAX_MAX_RETRIES=10,ih.defaultShouldRetry=()=>!0;var ah,sh,ch,lh=r(64583).Promise;class dh{constructor(e=new ih){this.options=e}isRetry(e){return-1!==dh.RETRY_STATUS_CODES.indexOf(e.status)}isBuffered(e,t){const r="string"==typeof e?t.method:e.method;return r!==qf.PUT&&r!==qf.PATCH&&r!==qf.POST||"application/octet-stream"!==Yf(e,t,"Content-Type")}getDelay(e,t,r){const o=()=>Number(Math.random().toFixed(3)),n=void 0!==e.headers?e.headers.get(dh.RETRY_AFTER_HEADER):null;let i;return i=null!==n?Number.isNaN(Number(n))?Math.round((new Date(n).getTime()-Date.now())/1e3):Number(n):t>=2?this.getExponentialBackOffTime(t)+r+o():r+o(),Math.min(i,this.options.getMaxDelay()+o())}getExponentialBackOffTime(e){return Math.round(.5*(Math.pow(2,e)-1))}sleep(e){return Ff(this,void 0,void 0,function*(){const t=1e3*e;return new lh(e=>setTimeout(e,t))})}getOptions(e){let t;return e.middlewareControl instanceof Qf&&(t=e.middlewareControl.getMiddlewareOptions(this.options.constructor)),void 0===t&&(t=Object.assign(new ih,this.options)),t}executeWithRetry(e,t,r){return Ff(this,void 0,void 0,function*(){if(yield this.nextMiddleware.execute(e),tuh.MAX_MAX_REDIRECTS){const e=new Error(`MaxRedirects should not be more than ${uh.MAX_MAX_REDIRECTS}`);throw e.name="MaxLimitExceeded",e}if(e<0){const e=new Error("MaxRedirects should not be negative");throw e.name="MinExpectationNotMet",e}this.maxRedirects=e,this.shouldRedirect=t}}uh.DEFAULT_MAX_REDIRECTS=5,uh.MAX_MAX_REDIRECTS=20,uh.defaultShouldRedirect=()=>!0;class fh{constructor(e=new uh){this.options=e}isRedirect(e){return-1!==fh.REDIRECT_STATUS_CODES.indexOf(e.status)}hasLocationHeader(e){return e.headers.has(fh.LOCATION_HEADER)}getLocationHeader(e){return e.headers.get(fh.LOCATION_HEADER)}isRelativeURL(e){return-1===e.indexOf("://")}shouldDropAuthorizationHeader(e,t){const r=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,o=r.exec(e);let n,i;null!==o&&(n=o[0]);const a=r.exec(t);return null!==a&&(i=a[0]),void 0!==n&&void 0!==i&&n!==i}updateRequestUrl(e,t){return Ff(this,void 0,void 0,function*(){var r,o;t.request="string"==typeof t.request?e:yield(r=e,o=t.request,Ff(void 0,void 0,void 0,function*(){const e=o.headers.get("Content-Type")?yield o.blob():yield Xf.resolve(void 0),{method:t,headers:n,referrer:i,referrerPolicy:a,mode:s,credentials:c,cache:l,redirect:d,integrity:u,keepalive:f,signal:h}=o;return new Request(r,{method:t,headers:n,body:e,referrer:i,referrerPolicy:a,mode:s,credentials:c,cache:l,redirect:d,integrity:u,keepalive:f,signal:h})}))})}getOptions(e){let t;return e.middlewareControl instanceof Qf&&(t=e.middlewareControl.getMiddlewareOptions(uh)),void 0===t&&(t=Object.assign(new uh,this.options)),t}executeWithRedirect(e,t,r){return Ff(this,void 0,void 0,function*(){yield this.nextMiddleware.execute(e);const o=e.response;if(t{let e="";for(let t=0;t<32;t++)8!==t&&12!==t&&16!==t&&20!==t||(e+="-"),e+=Math.floor(16*Math.random()).toString(16);return e})(),Zf(e.request,e.options,hh.CLIENT_REQUEST_ID_HEADER,t));let r,o=`${hh.PRODUCT_NAME}/3.0.7`;if(e.middlewareControl instanceof Qf&&(r=e.middlewareControl.getMiddlewareOptions(oh)),r){const e=r.getFeatureUsage();o+=` (${hh.FEATURE_USAGE_STRING}=${e})`}eh(e.request,e.options,hh.SDK_VERSION_HEADER,o)}else delete e.options.headers[hh.CLIENT_REQUEST_ID_HEADER],delete e.options.headers[hh.SDK_VERSION_HEADER];return yield this.nextMiddleware.execute(e)})}setNext(e){this.nextMiddleware=e}}hh.CLIENT_REQUEST_ID_HEADER="client-request-id",hh.SDK_VERSION_HEADER="SdkVersion",hh.PRODUCT_NAME="graph-js",hh.FEATURE_USAGE_STRING="featureUsage",(sh=ah||(ah={}))[sh.MANUAL=0]="MANUAL",sh[sh.RANDOM=1]="RANDOM",function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"}(ch||(ch={}));var ph,gh,mh,vh=r(64583).Promise;!function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"}(ph||(ph={})),function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"}(gh||(gh={})),function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"}(mh||(mh={}));class bh{static parseDocumentResponse(e,t){return"undefined"!=typeof DOMParser?new vh((r,o)=>{e.text().then(e=>{try{const o=(new DOMParser).parseFromString(e,t);r(o)}catch(e){o(e)}})}):vh.resolve(e.body)}static convertResponse(e,t){return Ff(this,void 0,void 0,function*(){if(204===e.status)return vh.resolve();let r;const o=e.headers.get("Content-type");switch(t){case ch.ARRAYBUFFER:r=yield e.arrayBuffer();break;case ch.BLOB:r=yield e.blob();break;case ch.DOCUMENT:r=yield bh.parseDocumentResponse(e,ph.TEXT_XML);break;case ch.JSON:r=yield e.json();break;case ch.STREAM:r=yield vh.resolve(e.body);break;case ch.TEXT:r=yield e.text();break;default:if(null!==o){const t=o.split(";")[0];r=new RegExp(mh.DOCUMENT).test(t)?yield bh.parseDocumentResponse(e,t):new RegExp(mh.IMAGE).test(t)?e.blob():t===gh.TEXT_PLAIN?yield e.text():t===gh.APPLICATION_JSON?yield e.json():vh.resolve(e.body)}else r=vh.resolve(e.body)}return r})}static getResponse(e,t,r){return Ff(this,void 0,void 0,function*(){if(t===ch.RAW)return vh.resolve(e);{const o=yield bh.convertResponse(e,t);if(!e.ok)throw o;if("function"!=typeof r)return o;r(null,o)}})}}class yh{constructor(e=-1,t=-1){this.minValue=e,this.maxValue=t}}class wh{get location(){return this._location}set location(e){this._location=e}get responseBody(){return this._responseBody}set responseBody(e){this._responseBody=e}constructor(e,t){this._location=t,this._responseBody=e}static CreateUploadResult(e,t){return new wh(e,t.get("location"))}}class kh{static createUploadSession(e,t,r,o={}){return Ff(this,void 0,void 0,function*(){const n=yield e.api(t).headers(o).post(r);return{url:n.uploadUrl,expiry:new Date(n.expirationDateTime),isCancelled:!1}})}constructor(e,t,r,o={}){if(this.DEFAULT_FILE_SIZE=5242880,this.client=e,!t.sliceFile)throw new Uf("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface");this.file=t,this.file=t,o.rangeSize||(o.rangeSize=this.DEFAULT_FILE_SIZE),this.options=o,this.uploadSession=r,this.nextRange=new yh(0,this.options.rangeSize-1)}parseRange(e){const t=e[0];if(void 0===t||""===t)return new yh;const r=t.split("-"),o=parseInt(r[0],10);let n=parseInt(r[1],10);return Number.isNaN(n)&&(n=this.file.size-1),new yh(o,n)}updateTaskStatus(e){this.uploadSession.expiry=new Date(e.expirationDateTime),this.nextRange=this.parseRange(e.nextExpectedRanges)}getNextRange(){if(-1===this.nextRange.minValue)return this.nextRange;const e=this.nextRange.minValue;let t=e+this.options.rangeSize-1;return t>=this.file.size&&(t=this.file.size-1),new yh(e,t)}sliceFile(e){if(console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."),this.file.content instanceof ArrayBuffer||this.file.content instanceof Blob||this.file.content instanceof Uint8Array)return this.file.content.slice(e.minValue,e.maxValue+1);throw new Uf("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated.")}upload(){return Ff(this,void 0,void 0,function*(){const e=this.options&&this.options.uploadEventHandlers;for(;!this.uploadSession.isCancelled;){const t=this.getNextRange();if(-1===t.maxValue){const e=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file");throw e.name="Invalid Session",e}const r=yield this.file.sliceFile(t),o=yield this.uploadSliceGetRawResponse(r,t,this.file.size);if(!o)throw new Uf("Something went wrong! Large file upload slice response is null.");const n=yield bh.getResponse(o);if(201===o.status||200===o.status&&n.id)return this.reportProgress(e,t),wh.CreateUploadResult(n,o.headers);const i={expirationDateTime:n.expirationDateTime||n.ExpirationDateTime,nextExpectedRanges:n.NextExpectedRanges||n.nextExpectedRanges};this.updateTaskStatus(i),this.reportProgress(e,t)}})}reportProgress(e,t){e&&e.progress&&e.progress(t,e.extraCallbackParam)}uploadSlice(e,t,r){return Ff(this,void 0,void 0,function*(){return yield this.client.api(this.uploadSession.url).headers({"Content-Length":""+(t.maxValue-t.minValue+1),"Content-Range":`bytes ${t.minValue}-${t.maxValue}/${r}`,"Content-Type":"application/octet-stream"}).put(e)})}uploadSliceGetRawResponse(e,t,r){return Ff(this,void 0,void 0,function*(){return yield this.client.api(this.uploadSession.url).headers({"Content-Length":""+(t.maxValue-t.minValue+1),"Content-Range":`bytes ${t.minValue}-${t.maxValue}/${r}`,"Content-Type":"application/octet-stream"}).responseType(ch.RAW).put(e)})}cancel(){return Ff(this,void 0,void 0,function*(){const e=yield this.client.api(this.uploadSession.url).responseType(ch.RAW).delete();return 204===e.status&&(this.uploadSession.isCancelled=!0),e})}getStatus(){return Ff(this,void 0,void 0,function*(){const e=yield this.client.api(this.uploadSession.url).get();return this.updateTaskStatus(e),e})}resume(){return Ff(this,void 0,void 0,function*(){return yield this.getStatus(),yield this.upload()})}getUploadSession(){return this.uploadSession}}class Ch{constructor(e,t,r){if(this.content=e,this.name=t,this.size=r,!e||!t||!r)throw new Uf("Please provide the upload content, name of the file and size of the file")}sliceFile(e){return this.content.slice(e.minValue,e.maxValue+1)}}class Th extends kh{static constructCreateSessionUrl(e,t=Th.DEFAULT_UPLOAD_PATH){return e=e.trim(),""===(t=t.trim())&&(t="/"),"/"!==t[0]&&(t=`/${t}`),"/"!==t[t.length-1]&&(t=`${t}/`),`/me/drive/root:${t.split("/").map(e=>encodeURIComponent(e)).join("/")}${encodeURIComponent(e)}:/createUploadSession`}static getFileInfo(e,t){let r,o;if("undefined"!=typeof Blob&&e instanceof Blob)r=new File([e],t),o=r.size;else if("undefined"!=typeof File&&e instanceof File)r=e,o=r.size;else if("undefined"!=typeof Uint8Array&&e instanceof Uint8Array){const t=e;o=t.byteLength,r=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}return{content:r,size:o}}static create(e,t,r){return Ff(this,void 0,void 0,function*(){if(!e||!t||!r)throw new Uf("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");const o=r.fileName,n=Th.getFileInfo(t,o),i=new Ch(n.content,o,n.size);return this.createTaskWithFileObject(e,i,r)})}static createTaskWithFileObject(e,t,r){return Ff(this,void 0,void 0,function*(){if(!e||!t||!r)throw new Uf("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");const o=r.uploadSessionURL?r.uploadSessionURL:Th.constructCreateSessionUrl(r.fileName,r.path),n={fileName:r.fileName,fileDescription:r.fileDescription,conflictBehavior:r.conflictBehavior},i=yield Th.createUploadSession(e,o,n),a=((e=5242880)=>{const t=62914560;return e>t&&(e=t),(r=e)>327680&&(r=320*Math.floor(r/327680)*1024),r;var r})(r.rangeSize);return new Th(e,t,i,{rangeSize:a,uploadEventHandlers:r.uploadEventHandlers})})}static createUploadSession(e,t,r){const o=Object.create(null,{createUploadSession:{get:()=>super.createUploadSession}});return Ff(this,void 0,void 0,function*(){const n={item:{"@microsoft.graph.conflictBehavior":(null==r?void 0:r.conflictBehavior)||"rename",name:null==r?void 0:r.fileName,description:null==r?void 0:r.fileDescription}};return o.createUploadSession.call(this,e,t,n)})}constructor(e,t,r,o){super(e,t,r,o)}commit(e,t="rename"){return Ff(this,void 0,void 0,function*(){const r={name:this.file.name,"@microsoft.graph.conflictBehavior":t,"@microsoft.graph.sourceUrl":this.uploadSession.url};return yield this.client.api(e).put(r)})}}Th.DEFAULT_UPLOAD_PATH="/",r(64583).Promise;var xh=r(64583).Promise;class Sh{constructor(e){this.provider=e}getAccessToken(){return Ff(this,void 0,void 0,function*(){return new xh((e,t)=>{this.provider((r,o)=>Ff(this,void 0,void 0,function*(){if(o)e(o);else{r||(r=new Uf("Access token is undefined or empty.\t\t\t\t\t\tPlease provide a valid token.\t\t\t\t\t\tFor more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md"));const e=yield Uf.setGraphClientError(r);t(e)}}))})})}}class Ih extends Error{constructor(e=-1,t,r){super(t||r&&r.message),Object.setPrototypeOf(this,Ih.prototype),this.statusCode=e,this.code=null,this.requestId=null,this.date=new Date,this.body=null,this.stack=r?r.stack:this.stack}}class _h{static constructError(e,t,r){const o=new Ih(t,"",e);return void 0!==e.name&&(o.code=e.name),o.body=e.toString(),o.date=new Date,o.headers=null==r?void 0:r.headers,o}static constructErrorFromResponse(e,t,r){const o=e.error,n=new Ih(t,o.message);return n.code=o.code,void 0!==o.innerError&&(n.requestId=o.innerError["request-id"],n.date=new Date(o.innerError.date)),n.body=JSON.stringify(o),n.headers=null==r?void 0:r.headers,n}static getError(e=null,t=-1,r,o){return Ff(this,void 0,void 0,function*(){let n;if(e&&e.error?n=_h.constructErrorFromResponse(e,t,o):e instanceof Error?n=_h.constructError(e,t,o):(n=new Ih(t),n.body=e),"function"!=typeof r)return n;r(n,null)})}}class Eh{constructor(e,t,r){this.parsePath=e=>{if(-1!==e.indexOf("https://")){const t=(e=e.replace("https://","")).indexOf("/");-1!==t&&(this.urlComponents.host="https://"+e.substring(0,t),e=e.substring(t+1,e.length));const r=e.indexOf("/");-1!==r&&(this.urlComponents.version=e.substring(0,r),e=e.substring(r+1,e.length))}"/"===e.charAt(0)&&(e=e.substr(1));const t=e.indexOf("?");if(-1===t)this.urlComponents.path=e;else{this.urlComponents.path=e.substr(0,t);const r=e.substring(t+1,e.length).split("&");for(const e of r)this.parseQueryParameter(e)}},this.httpClient=e,this.config=t,this.urlComponents={host:this.config.baseUrl,version:this.config.defaultVersion,oDataQueryParams:{},otherURLQueryParams:{},otherURLQueryOptions:[]},this._headers={},this._options={},this._middlewareOptions=[],this.parsePath(r)}addCsvQueryParameter(e,t,r){this.urlComponents.oDataQueryParams[e]=this.urlComponents.oDataQueryParams[e]?this.urlComponents.oDataQueryParams[e]+",":"";let o=[];r.length>1&&"string"==typeof t?o=Array.prototype.slice.call(r):"string"==typeof t?o.push(t):o=o.concat(t),this.urlComponents.oDataQueryParams[e]+=o.join(",")}buildFullUrl(){const e=(e=>{const t=e=>e.replace(/^\/+/,"");return Array.prototype.slice.call(e).reduce((e,r)=>{return[(o=e,o.replace(/\/+$/,"")),t(r)].join("/");var o})})([this.urlComponents.host,this.urlComponents.version,this.urlComponents.path])+this.createQueryString();return this.config.debugLogging&&console.log(e),e}createQueryString(){const e=this.urlComponents,t=[];if(0!==Object.keys(e.oDataQueryParams).length)for(const r in e.oDataQueryParams)Object.prototype.hasOwnProperty.call(e.oDataQueryParams,r)&&t.push(r+"="+e.oDataQueryParams[r]);if(0!==Object.keys(e.otherURLQueryParams).length)for(const r in e.otherURLQueryParams)Object.prototype.hasOwnProperty.call(e.otherURLQueryParams,r)&&t.push(r+"="+e.otherURLQueryParams[r]);if(0!==e.otherURLQueryOptions.length)for(const r of e.otherURLQueryOptions)t.push(r);return t.length>0?"?"+t.join("&"):""}parseQueryParameter(e){if("string"==typeof e)if("?"===e.charAt(0)&&(e=e.substring(1)),-1!==e.indexOf("&")){const t=e.split("&");for(const e of t)this.parseQueryParamenterString(e)}else this.parseQueryParamenterString(e);else if(e.constructor===Object)for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&this.setURLComponentsQueryParamater(t,e[t]);return this}parseQueryParamenterString(e){if(this.isValidQueryKeyValuePair(e)){const t=e.indexOf("="),r=e.substring(0,t),o=e.substring(t+1);this.setURLComponentsQueryParamater(r,o)}else this.urlComponents.otherURLQueryOptions.push(e)}setURLComponentsQueryParamater(e,t){if(-1!==Wf.indexOf(e)){const r=this.urlComponents.oDataQueryParams[e],o=r&&("$expand"===e||"$select"===e||"$orderby"===e);this.urlComponents.oDataQueryParams[e]=o?r+","+t:t}else this.urlComponents.otherURLQueryParams[e]=t}isValidQueryKeyValuePair(e){const t=e.indexOf("=");return-1!==t&&!(-1!==e.indexOf("(")&&e.indexOf("(")1?this.parseMiddleWareArray(e):this.middleware=e[0]}parseMiddleWareArray(e){e.forEach((t,r)=>{r{if(void 0===Rh&&"undefined"==typeof fetch){const e=new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.");throw e.name="PolyFillNotAvailable",e}if(void 0===Rh){const e=new Error("Library cannot function without Promise. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}if("undefined"==typeof fetch){const e=new Error("Library cannot function without fetch. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}})();for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.config[t]=e[t]);let t;if(void 0!==e.authProvider&&void 0!==e.middleware){const e=new Error;throw e.name="AmbiguityInInitialization",e.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both",e}if(void 0!==e.authProvider)t=Oh.createWithAuthenticationProvider(e.authProvider);else{if(void 0===e.middleware){const e=new Error;throw e.name="InvalidMiddlewareChain",e.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain",e}t=new Ah(...[].concat(e.middleware))}this.httpClient=t}api(e){return new Eh(this.httpClient,this.config,e)}}function Ph(e){return e.reduce(function(e,t){var r=t[0],o=t[1];return e[r]=o,e[o]=r,e},{})}function Nh(e){return"number"==typeof e}function zh(e,t){return-1!==e.indexOf(t)}function qh(e,t,r,o){return t+(n=r,0===parseFloat(n)?n:"-"===n[0]?n.slice(1):"-"+n)+o;var n}function Mh(e){return e.replace(/ +/g," ").split(" ").map(function(e){return e.trim()}).filter(Boolean).reduce(function(e,t){var r=e.list,o=e.state,n=(t.match(/\(/g)||[]).length,i=(t.match(/\)/g)||[]).length;return o.parensDepth>0?r[r.length-1]=r[r.length-1]+" "+t:r.push(t),o.parensDepth+=n-i,{list:r,state:o}},{list:[],state:{parensDepth:0}}).list}function Fh(e){var t=Mh(e);if(t.length<=3||t.length>4)return e;var r=t[0],o=t[1],n=t[2];return[r,t[3],n,o].join(" ")}var Dh={padding:function(e){var t=e.value;return Nh(t)?t:Fh(t)},textShadow:function(e){return function(e){for(var t=[],r=0,o=0,n=!1;o0?hp(Sp,--Tp):0,kp--,10===xp&&(kp=1,wp--),xp}function Ap(){return xp=Tp2||jp(xp)>3?"":" "}function Mp(e,t){for(;--t&&Ap()&&!(xp<48||xp>102||xp>57&&xp<65||xp>70&&xp<97););return Rp(e,Op()+(t<6&&32==Bp()&&32==Ap()))}function Fp(e){for(;Ap();)switch(xp){case e:return Tp;case 34:case 39:34!==e&&39!==e&&Fp(xp);break;case 40:41===e&&Fp(e);break;case 92:Ap()}return Tp}function Dp(e,t){for(;Ap()&&e+xp!==57&&(e+xp!==84||47!==Bp()););return"/*"+Rp(t,Tp-1)+"*"+sp(47===e?e:Ap())}function Lp(e){for(;!jp(Bp());)Ap();return Rp(e,Tp)}function Hp(e){return Np(Up("",null,null,null,[""],e=Pp(e),0,[0],e))}function Up(e,t,r,o,n,i,a,s,c){for(var l=0,d=0,u=a,f=0,h=0,p=0,g=1,m=1,v=1,b=0,y="",w=n,k=i,C=o,T=y;m;)switch(p=b,b=Ap()){case 40:if(108!=p&&58==hp(T,u-1)){-1!=fp(T+=up(zp(b),"&","&\f"),"&\f",ap(l?s[l-1]:0))&&(v=-1);break}case 34:case 39:case 91:T+=zp(b);break;case 9:case 10:case 13:case 32:T+=qp(p);break;case 92:T+=Mp(Op()-1,7);continue;case 47:switch(Bp()){case 42:case 47:vp(Vp(Dp(Ap(),Op()),t,r,c),c),5!=jp(p||1)&&5!=jp(Bp()||1)||!gp(T)||" "===pp(T,-1,void 0)||(T+=" ");break;default:T+="/"}break;case 123*g:s[l++]=gp(T)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+d:-1==v&&(T=up(T,/\f/g,"")),h>0&&(gp(T)-u||0===g&&47===p)&&vp(h>32?$p(T+";",o,r,u-1,c):$p(up(T," ","")+";",o,r,u-2,c),c);break;case 59:T+=";";default:if(vp(C=Wp(T,t,r,l,d,n,s,y,w=[],k=[],u,i),i),123===b)if(0===d)Up(T,t,C,C,w,i,u,s,k);else{switch(f){case 99:if(110===hp(T,3))break;case 108:if(97===hp(T,2))break;default:d=0;case 100:case 109:case 115:}d?Up(e,C,C,o&&vp(Wp(e,C,C,0,0,n,s,y,n,w=[],u,k),k),n,k,u,s,o?w:k):Up(T,C,C,C,[""],k,0,s,k)}}l=d=h=0,g=v=1,y=T="",u=a;break;case 58:u=1+gp(T),h=p;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==Ep())continue;switch(T+=sp(b),b*g){case 38:v=d>0?1:(T+="\f",-1);break;case 44:s[l++]=(gp(T)-1)*v,v=1;break;case 64:45===Bp()&&(T+=zp(Ap())),f=Bp(),d=u=gp(y=T+=Lp(Op())),b++;break;case 45:45===p&&2==gp(T)&&(g=0)}}return i}function Wp(e,t,r,o,n,i,a,s,c,l,d,u){for(var f=n-1,h=0===n?i:[""],p=mp(h),g=0,m=0,v=0;g0?h[b]+" "+y:up(y,/&\f/g,h[b])))&&(c[v++]=w);return Ip(e,t,r,0===n?op:s,c,l,d,u)}function Vp(e,t,r,o){return Ip(e,t,r,rp,sp(xp),pp(e,2,-2),0,o)}function $p(e,t,r,o,n){return Ip(e,t,r,np,pp(e,0,o),pp(e,o+1,-1),o,n)}function Kp(e){var t=mp(e);return function(r,o,n,i){for(var a="",s=0;s{if(e.type===op){if("string"==typeof e.props)return;e.props=e.props.map(e=>-1===e.indexOf(":global(")?e:function(e){return Np(function(e){for(;Ap();)switch(jp(xp)){case 0:vp(Lp(Tp-1),e);break;case 2:vp(zp(xp),e);break;default:vp(sp(xp),e)}return e}(Pp(e)))}(e).reduce((e,t,r,o)=>{if(""===t)return e;if(":"===t&&"global"===o[r+1]){const t=o[r+2].slice(1,-1)+" ";return e.unshift(t),o[r+1]="",o[r+2]="",e}return e.push(t),e},[]).join(""))}};function Qp(e,t,r){switch(function(e,t){return 45^hp(e,0)?(((t<<2^hp(e,0))<<2^hp(e,1))<<2^hp(e,2))<<2^hp(e,3):0}(e,t)){case 5103:return tp+"print-"+e+e;case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:return tp+e+e;case 4215:if(102===hp(e,9))return tp+e+e;if(116===hp(e,t+1))return tp+e+e;break;case 4789:return ep+e+e;case 5349:case 4246:case 6968:return tp+e+ep+e+e;case 6187:if(!dp(e,/grab/))return up(up(up(e,/(zoom-|grab)/,tp+"$1"),/(image-set)/,tp+"$1"),e,"")+e;case 5495:case 3959:return up(e,/(image-set\([^]*)/,tp+"$1$`$1");case 4095:case 3583:case 4068:case 2532:return up(e,/(.+)-inline(.+)/,tp+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(gp(e)-1-t>6)switch(hp(e,t+1)){case 102:if(108===hp(e,t+3))return up(e,/(.+:)(.+)-([^]+)/,"$1"+tp+"$2-$3$1"+ep+(108==hp(e,t+3)?"$3":"$2-$3"))+e;case 115:return~fp(e,"stretch")?Qp(up(e,"stretch","fill-available"),t)+e:e}}return e}function Xp(e,t,r,o){if(e.length>-1&&!e.return)switch(e.type){case np:return void(e.return=Qp(e.value,e.length));case op:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(dp(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return bp([_p(e,{props:[up(t,/:(read-\w+)/,":-moz-$1")]})],o);case"::placeholder":return bp([_p(e,{props:[up(t,/:(plac\w+)/,":"+tp+"input-$1")]}),_p(e,{props:[up(t,/:(plac\w+)/,":-moz-$1")]})],o)}return""})}}const Yp=e=>{(function(e){switch(e.type){case"@container":case"@media":case"@supports":case ip:return!0}return!1})(e)&&Array.isArray(e.children)&&e.children.sort((e,t)=>e.props[0]>t.props[0]?1:-1)};const Zp=/,( *[^ &])/g;function eg(e,t,r){let o=t;return r.length>0&&(o=r.reduceRight((e,t)=>{return`${r=t,"&"+Zh(r.replace(Zp,",&$1"))} { ${e} }`;var r},t)),`${e}{${o}}`}function tg(e,t){const{className:r,selectors:o,property:n,rtlClassName:i,rtlProperty:a,rtlValue:s,value:c}=e,{container:l,layer:d,media:u,supports:f}=t;let h=eg(`.${r}`,Array.isArray(c)?`${c.map(e=>`${Yh(n)}: ${e}`).join(";")};`:`${Yh(n)}: ${c};`,o);return a&&i&&(h+=eg(`.${i}`,Array.isArray(s)?`${s.map(e=>`${Yh(a)}: ${e}`).join(";")};`:`${Yh(a)}: ${s};`,o)),u&&(h=`@media ${u} { ${h} }`),d&&(h=`@layer ${d} { ${h} }`),f&&(h=`@supports ${f} { ${h} }`),l&&(h=`@container ${l} { ${h} }`),function(e){const t=[];return bp(Hp(e),Kp([Jp,Yp,Xp,yp,Gp(e=>t.push(e))])),t}(h)}function rg(e){let t="";for(const r in e){const o=e[r];if("string"!=typeof o&&"number"!=typeof o){if(Array.isArray(o))for(const e of o)t+=Yh(r)+":"+e+";"}else t+=Yh(r)+":"+o+";"}return t}function og(e){let t="";for(const r in e)t+=`${r}{${rg(e[r])}}`;return t}function ng(e,t){const r=[];return bp(Hp(`@keyframes ${e} {${t}}`),Kp([yp,Xp,Gp(e=>r.push(e))])),r}const ig={animation:[-1,["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimeline","animationTimingFunction"]],animationRange:[-1,["animationRangeEnd","animationRangeStart"]],background:[-2,["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"]],backgroundPosition:[-1,["backgroundPositionX","backgroundPositionY"]],border:[-2,["borderBottom","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderTop","borderTopColor","borderTopStyle","borderTopWidth"]],borderBottom:[-1,["borderBottomColor","borderBottomStyle","borderBottomWidth"]],borderImage:[-1,["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"]],borderLeft:[-1,["borderLeftColor","borderLeftStyle","borderLeftWidth"]],borderRadius:[-1,["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"]],borderRight:[-1,["borderRightColor","borderRightStyle","borderRightWidth"]],borderTop:[-1,["borderTopColor","borderTopStyle","borderTopWidth"]],caret:[-1,["caretColor","caretShape"]],columnRule:[-1,["columnRuleColor","columnRuleStyle","columnRuleWidth"]],columns:[-1,["columnCount","columnWidth"]],containIntrinsicSize:[-1,["containIntrinsicHeight","containIntrinsicWidth"]],container:[-1,["containerName","containerType"]],flex:[-1,["flexBasis","flexGrow","flexShrink"]],flexFlow:[-1,["flexDirection","flexWrap"]],font:[-1,["fontFamily","fontSize","fontStretch","fontStyle","fontVariant","fontWeight","lineHeight"]],gap:[-1,["columnGap","rowGap"]],grid:[-1,["columnGap","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumnGap","gridRowGap","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","rowGap"]],gridArea:[-1,["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"]],gridColumn:[-1,["gridColumnEnd","gridColumnStart"]],gridRow:[-1,["gridRowEnd","gridRowStart"]],gridTemplate:[-1,["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"]],inset:[-1,["bottom","left","right","top"]],insetBlock:[-1,["insetBlockEnd","insetBlockStart"]],insetInline:[-1,["insetInlineEnd","insetInlineStart"]],listStyle:[-1,["listStyleImage","listStylePosition","listStyleType"]],margin:[-1,["marginBottom","marginLeft","marginRight","marginTop"]],marginBlock:[-1,["marginBlockEnd","marginBlockStart"]],marginInline:[-1,["marginInlineEnd","marginInlineStart"]],mask:[-1,["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPosition","maskRepeat","maskSize"]],maskBorder:[-1,["maskBorderMode","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth"]],offset:[-1,["offsetAnchor","offsetDistance","offsetPath","offsetPosition","offsetRotate"]],outline:[-1,["outlineColor","outlineStyle","outlineWidth"]],overflow:[-1,["overflowX","overflowY"]],overscrollBehavior:[-1,["overscrollBehaviorX","overscrollBehaviorY"]],padding:[-1,["paddingBottom","paddingLeft","paddingRight","paddingTop"]],paddingBlock:[-1,["paddingBlockEnd","paddingBlockStart"]],paddingInline:[-1,["paddingInlineEnd","paddingInlineStart"]],placeContent:[-1,["alignContent","justifyContent"]],placeItems:[-1,["alignItems","justifyItems"]],placeSelf:[-1,["alignSelf","justifySelf"]],scrollMargin:[-1,["scrollMarginBottom","scrollMarginLeft","scrollMarginRight","scrollMarginTop"]],scrollMarginBlock:[-1,["scrollMarginBlockEnd","scrollMarginBlockStart"]],scrollMarginInline:[-1,["scrollMarginInlineEnd","scrollMarginInlineStart"]],scrollPadding:[-1,["scrollPaddingBottom","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop"]],scrollPaddingBlock:[-1,["scrollPaddingBlockEnd","scrollPaddingBlockStart"]],scrollPaddingInline:[-1,["scrollPaddingInlineEnd","scrollPaddingInlineStart"]],scrollTimeline:[-1,["scrollTimelineAxis","scrollTimelineName"]],textDecoration:[-1,["textDecorationColor","textDecorationLine","textDecorationStyle","textDecorationThickness"]],textEmphasis:[-1,["textEmphasisColor","textEmphasisStyle"]],transition:[-1,["transitionBehavior","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"]],viewTimeline:[-1,["viewTimelineAxis","viewTimelineName"]]};function ag(e,t){return 0===e.length?t:`${e} and ${t}`}function sg(e){return"@media"===e.substr(0,6)}function cg(e){return"@layer"===e.substr(0,6)}const lg=/^(:|\[|>|&)/;function dg(e){return lg.test(e)}function ug(e){return"@supports"===e.substr(0,9)}function fg(e){return"@container"===e.substring(0,10)}function hg(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}const pg={"us-w":"w","us-v":"i",nk:"l",si:"v",cu:"f",ve:"h",ti:"a"};function gg(e,t){if(t.media)return"m";if(t.layer||t.supports)return"t";if(t.container)return"c";if(e.length>0){const t=e[0].trim();if(58===t.charCodeAt(0))return pg[t.slice(4,8)]||pg[t.slice(3,5)]||"d"}return"d"}function mg(e,t){return e?t+e:e}function vg(e){return mg(e.container,"c")+mg(e.media,"m")+mg(e.layer,"l")+mg(e.supports,"s")}function bg(e,t,r){const o=G(e+vg(r)+t),n=o.charCodeAt(0);return n>=48&&n<=57?String.fromCharCode(n+17)+o.slice(1):o}function yg({property:e,selector:t,salt:r,value:o},n){return"f"+G(r+t+vg(n)+e+o.trim())}function wg(e){return e===K}function kg(e){return e.replace(/>\s+/g,">")}function Cg(e,t){}function Tg(e,t){}function xg(e){return ig[e]}function Sg(e){var t;return null!==(t=null==e?void 0:e[0])&&void 0!==t?t:0}function Ig(e,t,r,o){e[t]=o?[r,o]:r}function _g(e,t){return t.length>0?[e,Object.fromEntries(t)]:e}function Eg(e,t,r,o,n,i){var a;const s=[];0!==i&&s.push(["p",i]),"m"===t&&n&&s.push(["m",n]),null!==(a=e[t])&&void 0!==a||(e[t]=[]),r&&e[t].push(_g(r,s)),o&&e[t].push(_g(o,s))}function Ag(e,t="",r=[],o={container:"",layer:"",media:"",supports:""},n={},i={},a){for(const s in e){if($.hasOwnProperty(s)){Tg(0,e[s]);continue}const c=e[s];if(null!=c){if(wg(c)){Ig(n,bg(kg(r.join("")),s,o),0,void 0);continue}if("string"==typeof c||"number"==typeof c){const e=kg(r.join("")),l=xg(s);if(l){const e=l[1],a=Object.fromEntries(e.map(e=>[e,K]));Ag(a,t,r,o,n,i)}const d=bg(e,s,o),u=yg({value:c.toString(),salt:t,selector:e,property:s},o),f=a&&{key:s,value:a}||Kh(s,c),h=f.key!==s||f.value!==c,p=h?yg({value:f.value.toString(),property:f.key,salt:t,selector:e},o):void 0,g=h?{rtlClassName:p,rtlProperty:f.key,rtlValue:f.value}:void 0,m=gg(r,o),[v,b]=tg(Object.assign({className:u,selectors:r,property:s,value:c},g),o);Ig(n,d,u,p),Eg(i,m,v,b,o.media,Sg(l))}else if("animationName"===s){const e=Array.isArray(c)?c:[c],a=[],s=[];for(const t of e){const e=og(t),r=og($h(t)),n="f"+G(e);let c;const l=ng(n,e);let d=[];e===r?c=n:(c="f"+G(r),d=ng(c,r));for(let e=0;e[e,K]));Ag(s,t,r,o,n,i)}const l=bg(e,s,o),d=yg({value:c.map(e=>(null!=e?e:"").toString()).join(";"),salt:t,selector:e,property:s},o),u=c.map(e=>Kh(s,e));if(u.some(e=>e.key!==u[0].key))continue;const f=u[0].key!==s||u.some((e,t)=>e.value!==c[t]),h=f?yg({value:u.map(e=>{var t;return(null!==(t=null==e?void 0:e.value)&&void 0!==t?t:"").toString()}).join(";"),salt:t,property:u[0].key,selector:e},o):void 0,p=f?{rtlClassName:h,rtlProperty:u[0].key,rtlValue:u.map(e=>e.value)}:void 0,g=gg(r,o),[m,v]=tg(Object.assign({className:d,selectors:r,property:s,value:c},p),o);Ig(n,l,d,h),Eg(i,g,m,v,o.media,Sg(a))}else if(hg(c))if(dg(s))Ag(c,t,r.concat(Zh(s)),o,n,i);else if(sg(s)){const e=ag(o.media,s.slice(6).trim());Ag(c,t,r,Object.assign({},o,{media:e}),n,i)}else if(cg(s)){const e=(o.layer?`${o.layer}.`:"")+s.slice(6).trim();Ag(c,t,r,Object.assign({},o,{layer:e}),n,i)}else if(ug(s)){const e=ag(o.supports,s.slice(9).trim());Ag(c,t,r,Object.assign({},o,{supports:e}),n,i)}else if(fg(s)){const e=s.slice(10).trim();Ag(c,t,r,Object.assign({},o,{container:e}),n,i)}else Cg()}}return[n,i]}function Bg(e){const t=function(e,t=oe){const r=t();let o=null,n=null,i=null,a=null;return function(t){const{dir:s,renderer:c}=t;null===o&&([o,n]=function(e,t=""){const r={},o={};for(const n in e){const i=e[n],[a,s]=Ag(i,t);r[n]=a,Object.keys(s).forEach(e=>{o[e]=(o[e]||[]).concat(s[e])})}return[r,o]}(e,c.classNameHashSalt));const l="ltr"===s;return l?null===i&&(i=X(o,s)):null===a&&(a=X(o,s)),r(c,n),l?i:a}}(e,ae);return function(){const e=be(),r=ge();return t({dir:e,renderer:r})}}const Og="var(--colorNeutralBackgroundStatic)",Rg="var(--fontWeightRegular)",jg=ye({base:{g2u3we:"fj3muxo",h3c5rm:["f1akhkt","f1lxtadh"],B9xav0g:"f1aperda",zhjwy3:["f1lxtadh","f1akhkt"],Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f1fabniw",B7ck84d:"f1ewtqcl",mc9l5x:"f14t3ns0"},bordered:{icvyot:"fzkkow9",vrafjx:["fcdblym","fjik90z"],oivjwe:"fg706s2",wvpqe5:["fjik90z","fcdblym"],B4j52fo:"f192inf7",Bekrc4i:["f5tn483","f1ojsxk5"],Bn0qgzm:"f1vxd6vx",ibv6hh:["f1ojsxk5","f5tn483"]},circular:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f44lkw9"},rounded:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5"},square:{},shadow:{E5pizo:"f1whvlc6"},center:{st4lth:"f1plgu50",Ermj5k:"f14xojzb",Bqenvij:"f1l02sjl",a9b677:"fly5x3f"},contain:{st4lth:"f1kle4es",Ermj5k:"f14xojzb",Bqenvij:"f1l02sjl",a9b677:"fly5x3f"},default:{},cover:{st4lth:"f1ps3kmd",Ermj5k:"f14xojzb",Bqenvij:"f1l02sjl",a9b677:"fly5x3f"},none:{st4lth:"f1plgu50",Ermj5k:["f13uwng7","fjmyj0p"],Bqenvij:"f1l02sjl",a9b677:"fly5x3f"},block:{a9b677:"fly5x3f"}},{d:[".fj3muxo{border-top-color:var(--colorNeutralStroke1);}",".f1akhkt{border-right-color:var(--colorNeutralStroke1);}",".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}",".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}",[".f1fabniw{border-radius:var(--borderRadiusNone);}",{p:-1}],".f1ewtqcl{box-sizing:border-box;}",".f14t3ns0{display:inline-block;}",".fzkkow9{border-top-style:solid;}",".fcdblym{border-right-style:solid;}",".fjik90z{border-left-style:solid;}",".fg706s2{border-bottom-style:solid;}",".f192inf7{border-top-width:var(--strokeWidthThin);}",".f5tn483{border-right-width:var(--strokeWidthThin);}",".f1ojsxk5{border-left-width:var(--strokeWidthThin);}",".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}",[".f44lkw9{border-radius:var(--borderRadiusCircular);}",{p:-1}],[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".f1whvlc6{box-shadow:var(--shadow4);}",".f1plgu50{object-fit:none;}",".f14xojzb{object-position:center;}",".f1l02sjl{height:100%;}",".fly5x3f{width:100%;}",".f1kle4es{object-fit:contain;}",".f1ps3kmd{object-fit:cover;}",".f13uwng7{object-position:left top;}",".fjmyj0p{object-position:right top;}"]}),Pg=o.forwardRef((e,t)=>{const r=((e,t)=>{const{bordered:r=!1,fit:o="default",block:n=!1,shape:i="square",shadow:a=!1}=e;return{bordered:r,fit:o,block:n,shape:i,shadow:a,components:{root:"img"},root:N(qe("img",{ref:t,...e}),{elementType:"img"})}})(e,t);return(e=>{const t=jg();e.root.className=Z("fui-Image",t.base,e.block&&t.block,e.bordered&&t.bordered,e.shadow&&t.shadow,t[e.fit],t[e.shape],e.root.className)})(r),Je("useImageStyles_unstable")(r),(e=>Ue(e.root,{}))(r)});Pg.displayName="Image";const Ng=Bg({welcome__header:{display:"flex",flexDirection:"column",alignItems:"center",paddingBottom:"30px",paddingTop:"100px",backgroundColor:"var(--colorNeutralBackground3)",width:"100%",height:"250px"},message:{fontSize:"var(--fontSizeHero900)",fontWeight:Rg,fontColor:Og},image:{width:"120px",height:"120px",objectFit:"contain"}});var zg=e=>{const{title:t,logo:r,message:n}=e,i=Ng();return o.createElement("section",{className:i.welcome__header},o.createElement(Pg,{className:i.image,src:r,alt:t}),o.createElement("h1",{className:i.message},n))};const qg=Bg({list:{marginTop:"20px"},listItem:{paddingBottom:"20px",display:"flex"},icon:{marginRight:"10px"},itemText:{fontSize:"var(--fontSizeBase300)",fontColor:Og},welcome__main:{width:"100%",display:"flex",flexDirection:"column",alignItems:"center"},message:{fontSize:"var(--fontSizeBase500)",fontColor:Og,fontWeight:Rg,paddingLeft:"10px",paddingRight:"10px"}});var Mg=e=>{const{items:t,message:r}=e,n=qg(),i=t.map((e,t)=>o.createElement("li",{className:n.listItem,key:t},o.createElement("i",{className:n.icon},e.icon),o.createElement("span",{className:n.itemText},e.primaryText)));return o.createElement("div",{className:n.welcome__main},o.createElement("h2",{className:n.message},r),o.createElement("ul",{className:n.list},i))},Fg=Bg({bar:{width:"100%",background:"#f3f3f3",textAlign:"center",padding:"8px 0",position:"fixed",bottom:0,left:0,right:0,zIndex:100,fontSize:"0.95em",borderTop:"1px solid #ddd",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},logo:{height:"24px",verticalAlign:"middle",marginRight:"4px"}}),Dg=Bg({centeredContent:{display:"flex",flexDirection:"column",alignItems:"center"},tabsContent:{display:"flex",flexDirection:"column",height:"100vh",minHeight:0},heroListContainer:{width:"auto",display:"flex",flexDirection:"column",alignItems:"center"}}),Lg=Bg({tabsRoot:{display:"flex",flexDirection:"column",height:"100vh",minHeight:0,paddingBottom:"48px"},tabList:{background:"#f3f3f3",borderBottom:"1px solid #ddd",padding:"0 0 0 0",zIndex:10},tabContent:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},form:{display:"flex",flexDirection:"column",width:"100%"},centeredContent:{display:"flex",flexDirection:"column",alignItems:"center",height:"100%",width:"100%",overflow:"hidden"},scrollArea:{flex:1,overflowY:"auto",minHeight:0,width:"100%"},buttonRow:{background:"#fff",borderTop:"1px solid #eee",display:"flex",justifyContent:"flex-end",gap:"12px",padding:"8px",zIndex:2},responsiveButton:{minWidth:"120px",flex:"1 1 120px"},fieldset:{margin:"24px 12px",padding:"12px",border:"1px solid #eee",borderRadius:"8px",background:"#fff",textAlign:"left"},fieldset_v:{margin:"24px 0",padding:"12px",border:"1px solid #0078d4",borderRadius:"8px",background:"#fff"},legend:{color:"#0078d4",fontWeight:"bold"},fieldRow:{marginBottom:"12px"},inlineFieldRow:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"12px"},label:{display:"block",fontWeight:500},inlineLabel:{display:"inline-block",fontWeight:500,marginRight:"8px"},messageBar:{marginTop:"8px",marginBottom:"8px",maxWidth:"100%",wordBreak:"break-word",boxSizing:"border-box",overflowWrap:"anywhere"},input:{width:"100%",padding:"8px",border:"1px solid #ccc",borderRadius:"4px",fontSize:"1em",boxSizing:"border-box",background:"#fff"},checkbox:{width:"auto",margin:0,padding:0},attachmentsGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:"16px",marginLeft:"8px",marginRight:"8px"},attachmentName:{fontWeight:"bold",maxWidth:"120px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"bottom"},spinnerOverlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"rgba(255, 255, 255, 0.7)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:10}}),Hg=()=>{const e=Fg();return o.createElement("div",{className:e.bar},o.createElement("img",{src:"assets/fd-logo-brandbar.png",alt:"faktur:digital Logo",className:e.logo}),o.createElement("span",null,"© 2025 faktur:digital GmbH"))};const Ug="data-tabster",Wg=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]","details > summary","audio[controls]","video[controls]"].join(", "),Vg=1,$g=2,Kg=3;function Gg(e,t){var r;return null===(r=e.storageEntry(t))||void 0===r?void 0:r.tabster}function Jg(e,t,r){var o,n;const i=r||e._noop?void 0:t.getAttribute(Ug);let a,s=e.storageEntry(t);if(i){if(i===(null===(o=null==s?void 0:s.attr)||void 0===o?void 0:o.string))return;try{const e=JSON.parse(i);if("object"!=typeof e)throw new Error(`Value is not a JSON object, got '${i}'.`);a={string:i,object:e}}catch(e){}}else if(!s)return;s||(s=e.storageEntry(t,!0)),s.tabster||(s.tabster={});const c=s.tabster||{},l=(null===(n=s.attr)||void 0===n?void 0:n.object)||{},d=(null==a?void 0:a.object)||{};for(const r of Object.keys(l))if(!d[r]){if("root"===r){const t=c[r];t&&e.root.onRoot(t,!0)}switch(r){case"deloser":case"root":case"groupper":case"modalizer":case"restorer":case"mover":const o=c[r];o&&(o.dispose(),delete c[r]);break;case"observed":delete c[r],e.observedElement&&e.observedElement.onObservedElementUpdate(t);break;case"focusable":case"outline":case"uncontrolled":case"sys":delete c[r]}}for(const r of Object.keys(d)){const o=d.sys;switch(r){case"deloser":c.deloser?c.deloser.setProps(d.deloser):e.deloser&&(c.deloser=e.deloser.createDeloser(t,d.deloser));break;case"root":c.root?c.root.setProps(d.root):c.root=e.root.createRoot(t,d.root,o),e.root.onRoot(c.root);break;case"modalizer":c.modalizer?c.modalizer.setProps(d.modalizer):e.modalizer&&(c.modalizer=e.modalizer.createModalizer(t,d.modalizer,o));break;case"restorer":c.restorer?c.restorer.setProps(d.restorer):e.restorer&&d.restorer&&(c.restorer=e.restorer.createRestorer(t,d.restorer));break;case"focusable":c.focusable=d.focusable;break;case"groupper":c.groupper?c.groupper.setProps(d.groupper):e.groupper&&(c.groupper=e.groupper.createGroupper(t,d.groupper,o));break;case"mover":c.mover?c.mover.setProps(d.mover):e.mover&&(c.mover=e.mover.createMover(t,d.mover,o));break;case"observed":e.observedElement&&(c.observed=d.observed,e.observedElement.onObservedElementUpdate(t));break;case"uncontrolled":c.uncontrolled=d.uncontrolled;break;case"outline":e.outline&&(c.outline=d.outline);break;case"sys":c.sys=d.sys;break;default:console.error(`Unknown key '${r}' in data-tabster attribute value.`)}}a?s.attr=a:(0===Object.keys(c).length&&(delete s.tabster,delete s.attr),e.storageEntry(t,!1))}const Qg="tabster:mover:movefocus",Xg="tabster:mover:memorized-element",Yg="tabster:groupper:movefocus",Zg="undefined"!=typeof CustomEvent?CustomEvent:function(){};class em extends Zg{constructor(e,t){super(e,{bubbles:!0,cancelable:!0,composed:!0,detail:t}),this.details=t}}class tm extends em{constructor(e){super("tabster:focusin",e)}}class rm extends em{constructor(e){super("tabster:focusout",e)}}class om extends em{constructor(e){super("tabster:movefocus",e)}}class nm extends em{constructor(e){super("tabster:mover:state",e)}}class im extends em{constructor(e){super("tabster:root:focus",e)}}class am extends em{constructor(e){super("tabster:root:blur",e)}}const sm={createMutationObserver:e=>new MutationObserver(e),createTreeWalker:(e,t,r,o)=>e.createTreeWalker(t,r,o),getParentNode:e=>e?e.parentNode:null,getParentElement:e=>e?e.parentElement:null,nodeContains:(e,t)=>!(!t||!(null==e?void 0:e.contains(t))),getActiveElement:e=>e.activeElement,querySelector:(e,t)=>e.querySelector(t),querySelectorAll:(e,t)=>Array.prototype.slice.call(e.querySelectorAll(t),0),getElementById:(e,t)=>e.getElementById(t),getFirstChild:e=>(null==e?void 0:e.firstChild)||null,getLastChild:e=>(null==e?void 0:e.lastChild)||null,getNextSibling:e=>(null==e?void 0:e.nextSibling)||null,getPreviousSibling:e=>(null==e?void 0:e.previousSibling)||null,getFirstElementChild:e=>(null==e?void 0:e.firstElementChild)||null,getLastElementChild:e=>(null==e?void 0:e.lastElementChild)||null,getNextElementSibling:e=>(null==e?void 0:e.nextElementSibling)||null,getPreviousElementSibling:e=>(null==e?void 0:e.previousElementSibling)||null,appendChild:(e,t)=>e.appendChild(t),insertBefore:(e,t,r)=>e.insertBefore(t,r),getSelection:e=>{var t;return(null===(t=e.ownerDocument)||void 0===t?void 0:t.getSelection())||null},getElementsByName:(e,t)=>e.ownerDocument.getElementsByName(t)};let cm;const lm="undefined"!=typeof DOMRect?DOMRect:class{constructor(e,t,r,o){this.left=e||0,this.top=t||0,this.right=(e||0)+(r||0),this.bottom=(t||0)+(o||0)}};let dm=0;try{document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),cm=!1}catch(e){cm=!0}function um(e){const t=e();let r=t.__tabsterInstanceContext;return r||(r={elementByUId:{},basics:{Promise:t.Promise||void 0,WeakRef:t.WeakRef||void 0},containerBoundingRectCache:{},lastContainerBoundingRectCacheId:0,fakeWeakRefs:[],fakeWeakRefsStarted:!1},t.__tabsterInstanceContext=r),r}class fm{constructor(e){this._target=e}deref(){return this._target}static cleanup(e,t){return!e._target||!(!t&&Tm(e._target.ownerDocument,e._target))&&(delete e._target,!0)}}class hm{constructor(e,t,r){const o=um(e);let n;o.WeakRef?n=new o.WeakRef(t):(n=new fm(t),o.fakeWeakRefs.push(n)),this._ref=n,this._data=r}get(){const e=this._ref;let t;return e&&(t=e.deref(),t||delete this._ref),t}getData(){return this._data}}function pm(e,t){const r=um(e);r.fakeWeakRefs=r.fakeWeakRefs.filter(e=>!fm.cleanup(e,t))}function gm(e){const t=um(e);t.fakeWeakRefsStarted||(t.fakeWeakRefsStarted=!0,t.WeakRef=function(e){return e.basics.WeakRef}(t)),t.fakeWeakRefsTimer||(t.fakeWeakRefsTimer=e().setTimeout(()=>{t.fakeWeakRefsTimer=void 0,pm(e),gm(e)},12e4))}function mm(e,t,r){if(t.nodeType!==Node.ELEMENT_NODE)return;const o=cm?r:{acceptNode:r};return sm.createTreeWalker(e,t,NodeFilter.SHOW_ELEMENT,o,!1)}function vm(e,t){let r=t.__tabsterCacheId;const o=um(e),n=r?o.containerBoundingRectCache[r]:void 0;if(n)return n.rect;const i=t.ownerDocument&&t.ownerDocument.documentElement;if(!i)return new lm;let a=0,s=0,c=i.clientWidth,l=i.clientHeight;if(t!==i){const e=t.getBoundingClientRect();a=Math.max(a,e.left),s=Math.max(s,e.top),c=Math.min(c,e.right),l=Math.min(l,e.bottom)}const d=new lm(a{o.containerBoundingRectCacheTimer=void 0;for(const e of Object.keys(o.containerBoundingRectCache))delete o.containerBoundingRectCache[e].element.__tabsterCacheId;o.containerBoundingRectCache={}},50)),d}function bm(e,t,r){const o=ym(t);if(!o)return!1;const n=vm(e,o),i=t.getBoundingClientRect(),a=i.height*(1-r),s=Math.max(0,n.top-i.top)+Math.max(0,i.bottom-n.bottom);return 0===s||s<=a}function ym(e){const t=e.ownerDocument;if(t){for(let t=sm.getParentElement(e);t;t=sm.getParentElement(t))if(t.scrollWidth>t.clientWidth||t.scrollHeight>t.clientHeight)return t;return t.documentElement}return null}function wm(e){return!!e.__shouldIgnoreFocus}function km(e,t){const r=um(e);let o=t.__tabsterElementUID;return o||(o=t.__tabsterElementUID=function(e){const t=new Uint32Array(4);if(e.crypto&&e.crypto.getRandomValues)e.crypto.getRandomValues(t);else if(e.msCrypto&&e.msCrypto.getRandomValues)e.msCrypto.getRandomValues(t);else for(let e=0;e{if(this._fixedTarget){const e=this._fixedTarget.get();return void(e&&at(e))}const t=this.input;if(this.onFocusIn&&t){const r=e.relatedTarget;this.onFocusIn(this,this._isBackward(!0,t,r),r)}},this._focusOut=e=>{if(this._fixedTarget)return;this.useDefaultAction=!1;const t=this.input;if(this.onFocusOut&&t){const r=e.relatedTarget;this.onFocusOut(this,this._isBackward(!1,t,r),r)}};const a=e(),s=a.document.createElement("i");s.tabIndex=0,s.setAttribute("role","none"),s.setAttribute("data-tabster-dummy",""),s.setAttribute("aria-hidden","true");const c=s.style;c.position="fixed",c.width=c.height="1px",c.opacity="0.001",c.zIndex="-1",c.setProperty("content-visibility","hidden"),function(e){e.__shouldIgnoreFocus=!0}(s),this.input=s,this.isFirst=r.isFirst,this.isOutside=t,this._isPhantom=null!==(i=r.isPhantom)&&void 0!==i&&i,this._fixedTarget=n,s.addEventListener("focusin",this._focusIn),s.addEventListener("focusout",this._focusOut),s.__tabsterDummyContainer=o,this._isPhantom&&(this._disposeTimer=a.setTimeout(()=>{delete this._disposeTimer,this.dispose()},0),this._clearDisposeTimeout=()=>{this._disposeTimer&&(a.clearTimeout(this._disposeTimer),delete this._disposeTimer),delete this._clearDisposeTimeout})}dispose(){var e;this._clearDisposeTimeout&&this._clearDisposeTimeout();const t=this.input;t&&(delete this._fixedTarget,delete this.onFocusIn,delete this.onFocusOut,delete this.input,t.removeEventListener("focusin",this._focusIn),t.removeEventListener("focusout",this._focusOut),delete t.__tabsterDummyContainer,null===(e=sm.getParentNode(t))||void 0===e||e.removeChild(t))}setTopLeft(e,t){var r;const o=null===(r=this.input)||void 0===r?void 0:r.style;o&&(o.top=`${e}px`,o.left=`${t}px`)}_isBackward(e,t,r){return e&&!r?!this.isFirst:!!(r&&t.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING)}}class Em{constructor(e,t,r,o,n,i){this._element=t,this._instance=new Bm(e,t,this,r,o,n,i)}_setHandlers(e,t){this._onFocusIn=e,this._onFocusOut=t}moveOut(e){var t;null===(t=this._instance)||void 0===t||t.moveOut(e)}moveOutWithDefaultAction(e,t){var r;null===(r=this._instance)||void 0===r||r.moveOutWithDefaultAction(e,t)}getHandler(e){return e?this._onFocusIn:this._onFocusOut}setTabbable(e){var t;null===(t=this._instance)||void 0===t||t.setTabbable(this,e)}dispose(){this._instance&&(this._instance.dispose(this),delete this._instance),delete this._onFocusIn,delete this._onFocusOut}static moveWithPhantomDummy(e,t,r,o,n){const i=new _m(e.getWindow,!0,{isPhantom:!0,isFirst:!0}).input;if(i){let a,s;if("BODY"===t.tagName)a=t,s=r&&o||!r&&!o?sm.getFirstElementChild(t):null;else{let n,i;r&&(!o||o&&!e.focusable.isFocusable(t,!1,!0,!0))?(a=t,s=o?t.firstElementChild:null):(a=sm.getParentElement(t),s=r&&o||!r&&!o?t:sm.getNextElementSibling(t));do{n=r&&o||!r&&!o?sm.getPreviousElementSibling(s):s,i=jm(n),i===t?s=r&&o||!r&&!o?n:sm.getNextElementSibling(n):i=null}while(i)}(null==a?void 0:a.dispatchEvent(new om({by:"root",owner:a,next:null,relatedEvent:n})))&&(sm.insertBefore(a,i,s),at(i))}}static addPhantomDummyWithTarget(e,t,r,o){const n=new _m(e.getWindow,!0,{isPhantom:!0,isFirst:!0},void 0,new hm(e.getWindow,o)).input;if(n){let e,o;t.querySelector(Wg)&&!r?(e=t,o=sm.getFirstElementChild(t)):(e=sm.getParentElement(t),o=r?t:sm.getNextElementSibling(t)),e&&sm.insertBefore(e,n,o)}}}class Am{constructor(e){this._updateQueue=new Set,this._lastUpdateQueueTime=0,this._changedParents=new WeakSet,this._dummyElements=[],this._dummyCallbacks=new WeakMap,this._domChanged=e=>{var t;this._changedParents.has(e)||(this._changedParents.add(e),this._updateDummyInputsTimer||(this._updateDummyInputsTimer=null===(t=this._win)||void 0===t?void 0:t.call(this).setTimeout(()=>{delete this._updateDummyInputsTimer;for(const e of this._dummyElements){const t=e.get();if(t){const e=this._dummyCallbacks.get(t);if(e){const r=sm.getParentNode(t);r&&!this._changedParents.has(r)||e()}}}this._changedParents=new WeakSet},100)))},this._win=e}add(e,t){!this._dummyCallbacks.has(e)&&this._win&&(this._dummyElements.push(new hm(this._win,e)),this._dummyCallbacks.set(e,t),this.domChanged=this._domChanged)}remove(e){this._dummyElements=this._dummyElements.filter(t=>{const r=t.get();return r&&r!==e}),this._dummyCallbacks.delete(e),0===this._dummyElements.length&&delete this.domChanged}dispose(){var e;const t=null===(e=this._win)||void 0===e?void 0:e.call(this);this._updateTimer&&(null==t||t.clearTimeout(this._updateTimer),delete this._updateTimer),this._updateDummyInputsTimer&&(null==t||t.clearTimeout(this._updateDummyInputsTimer),delete this._updateDummyInputsTimer),this._changedParents=new WeakSet,this._dummyCallbacks=new WeakMap,this._dummyElements=[],this._updateQueue.clear(),delete this.domChanged,delete this._win}updatePositions(e){this._win&&(this._updateQueue.add(e),this._lastUpdateQueueTime=Date.now(),this._scheduledUpdatePositions())}_scheduledUpdatePositions(){var e;this._updateTimer||(this._updateTimer=null===(e=this._win)||void 0===e?void 0:e.call(this).setTimeout(()=>{if(delete this._updateTimer,this._lastUpdateQueueTime+100<=Date.now()){const e=new Map,t=[];for(const r of this._updateQueue)t.push(r(e));this._updateQueue.clear();for(const e of t)e();e.clear()}else this._scheduledUpdatePositions()},100))}}class Bm{constructor(e,t,r,o,n,i,a){this._wrappers=[],this._isOutside=!1,this._transformElements=new Set,this._onFocusIn=(e,t,r)=>{this._onFocus(!0,e,t,r)},this._onFocusOut=(e,t,r)=>{this._onFocus(!1,e,t,r)},this.moveOut=e=>{var t;const r=this._firstDummy,o=this._lastDummy;if(r&&o){this._ensurePosition();const n=r.input,i=o.input,a=null===(t=this._element)||void 0===t?void 0:t.get();if(n&&i&&a){let t;e?(n.tabIndex=0,t=n):(i.tabIndex=0,t=i),t&&at(t)}}},this.moveOutWithDefaultAction=(e,t)=>{var r;const o=this._firstDummy,n=this._lastDummy;if(o&&n){this._ensurePosition();const i=o.input,a=n.input,s=null===(r=this._element)||void 0===r?void 0:r.get();if(i&&a&&s){let r;e?!o.isOutside&&this._tabster.focusable.isFocusable(s,!0,!0,!0)?r=s:(o.useDefaultAction=!0,i.tabIndex=0,r=i):(n.useDefaultAction=!0,a.tabIndex=0,r=a),r&&s.dispatchEvent(new om({by:"root",owner:s,next:null,relatedEvent:t}))&&at(r)}}},this.setTabbable=(e,t)=>{var r,o;for(const r of this._wrappers)if(r.manager===e){r.tabbable=t;break}const n=this._getCurrent();if(n){const e=n.tabbable?0:-1;let t=null===(r=this._firstDummy)||void 0===r?void 0:r.input;t&&(t.tabIndex=e),t=null===(o=this._lastDummy)||void 0===o?void 0:o.input,t&&(t.tabIndex=e)}},this._addDummyInputs=()=>{this._addTimer||(this._addTimer=this._getWindow().setTimeout(()=>{delete this._addTimer,this._ensurePosition(),this._addTransformOffsets()},0))},this._addTransformOffsets=()=>{this._tabster._dummyObserver.updatePositions(this._computeTransformOffsets)},this._computeTransformOffsets=e=>{var t,r;const o=(null===(t=this._firstDummy)||void 0===t?void 0:t.input)||(null===(r=this._lastDummy)||void 0===r?void 0:r.input),n=this._transformElements,i=new Set;let a=0,s=0;const c=this._getWindow();for(let t=o;t&&t.nodeType===Node.ELEMENT_NODE;t=sm.getParentElement(t)){let r=e.get(t);if(void 0===r){const o=c.getComputedStyle(t).transform;o&&"none"!==o&&(r={scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),e.set(t,r||null)}r&&(i.add(t),n.has(t)||t.addEventListener("scroll",this._addTransformOffsets),a+=r.scrollTop,s+=r.scrollLeft)}for(const e of n)i.has(e)||e.removeEventListener("scroll",this._addTransformOffsets);return this._transformElements=i,()=>{var e,t;null===(e=this._firstDummy)||void 0===e||e.setTopLeft(a,s),null===(t=this._lastDummy)||void 0===t||t.setTopLeft(a,s)}};const s=t.get();if(!s)throw new Error("No element");this._tabster=e,this._getWindow=e.getWindow,this._callForDefaultAction=a;const c=s.__tabsterDummy;if((c||this)._wrappers.push({manager:r,priority:o,tabbable:!0}),c)return c;s.__tabsterDummy=this;const l=null==n?void 0:n.dummyInputsPosition,d=s.tagName;this._isOutside=l?2===l:(i||"UL"===d||"OL"===d||"TABLE"===d)&&!("LI"===d||"TD"===d||"TH"===d),this._firstDummy=new _m(this._getWindow,this._isOutside,{isFirst:!0},t),this._lastDummy=new _m(this._getWindow,this._isOutside,{isFirst:!1},t);const u=this._firstDummy.input;u&&e._dummyObserver.add(u,this._addDummyInputs),this._firstDummy.onFocusIn=this._onFocusIn,this._firstDummy.onFocusOut=this._onFocusOut,this._lastDummy.onFocusIn=this._onFocusIn,this._lastDummy.onFocusOut=this._onFocusOut,this._element=t,this._addDummyInputs()}dispose(e,t){var r,o,n,i;if(0===(this._wrappers=this._wrappers.filter(r=>r.manager!==e&&!t)).length){delete(null===(r=this._element)||void 0===r?void 0:r.get()).__tabsterDummy;for(const e of this._transformElements)e.removeEventListener("scroll",this._addTransformOffsets);this._transformElements.clear();const e=this._getWindow();this._addTimer&&(e.clearTimeout(this._addTimer),delete this._addTimer);const t=null===(o=this._firstDummy)||void 0===o?void 0:o.input;t&&this._tabster._dummyObserver.remove(t),null===(n=this._firstDummy)||void 0===n||n.dispose(),null===(i=this._lastDummy)||void 0===i||i.dispose()}}_onFocus(e,t,r,o){var n;const i=this._getCurrent();!i||t.useDefaultAction&&!this._callForDefaultAction||null===(n=i.manager.getHandler(e))||void 0===n||n(t,r,o)}_getCurrent(){return this._wrappers.sort((e,t)=>e.tabbable!==t.tabbable?e.tabbable?-1:1:e.priority-t.priority),this._wrappers[0]}_ensurePosition(){var e,t,r;const o=null===(e=this._element)||void 0===e?void 0:e.get(),n=null===(t=this._firstDummy)||void 0===t?void 0:t.input,i=null===(r=this._lastDummy)||void 0===r?void 0:r.input;if(o&&n&&i)if(this._isOutside){const e=sm.getParentNode(o);if(e){const t=sm.getNextSibling(o);t!==i&&sm.insertBefore(e,i,t),sm.getPreviousElementSibling(o)!==n&&sm.insertBefore(e,n,o)}}else{sm.getLastElementChild(o)!==i&&sm.appendChild(o,i);const e=sm.getFirstElementChild(o);e&&e!==n&&e.parentNode&&sm.insertBefore(e.parentNode,n,e)}}}function Om(e){let t=null;for(let r=sm.getLastElementChild(e);r;r=sm.getLastElementChild(r))t=r;return t||void 0}function Rm(e){return"INPUT"===e.tagName&&!!e.name&&"radio"===e.type}function jm(e){var t;return(null===(t=null==e?void 0:e.__tabsterDummyContainer)||void 0===t?void 0:t.get())||null}function Pm(e,t){const r=JSON.stringify(e);return!0===t?r:{[Ug]:r}}class Nm extends Em{constructor(e,t,r,o){super(e,t,1,o,void 0,!0),this._onDummyInputFocus=e=>{var t;if(e.useDefaultAction)this._setFocused(!1);else{this._tabster.keyboardNavigation.setNavigatingWithKeyboard(!0);const r=this._element.get();if(r){this._setFocused(!0);const t=this._tabster.focusedElement.getFirstOrLastTabbable(e.isFirst,{container:r,ignoreAccessibility:!0});if(t)return void at(t)}null===(t=e.input)||void 0===t||t.blur()}},this._setHandlers(this._onDummyInputFocus),this._tabster=e,this._setFocused=r}}class zm extends Im{constructor(e,t,r,o,n){super(e,t,o),this._isFocused=!1,this._setFocused=e=>{var t;if(this._setFocusedTimer&&(this._tabster.getWindow().clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),this._isFocused===e)return;const r=this._element.get();r&&(e?(this._isFocused=!0,null===(t=this._dummyManager)||void 0===t||t.setTabbable(!1),r.dispatchEvent(new im({element:r}))):this._setFocusedTimer=this._tabster.getWindow().setTimeout(()=>{var e;delete this._setFocusedTimer,this._isFocused=!1,null===(e=this._dummyManager)||void 0===e||e.setTabbable(!0),r.dispatchEvent(new am({element:r}))},0))},this._onFocusIn=e=>{const t=this._tabster.getParent,r=this._element.get();let o=e.composedPath()[0];do{if(o===r)return void this._setFocused(!0);o=o&&t(o)}while(o)},this._onFocusOut=()=>{this._setFocused(!1)},this._onDispose=r;const i=e.getWindow;this.uid=km(i,t),this._sys=n,(e.controlTab||e.rootDummyInputs)&&this.addDummyInputs();const a=i().document;a.addEventListener(ot,this._onFocusIn),a.addEventListener(nt,this._onFocusOut),this._add()}addDummyInputs(){this._dummyManager||(this._dummyManager=new Nm(this._tabster,this._element,this._setFocused,this._sys))}dispose(){var e;this._onDispose(this);const t=this._tabster.getWindow(),r=t.document;r.removeEventListener(ot,this._onFocusIn),r.removeEventListener(nt,this._onFocusOut),this._setFocusedTimer&&(t.clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),null===(e=this._dummyManager)||void 0===e||e.dispose(),this._remove()}moveOutWithDefaultAction(e,t){const r=this._dummyManager;if(r)r.moveOutWithDefaultAction(e,t);else{const r=this.getElement();r&&Nm.moveWithPhantomDummy(this._tabster,r,!0,e,t)}}_add(){}_remove(){}}class qm{constructor(e,t){this._autoRootWaiting=!1,this._roots={},this._forceDummy=!1,this.rootById={},this._autoRootCreate=()=>{var e;const t=this._win().document,r=t.body;if(r){this._autoRootUnwait(t);const o=this._autoRoot;if(o)return function(e,t,r){let o;if(r){const t=e.getAttribute(Ug);if(t)try{o=JSON.parse(t)}catch(e){}}o||(o={}),function(e,t){for(const r of Object.keys(t)){const o=t[r];o?e[r]=o:delete e[r]}}(o,t),Object.keys(o).length>0?e.setAttribute(Ug,Pm(o,!0)):e.removeAttribute(Ug)}(r,{root:o},!0),Jg(this._tabster,r),null===(e=Gg(this._tabster,r))||void 0===e?void 0:e.root}else this._autoRootWaiting||(this._autoRootWaiting=!0,t.addEventListener("readystatechange",this._autoRootCreate))},this._onRootDispose=e=>{delete this._roots[e.id]},this._tabster=e,this._win=e.getWindow,this._autoRoot=t,e.queueInit(()=>{this._autoRoot&&this._autoRootCreate()})}_autoRootUnwait(e){e.removeEventListener("readystatechange",this._autoRootCreate),this._autoRootWaiting=!1}dispose(){const e=this._win();this._autoRootUnwait(e.document),delete this._autoRoot,Object.keys(this._roots).forEach(e=>{this._roots[e]&&(this._roots[e].dispose(),delete this._roots[e])}),this.rootById={}}createRoot(e,t,r){const o=new zm(this._tabster,e,this._onRootDispose,t,r);return this._roots[o.id]=o,this._forceDummy&&o.addDummyInputs(),o}addDummyInputs(){this._forceDummy=!0;const e=this._roots;for(const t of Object.keys(e))e[t].addDummyInputs()}static getRootByUId(e,t){const r=e().__tabsterInstance;return r&&r.root.rootById[t]}static getTabsterContext(e,t,r){var o,n,i,a;if(void 0===r&&(r={}),!t.ownerDocument)return;const{checkRtl:s,referenceElement:c}=r,l=e.getParent;let d,u,f,h;e.drainInitQueue();let p,g,m,v,b=!1,y=c||t;const w={};for(;y&&(!d||s);){const r=Gg(e,y);if(s&&void 0===m){const e=y.dir;e&&(m="rtl"===e.toLowerCase())}if(!r){y=l(y);continue}const a=y.tagName;(r.uncontrolled||"IFRAME"===a||"WEBVIEW"===a)&&e.focusable.isVisible(y)&&(v=y),h||!(null===(o=r.focusable)||void 0===o?void 0:o.excludeFromMover)||f||(b=!0);const c=r.modalizer,k=r.groupper,C=r.mover;!u&&c&&(u=c),f||!k||u&&!c||(u?(!k.isActive()&&k.getProps().tabbability&&u.userId!==(null===(n=e.modalizer)||void 0===n?void 0:n.activeId)&&(u=void 0,f=k),g=k):f=k),h||!C||u&&!c||k&&y===t||!y.contains(t)||(h=C,p=!!f&&f!==k),r.root&&(d=r.root),(null===(i=r.focusable)||void 0===i?void 0:i.ignoreKeydown)&&Object.assign(w,r.focusable.ignoreKeydown),y=l(y)}if(!d){const r=e.root;r._autoRoot&&(null===(a=t.ownerDocument)||void 0===a?void 0:a.body)&&(d=r._autoRootCreate())}return f&&!h&&(p=!0),d?{root:d,modalizer:u,groupper:f,mover:h,groupperBeforeMover:p,modalizerInGroupper:g,rtl:s?!!m:void 0,uncontrolled:v,excludedFromMover:b,ignoreKeydown:e=>!!w[e.key]}:void 0}static getRoot(e,t){var r;const o=e.getParent;for(let n=t;n;n=o(n)){const t=null===(r=Gg(e,n))||void 0===r?void 0:r.root;if(t)return t}}onRoot(e,t){t?delete this.rootById[e.uid]:this.rootById[e.uid]=e}}class Mm{constructor(){this._callbacks=[]}dispose(){this._callbacks=[],delete this._val}subscribe(e){const t=this._callbacks;t.indexOf(e)<0&&t.push(e)}subscribeFirst(e){const t=this._callbacks,r=t.indexOf(e);r>=0&&t.splice(r,1),t.unshift(e)}unsubscribe(e){const t=this._callbacks.indexOf(e);t>=0&&this._callbacks.splice(t,1)}setVal(e,t){this._val!==e&&(this._val=e,this._callCallbacks(e,t))}getVal(){return this._val}trigger(e,t){this._callCallbacks(e,t)}_callCallbacks(e,t){this._callbacks.forEach(r=>r(e,t))}}class Fm{constructor(e){this._tabster=e}dispose(){}getProps(e){const t=Gg(this._tabster,e);return t&&t.focusable||{}}isFocusable(e,t,r,o){return!(!xm(e,Wg)||!t&&-1===e.tabIndex)&&(r||this.isVisible(e))&&(o||this.isAccessible(e))}isVisible(e){if(!e.ownerDocument||e.nodeType!==Node.ELEMENT_NODE)return!1;if(function(e){var t,r;const o=e.ownerDocument,n=null===(t=o.defaultView)||void 0===t?void 0:t.getComputedStyle(e);if(null===e.offsetParent&&o.body!==e&&"fixed"!==(null==n?void 0:n.position))return!0;if("hidden"===(null==n?void 0:n.visibility))return!0;if("fixed"===(null==n?void 0:n.position)){if("none"===n.display)return!0;if(null===(null===(r=e.parentElement)||void 0===r?void 0:r.offsetParent)&&o.body!==e.parentElement)return!0}return!1}(e))return!1;const t=e.ownerDocument.body.getBoundingClientRect();return 0!==t.width||0!==t.height}isAccessible(e){var t;for(let r=e;r;r=sm.getParentElement(r)){const e=Gg(this._tabster,r);if(this._isHidden(r))return!1;if(!(null===(t=null==e?void 0:e.focusable)||void 0===t?void 0:t.ignoreAriaDisabled)&&this._isDisabled(r))return!1}return!0}_isDisabled(e){return e.hasAttribute("disabled")}_isHidden(e){var t;const r=e.getAttribute("aria-hidden");return!(!r||"true"!==r.toLowerCase()||(null===(t=this._tabster.modalizer)||void 0===t?void 0:t.isAugmented(e)))}findFirst(e,t){return this.findElement({...e},t)}findLast(e,t){return this.findElement({isBackward:!0,...e},t)}findNext(e,t){return this.findElement({...e},t)}findPrev(e,t){return this.findElement({...e,isBackward:!0},t)}findDefault(e,t){return this.findElement({...e,acceptCondition:t=>this.isFocusable(t,e.includeProgrammaticallyFocusable)&&!!this.getProps(t).isDefault},t)||null}findAll(e){return this._findElements(!0,e)||[]}findElement(e,t){const r=this._findElements(!1,e,t);return r?r[0]:r}_findElements(e,t,r){var o,n,i;const{container:a,currentElement:s=null,includeProgrammaticallyFocusable:c,useActiveModalizer:l,ignoreAccessibility:d,modalizerId:u,isBackward:f,onElement:h}=t;r||(r={});const p=[];let{acceptCondition:g}=t;const m=!!g;if(!a)return null;g||(g=e=>this.isFocusable(e,c,!1,d));const v={container:a,modalizerUserId:void 0===u&&l?null===(o=this._tabster.modalizer)||void 0===o?void 0:o.activeId:u||(null===(i=null===(n=qm.getTabsterContext(this._tabster,a))||void 0===n?void 0:n.modalizer)||void 0===i?void 0:i.userId),from:s||a,isBackward:f,isFindAll:e,acceptCondition:g,hasCustomCondition:m,includeProgrammaticallyFocusable:c,ignoreAccessibility:d,cachedGrouppers:{},cachedRadioGroups:{}},b=mm(a.ownerDocument,a,e=>this._acceptElement(e,v));if(!b)return null;const y=t=>{var o,n;const i=null!==(o=v.foundElement)&&void 0!==o?o:v.foundBackward;return i&&p.push(i),e?!(i&&(v.found=!1,delete v.foundElement,delete v.foundBackward,delete v.fromCtx,v.from=i,h&&!h(i))||!i&&!t):(i&&r&&(r.uncontrolled=null===(n=qm.getTabsterContext(this._tabster,i))||void 0===n?void 0:n.uncontrolled),!(!t||i))};if(s||(r.outOfDOMOrder=!0),s&&sm.nodeContains(a,s))b.currentNode=s;else if(f){const e=Om(a);if(!e)return null;if(this._acceptElement(e,v)===NodeFilter.FILTER_ACCEPT&&!y(!0))return v.skippedFocusable&&(r.outOfDOMOrder=!0),p;b.currentNode=e}do{f?b.previousNode():b.nextNode()}while(y());return v.skippedFocusable&&(r.outOfDOMOrder=!0),p.length?p:null}_acceptElement(e,t){var r,o,n;if(t.found)return NodeFilter.FILTER_ACCEPT;const i=t.foundBackward;if(i&&(e===i||!sm.nodeContains(i,e)))return t.found=!0,t.foundElement=i,NodeFilter.FILTER_ACCEPT;const a=t.container;if(e===a)return NodeFilter.FILTER_SKIP;if(!sm.nodeContains(a,e))return NodeFilter.FILTER_REJECT;if(jm(e))return NodeFilter.FILTER_REJECT;if(sm.nodeContains(t.rejectElementsFrom,e))return NodeFilter.FILTER_REJECT;const s=t.currentCtx=qm.getTabsterContext(this._tabster,e);if(!s)return NodeFilter.FILTER_SKIP;if(wm(e))return this.isFocusable(e,void 0,!0,!0)&&(t.skippedFocusable=!0),NodeFilter.FILTER_SKIP;if(!t.hasCustomCondition&&("IFRAME"===e.tagName||"WEBVIEW"===e.tagName))return this.isVisible(e)&&(null===(r=s.modalizer)||void 0===r?void 0:r.userId)===(null===(o=this._tabster.modalizer)||void 0===o?void 0:o.activeId)?(t.found=!0,t.rejectElementsFrom=t.foundElement=e,NodeFilter.FILTER_ACCEPT):NodeFilter.FILTER_REJECT;if(!t.ignoreAccessibility&&!this.isAccessible(e))return this.isFocusable(e,!1,!0,!0)&&(t.skippedFocusable=!0),NodeFilter.FILTER_REJECT;let c,l=t.fromCtx;l||(l=t.fromCtx=qm.getTabsterContext(this._tabster,t.from));const d=null==l?void 0:l.mover;let u=s.groupper,f=s.mover;if(c=null===(n=this._tabster.modalizer)||void 0===n?void 0:n.acceptElement(e,t),void 0!==c&&(t.skippedFocusable=!0),void 0===c&&(u||f||d)){const r=null==u?void 0:u.getElement(),o=null==d?void 0:d.getElement();let n=null==f?void 0:f.getElement();if(n&&sm.nodeContains(o,n)&&sm.nodeContains(a,o)&&(!r||!f||sm.nodeContains(o,r))&&(f=d,n=o),r)if(r!==a&&sm.nodeContains(a,r)){if(!sm.nodeContains(r,e))return NodeFilter.FILTER_REJECT}else u=void 0;if(n)if(sm.nodeContains(a,n)){if(!sm.nodeContains(n,e))return NodeFilter.FILTER_REJECT}else f=void 0;u&&f&&(n&&r&&!sm.nodeContains(r,n)?f=void 0:u=void 0),u&&(c=u.acceptElement(e,t)),f&&(c=f.acceptElement(e,t))}if(void 0===c&&(c=t.acceptCondition(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,c===NodeFilter.FILTER_SKIP&&this.isFocusable(e,!1,!0,!0)&&(t.skippedFocusable=!0)),c===NodeFilter.FILTER_ACCEPT&&!t.found){if(!t.isFindAll&&Rm(e)&&!e.checked){const r=e.name;let o=t.cachedRadioGroups[r];if(o||(o=function(e){if(!Rm(e))return;const t=e.name;let r,o=Array.from(sm.getElementsByName(e,t));return o=o.filter(e=>!!Rm(e)&&(e.checked&&(r=e),!0)),{name:t,buttons:new Set(o),checked:r}}(e),o&&(t.cachedRadioGroups[r]=o)),(null==o?void 0:o.checked)&&o.checked!==e)return NodeFilter.FILTER_SKIP}t.isBackward?(t.foundBackward=e,c=NodeFilter.FILTER_SKIP):(t.found=!0,t.foundElement=e)}return c}}const Dm="Enter",Lm="Escape",Hm="Home",Um="ArrowLeft",Wm="ArrowUp",Vm="ArrowRight",$m="ArrowDown",Km={[$g]:0,[Kg]:1,[Vg]:2};class Gm extends Mm{constructor(e,t){super(),this._init=()=>{const e=this._win(),t=e.document;t.addEventListener(ot,this._onFocusIn,!0),t.addEventListener(nt,this._onFocusOut,!0),e.addEventListener("keydown",this._onKeyDown,!0);const r=sm.getActiveElement(t);r&&r!==t.body&&this._setFocusedElement(r),this.subscribe(this._onChanged)},this._onFocusIn=e=>{const t=e.composedPath()[0];t&&this._setFocusedElement(t,e.detail.relatedTarget,e.detail.isFocusedProgrammatically)},this._onFocusOut=e=>{var t;this._setFocusedElement(void 0,null===(t=e.detail)||void 0===t?void 0:t.originalEvent.relatedTarget)},this._validateFocusedElement=e=>{},this._onKeyDown=e=>{if("Tab"!==e.key||e.ctrlKey)return;const t=this.getVal();if(!t||!t.ownerDocument||"true"===t.contentEditable)return;const r=this._tabster,o=r.controlTab,n=qm.getTabsterContext(r,t);if(!n||n.ignoreKeydown(e))return;const i=e.shiftKey,a=Gm.findNextTabbable(r,n,void 0,t,void 0,i,!0),s=n.root.getElement();if(!s)return;const c=null==a?void 0:a.element,l=function(e,t){var r;const o=e.getParent;let n=t;do{const t=null===(r=Gg(e,n))||void 0===r?void 0:r.uncontrolled;if(t&&e.uncontrolled.isUncontrolledCompletely(n,!!t.completely))return n;n=o(n)}while(n)}(r,t);if(c){const d=a.uncontrolled;if(n.uncontrolled||sm.nodeContains(d,t)){if(!a.outOfDOMOrder&&d===n.uncontrolled||l&&!sm.nodeContains(l,c))return;return void Em.addPhantomDummyWithTarget(r,t,i,c)}if(d&&r.focusable.isVisible(d)||"IFRAME"===c.tagName&&r.focusable.isVisible(c))return void(s.dispatchEvent(new om({by:"root",owner:s,next:c,relatedEvent:e}))&&Em.moveWithPhantomDummy(r,null!=d?d:c,!1,i,e));(o||(null==a?void 0:a.outOfDOMOrder))&&s.dispatchEvent(new om({by:"root",owner:s,next:c,relatedEvent:e}))&&(e.preventDefault(),e.stopImmediatePropagation(),at(c))}else!l&&s.dispatchEvent(new om({by:"root",owner:s,next:null,relatedEvent:e}))&&n.root.moveOutWithDefaultAction(i,e)},this._onChanged=(e,t)=>{var r,o;if(e)e.dispatchEvent(new tm(t));else{const e=null===(r=this._lastVal)||void 0===r?void 0:r.get();if(e){const r={...t},n=qm.getTabsterContext(this._tabster,e),i=null===(o=null==n?void 0:n.modalizer)||void 0===o?void 0:o.userId;i&&(r.modalizerId=i),e.dispatchEvent(new rm(r))}}},this._tabster=e,this._win=t,e.queueInit(this._init)}dispose(){super.dispose();const e=this._win(),t=e.document;t.removeEventListener(ot,this._onFocusIn,!0),t.removeEventListener(nt,this._onFocusOut,!0),e.removeEventListener("keydown",this._onKeyDown,!0),this.unsubscribe(this._onChanged);const r=this._asyncFocus;r&&(e.clearTimeout(r.timeout),delete this._asyncFocus),delete Gm._lastResetElement,delete this._nextVal,delete this._lastVal}static forgetMemorized(e,t){var r,o;let n=Gm._lastResetElement,i=n&&n.get();i&&sm.nodeContains(t,i)&&delete Gm._lastResetElement,i=null===(o=null===(r=e._nextVal)||void 0===r?void 0:r.element)||void 0===o?void 0:o.get(),i&&sm.nodeContains(t,i)&&delete e._nextVal,n=e._lastVal,i=n&&n.get(),i&&sm.nodeContains(t,i)&&delete e._lastVal}getFocusedElement(){return this.getVal()}getLastFocusedElement(){var e;let t=null===(e=this._lastVal)||void 0===e?void 0:e.get();return(!t||t&&!Tm(t.ownerDocument,t))&&(this._lastVal=t=void 0),t}focus(e,t,r,o){return!!this._tabster.focusable.isFocusable(e,t,!1,r)&&(e.focus({preventScroll:o}),!0)}focusDefault(e){const t=this._tabster.focusable.findDefault({container:e});return!!t&&(this._tabster.focusedElement.focus(t),!0)}getFirstOrLastTabbable(e,t){var r;const{container:o,ignoreAccessibility:n}=t;let i;if(o){const t=qm.getTabsterContext(this._tabster,o);t&&(i=null===(r=Gm.findNextTabbable(this._tabster,t,o,void 0,void 0,!e,n))||void 0===r?void 0:r.element)}return i&&!sm.nodeContains(o,i)&&(i=void 0),i||void 0}_focusFirstOrLast(e,t){const r=this.getFirstOrLastTabbable(e,t);return!!r&&(this.focus(r,!1,!0),!0)}focusFirst(e){return this._focusFirstOrLast(!0,e)}focusLast(e){return this._focusFirstOrLast(!1,e)}resetFocus(e){if(!this._tabster.focusable.isVisible(e))return!1;if(this._tabster.focusable.isFocusable(e,!0,!0,!0))this.focus(e);else{const t=e.getAttribute("tabindex"),r=e.getAttribute("aria-hidden");e.tabIndex=-1,e.setAttribute("aria-hidden","true"),Gm._lastResetElement=new hm(this._win,e),this.focus(e,!0,!0),this._setOrRemoveAttribute(e,"tabindex",t),this._setOrRemoveAttribute(e,"aria-hidden",r)}return!0}requestAsyncFocus(e,t,r){const o=this._tabster.getWindow(),n=this._asyncFocus;if(n){if(Km[e]>Km[n.source])return;o.clearTimeout(n.timeout)}this._asyncFocus={source:e,callback:t,timeout:o.setTimeout(()=>{this._asyncFocus=void 0,t()},r)}}cancelAsyncFocus(e){const t=this._asyncFocus;(null==t?void 0:t.source)===e&&(this._tabster.getWindow().clearTimeout(t.timeout),this._asyncFocus=void 0)}_setOrRemoveAttribute(e,t,r){null===r?e.removeAttribute(t):e.setAttribute(t,r)}_setFocusedElement(e,t,r){var o,n;if(this._tabster._noop)return;const i={relatedTarget:t};if(e){const t=null===(o=Gm._lastResetElement)||void 0===o?void 0:o.get();if(Gm._lastResetElement=void 0,t===e||wm(e))return;i.isFocusedProgrammatically=r;const a=qm.getTabsterContext(this._tabster,e),s=null===(n=null==a?void 0:a.modalizer)||void 0===n?void 0:n.userId;s&&(i.modalizerId=s)}const a=this._nextVal={element:e?new hm(this._win,e):void 0,detail:i};e&&e!==this._val&&this._validateFocusedElement(e),this._nextVal===a&&this.setVal(e,i),this._nextVal=void 0}setVal(e,t){super.setVal(e,t),e&&(this._lastVal=new hm(this._win,e))}static findNextTabbable(e,t,r,o,n,i,a){const s=r||t.root.getElement();if(!s)return null;let c=null;const l=Gm._isTabbingTimer,d=e.getWindow();l&&d.clearTimeout(l),Gm.isTabbing=!0,Gm._isTabbingTimer=d.setTimeout(()=>{delete Gm._isTabbingTimer,Gm.isTabbing=!1},0);const u=t.modalizer,f=t.groupper,h=t.mover,p=t=>{if(c=t.findNextTabbable(o,n,i,a),o&&!(null==c?void 0:c.element)){const n=t!==u&&sm.getParentElement(t.getElement());if(n){const s=qm.getTabsterContext(e,o,{referenceElement:n});if(s){const o=t.getElement(),l=i?o:o&&Om(o)||o;l&&(c=Gm.findNextTabbable(e,s,r,l,n,i,a),c&&(c.outOfDOMOrder=!0))}}}};if(f&&h)p(t.groupperBeforeMover?f:h);else if(f)p(f);else if(h)p(h);else if(u)p(u);else{const t={container:s,currentElement:o,referenceElement:n,ignoreAccessibility:a,useActiveModalizer:!0},r={},l=e.focusable[i?"findPrev":"findNext"](t,r);c={element:l,outOfDOMOrder:r.outOfDOMOrder,uncontrolled:r.uncontrolled}}return c}}Gm.isTabbing=!1;class Jm extends Em{constructor(e,t,r,o){super(r,e,4,o,!0),this._setHandlers((o,n,i)=>{var a,s;const c=e.get(),l=o.input;if(c&&l){const e=qm.getTabsterContext(r,l);if(e){let d;d=null===(a=t.findNextTabbable(i||void 0,void 0,n,!0))||void 0===a?void 0:a.element,d||(d=null===(s=Gm.findNextTabbable(r,e,void 0,o.isOutside?l:function(e,t){let r=e,o=null;for(;r&&!o;)o=t?sm.getPreviousElementSibling(r):sm.getNextElementSibling(r),r=sm.getParentElement(r);return o||void 0}(c,!n),void 0,n,!0))||void 0===s?void 0:s.element),d&&at(d)}}})}}class Qm extends Im{constructor(e,t,r,o,n){super(e,t,o),this._shouldTabInside=!1,this.makeTabbable(!1),this._onDispose=r,e.controlTab||(this.dummyManager=new Jm(this._element,this,e,n))}dispose(){var e;this._onDispose(this),this._element.get(),null===(e=this.dummyManager)||void 0===e||e.dispose(),delete this.dummyManager,delete this._first}findNextTabbable(e,t,r,o){const n=this.getElement();if(!n)return null;const i=jm(e)===n;if(!this._shouldTabInside&&e&&sm.nodeContains(n,e)&&!i)return{element:void 0,outOfDOMOrder:!0};const a=this.getFirst(!0);if(!e||!sm.nodeContains(n,e)||i)return{element:a,outOfDOMOrder:!0};const s=this._tabster;let c,l=null,d=!1;if(this._shouldTabInside&&a){const i={container:n,currentElement:e,referenceElement:t,ignoreAccessibility:o,useActiveModalizer:!0},a={};l=s.focusable[r?"findPrev":"findNext"](i,a),d=!!a.outOfDOMOrder,l||2!==this._props.tabbability||(l=s.focusable[r?"findLast":"findFirst"]({container:n,ignoreAccessibility:o,useActiveModalizer:!0},a),d=!0),c=a.uncontrolled}return{element:l,uncontrolled:c,outOfDOMOrder:d}}makeTabbable(e){this._shouldTabInside=e||!this._props.tabbability}isActive(e){var t;const r=this.getElement()||null;let o=!0;for(let e=sm.getParentElement(r);e;e=sm.getParentElement(e)){const r=null===(t=Gg(this._tabster,e))||void 0===t?void 0:t.groupper;r&&(r._shouldTabInside||(o=!1))}let n=o?!!this._props.tabbability&&this._shouldTabInside:void 0;if(n&&e){const e=this._tabster.focusedElement.getFocusedElement();e&&(n=e!==this.getFirst(!0))}return n}getFirst(e){var t;const r=this.getElement();let o;if(r){if(e&&this._tabster.focusable.isFocusable(r))return r;o=null===(t=this._first)||void 0===t?void 0:t.get(),o||(o=this._tabster.focusable.findFirst({container:r,useActiveModalizer:!0})||void 0,o&&this.setFirst(o))}return o}setFirst(e){e?this._first=new hm(this._tabster.getWindow,e):delete this._first}acceptElement(e,t){const r=t.cachedGrouppers,o=sm.getParentElement(this.getElement()),n=o&&qm.getTabsterContext(this._tabster,o),i=null==n?void 0:n.groupper,a=(null==n?void 0:n.groupperBeforeMover)?i:void 0;let s;const c=e=>{let t,o=r[e.id];return o?t=o.isActive:(t=this.isActive(!0),o=r[e.id]={isActive:t}),t};if(a&&(s=a.getElement(),!c(a)&&s&&t.container!==s&&sm.nodeContains(t.container,s)))return t.skippedFocusable=!0,NodeFilter.FILTER_REJECT;const l=c(this),d=this.getElement();if(d&&!0!==l){if(d===e&&i&&(s||(s=i.getElement()),s&&!c(i)&&sm.nodeContains(t.container,s)&&s!==t.container))return t.skippedFocusable=!0,NodeFilter.FILTER_REJECT;if(d!==e&&sm.nodeContains(d,e))return t.skippedFocusable=!0,NodeFilter.FILTER_REJECT;const o=r[this.id];let n;if(n="first"in o?o.first:o.first=this.getFirst(!0),n&&t.acceptCondition(n))return t.rejectElementsFrom=d,t.skippedFocusable=!0,n!==t.from?(t.found=!0,t.foundElement=n,NodeFilter.FILTER_ACCEPT):NodeFilter.FILTER_REJECT}}}class Xm{constructor(e,t){this._current={},this._grouppers={},this._init=()=>{const e=this._win();this._tabster.focusedElement.subscribeFirst(this._onFocus);const t=e.document,r=sm.getActiveElement(t);r&&this._onFocus(r),t.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("keydown",this._onKeyDown,!0),e.addEventListener(Yg,this._onMoveFocus)},this._onGroupperDispose=e=>{delete this._grouppers[e.id]},this._onFocus=e=>{e&&this._updateCurrent(e)},this._onMouseDown=e=>{let t=e.target;for(;t&&!this._tabster.focusable.isFocusable(t);)t=this._tabster.getParent(t);t&&this._updateCurrent(t)},this._onKeyDown=e=>{if(e.key!==Dm&&e.key!==Lm)return;if(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)return;const t=this._tabster.focusedElement.getFocusedElement();t&&this.handleKeyPress(t,e)},this._onMoveFocus=e=>{var t;const r=e.composedPath()[0],o=null===(t=e.detail)||void 0===t?void 0:t.action;r&&void 0!==o&&!e.defaultPrevented&&(1===o?this._enterGroupper(r):this._escapeGroupper(r),e.stopImmediatePropagation())},this._tabster=e,this._win=t,e.queueInit(this._init)}dispose(){const e=this._win();this._tabster.focusedElement.cancelAsyncFocus(1),this._current={},this._updateTimer&&(e.clearTimeout(this._updateTimer),delete this._updateTimer),this._tabster.focusedElement.unsubscribe(this._onFocus),e.document.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keydown",this._onKeyDown,!0),e.removeEventListener(Yg,this._onMoveFocus),Object.keys(this._grouppers).forEach(e=>{this._grouppers[e]&&(this._grouppers[e].dispose(),delete this._grouppers[e])})}createGroupper(e,t,r){const o=this._tabster,n=new Qm(o,e,this._onGroupperDispose,t,r);this._grouppers[n.id]=n;const i=o.focusedElement.getFocusedElement();return i&&sm.nodeContains(e,i)&&!this._updateTimer&&(this._updateTimer=this._win().setTimeout(()=>{delete this._updateTimer,i===o.focusedElement.getFocusedElement()&&this._updateCurrent(i)},0)),n}forgetCurrentGrouppers(){this._current={}}_updateCurrent(e){var t;this._updateTimer&&(this._win().clearTimeout(this._updateTimer),delete this._updateTimer);const r=this._tabster,o={};for(let n=r.getParent(e);n;n=r.getParent(n)){const i=null===(t=Gg(r,n))||void 0===t?void 0:t.groupper;if(i){o[i.id]=!0,this._current[i.id]=i;const t=i.isActive()||e!==n&&(!i.getProps().delegated||i.getFirst(!1)!==e);i.makeTabbable(t)}}for(const e of Object.keys(this._current)){const t=this._current[e];t.id in o||(t.makeTabbable(!1),t.setFirst(void 0),delete this._current[e])}}_enterGroupper(e,t){const r=this._tabster,o=qm.getTabsterContext(r,e),n=(null==o?void 0:o.groupper)||(null==o?void 0:o.modalizerInGroupper),i=null==n?void 0:n.getElement();if(n&&i&&(e===i||n.getProps().delegated&&e===n.getFirst(!1))){const o=r.focusable.findNext({container:i,currentElement:e,useActiveModalizer:!0});if(o&&(!t||t&&i.dispatchEvent(new om({by:"groupper",owner:i,next:o,relatedEvent:t}))))return t&&(t.preventDefault(),t.stopImmediatePropagation()),o.focus(),o}return null}_escapeGroupper(e,t,r){const o=this._tabster,n=qm.getTabsterContext(o,e);let i=(null==n?void 0:n.groupper)||(null==n?void 0:n.modalizerInGroupper);const a=null==i?void 0:i.getElement();if(i&&a&&sm.nodeContains(a,e)){let n;if(e!==a||r)n=i.getFirst(!0);else{const e=sm.getParentElement(a),t=e?qm.getTabsterContext(o,e):void 0;i=null==t?void 0:t.groupper,n=null==i?void 0:i.getFirst(!0)}if(n&&(!t||t&&a.dispatchEvent(new om({by:"groupper",owner:a,next:n,relatedEvent:t}))))return i&&i.makeTabbable(!1),n.focus(),n}return null}moveFocus(e,t){return 1===t?this._enterGroupper(e):this._escapeGroupper(e)}handleKeyPress(e,t,r){const o=this._tabster,n=qm.getTabsterContext(o,e);if(n&&((null==n?void 0:n.groupper)||(null==n?void 0:n.modalizerInGroupper))){if(o.focusedElement.cancelAsyncFocus(1),n.ignoreKeydown(t))return;if(t.key===Dm)this._enterGroupper(e,t);else if(t.key===Lm){const n=o.focusedElement.getFocusedElement();o.focusedElement.requestAsyncFocus(1,()=>{(n===o.focusedElement.getFocusedElement()||(!r||n)&&r)&&this._escapeGroupper(e,t,r)},0)}}}}class Ym extends Mm{constructor(e){super(),this._onChange=e=>{this.setVal(e,void 0)},this._keyborg=dt(e()),this._keyborg.subscribe(this._onChange)}dispose(){super.dispose(),this._keyborg&&(this._keyborg.unsubscribe(this._onChange),ut(this._keyborg),delete this._keyborg)}setNavigatingWithKeyboard(e){var t;null===(t=this._keyborg)||void 0===t||t.setVal(e)}isNavigatingWithKeyboard(){var e;return!!(null===(e=this._keyborg)||void 0===e?void 0:e.isNavigatingWithKeyboard())}}const Zm=["input","textarea","*[contenteditable]"].join(", ");class ev extends Em{constructor(e,t,r,o){super(t,e,3,o),this._onFocusDummyInput=e=>{var t,r;const o=this._element.get(),n=e.input;if(o&&n){const i=qm.getTabsterContext(this._tabster,o);let a;i&&(a=null===(t=Gm.findNextTabbable(this._tabster,i,void 0,n,void 0,!e.isFirst,!0))||void 0===t?void 0:t.element);const s=null===(r=this._getMemorized())||void 0===r?void 0:r.get();s&&this._tabster.focusable.isFocusable(s)&&(a=s),a&&at(a)}},this._tabster=t,this._getMemorized=r,this._setHandlers(this._onFocusDummyInput)}}class tv extends Im{constructor(e,t,r,o,n){var i;super(e,t,o),this._visible={},this._onIntersection=e=>{for(const t of e){const e=t.target,r=km(this._win,e);let o,n=this._fullyVisible;if(t.intersectionRatio>=.25?(o=t.intersectionRatio>=.75?2:1,2===o&&(n=r)):o=0,this._visible[r]!==o){void 0===o?(delete this._visible[r],n===r&&delete this._fullyVisible):(this._visible[r]=o,this._fullyVisible=n);const t=this.getState(e);t&&e.dispatchEvent(new nm(t))}}},this._win=e.getWindow,this.visibilityTolerance=null!==(i=o.visibilityTolerance)&&void 0!==i?i:.8,(this._props.trackState||this._props.visibilityAware)&&(this._intersectionObserver=new IntersectionObserver(this._onIntersection,{threshold:[0,.25,.5,.75,1]}),this._observeState()),this._onDispose=r;e.controlTab||(this.dummyManager=new ev(this._element,e,()=>o.memorizeCurrent?this._current:void 0,n))}dispose(){var e;this._onDispose(this),this._intersectionObserver&&(this._intersectionObserver.disconnect(),delete this._intersectionObserver),delete this._current,delete this._fullyVisible,delete this._allElements,delete this._updateQueue,this._unobserve&&(this._unobserve(),delete this._unobserve);const t=this._win();this._setCurrentTimer&&(t.clearTimeout(this._setCurrentTimer),delete this._setCurrentTimer),this._updateTimer&&(t.clearTimeout(this._updateTimer),delete this._updateTimer),null===(e=this.dummyManager)||void 0===e||e.dispose(),delete this.dummyManager}setCurrent(e){this._current=e?new hm(this._win,e):void 0,!this._props.trackState&&!this._props.visibilityAware||this._setCurrentTimer||(this._setCurrentTimer=this._win().setTimeout(()=>{var e;delete this._setCurrentTimer;const t=[];this._current!==this._prevCurrent&&(t.push(this._current),t.push(this._prevCurrent),this._prevCurrent=this._current);for(const r of t){const t=null==r?void 0:r.get();if(t&&(null===(e=this._allElements)||void 0===e?void 0:e.get(t))===this){const e=this._props;if(t&&(void 0!==e.visibilityAware||e.trackState)){const e=this.getState(t);e&&t.dispatchEvent(new nm(e))}}}}))}getCurrent(){var e;return(null===(e=this._current)||void 0===e?void 0:e.get())||null}findNextTabbable(e,t,r,o){const n=this.getElement(),i=n&&jm(e)===n;if(!n)return null;let a,s=null,c=!1;if(this._props.tabbable||i||e&&!sm.nodeContains(n,e)){const i={currentElement:e,referenceElement:t,container:n,ignoreAccessibility:o,useActiveModalizer:!0},l={};s=this._tabster.focusable[r?"findPrev":"findNext"](i,l),c=!!l.outOfDOMOrder,a=l.uncontrolled}return{element:s,uncontrolled:a,outOfDOMOrder:c}}acceptElement(e,t){var r,o;if(!Gm.isTabbing)return(null===(r=t.currentCtx)||void 0===r?void 0:r.excludedFromMover)?NodeFilter.FILTER_REJECT:void 0;const{memorizeCurrent:n,visibilityAware:i,hasDefault:a=!0}=this._props,s=this.getElement();if(s&&(n||i||a)&&(!sm.nodeContains(s,t.from)||jm(t.from)===s)){let e;if(n){const r=null===(o=this._current)||void 0===o?void 0:o.get();r&&t.acceptCondition(r)&&(e=r)}if(!e&&a&&(e=this._tabster.focusable.findDefault({container:s,useActiveModalizer:!0})),!e&&i&&(e=this._tabster.focusable.findElement({container:s,useActiveModalizer:!0,isBackward:t.isBackward,acceptCondition:e=>{var r;const o=km(this._win,e),n=this._visible[o];return s!==e&&!!(null===(r=this._allElements)||void 0===r?void 0:r.get(e))&&t.acceptCondition(e)&&(2===n||1===n&&(1===i||!this._fullyVisible))}})),e)return t.found=!0,t.foundElement=e,t.rejectElementsFrom=s,t.skippedFocusable=!0,NodeFilter.FILTER_ACCEPT}}_observeState(){const e=this.getElement();if(this._unobserve||!e||"undefined"==typeof MutationObserver)return;const t=this._win(),r=this._allElements=new WeakMap,o=this._tabster.focusable;let n=this._updateQueue=[];const i=sm.createMutationObserver(e=>{for(const t of e){const e=t.target,r=t.removedNodes,o=t.addedNodes;if("attributes"===t.type)"tabindex"===t.attributeName&&n.push({element:e,type:2});else{for(let e=0;e{var o,n;const i=r.get(e);i&&t&&(null===(o=this._intersectionObserver)||void 0===o||o.unobserve(e),r.delete(e)),i||t||(r.set(e,this),null===(n=this._intersectionObserver)||void 0===n||n.observe(e))},s=e=>{const t=o.isFocusable(e);r.get(e)?t||a(e,!0):t&&a(e)},c=e=>{const{mover:r}=u(e);if(r&&r!==this){if(r.getElement()!==e||!o.isFocusable(e))return;a(e)}const n=mm(t.document,e,e=>{const{mover:t,groupper:r}=u(e);if(t&&t!==this)return NodeFilter.FILTER_REJECT;const n=null==r?void 0:r.getFirst(!0);return r&&r.getElement()!==e&&n&&n!==e?NodeFilter.FILTER_REJECT:(o.isFocusable(e)&&a(e),NodeFilter.FILTER_SKIP)});if(n)for(n.currentNode=e;n.nextNode(););},l=e=>{r.get(e)&&a(e,!0);for(let t=sm.getFirstElementChild(e);t;t=sm.getNextElementSibling(t))l(t)},d=()=>{!this._updateTimer&&n.length&&(this._updateTimer=t.setTimeout(()=>{delete this._updateTimer;for(const{element:e,type:t}of n)switch(t){case 2:s(e);break;case 1:c(e);break;case 3:l(e)}n=this._updateQueue=[]},0))},u=e=>{const t={};for(let r=e;r;r=sm.getParentElement(r)){const e=Gg(this._tabster,r);if(e&&(e.groupper&&!t.groupper&&(t.groupper=e.groupper),e.mover)){t.mover=e.mover;break}}return t};n.push({element:e,type:1}),d(),i.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["tabindex"]}),this._unobserve=()=>{i.disconnect()}}getState(e){const t=km(this._win,e);if(t in this._visible){const r=this._visible[t]||0;return{isCurrent:this._current?this._current.get()===e:void 0,visibility:r}}}}class rv{constructor(e,t){this._init=()=>{const e=this._win();e.addEventListener("keydown",this._onKeyDown,!0),e.addEventListener(Qg,this._onMoveFocus),e.addEventListener(Xg,this._onMemorizedElement),this._tabster.focusedElement.subscribe(this._onFocus)},this._onMoverDispose=e=>{delete this._movers[e.id]},this._onFocus=e=>{var t;let r=e,o=e;for(let n=sm.getParentElement(e);n;n=sm.getParentElement(n)){const e=null===(t=Gg(this._tabster,n))||void 0===t?void 0:t.mover;e&&(e.setCurrent(o),r=void 0),!r&&this._tabster.focusable.isFocusable(n)&&(r=o=n)}},this._onKeyDown=async e=>{var t;if(this._ignoredInputTimer&&(this._win().clearTimeout(this._ignoredInputTimer),delete this._ignoredInputTimer),null===(t=this._ignoredInputResolve)||void 0===t||t.call(this,!1),e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)return;const r=e.key;let o;if(r===$m?o=2:r===Vm?o=4:r===Wm?o=1:r===Um?o=3:"PageDown"===r?o=6:"PageUp"===r?o=5:r===Hm?o=7:"End"===r&&(o=8),!o)return;const n=this._tabster.focusedElement.getFocusedElement();n&&!await this._isIgnoredInput(n,r)&&this._moveFocus(n,o,e)},this._onMoveFocus=e=>{var t;const r=e.composedPath()[0],o=null===(t=e.detail)||void 0===t?void 0:t.key;r&&void 0!==o&&!e.defaultPrevented&&(this._moveFocus(r,o),e.stopImmediatePropagation())},this._onMemorizedElement=e=>{var t;const r=e.composedPath()[0];let o=null===(t=e.detail)||void 0===t?void 0:t.memorizedElement;if(r){const t=qm.getTabsterContext(this._tabster,r),n=null==t?void 0:t.mover;n&&(o&&!sm.nodeContains(n.getElement(),o)&&(o=void 0),n.setCurrent(o),e.stopImmediatePropagation())}},this._tabster=e,this._win=t,this._movers={},e.queueInit(this._init)}dispose(){var e;const t=this._win();this._tabster.focusedElement.unsubscribe(this._onFocus),null===(e=this._ignoredInputResolve)||void 0===e||e.call(this,!1),this._ignoredInputTimer&&(t.clearTimeout(this._ignoredInputTimer),delete this._ignoredInputTimer),t.removeEventListener("keydown",this._onKeyDown,!0),t.removeEventListener(Qg,this._onMoveFocus),t.removeEventListener(Xg,this._onMemorizedElement),Object.keys(this._movers).forEach(e=>{this._movers[e]&&(this._movers[e].dispose(),delete this._movers[e])})}createMover(e,t,r){const o=new tv(this._tabster,e,this._onMoverDispose,t,r);return this._movers[o.id]=o,o}moveFocus(e,t){return this._moveFocus(e,t)}_moveFocus(e,t,r){var o,n;const i=this._tabster,a=qm.getTabsterContext(i,e,{checkRtl:!0});if(!a||!a.mover||a.excludedFromMover||r&&a.ignoreKeydown(r))return null;const s=a.mover,c=s.getElement();if(a.groupperBeforeMover){const e=a.groupper;if(!e||e.isActive(!0))return null;for(let t=sm.getParentElement(e.getElement());t&&t!==c;t=sm.getParentElement(t))if(null===(n=null===(o=Gg(i,t))||void 0===o?void 0:o.groupper)||void 0===n?void 0:n.isActive(!0))return null}if(!c)return null;const l=i.focusable,d=s.getProps(),u=d.direction||0,f=0===u,h=f||1===u,p=f||2===u,g=4===u,m=g||3===u,v=d.cyclic;let b,y,w,k=0,C=0;if(m&&(w=e.getBoundingClientRect(),k=Math.ceil(w.left),C=Math.floor(w.right)),a.rtl&&(4===t?t=3:3===t&&(t=4)),2===t&&h||4===t&&(p||m))if(b=l.findNext({currentElement:e,container:c,useActiveModalizer:!0}),b&&m){const e=Math.ceil(b.getBoundingClientRect().left);!g&&C>e&&(b=void 0)}else!b&&v&&(b=l.findFirst({container:c,useActiveModalizer:!0}));else if(1===t&&h||3===t&&(p||m))if(b=l.findPrev({currentElement:e,container:c,useActiveModalizer:!0}),b&&m){const e=Math.floor(b.getBoundingClientRect().right);!g&&e>k&&(b=void 0)}else!b&&v&&(b=l.findLast({container:c,useActiveModalizer:!0}));else if(7===t)m?l.findElement({container:c,currentElement:e,useActiveModalizer:!0,isBackward:!0,acceptCondition:t=>{var r;if(!l.isFocusable(t))return!1;const o=Math.ceil(null!==(r=t.getBoundingClientRect().left)&&void 0!==r?r:0);return t!==e&&k<=o||(b=t,!1)}}):b=l.findFirst({container:c,useActiveModalizer:!0});else if(8===t)m?l.findElement({container:c,currentElement:e,useActiveModalizer:!0,acceptCondition:t=>{var r;if(!l.isFocusable(t))return!1;const o=Math.ceil(null!==(r=t.getBoundingClientRect().left)&&void 0!==r?r:0);return t!==e&&k>=o||(b=t,!1)}}):b=l.findLast({container:c,useActiveModalizer:!0});else if(5===t){if(l.findElement({currentElement:e,container:c,useActiveModalizer:!0,isBackward:!0,acceptCondition:e=>!(!l.isFocusable(e)||bm(this._win,e,s.visibilityTolerance)&&(b=e,1))}),m&&b){const e=Math.ceil(b.getBoundingClientRect().left);l.findElement({currentElement:b,container:c,useActiveModalizer:!0,acceptCondition:t=>{if(!l.isFocusable(t))return!1;const r=Math.ceil(t.getBoundingClientRect().left);return k=r||(b=t,!1)}})}y=!1}else if(6===t){if(l.findElement({currentElement:e,container:c,useActiveModalizer:!0,acceptCondition:e=>!(!l.isFocusable(e)||bm(this._win,e,s.visibilityTolerance)&&(b=e,1))}),m&&b){const e=Math.ceil(b.getBoundingClientRect().left);l.findElement({currentElement:b,container:c,useActiveModalizer:!0,isBackward:!0,acceptCondition:t=>{if(!l.isFocusable(t))return!1;const r=Math.ceil(t.getBoundingClientRect().left);return k>r||e<=r||(b=t,!1)}})}y=!0}else if(m){const r=1===t,o=k,n=Math.ceil(w.top),i=C,a=Math.floor(w.bottom);let s,d,u=0;l.findAll({container:c,currentElement:e,isBackward:r,onElement:e=>{const t=e.getBoundingClientRect(),c=Math.ceil(t.left),l=Math.ceil(t.top),f=Math.floor(t.right),h=Math.floor(t.bottom);if(r&&nl)return!0;const p=Math.ceil(Math.min(i,f))-Math.floor(Math.max(o,c)),g=Math.ceil(Math.min(i-o,f-c));if(p>0&&g>=p){const t=p/g;t>u&&(s=e,u=t)}else if(0===u){const t=function(e,t,r,o,n,i,a,s){const c=r0)return!1;return!0}}),b=s}return b&&(!r||r&&c.dispatchEvent(new om({by:"mover",owner:c,next:b,relatedEvent:r})))?(void 0!==y&&function(e,t,r){const o=ym(t);if(o){const n=vm(e,o),i=t.getBoundingClientRect();o.scrollTop+=r?i.top-n.top:i.bottom-n.bottom}}(this._win,b,y),r&&(r.preventDefault(),r.stopImmediatePropagation()),at(b),b):null}async _isIgnoredInput(e,t){if("true"===e.getAttribute("aria-expanded")&&e.hasAttribute("aria-activedescendant"))return!0;if(xm(e,Zm)){let r,o=0,n=0,i=0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName){const r=e.type,a=e.value;if(i=(a||"").length,"email"===r||"number"===r){if(i){const r=sm.getSelection(e);if(r){const e=r.toString().length,o=t===Um||t===Wm;if(r.modify("extend",o?"backward":"forward","character"),e!==r.toString().length)return r.modify("extend",o?"forward":"backward","character"),!0;i=0}}}else{const t=e.selectionStart;if(null===t)return"hidden"===r;o=t||0,n=e.selectionEnd||0}}else"true"===e.contentEditable&&(r=new(function(e){const t=um(e);if(t.basics.Promise)return t.basics.Promise;throw new Error("No Promise defined.")}(this._win))(t=>{this._ignoredInputResolve=e=>{delete this._ignoredInputResolve,t(e)};const r=this._win();this._ignoredInputTimer&&r.clearTimeout(this._ignoredInputTimer);const{anchorNode:a,focusNode:s,anchorOffset:c,focusOffset:l}=sm.getSelection(e)||{};this._ignoredInputTimer=r.setTimeout(()=>{var t,r,d;delete this._ignoredInputTimer;const{anchorNode:u,focusNode:f,anchorOffset:h,focusOffset:p}=sm.getSelection(e)||{};if(u===a&&f===s&&h===c&&p===l){if(o=h||0,n=p||0,i=(null===(r=e.textContent)||void 0===r?void 0:r.length)||0,u&&f&&sm.nodeContains(e,u)&&sm.nodeContains(e,f)&&u!==e){let t=!1;const r=e=>{if(e===u)t=!0;else if(e===f)return!0;const i=e.textContent;if(i&&!sm.getFirstChild(e)){const e=i.length;t?f!==u&&(n+=e):(o+=e,n+=e)}let a=!1;for(let t=sm.getFirstChild(e);t&&!a;t=t.nextSibling)a=r(t);return a};r(e)}null===(d=this._ignoredInputResolve)||void 0===d||d.call(this,!0)}else null===(t=this._ignoredInputResolve)||void 0===t||t.call(this,!1)},0)}));if(r&&!await r)return!0;if(o!==n)return!0;if(o>0&&(t===Um||t===Wm||t===Hm))return!0;if(onv.DEPTH&&this._stack.shift(),this._stack.push(new hm(this._getWindow,e)))}pop(e){var t;void 0===e&&(e=()=>!0);const r=this._getWindow().document;for(let o=this._stack.length-1;o>=0;o--){const o=null===(t=this._stack.pop())||void 0===t?void 0:t.get();if(o&&sm.nodeContains(r.body,sm.getParentElement(o))&&e(o))return o}}}nv.DEPTH=10;class iv{static _overrideAttachShadow(e){const t=e.Element.prototype.attachShadow;t.__origAttachShadow||(Element.prototype.attachShadow=function(e){const r=t.call(this,e);for(const e of iv._shadowObservers)e._addSubObserver(r);return r},Element.prototype.attachShadow.__origAttachShadow=t)}constructor(e){this._isObserving=!1,this._callbackWrapper=(e,t)=>{for(const t of e)if("childList"===t.type){const e=t.removedNodes,r=t.addedNodes;for(let t=0;t{if(e.nodeType===Node.ELEMENT_NODE)if(t){const t=this._subObservers.get(e);t&&(t.disconnect(),this._subObservers.delete(e))}else{const t=e.shadowRoot;t&&this._addSubObserver(t)}return NodeFilter.FILTER_SKIP}});o.nextNode()}takeRecords(){const e=this._observer.takeRecords();for(const t of this._subObservers.values())e.push(...t.takeRecords());return e}}iv._shadowObservers=new Set;class av{constructor(e){this.keyboardNavigation=e.keyboardNavigation,this.focusedElement=e.focusedElement,this.focusable=e.focusable,this.root=e.root,this.uncontrolled=e.uncontrolled,this.core=e}}class sv{constructor(e,t){var r,o;this._forgetMemorizedElements=[],this._wrappers=new Set,this._initQueue=[],this._version="8.5.6",this._noop=!1,this.getWindow=()=>{if(!this._win)throw new Error("Using disposed Tabster.");return this._win},this._storage=function(e){const t=e.__tabsterInstanceContext;return new((null==t?void 0:t.basics.WeakMap)||WeakMap)}(e),this._win=e;const n=this.getWindow;(null==t?void 0:t.DOMAPI)&&function(e){for(const t of Object.keys(e))sm[t]=e[t]}({...t.DOMAPI}),this.keyboardNavigation=new Ym(n),this.focusedElement=new Gm(this,n),this.focusable=new Fm(this),this.root=new qm(this,null==t?void 0:t.autoRoot),this.uncontrolled=new ov((null==t?void 0:t.checkUncontrolledCompletely)||(null==t?void 0:t.checkUncontrolledTrappingFocus)),this.controlTab=null===(r=null==t?void 0:t.controlTab)||void 0===r||r,this.rootDummyInputs=!!(null==t?void 0:t.rootDummyInputs),this._dummyObserver=new Am(n),this.getParent=null!==(o=null==t?void 0:t.getParent)&&void 0!==o?o:sm.getParentNode,this.internal={stopObserver:()=>{this._unobserve&&(this._unobserve(),delete this._unobserve)},resumeObserver:e=>{if(!this._unobserve){const t=n().document;this._unobserve=function(e,t,r,o){if("undefined"==typeof MutationObserver)return()=>{};const n=t.getWindow;let i;function a(t,r){i||(i=um(n).elementByUId),s(t,r);const o=mm(e,t,e=>s(e,r));if(o)for(;o.nextNode(););}function s(e,o){var a;if(!e.getAttribute)return NodeFilter.FILTER_SKIP;const s=e.__tabsterElementUID;return s&&i&&(o?delete i[s]:null!==(a=i[s])&&void 0!==a||(i[s]=new hm(n,e))),(Gg(t,e)||e.hasAttribute(Ug))&&r(t,e,o),NodeFilter.FILTER_SKIP}const c=sm.createMutationObserver(e=>{var o,n,i,s,c;const l=new Set;for(const c of e){const e=c.target,d=c.removedNodes,u=c.addedNodes;if("attributes"===c.type)c.attributeName===Ug&&(l.has(e)||r(t,e));else{for(let r=0;r{c.disconnect()}}(t,this,Jg,e)}}},gm(n),this.queueInit(()=>{this.internal.resumeObserver(!0)})}_mergeProps(e){var t;e&&(this.getParent=null!==(t=e.getParent)&&void 0!==t?t:this.getParent)}createTabster(e,t){const r=new av(this);return e||this._wrappers.add(r),this._mergeProps(t),r}disposeTabster(e,t){t?this._wrappers.clear():this._wrappers.delete(e),0===this._wrappers.size&&this.dispose()}dispose(){var e,t,r,o,n,i,a,s;this.internal.stopObserver();const c=this._win;null==c||c.clearTimeout(this._initTimer),delete this._initTimer,this._initQueue=[],this._forgetMemorizedElements=[],c&&this._forgetMemorizedTimer&&(c.clearTimeout(this._forgetMemorizedTimer),delete this._forgetMemorizedTimer),null===(e=this.outline)||void 0===e||e.dispose(),null===(t=this.crossOrigin)||void 0===t||t.dispose(),null===(r=this.deloser)||void 0===r||r.dispose(),null===(o=this.groupper)||void 0===o||o.dispose(),null===(n=this.mover)||void 0===n||n.dispose(),null===(i=this.modalizer)||void 0===i||i.dispose(),null===(a=this.observedElement)||void 0===a||a.dispose(),null===(s=this.restorer)||void 0===s||s.dispose(),this.keyboardNavigation.dispose(),this.focusable.dispose(),this.focusedElement.dispose(),this.root.dispose(),this._dummyObserver.dispose(),function(e){const t=um(e);t.fakeWeakRefsStarted=!1,t.fakeWeakRefsTimer&&(e().clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefsTimer=void 0,t.fakeWeakRefs=[])}(this.getWindow),Cm(this.getWindow),this._storage=new WeakMap,this._wrappers.clear(),c&&(function(e){const t=e.__tabsterInstanceContext;t&&(t.elementByUId={},delete t.WeakRef,t.containerBoundingRectCache={},t.containerBoundingRectCacheTimer&&e.clearTimeout(t.containerBoundingRectCacheTimer),t.fakeWeakRefsTimer&&e.clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefs=[],delete e.__tabsterInstanceContext)}(c),delete c.__tabsterInstance,delete this._win)}storageEntry(e,t){const r=this._storage;let o=r.get(e);return o?!1===t&&0===Object.keys(o).length&&r.delete(e):!0===t&&(o={},r.set(e,o)),o}forceCleanup(){this._win&&(this._forgetMemorizedElements.push(this._win.document.body),this._forgetMemorizedTimer||(this._forgetMemorizedTimer=this._win.setTimeout(()=>{delete this._forgetMemorizedTimer;for(let e=this._forgetMemorizedElements.shift();e;e=this._forgetMemorizedElements.shift())Cm(this.getWindow,e),Gm.forgetMemorized(this.focusedElement,e)},0),pm(this.getWindow,!0)))}queueInit(e){var t;this._win&&(this._initQueue.push(e),this._initTimer||(this._initTimer=null===(t=this._win)||void 0===t?void 0:t.setTimeout(()=>{delete this._initTimer,this.drainInitQueue()},0)))}drainInitQueue(){if(!this._win)return;const e=this._initQueue;this._initQueue=[],e.forEach(e=>e())}}function cv(e){const t=e.core;return t.groupper||(t.groupper=new Xm(t,t.getWindow)),t.groupper}function lv(e){const t=e.core;return t.mover||(t.mover=new rv(t,t.getWindow)),t.mover}function dv(e,t){e.core.disposeTabster(e,t)}function uv(e,t={}){if(!e)return null;if(!t.skipVirtual){const t=function(e){return(t=e)&&t._virtual&&e._virtual.parent||null;var t}(e);if(t)return t}const r=e.parentNode;return r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r}const fv=e=>e;function hv(e){const t=(null==e?void 0:e.defaultView)||void 0,r=null==t?void 0:t.__tabsterShadowDOMAPI;if(t)return function(e,t){let r=function(e){return e.__tabsterInstance}(e);return r?r.createTabster(!1,t):(r=new sv(e,t),e.__tabsterInstance=r,r.createTabster())}(t,{autoRoot:{},controlTab:!1,getParent:uv,checkUncontrolledCompletely:e=>{var t;return!0===(null===(t=e.firstElementChild)||void 0===t?void 0:t.hasAttribute("data-is-focus-trap-zone-bumper"))||void 0},DOMAPI:r})}function pv(e=fv){const{targetDocument:t}=et(),r=o.useRef(null);return M(()=>{const o=hv(t);if(o)return r.current=e(o),()=>{dv(o),r.current=null}},[t,e]),r}const gv=e=>{pv();const t=Pm(e,!0);return o.useMemo(()=>({[Ug]:t}),[t])},mv=(e={})=>{const{circular:t,axis:r,memorizeCurrent:o=!0,tabbable:n,ignoreDefaultKeydown:i,unstable_hasDefault:a}=e;return pv(lv),gv({mover:{cyclic:!!t,direction:vv(null!=r?r:"vertical"),memorizeCurrent:o,tabbable:n,hasDefault:a},...i&&{focusable:{ignoreKeydown:i}}})};function vv(e){switch(e){case"horizontal":return 2;case"grid":return 3;case"grid-linear":return 4;case"both":return 0;default:return 1}}var bv=r(69982);const yv=e=>{const t=o.createContext({value:{current:e},version:{current:-1},listeners:[]});var r;return t.Provider=(r=t.Provider,e=>{const t=o.useRef(e.value),n=o.useRef(0),i=o.useRef();return i.current||(i.current={value:t,version:n,listeners:[]}),M(()=>{t.current=e.value,n.current+=1,(0,bv.unstable_runWithPriority)(bv.unstable_NormalPriority,()=>{i.current.listeners.forEach(t=>{t([n.current,e.value])})})},[e.value]),o.createElement(r,{value:i.current},e.children)}),delete t.Consumer,t},wv=(e,t)=>{const r=o.useContext(e),{value:{current:n},version:{current:i},listeners:a}=r,s=t(n),[c,l]=o.useState([n,s]),d=e=>{l(r=>{if(!e)return[n,s];if(e[0]<=i)return Object.is(r[1],s)?r:[n,s];try{if(Object.is(r[0],e[1]))return r;const o=t(e[1]);return Object.is(r[1],o)?r:[e[1],o]}catch(e){}return[r[0],r[1]]})};Object.is(c[1],s)||d(void 0);const u=F(d);return M(()=>(a.push(u),()=>{const e=a.indexOf(u);a.splice(e,1)}),[u,a]),c[1]},kv={appearance:"transparent",reserveSelectedTabSpace:!0,selectTabOnFocus:!1,disabled:!1,selectedValue:void 0,onRegister:()=>{},onUnregister:()=>{},onSelect:()=>{},getRegisteredTabs:()=>({registeredTabs:{}}),size:"medium",vertical:!1},Cv=yv(void 0),Tv=Cv.Provider,xv=e=>wv(Cv,(t=kv)=>e(t)),Sv=ye({root:{mc9l5x:"f22iagw",Beiy3e4:"f1063pyq",Bnnss6s:"fi64zpg",Eh141a:"flvyvdh",qhf8xq:"f10pi13n"},horizontal:{Bt984gj:"f1q9h2pe",Beiy3e4:"f1063pyq"},vertical:{Bt984gj:"f1q9h2pe",Beiy3e4:"f1vx9l62"},roundedSmall:{i8kkvl:0,Belr9w4:0,rmohyg:"f1eyhf9v"},rounded:{i8kkvl:0,Belr9w4:0,rmohyg:"faqewft"}},{d:[".f22iagw{display:flex;}",".f1063pyq{flex-direction:row;}",".fi64zpg{flex-shrink:0;}",".flvyvdh{flex-wrap:nowrap;}",".f10pi13n{position:relative;}",".f1q9h2pe{align-items:stretch;}",".f1vx9l62{flex-direction:column;}",[".f1eyhf9v{gap:var(--spacingHorizontalSNudge);}",{p:-1}],[".faqewft{gap:var(--spacingHorizontalS);}",{p:-1}]]}),Iv=o.forwardRef((e,t)=>{const r=((e,t)=>{const{appearance:r="transparent",reserveSelectedTabSpace:n=!0,disabled:i=!1,onTabSelect:a,selectTabOnFocus:s=!1,size:l="medium",vertical:d=!1}=e,u=o.useRef(null),f=mv({circular:!0,axis:d?"vertical":"horizontal",memorizeCurrent:!1,unstable_hasDefault:!0}),[h,p]=c({state:e.selectedValue,defaultState:e.defaultSelectedValue,initialState:void 0}),g=o.useRef(void 0),m=o.useRef(void 0);o.useEffect(()=>{m.current=g.current,g.current=h},[h]);const v=F((e,t)=>{p(t.value),null==a||a(e,t)}),b=o.useRef({}),y=F(e=>{const t=JSON.stringify(e.value);b.current[t]=e}),w=F(e=>{delete b.current[JSON.stringify(e.value)]}),k=o.useCallback(()=>({selectedValue:g.current,previousSelectedValue:m.current,registeredTabs:b.current}),[]);return{components:{root:"div"},root:N(qe("div",{ref:D(t,u),role:"tablist","aria-orientation":d?"vertical":"horizontal",...f,...e}),{elementType:"div"}),appearance:r,reserveSelectedTabSpace:n,disabled:i,selectTabOnFocus:s,selectedValue:h,size:l,vertical:d,onRegister:y,onUnregister:w,onSelect:v,getRegisteredTabs:k}})(e,t),n=function(e){const{appearance:t,reserveSelectedTabSpace:r,disabled:o,selectTabOnFocus:n,selectedValue:i,onRegister:a,onUnregister:s,onSelect:c,getRegisteredTabs:l,size:d,vertical:u}=e;return{tabList:{appearance:t,reserveSelectedTabSpace:r,disabled:o,selectTabOnFocus:n,selectedValue:i,onSelect:c,onRegister:a,onUnregister:s,getRegisteredTabs:l,size:d,vertical:u}}}(r);return(e=>{const{appearance:t,vertical:r,size:o}=e,n=Sv(),i="subtle-circular"===t||"filled-circular"===t;e.root.className=Z("fui-TabList",n.root,r?n.vertical:n.horizontal,i&&("small"===o?n.roundedSmall:n.rounded),e.root.className)})(r),Je("useTabListStyles_unstable")(r),((e,t)=>Ue(e.root,{children:Ue(Tv,{value:t.tabList,children:e.root.children})}))(r,n)});function _v(e,t){return(...r)=>{null==e||e(...r),null==t||t(...r)}}function Ev(e,t){const r=o.useRef(void 0),n=o.useCallback((o,n)=>(void 0!==r.current&&t(r.current),r.current=e(o,n),r.current),[t,e]),i=o.useCallback(()=>{void 0!==r.current&&(t(r.current),r.current=void 0)},[t]);return o.useEffect(()=>i,[i]),[n,i]}Iv.displayName="TabList";const Av=e=>(e(0),0),Bv=e=>e,Ov="--fui-Tab__indicator--offset",Rv="--fui-Tab__indicator--scale",jv=ye({base:{B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1gl81tg"},animated:{Ba2ppi3:"fhwpy7i",F2fol1:"f6zz20j",B1dyfl9:"f1ai4sc1",B0vmy72:"f9qxlq5",u9bimw:"f1aql376"},horizontal:{sjv3b2:["fug4aj8","f1i5xzg7"],b1kco5:"f1q7ujh"},vertical:{sjv3b2:"f1hqboyk",b1kco5:"f1dxupa6"}},{d:[[".f1gl81tg{overflow:visible;}",{p:-1}],".fhwpy7i::after{transition-property:transform;}",".f6zz20j::after{transition-duration:var(--durationSlow);}",".f1ai4sc1::after{transition-timing-function:var(--curveDecelerateMax);}",".fug4aj8::after{transform-origin:left;}",".f1i5xzg7::after{transform-origin:right;}",".f1q7ujh::after{transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));}",".f1hqboyk::after{transform-origin:top;}",".f1dxupa6::after{transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));}"],m:[["@media (prefers-reduced-motion: reduce){.f9qxlq5::after{transition-property:none;}}",{m:"(prefers-reduced-motion: reduce)"}],["@media (prefers-reduced-motion: reduce){.f1aql376::after{transition-duration:0.01ms;}}",{m:"(prefers-reduced-motion: reduce)"}]]}),Pv=(e,t)=>{var r;const o=Nv(t)?null===(r=e[JSON.stringify(t)])||void 0===r?void 0:r.ref.current:void 0;return o?(e=>{if(e){var t;const r=(null===(t=e.parentElement)||void 0===t?void 0:t.getBoundingClientRect())||{x:0,y:0,width:0,height:0},o=e.getBoundingClientRect();return{x:o.x-r.x,y:o.y-r.y,width:o.width,height:o.height}}})(o):void 0},Nv=e=>null!=e,zv=ye({root:{Bt984gj:"f122n59",mc9l5x:"f13qh94s",Bnnss6s:"fi64zpg",Bxotwcr:"f1u07yai",Budl1dq:"frn2hmy",wkccdc:"f1olsevy",oeaueh:"f1s6fcnf",qhf8xq:"f10pi13n"},button:{Bt984gj:"f122n59",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f3bhgqh",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",Bceei9c:"f1k6fduh",mc9l5x:"f13qh94s",Bnnss6s:"fi64zpg",Bxotwcr:"f1u07yai",Budl1dq:"frn2hmy",wkccdc:"f1olsevy",Bahqtrf:"fk6fouc",Bg96gwp:"f1i3iumi",oeaueh:"f1s6fcnf",qhf8xq:"f10pi13n",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",B9bfxx9:"f1cxpek8"},horizontal:{Brf1p80:"f4d9j23"},vertical:{Brf1p80:"f1s9ku6b"},smallHorizontal:{i8kkvl:"f14mj54c",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1wmopi4"},smallVertical:{i8kkvl:"f14mj54c",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f12or63q"},mediumHorizontal:{i8kkvl:"f1rjii52",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1w08f2p"},mediumVertical:{i8kkvl:"f1rjii52",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"fymxs25"},largeHorizontal:{i8kkvl:"f1rjii52",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1ssfvub"},largeVertical:{i8kkvl:"f1rjii52",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"fwkd1rq"},transparent:{De3pzq:"f1c21dwh",B95qlz1:"f9rvdkv",B7xitij:"f1051ucx",Bptxc3x:"fmmjozx",Bwqhzpy:"fqhzt5g",iyk698:"f7l5cgy",cl4aha:"fpkze5g",B0q3jbp:"f1iywnoi",Be9ayug:"f9n45c4"},subtle:{De3pzq:"fhovq9v",B95qlz1:"f1bifk9c",B7xitij:"fo6hitd",Bptxc3x:"fmmjozx",Bwqhzpy:"fqhzt5g",iyk698:"f7l5cgy",cl4aha:"fpkze5g",B0q3jbp:"f1iywnoi",Be9ayug:"f9n45c4"},disabledCursor:{Bceei9c:"fdrzuqr"},disabled:{De3pzq:"f1c21dwh",Bptxc3x:"fato7r6",cl4aha:"fao1bnu"},selected:{Bptxc3x:"f1cadz5z",Bwqhzpy:"fwhdxxj",iyk698:"fintccb",cl4aha:"ffplhdr",B0q3jbp:"fjo17wb",Be9ayug:"f148789c"}},{d:[".f122n59{align-items:center;}",".f13qh94s{display:grid;}",".fi64zpg{flex-shrink:0;}",".f1u07yai{grid-auto-flow:column;}",".frn2hmy{grid-template-columns:auto;}",".f1olsevy{grid-template-rows:auto;}",".f1s6fcnf{outline-style:none;}",".f10pi13n{position:relative;}",[".f3bhgqh{border:none;}",{p:-2}],[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".f1k6fduh{cursor:pointer;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",[".f1a3p1vp{overflow:hidden;}",{p:-1}],".f1cxpek8{text-transform:none;}",".f4d9j23{justify-content:center;}",".f1s9ku6b{justify-content:start;}",".f14mj54c{column-gap:var(--spacingHorizontalXXS);}",[".f1wmopi4{padding:var(--spacingVerticalSNudge) var(--spacingHorizontalSNudge);}",{p:-1}],[".f12or63q{padding:var(--spacingVerticalXXS) var(--spacingHorizontalSNudge);}",{p:-1}],".f1rjii52{column-gap:var(--spacingHorizontalSNudge);}",[".f1w08f2p{padding:var(--spacingVerticalM) var(--spacingHorizontalMNudge);}",{p:-1}],[".fymxs25{padding:var(--spacingVerticalSNudge) var(--spacingHorizontalMNudge);}",{p:-1}],[".f1ssfvub{padding:var(--spacingVerticalL) var(--spacingHorizontalMNudge);}",{p:-1}],[".fwkd1rq{padding:var(--spacingVerticalS) var(--spacingHorizontalMNudge);}",{p:-1}],".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f9rvdkv:enabled:hover{background-color:var(--colorTransparentBackgroundHover);}",".f1051ucx:enabled:active{background-color:var(--colorTransparentBackgroundPressed);}",".fmmjozx .fui-Tab__icon{color:var(--colorNeutralForeground2);}",".fqhzt5g:enabled:hover .fui-Tab__icon{color:var(--colorNeutralForeground2Hover);}",".f7l5cgy:enabled:active .fui-Tab__icon{color:var(--colorNeutralForeground2Pressed);}",".fpkze5g .fui-Tab__content{color:var(--colorNeutralForeground2);}",".f1iywnoi:enabled:hover .fui-Tab__content{color:var(--colorNeutralForeground2Hover);}",".f9n45c4:enabled:active .fui-Tab__content{color:var(--colorNeutralForeground2Pressed);}",".fhovq9v{background-color:var(--colorSubtleBackground);}",".f1bifk9c:enabled:hover{background-color:var(--colorSubtleBackgroundHover);}",".fo6hitd:enabled:active{background-color:var(--colorSubtleBackgroundPressed);}",".fdrzuqr{cursor:not-allowed;}",".fato7r6 .fui-Tab__icon{color:var(--colorNeutralForegroundDisabled);}",".fao1bnu .fui-Tab__content{color:var(--colorNeutralForegroundDisabled);}",".f1cadz5z .fui-Tab__icon{color:var(--colorCompoundBrandForeground1);}",".fwhdxxj:enabled:hover .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Hover);}",".fintccb:enabled:active .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Pressed);}",".ffplhdr .fui-Tab__content{color:var(--colorNeutralForeground1);}",".fjo17wb:enabled:hover .fui-Tab__content{color:var(--colorNeutralForeground1Hover);}",".f148789c:enabled:active .fui-Tab__content{color:var(--colorNeutralForeground1Pressed);}"]}),qv=ye({base:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"f44lkw9",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"fp7rvkm",Bptxc3x:"ftorr8m",cl4aha:"f16lqpmv"},small:{Dbcxam:0,rjzwhg:0,Bblux5w:"fzklhed"},medium:{Dbcxam:0,rjzwhg:0,Bblux5w:"f1j721cc"},large:{Dbcxam:0,rjzwhg:0,Bblux5w:"frx9knr"},subtle:{De3pzq:"fhovq9v",sj55zd:"fkfq4zb",B95qlz1:"f1bifk9c",Eo63ln:0,r9osk6:0,Itrz8y:0,zeg6vx:0,l65xgk:0,Bw4olcx:0,Folb0i:0,I2h8y4:0,Bgxgoyi:0,Bvlkotb:0,Fwyncl:0,Byh5edv:0,Becqvjq:0,uumbiq:0,B73q3dg:0,Bblwbaf:0,B0ezav:"ft57sj0",r4wkhp:"f1fcoy83",B7xitij:"fo6hitd",d3wsvi:0,Hdqn7s:0,zu5y1p:0,owqphb:0,g9c53k:0,Btmu08z:0,Bthxvy6:0,gluvuq:0,tb88gp:0,wns6jk:0,kdfdk4:0,Bbw008l:0,Bayi1ib:0,B1kkfu3:0,J1oqyp:0,kem6az:0,goa3yj:"fhn220o",p743kt:"f15qf7sh",uu68id:0,Bxeuatn:0,felo30:0,Bc736ss:0,Bhz882k:0,n51gp8:0,Eshu5l:0,Bk6ri7n:0,v49c4f:0,Bn1d65q:0,c4eypz:0,v3aym:0,hft9gk:0,Bjwas2f:0,Bk5ld8o:0,gwxt9v:0,B6k8go:"f130w16x"},subtleSelected:{De3pzq:"f16xkysk",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f1c2pc3t",sj55zd:"faj9fo0",B95qlz1:"fsm7zmf",Eo63ln:0,r9osk6:0,Itrz8y:0,zeg6vx:0,l65xgk:0,Bw4olcx:0,Folb0i:0,I2h8y4:0,Bgxgoyi:0,Bvlkotb:0,Fwyncl:0,Byh5edv:0,Becqvjq:0,uumbiq:0,B73q3dg:0,Bblwbaf:0,B0ezav:"f1wo0sfq",r4wkhp:"f1afuynh",B7xitij:"f94ddyl",d3wsvi:0,Hdqn7s:0,zu5y1p:0,owqphb:0,g9c53k:0,Btmu08z:0,Bthxvy6:0,gluvuq:0,tb88gp:0,wns6jk:0,kdfdk4:0,Bbw008l:0,Bayi1ib:0,B1kkfu3:0,J1oqyp:0,kem6az:0,goa3yj:"fmle6oo",p743kt:"f1d3itm4",uu68id:0,Bxeuatn:0,felo30:0,Bc736ss:0,Bhz882k:0,n51gp8:0,Eshu5l:0,Bk6ri7n:0,v49c4f:0,Bn1d65q:0,c4eypz:0,v3aym:0,hft9gk:0,Bjwas2f:0,Bk5ld8o:0,gwxt9v:0,B6k8go:"f19qjb1h"},subtleDisabled:{De3pzq:"fhovq9v",sj55zd:"f1s2aq7o"},subtleDisabledSelected:{De3pzq:"f1bg9a2p",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"fegtqic",sj55zd:"f1s2aq7o"},filled:{De3pzq:"f16xq7d1",sj55zd:"fkfq4zb",B95qlz1:"fwwxidx",r4wkhp:"f1fcoy83",B7xitij:"f14i52sd",p743kt:"f15qf7sh",Bw5j0gk:"f159yq2d",Baikq8m:"ful0ncq",B2ndh17:"f2rulcp",w0x64w:"f19p5z4e",Bdzpij4:"fo1bcu3"},filledSelected:{De3pzq:"ffp7eso",sj55zd:"f1phragk",B95qlz1:"f1lm9dni",r4wkhp:"f1mn5ei1",B7xitij:"f1g6ncd0",p743kt:"fl71aob",bml8oc:"f13s88zn",qew46a:"f16zjd40",B84x17g:"f1mr3uue",Jetwu1:"f196ywdt"},filledDisabled:{De3pzq:"f1bg9a2p",sj55zd:"f1s2aq7o"},filledDisabledSelected:{De3pzq:"f1bg9a2p",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"fegtqic",sj55zd:"f1s2aq7o"}},{d:[[".f44lkw9{border-radius:var(--borderRadiusCircular);}",{p:-1}],[".fp7rvkm{border:solid var(--strokeWidthThin) var(--colorTransparentStroke);}",{p:-2}],".ftorr8m .fui-Tab__icon{color:inherit;}",".f16lqpmv .fui-Tab__content{color:inherit;}",[".fzklhed{padding-block:calc(var(--spacingVerticalXXS) - var(--strokeWidthThin));}",{p:-1}],[".f1j721cc{padding-block:calc(var(--spacingVerticalSNudge) - var(--strokeWidthThin));}",{p:-1}],[".frx9knr{padding-block:calc(var(--spacingVerticalS) - var(--strokeWidthThin));}",{p:-1}],".fhovq9v{background-color:var(--colorSubtleBackground);}",".fkfq4zb{color:var(--colorNeutralForeground2);}",".f1bifk9c:enabled:hover{background-color:var(--colorSubtleBackgroundHover);}",[".ft57sj0:enabled:hover{border:solid var(--strokeWidthThin) var(--colorNeutralStroke1Hover);}",{p:-2}],".f1fcoy83:enabled:hover{color:var(--colorNeutralForeground2Hover);}",".fo6hitd:enabled:active{background-color:var(--colorSubtleBackgroundPressed);}",[".fhn220o:enabled:active{border:solid var(--strokeWidthThin) var(--colorNeutralStroke1Pressed);}",{p:-2}],".f15qf7sh:enabled:active{color:var(--colorNeutralForeground2Pressed);}",".f16xkysk{background-color:var(--colorBrandBackground2);}",[".f1c2pc3t{border:solid var(--strokeWidthThin) var(--colorCompoundBrandStroke);}",{p:-2}],".faj9fo0{color:var(--colorBrandForeground2);}",".fsm7zmf:enabled:hover{background-color:var(--colorBrandBackground2Hover);}",[".f1wo0sfq:enabled:hover{border:solid var(--strokeWidthThin) var(--colorCompoundBrandStrokeHover);}",{p:-2}],".f1afuynh:enabled:hover{color:var(--colorBrandForeground2Hover);}",".f94ddyl:enabled:active{background-color:var(--colorBrandBackground2Pressed);}",[".fmle6oo:enabled:active{border:solid var(--strokeWidthThin) var(--colorCompoundBrandStrokePressed);}",{p:-2}],".f1d3itm4:enabled:active{color:var(--colorBrandForeground2Pressed);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}",[".fegtqic{border:solid var(--strokeWidthThin) var(--colorNeutralStrokeDisabled);}",{p:-2}],".f16xq7d1{background-color:var(--colorNeutralBackground3);}",".fwwxidx:enabled:hover{background-color:var(--colorNeutralBackground3Hover);}",".f14i52sd:enabled:active{background-color:var(--colorNeutralBackground3Pressed);}",".ffp7eso{background-color:var(--colorBrandBackground);}",".f1phragk{color:var(--colorNeutralForegroundOnBrand);}",".f1lm9dni:enabled:hover{background-color:var(--colorBrandBackgroundHover);}",".f1mn5ei1:enabled:hover{color:var(--colorNeutralForegroundOnBrand);}",".f1g6ncd0:enabled:active{background-color:var(--colorBrandBackgroundPressed);}",".fl71aob:enabled:active{color:var(--colorNeutralForegroundOnBrand);}",[".fegtqic{border:solid var(--strokeWidthThin) var(--colorNeutralStrokeDisabled);}",{p:-2}]],m:[["@media (forced-colors: active){.f130w16x{border:solid var(--strokeWidthThin) Canvas;}}",{p:-2,m:"(forced-colors: active)"}],["@media (forced-colors: active){.f19qjb1h{border:solid var(--strokeWidthThin) Highlight;}}",{p:-2,m:"(forced-colors: active)"}],["@media (forced-colors: active){.f159yq2d:enabled:hover{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.ful0ncq:enabled:hover{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f2rulcp:enabled:hover .fui-Tab__content{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f19p5z4e:enabled:hover .fui-Icon-filled{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fo1bcu3:enabled:hover .fui-Icon-regular{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f13s88zn:enabled{background-color:ButtonText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f16zjd40:enabled .fui-Tab__content{color:ButtonFace;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1mr3uue:enabled .fui-Tab__content{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f196ywdt:enabled .fui-Tab__icon{color:ButtonFace;}}",{m:"(forced-colors: active)"}]]}),Mv=ye({base:{B8q5s1w:"f8hki3x",Bci5o5g:["f1d2448m","ffh67wi"],n8qw10:"f1bjia2o",Bdrgwmp:["ffh67wi","f1d2448m"],Bn4voq9:"f1p7hgxw",Bfpq7zp:"f1way5bb",g9k6zt:"f9znhxp",j6ew2k:["fqa318h","fqa318h"],Bhxq17a:"f1vjpng2"},circular:{B8q5s1w:"f8hki3x",Bci5o5g:["f1d2448m","ffh67wi"],n8qw10:"f1bjia2o",Bdrgwmp:["ffh67wi","f1d2448m"],Bn4voq9:"f1p7hgxw",Bfpq7zp:"f1way5bb",g9k6zt:"f9znhxp",j6ew2k:["fzgyhws","fqxug60"],Bhxq17a:"f1vjpng2"}},{d:[".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",".f1p7hgxw[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);}",".f1way5bb[data-fui-focus-visible]{outline-color:transparent;}",".f9znhxp[data-fui-focus-visible]{outline-style:solid;}",".fqa318h[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2);}",".f1vjpng2[data-fui-focus-visible]{z-index:1;}",".fzgyhws[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2),0 0 0 var(--strokeWidthThin) var(--colorNeutralStrokeOnBrand) inset;}",".fqxug60[data-fui-focus-visible]{box-shadow:var(--shadow4),0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2),0 0 0 var(--strokeWidthThin) var(--colorNeutralStrokeOnBrand) inset;}"]}),Fv=ye({base:{az7l2e:"fhw179n",vqofr:0,Bv4n3vi:0,Bgqb9hq:0,B0uxbk8:0,Bf3jju6:"fg9j5n4",amg5m6:"f1kmhr4c",zkfqfm:"fl1ydde",Bkydozb:"f1y7maxz",Bka2azo:0,vzq8l0:0,csmgbd:0,Br4ovkg:0,aelrif:"fceyvr4",y36c18:"f16cxu0",B1ctymy:"f1nwgacf",Bgvrrv0:"f15ovonk",ddr6p5:"fvje46l"},disabled:{az7l2e:"f1ut20fw",Bkydozb:"fhrzcfn",Bgvrrv0:"f1v15rkt",ddr6p5:"f3nwrnk"},smallHorizontal:{lawp4y:"fchca7p",Baz25je:"f1r53b5e",Fbdkly:["f1s6rxz5","fo35v8s"],mdwyqc:["fo35v8s","f1s6rxz5"]},smallVertical:{lawp4y:"fze4zud",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"fdp32p8",Ccq8qp:"f1aij3q"},mediumHorizontal:{lawp4y:"fchca7p",Baz25je:"f1s2r9ax",Fbdkly:["f1o0nnkk","fxb7rol"],mdwyqc:["fxb7rol","f1o0nnkk"]},mediumVertical:{lawp4y:"f17jracn",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"f117lcb2",Ccq8qp:"f1aij3q"},largeHorizontal:{lawp4y:"fchca7p",Baz25je:"f1s2r9ax",Fbdkly:["f1o0nnkk","fxb7rol"],mdwyqc:["fxb7rol","f1o0nnkk"]},largeVertical:{lawp4y:"fel9d3z",Fbdkly:["f1fzr1x6","f1f351id"],Bciustq:"f6vqlre",Ccq8qp:"f1aij3q"}},{h:[".fhw179n:hover::before{background-color:var(--colorNeutralStroke1Hover);}",[".fg9j5n4:hover::before{border-radius:var(--borderRadiusCircular);}",{p:-1}],'.f1kmhr4c:hover::before{content:"";}',".fl1ydde:hover::before{position:absolute;}",".f1ut20fw:hover::before{background-color:var(--colorTransparentStroke);}"],a:[".f1y7maxz:active::before{background-color:var(--colorNeutralStroke1Pressed);}",[".fceyvr4:active::before{border-radius:var(--borderRadiusCircular);}",{p:-1}],'.f16cxu0:active::before{content:"";}',".f1nwgacf:active::before{position:absolute;}",".fhrzcfn:active::before{background-color:var(--colorTransparentStroke);}"],m:[["@media (forced-colors: active){.f15ovonk:hover::before{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fvje46l:active::before{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1v15rkt:hover::before{background-color:transparent;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f3nwrnk:active::before{background-color:transparent;}}",{m:"(forced-colors: active)"}]],d:[".fchca7p::before{bottom:0;}",".f1r53b5e::before{height:var(--strokeWidthThick);}",".f1s6rxz5::before{left:var(--spacingHorizontalSNudge);}",".fo35v8s::before{right:var(--spacingHorizontalSNudge);}",".fze4zud::before{bottom:var(--spacingVerticalXS);}",".f1fzr1x6::before{left:0;}",".f1f351id::before{right:0;}",".fdp32p8::before{top:var(--spacingVerticalXS);}",".f1aij3q::before{width:var(--strokeWidthThicker);}",".f1s2r9ax::before{height:var(--strokeWidthThicker);}",".f1o0nnkk::before{left:var(--spacingHorizontalM);}",".fxb7rol::before{right:var(--spacingHorizontalM);}",".f17jracn::before{bottom:var(--spacingVerticalS);}",".f117lcb2::before{top:var(--spacingVerticalS);}",".fel9d3z::before{bottom:var(--spacingVerticalMNudge);}",".f6vqlre::before{top:var(--spacingVerticalMNudge);}"]}),Dv=ye({base:{Bjyk6c5:"f1rp0jgh",d9w3h3:0,B3778ie:0,B4j8arr:0,Bl18szs:0,Blrzh8d:"f3b9emi",Bsft5z2:"f13zj6fq",E3zdtr:"f1mdlcz9"},selected:{Bjyk6c5:"f1ksivud",Bej4dhw:"f1476jrx",B7wqxwa:"f18q216b",f7digc:"fy7ktjt",Bvuzv5k:"f1033yux",k4sdgo:"fkh9b8o"},disabled:{Bjyk6c5:"f13lkzet"},smallHorizontal:{By385i5:"fo72kxq",Dlnsje:"f9bb2ob",Eqx8gd:["f1q70ajw","f18rbzdx"],B1piin3:["f18rbzdx","f1q70ajw"]},smallVertical:{By385i5:"fqbue9b",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"fk1klkt",a2br6o:"f1o25lip"},mediumHorizontal:{By385i5:"fo72kxq",Dlnsje:"f1vx7lu8",Eqx8gd:["fna7m5n","f1oxpfwv"],B1piin3:["f1oxpfwv","fna7m5n"]},mediumVertical:{By385i5:"fipylg0",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"fqchiol",a2br6o:"f1o25lip"},largeHorizontal:{By385i5:"fo72kxq",Dlnsje:"f1vx7lu8",Eqx8gd:["fna7m5n","f1oxpfwv"],B1piin3:["f1oxpfwv","fna7m5n"]},largeVertical:{By385i5:"f1w7dm5g",Eqx8gd:["f1n6gb5g","f15yvnhg"],bn5sak:"f1p6em4m",a2br6o:"f1o25lip"}},{d:[".f1rp0jgh::after{background-color:var(--colorTransparentStroke);}",[".f3b9emi::after{border-radius:var(--borderRadiusCircular);}",{p:-1}],'.f13zj6fq::after{content:"";}',".f1mdlcz9::after{position:absolute;}",".f1ksivud::after{background-color:var(--colorCompoundBrandStroke);}",".f1476jrx:enabled:hover::after{background-color:var(--colorCompoundBrandStrokeHover);}",".f18q216b:enabled:active::after{background-color:var(--colorCompoundBrandStrokePressed);}",".f13lkzet::after{background-color:var(--colorNeutralForegroundDisabled);}",".fo72kxq::after{bottom:0;}",".f9bb2ob::after{height:var(--strokeWidthThick);}",".f1q70ajw::after{left:var(--spacingHorizontalSNudge);}",".f18rbzdx::after{right:var(--spacingHorizontalSNudge);}",".fqbue9b::after{bottom:var(--spacingVerticalXS);}",".f1n6gb5g::after{left:0;}",".f15yvnhg::after{right:0;}",".fk1klkt::after{top:var(--spacingVerticalXS);}",".f1o25lip::after{width:var(--strokeWidthThicker);}",".f1vx7lu8::after{height:var(--strokeWidthThicker);}",".fna7m5n::after{left:var(--spacingHorizontalM);}",".f1oxpfwv::after{right:var(--spacingHorizontalM);}",".fipylg0::after{bottom:var(--spacingVerticalS);}",".fqchiol::after{top:var(--spacingVerticalS);}",".f1w7dm5g::after{bottom:var(--spacingVerticalMNudge);}",".f1p6em4m::after{top:var(--spacingVerticalMNudge);}"],m:[["@media (forced-colors: active){.fy7ktjt::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1033yux:enabled:hover::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fkh9b8o:enabled:active::after{background-color:ButtonText;}}",{m:"(forced-colors: active)"}]]}),Lv=ye({base:{Br312pm:"fwpfdsa",Ijaq50:"f16hsg94",Bt984gj:"f122n59",mc9l5x:"ftuwxu6",Brf1p80:"f4d9j23",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",D0sxk3:"f16u1re",t6yez3:"f8bsbmo"},small:{Be2twd7:"fe5j1ua",Bqenvij:"fjamq6b",a9b677:"f64fuq3"},medium:{Be2twd7:"fe5j1ua",Bqenvij:"fjamq6b",a9b677:"f64fuq3"},large:{Be2twd7:"f1rt2boy",Bqenvij:"frvgh55",a9b677:"fq4mcun"},selected:{D0sxk3:"fxoiby5",t6yez3:"f15q0o9g"}},{d:[".fwpfdsa{grid-column-start:1;}",".f16hsg94{grid-row-start:1;}",".f122n59{align-items:center;}",".ftuwxu6{display:inline-flex;}",".f4d9j23{justify-content:center;}",[".f1a3p1vp{overflow:hidden;}",{p:-1}],".f16u1re .fui-Icon-filled{display:none;}",".f8bsbmo .fui-Icon-regular{display:inline;}",".fe5j1ua{font-size:20px;}",".fjamq6b{height:20px;}",".f64fuq3{width:20px;}",".f1rt2boy{font-size:24px;}",".frvgh55{height:24px;}",".fq4mcun{width:24px;}",".fxoiby5 .fui-Icon-filled{display:inline;}",".f15q0o9g .fui-Icon-regular{display:none;}"]}),Hv=ye({base:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1bwptpd"},selected:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"fl43uef",Bg96gwp:"f1i3iumi"},large:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k"},largeSelected:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},noIconBefore:{Br312pm:"fwpfdsa",Ijaq50:"f16hsg94"},iconBefore:{Br312pm:"fd46tj4",Ijaq50:"f16hsg94"},placeholder:{Bcdw1i0:"fd7fpy0"}},{d:[".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",[".f1a3p1vp{overflow:hidden;}",{p:-1}],[".f1bwptpd{padding:var(--spacingVerticalNone) var(--spacingHorizontalXXS);}",{p:-1}],".fl43uef{font-weight:var(--fontWeightSemibold);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",".fwpfdsa{grid-column-start:1;}",".f16hsg94{grid-row-start:1;}",".fd46tj4{grid-column-start:2;}",".fd7fpy0{visibility:hidden;}"]}),Uv=e=>{const t=zv(),r=Fv(),n=Dv(),{appearance:i,disabled:a,selected:s,size:c,vertical:l}=e,d=["fui-Tab",t.root];return"subtle-circular"!==i&&"filled-circular"!==i&&d.push(r.base,"small"===c&&(l?r.smallVertical:r.smallHorizontal),"medium"===c&&(l?r.mediumVertical:r.mediumHorizontal),"large"===c&&(l?r.largeVertical:r.largeHorizontal),a&&r.disabled,s&&n.base,s&&!a&&n.selected,s&&"small"===c&&(l?n.smallVertical:n.smallHorizontal),s&&"medium"===c&&(l?n.mediumVertical:n.mediumHorizontal),s&&"large"===c&&(l?n.largeVertical:n.largeHorizontal),s&&a&&n.disabled),e.root.className=Z(...d,e.root.className),(e=>{const{disabled:t,selected:r,vertical:n}=e,i=jv(),[a,s]=o.useState(),[c,l]=o.useState({offset:0,scale:1}),d=xv(e=>e.getRegisteredTabs),[u]=function(){const{targetDocument:e}=et(),t=null==e?void 0:e.defaultView;return Ev(t?t.requestAnimationFrame:Av,t?t.cancelAnimationFrame:Bv)}();if(r){const{previousSelectedValue:e,selectedValue:t,registeredTabs:r}=d();if(Nv(e)&&a!==e){const o=Pv(r,e),i=Pv(r,t);if(i&&o){const t=n?o.y-i.y:o.x-i.x,r=n?o.height/i.height:o.width/i.width;l({offset:t,scale:r}),s(e),u(()=>l({offset:0,scale:1}))}}}else Nv(a)&&s(void 0);if(t)return e;const f=0===c.offset&&1===c.scale;e.root.className=Z(e.root.className,r&&i.base,r&&f&&i.animated,r&&(n?i.vertical:i.horizontal));const h={[Ov]:`${c.offset}px`,[Rv]:`${c.scale}`};e.root.style={...h,...e.root.style}})(e),e},Wv=o.forwardRef((e,t)=>{const r=((e,t)=>{const{content:r,disabled:n=!1,icon:i,onClick:a,onFocus:s,value:c}=e,l=xv(e=>e.appearance),d=xv(e=>e.reserveSelectedTabSpace),u=xv(e=>e.selectTabOnFocus),f=xv(e=>e.disabled),h=xv(e=>e.selectedValue===c),p=xv(e=>e.onRegister),g=xv(e=>e.onUnregister),m=xv(e=>e.onSelect),v=xv(e=>e.size),b=xv(e=>!!e.vertical),y=f||n,w=o.useRef(null),k=e=>m(e,{value:c}),C=F(_v(a,k)),T=F(_v(s,k)),x=gv({focusable:{isDefault:h}});o.useEffect(()=>(p({value:c,ref:w}),()=>{g({value:c,ref:w})}),[p,g,w,c]);const S=z(i,{elementType:"span"}),I=N(r,{defaultProps:{children:e.children},elementType:"span"}),_=r&&"object"==typeof r?function(e,t){const r={};for(const o in e)-1===t.indexOf(o)&&e.hasOwnProperty(o)&&(r[o]=e[o]);return r}(r,["ref"]):r,E=Boolean((null==S?void 0:S.children)&&!I.children);return{components:{root:"button",icon:"span",content:"span",contentReservedSpace:"span"},root:N(qe("button",{ref:D(t,w),role:"tab",type:"button","aria-selected":y?void 0:`${h}`,...x,...e,disabled:y,onClick:C,onFocus:u?T:s}),{elementType:"button"}),icon:S,iconOnly:E,content:I,contentReservedSpace:z(_,{renderByDefault:!h&&!E&&d,defaultProps:{children:e.children},elementType:"span"}),appearance:l,disabled:y,selected:h,size:v,value:c,vertical:b}})(e,t);return(e=>{Uv(e),((e,t)=>{const r=zv(),o=Mv(),n=qv(),{appearance:i,disabled:a,selected:s,size:c,vertical:l}=e,d="subtle-circular"===i,u="filled-circular"===i,f=d||u,h=[n.base,o.circular,"small"===c&&n.small,"medium"===c&&n.medium,"large"===c&&n.large,d&&n.subtle,s&&d&&n.subtleSelected,a&&d&&n.subtleDisabled,s&&a&&d&&n.subtleDisabledSelected,u&&n.filled,s&&u&&n.filledSelected,a&&u&&n.filledDisabled,s&&a&&u&&n.filledDisabledSelected],p=[o.base,!a&&"subtle"===i&&r.subtle,!a&&"transparent"===i&&r.transparent,!a&&s&&r.selected,a&&r.disabled];t.className=Z(r.button,l?r.vertical:r.horizontal,"small"===c&&(l?r.smallVertical:r.smallHorizontal),"medium"===c&&(l?r.mediumVertical:r.mediumHorizontal),"large"===c&&(l?r.largeVertical:r.largeHorizontal),...f?h:p,a&&r.disabledCursor,t.className)})(e,e.root),(e=>{const t=Lv(),r=Hv(),{selected:o,size:n}=e;e.icon&&(e.icon.className=Z("fui-Tab__icon",t.base,t[n],o&&t.selected,e.icon.className)),e.contentReservedSpace&&(e.contentReservedSpace.className=Z("fui-Tab__content--reserved-space",r.base,"large"===n?r.largeSelected:r.selected,e.icon?r.iconBefore:r.noIconBefore,r.placeholder,e.content.className),e.contentReservedSpaceClassName=e.contentReservedSpace.className),e.content.className=Z("fui-Tab__content",r.base,"large"===n&&r.large,o&&("large"===n?r.largeSelected:r.selected),e.icon?r.iconBefore:r.noIconBefore,e.content.className)})(e)})(r),Je("useTabStyles_unstable")(r),(e=>We(e.root,{children:[e.icon&&Ue(e.icon,{}),!e.iconOnly&&Ue(e.content,{}),e.contentReservedSpace&&Ue(e.contentReservedSpace,{})]}))(r)});Wv.displayName="Tab";const Vv=o.createContext(void 0);Vv.Provider;const $v=Ce("ImageRegular","1em",["M14 7.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm-1 0a.5.5 0 1 0-1 0 .5.5 0 0 0 1 0ZM3 6a3 3 0 0 1 3-3h8a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V6Zm3-2a2 2 0 0 0-2 2v8c0 .37.1.72.28 1.02l4.67-4.59a1.5 1.5 0 0 1 2.1 0l4.67 4.59c.18-.3.28-.65.28-1.02V6a2 2 0 0 0-2-2H6Zm0 12h8a2 2 0 0 0 1.01-.27l-4.66-4.58a.5.5 0 0 0-.7 0l-4.66 4.58A2 2 0 0 0 6 16Z"]),Kv=Ce("InfoFilled","1em",["M18 10a8 8 0 1 0-16 0 8 8 0 0 0 16 0ZM9.5 8.91a.5.5 0 0 1 1 0V13.6a.5.5 0 0 1-1 0V8.9Zm-.25-2.16a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0Z"]),Gv=Ce("LinkRegular","1em",["M8 6a.5.5 0 0 1 .09 1H6a3 3 0 0 0-.2 6H8a.5.5 0 0 1 .09 1H6a4 4 0 0 1-.22-8H8Zm6 0a4 4 0 0 1 .22 8H12a.5.5 0 0 1-.09-1H14a3 3 0 0 0 .2-6H12a.5.5 0 0 1-.09-1H14ZM6 9.5h8a.5.5 0 0 1 .09 1H6a.5.5 0 0 1-.09-1H14 6Z"]),Jv=Ce("WarningFilled","1em",["M8.68 2.79a1.5 1.5 0 0 1 2.64 0l6.5 12A1.5 1.5 0 0 1 16.5 17h-13a1.5 1.5 0 0 1-1.32-2.21l6.5-12ZM10.5 7.5a.5.5 0 0 0-1 0v4a.5.5 0 0 0 1 0v-4Zm.25 6.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"]);function Qv(e){switch(e){case"info":return o.createElement(Kv,null);case"warning":return o.createElement(Jv,null);case"error":return o.createElement(Be,null);case"success":return o.createElement(xe,null);default:return null}}function Xv(e,t){var r;const o=e;var n;return Boolean((null==o||null===(r=o.ownerDocument)||void 0===r?void 0:r.defaultView)&&o instanceof o.ownerDocument.defaultView[null!==(n=null==t?void 0:t.constructorName)&&void 0!==n?n:"HTMLElement"])}const Yv=o.createContext(void 0),Zv={className:"",nodeRef:o.createRef()},eb=(Yv.Provider,(e,t)=>{const{layout:r="auto",intent:n="info",politeness:i,shape:a="rounded"}=e,s=(null!=i?i:"info"===n)?"polite":"assertive",c="auto"===r,{ref:l,reflowing:d}=function(e=!1){const{targetDocument:t}=et(),r=o.useReducer(()=>({}),{})[1],n=o.useRef(!1),i=o.useRef(null),a=o.useRef(-1),s=o.useCallback(e=>{var t,o;const i=e[0];var s;const c=null!==(s=null==i||null===(o=i.borderBoxSize)||void 0===o||null===(t=o[0])||void 0===t?void 0:t.inlineSize)&&void 0!==s?s:null==i?void 0:i.target.getBoundingClientRect().width;if(void 0===c||!i)return;const{target:l}=i;if(!Xv(l))return;let d;n.current?a.current{var o;if(!e||!r||!(null==t?void 0:t.defaultView))return;null===(o=i.current)||void 0===o||o.disconnect();const n=new t.defaultView.ResizeObserver(s);i.current=n,n.observe(r,{box:"border-box"})},[t,s,e]);return o.useEffect(()=>()=>{var e;null===(e=i.current)||void 0===e||e.disconnect()},[]),{ref:c,reflowing:n.current}}(c),u=c?d?"multiline":"singleline":r,{className:f,nodeRef:h}=null!==(p=o.useContext(Yv))&&void 0!==p?p:Zv;var p;const g=o.useRef(null),m=o.useRef(null),{announce:v}=function(){var e;return null!==(e=o.useContext(Vv))&&void 0!==e?e:{announce:()=>{}}}(),b=O();return o.useEffect(()=>{var e,t;const r=[null===(e=m.current)||void 0===e?void 0:e.textContent,null===(t=g.current)||void 0===t?void 0:t.textContent].filter(Boolean).join(",");v(r,{polite:"polite"===s,alert:"assertive"===s})},[m,g,v,s]),{components:{root:"div",icon:"div",bottomReflowSpacer:"div"},root:N(qe("div",{ref:D(t,l,h),role:"group","aria-labelledby":b,...e}),{elementType:"div"}),icon:z(e.icon,{renderByDefault:!0,elementType:"div",defaultProps:{children:Qv(n)}}),bottomReflowSpacer:z(e.bottomReflowSpacer,{renderByDefault:"multiline"===u,elementType:"div"}),layout:u,intent:n,transitionClassName:f,actionsRef:g,bodyRef:m,titleId:b,shape:a}}),tb=o.createContext(void 0),rb=(o.createRef(),o.createRef(),tb.Provider),ob=vt("r2oyxsj","r1wuyrhw",['.r2oyxsj{white-space:nowrap;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:1fr;grid-template-areas:"icon body secondaryActions actions";padding-left:var(--spacingHorizontalM);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);align-items:center;min-height:36px;box-sizing:border-box;background-color:var(--colorNeutralBackground3);}','.r1wuyrhw{white-space:nowrap;display:grid;grid-template-columns:auto 1fr auto auto;grid-template-rows:1fr;grid-template-areas:"icon body secondaryActions actions";padding-right:var(--spacingHorizontalM);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);align-items:center;min-height:36px;box-sizing:border-box;background-color:var(--colorNeutralBackground3);}']),nb=vt("r1df1z33","rivnfjc",[".r1df1z33{grid-area:icon;font-size:var(--fontSizeBase500);margin-right:var(--spacingHorizontalS);color:var(--colorNeutralForeground3);display:flex;align-items:center;}",".rivnfjc{grid-area:icon;font-size:var(--fontSizeBase500);margin-left:var(--spacingHorizontalS);color:var(--colorNeutralForeground3);display:flex;align-items:center;}"]),ib=vt("r1vx593n",null,[".r1vx593n{margin-bottom:var(--spacingVerticalS);grid-area:secondaryActions;}"]),ab=ye({rootMultiline:{Huce71:"f6juhto",Bt984gj:"f1s2louj",z8tnut:"f1ngh7ph",Budl1dq:"f17g0uqy",zoa1oz:"f1w7oly7"},secondaryActionsMultiline:{Brf1p80:"f1e8xxv9",B6of3ja:"f1gaxbfw",jrapky:"fqcjy3b",t21cq0:["fibjyge","f9yszdx"]},square:{Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"fokr779"}},{d:[".f6juhto{white-space:normal;}",".f1s2louj{align-items:start;}",".f1ngh7ph{padding-top:var(--spacingVerticalMNudge);}",".f17g0uqy{grid-template-columns:auto 1fr auto;}",'.f1w7oly7{grid-template-areas:"icon body actions" "secondaryActions secondaryActions secondaryActions";}',".f1e8xxv9{justify-content:end;}",".f1gaxbfw{margin-top:var(--spacingVerticalMNudge);}",".fqcjy3b{margin-bottom:var(--spacingVerticalS);}",".fibjyge{margin-right:0px;}",".f9yszdx{margin-left:0px;}",[".fokr779{border-radius:0;}",{p:-1}]]}),sb=ye({info:{},error:{sj55zd:"f1ca9wz"},warning:{sj55zd:"f14a4cve"},success:{sj55zd:"f36rra6"}},{d:[".f1ca9wz{color:var(--colorStatusDangerForeground1);}",".f14a4cve{color:var(--colorStatusWarningForeground3);}",".f36rra6{color:var(--colorStatusSuccessForeground1);}"]}),cb=ye({info:{},error:{De3pzq:"f1eon7jj",g2u3we:"f1f8dvr7",h3c5rm:["f1g1ijmo","f1nxacbt"],B9xav0g:"fo25q1j",zhjwy3:["f1nxacbt","f1g1ijmo"]},warning:{De3pzq:"f13ftzij",g2u3we:"frd1ypx",h3c5rm:["f1gyjrma","f18qd5xz"],B9xav0g:"fqyqtrt",zhjwy3:["f18qd5xz","f1gyjrma"]},success:{De3pzq:"f64thcm",g2u3we:"f1b4u7v",h3c5rm:["f1nyd2b1","f70v3om"],B9xav0g:"fk173vo",zhjwy3:["f70v3om","f1nyd2b1"]}},{d:[".f1eon7jj{background-color:var(--colorStatusDangerBackground1);}",".f1f8dvr7{border-top-color:var(--colorStatusDangerBorder1);}",".f1g1ijmo{border-right-color:var(--colorStatusDangerBorder1);}",".f1nxacbt{border-left-color:var(--colorStatusDangerBorder1);}",".fo25q1j{border-bottom-color:var(--colorStatusDangerBorder1);}",".f13ftzij{background-color:var(--colorStatusWarningBackground1);}",".frd1ypx{border-top-color:var(--colorStatusWarningBorder1);}",".f1gyjrma{border-right-color:var(--colorStatusWarningBorder1);}",".f18qd5xz{border-left-color:var(--colorStatusWarningBorder1);}",".fqyqtrt{border-bottom-color:var(--colorStatusWarningBorder1);}",".f64thcm{background-color:var(--colorStatusSuccessBackground1);}",".f1b4u7v{border-top-color:var(--colorStatusSuccessBorder1);}",".f1nyd2b1{border-right-color:var(--colorStatusSuccessBorder1);}",".f70v3om{border-left-color:var(--colorStatusSuccessBorder1);}",".fk173vo{border-bottom-color:var(--colorStatusSuccessBorder1);}"]}),lb=o.forwardRef((e,t)=>{const r=eb(e,t);return(e=>{const t=ob(),r=nb(),o=sb(),n=cb(),i=ib(),a=ab();e.root.className=Z("fui-MessageBar",t,"multiline"===e.layout&&a.rootMultiline,"square"===e.shape&&a.square,n[e.intent],e.transitionClassName,e.root.className),e.icon&&(e.icon.className=Z("fui-MessageBar__icon",r,o[e.intent],e.icon.className)),e.bottomReflowSpacer&&(e.bottomReflowSpacer.className=Z("fui-MessageBar__bottomReflowSpacer",i))})(r),Je("useMessageBarStyles_unstable")(r),((e,t)=>Ue(rb,{value:t.messageBar,children:We(e.root,{children:[e.icon&&Ue(e.icon,{}),e.root.children,e.bottomReflowSpacer&&Ue(e.bottomReflowSpacer,{})]})}))(r,function(e){const{layout:t,actionsRef:r,bodyRef:n,titleId:i}=e;return{messageBar:o.useMemo(()=>({layout:t,actionsRef:r,bodyRef:n,titleId:i}),[t,r,n,i])}}(r))});lb.displayName="MessageBar";var db=r(64583).Promise;function ub(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return fb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?fb(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function fb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r3?(n=p===o)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((n=r<2&&ho||o>p)&&(i[4]=r,i[5]=o,f.n=p,s=0))}if(n||r>1)return a;throw u=!0,o}return function(n,d,p){if(l>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,p),s=d,c=p;(t=s<2?e:c)||!u;){i||(s?s<3?(s>1&&(f.n=-1),h(s,c)):f.n=c:f.v=c);try{if(l=2,i){if(s||(n="next"),t=i[n]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+n+"' method"),s=1);i=e}else if((t=(u=f.n<0)?c:r.call(o,f))!==a)break}catch(t){i=e,s=1,c=t}finally{l=1}}return{value:t,done:u}}}(r,n,i),!0),l}var a={};function s(){}function c(){}function l(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(pb(t={},o,function(){return this}),t),u=l.prototype=s.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,pb(e,n,"GeneratorFunction")),e.prototype=Object.create(u),e}return c.prototype=l,pb(u,"constructor",l),pb(l,"constructor",c),c.displayName="GeneratorFunction",pb(l,n,"GeneratorFunction"),pb(u),pb(u,n,"Generator"),pb(u,o,function(){return this}),pb(u,"toString",function(){return"[object Generator]"}),(hb=function(){return{w:i,m:f}})()}function pb(e,t,r,o){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}pb=function(e,t,r,o){function i(t,r){pb(e,t,function(e){return this._invoke(t,r,e)})}t?n?n(e,t,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},pb(e,t,r,o)}var gb,mb=function(e,t,r,o){return new(r||(r=db))(function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},vb="String {00020329-0000-0000-c000-000000000046} Name Archived",bb="de.fakturdigital.EMailArchiver";!function(e){e.New="New",e.Downloaded="Downloaded",e.Archived="Archived",e.Moved="Moved",e.Deleted="Deleted"}(gb||(gb={}));var yb=r(64583).Promise;function wb(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return kb(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kb(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,n=function(){};return{s:n,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function kb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r3?(n=p===o)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=h&&((n=r<2&&ho||o>p)&&(i[4]=r,i[5]=o,f.n=p,s=0))}if(n||r>1)return a;throw u=!0,o}return function(n,d,p){if(l>1)throw TypeError("Generator is already running");for(u&&1===d&&h(d,p),s=d,c=p;(t=s<2?e:c)||!u;){i||(s?s<3?(s>1&&(f.n=-1),h(s,c)):f.n=c:f.v=c);try{if(l=2,i){if(s||(n="next"),t=i[n]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+n+"' method"),s=1);i=e}else if((t=(u=f.n<0)?c:r.call(o,f))!==a)break}catch(t){i=e,s=1,c=t}finally{l=1}}return{value:t,done:u}}}(r,n,i),!0),l}var a={};function s(){}function c(){}function l(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(Tb(t={},o,function(){return this}),t),u=l.prototype=s.prototype=Object.create(d);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Tb(e,n,"GeneratorFunction")),e.prototype=Object.create(u),e}return c.prototype=l,Tb(u,"constructor",l),Tb(l,"constructor",c),c.displayName="GeneratorFunction",Tb(l,n,"GeneratorFunction"),Tb(u),Tb(u,n,"Generator"),Tb(u,o,function(){return this}),Tb(u,"toString",function(){return"[object Generator]"}),(Cb=function(){return{w:i,m:f}})()}function Tb(e,t,r,o){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}Tb=function(e,t,r,o){function i(t,r){Tb(e,t,function(e){return this._invoke(t,r,e)})}t?n?n(e,t,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},Tb(e,t,r,o)}var xb=function(e,t,r,o){return new(r||(r=yb))(function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})};const Sb={above:{position:"above",align:"center"},"above-start":{position:"above",align:"start"},"above-end":{position:"above",align:"end"},below:{position:"below",align:"center"},"below-start":{position:"below",align:"start"},"below-end":{position:"below",align:"end"},before:{position:"before",align:"center"},"before-top":{position:"before",align:"top"},"before-bottom":{position:"before",align:"bottom"},after:{position:"after",align:"center"},"after-top":{position:"after",align:"top"},"after-bottom":{position:"after",align:"bottom"}};function Ib(e){return null==e?{}:"string"==typeof e?Sb[e]:e}const _b=(e,t)=>{return"number"==typeof e?{mainAxis:e+t}:{...e,mainAxis:(null!==(r=e.mainAxis)&&void 0!==r?r:0)+t};var r},Eb="data-popper-is-intersecting",Ab="data-popper-escaped",Bb="data-popper-reference-hidden",Ob="fui-positioningend",Rb=["top","right","bottom","left"],jb=Math.min,Pb=Math.max,Nb=Math.round,zb=(Math.floor,e=>({x:e,y:e})),qb={left:"right",right:"left",bottom:"top",top:"bottom"},Mb={start:"end",end:"start"};function Fb(e,t,r){return Pb(e,jb(t,r))}function Db(e,t){return"function"==typeof e?e(t):e}function Lb(e){return e.split("-")[0]}function Hb(e){return e.split("-")[1]}function Ub(e){return"x"===e?"y":"x"}function Wb(e){return"y"===e?"height":"width"}const Vb=new Set(["top","bottom"]);function $b(e){return Vb.has(Lb(e))?"y":"x"}function Kb(e){return Ub($b(e))}function Gb(e){return e.replace(/start|end/g,e=>Mb[e])}const Jb=["left","right"],Qb=["right","left"],Xb=["top","bottom"],Yb=["bottom","top"];function Zb(e){return e.replace(/left|right|bottom|top/g,e=>qb[e])}function ey(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ty(e){const{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function ry(e,t,r){let{reference:o,floating:n}=e;const i=$b(t),a=Kb(t),s=Wb(a),c=Lb(t),l="y"===i,d=o.x+o.width/2-n.width/2,u=o.y+o.height/2-n.height/2,f=o[s]/2-n[s]/2;let h;switch(c){case"top":h={x:d,y:o.y-n.height};break;case"bottom":h={x:d,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-n.width,y:u};break;default:h={x:o.x,y:o.y}}switch(Hb(t)){case"start":h[a]-=f*(r&&l?-1:1);break;case"end":h[a]+=f*(r&&l?-1:1)}return h}async function oy(e,t){var r;void 0===t&&(t={});const{x:o,y:n,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=Db(t,e),p=ey(h),g=s[f?"floating"===u?"reference":"floating":u],m=ty(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(g)))||r?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:d,strategy:c})),v="floating"===u?{x:o,y:n,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=ty(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:c}):v);return{top:(m.top-w.top+p.top)/y.y,bottom:(w.bottom-m.bottom+p.bottom)/y.y,left:(m.left-w.left+p.left)/y.x,right:(w.right-m.right+p.right)/y.x}}function ny(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function iy(e){return Rb.some(t=>e[t]>=0)}const ay=new Set(["left","top"]);function sy(){return"undefined"!=typeof window}function cy(e){return uy(e)?(e.nodeName||"").toLowerCase():"#document"}function ly(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function dy(e){var t;return null==(t=(uy(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function uy(e){return!!sy()&&(e instanceof Node||e instanceof ly(e).Node)}function fy(e){return!!sy()&&(e instanceof Element||e instanceof ly(e).Element)}function hy(e){return!!sy()&&(e instanceof HTMLElement||e instanceof ly(e).HTMLElement)}function py(e){return!(!sy()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ly(e).ShadowRoot)}const gy=new Set(["inline","contents"]);function my(e){const{overflow:t,overflowX:r,overflowY:o,display:n}=Ey(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!gy.has(n)}const vy=new Set(["table","td","th"]);function by(e){return vy.has(cy(e))}const yy=[":popover-open",":modal"];function wy(e){return yy.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const ky=["transform","translate","scale","rotate","perspective"],Cy=["transform","translate","scale","rotate","perspective","filter"],Ty=["paint","layout","strict","content"];function xy(e){const t=Sy(),r=fy(e)?Ey(e):e;return ky.some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||Cy.some(e=>(r.willChange||"").includes(e))||Ty.some(e=>(r.contain||"").includes(e))}function Sy(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Iy=new Set(["html","body","#document"]);function _y(e){return Iy.has(cy(e))}function Ey(e){return ly(e).getComputedStyle(e)}function Ay(e){return fy(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function By(e){if("html"===cy(e))return e;const t=e.assignedSlot||e.parentNode||py(e)&&e.host||dy(e);return py(t)?t.host:t}function Oy(e){const t=By(e);return _y(t)?e.ownerDocument?e.ownerDocument.body:e.body:hy(t)&&my(t)?t:Oy(t)}function Ry(e,t,r){var o;void 0===t&&(t=[]),void 0===r&&(r=!0);const n=Oy(e),i=n===(null==(o=e.ownerDocument)?void 0:o.body),a=ly(n);if(i){const e=jy(a);return t.concat(a,a.visualViewport||[],my(n)?n:[],e&&r?Ry(e):[])}return t.concat(n,Ry(n,[],r))}function jy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Py(e){const t=Ey(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=hy(e),i=n?e.offsetWidth:r,a=n?e.offsetHeight:o,s=Nb(r)!==i||Nb(o)!==a;return s&&(r=i,o=a),{width:r,height:o,$:s}}function Ny(e){return fy(e)?e:e.contextElement}function zy(e){const t=Ny(e);if(!hy(t))return zb(1);const r=t.getBoundingClientRect(),{width:o,height:n,$:i}=Py(t);let a=(i?Nb(r.width):r.width)/o,s=(i?Nb(r.height):r.height)/n;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const qy=zb(0);function My(e){const t=ly(e);return Sy()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:qy}function Fy(e,t,r,o){void 0===t&&(t=!1),void 0===r&&(r=!1);const n=e.getBoundingClientRect(),i=Ny(e);let a=zb(1);t&&(o?fy(o)&&(a=zy(o)):a=zy(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==ly(e))&&t}(i,r,o)?My(i):zb(0);let c=(n.left+s.x)/a.x,l=(n.top+s.y)/a.y,d=n.width/a.x,u=n.height/a.y;if(i){const e=ly(i),t=o&&fy(o)?ly(o):o;let r=e,n=jy(r);for(;n&&o&&t!==r;){const e=zy(n),t=n.getBoundingClientRect(),o=Ey(n),i=t.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,a=t.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;c*=e.x,l*=e.y,d*=e.x,u*=e.y,c+=i,l+=a,r=ly(n),n=jy(r)}}return ty({width:d,height:u,x:c,y:l})}function Dy(e,t){const r=Ay(e).scrollLeft;return t?t.left+r:Fy(dy(e)).left+r}function Ly(e,t){const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-Dy(e,r),y:r.top+t.scrollTop}}const Hy=new Set(["absolute","fixed"]);function Uy(e,t,r){let o;if("viewport"===t)o=function(e,t){const r=ly(e),o=dy(e),n=r.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,c=0;if(n){i=n.width,a=n.height;const e=Sy();(!e||e&&"fixed"===t)&&(s=n.offsetLeft,c=n.offsetTop)}const l=Dy(o);if(l<=0){const e=o.ownerDocument,t=e.body,r=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,a=Math.abs(o.clientWidth-t.clientWidth-n);a<=25&&(i-=a)}else l<=25&&(i+=l);return{width:i,height:a,x:s,y:c}}(e,r);else if("document"===t)o=function(e){const t=dy(e),r=Ay(e),o=e.ownerDocument.body,n=Pb(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=Pb(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-r.scrollLeft+Dy(e);const s=-r.scrollTop;return"rtl"===Ey(o).direction&&(a+=Pb(t.clientWidth,o.clientWidth)-n),{width:n,height:i,x:a,y:s}}(dy(e));else if(fy(t))o=function(e,t){const r=Fy(e,!0,"fixed"===t),o=r.top+e.clientTop,n=r.left+e.clientLeft,i=hy(e)?zy(e):zb(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:n*i.x,y:o*i.y}}(t,r);else{const r=My(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return ty(o)}function Wy(e,t){const r=By(e);return!(r===t||!fy(r)||_y(r))&&("fixed"===Ey(r).position||Wy(r,t))}function Vy(e,t,r){const o=hy(t),n=dy(t),i="fixed"===r,a=Fy(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=zb(0);function l(){c.x=Dy(n)}if(o||!o&&!i)if(("body"!==cy(t)||my(n))&&(s=Ay(t)),o){const e=Fy(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else n&&l();i&&!o&&n&&l();const d=!n||o||i?zb(0):Ly(n,s);return{x:a.left+s.scrollLeft-c.x-d.x,y:a.top+s.scrollTop-c.y-d.y,width:a.width,height:a.height}}function $y(e){return"static"===Ey(e).position}function Ky(e,t){if(!hy(e)||"fixed"===Ey(e).position)return null;if(t)return t(e);let r=e.offsetParent;return dy(e)===r&&(r=r.ownerDocument.body),r}function Gy(e,t){const r=ly(e);if(wy(e))return r;if(!hy(e)){let t=By(e);for(;t&&!_y(t);){if(fy(t)&&!$y(t))return t;t=By(t)}return r}let o=Ky(e,t);for(;o&&by(o)&&$y(o);)o=Ky(o,t);return o&&_y(o)&&$y(o)&&!xy(o)?r:o||function(e){let t=By(e);for(;hy(t)&&!_y(t);){if(xy(t))return t;if(wy(t))return null;t=By(t)}return null}(e)||r}const Jy={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e;const i="fixed"===n,a=dy(o),s=!!t&&wy(t.floating);if(o===a||s&&i)return r;let c={scrollLeft:0,scrollTop:0},l=zb(1);const d=zb(0),u=hy(o);if((u||!u&&!i)&&(("body"!==cy(o)||my(a))&&(c=Ay(o)),hy(o))){const e=Fy(o);l=zy(o),d.x=e.x+o.clientLeft,d.y=e.y+o.clientTop}const f=!a||u||i?zb(0):Ly(a,c);return{width:r.width*l.x,height:r.height*l.y,x:r.x*l.x-c.scrollLeft*l.x+d.x+f.x,y:r.y*l.y-c.scrollTop*l.y+d.y+f.y}},getDocumentElement:dy,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e;const i="clippingAncestors"===r?wy(t)?[]:function(e,t){const r=t.get(e);if(r)return r;let o=Ry(e,[],!1).filter(e=>fy(e)&&"body"!==cy(e)),n=null;const i="fixed"===Ey(e).position;let a=i?By(e):e;for(;fy(a)&&!_y(a);){const t=Ey(a),r=xy(a);r||"fixed"!==t.position||(n=null),(i?!r&&!n:!r&&"static"===t.position&&n&&Hy.has(n.position)||my(a)&&!r&&Wy(e,a))?o=o.filter(e=>e!==a):n=t,a=By(a)}return t.set(e,o),o}(t,this._c):[].concat(r),a=[...i,o],s=a[0],c=a.reduce((e,r)=>{const o=Uy(t,r,n);return e.top=Pb(o.top,e.top),e.right=jb(o.right,e.right),e.bottom=jb(o.bottom,e.bottom),e.left=Pb(o.left,e.left),e},Uy(t,s,n));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:Gy,getElementRects:async function(e){const t=this.getOffsetParent||Gy,r=this.getDimensions,o=await r(e.floating);return{reference:Vy(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=Py(e);return{width:t,height:r}},getScale:zy,isElement:fy,isRTL:function(e){return"rtl"===Ey(e).direction}},Qy=oy,Xy=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:n,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...m}=Db(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const v=Lb(n),b=$b(s),y=Lb(s)===s,w=await(null==c.isRTL?void 0:c.isRTL(l.floating)),k=f||(y||!g?[Zb(s)]:function(e){const t=Zb(e);return[Gb(e),t,Gb(t)]}(s)),C="none"!==p;!f&&C&&k.push(...function(e,t,r,o){const n=Hb(e);let i=function(e,t,r){switch(e){case"top":case"bottom":return r?t?Qb:Jb:t?Jb:Qb;case"left":case"right":return t?Xb:Yb;default:return[]}}(Lb(e),"start"===r,o);return n&&(i=i.map(e=>e+"-"+n),t&&(i=i.concat(i.map(Gb)))),i}(s,g,p,w));const T=[s,...k],x=await oy(t,m),S=[];let I=(null==(o=i.flip)?void 0:o.overflows)||[];if(d&&S.push(x[v]),u){const e=function(e,t,r){void 0===r&&(r=!1);const o=Hb(e),n=Kb(e),i=Wb(n);let a="x"===n?o===(r?"end":"start")?"right":"left":"start"===o?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Zb(a)),[a,Zb(a)]}(n,a,w);S.push(x[e[0]],x[e[1]])}if(I=[...I,{placement:n,overflows:S}],!S.every(e=>e<=0)){var _,E;const e=((null==(_=i.flip)?void 0:_.index)||0)+1,t=T[e];if(t&&("alignment"!==u||b===$b(t)||I.every(e=>$b(e.placement)!==b||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let r=null==(E=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:E.placement;if(!r)switch(h){case"bestFit":{var A;const e=null==(A=I.filter(e=>{if(C){const t=$b(e.placement);return t===b||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:A[0];e&&(r=e);break}case"initialPlacement":r=s}if(n!==r)return{reset:{placement:r}}}return{}}}},Yy=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:o="referenceHidden",...n}=Db(e,t);switch(o){case"referenceHidden":{const e=ny(await oy(t,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:iy(e)}}}case"escaped":{const e=ny(await oy(t,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:iy(e)}}}default:return{}}}}},Zy=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:n,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:d=0}=Db(e,t)||{};if(null==l)return{};const u=ey(d),f={x:r,y:o},h=Kb(n),p=Wb(h),g=await a.getDimensions(l),m="y"===h,v=m?"top":"left",b=m?"bottom":"right",y=m?"clientHeight":"clientWidth",w=i.reference[p]+i.reference[h]-f[h]-i.floating[p],k=f[h]-i.reference[h],C=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let T=C?C[y]:0;T&&await(null==a.isElement?void 0:a.isElement(C))||(T=s.floating[y]||i.floating[p]);const x=w/2-k/2,S=T/2-g[p]/2-1,I=jb(u[v],S),_=jb(u[b],S),E=I,A=T-g[p]-_,B=T/2-g[p]/2+x,O=Fb(E,B,A),R=!c.arrow&&null!=Hb(n)&&B!==O&&i.reference[p]/2-(Br&&(h=r)}if(l){var v,b;const e="y"===f?"width":"height",t=ay.has(Lb(n)),r=i.reference[u]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[u])||0)+(t?0:m.crossAxis),o=i.reference[u]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[u])||0)-(t?m.crossAxis:0);po&&(p=o)}return{[f]:h,[u]:p}}}};var tw=r(64583).Promise;const rw=e=>{const t=e&&(e=>"HTML"===e.nodeName?e:e.parentNode||e.host)(e);if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}const{overflow:r,overflowX:o,overflowY:n}=(e=>{var t;if(1!==e.nodeType)return{};const r=null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;return r?r.getComputedStyle(e,null):{}})(t);return/(auto|scroll|overlay)/.test(r+n+o)?t:rw(t)};function ow(e){const t=[];let r=e;for(;r;){const o=rw(r);if(e.ownerDocument.body===o){t.push(o);break}if("BODY"===o.nodeName&&o!==e.ownerDocument.body)break;t.push(o),r=o}return t}function nw(e){let t=!1;const{container:r,target:o,arrow:n,strategy:i,middleware:a,placement:s,useTransform:c=!0,disableUpdateOnResize:l=!1}=e,d=r.ownerDocument.defaultView;if(!o||!r||!d)return{updatePosition:()=>{},dispose:()=>{}};const u=l?null:function(e){return new e.ResizeObserver(e=>{e.every(e=>e.contentRect.width>0&&e.contentRect.height>0)&&g()})}(d);let f=!0;const h=new Set;Object.assign(r.style,{position:"fixed",left:0,top:0,margin:0});const p=()=>{t||(f&&(ow(r).forEach(e=>h.add(e)),Xv(o)&&ow(o).forEach(e=>h.add(e)),h.forEach(e=>{e.addEventListener("scroll",g,{passive:!0})}),null==u||u.observe(r),Xv(o)&&(null==u||u.observe(o)),f=!1),Object.assign(r.style,{position:i}),((e,t,r)=>{const o=new Map,n={platform:Jy,...r},i={...n.platform,_c:o};return(async(e,t,r)=>{const{placement:o="bottom",strategy:n="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:n}),{x:d,y:u}=ry(l,o,c),f=o,h={},p=0;for(let r=0;r{t||(function(e){const{arrow:t,middlewareData:r}=e;if(!r.arrow||!t)return;const{x:o,y:n}=r.arrow;Object.assign(t.style,{left:null!=o?`${o}px`:"",top:null!=n?`${n}px`:""})}({arrow:n,middlewareData:a}),function(e){var t,r,o;const{container:n,placement:i,middlewareData:a,strategy:s,lowPPI:c,coordinates:l,useTransform:d=!0}=e;if(!n)return;n.setAttribute("data-popper-placement",i),n.removeAttribute(Eb),a.intersectionObserver.intersecting&&n.setAttribute(Eb,""),n.removeAttribute(Ab),(null===(t=a.hide)||void 0===t?void 0:t.escaped)&&n.setAttribute(Ab,""),n.removeAttribute(Bb),(null===(r=a.hide)||void 0===r?void 0:r.referenceHidden)&&n.setAttribute(Bb,"");const u=(null===(o=n.ownerDocument.defaultView)||void 0===o?void 0:o.devicePixelRatio)||1,f=Math.round(l.x*u)/u,h=Math.round(l.y*u)/u;Object.assign(n.style,{position:s}),d?Object.assign(n.style,{transform:c?`translate(${f}px, ${h}px)`:`translate3d(${f}px, ${h}px, 0)`}):Object.assign(n.style,{left:`${f}px`,top:`${h}px`})}({container:r,middlewareData:a,placement:s,coordinates:{x:e,y:o},lowPPI:((null==d?void 0:d.devicePixelRatio)||1)<=1,strategy:i,useTransform:c}),r.dispatchEvent(new CustomEvent(Ob)))}).catch(e=>{}))},g=function(){let e;return()=>(e||(e=new tw(t=>{tw.resolve().then(()=>{e=void 0,t(p())})})),e)}();return d&&(d.addEventListener("scroll",g,{passive:!0}),d.addEventListener("resize",g)),g(),{updatePosition:g,dispose:()=>{t=!0,d&&(d.removeEventListener("scroll",g),d.removeEventListener("resize",g)),h.forEach(e=>{e.removeEventListener("scroll",g)}),h.clear(),null==u||u.disconnect()}}}function iw(e,t){if("window"===t)return null==e?void 0:e.ownerDocument.documentElement;if("clippingParents"===t)return"clippingAncestors";if("scrollParent"===t){let t=rw(e);return"BODY"===t.nodeName&&(t=null==e?void 0:e.ownerDocument.documentElement),t}return t}function aw(e,t){if("number"==typeof e)return e;const{start:r,end:o,...n}=e,i=n,a=t?"end":"start",s=t?"start":"end";return e[a]&&(i.left=e[a]),e[s]&&(i.right=e[s]),i}const sw=e=>({name:"resetMaxSize",fn({middlewareData:t,elements:r}){var o;if(null===(o=t.resetMaxSize)||void 0===o?void 0:o.maxSizeAlreadyReset)return{};const{applyMaxWidth:n,applyMaxHeight:i}=e;return n&&(r.floating.style.removeProperty("box-sizing"),r.floating.style.removeProperty("max-width"),r.floating.style.removeProperty("width")),i&&(r.floating.style.removeProperty("box-sizing"),r.floating.style.removeProperty("max-height"),r.floating.style.removeProperty("height")),{data:{maxSizeAlreadyReset:!0},reset:{rects:!0}}}});function cw(e,t){const{container:r,overflowBoundary:o,overflowBoundaryPadding:n,isRtl:i}=t;return function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var r,o;const{placement:n,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...l}=Db(e,t),d=await oy(t,l),u=Lb(n),f=Hb(n),h="y"===$b(n),{width:p,height:g}=i.floating;let m,v;"top"===u||"bottom"===u?(m=u,v=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,m="end"===f?"top":"bottom");const b=g-d.top-d.bottom,y=p-d.left-d.right,w=jb(g-d[m],b),k=jb(p-d[v],y),C=!t.middlewareData.shift;let T=w,x=k;if(null!=(r=t.middlewareData.shift)&&r.enabled.x&&(x=y),null!=(o=t.middlewareData.shift)&&o.enabled.y&&(T=b),C&&!f){const e=Pb(d.left,0),t=Pb(d.right,0),r=Pb(d.top,0),o=Pb(d.bottom,0);h?x=p-2*(0!==e||0!==t?e+t:Pb(d.left,d.right)):T=g-2*(0!==r||0!==o?r+o:Pb(d.top,d.bottom))}await c({...t,availableWidth:x,availableHeight:T});const S=await a.getDimensions(s.floating);return p!==S.width||g!==S.height?{reset:{rects:!0}}:{}}}}({...n&&{padding:aw(n,i)},...o&&{altBoundary:!0,boundary:iw(r,o)},apply({availableHeight:t,availableWidth:r,elements:o,rects:n}){const i=(e,t,r)=>{if(e&&(o.floating.style.setProperty("box-sizing","border-box"),o.floating.style.setProperty(`max-${t}`,`${r}px`),n.floating[t]>r)){o.floating.style.setProperty(t,`${r}px`);const e="width"===t?"x":"y";o.floating.style.getPropertyValue(`overflow-${e}`)||o.floating.style.setProperty(`overflow-${e}`,"auto")}},{applyMaxWidth:a,applyMaxHeight:s}=e;i(a,"width",r),i(s,"height",t)}})}const lw="--fui-match-target-size";function dw(e){const t=e.split("-");return{side:t[0],alignment:t[1]}}function uw(e){const t=(r=e)?"number"==typeof r||"object"==typeof r?r:({rects:{floating:e,reference:t},placement:o})=>{const{position:n,alignment:i}=(e=>{const{side:t,alignment:r}=dw(e),o={top:"above",bottom:"below",right:"after",left:"before"}[t],n=r&&(e=>"above"===e||"below"===e?{start:"start",end:"end"}:{start:"top",end:"bottom"})(o)[r];return{position:o,alignment:n}})(o);return r({positionedRect:e,targetRect:t,position:n,alignment:i})}:r;var r,o;return void 0===(o=t)&&(o=0),{name:"offset",options:o,async fn(e){var t,r;const{x:n,y:i,placement:a,middlewareData:s}=e,c=await async function(e,t){const{placement:r,platform:o,elements:n}=e,i=await(null==o.isRTL?void 0:o.isRTL(n.floating)),a=Lb(r),s=Hb(r),c="y"===$b(r),l=ay.has(a)?-1:1,d=i&&c?-1:1,u=Db(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),c?{x:h*d,y:f*l}:{x:f*l,y:h*d}}(e,o);return a===(null==(t=s.offset)?void 0:t.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:n+c.x,y:i+c.y,data:{...c,placement:a}}}}}const fw=(e,t,r)=>{const o=((e,t)=>{const r="above"===e||"below"===e,o="top"===t||"bottom"===t;return r&&o||!r&&!o})(t,e)?"center":e,n=t&&(e=>({above:"top",below:"bottom",before:e?"right":"left",after:e?"left":"right"}))(r)[t],i=o&&{start:"start",end:"end",top:"start",bottom:"end",center:void 0}[o];return n&&i?`${n}-${i}`:n};function hw(e){const{hasScrollableElement:t,flipBoundary:r,container:o,fallbackPositions:n=[],isRtl:i}=e,a=n.reduce((e,t)=>{const{position:r,align:o}=Ib(t),n=fw(o,r,i);return n&&e.push(n),e},[]);return Xy({...t&&{boundary:"clippingAncestors"},...r&&{altBoundary:!0,boundary:iw(o,r)},fallbackStrategy:"bestFit",...a.length&&{fallbackPlacements:a}})}function pw(e){const{hasScrollableElement:t,shiftToCoverTarget:r,disableTether:o,overflowBoundary:n,container:i,overflowBoundaryPadding:a,isRtl:s}=e;return function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:n}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...c}=Db(e,t),l={x:r,y:o},d=await oy(t,c),u=$b(Lb(n)),f=Ub(u);let h=l[f],p=l[u];if(i){const e="y"===f?"bottom":"right";h=Fb(h+d["y"===f?"top":"left"],h,h-d[e])}if(a){const e="y"===u?"bottom":"right";p=Fb(p+d["y"===u?"top":"left"],p,p-d[e])}const g=s.fn({...t,[f]:h,[u]:p});return{...g,data:{x:g.x-r,y:g.y-o,enabled:{[f]:i,[u]:a}}}}}}({...t&&{boundary:"clippingAncestors"},...r&&{crossAxis:!0,limiter:ew({crossAxis:!0,mainAxis:!1})},...o&&{crossAxis:"all"===o,limiter:ew({crossAxis:"all"!==o,mainAxis:!1})},...a&&{padding:aw(a,s)},...n&&{altBoundary:!0,boundary:iw(i,n)}})}const gw=({options:e})=>e,mw=o.createContext(void 0);function vw(e,t,r){const n=o.useRef(!0),[i]=o.useState(()=>({value:e,callback:t,facade:{get current(){return i.value},set current(e){const t=i.value;if(t!==e){if(i.value=e,r&&n.current)return;i.callback(e,t)}}}}));return M(()=>{n.current=!1},[]),i.callback=t,i.facade}function bw(e){const t=o.useRef(null),r=o.useRef(null),n=o.useRef(null),i=o.useRef(null),a=o.useRef(null),{enabled:s=!0}=e,c=function(e){const{dir:t,targetDocument:r}=et(),n="rtl"===t,i=function(e,t){const{align:r,arrowPadding:n,autoSize:i,coverTarget:a,disableUpdateOnResize:s,flipBoundary:c,offset:l,overflowBoundary:d,pinned:u,position:f,unstable_disableTether:h,strategy:p,overflowBoundaryPadding:g,fallbackPositions:m,useTransform:v,matchTargetSize:b,shiftToCoverTarget:y}=t;return o.useCallback((t,o)=>e({container:t,arrow:o,options:{autoSize:i,disableUpdateOnResize:s,matchTargetSize:b,offset:l,strategy:p,coverTarget:a,flipBoundary:c,overflowBoundary:d,useTransform:v,overflowBoundaryPadding:g,pinned:u,arrowPadding:n,align:r,fallbackPositions:m,shiftToCoverTarget:y,position:f,unstable_disableTether:h}}),[i,s,b,l,p,a,c,d,v,g,u,n,r,m,y,f,h,e])}(null!==(a=o.useContext(mw))&&void 0!==a?a:gw,e);var a;const{positionFixed:s}=e;return o.useCallback((e,t)=>{const r=(e=>{var t;const r=rw(e);return!!r&&r!==(null===(t=r.ownerDocument)||void 0===t?void 0:t.body)})(e),o=i(e,t),{autoSize:a,disableUpdateOnResize:c,matchTargetSize:l,offset:d,coverTarget:u,flipBoundary:f,overflowBoundary:h,useTransform:p,overflowBoundaryPadding:g,pinned:m,position:v,arrowPadding:b,strategy:y,align:w,fallbackPositions:k,shiftToCoverTarget:C,unstable_disableTether:T}=o,x=(e=>{switch(e){case"always":case!0:return{applyMaxWidth:!0,applyMaxHeight:!0};case"width-always":case"width":return{applyMaxWidth:!0,applyMaxHeight:!1};case"height-always":case"height":return{applyMaxWidth:!1,applyMaxHeight:!0};default:return!1}})(a),S=[x&&sw(x),l&&{name:"matchTargetSize",fn:async e=>{const{rects:{reference:t,floating:r},elements:{floating:o},middlewareData:{matchTargetSize:{matchTargetSizeAttempt:n=!1}={}}}=e;if(t.width===r.width||n)return{};const{width:i}=t;return o.style.setProperty(lw,`${i}px`),o.style.width||(o.style.width=`var(${lw})`),{data:{matchTargetSizeAttempt:!0},reset:{rects:!0}}}},d&&uw(d),u&&{name:"coverTarget",fn:e=>{const{placement:t,rects:r,x:o,y:n}=e,i={x:o,y:n};switch(dw(t).side){case"bottom":i.y-=r.reference.height;break;case"top":i.y+=r.reference.height;break;case"left":i.x+=r.reference.width;break;case"right":i.x-=r.reference.width}return i}},!m&&hw({container:e,flipBoundary:f,hasScrollableElement:r,isRtl:n,fallbackPositions:k}),pw({container:e,hasScrollableElement:r,overflowBoundary:h,disableTether:T,overflowBoundaryPadding:g,isRtl:n,shiftToCoverTarget:C}),x&&cw(x,{container:e,overflowBoundary:h,overflowBoundaryPadding:g,isRtl:n}),{name:"intersectionObserver",fn:async e=>{const t=e.rects.floating,r=await Qy(e,{altBoundary:!0}),o=r.top0,n=r.bottom0;return{data:{intersecting:o||n}}}},t&&Zy({element:t,padding:b}),Yy({strategy:"referenceHidden"}),Yy({strategy:"escaped"}),!1].filter(Boolean);return{placement:fw(w,v,n),middleware:S,strategy:(null!=y?y:s)?"fixed":"absolute",disableUpdateOnResize:c,useTransform:p}},[i,n,r,s])}(e),l=o.useCallback(()=>{var e;t.current&&t.current.dispose(),t.current=null;const o=null!==(e=n.current)&&void 0!==e?e:r.current;s&&I()&&o&&i.current&&(t.current=nw({container:i.current,target:o,arrow:a.current,...c(i.current,a.current)}))},[s,c]),d=F(e=>{n.current=e,l()});o.useImperativeHandle(e.positioningRef,()=>({updatePosition:()=>{var e;return null===(e=t.current)||void 0===e?void 0:e.updatePosition()},setTarget:t=>{e.target,d(t)}}),[e.target,d]),M(()=>{var t;d(null!==(t=e.target)&&void 0!==t?t:null)},[e.target,d]),M(()=>{l()},[l]);const u=vw(null,e=>{r.current!==e&&(r.current=e,l())}),f=F(()=>{var t;return null===(t=e.onPositioningEnd)||void 0===t?void 0:t.call(e)});return{targetRef:u,containerRef:vw(null,e=>{var t;i.current!==e&&(null===(t=i.current)||void 0===t||t.removeEventListener(Ob,f),null==e||e.addEventListener(Ob,f),i.current=e,l())}),arrowRef:vw(null,e=>{a.current!==e&&(a.current=e,l())})}}mw.Provider;const yw=o.createContext(void 0),ww={},kw=yw.Provider;function Cw(){const{targetDocument:e}=et(),t=o.useRef(null);return o.useEffect(()=>{const r=null==e?void 0:e.defaultView;if(r){const e=dt(r);return t.current=e,()=>{ut(e),t.current=null}}},[e]),t}function Tw(){const e=Cw();return o.useCallback(()=>{var t,r;return null!==(r=null===(t=e.current)||void 0===t?void 0:t.isNavigatingWithKeyboard())&&void 0!==r&&r},[e])}const xw=e=>-1,Sw=e=>{};function Iw(){const{targetDocument:e}=et(),t=null==e?void 0:e.defaultView;return Ev(t?t.setTimeout:xw,t?t.clearTimeout:Sw)}function _w(e){return Boolean(e.type.isFluentTriggerComponent)}function Ew(e){return o.isValidElement(e)?_w(e)?Ew(e.props.children):e:null}function Aw(e,t){return"function"==typeof e?e(t):e?Bw(e,t):e||null}function Bw(e,t){if(!o.isValidElement(e)||e.type===o.Fragment)throw new Error("A trigger element must be a single element for this component. Please ensure that you're not using React Fragments.");if(_w(e)){const r=Bw(e.props.children,t);return o.cloneElement(e,void 0,r)}return o.cloneElement(e,t)}const Ow=parseInt(o.version,10)>=19;function Rw(e){if(e)return Ow?e.props.ref:e.ref}const jw=e=>{var t,r,n,i,a,s;const l=null!==(d=o.useContext(yw))&&void 0!==d?d:ww;var d;const u=function(){const e=A()!==_,[t,r]=o.useState(e);return I()&&e&&o.useLayoutEffect(()=>{r(!1)},[]),t}(),{targetDocument:f}=et(),[h,p]=Iw(),{appearance:g="normal",children:m,content:v,withArrow:b=!1,positioning:y="above",onVisibleChange:w,relationship:k,showDelay:C=250,hideDelay:T=250,mountNode:x}=e,[S,E]=c({state:e.visible,initialState:!1}),B=o.useCallback((e,t)=>{p(),E(r=>(t.visible!==r&&(null==w||w(e,t)),t.visible))},[p,E,w]),R={withArrow:b,positioning:y,showDelay:C,hideDelay:T,relationship:k,visible:S,shouldRenderTooltip:S,appearance:g,mountNode:x,components:{content:"div"},content:N(v,{defaultProps:{role:"tooltip"},elementType:"div"})};R.content.id=O("tooltip-",R.content.id);const j={enabled:R.visible,arrowPadding:8,position:"above",align:"center",offset:4,...Ib(R.positioning)};var P;R.withArrow&&(j.offset="number"==typeof(P=j.offset)||"object"==typeof P&&null!==P?_b(P,6):"function"==typeof P?e=>{const t=P(e);return _b(t,6)}:{mainAxis:6});const{targetRef:z,containerRef:q,arrowRef:L}=bw(j);R.content.ref=D(R.content.ref,q),R.arrowRef=L,M(()=>{if(S){var e;const t={hide:e=>B(void 0,{visible:!1,documentKeyboardEvent:e})};null===(e=l.visibleTooltip)||void 0===e||e.hide(),l.visibleTooltip=t;const r=e=>{e.key!==jt||e.defaultPrevented||(t.hide(e),e.preventDefault())};return null==f||f.addEventListener("keydown",r,{capture:!0}),()=>{l.visibleTooltip===t&&(l.visibleTooltip=void 0),null==f||f.removeEventListener("keydown",r,{capture:!0})}}},[l,f,S,B]);const H=o.useRef(!1),U=o.useCallback(e=>{if("focus"===e.type&&H.current)return void(H.current=!1);const t=l.visibleTooltip?0:R.showDelay;h(()=>{B(e,{visible:!0})},t),e.persist()},[h,B,R.showDelay,l]),W=Tw(),[V]=o.useState(()=>{const e=e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.isFocusedProgrammatically)&&!W()&&(H.current=!0)};let t=null;return r=>{null==t||t.removeEventListener(ot,e),null==r||r.addEventListener(ot,e),t=r}}),$=o.useCallback(e=>{let t=R.hideDelay;"blur"===e.type&&(t=0,H.current=(null==f?void 0:f.activeElement)===e.target),h(()=>{B(e,{visible:!1})},t),e.persist()},[h,B,R.hideDelay,f]);R.content.onPointerEnter=_v(R.content.onPointerEnter,p),R.content.onPointerLeave=_v(R.content.onPointerLeave,$),R.content.onFocus=_v(R.content.onFocus,p),R.content.onBlur=_v(R.content.onBlur,$);const K=Ew(m),G={},J=!0===(null==K||null===(t=K.props)||void 0===t?void 0:t["aria-expanded"])||"true"===(null==K||null===(r=K.props)||void 0===r?void 0:r["aria-expanded"]);return"label"===k?"string"==typeof R.content.children?G["aria-label"]=R.content.children:(G["aria-labelledby"]=R.content.id,R.shouldRenderTooltip=!0):"description"===k&&(G["aria-describedby"]=R.content.id,R.shouldRenderTooltip=!0),(u||J)&&(R.shouldRenderTooltip=!1),R.children=Aw(m,{...G,...null==K?void 0:K.props,ref:D(Rw(K),V,void 0===j.target?z:void 0),onPointerEnter:F(_v(null==K||null===(n=K.props)||void 0===n?void 0:n.onPointerEnter,U)),onPointerLeave:F(_v(null==K||null===(i=K.props)||void 0===i?void 0:i.onPointerLeave,$)),onFocus:F(_v(null==K||null===(a=K.props)||void 0===a?void 0:a.onFocus,U)),onBlur:F(_v(null==K||null===(s=K.props)||void 0===s?void 0:s.onBlur,$))}),R};function Pw(e,t){e&&Object.assign(e,{_virtual:{parent:t}})}const Nw=o.createContext(void 0);Nw.Provider;const zw=o.createContext(void 0),qw=zw.Provider;function Mw(e,t){if(Fw(e))return()=>{};const r={current:void 0},o=dt(t);function n(e){o.isNavigatingWithKeyboard()&&Xv(e)&&(r.current=e,e.setAttribute(ft,""))}function i(){r.current&&(r.current.removeAttribute(ft),r.current=void 0)}o.subscribe(e=>{e?n(t.document.activeElement):i()});const a=e=>{i(),n(e.composedPath()[0])},s=t=>{(!t.relatedTarget||Xv(t.relatedTarget)&&!e.contains(t.relatedTarget))&&i()};return e.addEventListener(ot,a),e.addEventListener("focusout",s),e.focusVisible=!0,e.contains(t.document.activeElement)&&n(t.document.activeElement),()=>{i(),e.removeEventListener(ot,a),e.removeEventListener("focusout",s),e.focusVisible=void 0,ut(o)}}function Fw(e){return!!e&&(!!e.focusVisible||Fw(null==e?void 0:e.parentElement))}function Dw(e={}){const t=et(),r=o.useRef(null);var n;const i=null!==(n=e.targetDocument)&&void 0!==n?n:t.targetDocument;return o.useEffect(()=>{if((null==i?void 0:i.defaultView)&&r.current)return Mw(r.current,i.defaultView)},[r,i]),r}const Lw=ye({root:{qhf8xq:"f1euv43f",Bhzewxz:"f15twtuk",oyh7mz:["f1vgc2s3","f1e31b4d"],j35jbq:["f1e31b4d","f1vgc2s3"],Bj3rh1h:"f494woh"}},{d:[".f1euv43f{position:absolute;}",".f15twtuk{top:0;}",".f1vgc2s3{left:0;}",".f1e31b4d{right:0;}",".f494woh{z-index:1000000;}"]}),Hw=n.useInsertionEffect,Uw=()=>{let e;return{get:function(t,r){return e||(r&&(e=t.ownerDocument.createElement("div"),t.appendChild(e)),e)},dispose:function(){e&&(e.remove(),e=void 0)}}},Ww=Hw?e=>{const{className:t,dir:r,focusVisibleRef:n,targetNode:i}=e,[a]=o.useState(Uw),s=o.useMemo(()=>void 0===i||e.disabled?null:new Proxy({},{get(e,t){if("nodeType"===t)return Node.ELEMENT_NODE;if("remove"===t){const e=a.get(i,!1);return e&&0===e.childNodes.length&&a.dispose(),()=>{}}const r=a.get(i,!0),o=r?r[t]:void 0;return"function"==typeof o?o.bind(r):o},set(e,t,r){const o="_virtual"===t||"focusVisible"===t,n=o?a.get(i,!1):a.get(i,!0);return!(!o||n)||!!n&&(Object.assign(n,{[t]:r}),!0)}}),[a,i,e.disabled]);return Hw(()=>{if(!s)return;const e=t.split(" ").filter(Boolean);return s.classList.add(...e),s.setAttribute("dir",r),s.setAttribute("data-portal-node","true"),n.current=s,()=>{s.classList.remove(...e),s.removeAttribute("dir")}},[t,r,s,n]),o.useEffect(()=>()=>{null==s||s.remove()},[s]),s}:e=>{const{className:t,dir:r,focusVisibleRef:n,targetNode:i}=e,a=o.useMemo(()=>{if(void 0===i||e.disabled)return null;const t=i.ownerDocument.createElement("div");return i.appendChild(t),t},[i,e.disabled]);return o.useMemo(()=>{a&&(a.className=t,a.setAttribute("dir",r),a.setAttribute("data-portal-node","true"),n.current=a)},[t,r,a,n]),o.useEffect(()=>()=>{null==a||a.remove()},[a]),a},Vw=e=>{const{element:t,className:r}=function(e){return Xv(e)?{element:e}:"object"==typeof e?null===e?{element:null}:e:{}}(e.mountNode),n=o.useRef(null),i=(e=>{const{targetDocument:t,dir:r}=et(),n=o.useContext(Nw),i=Dw(),a=Lw(),s=null!==(c=o.useContext(zw))&&void 0!==c?c:"";var c;const l={dir:r,disabled:e.disabled,focusVisibleRef:i,className:Z(s,a.root,e.className),targetNode:null!=n?n:null==t?void 0:t.body};return Ww(l)})({disabled:!!t,className:r}),a=null!=t?t:i,s={children:e.children,mountNode:a,virtualParentRootRef:n};return o.useEffect(()=>{if(!a)return;const e=n.current,t=a.contains(e);return e&&!t?(Pw(a,e),()=>{Pw(a,void 0)}):void 0},[n,a]),s};var $w=r(40961);const Kw=e=>{return t=Vw(e),o.createElement("span",{hidden:!0,ref:t.virtualParentRootRef},t.mountNode&&$w.createPortal(o.createElement(o.Fragment,null,t.children,o.createElement("span",{hidden:!0})),t.mountNode));var t};Kw.displayName="Portal";const Gw=ye({root:{mc9l5x:"fjseox",B7ck84d:"f1ewtqcl",B2u0y6b:"f132xexn",Bceei9c:"f158kwzp",Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bg96gwp:"fwrc4pm",Btd35i7:"fokg9q4",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f9ggezi",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1bzqsji",De3pzq:"fxugw4r",sj55zd:"f19n0e5",Bhu2qc9:"fxeb0a7"},visible:{mc9l5x:"ftgm304"},inverted:{De3pzq:"fg3r6xk",sj55zd:"fonrgv7"},arrow:{B7ck84d:"f1ewtqcl",qhf8xq:"f1euv43f",Bj3rh1h:"f1bsuimh",rhnwrx:"f1s3jn22",Bdy53xb:"fv40uqz",De3pzq:"f1u2r49w",B2eet1l:"fqhgnl",Beyfa6y:"f17bz04i",Bz10aip:"f36o3x3",Bqenvij:"fzofk8q",a9b677:"f1wbx1ie",Ftih45:"f1wl9k8s",Br0sdwz:"f1aocrix",cmx5o7:"f1ljr5q2",susq4k:0,Biibvgv:0,Bicfajf:0,qehafq:0,Brs5u8j:"f155f1qt",Ccq8qp:"f9mhzq7",Baz25je:"fr6rhvx",Bcgcnre:0,Bqjgrrk:0,qa3bma:0,y0oebl:0,Biqmznv:0,Bm6vgfq:0,Bbv0w2i:0,uvfttm:0,eqrjj:0,Bk5zm6e:0,m598lv:0,B4f6apu:0,ydt019:0,Bq4z7u6:0,Bdkvgpv:0,B0qfbqy:0,kj8mxx:"f1kc0wz4",r59vdv:"fgq90dz",Bkw5xw4:"fq0y47f",hl6cv3:"f1pwrbz6",aea9ga:"f1hxxcvm",yayu3t:"fw8rgyo",Bhsv975:"f1wnzycx",rhl9o9:"f1730wal",B7gxrvb:"f1fy4ixr",B6q6orb:"fobkauc",B0lu1f8:"f16bqv1l"}},{d:[".fjseox{display:none;}",".f1ewtqcl{box-sizing:border-box;}",".f132xexn{max-width:240px;}",".f158kwzp{cursor:default;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".fokg9q4{overflow-wrap:break-word;}",[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],[".f9ggezi{border:1px solid var(--colorTransparentStroke);}",{p:-2}],[".f1bzqsji{padding:4px 11px 6px 11px;}",{p:-1}],".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f19n0e5{color:var(--colorNeutralForeground1);}",".fxeb0a7{filter:drop-shadow(0 0 2px var(--colorNeutralShadowAmbient)) drop-shadow(0 4px 8px var(--colorNeutralShadowKey));}",".ftgm304{display:block;}",".fg3r6xk{background-color:var(--colorNeutralBackgroundStatic);}",".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}",".f1euv43f{position:absolute;}",".f1bsuimh{z-index:-1;}",".f1s3jn22{--fui-positioning-arrow-height:8.484px;}",".fv40uqz{--fui-positioning-arrow-offset:-4.242px;}",".f1u2r49w{background-color:inherit;}",".fqhgnl{background-clip:content-box;}",".f17bz04i{border-bottom-left-radius:var(--borderRadiusSmall);}",".f36o3x3{transform:rotate(var(--fui-positioning-arrow-angle));}",".fzofk8q{height:var(--fui-positioning-arrow-height);}",".f1wbx1ie{width:var(--fui-positioning-arrow-height);}",'.f1wl9k8s::before{content:"";}',".f1aocrix::before{display:block;}",".f1ljr5q2::before{background-color:inherit;}",[".f155f1qt::before{margin:-1px;}",{p:-1}],".f9mhzq7::before{width:100%;}",".fr6rhvx::before{height:100%;}",[".f1kc0wz4::before{border:1px solid var(--colorTransparentStroke);}",{p:-2}],".fgq90dz::before{border-bottom-left-radius:var(--borderRadiusSmall);}",".fq0y47f::before{clip-path:polygon(0% 0%, 100% 100%, 0% 100%);}",'[data-popper-placement^="top"] .f1pwrbz6{bottom:var(--fui-positioning-arrow-offset);}','[data-popper-placement^="top"] .f1hxxcvm{--fui-positioning-arrow-angle:-45deg;}','[data-popper-placement^="right"] .fw8rgyo{left:var(--fui-positioning-arrow-offset);}','[data-popper-placement^="right"] .f1wnzycx{--fui-positioning-arrow-angle:45deg;}','[data-popper-placement^="bottom"] .f1730wal{top:var(--fui-positioning-arrow-offset);}','[data-popper-placement^="bottom"] .f1fy4ixr{--fui-positioning-arrow-angle:135deg;}','[data-popper-placement^="left"] .fobkauc{right:var(--fui-positioning-arrow-offset);}','[data-popper-placement^="left"] .f16bqv1l{--fui-positioning-arrow-angle:225deg;}']}),Jw=e=>{const t=jw(e);return(e=>{const t=Gw();e.content.className=Z("fui-Tooltip__content",t.root,"inverted"===e.appearance&&t.inverted,e.visible&&t.visible,e.content.className),e.arrowClassName=t.arrow})(t),Je("useTooltipStyles_unstable")(t),(e=>We(o.Fragment,{children:[e.children,e.shouldRenderTooltip&&Ue(Kw,{mountNode:e.mountNode,children:We(e.content,{children:[e.withArrow&&Ue("div",{ref:e.arrowRef,className:e.arrowClassName}),e.content.children]})})]}))(t)};Jw.displayName="Tooltip",Jw.isFluentTriggerComponent=!0;const Qw=Ce("ArrowResetRegular","1em",["M5.85 2.65c.2.2.2.5 0 .7L4.21 5H11a6 6 0 1 1-6 6 .5.5 0 0 1 1 0 5 5 0 1 0 5-5H4.2l1.65 1.65a.5.5 0 1 1-.7.7l-2.5-2.5a.5.5 0 0 1 0-.7l2.5-2.5c.2-.2.5-.2.7 0Z"],{flipInRtl:!0}),Xw=Ce("ArrowSyncRegular","1em",["M11.41 3.64a.5.5 0 0 0 0-.71L9.3.8a.5.5 0 0 0-.7.7l1 1a7.5 7.5 0 0 0-4.08 13.5.5.5 0 0 0 .6-.8A6.5 6.5 0 0 1 10.14 3.5L8.59 5.04a.5.5 0 0 0 .7.7l2.12-2.11ZM8.6 16.36a.5.5 0 0 0 0 .71l2.12 2.12a.5.5 0 0 0 .7-.7l-1-1a7.5 7.5 0 0 0 4.07-13.5.5.5 0 1 0-.59.8A6.5 6.5 0 0 1 9.86 16.5l1.55-1.55a.5.5 0 1 0-.7-.7l-2.12 2.11Z"],{flipInRtl:!0}),Yw=Ce("ArrowUploadRegular","1em",["M15 3a.5.5 0 0 0 .09-.99H4a.5.5 0 0 0-.09.98L4 3h11ZM9.5 18a.5.5 0 0 0 .5-.41V5.7l3.64 3.65c.17.18.44.2.64.06l.07-.06a.5.5 0 0 0 .06-.63l-.06-.07-4.5-4.5A.5.5 0 0 0 9.6 4h-.1a.5.5 0 0 0-.4.19L4.64 8.65a.5.5 0 0 0 .64.76l.07-.06L9 5.71V17.5c0 .28.22.5.5.5Z"]),Zw=o.createContext(void 0),ek=Zw.Provider;function tk(){var e;return null!==(e=o.useContext(Zw))&&void 0!==e?e:{}}const rk=vt("r1oeeo9n","r9sxh5",{r:[".r1oeeo9n{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);position:relative;box-sizing:border-box;vertical-align:middle;min-height:32px;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);background-color:var(--colorNeutralBackground1);border:1px solid var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStrokeAccessible);}",'.r1oeeo9n::after{box-sizing:border-box;content:"";position:absolute;left:-1px;bottom:-1px;right:-1px;height:max(2px, var(--borderRadiusMedium));border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-bottom:2px solid var(--colorCompoundBrandStroke);clip-path:inset(calc(100% - 2px) 0 0 0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}',".r1oeeo9n:focus-within::after{transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}",".r1oeeo9n:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}",".r1oeeo9n:focus-within{outline:2px solid transparent;}",".r9sxh5{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);position:relative;box-sizing:border-box;vertical-align:middle;min-height:32px;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);background-color:var(--colorNeutralBackground1);border:1px solid var(--colorNeutralStroke1);border-bottom-color:var(--colorNeutralStrokeAccessible);}",'.r9sxh5::after{box-sizing:border-box;content:"";position:absolute;right:-1px;bottom:-1px;left:-1px;height:max(2px, var(--borderRadiusMedium));border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-bottom:2px solid var(--colorCompoundBrandStroke);clip-path:inset(calc(100% - 2px) 0 0 0);transform:scaleX(0);transition-property:transform;transition-duration:var(--durationUltraFast);transition-delay:var(--curveAccelerateMid);}',".r9sxh5:focus-within::after{transform:scaleX(1);transition-property:transform;transition-duration:var(--durationNormal);transition-delay:var(--curveDecelerateMid);}",".r9sxh5:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}",".r9sxh5:focus-within{outline:2px solid transparent;}"],s:["@media screen and (prefers-reduced-motion: reduce){.r1oeeo9n::after{transition-duration:0.01ms;transition-delay:0.01ms;}}","@media screen and (prefers-reduced-motion: reduce){.r1oeeo9n:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}","@media screen and (prefers-reduced-motion: reduce){.r9sxh5::after{transition-duration:0.01ms;transition-delay:0.01ms;}}","@media screen and (prefers-reduced-motion: reduce){.r9sxh5:focus-within::after{transition-duration:0.01ms;transition-delay:0.01ms;}}"]}),ok=ye({small:{sshi5w:"f1pha7fy",Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm"},medium:{},large:{sshi5w:"f1w5jphr",Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k",i8kkvl:0,Belr9w4:0,rmohyg:"f1eyhf9v"},outline:{},outlineInteractive:{Bgoe8wy:"fvcxoqz",Bwzppfd:["f1ub3y4t","f1m52nbi"],oetu4i:"f1l4zc64",gg5e9n:["f1m52nbi","f1ub3y4t"],Drbcw7:"f8vnjqi",udz0bu:["fz1etlk","f1hc16gm"],Be8ivqh:"f1klwx88",ofdepl:["f1hc16gm","fz1etlk"]},underline:{De3pzq:"f1c21dwh",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"fokr779",icvyot:"f1ern45e",vrafjx:["f1n71otn","f1deefiw"],wvpqe5:["f1deefiw","f1n71otn"],Eqx8gd:["f1n6gb5g","f15yvnhg"],B1piin3:["f15yvnhg","f1n6gb5g"]},underlineInteractive:{oetu4i:"f1l4zc64",Be8ivqh:"f1klwx88",d9w3h3:0,B3778ie:0,B4j8arr:0,Bl18szs:0,Blrzh8d:"f2ale1x"},filled:{g2u3we:"fghlq4f",h3c5rm:["f1gn591s","fjscplz"],B9xav0g:"fb073pr",zhjwy3:["fjscplz","f1gn591s"]},filledInteractive:{q7v0qe:"ftmjh5b",kmh5ft:["f17blpuu","fsrcdbj"],nagaa4:"f1tpwn32",B1yhkcb:["fsrcdbj","f17blpuu"]},invalid:{tvckwq:"fs4k3qj",gk2u95:["fcee079","fmyw78r"],hhx65j:"f1fgmyf4",Bxowmz0:["fmyw78r","fcee079"]},"filled-darker":{De3pzq:"f16xq7d1"},"filled-lighter":{De3pzq:"fxugw4r"},"filled-darker-shadow":{De3pzq:"f16xq7d1",E5pizo:"fyed02w"},"filled-lighter-shadow":{De3pzq:"fxugw4r",E5pizo:"fyed02w"},disabled:{Bceei9c:"fdrzuqr",De3pzq:"f1c21dwh",g2u3we:"f1jj8ep1",h3c5rm:["f15xbau","fy0fskl"],B9xav0g:"f4ikngz",zhjwy3:["fy0fskl","f15xbau"],Bjwas2f:"fg455y9",Bn1d65q:["f1rvyvqg","f14g86mu"],Bxeuatn:"f1cwzwz",n51gp8:["f14g86mu","f1rvyvqg"],Bsft5z2:"fhr9occ",Bduesf4:"f99w1ws"},smallWithContentBefore:{uwmqm3:["fk8j09s","fdw0yi8"]},smallWithContentAfter:{z189sj:["fdw0yi8","fk8j09s"]},mediumWithContentBefore:{uwmqm3:["f1ng84yb","f11gcy0p"]},mediumWithContentAfter:{z189sj:["f11gcy0p","f1ng84yb"]},largeWithContentBefore:{uwmqm3:["f1uw59to","fw5db7e"]},largeWithContentAfter:{z189sj:["fw5db7e","f1uw59to"]}},{d:[".f1pha7fy{min-height:24px;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f1w5jphr{min-height:40px;}",".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",[".f1eyhf9v{gap:var(--spacingHorizontalSNudge);}",{p:-1}],".f1c21dwh{background-color:var(--colorTransparentBackground);}",[".fokr779{border-radius:0;}",{p:-1}],".f1ern45e{border-top-style:none;}",".f1n71otn{border-right-style:none;}",".f1deefiw{border-left-style:none;}",".f1n6gb5g::after{left:0;}",".f15yvnhg::after{right:0;}",[".f2ale1x::after{border-radius:0;}",{p:-1}],".fghlq4f{border-top-color:var(--colorTransparentStroke);}",".f1gn591s{border-right-color:var(--colorTransparentStroke);}",".fjscplz{border-left-color:var(--colorTransparentStroke);}",".fb073pr{border-bottom-color:var(--colorTransparentStroke);}",".fs4k3qj:not(:focus-within),.fs4k3qj:hover:not(:focus-within){border-top-color:var(--colorPaletteRedBorder2);}",".fcee079:not(:focus-within),.fcee079:hover:not(:focus-within){border-right-color:var(--colorPaletteRedBorder2);}",".fmyw78r:not(:focus-within),.fmyw78r:hover:not(:focus-within){border-left-color:var(--colorPaletteRedBorder2);}",".f1fgmyf4:not(:focus-within),.f1fgmyf4:hover:not(:focus-within){border-bottom-color:var(--colorPaletteRedBorder2);}",".f16xq7d1{background-color:var(--colorNeutralBackground3);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".fyed02w{box-shadow:var(--shadow2);}",".fdrzuqr{cursor:not-allowed;}",".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}",".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}",".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}",".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".fhr9occ::after{content:unset;}",".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}",".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}",".f1uw59to{padding-left:var(--spacingHorizontalM);}",".fw5db7e{padding-right:var(--spacingHorizontalM);}"],h:[".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}",".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}",".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}",".f1l4zc64:hover{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}",".ftmjh5b:hover,.ftmjh5b:focus-within{border-top-color:var(--colorTransparentStrokeInteractive);}",".f17blpuu:hover,.f17blpuu:focus-within{border-right-color:var(--colorTransparentStrokeInteractive);}",".fsrcdbj:hover,.fsrcdbj:focus-within{border-left-color:var(--colorTransparentStrokeInteractive);}",".f1tpwn32:hover,.f1tpwn32:focus-within{border-bottom-color:var(--colorTransparentStrokeInteractive);}"],a:[".f8vnjqi:active,.f8vnjqi:focus-within{border-top-color:var(--colorNeutralStroke1Pressed);}",".fz1etlk:active,.fz1etlk:focus-within{border-right-color:var(--colorNeutralStroke1Pressed);}",".f1hc16gm:active,.f1hc16gm:focus-within{border-left-color:var(--colorNeutralStroke1Pressed);}",".f1klwx88:active,.f1klwx88:focus-within{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}"],m:[["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}]],w:[".f99w1ws:focus-within{outline-style:none;}"]}),nk=vt("r12stul0",null,[".r12stul0{align-self:stretch;box-sizing:border-box;flex-grow:1;min-width:0;border-style:none;padding:0 var(--spacingHorizontalM);color:var(--colorNeutralForeground1);background-color:transparent;outline-style:none;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;}",".r12stul0::-webkit-input-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",".r12stul0::-moz-placeholder{color:var(--colorNeutralForeground4);opacity:1;}",".r12stul0::placeholder{color:var(--colorNeutralForeground4);opacity:1;}"]),ik=ye({small:{uwmqm3:["f1f5gg8d","f1vdfbxk"],z189sj:["f1vdfbxk","f1f5gg8d"]},medium:{},large:{uwmqm3:["fnphzt9","flt1dlf"],z189sj:["flt1dlf","fnphzt9"]},smallWithContentBefore:{uwmqm3:["fgiv446","ffczdla"]},smallWithContentAfter:{z189sj:["ffczdla","fgiv446"]},mediumWithContentBefore:{uwmqm3:["fgiv446","ffczdla"]},mediumWithContentAfter:{z189sj:["ffczdla","fgiv446"]},largeWithContentBefore:{uwmqm3:["fk8j09s","fdw0yi8"]},largeWithContentAfter:{z189sj:["fdw0yi8","fk8j09s"]},disabled:{sj55zd:"f1s2aq7o",De3pzq:"f1c21dwh",Bceei9c:"fdrzuqr",yvdlaj:"fahhnxm"}},{d:[".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",".fnphzt9{padding-left:calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}",".flt1dlf{padding-right:calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}",".fgiv446{padding-left:var(--spacingHorizontalXXS);}",".ffczdla{padding-right:var(--spacingHorizontalXXS);}",".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".fdrzuqr{cursor:not-allowed;}",".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}",".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"]}),ak=vt("r1572tok",null,[".r1572tok{box-sizing:border-box;color:var(--colorNeutralForeground3);display:flex;}",".r1572tok>svg{font-size:20px;}"]),sk=ye({disabled:{sj55zd:"f1s2aq7o"},small:{Duoase:"f3qv9w"},medium:{},large:{Duoase:"f16u2scb"}},{d:[".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f3qv9w>svg{font-size:16px;}",".f16u2scb>svg{font-size:24px;}"]}),ck=o.forwardRef((e,t)=>{const r=((e,t)=>{e=s(e,{supportsLabelFor:!0,supportsRequired:!0,supportsSize:!0});const r=tk();var o;const{size:n="medium",appearance:i=(null!==(o=r.inputDefaultAppearance)&&void 0!==o?o:"outline"),onChange:a}=e,[l,d]=c({state:e.value,defaultState:e.defaultValue,initialState:""}),u=S({props:e,primarySlotTagName:"input",excludedPropNames:["size","onChange","value","defaultValue"]}),f={size:n,appearance:i,components:{root:"span",input:"input",contentBefore:"span",contentAfter:"span"},input:N(e.input,{defaultProps:{type:"text",ref:t,...u.primary},elementType:"input"}),contentAfter:z(e.contentAfter,{elementType:"span"}),contentBefore:z(e.contentBefore,{elementType:"span"}),root:N(e.root,{defaultProps:u.root,elementType:"span"})};return f.input.value=l,f.input.onChange=F(e=>{const t=e.target.value;null==a||a(e,{value:t}),d(t)}),f})(e,t);return(e=>{const{size:t,appearance:r}=e,o=e.input.disabled,n="true"==`${e.input["aria-invalid"]}`,i=r.startsWith("filled"),a=ok(),s=ik(),c=sk();e.root.className=Z("fui-Input",rk(),a[t],e.contentBefore&&a[`${t}WithContentBefore`],e.contentAfter&&a[`${t}WithContentAfter`],a[r],!o&&"outline"===r&&a.outlineInteractive,!o&&"underline"===r&&a.underlineInteractive,!o&&i&&a.filledInteractive,i&&a.filled,!o&&n&&a.invalid,o&&a.disabled,e.root.className),e.input.className=Z("fui-Input__input",nk(),s[t],e.contentBefore&&s[`${t}WithContentBefore`],e.contentAfter&&s[`${t}WithContentAfter`],o&&s.disabled,e.input.className);const l=[ak(),o&&c.disabled,c[t]];e.contentBefore&&(e.contentBefore.className=Z("fui-Input__contentBefore",...l,e.contentBefore.className)),e.contentAfter&&(e.contentAfter.className=Z("fui-Input__contentAfter",...l,e.contentAfter.className))})(r),Je("useInputStyles_unstable")(r),(e=>We(e.root,{children:[e.contentBefore&&Ue(e.contentBefore,{}),Ue(e.input,{}),e.contentAfter&&Ue(e.contentAfter,{})]}))(r)});ck.displayName="Input";var lk=({mailInfo:e})=>{const t=Lg(),[r,n]=o.useState(!1);return o.createElement("form",{className:t.form,style:{flex:1,display:"flex",flexDirection:"column",minHeight:0}},o.createElement("fieldset",{className:t.fieldset_v},o.createElement("legend",{className:t.legend},"Aktuelle Mail Informationen"," ",o.createElement(Vt,{size:"small",appearance:"subtle",onClick:()=>n(e=>!e),"aria-expanded":!r,"aria-controls":"mailinfo-content",style:{marginLeft:8},icon:r?o.createElement(Se,null):o.createElement(Ie,null)})),!r&&o.createElement("div",{id:"mailinfo-content"},o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"Betreff"),o.createElement(ck,{className:t.input,type:"text",value:e.subject||"",disabled:!0})),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"Von"),o.createElement(ck,{className:t.input,type:"text",value:e.from||"",disabled:!0})),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"An"),o.createElement(ck,{className:t.input,type:"text",value:e.to||"",disabled:!0})),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"CC"),o.createElement(ck,{className:t.input,type:"text",value:e.cc||"",disabled:!0})),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"Erstellt am"),o.createElement(ck,{className:t.input,type:"text",value:e.dateTimeCreated||"",disabled:!0})),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"Geändert am"),o.createElement(ck,{className:t.input,type:"text",value:e.dateTimeModified||"",disabled:!0})),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"Message-ID"),o.createElement(ck,{className:t.input,type:"text",value:e.messageId||"",disabled:!0})),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"Internet-Message-ID"),o.createElement(ck,{className:t.input,type:"text",value:e.internetMessageId||"",disabled:!0})))))};const dk=({id:e,label:t,checked:r,disabled:n,onChange:i})=>{const a=Lg();return o.createElement("div",{className:a.inlineFieldRow},o.createElement(St,{id:e,checked:r,onChange:(e,t)=>{i&&i(t.checked)},disabled:n,label:t,size:"medium"}))};var uk=dk;const fk=({id:e,label:t,value:r,type:n="text",disabled:i,onChange:a})=>{const s=Lg();return o.createElement("div",{className:s.fieldRow},o.createElement("label",{className:s.label,htmlFor:e},t),o.createElement(ck,{id:e,type:n,value:r,onChange:a?(e,t)=>a(t.value):void 0,className:s.input,disabled:i,size:"small"}))};var hk=fk,pk=({properties:e,onPropertyChange:t})=>{const r=Lg(),[n,i]=o.useState(!1),a=e=>{if(!e)return"";if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e;const t=new Date(e);return isNaN(t.getTime())?"":t.toISOString().slice(0,10)};return o.createElement("form",{className:r.form},o.createElement("fieldset",{className:r.fieldset_v},o.createElement("legend",{className:r.legend},"docuvita Mail Informationen"," ",o.createElement(Vt,{size:"small",appearance:"subtle",onClick:()=>i(e=>!e),"aria-expanded":!n,"aria-controls":"maildocuvita-content",style:{marginLeft:8},icon:n?o.createElement(Se,null):o.createElement(Ie,null)})),!n&&o.createElement("div",{id:"maildocuvita-content"},Array.isArray(e)&&e.filter(e=>e.Visible).map((e,n)=>{var i,s,c;return o.createElement("div",{key:e.FieldName||n,className:r.fieldRow},"B"===e.FieldType?o.createElement(dk,{id:`maildocuvita-${e.FieldName||n}`,label:e.FieldPrompt||e.FieldName||String(n),checked:!!e.FieldValueBool,disabled:!t,onChange:t?r=>t(e.FieldName||String(n),r):void 0}):o.createElement(hk,{id:`maildocuvita-${e.FieldName||n}`,label:e.FieldPrompt||e.FieldName||String(n),value:"D"===e.FieldType?a(e.FieldValueDateTime):null!==(c=null!==(i=e.FieldValueString)&&void 0!==i?i:null===(s=e.FieldValueNumeric)||void 0===s?void 0:s.toString())&&void 0!==c?c:"",type:"D"===e.FieldType?"date":"text",disabled:!t||!0===e.ReadOnly||e.FieldName&&e.FieldName.startsWith("M365"),onChange:t?r=>t(e.FieldName||String(n),r):void 0}))}))))};function gk(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const mk=Symbol("#internalSet");let vk=mk;class bk{static dangerouslyGetInternalSet(e){return e[mk]}static copy(e){return new bk(new Set(e[mk]))}static from(e){return void 0===e?this.empty:e instanceof this?e:new this(new Set(e))}static[Symbol.hasInstance](e){return Boolean("object"==typeof e&&e&&mk in e)}add(e){if(this.has(e))return this;const t=bk.copy(this);return t[mk].add(e),t}delete(e){if(!this.has(e))return this;const t=bk.copy(this);return t[mk].delete(e),t}has(e){return this[mk].has(e)}[Symbol.iterator](){return this[mk].values()}constructor(e){gk(this,"size",void 0),gk(this,vk,void 0),this[mk]=e,this.size=this[mk].size}}function yk(e,t){return e.open?t.add(e.value):t.delete(e.value)}gk(bk,"empty",new bk(new Set));const wk=Symbol("#internalMap");let kk=wk;class Ck{static dangerouslyGetInternalMap(e){return e[wk]}static copy(e){return this.from(e[wk])}static from(e,t){if(void 0===e)return this.empty;if(!t)return e instanceof this?e:new this(new Map(e));const r=new Map;for(const o of e)r.set(...t(o));return new this(r)}static[Symbol.hasInstance](e){return Boolean("object"==typeof e&&e&&wk in e)}delete(e){if(!this.has(e))return this;const t=Ck.copy(this);return t[wk].delete(e),t}get(e){return this[wk].get(e)}has(e){return this[wk].has(e)}set(e,t){if(this.get(e)===t)return this;const r=Ck.copy(this);return r[wk].set(e,t),r}[Symbol.iterator](){return this[wk].entries()}constructor(e){gk(this,"size",void 0),gk(this,kk,void 0),this[wk]=e,this.size=this[wk].size}}gk(Ck,"empty",new Ck(new Map));const Tk=e=>Array.isArray(e)?e:[e,!0],xk=e=>Ck.from(e,Tk),Sk={level:0,contextType:"subtree"},Ik=o.createContext(void 0),_k=()=>{var e;return null!==(e=o.useContext(Ik))&&void 0!==e?e:Sk},Ek={durationUltraFast:50,durationFaster:100,durationFast:150,durationNormal:200,durationGentle:250,durationSlow:300,durationSlower:400,durationUltraSlow:500},Ak={curveAccelerateMax:"cubic-bezier(0.9,0.1,1,0.2)",curveAccelerateMid:"cubic-bezier(1,0,1,1)",curveAccelerateMin:"cubic-bezier(0.8,0,0.78,1)",curveDecelerateMax:"cubic-bezier(0.1,0.9,0.2,1)",curveDecelerateMid:"cubic-bezier(0,0,0,1)",curveDecelerateMin:"cubic-bezier(0.33,0,0.1,1)",curveEasyEaseMax:"cubic-bezier(0.8,0,0.2,1)",curveEasyEase:"cubic-bezier(0.33,0,0.67,1)",curveLinear:"cubic-bezier(0,0,1,1)"},Bk={...Ek,...Ak};function Ok(){const e=o.useRef(!0);return o.useEffect(()=>{e.current&&(e.current=!1)},[]),e.current}const Rk=o.createContext(void 0);Rk.Provider;var jk=r(64583).Promise;const Pk={fill:"forwards"},Nk={duration:1};function zk(){return function(){var e;const t="undefined"!=typeof window&&"function"==typeof(null===(e=window.Animation)||void 0===e?void 0:e.prototype.persist);return o.useCallback((e,r,o)=>{const n=Array.isArray(r)?r:[r],{isReducedMotion:i}=o,a=n.map(r=>{const{keyframes:o,reducedMotion:n=Nk,...a}=r,{keyframes:s=o,...c}=n,l=i?s:o,d={...Pk,...a,...i&&c};try{const r=e.animate(l,d);if(t)null==r||r.persist();else{const t=l[l.length-1];var u;Object.assign(null!==(u=e.style)&&void 0!==u?u:{},t)}return r}catch(e){return null}}).filter(e=>!!e);return{set playbackRate(e){a.forEach(t=>{t.playbackRate=e})},setMotionEndCallbacks(e,t){const r=a.map(e=>new jk((t,r)=>{e.onfinish=()=>t(),e.oncancel=()=>r()}));jk.all(r).then(()=>{e()}).catch(()=>{t()})},isRunning(){return a.some(e=>function(e){if("running"===e.playState){var t,r;if(void 0!==e.overallProgress){var o;const t=null!==(o=e.overallProgress)&&void 0!==o?o:0;return t>0&&t<1}const i=Number(null!==(r=e.currentTime)&&void 0!==r?r:0);var n;const a=Number(null!==(n=null===(t=e.effect)||void 0===t?void 0:t.getTiming().duration)&&void 0!==n?n:0);return i>0&&i{a.forEach(e=>{e.cancel()})},pause:()=>{a.forEach(e=>{e.pause()})},play:()=>{a.forEach(e=>{e.play()})},finish:()=>{a.forEach(e=>{e.finish()})},reverse:()=>{a.forEach(e=>{e.reverse()})}}},[t])}()}function qk(e){const t=o.useRef(void 0);return o.useImperativeHandle(e,()=>({setPlayState:e=>{var r,o;"running"===e&&(null===(r=t.current)||void 0===r||r.play()),"paused"===e&&(null===(o=t.current)||void 0===o||o.pause())},setPlaybackRate:e=>{t.current&&(t.current.playbackRate=e)}})),t}function Mk(){const{targetDocument:e}=et();var t;const r=null!==(t=null==e?void 0:e.defaultView)&&void 0!==t?t:null,n=o.useRef(!1),i=o.useCallback(()=>n.current,[]);return M(()=>{if(null===r||"function"!=typeof r.matchMedia)return;const e=r.matchMedia("screen and (prefers-reduced-motion: reduce)");e.matches&&(n.current=!0);const t=e=>{n.current=e.matches};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[r]),i}const Fk=["@fluentui/react-motion: Invalid child element.","\n","Motion factories require a single child element to be passed. ","That element element should support ref forwarding i.e. it should be either an intrinsic element (e.g. div) or a component that uses React.forwardRef()."].join("");function Dk(e,t=!0){const r=o.useRef(null);o.useEffect(()=>{},[t]);try{const t=o.Children.only(e);if(o.isValidElement(t))return[o.cloneElement(t,{ref:D(r,Rw(t))}),r]}catch{}throw new Error(Fk)}const Lk=o.createContext(void 0),Hk=(Lk.Provider,()=>{var e;return null!==(e=o.useContext(Lk))&&void 0!==e?e:"default"});function Uk(e){return t=>{const{children:r,imperativeRef:n,onMotionFinish:i,onMotionStart:a,onMotionCancel:s,...c}=t,l=c,[d,u]=Dk(r),f=qk(n),h="skip"===Hk(),p=o.useRef({skipMotions:h,params:l}),g=zk(),m=Mk(),v=F(()=>{null==a||a(null)}),b=F(()=>{null==i||i(null)}),y=F(()=>{null==s||s(null)});return M(()=>{p.current={skipMotions:h,params:l}}),M(()=>{const t=u.current;if(t){const r="function"==typeof e?e({element:t,...p.current.params}):e;v();const o=g(t,r,{isReducedMotion:m()});return f.current=o,o.setMotionEndCallbacks(b,y),p.current.skipMotions&&o.finish(),()=>{o.cancel()}}},[g,u,f,m,b,v,y]),d}}const Wk=Symbol("MOTION_DEFINITION"),Vk=Symbol.for("interruptablePresence");function $k(e){return Object.assign(t=>{const r={...o.useContext(Rk),...t},n="skip"===Hk(),{appear:i,children:a,imperativeRef:s,onExit:c,onMotionFinish:l,onMotionStart:d,onMotionCancel:u,visible:f,unmountOnExit:h,...p}=r,g=p,[m,v]=function(e=!1,t=!1){const r=o.useRef(!t||e),n=o.useReducer(e=>e+1,0)[1],i=o.useCallback(e=>{r.current!==e&&(r.current=e,n())},[n]);return o.useEffect(()=>{e&&(r.current=e)}),[e||r.current,i]}(f,h),[b,y]=Dk(a,m),w=qk(s),k=o.useRef({appear:i,params:g,skipMotions:n}),C=zk(),T=Ok(),x=Mk(),S=F(e=>{null==d||d(null,{direction:e})}),I=F(e=>{null==l||l(null,{direction:e}),"exit"===e&&h&&(v(!1),null==c||c())}),_=F(e=>{null==u||u(null,{direction:e})});return M(()=>{k.current={appear:i,params:g,skipMotions:n}}),M(()=>{const t=y.current;if(!t)return;let r;function o(){r&&(i&&r.isRunning()||(r.cancel(),w.current=void 0))}const n="function"==typeof e?e({element:t,...k.current.params}):e,i=n[Vk];if(i&&(r=w.current,r&&r.isRunning()))return r.reverse(),o;const a=f?n.enter:n.exit,s=f?"enter":"exit",c=!k.current.appear&&T,l=k.current.skipMotions;return c||S(s),r=C(t,a,{isReducedMotion:x()}),c?(r.finish(),o):(w.current=r,r.setMotionEndCallbacks(()=>I(s),()=>_(s)),l&&r.finish(),o)},[C,y,w,x,I,S,_,f]),m?b:null},{[Wk]:"function"==typeof e?e:()=>e},{In:Uk("function"==typeof e?(...t)=>e(...t).enter:e.enter),Out:Uk("function"==typeof e?(...t)=>e(...t).exit:e.exit)})}function Kk(e,t){const r=function(e,t){return r=>e({...t,...r})}(e[Wk],t);return $k(r)}const Gk=(e,t)=>({sizeName:"horizontal"===e?"maxWidth":"maxHeight",overflowName:"horizontal"===e?"overflowX":"overflowY",toSize:`${"horizontal"===e?t.scrollWidth:t.scrollHeight}px`}),Jk=({orientation:e,duration:t,easing:r,element:o,fromSize:n="0"})=>{const{sizeName:i,overflowName:a,toSize:s}=Gk(e,o);return{keyframes:[{[i]:n,[a]:"hidden"},{[i]:s,offset:.9999,[a]:"hidden"},{[i]:"unset",[a]:"unset"}],duration:t,easing:r}},Qk=({direction:e,orientation:t,duration:r,easing:o,delay:n=0})=>{const{paddingStart:i,paddingEnd:a,marginStart:s,marginEnd:c}=(e=>"horizontal"===e?{paddingStart:"paddingInlineStart",paddingEnd:"paddingInlineEnd",marginStart:"marginInlineStart",marginEnd:"marginInlineEnd"}:{paddingStart:"paddingBlockStart",paddingEnd:"paddingBlockEnd",marginStart:"marginBlockStart",marginEnd:"marginBlockEnd"})(t),l="enter"===e?0:1,d={keyframes:[{[i]:"0",[a]:"0",[s]:"0",[c]:"0",offset:l}],duration:r,easing:o,delay:n};return"exit"===e&&(d.fill="forwards"),d},Xk=({direction:e,duration:t,easing:r=Bk.curveLinear,delay:o=0,fromOpacity:n=0})=>{const i=[{opacity:n},{opacity:1}];return"exit"===e&&i.reverse(),{keyframes:i,duration:t,easing:r,delay:o,fill:"both"}};function Yk({element:e,orientation:t,animateOpacity:r,sizeDuration:o,opacityDuration:n=o,easing:i,delay:a,exitSizeDuration:s,exitOpacityDuration:c=s,exitEasing:l,exitDelay:d}){const u=[Jk({orientation:t,duration:o,easing:i,element:e}),Qk({direction:"enter",orientation:t,duration:o,easing:i})];r&&u.push({...Xk({direction:"enter",duration:n,easing:i}),delay:a,fill:"both"});const f=[];return r&&f.push(Xk({direction:"exit",duration:c,easing:l})),f.push((({orientation:e,duration:t,easing:r,element:o,delay:n=0,fromSize:i="0"})=>{const{sizeName:a,overflowName:s,toSize:c}=Gk(e,o);return{keyframes:[{[a]:c,[s]:"hidden"},{[a]:i,[s]:"hidden"}],duration:t,easing:r,fill:"both",delay:n}})({orientation:t,duration:s,easing:l,element:e,delay:d}),Qk({direction:"exit",orientation:t,duration:s,easing:l,delay:d})),{enter:u,exit:f}}const Zk=$k(({element:e,duration:t=Bk.durationNormal,easing:r=Bk.curveEasyEaseMax,exitDuration:o=t,exitEasing:n=r,animateOpacity:i=!0,orientation:a="vertical"})=>Yk({element:e,orientation:a,animateOpacity:i,sizeDuration:t,opacityDuration:t,easing:r,exitSizeDuration:o,exitOpacityDuration:o,exitEasing:n,delay:0,exitDelay:0})),eC=(Kk(Zk,{duration:Bk.durationFast}),Kk(Zk,{duration:Bk.durationSlower}),$k(({element:e,sizeDuration:t=Bk.durationNormal,opacityDuration:r=Bk.durationSlower,easing:o=Bk.curveEasyEase,delay:n=Bk.durationNormal,exitSizeDuration:i=t,exitOpacityDuration:a=r,exitEasing:s=o,exitDelay:c=Bk.durationSlower,animateOpacity:l=!0,orientation:d="vertical"})=>Yk({element:e,orientation:d,animateOpacity:l,sizeDuration:t,opacityDuration:r,easing:o,delay:n,exitSizeDuration:i,exitOpacityDuration:a,exitEasing:s,exitDelay:c})),At),tC=Bt,rC=It,oC="Click",nC="End",iC=Rt,aC=Ot,sC=Et,cC="TypeAhead";const lC={value:"__fuiHeadlessTreeRoot",selectionRef:o.createRef(),layoutRef:o.createRef(),treeItemRef:o.createRef(),subtreeRef:o.createRef(),actionsRef:o.createRef(),expandIconRef:o.createRef(),isActionsVisible:!1,isAsideVisible:!1,itemType:"leaf",open:!1,checked:!1},dC=yv(void 0),{Provider:uC}=dC,fC=e=>wv(dC,(t=lC)=>e(t));function hC(e,t){const{as:r,children:n,...i}=null!=e?e:{};if(null===e){const e=!t.defaultProps.visible&&t.defaultProps.unmountOnExit,r=(t,r)=>e?null:o.createElement(o.Fragment,null,r.children);return{[R]:r,[j]:t.elementType}}const a={...t.defaultProps,...i,[j]:t.elementType};return"function"==typeof n&&(a[R]=n),a}function pC(){const e=o.useRef(null),t=o.useRef(null),{targetDocument:r}=et();!function(){const{targetDocument:e}=et(),r=F(e=>{if("treeitem"===(null==e?void 0:e.getAttribute("role"))&&t.current&&t.current.root.contains(e)){const r=(e=>{let t=e.parentElement;for(;t&&"tree"!==t.getAttribute("role");)t=t.parentElement;return t})(e);if(t.current.root!==r)return;i(e)}});o.useEffect(()=>{const t=hv(e);if(t)return t.focusedElement.subscribe(r),()=>{t.focusedElement.unsubscribe(r),dv(t)}},[r,e])}();const n=o.useCallback(r=>{t.current=r,r.currentElement=r.root;let o=r.firstChild(e=>0===e.tabIndex?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP);if(r.currentElement=r.root,null!=o||(o=r.firstChild()),!o)return;o.tabIndex=0,e.current=o;let n=null;for(;(n=r.nextElement())&&n!==o;)n.tabIndex=-1},[]),i=o.useCallback((t,r)=>{e.current&&(e.current.tabIndex=-1,t.tabIndex=0,t.focus(r),e.current=t)},[]),a=o.useCallback(()=>{null!==e.current&&(null==r?void 0:r.body.contains(e.current))||!t.current||n(t.current)},[r,n]);return{rove:i,initialize:n,forceUpdate:a}}const gC=e=>"treeitem"===e.getAttribute("role")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP;const mC={level:0,contextType:"root",treeType:"nested",selectionMode:"none",openItems:bk.empty,checkedItems:Ck.empty,requestTreeResponse:vC,forceUpdateRovingTabIndex:vC,appearance:"subtle",size:"medium",navigationMode:"tree"};function vC(){}const bC=yv(void 0),yC=e=>wv(bC,(t=mC)=>e(t)),wC="fui-TreeItemLayout",kC="fui-TreeItemLayout__actions",CC=vt("ryb8khq",null,[".ryb8khq{display:flex;align-items:center;min-height:32px;box-sizing:border-box;grid-area:layout;}",".ryb8khq:hover{color:var(--colorNeutralForeground2Hover);background-color:var(--colorSubtleBackgroundHover);}",".ryb8khq:hover .fui-TreeItemLayout__expandIcon{color:var(--colorNeutralForeground3Hover);}",".ryb8khq:active{color:var(--colorNeutralForeground2Pressed);background-color:var(--colorSubtleBackgroundPressed);}",".ryb8khq:active .fui-TreeItemLayout__expandIcon{color:var(--colorNeutralForeground3Pressed);}"]),TC=ye({leaf:{uwmqm3:["f1k1erfc","faevyjx"]},branch:{uwmqm3:["fo100m9","f6yw3pu"]},medium:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},small:{sshi5w:"f1pha7fy",Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm"},subtle:{},"subtle-alpha":{Jwef8y:"f146ro5n",ecr2s2:"fkam630"},transparent:{De3pzq:"f1c21dwh",Jwef8y:"fjxutwb",ecr2s2:"fophhak"}},{d:[".f1k1erfc{padding-left:calc(var(--fluent-TreeItem--level, 1) * var(--spacingHorizontalXXL));}",".faevyjx{padding-right:calc(var(--fluent-TreeItem--level, 1) * var(--spacingHorizontalXXL));}",".fo100m9{padding-left:calc((var(--fluent-TreeItem--level, 1) - 1) * var(--spacingHorizontalXXL));}",".f6yw3pu{padding-right:calc((var(--fluent-TreeItem--level, 1) - 1) * var(--spacingHorizontalXXL));}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".f1pha7fy{min-height:24px;}",".fy9rknc{font-size:var(--fontSizeBase200);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}"],h:[".f146ro5n:hover{background-color:var(--colorSubtleBackgroundLightAlphaHover);}",".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}"],a:[".fkam630:active{background-color:var(--colorSubtleBackgroundLightAlphaPressed);}",".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}"]}),xC=vt("rzvs2in","r17h8a29",[".rzvs2in{display:flex;margin-left:auto;position:relative;z-index:1;grid-area:aside;padding:0 var(--spacingHorizontalS);}",".r17h8a29{display:flex;margin-right:auto;position:relative;z-index:1;grid-area:aside;padding:0 var(--spacingHorizontalS);}"]),SC=vt("r1825u21","rezy0yk",[".r1825u21{display:flex;margin-left:auto;align-items:center;z-index:0;grid-area:aside;padding:0 var(--spacingHorizontalM);gap:var(--spacingHorizontalXS);}",".rezy0yk{display:flex;margin-right:auto;align-items:center;z-index:0;grid-area:aside;padding:0 var(--spacingHorizontalM);gap:var(--spacingHorizontalXS);}"]),IC=vt("rh4pu5o",null,[".rh4pu5o{display:flex;align-items:center;justify-content:center;min-width:24px;box-sizing:border-box;color:var(--colorNeutralForeground3);flex:0 0 auto;padding:var(--spacingVerticalXS) 0;}"]),_C=vt("rklbe47",null,[".rklbe47{padding:0 var(--spacingHorizontalXXS);}"]),EC=vt("rphzgg1",null,[".rphzgg1{display:flex;align-items:center;color:var(--colorNeutralForeground2);line-height:var(--lineHeightBase500);font-size:var(--fontSizeBase500);}"]),AC=ye({medium:{z189sj:["f7x41pl","fruq291"]},small:{z189sj:["ffczdla","fgiv446"]}},{d:[".f7x41pl{padding-right:var(--spacingHorizontalXS);}",".fruq291{padding-left:var(--spacingHorizontalXS);}",".ffczdla{padding-right:var(--spacingHorizontalXXS);}",".fgiv446{padding-left:var(--spacingHorizontalXXS);}"]}),BC=ye({medium:{uwmqm3:["fruq291","f7x41pl"]},small:{uwmqm3:["fgiv446","ffczdla"]}},{d:[".fruq291{padding-left:var(--spacingHorizontalXS);}",".f7x41pl{padding-right:var(--spacingHorizontalXS);}",".fgiv446{padding-left:var(--spacingHorizontalXXS);}",".ffczdla{padding-right:var(--spacingHorizontalXXS);}"]}),OC=()=>{const e=pv(),{targetDocument:t}=et();return{findAllFocusable:o.useCallback((t,r)=>{var o;return t&&(null===(o=e.current)||void 0===o?void 0:o.focusable.findAll({container:t,acceptCondition:r}))||[]},[e]),findFirstFocusable:o.useCallback(t=>{var r;return t&&(null===(r=e.current)||void 0===r?void 0:r.focusable.findFirst({container:t}))},[e]),findLastFocusable:o.useCallback(t=>{var r;return t&&(null===(r=e.current)||void 0===r?void 0:r.focusable.findLast({container:t}))},[e]),findNextFocusable:o.useCallback((r,o={})=>{if(!e.current||!t||!r)return null;const{container:n=t.body}=o;return e.current.focusable.findNext({currentElement:r,container:n})},[e,t]),findPrevFocusable:o.useCallback((r,o={})=>{if(!e.current||!t||!r)return null;const{container:n=t.body}=o;return e.current.focusable.findPrev({currentElement:r,container:n})},[e,t])}};function RC(e="tree"){const{rove:t,initialize:r,forceUpdate:n}=pC(),{findFirstFocusable:i}=OC(),{walkerRef:a,rootRef:s}=function(){const{targetDocument:e}=et(),t=o.useRef(void 0),r=o.useCallback(r=>{t.current=e&&r?function(e,t,r=()=>NodeFilter.FILTER_ACCEPT){let o;const n=t.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(e){if(!Xv(e))return NodeFilter.FILTER_REJECT;const t=r(e);var n;return t===NodeFilter.FILTER_ACCEPT&&null!==(n=null==o?void 0:o(e))&&void 0!==n?n:t}});return{get root(){return n.root},get currentElement(){return n.currentNode},set currentElement(e){n.currentNode=e},firstChild:e=>{o=e;const t=n.firstChild();return o=void 0,t},lastChild:e=>{o=e;const t=n.lastChild();return o=void 0,t},nextElement:e=>{o=e;const t=n.nextNode();return o=void 0,t},nextSibling:e=>{o=e;const t=n.nextSibling();return o=void 0,t},parentElement:e=>{o=e;const t=n.parentNode();return o=void 0,t},previousElement:e=>{o=e;const t=n.previousNode();return o=void 0,t},previousSibling:e=>{o=e;const t=n.previousSibling();return o=void 0,t}}}(r,e,gC):void 0},[e]);return{walkerRef:t,rootRef:r}}(),c=o.useCallback(e=>{e&&a.current&&r(a.current)},[a,r]);return{navigate:function(r,o){const n=(t=>{if(!a.current)return null;switch(t.type){case oC:return t.target;case cC:return a.current.currentElement=t.target,function(e,t){const r=t.toLowerCase(),o=e=>{var t;return(null===(t=e.textContent)||void 0===t?void 0:t.trim().charAt(0).toLowerCase())===r?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP};let n=e.nextElement(o);return n||(e.currentElement=e.root,n=e.nextElement(o)),n}(a.current,t.event.key);case eC:{const r=jC(t.target);return"treegrid"===e&&(null==r?void 0:r.contains(t.target.ownerDocument.activeElement))?t.target:(a.current.currentElement=t.target,a.current.parentElement())}case tC:if("treegrid"===e){const e=jC(t.target);var r;return e&&(null===(r=i(e))||void 0===r||r.focus()),null}return a.current.currentElement=t.target,a.current.firstChild();case nC:return a.current.currentElement=a.current.root,function(e){let t=null,r=null;for(;r=e.lastChild();)t=r;return t}(a.current);case iC:return a.current.currentElement=a.current.root,a.current.firstChild();case sC:return a.current.currentElement=t.target,a.current.nextElement();case aC:return a.current.currentElement=t.target,a.current.previousElement()}})(r);n&&t(n,o)},treeRef:D(s,c),forceUpdateRovingTabIndex:n}}const jC=e=>e.querySelector(`:scope > .${wC} > .${kC}`),PC=(e,t)=>void 0===o.useContext(Ik)?function(e,t){const[r,n]=function(e){return c({state:o.useMemo(()=>e.openItems&&bk.from(e.openItems),[e.openItems]),defaultState:e.defaultOpenItems&&(()=>bk.from(e.defaultOpenItems)),initialState:bk.empty})}(e),i=function(e){return o.useMemo(()=>xk(e.checkedItems),[e.checkedItems])}(e),a=RC(e.navigationMode);return Object.assign(function(e,t){const{appearance:r="subtle",size:n="medium",selectionMode:i="none"}=e,a=o.useMemo(()=>bk.from(e.openItems),[e.openItems]),s=o.useMemo(()=>xk(e.checkedItems),[e.checkedItems]),c=F(t=>{switch(t.requestType){case"navigate":return(t=>{var r;let o=!1;switch(null===(r=e.onNavigation)||void 0===r||r.call(e,t.event,{...t,preventScroll:()=>{o=!0},isScrollPrevented:()=>o}),t.type){case sC:case aC:case iC:case nC:t.event.preventDefault()}})(t);case"open":return(t=>{var r;null===(r=e.onOpenChange)||void 0===r||r.call(e,t.event,{...t,openItems:bk.dangerouslyGetInternalSet(yk(t,a))})})(t);case"selection":return(t=>{var r;"none"!==i&&(null===(r=e.onCheckedChange)||void 0===r||r.call(e,t.event,{...t,selectionMode:i,checkedItems:Ck.dangerouslyGetInternalMap(s)}))})(t)}});var l;return{components:{root:"div",collapseMotion:Zk},contextType:"root",selectionMode:i,navigationMode:null!==(l=e.navigationMode)&&void 0!==l?l:"tree",open:!0,appearance:r,size:n,level:1,openItems:a,checkedItems:s,requestTreeResponse:c,forceUpdateRovingTabIndex:()=>{},root:N(qe("div",{ref:t,role:"tree","aria-multiselectable":"multiselect"===i||void 0,...e}),{elementType:"div"}),collapseMotion:void 0}}({...e,openItems:r,checkedItems:i,onOpenChange:F((t,o)=>{var i;const a=yk(o,r);null===(i=e.onOpenChange)||void 0===i||i.call(e,t,{...o,openItems:bk.dangerouslyGetInternalSet(a)}),n(a)}),onNavigation:F((t,r)=>{var o;null===(o=e.onNavigation)||void 0===o||o.call(e,t,r),t.isDefaultPrevented()||a.navigate(r,{preventScroll:r.isScrollPrevented()})}),onCheckedChange:F((t,r)=>{var o;const n=function(e,t){return"single"===e.selectionMode?Ck.from([[e.value,e.checked]]):"multiselect"===e.selectionMode?t.set(e.value,e.checked):t}(r,i);null===(o=e.onCheckedChange)||void 0===o||o.call(e,t,{...r,checkedItems:Ck.dangerouslyGetInternalMap(n)})})},D(t,a.treeRef)),{treeType:"nested",forceUpdateRovingTabIndex:a.forceUpdateRovingTabIndex})}(e,t):function(e,t){return function(e,t){const r=fC(e=>e.subtreeRef),{level:o}=_k(),n=fC(e=>e.open);return{contextType:"subtree",open:n,components:{root:"div",collapseMotion:Zk},level:o+1,root:N(qe("div",{ref:D(t,r),role:"group",...e}),{elementType:"div"}),collapseMotion:hC(e.collapseMotion,{elementType:Zk,defaultProps:{visible:n,unmountOnExit:!0}})}}(e,t)}(e,t),NC=vt("rnv2ez3",null,[".rnv2ez3{display:flex;flex-direction:column;row-gap:var(--spacingVerticalXXS);}"]),zC=ye({subtree:{z8tnut:"fclwglc"}},{d:[".fclwglc{padding-top:var(--spacingVerticalXXS);}"]}),qC={level:1,contextType:"subtree"},MC=e=>"subtree"===e.value.contextType?o.createElement(Ik.Provider,{value:e.value},e.children):o.createElement(bC.Provider,{value:e.value},o.createElement(Ik.Provider,{value:qC},e.children));MC.displayName="TreeProvider";const FC=o.forwardRef((e,t)=>{const r=PC(e,t),n=function(e){if("root"===e.contextType){const{openItems:t,level:r,contextType:o,treeType:n,checkedItems:i,selectionMode:a,navigationMode:s,appearance:c,size:l,requestTreeResponse:d,forceUpdateRovingTabIndex:u}=e;return{tree:{treeType:n,size:l,openItems:t,appearance:c,checkedItems:i,selectionMode:a,navigationMode:s,contextType:o,level:r,requestTreeResponse:d,forceUpdateRovingTabIndex:u}}}return{tree:o.useMemo(()=>({level:e.level,contextType:"subtree"}),[e.level])}}(r);return(e=>{const t=NC(),r=zC(),o=e.level>1;e.root.className=Z("fui-Tree",t,o&&r.subtree,e.root.className)})(r),Je("useTreeStyles_unstable")(r),((e,t)=>Ue(MC,{value:t.tree,children:e.collapseMotion?Ue(e.collapseMotion,{children:Ue(e.root,{})}):Ue(e.root,{})}))(r,n)});function DC(e,t){if(!e||!t)return!1;if(e===t)return!0;{const r=new WeakSet;for(;t;){const o=uv(t,{skipVirtual:r.has(t)});if(r.add(t),o===e)return!0;t=o}}return!1}FC.displayName="Tree";const LC="data-fui-tree-item-value",HC=vt("r15xhw3a","r2f6k57",[".r15xhw3a{position:relative;cursor:pointer;display:flex;flex-direction:column;box-sizing:border-box;background-color:var(--colorSubtleBackground);color:var(--colorNeutralForeground2);padding-right:var(--spacingHorizontalNone);}",".r15xhw3a:focus{outline-style:none;}",".r15xhw3a:focus-visible{outline-style:none;}",".r15xhw3a[data-fui-focus-visible]>.fui-TreeItemLayout,.r15xhw3a[data-fui-focus-visible]>.fui-TreeItemPersonaLayout{border-radius:var(--borderRadiusMedium);outline-color:var(--colorStrokeFocus2);outline-radius:var(--borderRadiusMedium);outline-width:2px;outline-style:solid;}",".r2f6k57{position:relative;cursor:pointer;display:flex;flex-direction:column;box-sizing:border-box;background-color:var(--colorSubtleBackground);color:var(--colorNeutralForeground2);padding-left:var(--spacingHorizontalNone);}",".r2f6k57:focus{outline-style:none;}",".r2f6k57:focus-visible{outline-style:none;}",".r2f6k57[data-fui-focus-visible]>.fui-TreeItemLayout,.r2f6k57[data-fui-focus-visible]>.fui-TreeItemPersonaLayout{border-radius:var(--borderRadiusMedium);outline-color:var(--colorStrokeFocus2);outline-radius:var(--borderRadiusMedium);outline-width:2px;outline-style:solid;}"]),UC=ye({level1:{iytv0q:"f10bgyvd"},level2:{iytv0q:"f1h0rod3"},level3:{iytv0q:"fgoqafk"},level4:{iytv0q:"f75dvuh"},level5:{iytv0q:"fqk7yw6"},level6:{iytv0q:"f1r3z17b"},level7:{iytv0q:"f1hrpd1h"},level8:{iytv0q:"f1iy65d0"},level9:{iytv0q:"ftg42e5"},level10:{iytv0q:"fyat3t"}},{d:[".f10bgyvd{--fluent-TreeItem--level:1;}",".f1h0rod3{--fluent-TreeItem--level:2;}",".fgoqafk{--fluent-TreeItem--level:3;}",".f75dvuh{--fluent-TreeItem--level:4;}",".fqk7yw6{--fluent-TreeItem--level:5;}",".f1r3z17b{--fluent-TreeItem--level:6;}",".f1hrpd1h{--fluent-TreeItem--level:7;}",".f1iy65d0{--fluent-TreeItem--level:8;}",".ftg42e5{--fluent-TreeItem--level:9;}",".fyat3t{--fluent-TreeItem--level:10;}"]}),WC=o.forwardRef((e,t)=>{const r=function(e,t){yC(e=>e.treeType);const r=yC(e=>e.requestTreeResponse),n=yC(e=>{var t;return null!==(t=e.navigationMode)&&void 0!==t?t:"tree"}),i=yC(e=>e.forceUpdateRovingTabIndex),{level:a}=_k(),s=fC(t=>{var r;return null!==(r=e.parentValue)&&void 0!==r?r:t.value}),c=O("fuiTreeItemValue-");var l;const d=null!==(l=e.value)&&void 0!==l?l:c,{onClick:u,onKeyDown:f,onChange:h,as:p="div",itemType:g="leaf","aria-level":m=a,"aria-selected":v,"aria-expanded":b,...y}=e,w=o.useRef(null),k=o.useRef(null),C=o.useRef(null),T=o.useRef(null),x=o.useRef(null),S=o.useRef(null);o.useEffect(()=>{null==i||i();const e=S.current;return()=>{e&&0===e.tabIndex&&(null==i||i())}},[i]);const I=yC(t=>{var r;return null!==(r=e.open)&&void 0!==r?r:t.openItems.has(d)}),_=()=>"branch"===g?!I:I,E=yC(e=>e.selectionMode),A=yC(e=>{var t;return null!==(t=e.checkedItems.get(d))&&void 0!==t&&t}),B=F(t=>{var o;const n=null===(o=k.current)||void 0===o?void 0:o.contains(t.target);var i;w.current&&DC(w.current,t.target)||T.current&&DC(T.current,t.target)||(null===(i=x.current)||void 0===i?void 0:i.contains(t.target))||(n||null==u||u(t),t.isDefaultPrevented()||$w.unstable_batchedUpdates(()=>{const o={event:t,value:d,open:_(),target:t.currentTarget,type:n?"ExpandIconClick":oC};var i;"leaf"!==g&&(null===(i=e.onOpenChange)||void 0===i||i.call(e,t,o),r({...o,itemType:g,requestType:"open"})),r({...o,itemType:g,parentValue:s,requestType:"navigate",type:oC})}))}),R=F(t=>{if(null==f||f(t),t.isDefaultPrevented()||!S.current)return;const o=t.currentTarget===t.target,i=w.current&&w.current.contains(t.target);switch(t.key){case _t:if(!o)return;var a;return void("none"!==E&&(null===(a=x.current)||void 0===a||a.click(),t.preventDefault()));case rC:if(!o)return;return t.currentTarget.click();case nC:case iC:case aC:if(!o&&!i)return;return r({requestType:"navigate",event:t,value:d,itemType:g,parentValue:s,type:t.key,target:t.currentTarget});case sC:if(!o&&!i)return;if(i&&(!Xv(t.target)||t.target.hasAttribute("aria-haspopup")))return;return r({requestType:"navigate",event:t,value:d,itemType:g,parentValue:s,type:t.key,target:t.currentTarget});case eC:{if(t.altKey)return;const a={value:d,event:t,open:_(),type:t.key,itemType:g,parentValue:s,target:t.currentTarget};if(i&&"treegrid"===n)return void r({...a,requestType:"navigate"});if(!o)return;if(1===m&&!I)return;var c;return I&&(null===(c=e.onOpenChange)||void 0===c||c.call(e,t,a)),void r({...a,requestType:I?"open":"navigate"})}case tC:{if(!o)return;if(t.altKey)return;const n={value:d,event:t,open:_(),type:t.key,target:t.currentTarget};var l;return void("branch"!==g||I?r({...n,itemType:g,parentValue:s,requestType:"navigate"}):(null===(l=e.onOpenChange)||void 0===l||l.call(e,t,n),r({...n,itemType:g,requestType:"open"})))}}o&&1===t.key.length&&t.key.match(/\w/)&&!t.altKey&&!t.ctrlKey&&!t.metaKey&&r({requestType:"navigate",event:t,target:t.currentTarget,value:d,itemType:g,type:cC,parentValue:s})}),j=F(e=>{null==h||h(e),e.isDefaultPrevented()||T.current&&DC(T.current,e.target)||r({requestType:"selection",event:e,value:d,itemType:g,type:"Change",target:e.currentTarget,checked:"mixed"===A||!A})});return{value:d,open:I,checked:A,subtreeRef:T,layoutRef:C,selectionRef:x,expandIconRef:k,treeItemRef:S,actionsRef:w,itemType:g,level:m,components:{root:"div"},isAsideVisible:!1,isActionsVisible:!1,root:N(qe(p,{tabIndex:-1,[LC]:d,role:"treeitem",...y,ref:D(t,S),"aria-level":m,"aria-checked":"multiselect"===E?A:void 0,"aria-selected":void 0!==v?v:"single"===E?!!A:void 0,"aria-expanded":void 0!==b?b:"branch"===g?I:void 0,onClick:B,onKeyDown:R,onChange:j}),{elementType:"div"})}}(e,t);(e=>{const t=HC(),r=UC(),{level:o}=e;e.root.className=Z("fui-TreeItem",t,function(e){return e>=1&&e<=10}(o)&&r[`level${o}`],e.root.className)})(r),Je("useTreeItemStyles_unstable")(r);const n=function(e){const{value:t,itemType:r,layoutRef:o,subtreeRef:n,open:i,expandIconRef:a,actionsRef:s,treeItemRef:c,isActionsVisible:l,isAsideVisible:d,selectionRef:u,checked:f}=e;return{treeItem:{value:t,checked:f,itemType:r,layoutRef:o,subtreeRef:n,open:i,selectionRef:u,isActionsVisible:l,isAsideVisible:d,actionsRef:s,treeItemRef:c,expandIconRef:a}}}(r);return((e,t)=>Ue(e.root,{children:Ue(uC,{value:t.treeItem,children:e.root.children})}))(r,n)});function VC(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&!o.isValidElement(e)}WC.displayName="TreeItem";const $C=o.createContext(void 0),KC={},GC=($C.Provider,()=>o.useContext($C)||KC),JC=vt("r1siqwd8","rmnplyc",{r:[".r1siqwd8{display:inline-flex;position:relative;}",".r1siqwd8:focus{outline-style:none;}",".r1siqwd8:focus-visible{outline-style:none;}",".r1siqwd8[data-fui-focus-within]:focus-within{border-top-color:transparent;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent;}",'.r1siqwd8[data-fui-focus-within]:focus-within::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);right:calc(2px * -1);bottom:calc(2px * -1);left:calc(2px * -1);}',".rmnplyc{display:inline-flex;position:relative;}",".rmnplyc:focus{outline-style:none;}",".rmnplyc:focus-visible{outline-style:none;}",".rmnplyc[data-fui-focus-within]:focus-within{border-top-color:transparent;border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;}",'.rmnplyc[data-fui-focus-within]:focus-within::after{content:"";position:absolute;pointer-events:none;z-index:1;border:2px solid var(--colorStrokeFocus2);border-radius:var(--borderRadiusMedium);top:calc(2px * -1);left:calc(2px * -1);bottom:calc(2px * -1);right:calc(2px * -1);}'],s:["@media (forced-colors: active){.r1siqwd8[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-right-color:Highlight;border-bottom-color:Highlight;border-left-color:Highlight;}}","@media (forced-colors: active){.rmnplyc[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;border-left-color:Highlight;border-bottom-color:Highlight;border-right-color:Highlight;}}"]}),QC=ye({vertical:{Beiy3e4:"f1vx9l62",Bt984gj:"f122n59"}},{d:[".f1vx9l62{flex-direction:column;}",".f122n59{align-items:center;}"]}),XC=vt("rg1upok","rzwdzb4",{r:[".rg1upok{position:absolute;left:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}",".rg1upok:enabled{cursor:pointer;}",".rg1upok:enabled~.fui-Radio__label{cursor:pointer;}",".rg1upok:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}",".rg1upok:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}",".rg1upok:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}",".rg1upok:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}",".rg1upok:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}",".rg1upok:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}",".rg1upok:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}",".rg1upok:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}",".rg1upok:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}",".rg1upok:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}",".rg1upok:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}",".rg1upok:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}",".rzwdzb4{position:absolute;right:0;top:0;width:calc(16px + 2 * var(--spacingHorizontalS));height:100%;box-sizing:border-box;margin:0;opacity:0;}",".rzwdzb4:enabled{cursor:pointer;}",".rzwdzb4:enabled~.fui-Radio__label{cursor:pointer;}",".rzwdzb4:enabled:not(:checked)~.fui-Radio__label{color:var(--colorNeutralForeground3);}",".rzwdzb4:enabled:not(:checked)~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessible);}",".rzwdzb4:enabled:not(:checked):hover~.fui-Radio__label{color:var(--colorNeutralForeground2);}",".rzwdzb4:enabled:not(:checked):hover~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessibleHover);}",".rzwdzb4:enabled:not(:checked):hover:active~.fui-Radio__label{color:var(--colorNeutralForeground1);}",".rzwdzb4:enabled:not(:checked):hover:active~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeAccessiblePressed);}",".rzwdzb4:enabled:checked~.fui-Radio__label{color:var(--colorNeutralForeground1);}",".rzwdzb4:enabled:checked~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStroke);color:var(--colorCompoundBrandForeground1);}",".rzwdzb4:enabled:checked:hover~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokeHover);color:var(--colorCompoundBrandForeground1Hover);}",".rzwdzb4:enabled:checked:hover:active~.fui-Radio__indicator{border-color:var(--colorCompoundBrandStrokePressed);color:var(--colorCompoundBrandForeground1Pressed);}",".rzwdzb4:disabled~.fui-Radio__label{color:var(--colorNeutralForegroundDisabled);cursor:default;}",".rzwdzb4:disabled~.fui-Radio__indicator{border-color:var(--colorNeutralStrokeDisabled);color:var(--colorNeutralForegroundDisabled);}"],s:["@media (forced-colors: active){.rg1upok:enabled:not(:checked)~.fui-Radio__indicator{border-color:ButtonBorder;}}","@media (forced-colors: active){.rg1upok:enabled:checked~.fui-Radio__indicator{border-color:Highlight;color:Highlight;}.rg1upok:enabled:checked~.fui-Radio__indicator::after{background-color:Highlight;}}","@media (forced-colors: active){.rg1upok:disabled~.fui-Radio__label{color:GrayText;}}","@media (forced-colors: active){.rg1upok:disabled~.fui-Radio__indicator{border-color:GrayText;color:GrayText;}.rg1upok:disabled~.fui-Radio__indicator::after{background-color:GrayText;}}","@media (forced-colors: active){.rzwdzb4:enabled:not(:checked)~.fui-Radio__indicator{border-color:ButtonBorder;}}","@media (forced-colors: active){.rzwdzb4:enabled:checked~.fui-Radio__indicator{border-color:Highlight;color:Highlight;}.rzwdzb4:enabled:checked~.fui-Radio__indicator::after{background-color:Highlight;}}","@media (forced-colors: active){.rzwdzb4:disabled~.fui-Radio__label{color:GrayText;}}","@media (forced-colors: active){.rzwdzb4:disabled~.fui-Radio__indicator{border-color:GrayText;color:GrayText;}.rzwdzb4:disabled~.fui-Radio__indicator::after{background-color:GrayText;}}"]}),YC=ye({below:{a9b677:"fly5x3f",Bqenvij:"f1je6zif"},defaultIndicator:{Blbys7f:"f9ma1gx"},customIndicator:{Bj53wkj:"f12zxao0"}},{d:[".fly5x3f{width:100%;}",".f1je6zif{height:calc(16px + 2 * var(--spacingVerticalS));}",'.f9ma1gx:checked~.fui-Radio__indicator::after{content:"";}',".f12zxao0:not(:checked)~.fui-Radio__indicator>*{opacity:0;}"]}),ZC=vt("rwtekvw",null,[".rwtekvw{position:relative;width:16px;height:16px;font-size:12px;box-sizing:border-box;flex-shrink:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border:var(--strokeWidthThin) solid;border-radius:var(--borderRadiusCircular);margin:var(--spacingVerticalS) var(--spacingHorizontalS);fill:currentColor;pointer-events:none;}",".rwtekvw::after{position:absolute;width:16px;height:16px;border-radius:var(--borderRadiusCircular);transform:scale(0.625);background-color:currentColor;}"]),eT=ye({base:{qb2dma:"f7nlbp4",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1f5q0n8"},after:{uwmqm3:["fruq291","f7x41pl"],B6of3ja:"fjzwpt6",jrapky:"fh6j2fo"},below:{z8tnut:"f1ywm7hm",fsow6f:"f17mccla"}},{d:[".f7nlbp4{align-self:center;}",[".f1f5q0n8{padding:var(--spacingVerticalS) var(--spacingHorizontalS);}",{p:-1}],".fruq291{padding-left:var(--spacingHorizontalXS);}",".f7x41pl{padding-right:var(--spacingHorizontalXS);}",".fjzwpt6{margin-top:calc((16px - var(--lineHeightBase300)) / 2);}",".fh6j2fo{margin-bottom:calc((16px - var(--lineHeightBase300)) / 2);}",".f1ywm7hm{padding-top:var(--spacingVerticalXS);}",".f17mccla{text-align:center;}"]}),tT=o.forwardRef((e,t)=>{const r=((e,t)=>{const r=GC(),{name:o=r.name,checked:n=(void 0!==r.value?r.value===e.value:void 0),defaultChecked:i=(void 0!==r.defaultValue?r.defaultValue===e.value:void 0),labelPosition:a=("horizontal-stacked"===r.layout?"below":"after"),disabled:s=r.disabled,required:c=r.required,"aria-describedby":l=r["aria-describedby"],onChange:d}=e,u=S({props:e,primarySlotTagName:"input",excludedPropNames:["checked","defaultChecked","onChange"]}),f=N(e.root,{defaultProps:{ref:mt(),...u.root},elementType:"span"}),h=N(e.input,{defaultProps:{ref:t,type:"radio",id:O("radio-",u.primary.id),name:o,checked:n,defaultChecked:i,disabled:s,required:c,"aria-describedby":l,...u.primary},elementType:"input"});h.onChange=_v(h.onChange,e=>null==d?void 0:d(e,{value:e.currentTarget.value}));const p=z(e.label,{defaultProps:{htmlFor:h.id,disabled:h.disabled},elementType:Qe}),g=N(e.indicator,{defaultProps:{"aria-hidden":!0},elementType:"div"});return{labelPosition:a,components:{root:"span",input:"input",label:Qe,indicator:"div"},root:f,input:h,label:p,indicator:g}})(e,t);return(e=>{const{labelPosition:t}=e,r=JC(),o=QC();e.root.className=Z("fui-Radio",r,"below"===t&&o.vertical,e.root.className);const n=XC(),i=YC();e.input.className=Z("fui-Radio__input",n,"below"===t&&i.below,e.indicator.children?i.customIndicator:i.defaultIndicator,e.input.className);const a=ZC();e.indicator.className=Z("fui-Radio__indicator",a,e.indicator.className);const s=eT();e.label&&(e.label.className=Z("fui-Radio__label",s.base,s[t],e.label.className))})(r),Je("useRadioStyles_unstable")(r),(e=>We(e.root,{children:[Ue(e.input,{}),Ue(e.indicator,{}),e.label&&Ue(e.label,{})]}))(r)});tT.displayName="Radio";const rT=Ce("ChevronRight12Regular","12",["M4.65 2.15a.5.5 0 0 0 0 .7L7.79 6 4.65 9.15a.5.5 0 1 0 .7.7l3.5-3.5a.5.5 0 0 0 0-.7l-3.5-3.5a.5.5 0 0 0-.7 0Z"]),oT=o.memo(()=>{const e=fC(e=>e.open),{dir:t}=et(),r=e?90:"rtl"!==t?0:180;return o.createElement(rT,{style:{...nT[r],transition:`transform ${Ek.durationNormal}ms ${Ak.curveEasyEaseMax}`}})});oT.displayName="TreeItemChevron";const nT={90:{transform:"rotate(90deg)"},0:{transform:"rotate(0deg)"},180:{transform:"rotate(180deg)"}};const iT=o.forwardRef((e,t)=>{const r=((e,t)=>{const{main:r,iconAfter:n,iconBefore:i}=e,a=fC(e=>e.layoutRef),s=yC(e=>e.selectionMode),l=yC(e=>{var t;return null!==(t=e.navigationMode)&&void 0!==t?t:"tree"}),[d,u]=VC(e.actions)?[e.actions.visible,e.actions.onVisibilityChange]:[void 0,void 0],[f,h]=c({state:d,initialState:!1}),p=fC(e=>e.selectionRef),g=fC(e=>e.expandIconRef),m=fC(e=>e.actionsRef),v=o.useRef(null),b=fC(e=>e.treeItemRef),y=fC(e=>e.subtreeRef),w=fC(e=>e.checked),k=fC(e=>"branch"===e.itemType),C=o.useCallback(e=>{if(!Boolean(y.current&&DC(y.current,e.target))){if(null==u||u(e,{visible:!0,event:e,type:e.type}),e.defaultPrevented)return;h(!0)}},[y,h,u]),{targetDocument:T}=et(),x=Tw(),S=o.useCallback(e=>{if(Boolean(v.current&&DC(v.current,e.relatedTarget))){if(null==u||u(e,{visible:!0,event:e,type:e.type}),e.defaultPrevented)return;h(!0)}else{var t;Boolean(null===(t=v.current)||void 0===t?void 0:t.contains(e.target))&&Boolean(b.current&&DC(b.current,e.relatedTarget))||"mouseout"===e.type&&x()&&((null==T?void 0:T.activeElement)===b.current||DC(v.current,null==T?void 0:T.activeElement))||(null==u||u(e,{visible:!1,event:e,type:e.type}),e.defaultPrevented||h(!1))}},[h,u,b,x,T]),I=z(e.expandIcon,{renderByDefault:k,defaultProps:{children:o.createElement(oT,null),"aria-hidden":!0},elementType:"div"}),_=D(null==I?void 0:I.ref,g);I&&(I.ref=_);const E=mv({circular:"tree"===l,axis:"horizontal"}),A=f?z(e.actions,{defaultProps:{...E,role:"toolbar"},elementType:"div"}):void 0;null==A||delete A.visible,null==A||delete A.onVisibilityChange;const B=D(null==A?void 0:A.ref,m,v),O=F(t=>{var r,o;VC(e.actions)&&(null===(r=(o=e.actions).onBlur)||void 0===r||r.call(o,t));const n=Boolean(DC(t.currentTarget,t.relatedTarget));null==u||u(t,{visible:n,event:t,type:t.type}),h(n)});A&&(A.ref=B,A.onBlur=O);const R=Boolean(e.actions);return o.useEffect(()=>{if(b.current&&R){const e=b.current,t=C,r=S,o=C,n=S;return e.addEventListener("mouseover",t),e.addEventListener("mouseout",r),e.addEventListener("focus",o),e.addEventListener("blur",n),()=>{e.removeEventListener("mouseover",t),e.removeEventListener("mouseout",r),e.removeEventListener("focus",o),e.removeEventListener("blur",n)}}},[R,b,C,S]),{components:{root:"div",expandIcon:"div",iconBefore:"div",main:"div",iconAfter:"div",actions:"div",aside:"div",selector:"multiselect"===s?St:tT},buttonContextValue:{size:"small"},root:N(qe("div",{...e,ref:D(t,a)}),{elementType:"div"}),iconBefore:z(i,{elementType:"div"}),main:N(r,{elementType:"div"}),iconAfter:z(n,{elementType:"div"}),aside:f?void 0:z(e.aside,{elementType:"div"}),actions:A,expandIcon:I,selector:z(e.selector,{renderByDefault:"none"!==s,defaultProps:{checked:w,tabIndex:-1,"aria-hidden":!0,ref:p},elementType:"multiselect"===s?St:tT})}})(e,t);return(e=>{const{main:t,iconAfter:r,iconBefore:o,expandIcon:n,root:i,aside:a,actions:s,selector:c}=e,l=TC(),d=CC(),u=xC(),f=SC(),h=_C(),p=IC(),g=EC(),m=AC(),v=BC(),b=yC(e=>e.size),y=yC(e=>e.appearance),w=fC(e=>e.itemType);i.className=Z(wC,d,l[y],l[b],l[w],i.className),t.className=Z("fui-TreeItemLayout__main",h,t.className),n&&(n.className=Z("fui-TreeItemLayout__expandIcon",p,n.className)),o&&(o.className=Z("fui-TreeItemLayout__iconBefore",g,m[b],o.className)),r&&(r.className=Z("fui-TreeItemLayout__iconAfter",g,v[b],r.className)),s&&(s.className=Z(kC,u,s.className)),a&&(a.className=Z("fui-TreeItemLayout__aside",f,a.className)),c&&(c.className=Z("fui-TreeItemLayout__selector",c.className))})(r),Je("useTreeItemLayoutStyles_unstable")(r),(e=>We(e.root,{children:[e.expandIcon&&Ue(e.expandIcon,{}),e.selector&&Ue(e.selector,{}),e.iconBefore&&Ue(e.iconBefore,{}),Ue(e.main,{children:e.root.children}),e.iconAfter&&Ue(e.iconAfter,{}),We(qt,{value:e.buttonContextValue,children:[e.actions&&Ue(e.actions,{}),e.aside&&Ue(e.aside,{})]})]}))(r)});iT.displayName="TreeItemLayout";var aT=({name:e,availableWidth:t=180})=>{const r=(0,o.useRef)(null),[n,i]=(0,o.useState)(!1);(0,o.useLayoutEffect)(()=>{const e=r.current;e&&i(e.scrollWidth>e.offsetWidth)},[e,t]);const a=o.createElement("span",{ref:r,style:{width:t,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"middle"}},e);return n?o.createElement(Jw,{content:e,relationship:"label"},a):a},sT=r(64583).Promise,cT=function(e,t,r,o){return new(r||(r=sT))(function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},lT=({docuvitaApi:e,folderTree:t,setFolderTree:r,setFolderTreeVersion:n,selectedFolder:i,parentObjectTypes:a,objectRelations:s,isAttachment:c=!1,handleCopy:l,handleLink:d,archivedObject:u})=>{const[f,h]=(0,o.useState)(!0),[p,g]=(0,o.useState)([]),m=(0,o.useRef)(null);(0,o.useEffect)(()=>{t&&t.length>0&&h(!1)},[t]),(0,o.useEffect)(()=>{u&&t&&0!==t.length&&s&&0!==s.length&&m.current!==u&&(m.current=u,cT(void 0,void 0,void 0,function*(){let o=t,i=new Set(p);const a=new Set;if(Array.isArray(s))for(const t of s){const r=yield e.getParentObjectIds(Number(t.Objectid),!0);if(r&&r.length>1)for(let t=0;t{for(const r of e){if(r.objectId===n)return r;if(r.children){const e=t(r.children);if(e)return e}}},r=t(o);if(r&&void 0===r.children){const t=yield e.getFolderChildren(n);o=b(o,n,t),o=w(o),a.add(n)}}i.add(String(r[t]))}}r(o),n(e=>e+1);const c=Array.from(new Set([...p||[],...i]));g(c)}))},[u,t,s]),(0,o.useEffect)(()=>{if(!(0===p.length&&t.length>0))return;const e=t.map(e=>e.objectId.toString());let r=[];if(i){const e=(t,r,o=[])=>{for(const n of t){if(n.objectId===r)return[...o,n.objectId.toString()];if(n.children){const t=e(n.children,r,[...o,n.objectId.toString()]);if(t)return t}}return null},o=e(t,i);o&&(r=o.slice(0,-1))}const o=new Set([...e,...r]);g(Array.from(o))},[i,t]);const v=(e,t,r=0)=>{let o=[];for(const n of e)o.push({folder:n,value:n.objectId.toString(),parentValue:t,level:r}),Array.isArray(n.children)&&n.children.length>0&&(o=o.concat(v(n.children,n.objectId.toString(),r+1)));return o},b=(e,t,r)=>e.map(e=>{if(e.objectId===t){if(e.children&&Array.isArray(e.children)){const t=new Set(e.children.map(e=>e.objectId)),o=r.filter(e=>!t.has(e.objectId));return Object.assign(Object.assign({},e),{children:[...e.children,...o]})}return Object.assign(Object.assign({},e),{children:r})}return e.children&&e.children.length>0?Object.assign(Object.assign({},e),{children:b(e.children,t,r)}):e}),y=(0,o.useCallback)(()=>{},[]),w=e=>JSON.parse(JSON.stringify(e)),k=(0,o.useMemo)(()=>v(t),[t]),C=(0,o.useMemo)(()=>((e,t)=>{const r=[],o=new Set(t),n=(e,t)=>{if(!e.parentValue)return!0;if(!o.has(e.parentValue))return!1;const r=t.get(e.parentValue);return!r||n(r,t)},i=new Map(e.map(e=>[e.value,e]));for(const t of e)n(t,i)&&r.push(t);return r})(k,p),[k,p]);return o.createElement("div",{style:{width:"100%"}},f?o.createElement("div",null,"Ordner werden geladen..."):o.createElement(FC,{"aria-label":"Docuvita Ordnerbaum",openItems:p,onOpenChange:(o,i)=>cT(void 0,void 0,void 0,function*(){const o=Array.from(i.openItems),a=[...p,...o].filter((e,t,r)=>r.indexOf(e)===r.lastIndexOf(e))[0];if(!a)return void g(o);if(p.includes(a))return void g(o.filter(e=>e!==a));g(o);const s=parseInt(a,10),c=e=>{for(const t of e){if(t.objectId===s)return t;if(t.children){const e=c(t.children);if(e)return e}}},l=c(t);if(l&&void 0===l.children){const o=yield e.getFolderChildren(s),i=b(t,s,o),a=w(i);r(a),n(e=>e+1),g(e=>Array.from(new Set([...e||[],s.toString()])))}})},C.map(({folder:e,value:t,parentValue:r,level:n})=>{const s=!a.find(t=>t.objectTypeId===e.objectType),u=void 0===e.children,f=Array.isArray(e.children)&&e.children.length>0,h=Array.isArray(e.children)&&0===e.children.length,p=10*n,g=190-p,m=u||f?"branch":"leaf";return o.createElement(WC,{key:t,value:t,parentValue:r,itemType:m},o.createElement(iT,{style:{background:i===e.objectId?"#e5f1fb":void 0,fontWeight:i===e.objectId?"bold":void 0,display:"flex",alignItems:"center",gap:8,paddingLeft:p,minWidth:0},onClick:y},h&&o.createElement("span",{style:{width:32,minWidth:32,flexShrink:0,display:"inline-block",visibility:"hidden",fontSize:"12px",lineHeight:1}},"▶"),o.createElement(aT,{name:e.name,availableWidth:g}),o.createElement(o.Fragment,null,c&&!s&&o.createElement(Jw,{content:"Hierher kopieren",relationship:"label"},o.createElement(Vt,{icon:o.createElement(Ee,null),size:"small",appearance:"subtle","aria-label":"Hierher kopieren",onClick:t=>{t.stopPropagation(),l&&l(e.objectId)},disabled:c&&e.isAttachmentCopied||!c&&e.isMailCopied,style:c&&e.isAttachmentCopied||!c&&e.isMailCopied?{border:"1px solid #0078d4",fontWeight:"bold",background:"#d1fadf",borderRadius:4}:void 0})),o.createElement(Jw,{content:"Hierher verknüpfen",relationship:"label"},o.createElement(Vt,{icon:o.createElement(Gv,null),size:"small",appearance:"subtle","aria-label":"Hierher verknüpfen",onClick:t=>{t.stopPropagation(),d&&d(e.objectId)},style:c&&e.isAttachmentLinked||!c&&e.isMailLinked?{border:"1px solid #0078d4",fontWeight:"bold",background:"#d1fadf",borderRadius:4}:void 0})))))})))},dT=({docuvitaApi:e,folderTree:t,setFolderTree:r,setFolderTreeVersion:n,selectedFolder:i,parentObjectTypes:a,objectRelations:s,handleLink:c,archivedObject:l})=>{const d=Lg(),[u,f]=(0,o.useState)(!1);return o.createElement("form",{className:d.form},o.createElement("fieldset",{className:d.fieldset_v},o.createElement("legend",{className:d.legend},"docuvita Ordner Ablage"," ",o.createElement(Vt,{size:"small",appearance:"subtle",onClick:()=>f(e=>!e),"aria-expanded":!u,"aria-controls":"attachmentfolder-content",style:{marginLeft:8},icon:u?o.createElement(Se,null):o.createElement(Ie,null)})),!u&&o.createElement("div",{id:"attachmentfolder-content"},o.createElement(lT,{docuvitaApi:e,folderTree:t,setFolderTree:r,setFolderTreeVersion:n,selectedFolder:i,parentObjectTypes:a,objectRelations:s,isAttachment:!1,handleLink:c,archivedObject:l}))))};function uT(e){const t=Cw(),r=F(e);o.useEffect(()=>{const e=t.current;if(e){const t=e=>{r(e)};return e.subscribe(t),t(e.isNavigatingWithKeyboard()),()=>{e.unsubscribe(t)}}},[t,r])}const fT="data-activedescendant",hT="data-activedescendant-focusvisible",pT=e=>{if(!e)return;const t=gT(e.parentElement);if(!t)return;const{offsetHeight:r}=e,o=mT(e,t),{scrollMarginTop:n,scrollMarginBottom:i}=vT(e),{offsetHeight:a,scrollTop:s}=t,c=o+r+i>s+a;o-ne?e.scrollHeight>e.offsetHeight?e:gT(e.parentElement):null,mT=(e,t)=>e&&e!==t?e.contains(t)?-1*t.offsetTop:e.offsetTop+mT(e.offsetParent,t):0,vT=e=>{var t;const r=null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView;if(!r)return{scrollMarginTop:0,scrollMarginBottom:0};const o=r.getComputedStyle(e);var n,i;return{scrollMarginTop:null!==(n=bT(o.scrollMarginTop))&&void 0!==n?n:bT(o.scrollMarginBlockStart),scrollMarginBottom:null!==(i=bT(o.scrollMarginBottom))&&void 0!==i?i:bT(o.scrollMarginBlockEnd)}},bT=e=>e?parseInt(e,10):0;function yT(e){const{imperativeRef:t,matchOption:r}=e,n=o.useRef(!1),i=o.useRef(!0),a=o.useRef(null),s=o.useRef(null),c=o.useRef(null),l=o.useRef(!0),d=o.useCallback(()=>{var e;null===(e=c.current)||void 0===e||e.removeAttribute("aria-activedescendant")},[]),u=o.useCallback(e=>{var t;e&&(a.current=e),l.current&&a.current&&(null===(t=c.current)||void 0===t||t.setAttribute("aria-activedescendant",a.current))},[]);uT(e=>{n.current=e;const t=m();t&&(e&&i.current?t.setAttribute(hT,""):t.removeAttribute(hT))});const f=F(r),h=o.useRef(null),{optionWalker:p,listboxCallbackRef:g}=function(e){const{matchOption:t}=e,{targetDocument:r}=et(),n=o.useRef(null),i=o.useRef(null),a=o.useCallback(e=>Xv(e)&&t(e)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,[t]),s=o.useCallback(e=>{e&&r?(i.current=e,n.current=r.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,a)):(i.current=null,n.current=null)},[r,a]);return{optionWalker:o.useMemo(()=>({first:()=>n.current&&i.current?(n.current.currentNode=i.current,n.current.firstChild()):null,last:()=>n.current&&i.current?(n.current.currentNode=i.current,n.current.lastChild()):null,next:()=>n.current?n.current.nextNode():null,prev:()=>n.current?n.current.previousNode():null,find:(e,t)=>{if(!n.current||!i.current)return null;const o=t?null==r?void 0:r.getElementById(t):null;n.current.currentNode=null!=o?o:i.current;let a=n.current.currentNode;for(;a&&!e(a.id);)a=n.current.nextNode();return a},setCurrent:e=>{n.current&&(n.current.currentNode=e)}}),[r]),listboxCallbackRef:s}}({matchOption:f}),m=o.useCallback(()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.querySelector(`#${a.current}`)},[h]),v=o.useCallback(e=>{i.current=e;const t=m();t&&(e&&n.current?t.setAttribute(hT,""):t.removeAttribute(hT))},[m]),b=o.useCallback(()=>{const e=m();var t;return e&&(e.removeAttribute(fT),e.removeAttribute(hT)),d(),s.current=a.current,a.current=null,null!==(t=null==e?void 0:e.id)&&void 0!==t?t:null},[m,d]),y=o.useCallback(e=>{if(!e)return;const t=b();pT(e),u(e.id),e.setAttribute(fT,""),n.current&&i.current&&e.setAttribute(hT,"");const r=(o={id:e.id,previousId:t},new CustomEvent("activedescendantchange",{bubbles:!0,cancelable:!1,composed:!0,detail:o}));var o;e.dispatchEvent(r)},[b,u]),w=o.useMemo(()=>({first:({passive:e}={})=>{const t=p.first();return e||y(t),null==t?void 0:t.id},last:({passive:e}={})=>{const t=p.last();return e||y(t),null==t?void 0:t.id},next:({passive:e}={})=>{const t=m();if(!t)return;p.setCurrent(t);const r=p.next();return e||y(r),null==r?void 0:r.id},prev:({passive:e}={})=>{const t=m();if(!t)return;p.setCurrent(t);const r=p.prev();return e||y(r),null==r?void 0:r.id},blur:()=>{b()},active:()=>{var e;return null===(e=m())||void 0===e?void 0:e.id},focus:e=>{if(!h.current)return;const t=h.current.querySelector(`#${e}`);t&&y(t)},focusLastActive:()=>{if(!h.current||!s.current)return;const e=h.current.querySelector(`#${s.current}`);return e?(y(e),!0):void 0},find(e,{passive:t,startFrom:r}={}){const o=p.find(e,r);return t||y(o),null==o?void 0:o.id},scrollActiveIntoView:()=>{if(!h.current)return;const e=m();e&&pT(e)},showAttributes(){l.current=!0,u()},hideAttributes(){l.current=!1,d()},showFocusVisibleAttributes(){v(!0)},hideFocusVisibleAttributes(){v(!1)}}),[p,h,u,d,y,b,m,v]);return o.useImperativeHandle(t,()=>w),{listboxRef:D(h,g),activeParentRef:c,controller:w}}const wT=(e,t)=>!!(null==e?void 0:e.contains(t)),kT="fuiframefocus",CT=()=>{const e=o.useRef(new Map),t=o.useMemo(()=>({getCount:()=>e.current.size,getOptionAtIndex:()=>{},getIndexOfId:()=>-1,getOptionById:t=>e.current.get(t),getOptionsMatchingText:t=>Array.from(e.current.values()).filter(({text:e})=>t(e)),getOptionsMatchingValue:t=>{const r=[];for(const o of e.current.values())t(o.value)&&r.push(o);return r}}),[]),r=o.useCallback(t=>(e.current.set(t.id,t),()=>e.current.delete(t.id)),[]);return{...t,options:Array.from(e.current.values()),registerOption:r}},TT=e=>{const{defaultSelectedOptions:t,multiselect:r,onOptionSelect:n}=e,[i,a]=c({state:e.selectedOptions,defaultState:t,initialState:[]});return{clearSelection:e=>{a([]),null==n||n(e,{optionValue:void 0,optionText:void 0,selectedOptions:[]})},selectOption:o.useCallback((e,t)=>{if(t.disabled)return;let o=[t.value];if(r){const e=i.findIndex(e=>e===t.value);o=e>-1?[...i.slice(0,e),...i.slice(e+1)]:[...i,t.value]}a(o),null==n||n(e,{optionValue:t.value,optionText:t.text,selectedOptions:o})},[n,r,i,a]),selectedOptions:i}};function xT(e){const t=o.useContext(e);return!!t.version&&-1!==t.version.current}const ST=()=>{},IT={controller:{active:ST,blur:ST,find:ST,first:ST,focus:ST,focusLastActive:ST,scrollActiveIntoView:ST,last:ST,next:ST,prev:ST,showAttributes:ST,hideAttributes:ST,showFocusVisibleAttributes:ST,hideFocusVisibleAttributes:ST}},_T=o.createContext(void 0),ET=_T.Provider,AT=()=>{var e;return null!==(e=o.useContext(_T))&&void 0!==e?e:IT};function BT(e,t={}){const{open:r=!0,multiselect:o=!1}=t,n=e.key,{altKey:i,ctrlKey:a,key:s,metaKey:c}=e;return 1!==s.length||n===_t||i||a||c?r?n===Ot&&i||n===It||!o&&n===_t?"CloseSelect":o&&n===_t?"Select":n===jt?"Close":n===Et?"Next":n===Ot?"Previous":n===Rt?"First":"End"===n?"Last":"PageUp"===n?"PageUp":"PageDown"===n?"PageDown":"Tab"===n?"Tab":"None":n===Et||n===Ot||n===It||n===_t?"Open":"None":"Type"}const OT="fui-Option",RT=ye({root:{Bt984gj:"f122n59",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",sj55zd:"f19n0e5",i8kkvl:"f1ufnopg",Bceei9c:"f1k6fduh",mc9l5x:"f22iagw",Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bg96gwp:"f1i3iumi",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"fm5eomj",qhf8xq:"f10pi13n",Jwef8y:"f1knas48",Bi91k9c:"feu1g3u",zqbkvg:"fo79ri9",h82x05:["f1osiabc","f1e8le25"],cqj998:"f1yusjty",j3hlsh:["f1e8le25","f1osiabc"],ecr2s2:"fb40n2d",lj723h:"f1g4hkjv",Btxx2vb:"f1lnr2zp",sltcwy:["f1ogfk9z","f1g7j8ec"],dnwvvm:"fiuf46r",Blyvkvs:["f1g7j8ec","f1ogfk9z"]},active:{Bowz1zl:"f11vrvdw",oxogb1:"f17hxjb7",Ix2sn8:"f1dha69c",q7v32p:"f1lm7500",B7cbj04:0,Bewtojm:0,b50fsz:0,B1wzb3v:0,Bqwk70n:0,B37u8z8:0,avt0cx:0,f0sref:0,B9fkznv:0,Be3o27t:0,Bertapg:0,B53xpsf:0,Bsv72rj:0,B39dzdd:0,Btq9bd3:0,Bqfxd14:0,atup0s:"fo7xqb",Fffuxt:0,Bttcd12:0,Beitzug:0,Bqougee:0,B86i8pi:"f1kurthe",Bhijsxg:"fwq15dy",kktds4:"f1pb3wry",Bmau3bo:["ftjv2f4","f1flhb1f"],npektv:["f1flhb1f","ftjv2f4"]},disabled:{sj55zd:"f1s2aq7o",Jwef8y:"f9ql6rf",Bi91k9c:"fvgxktp",zqbkvg:"f185j3qj",h82x05:["f1dligi3","f1vydzie"],cqj998:"fjw1di3",j3hlsh:["f1vydzie","f1dligi3"],ecr2s2:"fgj9um3",lj723h:"f19wldhg",Btxx2vb:"f1ss0kt2",sltcwy:["f1t6oli3","fjy9ci8"],dnwvvm:"fresaxk",Blyvkvs:["fjy9ci8","f1t6oli3"],Bbusuzp:"f1dcs8yz"},selected:{},checkIcon:{Bnnss6s:"fi64zpg",Be2twd7:"fod5ikn",Frg6f3:["f18b9hdq","fn6qj8t"],t21cq0:["f1xk557c","f1h9en5y"],Bcdw1i0:"fd7fpy0",Bo70h7d:"fvc9v3g"},selectedCheck:{Bcdw1i0:"f1022m68"},multiselectCheck:{Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f1l3cf7o",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"fq9zq91",B7ck84d:"f1ewtqcl",mc9l5x:"f22iagw",Bt984gj:"f122n59",Brf1p80:"f4d9j23",Bkfmm31:"f1w9h62z",Be2twd7:"f1ugzwwg",Bqenvij:"fd461yt",a9b677:"fjw5fx7",Bcdw1i0:"f1022m68"},selectedMultiselectCheck:{De3pzq:"ftywsgz",sj55zd:"fqpbvvt",g2u3we:"f3xi7mh",h3c5rm:["ftovhe4","f1wczvin"],B9xav0g:"f68vbr6",zhjwy3:["f1wczvin","ftovhe4"]},checkDisabled:{sj55zd:"f1s2aq7o",Bbusuzp:"f1dcs8yz"},multiselectCheckDisabled:{g2u3we:"f1r1t4y1",h3c5rm:["fmj8ijw","figx54m"],B9xav0g:"f360ss8",zhjwy3:["figx54m","fmj8ijw"]}},{d:[".f122n59{align-items:center;}",[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".f19n0e5{color:var(--colorNeutralForeground1);}",".f1ufnopg{column-gap:var(--spacingHorizontalXS);}",".f1k6fduh{cursor:pointer;}",".f22iagw{display:flex;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",[".fm5eomj{padding:var(--spacingVerticalSNudge) var(--spacingHorizontalS);}",{p:-1}],".f10pi13n{position:relative;}",'.f11vrvdw[data-activedescendant-focusvisible]::after{content:"";}',".f17hxjb7[data-activedescendant-focusvisible]::after{position:absolute;}",".f1dha69c[data-activedescendant-focusvisible]::after{pointer-events:none;}",".f1lm7500[data-activedescendant-focusvisible]::after{z-index:1;}",[".fo7xqb[data-activedescendant-focusvisible]::after{border:2px solid var(--colorStrokeFocus2);}",{p:-2}],[".f1kurthe[data-activedescendant-focusvisible]::after{border-radius:var(--borderRadiusMedium);}",{p:-1}],".fwq15dy[data-activedescendant-focusvisible]::after{top:-2px;}",".f1pb3wry[data-activedescendant-focusvisible]::after{bottom:-2px;}",".ftjv2f4[data-activedescendant-focusvisible]::after{left:-2px;}",".f1flhb1f[data-activedescendant-focusvisible]::after{right:-2px;}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fi64zpg{flex-shrink:0;}",".fod5ikn{font-size:var(--fontSizeBase400);}",".f18b9hdq{margin-left:calc(var(--spacingHorizontalXXS) * -1);}",".fn6qj8t{margin-right:calc(var(--spacingHorizontalXXS) * -1);}",".f1xk557c{margin-right:var(--spacingHorizontalXXS);}",".f1h9en5y{margin-left:var(--spacingHorizontalXXS);}",".fd7fpy0{visibility:hidden;}",".fvc9v3g svg{display:block;}",".f1022m68{visibility:visible;}",[".f1l3cf7o{border:var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible);}",{p:-2}],[".fq9zq91{border-radius:var(--borderRadiusSmall);}",{p:-1}],".f1ewtqcl{box-sizing:border-box;}",".f4d9j23{justify-content:center;}",".f1w9h62z{fill:currentColor;}",".f1ugzwwg{font-size:12px;}",".fd461yt{height:16px;}",".fjw5fx7{width:16px;}",".ftywsgz{background-color:var(--colorCompoundBrandBackground);}",".fqpbvvt{color:var(--colorNeutralForegroundInverted);}",".f3xi7mh{border-top-color:var(--colorCompoundBrandBackground);}",".ftovhe4{border-right-color:var(--colorCompoundBrandBackground);}",".f1wczvin{border-left-color:var(--colorCompoundBrandBackground);}",".f68vbr6{border-bottom-color:var(--colorCompoundBrandBackground);}",".f1r1t4y1{border-top-color:var(--colorNeutralForegroundDisabled);}",".fmj8ijw{border-right-color:var(--colorNeutralForegroundDisabled);}",".figx54m{border-left-color:var(--colorNeutralForegroundDisabled);}",".f360ss8{border-bottom-color:var(--colorNeutralForegroundDisabled);}"],h:[".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}",".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}",".fo79ri9:hover .fui-Option__checkIcon{border-top-color:var(--colorNeutralForeground1Hover);}",".f1osiabc:hover .fui-Option__checkIcon{border-right-color:var(--colorNeutralForeground1Hover);}",".f1e8le25:hover .fui-Option__checkIcon{border-left-color:var(--colorNeutralForeground1Hover);}",".f1yusjty:hover .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForeground1Hover);}",".f9ql6rf:hover{background-color:var(--colorTransparentBackground);}",".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}",".f185j3qj:hover .fui-Option__checkIcon{border-top-color:var(--colorNeutralForegroundDisabled);}",".f1dligi3:hover .fui-Option__checkIcon{border-right-color:var(--colorNeutralForegroundDisabled);}",".f1vydzie:hover .fui-Option__checkIcon{border-left-color:var(--colorNeutralForegroundDisabled);}",".fjw1di3:hover .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForegroundDisabled);}"],a:[".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}",".f1g4hkjv:active{color:var(--colorNeutralForeground1Pressed);}",".f1lnr2zp:active .fui-Option__checkIcon{border-top-color:var(--colorNeutralForeground1Hover);}",".f1ogfk9z:active .fui-Option__checkIcon{border-right-color:var(--colorNeutralForeground1Hover);}",".f1g7j8ec:active .fui-Option__checkIcon{border-left-color:var(--colorNeutralForeground1Hover);}",".fiuf46r:active .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForeground1Hover);}",".fgj9um3:active{background-color:var(--colorTransparentBackground);}",".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}",".f1ss0kt2:active .fui-Option__checkIcon{border-top-color:var(--colorNeutralForegroundDisabled);}",".f1t6oli3:active .fui-Option__checkIcon{border-right-color:var(--colorNeutralForegroundDisabled);}",".fjy9ci8:active .fui-Option__checkIcon{border-left-color:var(--colorNeutralForegroundDisabled);}",".fresaxk:active .fui-Option__checkIcon{border-bottom-color:var(--colorNeutralForegroundDisabled);}"],m:[["@media (forced-colors: active){.f1dcs8yz{color:GrayText;}}",{m:"(forced-colors: active)"}]]}),jT={activeOption:void 0,focusVisible:!1,multiselect:!1,getOptionById(){},getOptionsMatchingValue(){return[]},registerOption(){return()=>{}},selectedOptions:[],onOptionClick(){},onActiveDescendantChange(){},selectOption(){},setActiveOption(){}},PT=yv(void 0),NT=e=>wv(PT,(t=jT)=>e(t)),zT=PT.Provider,qT={activeOption:void 0,focusVisible:!1,setActiveOption:()=>null},MT=ye({root:{De3pzq:"fxugw4r",B7ck84d:"f1ewtqcl",mc9l5x:"f22iagw",Beiy3e4:"f1vx9l62",Bf4jedk:"f3hsy1e",Bmxbyg5:"f5zp4f",Bw0xxkn:0,oeaueh:0,Bpd4iqm:0,Befb4lg:"f1iepc6i",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1t35pdg",Belr9w4:"fiut8dr"}},{d:[".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f1ewtqcl{box-sizing:border-box;}",".f22iagw{display:flex;}",".f1vx9l62{flex-direction:column;}",".f3hsy1e{min-width:160px;}",".f5zp4f{overflow-y:auto;}",[".f1iepc6i{outline:1px solid var(--colorTransparentStroke);}",{p:-1}],[".f1t35pdg{padding:var(--spacingHorizontalXS);}",{p:-1}],".fiut8dr{row-gap:var(--spacingHorizontalXXS);}"]}),FT=o.forwardRef((e,t)=>{const r=((e,t)=>{const{multiselect:r,disableAutoFocus:n=!1}=e,i=CT(),{listboxRef:a,activeParentRef:s,controller:c}=yT({matchOption:e=>e.classList.contains(OT)}),l=xT(PT),d=NT(e=>e.onActiveDescendantChange),u=NT(e=>e.getOptionById),f=NT(e=>e.getOptionsMatchingValue),h=l?u:i.getOptionById,p=l?f:i.getOptionsMatchingValue,g=o.useMemo(()=>{let e=null;const t=e=>{null==d||d(e)};return r=>{r?(e=r,e.addEventListener("activedescendantchange",t)):null==e||e.removeEventListener("activedescendantchange",t)}},[d]),[m,v]=o.useState(!1);uT(v);const b=AT(),y=!!o.useContext(_T),w=y?b.controller:c,{clearSelection:k,selectedOptions:C,selectOption:T}=TT(e),x=NT(e=>e.selectedOptions),S=NT(e=>e.selectOption),I=l?{selectedOptions:x,selectOption:S,...qT}:{selectedOptions:C,selectOption:T,...qT};o.useEffect(()=>{if(!y){if(w.hideFocusVisibleAttributes(),!n)if(!r&&I.selectedOptions.length>0){const e=p(e=>e===I.selectedOptions[0]).pop();(null==e?void 0:e.id)&&w.focus(e.id)}else w.first();return()=>{w.blur()}}},[]);const _=o.useCallback(()=>{y||(w.showFocusVisibleAttributes(),m&&w.scrollActiveIntoView())},[w,y,m]),E=o.useCallback(()=>{y||w.hideFocusVisibleAttributes()},[w,y]),A={components:{root:"div"},root:N(qe("div",{ref:D(t,s,a,g),role:r?"menu":"listbox",tabIndex:0,...e}),{elementType:"div"}),standalone:!l,multiselect:r,clearSelection:k,activeDescendantController:w,onActiveDescendantChange:d,...i,...I};return A.root.onKeyDown=F(_v(A.root.onKeyDown,e=>{const t=BT(e,{open:!0}),r=w.active(),o=r?h(r):null;switch(t){case"First":case"Last":case"Next":case"Previous":case"PageDown":case"PageUp":case"CloseSelect":case"Select":e.preventDefault()}switch(t){case"Next":o?w.next():w.first();break;case"Previous":o?w.prev():w.first();break;case"PageUp":case"First":w.first();break;case"PageDown":case"Last":w.last();break;case"Select":case"CloseSelect":o&&T(e,o)}})),A.root.onFocus=F(_v(A.root.onFocus,_)),A.root.onBlur=F(_v(A.root.onBlur,E)),A})(e,t),n=function(e){const t=xT(PT),{getOptionById:r,getOptionsMatchingValue:n,multiselect:i,registerOption:a,selectedOptions:s,selectOption:c,activeDescendantController:l}=e,d=NT(e=>e.registerOption);return{listbox:{activeOption:void 0,focusVisible:!1,getOptionById:r,getOptionsMatchingValue:n,multiselect:i,registerOption:t?d:a,selectedOptions:s,selectOption:c,setActiveOption:()=>{},onOptionClick:NT(e=>e.onOptionClick),onActiveDescendantChange:NT(e=>e.onActiveDescendantChange)},activeDescendant:o.useMemo(()=>({controller:l}),[l])}}(r);return(e=>{const t=MT();e.root.className=Z("fui-Listbox",t.root,e.root.className)})(r),Je("useListboxStyles_unstable")(r),((e,t)=>Ue(ET,{value:t.activeDescendant,children:Ue(PT.Provider,{value:t.listbox,children:Ue(e.root,{})})}))(r,n)});function DT(e,t,r){const{state:{open:n,setOpen:i,setHasFocus:a},defaultProps:s,elementType:c,activeDescendantController:l}=r,d=N(e,{defaultProps:{type:"text","aria-expanded":n,role:"combobox",..."object"==typeof s&&s},elementType:c}),u=o.useRef(null);return d.ref=D(u,d.ref,t),d.onBlur=_v(e=>{i(e,!1),a(!1)},d.onBlur),d.onFocus=_v(e=>{e.target===e.currentTarget&&a(!0)},d.onFocus),d.onClick=_v(e=>{i(e,!n)},d.onClick),d.onKeyDown=_v(function(e){const{activeDescendantController:t,getOptionById:r,setOpen:n,selectOption:i,multiselect:a,open:s}=e,c=o.useCallback(()=>{const e=t.active();return e?r(e):void 0},[t,r]),l=function(){const e=Cw();return o.useCallback(t=>{var r;null===(r=e.current)||void 0===r||r.setVal(t)},[e])}();return F(e=>{const r=BT(e,{open:s,multiselect:a}),o=c();switch(r){case"First":case"Last":case"Next":case"Previous":case"PageDown":case"PageUp":case"Open":case"Close":case"CloseSelect":case"Select":e.preventDefault()}switch(l(!0),r){case"First":t.first();break;case"Last":t.last();break;case"Next":(e=>{e?t.next():t.first()})(o);break;case"Previous":(e=>{e?t.prev():t.first()})(o);break;case"PageDown":(()=>{for(let e=0;e<10;e++)t.next()})();break;case"PageUp":(()=>{for(let e=0;e<10;e++)t.prev()})();break;case"Open":n(e,!0);break;case"Close":e.stopPropagation(),n(e,!1);break;case"CloseSelect":!a&&!(null==o?void 0:o.disabled)&&n(e,!1);case"Select":o&&i(e,o);break;case"Tab":!a&&o&&i(e,o)}})}({activeDescendantController:l,...r.state}),d.onKeyDown),d}function LT(e,t,r){const{state:{open:n,value:i,selectOption:a,setValue:s,multiselect:c,selectedOptions:l,clearSelection:d,getOptionById:u,setOpen:f},freeform:h,defaultProps:p,activeDescendantController:g}=r,m=DT(e,t,{state:r.state,defaultProps:p,elementType:"input",activeDescendantController:g});m.onChange=_v(m.onChange,e=>{const t=e.target.value;s(t);const r=(e=>{const t=null==e?void 0:e.trim().toLowerCase();if(!t||0===t.length)return void g.blur();const r=g.find(e=>{const r=u(e);return!!r&&0===r.text.toLowerCase().indexOf(t)});if(r)return u(r);g.blur()})(t);c||1!==l.length||!(t.length<1)&&r||d(e)}),m.onBlur=_v(m.onBlur,e=>{if(!n&&!h){const t=g.active(),r=t?u(t):null;i&&r&&i.trim().toLowerCase()===(null==r?void 0:r.text.toLowerCase())&&a(e,r),s(void 0)}});const[v,b]=o.useState(!1),y=o.useRef(!1),w=m.onKeyDown,k=F(t=>{n||"Type"!==BT(t)||f(t,!0),t.key===At||t.key===Bt?b(!0):b(!1);const r=BT(t,{open:n,multiselect:c});var o;"Type"===r?y.current=!0:("Open"===r&&" "!==t.key||"Next"===r||"Previous"===r||"First"===r||"Last"===r||"PageUp"===r||"PageDown"===r)&&(y.current=!1),!y.current&&n||" "!==t.key?null==w||w(t):null==e||null===(o=e.onKeyDown)||void 0===o||o.call(e,t)});return m.onKeyDown=k,v&&(m["aria-activedescendant"]=void 0),m}FT.displayName="Listbox";const HT=(e,t)=>{var r,n;e=s(e,{supportsLabelFor:!0,supportsRequired:!0,supportsSize:!0});const{listboxRef:i,activeParentRef:a,controller:l}=yT({matchOption:e=>e.classList.contains(OT)}),d=(e=>{const{appearance:t="outline",disableAutoFocus:r,children:n,clearable:i=!1,editable:a=!1,inlinePopup:s=!1,mountNode:l,multiselect:d,onOpenChange:u,size:f="medium",activeDescendantController:h,freeform:p=!1,disabled:g=!1,onActiveOptionChange:m=null}=e,v=CT(),{getOptionsMatchingValue:b}=v,{getOptionById:y}=v,w=o.useCallback(()=>{const e=h.active();return e?y(e):void 0},[h,y]),k=w(),C=o.useCallback(e=>{let t;"function"==typeof e&&(t=e(w())),t?h.focus(t.id):h.blur()},[h,w]),[T,x]=o.useState(!1),[S,I]=o.useState(!1),_=o.useRef(!1),E=Ok(),[A,B]=c({state:e.value,initialState:void 0}),{selectedOptions:O,selectOption:R,clearSelection:j}=TT(e),P=o.useCallback((e,t)=>{$w.unstable_batchedUpdates(()=>{B(void 0),R(e,t)})},[B,R]),N=o.useMemo(()=>{if(void 0!==A)return A;if(E&&void 0!==e.defaultValue)return e.defaultValue;const t=b(e=>O.includes(e)).map(e=>e.text);return d?a?"":t.join(", "):t[0]},[A,a,b,d,O]),[z,q]=c({state:e.open,defaultState:e.defaultOpen,initialState:!1}),M=o.useCallback((e,t)=>{g||(null==u||u(e,{open:t}),$w.unstable_batchedUpdates(()=>{t||p||B(void 0),q(t)}))},[u,q,B,p,g]);o.useEffect(()=>{if(z){if(!d&&O.length>0){const e=b(e=>e===O[0]).pop();(null==e?void 0:e.id)&&h.focus(e.id)}}else h.blur()},[z,h]),o.useEffect(()=>{!z||r||h.active()||h.first()},[z,n,r,h,y]);const D=F(e=>{const t=e.detail.previousId?v.getOptionById(e.detail.previousId):null,r=v.getOptionById(e.detail.id);null==m||m(e,{event:e,type:"change",previousOption:t,nextOption:r})});return{...v,freeform:p,disabled:g,selectOption:P,clearSelection:j,selectedOptions:O,activeOption:k,appearance:t,clearable:i,focusVisible:T,ignoreNextBlur:_,inlinePopup:s,mountNode:l,open:z,hasFocus:S,setActiveOption:C,setFocusVisible:x,setHasFocus:I,setOpen:M,setValue:B,size:f,value:N,multiselect:d,onOptionClick:F(e=>{d||M(e,!1)}),onActiveDescendantChange:D}})({...e,editable:!0,activeDescendantController:l}),{clearable:u,clearSelection:f,disabled:h,multiselect:p,open:g,selectedOptions:m,setOpen:v,value:b,hasFocus:y}=d,[w,k]=function(e){const{positioning:t}=e,r={position:"below",align:"start",offset:{crossAxis:0,mainAxis:2},fallbackPositions:["above","after","after-top","before","before-top"],matchTargetSize:"width",autoSize:!0,...Ib(t)},{targetRef:o,containerRef:n}=bw(r);return[n,o]}(e),{disableAutoFocus:C=!1,freeform:T,inlinePopup:x}=e,I=O("combobox-"),{primary:_,root:E}=S({props:e,primarySlotTagName:"input",excludedPropNames:["children","size"]}),A=o.useRef(null),B=function(e,t,r){const{state:{multiselect:o},triggerRef:n,defaultProps:i}=r,a=O("fluent-listbox",VC(e)?e.id:void 0),c=z(e,{renderByDefault:!0,elementType:FT,defaultProps:{id:a,multiselect:o,tabIndex:void 0,...i}}),l=s({id:a},{supportsLabelFor:!0});c&&!c["aria-label"]&&!c["aria-labelledby"]&&l["aria-labelledby"]&&(c["aria-labelledby"]=l["aria-labelledby"]);const d=F(_v(e=>{e.preventDefault()},null==c?void 0:c.onMouseDown)),u=F(_v(e=>{var t;e.preventDefault(),null===(t=n.current)||void 0===t||t.focus()},null==c?void 0:c.onClick)),f=D(null==c?void 0:c.ref,t);return c&&(c.ref=f,c.onMouseDown=d,c.onClick=u),c}(e.listbox,D(w,i),{state:d,triggerRef:A,defaultProps:{children:e.children,disableAutoFocus:C}});var R;const j=LT(null!==(R=e.input)&&void 0!==R?R:{},D(A,a,t),{state:d,freeform:T,defaultProps:{type:"text",value:null!=b?b:"","aria-controls":g?null==B?void 0:B.id:void 0,..._},activeDescendantController:l}),P=N(e.root,{defaultProps:{"aria-owns":!x&&g?null==B?void 0:B.id:void 0,...E},elementType:"div"});P.ref=D(P.ref,k);const q=m.length>0&&!h&&u&&!p,M={components:{root:"div",input:"input",expandIcon:"span",listbox:FT,clearIcon:"span"},root:P,input:j,listbox:g||y?B:void 0,clearIcon:z(e.clearIcon,{defaultProps:{"aria-hidden":"true",children:o.createElement(Ae,null)},elementType:"span",renderByDefault:!0}),expandIcon:z(e.expandIcon,{renderByDefault:!0,defaultProps:{"aria-disabled":h?"true":void 0,"aria-expanded":g,children:o.createElement(Se,null),role:"button"},elementType:"span"}),showClearIcon:q,activeDescendantController:l,...d},{targetDocument:L}=et();(e=>{const{targetDocument:t}=et(),r=null==t?void 0:t.defaultView,{refs:n,callback:i,element:a,disabled:s,disabledFocusOnIframe:c,contains:l=wT}=e,d=o.useRef(void 0);(e=>{const{disabled:t,element:r,callback:n,contains:i=wT,pollDuration:a=100,refs:s}=e,c=o.useRef(),l=F(e=>{s.every(t=>!i(t.current||null,e.target))&&!t&&n(e)});o.useEffect(()=>{if(!t)return null==r||r.addEventListener(kT,l,!0),()=>{null==r||r.removeEventListener(kT,l,!0)}},[r,t,l]),o.useEffect(()=>{var e;if(!t)return c.current=null==r||null===(e=r.defaultView)||void 0===e?void 0:e.setInterval(()=>{const e=null==r?void 0:r.activeElement;if("IFRAME"===(null==e?void 0:e.tagName)||"WEBVIEW"===(null==e?void 0:e.tagName)){const t=new CustomEvent(kT,{bubbles:!0});e.dispatchEvent(t)}},a),()=>{var e;null==r||null===(e=r.defaultView)||void 0===e||e.clearTimeout(c.current)}},[r,t,a])})({element:a,disabled:c||s,callback:i,refs:n,contains:l});const u=o.useRef(!1),f=F(e=>{if(u.current)return void(u.current=!1);const t=e.composedPath()[0];n.every(e=>!l(e.current||null,t))&&!s&&i(e)}),h=F(e=>{u.current=n.some(t=>l(t.current||null,e.target))});o.useEffect(()=>{if(s)return;let e=(e=>{var t,r,o;if(e)return"object"==typeof e.window&&e.window===e?e.event:null!==(o=null===(r=e.ownerDocument)||void 0===r||null===(t=r.defaultView)||void 0===t?void 0:t.event)&&void 0!==o?o:void 0})(r);const t=t=>{t!==e?f(t):e=void 0};return null==a||a.addEventListener("click",t,!0),null==a||a.addEventListener("touchstart",t,!0),null==a||a.addEventListener("contextmenu",t,!0),null==a||a.addEventListener("mousedown",h,!0),d.current=null==r?void 0:r.setTimeout(()=>{e=void 0},1),()=>{null==a||a.removeEventListener("click",t,!0),null==a||a.removeEventListener("touchstart",t,!0),null==a||a.removeEventListener("contextmenu",t,!0),null==a||a.removeEventListener("mousedown",h,!0),null==r||r.clearTimeout(d.current),e=void 0}},[f,a,s,h,r])})({element:L,callback:e=>v(e,!1),refs:[A,w,k],disabled:!g});const{onMouseDown:H}=M.expandIcon||{},U=F(_v(H,e=>{var t;e.preventDefault(),M.setOpen(e,!M.open),null===(t=A.current)||void 0===t||t.focus()}));if(M.expandIcon){M.expandIcon.onMouseDown=U;const t="Open";if(!M.expandIcon["aria-label"]&&!M.expandIcon["aria-labelledby"])if(e["aria-labelledby"]){var W;const e=null!==(W=M.expandIcon.id)&&void 0!==W?W:`${I}-chevron`,r=`${e} ${M.input["aria-labelledby"]}`;M.expandIcon["aria-label"]=t,M.expandIcon.id=e,M.expandIcon["aria-labelledby"]=r}else e["aria-label"]?M.expandIcon["aria-label"]=`${t} ${e["aria-label"]}`:M.expandIcon["aria-label"]=t}const V=F(_v(null===(r=M.clearIcon)||void 0===r?void 0:r.onMouseDown,e=>{e.preventDefault()})),$=F(_v(null===(n=M.clearIcon)||void 0===n?void 0:n.onClick,e=>{f(e)}));return M.clearIcon&&(M.clearIcon.onMouseDown=V,M.clearIcon.onClick=$),p&&(M.clearIcon=void 0),M},UT=yv({activeOption:void 0,appearance:"outline",focusVisible:!1,open:!1,registerOption(){return()=>{}},selectedOptions:[],selectOption(){},setActiveOption(){},setOpen(){},size:"medium"}),WT=(UT.Provider,"fui-Combobox"),VT=ye({root:{Bt984gj:"f122n59",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",B7ck84d:"f1ewtqcl",i8kkvl:"f14mj54c",mc9l5x:"fwk3njj",Budl1dq:"fz17x9o",Brf1p80:"f1869bpl",Bf4jedk:"f1exfvgq",qhf8xq:"f10pi13n",ha4doy:"fmrv4ls",Bbr2w1p:"f14a1fxs",Bduesf4:"f3e99gv",Bpq79vn:"fhljsf7",li1rpt:"f1gw3sf2",Bsft5z2:"f13zj6fq",E3zdtr:"f1mdlcz9",Eqx8gd:["f1a7op3","f1cjjd47"],By385i5:"f1gboi2j",B1piin3:["f1cjjd47","f1a7op3"],Dlnsje:"f145g4dw",d9w3h3:["f1kp91vd","f1ibwz09"],B3778ie:["f1ibwz09","f1kp91vd"],B1q35kw:0,Bw17bha:0,Bcgy8vk:0,Bjuhk93:"f1mnjydx",Gjdm7m:"f13evtba",b1kco5:"f1yk9hq",Ba2ppi3:"fhwpy7i",F2fol1:"f14ee0xe",lck23g:"f1xhbsuh",df92cz:"fv8e3ye",I188md:"ftb5wc6",umuwi5:"fjw5xc1",Blcqepd:"f1xdyd5c",nplu4u:"fatpbeo",Bioka5o:"fb7uyps",H713fs:"f1cmft4k",B9ooomg:"f1x58t8o",Bercvud:"f1ibeo51"},listbox:{E5pizo:"f1hg901r",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"ft85np5",Bxyxcbc:"fmmk62d",B7ck84d:"f1ewtqcl"},listboxCollapsed:{mc9l5x:"fjseox"},inlineListbox:{Bj3rh1h:"f19g0ac"},small:{Bqenvij:"frvgh55",z189sj:["fdw0yi8","fk8j09s"]},medium:{Bqenvij:"f1d2rq10",z189sj:["f11gcy0p","f1ng84yb"]},large:{i8kkvl:"f1rjii52",Bqenvij:"fbhnoac",z189sj:["fw5db7e","f1uw59to"]},outline:{De3pzq:"fxugw4r",Bgfg5da:0,B9xav0g:"f1c1zstj",oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"fhz96rm"},outlineInteractive:{Bgoe8wy:"fvcxoqz",Bwzppfd:["f1ub3y4t","f1m52nbi"],oetu4i:"f1l4zc64",gg5e9n:["f1m52nbi","f1ub3y4t"],B6oc9vd:"fvs00aa",ak43y8:["f1assf6x","f4ruux4"],wmxk5l:"f1z0osm6",B50zh58:["f4ruux4","f1assf6x"],Bvq3b66:"f1b473iu",Brahy3i:["f381qr8","ft4skwv"],zoxjo1:"f1qzcrsd",an54nd:["ft4skwv","f381qr8"]},underline:{De3pzq:"f1c21dwh",B9xav0g:0,oivjwe:0,Bn0qgzm:0,Bgfg5da:"f9ez7ne",Beyfa6y:0,Bbmb7ep:0,Btl43ni:0,B7oj6ja:0,Dimara:"fokr779"},"filled-lighter":{De3pzq:"fxugw4r",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f88035w"},"filled-darker":{De3pzq:"f16xq7d1",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f88035w"},invalid:{tvckwq:"fs4k3qj",gk2u95:["fcee079","fmyw78r"],hhx65j:"f1fgmyf4",Bxowmz0:["fmyw78r","fcee079"]},invalidUnderline:{hhx65j:"f1fgmyf4"},disabled:{Bceei9c:"fdrzuqr",De3pzq:"f1c21dwh",g2u3we:"f1jj8ep1",h3c5rm:["f15xbau","fy0fskl"],B9xav0g:"f4ikngz",zhjwy3:["fy0fskl","f15xbau"],Bjwas2f:"fg455y9",Bn1d65q:["f1rvyvqg","f14g86mu"],Bxeuatn:"f1cwzwz",n51gp8:["f14g86mu","f1rvyvqg"]}},{d:[".f122n59{align-items:center;}",[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".f1ewtqcl{box-sizing:border-box;}",".f14mj54c{column-gap:var(--spacingHorizontalXXS);}",".fwk3njj{display:inline-grid;}",".fz17x9o{grid-template-columns:1fr auto;}",".f1869bpl{justify-content:space-between;}",".f1exfvgq{min-width:250px;}",".f10pi13n{position:relative;}",".fmrv4ls{vertical-align:middle;}",".f1gw3sf2::after{box-sizing:border-box;}",'.f13zj6fq::after{content:"";}',".f1mdlcz9::after{position:absolute;}",".f1a7op3::after{left:-1px;}",".f1cjjd47::after{right:-1px;}",".f1gboi2j::after{bottom:-1px;}",".f145g4dw::after{height:max(2px, var(--borderRadiusMedium));}",".f1kp91vd::after{border-bottom-left-radius:var(--borderRadiusMedium);}",".f1ibwz09::after{border-bottom-right-radius:var(--borderRadiusMedium);}",[".f1mnjydx::after{border-bottom:var(--strokeWidthThick) solid var(--colorCompoundBrandStroke);}",{p:-1}],".f13evtba::after{clip-path:inset(calc(100% - 2px) 0 0 0);}",".f1yk9hq::after{transform:scaleX(0);}",".fhwpy7i::after{transition-property:transform;}",".f14ee0xe::after{transition-duration:var(--durationUltraFast);}",".f1xhbsuh::after{transition-delay:var(--curveAccelerateMid);}",".f1hg901r{box-shadow:var(--shadow16);}",[".ft85np5{border-radius:var(--borderRadiusMedium);}",{p:-1}],".fmmk62d{max-height:80vh;}",".fjseox{display:none;}",".f19g0ac{z-index:1;}",".frvgh55{height:24px;}",".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}",".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}",".f1d2rq10{height:32px;}",".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}",".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}",".f1rjii52{column-gap:var(--spacingHorizontalSNudge);}",".fbhnoac{height:40px;}",".fw5db7e{padding-right:var(--spacingHorizontalM);}",".f1uw59to{padding-left:var(--spacingHorizontalM);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",[".fhz96rm{border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);}",{p:-2}],".f1c1zstj{border-bottom-color:var(--colorNeutralStrokeAccessible);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",[".f9ez7ne{border-bottom:var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible);}",{p:-1}],[".fokr779{border-radius:0;}",{p:-1}],[".f88035w{border:var(--strokeWidthThin) solid var(--colorTransparentStroke);}",{p:-2}],".f16xq7d1{background-color:var(--colorNeutralBackground3);}",[".f88035w{border:var(--strokeWidthThin) solid var(--colorTransparentStroke);}",{p:-2}],".fs4k3qj:not(:focus-within),.fs4k3qj:hover:not(:focus-within){border-top-color:var(--colorPaletteRedBorder2);}",".fcee079:not(:focus-within),.fcee079:hover:not(:focus-within){border-right-color:var(--colorPaletteRedBorder2);}",".fmyw78r:not(:focus-within),.fmyw78r:hover:not(:focus-within){border-left-color:var(--colorPaletteRedBorder2);}",".f1fgmyf4:not(:focus-within),.f1fgmyf4:hover:not(:focus-within){border-bottom-color:var(--colorPaletteRedBorder2);}",".fdrzuqr{cursor:not-allowed;}",".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}",".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}",".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}",".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}"],w:[".f14a1fxs:focus-within{outline-width:2px;}",".f3e99gv:focus-within{outline-style:solid;}",".fhljsf7:focus-within{outline-color:transparent;}",".fjw5xc1:focus-within::after{transform:scaleX(1);}",".f1xdyd5c:focus-within::after{transition-property:transform;}",".fatpbeo:focus-within::after{transition-duration:var(--durationNormal);}",".fb7uyps:focus-within::after{transition-delay:var(--curveDecelerateMid);}",".f1ibeo51:focus-within:active::after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}",".f1b473iu:focus-within{border-top-color:var(--colorNeutralStroke1Pressed);}",".f381qr8:focus-within{border-right-color:var(--colorNeutralStroke1Pressed);}",".ft4skwv:focus-within{border-left-color:var(--colorNeutralStroke1Pressed);}",".f1qzcrsd:focus-within{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}"],m:[["@media screen and (prefers-reduced-motion: reduce){.fv8e3ye::after{transition-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.ftb5wc6::after{transition-delay:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.f1cmft4k:focus-within::after{transition-duration:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media screen and (prefers-reduced-motion: reduce){.f1x58t8o:focus-within::after{transition-delay:0.01ms;}}",{m:"screen and (prefers-reduced-motion: reduce)"}],["@media (forced-colors: active){.fg455y9{border-top-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f14g86mu{border-left-color:GrayText;}.f1rvyvqg{border-right-color:GrayText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1cwzwz{border-bottom-color:GrayText;}}",{m:"(forced-colors: active)"}]],h:[".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}",".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}",".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}",".f1l4zc64:hover{border-bottom-color:var(--colorNeutralStrokeAccessibleHover);}"],a:[".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}",".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}",".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}",".f1z0osm6:active{border-bottom-color:var(--colorNeutralStrokeAccessiblePressed);}"]}),$T=ye({input:{qb2dma:"f1ub7u0d",De3pzq:"f1c21dwh",Bgfg5da:0,B9xav0g:0,oivjwe:0,Bn0qgzm:0,B4g9neb:0,zhjwy3:0,wvpqe5:0,ibv6hh:0,u1mtju:0,h3c5rm:0,vrafjx:0,Bekrc4i:0,i8vvqc:0,g2u3we:0,icvyot:0,B4j52fo:0,irswps:"f3bhgqh",sj55zd:"f19n0e5",Bahqtrf:"fk6fouc",Brovlpu:"ftqa4ok",yvdlaj:"fwyc1cq",B3o7kgh:"f13ta7ih"},small:{Bahqtrf:"fk6fouc",Be2twd7:"fy9rknc",Bhrd7zp:"figsok6",Bg96gwp:"fwrc4pm",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:["fxe2rs","f1gflqzi"]},medium:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:["fzy81xo","f58b53b"]},large:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"figsok6",Bg96gwp:"faaz57k",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:["f1kdav7a","footqm6"]},disabled:{sj55zd:"f1s2aq7o",De3pzq:"f1c21dwh",Bceei9c:"fdrzuqr",yvdlaj:"fahhnxm"}},{d:[".f1ub7u0d{align-self:stretch;}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",[".f3bhgqh{border:none;}",{p:-2}],".f19n0e5{color:var(--colorNeutralForeground1);}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fwyc1cq::-webkit-input-placeholder{color:var(--colorNeutralForeground4);}",".fwyc1cq::-moz-placeholder{color:var(--colorNeutralForeground4);}",".f13ta7ih::-webkit-input-placeholder{opacity:1;}",".f13ta7ih::-moz-placeholder{opacity:1;}",".fy9rknc{font-size:var(--fontSizeBase200);}",".figsok6{font-weight:var(--fontWeightRegular);}",".fwrc4pm{line-height:var(--lineHeightBase200);}",[".fxe2rs{padding:0 0 0 calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS));}",{p:-1}],[".f1gflqzi{padding:0 calc(var(--spacingHorizontalSNudge) + var(--spacingHorizontalXXS)) 0 0;}",{p:-1}],".fkhj508{font-size:var(--fontSizeBase300);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",[".fzy81xo{padding:0 0 0 calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS));}",{p:-1}],[".f58b53b{padding:0 calc(var(--spacingHorizontalMNudge) + var(--spacingHorizontalXXS)) 0 0;}",{p:-1}],".fod5ikn{font-size:var(--fontSizeBase400);}",".faaz57k{line-height:var(--lineHeightBase400);}",[".f1kdav7a{padding:0 0 0 calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge));}",{p:-1}],[".footqm6{padding:0 calc(var(--spacingHorizontalM) + var(--spacingHorizontalSNudge)) 0 0;}",{p:-1}],".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}",".fahhnxm::-webkit-input-placeholder{color:var(--colorNeutralForegroundDisabled);}",".fahhnxm::-moz-placeholder{color:var(--colorNeutralForegroundDisabled);}"],f:[".ftqa4ok:focus{outline-style:none;}"]}),KT=ye({icon:{B7ck84d:"f1ewtqcl",sj55zd:"fxkbij4",Bceei9c:"f1k6fduh",mc9l5x:"ftgm304",Be2twd7:"f1pp30po",Bo70h7d:"fvc9v3g"},hidden:{mc9l5x:"fjseox"},visuallyHidden:{Bh84pgu:"f1ekcaio",Bqenvij:"f1mpe4l3",jrapky:0,Frg6f3:0,t21cq0:0,B6of3ja:0,B74szlk:"f1jlpb2r",B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",Byoj8tv:0,uwmqm3:0,z189sj:0,z8tnut:0,B0ocmuz:"f1c5fvqg",a9b677:"frkrog8",qhf8xq:"f1euv43f"},small:{Be2twd7:"f4ybsrx",Frg6f3:["f1h9en5y","f1xk557c"]},medium:{Be2twd7:"fe5j1ua",Frg6f3:["f1h9en5y","f1xk557c"]},large:{Be2twd7:"f1rt2boy",Frg6f3:["f1t5qyk5","f1ikr372"]},disabled:{sj55zd:"f1s2aq7o",Bceei9c:"fdrzuqr"}},{d:[".f1ewtqcl{box-sizing:border-box;}",".fxkbij4{color:var(--colorNeutralStrokeAccessible);}",".f1k6fduh{cursor:pointer;}",".ftgm304{display:block;}",".f1pp30po{font-size:var(--fontSizeBase500);}",".fvc9v3g svg{display:block;}",".fjseox{display:none;}",".f1ekcaio{clip:rect(0px, 0px, 0px, 0px);}",".f1mpe4l3{height:1px;}",[".f1jlpb2r{margin:-1px;}",{p:-1}],[".f1a3p1vp{overflow:hidden;}",{p:-1}],[".f1c5fvqg{padding:0px;}",{p:-1}],".frkrog8{width:1px;}",".f1euv43f{position:absolute;}",".f4ybsrx{font-size:16px;}",".f1h9en5y{margin-left:var(--spacingHorizontalXXS);}",".f1xk557c{margin-right:var(--spacingHorizontalXXS);}",".fe5j1ua{font-size:20px;}",".f1rt2boy{font-size:24px;}",".f1t5qyk5{margin-left:var(--spacingHorizontalSNudge);}",".f1ikr372{margin-right:var(--spacingHorizontalSNudge);}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".fdrzuqr{cursor:not-allowed;}"]}),GT=o.forwardRef((e,t)=>{const r=HT(e,t),n=function(e){const{appearance:t,open:r,getOptionById:n,getOptionsMatchingValue:i,registerOption:a,selectedOptions:s,selectOption:c,setOpen:l,size:d,activeDescendantController:u,onOptionClick:f,onActiveDescendantChange:h}=e,p={activeOption:void 0,focusVisible:!1,getOptionById:n,getOptionsMatchingValue:i,registerOption:a,selectedOptions:s,selectOption:c,setActiveOption:()=>null,onOptionClick:f,onActiveDescendantChange:h};return{combobox:{activeOption:void 0,appearance:t,focusVisible:!1,open:r,registerOption:a,selectedOptions:s,selectOption:c,setActiveOption:()=>null,setOpen:l,size:d},activeDescendant:o.useMemo(()=>({controller:u}),[u]),listbox:p}}(r);return(e=>{const{appearance:t,open:r,size:o,showClearIcon:n}=e,i="true"==`${e.input["aria-invalid"]}`,a=e.input.disabled,s=VT(),c=KT(),l=$T();e.root.className=Z(WT,s.root,s[t],s[o],!a&&"outline"===t&&s.outlineInteractive,i&&"underline"!==t&&s.invalid,i&&"underline"===t&&s.invalidUnderline,a&&s.disabled,e.root.className),e.input.className=Z("fui-Combobox__input",l.input,l[o],a&&l.disabled,e.input.className),e.listbox&&(e.listbox.className=Z("fui-Combobox__listbox",s.listbox,e.inlinePopup&&s.inlineListbox,!r&&s.listboxCollapsed,e.listbox.className)),e.expandIcon&&(e.expandIcon.className=Z("fui-Combobox__expandIcon",c.icon,c[o],a&&c.disabled,n&&c.visuallyHidden,e.expandIcon.className)),e.clearIcon&&(e.clearIcon.className=Z("fui-Combobox__clearIcon",c.icon,c[o],a&&c.disabled,!n&&c.hidden,e.clearIcon.className))})(r),Je("useComboboxStyles_unstable")(r),((e,t)=>Ue(e.root,{children:Ue(ET,{value:t.activeDescendant,children:Ue(zT,{value:t.listbox,children:We(UT.Provider,{value:t.combobox,children:[Ue(e.input,{}),e.clearIcon&&Ue(e.clearIcon,{}),e.expandIcon&&Ue(e.expandIcon,{}),e.listbox&&(e.inlinePopup?Ue(e.listbox,{}):Ue(Kw,{mountNode:e.mountNode,children:Ue(e.listbox,{})}))]})})})}))(r,n)});GT.displayName="Combobox";const JT=o.forwardRef((e,t)=>{const r=((e,t)=>{const{children:r,disabled:n,text:i,value:a}=e,s=o.useRef(null),c=function(e,t){if(void 0!==e)return e;let r="",n=!1;return o.Children.forEach(t,e=>{"string"==typeof e?r+=e:n=!0}),n&&console.warn("Provide a `text` prop to Option components when they contain non-string children."),r}(i,r),l=null!=a?a:c,d=O("fluent-option",e.id),u=o.useMemo(()=>({id:d,disabled:n,text:c,value:l}),[d,n,c,l]),{controller:f}=AT(),h=NT(e=>e.multiselect),p=NT(e=>e.registerOption),g=NT(e=>{const t=e.selectedOptions;return void 0!==l&&void 0!==t.find(e=>e===l)}),m=NT(e=>e.selectOption),v=NT(e=>e.onOptionClick);let b=o.createElement(Te,null);h&&(b=g?o.createElement(Ne,null):""),o.useEffect(()=>{if(d&&s.current)return p(u,s.current)},[d,u,p]);const y=h?{role:"menuitemcheckbox","aria-checked":g}:{role:"option","aria-selected":g};return{components:{root:"div",checkIcon:"span"},root:N(qe("div",{ref:D(t,s),"aria-disabled":n?"true":void 0,id:d,...y,...e,onClick:t=>{var r;n?t.preventDefault():(f.focus(d),m(t,u),v(t),null===(r=e.onClick)||void 0===r||r.call(e,t))}}),{elementType:"div"}),checkIcon:z(e.checkIcon,{renderByDefault:!0,defaultProps:{"aria-hidden":"true",children:b},elementType:"span"}),disabled:n,multiselect:h,selected:g,focusVisible:!1,active:!1}})(e,t);return(e=>{const{disabled:t,multiselect:r,selected:o}=e,n=RT();e.root.className=Z(OT,n.root,n.active,t&&n.disabled,o&&n.selected,e.root.className),e.checkIcon&&(e.checkIcon.className=Z("fui-Option__checkIcon",n.checkIcon,r&&n.multiselectCheck,o&&n.selectedCheck,o&&r&&n.selectedMultiselectCheck,t&&n.checkDisabled,t&&r&&n.multiselectCheckDisabled,e.checkIcon.className))})(r),Je("useOptionStyles_unstable")(r),(e=>We(e.root,{children:[e.checkIcon&&Ue(e.checkIcon,{}),e.root.children]}))(r)});JT.displayName="Option";var QT=({id:e,value:t,options:r,placeholder:n,onChange:i,disabled:a,label:s,style:c})=>{var l;const d=Lg(),u=(null===(l=r.find(e=>e.value===t))||void 0===l?void 0:l.label)||"";return o.createElement("div",{className:d.fieldRow},s&&o.createElement("label",{htmlFor:e,className:d.label},s),o.createElement(GT,{id:e,value:u,onOptionSelect:(e,t)=>i(t.optionValue),placeholder:n,disabled:a,style:c},r.map(e=>o.createElement(JT,{key:e.value,value:e.value},e.label))))},XT=r(64583).Promise,YT=({docuvitaApi:e,workspaceFolderTree:t,setWorkspaceFolderTree:r,setWorkspaceFolderTreeVersion:n,selectedWorkspace:i,setSelectedWorkspace:a,selectedWorkspaceObjectType:s,setSelectedWorkspaceObjectType:c,workspaceObjectTypes:l,parentObjectTypes:d,objectRelations:u,selectedWorkspaceFolder:f,isAttachment:h=!1,handleCopy:p,handleLink:g,archivedObject:m})=>{var v,b,y;const[w,k]=(0,o.useState)([]),[C,T]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{null!=s?(T(!0),e.getWorkspacesByObjectType(s).then(e=>k(e)).catch(()=>k([])).finally(()=>T(!1))):k([])},[s]),(0,o.useEffect)(()=>{var t,o,n,a;i&&(r([]),t=void 0,o=void 0,a=function*(){try{const t=yield e.getFolderTree(i);r(t)}catch(e){r([])}},new((n=void 0)||(n=XT))(function(e,r){function i(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n(function(e){e(r)})).then(i,s)}c((a=a.apply(t,o||[])).next())}))},[i]),o.createElement("div",null,o.createElement("div",{style:{marginBottom:12}},o.createElement(QT,{id:"workspaceObjectType",label:"Akten-Typ",value:null!==(v=null==s?void 0:s.toString())&&void 0!==v?v:"",options:l.map(e=>({value:e.objectTypeId.toString(),label:e.name})),onChange:e=>{const t=l.find(t=>t.objectTypeId.toString()===e);c(t?t.objectTypeId:null),a(null)},placeholder:"Akten-Typ wählen...",style:{width:"100%",flex:1}}),o.createElement(QT,{id:"workspace",label:"Akte",value:null!==(y=null===(b=null==i?void 0:i.objectId)||void 0===b?void 0:b.toString())&&void 0!==y?y:"",options:w.map(e=>({value:e.objectId.toString(),label:e.name})),onChange:e=>{const t=w.find(t=>t.objectId.toString()===e);a(t||null)},placeholder:C?"Lade Akten...":"Akte wählen...",disabled:null==s||C,style:{width:"100%",flex:1}})),i&&o.createElement(lT,{docuvitaApi:e,folderTree:t,setFolderTree:r,setFolderTreeVersion:n,selectedFolder:f,parentObjectTypes:d,objectRelations:u,isAttachment:h,handleCopy:(e,t=!0)=>{p&&p(e,t)},handleLink:(e,t=!0)=>{g&&g(e,t)},archivedObject:m}))},ZT=({docuvitaApi:e,workspaceFolderTree:t,setWorkspaceFolderTree:r,setWorkspaceFolderTreeVersion:n,selectedWorkspace:i,setSelectedWorkspace:a,selectedWorkspaceObjectType:s,setSelectedWorkspaceObjectType:c,workspaceObjectTypes:l,parentObjectTypes:d,objectRelations:u,selectedWorkspaceFolder:f,handleLink:h,archivedObject:p})=>{const g=Lg(),[m,v]=(0,o.useState)(!1);return o.createElement("form",{className:g.form},o.createElement("fieldset",{className:g.fieldset_v},o.createElement("legend",{className:g.legend},"docuvita Akten Ablage"," ",o.createElement(Vt,{size:"small",appearance:"subtle",onClick:()=>v(e=>!e),"aria-expanded":!m,"aria-controls":"attachmentworkspace-content",style:{marginLeft:8},icon:m?o.createElement(Se,null):o.createElement(Ie,null)})),!m&&o.createElement("div",{id:"attachmentworkspace-content"},o.createElement(YT,{docuvitaApi:e,workspaceFolderTree:t,setWorkspaceFolderTree:r,setWorkspaceFolderTreeVersion:n,selectedWorkspace:i,setSelectedWorkspace:a,selectedWorkspaceObjectType:s,setSelectedWorkspaceObjectType:c,workspaceObjectTypes:l,parentObjectTypes:d,objectRelations:u,selectedWorkspaceFolder:f,isAttachment:!1,handleLink:h,archivedObject:p}))))},ex=r(64583).Promise,tx=function(e,t,r,o){return new(r||(r=ex))(function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},rx=({config:e,graphApi:t,docuvitaApi:r,mailInfo:n,setMailInfo:i,folderTree:a,setFolderTree:s,workspaceFolderTree:c,setWorkspaceFolderTree:l,workspaceObjectTypes:d,setError:u,setSuccess:f})=>{var h,p,g,m;const[v,b]=(0,o.useState)(null),[y,w]=(0,o.useState)(null),[k,C]=(0,o.useState)(null),[T,x]=(0,o.useState)([]),[S,I]=(0,o.useState)([]),[_,E]=(0,o.useState)([]),[A,B]=(0,o.useState)([]),[O,R]=(0,o.useState)([]),[j,P]=(0,o.useState)([]),[N,z]=(0,o.useState)(null),[q,M]=(0,o.useState)(null),[F,D]=(0,o.useState)(null),[L,H]=(0,o.useState)([]),[U,W]=(0,o.useState)(!1),[V,$]=(0,o.useState)(!1),[K,G]=(0,o.useState)(!1),[J,Q]=(0,o.useState)(0),[X,Y]=(0,o.useState)(0),Z=Lg();(0,o.useEffect)(()=>{var t,r,o,n,a;try{if(Office.context.mailbox&&Office.context.mailbox.item){const s=Office.context.mailbox.item,c=null===(t=null==s?void 0:s.itemId)||void 0===t?void 0:t.replace(/\//g,"-");i({messageId:c,parentFolderId:null,subject:s.subject,from:null===(r=s.from)||void 0===r?void 0:r.emailAddress,to:null===(o=s.to)||void 0===o?void 0:o.map(e=>e.emailAddress).join(", "),cc:null===(n=s.cc)||void 0===n?void 0:n.map(e=>e.emailAddress).join(", "),dateTimeCreated:s.dateTimeCreated instanceof Date?s.dateTimeCreated.toISOString():s.dateTimeCreated,dateTimeModified:s.dateTimeModified instanceof Date?s.dateTimeModified.toISOString():s.dateTimeModified,internetMessageId:s.internetMessageId,userEmail:Office.context.mailbox.userProfile.emailAddress,objectId:null,docuvitaAttachmentStatus:{}}),w((null===(a=null==e?void 0:e.docuvita)||void 0===a?void 0:a.archiveParentObjectId)||null)}else u("No mail item context available.")}catch(e){u(e.message)}},[]),(0,o.useEffect)(()=>{var t,o;(null===(t=null==e?void 0:e.docuvita)||void 0===t?void 0:t.mailObjectType)&&(null===(o=null==e?void 0:e.addin)||void 0===o?void 0:o.showMailFolderEditor)&&tx(void 0,void 0,void 0,function*(){try{const e=yield r.getMailObjectType(),t=e?yield r.getMailParentObjectTypes(e):[];H(t)}catch(e){u("Fehler beim Laden der Mailordner-Objekttypen: "+(e.message||String(e)))}})},[]),(0,o.useEffect)(()=>{M(null),l([]),tx(void 0,void 0,void 0,function*(){try{const e=yield r.getFolderTree();s(e)}catch(e){s([])}}),tx(void 0,void 0,void 0,function*(){if(n&&n.messageId&&n.userEmail&&!n.parentFolderId){const e=yield t.getMailParentFolderId(n.messageId);i(t=>Object.assign(Object.assign({},t),{parentFolderId:e}))}}),tx(void 0,void 0,void 0,function*(){if(n&&!n.objectId&&r&&n.userEmail&&n.messageId){const e=yield r.getMailObjectId(n),t=null==e?void 0:e.objectId,o=null==e?void 0:e.parentObjectId;t?(i(e=>Object.assign(Object.assign({},e),{objectId:t,parentFolderId:o})),D(t),G(!1)):(D(null),G(!0))}})},[n]),(0,o.useEffect)(()=>{tx(void 0,void 0,void 0,function*(){if(n&&Office.context.mailbox&&Office.context.mailbox.item&&void 0!==Office.context.mailbox.item.attachments){const e=Office.context.mailbox.item.attachments;e&&e.length>0&&JSON.stringify(n.attachments)!==JSON.stringify(e)&&i(t=>Object.assign(Object.assign({},t),{attachments:e}))}})},[n]),(0,o.useEffect)(()=>{ne()},[n]),(0,o.useEffect)(()=>{(null==n?void 0:n.objectId)&&(R([]),P([]))},[null==n?void 0:n.objectId]),(0,o.useEffect)(()=>{if(!(null==n?void 0:n.objectId))return x([]),void I([]);tx(void 0,void 0,void 0,function*(){try{const e=yield r.getObjectRelations(n.objectId);if(e&&Array.isArray(e)){const t=[],o=[];yield ex.all(e.map(e=>tx(void 0,void 0,void 0,function*(){try{const n=yield r.getObjectWorkspace(e.Objectid);n?o.push(Object.assign(Object.assign({},e),{workspace:n})):t.push(e)}catch(r){t.push(e)}}))),x(t),I(o)}else x([]),I([])}catch(e){u("Fehler beim Laden der Objektbeziehungen: "+(e.message||String(e))),x([]),I([])}})},[null==n?void 0:n.objectId]),(0,o.useEffect)(()=>{if(!(null==n?void 0:n.parentFolderId)||!S||0===S.length)return;const e=S[0].workspace;M(e.objectType),z(e),C(n.parentFolderId?Number(n.parentFolderId):null)},[S,null==n?void 0:n.parentFolderId]),(0,o.useEffect)(()=>{(null==n?void 0:n.parentFolderId)&&T&&0!==T.length&&w((null==n?void 0:n.parentFolderId)?Number(null==n?void 0:n.parentFolderId):null)},[T,null==n?void 0:n.parentFolderId]),(0,o.useEffect)(()=>{if(!T||0===T.length||!a||0===a.length)return R([]),void E([]);const e=[],t=r=>r.map(r=>{const o=T.find(e=>Number(e.Objectid)===r.objectId&&!e.IsLink),n=T.find(e=>Number(e.Objectid)===r.objectId&&e.IsLink),i=!!o,a=!!n;a&&(e.push(n.Objectid),E(e=>{const t=new Set(e);return t.add(n.Objectid),Array.from(t)}));let s=r;if((i||a)&&(s=Object.assign(Object.assign({},r),{isMailCopied:i,isMailLinked:a})),r.children&&r.children.length>0){const e=t(r.children);e===r.children&&s===r||(s=Object.assign(Object.assign({},s),{children:e}))}return s}),r=t(a);s(r),R(e)},[T,J]),(0,o.useEffect)(()=>{if(!S||0===S.length||!c||0===c.length)return P([]),void B([]);const e=[],t=r=>r.map(r=>{const o=S.find(e=>Number(e.Objectid)===r.objectId&&!e.IsLink),n=S.find(e=>Number(e.Objectid)===r.objectId&&e.IsLink),i=!!o,a=!!n;a&&(e.push(n.Objectid),B(e=>{const t=new Set(e);return t.add(n.Objectid),Array.from(t)}));let s=r;if((i||a)&&(s=Object.assign(Object.assign({},r),{isMailCopied:i,isMailLinked:a})),r.children&&r.children.length>0){const e=t(r.children);e===r.children&&s===r||(s=Object.assign(Object.assign({},s),{children:e}))}return s}),r=t(c);l(r),P(e)},[S,X]),(0,o.useEffect)(()=>{U&&tx(void 0,void 0,void 0,function*(){yield ee(),W(!1)})},[v,U]),(0,o.useEffect)(()=>{V&&tx(void 0,void 0,void 0,function*(){yield te(),$(!1)})},[v,V]);const ee=()=>tx(void 0,void 0,void 0,function*(){var o,a;if(Office.context.mailbox&&Office.context.mailbox.item)if(null===(o=null==e?void 0:e.docuvita)||void 0===o?void 0:o.serverUrl)if(null===(a=null==e?void 0:e.docuvita)||void 0===a?void 0:a.apiSessionGuid)try{if(n.objectId)return void u("Mail is already archived with object ID: "+n.objectId);const e=yield t.getMailEml(n.messageId);if(!e)return void u("Could not retrieve EML content.");const o=yield t.getFolderPathToRoot(n.parentFolderId,n.userEmail),{objectId:a,parentObjectId:s}=yield r.uploadMail({emlBlob:e,mailInfo:n,mailProperties:v,folderPath:o}),c=Object.assign(Object.assign({},n),{objectId:a,parentObjectId:s});if(i(c),w(s),_&&_.length>0)for(const e of _)yield r.linkObjectToFolder(a,e);if(A&&A.length>0)for(const e of A)yield r.linkObjectToFolder(a,e);yield ne(c),yield t.updateMessageExtendedProperties(c.userEmail,c.messageId),yield t.updateMessageExtension(c.userEmail,c.messageId,c.parentFolderId,c.objectId),yield t.updateFoldersExtendedProperties(c.userEmail,o),D(a),G(!1),f("Email wurde erfolgreich archiviert.")}catch(e){u("Archiving mail failed: "+(e.message||String(e)))}else u("Docuvita session GUID missing.");else u("Docuvita serverUrl missing.");else u("No mail item context available.")}),te=()=>tx(void 0,void 0,void 0,function*(){var t,o;if(Office.context.mailbox&&Office.context.mailbox.item)if(null===(t=null==e?void 0:e.docuvita)||void 0===t?void 0:t.serverUrl)if(null===(o=null==e?void 0:e.docuvita)||void 0===o?void 0:o.apiSessionGuid)if(null==n?void 0:n.objectId)try{yield r.updateMailObject(v),yield re(n.objectId,O,_),yield re(n.objectId,j,A),f("Email wurde erfolgreich aktualisiert."),yield ne()}catch(e){u("Updating mail in docuvita failed: "+(e.message||String(e)))}else u("Mail is not archived yet and cannot be updated.");else u("Docuvita session GUID missing.");else u("Docuvita serverUrl missing.");else u("No mail item context available.")}),re=(e,t,o)=>tx(void 0,void 0,void 0,function*(){const n=t.filter(e=>!o.includes(e)),i=o.filter(e=>!t.includes(e));for(const t of n)yield r.unlinkObjectFromFolder(e,t);for(const t of i)yield r.linkObjectToFolder(e,t)}),oe=(e,t=!1)=>{const r=(e,t)=>e.map(e=>e.objectId===t?Object.assign(Object.assign({},e),{isMailLinked:!e.isMailLinked}):e.children&&e.children.length>0?Object.assign(Object.assign({},e),{children:r(e.children,t)}):e);t?(l(r(c,e)),B(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])):(s(r(a,e)),E(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]))},ne=e=>tx(void 0,void 0,void 0,function*(){if(r&&(e||n)){const t=yield r.getMailObjectPropertiesForEditor(e||n,(e||n).objectId?(e||n).objectId:void 0);b(t)}});return o.createElement("div",{className:Z.centeredContent},o.createElement("div",{className:Z.scrollArea},n?o.createElement(o.Fragment,null,!0===(null===(h=null==e?void 0:e.addin)||void 0===h?void 0:h.showMailInfoView)&&o.createElement(lk,{mailInfo:n}),!0===(null===(p=null==e?void 0:e.addin)||void 0===p?void 0:p.showMailDocuvitaEditor)&&o.createElement(pk,{properties:v,onPropertyChange:(e,t)=>{b(r=>r.map(r=>{if(r.FieldName===e)switch(r.FieldType){case"B":return Object.assign(Object.assign({},r),{FieldValueBool:t});case"N":return Object.assign(Object.assign({},r),{FieldValueNumeric:t});case"D":return Object.assign(Object.assign({},r),{FieldValueDateTime:t});default:return Object.assign(Object.assign({},r),{FieldValueString:t})}return r}))}}),!0===(null===(g=null==e?void 0:e.addin)||void 0===g?void 0:g.showMailFolderEditor)&&o.createElement(dT,{docuvitaApi:r,folderTree:a,setFolderTree:s,setFolderTreeVersion:Q,selectedFolder:y,parentObjectTypes:L,objectRelations:T,handleLink:oe,archivedObject:F}),!0===(null===(m=null==e?void 0:e.addin)||void 0===m?void 0:m.showMailWorkspaceEditor)&&o.createElement(ZT,{docuvitaApi:r,workspaceFolderTree:c,setWorkspaceFolderTree:l,setWorkspaceFolderTreeVersion:Y,selectedWorkspace:N,setSelectedWorkspace:z,selectedWorkspaceObjectType:q,setSelectedWorkspaceObjectType:M,workspaceObjectTypes:d,parentObjectTypes:L,objectRelations:S,selectedWorkspaceFolder:k,handleLink:oe,archivedObject:F})):o.createElement("div",null,"Lade Mail Informationen ...")),o.createElement("div",{className:Z.buttonRow},o.createElement(Jw,{content:(null==n?void 0:n.objectId)?"Email in docuvita aktualisieren":"Diese Email ist noch nicht archiviert und kann nicht aktualisiert werden.",relationship:"label"},o.createElement("span",null,o.createElement(Vt,{className:Z.responsiveButton,appearance:"secondary",disabled:!(null==n?void 0:n.objectId),icon:o.createElement(Xw,null),onClick:()=>$(!0)}))),o.createElement(Jw,{content:(null==n?void 0:n.objectId)?"Diese Email ist bereits archiviert und kann nicht erneut archiviert werden.":"Email in docuvita archivieren",relationship:"label"},o.createElement("span",null,o.createElement(Vt,{className:Z.responsiveButton,appearance:"primary",disabled:!!(null==n?void 0:n.objectId)||!K,icon:o.createElement(Yw,null),onClick:ee})))))};const ox=o.createContext(void 0),nx={},ix=(ox.Provider,(e,t)=>{const{size:r}=null!==(n=o.useContext(ox))&&void 0!==n?n:nx;var n;const{appearance:i="primary",labelPosition:a="after",size:s=(null!=r?r:"medium"),delay:c=0}=e,l=O("spinner"),{role:d="progressbar",...u}=e,f=N(qe("div",{ref:t,role:d,...u},["size"]),{elementType:"div"}),[h,p]=o.useState(!1),[g,m]=Iw();o.useEffect(()=>{if(!(c<=0))return g(()=>{p(!0)},c),()=>{m()}},[g,m,c]);const v=z(e.label,{defaultProps:{id:l},renderByDefault:!1,elementType:Qe}),b=z(e.spinner,{renderByDefault:!0,elementType:"span"});return v&&f&&!f["aria-labelledby"]&&(f["aria-labelledby"]=v.id),{appearance:i,delay:c,labelPosition:a,size:s,shouldRenderSpinner:!c||h,components:{root:"div",spinner:"span",spinnerTail:"span",label:Qe},root:f,spinner:b,spinnerTail:N(e.spinnerTail,{elementType:"span"}),label:v}}),ax=vt("rpp59a7",null,[".rpp59a7{display:flex;align-items:center;justify-content:center;line-height:0;gap:8px;overflow:hidden;min-width:min-content;}"]),sx=ye({vertical:{Beiy3e4:"f1vx9l62"}},{d:[".f1vx9l62{flex-direction:column;}"]}),cx=vt("rvgcg50","r15nd2jo",{r:[".rvgcg50{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:rb7n1on;}","@keyframes rb7n1on{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}",".r15nd2jo{position:relative;flex-shrink:0;-webkit-mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);mask-image:radial-gradient(closest-side, transparent calc(100% - var(--fui-Spinner--strokeWidth) - 1px), white calc(100% - var(--fui-Spinner--strokeWidth)) calc(100% - 1px), transparent 100%);background-color:var(--colorBrandStroke2Contrast);color:var(--colorBrandStroke1);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:linear;animation-name:r1gx3jof;}","@keyframes r1gx3jof{0%{transform:rotate(0deg);}100%{transform:rotate(-360deg);}}"],s:["@media screen and (forced-colors: active){.rvgcg50{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}","@media screen and (prefers-reduced-motion: reduce){.rvgcg50{animation-duration:1.8s;}}","@media screen and (forced-colors: active){.r15nd2jo{background-color:HighlightText;color:Highlight;forced-color-adjust:none;}}","@media screen and (prefers-reduced-motion: reduce){.r15nd2jo{animation-duration:1.8s;}}"]}),lx=vt("rxov3xa","r1o544mv",{r:[".rxov3xa{position:absolute;display:block;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r15mim6k;}",'.rxov3xa::before,.rxov3xa::after{content:"";position:absolute;display:block;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}',"@keyframes r15mim6k{0%{transform:rotate(-135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(225deg);}}",".rxov3xa::before{animation-name:r18vhmn8;}","@keyframes r18vhmn8{0%{transform:rotate(0deg);}50%{transform:rotate(105deg);}100%{transform:rotate(0deg);}}",".rxov3xa::after{animation-name:rkgrvoi;}","@keyframes rkgrvoi{0%{transform:rotate(0deg);}50%{transform:rotate(225deg);}100%{transform:rotate(0deg);}}",".r1o544mv{position:absolute;display:block;width:100%;height:100%;-webkit-mask-image:conic-gradient(transparent 105deg, white 105deg);mask-image:conic-gradient(transparent 105deg, white 105deg);animation-duration:1.5s;animation-iteration-count:infinite;animation-timing-function:var(--curveEasyEase);animation-name:r109gmi5;}",'.r1o544mv::before,.r1o544mv::after{content:"";position:absolute;display:block;width:100%;height:100%;animation:inherit;background-image:conic-gradient(currentcolor 135deg, transparent 135deg);}',"@keyframes r109gmi5{0%{transform:rotate(135deg);}50%{transform:rotate(0deg);}100%{transform:rotate(-225deg);}}",".r1o544mv::before{animation-name:r17whflh;}","@keyframes r17whflh{0%{transform:rotate(0deg);}50%{transform:rotate(-105deg);}100%{transform:rotate(0deg);}}",".r1o544mv::after{animation-name:re4odhl;}","@keyframes re4odhl{0%{transform:rotate(0deg);}50%{transform:rotate(-225deg);}100%{transform:rotate(0deg);}}"],s:["@media screen and (prefers-reduced-motion: reduce){.rxov3xa{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.rxov3xa::before,.rxov3xa::after{content:none;}}","@media screen and (prefers-reduced-motion: reduce){.r1o544mv{animation-iteration-count:0;background-image:conic-gradient(transparent 120deg, currentcolor 360deg);}.r1o544mv::before,.r1o544mv::after{content:none;}}"]}),dx=ye({inverted:{De3pzq:"fr407j0",sj55zd:"f1f7voed"},rtlTail:{btxmck:"f179dep3",gb5jj2:"fbz9ihp",Br2kee7:"f1wkkxo7"},"extra-tiny":{Bqenvij:"fd461yt",a9b677:"fjw5fx7",qmp6fs:"f1v3ph3m"},tiny:{Bqenvij:"fjamq6b",a9b677:"f64fuq3",qmp6fs:"f1v3ph3m"},"extra-small":{Bqenvij:"frvgh55",a9b677:"fq4mcun",qmp6fs:"f1v3ph3m"},small:{Bqenvij:"fxldao9",a9b677:"f1w9dchk",qmp6fs:"f1v3ph3m"},medium:{Bqenvij:"f1d2rq10",a9b677:"f1szoe96",qmp6fs:"fb52u90"},large:{Bqenvij:"f8ljn23",a9b677:"fpdz1er",qmp6fs:"fb52u90"},"extra-large":{Bqenvij:"fbhnoac",a9b677:"feqmc2u",qmp6fs:"fb52u90"},huge:{Bqenvij:"f1ft4266",a9b677:"fksc0bp",qmp6fs:"fa3u9ii"}},{d:[".fr407j0{background-color:var(--colorNeutralStrokeAlpha2);}",".f1f7voed{color:var(--colorNeutralStrokeOnBrand2);}",".f179dep3{-webkit-mask-image:conic-gradient(white 255deg, transparent 255deg);mask-image:conic-gradient(white 255deg, transparent 255deg);}",".fbz9ihp::before,.fbz9ihp::after{background-image:conic-gradient(transparent 225deg, currentcolor 225deg);}",".fd461yt{height:16px;}",".fjw5fx7{width:16px;}",".f1v3ph3m{--fui-Spinner--strokeWidth:var(--strokeWidthThick);}",".fjamq6b{height:20px;}",".f64fuq3{width:20px;}",".frvgh55{height:24px;}",".fq4mcun{width:24px;}",".fxldao9{height:28px;}",".f1w9dchk{width:28px;}",".f1d2rq10{height:32px;}",".f1szoe96{width:32px;}",".fb52u90{--fui-Spinner--strokeWidth:var(--strokeWidthThicker);}",".f8ljn23{height:36px;}",".fpdz1er{width:36px;}",".fbhnoac{height:40px;}",".feqmc2u{width:40px;}",".f1ft4266{height:44px;}",".fksc0bp{width:44px;}",".fa3u9ii{--fui-Spinner--strokeWidth:var(--strokeWidthThickest);}"],m:[["@media screen and (prefers-reduced-motion: reduce){.f1wkkxo7{background-image:conic-gradient(currentcolor 0deg, transparent 240deg);}}",{m:"screen and (prefers-reduced-motion: reduce)"}]]}),ux=ye({inverted:{sj55zd:"fonrgv7"},"extra-tiny":{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},tiny:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},"extra-small":{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},small:{Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"},medium:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},large:{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},"extra-large":{Bahqtrf:"fk6fouc",Be2twd7:"fod5ikn",Bhrd7zp:"fl43uef",Bg96gwp:"faaz57k"},huge:{Bahqtrf:"fk6fouc",Be2twd7:"f1pp30po",Bhrd7zp:"fl43uef",Bg96gwp:"f106mvju"}},{d:[".fonrgv7{color:var(--colorNeutralForegroundStaticInverted);}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}",".fod5ikn{font-size:var(--fontSizeBase400);}",".fl43uef{font-weight:var(--fontWeightSemibold);}",".faaz57k{line-height:var(--lineHeightBase400);}",".f1pp30po{font-size:var(--fontSizeBase500);}",".f106mvju{line-height:var(--lineHeightBase500);}"]}),fx=o.forwardRef((e,t)=>{const r=ix(e,t);return(e=>{const{labelPosition:t,size:r,appearance:o}=e,{dir:n}=et(),i=ax(),a=sx(),s=cx(),c=dx(),l=lx(),d=ux();e.root.className=Z("fui-Spinner",i,("above"===t||"below"===t)&&a.vertical,e.root.className),e.spinner&&(e.spinner.className=Z("fui-Spinner__spinner",s,c[r],"inverted"===o&&c.inverted,e.spinner.className)),e.spinnerTail&&(e.spinnerTail.className=Z("fui-Spinner__spinnerTail",l,"rtl"===n&&c.rtlTail,e.spinnerTail.className)),e.label&&(e.label.className=Z("fui-Spinner__label",d[r],"inverted"===o&&d.inverted,e.label.className))})(r),Je("useSpinnerStyles_unstable")(r),(e=>{const{labelPosition:t,shouldRenderSpinner:r}=e;return We(e.root,{children:[e.label&&r&&("above"===t||"before"===t)&&Ue(e.label,{}),e.spinner&&r&&Ue(e.spinner,{children:e.spinnerTail&&Ue(e.spinnerTail,{})}),e.label&&r&&("below"===t||"after"===t)&&Ue(e.label,{})]})})(r)});fx.displayName="Spinner";const hx=e=>{switch(e){case"unlimited":return 0;case"limited":return 1;case"limited-trap-focus":return 2;default:return}},px=o.createContext(void 0),gx={selectableA11yProps:{referenceId:void 0,setReferenceId(){},referenceLabel:void 0,setReferenceLabel(){}}},mx=px.Provider,vx={off:void 0,"no-tab":"limited-trap-focus","tab-exit":"limited","tab-only":"unlimited"},bx=(e,t)=>{const{appearance:r="filled",orientation:n="vertical",size:i="medium",disabled:a=!1,...s}=e,[l,d]=o.useState(gx.selectableA11yProps.referenceId),[u,f]=o.useState(gx.selectableA11yProps.referenceId),h=mt(),{selectable:p,selected:g,selectableCardProps:m,selectFocused:v,checkboxSlot:b,floatingActionSlot:y}=((e,{referenceLabel:t,referenceId:r},n)=>{const{checkbox:i={},onSelectionChange:a,floatingAction:s,onClick:l,onKeyDown:d,disabled:u}=e,{findAllFocusable:f}=OC(),h=o.useRef(null),[p,g]=c({state:e.selected,defaultState:e.defaultSelected,initialState:!1}),m=[e.selected,e.defaultSelected,a].some(e=>void 0!==e),[v,b]=o.useState(!1),y=o.useCallback(e=>{if(!n.current)return!1;const t=f(n.current),r=e.target,o=t.some(e=>e.contains(r)),i=(null==h?void 0:h.current)===r;return o&&!i},[n,f]),w=o.useCallback(e=>{if(u||y(e))return;const t=!p;g(t),a&&a(e,{selected:t})},[u,a,p,g,y]),k=o.useCallback(e=>{[It].includes(e.key)&&(e.preventDefault(),w(e))},[w]),C=o.useMemo(()=>{if(!m||s)return;const e={};return r?e["aria-labelledby"]=r:t&&(e["aria-label"]=t),z(i,{defaultProps:{ref:h,type:"checkbox",checked:p,disabled:u,onChange:e=>w(e),onFocus:()=>b(!0),onBlur:()=>b(!1),...e},elementType:"input"})},[i,u,s,p,m,w,r,t]),T=o.useMemo(()=>{if(s)return z(s,{defaultProps:{ref:h},elementType:"div"})},[s]),x=o.useMemo(()=>m?{onClick:_v(l,w),onKeyDown:_v(d,k)}:null,[m,w,l,d,k]);return{selected:p,selectable:m,selectFocused:v,selectableCardProps:x,checkboxSlot:C,floatingActionSlot:T}})(e,{referenceId:l,referenceLabel:u},h),w=D(h,t),{interactive:k,focusAttributes:C}=(({focusMode:e,disabled:t=!1,...r})=>{const o=["onClick","onDoubleClick","onMouseUp","onMouseDown","onPointerUp","onPointerDown","onTouchStart","onTouchEnd","onDragStart","onDragEnd"].some(e=>r[e]),n=null!=e?e:o?"no-tab":"off",i=(a={tabBehavior:vx[n]},pv(cv),gv({groupper:{tabbability:hx(null==a?void 0:a.tabBehavior)},focusable:{ignoreKeydown:null==a?void 0:a.ignoreDefaultKeydown}}));var a;return t?{interactive:!1,focusAttributes:null}:"off"===n?{interactive:o,focusAttributes:null}:{interactive:o,focusAttributes:{...i,tabIndex:0}}})(e);let T={...p?null:C,...s,...m};return a&&(T={...s,"aria-disabled":!0,onClick:void 0}),{appearance:r,orientation:n,size:i,interactive:k,selectable:p,selectFocused:v,selected:g,disabled:a,selectableA11yProps:{setReferenceId:d,referenceId:l,referenceLabel:u,setReferenceLabel:f},components:{root:"div",floatingAction:"div",checkbox:"input"},root:N(qe("div",{ref:w,role:"group",...T}),{elementType:"div"}),floatingAction:y,checkbox:b}};const yx=vt("rfxo2k2","rgle7w9",[".rfxo2k2{overflow:hidden;border-radius:var(--fui-Card--border-radius);padding:var(--fui-Card--size);gap:var(--fui-Card--size);display:flex;position:relative;box-sizing:border-box;color:var(--colorNeutralForeground1);}",'.rfxo2k2::after{position:absolute;top:0;left:0;right:0;bottom:0;content:"";pointer-events:none;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-width:var(--strokeWidthThin);border-right-width:var(--strokeWidthThin);border-bottom-width:var(--strokeWidthThin);border-left-width:var(--strokeWidthThin);border-radius:var(--fui-Card--border-radius);}',".rfxo2k2>.fui-CardHeader,.rfxo2k2>.fui-CardFooter{flex-shrink:0;}",".rgle7w9{overflow:hidden;border-radius:var(--fui-Card--border-radius);padding:var(--fui-Card--size);gap:var(--fui-Card--size);display:flex;position:relative;box-sizing:border-box;color:var(--colorNeutralForeground1);}",'.rgle7w9::after{position:absolute;top:0;right:0;left:0;bottom:0;content:"";pointer-events:none;border-top-style:solid;border-left-style:solid;border-bottom-style:solid;border-right-style:solid;border-top-width:var(--strokeWidthThin);border-left-width:var(--strokeWidthThin);border-bottom-width:var(--strokeWidthThin);border-right-width:var(--strokeWidthThin);border-radius:var(--fui-Card--border-radius);}',".rgle7w9>.fui-CardHeader,.rgle7w9>.fui-CardFooter{flex-shrink:0;}"]),wx=ye({focused:{Brovlpu:"ftqa4ok",B486eqv:"f2hkw1w",B8q5s1w:"f8hki3x",Bci5o5g:["f1d2448m","ffh67wi"],n8qw10:"f1bjia2o",Bdrgwmp:["ffh67wi","f1d2448m"],Bb7d1vk:"f226i61",zhwhgb:["f13kzufm","fsx75g8"],dhy2o1:"flujwa2",Gfyso:["fsx75g8","f13kzufm"],Bm4h7ae:"f15bsgw9",B7ys5i9:"f14e48fq",Busjfv9:"f18yb2kv",Bhk32uz:"fd6o370",f6g5ot:0,Boxcth7:0,Bhdgwq3:0,hgwjuy:0,Bshpdp8:0,Bsom6fd:0,Blkhhs4:0,Bonggc9:0,Ddfuxk:0,i03rao:0,kclons:0,clg4pj:0,Bpqj9nj:0,B6dhp37:0,Bf4ptjt:0,Bqtpl0w:0,i4rwgc:"fpqizxz",Dah5zi:0,B1tsrr9:0,qqdqy8:0,Bkh64rk:0,e3fwne:"fnd8nzh",J0r882:"f15fr7a0",Bule8hv:["fwsq40z","fy0y4wt"],Bjwuhne:"f34ld9f",Ghsupd:["fy0y4wt","fwsq40z"]},selectableFocused:{Brovlpu:"ftqa4ok",B486eqv:"f2hkw1w",Bssx7fj:"f1b1k54r",uh7if5:["f4ne723","fqqcjud"],clntm0:"fh7aioi",Dlk2r6:["fqqcjud","f4ne723"],Bm3wd5j:"f1k55ka9",Bbrhkcr:["fgclinu","f16pcs8n"],f1oku:"fycbxed",aywvf2:["f16pcs8n","fgclinu"],B2j2mmj:"ffht0p2",wigs8:"f1p0ul1q",pbfy6t:"f1c901ms",B0v4ure:"f1alokd7",Byrf0fs:0,Bsiemmq:0,Bwckmig:0,skfxo0:0,Iidy0u:0,B98u21t:0,Bvwlmkc:0,jo1ztg:0,Ba1iezr:0,Blmvk6g:0,B24cy0v:0,Bil7v7r:0,Br3gin4:0,nr063g:0,ghq09:0,Bbgo44z:0,Bseh09z:"f1i978nd",az1dzo:0,Ba3ybja:0,B6352mv:0,vppk2z:0,Biaj6j7:"f1nh8hsq",B2pnrqr:"f1amxum7",B29w5g4:["f1cec8w7","f554mv0"],Bhhzhcn:"f1sj6kbr",Bec0n69:["f554mv0","f1cec8w7"]},orientationHorizontal:{Beiy3e4:"f1063pyq",Bt984gj:"f122n59",Binpb3b:"ftrw7vg",qrt8p2:"f18opajm",k6ws3r:["f13002it","fqo182t"],Btcwela:["f18yna97","f1kd6wh7"],Fer9m8:"f4i4759"},orientationVertical:{Beiy3e4:"f1vx9l62",B5nvv7i:["f14k419y","f1fgo9fz"],Baxg94k:["f1fgo9fz","f14k419y"],tn21ii:"fvqmfsm",B0ud6bj:"f3am6yf",Bgdo4j:"f1r5wgso"},sizeSmall:{B7balbw:"f1pi9uxy",B1h88n7:"f1h1zgly"},sizeMedium:{B7balbw:"frsmuga",B1h88n7:"fuldkky"},sizeLarge:{B7balbw:"f1qua4xo",B1h88n7:"fimkt6v"},interactive:{rhjd8f:"f1epqm3e"},filled:{De3pzq:"fxugw4r",E5pizo:"f1whvlc6",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"]},filledInteractive:{Bceei9c:"f1k6fduh",De3pzq:"fxugw4r",E5pizo:"f1whvlc6",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"],Bi91k9c:"feu1g3u",Jwef8y:"f1knas48",Bvxd0ez:"f1m145df",ecr2s2:"fb40n2d"},filledInteractiveSelected:{De3pzq:"f1nfm20t",B0n5ga8:"f16eln5f",s924m2:["fa2okxs","fg4zq3l"],B1q35kw:"ff6932p",Gp14am:["fg4zq3l","fa2okxs"],Bi91k9c:"fx9teim",Jwef8y:"f1kz6goq"},filledAlternative:{De3pzq:"f1dmdbja",E5pizo:"f1whvlc6",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"]},filledAlternativeInteractive:{Bceei9c:"f1k6fduh",De3pzq:"f1dmdbja",E5pizo:"f1whvlc6",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"],Bi91k9c:"fnwyq0v",Jwef8y:"f1uvynv3",Bvxd0ez:"f1m145df",ecr2s2:"f1yhgkbh"},filledAlternativeInteractiveSelected:{De3pzq:"fjxa0vh",B0n5ga8:"f16eln5f",s924m2:["fa2okxs","fg4zq3l"],B1q35kw:"ff6932p",Gp14am:["fg4zq3l","fa2okxs"],Bi91k9c:"f1luvkty",Jwef8y:"fehi0vp"},outline:{De3pzq:"f1c21dwh",E5pizo:"f1couhl3",B0n5ga8:"ft83z1f",s924m2:["f1g4150c","f192dr6e"],B1q35kw:"f1qnawh6",Gp14am:["f192dr6e","f1g4150c"]},outlineInteractive:{Bceei9c:"f1k6fduh",De3pzq:"f1c21dwh",E5pizo:"f1couhl3",B0n5ga8:"ft83z1f",s924m2:["f1g4150c","f192dr6e"],B1q35kw:"f1qnawh6",Gp14am:["f192dr6e","f1g4150c"],Bi91k9c:"feu1g3u",Jwef8y:"fjxutwb",Be0v6ae:"f1llr77y",B5kxglz:["fzk0khw","fjj8tog"],B3pwyw6:"fb1u8ub",Bymgtzf:["fjj8tog","fzk0khw"],ecr2s2:"fophhak",dmfk:"f1uohb70",B4ofi8:["f1jm7v1n","f1bus3rq"],jgq6uv:"f1fbu7rr",Baxewws:["f1bus3rq","f1jm7v1n"]},outlineInteractiveSelected:{De3pzq:"f1q9pm1r",B0n5ga8:"f16eln5f",s924m2:["fa2okxs","fg4zq3l"],B1q35kw:"ff6932p",Gp14am:["fg4zq3l","fa2okxs"],Bi91k9c:"fx9teim",Jwef8y:"fg59vm4"},outlineDisabled:{De3pzq:"f1c21dwh",E5pizo:"f1couhl3",g2u3we:"f1jj8ep1",h3c5rm:["f15xbau","fy0fskl"],B9xav0g:"f4ikngz",zhjwy3:["fy0fskl","f15xbau"],ezxybo:"f1ls5moo",wc7uws:"f1qiza15",B0n5ga8:"f13dj02",s924m2:["f9wngki","f17v59j0"],B1q35kw:"f1vxzwsp",Gp14am:["f17v59j0","f9wngki"]},subtle:{De3pzq:"fhovq9v",E5pizo:"f1couhl3",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"]},subtleInteractive:{Bceei9c:"f1k6fduh",De3pzq:"fhovq9v",E5pizo:"f1couhl3",B0n5ga8:"f16gxe2i",s924m2:["fpgykix","fzybk4o"],B1q35kw:"f1osi826",Gp14am:["fzybk4o","fpgykix"],Bi91k9c:"feu1g3u",Jwef8y:"f1t94bn6",ecr2s2:"f1wfn5kd"},subtleInteractiveSelected:{De3pzq:"fq5gl1p",B0n5ga8:"f16eln5f",s924m2:["fa2okxs","fg4zq3l"],B1q35kw:"ff6932p",Gp14am:["fg4zq3l","fa2okxs"],Bi91k9c:"fx9teim",Jwef8y:"f1uqaxdt"},highContrastSelected:{ycbfsm:"fkc42ay",Bsw6fvg:"f1rirnrt",Bbusuzp:"f1lkg8j3",xgfqdd:"f1nkj0oa",Bmmdzwq:"fey3rwa",zkpvhj:["f5jhx11","fff9uym"],B20bydw:"fm7n0jy",Bwwwggl:["fff9uym","f5jhx11"]},highContrastInteractive:{h1vhog:"fpfvv3l",kslmdy:"f1oamsm6",Baaf6ca:"f1il21bs",x9zz3d:"fnn5dk0",Bmmdzwq:"fey3rwa",zkpvhj:["f5jhx11","fff9uym"],B20bydw:"fm7n0jy",Bwwwggl:["fff9uym","f5jhx11"]},select:{qhf8xq:"f1euv43f",Bhzewxz:"fqclxi7",j35jbq:["fiv86kb","f36uhnt"],Bj3rh1h:"fom9my7"},hiddenCheckbox:{B68tc82:0,Bmxbyg5:0,Bpg54ce:"f1a3p1vp",a9b677:"frkrog8",Bqenvij:"f1mpe4l3",qhf8xq:"f1euv43f",Bh84pgu:"fmf1zke",Bgl5zvf:"f1wch0ki",Huce71:"fz5stix"},disabled:{Bceei9c:"fdrzuqr",famaaq:"f1xqy1su",sj55zd:"f1s2aq7o",De3pzq:"f1bg9a2p",E5pizo:"fyed02w",g2u3we:"f1jj8ep1",h3c5rm:["f15xbau","fy0fskl"],B9xav0g:"f4ikngz",zhjwy3:["fy0fskl","f15xbau"],Ftih45:"f1wl9k8s",Brfgrao:"f1j7ml58",lawp4y:0,Fbdkly:0,mdwyqc:0,Bciustq:0,gc50h5:"f13vvzas",Ehzi8l:"f198lalb",B0n5ga8:"f13dj02",s924m2:["f9wngki","f17v59j0"],B1q35kw:"f1vxzwsp",Gp14am:["f17v59j0","f9wngki"],Bikrtoi:"f11og98d",G8qf51:"f1rg3h4v",Brxh4y7:"fbm2y3b",ezxybo:"f4yodeu",wc7uws:"fcwfbwp",gp3uxg:"f1repx37",Fohawp:["f1ybi8ct","f1h4eg6q"],Bxulg6k:"f18mejnb",vcjq4m:["f1h4eg6q","f1ybi8ct"],Bsqkqe9:"f1nift3m",fskg1g:"f1wu3i8x",iwiei9:0,Effecx:0,Bkt1b9m:0,jfmxvr:0,orauir:"f6v4vfa",B2yd9ot:"folrdqs",Fn9tzk:"f168z5yf",Bv0wker:["fpor7gj","fzextn6"],Bp2dl5b:"f1yaw79v",pzn0iz:["fzextn6","fpor7gj"]}},{f:[".ftqa4ok:focus{outline-style:none;}"],i:[".f2hkw1w:focus-visible{outline-style:none;}"],d:[".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",".f1bjia2o[data-fui-focus-visible]{border-bottom-color:transparent;}",'.f15bsgw9[data-fui-focus-visible]::after{content:"";}',".f14e48fq[data-fui-focus-visible]::after{position:absolute;}",".f18yb2kv[data-fui-focus-visible]::after{pointer-events:none;}",".fd6o370[data-fui-focus-visible]::after{z-index:1;}",[".fpqizxz[data-fui-focus-visible]::after{border:var(--strokeWidthThick) solid var(--colorStrokeFocus2);}",{p:-2}],[".fnd8nzh[data-fui-focus-visible]::after{border-radius:var(--fui-Card--border-radius);}",{p:-1}],".f15fr7a0[data-fui-focus-visible]::after{top:calc(0px - var(--strokeWidthThick) - -2px);}",".fwsq40z[data-fui-focus-visible]::after{right:calc(0px - var(--strokeWidthThick) - -2px);}",".fy0y4wt[data-fui-focus-visible]::after{left:calc(0px - var(--strokeWidthThick) - -2px);}",".f34ld9f[data-fui-focus-visible]::after{bottom:calc(0px - var(--strokeWidthThick) - -2px);}",".f1b1k54r[data-fui-focus-within]:focus-within{border-top-color:transparent;}",".f4ne723[data-fui-focus-within]:focus-within{border-right-color:transparent;}",".fqqcjud[data-fui-focus-within]:focus-within{border-left-color:transparent;}",".fh7aioi[data-fui-focus-within]:focus-within{border-bottom-color:transparent;}",'.ffht0p2[data-fui-focus-within]:focus-within::after{content:"";}',".f1p0ul1q[data-fui-focus-within]:focus-within::after{position:absolute;}",".f1c901ms[data-fui-focus-within]:focus-within::after{pointer-events:none;}",".f1alokd7[data-fui-focus-within]:focus-within::after{z-index:1;}",[".f1i978nd[data-fui-focus-within]:focus-within::after{border:var(--strokeWidthThick) solid var(--colorStrokeFocus2);}",{p:-2}],[".f1nh8hsq[data-fui-focus-within]:focus-within::after{border-radius:var(--fui-Card--border-radius);}",{p:-1}],".f1amxum7[data-fui-focus-within]:focus-within::after{top:calc(0px - var(--strokeWidthThick) - -2px);}",".f1cec8w7[data-fui-focus-within]:focus-within::after{right:calc(0px - var(--strokeWidthThick) - -2px);}",".f554mv0[data-fui-focus-within]:focus-within::after{left:calc(0px - var(--strokeWidthThick) - -2px);}",".f1sj6kbr[data-fui-focus-within]:focus-within::after{bottom:calc(0px - var(--strokeWidthThick) - -2px);}",".f1063pyq{flex-direction:row;}",".f122n59{align-items:center;}",".ftrw7vg>.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}",".f18opajm>.fui-CardPreview{margin-bottom:calc(var(--fui-Card--size) * -1);}",'.f13002it>:not([aria-hidden="true"]).fui-CardPreview:first-of-type{margin-left:calc(var(--fui-Card--size) * -1);}','.fqo182t>:not([aria-hidden="true"]).fui-CardPreview:first-of-type{margin-right:calc(var(--fui-Card--size) * -1);}','.f18yna97>:not([aria-hidden="true"]).fui-CardPreview:last-of-type{margin-right:calc(var(--fui-Card--size) * -1);}','.f1kd6wh7>:not([aria-hidden="true"]).fui-CardPreview:last-of-type{margin-left:calc(var(--fui-Card--size) * -1);}',".f4i4759>.fui-CardHeader:last-of-type,.f4i4759>.fui-CardFooter:last-of-type{flex-grow:1;}",".f1vx9l62{flex-direction:column;}",".f14k419y>.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}",".f1fgo9fz>.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}",'.fvqmfsm>:not([aria-hidden="true"]).fui-CardPreview:first-of-type{margin-top:calc(var(--fui-Card--size) * -1);}',".f3am6yf>.fui-Card__floatingAction+.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}",'.f1r5wgso>:not([aria-hidden="true"]).fui-CardPreview:last-of-type{margin-bottom:calc(var(--fui-Card--size) * -1);}',".f1pi9uxy{--fui-Card--size:8px;}",".f1h1zgly{--fui-Card--border-radius:var(--borderRadiusSmall);}",".frsmuga{--fui-Card--size:12px;}",".fuldkky{--fui-Card--border-radius:var(--borderRadiusMedium);}",".f1qua4xo{--fui-Card--size:16px;}",".fimkt6v{--fui-Card--border-radius:var(--borderRadiusLarge);}",".f1epqm3e .fui-Text{color:currentColor;}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f1whvlc6{box-shadow:var(--shadow4);}",".f16gxe2i::after{border-top-color:var(--colorTransparentStroke);}",".fpgykix::after{border-right-color:var(--colorTransparentStroke);}",".fzybk4o::after{border-left-color:var(--colorTransparentStroke);}",".f1osi826::after{border-bottom-color:var(--colorTransparentStroke);}",".f1k6fduh{cursor:pointer;}",".f1nfm20t{background-color:var(--colorNeutralBackground1Selected);}",".f16eln5f::after{border-top-color:var(--colorNeutralStroke1Selected);}",".fa2okxs::after{border-right-color:var(--colorNeutralStroke1Selected);}",".fg4zq3l::after{border-left-color:var(--colorNeutralStroke1Selected);}",".ff6932p::after{border-bottom-color:var(--colorNeutralStroke1Selected);}",".f1dmdbja{background-color:var(--colorNeutralBackground2);}",".fjxa0vh{background-color:var(--colorNeutralBackground2Selected);}",".f1c21dwh{background-color:var(--colorTransparentBackground);}",".f1couhl3{box-shadow:none;}",".ft83z1f::after{border-top-color:var(--colorNeutralStroke1);}",".f1g4150c::after{border-right-color:var(--colorNeutralStroke1);}",".f192dr6e::after{border-left-color:var(--colorNeutralStroke1);}",".f1qnawh6::after{border-bottom-color:var(--colorNeutralStroke1);}",".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}",".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}",".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}",".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}",".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".f13dj02::after{border-top-color:var(--colorNeutralStrokeDisabled);}",".f9wngki::after{border-right-color:var(--colorNeutralStrokeDisabled);}",".f17v59j0::after{border-left-color:var(--colorNeutralStrokeDisabled);}",".f1vxzwsp::after{border-bottom-color:var(--colorNeutralStrokeDisabled);}",".fhovq9v{background-color:var(--colorSubtleBackground);}",".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}",".f1euv43f{position:absolute;}",".fqclxi7{top:4px;}",".fiv86kb{right:4px;}",".f36uhnt{left:4px;}",".fom9my7{z-index:var(--zIndexContent, 1);}",[".f1a3p1vp{overflow:hidden;}",{p:-1}],".frkrog8{width:1px;}",".f1mpe4l3{height:1px;}",".fmf1zke{clip:rect(0 0 0 0);}",".f1wch0ki{clip-path:inset(50%);}",".fz5stix{white-space:nowrap;}",".fdrzuqr{cursor:not-allowed;}",".f1xqy1su{-webkit-user-select:none;-moz-user-select:none;user-select:none;}",".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}",".f1bg9a2p{background-color:var(--colorNeutralBackgroundDisabled);}",".fyed02w{box-shadow:var(--shadow2);}",'.f1wl9k8s::before{content:"";}',".f1j7ml58::before{position:absolute;}",[".f13vvzas::before{inset:0;}",{p:-1}],".f198lalb::before{z-index:calc(var(--zIndexContent, 1) + 1);}"],m:[["@media (forced-colors: active){.f226i61[data-fui-focus-visible]::after{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f13kzufm[data-fui-focus-visible]::after{border-right-color:Highlight;}.fsx75g8[data-fui-focus-visible]::after{border-left-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.flujwa2[data-fui-focus-visible]::after{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1k55ka9[data-fui-focus-within]:focus-within::after{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f16pcs8n[data-fui-focus-within]:focus-within::after{border-left-color:Highlight;}.fgclinu[data-fui-focus-within]:focus-within::after{border-right-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fycbxed[data-fui-focus-within]:focus-within::after{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1lkg8j3{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1nkj0oa .fui-CardPreview,.f1nkj0oa .fui-CardFooter{forced-color-adjust:auto;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fey3rwa::after{border-top-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f5jhx11::after{border-right-color:Highlight;}.fff9uym::after{border-left-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fm7n0jy::after{border-bottom-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fpfvv3l:hover,.fpfvv3l :active{forced-color-adjust:none;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1oamsm6:hover,.f1oamsm6 :active{background-color:Highlight;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.f1il21bs:hover,.f1il21bs :active{color:HighlightText;}}",{m:"(forced-colors: active)"}],["@media (forced-colors: active){.fnn5dk0:hover .fui-CardPreview,.fnn5dk0 :active .fui-CardPreview,.fnn5dk0:hover .fui-CardFooter,.fnn5dk0 :active .fui-CardFooter{forced-color-adjust:auto;}}",{m:"(forced-colors: active)"}]],h:[".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}",".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}",".f1m145df:hover{box-shadow:var(--shadow8);}",".fx9teim:hover{color:var(--colorNeutralForeground1Selected);}",".f1kz6goq:hover{background-color:var(--colorNeutralBackground1Selected);}",".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}",".f1uvynv3:hover{background-color:var(--colorNeutralBackground2Hover);}",".f1luvkty:hover{color:var(--colorNeutralForeground2Selected);}",".fehi0vp:hover{background-color:var(--colorNeutralBackground2Selected);}",".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}",".f1llr77y:hover::after{border-top-color:var(--colorNeutralStroke1Hover);}",".fzk0khw:hover::after{border-right-color:var(--colorNeutralStroke1Hover);}",".fjj8tog:hover::after{border-left-color:var(--colorNeutralStroke1Hover);}",".fb1u8ub:hover::after{border-bottom-color:var(--colorNeutralStroke1Hover);}",".fg59vm4:hover{background-color:var(--colorTransparentBackgroundSelected);}",".f1ls5moo:hover,.f1ls5moo:active{background-color:var(--colorTransparentBackground);}",".f1qiza15:hover,.f1qiza15:active{box-shadow:none;}",".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}",".f1uqaxdt:hover{background-color:var(--colorSubtleBackgroundSelected);}",".f11og98d:hover,.f11og98d:active{cursor:not-allowed;}",".f1rg3h4v:hover,.f1rg3h4v:active{-webkit-user-select:none;-moz-user-select:none;user-select:none;}",".fbm2y3b:hover,.fbm2y3b:active{color:var(--colorNeutralForegroundDisabled);}",".f4yodeu:hover,.f4yodeu:active{background-color:var(--colorNeutralBackgroundDisabled);}",".fcwfbwp:hover,.fcwfbwp:active{box-shadow:var(--shadow2);}",".f1repx37:hover,.f1repx37:active{border-top-color:var(--colorNeutralStrokeDisabled);}",".f1ybi8ct:hover,.f1ybi8ct:active{border-right-color:var(--colorNeutralStrokeDisabled);}",".f1h4eg6q:hover,.f1h4eg6q:active{border-left-color:var(--colorNeutralStrokeDisabled);}",".f18mejnb:hover,.f18mejnb:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}",'.f1nift3m:hover::before,.f1nift3m:active::before{content:"";}',".f1wu3i8x:hover::before,.f1wu3i8x:active::before{position:absolute;}",[".f6v4vfa:hover::before,.f6v4vfa:active::before{inset:0;}",{p:-1}],".folrdqs:hover::before,.folrdqs:active::before{z-index:calc(var(--zIndexContent, 1) + 1);}",".f168z5yf:hover::after,.f168z5yf:active::after{border-top-color:var(--colorNeutralStrokeDisabled);}",".fpor7gj:hover::after,.fpor7gj:active::after{border-right-color:var(--colorNeutralStrokeDisabled);}",".fzextn6:hover::after,.fzextn6:active::after{border-left-color:var(--colorNeutralStrokeDisabled);}",".f1yaw79v:hover::after,.f1yaw79v:active::after{border-bottom-color:var(--colorNeutralStrokeDisabled);}"],a:[".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}",".f1yhgkbh:active{background-color:var(--colorNeutralBackground2Pressed);}",".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}",".f1uohb70:active::after{border-top-color:var(--colorNeutralStroke1Pressed);}",".f1jm7v1n:active::after{border-right-color:var(--colorNeutralStroke1Pressed);}",".f1bus3rq:active::after{border-left-color:var(--colorNeutralStroke1Pressed);}",".f1fbu7rr:active::after{border-bottom-color:var(--colorNeutralStroke1Pressed);}",".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]}),kx=o.forwardRef((e,t)=>{const r=bx(e,t),n=function({selectableA11yProps:e}){return{selectableA11yProps:e}}(r);return(e=>{const t=yx(),r=wx(),n={horizontal:r.orientationHorizontal,vertical:r.orientationVertical},i={small:r.sizeSmall,medium:r.sizeMedium,large:r.sizeLarge},a={filled:r.filled,"filled-alternative":r.filledAlternative,outline:r.outline,subtle:r.subtle},s={filled:r.filledInteractiveSelected,"filled-alternative":r.filledAlternativeInteractiveSelected,outline:r.outlineInteractiveSelected,subtle:r.subtleInteractiveSelected},c={filled:r.filledInteractive,"filled-alternative":r.filledAlternativeInteractive,outline:r.outlineInteractive,subtle:r.subtleInteractive},l=!e.disabled&&(e.interactive||e.selectable),d=o.useMemo(()=>e.disabled?"":e.selectable?e.selectFocused?r.selectableFocused:"":r.focused,[e.disabled,e.selectFocused,e.selectable,r.focused,r.selectableFocused]);e.root.className=Z("fui-Card",t,n[e.orientation],i[e.size],a[e.appearance],l&&r.interactive,l&&c[e.appearance],e.selected&&s[e.appearance],d,l&&r.highContrastInteractive,e.selected&&r.highContrastSelected,e.disabled&&r.disabled,e.disabled&&"outline"===e.appearance&&r.outlineDisabled,e.root.className),e.floatingAction&&(e.floatingAction.className=Z("fui-Card__floatingAction",r.select,e.floatingAction.className)),e.checkbox&&(e.checkbox.className=Z("fui-Card__checkbox",r.hiddenCheckbox,e.checkbox.className))})(r),Je("useCardStyles_unstable")(r),((e,t)=>Ue(e.root,{children:We(mx,{value:t,children:[e.checkbox?Ue(e.checkbox,{}):null,e.floatingAction?Ue(e.floatingAction,{}):null,e.root.children]})}))(r,n)});kx.displayName="Card";var Cx={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Tx=o.createContext&&o.createContext(Cx),xx=["attr","size","title"];function Sx(){return Sx=Object.assign?Object.assign.bind():function(e){for(var t=1;to.createElement(e.tag,_x({key:t},e.attr),Ex(e.child)))}function Ax(e){return t=>o.createElement(Bx,Sx({attr:_x({},e.attr)},t),Ex(e.child))}function Bx(e){var t=t=>{var r,{attr:n,size:i,title:a}=e,s=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r={};for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){if(t.indexOf(o)>=0)continue;r[o]=e[o]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(e,xx),c=i||t.size||"1em";return t.className&&(r=t.className),e.className&&(r=(r?r+" ":"")+e.className),o.createElement("svg",Sx({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,s,{className:r,style:_x(_x({color:e.color||t.color},t.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&o.createElement("title",null,a),e.children)};return void 0!==Tx?o.createElement(Tx.Consumer,null,e=>t(e)):t(Cx)}function Ox(e){return Ax({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M200,26H72A14,14,0,0,0,58,40V66H40A14,14,0,0,0,26,80v96a14,14,0,0,0,14,14H58v26a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V40A14,14,0,0,0,200,26Zm-42,76h44v52H158Zm44-62V90H158V80a14,14,0,0,0-14-14h-2V38h58A2,2,0,0,1,202,40ZM70,40a2,2,0,0,1,2-2h58V66H70ZM38,176V80a2,2,0,0,1,2-2H144a2,2,0,0,1,2,2v96a2,2,0,0,1-2,2H40A2,2,0,0,1,38,176Zm32,40V190h60v28H72A2,2,0,0,1,70,216Zm130,2H142V190h2a14,14,0,0,0,14-14V166h44v50A2,2,0,0,1,200,218ZM67.39,148.16,84.19,128l-16.8-20.16a6,6,0,1,1,9.22-7.68L92,118.63l15.39-18.47a6,6,0,0,1,9.22,7.68L99.81,128l16.8,20.16a6,6,0,1,1-9.22,7.68L92,137.37,76.61,155.84a6,6,0,0,1-9.22-7.68Z"},child:[]}]})(e)}function Rx(e){return Ax({tag:"svg",attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M200,26H72A14,14,0,0,0,58,40V66H40A14,14,0,0,0,26,80v96a14,14,0,0,0,14,14H58v26a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V40A14,14,0,0,0,200,26Zm-42,76h44v52H158ZM70,40a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2V90H158V80a14,14,0,0,0-14-14H70ZM38,176V80a2,2,0,0,1,2-2H144a2,2,0,0,1,2,2v96a2,2,0,0,1-2,2H40A2,2,0,0,1,38,176Zm162,42H72a2,2,0,0,1-2-2V190h74a14,14,0,0,0,14-14V166h44v50A2,2,0,0,1,200,218ZM70.18,153.46l-12-48a6,6,0,1,1,11.64-2.92l8.07,32.27,8.74-17.49a6,6,0,0,1,10.74,0l8.74,17.49,8.07-32.27a6,6,0,1,1,11.64,2.92l-12,48a6,6,0,0,1-5.17,4.5,4.63,4.63,0,0,1-.65,0,6,6,0,0,1-5.37-3.32L92,133.42,81.37,154.68a6,6,0,0,1-11.19-1.22Z"},child:[]}]})(e)}function jx(e){return Ax({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM3.527 11.85h-.893l-.823 1.439h-.036L.943 11.85H.012l1.227 1.983L0 15.85h.861l.853-1.415h.035l.85 1.415h.908l-1.254-1.992zm.954 3.999v-2.66h.038l.952 2.159h.516l.946-2.16h.038v2.661h.715V11.85h-.8l-1.14 2.596h-.025L4.58 11.85h-.806v3.999zm4.71-.674h1.696v.674H8.4V11.85h.791z"},child:[]}]})(e)}var Px={msal:"Microsoft Authentication Library (MSAL)",docuvita:"docuvita Archiv",addin:"Add-In Konfiguration",clientId:"Client Id",tenantId:"Tenant Id",redirectUri:"Redirect URI",scopes:"Scopes",serverUrl:"docuvita Server URL",systemId:"docuvita System Id",apiUserName:"Archivbenutzer Name",apiPassword:"Archivbenutzer Passwort",apiSessionGuid:"API-Benutzer Session GUID",mailObjectType:"Objekttyp Email",folderObjectType:"Objekttyp Datumsordner",synchronizedFolderObjectType:"Objekttyp Postfachordner",accessRight:"Zugriffsrecht",archiveParentObjectId:"Objekt Id Email-Archivordner",archiveStructureParentObjectId:"Objekt Id Postfachordner",useDateFolders:"Datumbasiertes Archiv verwenden",synchronizeFolders:"Postfachordner synchronisieren",deleteMessages:"Nachrichten aus Postfach löschen",extractAttachments:"Anhänge extrahieren",theme:"Design",showWelcome:"Willkommensseite beim Start anzeigen",showMailInfoView:"Aktuelle Mail Informationen anzeigen",showProfileView:"Profil Informationen anzeigen",showMailDocuvitaEditor:"docuvita Mail Informationen anzeigen",showMailFolderEditor:"Ordnerauswahl für Mails anzeigen",showMailWorkspaceEditor:"Aktenauswahl für Mails anzeigen",attachmentObjectType:"Objekttyp Anhang",attachmentParentObjectId:"Objekt Id Anhang-Archivordner",showAttachmentDocuvitaEditor:"docuvita Anhang Informationen anzeigen",showAttachmentFolderEditor:"Ordnerauswahl für Anhänge anzeigen",showAttachmentWorkspaceEditor:"Aktenauswahl für Anhänge anzeigen"},Nx=({config:e,mailInfo:t,properties:r,attachmentObjectTypes:n=[],selectedAttachment:i,selectedFolder:a,selectedObjectType:s,setSelectedObjectType:c,onPropertyChange:l})=>{var d,u,f;const h=Lg(),[p,g]=(0,o.useState)(!1),m=e=>{if(!e)return"";if(/^\d{4}-\d{2}-\d{2}$/.test(e))return e;const t=new Date(e);return isNaN(t.getTime())?"":t.toISOString().slice(0,10)};return o.createElement("form",{className:h.form},o.createElement("fieldset",{className:h.fieldset_v},o.createElement("legend",{className:h.legend},"docuvita Anhang Informationen"," ",o.createElement(Vt,{size:"small",appearance:"subtle",onClick:()=>g(e=>!e),"aria-expanded":!p,"aria-controls":"attachmentdocuvita-content",style:{marginLeft:8},icon:p?o.createElement(Se,null):o.createElement(Ie,null)})),!p&&o.createElement("div",{id:"attachmentdocuvita-content"},o.createElement("div",{style:{marginBottom:16}},o.createElement(QT,{id:"attachmentObjectType",value:null==s?void 0:s.toString(),options:n.map(e=>({value:e.objectTypeId.toString(),label:e.name})),placeholder:"Objekttyp",label:Px.attachmentObjectType||"Objekttyp",disabled:!l||!i||!!(null===(u=null===(d=t.docuvitaAttachmentStatus)||void 0===d?void 0:d[null==i?void 0:i.id])||void 0===u?void 0:u.objectId),onChange:e=>c(Number(e)),style:{width:"100%",flex:1}})),o.createElement("div",{style:{marginBottom:16}},o.createElement(hk,{id:"attachmentParentObjectId",value:(null==a?void 0:a.toString())||(null===(f=e.docuvita.attachmentParentObjectId)||void 0===f?void 0:f.toString())||"",label:Px.attachmentParentObjectId||"Ordner Id",disabled:!0})),Array.isArray(r)&&r.filter(e=>e.Visible).map((e,t)=>{var r,n,i;return o.createElement("div",{key:e.FieldName||t,className:h.fieldRow},"B"===e.FieldType?o.createElement(uk,{id:`attachmentdocuvita-${e.FieldName||t}`,label:e.FieldPrompt||e.FieldName||String(t),checked:!!e.FieldValueBool,disabled:!l,onChange:l?r=>l(e.FieldName||String(t),r):void 0}):o.createElement(hk,{id:`attachmentdocuvita-${e.FieldName||t}`,label:e.FieldPrompt||e.FieldName||String(t),value:"D"===e.FieldType?m(e.FieldValueDateTime):null!==(i=null!==(r=e.FieldValueString)&&void 0!==r?r:null===(n=e.FieldValueNumeric)||void 0===n?void 0:n.toString())&&void 0!==i?i:"",type:"D"===e.FieldType?"date":"text",disabled:!l||!0===e.ReadOnly||e.FieldName&&e.FieldName.startsWith("M365"),onChange:l?r=>l(e.FieldName||String(t),r):void 0}))}))))},zx=({docuvitaApi:e,folderTree:t,setFolderTree:r,setFolderTreeVersion:n,selectedFolder:i,parentObjectTypes:a,objectRelations:s,handleCopy:c,handleLink:l,archivedObject:d})=>{const u=Lg(),[f,h]=(0,o.useState)(!1);return o.createElement("form",{className:u.form},o.createElement("fieldset",{className:u.fieldset_v},o.createElement("legend",{className:u.legend},"docuvita Ordner Ablage"," ",o.createElement(Vt,{size:"small",appearance:"subtle",onClick:()=>h(e=>!e),"aria-expanded":!f,"aria-controls":"attachmentfolder-content",style:{marginLeft:8},icon:f?o.createElement(Se,null):o.createElement(Ie,null)})),!f&&o.createElement("div",{id:"attachmentfolder-content"},o.createElement(lT,{docuvitaApi:e,folderTree:t,setFolderTree:r,setFolderTreeVersion:n,selectedFolder:i,parentObjectTypes:a,objectRelations:s,isAttachment:!0,handleCopy:c,handleLink:l,archivedObject:d}))))},qx=({docuvitaApi:e,workspaceFolderTree:t,setWorkspaceFolderTree:r,setWorkspaceFolderTreeVersion:n,selectedWorkspace:i,setSelectedWorkspace:a,selectedWorkspaceObjectType:s,setSelectedWorkspaceObjectType:c,workspaceObjectTypes:l,parentObjectTypes:d,objectRelations:u,selectedWorkspaceFolder:f,handleCopy:h,handleLink:p,archivedObject:g})=>{const m=Lg(),[v,b]=(0,o.useState)(!1);return o.createElement("form",{className:m.form},o.createElement("fieldset",{className:m.fieldset_v},o.createElement("legend",{className:m.legend},"docuvita Akten Ablage"," ",o.createElement(Vt,{size:"small",appearance:"subtle",onClick:()=>b(e=>!e),"aria-expanded":!v,"aria-controls":"attachmentworkspace-content",style:{marginLeft:8},icon:v?o.createElement(Se,null):o.createElement(Ie,null)})),!v&&o.createElement("div",{id:"attachmentworkspace-content"},o.createElement(YT,{docuvitaApi:e,workspaceFolderTree:t,setWorkspaceFolderTree:r,setWorkspaceFolderTreeVersion:n,selectedWorkspace:i,setSelectedWorkspace:a,selectedWorkspaceObjectType:s,setSelectedWorkspaceObjectType:c,workspaceObjectTypes:l,parentObjectTypes:d,objectRelations:u,selectedWorkspaceFolder:f,isAttachment:!0,handleCopy:h,handleLink:p,archivedObject:g}))))},Mx=r(64583).Promise,Fx=function(e,t,r,o){return new(r||(r=Mx))(function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},Dx=({config:e,docuvitaApi:t,mailInfo:r,setMailInfo:n,attachments:i,folderTree:a,setFolderTree:s,workspaceFolderTree:c,setWorkspaceFolderTree:l,attachmentObjectTypes:d,workspaceObjectTypes:u,setError:f,setSuccess:h})=>{var p,g,m,v,b,y,w,k,C,T,x,S,I,_;const[E,A]=(0,o.useState)(null),[B,O]=(0,o.useState)(null),[R,j]=(0,o.useState)([]),[P,N]=(0,o.useState)(null),[z,q]=(0,o.useState)([]),[M,F]=(0,o.useState)([]),[D,L]=(0,o.useState)(null),[H,U]=(0,o.useState)(null),[W,V]=(0,o.useState)(null),[$,K]=(0,o.useState)(null),[G,J]=(0,o.useState)(null),[Q,X]=(0,o.useState)([]),[Y,Z]=(0,o.useState)([]),[ee,te]=(0,o.useState)([]),[re,oe]=(0,o.useState)([]),[ne,ie]=(0,o.useState)(null),[ae,se]=(0,o.useState)(!0),[ce,le]=(0,o.useState)(!1),[de,ue]=(0,o.useState)(!1),[fe,he]=(0,o.useState)(!1),[pe,ge]=(0,o.useState)(0),[me,ve]=(0,o.useState)(0),be=Lg();(0,o.useEffect)(()=>{var o;(null===(o=null==e?void 0:e.addin)||void 0===o?void 0:o.extractAttachments)&&(null==r?void 0:r.attachments)&&d&&0!==d.length&&Fx(void 0,void 0,void 0,function*(){try{const o=yield Mx.all(r.attachments.map(o=>Fx(void 0,void 0,void 0,function*(){const n=o.id.replace(/\//g,"-"),i=yield t.getAttachmentObjectByAttachmentId(r,n,d);return{id:n,status:i&&i.objectId&&i.objectType?{objectId:i.objectId,parentObjectId:i.parentObjectId,objectType:i.objectType,contentType:o.contentType,name:o.name||"attachment"}:{objectId:null,parentObjectId:e.docuvita.attachmentParentObjectId||"",objectType:e.docuvita.attachmentObjectType||null,contentType:o.contentType,name:o.name||"attachment"}}})));n(e=>{const t=Object.assign(Object.assign({},e.docuvitaAttachmentStatus),o.reduce((e,{id:t,status:r})=>(e[t]=r,e),{}));return Object.assign(Object.assign({},e),{docuvitaAttachmentStatus:t})})}catch(e){f("Fehler beim Status-Check: "+(e.message||String(e)))}})},[d]),(0,o.useEffect)(()=>{(null==r?void 0:r.docuvitaAttachmentStatus)&&r.attachments&&r.attachments.every(e=>Object.prototype.hasOwnProperty.call(r.docuvitaAttachmentStatus,e.id.replace(/\//g,"-")))&&r.attachments.every(e=>{const t=r.docuvitaAttachmentStatus[e.id.replace(/\//g,"-")];return t&&void 0!==t.objectId&&void 0!==t.parentObjectId&&void 0!==t.objectType})&&ae&&se(!1)},[null==r?void 0:r.docuvitaAttachmentStatus,null==r?void 0:r.attachments,ae]),(0,o.useEffect)(()=>{var e;if(E){te([]),oe([]);const t=null===(e=r.docuvitaAttachmentStatus)||void 0===e?void 0:e[E.id];(null==t?void 0:t.parentObjectId)?ie(Number(t.parentObjectId)):ie(null)}},[E,null==r?void 0:r.docuvitaAttachmentStatus]),(0,o.useEffect)(()=>{r&&r.userEmail&&r.messageId&&E&&0!==d.length&&(N(e.docuvita.attachmentObjectType||null),L(e.docuvita.attachmentParentObjectId||null),K(null),V(null),U(null),l([]),X([]),Z([]),he(!1),J(null),Fx(void 0,void 0,void 0,function*(){try{const e=yield t.getFolderTree();s(e)}catch(e){s([])}}),Fx(void 0,void 0,void 0,function*(){var e;const t=null===(e=r.docuvitaAttachmentStatus)||void 0===e?void 0:e[E.id];t&&t.objectId&&t.objectType&&(n(e=>Object.assign(Object.assign({},e),{docuvitaAttachmentStatus:Object.assign(Object.assign({},e.docuvitaAttachmentStatus),{[E.id]:Object.assign(Object.assign({},e.docuvitaAttachmentStatus[E.id]),{objectId:t.objectId,parentObjectId:t.parentObjectId,objectType:t.objectType})})})),J(t.objectId)),yield Se()}))},[E,R]),(0,o.useEffect)(()=>{if(!E||!(null==r?void 0:r.docuvitaAttachmentStatus))return;const e=r.docuvitaAttachmentStatus[E.id];if(!(null==e?void 0:e.objectId))return q([]),void F([]);Fx(void 0,void 0,void 0,function*(){try{const r=yield t.getObjectRelations(e.objectId);if(r&&Array.isArray(r)){const e=[],o=[];yield Mx.all(r.map(r=>Fx(void 0,void 0,void 0,function*(){try{const n=yield t.getObjectWorkspace(r.Objectid);n?o.push(Object.assign(Object.assign({},r),{workspace:n})):e.push(r)}catch(t){e.push(r)}}))),q(e),F(o)}else q([]),F([])}catch(e){f("Fehler beim Laden der Objektbeziehungen: "+(e.message||String(e))),q([]),F([])}})},[null==E?void 0:E.id,null===(g=null===(p=null==r?void 0:r.docuvitaAttachmentStatus)||void 0===p?void 0:p[null==E?void 0:E.id])||void 0===g?void 0:g.objectId]),(0,o.useEffect)(()=>{if(!E||!(null==r?void 0:r.docuvitaAttachmentStatus)||!M||0===M.length)return;const e=r.docuvitaAttachmentStatus[E.id];if(!(null==e?void 0:e.parentObjectId))return;const t=M.find(e=>!0!==e.IsLink);if(t)K(t.workspace.objectType),V(t.workspace),U(e.parentObjectId);else{const t=M[0].workspace;K(t.objectType),V(t),U(e.parentObjectId)}},[M,E,null==r?void 0:r.docuvitaAttachmentStatus]),(0,o.useEffect)(()=>{if(!z||0===z.length||!a||0===a.length)return te([]),void X([]);const e=[],t=r=>r.map(r=>{const o=z.find(e=>Number(e.Objectid)===r.objectId&&!e.IsLink),n=z.find(e=>Number(e.Objectid)===r.objectId&&e.IsLink),i=!!o,a=!!n;a&&(e.push(n.Objectid),X(e=>{const t=new Set(e);return t.add(n.Objectid),Array.from(t)}));let s=r;if((i||a)&&(s=Object.assign(Object.assign({},r),{isAttachmentCopied:i,isAttachmentLinked:a})),r.children&&r.children.length>0){const e=t(r.children);e===r.children&&s===r||(s=Object.assign(Object.assign({},s),{children:e}))}return s}),r=t(a);s(r),te(e)},[z,pe]),(0,o.useEffect)(()=>{if(!M||0===M.length||!c||0===c.length)return;const e=t=>t.map(t=>{const r=M.find(e=>Number(e.Objectid)===t.objectId&&!e.IsLink),o=M.find(e=>Number(e.Objectid)===t.objectId&&e.IsLink),n=!!r,i=!!o;i&&Z(e=>{const t=new Set(e);return t.add(o.Objectid),Array.from(t)});let a=t;if((n||i)&&(a=Object.assign(Object.assign({},t),{isAttachmentCopied:n,isAttachmentLinked:i})),t.children&&t.children.length>0){const r=e(t.children);r===t.children&&a===t||(a=Object.assign(Object.assign({},a),{children:r}))}return a}),t=e(c);l(t)},[M,me]),(0,o.useEffect)(()=>{if(!E||!(null==r?void 0:r.docuvitaAttachmentStatus)||!z||0===z.length)return;const e=r.docuvitaAttachmentStatus[E.id];(null==e?void 0:e.parentObjectId)&&(null==e?void 0:e.objectType)&&(N(e.objectType),L(e.parentObjectId?Number(e.parentObjectId):null))},[z,E,null==r?void 0:r.docuvitaAttachmentStatus]),(0,o.useEffect)(()=>{var e,t;E&&(null===(t=null===(e=r.docuvitaAttachmentStatus)||void 0===e?void 0:e[E.id])||void 0===t?void 0:t.objectId)&&Fx(void 0,void 0,void 0,function*(){yield Se()})},[E,r.docuvitaAttachmentStatus]),(0,o.useEffect)(()=>{E?Fx(void 0,void 0,void 0,function*(){yield Se()}):O(null)},[P,D]),(0,o.useEffect)(()=>{var r;P&&(null===(r=null==e?void 0:e.addin)||void 0===r?void 0:r.showAttachmentFolderEditor)&&Fx(void 0,void 0,void 0,function*(){try{const e=d.find(e=>e.objectTypeId===P),r=e?yield t.getAttachmentParentObjectTypes(e):[];j(r)}catch(e){f("Fehler beim Laden der Attachmentordner-Objekttypen: "+(e.message||String(e)))}})},[P,d]),(0,o.useEffect)(()=>{ce&&Fx(void 0,void 0,void 0,function*(){yield we(),le(!1)})},[B,ce]),(0,o.useEffect)(()=>{de&&Fx(void 0,void 0,void 0,function*(){yield ke(),ue(!1)})},[B,de]);const ye=(e,t)=>{O(r=>r.map(r=>{if(r.FieldName===e)switch(r.FieldType){case"B":return Object.assign(Object.assign({},r),{FieldValueBool:t});case"N":return Object.assign(Object.assign({},r),{FieldValueNumeric:t});case"D":return Object.assign(Object.assign({},r),{FieldValueDateTime:t});default:return Object.assign(Object.assign({},r),{FieldValueString:t})}return r}))},we=()=>Fx(void 0,void 0,void 0,function*(){var o,i;if(Office.context.mailbox&&Office.context.mailbox.item)if(null===(o=null==e?void 0:e.docuvita)||void 0===o?void 0:o.serverUrl)if(null===(i=null==e?void 0:e.docuvita)||void 0===i?void 0:i.apiSessionGuid)try{if(!E)return void f("Kein Anhang ausgewählt.");const e=atob(E.contentBytes),o=new Array(e.length).fill(0).map((t,r)=>e.charCodeAt(r)),i=new Uint8Array(o),a=new Blob([i],{type:E.contentType}),s=null!=H?H:D,{objectId:c}=yield t.uploadFile({fileBlob:a,fileName:E.name||E.filename||"attachment",fileProperties:B||[],parentObjectId:s}),l=Object.assign(Object.assign({},r.docuvitaAttachmentStatus),{[E.id]:{objectId:c,parentObjectId:s,objectType:P,contentType:E.contentType,name:E.name||E.filename||"attachment"}});if(n(e=>Object.assign(Object.assign({},e),{docuvitaAttachmentStatus:l})),Q&&Q.length>0)for(const e of Q)yield t.linkObjectToFolder(c,e);if(Y&&Y.length>0)for(const e of Y)yield t.linkObjectToFolder(c,e);J(c),he(!1),h("Anhang wurde erfolgreich archiviert.")}catch(e){f("Archiving attachment failed: "+(e.message||String(e)))}else f("Docuvita session GUID missing.");else f("Docuvita serverUrl missing.");else f("No mail item context available.")}),ke=()=>Fx(void 0,void 0,void 0,function*(){var o,i,s;if(Office.context.mailbox&&Office.context.mailbox.item)if(null===(o=null==e?void 0:e.docuvita)||void 0===o?void 0:o.serverUrl)if(null===(i=null==e?void 0:e.docuvita)||void 0===i?void 0:i.apiSessionGuid)try{const e=(null===(s=r.docuvitaAttachmentStatus)||void 0===s?void 0:s[E.id]).objectId,o=e=>{for(const t of e){if(t.isAttachmentCopied)return t.objectId;if(t.children&&t.children.length>0){const e=o(t.children);if(e)return e}}return null},i=o(a)||o(c);yield t.updateAttachmentObject(B),ne&&i&&ne!==Number(i)&&(console.log(`Parent folder changed from ${ne} to ${i}`),yield t.setParent([e],Number(i)),n(e=>Object.assign(Object.assign({},e),{docuvitaAttachmentStatus:Object.assign(Object.assign({},e.docuvitaAttachmentStatus),{[E.id]:Object.assign(Object.assign({},e.docuvitaAttachmentStatus[E.id]),{parentObjectId:i})})})),ie(Number(i)),console.log("Attachment relocated successfully")),yield Ce(e,ee,Q),yield Ce(e,re,Y),h("Anhang wurde erfolgreich aktualisiert.")}catch(e){f("Updating attachment in docuvita failed: "+(e.message||String(e)))}else f("Docuvita session GUID missing.");else f("Docuvita serverUrl missing.");else f("No mail item context available.")}),Ce=(e,r,o)=>Fx(void 0,void 0,void 0,function*(){const n=r.filter(e=>!o.includes(e)),i=o.filter(e=>!r.includes(e));for(const r of n)yield t.unlinkObjectFromFolder(e,r);for(const r of i)yield t.linkObjectToFolder(e,r)}),Te=(e,t)=>{const r=t=>t.map(t=>Object.assign(Object.assign({},t),{isAttachmentCopied:t.objectId===e,children:Array.isArray(t.children)?r(t.children):t.children}));s(r(a)),l(r(c)),ye("OBJ_PARENTOBJECT",e),t?(U(e),L(null)):(L(e),U(null)),he(!0)},xe=(e,t=!1)=>{const r=(e,t)=>e.map(e=>e.objectId===t?Object.assign(Object.assign({},e),{isAttachmentLinked:!e.isAttachmentLinked}):e.children&&e.children.length>0?Object.assign(Object.assign({},e),{children:r(e.children,t)}):e);t?(l(r(c,e)),Z(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])):(s(r(a,e)),X(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]))},Se=()=>Fx(void 0,void 0,void 0,function*(){if(r&&E&&P&&D){const e=yield t.getAttachmentObjectPropertiesForEditor(r,E,P,D);return O(e),e}return null});return r.attachments&&0!==(null===(m=null==r?void 0:r.attachments)||void 0===m?void 0:m.length)?o.createElement("div",{className:be.centeredContent},o.createElement("div",{className:be.scrollArea},o.createElement("fieldset",{className:be.fieldset_v,style:{position:"relative"}},o.createElement("legend",{className:be.legend},"Anhänge"),ae&&o.createElement("div",{className:be.spinnerOverlay},o.createElement(fx,{label:"Status in docuvita wird geprüft...",labelPosition:"below"})),o.createElement("div",{className:be.attachmentsGrid},Object.entries(r.docuvitaAttachmentStatus||{}).map(([e,t],r)=>{const n=t,a=(null==E?void 0:E.id)===e;return o.createElement(kx,{key:e||r,style:{width:"100%",background:a?"#e5f1fb":void 0,border:a?"2px solid #0078d4":void 0,position:"relative"},disabled:ae,onClick:()=>{const t=i.find(t=>t.id===e);t&&A(t)},onDoubleClick:()=>{var t;const r=i.find(t=>t.id===e);r&&((null===(t=r.contentType)||void 0===t?void 0:t.startsWith("image"))||"application/pdf"===r.contentType)&&(e=>{const t=`${window.location.origin}/preview.html?type=${encodeURIComponent(e.contentType)}&name=${encodeURIComponent(e.name||e.filename)}&data=${encodeURIComponent(e.contentBytes)}`;Office.context.ui.displayDialogAsync(t,{height:50,width:50})})(r)}},o.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"8px 8px 0 8px"}},o.createElement("div",{style:{display:"flex",alignItems:"center",gap:8}},(()=>{const t=i.find(t=>t.id===e);return((e,t=20,r="")=>(null==e?void 0:e.startsWith("image"))?o.createElement($v,{style:{fontSize:t}}):"application/pdf"===e||r.toLowerCase().endsWith(".pdf")?o.createElement(Re,{style:{fontSize:t,color:"#d13438"}}):"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===e||r.toLowerCase().endsWith(".xlsx")?o.createElement(Ox,{size:t,color:"#107c10"}):"application/vnd.openxmlformats-officedocument.wordprocessingml.document"===e||r.toLowerCase().endsWith(".docx")?o.createElement(Rx,{size:t,color:"#2b579a"}):"application/xml"===e||"text/xml"===e||r.toLowerCase().endsWith(".xml")?o.createElement(jx,{size:t,color:"#f4b400"}):o.createElement(Oe,{style:{fontSize:t}}))(n.contentType,28,n.name||(null==t?void 0:t.filename)||"Anhang")})(),o.createElement("span",{className:be.attachmentName,title:n.name||e},n.name||e)),o.createElement("div",{style:{display:"flex",gap:8}},o.createElement("div",{style:{display:"flex",gap:8}},n.objectId?o.createElement("img",{src:"/assets/docuvita_icon.png",alt:"docuvita archiviert",title:"In docuvita archiviert",style:{width:24,height:24,display:"block"}}):null))))}))),E?o.createElement(o.Fragment,null,(null===(v=null==e?void 0:e.addin)||void 0===v?void 0:v.showAttachmentDocuvitaEditor)&&o.createElement(Nx,{key:(null==E?void 0:E.id)||(null==E?void 0:E.name)||"editor",config:e,mailInfo:r,properties:B,attachmentObjectTypes:d,selectedAttachment:E,selectedFolder:D,selectedObjectType:null!=P?P:e.docuvita.attachmentObjectType,setSelectedObjectType:N,onPropertyChange:ye}),(null===(b=null==e?void 0:e.addin)||void 0===b?void 0:b.showAttachmentFolderEditor)&&o.createElement(zx,{docuvitaApi:t,folderTree:a,setFolderTree:s,setFolderTreeVersion:ge,selectedFolder:D,setSelectedFolder:L,parentObjectTypes:R,objectRelations:z,handleCopy:Te,handleLink:xe,archivedObject:G}),(null===(y=null==e?void 0:e.addin)||void 0===y?void 0:y.showAttachmentWorkspaceEditor)&&o.createElement(qx,{docuvitaApi:t,workspaceFolderTree:c,setWorkspaceFolderTree:l,setWorkspaceFolderTreeVersion:ve,selectedWorkspace:W,setSelectedWorkspace:V,selectedWorkspaceObjectType:$,setSelectedWorkspaceObjectType:K,workspaceObjectTypes:u,parentObjectTypes:R,objectRelations:M,selectedWorkspaceFolder:H,handleCopy:Te,handleLink:xe,archivedObject:G})):o.createElement("div",null)),o.createElement("div",{className:be.buttonRow},o.createElement(Jw,{content:E?(null===(k=null===(w=r.docuvitaAttachmentStatus)||void 0===w?void 0:w[null==E?void 0:E.id])||void 0===k?void 0:k.objectId)?"Anhang in docuvita aktualisieren":"Dieser Anhang ist noch nicht archiviert und kann nicht aktualisiert werden.":"Bitte wählen Sie zuerst einen Anhang aus.",relationship:"label"},o.createElement("span",null,o.createElement(Vt,{className:be.responsiveButton,appearance:"secondary",disabled:!E||!(null===(T=null===(C=r.docuvitaAttachmentStatus)||void 0===C?void 0:C[null==E?void 0:E.id])||void 0===T?void 0:T.objectId),icon:o.createElement(Xw,null),onClick:()=>ue(!0)}))),o.createElement(Jw,{content:E?(null===(S=null===(x=r.docuvitaAttachmentStatus)||void 0===x?void 0:x[null==E?void 0:E.id])||void 0===S?void 0:S.objectId)?"Dieser Anhang ist bereits archiviert und kann nicht erneut archiviert werden.":"Anhang in docuvita archivieren":"Bitte wählen Sie zuerst einen Anhang aus.",relationship:"label"},o.createElement("span",null,o.createElement(Vt,{className:be.responsiveButton,appearance:"primary",disabled:!E||!fe||!!(null===(_=null===(I=r.docuvitaAttachmentStatus)||void 0===I?void 0:I[null==E?void 0:E.id])||void 0===_?void 0:_.objectId),icon:o.createElement(Yw,null),onClick:()=>le(!0)}))))):o.createElement("div",null,"Keine Anhänge vorhanden.")};const Lx=Ce("SaveRegular","1em",["M3 5c0-1.1.9-2 2-2h8.38a2 2 0 0 1 1.41.59l1.62 1.62A2 2 0 0 1 17 6.62V15a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5Zm2-1a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1v-4.5c0-.83.67-1.5 1.5-1.5h7c.83 0 1.5.67 1.5 1.5V16a1 1 0 0 0 1-1V6.62a1 1 0 0 0-.3-.7L14.1 4.28a1 1 0 0 0-.71-.29H13v2.5c0 .83-.67 1.5-1.5 1.5h-4A1.5 1.5 0 0 1 6 6.5V4H5Zm2 0v2.5c0 .28.22.5.5.5h4a.5.5 0 0 0 .5-.5V4H7Zm7 12v-4.5a.5.5 0 0 0-.5-.5h-7a.5.5 0 0 0-.5.5V16h8Z"]);var Hx=({config:e,defaultConfig:t,onChange:r,setError:n,setSuccess:i})=>{const[a,s]=(0,o.useState)(Object.assign({},e)),c=Lg(),l=(e,t,o)=>{const n=Object.assign(Object.assign({},a[e]),{[t]:o}),i=Object.assign(Object.assign({},a),{[e]:n});s(i),r&&r(i)},d=e=>o.createElement("fieldset",{className:c.fieldset_v},o.createElement("legend",{className:c.legend},Px[e]||e),Object.entries(a[e]).map(([t,r])=>o.createElement("div",{key:t,className:c.fieldRow},((e,t,r)=>"boolean"==typeof r?o.createElement(dk,{id:`${e}-${t}`,checked:r,onChange:r=>l(e,t,r),label:Px[t]||t}):"apiPassword"===t||"apiSessionGuid"===t||"clientId"===t||"tenantId"===t?o.createElement(fk,{id:`${e}-${t}`,label:Px[t]||t,type:"password",value:null!=r?r:"",onChange:r=>l(e,t,r)}):"number"==typeof r?o.createElement(fk,{id:`${e}-${t}`,label:Px[t]||t,type:"number",value:String(r),onChange:r=>l(e,t,Number(r))}):Array.isArray(r)?o.createElement(fk,{id:`${e}-${t}`,label:Px[t]||t,type:"text",value:r.join(","),onChange:r=>l(e,t,r.split(",").map(e=>e.trim()))}):o.createElement(fk,{id:`${e}-${t}`,label:Px[t]||t,type:"text",value:null!=r?r:"",onChange:r=>l(e,t,r)}))(e,t,r))));return o.createElement("div",{className:c.centeredContent},o.createElement("form",{className:c.form,style:{flex:1,display:"flex",flexDirection:"column",minHeight:0}},o.createElement("div",{className:c.scrollArea},d("msal"),d("docuvita"),d("addin"))),o.createElement("div",{className:c.buttonRow},o.createElement(Jw,{content:"Setzt alle in den Roaming Settings gespeicherten Einstellungen auf die Standardwerte zurück.",relationship:"label"},o.createElement("span",null,o.createElement(Vt,{className:c.responsiveButton,appearance:"secondary",type:"button",icon:o.createElement(Qw,null),onClick:()=>{Office.context.roamingSettings.remove("config"),Office.context.roamingSettings.saveAsync(()=>{s(Object.assign({},t)),r&&r(Object.assign({},t))})}}))),o.createElement(Vt,{className:c.responsiveButton,appearance:"primary",type:"submit",form:"config-form",icon:o.createElement(Lx,null),onClick:e=>{e.preventDefault(),Office.context.roamingSettings.set("config",a),Office.context.roamingSettings.saveAsync(e=>{e.status!==Office.AsyncResultStatus.Succeeded?n("Fehler beim Speichern: "+e.error.message):(i("Konfiguration erfolgreich gespeichert."),r&&r(a))})}})))},Ux=JSON.parse('{"id":"dde265b0-f3e9-4841-a94e-4a906d22d422","version":"25.10.9.2","redirectUri":"https://dvoutlook.fakturbox.de","displayName":"docuvita für Outlook","description":"Eine direkte Verbindung zu docuvita im neuen Outlook","providerName":"faktur:digital GmbH","supportUrl":"https://www.fakturdigital.de/support","sourceLocation":"https://dvoutlook.fakturbox.de/index.html","runtimeVersion":"25.10.10.01","lastCommit":"472aeea3c5eacbee4436b11fd44acd1ef2eb0076","buildTime":"2025-10-10T08:03:51.448Z","manifestFile":"manifest.prod.xml","environment":"production"}'),Wx=({profile:e})=>{const t=Lg();return o.createElement("form",{className:t.form},o.createElement("fieldset",{className:t.fieldset_v},o.createElement("legend",{className:t.legend},"Benutzerprofil"),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"Name"),o.createElement("span",null,e.displayName||"")),o.createElement("div",{className:t.fieldRow},o.createElement("label",{className:t.label},"Email"),o.createElement("span",null,e.mail||e.userPrincipalName||""))),o.createElement("fieldset",{className:t.fieldset_v},o.createElement("legend",{className:t.legend},"AddIn Info"),Object.entries(Ux).map(([e,r])=>o.createElement("div",{className:t.fieldRow,key:e},o.createElement("label",{className:t.label},e),o.createElement("span",null,"string"==typeof r?r:JSON.stringify(r))))))},Vx=r(64583).Promise,$x=function(e,t,r,o){return new(r||(r=Vx))(function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},Kx=({initialTab:e,config:t,setConfig:r,defaultConfig:n,profile:i,graphClient:a})=>{var s,c;const[l,d]=(0,o.useState)(e),[u,f]=(0,o.useState)(null),[h,p]=(0,o.useState)(!1),[g,m]=(0,o.useState)([]),[v,b]=(0,o.useState)([]),[y,w]=(0,o.useState)([]),[k,C]=(0,o.useState)([]),[T,x]=(0,o.useState)([]),[S,I]=(0,o.useState)([]),[_,E]=(0,o.useState)([]),[A,B]=(0,o.useState)(null),[O,R]=(0,o.useState)(null),[j,P]=(0,o.useState)(!1),N=Lg(),z=function(e,t){var r=this;if(!e)return t("GraphClient is missing."),{getMailEml:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2,null)},e)}))},getMailParentFolderId:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2,null)},e)}))},getFolderParentFolderId:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2,null)},e)}))},getFolderPathToRoot:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2,[])},e)}))},getFolder:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2,null)},e)}))},updateMessageExtendedProperties:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2,!1)},e)}))},getMessageExtension:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2,null)},e)}))},updateMessageExtension:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2)},e)}))},updateFoldersExtendedProperties:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2)},e)}))},getMailAttachments:function(){return mb(r,void 0,void 0,hb().m(function e(){return hb().w(function(e){for(;;)if(0===e.n)return e.a(2,null)},e)}))}};var o=function(o){return mb(r,void 0,void 0,hb().m(function r(){var n;return hb().w(function(r){for(;;)switch(r.p=r.n){case 0:return r.p=0,r.n=1,e.api("/me/mailFolders/".concat(o,"?$select=id,displayName,parentFolderId")).get();case 1:return r.a(2,r.v);case 2:return r.p=2,n=r.v,t("Could not retrieve folder: "+(n.message||String(n))),r.a(2,null)}},r,null,[[0,2]])}))},n=function(o,n){return mb(r,void 0,void 0,hb().m(function r(){var i;return hb().w(function(r){for(;;)switch(r.p=r.n){case 0:if(e&&o&&n){r.n=1;break}return t("Missing required arguments for getting message extension."),r.a(2,null);case 1:return r.p=1,r.n=2,e.api("/users/".concat(o,"/messages/").concat(n,"/extensions/").concat(bb)).get();case 2:return r.a(2,r.v);case 3:return r.p=3,404!==(i=r.v).statusCode&&t("Error while getting open extension for message ".concat(n,": ").concat(i.message||String(i))),r.a(2,null)}},r,null,[[1,3]])}))},i=function(t,o,n){return mb(r,void 0,void 0,hb().m(function r(){var i,a,s,c,l,d;return hb().w(function(r){for(;;)switch(r.p=r.n){case 0:a=3,s=1e3,c=0,l=!1;case 1:if(!(c3?c-3:0),d=3;d3&&void 0!==arguments[3]?arguments[3]:0;return hb().m(function c(){var l,d;return hb().w(function(c){for(;;)switch(c.p=c.n){case 0:return l={messageId:r,parentFolderId:o,messageObjectId:s},c.p=1,c.n=2,n(e,r);case 2:if(!c.v){c.n=4;break}return c.n=3,i(e,r,l);case 3:c.n=5;break;case 4:return console.debug("Adding new open extension for message ",r),c.n=5,a(e,r,l);case 5:c.n=9;break;case 6:if(c.p=6,404!==(null==(d=c.v)?void 0:d.statusCode)){c.n=8;break}return console.debug("Open extension not found, adding new one."),c.n=7,a(e,r,l);case 7:c.n=9;break;case 8:t("Could not update or add message extension for message ".concat(r,": ").concat(d.message||String(d)));case 9:return c.a(2)}},c,null,[[1,6]])})()})},updateFoldersExtendedProperties:function(t,r){return mb(this,void 0,void 0,hb().m(function o(){var n,i,a,s,c,l,d,u,f,h,p,g,m,v,b;return hb().w(function(o){for(;;)switch(o.p=o.n){case 0:if(t&&r&&0!==r.length){o.n=1;break}throw new Error("Missing required arguments.");case 1:n=3,i=1e3,a=ub(r),o.p=2,a.s();case 3:if((s=a.n()).done){o.n=13;break}if(c=s.value,l=c.folderId,d=c.folderName,u=c.parentFolderId,f=c.objectId,l&&d&&u&&void 0!==f){o.n=4;break}throw new Error("Missing required folder properties.");case 4:h=[{id:vb,value:gb.Archived},{id:"String {00020329-0000-0000-c000-000000000046} Name FolderName",value:d},{id:"String {00020329-0000-0000-c000-000000000046} Name ParentFolder",value:u},{id:"String {00020329-0000-0000-c000-000000000046} Name ObjectId",value:f.toString()}],p={singleValueExtendedProperties:h},g=0,m=!1;case 5:if(!(g0&&void 0!==arguments[0]?arguments[0]:{},o=r.objectId,n=r.objectTypeId,i=r.purpose,a=r.parentObject;return Cb().m(function r(){var s,c,l,d,u;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return s={SessionGuid:e.docuvita.apiSessionGuid,ObjectId:o,ObjectTypeId:n,Purpose:null!=i?i:"DisplayObject",ParentObject:a},c="".concat(e.docuvita.serverUrl,"/getobjectproperties"),r.p=1,r.n=2,fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s)});case 2:if((l=r.v).ok){r.n=3;break}return t("getObjectProperties failed: "+l.statusText),r.a(2,[]);case 3:return r.n=4,l.json();case 4:return d=r.v,r.a(2,d.ObjectPropertyList||[]);case 5:return r.p=5,u=r.v,t("getObjectProperties failed: "+(u.message||String(u))),r.a(2,[])}},r,null,[[1,5]])})()})},i=function(o){return xb(r,[o],void 0,function(r){var o=r.objectPropertyList,n=r.versionOriginalFilename,i=r.versionComment,a=r.versionExternalMetadata,s=r.versionNumber,c=r.context;return Cb().m(function r(){var l,d,u,f,h;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:if((l={ObjectPropertyList:null!=o?o:[],VersionOriginalFilename:null!=n?n:"",VersionComment:null!=i?i:"",VersionExternalMetadata:null!=a?a:void 0,VersionNumber:null!=s?s:void 0,SessionGuid:e.docuvita.apiSessionGuid,Context:null!=c?c:void 0}).ObjectPropertyList&&0!==l.ObjectPropertyList.length){r.n=1;break}return t("No object properties provided for setObjectProperties."),r.a(2,null);case 1:return d="".concat(e.docuvita.serverUrl,"/setobjectproperties"),r.p=2,r.n=3,fetch(d,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(l)});case 3:if((u=r.v).ok){r.n=4;break}return t("setObjectProperties failed: "+u.statusText),r.a(2,null);case 4:if(204!==u.status){r.n=5;break}return r.a(2,null);case 5:return r.n=6,u.json();case 6:return f=r.v,r.a(2,{docUploadGuid:f.DocUploadGuid||null,objectPropertyList:f.ObjectPropertyList||[]});case 7:return r.p=7,h=r.v,t("setObjectProperties failed: "+(h.message||String(h))),r.a(2,null)}},r,null,[[2,7]])})()})},a=function(o){return xb(r,[o],void 0,function(r){var o=r.queryDetails,n=r.pageNumber,i=r.pageSize;return Cb().m(function r(){var a,s,c,l,d;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return a={QueryDetails:null!=o?o:void 0,PageNumber:null!=n?n:0,PageSize:null!=i?i:3,SessionGuid:e.docuvita.apiSessionGuid},s="".concat(e.docuvita.serverUrl,"/getqueryresultset"),r.p=1,r.n=2,fetch(s,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)});case 2:if((c=r.v).ok){r.n=3;break}return t("getQueryResultSet failed: "+c.statusText),r.a(2,{ResultList:[]});case 3:if(204!==c.status){r.n=4;break}return r.a(2,{ResultList:[]});case 4:return r.n=5,c.json();case 5:return l=r.v,r.a(2,l);case 6:return r.p=6,d=r.v,t("getQueryResultSet failed: "+(d.message||String(d))),r.a(2,{ResultList:[]})}},r,null,[[1,6]])})()})},s=function(o,n){return xb(r,void 0,void 0,Cb().m(function r(){var i,a,s,c,l,d,u;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return s={ObjectToSave:{Systemreference:e.docuvita.systemId,Objecttype:e.docuvita.folderObjectType,Parentobject:o,Datecreated:(new Date).toISOString(),Name:n},SessionGuid:e.docuvita.apiSessionGuid},c="".concat(e.docuvita.serverUrl,"/setobject"),r.p=1,r.n=2,fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s)});case 2:if((l=r.v).ok){r.n=3;break}return t("createFolder failed: "+l.statusText),r.a(2,null);case 3:return r.n=4,l.json();case 4:return d=r.v,r.a(2,null!==(a=null===(i=null==d?void 0:d.SavedObject)||void 0===i?void 0:i.Objectid)&&void 0!==a?a:null);case 5:return r.p=5,u=r.v,t("createFolder failed: "+(u.message||String(u))),r.a(2,null)}},r,null,[[1,5]])}))},c=function(o){return xb(r,void 0,void 0,Cb().m(function r(){var i,c,l,d,u,f,h,p,g,m,v,b,y,w,k,C,T,x,S,I,_,E;return Cb().w(function(r){for(;;)switch(r.n){case 0:if(h="string"==typeof o?new Date(o):o,!isNaN(h.getTime())){r.n=1;break}return t("Invalid date provided for folder structure creation."),r.a(2,0);case 1:return p=h.getFullYear().toString(),g=String(h.getMonth()+1).padStart(2,"0"),m="".concat(g,"/").concat(p),v=String(h.getDate()).padStart(2,"0"),b=e.docuvita.archiveParentObjectId||0,y=0,w=0,k=0,r.n=2,n({objectId:void 0,objectTypeId:e.docuvita.folderObjectType,purpose:"NewObject",parentObject:e.docuvita.archiveParentObjectId});case 2:if((C=r.v)&&0!==C.length){r.n=3;break}return t("No object properties found for the mail object type."),r.a(2,0);case 3:return T={Constrainttype:"Q",Constraintname:"Search year folder",Objecttype:e.docuvita.folderObjectType,Constritems:[{Field:(null===(i=C.find(function(e){return"OBJ_PARENTOBJECT"===e.FieldName}))||void 0===i?void 0:i.FieldId)||0,Operator:"=",Value:e.docuvita.archiveParentObjectId.toString(),AndOr:1,Position:0},{Field:(null===(c=C.find(function(e){return"OBJ_NAME"===e.FieldName}))||void 0===c?void 0:c.FieldId)||0,Operator:"=",Value:p,AndOr:1,Position:1}]},r.n=4,a({queryDetails:T,pageNumber:0,pageSize:3});case 4:if(!((x=r.v)&&x.ResultList&&x.ResultList.length>0)){r.n=5;break}y=x.ResultList[0].Objectid,x.ResultList.length>1&&console.warn("Multiple year folders found, using the first one ".concat(y,".")),r.n=7;break;case 5:return r.n=6,s(b,p);case 6:if(y=r.v){r.n=7;break}return t("Failed to create year folder: ".concat(p)),r.a(2,0);case 7:return S={Constrainttype:"Q",Constraintname:"Search month folder",Objecttype:e.docuvita.folderObjectType,Constritems:[{Field:(null===(l=C.find(function(e){return"OBJ_PARENTOBJECT"===e.FieldName}))||void 0===l?void 0:l.FieldId)||0,Operator:"=",Value:y.toString(),AndOr:1,Position:0},{Field:(null===(d=C.find(function(e){return"OBJ_NAME"===e.FieldName}))||void 0===d?void 0:d.FieldId)||0,Operator:"=",Value:m,AndOr:1,Position:1}]},r.n=8,a({queryDetails:S,pageNumber:0,pageSize:3});case 8:if(!((I=r.v)&&I.ResultList&&I.ResultList.length>0)){r.n=9;break}w=I.ResultList[0].Objectid,I.ResultList.length>1&&console.warn("Multiple month folders found, using the first one ".concat(w,".")),r.n=11;break;case 9:return r.n=10,s(y,m);case 10:if(w=r.v){r.n=11;break}return t("Failed to create month folder: ".concat(m)),r.a(2,0);case 11:return _={Constrainttype:"Q",Constraintname:"Search day folder",Objecttype:e.docuvita.folderObjectType,Constritems:[{Field:(null===(u=C.find(function(e){return"OBJ_PARENTOBJECT"===e.FieldName}))||void 0===u?void 0:u.FieldId)||0,Operator:"=",Value:w.toString(),AndOr:1,Position:0},{Field:(null===(f=C.find(function(e){return"OBJ_NAME"===e.FieldName}))||void 0===f?void 0:f.FieldId)||0,Operator:"=",Value:v,AndOr:1,Position:1}]},r.n=12,a({queryDetails:_,pageNumber:0,pageSize:3});case 12:if(!((E=r.v)&&E.ResultList&&E.ResultList.length>0)){r.n=13;break}k=E.ResultList[0].Objectid,E.ResultList.length>1&&console.warn("Multiple day folders found, using the first one ".concat(k,".")),r.n=15;break;case 13:return r.n=14,s(w,v);case 14:if(k=r.v){r.n=15;break}return t("Failed to create day folder: ".concat(v)),r.a(2,0);case 15:return r.a(2,k)}},r)}))},l=function(t){return xb(r,void 0,void 0,Cb().m(function r(){var o,n,i,a,s,c,l,f;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:if(t&&0!==t.length){r.n=1;break}return r.a(2,null);case 1:o=t[0].folderName,n=e.docuvita.archiveStructureParentObjectId||0,i=null,a=wb(t),r.p=2,a.s();case 3:if((s=a.n()).done){r.n=9;break}return c=s.value,r.n=4,u({folderId:c.folderId});case 4:if(!(l=r.v)){r.n=5;break}i=l,r.n=7;break;case 5:return r.n=6,d({parentObjectId:n,folderName:c.folderName,postbox:o,folderId:c.folderId,parentFolderId:c.parentFolderId});case 6:i=r.v;case 7:c.objectId=i,n=i;case 8:r.n=3;break;case 9:r.n=11;break;case 10:r.p=10,f=r.v,a.e(f);case 11:return r.p=11,a.f(),r.f(11);case 12:return r.a(2,i)}},r,null,[[2,10,11,12]])}))},d=function(o){return xb(r,[o],void 0,function(r){var o=r.parentObjectId,a=r.folderName,s=r.postbox,c=r.folderId,l=r.parentFolderId;return Cb().m(function r(){var d,u,f,h,p;return Cb().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,n({objectTypeId:e.docuvita.synchronizedFolderObjectType,purpose:"NewObject",parentObject:o});case 1:if((f=r.v)&&0!==f.length){r.n=2;break}return t("No object properties found for the folder object type."),r.a(2,null);case 2:return f.forEach(function(t){switch(t.FieldName){case"OBJ_NAME":case"M365FolderName":t.FieldValueString=a;break;case"OBJ_PARENTOBJECT":t.FieldValueNumeric=o;break;case"OBJ_OBJECTTYPE":t.FieldValueNumeric=e.docuvita.synchronizedFolderObjectType;break;case"OBJ_DATECREATED":t.FieldValueDateTime=(new Date).toISOString();break;case"M365Postbox":t.FieldValueString=s;break;case"M365FolderId":t.FieldValueString=c;break;case"M365ParentFolderId":t.FieldValueString=null!=l?l:""}}),r.n=3,i({objectPropertyList:f});case 3:if(h=r.v,p=(null===(u=null===(d=null==h?void 0:h.objectPropertyList)||void 0===d?void 0:d.find(function(e){return"OBJ_OBJECTID"===e.FieldName}))||void 0===u?void 0:u.FieldValueNumeric)||null){r.n=4;break}return t("Failed to create folder with setObjectProperties."),r.a(2,null);case 4:return r.a(2,p)}},r)})()})},u=function(o){return xb(r,[o],void 0,function(r){var o=r.folderId;return Cb().m(function r(){var i,s,c,l,d,u;return Cb().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,n({objectTypeId:e.docuvita.synchronizedFolderObjectType,purpose:"Search"});case 1:if((i=r.v)&&0!==i.length){r.n=2;break}return t("No object properties found for the folder object type."),r.a(2,null);case 2:if(s=i.find(function(e){return"M365Postbox"===e.FieldName}),c=i.find(function(e){return"M365FolderId"===e.FieldName}),l=i.find(function(e){return"M365ParentFolderId"===e.FieldName}),s&&c&&l){r.n=3;break}return t("Required fields M365Postbox, M365FolderId or M365ParentFolderId not found in folder object properties."),r.a(2,null);case 3:return d={Constrainttype:"Q",Constraintname:"Search postbox folder",Objecttype:e.docuvita.synchronizedFolderObjectType,Constritems:[{Field:c.FieldId||0,Operator:"=",Value:o||"",AndOr:1,Position:1}]},r.n=4,a({queryDetails:d,pageNumber:0,pageSize:1});case 4:if(!((u=r.v)&&u.ResultList&&u.ResultList.length>0)){r.n=5;break}return r.a(2,u.ResultList[0].Objectid);case 5:return r.a(2,null)}},r)})()})},f=function(t,o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c,l,d;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return a="".concat(e.docuvita.serverUrl,"/setobjectrelations"),s={SourceObjectId:o,RelatedObjectIds:[t],SessionGuid:e.docuvita.apiSessionGuid,LinkComment:"Linked by fd.docuvitaAddIn"},r.p=1,r.n=2,fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s)});case 2:if((c=r.v).ok){r.n=4;break}return r.n=3,c.json();case 3:return l=r.v,"ObjectNotFoundException"===(null===(n=null==l?void 0:l.ResponseStatus)||void 0===n?void 0:n.ErrorCode)?console.debug("Missing mail object ".concat(t," or folder ").concat(o," for linking.")):console.error("Error while linking mail object ".concat(t," to folder ").concat(o,": ").concat((null===(i=null==l?void 0:l.ResponseStatus)||void 0===i?void 0:i.Message)||c.statusText)),r.a(2);case 4:r.n=6;break;case 5:r.p=5,d=r.v,console.error("Error while linking object ".concat(t," to folder ").concat(o,": ").concat(d.message||d));case 6:return r.a(2)}},r,null,[[1,5]])}))},h=function(o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return n="".concat(e.docuvita.serverUrl,"/getobjecttypes"),i={SessionGuid:e.docuvita.apiSessionGuid,FilterById:o},r.p=1,r.n=2,fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)});case 2:if((a=r.v).ok){r.n=3;break}return t("getDocumentObjectTypes failed: "+a.statusText),r.a(2,null);case 3:return r.n=4,a.json();case 4:return s=r.v,r.a(2,s.ObjecttypeList&&s.ObjecttypeList.length>0?s.ObjecttypeList[0]:null);case 5:return r.p=5,c=r.v,t("getDocumentObjectTypes failed: "+(c.message||String(c))),r.a(2,null)}},r,null,[[1,5]])}))},p=function(){return xb(r,void 0,void 0,Cb().m(function r(){var o,n,i,a,s;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return o="".concat(e.docuvita.serverUrl,"/getobjecttypes"),n={SessionGuid:e.docuvita.apiSessionGuid,FilterByAccessibilityByCurrentUser:!0},r.p=1,r.n=2,fetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)});case 2:if((i=r.v).ok){r.n=3;break}return t("getDocumentObjectTypes failed: "+i.statusText),r.a(2,[]);case 3:return r.n=4,i.json();case 4:return a=r.v,r.a(2,(a.ObjecttypeList||[]).filter(function(e){return"D"===e.Typeidentifier}).map(function(e){return{objectTypeId:e.Objecttypeid,name:e.Name,parentObjectTypes:e.Allowedparenttypes}}));case 5:return r.p=5,s=r.v,t("getDocumentObjectTypes failed: "+(s.message||String(s))),r.a(2,[])}},r,null,[[1,5]])}))},g=function(o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return n="".concat(e.docuvita.serverUrl,"/getobjecttypes"),i={FilterById:o||0,SessionGuid:e.docuvita.apiSessionGuid,FilterByAccessibilityByCurrentUser:!0},r.p=1,r.n=2,fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)});case 2:if((a=r.v).ok){r.n=3;break}return t("getFolderObjectTypes failed: "+a.statusText),r.a(2,[]);case 3:return r.n=4,a.json();case 4:return s=r.v,r.a(2,(s.ObjecttypeList||[]).filter(function(e){return"C"===e.Typeidentifier}).map(function(e){return{objectTypeId:e.Objecttypeid,name:e.Name,parentObjectTypes:e.Allowedparenttypes}}));case 5:return r.p=5,c=r.v,t("getFolderObjectTypes failed: "+(c.message||String(c))),r.a(2,[])}},r,null,[[1,5]])}))},m=function(){return xb(r,void 0,void 0,Cb().m(function r(){var o,n,i,a,s;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return o="".concat(e.docuvita.serverUrl,"/getobjecttypes"),n={SessionGuid:e.docuvita.apiSessionGuid,FilterByAccessibilityByCurrentUser:!0},r.p=1,r.n=2,fetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)});case 2:if((i=r.v).ok){r.n=3;break}return t("getFolderObjectTypeIds failed: "+i.statusText),r.a(2,[]);case 3:return r.n=4,i.json();case 4:return a=r.v,r.a(2,(a.ObjecttypeList||[]).filter(function(e){return"C"===e.Typeidentifier}).map(function(e){return e.Objecttypeid}));case 5:return r.p=5,s=r.v,t("getFolderObjectTypeIds failed: "+(s.message||String(s))),r.a(2,[])}},r,null,[[1,5]])}))},v=function(o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return n="".concat(e.docuvita.serverUrl,"/getobjecttypedefinition"),i={SessionGuid:e.docuvita.apiSessionGuid,FilterByObjectTypeId:o},r.p=1,r.n=2,fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)});case 2:if((a=r.v).ok){r.n=3;break}return t("getObjectTypeDefinition failed: "+a.statusText),r.a(2,null);case 3:return r.n=4,a.json();case 4:return r.a(2,r.v);case 5:return r.p=5,s=r.v,t("getObjectTypeDefinition failed: "+(s.message||String(s))),r.a(2,null)}},r,null,[[1,5]])}))},b=function(){return xb(r,void 0,void 0,Cb().m(function r(){var o,n,i,a,s,c,l;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return o="".concat(e.docuvita.serverUrl,"/registeredsystems"),n={SessionGuid:e.docuvita.apiSessionGuid},r.p=1,r.n=2,fetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)});case 2:if((i=r.v).ok){r.n=3;break}return t("getRegisteredSystems failed: "+i.statusText),r.a(2,null);case 3:return r.n=4,i.json();case 4:return a=r.v,s=a.SystemsList||[],c=s.find(function(t){return t.Systemreferenceid===e.docuvita.systemId}),r.a(2,c?c.Systemname:null);case 5:return r.p=5,l=r.v,t("getRegisteredSystems failed: "+(l.message||String(l))),r.a(2,null)}},r,null,[[1,5]])}))},y=function(o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c,l,d;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return n="".concat(e.docuvita.serverUrl,"/getlist"),r.n=1,m();case 1:return i=r.v,a={SessionGuid:e.docuvita.apiSessionGuid,SystemReference:e.docuvita.systemId,Root:o||0,FilterByObjectTypeIds:i,PageNumber:0,PageSize:100,ResultSortConditions:[{SortProperty:"Name",SortOrder:"Asc"}]},r.p=2,r.n=3,fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(a)});case 3:if((s=r.v).ok){r.n=4;break}return t("getFolderChildren failed: "+s.statusText),r.a(2,[]);case 4:return r.n=5,s.json();case 5:return c=r.v,l=(c.ResultList||[]).map(function(e){return{objectId:e.Objectid,objectType:e.Objecttype,name:e.Name,children:void 0,isMailCopied:!1,isMailLinked:!1,isAttachmentCopied:!1,isAttachmentLinked:!1}}),r.a(2,l);case 6:return r.p=6,d=r.v,t("getFolderChildren failed: "+(d.message||String(d))),r.a(2,[])}},r,null,[[2,6]])}))};function w(e){return xb(this,arguments,void 0,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Cb().m(function r(){var n,i,a,s;return Cb().w(function(r){for(;;)switch(r.n){case 0:n=t?[e]:[],i=e;case 1:return r.n=2,o(i);case 2:if((a=r.v)&&a.Parentobject&&-1!==a.Parentobject){r.n=3;break}return r.a(3,6);case 3:return r.n=4,o(a.Parentobject);case 4:if(s=r.v){r.n=5;break}return r.a(3,6);case 5:n.push(s.Objectid),i=s.Objectid,r.n=1;break;case 6:return r.a(2,n.reverse())}},r)})()})}return{getObjectProperties:n,setObjectProperties:i,getQueryResultSet:a,createFolder:s,createDateFolderStructure:c,uploadMail:function(o){return xb(r,[o],void 0,function(r){var o=r.emlBlob,n=r.mailInfo,a=r.mailProperties,s=r.folderPath;return Cb().m(function r(){var d,u,h,p,g,m,v,b,y,w,k,C;return Cb().w(function(r){for(;;)switch(r.n){case 0:if(u="".concat(n.messageId||"mail",".eml"),h=e.docuvita.archiveParentObjectId||0,!e.addin.useDateFolders){r.n=2;break}return r.n=1,c(n.dateTimeCreated);case 1:h=r.v;case 2:return(p=Object.values(a).find(function(e){return"OBJ_PARENTOBJECT"===e.FieldName}))&&(p.FieldValueNumeric=h),r.n=3,i({objectPropertyList:a,versionOriginalFilename:u,versionComment:"Archived by fd.docuvitaAddIn"});case 3:if(g=r.v,m=g.docUploadGuid,v=g.objectPropertyList,m){r.n=4;break}return t("Failed to set object properties, no DocUploadGuid returned."),r.a(2,{mailObjectId:-1,parentObjectId:-1});case 4:return b=(null===(d=v.find(function(e){return"OBJ_OBJECTID"===e.FieldName}))||void 0===d?void 0:d.FieldValueNumeric)||0,(y=new FormData).append("file",o,u),w="".concat(e.docuvita.serverUrl,"/fileupload?guid=").concat(m),r.n=5,fetch(w,{method:"POST",body:y,headers:{Accept:"application/json"}});case 5:if((k=r.v).ok){r.n=6;break}return t("Upload failed: "+k.statusText+" (ObjectId: "+b+")"),r.a(2,{objectId:-1,parentObjectId:-1});case 6:return r.n=7,k.json();case 7:if(r.v,!e.addin.synchronizeFolders){r.n=9;break}return r.n=8,l(s);case 8:return C=r.v,r.n=9,f(b,C);case 9:return r.a(2,{objectId:b,parentObjectId:h})}},r)})()})},updateMailObject:function(e){return xb(r,void 0,void 0,Cb().m(function r(){var o,n;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return r.p=0,r.n=1,i({objectPropertyList:e});case 1:return o=r.v,r.a(2,o);case 2:throw r.p=2,n=r.v,t("Docuvita updateMailObjectProperties failed: "+(n.message||String(n))),n;case 3:return r.a(2)}},r,null,[[0,2]])}))},updateAttachmentObject:function(e){return xb(r,void 0,void 0,Cb().m(function r(){var o,n;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return r.p=0,r.n=1,i({objectPropertyList:e});case 1:return o=r.v,r.a(2,o);case 2:throw r.p=2,n=r.v,t("Docuvita updateAttachmentObject failed: "+(n.message||String(n))),n;case 3:return r.a(2)}},r,null,[[0,2]])}))},getMailObjectId:function(o){return xb(r,void 0,void 0,Cb().m(function r(){var i,s,c,l,d,u;return Cb().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,n({objectId:void 0,objectTypeId:e.docuvita.mailObjectType,purpose:"Search",parentObject:e.docuvita.archiveParentObjectId});case 1:if((i=r.v)&&0!==i.length){r.n=2;break}return t("No object properties found for the mail object type."),r.a(2,null);case 2:if(s=i.find(function(e){return"M365Postbox"===e.FieldName}),c=i.find(function(e){return"M365MessageId"===e.FieldName}),l=i.find(function(e){return"M365ParentFolderId"===e.FieldName}),s&&c&&l){r.n=3;break}return t("Required fields M365Postbox, M365MessageId or M365ParentFolderId not found in mail object properties."),r.a(2,null);case 3:return d={Constrainttype:"Q",Constraintname:"Search archived mail",Objecttype:e.docuvita.mailObjectType,Constritems:[{Field:s.FieldId||0,Operator:"=",Value:o.userEmail||"",AndOr:1,Position:1},{Field:c.FieldId||0,Operator:"=",Value:o.messageId||"",AndOr:1,Position:1}]},r.n=4,a({queryDetails:d,pageNumber:0,pageSize:1});case 4:if(!((u=r.v)&&u.ResultList&&u.ResultList.length>0)){r.n=5;break}return r.a(2,{objectId:u.ResultList[0].Objectid,parentObjectId:u.ResultList[0].Parentobject});case 5:return r.a(2,null)}},r)}))},createPostboxFolderStructure:l,createPostboxFolder:d,getPostboxFolder:u,linkObjectToFolder:f,unlinkObjectFromFolder:function(t,o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c,l,d;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return a="".concat(e.docuvita.serverUrl,"/deleteobjectrelations"),s={SourceObjectId:o,RelatedObjectIds:[t],SessionGuid:e.docuvita.apiSessionGuid},r.p=1,r.n=2,fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s)});case 2:if((c=r.v).ok){r.n=4;break}return r.n=3,c.json();case 3:return l=r.v,"ObjectNotFoundException"===(null===(n=null==l?void 0:l.ResponseStatus)||void 0===n?void 0:n.ErrorCode)?console.debug("Missing object ".concat(t," or folder ").concat(o," for unlinking.")):console.error("Error while unlinking object ".concat(t," from folder ").concat(o,": ").concat((null===(i=null==l?void 0:l.ResponseStatus)||void 0===i?void 0:i.Message)||c.statusText)),r.a(2);case 4:r.n=6;break;case 5:r.p=5,d=r.v,console.error("Error while unlinking object ".concat(t," from folder ").concat(o,": ").concat(d.message||d));case 6:return r.a(2)}},r,null,[[1,5]])}))},getMailObjectPropertiesForEditor:function(o,i){return xb(r,void 0,void 0,Cb().m(function r(){var a,s,c,l;return Cb().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,n({objectId:i,objectTypeId:e.docuvita.mailObjectType,purpose:i?"DisplayObject":"NewObject"});case 1:if((a=r.v)&&0!==a.length){r.n=2;break}return t("No properties found for the mail object."),r.a(2,null);case 2:if(s=a.find(function(e){return"M365Postbox"===e.FieldName}),c=a.find(function(e){return"M365MessageId"===e.FieldName}),l=a.find(function(e){return"M365ParentFolderId"===e.FieldName}),s&&c&&l){r.n=3;break}return t("Required fields M365Postbox, M365MessageId or M365ParentFolderId not found in mail object properties."),r.a(2,null);case 3:return a.forEach(function(t){switch(t.FieldName){case"OBJ_NAME":t.FieldValueString=o.subject&&o.subject.length>0?o.subject.substring(0,450):"";break;case"OBJ_DESCRIPTION":t.FieldValueString="From: ".concat(o.from,"\nTo: ").concat(o.to);break;case"OBJ_OBJECTTYPE":t.FieldValueNumeric=e.docuvita.mailObjectType;break;case"OBJ_DATECREATED":t.FieldValueDateTime=o.dateTimeCreated;break;case"M365Postbox":t.FieldValueString=o.userEmail||"";break;case"M365MessageId":t.FieldValueString=o.messageId;break;case"M365ParentFolderId":t.FieldValueString=o.parentFolderId}}),a.sort(function(e,t){var r,o;return(null!==(r=e.Position)&&void 0!==r?r:0)-(null!==(o=t.Position)&&void 0!==o?o:0)}),r.a(2,a)}},r)}))},uploadFile:function(o){return xb(r,[o],void 0,function(r){var o=r.fileBlob,n=r.fileName,a=r.fileProperties,s=r.parentObjectId;return Cb().m(function r(){var c,l,d,u,f,h,p,g;return Cb().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,i({objectPropertyList:a,versionOriginalFilename:n,versionComment:"Archived by fd.docuvitaAddIn"});case 1:if(l=r.v,d=l.docUploadGuid,u=l.objectPropertyList,d){r.n=2;break}return t("Failed to set object properties, no DocUploadGuid returned."),r.a(2,{mailObjectId:-1,parentObjectId:-1});case 2:return f=(null===(c=u.find(function(e){return"OBJ_OBJECTID"===e.FieldName}))||void 0===c?void 0:c.FieldValueNumeric)||0,(h=new FormData).append("file",o,n),p="".concat(e.docuvita.serverUrl,"/fileupload?guid=").concat(d),r.n=3,fetch(p,{method:"POST",body:h,headers:{Accept:"application/json"}});case 3:if((g=r.v).ok){r.n=4;break}return t("Upload failed: "+g.statusText+" (ObjectId: "+f+")"),r.a(2,{objectId:-1,parentObjectId:-1});case 4:return r.n=5,g.json();case 5:r.v;case 6:return r.a(2,{objectId:f,parentObjectId:s})}},r)})()})},getAttachmentObjectByAttachmentId:function(e,t,o){return xb(r,void 0,void 0,Cb().m(function r(){var i,s,c,l,d,u,f,h,p,g;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:i=wb(o),r.p=1,i.s();case 2:if((s=i.n()).done){r.n=8;break}return c=s.value,r.n=3,n({objectTypeId:c.objectTypeId,purpose:"Search"});case 3:if((l=r.v)&&0!==l.length){r.n=4;break}return r.a(3,7);case 4:return d=l.find(function(e){return"M365Postbox"===e.FieldName}),u=l.find(function(e){return"M365MessageId"===e.FieldName}),f=l.find(function(e){return"M365AttachmentId"===e.FieldName}),h={Constrainttype:"Q",Constraintname:"Search archived attachment",Objecttype:c.objectTypeId,Constritems:[{Field:d.FieldId||0,Operator:"=",Value:e.userEmail||"",AndOr:1,Position:0},{Field:u.FieldId||0,Operator:"=",Value:e.messageId||"",AndOr:1,Position:1},{Field:f.FieldId||0,Operator:"=",Value:t||"",AndOr:1,Position:2}]},r.n=5,a({queryDetails:h,pageNumber:0,pageSize:1});case 5:if(!((p=r.v)&&p.ResultList&&p.ResultList.length>0)){r.n=6;break}return r.a(2,{objectId:p.ResultList[0].Objectid,objectType:p.ResultList[0].Objecttype,parentObjectId:p.ResultList[0].Parentobject});case 6:return r.a(3,7);case 7:r.n=2;break;case 8:r.n=10;break;case 9:r.p=9,g=r.v,i.e(g);case 10:return r.p=10,i.f(),r.f(10);case 11:return r.a(2,null)}},r,null,[[1,9,10,11]])}))},getIndexedAttachmentObjectByAttachmentId:function(o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return n={SessionGuid:e.docuvita.apiSessionGuid,PageNumber:0,PageSize:3,QueryDetails:{Constrid:0,Constrainttype:"F",Constraintname:o}},i="".concat(e.docuvita.serverUrl,"/getqueryresultset"),r.p=1,r.n=2,fetch(i,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)});case 2:if((a=r.v).ok){r.n=3;break}return t("getQueryResultSet failed: "+a.statusText),r.a(2,{ResultList:[]});case 3:if(204!==a.status){r.n=4;break}return r.a(2,{ResultList:[]});case 4:return r.n=5,a.json();case 5:if(!((s=r.v)&&s.ResultList&&s.ResultList.length>0)){r.n=6;break}return r.a(2,{objectId:s.ResultList[0].Objectid,objectType:s.ResultList[0].Objecttype,parentObjectId:s.ResultList[0].Parentobject});case 6:return r.a(2,null);case 7:return r.p=7,c=r.v,t("getQueryResultSet failed: "+(c.message||String(c))),r.a(2,{ResultList:[]})}},r,null,[[1,7]])}))},getAttachmentObjectPropertiesForEditor:function(e,o,i,a){return xb(r,void 0,void 0,Cb().m(function r(){var s,c;return Cb().w(function(r){for(;;)switch(r.n){case 0:return s=e.docuvitaAttachmentStatus[o.id],r.n=1,n({objectId:null==s?void 0:s.objectId,objectTypeId:i,purpose:(null==s?void 0:s.objectId)?"DisplayObject":"NewObject",parentObject:a});case 1:if((c=r.v)&&0!==c.length){r.n=2;break}return t("No properties found for the attachment object."),r.a(2,null);case 2:return(null==s?void 0:s.objectId)||c.forEach(function(t){switch(t.FieldName){case"OBJ_NAME":t.FieldValueString=o.name&&o.name.length>0?o.name.substring(0,450):"";break;case"OBJ_DESCRIPTION":t.FieldValueString=o.name&&o.name.length>0?o.name.substring(0,450):"";break;case"OBJ_OBJECTTYPE":t.FieldValueNumeric=i;break;case"OBJ_PARENTOBJECT":t.FieldValueNumeric=a;break;case"OBJ_DATECREATED":t.FieldValueDateTime=e.dateTimeCreated;break;case"M365Postbox":t.FieldValueString=e.userEmail||"";break;case"M365AttachmentId":t.FieldValueString=o.id;break;case"M365MessageId":t.FieldValueString=e.messageId}}),c.sort(function(e,t){var r,o;return(null!==(r=e.Position)&&void 0!==r?r:0)-(null!==(o=t.Position)&&void 0!==o?o:0)}),r.a(2,c)}},r)}))},getDocumentObjectTypes:p,getWorkspaceObjectTypes:function(){return xb(r,void 0,void 0,Cb().m(function r(){var o,n,i,a,s;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return o="".concat(e.docuvita.serverUrl,"/getobjecttypes"),n={SessionGuid:e.docuvita.apiSessionGuid,FilterByAccessibilityByCurrentUser:!0},r.p=1,r.n=2,fetch(o,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)});case 2:if((i=r.v).ok){r.n=3;break}return t("getWorkspaceObjectTypes failed: "+i.statusText),r.a(2,[]);case 3:return r.n=4,i.json();case 4:return a=r.v,r.a(2,(a.ObjecttypeList||[]).filter(function(e){return"W"===e.Typeidentifier}).map(function(e){return{objectTypeId:e.Objecttypeid,name:e.Name,parentObjectTypes:e.Allowedparenttypes}}));case 5:return r.p=5,s=r.v,t("getWorkspaceObjectTypes failed: "+(s.message||String(s))),r.a(2,[])}},r,null,[[1,5]])}))},getAttachmentObjectTypes:function(){return xb(r,void 0,void 0,Cb().m(function e(){var r,o,n,i,a,s,c,l,d,u,f,h,g,m;return Cb().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,i=[],e.n=1,p();case 1:a=e.v,s=wb(a),e.p=2,s.s();case 3:if((c=s.n()).done){e.n=6;break}return l=c.value,e.n=4,v(l.objectTypeId);case 4:d=e.v,u=null===(r=null==d?void 0:d.ObjecttypedefinitionList)||void 0===r?void 0:r.some(function(e){return"M365Postbox"===e.Fieldname}),f=null===(o=null==d?void 0:d.ObjecttypedefinitionList)||void 0===o?void 0:o.some(function(e){return"M365MessageId"===e.Fieldname}),h=null===(n=null==d?void 0:d.ObjecttypedefinitionList)||void 0===n?void 0:n.some(function(e){return"M365AttachmentId"===e.Fieldname}),d&&u&&f&&h&&i.push(l);case 5:e.n=3;break;case 6:e.n=8;break;case 7:e.p=7,g=e.v,s.e(g);case 8:return e.p=8,s.f(),e.f(8);case 9:return e.a(2,i);case 10:return e.p=10,m=e.v,t("getAttachmentObjectTypes failed: "+(m.message||String(m))),e.a(2,[])}},e,null,[[2,7,8,9],[0,10]])}))},getAttachmentParentObjectTypes:function(e){return xb(r,void 0,void 0,Cb().m(function r(){var o,n,i,a,s,c,l;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:r.p=0,o=new Set,n=e.parentObjectTypes?e.parentObjectTypes.split(",").map(function(e){return Number(e.trim())}).filter(function(e){return!isNaN(e)}):[],i=wb(n),r.p=1,i.s();case 2:if((a=i.n()).done){r.n=5;break}return s=a.value,r.n=3,g(s);case 3:r.v.forEach(function(e){return o.add(e)});case 4:r.n=2;break;case 5:r.n=7;break;case 6:r.p=6,c=r.v,i.e(c);case 7:return r.p=7,i.f(),r.f(7);case 8:return r.a(2,Array.from(o));case 9:return r.p=9,l=r.v,t("getAttachmentParentObjectTypes failed: "+(l.message||String(l))),r.a(2,[])}},r,null,[[1,6,7,8],[0,9]])}))},getFolderChildren:y,getFolderTree:function(e){return xb(r,void 0,void 0,Cb().m(function t(){var r,o,n,i,a,s;return Cb().w(function(t){for(;;)switch(t.n){case 0:if(r=0,o="Root",n=-1,!e){t.n=1;break}r=e.objectId,o=e.name,n=e.objectType,t.n=3;break;case 1:return t.n=2,b();case 2:i=t.v,o=i||"Root";case 3:return t.n=4,y(r);case 4:return a=t.v,s={objectId:r,name:o,objectType:n,children:a||[],isMailCopied:!1,isMailLinked:!1,isAttachmentCopied:!1,isAttachmentLinked:!1},t.a(2,[s])}},t)}))},getRegisteredSystemName:b,getFolderObjectTypes:g,getFolderObjectTypeIds:m,getWorkspacesByObjectType:function(o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return n={SessionGuid:e.docuvita.apiSessionGuid,PageNumber:0,PageSize:25,QueryDetails:{Constrid:0,Constrainttype:"P",Constraintname:"*",Objecttype:o.toString(),Constritems:[{Field:-101,Operator:"=",Value:"*",AndOr:1,Position:0}]}},i="".concat(e.docuvita.serverUrl,"/getqueryresultset"),r.p=1,r.n=2,fetch(i,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)});case 2:if((a=r.v).ok){r.n=3;break}return t("getQueryResultSet failed: "+a.statusText),r.a(2,[]);case 3:if(204!==a.status){r.n=4;break}return r.a(2,[]);case 4:return r.n=5,a.json();case 5:if(!((s=r.v)&&s.ResultList&&s.ResultList.length>0)){r.n=6;break}return r.a(2,s.ResultList.map(function(e){return{objectId:e.Objectid,objectType:e.Objecttype,parentObjectId:e.Parentobject,name:e.Name}}));case 6:return r.a(2,[]);case 7:return r.p=7,c=r.v,t("getQueryResultSet failed: "+(c.message||String(c))),r.a(2,[])}},r,null,[[1,7]])}))},getMailObjectType:function(){return xb(r,void 0,void 0,Cb().m(function r(){var o,n,i,a,s,c,l;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return n="".concat(e.docuvita.serverUrl,"/getobjecttypes"),i={FilterById:(null===(o=null==e?void 0:e.docuvita)||void 0===o?void 0:o.mailObjectType)||0,SessionGuid:e.docuvita.apiSessionGuid,FilterByAccessibilityByCurrentUser:!0},r.p=1,r.n=2,fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)});case 2:if((a=r.v).ok){r.n=3;break}return t("getMailObjectType failed: "+a.statusText),r.a(2,null);case 3:return r.n=4,a.json();case 4:return s=r.v,c=(s.ObjecttypeList||[]).map(function(e){return{objectTypeId:e.Objecttypeid,name:e.Name,parentObjectTypes:e.Allowedparenttypes}}),r.a(2,c.length>0?c[0]:null);case 5:return r.p=5,l=r.v,t("getMailObjectType failed: "+(l.message||String(l))),r.a(2,null)}},r,null,[[1,5]])}))},getMailParentObjectTypes:function(e){return xb(r,void 0,void 0,Cb().m(function r(){var o,n,i,a,s,c,l;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:r.p=0,o=new Set,n=e.parentObjectTypes?e.parentObjectTypes.split(",").map(function(e){return Number(e.trim())}).filter(function(e){return!isNaN(e)}):[],i=wb(n),r.p=1,i.s();case 2:if((a=i.n()).done){r.n=5;break}return s=a.value,r.n=3,g(s);case 3:r.v.forEach(function(e){return o.add(e)});case 4:r.n=2;break;case 5:r.n=7;break;case 6:r.p=6,c=r.v,i.e(c);case 7:return r.p=7,i.f(),r.f(7);case 8:return r.a(2,Array.from(o));case 9:return r.p=9,l=r.v,t("getMailParentObjectTypes failed: "+(l.message||String(l))),r.a(2,[])}},r,null,[[1,6,7,8],[0,9]])}))},getObjectById:o,getObjectTypeById:h,getObjectRelations:function(o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return n="".concat(e.docuvita.serverUrl,"/getobjectrelations"),i={ObjectId:o,IncludeLinksToObject:!0,IncludeLinksFromObject:!1,IncludeRealParentObject:!0,PageNumber:0,PageSize:25,SessionGuid:e.docuvita.apiSessionGuid},r.p=1,r.n=2,fetch(n,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(i)});case 2:if((a=r.v).ok){r.n=3;break}return t("getObjectRelations failed: "+a.statusText),r.a(2,null);case 3:if(204!==a.status){r.n=4;break}return r.a(2,null);case 4:return r.n=5,a.json();case 5:return s=r.v,r.a(2,s.ResultList||[]);case 6:return r.p=6,c=r.v,t("getObjectRelations failed: "+(c.message||String(c))),r.a(2,null)}},r,null,[[1,6]])}))},getParentObjectIds:w,getObjectWorkspace:function(e){return xb(r,void 0,void 0,Cb().m(function t(){var r,n,i,a;return Cb().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,w(e);case 1:if((r=t.v)&&0!==r.length){t.n=2;break}return t.a(2,null);case 2:return t.n=3,o(r[0]);case 3:if(!(n=t.v)){t.n=5;break}return t.n=4,h(n.Objecttype);case 4:if(!(i=t.v)||"W"!==i.Typeidentifier){t.n=5;break}return a={objectId:n.Objectid,parentObjectId:n.Parentobject,objectType:n.Objecttype,name:n.Name},t.a(2,a);case 5:return t.a(2,null)}},t)}))},setParent:function(t,o){return xb(r,void 0,void 0,Cb().m(function r(){var n,i,a,s,c,l,d;return Cb().w(function(r){for(;;)switch(r.p=r.n){case 0:return a="".concat(e.docuvita.serverUrl,"/setparent"),s={ObjectIds:t,NewParentObject:o,SessionGuid:e.docuvita.apiSessionGuid},r.p=1,r.n=2,fetch(a,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(s)});case 2:if((c=r.v).ok){r.n=4;break}return r.n=3,c.json();case 3:return l=r.v,"ObjectNotFoundException"===(null===(n=null==l?void 0:l.ResponseStatus)||void 0===n?void 0:n.ErrorCode)?console.debug("Missing objects or parent ".concat(o," for relocation.")):console.error("Error while relocating objects ".concat(t.join(", ")," to parent ").concat(o,": ").concat((null===(i=null==l?void 0:l.ResponseStatus)||void 0===i?void 0:i.Message)||c.statusText)),r.a(2);case 4:console.debug("Relocated objects ".concat(t.join(", ")," to parent ").concat(o)),r.n=6;break;case 5:r.p=5,d=r.v,console.error("Error while relocating objects ".concat(t.join(", ")," to parent ").concat(o,": ").concat(d.message||d));case 6:return r.a(2)}},r,null,[[1,5]])}))}}}(t,B);if(!(t&&t.msal&&t.docuvita&&t.addin))return B("Konfiguration ist nicht verfügbar."),null;if(!z)return B("Graph API ist nicht verfügbar."),null;if(!q)return B("docuvita API ist nicht verfügbar."),null;(0,o.useEffect)(()=>{var e;!(null===(e=null==t?void 0:t.addin)||void 0===e?void 0:e.showMailFolderEditor)||Array.isArray(g)&&g.length>0||$x(void 0,void 0,void 0,function*(){try{const e=yield q.getFolderTree();m(e)}catch(e){m([])}})},[]),(0,o.useEffect)(()=>{var e,r;!(null===(e=null==t?void 0:t.addin)||void 0===e?void 0:e.showMailWorkspaceEditor)&&!(null===(r=null==t?void 0:t.addin)||void 0===r?void 0:r.showAttachmentWorkspaceEditor)||Array.isArray(_)&&_.length>0||$x(void 0,void 0,void 0,function*(){try{const e=yield q.getWorkspaceObjectTypes();E(e)}catch(e){B("Fehler beim Laden der Workspace-Objekttypen: "+(e.message||String(e)))}})},[]),(0,o.useEffect)(()=>{var e;(null===(e=null==t?void 0:t.addin)||void 0===e?void 0:e.extractAttachments)&&(Array.isArray(null==u?void 0:u.attachments)&&u.attachments.length>0?p(!0):p(!1))},[null==u?void 0:u.attachments]),(0,o.useEffect)(()=>{var e,r;(null===(e=null==t?void 0:t.addin)||void 0===e?void 0:e.extractAttachments)&&(null===(r=null==t?void 0:t.addin)||void 0===r?void 0:r.showAttachmentFolderEditor)&&h&&!(Array.isArray(v)&&v.length>0)&&$x(void 0,void 0,void 0,function*(){try{const e=yield q.getFolderTree();b(e)}catch(e){b([])}})},[h]),(0,o.useEffect)(()=>{var e,r;(null===(e=null==t?void 0:t.addin)||void 0===e?void 0:e.extractAttachments)&&(null===(r=null==t?void 0:t.addin)||void 0===r?void 0:r.showAttachmentFolderEditor)&&h&&$x(void 0,void 0,void 0,function*(){try{const e=yield q.getAttachmentObjectTypes();I(e)}catch(e){B("Fehler beim Laden der Attachment-Objekttypen: "+(e.message||String(e)))}})},[h]),(0,o.useEffect)(()=>{var e;(null===(e=null==t?void 0:t.addin)||void 0===e?void 0:e.extractAttachments)&&h&&$x(void 0,void 0,void 0,function*(){var e;if(u&&u.messageId)try{const t=null!==(e=yield z.getMailAttachments(u.messageId))&&void 0!==e?e:[];T.map(e=>e.id).sort().join(",")!==t.map(e=>e.id).sort().join(",")&&x(t)}catch(e){B("Fehler beim Laden der Anhänge: "+(e.message||String(e)))}})},[h]),(0,o.useEffect)(()=>{var e;(null===(e=null==t?void 0:t.addin)||void 0===e?void 0:e.extractAttachments)&&h&&$x(void 0,void 0,void 0,function*(){const e=(yield Vx.all(null==u?void 0:u.attachments.map(e=>$x(void 0,void 0,void 0,function*(){return{id:e.id.replace(/\//g,"-"),status:{objectId:void 0,parentObjectId:void 0,objectType:void 0,contentType:e.contentType,name:e.name||"attachment"}}})))).reduce((e,{id:t,status:r})=>(e[t]=r,e),{});f(t=>Object.assign(Object.assign({},t),{docuvitaAttachmentStatus:Object.assign(Object.assign({},t.docuvitaAttachmentStatus),e)}))})},[h]),(0,o.useEffect)(()=>{A&&console.error(A)},[A]),(0,o.useEffect)(()=>{if(!O)return void P(!1);P(!0);const e=setTimeout(()=>{R(null),P(!1)},4e3);return()=>clearTimeout(e)},[O]);const M=e=>{R(t=>t===e?t:e)};return o.createElement("div",{className:N.tabsRoot},o.createElement(Iv,{className:N.tabList,selectedValue:l,onTabSelect:(e,t)=>d(t.value)},o.createElement(Wv,{value:"mail"},"Mail"),h&&o.createElement(Wv,{value:"attachments"},"Anhänge"),o.createElement(Wv,{value:"config"},"Konfiguration"),t.addin.showProfileView&&o.createElement(Wv,{value:"profile"},"Profil")),A&&o.createElement(lb,{intent:"error",className:N.messageBar},A),O&&o.createElement(lb,{intent:"success",className:N.messageBar},O),o.createElement("div",{className:N.tabContent},"mail"===l&&o.createElement(rx,{config:t,graphApi:z,docuvitaApi:q,mailInfo:u,setMailInfo:f,folderTree:g,setFolderTree:m,workspaceFolderTree:y,setWorkspaceFolderTree:w,workspaceObjectTypes:_,setError:B,setSuccess:M}),"attachments"===l&&h&&(null===(s=null==t?void 0:t.addin)||void 0===s?void 0:s.extractAttachments)&&o.createElement(Dx,{config:t,docuvitaApi:q,mailInfo:u,setMailInfo:f,attachments:T,folderTree:v,setFolderTree:b,workspaceFolderTree:k,setWorkspaceFolderTree:C,attachmentObjectTypes:S,workspaceObjectTypes:_,setError:B,setSuccess:M}),"config"===l&&o.createElement(Hx,{config:t,defaultConfig:n,onChange:r,setError:B,setSuccess:M}),"profile"===l&&(null===(c=null==t?void 0:t.addin)||void 0===c?void 0:c.showProfileView)&&o.createElement(Wx,{profile:i})))},Gx=r(64583).Promise,Jx=function(e,t,r,o){return new(r||(r=Gx))(function(n,i){function a(e){try{c(o.next(e))}catch(e){i(e)}}function s(e){try{c(o.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}c((o=o.apply(e,t||[])).next())})},Qx=({title:e,config:t,defaultConfig:r})=>{const n=Dg(),[i,a]=(0,o.useState)(!1),[s,c]=(0,o.useState)(t),l=(0,o.useMemo)(()=>({scopes:s.msal.scopes||["Mail.ReadWrite","User.Read"]}),[s.msal.scopes]),d=(0,o.useMemo)(()=>({auth:{clientId:s.msal.clientId,authority:`https://login.microsoftonline.com/${s.msal.tenantId}`,redirectUri:s.msal.redirectUri}}),[s.msal.clientId,s.msal.tenantId,s.msal.redirectUri]),u=(0,o.useMemo)(()=>new zf(d),[d]),[f,h]=(0,o.useState)(void 0),[p,g]=(0,o.useState)(null),[m,v]=(0,o.useState)(null),[b,y]=(0,o.useState)(null),w=(0,o.useMemo)(()=>p?jh.init({authProvider:e=>{e(null,p)}}):null,[p]);if((0,o.useEffect)(()=>{b&&console.error(b)},[b]),(0,o.useEffect)(()=>{let e=!0;return Jx(void 0,void 0,void 0,function*(){if(window.Office&&Office.onReady&&(yield Office.onReady()),yield u.initialize(),e){const e=u.getAllAccounts();h(e.length>0?e[0]:null)}}),()=>{e=!1}},[u]),(0,o.useEffect)(()=>{void 0===f||m||null!==f||Jx(void 0,void 0,void 0,function*(){var e;y(null);try{const t=yield u.loginPopup(l);g(t.accessToken);const r=(null===(e=u.getAllAccounts)||void 0===e?void 0:e.call(u))||[];r.length>0&&h(r[0])}catch(e){y(e.message||String(e))}})},[l,m,f,u]),(0,o.useEffect)(()=>{if(f&&!p){let e=!1;return Jx(void 0,void 0,void 0,function*(){try{const t=yield u.acquireTokenSilent(Object.assign(Object.assign({},l),{account:f}));e||g(t.accessToken)}catch(t){e||y(t.message||String(t))}}),()=>{e=!0}}},[f,l,u,p]),(0,o.useEffect)(()=>{f&&!m&&w&&Jx(void 0,void 0,void 0,function*(){if(w&&!m)try{const e=yield w.api("/me").get();v(e)}catch(e){y(e.message||String(e))}})},[f,w,m]),b)return o.createElement("div",{style:{color:"red"}},b);if(!m||!p)return o.createElement("div",null,"Authentifiziere...");if(i)return o.createElement("div",{className:n.tabsContent},o.createElement(Kx,{initialTab:i,config:s,setConfig:c,defaultConfig:r,profile:m,graphClient:w}),o.createElement(Hg,null));if(!1!==s.addin.showWelcome){const t=[{icon:o.createElement($t,null),primaryText:"Erreichen Sie mehr mit der docuvita Outlook-Integration"},{icon:o.createElement(Kt,null),primaryText:"Archivieren Sie Emails und Anhänge direkt in docuvita Ordnern oder Arbeitsmappen"},{icon:o.createElement(Gt,null),primaryText:"Setzen Sie die docuvita Email-Eigenschaften direkt in Outlook"}];return o.createElement("div",{className:n.centeredContent},o.createElement(zg,{logo:"assets/fd-filled.png",title:e,message:"Willkommen"}),o.createElement("div",{className:n.heroListContainer},o.createElement(Mg,{message:"Entdecken Sie, was dieses Add-In für Sie heute tun kann!",items:t})),o.createElement("div",{style:{marginBottom:16}},o.createElement(St,{label:"Willkommensseite beim Start anzeigen",checked:!1!==s.addin.showWelcome,onChange:(e,t)=>{const r=Object.assign(Object.assign({},s),{addin:Object.assign(Object.assign({},s.addin),{showWelcome:t.checked})});c(r),Office.context.roamingSettings.set("config",r),Office.context.roamingSettings.saveAsync()}})),o.createElement("div",null,o.createElement(Vt,{appearance:"primary",onClick:()=>a("mail")},"Jetzt starten")),o.createElement(Hg,null))}return a("mail"),null};const Xx=o.createContext(void 0),Yx=Xx.Provider,Zx="fui-FluentProvider",eS=ne({root:{sj55zd:"f19n0e5",De3pzq:"fxugw4r",fsow6f:["f1o700av","fes3tcz"],Bahqtrf:"fk6fouc",Be2twd7:"fkhj508",Bhrd7zp:"figsok6",Bg96gwp:"f1i3iumi"}},{d:[".f19n0e5{color:var(--colorNeutralForeground1);}",".fxugw4r{background-color:var(--colorNeutralBackground1);}",".f1o700av{text-align:left;}",".fes3tcz{text-align:right;}",".fk6fouc{font-family:var(--fontFamilyBase);}",".fkhj508{font-size:var(--fontSizeBase300);}",".figsok6{font-weight:var(--fontWeightRegular);}",".f1i3iumi{line-height:var(--lineHeightBase300);}"]}),tS=n.useInsertionEffect?n.useInsertionEffect:M,rS={},oS={},nS=(e,t)=>{const r=et(),n=o.useContext(Xx),i=tk(),a=o.useContext($e)||rS,{applyStylesToPortals:s=!0,customStyleHooks_unstable:c,dir:l=r.dir,targetDocument:d=r.targetDocument,theme:u,overrides_unstable:f={}}=e,h=iS(n,u),p=iS(i,f),g=iS(a,c),m=ge();var v;const{styleTagId:b,rule:y}=(e=>{const{targetDocument:t,theme:r,rendererAttributes:n}=e,i=o.useRef(void 0),a=O(Zx),s=n,c=o.useMemo(()=>function(e,t){return t?`${e} { ${Object.keys(t).reduce((e,r)=>`${e}--${r}: ${t[r]}; `,"")} }`:`${e} {}`}(`.${a}`,r),[r,a]);return function(e,t){o.useState(()=>{if(!e)return;const r=e.getElementById(t);r&&e.head.append(r)})}(t,a),tS(()=>{const e=null==t?void 0:t.getElementById(a);return e?i.current=e:(i.current=((e,t)=>{if(!(null==e?void 0:e.head))return;const r=e.createElement("style");return Object.keys(t).forEach(e=>{r.setAttribute(e,t[e])}),e.head.appendChild(r),r})(t,{...s,id:a}),i.current&&((e,t)=>{const r=e.sheet;r&&(r.cssRules.length>0&&r.deleteRule(0),r.insertRule(t,0))})(i.current,c)),()=>{var e;null===(e=i.current)||void 0===e||e.remove()}},[a,t,c,s]),{styleTagId:a,rule:c}})({theme:h,targetDocument:d,rendererAttributes:null!==(v=m.styleElementAttributes)&&void 0!==v?v:oS});return{applyStylesToPortals:s,customStyleHooks_unstable:g,dir:l,targetDocument:d,theme:h,overrides_unstable:p,themeClassName:b,components:{root:"div"},root:N(qe("div",{...e,dir:l,ref:D(t,Dw({targetDocument:d}))}),{elementType:"div"}),serverStyleProps:{cssRule:y,attributes:{...m.styleElementAttributes,id:b}}}};function iS(e,t){return e&&t?{...e,...t}:e||t}const aS=o.forwardRef((e,t)=>{const r=nS(e,t);(e=>{const t=ge(),r=eS({dir:e.dir,renderer:t});e.root.className=Z(Zx,e.themeClassName,r.root,e.root.className)})(r);const n=function(e){const{applyStylesToPortals:t,customStyleHooks_unstable:r,dir:n,root:i,targetDocument:a,theme:s,themeClassName:c,overrides_unstable:l}=e,d=o.useMemo(()=>({dir:n,targetDocument:a}),[n,a]),[u]=o.useState(()=>({})),f=o.useMemo(()=>({textDirection:n}),[n]);return{customStyleHooks_unstable:r,overrides_unstable:l,provider:d,textDirection:n,iconDirection:f,tooltip:u,theme:s,themeClassName:t?i.className:c}}(r);return((e,t)=>Ue(Ze,{value:t.provider,children:Ue(Yx,{value:t.theme,children:Ue(qw,{value:t.themeClassName,children:Ue(Ge,{value:t.customStyleHooks_unstable,children:Ue(kw,{value:t.tooltip,children:Ue(ve,{dir:t.textDirection,children:Ue(re,{value:t.iconDirection,children:Ue(ek,{value:t.overrides_unstable,children:We(e.root,{children:[I()?null:Ue("style",{dangerouslySetInnerHTML:{__html:e.serverStyleProps.cssRule},...e.serverStyleProps.attributes}),e.root.children]})})})})})})})})}))(r,n)});aS.displayName="FluentProvider";const sS="#242424",cS="#424242",lS="#616161",dS="#bdbdbd",uS="#e0e0e0",fS="#e6e6e6",hS="#ebebeb",pS="#f0f0f0",gS="#f5f5f5",mS="#fafafa",vS="rgba(255, 255, 255, 0.4)",bS="rgba(255, 255, 255, 0.5)",yS="rgba(0, 0, 0, 0.05)",wS="rgba(0, 0, 0, 0.1)",kS="#ffffff",CS={shade50:"#200205",shade40:"#3b0509",shade30:"#6e0811",shade20:"#960b18",shade10:"#b10e1c",primary:"#c50f1f",tint10:"#cc2635",tint20:"#d33f4c",tint30:"#dc626d",tint40:"#eeacb2",tint50:"#f6d1d5",tint60:"#fdf3f4"},TS={shade50:"#031403",shade40:"#052505",shade30:"#094509",shade20:"#0c5e0c",shade10:"#0e700e",primary:"#107c10",tint10:"#218c21",tint20:"#359b35",tint30:"#54b054",tint40:"#9fd89f",tint50:"#c9eac9",tint60:"#f1faf1"},xS={red:{shade50:"#210809",shade40:"#3f1011",shade30:"#751d1f",shade20:"#9f282b",shade10:"#bc2f32",primary:"#d13438",tint10:"#d7494c",tint20:"#dc5e62",tint30:"#e37d80",tint40:"#f1bbbc",tint50:"#f8dadb",tint60:"#fdf6f6"},green:TS,darkOrange:{shade50:"#230900",shade40:"#411200",shade30:"#7a2101",shade20:"#a62d01",shade10:"#c43501",primary:"#da3b01",tint10:"#de501c",tint20:"#e36537",tint30:"#e9835e",tint40:"#f4bfab",tint50:"#f9dcd1",tint60:"#fdf6f3"},yellow:{shade50:"#282400",shade40:"#4c4400",shade30:"#817400",shade20:"#c0ad00",shade10:"#e4cc00",primary:"#fde300",tint10:"#fde61e",tint20:"#fdea3d",tint30:"#feee66",tint40:"#fef7b2",tint50:"#fffad6",tint60:"#fffef5"},berry:{shade50:"#1f091d",shade40:"#3a1136",shade30:"#6d2064",shade20:"#932b88",shade10:"#af33a1",primary:"#c239b3",tint10:"#c94cbc",tint20:"#d161c4",tint30:"#da7ed0",tint40:"#edbbe7",tint50:"#f5daf2",tint60:"#fdf5fc"},lightGreen:{shade50:"#031a02",shade40:"#063004",shade30:"#0b5a08",shade20:"#0e7a0b",shade10:"#11910d",primary:"#13a10e",tint10:"#27ac22",tint20:"#3db838",tint30:"#5ec75a",tint40:"#a7e3a5",tint50:"#cef0cd",tint60:"#f2fbf2"},marigold:{shade50:"#251a00",shade40:"#463100",shade30:"#835b00",shade20:"#b27c00",shade10:"#d39300",primary:"#eaa300",tint10:"#edad1c",tint20:"#efb839",tint30:"#f2c661",tint40:"#f9e2ae",tint50:"#fcefd3",tint60:"#fefbf4"}},SS={darkRed:{shade50:"#130204",shade40:"#230308",shade30:"#420610",shade20:"#590815",shade10:"#690a19",primary:"#750b1c",tint10:"#861b2c",tint20:"#962f3f",tint30:"#ac4f5e",tint40:"#d69ca5",tint50:"#e9c7cd",tint60:"#f9f0f2"},cranberry:CS,pumpkin:{shade50:"#200d03",shade40:"#3d1805",shade30:"#712d09",shade20:"#9a3d0c",shade10:"#b6480e",primary:"#ca5010",tint10:"#d06228",tint20:"#d77440",tint30:"#df8e64",tint40:"#efc4ad",tint50:"#f7dfd2",tint60:"#fdf7f4"},peach:{shade50:"#291600",shade40:"#4d2a00",shade30:"#8f4e00",shade20:"#c26a00",shade10:"#e67e00",primary:"#ff8c00",tint10:"#ff9a1f",tint20:"#ffa83d",tint30:"#ffba66",tint40:"#ffddb3",tint50:"#ffedd6",tint60:"#fffaf5"},gold:{shade50:"#1f1900",shade40:"#3a2f00",shade30:"#6c5700",shade20:"#937700",shade10:"#ae8c00",primary:"#c19c00",tint10:"#c8a718",tint20:"#d0b232",tint30:"#dac157",tint40:"#ecdfa5",tint50:"#f5eece",tint60:"#fdfbf2"},brass:{shade50:"#181202",shade40:"#2e2103",shade30:"#553e06",shade20:"#745408",shade10:"#89640a",primary:"#986f0b",tint10:"#a47d1e",tint20:"#b18c34",tint30:"#c1a256",tint40:"#e0cea2",tint50:"#efe4cb",tint60:"#fbf8f2"},brown:{shade50:"#170e07",shade40:"#2b1a0e",shade30:"#50301a",shade20:"#6c4123",shade10:"#804d29",primary:"#8e562e",tint10:"#9c663f",tint20:"#a97652",tint30:"#bb8f6f",tint40:"#ddc3b0",tint50:"#edded3",tint60:"#faf7f4"},forest:{shade50:"#0c1501",shade40:"#162702",shade30:"#294903",shade20:"#376304",shade10:"#427505",primary:"#498205",tint10:"#599116",tint20:"#6ba02b",tint30:"#85b44c",tint40:"#bdd99b",tint50:"#dbebc7",tint60:"#f6faf0"},seafoam:{shade50:"#002111",shade40:"#003d20",shade30:"#00723b",shade20:"#009b51",shade10:"#00b85f",primary:"#00cc6a",tint10:"#19d279",tint20:"#34d889",tint30:"#5ae0a0",tint40:"#a8f0cd",tint50:"#cff7e4",tint60:"#f3fdf8"},darkGreen:{shade50:"#021102",shade40:"#032003",shade30:"#063b06",shade20:"#085108",shade10:"#0a5f0a",primary:"#0b6a0b",tint10:"#1a7c1a",tint20:"#2d8e2d",tint30:"#4da64d",tint40:"#9ad29a",tint50:"#c6e7c6",tint60:"#f0f9f0"},lightTeal:{shade50:"#001d1f",shade40:"#00373a",shade30:"#00666d",shade20:"#008b94",shade10:"#00a5af",primary:"#00b7c3",tint10:"#18bfca",tint20:"#32c8d1",tint30:"#58d3db",tint40:"#a6e9ed",tint50:"#cef3f5",tint60:"#f2fcfd"},teal:{shade50:"#001516",shade40:"#012728",shade30:"#02494c",shade20:"#026467",shade10:"#037679",primary:"#038387",tint10:"#159195",tint20:"#2aa0a4",tint30:"#4cb4b7",tint40:"#9bd9db",tint50:"#c7ebec",tint60:"#f0fafa"},steel:{shade50:"#000f12",shade40:"#001b22",shade30:"#00333f",shade20:"#004555",shade10:"#005265",primary:"#005b70",tint10:"#0f6c81",tint20:"#237d92",tint30:"#4496a9",tint40:"#94c8d4",tint50:"#c3e1e8",tint60:"#eff7f9"},blue:{shade50:"#001322",shade40:"#002440",shade30:"#004377",shade20:"#005ba1",shade10:"#006cbf",primary:"#0078d4",tint10:"#1a86d9",tint20:"#3595de",tint30:"#5caae5",tint40:"#a9d3f2",tint50:"#d0e7f8",tint60:"#f3f9fd"},royalBlue:{shade50:"#000c16",shade40:"#00172a",shade30:"#002c4e",shade20:"#003b6a",shade10:"#00467e",primary:"#004e8c",tint10:"#125e9a",tint20:"#286fa8",tint30:"#4a89ba",tint40:"#9abfdc",tint50:"#c7dced",tint60:"#f0f6fa"},cornflower:{shade50:"#0d1126",shade40:"#182047",shade30:"#2c3c85",shade20:"#3c51b4",shade10:"#4760d5",primary:"#4f6bed",tint10:"#637cef",tint20:"#778df1",tint30:"#93a4f4",tint40:"#c8d1fa",tint50:"#e1e6fc",tint60:"#f7f9fe"},navy:{shade50:"#00061d",shade40:"#000c36",shade30:"#001665",shade20:"#001e89",shade10:"#0023a2",primary:"#0027b4",tint10:"#173bbd",tint20:"#3050c6",tint30:"#546fd2",tint40:"#a3b2e8",tint50:"#ccd5f3",tint60:"#f2f4fc"},lavender:{shade50:"#120f25",shade40:"#221d46",shade30:"#3f3682",shade20:"#5649b0",shade10:"#6656d1",primary:"#7160e8",tint10:"#8172eb",tint20:"#9184ee",tint30:"#a79cf1",tint40:"#d2ccf8",tint50:"#e7e4fb",tint60:"#f9f8fe"},purple:{shade50:"#0f0717",shade40:"#1c0e2b",shade30:"#341a51",shade20:"#46236e",shade10:"#532982",primary:"#5c2e91",tint10:"#6b3f9e",tint20:"#7c52ab",tint30:"#9470bd",tint40:"#c6b1de",tint50:"#e0d3ed",tint60:"#f7f4fb"},grape:{shade50:"#160418",shade40:"#29072e",shade30:"#4c0d55",shade20:"#671174",shade10:"#7a1589",primary:"#881798",tint10:"#952aa4",tint20:"#a33fb1",tint30:"#b55fc1",tint40:"#d9a7e0",tint50:"#eaceef",tint60:"#faf2fb"},lilac:{shade50:"#1c0b1f",shade40:"#35153a",shade30:"#63276d",shade20:"#863593",shade10:"#9f3faf",primary:"#b146c2",tint10:"#ba58c9",tint20:"#c36bd1",tint30:"#cf87da",tint40:"#e6bfed",tint50:"#f2dcf5",tint60:"#fcf6fd"},pink:{shade50:"#24091b",shade40:"#441232",shade30:"#80215d",shade20:"#ad2d7e",shade10:"#cd3595",primary:"#e43ba6",tint10:"#e750b0",tint20:"#ea66ba",tint30:"#ef85c8",tint40:"#f7c0e3",tint50:"#fbddf0",tint60:"#fef6fb"},magenta:{shade50:"#1f0013",shade40:"#390024",shade30:"#6b0043",shade20:"#91005a",shade10:"#ac006b",primary:"#bf0077",tint10:"#c71885",tint20:"#ce3293",tint30:"#d957a8",tint40:"#eca5d1",tint50:"#f5cee6",tint60:"#fcf2f9"},plum:{shade50:"#13000c",shade40:"#240017",shade30:"#43002b",shade20:"#5a003b",shade10:"#6b0045",primary:"#77004d",tint10:"#87105d",tint20:"#98246f",tint30:"#ad4589",tint40:"#d696c0",tint50:"#e9c4dc",tint60:"#faf0f6"},beige:{shade50:"#141313",shade40:"#252323",shade30:"#444241",shade20:"#5d5958",shade10:"#6e6968",primary:"#7a7574",tint10:"#8a8584",tint20:"#9a9594",tint30:"#afabaa",tint40:"#d7d4d4",tint50:"#eae8e8",tint60:"#faf9f9"},mink:{shade50:"#0f0e0e",shade40:"#1c1b1a",shade30:"#343231",shade20:"#474443",shade10:"#54514f",primary:"#5d5a58",tint10:"#706d6b",tint20:"#84817e",tint30:"#9e9b99",tint40:"#cecccb",tint50:"#e5e4e3",tint60:"#f8f8f8"},platinum:{shade50:"#111314",shade40:"#1f2426",shade30:"#3b4447",shade20:"#505c60",shade10:"#5f6d71",primary:"#69797e",tint10:"#79898d",tint20:"#89989d",tint30:"#a0adb2",tint40:"#cdd6d8",tint50:"#e4e9ea",tint60:"#f8f9fa"},anchor:{shade50:"#090a0b",shade40:"#111315",shade30:"#202427",shade20:"#2b3135",shade10:"#333a3f",primary:"#394146",tint10:"#4d565c",tint20:"#626c72",tint30:"#808a90",tint40:"#bcc3c7",tint50:"#dbdfe1",tint60:"#f6f7f8"}},IS={cranberry:CS,green:TS,orange:{shade50:"#271002",shade40:"#4a1e04",shade30:"#8a3707",shade20:"#bc4b09",shade10:"#de590b",primary:"#f7630c",tint10:"#f87528",tint20:"#f98845",tint30:"#faa06b",tint40:"#fdcfb4",tint50:"#fee5d7",tint60:"#fff9f5"}},_S={success:"green",warning:"orange",danger:"cranberry"},ES=["red","green","darkOrange","yellow","berry","lightGreen","marigold"].reduce((e,t)=>{const r=t.slice(0,1).toUpperCase()+t.slice(1),o={[`colorPalette${r}Background1`]:xS[t].tint60,[`colorPalette${r}Background2`]:xS[t].tint40,[`colorPalette${r}Background3`]:xS[t].primary,[`colorPalette${r}Foreground1`]:xS[t].shade10,[`colorPalette${r}Foreground2`]:xS[t].shade30,[`colorPalette${r}Foreground3`]:xS[t].primary,[`colorPalette${r}BorderActive`]:xS[t].primary,[`colorPalette${r}Border1`]:xS[t].tint40,[`colorPalette${r}Border2`]:xS[t].primary};return Object.assign(e,o)},{});ES.colorPaletteYellowForeground1=xS.yellow.shade30,ES.colorPaletteRedForegroundInverted=xS.red.tint20,ES.colorPaletteGreenForegroundInverted=xS.green.tint20,ES.colorPaletteYellowForegroundInverted=xS.yellow.tint40;const AS=["darkRed","cranberry","pumpkin","peach","gold","brass","brown","forest","seafoam","darkGreen","lightTeal","teal","steel","blue","royalBlue","cornflower","navy","lavender","purple","grape","lilac","pink","magenta","plum","beige","mink","platinum","anchor"].reduce((e,t)=>{const r=t.slice(0,1).toUpperCase()+t.slice(1),o={[`colorPalette${r}Background2`]:SS[t].tint40,[`colorPalette${r}Foreground2`]:SS[t].shade30,[`colorPalette${r}BorderActive`]:SS[t].primary};return Object.assign(e,o)},{}),BS={...ES,...AS},OS=Object.entries(_S).reduce((e,[t,r])=>{const o=t.slice(0,1).toUpperCase()+t.slice(1),n={[`colorStatus${o}Background1`]:IS[r].tint60,[`colorStatus${o}Background2`]:IS[r].tint40,[`colorStatus${o}Background3`]:IS[r].primary,[`colorStatus${o}Foreground1`]:IS[r].shade10,[`colorStatus${o}Foreground2`]:IS[r].shade30,[`colorStatus${o}Foreground3`]:IS[r].primary,[`colorStatus${o}ForegroundInverted`]:IS[r].tint30,[`colorStatus${o}BorderActive`]:IS[r].primary,[`colorStatus${o}Border1`]:IS[r].tint40,[`colorStatus${o}Border2`]:IS[r].primary};return Object.assign(e,n)},{});OS.colorStatusDangerBackground3Hover=IS[_S.danger].shade10,OS.colorStatusDangerBackground3Pressed=IS[_S.danger].shade20,OS.colorStatusWarningForeground1=IS[_S.warning].shade20,OS.colorStatusWarningForeground3=IS[_S.warning].shade20,OS.colorStatusWarningBorder2=IS[_S.warning].shade20;const RS={borderRadiusNone:"0",borderRadiusSmall:"2px",borderRadiusMedium:"4px",borderRadiusLarge:"6px",borderRadiusXLarge:"8px",borderRadiusCircular:"10000px"},jS={fontSizeBase100:"10px",fontSizeBase200:"12px",fontSizeBase300:"14px",fontSizeBase400:"16px",fontSizeBase500:"20px",fontSizeBase600:"24px",fontSizeHero700:"28px",fontSizeHero800:"32px",fontSizeHero900:"40px",fontSizeHero1000:"68px"},PS={lineHeightBase100:"14px",lineHeightBase200:"16px",lineHeightBase300:"20px",lineHeightBase400:"22px",lineHeightBase500:"28px",lineHeightBase600:"32px",lineHeightHero700:"36px",lineHeightHero800:"40px",lineHeightHero900:"52px",lineHeightHero1000:"92px"},NS={fontWeightRegular:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},zS={fontFamilyBase:"'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif",fontFamilyMonospace:"Consolas, 'Courier New', Courier, monospace",fontFamilyNumeric:"Bahnschrift, 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif"},qS={strokeWidthThin:"1px",strokeWidthThick:"2px",strokeWidthThicker:"3px",strokeWidthThickest:"4px"};function MS(e,t,r=""){return{[`shadow2${r}`]:`0 0 2px ${e}, 0 1px 2px ${t}`,[`shadow4${r}`]:`0 0 2px ${e}, 0 2px 4px ${t}`,[`shadow8${r}`]:`0 0 2px ${e}, 0 4px 8px ${t}`,[`shadow16${r}`]:`0 0 2px ${e}, 0 8px 16px ${t}`,[`shadow28${r}`]:`0 0 8px ${e}, 0 14px 28px ${t}`,[`shadow64${r}`]:`0 0 8px ${e}, 0 32px 64px ${t}`}}const FS={durationUltraFast:"50ms",durationFaster:"100ms",durationFast:"150ms",durationNormal:"200ms",durationGentle:"250ms",durationSlow:"300ms",durationSlower:"400ms",durationUltraSlow:"500ms"},DS={curveAccelerateMax:"cubic-bezier(0.9,0.1,1,0.2)",curveAccelerateMid:"cubic-bezier(1,0,1,1)",curveAccelerateMin:"cubic-bezier(0.8,0,0.78,1)",curveDecelerateMax:"cubic-bezier(0.1,0.9,0.2,1)",curveDecelerateMid:"cubic-bezier(0,0,0,1)",curveDecelerateMin:"cubic-bezier(0.33,0,0.1,1)",curveEasyEaseMax:"cubic-bezier(0.8,0,0.2,1)",curveEasyEase:"cubic-bezier(0.33,0,0.67,1)",curveLinear:"cubic-bezier(0,0,1,1)"},LS="10px",HS="12px",US="16px",WS="20px",VS="24px",$S="32px",KS={spacingHorizontalNone:"0",spacingHorizontalXXS:"2px",spacingHorizontalXS:"4px",spacingHorizontalSNudge:"6px",spacingHorizontalS:"8px",spacingHorizontalMNudge:LS,spacingHorizontalM:HS,spacingHorizontalL:US,spacingHorizontalXL:WS,spacingHorizontalXXL:VS,spacingHorizontalXXXL:$S},GS={spacingVerticalNone:"0",spacingVerticalXXS:"2px",spacingVerticalXS:"4px",spacingVerticalSNudge:"6px",spacingVerticalS:"8px",spacingVerticalMNudge:LS,spacingVerticalM:HS,spacingVerticalL:US,spacingVerticalXL:WS,spacingVerticalXXL:VS,spacingVerticalXXXL:$S},JS=(()=>{const e=(e=>({colorNeutralForeground1:sS,colorNeutralForeground1Hover:sS,colorNeutralForeground1Pressed:sS,colorNeutralForeground1Selected:sS,colorNeutralForeground2:cS,colorNeutralForeground2Hover:sS,colorNeutralForeground2Pressed:sS,colorNeutralForeground2Selected:sS,colorNeutralForeground2BrandHover:e[80],colorNeutralForeground2BrandPressed:e[70],colorNeutralForeground2BrandSelected:e[80],colorNeutralForeground3:lS,colorNeutralForeground3Hover:cS,colorNeutralForeground3Pressed:cS,colorNeutralForeground3Selected:cS,colorNeutralForeground3BrandHover:e[80],colorNeutralForeground3BrandPressed:e[70],colorNeutralForeground3BrandSelected:e[80],colorNeutralForeground4:"#707070",colorNeutralForegroundDisabled:dS,colorNeutralForegroundInvertedDisabled:vS,colorBrandForegroundLink:e[70],colorBrandForegroundLinkHover:e[60],colorBrandForegroundLinkPressed:e[40],colorBrandForegroundLinkSelected:e[70],colorNeutralForeground2Link:cS,colorNeutralForeground2LinkHover:sS,colorNeutralForeground2LinkPressed:sS,colorNeutralForeground2LinkSelected:sS,colorCompoundBrandForeground1:e[80],colorCompoundBrandForeground1Hover:e[70],colorCompoundBrandForeground1Pressed:e[60],colorBrandForeground1:e[80],colorBrandForeground2:e[70],colorBrandForeground2Hover:e[60],colorBrandForeground2Pressed:e[30],colorNeutralForeground1Static:sS,colorNeutralForegroundStaticInverted:kS,colorNeutralForegroundInverted:kS,colorNeutralForegroundInvertedHover:kS,colorNeutralForegroundInvertedPressed:kS,colorNeutralForegroundInvertedSelected:kS,colorNeutralForegroundInverted2:kS,colorNeutralForegroundOnBrand:kS,colorNeutralForegroundInvertedLink:kS,colorNeutralForegroundInvertedLinkHover:kS,colorNeutralForegroundInvertedLinkPressed:kS,colorNeutralForegroundInvertedLinkSelected:kS,colorBrandForegroundInverted:e[100],colorBrandForegroundInvertedHover:e[110],colorBrandForegroundInvertedPressed:e[100],colorBrandForegroundOnLight:e[80],colorBrandForegroundOnLightHover:e[70],colorBrandForegroundOnLightPressed:e[50],colorBrandForegroundOnLightSelected:e[60],colorNeutralBackground1:kS,colorNeutralBackground1Hover:gS,colorNeutralBackground1Pressed:uS,colorNeutralBackground1Selected:hS,colorNeutralBackground2:mS,colorNeutralBackground2Hover:pS,colorNeutralBackground2Pressed:"#dbdbdb",colorNeutralBackground2Selected:fS,colorNeutralBackground3:gS,colorNeutralBackground3Hover:hS,colorNeutralBackground3Pressed:"#d6d6d6",colorNeutralBackground3Selected:uS,colorNeutralBackground4:pS,colorNeutralBackground4Hover:mS,colorNeutralBackground4Pressed:gS,colorNeutralBackground4Selected:kS,colorNeutralBackground5:hS,colorNeutralBackground5Hover:gS,colorNeutralBackground5Pressed:pS,colorNeutralBackground5Selected:mS,colorNeutralBackground6:fS,colorNeutralBackgroundInverted:"#292929",colorNeutralBackgroundStatic:"#333333",colorNeutralBackgroundAlpha:bS,colorNeutralBackgroundAlpha2:"rgba(255, 255, 255, 0.8)",colorSubtleBackground:"transparent",colorSubtleBackgroundHover:gS,colorSubtleBackgroundPressed:uS,colorSubtleBackgroundSelected:hS,colorSubtleBackgroundLightAlphaHover:"rgba(255, 255, 255, 0.7)",colorSubtleBackgroundLightAlphaPressed:bS,colorSubtleBackgroundLightAlphaSelected:"transparent",colorSubtleBackgroundInverted:"transparent",colorSubtleBackgroundInvertedHover:wS,colorSubtleBackgroundInvertedPressed:"rgba(0, 0, 0, 0.3)",colorSubtleBackgroundInvertedSelected:"rgba(0, 0, 0, 0.2)",colorTransparentBackground:"transparent",colorTransparentBackgroundHover:"transparent",colorTransparentBackgroundPressed:"transparent",colorTransparentBackgroundSelected:"transparent",colorNeutralBackgroundDisabled:pS,colorNeutralBackgroundInvertedDisabled:"rgba(255, 255, 255, 0.1)",colorNeutralStencil1:fS,colorNeutralStencil2:mS,colorNeutralStencil1Alpha:wS,colorNeutralStencil2Alpha:yS,colorBackgroundOverlay:"rgba(0, 0, 0, 0.4)",colorScrollbarOverlay:"rgba(0, 0, 0, 0.5)",colorBrandBackground:e[80],colorBrandBackgroundHover:e[70],colorBrandBackgroundPressed:e[40],colorBrandBackgroundSelected:e[60],colorCompoundBrandBackground:e[80],colorCompoundBrandBackgroundHover:e[70],colorCompoundBrandBackgroundPressed:e[60],colorBrandBackgroundStatic:e[80],colorBrandBackground2:e[160],colorBrandBackground2Hover:e[150],colorBrandBackground2Pressed:e[130],colorBrandBackground3Static:e[60],colorBrandBackground4Static:e[40],colorBrandBackgroundInverted:kS,colorBrandBackgroundInvertedHover:e[160],colorBrandBackgroundInvertedPressed:e[140],colorBrandBackgroundInvertedSelected:e[150],colorNeutralCardBackground:mS,colorNeutralCardBackgroundHover:kS,colorNeutralCardBackgroundPressed:gS,colorNeutralCardBackgroundSelected:hS,colorNeutralCardBackgroundDisabled:pS,colorNeutralStrokeAccessible:lS,colorNeutralStrokeAccessibleHover:"#575757",colorNeutralStrokeAccessiblePressed:"#4d4d4d",colorNeutralStrokeAccessibleSelected:e[80],colorNeutralStroke1:"#d1d1d1",colorNeutralStroke1Hover:"#c7c7c7",colorNeutralStroke1Pressed:"#b3b3b3",colorNeutralStroke1Selected:dS,colorNeutralStroke2:uS,colorNeutralStroke3:pS,colorNeutralStrokeSubtle:uS,colorNeutralStrokeOnBrand:kS,colorNeutralStrokeOnBrand2:kS,colorNeutralStrokeOnBrand2Hover:kS,colorNeutralStrokeOnBrand2Pressed:kS,colorNeutralStrokeOnBrand2Selected:kS,colorBrandStroke1:e[80],colorBrandStroke2:e[140],colorBrandStroke2Hover:e[120],colorBrandStroke2Pressed:e[80],colorBrandStroke2Contrast:e[140],colorCompoundBrandStroke:e[80],colorCompoundBrandStrokeHover:e[70],colorCompoundBrandStrokePressed:e[60],colorNeutralStrokeDisabled:uS,colorNeutralStrokeInvertedDisabled:vS,colorTransparentStroke:"transparent",colorTransparentStrokeInteractive:"transparent",colorTransparentStrokeDisabled:"transparent",colorNeutralStrokeAlpha:yS,colorNeutralStrokeAlpha2:"rgba(255, 255, 255, 0.2)",colorStrokeFocus1:kS,colorStrokeFocus2:"#000000",colorNeutralShadowAmbient:"rgba(0,0,0,0.12)",colorNeutralShadowKey:"rgba(0,0,0,0.14)",colorNeutralShadowAmbientLighter:"rgba(0,0,0,0.06)",colorNeutralShadowKeyLighter:"rgba(0,0,0,0.07)",colorNeutralShadowAmbientDarker:"rgba(0,0,0,0.20)",colorNeutralShadowKeyDarker:"rgba(0,0,0,0.24)",colorBrandShadowAmbient:"rgba(0,0,0,0.30)",colorBrandShadowKey:"rgba(0,0,0,0.25)"}))({10:"#061724",20:"#082338",30:"#0a2e4a",40:"#0c3b5e",50:"#0e4775",60:"#0f548c",70:"#115ea3",80:"#0f6cbd",90:"#2886de",100:"#479ef5",110:"#62abf5",120:"#77b7f7",130:"#96c6fa",140:"#b4d6fa",150:"#cfe4fa",160:"#ebf3fc"});return{...RS,...jS,...PS,...zS,...NS,...qS,...KS,...GS,...FS,...DS,...e,...BS,...OS,...MS(e.colorNeutralShadowAmbient,e.colorNeutralShadowKey),...MS(e.colorBrandShadowAmbient,e.colorBrandShadowKey,"Brand")}})(),QS="faktur:digital docuvita Outlook AddIn",XS=document.getElementById("container"),YS=XS?(0,i.H)(XS):void 0;Office.onReady(()=>{fetch("/config.json").then(e=>e.json()).then(e=>{var t,r;const n=(null===(r=null===(t=null===Office||void 0===Office?void 0:Office.context)||void 0===t?void 0:t.roamingSettings)||void 0===r?void 0:r.get)?Office.context.roamingSettings.get("config"):null;n?null==YS||YS.render(o.createElement(aS,{theme:JS},o.createElement(Qx,{title:QS,config:n,defaultConfig:e}))):null==YS||YS.render(o.createElement(aS,{theme:JS},o.createElement(Qx,{title:QS,config:e,defaultConfig:e})))}),console.log("Office Add-in bereit")})},44363:function(e,t,r){r(22799)},69982:function(e,t,r){e.exports=r(7463)},74848:function(e,t,r){e.exports=r(21020)}},function(e){e(e.s=32025)}]); //# sourceMappingURL=taskpane.js.map